Revision 628fa84b
b/snf-cyclades-app/synnefo/ui/static/snf/js/ui/web/ui_vms_base_view.js | ||
---|---|---|
71 | 71 |
this.description = this.$(".snapshot-create-desc"); |
72 | 72 |
this.form = this.$("form"); |
73 | 73 |
this.init_handlers(); |
74 |
this.creating = false; |
|
74 | 75 |
}, |
75 | 76 |
|
76 | 77 |
show: function(vm) { |
... | ... | |
118 | 119 |
}, |
119 | 120 |
|
120 | 121 |
create: function() { |
122 |
if (this.creating) { return } |
|
121 | 123 |
this.create_button.addClass("in-progress"); |
122 | 124 |
|
123 | 125 |
var name = this.text.val(); |
124 | 126 |
var desc = this.description.val(); |
125 | 127 |
|
128 |
this.creating = true; |
|
126 | 129 |
this.vm.create_snapshot({display_name:name, display_description:desc}, _.bind(function() { |
130 |
this.creating = false; |
|
127 | 131 |
this.hide(); |
128 | 132 |
}, this)); |
129 | 133 |
}, |
Also available in: Unified diff