mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
[fix] Allow view without slide. Use it instead of redirect on API fail.
This commit is contained in:
parent
7cdfe4cbe4
commit
d8d7eb2172
1 changed files with 3 additions and 3 deletions
|
@ -198,7 +198,7 @@ var app = Sammy('#main', function (sam) {
|
||||||
}
|
}
|
||||||
if (uri !== '/postinstall') {
|
if (uri !== '/postinstall') {
|
||||||
store.clear('slide');
|
store.clear('slide');
|
||||||
c.redirect(store.get('path-1'));
|
c.view(store.get('path-1'), null, null, false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -230,11 +230,11 @@ var app = Sammy('#main', function (sam) {
|
||||||
},
|
},
|
||||||
|
|
||||||
// Render view (cross-browser)
|
// Render view (cross-browser)
|
||||||
view: function (view, data, callback) {
|
view: function (view, data, callback, enableSlide) {
|
||||||
callback = typeof callback !== 'undefined' ? callback : function() {};
|
callback = typeof callback !== 'undefined' ? callback : function() {};
|
||||||
rendered = this.render('views/'+ view +'.ms', data);
|
rendered = this.render('views/'+ view +'.ms', data);
|
||||||
|
|
||||||
enableSlide = true; // Change to false to disable animation
|
enableSlide = (typeof callback !== 'undefined') ? enableSlide : true; // Change to false to disable animation
|
||||||
|
|
||||||
loaded = true;
|
loaded = true;
|
||||||
$('div.loader').remove();
|
$('div.loader').remove();
|
||||||
|
|
Loading…
Reference in a new issue