Revision 60376c36

b/ui/static/snf/js/ui/web/ui_create_view.js
63 63
        
64 64
        beforeOpen: function() {
65 65
            try { delete this.clipboard } catch (err) { console.log(err) };
66
            this.clipboard = new util.ClipHelper(this.copy);
66
            this.clipboard = new util.ClipHelper(this.copy, true);
67 67
        },
68 68
        
69 69
        onOpen: function() {
b/ui/static/snf/js/utils.js
141 141
        // TODO: implement me
142 142
    }
143 143

  
144
    synnefo.util.ClipHelper = function(cont) {
144
    synnefo.util.ClipHelper = function(cont, clear) {
145
        this.force_empty = clear || false;
145 146
        this.cont = cont || $('<div class="clip-copy"></div>');
146 147
        this.clip = new ZeroClipboard.Client();
147 148
        this.clip.setHandCursor(true);
148 149

  
149 150
        this.el = this.cont;
151
        if (this.force_empty) {
152
            this.cont.empty();
153
        }
150 154
        this.el.append(this.clip.getHTML(20,20));
151 155

  
152 156
        this.setText = function(t) {

Also available in: Unified diff