Revision f784d324
b/snf-cyclades-app/synnefo/ui/static/snf/css/main.css | ||
---|---|---|
5461 | 5461 |
|
5462 | 5462 |
} |
5463 | 5463 |
|
5464 |
.create-button a.in-progress { |
|
5465 |
text-indent: -1000px; |
|
5466 |
} |
|
5467 |
|
|
5468 |
.create-button a.in-progress, |
|
5464 | 5469 |
.form-action.in-progress, button.in-progress { |
5465 | 5470 |
background-image: url("../images/icons/indicators/medium/horizontal-progress.gif"); |
5466 | 5471 |
background-repeat: no-repeat; |
b/snf-cyclades-app/synnefo/ui/static/snf/js/ui/web/ui_ips_view.js | ||
---|---|---|
149 | 149 |
collection: storage.floating_ips, |
150 | 150 |
collection_name: 'floating_ips', |
151 | 151 |
model_view_cls: views.IpView, |
152 |
create_view: views.IpCreateView,
|
|
152 |
create_view: undefined, // no create overlay for IPs
|
|
153 | 153 |
initialize: function() { |
154 | 154 |
views.IpCollectionView.__super__.initialize.apply(this, arguments); |
155 | 155 |
this.connect_view = new views.IPConnectVmOverlay(); |
156 |
this.creating = false; |
|
157 |
}, |
|
158 |
|
|
159 |
set_creating: function() { |
|
160 |
this.creating = true; |
|
161 |
this.create_button.addClass("in-progress"); |
|
162 |
}, |
|
163 |
|
|
164 |
reset_creating: function() { |
|
165 |
this.creating = false; |
|
166 |
this.create_button.removeClass("in-progress"); |
|
156 | 167 |
}, |
157 | 168 |
|
158 | 169 |
handle_create_click: function() { |
170 |
if (this.creating) { |
|
171 |
return |
|
172 |
} |
|
173 |
|
|
174 |
this.set_creating(); |
|
159 | 175 |
network = synnefo.storage.networks.get_floating_ips_network(); |
160 | 176 |
this.collection.create({ |
161 | 177 |
floatingip: {} |
162 | 178 |
}, |
163 | 179 |
{ |
164 | 180 |
complete: _.bind(function() { |
181 |
this.creating = false; |
|
182 |
this.reset_creating(); |
|
165 | 183 |
this.collection.fetch(); |
166 | 184 |
}, this)}); |
167 | 185 |
} |
b/snf-cyclades-app/synnefo/ui/static/snf/js/views_ext.js | ||
---|---|---|
215 | 215 |
if (this.create_view_cls) { |
216 | 216 |
this._create_view = new this.create_view_cls(); |
217 | 217 |
} |
218 |
this.$(".create-button a").click(_.bind(function(e) { |
|
218 |
|
|
219 |
this.create_button = this.$(".create-button a"); |
|
220 |
this.create_button.click(_.bind(function(e) { |
|
219 | 221 |
e.preventDefault(); |
220 | 222 |
this.handle_create_click(); |
221 | 223 |
}, this)); |
Also available in: Unified diff