aboutsummaryrefslogtreecommitdiff
path: root/node_modules/montage/ui/rich-text-editor/overlays/rich-text-linkpopup.reel
diff options
context:
space:
mode:
authorValerio Virgillito2012-04-18 13:48:51 -0700
committerValerio Virgillito2012-04-18 13:48:51 -0700
commit2e04af953463643791f6362bd8ef4c6ba190abfa (patch)
treed07aaf646091ddf9dad5b030a7905055fd323490 /node_modules/montage/ui/rich-text-editor/overlays/rich-text-linkpopup.reel
parent616a8532099fec2a15855eac97cd85cb60c4451c (diff)
downloadninja-2e04af953463643791f6362bd8ef4c6ba190abfa.tar.gz
Squashed commit of the following:
commit 2054551bfb01a0f4ca2e138b9d724835462d45cd Merge: 765c2da 616a853 Author: Valerio Virgillito <valerio@motorola.com> Date: Wed Apr 18 13:48:21 2012 -0700 Merge branch 'refs/heads/master' into integration commit 765c2da8e1aa03550caf42b2bd5f367555ad2843 Author: Valerio Virgillito <valerio@motorola.com> Date: Tue Apr 17 15:29:41 2012 -0700 updating the picasa carousel Signed-off-by: Valerio Virgillito <valerio@motorola.com> commit 9484f1c82b81e27edf2dc0a1bcc1fa3b12077406 Merge: d27f2df cacb4a2 Author: Valerio Virgillito <valerio@motorola.com> Date: Tue Apr 17 15:03:50 2012 -0700 Merge branch 'refs/heads/master' into integration commit d27f2df4d846064444263d7832d213535962abe7 Author: Valerio Virgillito <valerio@motorola.com> Date: Wed Apr 11 10:39:36 2012 -0700 integrating new picasa carousel component Signed-off-by: Valerio Virgillito <valerio@motorola.com> commit 6f98384c9ecbc8abe55ccfe1fc25a0c7ce22c493 Author: Valerio Virgillito <valerio@motorola.com> Date: Tue Apr 10 14:33:00 2012 -0700 fixed the text area case issue Text area was renamed from TextArea to Textarea Signed-off-by: Valerio Virgillito <valerio@motorola.com> commit 1e83e26652266136802bc7af930379c1ecd631a6 Author: Valerio Virgillito <valerio@motorola.com> Date: Mon Apr 9 22:10:45 2012 -0700 integrating montage v0.8 into ninja. Signed-off-by: Valerio Virgillito <valerio@motorola.com> Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'node_modules/montage/ui/rich-text-editor/overlays/rich-text-linkpopup.reel')
-rw-r--r--node_modules/montage/ui/rich-text-editor/overlays/rich-text-linkpopup.reel/rich-text-linkpopup.css31
-rw-r--r--node_modules/montage/ui/rich-text-editor/overlays/rich-text-linkpopup.reel/rich-text-linkpopup.html37
-rw-r--r--node_modules/montage/ui/rich-text-editor/overlays/rich-text-linkpopup.reel/rich-text-linkpopup.js274
3 files changed, 342 insertions, 0 deletions
diff --git a/node_modules/montage/ui/rich-text-editor/overlays/rich-text-linkpopup.reel/rich-text-linkpopup.css b/node_modules/montage/ui/rich-text-editor/overlays/rich-text-linkpopup.reel/rich-text-linkpopup.css
new file mode 100644
index 00000000..db04d0ff
--- /dev/null
+++ b/node_modules/montage/ui/rich-text-editor/overlays/rich-text-linkpopup.reel/rich-text-linkpopup.css
@@ -0,0 +1,31 @@
1/* <copyright>
2 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3 No 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.montage-link-popup {
8 position: absolute;
9 padding: 12px 20px;
10 border: 1px solid;
11
12 -webkit-box-shadow: 0 1px 3px rgba(0,0,0,.2);
13 -moz-box-shadow: 0 1px 3px rgba(0,0,0,.2);
14 box-shadow: 0 1px 3px rgba(0,0,0,.2);
15 -webkit-border-radius: 2px;
16 -moz-border-radius: 2px;
17 border-radius: 2px;
18 border-color: #BBB #BBB #A8A8A8;
19
20 background-color: white;
21 color: #666;
22 font: 13px/normal "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
23
24 cursor: default;
25}
26
27.montage-link-popup a {
28 cursor: pointer;
29 text-decoration: none;
30 color: #15C;
31} \ No newline at end of file
diff --git a/node_modules/montage/ui/rich-text-editor/overlays/rich-text-linkpopup.reel/rich-text-linkpopup.html b/node_modules/montage/ui/rich-text-editor/overlays/rich-text-linkpopup.reel/rich-text-linkpopup.html
new file mode 100644
index 00000000..1e2ec2cc
--- /dev/null
+++ b/node_modules/montage/ui/rich-text-editor/overlays/rich-text-linkpopup.reel/rich-text-linkpopup.html
@@ -0,0 +1,37 @@
1<!DOCTYPE html>
2<!-- <copyright>
3 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
4 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
5 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
6 </copyright> -->
7<html>
8<head>
9 <title></title>
10 <link rel="stylesheet" type="text/css" href="rich-text-linkpopup.css">
11 <script type="text/montage-serialization">
12 {
13 "link": {
14 "module": "montage/ui/anchor.reel",
15 "name": "Anchor",
16 "properties": {
17 "element": {"#": "link"}
18 }
19 },
20
21 "owner": {
22 "module": "montage/ui/rich-text-editor/overlays/rich-text-linkpopup.reel",
23 "name": "RichTextLinkPopup",
24 "properties": {
25 "element": {"#": "linkpopup-container"},
26 "link": {"@": "link"}
27 }
28 }
29 }
30 </script>
31</head>
32<body>
33 <div id="linkpopup-container" class="montage-link-popup" contentEditable="false">
34 <a id="link" target="_blank"></a>
35 </div>
36</body>
37</html>
diff --git a/node_modules/montage/ui/rich-text-editor/overlays/rich-text-linkpopup.reel/rich-text-linkpopup.js b/node_modules/montage/ui/rich-text-editor/overlays/rich-text-linkpopup.reel/rich-text-linkpopup.js
new file mode 100644
index 00000000..90342d81
--- /dev/null
+++ b/node_modules/montage/ui/rich-text-editor/overlays/rich-text-linkpopup.reel/rich-text-linkpopup.js
@@ -0,0 +1,274 @@
1/* <copyright>
2 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3 No 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 @module "montage/ui/rich-text-editor/overlays/rich-text-resizer.reel"
8 @requires montage/core/core
9 @requires montage/ui/component
10*/
11var Montage = require("montage").Montage,
12 Component = require("ui/component").Component;
13
14/**
15 @class module:"montage/ui/rich-text-editor/overlays/rich-text-linkpopup.reel".RichTextLinkPopup
16 @extends module:montage/ui/component.Component
17*/
18exports.RichTextLinkPopup = Montage.create(Component,/** @lends module:"montage/ui/rich-text-editor/overlays/rich-text-linkpopup.reel".RichTextLinkPopup# */ {
19
20 /**
21 Description TODO
22 @private
23 */
24 _isActive: {
25 enumerable: false,
26 value: false
27 },
28 /**
29 Description TODO
30 @private
31 */
32 _editor: {
33 enumerable: false,
34 value: null
35 },
36
37 /**
38 Description TODO
39 @private
40 */
41 target: {
42 enumerable: false,
43 value: null
44 },
45
46 /**
47 Description TODO
48 @private
49 */
50 _needsReset: {
51 enumerable: false,
52 value: false
53 },
54
55 /**
56 Description TODO
57 @type {Function}
58 */
59 initWithEditor: {
60 value: function(editor) {
61 this._editor = editor;
62 }
63 },
64
65 /**
66 Description TODO
67 @type {Function}
68 */
69 editorMouseUp: {
70 value: function(event) {
71 var element;
72
73 if (this._editor.activeOverlay != this) {
74 // Check if the caret is inside an image within an anchor element
75 if (event.target.nodeName == "IMG") {
76 element = event.target;
77 while (element && element != this._element) {
78 if (element.nodeName == "A") {
79 if (element != this.target) {
80 this.target = element;
81 this._needsReset = true;
82 if (this._isActive) {
83 this.needsDraw = true;
84 } else {
85 this._editor.showOverlay(this);
86 }
87 }
88 return true;
89 }
90 element = element.parentElement;
91 }
92 }
93 }
94 }
95 },
96
97 /**
98 Description TODO
99 @type {Function}
100 */
101 editorTouchEnd: {
102 value: function(event) {