Revision 8d1b1ffb
b/ui/static/snf/js/ui/web/ui_list_view.js | ||
---|---|---|
332 | 332 |
|
333 | 333 |
// is vm in transition ??? show the progress spinner |
334 | 334 |
update_transition_state: function(vm) { |
335 |
if (this.in_transition) { return }; |
|
336 |
|
|
335 | 337 |
if ((this.actions.hovered && this.vm(vm).find("input").is(":checked")) || vm.pending_action) { |
336 | 338 |
this.sel('vm_spinner', vm.id).hide(); |
337 | 339 |
this.sel('vm_wave', vm.id).hide(); |
... | ... | |
348 | 350 |
} else { |
349 | 351 |
this.sel('vm_spinner', vm.id).hide(); |
350 | 352 |
this.$(".action-indicator").hide(); |
353 |
this.sel('os_icon', vm.id).show(); |
|
351 | 354 |
} |
352 | 355 |
}, |
353 | 356 |
|
354 | 357 |
// display transition animations |
355 | 358 |
show_transition: function(vm) { |
359 |
this.in_transition = true; |
|
360 |
|
|
356 | 361 |
if (!this.visible()) { return }; |
357 | 362 |
var wave = this.sel('vm_wave', vm.id); |
358 | 363 |
if (!wave.length) { |
... | ... | |
364 | 369 |
|
365 | 370 |
var src = wave.attr('src'); |
366 | 371 |
var self = this; |
367 |
|
|
372 |
|
|
368 | 373 |
// change src to force gif play from the first frame |
369 | 374 |
// animate for 500 ms then hide |
370 | 375 |
wave.attr('src', "").show().attr('src', src).fadeIn(500).delay(700).fadeOut(300, function() { |
371 |
if (vm.in_transition()) { |
|
372 |
self.sel("vm_spinner", vm.id).fadeIn(200); |
|
373 |
} else { |
|
374 |
if (vm.pending_action || (self.actions.hovered && self.vm(vm).find("input").is(":checked"))) { |
|
375 |
self.vm(vm).find(".action-indicator").show(); |
|
376 |
} else { |
|
377 |
self.sel("os_icon", vm.id).fadeIn(200); |
|
378 |
} |
|
379 |
} |
|
376 |
self.in_transition = false; |
|
377 |
self.update_transition_state(vm); |
|
380 | 378 |
}); |
381 | 379 |
}, |
382 | 380 |
|
... | ... | |
407 | 405 |
|
408 | 406 |
if (vm.status() == "ERROR") { |
409 | 407 |
this.vm(vm).removeClass("active").removeClass("inactive").addClass("error"); |
408 |
} else { |
|
409 |
this.vm(vm).removeClass("error").addClass(active_class); |
|
410 | 410 |
} |
411 | 411 |
|
412 | 412 |
this.update_os_icon(vm); |
Also available in: Unified diff