diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-11-18 10:47:51 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-11-18 10:47:51 +0100 |
commit | 29df1ec667ba16cff222c859dfd6e8f999e4b3b9 (patch) | |
tree | f254f8bf5826850458c441ee38dee0e92204071b /templates/index.php | |
parent | b164a270f91b6490883e3b1136dfdf1641d44326 (diff) |
only scroll to active navigation entry when it is not in view, if debug mode is defined, dont included minified scripts
Diffstat (limited to 'templates/index.php')
-rw-r--r-- | templates/index.php | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/templates/index.php b/templates/index.php index 9de7932d4..1af26e896 100644 --- a/templates/index.php +++ b/templates/index.php @@ -1,19 +1,38 @@ <?php -// backports -if (version_compare(implode('.', \OCP\Util::getVersion()), '7.8', '<=')) { - style('news', 'news-owncloud7.min'); -} else { - style('news', 'news.min'); -} - script('news', [ 'vendor/es6-shim/es6-shim.min', 'vendor/angular/angular.min', 'vendor/angular-route/angular-route.min', 'vendor/angular-sanitize/angular-sanitize.min', - 'vendor/momentjs/min/moment-with-locales.min', - 'build/app.min', + 'vendor/momentjs/min/moment-with-locales.min' ]); + +if (defined('DEBUG') && DEBUG === true) { + if (version_compare(implode('.', \OCP\Util::getVersion()), '7.8', '<=')) { + style('news', '7'); + } + + style('news', [ + 'app', + 'custom', + 'content', + 'mobile', + 'navigation', + 'settings', + 'shortcuts' + ]); + + script('news', 'build/app'); + +} else { + if (version_compare(implode('.', \OCP\Util::getVersion()), '7.8', '<=')) { + style('news', 'news-owncloud7.min'); + } else { + style('news', 'news.min'); + } + + script('news', 'build/app.min'); +} ?> <div id="app" ng-app="News" ng-cloak ng-strict-di |