From 750fc7b19fcd69d2ef238254aefe6a38f928e4b5 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Thu, 1 Oct 2015 23:19:32 +0200 Subject: [PATCH] Change url for update/upgrade tab --- src/js/app.js | 12 ++++++------ src/views/home.ms | 2 +- .../{tools/tools_update.ms => update/update.ms} | 7 +++---- .../{tools/tools_upgrade.ms => upgrade/upgrade.ms} | 5 ++--- 4 files changed, 12 insertions(+), 14 deletions(-) rename src/views/{tools/tools_update.ms => update/update.ms} (84%) rename src/views/{tools/tools_upgrade.ms => upgrade/upgrade.ms} (64%) diff --git a/src/js/app.js b/src/js/app.js index 2e914bae..6a937fde 100644 --- a/src/js/app.js +++ b/src/js/app.js @@ -1714,7 +1714,7 @@ var app = Sammy('#main', function (sam) { }); // System update & upgrade - sam.get('#/tools/update', function (c) { + sam.get('#/update', function (c) { c.api('/update', function(data) { packagesLength = data.packages.length; for(var i = 0; i < packagesLength; i++) { @@ -1727,16 +1727,16 @@ var app = Sammy('#main', function (sam) { data.packages[i].delayed = true; } } - c.view('tools/tools_update', data); + c.view('update/update', data); }, 'PUT'); }); // Upgrade apps or packages - sam.get('#/tools/upgrade/:type', function (c) { + sam.get('#/upgrade/:type', function (c) { if (c.params['type'] !== 'apps' && c.params['type'] !== 'packages') { c.flash('fail', y18n.t('unknown_argument', [c.params['type']])); store.clear('slide'); - c.redirect('#/tools/update'); + c.redirect('#/update'); } else { c.confirm( @@ -1750,13 +1750,13 @@ var app = Sammy('#main', function (sam) { c.api('/upgrade?'+endurl, function(data) { // 'log' is a reserved name, maybe in handlebars data.logs = data.log; - c.view('tools/tools_upgrade', data); + c.view('upgrade/upgrade', data); }, 'PUT'); }, function(){ store.clear('slide'); - c.redirect('#/tools/update'); + c.redirect('#/update'); } ); } diff --git a/src/views/home.ms b/src/views/home.ms index fe5dd843..4271b971 100644 --- a/src/views/home.ms +++ b/src/views/home.ms @@ -11,7 +11,7 @@

{{t 'applications'}}

- +

{{t 'system_update'}}

diff --git a/src/views/tools/tools_update.ms b/src/views/update/update.ms similarity index 84% rename from src/views/tools/tools_update.ms rename to src/views/update/update.ms index e701d0b9..dcedb1e3 100644 --- a/src/views/tools/tools_update.ms +++ b/src/views/update/update.ms @@ -1,7 +1,6 @@
{{t 'home'}} - {{t 'tools'}} - {{t 'system_update'}} + {{t 'system_update'}}
@@ -27,7 +26,7 @@ {{/packages}} {{else}}
@@ -49,7 +48,7 @@ {{/apps}}
{{else}}
diff --git a/src/views/tools/tools_upgrade.ms b/src/views/upgrade/upgrade.ms similarity index 64% rename from src/views/tools/tools_upgrade.ms rename to src/views/upgrade/upgrade.ms index 28181ce5..f5a9336b 100644 --- a/src/views/tools/tools_upgrade.ms +++ b/src/views/upgrade/upgrade.ms @@ -1,8 +1,7 @@