From 6db6161e6c33096d79765adf1b6e264612acf953 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Tue, 8 May 2018 13:16:22 +0200 Subject: Move navigation registration to appinfo.xml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- appinfo/app.php | 1 - appinfo/info.xml | 10 ++++++++++ img/info.svg | 1 + js/firstrunwizard.js | 2 +- lib/AppInfo/Application.php | 14 -------------- 5 files changed, 12 insertions(+), 16 deletions(-) create mode 100644 img/info.svg diff --git a/appinfo/app.php b/appinfo/app.php index 66f4f967..a2d1f7eb 100644 --- a/appinfo/app.php +++ b/appinfo/app.php @@ -23,4 +23,3 @@ $app = new \OCA\FirstRunWizard\AppInfo\Application(); $app->register(); -$app->registerNavigation(); diff --git a/appinfo/info.xml b/appinfo/info.xml index 2ab92a97..90be4718 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -20,6 +20,16 @@ The First run wizard can be customized to meet specific design goals, or to chan + + + firstrunwizard-about + About + #about + 5 + info.svg + settings + + OCA\FirstRunWizard\Settings\Personal diff --git a/img/info.svg b/img/info.svg new file mode 100644 index 00000000..02d44921 --- /dev/null +++ b/img/info.svg @@ -0,0 +1 @@ + diff --git a/js/firstrunwizard.js b/js/firstrunwizard.js index 39d4fa44..8acb6e1a 100644 --- a/js/firstrunwizard.js +++ b/js/firstrunwizard.js @@ -148,7 +148,7 @@ $(document).ready(function() { OCA.FirstRunWizard.Wizard.showFirstRunWizard(); }); - $('#expanddiv a[href="#about"]').on('click', function () { + $('#expanddiv li[data-id="firstrunwizard-about"] a').on('click', function () { OCA.FirstRunWizard.Wizard.showFirstRunWizard(); $(this).find('div').remove(); $(this).find('img').show(); diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index de4931a8..2e1a6db9 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -93,18 +93,4 @@ class Application extends App { ]; }); } - - public function registerNavigation() { - $urlGenerator = $this->getContainer()->getServer()->getURLGenerator(); - $l = $this->getContainer()->getServer()->getL10N('firstrunwizard'); - - $this->getContainer()->getServer()->getNavigationManager()->add([ - 'type' => 'settings', - 'id' => 'about', - 'order' => 5, - 'href' => '#about', - 'name' => $l->t('About'), - 'icon' => $urlGenerator->imagePath('core', 'actions/info.svg'), - ]); - } } -- cgit v1.2.3