Commit a5291ef8 authored by iv's avatar iv Committed by Romain Courteaud

OfficeJS drive: Add some options to Codemirror gadget.

parent 7bec2c3d
...@@ -113,25 +113,26 @@ ...@@ -113,25 +113,26 @@
<script src="rsvp.js" type="text/javascript"></script>\n <script src="rsvp.js" type="text/javascript"></script>\n
<script src="renderjs.js" type="text/javascript"></script>\n <script src="renderjs.js" type="text/javascript"></script>\n
\n \n
<link rel="stylesheet" href="codemirror.css">\n <link rel="stylesheet" href="codemirror.css">\n
<link rel="stylesheet" href="codemirror_theme_zenburn.css">\n <link rel="stylesheet" href="codemirror_theme_zenburn.css">\n
<link rel="stylesheet" href="gadget_codemirror.css">\n <link rel="stylesheet" href="gadget_codemirror.css">\n
<link rel="stylesheet" href="codemirror_addon_display_fullscreen.css">\n <link rel="stylesheet" href="codemirror_addon_display_fullscreen.css">\n
<link rel="stylesheet" href="codemirror_addon_dialog.css">\n <link rel="stylesheet" href="codemirror_addon_dialog.css">\n
\n \n
<script src="codemirror.js"></script>\n <script src="codemirror.js"></script>\n
<script src="codemirror_addon_searchcursor.js"></script>\n <script src="codemirror_addon_searchcursor.js"></script>\n
<script src="codemirror_mode_javascript.js"></script>\n <script src="codemirror_mode_javascript.js"></script>\n
<script src="codemirror_addon_edit_matchbrackets.js"></script>\n <script src="codemirror_addon_edit_matchbrackets.js"></script>\n
<script src="codemirror_keymap_vim.js"></script>\n <script src="codemirror_keymap_vim.js"></script>\n
<script src="codemirror_addon_display_fullscreen.js"></script>\n
<script src="codemirror_addon_dialog.js"></script>\n
<script src="gadget_codemirror.js" type="text/javascript"></script>\n
\n \n
<script src="codemirror_addon_display_fullscreen.js"></script>\n
<script src="codemirror_addon_dialog.js"></script>\n
\n
<script src="gadget_codemirror.js" type="text/javascript"></script>\n
</head>\n </head>\n
<body>\n <body>\n
\n \n
<div class="codemirror_gadget"><textarea name="code"></textarea></div>\n <div class="codemirror_gadget"><textarea name="code"></textarea></div>\n
\n \n
</body>\n </body>\n
</html>\n </html>\n
...@@ -272,7 +273,7 @@ ...@@ -272,7 +273,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>948.27247.18522.58589</string> </value> <value> <string>948.62232.11308.64477</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -290,7 +291,7 @@ ...@@ -290,7 +291,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1453133547.21</float> <float>1454939427.73</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -122,7 +122,14 @@ ...@@ -122,7 +122,14 @@
keyMap: \'vim\',\n keyMap: \'vim\',\n
matchBrackets: true,\n matchBrackets: true,\n
showCursorWhenSelecting: true,\n showCursorWhenSelecting: true,\n
autofocus: false\n tabSize: 4,\n
indentUnit: 4,\n
indentWithTabs: false,\n
extraKeys: {\n
"Alt-;": function (cm) {\n
cm.setOption("fullScreen", !cm.getOption("fullScreen"));\n
}\n
}\n
}\n }\n
);\n );\n
});\n });\n
...@@ -133,6 +140,8 @@ ...@@ -133,6 +140,8 @@
CodeMirror.commands.save = function () {\n CodeMirror.commands.save = function () {\n
gadget.submitData();\n gadget.submitData();\n
};\n };\n
//console.log(gadget.props.element.querySelector(\'.editor\'));\n
\n
})\n })\n
.declareMethod(\'getData\', function () {\n .declareMethod(\'getData\', function () {\n
return this.editor.getValue();\n return this.editor.getValue();\n
...@@ -276,7 +285,7 @@ ...@@ -276,7 +285,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>948.29057.44332.28194</string> </value> <value> <string>948.62231.37965.8123</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -294,7 +303,7 @@ ...@@ -294,7 +303,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1453133523.32</float> <float>1454939611.03</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment