aboutsummaryrefslogtreecommitdiff
path: root/node_modules/montage
diff options
context:
space:
mode:
authorArmen Kesablyan2012-02-02 19:03:59 -0800
committerArmen Kesablyan2012-02-02 19:03:59 -0800
commit2082fa6912eec2ffabd2081b7706e8e1b88a9711 (patch)
treefe21ab1445a3242d252b38b6affa6cd09a1860b1 /node_modules/montage
parent302e3eb01037ff550bc93547cb8d5d0a0780b312 (diff)
downloadninja-2082fa6912eec2ffabd2081b7706e8e1b88a9711.tar.gz
Initial Text Tool Implementation
Has rich-text-editor in place need to place with finalized version when complete
Diffstat (limited to 'node_modules/montage')
-rw-r--r--node_modules/montage/ui/rich-text-editor.reel/rich-text-editor.css112
-rw-r--r--node_modules/montage/ui/rich-text-editor.reel/rich-text-editor.html27
-rw-r--r--node_modules/montage/ui/rich-text-editor.reel/rich-text-editor.js1669
-rw-r--r--node_modules/montage/ui/rich-text-editor.reel/rich-text-resizer.js349
-rw-r--r--node_modules/montage/ui/rich-text-editor.reel/rich-text-sanitizer.js132
5 files changed, 2289 insertions, 0 deletions
diff --git a/node_modules/montage/ui/rich-text-editor.reel/rich-text-editor.css b/node_modules/montage/ui/rich-text-editor.reel/rich-text-editor.css
new file mode 100644
index 00000000..656183c4
--- /dev/null
+++ b/node_modules/montage/ui/rich-text-editor.reel/rich-text-editor.css
@@ -0,0 +1,112 @@
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-editor {
8 /* need to be relative in order for the resizer to be positioned correctly */
9 position: absolute;
10 top: 0;
11 left: 0;
12 bottom: 0;
13 right: 0;
14 padding: 4px;
15
16 font-size: 1.0em;
17 outline: none;
18 overflow: auto;
19 z-index: 1;
20}
21
22.montage-editor-frame {
23 position: relative;
24 overflow: auto;
25 height: 100%;
26 width: 100%;
27}
28
29.montage-resizer-element::selection {
30 background: rgba(0,0,0,0);
31}
32
33
34/*
35Resizer
36*/
37.montage-resizer {
38 display: inline-block;
39}
40
41.montage-resizer-frame {
42 position: absolute;
43 border: 1px solid black;
44 z-index: 30;
45}
46
47.montage-resizer-handle {
48 position: absolute;
49 border: 1px solid black;
50 background-color: white;
51 width: 6px;
52 height: 6px;
53 z-index: 31;
54}
55
56.montage-resizer.dragged .montage-resizer-handle{
57 display: none;
58}
59
60.montage-resizer-handle:hover {
61 background-color: black;
62}
63
64.montage-resizer-n {
65 cursor: n-resize;
66}
67.montage-resizer-ne {
68 cursor: ne-resize;
69}
70.montage-resizer-e {
71 cursor: e-resize;
72}
73.montage-resizer-se {
74 cursor: se-resize;
75}
76.montage-resizer-s {
77 cursor: s-resize;
78}
79.montage-resizer-sw {
80 cursor: sw-resize;
81}
82.montage-resizer-w {
83 cursor: w-resize;
84}
85.montage-resizer-nw {
86 cursor: nw-resize;
87}
88
89
90/*
91Link Popup
92*/
93.montage-link-popup {
94 -webkit-box-shadow: 0 1px 3px rgba(0,0,0,.2);
95 -webkit-border-radius: 2px;
96 border-radius: 2px;
97 position: absolute;
98 border: 1px solid;
99 background-color: white;
100 color: #666;
101 padding: 12px 20px;
102 z-index: 50;
103 cursor: default;
104 border-color: #BBB #BBB #A8A8A8;
105 font: 13px/normal "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
106}
107
108.montage-link-popup a {
109 cursor: pointer;
110 text-decoration: none;
111 color: #15C;
112} \ No newline at end of file
diff --git a/node_modules/montage/ui/rich-text-editor.reel/rich-text-editor.html b/node_modules/montage/ui/rich-text-editor.reel/rich-text-editor.html
new file mode 100644
index 00000000..0856043f
--- /dev/null
+++ b/node_modules/montage/ui/rich-text-editor.reel/rich-text-editor.html
@@ -0,0 +1,27 @@
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-editor.css">
11 <script type="text/montage-serialization">
12 {
13 "owner": {
14 "module": "montage/ui/rich-text-editor.reel",
15 "name": "RichTextEditor",
16 "properties": {
17
18 }
19 }
20 }
21 </script>
22
23</head>
24<body>
25</body>
26</html>
27 \ No newline at end of file
diff --git a/node_modules/montage/ui/rich-text-editor.reel/rich-text-editor.js b/node_modules/montage/ui/rich-text-editor.reel/rich-text-editor.js
new file mode 100644
index 00000000..37fb9599
--- /dev/null
+++ b/node_modules/montage/ui/rich-text-editor.reel/rich-text-editor.js
@@ -0,0 +1,1669 @@
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.reel"
8 @requires montage/core/core
9*/
10var Montage = require("montage").Montage,
11 Component = require("ui/component").Component,
12 MutableEvent = require("core/event/mutable-event").MutableEvent,
13 Resizer = require("./rich-text-resizer").Resizer,
14 Sanitizer = require("./rich-text-sanitizer").Sanitizer,
15 Point = require("core/geometry/point").Point;
16
17/**
18 @class module:"montage/ui/rich-text-editor.reel".RichTextEditor
19 @extends module:montage/ui/component.Component
20*/
21exports.RichTextEditor = Montage.create(Component,/** @lends module:"montage/ui/rich-text-editor.reel".RichTextEditor# */ {
22
23 /**
24 Description TODO
25 @private
26 */
27 _hasSelectionChangeEvent: {
28 enumerable: false,
29 value: null // Need to be preset to null, will be set to true or false later on
30 },
31
32 /**
33 Description TODO
34 @private
35 */
36 _uniqueId: {
37 enumerable: false,
38 value: Math.floor(Math.random() * 1000) + "-" + Math.floor(Math.random() * 1000)
39 },
40
41 /**
42 Description TODO
43 @private
44 */
45 _needsSelectionReset: {
46 enumerable: false,
47 value: false
48 },
49
50 /**
51 Description TODO
52 @private
53 */
54 _selectionChangeTimer: {
55 enumerable: false,
56 value: null
57 },
58
59 /**
60 Description TODO
61 @private
62 */
63 _activeLink: {
64 enumerable: false,