From 367b248bc0ed2609d538de4f1a2e198f7d0c7d6a Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Wed, 7 Aug 2013 18:18:09 +0200 Subject: show 'More apps' link to app administration directly in app navigation --- core/css/styles.css | 4 ++++ core/templates/layout.user.php | 13 +++++++++++++ lib/app.php | 10 +--------- settings/img/apps.png | Bin 196 -> 259 bytes settings/img/apps.svg | 22 +++++++++++++++------- 5 files changed, 33 insertions(+), 16 deletions(-) diff --git a/core/css/styles.css b/core/css/styles.css index 0dd66fb5b7c..dc7e4313f0c 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -481,6 +481,10 @@ label.infield { cursor:text !important; top:1.05em; left:.85em; } } #navigation li:first-child a { padding-top:16px; } +#apps-management { + opacity: .6; +} + /* USER MENU */ #settings { float:right; margin-top:7px; color:#bbb; text-shadow:0 -1px 0 #000; } diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php index b7405ea273b..3c1114492cb 100644 --- a/core/templates/layout.user.php +++ b/core/templates/layout.user.php @@ -89,6 +89,19 @@ + + + +
  • + class="active"> + + + t('More apps')); ?> + + +
  • + diff --git a/lib/app.php b/lib/app.php index 2437896157a..5fa650044f3 100644 --- a/lib/app.php +++ b/lib/app.php @@ -401,15 +401,7 @@ class OC_App{ // if the user is an admin if(OC_User::isAdminUser(OC_User::getUser())) { - // admin apps menu - $settings[] = array( - "id" => "core_apps", - "order" => 3, - "href" => OC_Helper::linkToRoute( "settings_apps" ).'?installed', - "name" => $l->t("Apps"), - "icon" => OC_Helper::imagePath( "settings", "apps.svg" ) - ); - + // admin settings $settings[]=array( "id" => "admin", "order" => 1000, diff --git a/settings/img/apps.png b/settings/img/apps.png index 2b18f678a02..6dc8d4c8a6e 100644 Binary files a/settings/img/apps.png and b/settings/img/apps.png differ diff --git a/settings/img/apps.svg b/settings/img/apps.svg index e2cc48f2956..338938f256e 100644 --- a/settings/img/apps.svg +++ b/settings/img/apps.svg @@ -1,8 +1,16 @@ - - - - - - - + + + + + + image/svg+xml + + + + + + + + + -- cgit v1.2.3 From 775f33cc1b64bdd6ed48039fdd91331f0e91826d Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Wed, 7 Aug 2013 21:53:25 +0200 Subject: prepend the new app before the 'More apps' function --- settings/js/apps.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/settings/js/apps.js b/settings/js/apps.js index 0540d9b1c58..66606afad80 100644 --- a/settings/js/apps.js +++ b/settings/js/apps.js @@ -152,7 +152,8 @@ OC.Settings.Apps = OC.Settings.Apps || { a.prepend(filename); a.prepend(img); li.append(a); - container.append(li); + // prepend the new app before the 'More apps' function + $('#apps-management').before(li); if (!SVGSupport() && entry.icon.match(/\.svg$/i)) { $(img).addClass('svg'); replaceSVG(); -- cgit v1.2.3 From 7a9daa99d1e801620affb38bf78a7323a59ed908 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Wed, 7 Aug 2013 21:53:53 +0200 Subject: scroll the app navigation down so the newly added app is seen --- settings/js/apps.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/settings/js/apps.js b/settings/js/apps.js index 66606afad80..545d005eff4 100644 --- a/settings/js/apps.js +++ b/settings/js/apps.js @@ -154,6 +154,8 @@ OC.Settings.Apps = OC.Settings.Apps || { li.append(a); // prepend the new app before the 'More apps' function $('#apps-management').before(li); + // scroll the app navigation down so the newly added app is seen + $('#navigation').animate({ scrollTop: $('#apps').height() }, 'slow'); if (!SVGSupport() && entry.icon.match(/\.svg$/i)) { $(img).addClass('svg'); replaceSVG(); -- cgit v1.2.3 From 31d50288a501dad64400450914d076b43b6ea037 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Wed, 7 Aug 2013 21:54:28 +0200 Subject: draw attention to the newly added app entry by flashing it twice --- settings/js/apps.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/settings/js/apps.js b/settings/js/apps.js index 545d005eff4..2ff3f0536d4 100644 --- a/settings/js/apps.js +++ b/settings/js/apps.js @@ -156,6 +156,9 @@ OC.Settings.Apps = OC.Settings.Apps || { $('#apps-management').before(li); // scroll the app navigation down so the newly added app is seen $('#navigation').animate({ scrollTop: $('#apps').height() }, 'slow'); + // draw attention to the newly added app entry by flashing it twice + container.children('li[data-id="'+entry.id+'"]').animate({opacity:.3}).animate({opacity:1}).animate({opacity:.3}).animate({opacity:1}); + if (!SVGSupport() && entry.icon.match(/\.svg$/i)) { $(img).addClass('svg'); replaceSVG(); -- cgit v1.2.3