Commit bf83ef31 authored by Kostas Papadimitriou's avatar Kostas Papadimitriou
Browse files

Force clipboard parent element cleanup

parent fc554815
......@@ -63,7 +63,7 @@
beforeOpen: function() {
try { delete this.clipboard } catch (err) { console.log(err) };
this.clipboard = new util.ClipHelper(this.copy);
this.clipboard = new util.ClipHelper(this.copy, true);
},
onOpen: function() {
......
......@@ -141,12 +141,16 @@
// TODO: implement me
}
synnefo.util.ClipHelper = function(cont) {
synnefo.util.ClipHelper = function(cont, clear) {
this.force_empty = clear || false;
this.cont = cont || $('<div class="clip-copy"></div>');
this.clip = new ZeroClipboard.Client();
this.clip.setHandCursor(true);
this.el = this.cont;
if (this.force_empty) {
this.cont.empty();
}
this.el.append(this.clip.getHTML(20,20));
this.setText = function(t) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment