summaryrefslogtreecommitdiffstats
path: root/pyload/web/app/scripts/views/abstract/modalView.js
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-12-06 18:15:24 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-12-06 18:15:24 +0100
commit1f4c6cd6e4b712263b40de4ce1fcebe716019b4f (patch)
treed25db580032edff61a58b3be426b4681e23addf8 /pyload/web/app/scripts/views/abstract/modalView.js
parentfixed jshint (diff)
downloadpyload-1f4c6cd6e4b712263b40de4ce1fcebe716019b4f.tar.xz
package edit dialog
Diffstat (limited to 'pyload/web/app/scripts/views/abstract/modalView.js')
-rw-r--r--pyload/web/app/scripts/views/abstract/modalView.js15
1 files changed, 13 insertions, 2 deletions
diff --git a/pyload/web/app/scripts/views/abstract/modalView.js b/pyload/web/app/scripts/views/abstract/modalView.js
index 61016a9fb..2fd84441b 100644
--- a/pyload/web/app/scripts/views/abstract/modalView.js
+++ b/pyload/web/app/scripts/views/abstract/modalView.js
@@ -31,6 +31,11 @@ define(['jquery', 'backbone', 'underscore', 'omniwindow'], function($, Backbone,
}
},
+ // Class method that will show a temporary instance
+ display: function() {
+
+ },
+
// TODO: whole modal stuff is not very elegant
render: function() {
this.$el.html(this.template(this.renderContent()));
@@ -110,8 +115,14 @@ define(['jquery', 'backbone', 'underscore', 'omniwindow'], function($, Backbone,
},
confirm: function() {
- if (this.confirmCallback)
- this.confirmCallback.apply();
+ // Call the confirms given or from extended class
+ if (this.confirmCallback) {
+ if (this.confirmCallback.apply() === false)
+ return;
+ } else if (_.isFunction(this.constructor.prototype.confirmCallback)) {
+ if (this.constructor.prototype.confirmCallback.call(this) === false)
+ return;
+ }
this.hide();
},