Revision 60376c36 ui/static/snf/js/utils.js
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