aboutsummaryrefslogtreecommitdiff
path: root/js/clipboard/util.js
diff options
context:
space:
mode:
authorArmen Kesablyan2012-06-25 11:14:40 -0700
committerArmen Kesablyan2012-06-25 11:14:40 -0700
commit446f475c35e3d0d5d6cb6ca35346e548de6c36f9 (patch)
tree0b7e7154979754db2c0ebb7b7908c555068d515d /js/clipboard/util.js
parent7867aec2620b65605180979b5049cfa154ca7dd1 (diff)
parent35aebe8d72ccfa9ea010eb79c09ecf89cc1ed44d (diff)
downloadninja-446f475c35e3d0d5d6cb6ca35346e548de6c36f9.tar.gz
Merge branch 'refs/heads/master' into binding
Conflicts: js/ninja.reel/ninja.html Signed-off-by: Armen Kesablyan <armen@motorola.com>
Diffstat (limited to 'js/clipboard/util.js')
-rw-r--r--js/clipboard/util.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/js/clipboard/util.js b/js/clipboard/util.js
new file mode 100644
index 00000000..a0813855
--- /dev/null
+++ b/js/clipboard/util.js
@@ -0,0 +1,28 @@
1/* <copyright>
2This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5</copyright> */
6
7////////////////////////////////////////////////////////////////////////
8//
9
10var Montage = require("montage/core/core").Montage,
11 Component = require("montage/ui/component").Component;
12
13var ClipboardUtil = exports.ClipboardUtil = Montage.create(Component, {
14
15 deserializeHtmlString:{
16 value:function(htmlString){
17 var doc = (this.application.ninja.currentDocument.currentView === "design") ? this.application.ninja.currentDocument.model.views.design.document : document,
18 clipboardHelper=doc.createElement("div"),
19 nodeList = null;
20
21 clipboardHelper.innerHTML = htmlString;
22 nodeList = clipboardHelper.childNodes;
23 clipboardHelper = null; //for garbage collection
24 return nodeList;
25 }
26 }
27
28}); \ No newline at end of file