diff --git a/lib/client/buffer.js b/lib/client/buffer.js index 26386f17..377d9364 100644 --- a/lib/client/buffer.js +++ b/lib/client/buffer.js @@ -40,9 +40,10 @@ var Util, DOM; } function rmCutClass() { - var files = DOM.getActiveFiles(); + var files = DOM.getByClassAll(CLASS), + array = Util.slice(files); - files.forEach(function(element) { + array.forEach(function(element) { DOM.removeClass(element, CLASS); }); } @@ -70,6 +71,8 @@ var Util, DOM; names = getNames(), from = Info.dirPath; + clear(); + Storage.remove(CUT) .set(COPY, { from : from, @@ -82,9 +85,10 @@ var Util, DOM; names = getNames(), from = Info.dirPath; + clear(); addCutClass(); - Storage.remove(COPY) + Storage .set(CUT, { from : from, names: names