Revision bd8fa10c ui/static/snf/js/ui/web/ui_create_view.js

b/ui/static/snf/js/ui/web/ui_create_view.js
37 37
                snf.ui.main.show_vm_details(storage.vms.get(this.vm_id));
38 38
            }, this));
39 39
            
40
            this.clipboard = new util.ClipHelper(this.copy);
41
            this.clipboard.el.tooltip();
42 40
        },
43 41
        
44 42
        show_password: function() {
......
48 46
        onClose: function() {
49 47
            this.password.text("");
50 48
        },
51
            
49
        
50
        beforeOpen: function() {
51
            if (this.clipboard) { return };
52
            console.log(this.copy);
53
            this.clipboard = new util.ClipHelper(this.copy);
54
            this.clipboard.el.tooltip();
55
        },
56
        
57
        onOpen: function() {
58
            this.clipboard.setText(this.pass);
59
        },
60

  
52 61
        show: function(pass, vm_id) {
53 62
            this.pass = pass;
54 63
            this.vm_id = vm_id;
55 64

  
56 65
            views.VMCreationPasswordView.__super__.show.apply(this, arguments);
57 66
            this.show_password();
58
            
59
            this.clipboard.setText(this.pass);
60 67
        }
61 68
    })
62 69

  
......
774 781
                step = this.steps.length - 1;
775 782
            }
776 783
                
784
            this.steps[step].show();
785
            this.current_step = step;
786
            this.current_view = this.steps[step];
787
            this.update_controls();
788

  
777 789
            // hide other
778 790
            //this.$(".step-header .header-step").removeClass("current").hide();
779 791
            //this.$(".create-step-cont").hide();
780 792
            var width = this.el.find('.container').width();
781 793
            var left = (step -1) * width * -1;
782
            this.$(".steps-container").animate({"margin-left": left + "px"}, 300);
783
            //this.$(".steps-container").css({"margin-left":left + "px"});
794
            //this.$(".steps-container").animate({"margin-left": left + "px"}, 300);
795
            this.$(".steps-container").css({marginLeft:left + "px"});
784 796
            
785
            this.steps[step].show();
786
            this.current_step = step;
787
            this.current_view = this.steps[step];
788
            this.update_controls();
789 797
        },
790 798

  
791 799
        update_controls: function() {

Also available in: Unified diff