load backbone universally

This commit is contained in:
Arthur Schiwon 2015-08-06 12:27:18 +02:00
parent 67bb5712e4
commit ffaf5fed0e
4 changed files with 2 additions and 7 deletions

View File

@ -51,7 +51,6 @@ OCP\Util::addscript('files', 'search');
\OCP\Util::addScript('files', 'favoritesplugin'); \OCP\Util::addScript('files', 'favoritesplugin');
\OC_Util::addVendorScript('core', 'handlebars/handlebars'); \OC_Util::addVendorScript('core', 'handlebars/handlebars');
\OC_Util::addVendorScript('core', 'backbone/backbone');
OCP\App::setActiveNavigationEntry('files_index'); OCP\App::setActiveNavigationEntry('files_index');

View File

@ -407,6 +407,8 @@ class OC {
OC_Util::addScript('mimetype'); OC_Util::addScript('mimetype');
OC_Util::addScript('mimetypelist'); OC_Util::addScript('mimetypelist');
OC_Util::addVendorScript('snapjs/dist/latest/snap'); OC_Util::addVendorScript('snapjs/dist/latest/snap');
OC_Util::addVendorScript('core', 'backbone/backbone');
OC_Util::addScript('oc-backbone');
// avatars // avatars
if (\OC::$server->getSystemConfig()->getValue('enable_avatars', true) === true) { if (\OC::$server->getSystemConfig()->getValue('enable_avatars', true) === true) {

View File

@ -83,7 +83,6 @@ class Share extends Constants {
); );
if(count(self::$backendTypes) === 1) { if(count(self::$backendTypes) === 1) {
\OC_Util::addScript('core', 'share'); \OC_Util::addScript('core', 'share');
\OC_Util::addVendorScript('core', 'backbone/backbone');
\OC_Util::addStyle('core', 'share'); \OC_Util::addStyle('core', 'share');
} }
return true; return true;

View File

@ -455,11 +455,6 @@ class OC_Util {
$path = OC_Util::generatePath($application, 'vendor', $file); $path = OC_Util::generatePath($application, 'vendor', $file);
if (!in_array($path, self::$scripts)) { if (!in_array($path, self::$scripts)) {
self::$scripts[] = $path; 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');
}
} }
} }