make available as OC.Backbone to avoid conflicts

remotes/origin/handlebars-approach
Arthur Schiwon 11 years ago
parent cc4a2a4727
commit 67bb5712e4
  1. 12
      core/js/oc-backbone.js
  2. 5
      lib/private/util.php

@ -0,0 +1,12 @@
/*
* Copyright (c) 2015
*
* This file is licensed under the Affero General Public License version 3
* or later.
*
* See the COPYING-README file.
*
*/
if(!_.isUndefined(Backbone)) {
OC.Backbone = Backbone.noConflict();
}

@ -455,6 +455,11 @@ class OC_Util {
$path = OC_Util::generatePath($application, 'vendor', $file);
if (!in_array($path, self::$scripts)) {
self::$scripts[] = $path;
if($file === 'backbone/backbone') {
// makes backbone available as OC.Backbone in order to avoid
// conflicts, because apps (like Mail) may bring own versions
OC_Util::addScript('oc-backbone');
}
}
}

Loading…
Cancel
Save