Revision c6e9caec

b/ui/static/snf/js/ui/web/ui_create_view.js
33 33
            this.copy = this.$(".clip-copy");
34 34

  
35 35
            this.$(".show-machine").click(_.bind(function(){
36
                if (this.$(".show-machine").hasClass("in-progress")) {
37
                    return;
38
                }
36 39
                this.hide();
37 40
                snf.ui.main.show_vm_details(storage.vms.get(this.vm_id));
38 41
            }, this));
39
            
42

  
43
            _.bindAll(this, "handle_vm_added");
44
            storage.vms.bind("add", this.handle_vm_added);
45
        },
46

  
47
        handle_vm_added: function() {
48
            this.$(".show-machine").removeClass("in-progress");
40 49
        },
41 50
        
42 51
        show_password: function() {
52
            this.$(".show-machine").addClass("in-progress");
43 53
            this.password.text(this.pass);
44 54
        },
45 55

  
46 56
        onClose: function() {
47 57
            this.password.text("");
58
            this.vm_id = undefined;
48 59
        },
49 60
        
50 61
        beforeOpen: function() {
......
65 76
        show: function(pass, vm_id) {
66 77
            this.pass = pass;
67 78
            this.vm_id = vm_id;
68

  
79
            
69 80
            views.VMCreationPasswordView.__super__.show.apply(this, arguments);
70 81
            this.show_password();
71 82
        }

Also available in: Unified diff