You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2014/02/13 23:34:38 UTC
git commit: updated refs/heads/master to 0ea93d6
Updated Branches:
refs/heads/master 8e4d020cf -> 0ea93d690
Form dialog UI: Support on cancel action
If args.cancel is passed to createForm widget, call it when cancel button is
clicked.
Example:
createForm: {
cancel: function() { ... },
...
}
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0ea93d69
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0ea93d69
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0ea93d69
Branch: refs/heads/master
Commit: 0ea93d6904ef4771b98fcdc8152bbc202da4b163
Parents: 8e4d020
Author: Brian Federle <br...@citrix.com>
Authored: Thu Feb 13 14:33:53 2014 -0800
Committer: Brian Federle <br...@citrix.com>
Committed: Thu Feb 13 14:33:53 2014 -0800
----------------------------------------------------------------------
ui/scripts/ui/dialog.js | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0ea93d69/ui/scripts/ui/dialog.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/dialog.js b/ui/scripts/ui/dialog.js
index cebe167..fd81e25 100644
--- a/ui/scripts/ui/dialog.js
+++ b/ui/scripts/ui/dialog.js
@@ -36,6 +36,7 @@
* Dialog with form
*/
createForm: function(args) {
+ var cancel = args.cancel;
var $formContainer = $('<div>').addClass('form-container');
var $form = $('<form>').appendTo($formContainer)
.submit(function() {
@@ -113,6 +114,10 @@
$(this).dialog('destroy');
$('.hovered-elem').hide();
+
+ if (cancel) {
+ cancel();
+ }
}
}]
}).closest('.ui-dialog').overlay();