Index: trunk/extensions/VisualEditor/SpecialVisualEditorSandbox.php |
— | — | @@ -30,137 +30,10 @@ |
31 | 31 | $feedbackPrompt = wfMsgHtml( 'visualeditor-feedback-prompt' ); |
32 | 32 | $feedbackDialogTitle = wfMsgHtml( 'visualeditor-feedback-dialog-title' ); |
33 | 33 | |
34 | | - $out = <<<HTML |
35 | | -<!-- VisualEditor Sandbox --> |
36 | | -<div id="es-docs"> |
37 | | - <div id="es-docs-label">Example documents:</div> |
38 | | - <ul id="es-docs-list" ></ul> |
39 | | -</div> |
40 | | -<div id="es-base"> |
41 | | - <div id="es-toolbar-wrapper"> |
42 | | - <div id="es-toolbar" class="es-toolbar"> |
43 | | - <div id="es-modes" class="es-modes"> |
44 | | - <div id="es-mode-wikitext" class="es-modes-button" title="$modeWikitext"></div> |
45 | | - <div id="es-mode-json" class="es-modes-button" title="$modeJson"></div> |
46 | | - <div id="es-mode-html" class="es-modes-button" title="$modeHtml"></div> |
47 | | - <div id="es-mode-render" class="es-modes-button" title="$modeRender"></div> |
48 | | - <div id="es-mode-history" class="es-modes-button" title="$modeHistory"></div> |
49 | | - <div id="es-mode-help" class="es-modes-button" title="$modeHelp"></div> |
50 | | - </div> |
51 | | - <div style="clear:both"></div> |
52 | | - <div id="es-toolbar-shadow"></div> |
53 | | - </div> |
54 | | - </div> |
55 | | - <div id="es-panes"> |
56 | | - <div id="es-visual"> |
57 | | - <div id="es-editor"></div> |
58 | | - </div> |
59 | | - <div id="es-panels"> |
60 | | - <div id="es-panel-wikitext" class="es-panel es-code"></div> |
61 | | - <div id="es-panel-json" class="es-panel es-code"></div> |
62 | | - <div id="es-panel-html" class="es-panel es-code"></div> |
63 | | - <div id="es-panel-render" class="es-panel es-render"></div> |
64 | | - <div id="es-panel-history" class="es-panel es-code"></div> |
65 | | - <div id="es-panel-help" class="es-panel"> |
66 | | - <div class="es-help-title">Keyboard Shortcuts</div> |
67 | | - <div class="es-help-shortcuts-title">Clipboard</div> |
68 | | - <div class="es-help-shortcut"> |
69 | | - <span class="es-help-keys"> |
70 | | - <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
71 | | - <span class="es-help-key">C</span> |
72 | | - </span> |
73 | | - Copy selected text |
74 | | - </div> |
75 | | - <div class="es-help-shortcut"> |
76 | | - <span class="es-help-keys"> |
77 | | - <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
78 | | - <span class="es-help-key">X</span> |
79 | | - </span> |
80 | | - Cut selected text |
81 | | - </div> |
82 | | - <div class="es-help-shortcut"> |
83 | | - <span class="es-help-keys"> |
84 | | - <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
85 | | - <span class="es-help-key">V</span> |
86 | | - </span> |
87 | | - Paste text at the cursor |
88 | | - </div> |
89 | | - <div class="es-help-shortcuts-title">History navigation</div> |
90 | | - <div class="es-help-shortcut"> |
91 | | - <span class="es-help-keys"> |
92 | | - <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
93 | | - <span class="es-help-key">Z</span> |
94 | | - </span> |
95 | | - Undo |
96 | | - </div> |
97 | | - <div class="es-help-shortcut"> |
98 | | - <span class="es-help-keys"> |
99 | | - <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
100 | | - <span class="es-help-key">Y</span> |
101 | | - </span> |
102 | | - Redo |
103 | | - </div> |
104 | | - <div class="es-help-shortcut"> |
105 | | - <span class="es-help-keys"> |
106 | | - <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
107 | | - <span class="es-help-key">⇧</span> + |
108 | | - <span class="es-help-key">Z</span> |
109 | | - </span> |
110 | | - Redo |
111 | | - </div> |
112 | | - <div class="es-help-shortcuts-title">Formatting</div> |
113 | | - <div class="es-help-shortcut"> |
114 | | - <span class="es-help-keys"> |
115 | | - <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
116 | | - <span class="es-help-key">B</span> |
117 | | - </span> |
118 | | - Make selected text bold |
119 | | - </div> |
120 | | - <div class="es-help-shortcut"> |
121 | | - <span class="es-help-keys"> |
122 | | - <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
123 | | - <span class="es-help-key">I</span> |
124 | | - </span> |
125 | | - Make selected text italic |
126 | | - </div> |
127 | | - <div class="es-help-shortcut"> |
128 | | - <span class="es-help-keys"> |
129 | | - <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
130 | | - <span class="es-help-key">K</span> |
131 | | - </span> |
132 | | - Make selected text a link |
133 | | - </div> |
134 | | - <div class="es-help-shortcuts-title">Selection</div> |
135 | | - <div class="es-help-shortcut"> |
136 | | - <span class="es-help-keys"> |
137 | | - <span class="es-help-key">⇧</span> + |
138 | | - <span class="es-help-key">Arrow</span> |
139 | | - </span> |
140 | | - Adjust selection |
141 | | - </div> |
142 | | - <div class="es-help-shortcut"> |
143 | | - <span class="es-help-keys"> |
144 | | - <span class="es-help-key">Alt</span> + |
145 | | - <span class="es-help-key">Arrow</span> |
146 | | - </span> |
147 | | - Move cursor by words or blocks |
148 | | - </div> |
149 | | - <div class="es-help-shortcut"> |
150 | | - <span class="es-help-keys"> |
151 | | - <span class="es-help-key">Alt</span> + |
152 | | - <span class="es-help-key">⇧</span> + |
153 | | - <span class="es-help-key">Arrow</span> |
154 | | - </span> |
155 | | - Adjust selection by words or blocks |
156 | | - </div> |
157 | | - </div> |
158 | | - </div> |
159 | | - <div style="clear:both"></div> |
160 | | - </div> |
161 | | -</div> |
162 | | -<!-- /VisualEditor Sandbox --> |
163 | | -HTML; |
164 | | - |
| 34 | + $dir = dirname( __FILE__ ); |
| 35 | + ob_start(); |
| 36 | + include( 'modules/sandbox/base.php' ); |
| 37 | + $out = ob_get_clean(); |
165 | 38 | $wgOut->addHtml( $out ); |
166 | 39 | } |
167 | 40 | } |
Index: trunk/extensions/VisualEditor/demo/index.html |
— | — | @@ -1,268 +0,0 @@ |
2 | | -<!DOCTYPE html> |
3 | | - |
4 | | -<html> |
5 | | - <head> |
6 | | - <title>EditSurface Demo</title> |
7 | | - <link rel="stylesheet" href="../modules/es/styles/es.SurfaceView.css"> |
8 | | - <link rel="stylesheet" href="../modules/es/styles/es.ContextView.css"> |
9 | | - <link rel="stylesheet" href="../modules/es/styles/es.ContentView.css"> |
10 | | - <link rel="stylesheet" href="../modules/es/styles/es.DocumentView.css"> |
11 | | - <link rel="stylesheet" href="../modules/es/styles/es.Inspector.css"> |
12 | | - <link rel="stylesheet" href="../modules/es/styles/es.ToolbarView.css"> |
13 | | - <link rel="stylesheet" href="../modules/es/styles/es.MenuView.css"> |
14 | | - <link rel="stylesheet" href="../modules/sandbox/sandbox.css"> |
15 | | - <style> |
16 | | - body { |
17 | | - font-family: "Arial"; |
18 | | - font-size: 1em; |
19 | | - width: 100%; |
20 | | - margin: 1em 0; |
21 | | - padding: 0; |
22 | | - overflow-y: scroll; |
23 | | - background-color: white; |
24 | | - } |
25 | | - #es-base { |
26 | | - margin: 2em; |
27 | | - margin-top: 0em; |
28 | | - -webkit-box-shadow: 0 0.25em 1.5em 0 #dddddd; |
29 | | - -moz-box-shadow: 0 0.25em 1.5em 0 #dddddd; |
30 | | - box-shadow: 0 0.25em 1.5em 0 #dddddd; |
31 | | - -webkit-border-radius: 0.5em; |
32 | | - -moz-border-radius: 0.5em; |
33 | | - -o-border-radius: 0.5em; |
34 | | - border-radius: 0.5em; |
35 | | - } |
36 | | - #es-panes { |
37 | | - border: solid 1px #cccccc; |
38 | | - border-top: none; |
39 | | - } |
40 | | - #es-visual { |
41 | | - padding-left: 1em; |
42 | | - padding-right: 1em; |
43 | | - } |
44 | | - #es-toolbar { |
45 | | - -webkit-border-radius: 0; |
46 | | - -moz-border-radius: 0; |
47 | | - -o-border-radius: 0; |
48 | | - border-radius: 0; |
49 | | - -webkit-border-top-right-radius: 0.25em; |
50 | | - -moz-border-top-right-radius: 0.25em; |
51 | | - -o-border-top-right-radius: 0.25em; |
52 | | - border-top-right-radius: 0.25em; |
53 | | - -webkit-border-top-left-radius: 0.25em; |
54 | | - -moz-border-top-left-radius: 0.25em; |
55 | | - -o-border-top-left-radius: 0.25em; |
56 | | - border-top-left-radius: 0.25em; |
57 | | - } |
58 | | - #es-toolbar.float { |
59 | | - left: 2em; |
60 | | - right: 2em; |
61 | | - top: 0; |
62 | | - } |
63 | | - #es-docs { |
64 | | - margin-left: 2.5em; |
65 | | - } |
66 | | - </style> |
67 | | - </head> |
68 | | - <body> |
69 | | - <div id="es-docs"> |
70 | | - <div id="es-docs-label">Example documents:</div> |
71 | | - <ul id="es-docs-list" ></ul> |
72 | | - </div> |
73 | | - <div id="es-base"> |
74 | | - <div id="es-toolbar-wrapper"> |
75 | | - <div id="es-toolbar" class="es-toolbar"> |
76 | | - <div id="es-modes" class="es-modes"> |
77 | | - <div id="es-mode-wikitext" class="es-modes-button" title="Toggle wikitext view"></div> |
78 | | - <div id="es-mode-json" class="es-modes-button" title="Toggle JSON view"></div> |
79 | | - <div id="es-mode-html" class="es-modes-button" title="Toggle HTML view"></div> |
80 | | - <div id="es-mode-render" class="es-modes-button" title="Toggle preview"></div> |
81 | | - <div id="es-mode-history" class="es-modes-button" title="Toggle transaction history view"></div> |
82 | | - <div id="es-mode-help" class="es-modes-button" title="Toggle help view"></div> |
83 | | - </div> |
84 | | - <div style="clear:both"></div> |
85 | | - <div id="es-toolbar-shadow"></div> |
86 | | - </div> |
87 | | - </div> |
88 | | - <div id="es-panes"> |
89 | | - <div id="es-visual"> |
90 | | - <div id="es-editor"></div> |
91 | | - </div> |
92 | | - <div id="es-panels"> |
93 | | - <div id="es-panel-wikitext" class="es-panel es-code"></div> |
94 | | - <div id="es-panel-json" class="es-panel es-code"></div> |
95 | | - <div id="es-panel-html" class="es-panel es-code"></div> |
96 | | - <div id="es-panel-render" class="es-panel es-render"></div> |
97 | | - <div id="es-panel-history" class="es-panel es-code"></div> |
98 | | - <div id="es-panel-help" class="es-panel"> |
99 | | - <div class="es-help-title">Keyboard Shortcuts</div> |
100 | | - <div class="es-help-shortcuts-title">Clipboard</div> |
101 | | - <div class="es-help-shortcut"> |
102 | | - <span class="es-help-keys"> |
103 | | - <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
104 | | - <span class="es-help-key">C</span> |
105 | | - </span> |
106 | | - Copy selected text |
107 | | - </div> |
108 | | - <div class="es-help-shortcut"> |
109 | | - <span class="es-help-keys"> |
110 | | - <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
111 | | - <span class="es-help-key">X</span> |
112 | | - </span> |
113 | | - Cut selected text |
114 | | - </div> |
115 | | - <div class="es-help-shortcut"> |
116 | | - <span class="es-help-keys"> |
117 | | - <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
118 | | - <span class="es-help-key">V</span> |
119 | | - </span> |
120 | | - Paste text at the cursor |
121 | | - </div> |
122 | | - <div class="es-help-shortcuts-title">History navigation</div> |
123 | | - <div class="es-help-shortcut"> |
124 | | - <span class="es-help-keys"> |
125 | | - <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
126 | | - <span class="es-help-key">Z</span> |
127 | | - </span> |
128 | | - Undo |
129 | | - </div> |
130 | | - <div class="es-help-shortcut"> |
131 | | - <span class="es-help-keys"> |
132 | | - <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
133 | | - <span class="es-help-key">Y</span> |
134 | | - </span> |
135 | | - Redo |
136 | | - </div> |
137 | | - <div class="es-help-shortcut"> |
138 | | - <span class="es-help-keys"> |
139 | | - <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
140 | | - <span class="es-help-key">⇧</span> + |
141 | | - <span class="es-help-key">Z</span> |
142 | | - </span> |
143 | | - Redo |
144 | | - </div> |
145 | | - <div class="es-help-shortcuts-title">Formatting</div> |
146 | | - <div class="es-help-shortcut"> |
147 | | - <span class="es-help-keys"> |
148 | | - <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
149 | | - <span class="es-help-key">B</span> |
150 | | - </span> |
151 | | - Make selected text bold |
152 | | - </div> |
153 | | - <div class="es-help-shortcut"> |
154 | | - <span class="es-help-keys"> |
155 | | - <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
156 | | - <span class="es-help-key">I</span> |
157 | | - </span> |
158 | | - Make selected text italic |
159 | | - </div> |
160 | | - <div class="es-help-shortcut"> |
161 | | - <span class="es-help-keys"> |
162 | | - <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
163 | | - <span class="es-help-key">K</span> |
164 | | - </span> |
165 | | - Make selected text a link |
166 | | - </div> |
167 | | - <div class="es-help-shortcuts-title">Selection</div> |
168 | | - <div class="es-help-shortcut"> |
169 | | - <span class="es-help-keys"> |
170 | | - <span class="es-help-key">⇧</span> + |
171 | | - <span class="es-help-key">Arrow</span> |
172 | | - </span> |
173 | | - Adjust selection |
174 | | - </div> |
175 | | - <div class="es-help-shortcut"> |
176 | | - <span class="es-help-keys"> |
177 | | - <span class="es-help-key">Alt</span> + |
178 | | - <span class="es-help-key">Arrow</span> |
179 | | - </span> |
180 | | - Move cursor by words or blocks |
181 | | - </div> |
182 | | - <div class="es-help-shortcut"> |
183 | | - <span class="es-help-keys"> |
184 | | - <span class="es-help-key">Alt</span> + |
185 | | - <span class="es-help-key">⇧</span> + |
186 | | - <span class="es-help-key">Arrow</span> |
187 | | - </span> |
188 | | - Adjust selection by words or blocks |
189 | | - </div> |
190 | | - </div> |
191 | | - </div> |
192 | | - <div style="clear:both"></div> |
193 | | - </div> |
194 | | - </div> |
195 | | - |
196 | | - <!-- EditSurface --> |
197 | | - <script src="../modules/jquery/jquery.js"></script> |
198 | | - <script src="../modules/es/es.js"></script> |
199 | | - <script src="../modules/es/es.Html.js"></script> |
200 | | - <script src="../modules/es/es.Position.js"></script> |
201 | | - <script src="../modules/es/es.Range.js"></script> |
202 | | - <script src="../modules/es/es.TransactionProcessor.js"></script> |
203 | | - |
204 | | - <!-- Serializers --> |
205 | | - <script src="../modules/es/serializers/es.AnnotationSerializer.js"></script> |
206 | | - <script src="../modules/es/serializers/es.HtmlSerializer.js"></script> |
207 | | - <script src="../modules/es/serializers/es.JsonSerializer.js"></script> |
208 | | - <script src="../modules/es/serializers/es.WikitextSerializer.js"></script> |
209 | | - |
210 | | - <!-- Bases --> |
211 | | - <script src="../modules/es/bases/es.EventEmitter.js"></script> |
212 | | - <script src="../modules/es/bases/es.DocumentNode.js"></script> |
213 | | - <script src="../modules/es/bases/es.DocumentModelNode.js"></script> |
214 | | - <script src="../modules/es/bases/es.DocumentBranchNode.js"></script> |
215 | | - <script src="../modules/es/bases/es.DocumentLeafNode.js"></script> |
216 | | - <script src="../modules/es/bases/es.DocumentModelBranchNode.js"></script> |
217 | | - <script src="../modules/es/bases/es.DocumentModelLeafNode.js"></script> |
218 | | - <script src="../modules/es/bases/es.DocumentViewNode.js"></script> |
219 | | - <script src="../modules/es/bases/es.DocumentViewBranchNode.js"></script> |
220 | | - <script src="../modules/es/bases/es.DocumentViewLeafNode.js"></script> |
221 | | - <script src="../modules/es/bases/es.Inspector.js"></script> |
222 | | - <script src="../modules/es/bases/es.Tool.js"></script> |
223 | | - |
224 | | - <!-- Models --> |
225 | | - <script src="../modules/es/models/es.SurfaceModel.js"></script> |
226 | | - <script src="../modules/es/models/es.DocumentModel.js"></script> |
227 | | - <script src="../modules/es/models/es.ParagraphModel.js"></script> |
228 | | - <script src="../modules/es/models/es.PreModel.js"></script> |
229 | | - <script src="../modules/es/models/es.ListModel.js"></script> |
230 | | - <script src="../modules/es/models/es.ListItemModel.js"></script> |
231 | | - <script src="../modules/es/models/es.TableModel.js"></script> |
232 | | - <script src="../modules/es/models/es.TableRowModel.js"></script> |
233 | | - <script src="../modules/es/models/es.TableCellModel.js"></script> |
234 | | - <script src="../modules/es/models/es.HeadingModel.js"></script> |
235 | | - <script src="../modules/es/models/es.TransactionModel.js"></script> |
236 | | - |
237 | | - <!-- Inspectors --> |
238 | | - <script src="../modules/es/inspectors/es.LinkInspector.js"></script> |
239 | | - |
240 | | - <!-- Tools --> |
241 | | - <script src="../modules/es/tools/es.ButtonTool.js"></script> |
242 | | - <script src="../modules/es/tools/es.AnnotationButtonTool.js"></script> |
243 | | - <script src="../modules/es/tools/es.ClearButtonTool.js"></script> |
244 | | - <script src="../modules/es/tools/es.HistoryButtonTool.js"></script> |
245 | | - <script src="../modules/es/tools/es.ListButtonTool.js"></script> |
246 | | - <script src="../modules/es/tools/es.IndentationButtonTool.js"></script> |
247 | | - <script src="../modules/es/tools/es.DropdownTool.js"></script> |
248 | | - <script src="../modules/es/tools/es.FormatDropdownTool.js"></script> |
249 | | - |
250 | | - <!-- Views --> |
251 | | - <script src="../modules/es/views/es.SurfaceView.js"></script> |
252 | | - <script src="../modules/es/views/es.ToolbarView.js"></script> |
253 | | - <script src="../modules/es/views/es.ContentView.js"></script> |
254 | | - <script src="../modules/es/views/es.ContextView.js"></script> |
255 | | - <script src="../modules/es/views/es.DocumentView.js"></script> |
256 | | - <script src="../modules/es/views/es.ParagraphView.js"></script> |
257 | | - <script src="../modules/es/views/es.PreView.js"></script> |
258 | | - <script src="../modules/es/views/es.ListView.js"></script> |
259 | | - <script src="../modules/es/views/es.MenuView.js"></script> |
260 | | - <script src="../modules/es/views/es.ListItemView.js"></script> |
261 | | - <script src="../modules/es/views/es.TableView.js"></script> |
262 | | - <script src="../modules/es/views/es.TableRowView.js"></script> |
263 | | - <script src="../modules/es/views/es.TableCellView.js"></script> |
264 | | - <script src="../modules/es/views/es.HeadingView.js"></script> |
265 | | - |
266 | | - <!-- Demo --> |
267 | | - <script src="../modules/sandbox/sandbox.js"></script> |
268 | | - </body> |
269 | | -</html> |
\ No newline at end of file |
Index: trunk/extensions/VisualEditor/demo/index.php |
— | — | @@ -0,0 +1,152 @@ |
| 2 | +<!DOCTYPE html> |
| 3 | + |
| 4 | +<html> |
| 5 | + <head> |
| 6 | + <title>EditSurface Demo</title> |
| 7 | + <link rel="stylesheet" href="../modules/es/styles/es.SurfaceView.css"> |
| 8 | + <link rel="stylesheet" href="../modules/es/styles/es.ContextView.css"> |
| 9 | + <link rel="stylesheet" href="../modules/es/styles/es.ContentView.css"> |
| 10 | + <link rel="stylesheet" href="../modules/es/styles/es.DocumentView.css"> |
| 11 | + <link rel="stylesheet" href="../modules/es/styles/es.Inspector.css"> |
| 12 | + <link rel="stylesheet" href="../modules/es/styles/es.ToolbarView.css"> |
| 13 | + <link rel="stylesheet" href="../modules/es/styles/es.MenuView.css"> |
| 14 | + <link rel="stylesheet" href="../modules/sandbox/sandbox.css"> |
| 15 | + <style> |
| 16 | + body { |
| 17 | + font-family: "Arial"; |
| 18 | + font-size: 1em; |
| 19 | + width: 100%; |
| 20 | + margin: 1em 0; |
| 21 | + padding: 0; |
| 22 | + overflow-y: scroll; |
| 23 | + background-color: white; |
| 24 | + } |
| 25 | + #es-base { |
| 26 | + margin: 2em; |
| 27 | + margin-top: 0em; |
| 28 | + -webkit-box-shadow: 0 0.25em 1.5em 0 #dddddd; |
| 29 | + -moz-box-shadow: 0 0.25em 1.5em 0 #dddddd; |
| 30 | + box-shadow: 0 0.25em 1.5em 0 #dddddd; |
| 31 | + -webkit-border-radius: 0.5em; |
| 32 | + -moz-border-radius: 0.5em; |
| 33 | + -o-border-radius: 0.5em; |
| 34 | + border-radius: 0.5em; |
| 35 | + } |
| 36 | + #es-panes { |
| 37 | + border: solid 1px #cccccc; |
| 38 | + border-top: none; |
| 39 | + } |
| 40 | + #es-visual { |
| 41 | + padding-left: 1em; |
| 42 | + padding-right: 1em; |
| 43 | + } |
| 44 | + #es-toolbar { |
| 45 | + -webkit-border-radius: 0; |
| 46 | + -moz-border-radius: 0; |
| 47 | + -o-border-radius: 0; |
| 48 | + border-radius: 0; |
| 49 | + -webkit-border-top-right-radius: 0.25em; |
| 50 | + -moz-border-top-right-radius: 0.25em; |
| 51 | + -o-border-top-right-radius: 0.25em; |
| 52 | + border-top-right-radius: 0.25em; |
| 53 | + -webkit-border-top-left-radius: 0.25em; |
| 54 | + -moz-border-top-left-radius: 0.25em; |
| 55 | + -o-border-top-left-radius: 0.25em; |
| 56 | + border-top-left-radius: 0.25em; |
| 57 | + } |
| 58 | + #es-toolbar.float { |
| 59 | + left: 2em; |
| 60 | + right: 2em; |
| 61 | + top: 0; |
| 62 | + } |
| 63 | + #es-docs { |
| 64 | + margin-left: 2.5em; |
| 65 | + } |
| 66 | + </style> |
| 67 | + </head> |
| 68 | + <body> |
| 69 | +<?php |
| 70 | +$modeWikitext = "Toggle wikitext view"; |
| 71 | +$modeJson = "Toggle JSON view"; |
| 72 | +$modeHtml = "Toggle HTML view"; |
| 73 | +$modeRender = "Toggle preview"; |
| 74 | +$modeHistory = "Toggle transaction history view"; |
| 75 | +$modeHelp = "Toggle help view"; |
| 76 | + |
| 77 | +include( '../modules/sandbox/base.php' ); |
| 78 | + |
| 79 | +?> |
| 80 | + <!-- EditSurface --> |
| 81 | + <script src="../modules/jquery/jquery.js"></script> |
| 82 | + <script src="../modules/es/es.js"></script> |
| 83 | + <script src="../modules/es/es.Html.js"></script> |
| 84 | + <script src="../modules/es/es.Position.js"></script> |
| 85 | + <script src="../modules/es/es.Range.js"></script> |
| 86 | + <script src="../modules/es/es.TransactionProcessor.js"></script> |
| 87 | + |
| 88 | + <!-- Serializers --> |
| 89 | + <script src="../modules/es/serializers/es.AnnotationSerializer.js"></script> |
| 90 | + <script src="../modules/es/serializers/es.HtmlSerializer.js"></script> |
| 91 | + <script src="../modules/es/serializers/es.JsonSerializer.js"></script> |
| 92 | + <script src="../modules/es/serializers/es.WikitextSerializer.js"></script> |
| 93 | + |
| 94 | + <!-- Bases --> |
| 95 | + <script src="../modules/es/bases/es.EventEmitter.js"></script> |
| 96 | + <script src="../modules/es/bases/es.DocumentNode.js"></script> |
| 97 | + <script src="../modules/es/bases/es.DocumentModelNode.js"></script> |
| 98 | + <script src="../modules/es/bases/es.DocumentBranchNode.js"></script> |
| 99 | + <script src="../modules/es/bases/es.DocumentLeafNode.js"></script> |
| 100 | + <script src="../modules/es/bases/es.DocumentModelBranchNode.js"></script> |
| 101 | + <script src="../modules/es/bases/es.DocumentModelLeafNode.js"></script> |
| 102 | + <script src="../modules/es/bases/es.DocumentViewNode.js"></script> |
| 103 | + <script src="../modules/es/bases/es.DocumentViewBranchNode.js"></script> |
| 104 | + <script src="../modules/es/bases/es.DocumentViewLeafNode.js"></script> |
| 105 | + <script src="../modules/es/bases/es.Inspector.js"></script> |
| 106 | + <script src="../modules/es/bases/es.Tool.js"></script> |
| 107 | + |
| 108 | + <!-- Models --> |
| 109 | + <script src="../modules/es/models/es.SurfaceModel.js"></script> |
| 110 | + <script src="../modules/es/models/es.DocumentModel.js"></script> |
| 111 | + <script src="../modules/es/models/es.ParagraphModel.js"></script> |
| 112 | + <script src="../modules/es/models/es.PreModel.js"></script> |
| 113 | + <script src="../modules/es/models/es.ListModel.js"></script> |
| 114 | + <script src="../modules/es/models/es.ListItemModel.js"></script> |
| 115 | + <script src="../modules/es/models/es.TableModel.js"></script> |
| 116 | + <script src="../modules/es/models/es.TableRowModel.js"></script> |
| 117 | + <script src="../modules/es/models/es.TableCellModel.js"></script> |
| 118 | + <script src="../modules/es/models/es.HeadingModel.js"></script> |
| 119 | + <script src="../modules/es/models/es.TransactionModel.js"></script> |
| 120 | + |
| 121 | + <!-- Inspectors --> |
| 122 | + <script src="../modules/es/inspectors/es.LinkInspector.js"></script> |
| 123 | + |
| 124 | + <!-- Tools --> |
| 125 | + <script src="../modules/es/tools/es.ButtonTool.js"></script> |
| 126 | + <script src="../modules/es/tools/es.AnnotationButtonTool.js"></script> |
| 127 | + <script src="../modules/es/tools/es.ClearButtonTool.js"></script> |
| 128 | + <script src="../modules/es/tools/es.HistoryButtonTool.js"></script> |
| 129 | + <script src="../modules/es/tools/es.ListButtonTool.js"></script> |
| 130 | + <script src="../modules/es/tools/es.IndentationButtonTool.js"></script> |
| 131 | + <script src="../modules/es/tools/es.DropdownTool.js"></script> |
| 132 | + <script src="../modules/es/tools/es.FormatDropdownTool.js"></script> |
| 133 | + |
| 134 | + <!-- Views --> |
| 135 | + <script src="../modules/es/views/es.SurfaceView.js"></script> |
| 136 | + <script src="../modules/es/views/es.ToolbarView.js"></script> |
| 137 | + <script src="../modules/es/views/es.ContentView.js"></script> |
| 138 | + <script src="../modules/es/views/es.ContextView.js"></script> |
| 139 | + <script src="../modules/es/views/es.DocumentView.js"></script> |
| 140 | + <script src="../modules/es/views/es.ParagraphView.js"></script> |
| 141 | + <script src="../modules/es/views/es.PreView.js"></script> |
| 142 | + <script src="../modules/es/views/es.ListView.js"></script> |
| 143 | + <script src="../modules/es/views/es.MenuView.js"></script> |
| 144 | + <script src="../modules/es/views/es.ListItemView.js"></script> |
| 145 | + <script src="../modules/es/views/es.TableView.js"></script> |
| 146 | + <script src="../modules/es/views/es.TableRowView.js"></script> |
| 147 | + <script src="../modules/es/views/es.TableCellView.js"></script> |
| 148 | + <script src="../modules/es/views/es.HeadingView.js"></script> |
| 149 | + |
| 150 | + <!-- Demo --> |
| 151 | + <script src="../modules/sandbox/sandbox.js"></script> |
| 152 | + </body> |
| 153 | +</html> |
Property changes on: trunk/extensions/VisualEditor/demo/index.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 154 | + native |
Added: svn:mime-type |
2 | 155 | + text/plain |
Index: trunk/extensions/VisualEditor/modules/sandbox/base.php |
— | — | @@ -0,0 +1,128 @@ |
| 2 | +<!-- VisualEditor Sandbox --> |
| 3 | +<div id="es-docs" style="visibility: hidden"> |
| 4 | + <div id="es-docs-label">Example documents:</div> |
| 5 | + <ul id="es-docs-list" ></ul> |
| 6 | +</div> |
| 7 | +<div id="es-base" style="visibility: hidden"> |
| 8 | + <div id="es-toolbar-wrapper"> |
| 9 | + <div id="es-toolbar" class="es-toolbar"> |
| 10 | + <div id="es-modes" class="es-modes"> |
| 11 | + <div id="es-mode-wikitext" class="es-modes-button" title="<?php echo $modeWikitext ?>"></div> |
| 12 | + <div id="es-mode-json" class="es-modes-button" title="<?php echo $modeJson ?>"></div> |
| 13 | + <div id="es-mode-html" class="es-modes-button" title="<?php echo $modeHtml?>"></div> |
| 14 | + <div id="es-mode-render" class="es-modes-button" title="<?php echo $modeRender ?>"></div> |
| 15 | + <div id="es-mode-history" class="es-modes-button" title="<?php echo $modeHistory ?>"></div> |
| 16 | + <div id="es-mode-help" class="es-modes-button" title="<?php echo $modeHelp ?>"></div> |
| 17 | + </div> |
| 18 | + <div style="clear:both"></div> |
| 19 | + <div id="es-toolbar-shadow"></div> |
| 20 | + </div> |
| 21 | + </div> |
| 22 | + <div id="es-panes"> |
| 23 | + <div id="es-visual"> |
| 24 | + <div id="es-editor"></div> |
| 25 | + </div> |
| 26 | + <div id="es-panels"> |
| 27 | + <div id="es-panel-wikitext" class="es-panel es-code"></div> |
| 28 | + <div id="es-panel-json" class="es-panel es-code"></div> |
| 29 | + <div id="es-panel-html" class="es-panel es-code"></div> |
| 30 | + <div id="es-panel-render" class="es-panel es-render"></div> |
| 31 | + <div id="es-panel-history" class="es-panel es-code"></div> |
| 32 | + <div id="es-panel-help" class="es-panel"> |
| 33 | + <div class="es-help-title">Keyboard Shortcuts</div> |
| 34 | + <div class="es-help-shortcuts-title">Clipboard</div> |
| 35 | + <div class="es-help-shortcut"> |
| 36 | + <span class="es-help-keys"> |
| 37 | + <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
| 38 | + <span class="es-help-key">C</span> |
| 39 | + </span> |
| 40 | + Copy selected text |
| 41 | + </div> |
| 42 | + <div class="es-help-shortcut"> |
| 43 | + <span class="es-help-keys"> |
| 44 | + <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
| 45 | + <span class="es-help-key">X</span> |
| 46 | + </span> |
| 47 | + Cut selected text |
| 48 | + </div> |
| 49 | + <div class="es-help-shortcut"> |
| 50 | + <span class="es-help-keys"> |
| 51 | + <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
| 52 | + <span class="es-help-key">V</span> |
| 53 | + </span> |
| 54 | + Paste text at the cursor |
| 55 | + </div> |
| 56 | + <div class="es-help-shortcuts-title">History navigation</div> |
| 57 | + <div class="es-help-shortcut"> |
| 58 | + <span class="es-help-keys"> |
| 59 | + <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
| 60 | + <span class="es-help-key">Z</span> |
| 61 | + </span> |
| 62 | + Undo |
| 63 | + </div> |
| 64 | + <div class="es-help-shortcut"> |
| 65 | + <span class="es-help-keys"> |
| 66 | + <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
| 67 | + <span class="es-help-key">Y</span> |
| 68 | + </span> |
| 69 | + Redo |
| 70 | + </div> |
| 71 | + <div class="es-help-shortcut"> |
| 72 | + <span class="es-help-keys"> |
| 73 | + <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
| 74 | + <span class="es-help-key">⇧</span> + |
| 75 | + <span class="es-help-key">Z</span> |
| 76 | + </span> |
| 77 | + Redo |
| 78 | + </div> |
| 79 | + <div class="es-help-shortcuts-title">Formatting</div> |
| 80 | + <div class="es-help-shortcut"> |
| 81 | + <span class="es-help-keys"> |
| 82 | + <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
| 83 | + <span class="es-help-key">B</span> |
| 84 | + </span> |
| 85 | + Make selected text bold |
| 86 | + </div> |
| 87 | + <div class="es-help-shortcut"> |
| 88 | + <span class="es-help-keys"> |
| 89 | + <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
| 90 | + <span class="es-help-key">I</span> |
| 91 | + </span> |
| 92 | + Make selected text italic |
| 93 | + </div> |
| 94 | + <div class="es-help-shortcut"> |
| 95 | + <span class="es-help-keys"> |
| 96 | + <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
| 97 | + <span class="es-help-key">K</span> |
| 98 | + </span> |
| 99 | + Make selected text a link |
| 100 | + </div> |
| 101 | + <div class="es-help-shortcuts-title">Selection</div> |
| 102 | + <div class="es-help-shortcut"> |
| 103 | + <span class="es-help-keys"> |
| 104 | + <span class="es-help-key">⇧</span> + |
| 105 | + <span class="es-help-key">Arrow</span> |
| 106 | + </span> |
| 107 | + Adjust selection |
| 108 | + </div> |
| 109 | + <div class="es-help-shortcut"> |
| 110 | + <span class="es-help-keys"> |
| 111 | + <span class="es-help-key">Alt</span> + |
| 112 | + <span class="es-help-key">Arrow</span> |
| 113 | + </span> |
| 114 | + Move cursor by words or blocks |
| 115 | + </div> |
| 116 | + <div class="es-help-shortcut"> |
| 117 | + <span class="es-help-keys"> |
| 118 | + <span class="es-help-key">Alt</span> + |
| 119 | + <span class="es-help-key">⇧</span> + |
| 120 | + <span class="es-help-key">Arrow</span> |
| 121 | + </span> |
| 122 | + Adjust selection by words or blocks |
| 123 | + </div> |
| 124 | + </div> |
| 125 | + </div> |
| 126 | + <div style="clear:both"></div> |
| 127 | + </div> |
| 128 | +</div> |
| 129 | +<!-- /VisualEditor Sandbox --> |
Property changes on: trunk/extensions/VisualEditor/modules/sandbox/base.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 130 | + native |
Index: trunk/extensions/VisualEditor/modules/sandbox/sandbox.js |
— | — | @@ -740,4 +740,7 @@ |
741 | 741 | currentMode.update.call( currentMode ); |
742 | 742 | } |
743 | 743 | } ); |
| 744 | + |
| 745 | + $( '#es-docs' ).css( { 'visibility': 'visible' } ); |
| 746 | + $( '#es-base' ).css( { 'visibility': 'visible' } ); |
744 | 747 | } ); |