From: Thomas Tanghus Date: Mon, 25 Jun 2012 03:02:01 +0000 (+0200) Subject: Allow direct link to app. X-Git-Tag: v4.5.0beta1~74^2~403^2~28 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c3130919c2fa67caa5d7d52124b20388633c5cfa;p=nextcloud-server.git Allow direct link to app. --- diff --git a/settings/apps.php b/settings/apps.php index f85b28158f5..f4ae8b8d977 100644 --- a/settings/apps.php +++ b/settings/apps.php @@ -93,6 +93,8 @@ usort($apps, 'app_sort'); $tmpl = new OC_Template( "settings", "apps", "user" ); $tmpl->assign('apps',$apps, false); +$appid = (isset($_GET['appid'])?strip_tags($_GET['appid']):''); +$tmpl->assign('appid',$appid); $tmpl->printPage(); diff --git a/settings/js/apps.js b/settings/js/apps.js index 224076aba43..cfef894c6fb 100644 --- a/settings/js/apps.js +++ b/settings/js/apps.js @@ -73,4 +73,13 @@ $(document).ready(function(){ } } }); + + if(appid) { + var item = $('#leftcontent li[data-id="'+appid+'"]'); + if(item) { + item.trigger('click'); + item.addClass('active'); + $('#leftcontent').animate({scrollTop: $(item).offset().top-70}, 'slow','swing'); + } + } }); diff --git a/settings/templates/apps.php b/settings/templates/apps.php index c620f796e06..b9beedca151 100644 --- a/settings/templates/apps.php +++ b/settings/templates/apps.php @@ -3,7 +3,9 @@ * This file is licensed under the Affero General Public License version 3 or later. * See the COPYING-README file. */?> - +
t('Add your App');?>