[fix] Reload the page after postinstall anyway

This commit is contained in:
Kload 2014-05-27 16:41:53 +02:00
parent 779fb1adfa
commit da6340b70b

View file

@ -179,7 +179,7 @@ app = Sammy('#main', function (sam) {
c.flash('success', v); c.flash('success', v);
}); });
} }
callback(data); callback(data);
} }
} }
loaded = true; loaded = true;
@ -216,7 +216,7 @@ app = Sammy('#main', function (sam) {
interval = window.location.hostname === args.domain ? 20000 : 5000; interval = window.location.hostname === args.domain ? 20000 : 5000;
checkInstall = setInterval(function () { checkInstall = setInterval(function () {
c.checkInstall(function(isInstalled) { c.checkInstall(function(isInstalled) {
if (isInstalled || (window.location.hostname === args.domain && typeof isInstalled === 'undefined')) { if (isInstalled || typeof isInstalled === 'undefined') {
c.flash('success', y18n.t('installation_complete')); c.flash('success', y18n.t('installation_complete'));
clearInterval(checkInstall); clearInterval(checkInstall);
window.location.href = 'https://'+ window.location.hostname +'/yunohost/admin/'; window.location.href = 'https://'+ window.location.hostname +'/yunohost/admin/';
@ -236,7 +236,7 @@ app = Sammy('#main', function (sam) {
}; };
}); });
} }
}, },
// Render view (cross-browser) // Render view (cross-browser)
view: function (view, data, callback) { view: function (view, data, callback) {
@ -438,7 +438,7 @@ app = Sammy('#main', function (sam) {
store.set('maindomain', domain); store.set('maindomain', domain);
}); });
}); });
}); });
sam.get('#/postinstall/password', function(c) { sam.get('#/postinstall/password', function(c) {
@ -983,11 +983,11 @@ app = Sammy('#main', function (sam) {
* *
*/ */
// //
sam.get('#/monitor', function (c) { sam.get('#/monitor', function (c) {
monitorData = {} monitorData = {}
// Why this method ? // Why this method ?
c.api('/services/glances', function(data) { // ? c.api('/services/glances', function(data) { // ?
monitorData.status = true; monitorData.status = true;