Index: trunk/extensions/UsabilityInitiative/css/wikiEditor.previewDialog.css |
— | — | @@ -0,0 +1,28 @@ |
| 2 | +#wikiEditor-0-preview-dialog .wikiEditor-ui-loading { |
| 3 | + background: #f3f3f3; |
| 4 | + z-index: 10; |
| 5 | + position: absolute; |
| 6 | + left: 0; |
| 7 | + text-align: center; |
| 8 | + height: 100%; |
| 9 | + width: 100%; |
| 10 | + overflow: hidden; |
| 11 | + border: none; |
| 12 | +} |
| 13 | +#wikiEditor-0-preview-dialog .wikiEditor-ui-loading span { |
| 14 | + display: block; |
| 15 | + height: 24px; |
| 16 | + width: 24px; |
| 17 | + background: url( ../images/wikiEditor/toolbar/loading.gif ) 0 0 no-repeat; |
| 18 | + text-indent: -9999px; |
| 19 | + margin: 50px auto; |
| 20 | +} |
| 21 | +.ui-dialog .ui-dialog-buttonpane { |
| 22 | + margin: 0 !important; |
| 23 | +} |
| 24 | +.wikiEditor-preview-dialog-contents { |
| 25 | + font-size: 0.9em !important; |
| 26 | +} |
| 27 | +.wikiEditor-preview-dialog-contents #firstHeading { |
| 28 | + font-size: 2.1em; |
| 29 | +} |
\ No newline at end of file |
Property changes on: trunk/extensions/UsabilityInitiative/css/wikiEditor.previewDialog.css |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 30 | + native |
Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -24,17 +24,18 @@ |
25 | 25 | array( 'src' => 'css/vector.footerCleanup.css', 'version' => 2 ), |
26 | 26 | array( 'src' => 'css/wikiEditor.css', 'version' => 14 ), |
27 | 27 | array( 'src' => 'css/wikiEditor.dialogs.css', 'version' => 29 ), |
28 | | - array( 'src' => 'css/wikiEditor.preview.css', 'version' => 1 ), |
| 28 | + array( 'src' => 'css/wikiEditor.preview.css', 'version' => 2 ), |
| 29 | + array( 'src' => 'css/wikiEditor.previewDialog.css', 'version' => 1 ), |
29 | 30 | array( 'src' => 'css/wikiEditor.toc.css', 'version' => 31 ), |
30 | 31 | array( 'src' => 'css/wikiEditor.toolbar.css', 'version' => 18 ), |
31 | 32 | array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ), |
32 | 33 | ), |
33 | 34 | 'combined' => array( |
34 | | - array( 'src' => 'css/combined.css', 'version' => 108 ), |
| 35 | + array( 'src' => 'css/combined.css', 'version' => 109 ), |
35 | 36 | array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ), |
36 | 37 | ), |
37 | 38 | 'minified' => array( |
38 | | - array( 'src' => 'css/combined.min.css', 'version' => 108 ), |
| 39 | + array( 'src' => 'css/combined.min.css', 'version' => 109 ), |
39 | 40 | array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ), |
40 | 41 | ), |
41 | 42 | ) |
— | — | @@ -69,9 +70,10 @@ |
70 | 71 | array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 195 ), |
71 | 72 | array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 53 ), |
72 | 73 | array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 70 ), |
73 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 26 ), |
| 74 | + array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 27 ), |
74 | 75 | array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 98 ), |
75 | 76 | array( 'src' => 'js/plugins/jquery.wikiEditor.preview.js', 'version' => 12 ), |
| 77 | + array( 'src' => 'js/plugins/jquery.wikiEditor.previewDialog.js', 'version' => 1 ), |
76 | 78 | array( 'src' => 'js/plugins/jquery.wikiEditor.templateEditor.js', 'version' => 77 ), |
77 | 79 | array( 'src' => 'js/plugins/jquery.wikiEditor.templates.js', 'version' => 1 ), |
78 | 80 | array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 5 ), |
— | — | @@ -80,10 +82,10 @@ |
81 | 83 | array( 'src' => 'js/thirdparty/contentCollector.js', 'version' => 2 ), |
82 | 84 | ), |
83 | 85 | 'combined' => array( |
84 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 443 ), |
| 86 | + array( 'src' => 'js/plugins.combined.js', 'version' => 444 ), |
85 | 87 | ), |
86 | 88 | 'minified' => array( |
87 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 449 ), |
| 89 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 450 ), |
88 | 90 | ), |
89 | 91 | ), |
90 | 92 | ); |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.php |
— | — | @@ -24,6 +24,7 @@ |
25 | 25 | 'toolbar' => array( 'global' => false, 'user' => true ), // Order is significant: makes beta prefs appear before labs prefs |
26 | 26 | 'highlight' => array( 'global' => false, 'user' => true ), |
27 | 27 | 'preview' => array( 'global' => false, 'user' => true ), |
| 28 | + 'previewDialog' => array( 'global' => true, 'user' => true ), |
28 | 29 | 'publish' => array( 'global' => false, 'user' => true ), |
29 | 30 | 'toc' => array( 'global' => false, 'user' => true ), |
30 | 31 | 'templateEditor' => array( 'global' => false, 'user' => true ), |
— | — | @@ -56,6 +57,7 @@ |
57 | 58 | $wgExtensionMessagesFiles['WikiEditor'] = dirname( __FILE__ ) . '/WikiEditor.i18n.php'; |
58 | 59 | $wgExtensionMessagesFiles['WikiEditorHighlight'] = dirname( __FILE__ ) . '/Modules/Highlight/Highlight.i18n.php'; |
59 | 60 | $wgExtensionMessagesFiles['WikiEditorPreview'] = dirname( __FILE__ ) . '/Modules/Preview/Preview.i18n.php'; |
| 61 | +$wgExtensionMessagesFiles['WikiEditorPreviewDialog'] = dirname( __FILE__ ) . '/Modules/PreviewDialog/PreviewDialog.i18n.php'; |
60 | 62 | $wgExtensionMessagesFiles['WikiEditorPublish'] = dirname( __FILE__ ) . '/Modules/Publish/Publish.i18n.php'; |
61 | 63 | $wgExtensionMessagesFiles['WikiEditorToc'] = dirname( __FILE__ ) . '/Modules/Toc/Toc.i18n.php'; |
62 | 64 | $wgExtensionMessagesFiles['WikiEditorToolbar'] = dirname( __FILE__ ) . '/Modules/Toolbar/Toolbar.i18n.php'; |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.hooks.php |
— | — | @@ -14,6 +14,7 @@ |
15 | 15 | 'raw' => array( |
16 | 16 | array( 'src' => 'Modules/Highlight/Highlight.js', 'version' => 5 ), |
17 | 17 | array( 'src' => 'Modules/Preview/Preview.js', 'version' => 8 ), |
| 18 | + array( 'src' => 'Modules/PreviewDialog/PreviewDialog.js', 'version' => 2 ), |
18 | 19 | array( 'src' => 'Modules/Publish/Publish.js', 'version' => 6 ), |
19 | 20 | array( 'src' => 'Modules/Toc/Toc.js', 'version' => 7 ), |
20 | 21 | array( 'src' => 'Modules/Toolbar/Toolbar.js', 'version' => 96 ), |
— | — | @@ -22,10 +23,10 @@ |
23 | 24 | array( 'src' => 'Modules/AddMediaWizard/AddMediaWizard.js', 'version' => 6 ), |
24 | 25 | ), |
25 | 26 | 'combined' => array( |
26 | | - array( 'src' => 'WikiEditor.combined.js', 'version' => 106 ), |
| 27 | + array( 'src' => 'WikiEditor.combined.js', 'version' => 108 ), |
27 | 28 | ), |
28 | 29 | 'minified' => array( |
29 | | - array( 'src' => 'WikiEditor.combined.min.js', 'version' => 106 ), |
| 30 | + array( 'src' => 'WikiEditor.combined.min.js', 'version' => 108 ), |
30 | 31 | ), |
31 | 32 | ); |
32 | 33 | static $messages = array( |
— | — | @@ -113,6 +114,24 @@ |
114 | 115 | 'wikieditor-preview-loading', |
115 | 116 | ), |
116 | 117 | ), |
| 118 | + 'previewDialog' => array( |
| 119 | + 'i18n' => 'WikiEditorPreviewDialog', |
| 120 | + 'preferences' => array( |
| 121 | + 'enable' => array( |
| 122 | + 'key' => 'wikieditor-previewDialog', |
| 123 | + 'ui' => array( |
| 124 | + 'type' => 'toggle', |
| 125 | + 'label-message' => 'wikieditor-previewDialog-preference', |
| 126 | + 'section' => 'editing/labs', |
| 127 | + ), |
| 128 | + ), |
| 129 | + ), |
| 130 | + 'messages' => array( |
| 131 | + 'wikieditor-previewDialog-preference', |
| 132 | + 'wikieditor-previewDialog-tab', |
| 133 | + 'wikieditor-previewDialog-loading', |
| 134 | + ), |
| 135 | + ), |
117 | 136 | 'publish' => array( |
118 | 137 | 'i18n' => 'WikiEditorPublish', |
119 | 138 | 'preferences' => array( |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/Modules/PreviewDialog/PreviewDialog.i18n.php |
— | — | @@ -0,0 +1,733 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Internationalisation for the Preview module of the Usability Initiative wikiEditor extension |
| 5 | + * |
| 6 | + * @file |
| 7 | + * @ingroup Extensions |
| 8 | + */ |
| 9 | + |
| 10 | +$messages = array(); |
| 11 | + |
| 12 | +/** English |
| 13 | + * @author Roan Kattouw |
| 14 | + */ |
| 15 | +$messages['en'] = array( |
| 16 | + 'wikieditor-previewDialog-preference' => 'Enable preview dialog', |
| 17 | + 'wikieditor-previewDialog-tab' => 'Preview', |
| 18 | + 'wikieditor-previewDialog-loading' => 'Loading...', |
| 19 | +); |
| 20 | + |
| 21 | +/** Message documentation (Message documentation) |
| 22 | + * @author EugeneZelenko |
| 23 | + * @author Fryed-peach |
| 24 | + * @author Hamilton Abreu |
| 25 | + * @author Lloffiwr |
| 26 | + * @author Mormegil |
| 27 | + * @author Roan Kattouw |
| 28 | + */ |
| 29 | +$messages['qqq'] = array( |
| 30 | + 'wikieditor-previewDialog-tab' => 'Caption of the tab containing the preview |
| 31 | + |
| 32 | +{{Identical|Preview}}', |
| 33 | + 'wikieditor-previewDialog-loading' => 'Alt text for spinner displayed while preview is being loaded |
| 34 | +{{Identical|Loading}}', |
| 35 | +); |
| 36 | + |
| 37 | +/** Afrikaans (Afrikaans) |
| 38 | + * @author Naudefj |
| 39 | + */ |
| 40 | +$messages['af'] = array( |
| 41 | + 'wikieditor-previewDialog-tab' => 'Voorskou', |
| 42 | + 'wikieditor-previewDialog-loading' => 'Besig om te laai...', |
| 43 | +); |
| 44 | + |
| 45 | +/** Gheg Albanian (Gegë) |
| 46 | + * @author Mdupont |
| 47 | + */ |
| 48 | +$messages['aln'] = array( |
| 49 | + 'wikieditor-previewDialog-tab' => 'Preview', |
| 50 | + 'wikieditor-previewDialog-loading' => 'Loading ...', |
| 51 | +); |
| 52 | + |
| 53 | +/** Arabic (العربية) |
| 54 | + * @author Meno25 |
| 55 | + * @author OsamaK |
| 56 | + */ |
| 57 | +$messages['ar'] = array( |
| 58 | + 'wikieditor-previewDialog-tab' => 'عاين', |
| 59 | + 'wikieditor-previewDialog-loading' => 'يُحمّل...', |
| 60 | +); |
| 61 | + |
| 62 | +/** Egyptian Spoken Arabic (مصرى) |
| 63 | + * @author Dudi |
| 64 | + * @author Meno25 |
| 65 | + */ |
| 66 | +$messages['arz'] = array( |
| 67 | + 'wikieditor-previewDialog-tab' => 'پروڤه', |
| 68 | + 'wikieditor-previewDialog-loading' => 'بيلوّد...', |
| 69 | +); |
| 70 | + |
| 71 | +/** Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца)) |
| 72 | + * @author EugeneZelenko |
| 73 | + * @author Jim-by |
| 74 | + */ |
| 75 | +$messages['be-tarask'] = array( |
| 76 | + 'wikieditor-previewDialog-tab' => 'Папярэдні прагляд', |
| 77 | + 'wikieditor-previewDialog-loading' => 'Загрузка…', |
| 78 | +); |
| 79 | + |
| 80 | +/** Bulgarian (Български) |
| 81 | + * @author DCLXVI |
| 82 | + * @author Spiritia |
| 83 | + */ |
| 84 | +$messages['bg'] = array( |
| 85 | + 'wikieditor-previewDialog-tab' => 'Предварителен преглед', |
| 86 | + 'wikieditor-previewDialog-loading' => 'Зареждане...', |
| 87 | +); |
| 88 | + |
| 89 | +/** Bengali (বাংলা) |
| 90 | + * @author Bellayet |
| 91 | + */ |
| 92 | +$messages['bn'] = array( |
| 93 | + 'wikieditor-previewDialog-tab' => 'প্রাকদর্শন', |
| 94 | + 'wikieditor-previewDialog-loading' => 'লোডিং...', |
| 95 | +); |
| 96 | + |
| 97 | +/** Breton (Brezhoneg) |
| 98 | + * @author Fohanno |
| 99 | + * @author Fulup |
| 100 | + */ |
| 101 | +$messages['br'] = array( |
| 102 | + 'wikieditor-previewDialog-tab' => 'Rakwelet', |
| 103 | + 'wikieditor-previewDialog-loading' => 'O kargañ...', |
| 104 | +); |
| 105 | + |
| 106 | +/** Bosnian (Bosanski) |
| 107 | + * @author CERminator |
| 108 | + */ |
| 109 | +$messages['bs'] = array( |
| 110 | + 'wikieditor-previewDialog-tab' => 'Pregled', |
| 111 | + 'wikieditor-previewDialog-loading' => 'Učitavam...', |
| 112 | +); |
| 113 | + |
| 114 | +/** Catalan (Català) |
| 115 | + * @author Paucabot |
| 116 | + * @author Solde |
| 117 | + * @author Vriullop |
| 118 | + */ |
| 119 | +$messages['ca'] = array( |
| 120 | + 'wikieditor-previewDialog-tab' => 'Previsualització', |
| 121 | + 'wikieditor-previewDialog-loading' => 'Carregant ...', |
| 122 | +); |
| 123 | + |
| 124 | +/** Chechen (Нохчийн) |
| 125 | + * @author Sasan700 |
| 126 | + */ |
| 127 | +$messages['ce'] = array( |
| 128 | + 'wikieditor-previewDialog-tab' => 'Хьалха муха ю хьажа', |
| 129 | + 'wikieditor-previewDialog-loading' => 'Чуйолуш…', |
| 130 | +); |
| 131 | + |
| 132 | +/** Czech (Česky) |
| 133 | + * @author Mormegil |
| 134 | + */ |
| 135 | +$messages['cs'] = array( |
| 136 | + 'wikieditor-previewDialog-tab' => 'Náhled', |
| 137 | + 'wikieditor-previewDialog-loading' => 'Načítá se…', |
| 138 | +); |
| 139 | + |
| 140 | +/** Kashubian (Kaszëbsczi) |
| 141 | + * @author Kuvaly |
| 142 | + */ |
| 143 | +$messages['csb'] = array( |
| 144 | + 'wikieditor-previewDialog-loading' => 'Ladowanié...', |
| 145 | +); |
| 146 | + |
| 147 | +/** Welsh (Cymraeg) |
| 148 | + * @author Lloffiwr |
| 149 | + */ |
| 150 | +$messages['cy'] = array( |
| 151 | + 'wikieditor-previewDialog-tab' => 'Rhagolwg', |
| 152 | + 'wikieditor-previewDialog-loading' => "Wrthi'n llwytho...", |
| 153 | +); |
| 154 | + |
| 155 | +/** Danish (Dansk) |
| 156 | + * @author Sarrus |
| 157 | + */ |
| 158 | +$messages['da'] = array( |
| 159 | + 'wikieditor-previewDialog-tab' => 'Forhåndsvisning', |
| 160 | +); |
| 161 | + |
| 162 | +/** German (Deutsch) |
| 163 | + * @author Als-Holder |
| 164 | + * @author DaSch |
| 165 | + * @author Lyzzy |
| 166 | + * @author MF-Warburg |
| 167 | + */ |
| 168 | +$messages['de'] = array( |
| 169 | + 'wikieditor-previewDialog-tab' => 'Vorschau', |
| 170 | + 'wikieditor-previewDialog-loading' => 'lädt …', |
| 171 | +); |
| 172 | + |
| 173 | +/** Zazaki (Zazaki) |
| 174 | + * @author Mirzali |
| 175 | + * @author Xoser |
| 176 | + */ |
| 177 | +$messages['diq'] = array( |
| 178 | + 'wikieditor-previewDialog-tab' => 'Verqeyd', |
| 179 | + 'wikieditor-previewDialog-loading' => 'Ho bar keno...', |
| 180 | +); |
| 181 | + |
| 182 | +/** Lower Sorbian (Dolnoserbski) |
| 183 | + * @author Michawiki |
| 184 | + */ |
| 185 | +$messages['dsb'] = array( |
| 186 | + 'wikieditor-previewDialog-tab' => 'Pśeglěd', |
| 187 | + 'wikieditor-previewDialog-loading' => 'Zacytujo se...', |
| 188 | +); |
| 189 | + |
| 190 | +/** Greek (Ελληνικά) |
| 191 | + * @author Dead3y3 |
| 192 | + * @author ZaDiak |
| 193 | + */ |
| 194 | +$messages['el'] = array( |
| 195 | + 'wikieditor-previewDialog-tab' => 'Προεπισκόπηση', |
| 196 | + 'wikieditor-previewDialog-loading' => 'Φόρτωση...', |
| 197 | +); |
| 198 | + |
| 199 | +/** Esperanto (Esperanto) |
| 200 | + * @author Lucas |
| 201 | + * @author Marcos |
| 202 | + * @author Yekrats |
| 203 | + * @author Ziko |
| 204 | + */ |
| 205 | +$messages['eo'] = array( |
| 206 | + 'wikieditor-previewDialog-tab' => 'Antaŭvido', |
| 207 | + 'wikieditor-previewDialog-loading' => 'Ŝargante...', |
| 208 | +); |
| 209 | + |
| 210 | +/** Spanish (Español) |
| 211 | + * @author Crazymadlover |
| 212 | + * @author PerroVerd |
| 213 | + * @author Translationista |
| 214 | + */ |
| 215 | +$messages['es'] = array( |
| 216 | + 'wikieditor-previewDialog-tab' => 'Previsualizar', |
| 217 | + 'wikieditor-previewDialog-loading' => 'Cargando...', |
| 218 | +); |
| 219 | + |
| 220 | +/** Estonian (Eesti) |
| 221 | + * @author Avjoska |
| 222 | + * @author Pikne |
| 223 | + */ |
| 224 | +$messages['et'] = array( |
| 225 | + 'wikieditor-previewDialog-tab' => 'Eelvaade', |
| 226 | + 'wikieditor-previewDialog-loading' => 'Laadimine...', |
| 227 | +); |
| 228 | + |
| 229 | +/** Basque (Euskara) |
| 230 | + * @author An13sa |
| 231 | + */ |
| 232 | +$messages['eu'] = array( |
| 233 | + 'wikieditor-previewDialog-tab' => 'Aurreikuspena', |
| 234 | + 'wikieditor-previewDialog-loading' => 'Kargatzen...', |
| 235 | +); |
| 236 | + |
| 237 | +/** Persian (فارسی) |
| 238 | + * @author Ebraminio |
| 239 | + */ |
| 240 | +$messages['fa'] = array( |
| 241 | + 'wikieditor-previewDialog-tab' => 'پیشنمایش', |
| 242 | + 'wikieditor-previewDialog-loading' => 'در حال بارگذاری...', |
| 243 | +); |
| 244 | + |
| 245 | +/** Finnish (Suomi) |
| 246 | + * @author Crt |
| 247 | + * @author Str4nd |
| 248 | + * @author ZeiP |
| 249 | + */ |
| 250 | +$messages['fi'] = array( |
| 251 | + 'wikieditor-previewDialog-tab' => 'Esikatselu', |
| 252 | + 'wikieditor-previewDialog-loading' => 'Ladataan…', |
| 253 | +); |
| 254 | + |
| 255 | +/** French (Français) |
| 256 | + * @author IAlex |
| 257 | + * @author Jean-Frédéric |
| 258 | + */ |
| 259 | +$messages['fr'] = array( |
| 260 | + 'wikieditor-previewDialog-tab' => 'Prévisualisation', |
| 261 | + 'wikieditor-previewDialog-loading' => 'Chargement...', |
| 262 | +); |
| 263 | + |
| 264 | +/** Franco-Provençal (Arpetan) |
| 265 | + * @author ChrisPtDe |
| 266 | + */ |
| 267 | +$messages['frp'] = array( |
| 268 | + 'wikieditor-previewDialog-tab' => 'Prèvisualisacion', |
| 269 | + 'wikieditor-previewDialog-loading' => 'Chargement...', |
| 270 | +); |
| 271 | + |
| 272 | +/** Friulian (Furlan) |
| 273 | + * @author Klenje |
| 274 | + */ |
| 275 | +$messages['fur'] = array( |
| 276 | + 'wikieditor-previewDialog-tab' => 'Anteprime', |
| 277 | + 'wikieditor-previewDialog-loading' => 'Daûr a cjamâ…', |
| 278 | +); |
| 279 | + |
| 280 | +/** Galician (Galego) |
| 281 | + * @author Toliño |
| 282 | + */ |
| 283 | +$messages['gl'] = array( |
| 284 | + 'wikieditor-previewDialog-tab' => 'Vista previa', |
| 285 | + 'wikieditor-previewDialog-loading' => 'Cargando...', |
| 286 | +); |
| 287 | + |
| 288 | +/** Swiss German (Alemannisch) |
| 289 | + * @author Als-Holder |
| 290 | + */ |
| 291 | +$messages['gsw'] = array( |
| 292 | + 'wikieditor-previewDialog-tab' => 'Vorschau', |
| 293 | + 'wikieditor-previewDialog-loading' => 'Am Lade ...', |
| 294 | +); |
| 295 | + |
| 296 | +/** Hebrew (עברית) |
| 297 | + * @author Amire80 |
| 298 | + * @author YaronSh |
| 299 | + */ |
| 300 | +$messages['he'] = array( |
| 301 | + 'wikieditor-previewDialog-tab' => 'תצוגה מקדימה', |
| 302 | + 'wikieditor-previewDialog-loading' => 'נטען...', |
| 303 | +); |
| 304 | + |
| 305 | +/** Upper Sorbian (Hornjoserbsce) |
| 306 | + * @author Michawiki |
| 307 | + */ |
| 308 | +$messages['hsb'] = array( |
| 309 | + 'wikieditor-previewDialog-tab' => 'Přehlad', |
| 310 | + 'wikieditor-previewDialog-loading' => 'Začituje so...', |
| 311 | +); |
| 312 | + |
| 313 | +/** Hungarian (Magyar) |
| 314 | + * @author Dani |
| 315 | + * @author Glanthor Reviol |
| 316 | + */ |
| 317 | +$messages['hu'] = array( |
| 318 | + 'wikieditor-previewDialog-tab' => 'Előnézet', |
| 319 | + 'wikieditor-previewDialog-loading' => 'Betöltés…', |
| 320 | +); |
| 321 | + |
| 322 | +/** Armenian (Հայերեն) |
| 323 | + * @author Xelgen |
| 324 | + */ |
| 325 | +$messages['hy'] = array( |
| 326 | + 'wikieditor-previewDialog-tab' => 'Նախադիտել', |
| 327 | + 'wikieditor-previewDialog-loading' => 'Բեռնում…', |
| 328 | +); |
| 329 | + |
| 330 | +/** Interlingua (Interlingua) |
| 331 | + * @author McDutchie |
| 332 | + */ |
| 333 | +$messages['ia'] = array( |
| 334 | + 'wikieditor-previewDialog-tab' => 'Previsualisation', |
| 335 | + 'wikieditor-previewDialog-loading' => 'Cargamento...', |
| 336 | +); |
| 337 | + |
| 338 | +/** Indonesian (Bahasa Indonesia) |
| 339 | + * @author IvanLanin |
| 340 | + */ |
| 341 | +$messages['id'] = array( |
| 342 | + 'wikieditor-previewDialog-tab' => 'Pratayang', |
| 343 | + 'wikieditor-previewDialog-loading' => 'Memuat...', |
| 344 | +); |
| 345 | + |
| 346 | +/** Italian (Italiano) |
| 347 | + * @author Aushulz |
| 348 | + * @author F. Cosoleto |
| 349 | + * @author Una giornata uggiosa '94 |
| 350 | + */ |
| 351 | +$messages['it'] = array( |
| 352 | + 'wikieditor-previewDialog-tab' => 'Anteprima', |
| 353 | + 'wikieditor-previewDialog-loading' => 'Caricamento...', |
| 354 | +); |
| 355 | + |
| 356 | +/** Japanese (日本語) |
| 357 | + * @author Fryed-peach |
| 358 | + * @author Hosiryuhosi |
| 359 | + */ |
| 360 | +$messages['ja'] = array( |
| 361 | + 'wikieditor-previewDialog-tab' => 'プレビュー', |
| 362 | + 'wikieditor-previewDialog-loading' => '読み込み中…', |
| 363 | +); |
| 364 | + |
| 365 | +/** Georgian (ქართული) |
| 366 | + * @author BRUTE |
| 367 | + * @author გიორგიმელა |
| 368 | + */ |
| 369 | +$messages['ka'] = array( |
| 370 | + 'wikieditor-previewDialog-tab' => 'წინასწარ', |
| 371 | + 'wikieditor-previewDialog-loading' => 'იტვირთება...', |
| 372 | +); |
| 373 | + |
| 374 | +/** Kannada (ಕನ್ನಡ) |
| 375 | + * @author Nayvik |
| 376 | + */ |
| 377 | +$messages['kn'] = array( |
| 378 | + 'wikieditor-previewDialog-tab' => 'ಮುನ್ನೋಟ', |
| 379 | +); |
| 380 | + |
| 381 | +/** Korean (한국어) |
| 382 | + * @author Devunt |
| 383 | + * @author Kwj2772 |
| 384 | + */ |
| 385 | +$messages['ko'] = array( |
| 386 | + 'wikieditor-previewDialog-tab' => '미리 보기', |
| 387 | + 'wikieditor-previewDialog-loading' => '불러오는 중...', |
| 388 | +); |
| 389 | + |
| 390 | +/** Colognian (Ripoarisch) |
| 391 | + * @author Purodha |
| 392 | + */ |
| 393 | +$messages['ksh'] = array( |
| 394 | + 'wikieditor-previewDialog-tab' => '{{int:preview}}', |
| 395 | + 'wikieditor-previewDialog-loading' => 'Ben aam Laade{{int:ellipsis}}', |
| 396 | +); |
| 397 | + |
| 398 | +/** Latin (Latina) |
| 399 | + * @author UV |
| 400 | + */ |
| 401 | +$messages['la'] = array( |
| 402 | + 'wikieditor-previewDialog-tab' => 'Praevisum', |
| 403 | + 'wikieditor-previewDialog-loading' => 'Depromens...', |
| 404 | +); |
| 405 | + |
| 406 | +/** Luxembourgish (Lëtzebuergesch) |
| 407 | + * @author Robby |
| 408 | + */ |
| 409 | +$messages['lb'] = array( |
| 410 | + 'wikieditor-previewDialog-tab' => 'Kucken ouni ze späicheren', |
| 411 | + 'wikieditor-previewDialog-loading' => 'Lueden...', |
| 412 | +); |
| 413 | + |
| 414 | +/** Latvian (Latviešu) |
| 415 | + * @author Marozols |
| 416 | + * @author Papuass |
| 417 | + */ |
| 418 | +$messages['lv'] = array( |
| 419 | + 'wikieditor-previewDialog-tab' => 'Pirmskats', |
| 420 | + 'wikieditor-previewDialog-loading' => 'Ielādē…', |
| 421 | +); |
| 422 | + |
| 423 | +/** Macedonian (Македонски) |
| 424 | + * @author Bjankuloski06 |
| 425 | + */ |
| 426 | +$messages['mk'] = array( |
| 427 | + 'wikieditor-previewDialog-tab' => 'Преглед', |
| 428 | + 'wikieditor-previewDialog-loading' => 'Вчитувам...', |
| 429 | +); |
| 430 | + |
| 431 | +/** Malayalam (മലയാളം) |
| 432 | + * @author Praveenp |
| 433 | + */ |
| 434 | +$messages['ml'] = array( |
| 435 | + 'wikieditor-previewDialog-tab' => 'എങ്ങനെയുണ്ടെന്നു കാണുക', |
| 436 | + 'wikieditor-previewDialog-loading' => 'ശേഖരിക്കുന്നു...', |
| 437 | +); |
| 438 | + |
| 439 | +/** Malay (Bahasa Melayu) |
| 440 | + * @author Diagramma Della Verita |
| 441 | + */ |
| 442 | +$messages['ms'] = array( |
| 443 | + 'wikieditor-previewDialog-tab' => 'Pratonton', |
| 444 | + 'wikieditor-previewDialog-loading' => 'Sedang dimuat turun...', |
| 445 | +); |
| 446 | + |
| 447 | +/** Maltese (Malti) |
| 448 | + * @author Chrisportelli |
| 449 | + */ |
| 450 | +$messages['mt'] = array( |
| 451 | + 'wikieditor-previewDialog-tab' => 'Dehra proviżorja', |
| 452 | + 'wikieditor-previewDialog-loading' => "Tiela'...", |
| 453 | +); |
| 454 | + |
| 455 | +/** Dutch (Nederlands) |
| 456 | + * @author Siebrand |
| 457 | + */ |
| 458 | +$messages['nl'] = array( |
| 459 | + 'wikieditor-previewDialog-tab' => 'Voorvertoning', |
| 460 | + 'wikieditor-previewDialog-loading' => 'Bezig met laden...', |
| 461 | +); |
| 462 | + |
| 463 | +/** Norwegian Nynorsk (Norsk (nynorsk)) |
| 464 | + * @author Eirik |
| 465 | + * @author Gunnernett |
| 466 | + * @author Harald Khan |
| 467 | + */ |
| 468 | +$messages['nn'] = array( |
| 469 | + 'wikieditor-previewDialog-tab' => 'Førehandsvising', |
| 470 | + 'wikieditor-previewDialog-loading' => 'Lastar…', |
| 471 | +); |
| 472 | + |
| 473 | +/** Norwegian (bokmål) (Norsk (bokmål)) |
| 474 | + * @author Jon Harald Søby |
| 475 | + * @author Laaknor |
| 476 | + */ |
| 477 | +$messages['no'] = array( |
| 478 | + 'wikieditor-previewDialog-tab' => 'Forhåndsvisning', |
| 479 | + 'wikieditor-previewDialog-loading' => 'Laster…', |
| 480 | +); |
| 481 | + |
| 482 | +/** Occitan (Occitan) |
| 483 | + * @author Cedric31 |
| 484 | + */ |
| 485 | +$messages['oc'] = array( |
| 486 | + 'wikieditor-previewDialog-tab' => 'Previsualizacion', |
| 487 | + 'wikieditor-previewDialog-loading' => 'Cargament...', |
| 488 | +); |
| 489 | + |
| 490 | +/** Deitsch (Deitsch) |
| 491 | + * @author Xqt |
| 492 | + */ |
| 493 | +$messages['pdc'] = array( |
| 494 | + 'wikieditor-previewDialog-loading' => 'am laade…', |
| 495 | +); |
| 496 | + |
| 497 | +/** Polish (Polski) |
| 498 | + * @author Sp5uhe |
| 499 | + * @author Wpedzich |
| 500 | + */ |
| 501 | +$messages['pl'] = array( |
| 502 | + 'wikieditor-previewDialog-tab' => 'Podgląd', |
| 503 | + 'wikieditor-previewDialog-loading' => 'Wczytywanie...', |
| 504 | +); |
| 505 | + |
| 506 | +/** Piedmontese (Piemontèis) |
| 507 | + * @author Borichèt |
| 508 | + * @author Dragonòt |
| 509 | + */ |
| 510 | +$messages['pms'] = array( |
| 511 | + 'wikieditor-previewDialog-tab' => 'Previsualisassion', |
| 512 | + 'wikieditor-previewDialog-loading' => 'A caria ...', |
| 513 | +); |
| 514 | + |
| 515 | +/** Pashto (پښتو) |
| 516 | + * @author Ahmed-Najib-Biabani-Ibrahimkhel |
| 517 | + */ |
| 518 | +$messages['ps'] = array( |
| 519 | + 'wikieditor-previewDialog-tab' => 'مخليدنه', |
| 520 | +); |
| 521 | + |
| 522 | +/** Portuguese (Português) |
| 523 | + * @author Hamilton Abreu |
| 524 | + * @author Malafaya |
| 525 | + */ |
| 526 | +$messages['pt'] = array( |
| 527 | + 'wikieditor-previewDialog-tab' => 'Antevisão', |
| 528 | + 'wikieditor-previewDialog-loading' => 'A carregar...', |
| 529 | +); |
| 530 | + |
| 531 | +/** Brazilian Portuguese (Português do Brasil) |
| 532 | + * @author 555 |
| 533 | + * @author Hamilton Abreu |
| 534 | + * @author Heldergeovane |
| 535 | + * @author Luckas Blade |
| 536 | + */ |
| 537 | +$messages['pt-br'] = array( |
| 538 | + 'wikieditor-previewDialog-tab' => 'Previsão', |
| 539 | + 'wikieditor-previewDialog-loading' => 'Carregando...', |
| 540 | +); |
| 541 | + |
| 542 | +/** Quechua (Runa Simi) |
| 543 | + * @author AlimanRuna |
| 544 | + */ |
| 545 | +$messages['qu'] = array( |
| 546 | + 'wikieditor-previewDialog-tab' => 'Ñawpaqta qhawallay', |
| 547 | + 'wikieditor-previewDialog-loading' => 'Chaqnamuspa…', |
| 548 | +); |
| 549 | + |
| 550 | +/** Romanian (Română) |
| 551 | + * @author Firilacroco |
| 552 | + * @author Minisarm |
| 553 | + */ |
| 554 | +$messages['ro'] = array( |
| 555 | + 'wikieditor-previewDialog-tab' => 'Previzualizare', |
| 556 | + 'wikieditor-previewDialog-loading' => 'Încărcare...', |
| 557 | +); |
| 558 | + |
| 559 | +/** Tarandíne (Tarandíne) |
| 560 | + * @author Joetaras |
| 561 | + */ |
| 562 | +$messages['roa-tara'] = array( |
| 563 | + 'wikieditor-previewDialog-tab' => 'Andeprime', |
| 564 | + 'wikieditor-previewDialog-loading' => 'Carecamende...', |
| 565 | +); |
| 566 | + |
| 567 | +/** Russian (Русский) |
| 568 | + * @author Александр Сигачёв |
| 569 | + */ |
| 570 | +$messages['ru'] = array( |
| 571 | + 'wikieditor-previewDialog-tab' => 'Предпросмотр', |
| 572 | + 'wikieditor-previewDialog-loading' => 'Загрузка…', |
| 573 | +); |
| 574 | + |
| 575 | +/** Yakut (Саха тыла) |
| 576 | + * @author HalanTul |
| 577 | + */ |
| 578 | +$messages['sah'] = array( |
| 579 | + 'wikieditor-previewDialog-tab' => 'Инники көрүү', |
| 580 | + 'wikieditor-previewDialog-loading' => 'Хачайдана турар...', |
| 581 | +); |
| 582 | + |
| 583 | +/** Sinhala (සිංහල) |
| 584 | + * @author Calcey |
| 585 | + */ |
| 586 | +$messages['si'] = array( |
| 587 | + 'wikieditor-previewDialog-tab' => 'පෙර දසුන', |
| 588 | + 'wikieditor-previewDialog-loading' => 'ප්රවේශනය වෙමින් පවතී...', |
| 589 | +); |
| 590 | + |
| 591 | +/** Slovak (Slovenčina) |
| 592 | + * @author Helix84 |
| 593 | + */ |
| 594 | +$messages['sk'] = array( |
| 595 | + 'wikieditor-previewDialog-tab' => 'Náhľad', |
| 596 | + 'wikieditor-previewDialog-loading' => 'Načítava sa...', |
| 597 | +); |
| 598 | + |
| 599 | +/** Slovenian (Slovenščina) |
| 600 | + * @author Dbc334 |
| 601 | + */ |
| 602 | +$messages['sl'] = array( |
| 603 | + 'wikieditor-previewDialog-tab' => 'Predogled', |
| 604 | + 'wikieditor-previewDialog-loading' => 'Nalaganje ...', |
| 605 | +); |
| 606 | + |
| 607 | +/** Serbian Cyrillic ekavian (Српски (ћирилица)) |
| 608 | + * @author Михајло Анђелковић |
| 609 | + */ |
| 610 | +$messages['sr-ec'] = array( |
| 611 | + 'wikieditor-previewDialog-loading' => 'Учитавање...', |
| 612 | +); |
| 613 | + |
| 614 | +/** Serbian Latin ekavian (Srpski (latinica)) */ |
| 615 | +$messages['sr-el'] = array( |
| 616 | + 'wikieditor-previewDialog-loading' => 'Učitavanje...', |
| 617 | +); |
| 618 | + |
| 619 | +/** Swedish (Svenska) |
| 620 | + * @author Boivie |
| 621 | + */ |
| 622 | +$messages['sv'] = array( |
| 623 | + 'wikieditor-previewDialog-tab' => 'Förhandsgranska', |
| 624 | + 'wikieditor-previewDialog-loading' => 'Laddar...', |
| 625 | +); |
| 626 | + |
| 627 | +/** Swahili (Kiswahili) |
| 628 | + * @author Lloffiwr |
| 629 | + */ |
| 630 | +$messages['sw'] = array( |
| 631 | + 'wikieditor-previewDialog-tab' => 'Hakiki', |
| 632 | + 'wikieditor-previewDialog-loading' => 'Inapakiwa...', |
| 633 | +); |
| 634 | + |
| 635 | +/** Telugu (తెలుగు) |
| 636 | + * @author Veeven |
| 637 | + */ |
| 638 | +$messages['te'] = array( |
| 639 | + 'wikieditor-previewDialog-tab' => 'మునుజూపు', |
| 640 | + 'wikieditor-previewDialog-loading' => 'లోడవుతోంది...', |
| 641 | +); |
| 642 | + |
| 643 | +/** Thai (ไทย) |
| 644 | + * @author Octahedron80 |
| 645 | + * @author Woraponboonkerd |
| 646 | + */ |
| 647 | +$messages['th'] = array( |
| 648 | + 'wikieditor-previewDialog-tab' => 'แสดงตัวอย่าง', |
| 649 | + 'wikieditor-previewDialog-loading' => 'กำลังโหลด...', |
| 650 | +); |
| 651 | + |
| 652 | +/** Turkmen (Türkmençe) |
| 653 | + * @author Hanberke |
| 654 | + */ |
| 655 | +$messages['tk'] = array( |
| 656 | + 'wikieditor-previewDialog-tab' => 'Deslapky syn', |
| 657 | + 'wikieditor-previewDialog-loading' => 'Ýüklenilýär...', |
| 658 | +); |
| 659 | + |
| 660 | +/** Tagalog (Tagalog) |
| 661 | + * @author AnakngAraw |
| 662 | + */ |
| 663 | +$messages['tl'] = array( |
| 664 | + 'wikieditor-previewDialog-tab' => 'Paunang tanaw', |
| 665 | + 'wikieditor-previewDialog-loading' => 'Ikinakarga...', |
| 666 | +); |
| 667 | + |
| 668 | +/** Turkish (Türkçe) |
| 669 | + * @author Joseph |
| 670 | + * @author Vito Genovese |
| 671 | + */ |
| 672 | +$messages['tr'] = array( |
| 673 | + 'wikieditor-previewDialog-tab' => 'Önizleme', |
| 674 | + 'wikieditor-previewDialog-loading' => 'Yükleniyor...', |
| 675 | +); |
| 676 | + |
| 677 | +/** Ukrainian (Українська) |
| 678 | + * @author NickK |
| 679 | + * @author Prima klasy4na |
| 680 | + */ |
| 681 | +$messages['uk'] = array( |
| 682 | + 'wikieditor-previewDialog-tab' => 'Попередній перегляд', |
| 683 | + 'wikieditor-previewDialog-loading' => 'Завантаження...', |
| 684 | +); |
| 685 | + |
| 686 | +/** Vèneto (Vèneto) |
| 687 | + * @author Candalua |
| 688 | + */ |
| 689 | +$messages['vec'] = array( |
| 690 | + 'wikieditor-previewDialog-tab' => 'Anteprima', |
| 691 | + 'wikieditor-previewDialog-loading' => "So' drio cargar...", |
| 692 | +); |
| 693 | + |
| 694 | +/** Vietnamese (Tiếng Việt) |
| 695 | + * @author Minh Nguyen |
| 696 | + */ |
| 697 | +$messages['vi'] = array( |
| 698 | + 'wikieditor-previewDialog-tab' => 'Xem trước', |
| 699 | + 'wikieditor-previewDialog-loading' => 'Đang tải…', |
| 700 | +); |
| 701 | + |
| 702 | +/** Yiddish (ייִדיש) |
| 703 | + * @author פוילישער |
| 704 | + */ |
| 705 | +$messages['yi'] = array( |
| 706 | + 'wikieditor-previewDialog-tab' => 'פֿאראויסשטעלונג', |
| 707 | + 'wikieditor-previewDialog-loading' => 'לאָדט…', |
| 708 | +); |
| 709 | + |
| 710 | +/** Cantonese (粵語) |
| 711 | + * @author Horacewai2 |
| 712 | + */ |
| 713 | +$messages['yue'] = array( |
| 714 | + 'wikieditor-previewDialog-tab' => '預覽', |
| 715 | + 'wikieditor-previewDialog-loading' => '載入緊…', |
| 716 | +); |
| 717 | + |
| 718 | +/** Simplified Chinese (中文(简体)) |
| 719 | + * @author Bencmq |
| 720 | + * @author PhiLiP |
| 721 | + */ |
| 722 | +$messages['zh-hans'] = array( |
| 723 | + 'wikieditor-previewDialog-tab' => '预览', |
| 724 | + 'wikieditor-previewDialog-loading' => '载入中……', |
| 725 | +); |
| 726 | + |
| 727 | +/** Traditional Chinese (中文(繁體)) |
| 728 | + * @author Gaoxuewei |
| 729 | + */ |
| 730 | +$messages['zh-hant'] = array( |
| 731 | + 'wikieditor-previewDialog-tab' => '預覽', |
| 732 | + 'wikieditor-previewDialog-loading' => '載入中...', |
| 733 | +); |
| 734 | + |
Property changes on: trunk/extensions/UsabilityInitiative/WikiEditor/Modules/PreviewDialog/PreviewDialog.i18n.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 735 | + native |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/Modules/PreviewDialog/PreviewDialog.js |
— | — | @@ -0,0 +1,12 @@ |
| 2 | +/* JavaScript for WikiEditor PreviewDialog module */ |
| 3 | + |
| 4 | +$j(document).ready( function() { |
| 5 | + // Check preferences for preview |
| 6 | + if ( !wgWikiEditorEnabledModules.previewDialog ) { |
| 7 | + return true; |
| 8 | + } |
| 9 | + // Add the preview module |
| 10 | + if ( $j.fn.wikiEditor ) { |
| 11 | + $j( 'textarea#wpTextbox1' ).wikiEditor( 'addModule', 'previewDialog' ); |
| 12 | + } |
| 13 | +}); |
Property changes on: trunk/extensions/UsabilityInitiative/WikiEditor/Modules/PreviewDialog/PreviewDialog.js |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 14 | + native |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.previewDialog.js |
— | — | @@ -0,0 +1,130 @@ |
| 2 | +/* Publish module for wikiEditor */ |
| 3 | +( function( $ ) { $.wikiEditor.modules.previewDialog = { |
| 4 | + |
| 5 | +/** |
| 6 | + * Compatability map |
| 7 | + */ |
| 8 | +'browsers': { |
| 9 | + // Left-to-right languages |
| 10 | + 'ltr': { |
| 11 | + 'msie': [['>=', 7]], |
| 12 | + 'firefox': [['>=', 3]], |
| 13 | + 'opera': [['>=', 9.6]], |
| 14 | + 'safari': [['>=', 4]] |
| 15 | + }, |
| 16 | + // Right-to-left languages |
| 17 | + 'rtl': { |
| 18 | + 'msie': [['>=', 8]], |
| 19 | + 'firefox': [['>=', 3]], |
| 20 | + 'opera': [['>=', 9.6]], |
| 21 | + 'safari': [['>=', 4]] |
| 22 | + } |
| 23 | +}, |
| 24 | +/** |
| 25 | + * Internally used functions |
| 26 | + */ |
| 27 | +fn: { |
| 28 | + /** |
| 29 | + * Creates a publish module within a wikiEditor |
| 30 | + * @param context Context object of editor to create module in |
| 31 | + * @param config Configuration object to create module from |
| 32 | + */ |
| 33 | + create: function( context, config ) { |
| 34 | + // Build the dialog behind the Publish button |
| 35 | + var dialogID = 'wikiEditor-' + context.instance + '-preview-dialog'; |
| 36 | + $.wikiEditor.modules.dialogs.fn.create( |
| 37 | + context, |
| 38 | + { |
| 39 | + preview: { |
| 40 | + id: dialogID, |
| 41 | + titleMsg: 'wikieditor-preview-tab', |
| 42 | + html: '\ |
| 43 | + <div class="wikiEditor-ui-loading"><span></span></div>\ |
| 44 | + <div class="wikiEditor-preview-dialog-contents"></div>\ |
| 45 | + ', |
| 46 | + init: function() { |
| 47 | + }, |
| 48 | + dialog: { |
| 49 | + buttons: { |
| 50 | + 'wikieditor-publish-dialog-publish': function() { |
| 51 | + var minorChecked = $( '#wikiEditor-' + context.instance + |
| 52 | + '-dialog-minor' ).is( ':checked' ) ? |
| 53 | + 'checked' : ''; |
| 54 | + var watchChecked = $( '#wikiEditor-' + context.instance + |
| 55 | + '-dialog-watch' ).is( ':checked' ) ? |
| 56 | + 'checked' : ''; |
| 57 | + $( '#wpMinoredit' ).attr( 'checked', minorChecked ); |
| 58 | + $( '#wpWatchthis' ).attr( 'checked', watchChecked ); |
| 59 | + $( '#wpSummary' ).val( $j( '#wikiEditor-' + context.instance + |
| 60 | + '-dialog-summary' ).val() ); |
| 61 | + $( '#editform' ).submit(); |
| 62 | + }, |
| 63 | + 'wikieditor-publish-dialog-goback': function() { |
| 64 | + $(this).dialog( 'close' ); |
| 65 | + } |
| 66 | + }, |
| 67 | + resizable: false, |
| 68 | + height: $( 'body' ).height() - 100, |
| 69 | + width: $( 'body' ).width() - 300, |
| 70 | + position: ['center', 'top'], |
| 71 | + open: function() { |
| 72 | + // Gets the latest copy of the wikitext |
| 73 | + var wikitext = context.fn.getContents(); |
| 74 | + var $dialog = $( '#' + dialogID ); |
| 75 | + $dialog |
| 76 | + .css( 'position', 'relative' ) |
| 77 | + .css( 'height', $( 'body' ).height() - 200 ) |
| 78 | + .parent() |
| 79 | + .css( 'top', '25px' ); |
| 80 | + // $dialog.dialog( 'option', 'width', $( 'body' ).width() - 300 ); |
| 81 | + // Aborts when nothing has changed since the last preview |
| 82 | + if ( context.modules.preview.previewText == wikitext ) { |
| 83 | + return; |
| 84 | + } |
| 85 | + |
| 86 | + $dialog.find( '.wikiEditor-preview-dialog-contents' ).empty(); |
| 87 | + $dialog.find( '.wikiEditor-ui-loading' ).show(); |
| 88 | + $.post( |
| 89 | + wgScriptPath + '/api.php', |
| 90 | + { |
| 91 | + 'action': 'parse', |
| 92 | + 'title': wgPageName, |
| 93 | + 'text': wikitext, |
| 94 | + 'prop': 'text', |
| 95 | + 'pst': '', |
| 96 | + 'format': 'json' |
| 97 | + }, |
| 98 | + function( data ) { |
| 99 | + if ( |
| 100 | + typeof data.parse == 'undefined' || |
| 101 | + typeof data.parse.text == 'undefined' || |
| 102 | + typeof data.parse.text['*'] == 'undefined' |
| 103 | + ) { |
| 104 | + return; |
| 105 | + } |
| 106 | + context.modules.preview.previewText = wikitext; |
| 107 | + $dialog.find( '.wikiEditor-ui-loading' ).hide(); |
| 108 | + $dialog.find( '.wikiEditor-preview-dialog-contents' ) |
| 109 | + .html( '<h1 class="firstHeading" id="firstHeading">'+wgTitle+'</h1>' + |
| 110 | + data.parse.text['*'] ) |
| 111 | + .find( 'a:not([href^=#])' ).click( function() { return false; } ); |
| 112 | + }, |
| 113 | + 'json' |
| 114 | + ); |
| 115 | + } |
| 116 | + }, |
| 117 | + resizeme: false |
| 118 | + } |
| 119 | + } |
| 120 | + ); |
| 121 | + context.fn.addButton( { |
| 122 | + 'captionMsg': 'wikieditor-preview-tab', |
| 123 | + 'action': function() { |
| 124 | + context.$textarea.wikiEditor( 'openDialog', 'preview'); |
| 125 | + return false; |
| 126 | + } |
| 127 | + } ); |
| 128 | + } |
| 129 | +} |
| 130 | + |
| 131 | +}; } )( jQuery ); |
Property changes on: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.previewDialog.js |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 132 | + native |