From b7603162188734c215ca6d77ca141f028dce9108 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 12 Aug 2019 19:43:34 +0200 Subject: [PATCH 1/3] Using 'previous' on the password page to go back to the 'domain' page was breaking the accordion stuff because of the duplicate id in the slideback page --- src/js/yunohost/controllers/postinstall.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/js/yunohost/controllers/postinstall.js b/src/js/yunohost/controllers/postinstall.js index 3760920c..04f7d7e9 100644 --- a/src/js/yunohost/controllers/postinstall.js +++ b/src/js/yunohost/controllers/postinstall.js @@ -51,7 +51,7 @@ } store.set('maindomain', domain); }); - }); + }, false); // We disable enableSlide because that causes some issues with accordion when using the 'previous' button }); }); @@ -62,7 +62,9 @@ store.clear('slide'); c.redirect('#/postinstall/domain'); } else { - c.view('postinstall/postinstall_3', { 'domain': store.get('maindomain').toLowerCase() }); + c.view('postinstall/postinstall_3', { 'domain': store.get('maindomain').toLowerCase() }, + function() { }, + false); // We disable enableSlide because that causes some issues with accordion when using the 'previous' button } }); From b97ef045e83c5ded985ecb2228621f23a1b4bc1a Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 13 Aug 2019 00:46:45 +0200 Subject: [PATCH 2/3] Fix stupid / buggy error handling for postinstall --- src/js/yunohost/helpers.js | 10 +++------- src/locales/en.json | 1 - 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/js/yunohost/helpers.js b/src/js/yunohost/helpers.js index d572807a..30fae9e2 100644 --- a/src/js/yunohost/helpers.js +++ b/src/js/yunohost/helpers.js @@ -102,9 +102,9 @@ var args = data; // TODO: change this code if (uri === '/postinstall') { - var installing = false; + var post_installing = false; setInterval(function () { - installing = true; + post_installing = true; }, 1500); } @@ -112,8 +112,7 @@ callbackOnFailure = function(xhr) { // Postinstall is a custom case, we have to wait that // operation is done before doing anything - if (uri === '/postinstall') { - if (installing) { + if ((uri === '/postinstall') && (post_installing)) { interval = window.location.hostname === args.domain ? 20000 : 5000; checkInstall = setInterval(function () { c.checkInstall(function(isInstalled) { @@ -124,9 +123,6 @@ } }); }, interval); - } else { - c.flash('fail', y18n.t('error_occured')); - } } // Regular errors else { diff --git a/src/locales/en.json b/src/locales/en.json index 1a98285d..2be317de 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -141,7 +141,6 @@ "enable": "Enable", "enabled": "Enabled", "error_modify_something": "You should modify something", - "error_occured": "An error occurred, try again", "error_retrieve_feed": "Could not retrieve feed: %s. You might have a plugin prevent your browser from performing this request (or the website is down).", "error_select_domain": "You should indicate a domain", "error_server": "Server error", From c2d725386e18db9c1a4a8492565db52de7f662eb Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 8 Oct 2019 20:40:05 +0200 Subject: [PATCH 3/3] Update changelog for 3.6.5 --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 3c760fce..064cb642 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +yunohost-admin (3.6.5) stable; urgency=low + + - [fix] Stupid / buggy error handling for postinstall (2187657) + - [fix] During postinstall, using 'previous' on the password page to go back to the 'domain' page was breakin the accordion (54739f1) + + -- Alexandre Aubin Tue, 08 Oct 2019 20:30:00 +0000 + yunohost-admin (3.6.4) stable; urgency=low - [enh] Arguments in app config panel (#251)