aboutsummaryrefslogtreecommitdiff
path: root/js/code-editor/ui
diff options
context:
space:
mode:
authorAnanya Sen2012-04-13 16:51:50 -0700
committerAnanya Sen2012-04-13 16:51:50 -0700
commitc2ec390d42945d2df1aed3f2b7ff3d1aa722fce8 (patch)
treecaff16a00963bbaef55830b406d7da212f4f74d7 /js/code-editor/ui
parent6ffda1a7ebe18adb518eb24a612df22305b050a6 (diff)
downloadninja-c2ec390d42945d2df1aed3f2b7ff3d1aa722fce8.tar.gz
- code editor view options bar
- Checkbox for user to toggle between manually triggered autocomplete and automatic autocomplete - font zoom hottext Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/code-editor/ui')
-rw-r--r--js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.css3
-rw-r--r--js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.html56
-rw-r--r--js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js48
3 files changed, 107 insertions, 0 deletions
diff --git a/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.css b/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.css
new file mode 100644
index 00000000..5aa66af2
--- /dev/null
+++ b/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.css
@@ -0,0 +1,3 @@
1.viewOptions{
2 color:#F7F7F7;
3} \ No newline at end of file
diff --git a/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.html b/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.html
new file mode 100644
index 00000000..c6d3da4e
--- /dev/null
+++ b/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.html
@@ -0,0 +1,56 @@
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" type="text/css" href="code-editor-view-options.css">
11 <script type="text/montage-serialization">
12 {
13 "codeCompleteCheck":{
14 "prototype": "montage/ui/checkbox.reel",
15 "properties": {
16 "element": {"#": "codeComplete"}
17 }
18 },
19
20 "zoomHottext": {
21 "module": "js/components/hottextunit.reel",
22 "name": "HotTextUnit",
23 "properties": {
24 "element": {"#": "zoomFont"},
25 "minValue":100,
26 "maxValue" :200,
27 "stepSize" :10,
28 "acceptableUnits" : ["%"],
29 "units" : "%"
30 }
31 },
32
33 "owner":{
34 "module": "js/code-editor/ui/code-editor-view-options.reel",
35 "name": "CodeEditorViewOptions",
36 "properties": {
37 "element": {"#": "viewOptions"},
38 "codeCompleteCheck":{"@": "codeCompleteCheck"},
39 "zoomHottext":{"@":"zoomHottext"}
40 }
41 }
42 }
43 </script>
44</head>
45<body>
46<div id="viewOptions" class="viewOptions">
47 <div>
48 <input class="zoomFont" id="zoomFont"/>
49 <div class="autoCodeComplete" >
50 <span>Automatic Code completion</span>
51 <input type="checkbox" id="codeComplete" />
52 </div>
53 </div>
54</div>
55</body>
56</html> \ No newline at end of file
diff --git a/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js b/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js
new file mode 100644
index 00000000..a1ff8547
--- /dev/null
+++ b/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js
@@ -0,0 +1,48 @@
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//
9var Montage = require("montage/core/core").Montage,
10 Component = require("montage/ui/component").Component;
11
12var CodeEditorViewOptions = exports.CodeEditorViewOptions = Montage.create(Component, {
13 hasReel: {
14 value: true
15 },
16
17 prepareForDraw: {
18 value: function() {
19 Object.defineBinding(this.codeCompleteCheck , "checked", {
20 boundObject: this.application.ninja.codeEditorController,
21 boundObjectPropertyPath: "automaticCodeComplete",
22 oneway : false
23 });
24
25 Object.defineBinding(this.zoomHottext , "value", {
26 boundObject: this.application.ninja.codeEditorController,
27 boundObjectPropertyPath: "editorFont",
28 oneway : false
29 });
30
31 }
32 },
33
34 willDraw: {
35 enumerable: false,
36 value: function() {}
37 },
38 draw: {
39 enumerable: false,
40 value: function() {}
41 },
42 didDraw: {
43 enumerable: false,
44 value: function() {
45
46 }
47 }
48}); \ No newline at end of file