load backbone universally
This commit is contained in:
parent
67bb5712e4
commit
ffaf5fed0e
|
@ -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');
|
||||||
|
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue