Revision 5c0a0ade

b/ui/static/main.css
3934 3934
    color: #447821;
3935 3935
    text-align: left;
3936 3936
    padding-left: 5em;
3937
    position: relative;
3937 3938
}
3938 3939

  
3939 3940
#creation-password-overlay {
......
4112 4113
    font-size: 0.7em;
4113 4114
    padding: 0.2em 0.5em;
4114 4115
    border: 1px solid #888;
4116
    z-index: 50000;
4115 4117
}
4116 4118

  
4117 4119
/*404 and 500 pages*/
......
5427 5429
    font-size: 1.2em;
5428 5430
    text-align: center;
5429 5431
}
5432

  
5433
.clip-copy {
5434
    display: block;
5435
    width: 20px;
5436
    height: 20px;
5437
    position: absolute;
5438
    border: 1px solid #387693;
5439
    background-image: url("./clipboard.png");
5440
    background-repeat: no-repeat;
5441
    background-position: center;
5442
    cursor: pointer;
5443
    background-color: #A1C8DB;
5444
}
5445

  
5446
.password-cont .clip-copy { right: 10px; top: 8px;}
b/ui/static/snf/js/ui/web/ui_create_view.js
30 30
            _.bindAll(this, 'show_password');
31 31

  
32 32
            this.password = this.$("#new-machine-password");
33
            this.copy = this.$(".clip-copy");
33 34

  
34 35
            this.$(".show-machine").click(_.bind(function(){
35 36
                this.hide();
36 37
                snf.ui.main.show_vm_details(storage.vms.get(this.vm_id));
37 38
            }, this));
39
            
40
            this.clipboard = new util.ClipHelper(this.copy);
41
            this.clipboard.el.tooltip();
38 42
        },
39 43
        
40 44
        show_password: function() {
......
51 55

  
52 56
            views.VMCreationPasswordView.__super__.show.apply(this, arguments);
53 57
            this.show_password();
58
            
59
            this.clipboard.setText(this.pass);
54 60
        }
55 61
    })
56 62

  
......
681 687
            
682 688
            this.init_handlers();
683 689
            this.update_layout();
690

  
684 691
        },
685 692

  
686 693
        init_handlers: function() {
b/ui/templates/partials/create_vm.html
227 227
    <div class="password-cont">
228 228
        {% blocktrans %}Write down your password now:{% endblocktrans %}
229 229
        <div class="password" id="new-machine-password">password</div>
230
        <div class="clip-copy new-vm-password-copy"></div>
230 231
    </div>
231 232
    <div class="description subinfo">
232 233
        <p>{% blocktrans %}You will need this later to connect to your machine.{% endblocktrans %}</p>

Also available in: Unified diff