forked from 0x2620/pandora
cleanup pandora.setLocale, beforeunloadWindow -> beforeUnloadWindow
This commit is contained in:
parent
94352559a3
commit
bd9bdc366f
2 changed files with 14 additions and 13 deletions
|
@ -228,7 +228,7 @@ appPanel
|
||||||
document: $(document),
|
document: $(document),
|
||||||
window: $(window)
|
window: $(window)
|
||||||
.on({
|
.on({
|
||||||
beforeunload: pandora.beforeunloadWindow,
|
beforeunload: pandora.beforeUnloadWindow,
|
||||||
resize: pandora.resizeWindow,
|
resize: pandora.resizeWindow,
|
||||||
unload: pandora.unloadWindow
|
unload: pandora.unloadWindow
|
||||||
})
|
})
|
||||||
|
|
|
@ -157,6 +157,7 @@ pandora.addList = function() {
|
||||||
}).reloadList();
|
}).reloadList();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
pandora.addText = function(options) {
|
pandora.addText = function(options) {
|
||||||
var $folderList = pandora.$ui.folderList.personal;
|
var $folderList = pandora.$ui.folderList.personal;
|
||||||
options = options || {};
|
options = options || {};
|
||||||
|
@ -177,6 +178,13 @@ pandora.addText = function(options) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pandora.beforeUnloadWindow = function() {
|
||||||
|
if (pandora.firefogg)
|
||||||
|
return Ox._("Encoding is currently running\nDo you want to leave this page?");
|
||||||
|
//prevent error dialogs on unload
|
||||||
|
pandora.isUnloading = true;
|
||||||
|
};
|
||||||
|
|
||||||
pandora.changeFolderItemStatus = function(id, status, callback) {
|
pandora.changeFolderItemStatus = function(id, status, callback) {
|
||||||
var ui = pandora.user.ui,
|
var ui = pandora.user.ui,
|
||||||
folderItems = ui.section == 'items' ? 'Lists' : Ox.toTitleCase(ui.section),
|
folderItems = ui.section == 'items' ? 'Lists' : Ox.toTitleCase(ui.section),
|
||||||
|
@ -1463,18 +1471,11 @@ pandora.selectList = function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
pandora.setLocale = function(locale, callback) {
|
pandora.setLocale = function(locale, callback) {
|
||||||
Ox.setLocale(locale, locale && locale != 'en'
|
Ox.setLocale(
|
||||||
? '/static/json/locale.' + locale + '.json'
|
locale,
|
||||||
: void 0, function(result) {
|
locale && locale != 'en' ? '/static/json/locale.' + locale + '.json' : null,
|
||||||
callback(result);
|
callback
|
||||||
});
|
);
|
||||||
}
|
|
||||||
|
|
||||||
pandora.beforeunloadWindow = function() {
|
|
||||||
if (pandora.firefogg)
|
|
||||||
return Ox._("Encoding is currently running\nDo you want to leave this page?");
|
|
||||||
//prevent error dialogs on unload
|
|
||||||
pandora.isUnloading = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pandora.unloadWindow = function() {
|
pandora.unloadWindow = function() {
|
||||||
|
|
Loading…
Reference in a new issue