Worked on post uploads (#11) - added GUI

This commit is contained in:
Marcin Kurczewski
2014-09-13 16:11:58 +02:00
parent 7ec3715cdd
commit dfb1198143
8 changed files with 1047 additions and 4 deletions

View File

@ -4,6 +4,16 @@ App.Util = function(_, jQuery, promise) {
var templateCache = {};
function enableExitConfirmation() {
jQuery(window).bind('beforeunload', function(e) {
return 'There are unsaved changes.';
});
}
function disableExitConfirmation() {
jQuery(window).unbind('beforeunload');
}
function parseComplexRouteArgs(args) {
var result = {};
args = (args || '').split(/;/);
@ -136,6 +146,8 @@ App.Util = function(_, jQuery, promise) {
parseComplexRouteArgs: parseComplexRouteArgs,
compileComplexRouteArgs: compileComplexRouteArgs,
formatRelativeTime: formatRelativeTime,
enableExitConfirmation: enableExitConfirmation,
disableExitConfirmation: disableExitConfirmation,
};
};