openmedialibrary/static/js/resetUIDialog.js

27 lines
618 B
JavaScript
Raw Normal View History

2014-05-04 17:26:43 +00:00
'use strict';
oml.ui.resetUIDialog = function(data) {
2014-05-14 09:57:11 +00:00
var that = oml.ui.confirmDialog({
2014-05-04 17:26:43 +00:00
buttons: [
Ox.Button({
2016-01-13 08:20:03 +00:00
style: 'squared',
2014-05-14 09:57:11 +00:00
title: Ox._('No, Don\'t Reset')
}),
2014-05-04 17:26:43 +00:00
Ox.Button({
2016-01-13 08:20:03 +00:00
style: 'squared',
2014-05-14 09:57:11 +00:00
title: Ox._('Yes, Reset')
})
2014-05-04 17:26:43 +00:00
],
content: Ox._('Are you sure you want to reset all UI settings?'),
title: Ox._('Reset UI Settings')
2014-05-14 09:57:11 +00:00
}, function() {
2016-01-17 09:35:46 +00:00
oml.$ui.userDialog.close();
2014-05-14 09:57:11 +00:00
oml.UI.set({page: ''});
oml.UI.reset();
2014-05-04 17:26:43 +00:00
});
return that;
};