aboutsummaryrefslogtreecommitdiff
path: root/node_modules/montage/ui/skeleton
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/montage/ui/skeleton')
-rw-r--r--node_modules/montage/ui/skeleton/range-input.reel/range-input.css27
-rw-r--r--node_modules/montage/ui/skeleton/range-input.reel/range-input.html45
-rw-r--r--node_modules/montage/ui/skeleton/range-input.reel/range-input.js300
3 files changed, 0 insertions, 372 deletions
diff --git a/node_modules/montage/ui/skeleton/range-input.reel/range-input.css b/node_modules/montage/ui/skeleton/range-input.reel/range-input.css
deleted file mode 100644
index 43bf5b2c..00000000
--- a/node_modules/montage/ui/skeleton/range-input.reel/range-input.css
+++ /dev/null
@@ -1,27 +0,0 @@
1 div.slider {
2 display: inline-block;
3 border-radius: 4px;
4 position: relative;
5 height: 8px;
6 background-color: #556270;
7 border: 1px solid #aaa;
8 cursor: default;
9}
10.slider-handle {
11 top: -0.6em;
12 position: absolute;
13 z-index: 2;
14 cursor: pointer;
15
16 width: 1.2em;
17 height: 1.2em;
18 background-color: #ddd;
19 color: #fff;
20 padding: 4px;
21 border: 1px solid #333;
22 border-radius: 20px;
23}
24
25.slider-handle:hover {
26 background-color: #999;
27} \ No newline at end of file
diff --git a/node_modules/montage/ui/skeleton/range-input.reel/range-input.html b/node_modules/montage/ui/skeleton/range-input.reel/range-input.html
deleted file mode 100644
index 927c49d1..00000000
--- a/node_modules/montage/ui/skeleton/range-input.reel/range-input.html
+++ /dev/null
@@ -1,45 +0,0 @@
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 <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
10 <link rel="stylesheet" href="range-input.css" />
11
12 <script type="text/montage-serialization">
13{
14 "translateComposer1": {
15 "prototype": "ui/composer/translate-composer",
16 "properties": {
17 "component": {"@": "owner"},
18 "axis": "horizontal",
19 "hasMomentum": false,
20 "minTranslateX": 0
21 },
22 "bindings": {
23 "maxTranslateX": {"<-": "@owner._sliderWidth"},
24 "translateX": {"<->": "@owner._positionX"}
25 }
26 },
27 "owner": {
28 "properties": {
29 "element": {"#": "slider"},
30 "_handleEl": {"#": "slider-handle"},
31 "_translateComposer": {"@": "translateComposer1"}
32 }
33
34 }
35}
36 </script>
37
38 </head>
39 <body>
40 <div id="slider" class="slider">
41 <span draggable="true" href="#" id="slider-handle" class="slider-handle"></span>
42 </div>
43
44 </body>
45</html>
diff --git a/node_modules/montage/ui/skeleton/range-input.reel/range-input.js b/node_modules/montage/ui/skeleton/range-input.reel/range-input.js
deleted file mode 100644
index 1dbd4272..00000000
--- a/node_modules/montage/ui/skeleton/range-input.reel/range-input.js
+++ /dev/null
@@ -1,300 +0,0 @@
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/*global require,exports */
7var Montage = require("montage").Montage,
8 Component = require("ui/component").Component;
9
10/**
11 * The input type="range" field
12 */
13var RangeInput = exports.RangeInput = Montage.create(Component, {
14
15 DEFAULT_WIDTH: {
16 value: 300
17 },
18
19 HANDLE_ADJUST: {
20 value: 5
21 },
22
23 // public API
24 _min: {
25 value: null
26 },
27
28 min: {
29 get: function() {
30 return this._min;
31 },
32 set: function(value) {
33 this._min = String.isString(value) ? parseFloat(value) : value;
34 this.needsDraw = true;
35 },
36 serializable: true
37 },
38
39 _max: {
40 value: null
41 },
42
43 max: {
44 get: function() {
45 return this._max;
46 },
47 set: function(value) {
48 this._max = String.isString(value) ? parseFloat(value) : value;
49 this.needsDraw = true;
50 },
51 serializable: true
52 },
53
54 _step: {
55 value: null
56 },
57
58 step: {
59 get: function() {
60 return this._step;
61 },
62 set: function(value) {
63 this._step = String.isString(value) ? parseFloat(value) : value;
64 this.needsDraw = true;
65 },
66 serializable: true
67 },
68
69 /** Width of the slider in px. Default = 300 */
70 _width: {
71 value: null
72 },
73
74 width: {
75 get: function() {
76 return this._width;
77 },
78 set: function(value) {
79 this._width = String.isString(value) ? parseFloat(value) : value;
80 this.needsDraw = true;
81 },
82 serializable: true
83 },
84
85 percent: {
86 value: null
87 },
88
89 _valueSyncedWithPosition: {
90 value: null
91 },
92
93 _value: {
94 value: null
95 },
96
97 value: {
98 get: function() {
99 return this._value;
100 },
101 set: function(value, fromInput) {
102 this._value = String.isString(value) ? parseFloat(value) : value;
103
104 if(fromInput) {
105 this._valueSyncedWithPosition = true;
106 } else {
107 this._valueSyncedWithPosition = false;
108 this._calculatePositionFromValue();
109 this.needsDraw = true;
110 }
111 },
112 serializable: true
113 },
114
115 // private
116 _handleEl: {
117 value: null,
118 serializable: true
119 },
120
121 _translateComposer: {
122 value: null,
123 serializable: true
124 },
125
126 _sliderLeft: {
127 value: null
128 },
129
130 _sliderWidth: {
131 value: null
132 },
133
134 __positionX: {
135 value: null
136 },
137
138 _positionX: {
139 get: function() {
140 return this.__positionX;