r73096 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73095‎ | r73096 | r73097 >
Date:22:40, 15 September 2010
Author:tparscal
Status:ok (Comments)
Tags:
Comment:
Lots of refactoring. This still does not work! But it's getting close.
Modified paths:
  • /trunk/extensions/WikiEditor/WikiEditor.hooks.php (modified) (history)
  • /trunk/extensions/WikiEditor/modules/jquery.wikiEditor.css (added) (history)
  • /trunk/extensions/WikiEditor/modules/jquery.wikiEditor.dialogs.css (added) (history)
  • /trunk/extensions/WikiEditor/modules/jquery.wikiEditor.dialogs.js (modified) (history)
  • /trunk/extensions/WikiEditor/modules/jquery.wikiEditor.js (modified) (history)
  • /trunk/extensions/WikiEditor/modules/jquery.wikiEditor.preview.css (added) (history)
  • /trunk/extensions/WikiEditor/modules/jquery.wikiEditor.preview.js (modified) (history)
  • /trunk/extensions/WikiEditor/modules/jquery.wikiEditor.previewDialog.css (added) (history)
  • /trunk/extensions/WikiEditor/modules/jquery.wikiEditor.publish.js (modified) (history)
  • /trunk/extensions/WikiEditor/modules/jquery.wikiEditor.templateEditor.js (modified) (history)
  • /trunk/extensions/WikiEditor/modules/jquery.wikiEditor.toc.css (added) (history)
  • /trunk/extensions/WikiEditor/modules/jquery.wikiEditor.toc.js (modified) (history)
  • /trunk/extensions/WikiEditor/modules/jquery.wikiEditor.toolbar.css (added) (history)
  • /trunk/extensions/WikiEditor/modules/wikiEditor.addMediaWizard.js (modified) (history)
  • /trunk/extensions/WikiEditor/modules/wikiEditor.css (modified) (history)
  • /trunk/extensions/WikiEditor/modules/wikiEditor.dialogs.css (modified) (history)
  • /trunk/extensions/WikiEditor/modules/wikiEditor.dialogs.js (added) (history)
  • /trunk/extensions/WikiEditor/modules/wikiEditor.highlight.js (modified) (history)
  • /trunk/extensions/WikiEditor/modules/wikiEditor.js (added) (history)
  • /trunk/extensions/WikiEditor/modules/wikiEditor.preview.css (deleted) (history)
  • /trunk/extensions/WikiEditor/modules/wikiEditor.preview.js (modified) (history)
  • /trunk/extensions/WikiEditor/modules/wikiEditor.previewDialog.css (deleted) (history)
  • /trunk/extensions/WikiEditor/modules/wikiEditor.previewDialog.js (modified) (history)
  • /trunk/extensions/WikiEditor/modules/wikiEditor.publish.js (modified) (history)
  • /trunk/extensions/WikiEditor/modules/wikiEditor.templateEditor.js (modified) (history)
  • /trunk/extensions/WikiEditor/modules/wikiEditor.templates.js (modified) (history)
  • /trunk/extensions/WikiEditor/modules/wikiEditor.toc.css (deleted) (history)
  • /trunk/extensions/WikiEditor/modules/wikiEditor.toc.js (modified) (history)
  • /trunk/extensions/WikiEditor/modules/wikiEditor.toolbar.css (deleted) (history)
  • /trunk/extensions/WikiEditor/modules/wikiEditor.toolbar.js (modified) (history)

Diff [purge]

Index: trunk/extensions/WikiEditor/WikiEditor.hooks.php
@@ -1 +1,611 @@
22 <?php
 3+/**
 4+ * Hooks for Vector extension
 5+ *
 6+ * @file
 7+ * @ingroup Extensions
 8+ */
 9+
 10+class WikiEditorHooks {
 11+
 12+ /* Static Members */
 13+
 14+ static $resources = array(
 15+
 16+ /* WikiEditor jQuery plugin Resources */
 17+
 18+ 'jquery.wikiEditor' => array(
 19+ 'scripts' => 'extensions/WikiEditor/modules/jquery.wikiEditor.js',
 20+ 'styles' => 'extensions/WikiEditor/modules/jquery.wikiEditor.css',
 21+ 'dependencies' => array(
 22+ 'jquery.client',
 23+ ),
 24+ ),
 25+ 'jquery.wikiEditor.dialogs' => array(
 26+ 'scripts' => 'extensions/WikiEditor/modules/jquery.wikiEditor.dialogs.js',
 27+ 'styles' => 'extensions/WikiEditor/modules/jquery.wikiEditor.dialogs.css',
 28+ 'dependencies' => array(
 29+ 'jquery.wikiEditor',
 30+ 'jquery.wikiEditor.toolbar',
 31+ 'jquery.ui.dialog',
 32+ 'jquery.ui.draggable',
 33+ 'jquery.ui.resizable',
 34+ 'jquery.tabIndex',
 35+ ),
 36+ ),
 37+ 'jquery.wikiEditor.highlight' => array(
 38+ 'scripts' => 'extensions/WikiEditor/modules/jquery.wikiEditor.highlight.js',
 39+ 'dependencies' => array(
 40+ 'jquery.wikiEditor',
 41+ ),
 42+ ),
 43+ 'jquery.wikiEditor.preview' => array(
 44+ 'scripts' => 'extensions/WikiEditor/modules/jquery.wikiEditor.preview.js',
 45+ 'styles' => 'extensions/WikiEditor/modules/jquery.wikiEditor.preview.css',
 46+ 'dependencies' => array(
 47+ 'jquery.wikiEditor',
 48+ ),
 49+ ),
 50+ 'jquery.wikiEditor.previewDialog' => array(
 51+ 'scripts' => 'extensions/WikiEditor/modules/jquery.wikiEditor.previewDialog.js',
 52+ 'styles' => 'extensions/WikiEditor/modules/jquery.wikiEditor.previewDialog.css',
 53+ 'dependencies' => array(
 54+ 'jquery.wikiEditor', 'jquery.wikiEditor.dialogs',
 55+ ),
 56+ ),
 57+ 'jquery.wikiEditor.publish' => array(
 58+ 'scripts' => 'extensions/WikiEditor/modules/jquery.wikiEditor.publish.js',
 59+ 'dependencies' => array(
 60+ 'jquery.wikiEditor', 'jquery.wikiEditor.dialogs',
 61+ ),
 62+ ),
 63+ 'jquery.wikiEditor.templateEditor' => array(
 64+ 'scripts' => 'extensions/WikiEditor/modules/jquery.wikiEditor.templateEditor.js',
 65+ 'dependencies' => array(
 66+ 'jquery.wikiEditor', 'jquery.wikiEditor.dialogs',
 67+ ),
 68+ ),
 69+ 'jquery.wikiEditor.templates' => array(
 70+ 'scripts' => 'extensions/WikiEditor/modules/jquery.wikiEditor.templates.js',
 71+ 'dependencies' => array(
 72+ 'jquery.wikiEditor',
 73+ ),
 74+ ),
 75+ 'jquery.wikiEditor.toc' => array(
 76+ 'scripts' => 'extensions/WikiEditor/modules/jquery.wikiEditor.toc.js',
 77+ 'styles' => 'extensions/WikiEditor/modules/jquery.wikiEditor.toc.css',
 78+ 'dependencies' => array(
 79+ 'jquery.wikiEditor', 'jquery.ui.draggable', 'jquery.ui.resizable'
 80+ ),
 81+ ),
 82+ 'jquery.wikiEditor.toolbar' => array(
 83+ 'scripts' => 'extensions/WikiEditor/modules/jquery.wikiEditor.toolbar.js',
 84+ 'styles' => 'extensions/WikiEditor/modules/jquery.wikiEditor.toolbar.css',
 85+ 'dependencies' => array(
 86+ 'jquery.wikiEditor',
 87+ ),
 88+ ),
 89+
 90+ /* WikiEditor Resources */
 91+
 92+ 'wikiEditor' => array(
 93+ 'scripts' => 'extensions/WikiEditor/modules/wikiEditor.js',
 94+ 'styles' => 'extensions/WikiEditor/modules/wikiEditor.css',
 95+ 'dependencies' => array(
 96+ 'jquery.wikiEditor',
 97+ ),
 98+ ),
 99+ 'wikiEditor.dialogs' => array(
 100+ 'scripts' => 'extensions/WikiEditor/modules/wikiEditor.dialogs.js',
 101+ 'styles' => 'extensions/WikiEditor/modules/wikiEditor.dialogs.css',
 102+ 'dependencies' => array(
 103+ 'jquery.wikiEditor.dialogs',
 104+ ),
 105+ ),
 106+ 'wikiEditor.highlight' => array(
 107+ 'scripts' => 'extensions/WikiEditor/modules/wikiEditor.highlight.js',
 108+ 'dependencies' => array(
 109+ 'jquery.wikiEditor.highlight',
 110+ ),
 111+ ),
 112+ 'wikiEditor.preview' => array(
 113+ 'scripts' => 'extensions/WikiEditor/modules/wikiEditor.preview.js',
 114+ 'messages' => array(
 115+ 'wikieditor-preview-tab',
 116+ 'wikieditor-preview-changes-tab',
 117+ 'wikieditor-preview-loading',
 118+ ),
 119+ 'dependencies' => array(
 120+ 'jquery.wikiEditor.preview',
 121+ ),
 122+ ),
 123+ 'wikiEditor.previewDialog' => array(
 124+ 'scripts' => 'extensions/WikiEditor/modules/wikiEditor.previewDialog.js',
 125+ 'messages' => array(
 126+ 'wikieditor-previewDialog-preference',
 127+ 'wikieditor-previewDialog-tab',
 128+ 'wikieditor-previewDialog-loading',
 129+ ),
 130+ 'dependencies' => array(
 131+ 'jquery.wikiEditor.preivewDialog',
 132+ ),
 133+ ),
 134+ 'wikiEditor.publish' => array(
 135+ 'scripts' => 'extensions/WikiEditor/modules/wikiEditor.publish.js',
 136+ 'messages' => array(
 137+ 'wikieditor-publish-button-publish',
 138+ 'wikieditor-publish-button-cancel',
 139+ 'wikieditor-publish-dialog-title',
 140+ 'wikieditor-publish-dialog-summary',
 141+ 'wikieditor-publish-dialog-minor',
 142+ 'wikieditor-publish-dialog-watch',
 143+ 'wikieditor-publish-dialog-publish',
 144+ 'wikieditor-publish-dialog-goback',
 145+ ),
 146+ 'dependencies' => array(
 147+ 'jquery.wikiEditor.publish',
 148+ ),
 149+ ),
 150+ 'wikiEditor.templateEditor' => array(
 151+ 'scripts' => 'extensions/WikiEditor/modules/wikiEditor.templateEditor.js',
 152+ 'messages' => array(
 153+ 'wikieditor-template-editor-dialog-title',
 154+ 'wikieditor-template-editor-dialog-submit',
 155+ 'wikieditor-template-editor-dialog-cancel',
 156+ ),
 157+ 'dependencies' => array(
 158+ 'jquery.wikiEditor.templateEditor',
 159+ ),
 160+ ),
 161+ 'wikiEditor.templates' => array(
 162+ 'scripts' => 'extensions/WikiEditor/modules/wikiEditor.templates.js',
 163+ 'dependencies' => array(
 164+ 'jquery.wikiEditor.templates',
 165+ ),
 166+ ),
 167+ 'wikiEditor.toc' => array(
 168+ 'scripts' => 'extensions/WikiEditor/modules/wikiEditor.toc.js',
 169+ 'messages' => array(
 170+ 'wikieditor-toc-show',
 171+ 'wikieditor-toc-hide',
 172+ ),
 173+ 'dependencies' => array(
 174+ 'jquery.wikiEditor.toc',
 175+ ),
 176+ ),
 177+ 'wikiEditor.toolbar' => array(
 178+ 'scripts' => 'extensions/WikiEditor/modules/wikiEditor.toolbar.js',
 179+ 'messages' => array(
 180+ // This is a mixed bunch that needs to be separated between dialog and toolbar messages, but since the
 181+ // dialog module depends on the toolbar module, it's not an urgent matter
 182+ 'wikieditor-toolbar-loading',
 183+ /* Main Section */
 184+ 'wikieditor-toolbar-tool-bold',
 185+ 'wikieditor-toolbar-tool-bold-example',
 186+ 'wikieditor-toolbar-tool-italic',
 187+ 'wikieditor-toolbar-tool-italic-example',
 188+ 'wikieditor-toolbar-tool-ilink',
 189+ 'wikieditor-toolbar-tool-ilink-example',
 190+ 'wikieditor-toolbar-tool-xlink',
 191+ 'wikieditor-toolbar-tool-xlink-example',
 192+ 'wikieditor-toolbar-tool-link',
 193+ 'wikieditor-toolbar-tool-link-title',
 194+ 'wikieditor-toolbar-tool-link-int',
 195+ 'wikieditor-toolbar-tool-link-int-target',
 196+ 'wikieditor-toolbar-tool-link-int-target-tooltip',
 197+ 'wikieditor-toolbar-tool-link-int-text',
 198+ 'wikieditor-toolbar-tool-link-int-text-tooltip',
 199+ 'wikieditor-toolbar-tool-link-ext',
 200+ 'wikieditor-toolbar-tool-link-ext-target',
 201+ 'wikieditor-toolbar-tool-link-ext-text',
 202+ 'wikieditor-toolbar-tool-link-insert',
 203+ 'wikieditor-toolbar-tool-link-cancel',
 204+ 'wikieditor-toolbar-tool-link-int-target-status-exists',
 205+ 'wikieditor-toolbar-tool-link-int-target-status-notexists',
 206+ 'wikieditor-toolbar-tool-link-int-target-status-invalid',
 207+ 'wikieditor-toolbar-tool-link-int-target-status-external',
 208+ 'wikieditor-toolbar-tool-link-int-target-status-loading',
 209+ 'wikieditor-toolbar-tool-link-int-invalid',
 210+ 'wikieditor-toolbar-tool-link-lookslikeinternal',
 211+ 'wikieditor-toolbar-tool-link-lookslikeinternal-int',
 212+ 'wikieditor-toolbar-tool-link-lookslikeinternal-ext',
 213+ 'wikieditor-toolbar-tool-link-empty',
 214+ 'wikieditor-toolbar-tool-file',
 215+ 'wikieditor-toolbar-tool-file-pre',
 216+ 'wikieditor-toolbar-tool-file-example',
 217+ 'wikieditor-toolbar-tool-reference',
 218+ 'wikieditor-toolbar-tool-reference-title',
 219+ 'wikieditor-toolbar-tool-reference-cancel',
 220+ 'wikieditor-toolbar-tool-reference-text',
 221+ 'wikieditor-toolbar-tool-reference-insert',
 222+ 'wikieditor-toolbar-tool-reference-example',
 223+ 'wikieditor-toolbar-tool-signature',
 224+ /* Formatting Section */
 225+ 'wikieditor-toolbar-section-advanced',
 226+ 'wikieditor-toolbar-tool-heading',
 227+ 'wikieditor-toolbar-tool-heading-1',
 228+ 'wikieditor-toolbar-tool-heading-2',
 229+ 'wikieditor-toolbar-tool-heading-3',
 230+ 'wikieditor-toolbar-tool-heading-4',
 231+ 'wikieditor-toolbar-tool-heading-5',
 232+ 'wikieditor-toolbar-tool-heading-example',
 233+ 'wikieditor-toolbar-group-format',
 234+ 'wikieditor-toolbar-tool-ulist',
 235+ 'wikieditor-toolbar-tool-ulist-example',
 236+ 'wikieditor-toolbar-tool-olist',
 237+ 'wikieditor-toolbar-tool-olist-example',
 238+ 'wikieditor-toolbar-tool-indent',
 239+ 'wikieditor-toolbar-tool-indent-example',
 240+ 'wikieditor-toolbar-tool-nowiki',
 241+ 'wikieditor-toolbar-tool-nowiki-example',
 242+ 'wikieditor-toolbar-tool-redirect',
 243+ 'wikieditor-toolbar-tool-redirect-example',
 244+ 'wikieditor-toolbar-tool-big',
 245+ 'wikieditor-toolbar-tool-big-example',
 246+ 'wikieditor-toolbar-tool-small',
 247+ 'wikieditor-toolbar-tool-small-example',
 248+ 'wikieditor-toolbar-tool-superscript',
 249+ 'wikieditor-toolbar-tool-superscript-example',
 250+ 'wikieditor-toolbar-tool-subscript',
 251+ 'wikieditor-toolbar-tool-subscript-example',
 252+ 'wikieditor-toolbar-group-insert',
 253+ 'wikieditor-toolbar-tool-gallery',
 254+ 'wikieditor-toolbar-tool-gallery-example',
 255+ 'wikieditor-toolbar-tool-newline',
 256+ 'wikieditor-toolbar-tool-table',
 257+ 'wikieditor-toolbar-tool-table-example-old',
 258+ 'wikieditor-toolbar-tool-table-example-cell-text',
 259+ 'wikieditor-toolbar-tool-table-example',
 260+ 'wikieditor-toolbar-tool-table-example-header',
 261+ 'wikieditor-toolbar-tool-table-title',
 262+ 'wikieditor-toolbar-tool-table-dimensions-rows',
 263+ 'wikieditor-toolbar-tool-table-dimensions-columns',
 264+ 'wikieditor-toolbar-tool-table-dimensions-header',
 265+ 'wikieditor-toolbar-tool-table-wikitable',
 266+ 'wikieditor-toolbar-tool-table-sortable',
 267+ 'wikieditor-toolbar-tool-table-insert',
 268+ 'wikieditor-toolbar-tool-table-cancel',
 269+ 'wikieditor-toolbar-tool-table-example-text',
 270+ 'wikieditor-toolbar-tool-table-toomany',
 271+ 'wikieditor-toolbar-tool-table-invalidnumber',
 272+ 'wikieditor-toolbar-tool-table-zero',
 273+ 'wikieditor-toolbar-tool-replace',
 274+ 'wikieditor-toolbar-tool-replace-title',
 275+ 'wikieditor-toolbar-tool-replace-search',
 276+ 'wikieditor-toolbar-tool-replace-replace',
 277+ 'wikieditor-toolbar-tool-replace-case',
 278+ 'wikieditor-toolbar-tool-replace-regex',
 279+ 'wikieditor-toolbar-tool-replace-button-findnext',
 280+ 'wikieditor-toolbar-tool-replace-button-replacenext',
 281+ 'wikieditor-toolbar-tool-replace-button-replaceall',
 282+ 'wikieditor-toolbar-tool-replace-close',
 283+ 'wikieditor-toolbar-tool-replace-nomatch',
 284+ 'wikieditor-toolbar-tool-replace-success',
 285+ 'wikieditor-toolbar-tool-replace-emptysearch',
 286+ 'wikieditor-toolbar-tool-replace-invalidregex',
 287+ /* Special Characters Section */
 288+ 'wikieditor-toolbar-section-characters',
 289+ 'wikieditor-toolbar-characters-page-latin',
 290+ 'wikieditor-toolbar-characters-page-latinextended',
 291+ 'wikieditor-toolbar-characters-page-ipa',
 292+ 'wikieditor-toolbar-characters-page-symbols',
 293+ 'wikieditor-toolbar-characters-page-greek',
 294+ 'wikieditor-toolbar-characters-page-cyrillic',
 295+ 'wikieditor-toolbar-characters-page-arabic',
 296+ 'wikieditor-toolbar-characters-page-persian',
 297+ 'wikieditor-toolbar-characters-page-hebrew',
 298+ 'wikieditor-toolbar-characters-page-bangla',
 299+ 'wikieditor-toolbar-characters-page-telugu',
 300+ 'wikieditor-toolbar-characters-page-sinhala',
 301+ 'wikieditor-toolbar-characters-page-gujarati',
 302+ 'wikieditor-toolbar-characters-page-thai',
 303+ 'wikieditor-toolbar-characters-page-lao',
 304+ 'wikieditor-toolbar-characters-page-khmer',
 305+ /* Help Section */
 306+ 'wikieditor-toolbar-section-help',
 307+ 'wikieditor-toolbar-help-heading-description',
 308+ 'wikieditor-toolbar-help-heading-syntax',
 309+ 'wikieditor-toolbar-help-heading-result',
 310+ 'wikieditor-toolbar-help-page-format',
 311+ 'wikieditor-toolbar-help-page-link',
 312+ 'wikieditor-toolbar-help-page-heading',
 313+ 'wikieditor-toolbar-help-page-list',
 314+ 'wikieditor-toolbar-help-page-file',
 315+ 'wikieditor-toolbar-help-page-reference',
 316+ 'wikieditor-toolbar-help-page-discussion',
 317+ 'wikieditor-toolbar-help-content-bold-description',
 318+ 'wikieditor-toolbar-help-content-bold-syntax',
 319+ 'wikieditor-toolbar-help-content-bold-result',
 320+ 'wikieditor-toolbar-help-content-italic-description',
 321+ 'wikieditor-toolbar-help-content-italic-syntax',
 322+ 'wikieditor-toolbar-help-content-italic-result',
 323+ 'wikieditor-toolbar-help-content-bolditalic-description',
 324+ 'wikieditor-toolbar-help-content-bolditalic-syntax',
 325+ 'wikieditor-toolbar-help-content-bolditalic-result',
 326+ 'wikieditor-toolbar-help-content-ilink-description',
 327+ 'wikieditor-toolbar-help-content-ilink-syntax',
 328+ 'wikieditor-toolbar-help-content-ilink-result',
 329+ 'wikieditor-toolbar-help-content-xlink-description',
 330+ 'wikieditor-toolbar-help-content-xlink-syntax',
 331+ 'wikieditor-toolbar-help-content-xlink-result',
 332+ 'wikieditor-toolbar-help-content-heading1-description',
 333+ 'wikieditor-toolbar-help-content-heading1-syntax',
 334+ 'wikieditor-toolbar-help-content-heading1-result',
 335+ 'wikieditor-toolbar-help-content-heading2-description',
 336+ 'wikieditor-toolbar-help-content-heading2-syntax',
 337+ 'wikieditor-toolbar-help-content-heading2-result',
 338+ 'wikieditor-toolbar-help-content-heading3-description',
 339+ 'wikieditor-toolbar-help-content-heading3-syntax',
 340+ 'wikieditor-toolbar-help-content-heading3-result',
 341+ 'wikieditor-toolbar-help-content-heading4-description',
 342+ 'wikieditor-toolbar-help-content-heading4-syntax',
 343+ 'wikieditor-toolbar-help-content-heading4-result',
 344+ 'wikieditor-toolbar-help-content-heading5-description',
 345+ 'wikieditor-toolbar-help-content-heading5-syntax',
 346+ 'wikieditor-toolbar-help-content-heading5-result',
 347+ 'wikieditor-toolbar-help-content-ulist-description',
 348+ 'wikieditor-toolbar-help-content-ulist-syntax',
 349+ 'wikieditor-toolbar-help-content-ulist-result',
 350+ 'wikieditor-toolbar-help-content-olist-description',
 351+ 'wikieditor-toolbar-help-content-olist-syntax',
 352+ 'wikieditor-toolbar-help-content-olist-result',
 353+ 'wikieditor-toolbar-help-content-file-description',
 354+ 'wikieditor-toolbar-help-content-file-syntax',
 355+ 'wikieditor-toolbar-help-content-file-result',
 356+ 'wikieditor-toolbar-help-content-reference-description',
 357+ 'wikieditor-toolbar-help-content-reference-syntax',
 358+ 'wikieditor-toolbar-help-content-reference-result',
 359+ 'wikieditor-toolbar-help-content-rereference-description',
 360+ 'wikieditor-toolbar-help-content-rereference-syntax',
 361+ 'wikieditor-toolbar-help-content-rereference-result',
 362+ 'wikieditor-toolbar-help-content-showreferences-description',
 363+ 'wikieditor-toolbar-help-content-showreferences-syntax',
 364+ 'wikieditor-toolbar-help-content-showreferences-result',
 365+ 'wikieditor-toolbar-help-content-signaturetimestamp-description',
 366+ 'wikieditor-toolbar-help-content-signaturetimestamp-syntax',
 367+ 'wikieditor-toolbar-help-content-signaturetimestamp-result',
 368+ 'wikieditor-toolbar-help-content-signature-description',
 369+ 'wikieditor-toolbar-help-content-signature-syntax',
 370+ 'wikieditor-toolbar-help-content-signature-result',
 371+ 'wikieditor-toolbar-help-content-indent-description',
 372+ 'wikieditor-toolbar-help-content-indent-syntax',
 373+ 'wikieditor-toolbar-help-content-indent-result',
 374+ ),
 375+ 'dependencies' => array(
 376+ 'jquery.wikiEditor.toolbar',
 377+ ),
 378+ ),
 379+ );
 380+
 381+ static $modules = array(
 382+ 'global' => array(
 383+ 'variables' => array(
 384+ 'wgWikiEditorIconVersion',
 385+ ),
 386+ ),
 387+ 'highlight' => array(
 388+ 'preference' => array(
 389+ 'key' => 'wikieditor-highlight',
 390+ 'ui' => array(
 391+ 'type' => 'toggle',
 392+ 'label-message' => 'wikieditor-highlight-preference',
 393+ 'section' => 'editing/labs',
 394+ ),
 395+ ),
 396+ ),
 397+ 'templateEditor' => array(
 398+ 'preference' => array(
 399+ 'key' => 'wikieditor-template-editor',
 400+ 'ui' => array(
 401+ 'type' => 'toggle',
 402+ 'label-message' => 'wikieditor-template-editor-preference',
 403+ 'section' => 'editing/labs',
 404+ ),
 405+ ),
 406+ ),
 407+ 'templates' => array(
 408+ 'preference' => array(
 409+ 'key' => 'wikieditor-templates',
 410+ 'ui' => array(
 411+ 'type' => 'toggle',
 412+ 'label-message' => 'wikieditor-templates-preference',
 413+ 'section' => 'editing/labs',
 414+ ),
 415+ ),
 416+ ),
 417+ 'addMediaWizard' => array(
 418+ 'preference' => array(
 419+ 'key' => 'addmediawizard-gadget',
 420+ 'ui' => array(
 421+ 'type' => 'toggle',
 422+ 'label-message' => 'wikieditor-addMediaWizard-preference',
 423+ 'section' => 'editing/labs',
 424+ ),
 425+ ),
 426+ ),
 427+ 'preview' => array(
 428+ 'preference' => array(
 429+ 'key' => 'wikieditor-preview',
 430+ 'ui' => array(
 431+ 'type' => 'toggle',
 432+ 'label-message' => 'wikieditor-preview-preference',
 433+ 'section' => 'editing/labs',
 434+ ),
 435+ ),
 436+ 'messages' => array(
 437+ 'wikieditor-preview-tab',
 438+ 'wikieditor-preview-changes-tab',
 439+ 'wikieditor-preview-loading',
 440+ ),
 441+ ),
 442+ 'previewDialog' => array(
 443+ 'preference' => array(
 444+ 'key' => 'wikieditor-previewDialog',
 445+ 'ui' => array(
 446+ 'type' => 'toggle',
 447+ 'label-message' => 'wikieditor-previewDialog-preference',
 448+ 'section' => 'editing/labs',
 449+ ),
 450+ ),
 451+ ),
 452+ 'publish' => array(
 453+ 'preference' => array(
 454+ 'key' => 'wikieditor-publish',
 455+ 'ui' => array(
 456+ 'type' => 'toggle',
 457+ 'label-message' => 'wikieditor-publish-preference',
 458+ 'section' => 'editing/labs',
 459+ ),
 460+ ),
 461+ ),
 462+ 'toc' => array(
 463+ 'preference' => array(
 464+ // Ideally this key would be 'wikieditor-toc'
 465+ 'key' => 'usenavigabletoc',
 466+ 'ui' => array(
 467+ 'type' => 'toggle',
 468+ 'label-message' => 'wikieditor-toc-preference',
 469+ 'section' => 'editing/labs',
 470+ ),
 471+ ),
 472+ 'variables' => array(
 473+ // These are probably only for testing purposes?
 474+ 'wgNavigableTOCCollapseEnable',
 475+ 'wgNavigableTOCResizable'
 476+ ),
 477+ ),
 478+ 'toolbar' => array(
 479+ 'preference' => array(
 480+ // Ideally this key would be 'wikieditor-toolbar'
 481+ 'key' => 'usebetatoolbar',
 482+ 'ui' => array(
 483+ 'type' => 'toggle',
 484+ 'label-message' => 'wikieditor-toolbar-preference',
 485+ 'section' => 'editing/beta',
 486+ ),
 487+ ),
 488+ ),
 489+ 'dialogs' => array(
 490+ 'preference' => array(
 491+ // Ideally this key would be 'wikieditor-toolbar-dialogs'
 492+ 'key' => 'usebetatoolbar-cgd',
 493+ 'ui' => array(
 494+ 'type' => 'toggle',
 495+ 'label-message' => 'wikieditor-toolbar-dialogs-preference',
 496+ 'section' => 'editing/beta',
 497+ ),
 498+ ),
 499+ ),
 500+ );
 501+
 502+ /* Protected Static Methods */
 503+
 504+ protected static function isEnabled( $module ) {
 505+ global $wgVectorModules, $wgUser;
 506+
 507+ $enabled =
 508+ $wgVectorModules[$module]['global'] ||
 509+ (
 510+ $wgVectorModules[$module]['user'] &&
 511+ isset( self::$modules[$module]['preferences']['key'] ) &&
 512+ $wgUser->getOption( self::$modules[$module]['preferences']['key'] )
 513+ );
 514+ if ( !$enabled ) {
 515+ return false;
 516+ }
 517+ if ( isset( self::$modules[$module]['preferences']['requirements'] ) ) {
 518+ foreach ( self::$modules[$module]['preferences']['requirements'] as $requirement => $value ) {
 519+ // Important! We really do want fuzzy evaluation here
 520+ if ( $wgUser->getOption( $requirement ) != $value ) {
 521+ return false;
 522+ }
 523+ }
 524+ }
 525+ return true;
 526+ }
 527+
 528+ /* Static Methods */
 529+
 530+ /**
 531+ * BeforePageDisplay hook
 532+ *
 533+ * Adds the modules to the edit form
 534+ *
 535+ * @param $out OutputPage output page
 536+ * @param $skin Skin current skin
 537+ */
 538+ public static function beforePageDisplay( $out, $skin ) {
 539+ global $wgVectorModules;
 540+
 541+ // Don't load Vector modules for non-Vector skins
 542+ if ( !( $skin instanceof SkinVector ) ) {
 543+ return true;
 544+ }
 545+
 546+ // Add enabled modules
 547+ foreach ( $wgVectorModules as $module => $enable ) {
 548+ if ( self::isEnabled( $module ) ) {
 549+ $out->addModules( self::$modules[$module]['name'] );
 550+ }
 551+ }
 552+ return true;
 553+ }
 554+
 555+ /**
 556+ * GetPreferences hook
 557+ *
 558+ * Adds Vector-releated items to the preferences
 559+ *
 560+ * @param $out User current user
 561+ * @param $skin array list of default user preference controls
 562+ */
 563+ public static function getPreferences( $user, &$defaultPreferences ) {
 564+ global $wgVectorModules;
 565+
 566+ foreach ( $wgVectorModules as $module => $enable ) {
 567+ if ( $enable['user'] && isset( self::$modules['preferences'][$module]['ui'] ) ) {
 568+ $defaultPreferences[self::$modules['preferences'][$module]['key']] =
 569+ self::$modules['preferences'][$module]['ui'];
 570+ }
 571+ }
 572+ return true;
 573+ }
 574+
 575+ /**
 576+ * MakeGlobalVariablesScript hook
 577+ *
 578+ * Adds enabled/disabled switches for Vector modules
 579+ */
 580+ public static function makeGlobalVariablesScript( &$vars ) {
 581+ global $wgVectorModules;
 582+
 583+ $configurations = array();
 584+ foreach ( $wgVectorModules as $module => $enable ) {
 585+ if (
 586+ isset( self::$modules[$module]['configurations'] ) &&
 587+ is_array( self::$modules[$module]['configurations'] )
 588+ ) {
 589+ foreach ( self::$modules[$module]['configurations'] as $configuration ) {
 590+ global $$configuration;
 591+ $configurations[$configuration] = $$configuration;
 592+ }
 593+ }
 594+ }
 595+ if ( count( $configurations ) ) {
 596+ $vars = array_merge( $vars, $configurations );
 597+ }
 598+ return true;
 599+ }
 600+
 601+ /*
 602+ * ResourceLoaderRegisterModules hook
 603+ *
 604+ * Adds modules to ResourceLoader
 605+ */
 606+ public static function resourceLoaderRegisterModules() {
 607+ foreach ( self::$modules as $module ) {
 608+ ResourceLoader::register( $module['name'], new ResourceLoaderFileModule( $module['resources'] ) );
 609+ }
 610+ return true;
 611+ }
 612+}
\ No newline at end of file
Index: trunk/extensions/WikiEditor/modules/wikiEditor.preview.css
@@ -1,23 +0,0 @@
2 -/* CSS for wikiEditor preview plugin */
3 -
4 -.wikiEditor-preview-loading {
5 - padding: 1em;
6 - background-color: white;
7 -}
8 -.wikiEditor-preview-loading span {
9 - color: #666666;
10 -}
11 -.wikiEditor-preview-spinner {
12 - padding-right: 1em;
13 -}
14 -.wikiEditor-preview-contents {
15 - padding: 1em;
16 - background-color: white;
17 -}
18 -#wikiEditor-0-preview-dialog .wikiEditor-ui-loading {
19 - overflow: hidden;
20 - border: none;
21 -}
22 -.ui-dialog .ui-dialog-buttonpane {
23 - margin: 0 !important;
24 -}
\ No newline at end of file
Index: trunk/extensions/WikiEditor/modules/wikiEditor.toc.css
@@ -1,217 +0,0 @@
2 -/* wikiEditor toc module */
3 -.wikiEditor-ui-toc {
4 - /* height and width are set dynamically */
5 - /*float: right;*/
6 - padding: 0;
7 - overflow: auto;
8 - overflow-x: hidden;
9 -}
10 -.wikiEditor-ui-toc {
11 - border-left: solid silver 1px;
12 -}
13 -body.rtl .wikiEditor-ui-toc {
14 - border-right: solid silver 1px;
15 - border-left: none;
16 -}
17 -.wikiEditor-ui-toc ul {
18 - padding: 0;
19 - margin: 0;
20 - list-style: none;
21 - /* IE needs to be told in great detail how to act, or it misbehaves */
22 - list-style-image: none;
23 - list-style-position: outside;
24 - list-style-type: none;
25 - width: 100%;
26 -}
27 -.tab-toc {
28 - /* Should match the toolbar */
29 - background-image: url(../images/wikiEditor/toolbar/base.png?1);
30 - background-position: left top;
31 - background-repeat: repeat-x;
32 - height: 26px;
33 - padding: 3px 0;
34 - line-height: 26px;
35 - padding-left: 1em;
36 - border-bottom: solid 1px silver;
37 - white-space: nowrap;
38 - overflow: hidden;
39 -}
40 -body.rtl .tab-toc {
41 - background-position: right top;
42 - padding-right: 2em;
43 -}
44 -.tab-toc a {
45 - outline: none;
46 -}
47 -.wikiEditor-ui-toc li {
48 - padding: 0;
49 - margin: 0;
50 -}
51 -.wikiEditor-ui-toc ul ul {
52 - padding: 0;
53 - margin: 0;
54 - margin-bottom: 0 !important;
55 - margin-top: 0 !important;
56 - list-style: none;
57 - background-image: none;
58 -}
59 -.wikiEditor-ui-toc ul li div {
60 - display: block;
61 - font-size: 0.9em;
62 - cursor: pointer;
63 - color: #0645ad;
64 -}
65 -.wikiEditor-ui-toc ul li div {
66 - padding: 0.125em;
67 - padding-left: 1em;
68 -}
69 -body.rtl .wikiEditor-ui-toc ul li div {
70 - padding-right: 1em;
71 - padding-left: 0;
72 -}
73 -.wikiEditor-ui-toc ul ul li div {
74 - padding-left: 2em;
75 -}
76 -body.rtl .wikiEditor-ui-toc ul ul li div {
77 - padding-right: 2em;
78 - padding-left: 0;
79 -}
80 -.wikiEditor-ui-toc ul ul ul li div {
81 - padding-left: 3em;
82 -}
83 -body.rtl .wikiEditor-ui-toc ul ul ul li div {
84 - padding-right: 3em;
85 - padding-left: 0;
86 -}
87 -.wikiEditor-ui-toc ul ul ul ul li div {
88 - padding-left: 4em;
89 -}
90 -body.rtl .wikiEditor-ui-toc ul ul ul ul li div {
91 - padding-right: 4em;
92 - padding-left: 0;
93 -}
94 -.wikiEditor-ui-toc ul ul ul ul ul li div {
95 - padding-left: 5em;
96 -}
97 -body.rtl .wikiEditor-ui-toc ul ul ul ul ul li div {
98 - padding-right: 5em;
99 - padding-left: 0;
100 -}
101 -.wikiEditor-ui-toc ul ul ul ul ul ul li div {
102 - padding-left: 6em;
103 -}
104 -body.rtl wikiEditor-ui-toc ul ul ul ul ul ul li div {
105 - padding-right: 6em;
106 - padding-left: 0;
107 -}
108 -.wikiEditor-ui-toc ul li div.current {
109 - background-color: #FAFAFA;
110 - color: #333333;
111 -}
112 -.wikiEditor-ui-toc ul li div.section-0 {
113 - font-size: 1em;
114 - padding-top: 0.5em;
115 - padding-bottom: 0.5em;
116 - border-bottom: solid 1px #DDDDDD;
117 -}
118 -
119 -/* Collapsing changes */
120 -
121 -.wikiEditor-ui-toc {
122 - overflow-y: hidden;
123 - position: relative;
124 -}
125 -.wikiEditor-ui-toc ul {
126 - overflow-y: auto;
127 - overflow-x: hidden;
128 - height: 100%;
129 - margin-bottom: 0 !important;
130 -
131 -}
132 -
133 -.wikiEditor-ui-toc ul ul {
134 - float: none;
135 - height: auto;
136 -}
137 -#wikiEditor-ui-toc-collapse {
138 - height: 100%;
139 - width: 18px;
140 - position: absolute;
141 - top: 0;
142 - left: 0;
143 -}
144 -.wikiEditor-ui-toc-collapse-open {
145 - background: #f3f3f3 url(../images/wikiEditor/toc/close.png?1) 4px 50% no-repeat;
146 - border-left: 1px solid #DDDDDD;
147 -}
148 -.wikiEditor-ui-toc-collapse-closed {
149 - background: #f3f3f3 url(../images/wikiEditor/toc/open.png?1) 4px 50% no-repeat;
150 -}
151 -
152 -/* Resizing Changes */
153 -.wikiEditor-ui-toc-resize-vertical,
154 -.ui-resizable-w {
155 - width: 4px;
156 - position: absolute;
157 - top: 0;
158 - left: 0;
159 - height: 100%;
160 - cursor: ew-resize;
161 -}
162 -.wikiEditor-ui .wikiEditor-ui-right {
163 - overflow: visible;
164 -}
165 -.wikiEditor-ui-right .ui-resizable-w {
166 - left: 0px !important;
167 - z-index: 0;
168 -}
169 -
170 -.wikiEditor-ui-right .wikiEditor-ui-toc-resize-grip {
171 - width: 5px;
172 - height: 12px;
173 - padding: 3px;
174 - position: absolute;
175 - top: 7px;
176 - left: -12px !important;
177 - cursor: ew-resize;
178 - background: url(../images/wikiEditor/toc/grip.png?1) 50% 50% no-repeat;
179 - z-index: 0;
180 -}
181 -body.rtl .wikiEditor-ui-right .wikiEditor-ui-toc-resize-grip {
182 - right: 2px !important;
183 -}
184 -.wikiEditor-ui-toolbar .tab-toc {
185 - float: right;
186 - margin: 3px 16px 3px 3px;
187 - line-height: 26px;
188 -}
189 -.wikiEditor-ui-toc-expandControl {
190 - position: absolute;
191 - z-index: 2;
192 - top: 0px;
193 - right: 10px;
194 - height: 26px;
195 - padding: 3px 0;
196 - line-height: 26px;
197 - padding-right: 1em;
198 - white-space: nowrap;
199 - overflow: hidden;
200 -}
201 -body.rtl .wikiEditor-ui-toc-expandControl {
202 - padding-left: 1em;
203 - padding-right: 0;
204 - left: 10px;
205 - right: auto;
206 -}
207 -.wikiEditor-ui-text textarea {
208 - resize: none;
209 -}
210 -.wikiEditor-ui-text textarea:focus {
211 - outline: none;
212 -}
213 -
214 -/* Self Clearing for the wikiText view */
215 -.wikiEditor-ui-view-wikiText {
216 - overflow: auto;
217 - width: 100%;
218 -}
\ No newline at end of file
Index: trunk/extensions/WikiEditor/modules/wikiEditor.previewDialog.css
@@ -1,28 +0,0 @@
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
Index: trunk/extensions/WikiEditor/modules/wikiEditor.toolbar.css
@@ -1,408 +0,0 @@
2 -/* wikiEditor toolbar module */
3 -
4 -.wikiEditor-ui-toolbar {
5 - position: relative;
6 - width: 100%;
7 -}
8 -
9 -/* Expandable Sections */
10 -.wikiEditor-ui-toolbar .sections {
11 - float: left;
12 - width: 100%;
13 - clear: both;
14 - height: 0;
15 -}
16 -body.rtl .wikiEditor-ui-toolbar .sections {
17 - float: right;
18 -}
19 -.wikiEditor-ui-toolbar .sections .section {
20 - display: none;
21 - float: left;
22 - width: 100%;
23 - border-top: solid 1px #DDDDDD;
24 - background-color: #E0EEf7;
25 -}
26 -.wikiEditor-ui-toolbar {
27 - background-image: url(../images/wikiEditor/toolbar/base.png?1);
28 - background-position: left top;
29 - background-repeat: repeat-x;
30 -}
31 -/*
32 -.wikiEditor-ui-toolbar .toolbar {
33 - background-image: url(../images/wikiEditor/toolbar/base.png?1);
34 - background-position: left top;
35 -}
36 -*/
37 -body.rtl .wikiEditor-ui-toolbar .sections .section {
38 - float: right;
39 -}
40 -/* Gets overridden when the section div is in class loading - see below */
41 -.wikiEditor-ui-toolbar .sections div .spinner {
42 - display: none;
43 -}
44 -.wikiEditor-ui-toolbar .sections .loading .spinner {
45 - display: block;
46 - background-image: url(../images/wikiEditor/toolbar/loading.gif?2);
47 - background-position: left center;
48 - background-repeat: no-repeat;
49 - padding-left: 32px;
50 - margin-left: 0.5em;
51 - height: 32px;
52 - float: left;
53 - color: #666666;
54 -}
55 -body.rtl .wikiEditor-ui-toolbar .sections .loading .spinner {
56 - background-position: right center;
57 - padding-left: 0;
58 - padding-right: 32px;
59 - margin-left: 0;
60 - margin-right: 0.5em;
61 - float: right;
62 -}
63 -/* Top Level Containers */
64 -.wikiEditor-ui-toolbar .tabs,
65 -.wikiEditor-ui-toolbar .section-main {
66 - position: relative;
67 - float: left;
68 - height: 26px;
69 -}
70 -body.rtl .wikiEditor-ui-toolbar .tabs,
71 -body.rtl .wikiEditor-ui-toolbar .section-main {
72 - float: right;
73 -}
74 -/* Groups */
75 -.wikiEditor-ui-toolbar .group {
76 - float: left;
77 - height: 26px;
78 - padding-right: 6px;
79 - border-right: solid 1px #DDDDDD;
80 - margin: 3px;
81 -}
82 -body.rtl .wikiEditor-ui-toolbar .group {
83 - float: right;
84 - padding-right: 0;
85 - padding-left: 6px;
86 - border-right: none;
87 - border-left: solid 1px #DDDDDD;
88 -}
89 -.wikiEditor-ui-toolbar .group-search {
90 - float: right;
91 - padding: 0 0 0 6px;
92 - border-right: none;
93 - border-left: 1px solid #DDDDDD;
94 -}
95 -.wikiEditor-ui-toolbar .group-insert {
96 - border-right: none;
97 -}
98 -body.rtl .wikiEditor-ui-toolbar .group-search {
99 - float: left;
100 - padding: 0 6px 0 0;
101 - border-left: none;
102 - border-right: 1px solid #DDDDDD;
103 -}
104 -body.rtl .wikiEditor-ui-toolbar .group-insert {
105 - border-left: none;
106 -}
107 -/* Sprited Buttons */
108 -.wikiEditor-toolbar-spritedButton {
109 - background: url(../images/wikiEditor/toolbar/button-sprite.png?1) 0 0 no-repeat;
110 - display: block;
111 - float: left;
112 - height: 22px;
113 - text-indent: -9999px;
114 - width: 22px;
115 - padding: 2px;
116 - cursor: pointer;
117 - overflow: hidden;
118 -}
119 -/* Tabs */
120 -.wikiEditor-ui-toolbar .tabs {
121 - list-style: none;
122 - margin: 3px;
123 -}
124 -.wikiEditor-ui-toolbar .tabs span.tab {
125 - display: inline-block;
126 - float: left;
127 - line-height: 26px;
128 -}
129 -/* IGNORED BY IE6 */
130 -.wikiEditor-ui-toolbar .tabs > span.tab {
131 - display: block;
132 -}
133 -/* IGNORED BY IE6 */
134 -body.rtl .wikiEditor-ui-toolbar .tabs > span.tab {
135 - float: right;
136 -}
137 -.wikiEditor-ui-toolbar .tabs span.tab a,
138 -.wikiEditor-ui-toolbar .tabs span.tab a:visited {
139 - display: inline-block;
140 - float: left;
141 - padding-left: 18px;
142 - padding-right: 12px;
143 - height: 26px;
144 - cursor: pointer;
145 - color: #0645ad;
146 - background-image: url(../images/wikiEditor/toolbar/arrow-right.png?1);
147 - background-position: left center;
148 - background-repeat: no-repeat;
149 -}
150 -body.rtl .wikiEditor-ui-toolbar .tabs span.tab a,
151 -body.rtl .wikiEditor-ui-toolbar .tabs span.tab a:visited {
152 - padding-left: 12px;
153 - padding-right: 18px;
154 - background-image: url(../images/wikiEditor/toolbar/arrow-left.png?1);
155 - background-position: right center;
156 -}
157 -/* IGNORED BY IE6 */
158 -body.rtl .wikiEditor-ui-toolbar .tabs > span.tab > a,
159 -body.rtl .wikiEditor-ui-toolbar .tabs > pan.tab > a:visited {
160 - float: right;
161 -}
162 -.wikiEditor-ui-toolbar .tabs span.tab a.current,
163 -.wikiEditor-ui-toolbar .tabs span.tab a.current:visited {
164 - color: #333333;
165 - background-image: url(../images/wikiEditor/toolbar/arrow-down.png?1);
166 -}
167 -body.rtl .wikiEditor-ui-toolbar .tabs span.tab a.current,
168 -body.rtl .wikiEditor-ui-toolbar .tabs span.tab a.current:visited {
169 - background-image: url(../images/wikiEditor/toolbar/arrow-down.png?1);
170 -}
171 -.wikiEditor-ui-toolbar .tabs span.tab a.current:hover {
172 - text-decoration: none;
173 -}
174 -.wikiEditor-ui-toolbar .tabs span.tab a.loading {
175 - background-image: url(../images/wikiEditor/toolbar/loading-small.gif?1) !important;
176 -}
177 -/* Toolbar */
178 -.wikiEditor-ui-toolbar .group .label {
179 - float: left;
180 - border: 0px;
181 - height: 22px;
182 - line-height: 22px;
183 - margin: 2px;
184 - margin-left: 5px;
185 - margin-right: 8px;
186 - color: #777777;
187 - cursor: default;
188 -}
189 -/* IGNORED BY IE6 */
190 -body.rtl .wikiEditor-ui-toolbar .group > .label {
191 - float: right;
192 - margin-left: 8px;
193 - margin-right: 5px;
194 -}
195 -.wikiEditor-ui-toolbar .group img.tool {
196 - float: left;
197 - border: 0px;
198 - height: 22px;
199 - width: 22px;
200 - padding: 2px;
201 - cursor: pointer;
202 -}
203 -/* IGNORED BY IE6 */
204 -body.rtl .wikiEditor-ui-toolbar .group > img.tool {
205 - float: right;
206 -}
207 -.wikiEditor-ui-toolbar .group .tool-select {
208 - float: left;
209 - margin: 2px;
210 - height: 22px;
211 - cursor: pointer;
212 - border: solid 1px silver;
213 - padding: 0;
214 - margin-right: 0;
215 - cursor: pointer;
216 - background-color: #ffffff;
217 -}
218 -/* IGNORED BY IE6 */
219 -body.rtl .wikiEditor-ui-toolbar .group > .tool-select {
220 - float: right;
221 -}
222 -.wikiEditor-ui-toolbar .group .tool-select .label {
223 - background-image: url(../images/wikiEditor/toolbar/arrow-down.png?1);
224 - background-position: center right;
225 - background-repeat: no-repeat;
226 - padding: 0;
227 - margin: 0;
228 - padding-left: 4px;
229 - padding-right: 22px;
230 - margin-right: 4px;
231 - cursor: pointer;
232 - text-decoration: none;
233 - color: #333333;
234 -}
235 -body.rtl .wikiEditor-ui-toolbar .group .tool-select .label {
236 - background-position: center left;
237 - padding-right: 4px;
238 - padding-left: 22px;
239 - margin-left: 4px;
240 - margin-right: 0;
241 -}
242 -body.rtl .wikiEditor-ui-toolbar .group .tool-select .menu {
243 - clear: both;
244 -}
245 -.wikiEditor-ui-toolbar .group .tool-select .menu .options {
246 - position: absolute;
247 - display: none;
248 - margin-left: -1px;
249 - border: solid 1px silver;
250 - background-color: #ffffff;
251 -}
252 -body.rtl .wikiEditor-ui-toolbar .group .tool-select .menu {
253 - margin-left: -1px;
254 - margin-right: -1px;
255 -}
256 -/* IGNORED BY IE6 */
257 -.wikiEditor-ui-toolbar .group .tool-select .options {
258 - margin-top: 22px;
259 -}
260 -.wikiEditor-ui-toolbar .group .tool-select .options .option {
261 - display: block;
262 - padding: 0.5em;
263 - text-decoration: none;
264 - color: black;
265 - white-space: nowrap;
266 -}
267 -.wikiEditor-ui-toolbar .group .tool-select .options .option:hover {
268 - background-color: #E0EEf7;
269 -}
270 -.wikiEditor-ui-toolbar .group .tool-select .options .option[rel=heading-2] {
271 - font-size: 150%;
272 - font-weight: normal;
273 -}
274 -.wikiEditor-ui-toolbar .group .tool-select .options .option[rel=heading-3] {
275 - font-size: 132%;
276 - font-weight: normal;
277 -}
278 -.wikiEditor-ui-toolbar .group .tool-select .options .option[rel=heading-4] {
279 - font-size: 116%;
280 - font-weight: normal;
281 -}
282 -.wikiEditor-ui-toolbar .group .tool-select .options .option[rel=heading-5] {
283 - font-size: 100%;
284 - font-weight: bold;
285 -}
286 -/* Booklet */
287 -.wikiEditor-ui-toolbar .booklet .index {
288 - float: left;
289 - width: 20%;
290 - height: 125px;
291 - overflow: auto;
292 -}
293 -body.rtl .wikiEditor-ui-toolbar .booklet .index {
294 - float: right;
295 -}
296 -.wikiEditor-ui-toolbar .booklet .index div {
297 - padding: 4px;
298 - padding-left: 6px;
299 - cursor: pointer;
300 - color: #0645ad;
301 -}
302 -body.rtl .wikiEditor-ui-toolbar .booklet .index div {
303 - padding-left: 4px;
304 - padding-right: 6px;
305 -}
306 -.wikiEditor-ui-toolbar .booklet .index .current {
307 - background-color: #FAFAFA;
308 - color: #333333;
309 - cursor: default;
310 -}
311 -.wikiEditor-ui-toolbar .booklet .pages {
312 - float: right;
313 - width: 80%;
314 - height: 125px;
315 - overflow: auto;
316 - background-color: #FAFAFA;
317 -}
318 -body.rtl .wikiEditor-ui-toolbar .booklet .pages {
319 - float: left;
320 -}
321 -/* Help Pages */
322 -.wikiEditor-ui-toolbar .page-table table {
323 - padding-left: 5px;
324 - padding-right: 5px;
325 - background: none;
326 -}
327 -.wikiEditor-ui-toolbar .page-table th {
328 - color: #999999;
329 -}
330 -.wikiEditor-ui-toolbar .page-table td {
331 - color: black;
332 - border-top: solid 1px #EEEEEE;
333 -}
334 -.wikiEditor-ui-toolbar .page-table th,
335 -.wikiEditor-ui-toolbar .page-table td {
336 - text-align: left;
337 - padding: 5px;
338 - margin: 0px;
339 -}
340 -body.rtl .wikiEditor-ui-toolbar .page-table th,
341 -body.rtl .wikiEditor-ui-toolbar .page-table td {
342 - text-align: right;
343 -}
344 -.wikiEditor-ui-toolbar .section-help .page-table td.cell-syntax,
345 -.wikiEditor-ui-toolbar .section-help .page-table td.syntax {
346 - font-family: monospace;
347 -}
348 -.wikiEditor-ui-toolbar .section-help .page-table td.syntax,
349 -.wikiEditor-ui-toolbar .section-help .page-table td.cell-syntax,
350 -.wikiEditor-ui-toolbar .section-help .page-table td.cell-result,
351 -.wikiEditor-ui-toolbar .section-help .page-table td.result {
352 - width: 40%;
353 -}
354 -.wikiEditor-ui-toolbar .section-help .page-table td.description,
355 -.wikiEditor-ui-toolbar .section-help .page-table td.description {
356 - width: 20%;
357 -}
358 -/* Characters Pages */
359 -.wikiEditor-ui-toolbar .page-characters div span {
360 - border: solid 1px #DDDDDD;
361 - padding: 5px;
362 - padding-left: 8px;
363 - padding-right: 8px;
364 - margin-left: 5px;
365 - margin-top: 5px;
366 - height: 1em;
367 - float: left;
368 - display: block;
369 - color: black;
370 - text-decoration: none;
371 - cursor: pointer;
372 - font-family: monospace;
373 - font-size: 1.25em;
374 -}
375 -body.rtl .wikiEditor-ui-toolbar .page-characters > div > span,
376 -.wikiEditor-ui-toolbar .page-characters div[dir=rtl] span {
377 - direction: rtl;
378 - float: right;
379 - margin-left: 0;
380 - margin-right: 5px;
381 -}
382 -.wikiEditor-ui-toolbar .page-characters div span:hover {
383 - background-color: white;
384 - text-decoration: none;
385 - border-color: #a8d7f9;
386 -}
387 -.ui-widget table td.wikieditor-toolbar-table-preview-wrapper span {
388 - padding: 4px 6px 0px;
389 - display: block;
390 -}
391 -.ui-widget table .wikieditor-toolbar-table-preview-frame {
392 - width: 340px;
393 - background: #fff;
394 - padding: 10px;
395 - overflow: hidden;
396 - display: block;
397 - position: relative;
398 -}
399 -.ui-widget table .wikieditor-toolbar-table-preview-content {
400 - width: 375px;
401 - display: block;
402 -}
403 -.ui-widget table .wikieditor-toolbar-table-preview {
404 - width: 340px;
405 -}
406 -.ui-widget table td.wikieditor-toolbar-table-preview-wrapper {
407 - background: #e5e5e5;
408 - padding: 10px;
409 -}
Index: trunk/extensions/WikiEditor/modules/jquery.wikiEditor.css
@@ -0,0 +1,117 @@
 2+/*
 3+ * CSS for WikiEditor jQuery plugin
 4+ */
 5+
 6+.wikiEditor-ui {
 7+ float: left;
 8+ position: relative;
 9+ clear: both;
 10+ width: 100%;
 11+ background-color: #E0EEf7;
 12+ border: solid silver 1px;
 13+}
 14+body.rtl .wikiEditor-ui {
 15+ float: right;
 16+}
 17+.wikiEditor-ui .wikiEditor-ui-bottom {
 18+
 19+}
 20+.wikiEditor-ui .wikiEditor-ui-text {
 21+ line-height: 0;
 22+}
 23+.wikiEditor-ui .wikiEditor-ui-top {
 24+ position: relative;
 25+ border-bottom: solid silver 1px;
 26+}
 27+.wikiEditor-ui .wikiEditor-ui-left {
 28+ float: left;
 29+ width: 100%;
 30+}
 31+body.rtl .wikiEditor-ui .wikiEditor-ui-left {
 32+ float: right;
 33+}
 34+.wikiEditor-ui .wikiEditor-ui-right {
 35+ float: right;
 36+ background: #F3F3F3;
 37+ overflow: hidden;
 38+}
 39+body.rtl .wikiEditor-ui .wikiEditor-ui-right {
 40+ float: left;
 41+}
 42+.wikiEditor-wikitext {
 43+ float: left;
 44+ width: 100%;
 45+}
 46+.wikiEditor-ui-controls {
 47+ float: left;
 48+ width: 100%;
 49+ background-color: white;
 50+ margin-top: -1px;
 51+ border-bottom: solid 1px silver;
 52+}
 53+.wikiEditor-ui-tabs {
 54+ float: left;
 55+ height: 2.5em;
 56+ margin-left: -1px;
 57+ background-color: white;
 58+ border-left: solid 1px silver;
 59+ border-top: solid 1px silver;
 60+}
 61+.wikiEditor-ui-buttons {
 62+ float: right;
 63+ height: 2.5em;
 64+ margin-right: -1px;
 65+ background-color: white;
 66+ padding-left: 1em;
 67+ border-top: solid 1px white;
 68+}
 69+.wikiEditor-ui-buttons button {
 70+ margin-left: 0.5em;
 71+}
 72+.wikiEditor-ui-tabs div {
 73+ float: left;
 74+ height: 2.5em;
 75+ background-color: #f3f3f3;
 76+ border-right: solid 1px silver;
 77+ border-bottom: solid 1px silver;
 78+}
 79+.wikiEditor-ui-tabs div.current {
 80+ border-bottom: solid 1px white;
 81+ background-color: white;
 82+}
 83+.wikiEditor-ui-tabs div a {
 84+ display: inline-block;
 85+ padding: 0 0.75em;
 86+ line-height: 2.5em;
 87+ color: #0645AD;
 88+}
 89+.wikiEditor-ui-tabs div.current a {
 90+ color: #333333;
 91+}
 92+.wikiEditor-ui-tabs div.current a:hover {
 93+ text-decoration: none;
 94+}
 95+
 96+.wikiEditor-view-wikitext {
 97+ line-height: 1em;
 98+}
 99+.wikiEditor-ui-loading {
 100+ background: #f3f3f3;
 101+ z-index: 10;
 102+ position: absolute;
 103+ top: 0;
 104+ left: 0;
 105+ text-align: center;
 106+ height: 100%;
 107+ width: 100%;
 108+ border: 1px solid silver;
 109+ margin: -1px;
 110+}
 111+.wikiEditor-ui-loading span {
 112+ display: block;
 113+ height: 24px;
 114+ width: 24px;
 115+ background: url(images/toolbar/loading.gif) 0 0 no-repeat;
 116+ text-indent: -9999px;
 117+ margin: 0 auto;
 118+}
\ No newline at end of file
Property changes on: trunk/extensions/WikiEditor/modules/jquery.wikiEditor.css
___________________________________________________________________
Added: svn:eol-style
1119 + native
Index: trunk/extensions/WikiEditor/modules/jquery.wikiEditor.previewDialog.css
@@ -0,0 +1,34 @@
 2+/*
 3+ * CSS for WikiEditor Preview Dialog jQuery plugin
 4+ */
 5+
 6+/* FIXME: This only works for the first wikiEditor on the page! */
 7+#wikiEditor-0-preview-dialog .wikiEditor-ui-loading {
 8+ background: #f3f3f3;
 9+ z-index: 10;
 10+ position: absolute;
 11+ left: 0;
 12+ text-align: center;
 13+ height: 100%;
 14+ width: 100%;
 15+ overflow: hidden;
 16+ border: none;
 17+}
 18+/* FIXME: This only works for the first wikiEditor on the page! */
 19+#wikiEditor-0-preview-dialog .wikiEditor-ui-loading span {
 20+ display: block;
 21+ height: 24px;
 22+ width: 24px;
 23+ background: url(images/toolbar/loading.gif) 0 0 no-repeat;
 24+ text-indent: -9999px;
 25+ margin: 50px auto;
 26+}
 27+.ui-dialog .ui-dialog-buttonpane {
 28+ margin: 0 !important;
 29+}
 30+.wikiEditor-preview-dialog-contents {
 31+ font-size: 0.9em !important;
 32+}
 33+.wikiEditor-preview-dialog-contents #firstHeading {
 34+ font-size: 2.1em;
 35+}
\ No newline at end of file
Property changes on: trunk/extensions/WikiEditor/modules/jquery.wikiEditor.previewDialog.css
___________________________________________________________________
Added: svn:eol-style
136 + native
Index: trunk/extensions/WikiEditor/modules/jquery.wikiEditor.toolbar.css
@@ -0,0 +1,409 @@
 2+/*
 3+ * CSS for WikiEditor Toolbar jQuery plugin
 4+ */
 5+
 6+.wikiEditor-ui-toolbar {
 7+ position: relative;
 8+ width: 100%;
 9+}
 10+/* Expandable Sections */
 11+.wikiEditor-ui-toolbar .sections {
 12+ float: left;
 13+ width: 100%;
 14+ clear: both;
 15+ height: 0;
 16+}
 17+body.rtl .wikiEditor-ui-toolbar .sections {
 18+ float: right;
 19+}
 20+.wikiEditor-ui-toolbar .sections .section {
 21+ display: none;
 22+ float: left;
 23+ width: 100%;
 24+ border-top: solid 1px #DDDDDD;
 25+ background-color: #E0EEf7;
 26+}
 27+.wikiEditor-ui-toolbar {
 28+ background-image: url(images/toolbar/base.png);
 29+ background-position: left top;
 30+ background-repeat: repeat-x;
 31+}
 32+/*
 33+.wikiEditor-ui-toolbar .toolbar {
 34+ background-image: url(../images/wikiEditor/toolbar/base.png?1);
 35+ background-position: left top;
 36+}
 37+*/
 38+body.rtl .wikiEditor-ui-toolbar .sections .section {
 39+ float: right;
 40+}
 41+/* Gets overridden when the section div is in class loading - see below */
 42+.wikiEditor-ui-toolbar .sections div .spinner {
 43+ display: none;
 44+}
 45+.wikiEditor-ui-toolbar .sections .loading .spinner {
 46+ display: block;
 47+ background-image: url(images/toolbar/loading.gif);
 48+ background-position: left center;
 49+ background-repeat: no-repeat;
 50+ padding-left: 32px;
 51+ margin-left: 0.5em;
 52+ height: 32px;
 53+ float: left;
 54+ color: #666666;
 55+}
 56+body.rtl .wikiEditor-ui-toolbar .sections .loading .spinner {
 57+ background-position: right center;
 58+ padding-left: 0;
 59+ padding-right: 32px;
 60+ margin-left: 0;
 61+ margin-right: 0.5em;
 62+ float: right;
 63+}
 64+/* Top Level Containers */
 65+.wikiEditor-ui-toolbar .tabs,
 66+.wikiEditor-ui-toolbar .section-main {
 67+ position: relative;
 68+ float: left;
 69+ height: 26px;
 70+}
 71+body.rtl .wikiEditor-ui-toolbar .tabs,
 72+body.rtl .wikiEditor-ui-toolbar .section-main {
 73+ float: right;
 74+}
 75+/* Groups */
 76+.wikiEditor-ui-toolbar .group {
 77+ float: left;
 78+ height: 26px;
 79+ padding-right: 6px;
 80+ border-right: solid 1px #DDDDDD;
 81+ margin: 3px;
 82+}
 83+body.rtl .wikiEditor-ui-toolbar .group {
 84+ float: right;
 85+ padding-right: 0;
 86+ padding-left: 6px;
 87+ border-right: none;
 88+ border-left: solid 1px #DDDDDD;
 89+}
 90+.wikiEditor-ui-toolbar .group-search {
 91+ float: right;
 92+ padding: 0 0 0 6px;
 93+ border-right: none;
 94+ border-left: 1px solid #DDDDDD;
 95+}
 96+.wikiEditor-ui-toolbar .group-insert {
 97+ border-right: none;
 98+}
 99+body.rtl .wikiEditor-ui-toolbar .group-search {
 100+ float: left;
 101+ padding: 0 6px 0 0;
 102+ border-left: none;
 103+ border-right: 1px solid #DDDDDD;
 104+}
 105+body.rtl .wikiEditor-ui-toolbar .group-insert {
 106+ border-left: none;
 107+}
 108+/* Sprited Buttons */
 109+.wikiEditor-toolbar-spritedButton {
 110+ background: url(images/toolbar/button-sprite.png) 0 0 no-repeat;
 111+ display: block;
 112+ float: left;
 113+ height: 22px;
 114+ text-indent: -9999px;
 115+ width: 22px;
 116+ padding: 2px;
 117+ cursor: pointer;
 118+ overflow: hidden;
 119+}
 120+/* Tabs */
 121+.wikiEditor-ui-toolbar .tabs {
 122+ list-style: none;
 123+ margin: 3px;
 124+}
 125+.wikiEditor-ui-toolbar .tabs span.tab {
 126+ display: inline-block;
 127+ float: left;
 128+ line-height: 26px;
 129+}
 130+/* IGNORED BY IE6 */
 131+.wikiEditor-ui-toolbar .tabs > span.tab {
 132+ display: block;
 133+}
 134+/* IGNORED BY IE6 */
 135+body.rtl .wikiEditor-ui-toolbar .tabs > span.tab {
 136+ float: right;
 137+}
 138+.wikiEditor-ui-toolbar .tabs span.tab a,
 139+.wikiEditor-ui-toolbar .tabs span.tab a:visited {
 140+ display: inline-block;
 141+ float: left;
 142+ padding-left: 18px;
 143+ padding-right: 12px;
 144+ height: 26px;
 145+ cursor: pointer;
 146+ color: #0645ad;
 147+ background-image: url(images/toolbar/arrow-right.png);
 148+ background-position: left center;
 149+ background-repeat: no-repeat;
 150+}
 151+body.rtl .wikiEditor-ui-toolbar .tabs span.tab a,
 152+body.rtl .wikiEditor-ui-toolbar .tabs span.tab a:visited {
 153+ padding-left: 12px;
 154+ padding-right: 18px;
 155+ background-image: url(images/toolbar/arrow-left.png);
 156+ background-position: right center;
 157+}
 158+/* IGNORED BY IE6 */
 159+body.rtl .wikiEditor-ui-toolbar .tabs > span.tab > a,
 160+body.rtl .wikiEditor-ui-toolbar .tabs > pan.tab > a:visited {
 161+ float: right;
 162+}
 163+.wikiEditor-ui-toolbar .tabs span.tab a.current,
 164+.wikiEditor-ui-toolbar .tabs span.tab a.current:visited {
 165+ color: #333333;
 166+ background-image: url(images/toolbar/arrow-down.png);
 167+}
 168+body.rtl .wikiEditor-ui-toolbar .tabs span.tab a.current,
 169+body.rtl .wikiEditor-ui-toolbar .tabs span.tab a.current:visited {
 170+ background-image: url(images/toolbar/arrow-down.png);
 171+}
 172+.wikiEditor-ui-toolbar .tabs span.tab a.current:hover {
 173+ text-decoration: none;
 174+}
 175+.wikiEditor-ui-toolbar .tabs span.tab a.loading {
 176+ background-image: url(images/toolbar/loading-small.gif) !important;
 177+}
 178+/* Toolbar */
 179+.wikiEditor-ui-toolbar .group .label {
 180+ float: left;
 181+ border: 0px;
 182+ height: 22px;
 183+ line-height: 22px;
 184+ margin: 2px;
 185+ margin-left: 5px;
 186+ margin-right: 8px;
 187+ color: #777777;
 188+ cursor: default;
 189+}
 190+/* IGNORED BY IE6 */
 191+body.rtl .wikiEditor-ui-toolbar .group > .label {
 192+ float: right;
 193+ margin-left: 8px;
 194+ margin-right: 5px;
 195+}
 196+.wikiEditor-ui-toolbar .group img.tool {
 197+ float: left;
 198+ border: 0px;
 199+ height: 22px;
 200+ width: 22px;
 201+ padding: 2px;
 202+ cursor: pointer;
 203+}
 204+/* IGNORED BY IE6 */
 205+body.rtl .wikiEditor-ui-toolbar .group > img.tool {
 206+ float: right;
 207+}
 208+.wikiEditor-ui-toolbar .group .tool-select {
 209+ float: left;
 210+ margin: 2px;
 211+ height: 22px;
 212+ cursor: pointer;
 213+ border: solid 1px silver;
 214+ padding: 0;
 215+ margin-right: 0;
 216+ cursor: pointer;
 217+ background-color: #ffffff;
 218+}
 219+/* IGNORED BY IE6 */
 220+body.rtl .wikiEditor-ui-toolbar .group > .tool-select {
 221+ float: right;
 222+}
 223+.wikiEditor-ui-toolbar .group .tool-select .label {
 224+ background-image: url(images/toolbar/arrow-down.png);
 225+ background-position: center right;
 226+ background-repeat: no-repeat;
 227+ padding: 0;
 228+ margin: 0;
 229+ padding-left: 4px;
 230+ padding-right: 22px;
 231+ margin-right: 4px;
 232+ cursor: pointer;
 233+ text-decoration: none;
 234+ color: #333333;
 235+}
 236+body.rtl .wikiEditor-ui-toolbar .group .tool-select .label {
 237+ background-position: center left;
 238+ padding-right: 4px;
 239+ padding-left: 22px;
 240+ margin-left: 4px;
 241+ margin-right: 0;
 242+}
 243+body.rtl .wikiEditor-ui-toolbar .group .tool-select .menu {
 244+ clear: both;
 245+}
 246+.wikiEditor-ui-toolbar .group .tool-select .menu .options {
 247+ position: absolute;
 248+ display: none;
 249+ margin-left: -1px;
 250+ border: solid 1px silver;
 251+ background-color: #ffffff;
 252+}
 253+body.rtl .wikiEditor-ui-toolbar .group .tool-select .menu {
 254+ margin-left: -1px;
 255+ margin-right: -1px;
 256+}
 257+/* IGNORED BY IE6 */
 258+.wikiEditor-ui-toolbar .group .tool-select .options {
 259+ margin-top: 22px;
 260+}
 261+.wikiEditor-ui-toolbar .group .tool-select .options .option {
 262+ display: block;
 263+ padding: 0.5em;
 264+ text-decoration: none;
 265+ color: black;
 266+ white-space: nowrap;
 267+}
 268+.wikiEditor-ui-toolbar .group .tool-select .options .option:hover {
 269+ background-color: #E0EEf7;
 270+}
 271+.wikiEditor-ui-toolbar .group .tool-select .options .option[rel=heading-2] {
 272+ font-size: 150%;
 273+ font-weight: normal;
 274+}
 275+.wikiEditor-ui-toolbar .group .tool-select .options .option[rel=heading-3] {
 276+ font-size: 132%;
 277+ font-weight: normal;
 278+}
 279+.wikiEditor-ui-toolbar .group .tool-select .options .option[rel=heading-4] {
 280+ font-size: 116%;
 281+ font-weight: normal;
 282+}
 283+.wikiEditor-ui-toolbar .group .tool-select .options .option[rel=heading-5] {
 284+ font-size: 100%;
 285+ font-weight: bold;
 286+}
 287+/* Booklet */
 288+.wikiEditor-ui-toolbar .booklet .index {
 289+ float: left;
 290+ width: 20%;
 291+ height: 125px;
 292+ overflow: auto;
 293+}
 294+body.rtl .wikiEditor-ui-toolbar .booklet .index {
 295+ float: right;
 296+}
 297+.wikiEditor-ui-toolbar .booklet .index div {
 298+ padding: 4px;
 299+ padding-left: 6px;
 300+ cursor: pointer;
 301+ color: #0645ad;
 302+}
 303+body.rtl .wikiEditor-ui-toolbar .booklet .index div {
 304+ padding-left: 4px;
 305+ padding-right: 6px;
 306+}
 307+.wikiEditor-ui-toolbar .booklet .index .current {
 308+ background-color: #FAFAFA;
 309+ color: #333333;
 310+ cursor: default;
 311+}
 312+.wikiEditor-ui-toolbar .booklet .pages {
 313+ float: right;
 314+ width: 80%;
 315+ height: 125px;
 316+ overflow: auto;
 317+ background-color: #FAFAFA;
 318+}
 319+body.rtl .wikiEditor-ui-toolbar .booklet .pages {
 320+ float: left;
 321+}
 322+/* Help Pages */
 323+.wikiEditor-ui-toolbar .page-table table {
 324+ padding-left: 5px;
 325+ padding-right: 5px;
 326+ background: none;
 327+}
 328+.wikiEditor-ui-toolbar .page-table th {
 329+ color: #999999;
 330+}
 331+.wikiEditor-ui-toolbar .page-table td {
 332+ color: black;
 333+ border-top: solid 1px #EEEEEE;
 334+}
 335+.wikiEditor-ui-toolbar .page-table th,
 336+.wikiEditor-ui-toolbar .page-table td {
 337+ text-align: left;
 338+ padding: 5px;
 339+ margin: 0px;
 340+}
 341+body.rtl .wikiEditor-ui-toolbar .page-table th,
 342+body.rtl .wikiEditor-ui-toolbar .page-table td {
 343+ text-align: right;
 344+}
 345+.wikiEditor-ui-toolbar .section-help .page-table td.cell-syntax,
 346+.wikiEditor-ui-toolbar .section-help .page-table td.syntax {
 347+ font-family: monospace;
 348+}
 349+.wikiEditor-ui-toolbar .section-help .page-table td.syntax,
 350+.wikiEditor-ui-toolbar .section-help .page-table td.cell-syntax,
 351+.wikiEditor-ui-toolbar .section-help .page-table td.cell-result,
 352+.wikiEditor-ui-toolbar .section-help .page-table td.result {
 353+ width: 40%;
 354+}
 355+.wikiEditor-ui-toolbar .section-help .page-table td.description,
 356+.wikiEditor-ui-toolbar .section-help .page-table td.description {
 357+ width: 20%;
 358+}
 359+/* Characters Pages */
 360+.wikiEditor-ui-toolbar .page-characters div span {
 361+ border: solid 1px #DDDDDD;
 362+ padding: 5px;
 363+ padding-left: 8px;
 364+ padding-right: 8px;
 365+ margin-left: 5px;
 366+ margin-top: 5px;
 367+ height: 1em;
 368+ float: left;
 369+ display: block;
 370+ color: black;
 371+ text-decoration: none;
 372+ cursor: pointer;
 373+ font-family: monospace;
 374+ font-size: 1.25em;
 375+}
 376+body.rtl .wikiEditor-ui-toolbar .page-characters > div > span,
 377+.wikiEditor-ui-toolbar .page-characters div[dir=rtl] span {
 378+ direction: rtl;
 379+ float: right;
 380+ margin-left: 0;
 381+ margin-right: 5px;
 382+}
 383+.wikiEditor-ui-toolbar .page-characters div span:hover {
 384+ background-color: white;
 385+ text-decoration: none;
 386+ border-color: #a8d7f9;
 387+}
 388+.ui-widget table td.wikieditor-toolbar-table-preview-wrapper span {
 389+ padding: 4px 6px 0px;
 390+ display: block;
 391+}
 392+.ui-widget table .wikieditor-toolbar-table-preview-frame {
 393+ width: 340px;
 394+ background: #fff;
 395+ padding: 10px;
 396+ overflow: hidden;
 397+ display: block;
 398+ position: relative;
 399+}
 400+.ui-widget table .wikieditor-toolbar-table-preview-content {
 401+ width: 375px;
 402+ display: block;
 403+}
 404+.ui-widget table .wikieditor-toolbar-table-preview {
 405+ width: 340px;
 406+}
 407+.ui-widget table td.wikieditor-toolbar-table-preview-wrapper {
 408+ background: #e5e5e5;
 409+ padding: 10px;
 410+}
Property changes on: trunk/extensions/WikiEditor/modules/jquery.wikiEditor.toolbar.css
___________________________________________________________________
Added: svn:eol-style
1411 + native
Index: trunk/extensions/WikiEditor/modules/wikiEditor.templates.js
@@ -1,16 +1,12 @@
2 -/* JavaScript for WikiEditor Templates module */
 2+/*
 3+ * JavaScript for WikiEditor Templates
 4+ */
35
4 -$j(document).ready( function() {
5 - // Check preferences for templates
6 - if ( !wgWikiEditorEnabledModules.templates ) {
7 - return true;
8 - }
 6+$( document ).ready( function() {
97 // Disable for template namespace
10 - if ( wgNamespaceNumber == 10 ) {
 8+ if ( mediaWiki.config.get( 'wgNamespaceNumber' ) == 10 ) {
119 return true;
1210 }
13 - // Add the templates module
14 - if ( $j.fn.wikiEditor ) {
15 - $j( 'textarea#wpTextbox1' ).wikiEditor( 'addModule', 'templates' );
16 - }
17 -});
 11+ // Add templates module
 12+ $( '#wpTextbox1' ).wikiEditor( 'addModule', 'templates' );
 13+} );
\ No newline at end of file
Index: trunk/extensions/WikiEditor/modules/wikiEditor.dialogs.css
@@ -1,108 +1,8 @@
2 -/* wikiEditor dialogs module */
 2+/*
 3+ * CSS for WikiEditor Dialogs
 4+ */
35
4 -.wikiEditor-toolbar-dialog table {
5 - margin-top: 0.75em;
6 -}
7 -.wikiEditor-toolbar-dialog table td {
8 - padding: 0.5em;
9 - height: 3em;
10 - overflow: visible;
11 -}
12 -/* Put suggestions (default z-index 99) on top of dialogs (z-index 1002) */
13 -div.suggestions {
14 - z-index: 1099;
15 -}
16 -.wikiEditor-toolbar-dialog .ui-dialog-titlebar-close:hover {
17 - text-decoration: none;
18 -}
19 -.wikiEditor-toolbar-dialog .ui-dialog-content .status-invalid input {
20 - border: 2px solid red;
21 - padding: 2px 1px;
22 -}
23 -.wikiEditor-toolbar-dialog .ui-dialog-titlebar {
24 - padding: 0.9em 1.4em 0.6em !important;
25 -}
26 -.wikiEditor-toolbar-dialog table td {
27 - padding: 0 !important;
28 -}
29 -.wikiEditor-toolbar-dialog .ui-dialog-buttonpane button {
30 - -moz-border-radius: 4px;
31 - -webkit-border-radius: 4px;
32 - padding: 0.2em 0.6em 0.15em !important;
33 - margin: 0.5em 0 0.5em 0.4em !important;
34 - border: 1px solid #a6a6a6 !important;
35 - background: #f2f2f2 url( ../images/wikiEditor/dialogs/button_off.png?1) repeat-x scroll 50% 100% !important;
36 -}
37 -.wikiEditor-toolbar-dialog .ui-dialog-buttonpane button:hover {
38 - border-color: #6e7273;
39 - background: #e1e1e1 url( ../images/wikiEditor/dialogs/button_over.png?1) repeat-x scroll 50% 100% !important;
40 -}
41 -.wikiEditor-toolbar-dialog .ui-dialog-buttonpane button:active,
42 -.wikiEditor-toolbar-dialog .ui-dialog-buttonpane button:focus {
43 - border-color: #707271;
44 - background: #bfbfbf url( ../images/wikiEditor/dialogs/button_down.png?1) repeat-x scroll 50% 100% !important;
45 -}
46 -.wikiEditor-toolbar-dialog .ui-dialog-buttonpane button.disabled {
47 - color: #7f7f7f;
48 - border-color: #cccccc;
49 - background: #f2f2f2 url( ../images/wikiEditor/dialogs/button_disabled.png?1) repeat-x scroll 50% 100% !important;
50 -}
51 -/* Disables the annoying dashed border Firefox puts on active buttons */
52 -.wikiEditor-toolbar-dialog .ui-dialog-buttonpane button::-moz-focus-inner {
53 - border: 0;
54 -}
55 -.wikiEditor-toolbar-dialog .ui-widget-header {
56 - background: #f0f0f0 url( ../images/wikiEditor/dialogs/titlebar_fade.png?1) repeat-x scroll 50% 100% !important;
57 -}
58 -/* FIXME: Should just update the icon sprite if we're keeping this X */
59 -.wikiEditor-toolbar-dialog .ui-icon-closethick {
60 - background: url( ../images/wikiEditor/dialogs/close_x.png?1) no-repeat 50% 50% !important;
61 -}
62 -.wikiEditor-toolbar-dialog .ui-dialog-buttonpane {
63 - margin-top: 0 !important;
64 - padding:0.3em 1.4em 0.5em 1.4em !important;
65 -}
66 -
67 -.wikiEditor-toolbar-dialog .ui-dialog-content fieldset{
68 - border: none !important;
69 - margin: 0 !important;
70 - padding: 0 !important;
71 -}
72 -.wikiEditor-toolbar-dialog .ui-widget-header {
73 - border-bottom:1px solid #6bc8f3 !important;
74 -}
75 -.wikiEditor-toolbar-dialog .ui-dialog-content input[type=text] {
76 - -moz-box-sizing: border-box;
77 - -ms-box-sizing: border-box;
78 - -webkit-box-sizing: border-box;
79 - -khtml-box-sizing: border-box;
80 -}
81 -.wikiEditor-toolbar-dialog .ui-dialog-content input[type="radio"],
82 -.wikiEditor-toolbar-dialog .ui-dialog-content input[type="checkbox"] {
83 - margin-left: 0;
84 -}
85 -.wikiEditor-toolbar-dialog .ui-dialog-titlebar-close {
86 - padding: 0;
87 -}
88 -body.ltr .wikiEditor-toolbar-dialog .ui-dialog-titlebar-close {
89 - right: 0.9em;
90 -}
91 -.wikieditor-toolbar-field-wrapper {
92 - padding: 0 0 25px 0;
93 -}
94 -.wikieditor-toolbar-floated-field-wrapper {
95 - float: left;
96 - margin-right: 2em;
97 -}
98 -.wikieditor-toolbar-dialog-hint {
99 - color: #999999;
100 -}
101 -.wikiEditor-toolbar-dialog,
102 -.wikiEditor-toolbar-dialog .ui-widget-content {
103 - border: none !important;
104 -}
1056 /* Table Dialog */
106 -
1077 #wikieditor-toolbar-table-dialog fieldset {
1088 width: 218px;
1099 padding: 0;
@@ -152,8 +52,6 @@
15353 .wikieditor-toolbar-dialog-wrapper {
15454 width: 100%;
15555 }
156 -/* REPLACE Dialog */
157 -
15856 /* Insert Link Dialog */
15957 #wikieditor-toolbar-link-int-target-status {
16058 float: right;
@@ -178,18 +76,17 @@
17977 background-repeat: no-repeat;
18078 }
18179 #wikieditor-toolbar-link-int-target-status-exists {
182 - background-image: url( ../images/wikiEditor/dialogs/insert-link-exists.png?1);
 80+ background-image: url(images/dialogs/insert-link-exists.png);
18381 }
18482 #wikieditor-toolbar-link-int-target-status-notexists {
185 - background-image: url( ../images/wikiEditor/dialogs/insert-link-notexists.png?1);
 83+ background-image: url(images/dialogs/insert-link-notexists.png);
18684 }
18785 #wikieditor-toolbar-link-int-target-status-invalid {
188 - background-image: url( ../images/wikiEditor/dialogs/insert-link-invalid.png?1);
 86+ background-image: url(images/dialogs/insert-link-invalid.png);
18987 }
19088 #wikieditor-toolbar-link-int-target-status-external {
191 - background-image: url( ../images/wikiEditor/dialogs/insert-link-external.png?1);
 89+ background-image: url(images/dialogs/insert-link-external.png);
19290 }
193 -
19491 /* Reference Dialog */
19592 #wikieditor-toolbar-reference-dialog label {
19693 float: left;
@@ -230,7 +127,7 @@
231128 background-position: 100% 50%;
232129 }
233130 body.rtl #wikieditor-toolbar-link-int-target-status-external {
234 - background-image: url( ../images/wikiEditor/dialogs/insert-link-external-rtl.png?1);
 131+ background-image: url(images/dialogs/insert-link-external-rtl.png);
235132 }
236133 body.rtl #wikieditor-toolbar-reference-dialog label {
237134 float: right;
@@ -259,7 +156,6 @@
260157 .wikiEditor-template-dialog-fields .wikiEditor-template-dialog-field-wrapper:last-child {
261158 border-bottom: none;
262159 }
263 -
264160 /* Self Clearing Floats */
265161 .wikieditor-toolbar-table-dimension-fields:after,
266162 .wikieditor-toolbar-dialog-wrapper:after {
@@ -284,19 +180,16 @@
285181 display: block;
286182 }
287183 /* End hide from IE-mac */
288 -
289184 .wikiEditor-toolbar-dialog .ui-dialog-buttonpane {
290185 border-top: 1px solid #cccccc !important;
291186 }
292187 .wikiEditor-toolbar-dialog .ui-dialog-content {
293188 padding-bottom: 1em !important;
294189 }
295 -
296190 /* Edit dialog */
297191 .wikiEditor-dialog-editoptions {
298192 margin-top: 15px;
299193 }
300 -
301194 /* Publish dialog */
302195 .wikiEditor-publish-dialog-copywarn {
303196 margin-top: 0.5em;
@@ -306,4 +199,4 @@
307200 }
308201 .wikiEditor-publish-dialog-options {
309202 margin-top: 1.5em;
310 -}
\ No newline at end of file
 203+}
Index: trunk/extensions/WikiEditor/modules/jquery.wikiEditor.preview.js
@@ -140,7 +140,7 @@
141141 }
142142 } );
143143
144 - var loadingMsg = mw.usability.getMsg( 'wikieditor-preview-loading' );
 144+ var loadingMsg = mediaWiki.msg.get( 'wikieditor-preview-loading' );
145145 context.modules.preview.$preview
146146 .add( context.$changesTab )
147147 .append( $( '<div />' )
Index: trunk/extensions/WikiEditor/modules/jquery.wikiEditor.dialogs.js
@@ -44,23 +44,21 @@
4545 $.wikiEditor.modules.dialogs.fn.create( context, data )
4646 },
4747 openDialog: function( context, module ) {
48 - mw.usability.load( [ '$j.ui', '$j.ui.dialog', '$j.ui.draggable', '$j.ui.resizable' ], function() {
49 - if ( module in $.wikiEditor.modules.dialogs.modules ) {
50 - var mod = $.wikiEditor.modules.dialogs.modules[module];
51 - var $dialog = $( '#' + mod.id );
52 - if ( $dialog.length == 0 ) {
53 - $.wikiEditor.modules.dialogs.fn.reallyCreate( context, mod );
54 - $dialog = $( '#' + mod.id );
55 - }
56 -
57 - // Workaround for bug in jQuery UI: close button in top right retains focus
58 - $dialog.closest( '.ui-dialog' )
59 - .find( '.ui-dialog-titlebar-close' )
60 - .removeClass( 'ui-state-focus' );
61 -
62 - $dialog.dialog( 'open' );
 48+ if ( module in $.wikiEditor.modules.dialogs.modules ) {
 49+ var mod = $.wikiEditor.modules.dialogs.modules[module];
 50+ var $dialog = $( '#' + mod.id );
 51+ if ( $dialog.length == 0 ) {
 52+ $.wikiEditor.modules.dialogs.fn.reallyCreate( context, mod );
 53+ $dialog = $( '#' + mod.id );
6354 }
64 - } );
 55+
 56+ // Workaround for bug in jQuery UI: close button in top right retains focus
 57+ $dialog.closest( '.ui-dialog' )
 58+ .find( '.ui-dialog-titlebar-close' )
 59+ .removeClass( 'ui-state-focus' );
 60+
 61+ $dialog.dialog( 'open' );
 62+ }
6563 },
6664 closeDialog: function( context, module ) {
6765 if ( module in $.wikiEditor.modules.dialogs.modules ) {
@@ -116,10 +114,10 @@
117115 configuration.title = $.wikiEditor.autoMsg( module, 'title' );
118116 // Transform messages in keys
119117 // Stupid JS won't let us do stuff like
120 - // foo = { mw.usability.getMsg( 'bar' ): baz }
 118+ // foo = { mediaWiki.msg.get( 'bar' ): baz }
121119 configuration.newButtons = {};
122120 for ( msg in configuration.buttons )
123 - configuration.newButtons[mw.usability.getMsg( msg )] = configuration.buttons[msg];
 121+ configuration.newButtons[mediaWiki.msg.get( msg )] = configuration.buttons[msg];
124122 configuration.buttons = configuration.newButtons;
125123 // Create the dialog <div>
126124 var dialogDiv = $( '<div />' )
@@ -191,7 +189,7 @@
192190 */
193191 setTabindexes: function( $elements ) {
194192 // Get the highest tab index
195 - var tabIndex = mw.usability.getMaxTabIndex() + 1;
 193+ var tabIndex = $( document ).lastTabIndex() + 1;
196194 $elements.each( function() {
197195 $j(this).attr( 'tabindex', tabIndex++ );
198196 } );
Index: trunk/extensions/WikiEditor/modules/jquery.wikiEditor.templateEditor.js
@@ -316,7 +316,7 @@
317317 </fieldset>',
318318 init: function() {
319319 $(this).find( '[rel]' ).each( function() {
320 - $(this).text( mw.usability.getMsg( $(this).attr( 'rel' ) ) );
 320+ $(this).text( mediaWiki.msg.get( $(this).attr( 'rel' ) ) );
321321 } );
322322 },
323323 dialog: {
Index: trunk/extensions/WikiEditor/modules/wikiEditor.previewDialog.js
@@ -1,12 +1,8 @@
2 -/* JavaScript for WikiEditor PreviewDialog module */
 2+/*
 3+ * JavaScript for WikiEditor Preview Dialog
 4+ */
35
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 -});
 6+$( document ).ready( function() {
 7+ // Add preview module
 8+ $( 'textarea#wpTextbox1' ).wikiEditor( 'addModule', 'previewDialog' );
 9+} );
Index: trunk/extensions/WikiEditor/modules/wikiEditor.js
@@ -0,0 +1,8 @@
 2+/*
 3+ * JavaScript for WikiEditor
 4+ */
 5+
 6+$( document ).ready( function() {
 7+ // Initialize wikiEditor
 8+ $( '#wpTextbox1' ).wikiEditor();
 9+} );
Property changes on: trunk/extensions/WikiEditor/modules/wikiEditor.js
___________________________________________________________________
Added: svn:eol-style
110 + native
Index: trunk/extensions/WikiEditor/modules/wikiEditor.toolbar.js
@@ -1,2124 +1,1034 @@
2 -/* JavaScript for WikiEditor Toolbar module */
 2+/*
 3+ * JavaScript for WikiEditor Toolbar
 4+ */
35
4 -$j(document).ready( function() {
5 - // Check preferences for toolbar
6 - if ( !wgWikiEditorEnabledModules.toolbar ) {
7 - return true;
 6+$( document ).ready( function() {
 7+ if ( !$.wikiEditor.isSupported( $.wikiEditor.modules.toolbar ) ) {
 8+ return;
89 }
9 - // Only show content generation dialogs if enabled
10 - if ( wgWikiEditorPreferences.toolbar.dialogs && $j.wikiEditor.isSupported( $j.wikiEditor.modules.dialogs ) ) {
11 - $j( '#wpTextbox1' ).addClass( 'toolbar-dialogs' );
 10+ // Some of the tools we're about to add depend on knowing if dialogs have been enabled or not, this little hack will
 11+ // add a class to the textarea that signals that they are or or not, so that the 'filters' property can be used
 12+ if ( mediaWiki.user.options.get( 'usebetatoolbar-cgd' ) ) {
 13+ if (
 14+ typeof $.wikiEditor.modules.dialogs !== 'undefined' &&
 15+ $.wikiEditor.isSupported( $.wikiEditor.modules.dialogs )
 16+ ) {
 17+ $( '#wpTextbox1' ).addClass( 'toolbar-dialogs' );
 18+ }
1219 }
13 - if ( $j.fn.wikiEditor && $j.wikiEditor.isSupported( $j.wikiEditor.modules.toolbar ) ) {
14 - // Remove the old toolbar
15 - $j( '#toolbar' ).remove();
16 - // Add toolbar module
17 - $j( '#wpTextbox1' ).wikiEditor( 'addModule', {
18 -'toolbar': {
19 - // Main section
20 - 'main': {
21 - type: 'toolbar',
22 - groups: {
23 - 'format': {
24 - tools: {
25 - 'bold': {
26 - labelMsg: 'wikieditor-toolbar-tool-bold',
27 - type: 'button',
28 - offset: {
29 - 'default': [2, -574],
30 - 'en': [2, -142],
31 - 'cs': [2, -142],
32 - 'de': [2, -214],
33 - 'fr': [2, -286],
34 - 'es': [2, -358],
35 - 'he': [2, -142],
36 - 'hu': [2, -214],
37 - 'it': [2, -286],
38 - 'nl': [2, -502],
39 - 'pt': [2, -358],
40 - 'pt-br': [2, -358],
41 - 'pl': [2, -142],
42 - 'ml': [2, -142]
 20+ // The old toolbar is still in place and needs to be removed so there aren't two toolbars
 21+ $( '#toolbar' ).remove();
 22+ // Add toolbar module
 23+ $( '#wpTextbox1' ).wikiEditor( 'addModule', { 'toolbar': {
 24+ // Main section
 25+ 'main': {
 26+ 'type': 'toolbar',
 27+ 'groups': {
 28+ 'format': {
 29+ 'tools': {
 30+ 'bold': {
 31+ 'labelMsg': 'wikieditor-toolbar-tool-bold',
 32+ 'type': 'button',
 33+ 'offset': {
 34+ 'default': [2, -574],
 35+ 'en': [2, -142],
 36+ 'cs': [2, -142],
 37+ 'de': [2, -214],
 38+ 'fr': [2, -286],
 39+ 'es': [2, -358],
 40+ 'he': [2, -142],
 41+ 'hu': [2, -214],
 42+ 'it': [2, -286],
 43+ 'nl': [2, -502],
 44+ 'pt': [2, -358],
 45+ 'pt-br': [2, -358],
 46+ 'pl': [2, -142],
 47+ 'ml': [2, -142]
 48+ },
 49+ 'icon': {
 50+ 'default': 'format-bold.png',
 51+ 'en': 'format-bold-B.png',
 52+ 'cs': 'format-bold-B.png',
 53+ 'de': 'format-bold-F.png',
 54+ 'fr': 'format-bold-G.png',
 55+ 'es': 'format-bold-N.png',
 56+ 'he': 'format-bold-B.png',
 57+ 'hu': 'format-bold-F.png',
 58+ 'it': 'format-bold-G.png',
 59+ 'ka': 'format-bold-ka.png',
 60+ 'nl': 'format-bold-V.png',
 61+ 'pt': 'format-bold-N.png',
 62+ 'pt-br': 'format-bold-N.png',
 63+ 'pl': 'format-bold-B.png',
 64+ 'ru': 'format-bold-ru.png',
 65+ 'ml': 'format-bold-B.png'
 66+ },
 67+ 'action': {
 68+ 'type': 'encapsulate',
 69+ 'options': {
 70+ 'pre': "'''",
 71+ 'periMsg': 'wikieditor-toolbar-tool-bold-example',
 72+ 'post': "'''"
 73+ }
 74+ }
4375 },
44 - icon: {
45 - 'default': 'format-bold.png',
46 - 'en': 'format-bold-B.png',
47 - 'cs': 'format-bold-B.png',
48 - 'de': 'format-bold-F.png',
49 - 'fr': 'format-bold-G.png',
50 - 'es': 'format-bold-N.png',
51 - 'he': 'format-bold-B.png',
52 - 'hu': 'format-bold-F.png',
53 - 'it': 'format-bold-G.png',
54 - 'ka': 'format-bold-ka.png',
55 - 'nl': 'format-bold-V.png',
56 - 'pt': 'format-bold-N.png',
57 - 'pt-br': 'format-bold-N.png',
58 - 'pl': 'format-bold-B.png',
59 - 'ru': 'format-bold-ru.png',
60 - 'ml': 'format-bold-B.png'
61 - },
62 - action: {
63 - type: 'encapsulate',
64 - options: {
65 - pre: "'''",
66 - periMsg: 'wikieditor-toolbar-tool-bold-example',
67 - post: "'''"
 76+ 'italic': {
 77+ 'section': 'main',
 78+ 'group': 'format',
 79+ 'id': 'italic',
 80+ 'labelMsg': 'wikieditor-toolbar-tool-italic',
 81+ 'type': 'button',
 82+ 'offset': {
 83+ 'default': [2, -718],
 84+ 'en': [2, -862],
 85+ 'cs': [2, -862],
 86+ 'de': [2, -934],
 87+ 'fr': [2, -862],
 88+ 'es': [2, -790],
 89+ 'he': [2, -862],
 90+ 'it': [2, -790],
 91+ 'nl': [2, -790],
 92+ 'pt': [2, -862],
 93+ 'pt-br': [2, -862],
 94+ 'pl': [2, -862],
 95+ 'ru': [2, -934],
 96+ 'ml': [2, -862]
 97+ },
 98+ 'icon': {
 99+ 'default': 'format-italic.png',
 100+ 'en': 'format-italic-I.png',
 101+ 'cs': 'format-italic-I.png',
 102+ 'de': 'format-italic-K.png',
 103+ 'fr': 'format-italic-I.png',
 104+ 'es': 'format-italic-C.png',
 105+ 'he': 'format-italic-I.png',
 106+ 'hu': 'format-italic-D.png',
 107+ 'it': 'format-italic-C.png',
 108+ 'ka': 'format-italic-ka.png',
 109+ 'nl': 'format-italic-C.png',
 110+ 'pt': 'format-italic-I.png',
 111+ 'pt-br': 'format-italic-I.png',
 112+ 'pl': 'format-italic-I.png',
 113+ 'ru': 'format-italic-K.png',
 114+ 'ml': 'format-italic-I.png'
 115+ },
 116+ 'action': {
 117+ 'type': 'encapsulate',
 118+ 'options': {
 119+ 'pre': "''",
 120+ 'periMsg': 'wikieditor-toolbar-tool-italic-example',
 121+ 'post': "''"
 122+ }
68123 }
69124 }
70 - },
71 - 'italic': {
72 - section: 'main',
73 - group: 'format',
74 - id: 'italic',
75 - labelMsg: 'wikieditor-toolbar-tool-italic',
76 - type: 'button',
77 - offset: {
78 - 'default': [2, -718],
79 - 'en': [2, -862],
80 - 'cs': [2, -862],
81 - 'de': [2, -934],
82 - 'fr': [2, -862],
83 - 'es': [2, -790],
84 - 'he': [2, -862],
85 - 'it': [2, -790],
86 - 'nl': [2, -790],
87 - 'pt': [2, -862],
88 - 'pt-br': [2, -862],
89 - 'pl': [2, -862],
90 - 'ru': [2, -934],
91 - 'ml': [2, -862]
 125+ }
 126+ },
 127+ 'insert': {
 128+ 'tools': {
 129+ 'xlink': {
 130+ 'labelMsg': 'wikieditor-toolbar-tool-xlink',
 131+ 'type': 'button',
 132+ 'icon': 'insert-xlink.png',
 133+ 'offset': [-70, 2],
 134+ 'filters': [ '#wpTextbox1:not(.toolbar-dialogs)' ],
 135+ 'action': {
 136+ 'type': 'encapsulate',
 137+ 'options': {
 138+ 'pre': "[",
 139+ 'periMsg': 'wikieditor-toolbar-tool-xlink-example',
 140+ 'post': "]"
 141+ }
 142+ }
92143 },
93 - icon: {
94 - 'default': 'format-italic.png',
95 - 'en': 'format-italic-I.png',
96 - 'cs': 'format-italic-I.png',
97 - 'de': 'format-italic-K.png',
98 - 'fr': 'format-italic-I.png',
99 - 'es': 'format-italic-C.png',
100 - 'he': 'format-italic-I.png',
101 - 'hu': 'format-italic-D.png',
102 - 'it': 'format-italic-C.png',
103 - 'ka': 'format-italic-ka.png',
104 - 'nl': 'format-italic-C.png',
105 - 'pt': 'format-italic-I.png',
106 - 'pt-br': 'format-italic-I.png',
107 - 'pl': 'format-italic-I.png',
108 - 'ru': 'format-italic-K.png',
109 - 'ml': 'format-italic-I.png'
 144+ 'ilink': {
 145+ 'labelMsg': 'wikieditor-toolbar-tool-ilink',
 146+ 'type': 'button',
 147+ 'icon': 'insert-ilink.png',
 148+ 'offset': [2, -1582],
 149+ 'filters': [ '#wpTextbox1:not(.toolbar-dialogs)' ],
 150+ 'action': {
 151+ 'type': 'encapsulate',
 152+ 'options': {
 153+ 'pre': "[[",
 154+ 'periMsg': 'wikieditor-toolbar-tool-ilink-example',
 155+ 'post': "]]"
 156+ }
 157+ }
110158 },
111 - action: {
112 - type: 'encapsulate',
113 - options: {
114 - pre: "''",
115 - periMsg: 'wikieditor-toolbar-tool-italic-example',
116 - post: "''"
 159+ 'linkCGD': {
 160+ 'labelMsg': 'wikieditor-toolbar-tool-link',
 161+ 'type': 'button',
 162+ 'icon': 'insert-link.png',
 163+ 'offset': [2, -1654],
 164+ 'filters': [ '#wpTextbox1.toolbar-dialogs' ],
 165+ 'action': {
 166+ 'type': 'dialog',
 167+ 'module': 'insert-link'
117168 }
118 - }
119 - }
120 - }
121 - },
122 - 'insert': {
123 - tools: {
124 - 'xlink': {
125 - labelMsg: 'wikieditor-toolbar-tool-xlink',
126 - type: 'button',
127 - icon: 'insert-xlink.png',
128 - offset: [-70, 2],
129 - filters: [ '#wpTextbox1:not(.toolbar-dialogs)' ],
130 - action: {
131 - type: 'encapsulate',
132 - options: {
133 - pre: "[",
134 - periMsg: 'wikieditor-toolbar-tool-xlink-example',
135 - post: "]"
 169+ },
 170+ 'file': {
 171+ 'labelMsg': 'wikieditor-toolbar-tool-file',
 172+ 'type': 'button',
 173+ 'icon': 'insert-file.png',
 174+ 'offset': [2, -1438],
 175+ 'action': {
 176+ 'type': 'encapsulate',
 177+ 'options': {
 178+ // FIXME: Why the hell was this done this way?
 179+ 'preMsg': [ 'wikieditor-toolbar-tool-file-pre', '[[' ],
 180+ 'periMsg': 'wikieditor-toolbar-tool-file-example',
 181+ 'post': "]]"
 182+ }
136183 }
137 - }
138 - },
139 - 'ilink': {
140 - labelMsg: 'wikieditor-toolbar-tool-ilink',
141 - type: 'button',
142 - icon: 'insert-ilink.png',
143 - offset: [2, -1582],
144 - filters: [ '#wpTextbox1:not(.toolbar-dialogs)' ],
145 - action: {
146 - type: 'encapsulate',
147 - options: {
148 - pre: "[[",
149 - periMsg: 'wikieditor-toolbar-tool-ilink-example',
150 - post: "]]"
 184+ },
 185+ 'referenceCGD': {
 186+ 'labelMsg': 'wikieditor-toolbar-tool-reference',
 187+ 'type': 'button',
 188+ 'icon': 'insert-reference.png',
 189+ 'offset': [2, -1798],
 190+ 'filters': [ 'body.ns-subject', '#wpTextbox1.toolbar-dialogs' ],
 191+ 'action': {
 192+ 'type': 'dialog',
 193+ 'module': 'insert-reference'
151194 }
152 - }
153 - },
154 - 'linkCGD': {
155 - labelMsg: 'wikieditor-toolbar-tool-link',
156 - type: 'button',
157 - icon: 'insert-link.png',
158 - offset: [2, -1654],
159 - filters: [ '#wpTextbox1.toolbar-dialogs' ],
160 - action: {
161 - type: 'dialog',
162 - module: 'insert-link'
163 - }
164 - },
165 - 'file': {
166 - labelMsg: 'wikieditor-toolbar-tool-file',
167 - type: 'button',
168 - icon: 'insert-file.png',
169 - offset: [2, -1438],
170 - action: {
171 - type: 'encapsulate',
172 - options: {
173 - // FIXME: Why the hell was this done this way?
174 - preMsg: [ 'wikieditor-toolbar-tool-file-pre', '[[' ],
175 - periMsg: 'wikieditor-toolbar-tool-file-example',
176 - post: "]]"
 195+ },
 196+ 'reference': {
 197+ 'labelMsg': 'wikieditor-toolbar-tool-reference',
 198+ 'filters': [ 'body.ns-subject', '#wpTextbox1:not(.toolbar-dialogs)' ],
 199+ 'type': 'button',
 200+ 'offset': [2, -1798],
 201+ 'icon': 'insert-reference.png',
 202+ 'action': {
 203+ 'type': 'encapsulate',
 204+ 'options': {
 205+ 'pre': "<ref>",
 206+ 'periMsg': 'wikieditor-toolbar-tool-reference-example',
 207+ 'post': "</ref>"
 208+ }
177209 }
178 - }
179 - },
180 - 'referenceCGD': {
181 - labelMsg: 'wikieditor-toolbar-tool-reference',
182 - type: 'button',
183 - icon: 'insert-reference.png',
184 - offset: [2, -1798],
185 - filters: [ 'body.ns-subject', '#wpTextbox1.toolbar-dialogs' ],
186 - action: {
187 - type: 'dialog',
188 - module: 'insert-reference'
189 - }
190 - },
191 - 'reference': {
192 - labelMsg: 'wikieditor-toolbar-tool-reference',
193 - filters: [ 'body.ns-subject', '#wpTextbox1:not(.toolbar-dialogs)' ],
194 - type: 'button',
195 - offset: [2, -1798],
196 - icon: 'insert-reference.png',
197 - action: {
198 - type: 'encapsulate',
199 - options: {
200 - pre: "<ref>",
201 - periMsg: 'wikieditor-toolbar-tool-reference-example',
202 - post: "</ref>"
 210+ },
 211+ 'signature': {
 212+ 'labelMsg': 'wikieditor-toolbar-tool-signature',
 213+ 'filters': [ 'body:not(.ns-0)' ],
 214+ 'type': 'button',
 215+ 'offset': [2, -1872],
 216+ 'icon': 'insert-signature.png',
 217+ 'action': {
 218+ 'type': 'encapsulate',
 219+ 'options': {
 220+ 'post': "--~~~~"
 221+ }
203222 }
204223 }
205 - },
206 - 'signature': {
207 - labelMsg: 'wikieditor-toolbar-tool-signature',
208 - filters: [ 'body:not(.ns-0)' ],
209 - type: 'button',
210 - offset: [2, -1872],
211 - icon: 'insert-signature.png',
212 - action: {
213 - type: 'encapsulate',
214 - options: {
215 - post: "--~~~~"
216 - }
217 - }
218224 }
219225 }
220226 }
221 - }
222 - },
223 - // Format section
224 - 'advanced': {
225 - labelMsg: 'wikieditor-toolbar-section-advanced',
226 - type: 'toolbar',
227 - groups: {
228 - 'heading': {
229 - tools: {
230 - 'heading': {
231 - labelMsg: 'wikieditor-toolbar-tool-heading',
232 - type: 'select',
233 - list: {
234 - 'heading-2' : {
235 - labelMsg: 'wikieditor-toolbar-tool-heading-2',
236 - action: {
237 - type: 'encapsulate',
238 - options: {
239 - pre: '== ',
240 - periMsg: 'wikieditor-toolbar-tool-heading-example',
241 - post: ' ==',
242 - regex: /^(\s*)(={1,6})(.*?)\2(\s*)$/,
243 - regexReplace: "\$1==\$3==\$4",
244 - ownline: true
 227+ },
 228+ // Format section
 229+ 'advanced': {
 230+ 'labelMsg': 'wikieditor-toolbar-section-advanced',
 231+ 'type': 'toolbar',
 232+ 'groups': {
 233+ 'heading': {
 234+ 'tools': {
 235+ 'heading': {
 236+ 'labelMsg': 'wikieditor-toolbar-tool-heading',
 237+ 'type': 'select',
 238+ 'list': {
 239+ 'heading-2' : {
 240+ 'labelMsg': 'wikieditor-toolbar-tool-heading-2',
 241+ 'action': {
 242+ 'type': 'encapsulate',
 243+ 'options': {
 244+ 'pre': '== ',
 245+ 'periMsg': 'wikieditor-toolbar-tool-heading-example',
 246+ 'post': ' ==',
 247+ 'regex': /^(\s*)(={1,6})(.*?)\2(\s*)$/,
 248+ 'regexReplace': "\$1==\$3==\$4",
 249+ 'ownline': true
 250+ }
245251 }
246 - }
247 - },
248 - 'heading-3' : {
249 - labelMsg: 'wikieditor-toolbar-tool-heading-3',
250 - action: {
251 - type: 'encapsulate',
252 - options: {
253 - pre: '=== ',
254 - periMsg: 'wikieditor-toolbar-tool-heading-example',
255 - post: ' ===',
256 - regex: /^(\s*)(={1,6})(.*?)\2(\s*)$/,
257 - regexReplace: "\$1===\$3===\$4",
258 - ownline: true
 252+ },
 253+ 'heading-3' : {
 254+ 'labelMsg': 'wikieditor-toolbar-tool-heading-3',
 255+ 'action': {
 256+ 'type': 'encapsulate',
 257+ 'options': {
 258+ 'pre': '=== ',
 259+ 'periMsg': 'wikieditor-toolbar-tool-heading-example',
 260+ 'post': ' ===',
 261+ 'regex': /^(\s*)(={1,6})(.*?)\2(\s*)$/,
 262+ 'regexReplace': "\$1===\$3===\$4",
 263+ 'ownline': true
 264+ }
259265 }
260 - }
261 - },
262 - 'heading-4' : {
263 - labelMsg: 'wikieditor-toolbar-tool-heading-4',
264 - action: {
265 - type: 'encapsulate',
266 - options: {
267 - pre: '==== ',
268 - periMsg: 'wikieditor-toolbar-tool-heading-example',
269 - post: ' ====',
270 - regex: /^(\s*)(={1,6})(.*?)\2(\s*)$/,
271 - regexReplace: "\$1====\$3====\$4",
272 - ownline: true
 266+ },
 267+ 'heading-4' : {
 268+ 'labelMsg': 'wikieditor-toolbar-tool-heading-4',
 269+ 'action': {
 270+ 'type': 'encapsulate',
 271+ 'options': {
 272+ 'pre': '==== ',
 273+ 'periMsg': 'wikieditor-toolbar-tool-heading-example',
 274+ 'post': ' ====',
 275+ 'regex': /^(\s*)(={1,6})(.*?)\2(\s*)$/,
 276+ 'regexReplace': "\$1====\$3====\$4",
 277+ 'ownline': true
 278+ }
273279 }
274 - }
275 - },
276 - 'heading-5' : {
277 - labelMsg: 'wikieditor-toolbar-tool-heading-5',
278 - action: {
279 - type: 'encapsulate',
280 - options: {
281 - pre: '===== ',
282 - periMsg: 'wikieditor-toolbar-tool-heading-example',
283 - post: ' =====',
284 - regex: /^(\s*)(={1,6})(.*?)\2(\s*)$/,
285 - regexReplace: "\$1=====\$3=====\$4",
286 - ownline: true
 280+ },
 281+ 'heading-5' : {
 282+ 'labelMsg': 'wikieditor-toolbar-tool-heading-5',
 283+ 'action': {
 284+ 'type': 'encapsulate',
 285+ 'options': {
 286+ 'pre': '===== ',
 287+ 'periMsg': 'wikieditor-toolbar-tool-heading-example',
 288+ 'post': ' =====',
 289+ 'regex': /^(\s*)(={1,6})(.*?)\2(\s*)$/,
 290+ 'regexReplace': "\$1=====\$3=====\$4",
 291+ 'ownline': true
 292+ }
287293 }
288294 }
289295 }
290296 }
291297 }
292 - }
293 - },
294 - 'format': {
295 - labelMsg: 'wikieditor-toolbar-group-format',
296 - tools: {
297 - 'ulist': {
298 - labelMsg: 'wikieditor-toolbar-tool-ulist',
299 - type: 'button',
300 - icon: 'format-ulist.png',
301 - offset: [2, -1366],
302 - action: {
303 - type: 'encapsulate',
304 - options: {
305 - pre: "* ",
306 - periMsg: 'wikieditor-toolbar-tool-ulist-example',
307 - post: "",
308 - ownline: true
 298+ },
 299+ 'format': {
 300+ 'labelMsg': 'wikieditor-toolbar-group-format',
 301+ 'tools': {
 302+ 'ulist': {
 303+ 'labelMsg': 'wikieditor-toolbar-tool-ulist',
 304+ 'type': 'button',
 305+ 'icon': 'format-ulist.png',
 306+ 'offset': [2, -1366],
 307+ 'action': {
 308+ 'type': 'encapsulate',
 309+ 'options': {
 310+ 'pre': "* ",
 311+ 'periMsg': 'wikieditor-toolbar-tool-ulist-example',
 312+ 'post': "",
 313+ 'ownline': true
 314+ }
309315 }
310 - }
311 - },
312 - 'olist': {
313 - labelMsg: 'wikieditor-toolbar-tool-olist',
314 - type: 'button',
315 - icon: 'format-olist.png',
316 - offset: [2, -1078],
317 - action: {
318 - type: 'encapsulate',
319 - options: {
320 - pre: "# ",
321 - periMsg: 'wikieditor-toolbar-tool-olist-example',
322 - post: "",
323 - ownline: true
 316+ },
 317+ 'olist': {
 318+ 'labelMsg': 'wikieditor-toolbar-tool-olist',
 319+ 'type': 'button',
 320+ 'icon': 'format-olist.png',
 321+ 'offset': [2, -1078],
 322+ 'action': {
 323+ 'type': 'encapsulate',
 324+ 'options': {
 325+ 'pre': "# ",
 326+ 'periMsg': 'wikieditor-toolbar-tool-olist-example',
 327+ 'post': "",
 328+ 'ownline': true
 329+ }
324330 }
325 - }
326 - },
327 - 'indent': {
328 - labelMsg: 'wikieditor-toolbar-tool-indent',
329 - type: 'button',
330 - icon: 'format-indent.png',
331 - offset: [2, -646],
332 - action: {
333 - type: 'encapsulate',
334 - options: {
335 - pre: ":",
336 - periMsg: 'wikieditor-toolbar-tool-indent-example',
337 - post: "",
338 - ownline: true,
339 - splitlines: true
 331+ },
 332+ 'indent': {
 333+ 'labelMsg': 'wikieditor-toolbar-tool-indent',
 334+ 'type': 'button',
 335+ 'icon': 'format-indent.png',
 336+ 'offset': [2, -646],
 337+ 'action': {
 338+ 'type': 'encapsulate',
 339+ 'options': {
 340+ 'pre': ":",
 341+ 'periMsg': 'wikieditor-toolbar-tool-indent-example',
 342+ 'post': "",
 343+ 'ownline': true,
 344+ 'splitlines': true
 345+ }
340346 }
341 - }
342 - },
343 - 'nowiki': {
344 - labelMsg: 'wikieditor-toolbar-tool-nowiki',
345 - type: 'button',
346 - icon: 'insert-nowiki.png',
347 - offset: [-70, -70],
348 - action: {
349 - type: 'encapsulate',
350 - options: {
351 - pre: "<nowiki>",
352 - periMsg: 'wikieditor-toolbar-tool-nowiki-example',
353 - post: "</nowiki>"
 347+ },
 348+ 'nowiki': {
 349+ 'labelMsg': 'wikieditor-toolbar-tool-nowiki',
 350+ 'type': 'button',
 351+ 'icon': 'insert-nowiki.png',
 352+ 'offset': [-70, -70],
 353+ 'action': {
 354+ 'type': 'encapsulate',
 355+ 'options': {
 356+ 'pre': "<nowiki>",
 357+ 'periMsg': 'wikieditor-toolbar-tool-nowiki-example',
 358+ 'post': "</nowiki>"
 359+ }
354360 }
355 - }
356 - },
357 - 'newline': {
358 - labelMsg: 'wikieditor-toolbar-tool-newline',
359 - type: 'button',
360 - icon: 'insert-newline.png',
361 - offset: [2, -1726],
362 - action: {
363 - type: 'encapsulate',
364 - options: {
365 - pre: "<br />\n"
 361+ },
 362+ 'newline': {
 363+ 'labelMsg': 'wikieditor-toolbar-tool-newline',
 364+ 'type': 'button',
 365+ 'icon': 'insert-newline.png',
 366+ 'offset': [2, -1726],
 367+ 'action': {
 368+ 'type': 'encapsulate',
 369+ 'options': {
 370+ 'pre': "<br />\n"
 371+ }
366372 }
367373 }
368374 }
369 - }
370 - },
371 - 'size': {
372 - tools: {
373 - 'big': {
374 - labelMsg: 'wikieditor-toolbar-tool-big',
375 - type: 'button',
376 - icon: 'format-big.png',
377 - offset: [2, 2],
378 - action: {
379 - type: 'encapsulate',
380 - options: {
381 - pre: "<big>",
382 - periMsg: 'wikieditor-toolbar-tool-big-example',
383 - post: "</big>"
 375+ },
 376+ 'size': {
 377+ 'tools': {
 378+ 'big': {
 379+ 'labelMsg': 'wikieditor-toolbar-tool-big',
 380+ 'type': 'button',
 381+ 'icon': 'format-big.png',
 382+ 'offset': [2, 2],
 383+ 'action': {
 384+ 'type': 'encapsulate',
 385+ 'options': {
 386+ 'pre': "<big>",
 387+ 'periMsg': 'wikieditor-toolbar-tool-big-example',
 388+ 'post': "</big>"
 389+ }
384390 }
385 - }
386 - },
387 - 'small': {
388 - labelMsg: 'wikieditor-toolbar-tool-small',
389 - type: 'button',
390 - icon: 'format-small.png',
391 - offset: [2, -1150],
392 - action: {
393 - type: 'encapsulate',
394 - options: {
395 - pre: "<small>",
396 - periMsg: 'wikieditor-toolbar-tool-small-example',
397 - post: "</small>"
 391+ },
 392+ 'small': {
 393+ 'labelMsg': 'wikieditor-toolbar-tool-small',
 394+ 'type': 'button',
 395+ 'icon': 'format-small.png',
 396+ 'offset': [2, -1150],
 397+ 'action': {
 398+ 'type': 'encapsulate',
 399+ 'options': {
 400+ 'pre': "<small>",
 401+ 'periMsg': 'wikieditor-toolbar-tool-small-example',
 402+ 'post': "</small>"
 403+ }
398404 }
399 - }
400 - },
401 - 'superscript': {
402 - labelMsg: 'wikieditor-toolbar-tool-superscript',
403 - type: 'button',
404 - icon: 'format-superscript.png',
405 - offset: [2, -1294],
406 - action: {
407 - type: 'encapsulate',
408 - options: {
409 - pre: "<sup>",
410 - periMsg: 'wikieditor-toolbar-tool-superscript-example',
411 - post: "</sup>"
 405+ },
 406+ 'superscript': {
 407+ 'labelMsg': 'wikieditor-toolbar-tool-superscript',
 408+ 'type': 'button',
 409+ 'icon': 'format-superscript.png',
 410+ 'offset': [2, -1294],
 411+ 'action': {
 412+ 'type': 'encapsulate',
 413+ 'options': {
 414+ 'pre': "<sup>",
 415+ 'periMsg': 'wikieditor-toolbar-tool-superscript-example',
 416+ 'post': "</sup>"
 417+ }
412418 }
413 - }
414 - },
415 - 'subscript': {
416 - labelMsg: 'wikieditor-toolbar-tool-subscript',
417 - type: 'button',
418 - icon: 'format-subscript.png',
419 - offset: [2, -1222],
420 - action: {
421 - type: 'encapsulate',
422 - options: {
423 - pre: "<sub>",
424 - periMsg: 'wikieditor-toolbar-tool-subscript-example',
425 - post: "</sub>"
 419+ },
 420+ 'subscript': {
 421+ 'labelMsg': 'wikieditor-toolbar-tool-subscript',
 422+ 'type': 'button',
 423+ 'icon': 'format-subscript.png',
 424+ 'offset': [2, -1222],
 425+ 'action': {
 426+ 'type': 'encapsulate',
 427+ 'options': {
 428+ 'pre': "<sub>",
 429+ 'periMsg': 'wikieditor-toolbar-tool-subscript-example',
 430+ 'post': "</sub>"
 431+ }
426432 }
427433 }
428434 }
429 - }
430 - },
431 - 'insert': {
432 - labelMsg: 'wikieditor-toolbar-group-insert',
433 - tools: {
434 - 'gallery': {
435 - labelMsg: 'wikieditor-toolbar-tool-gallery',
436 - type: 'button',
437 - icon: 'insert-gallery.png',
438 - offset: [2, -1510],
439 - action: {
440 - type: 'encapsulate',
441 - options: {
442 - pre: "<gallery>\n",
443 - periMsg: 'wikieditor-toolbar-tool-gallery-example',
444 - post: "\n</gallery>",
445 - ownline: true
 435+ },
 436+ 'insert': {
 437+ 'labelMsg': 'wikieditor-toolbar-group-insert',
 438+ 'tools': {
 439+ 'gallery': {
 440+ 'labelMsg': 'wikieditor-toolbar-tool-gallery',
 441+ 'type': 'button',
 442+ 'icon': 'insert-gallery.png',
 443+ 'offset': [2, -1510],
 444+ 'action': {
 445+ 'type': 'encapsulate',
 446+ 'options': {
 447+ 'pre': "<gallery>\n",
 448+ 'periMsg': 'wikieditor-toolbar-tool-gallery-example',
 449+ 'post': "\n</gallery>",
 450+ 'ownline': true
 451+ }
446452 }
447 - }
448 - },
449 - 'tableCGD': {
450 - labelMsg: 'wikieditor-toolbar-tool-table',
451 - type: 'button',
452 - icon: 'insert-table.png',
453 - offset: [2, -1942],
454 - filters: [ '#wpTextbox1.toolbar-dialogs' ],
455 - action: {
456 - type: 'dialog',
457 - module: 'insert-table'
458 - }
459 - },
460 - 'table': {
461 - labelMsg: 'wikieditor-toolbar-tool-table',
462 - type: 'button',
463 - icon: 'insert-table.png',
464 - offset: [2, -1942],
465 - filters: [ '#wpTextbox1:not(.toolbar-dialogs)' ],
466 - action: {
467 - type: 'encapsulate',
468 - options: {
469 - pre: "{| class=\"wikitable\" border=\"1\"\n|",
470 - periMsg: 'wikieditor-toolbar-tool-table-example-old',
471 - post: "\n|}",
472 - ownline: true
 453+ },
 454+ 'tableCGD': {
 455+ 'labelMsg': 'wikieditor-toolbar-tool-table',
 456+ 'type': 'button',
 457+ 'icon': 'insert-table.png',
 458+ 'offset': [2, -1942],
 459+ 'filters': [ '#wpTextbox1.toolbar-dialogs' ],
 460+ 'action': {
 461+ 'type': 'dialog',
 462+ 'module': 'insert-table'
473463 }
474 - }
475 - },
476 - 'redirect': {
477 - labelMsg: 'wikieditor-toolbar-tool-redirect',
478 - type: 'button',
479 - icon: 'insert-redirect.png',
480 - offset: [-70, -142],
481 - action: {
482 - type: 'encapsulate',
483 - options: {
484 - pre: "#REDIRECT [[",
485 - periMsg: 'wikieditor-toolbar-tool-redirect-example',
486 - post: "]]",
487 - ownline: true
 464+ },
 465+ 'table': {
 466+ 'labelMsg': 'wikieditor-toolbar-tool-table',
 467+ 'type': 'button',
 468+ 'icon': 'insert-table.png',
 469+ 'offset': [2, -1942],
 470+ 'filters': [ '#wpTextbox1:not(.toolbar-dialogs)' ],
 471+ 'action': {
 472+ 'type': 'encapsulate',
 473+ 'options': {
 474+ 'pre': "{| class=\"wikitable\" border=\"1\"\n|",
 475+ 'periMsg': 'wikieditor-toolbar-tool-table-example-old',
 476+ 'post': "\n|}",
 477+ 'ownline': true
 478+ }
488479 }
 480+ },
 481+ 'redirect': {
 482+ 'labelMsg': 'wikieditor-toolbar-tool-redirect',
 483+ 'type': 'button',
 484+ 'icon': 'insert-redirect.png',
 485+ 'offset': [-70, -142],
 486+ 'action': {
 487+ 'type': 'encapsulate',
 488+ 'options': {
 489+ 'pre': "#REDIRECT [[",
 490+ 'periMsg': 'wikieditor-toolbar-tool-redirect-example',
 491+ 'post': "]]",
 492+ 'ownline': true
 493+ }
 494+ }
489495 }
490496 }
491 - }
492 - },
493 - 'search': {
494 - tools: {
495 - 'replace': {
496 - labelMsg: 'wikieditor-toolbar-tool-replace',
497 - type: 'button',
498 - icon: 'search-replace.png',
499 - offset: [-70, -214],
500 - filters: [ '#wpTextbox1.toolbar-dialogs' ],
501 - action: {
502 - type: 'dialog',
503 - module: 'search-and-replace'
 497+ },
 498+ 'search': {
 499+ 'tools': {
 500+ 'replace': {
 501+ 'labelMsg': 'wikieditor-toolbar-tool-replace',
 502+ 'type': 'button',
 503+ 'icon': 'search-replace.png',
 504+ 'offset': [-70, -214],
 505+ 'filters': [ '#wpTextbox1.toolbar-dialogs' ],
 506+ 'action': {
 507+ 'type': 'dialog',
 508+ 'module': 'search-and-replace'
 509+ }
504510 }
505511 }
506512 }
507513 }
508 - }
509 - },
510 - 'characters': {
511 - labelMsg: 'wikieditor-toolbar-section-characters',
512 - type: 'booklet',
513 - deferLoad: true,
514 - pages: {
515 - 'latin': {
516 - 'labelMsg': 'wikieditor-toolbar-characters-page-latin',
517 - 'layout': 'characters',
518 - 'characters': [
519 - "\u00c1", "\u00e1", "\u00c0", "\u00e0", "\u00c2", "\u00e2", "\u00c4", "\u00e4", "\u00c3", "\u00e3",
520 - "\u01cd", "\u01ce", "\u0100", "\u0101", "\u0102", "\u0103", "\u0104", "\u0105", "\u00c5", "\u00e5",
521 - "\u0106", "\u0107", "\u0108", "\u0109", "\u00c7", "\u00e7", "\u010c", "\u010d", "\u010a", "\u010b",
522 - "\u0110", "\u0111", "\u010e", "\u010f", "\u00c9", "\u00e9", "\u00c8", "\u00e8", "\u00ca", "\u00ea",
523 - "\u00cb", "\u00eb", "\u011a", "\u011b", "\u0112", "\u0113", "\u0114", "\u0115", "\u0116", "\u0117",
524 - "\u0118", "\u0119", "\u011c", "\u011d", "\u0122", "\u0123", "\u011e", "\u011f", "\u0120", "\u0121",
525 - "\u0124", "\u0125", "\u0126", "\u0127", "\u00cd", "\u00ed", "\u00cc", "\u00ec", "\u00ce", "\u00ee",
526 - "\u00cf", "\u00ef", "\u0128", "\u0129", "\u01cf", "\u01d0", "\u012a", "\u012b", "\u012c", "\u012d",
527 - "\u0130", "\u0131", "\u012e", "\u012f", "\u0134", "\u0135", "\u0136", "\u0137", "\u0139", "\u013a",
528 - "\u013b", "\u013c", "\u013d", "\u013e", "\u0141", "\u0142", "\u013f", "\u0140", "\u0143", "\u0144",
529 - "\u00d1", "\u00f1", "\u0145", "\u0146", "\u0147", "\u0148", "\u00d3", "\u00f3", "\u00d2", "\u00f2",
530 - "\u00d4", "\u00f4", "\u00d6", "\u00f6", "\u00d5", "\u00f5", "\u01d1", "\u01d2", "\u014c", "\u014d",
531 - "\u014e", "\u014f", "\u01ea", "\u01eb", "\u0150", "\u0151", "\u0154", "\u0155", "\u0156", "\u0157",
532 - "\u0158", "\u0159", "\u015a", "\u015b", "\u015c", "\u015d", "\u015e", "\u015f", "\u0160", "\u0161",
533 - "\u0162", "\u0163", "\u0164", "\u0165", "\u00da", "\u00fa", "\u00d9", "\u00f9", "\u00db", "\u00fb",
534 - "\u00dc", "\u00fc", "\u0168", "\u0169", "\u016e", "\u016f", "\u01d3", "\u01d4", "\u016a", "\u016b",
535 - "\u01d6", "\u01d8", "\u01da", "\u01dc", "\u016c", "\u016d", "\u0172", "\u0173", "\u0170", "\u0171",
536 - "\u0174", "\u0175", "\u00dd", "\u00fd", "\u0176", "\u0177", "\u0178", "\u00ff", "\u0232", "\u0233",
537 - "\u0179", "\u017a", "\u017d", "\u017e", "\u017b", "\u017c", "\u00c6", "\u00e6", "\u01e2", "\u01e3",
538 - "\u00d8", "\u00f8", "\u0152", "\u0153", "\u00df", "\u00f0", "\u00de", "\u00fe", "\u018f", "\u0259"
539 - ]
540 - },
541 - 'latinextended': {
542 - 'labelMsg': 'wikieditor-toolbar-characters-page-latinextended',
543 - 'layout': 'characters',
544 - 'characters': [
545 - "\u1e00", "\u1e01", "\u1e9a", "\u1ea0", "\u1ea1", "\u1ea2", "\u1ea3", "\u1ea4", "\u1ea5", "\u1ea6",
546 - "\u1ea7", "\u1ea8", "\u1ea9", "\u1eaa", "\u1eab", "\u1eac", "\u1ead", "\u1eae", "\u1eaf", "\u1eb0",
547 - "\u1eb1", "\u1eb2", "\u1eb3", "\u1eb4", "\u1eb5", "\u1eb6", "\u1eb7", "\u1e02", "\u1e03", "\u1e04",
548 - "\u1e05", "\u1e06", "\u1e07", "\u1e08", "\u1e09", "\u1e0a", "\u1e0b", "\u1e0c", "\u1e0d", "\u1e0e",
549 - "\u1e0f", "\u1e10", "\u1e11", "\u1e12", "\u1e13", "\u1e14", "\u1e15", "\u1e16", "\u1e17", "\u1e18",
550 - "\u1e19", "\u1e1a", "\u1e1b", "\u1e1c", "\u1e1d", "\u1eb8", "\u1eb9", "\u1eba", "\u1ebb", "\u1ebc",
551 - "\u1ebd", "\u1ebe", "\u1ebf", "\u1ec0", "\u1ec1", "\u1ec2", "\u1ec3", "\u1ec4", "\u1ec5", "\u1ec6",
552 - "\u1ec7", "\u1e1e", "\u1e1f", "\u1e20", "\u1e21", "\u1e22", "\u1e23", "\u1e24", "\u1e25", "\u1e26",
553 - "\u1e27", "\u1e28", "\u1e29", "\u1e2a", "\u1e2b", "\u1e96", "\u1e2c", "\u1e2d", "\u1e2e", "\u1e2f",
554 - "\u1ec8", "\u1ec9", "\u1eca", "\u1ecb", "\u1e30", "\u1e31", "\u1e32", "\u1e33", "\u1e34", "\u1e35",
555 - "\u1e36", "\u1e37", "\u1e38", "\u1e39", "\u1e3a", "\u1e3b", "\u1e3c", "\u1e3d", "\u1efa", "\u1efb",
556 - "\u1e3e", "\u1e3f", "\u1e40", "\u1e41", "\u1e42", "\u1e43", "\u1e44", "\u1e45", "\u1e46", "\u1e47",
557 - "\u1e48", "\u1e49", "\u1e4a", "\u1e4b", "\u1e4c", "\u1e4d", "\u1e4e", "\u1e4f", "\u1e50", "\u1e51",
558 - "\u1e52", "\u1e53", "\u1ecc", "\u1ecd", "\u1ece", "\u1ecf", "\u1ed0", "\u1ed1", "\u1ed2", "\u1ed3",
559 - "\u1ed4", "\u1ed5", "\u1ed6", "\u1ed7", "\u1ed8", "\u1ed9", "\u1eda", "\u1edb", "\u1edc", "\u1edd",
560 - "\u1ede", "\u1edf", "\u1ee0", "\u1ee1", "\u1ee2", "\u1ee3", "\u1e54", "\u1e55", "\u1e56", "\u1e57",
561 - "\u1e58", "\u1e59", "\u1e5a", "\u1e5b", "\u1e5c", "\u1e5d", "\u1e5e", "\u1e5f", "\u1e60", "\u1e61",
562 - "\u1e9b", "\u1e62", "\u1e63", "\u1e64", "\u1e65", "\u1e66", "\u1e67", "\u1e68", "\u1e69", "\u1e9c",
563 - "\u1e9d", "\u1e6a", "\u1e6b", "\u1e6c", "\u1e6d", "\u1e6e", "\u1e6f", "\u1e70", "\u1e71", "\u1e97",
564 - "\u1e72", "\u1e73", "\u1e74", "\u1e75", "\u1e76", "\u1e77", "\u1e78", "\u1e79", "\u1e7a", "\u1e7b",
565 - "\u1ee4", "\u1ee5", "\u1ee6", "\u1ee7", "\u1ee8", "\u1ee9", "\u1eea", "\u1eeb", "\u1eec", "\u1eed",
566 - "\u1eee", "\u1eef", "\u1ef0", "\u1ef1", "\u1e7c", "\u1e7d", "\u1e7e", "\u1e7f", "\u1efc", "\u1efd",
567 - "\u1e80", "\u1e81", "\u1e82", "\u1e83", "\u1e84", "\u1e85", "\u1e86", "\u1e87", "\u1e88", "\u1e89",
568 - "\u1e98", "\u1e8a", "\u1e8b", "\u1e8c", "\u1e8d", "\u1e8e", "\u1e8f", "\u1e99", "\u1ef2", "\u1ef3",
569 - "\u1ef4", "\u1ef5", "\u1ef6", "\u1ef7", "\u1ef8", "\u1ef9", "\u1efe", "\u1eff", "\u1e90", "\u1e91",
570 - "\u1e92", "\u1e93", "\u1e94", "\u1e95", "\u1e9e", "\u1e9f"
571 - ]
572 - },
573 - 'ipa': {
574 - labelMsg: 'wikieditor-toolbar-characters-page-ipa',
575 - layout: 'characters',
576 - characters: [
577 - "p", "t\u032a", "t", "\u0288", "c", "k", "q", "\u02a1", "\u0294", "b","d\u032a", "d", "\u0256",
578 - "\u025f", "\u0261", "\u0262", "\u0253", "\u0257", "\u0284", "\u0260", "\u029b", "t\u0361s",
579 - "t\u0361\u0283", "t\u0361\u0255", "d\u0361z", "d\u0361\u0292", "d\u0361\u0291", "\u0278", "f",
580 - "\u03b8", "s", "\u0283", "\u0285", "\u0286", "\u0282", "\u0255", "\u00e7", "\u0267", "x", "\u03c7",
581 - "\u0127", "\u029c", "h", "\u03b2", "v", "\u028d", "\u00f0", "z", "\u0292", "\u0293", "\u0290",
582 - "\u0291", "\u029d", "\u0263", "\u0281", "\u0295", "\u0296", "\u02a2", "\u0266", "\u026c", "\u026e",
583 - "m", "m\u0329", "\u0271", "\u0271\u0329", "\u0271\u030d", "n\u032a", "n\u032a\u030d", "n",
584 - "n\u0329", "\u0273", "\u0273\u0329", "\u0272", "\u0272\u0329", "\u014b", "\u014b\u030d",
585 - "\u014b\u0329", "\u0274", "\u0274\u0329", "\u0299", "\u0299\u0329", "r", "r\u0329", "\u0280",
586 - "\u0280\u0329", "\u027e", "\u027d", "\u027f", "\u027a", "l\u032a", "l\u032a\u0329", "l", "l\u0329",
587 - "\u026b", "\u026b\u0329", "\u026d", "\u026d\u0329", "\u028e", "\u028e\u0329", "\u029f",
588 - "\u029f\u0329", "w", "\u0265", "\u028b", "\u0279", "\u027b", "j", "\u0270", "\u0298", "\u01c2",
589 - "\u01c0", "!", "\u01c1", "\u02b0", "\u02b1", "\u02b7", "\u02b8", "\u02b2", "\u02b3", "\u207f",
590 - "\u02e1", "\u02b4", "\u02b5", "\u02e2", "\u02e3", "\u02e0", "\u02b6", "\u02e4", "\u02c1", "\u02c0",
591 - "\u02bc", "i", "i\u032f", "\u0129", "y", "y\u032f", "\u1ef9", "\u026a", "\u026a\u032f",
592 - "\u026a\u0303", "\u028f", "\u028f\u032f", "\u028f\u0303", "\u0268", "\u0268\u032f", "\u0268\u0303",
593 - "\u0289", "\u0289\u032f", "\u0289\u0303", "\u026f", "\u026f\u032f", "\u026f\u0303", "u", "u\u032f",
594 - "\u0169", "\u028a", "\u028a\u032f", "\u028a\u0303", "e", "e\u032f", "\u1ebd", "\u00f8",
595 - "\u00f8\u032f", "\u00f8\u0303", "\u0258", "\u0258\u032f", "\u0258\u0303", "\u0275", "\u0275\u032f",
596 - "\u0275\u0303", "\u0264", "\u0264\u032f", "\u0264\u0303", "o", "o\u032f", "\u00f5", "\u025b",
597 - "\u025b\u032f", "\u025b\u0303", "\u0153", "\u0153\u032f", "\u0153\u0303", "\u025c", "\u025c\u032f",
598 - "\u025c\u0303", "\u0259", "\u0259\u032f", "\u0259\u0303", "\u025e", "\u025e\u032f", "\u025e\u0303",
599 - "\u028c", "\u028c\u032f", "\u028c\u0303", "\u0254", "\u0254\u032f", "\u0254\u0303", "\u00e6",
600 - "\u00e6\u032f", "\u00e6\u0303", "\u0276", "\u0276\u032f", "\u0276\u0303", "a", "a\u032f", "\u00e3",
601 - "\u0250", "\u0250\u032f", "\u0250\u0303", "\u0251", "\u0251\u032f", "\u0251\u0303", "\u0252",
602 - "\u0252\u032f", "\u0252\u0303", "\u02c8", "\u02cc", "\u02d0", "\u02d1", "\u02d8", ".", "\u203f",
603 - "|", "\u2016"
604 - ]
605 - },
606 - 'symbols': {
607 - 'labelMsg': 'wikieditor-toolbar-characters-page-symbols',
608 - 'layout': 'characters',
609 - 'characters': [
610 - "~", "|", "\u00a1", "\u00bf", "\u2020", "\u2021", "\u2194", "\u2191", "\u2193", "\u2022", "\u00b6",
611 - "#", "\u00bd", "\u2153", "\u2154", "\u00bc", "\u00be", "\u215b", "\u215c", "\u215d", "\u215e",
612 - "\u221e", "\u2018", "\u2019",
613 - {
614 - 'label': "\u201c\u201d",
615 - 'action': {
616 - 'type': 'encapsulate', 'options': { 'pre': "\u201c", 'post': "\u201d" }
617 - }
618 - },
619 - {
620 - 'label': "\u201e\u201c",
621 - 'action': {
622 - 'type': 'encapsulate', 'options': { 'pre': "\u201e", 'post': "\u201c" }
623 - }
624 - },
625 - {
626 - 'label': "\u00ab\u00bb",
627 - 'action': {
628 - 'type': 'encapsulate', 'options': { 'pre': "\u00ab", 'post': "\u00bb" }
629 - }
630 - },
631 - "\u00a4", "\u20b3", "\u0e3f", "\u20b5", "\u00a2", "\u20a1", "\u20a2", "$", "\u20ab", "\u20af",
632 - "\u20ac", "\u20a0", "\u20a3", "\u0192", "\u20b4", "\u20ad", "\u20a4", "\u2133", "\u20a5", "\u20a6",
633 - "\u2116", "\u20a7", "\u20b0", "\u00a3", "\u17db", "\u20a8", "\u20aa", "\u09f3", "\u20ae", "\u20a9",
634 - "\u00a5", "\u2660", "\u2663", "\u2665", "\u2666", "m\u00b2", "m\u00b3", "\u2013", "\u2014",
635 - "\u2026", "\u2018", "\u2019", "\u201c", "\u201d", "\u00b0", "\u2032", "\u2033", "\u2248", "\u2260",
636 - "\u2264", "\u2265", "\u00b1", "\u2212", "\u00d7", "\u00f7", "\u2190", "\u2192", "\u00b7", "\u00a7"
637 - ]
638 - },
639 - 'greek': {
640 - 'labelMsg': 'wikieditor-toolbar-characters-page-greek',
641 - 'layout': 'characters',
642 - 'language': 'hl',
643 - 'characters': [
644 - "\u0391", "\u0386", "\u03b1", "\u03ac", "\u0392", "\u03b2", "\u0393", "\u03b3", "\u0394", "\u03b4",
645 - "\u0395", "\u0388", "\u03b5", "\u03ad", "\u0396", "\u03b6", "\u0397", "\u0389", "\u03b7", "\u03ae",
646 - "\u0398", "\u03b8", "\u0399", "\u038a", "\u03b9", "\u03af", "\u039a", "\u03ba", "\u039b", "\u03bb",
647 - "\u039c", "\u03bc", "\u039d", "\u03bd", "\u039e", "\u03be", "\u039f", "\u038c", "\u03bf", "\u03cc",
648 - "\u03a0", "\u03c0", "\u03a1", "\u03c1", "\u03a3", "\u03c3", "\u03c2", "\u03a4", "\u03c4", "\u03a5",
649 - "\u038e", "\u03c5", "\u03cd", "\u03a6", "\u03c6", "\u03a7", "\u03c7", "\u03a8", "\u03c8", "\u03a9",
650 - "\u038f", "\u03c9", "\u03ce"
651 - ]
652 - },
653 - 'cyrillic': {
654 - 'labelMsg': 'wikieditor-toolbar-characters-page-cyrillic',
655 - 'layout': 'characters',
656 - 'characters': [
657 - "\u0410", "\u0430", "\u04d8", "\u04d9", "\u0411", "\u0431", "\u0412", "\u0432", "\u0413", "\u0433",
658 - "\u0490", "\u0491", "\u0403", "\u0453", "\u0492", "\u0493", "\u0414", "\u0434", "\u0402", "\u0452",
659 - "\u0415", "\u0435", "\u0404", "\u0454", "\u0401", "\u0451", "\u0416", "\u0436", "\u0417", "\u0437",
660 - "\u0405", "\u0455", "\u0418", "\u0438", "\u0406", "\u0456", "\u0407", "\u0457", "\u04c0", "\u0419",
661 - "\u0439", "\u04e2", "\u04e3", "\u0408", "\u0458", "\u041a", "\u043a", "\u040c", "\u045c", "\u049a",
662 - "\u049b", "\u041b", "\u043b", "\u0409", "\u0459", "\u041c", "\u043c", "\u041d", "\u043d", "\u040a",
663 - "\u045a", "\u04a2", "\u04a3", "\u041e", "\u043e", "\u04e8", "\u04e9", "\u041f", "\u043f", "\u0420",
664 - "\u0440", "\u0421", "\u0441", "\u0422", "\u0442", "\u040b", "\u045b", "\u0423", "\u0443", "\u040e",
665 - "\u045e", "\u04ee", "\u04ef", "\u04b0", "\u04b1", "\u04ae", "\u04af", "\u0424", "\u0444", "\u0425",
666 - "\u0445", "\u04b2", "\u04b3", "\u04ba", "\u04bb", "\u0426", "\u0446", "\u0427", "\u0447", "\u04b6",
667 - "\u04b7", "\u040f", "\u045f", "\u0428", "\u0448", "\u0429", "\u0449", "\u042a", "\u044a", "\u042b",
668 - "\u044b", "\u042c", "\u044c", "\u042d", "\u044d", "\u042e", "\u044e", "\u042f", "\u044f"
669 - ]
670 - },
671 - 'arabic': {
672 - 'labelMsg': 'wikieditor-toolbar-characters-page-arabic',
673 - 'layout': 'characters',
674 - 'language': 'ar',
675 - 'direction': 'rtl',
676 - 'characters': [
677 - "\u061b", "\u061f", "\u0621", "\u0622", "\u0623", "\u0624", "\u0625", "\u0626", "\u0627", "\u0628",
678 - "\u0629", "\u062a", "\u062b", "\u062c", "\u062d", "\u062e", "\u062f", "\u0630", "\u0631", "\u0632",
679 - "\u0633", "\u0634", "\u0635", "\u0636", "\u0637", "\u0638", "\u0639", "\u063a", "\u0641", "\u0642",
680 - "\u0643", "\u0644", "\u0645", "\u0646", "\u0647", "\u0648", "\u0649", "\u064a", "\u060c", "\u067e",
681 - "\u0686", "\u0698", "\u06af", "\u06ad"
682 - ]
683 - },
684 - 'hebrew': {
685 - 'labelMsg': 'wikieditor-toolbar-characters-page-hebrew',
686 - 'layout': 'characters',
687 - 'direction': 'rtl',
688 - 'characters': [
689 - "\u05d0", "\u05d1", "\u05d2", "\u05d3", "\u05d4", "\u05d5", "\u05d6", "\u05d7", "\u05d8", "\u05d9",
690 - "\u05db", "\u05da", "\u05dc", "\u05de", "\u05dd", "\u05e0", "\u05df", "\u05e1", "\u05e2", "\u05e4",
691 - "\u05e3", "\u05e6", "\u05e5", "\u05e7", "\u05e8", "\u05e9", "\u05ea", "\u05f3", "\u05f4", "\u05f0",
692 - "\u05f1", "\u05f2", "\u05d0", "\u05d3", "\u05d4", "\u05d5", "\u05d6", "\u05d7", "\u05d8", "\u05d9",
693 - "\u05da", "\u05db", "\u05dc", "\u05dd", "\u05de", "\u05df", "\u05e0", "\u05e1", "\u05e2", "\u05e3",
694 - "\u05e4", "\u05be", "\u05f3", "\u05f4",
695 - [ "\u05b0\u25cc", "\u05b0" ], [ "\u05b1\u25cc", "\u05b1" ], [ "\u05b2\u25cc", "\u05b2" ],
696 - [ "\u05b3\u25cc", "\u05b3" ], [ "\u05b4\u25cc", "\u05b4" ], [ "\u05b5\u25cc", "\u05b5" ],
697 - [ "\u05b6\u25cc", "\u05b6" ], [ "\u05b7\u25cc", "\u05b7" ], [ "\u05b8\u25cc", "\u05b8" ],
698 - [ "\u05b9\u25cc", "\u05b9" ], [ "\u05bb\u25cc", "\u05bb" ], [ "\u05bc\u25cc", "\u05bc" ],
699 - [ "\u05c1\u25cc", "\u05c1" ], [ "\u05c2\u25cc", "\u05c2" ], [ "\u05c7\u25cc", "\u05c7" ],
700 - [ "\u0591\u25cc", "\u0591" ], [ "\u0592\u25cc", "\u0592" ], [ "\u0593\u25cc", "\u0593" ],
701 - [ "\u0594\u25cc", "\u0594" ], [ "\u0595\u25cc", "\u0595" ], [ "\u0596\u25cc", "\u0596" ],
702 - [ "\u0597\u25cc", "\u0597" ], [ "\u0598\u25cc", "\u0598" ], [ "\u0599\u25cc", "\u0599" ],
703 - [ "\u059a\u25cc", "\u059a" ], [ "\u059b\u25cc", "\u059b" ], [ "\u059c\u25cc", "\u059c" ],
704 - [ "\u059d\u25cc", "\u059d" ], [ "\u059e\u25cc", "\u059e" ], [ "\u059f\u25cc", "\u059f" ],
705 - [ "\u05a0\u25cc", "\u05a0" ], [ "\u05a1\u25cc", "\u05a1" ], [ "\u05a2\u25cc", "\u05a2" ],
706 - [ "\u05a3\u25cc", "\u05a3" ], [ "\u05a4\u25cc", "\u05a4" ], [ "\u05a5\u25cc", "\u05a5" ],
707 - [ "\u05a6\u25cc", "\u05a6" ], [ "\u05a7\u25cc", "\u05a7" ], [ "\u05a8\u25cc", "\u05a8" ],
708 - [ "\u05a9\u25cc", "\u05a9" ], [ "\u05aa\u25cc", "\u05aa" ], [ "\u05ab\u25cc", "\u05ab" ],
709 - [ "\u05ac\u25cc", "\u05ac" ], [ "\u05ad\u25cc", "\u05ad" ], [ "\u05ae\u25cc", "\u05ae" ],
710 - [ "\u05af\u25cc", "\u05af" ], [ "\u05bf\u25cc", "\u05bf" ], [ "\u05c0\u25cc", "\u05c0" ],
711 - [ "\u05c3\u25cc", "\u05c3" ]
712 - ]
713 - },
714 - 'bangla': {
715 - 'labelMsg': 'wikieditor-toolbar-characters-page-bangla',
716 - 'language': 'bn',
717 - 'layout': 'characters',
718 - 'characters': [
719 - "\u0985", "\u0986", "\u0987", "\u0988", "\u0989", "\u098a", "\u098b", "\u098f", "\u0990", "\u0993",
720 - "\u0994", "\u09be", "\u09bf", "\u09c0", "\u09c1", "\u09c2", "\u09c3", "\u09c7", "\u09c8", "\u09cb",
721 - "\u09cc", "\u0995", "\u0996", "\u0997", "\u0998", "\u0999", "\u099a", "\u099b", "\u099c", "\u099d",
722 - "\u099e", "\u099f", "\u09a0", "\u09a1", "\u09a2", "\u09a3", "\u09a4", "\u09a5", "\u09a6", "\u09a7",
723 - "\u09a8", "\u09aa", "\u09ab", "\u09ac", "\u09ad", "\u09ae", "\u09af", "\u09b0", "\u09b2", "\u09b6",
724 - "\u09b7", "\u09b8", "\u09b9", "\u09a1\u09bc", "\u09a2\u09bc", "\u09af\u09bc", "\u09ce", "\u0982",
725 - "\u0983", "\u0981", "\u09cd", "\u09e7", "\u09e8", "\u09e9", "\u09ea", "\u09eb", "\u09ec", "\u09ed",
726 - "\u09ee", "\u09ef", "\u09e6"
727 - ]
728 - },
729 - 'telugu': {
730 - 'labelMsg': 'wikieditor-toolbar-characters-page-telugu',
731 - 'language': 'te',
732 - 'layout': 'characters',
733 - 'characters': [
734 - "\u0c01", "\u0c02", "\u0c03", "\u0c05", "\u0c06", "\u0c07", "\u0c08", "\u0c09", "\u0c0a", "\u0c0b",
735 - "\u0c60", "\u0c0c", "\u0c61", "\u0c0e", "\u0c0f", "\u0c10", "\u0c12", "\u0c13", "\u0c14", "\u0c15",
736 - "\u0c16", "\u0c17", "\u0c18", "\u0c19", "\u0c1a", "\u0c1b", "\u0c1c", "\u0c1d", "\u0c1e", "\u0c1f",
737 - "\u0c20", "\u0c21", "\u0c22", "\u0c23", "\u0c24", "\u0c25", "\u0c26", "\u0c27", "\u0c28", "\u0c2a",
738 - "\u0c2b", "\u0c2c", "\u0c2d", "\u0c2e", "\u0c2f", "\u0c30", "\u0c31", "\u0c32", "\u0c33", "\u0c35",
739 - "\u0c36", "\u0c37", "\u0c38", "\u0c39", "\u0c3e", "\u0c3f", "\u0c40", "\u0c41", "\u0c42", "\u0c43",
740 - "\u0c44", "\u0c46", "\u0c47", "\u0c48", "\u0c4a", "\u0c4b", "\u0c4c", "\u0c4d", "\u0c62", "\u0c63",
741 - "\u0c58", "\u0c59", "\u0c66", "\u0c67", "\u0c68", "\u0c69", "\u0c6a", "\u0c6b", "\u0c6c", "\u0c6d",
742 - "\u0c6e", "\u0c6f", "\u0c3d", "\u0c78", "\u0c79", "\u0c7a", "\u0c7b", "\u0c7c", "\u0c7d", "\u0c7e",
743 - "\u0c7f"
744 - ]
745 - },
746 - 'sinhala': {
747 - 'labelMsg': 'wikieditor-toolbar-characters-page-sinhala',
748 - 'language': 'si',
749 - 'layout': 'characters',
750 - 'characters': [
751 - "\u0d85", "\u0d86", "\u0d87", "\u0d88", "\u0d89", "\u0d8a", "\u0d8b", "\u0d8c", "\u0d8d", "\u0d8e",
752 - "\u0d8f", "\u0d90", "\u0d91", "\u0d92", "\u0d93", "\u0d94", "\u0d95", "\u0d96", "\u0d9a", "\u0d9b",
753 - "\u0d9c", "\u0d9d", "\u0d9e", "\u0d9f", "\u0da0", "\u0da1", "\u0da2", "\u0da3", "\u0da4", "\u0da5",
754 - "\u0da6", "\u0da7", "\u0da8", "\u0da9", "\u0daa", "\u0dab", "\u0dac", "\u0dad", "\u0dae", "\u0daf",
755 - "\u0db0", "\u0db1", "\u0db3", "\u0db4", "\u0db5", "\u0db6", "\u0db7", "\u0db8", "\u0db9", "\u0dba",
756 - "\u0dbb", "\u0dbd", "\u0dc0", "\u0dc1", "\u0dc2", "\u0dc3", "\u0dc4", "\u0dc5", "\u0dc6",
757 - [ "\u25cc\u0dcf", "\u0dcf" ], [ "\u25cc\u0dd0", "\u0dd0" ], [ "\u25cc\u0dd1", "\u0dd1" ],
758 - [ "\u25cc\u0dd2", "\u0dd2" ], [ "\u25cc\u0dd3", "\u0dd3" ], [ "\u25cc\u0dd4", "\u0dd4" ],
759 - [ "\u25cc\u0dd6", "\u0dd6" ], [ "\u25cc\u0dd8", "\u0dd8" ], [ "\u25cc\u0df2", "\u0df2" ],
760 - [ "\u25cc\u0ddf", "\u0ddf" ], [ "\u25cc\u0df3", "\u0df3" ], [ "\u25cc\u0dd9", "\u0dd9" ],
761 - [ "\u25cc\u0dda", "\u0dda" ], [ "\u25cc\u0ddc", "\u0ddc" ], [ "\u25cc\u0ddd", "\u0ddd" ],
762 - [ "\u25cc\u0dde", "\u0dde" ], [ "\u25cc\u0dca", "\u0dca" ]
763 - ]
764 - },
765 - 'gujarati': {
766 - 'labelMsg': 'wikieditor-toolbar-characters-page-gujarati',
767 - 'language': 'gu',
768 - 'layout': 'characters',
769 - 'characters': [
770 - "\u0ad0", "\u0a85", "\u0a86", "\u0a87", "\u0a88", "\u0a89", "\u0a8a", "\u0a8b", "\u0ae0", "\u0a8c",
771 - "\u0ae1", "\u0a8d", "\u0a8f", "\u0a90", "\u0a91", "\u0a93", "\u0a94", "\u0a95", "\u0a96", "\u0a97",
772 - "\u0a98", "\u0a99", "\u0a9a", "\u0a9b", "\u0a9c", "\u0a9d", "\u0a9e", "\u0a9f", "\u0aa0", "\u0aa1",
773 - "\u0aa2", "\u0aa3", "\u0aa4", "\u0aa5", "\u0aa6", "\u0aa7", "\u0aa8", "\u0aaa", "\u0aab", "\u0aac",
774 - "\u0aad", "\u0aae", "\u0aaf", "\u0ab0", "\u0ab2", "\u0ab5", "\u0ab6", "\u0ab7", "\u0ab8", "\u0ab9",
775 - "\u0ab3", "\u0abd", [ "\u25cc\u0abe", "\u0abe" ], [ "\u25cc\u0abf", "\u0abf" ],
776 - [ "\u25cc\u0ac0", "\u0ac0" ], [ "\u25cc\u0ac1", "\u0ac1" ], [ "\u25cc\u0ac2", "\u0ac2" ],
777 - [ "\u25cc\u0ac3", "\u0ac3" ], [ "\u25cc\u0ac4", "\u0ac4" ], [ "\u25cc\u0ae2", "\u0ae2" ],
778 - [ "\u25cc\u0ae3", "\u0ae3" ], [ "\u25cc\u0ac5", "\u0ac5" ], [ "\u25cc\u0ac7", "\u0ac7" ],
779 - [ "\u25cc\u0ac8", "\u0ac8" ], [ "\u25cc\u0ac9", "\u0ac9" ], [ "\u25cc\u0acb", "\u0acb" ],
780 - [ "\u25cc\u0acc", "\u0acc" ], [ "\u25cc\u0acd", "\u0acd" ]
781 - ]
782 - },
783 - 'thai': {
784 - 'labelMsg': 'wikieditor-toolbar-characters-page-thai',
785 - 'language': 'th',
786 - 'layout': 'characters',
787 - 'characters': [
788 - "\u0e01", "\u0e02", "\u0e03", "\u0e04", "\u0e05", "\u0e06", "\u0e07", "\u0e08", "\u0e09", "\u0e0a",
789 - "\u0e0b", "\u0e0c", "\u0e0d", "\u0e0e", "\u0e0f", "\u0e10", "\u0e11", "\u0e12", "\u0e13", "\u0e14",
790 - "\u0e15", "\u0e16", "\u0e17", "\u0e18", "\u0e19", "\u0e1a", "\u0e1b", "\u0e1c", "\u0e1d", "\u0e1e",
791 - "\u0e1f", "\u0e20", "\u0e21", "\u0e22", "\u0e23", "\u0e24", "\u0e25", "\u0e26", "\u0e27", "\u0e28",
792 - "\u0e29", "\u0e2a", "\u0e2b", "\u0e2c", "\u0e2d", "\u0e2e", "\u0e30", "\u0e31", "\u0e32", "\u0e45",
793 - "\u0e33", "\u0e34", "\u0e35", "\u0e36", "\u0e37", "\u0e38", "\u0e39", "\u0e40", "\u0e41", "\u0e42",
794 - "\u0e43", "\u0e44", "\u0e47", "\u0e48", "\u0e49", "\u0e4a", "\u0e4b", "\u0e4c", "\u0e4d", "\u0e3a",
795 - "\u0e4e", "\u0e50", "\u0e51", "\u0e52", "\u0e53", "\u0e54", "\u0e55", "\u0e56", "\u0e57", "\u0e58",
796 - "\u0e59", "\u0e3f", "\u0e46", "\u0e2f", "\u0e5a", "\u0e4f", "\u0e5b"
797 - ]
798 - },
799 - 'lao': {
800 - 'labelMsg': 'wikieditor-toolbar-characters-page-lao',
801 - 'language': 'lo',
802 - 'layout': 'characters',
803 - 'characters': [
804 - "\u0e81", "\u0e82", "\u0e84", "\u0e87", "\u0e88", "\u0eaa", "\u0e8a", "\u0e8d", "\u0e94", "\u0e95",
805 - "\u0e96", "\u0e97", "\u0e99", "\u0e9a", "\u0e9b", "\u0e9c", "\u0e9d", "\u0e9e", "\u0e9f", "\u0ea1",
806 - "\u0ea2", "\u0ea5", "\u0ea7", "\u0eab", "\u0ead", "\u0eae", "\u0ea3", "\u0edc", "\u0edd", "\u0ebc",
807 - "\u0ebd", "\u0eb0", "\u0eb1", "\u0eb2", "\u0eb3", "\u0eb4", "\u0eb5", "\u0eb6", "\u0eb7", "\u0eb8",
808 - "\u0eb9", "\u0ebb", "\u0ec0", "\u0ec1", "\u0ec2", "\u0ec3", "\u0ec4", "\u0ec8", "\u0ec9", "\u0eca",
809 - "\u0ecb", "\u0ecc", "\u0ecd", "\u0ed0", "\u0ed1", "\u0ed2", "\u0ed3", "\u0ed4", "\u0ed5", "\u0ed6",
810 - "\u0ed7", "\u0ed8", "\u0ed9", "\u20ad", "\u0ec6", "\u0eaf"
811 - ]
812 - },
813 - 'khmer': {
814 - 'labelMsg': 'wikieditor-toolbar-characters-page-khmer',
815 - 'language': 'km',
816 - 'layout': 'characters',
817 - 'characters': [
818 - "\u1780", "\u1781", "\u1782", "\u1783", "\u1784", "\u1785", "\u1786", "\u1787", "\u1788", "\u1789",
819 - "\u178a", "\u178b", "\u178c", "\u178d", "\u178e", "\u178f", "\u1790", "\u1791", "\u1792", "\u1793",
820 - "\u1794", "\u1795", "\u1796", "\u1797", "\u1798", "\u1799", "\u179a", "\u179b", "\u179c", "\u179f",
821 - "\u17a0", "\u17a1", "\u17a2", "\u17a3", "\u17a4", "\u17a5", "\u17a6", "\u17a7", "\u17a8", "\u17a9",
822 - "\u17aa", "\u17ab", "\u17ac", "\u17ad", "\u17ae", "\u17af", "\u17b0", "\u17b1", "\u17b2", "\u17b3",
823 - "\u17d2", "\u17b4", "\u17b5", "\u17b6", "\u17b7", "\u17b8", "\u17b9", "\u17ba", "\u17bb", "\u17bc",
824 - "\u17bd", "\u17be", "\u17bf", "\u17c0", "\u17c1", "\u17c2", "\u17c3", "\u17c4", "\u17c5", "\u17c6",
825 - "\u17c7", "\u17c8", "\u17c9", "\u17ca", "\u17cb", "\u17cc", "\u17cd", "\u17ce", "\u17cf", "\u17d0",
826 - "\u17d1", "\u17d3", "\u17dd", "\u17dc", "\u17e0", "\u17e1", "\u17e2", "\u17e3", "\u17e4", "\u17e5",
827 - "\u17e6", "\u17e7", "\u17e8", "\u17e9", "\u17db", "\u17d4", "\u17d5", "\u17d6", "\u17d7", "\u17d8",
828 - "\u17d9", "\u17da", "\u17f0", "\u17f1", "\u17f2", "\u17f3", "\u17f4", "\u17f5", "\u17f6", "\u17f7",
829 - "\u17f8", "\u17f9", "\u19e0", "\u19e1", "\u19e2", "\u19e3", "\u19e4", "\u19e5", "\u19e6", "\u19e7",
830 - "\u19e8", "\u19e9", "\u19ea", "\u19eb", "\u19ec", "\u19ed", "\u19ee", "\u19ef", "\u19f0", "\u19f1",
831 - "\u19f2", "\u19f3", "\u19f4", "\u19f5", "\u19f6", "\u19f7", "\u19f8", "\u19f9", "\u19fa", "\u19fb",
832 - "\u19fc", "\u19fd", "\u19fe", "\u19ff"
833 - ]
834 - }
835 - }
836 - },
837 - 'help': {
838 - labelMsg: 'wikieditor-toolbar-section-help',
839 - type: 'booklet',
840 - deferLoad: true,
841 - pages: {
842 - 'format': {
843 - labelMsg: 'wikieditor-toolbar-help-page-format',
844 - layout: 'table',
845 - headings: [
846 - { textMsg: 'wikieditor-toolbar-help-heading-description' },
847 - { textMsg: 'wikieditor-toolbar-help-heading-syntax' },
848 - { textMsg: 'wikieditor-toolbar-help-heading-result' }
849 - ],
850 - rows: [
851 - {
852 - 'description': { htmlMsg: 'wikieditor-toolbar-help-content-italic-description' },
853 - 'syntax': { htmlMsg: 'wikieditor-toolbar-help-content-italic-syntax' },
854 - 'result': { htmlMsg: 'wikieditor-toolbar-help-content-italic-result' }
855 - },
856 - {
857 - 'description': { htmlMsg: 'wikieditor-toolbar-help-content-bold-description' },
858 - 'syntax': { htmlMsg: 'wikieditor-toolbar-help-content-bold-syntax' },
859 - 'result': { htmlMsg: 'wikieditor-toolbar-help-content-bold-result' }
860 - },
861 - {
862 - 'description': { htmlMsg: 'wikieditor-toolbar-help-content-bolditalic-description' },
863 - 'syntax': { htmlMsg: 'wikieditor-toolbar-help-content-bolditalic-syntax' },
864 - 'result': { htmlMsg: 'wikieditor-toolbar-help-content-bolditalic-result' }
865 - }
866 - ]
867 - },
868 - 'link': {
869 - labelMsg: 'wikieditor-toolbar-help-page-link',
870 - layout: 'table',
871 - headings: [
872 - { textMsg: 'wikieditor-toolbar-help-heading-description' },
873 - { textMsg: 'wikieditor-toolbar-help-heading-syntax' },
874 - { textMsg: 'wikieditor-toolbar-help-heading-result' }
875 - ],
876 - rows: [
877 - {
878 - 'description': { htmlMsg: 'wikieditor-toolbar-help-content-ilink-description' },
879 - 'syntax': { htmlMsg: 'wikieditor-toolbar-help-content-ilink-syntax' },
880 - 'result': { htmlMsg: 'wikieditor-toolbar-help-content-ilink-result' }
881 - },
882 - {
883 - 'description': { htmlMsg: 'wikieditor-toolbar-help-content-xlink-description' },
884 - 'syntax': { htmlMsg: 'wikieditor-toolbar-help-content-xlink-syntax' },
885 - 'result': { htmlMsg: 'wikieditor-toolbar-help-content-xlink-result' }
886 - }
887 - ]
888 - },
889 - 'heading': {
890 - labelMsg: 'wikieditor-toolbar-help-page-heading',
891 - layout: 'table',
892 - headings: [
893 - { textMsg: 'wikieditor-toolbar-help-heading-description' },
894 - { textMsg: 'wikieditor-toolbar-help-heading-syntax' },
895 - { textMsg: 'wikieditor-toolbar-help-heading-result' }
896 - ],
897 - rows: [
898 - {
899 - 'description': { htmlMsg: 'wikieditor-toolbar-help-content-heading2-description' },
900 - 'syntax': { htmlMsg: 'wikieditor-toolbar-help-content-heading2-syntax' },
901 - 'result': { htmlMsg: 'wikieditor-toolbar-help-content-heading2-result' }
902 - },
903 - {
904 - 'description': { htmlMsg: 'wikieditor-toolbar-help-content-heading3-description' },
905 - 'syntax': { htmlMsg: 'wikieditor-toolbar-help-content-heading3-syntax' },
906 - 'result': { htmlMsg: 'wikieditor-toolbar-help-content-heading3-result' }
907 - },
908 - {
909 - 'description': { htmlMsg: 'wikieditor-toolbar-help-content-heading4-description' },
910 - 'syntax': { htmlMsg: 'wikieditor-toolbar-help-content-heading4-syntax' },
911 - 'result': { htmlMsg: 'wikieditor-toolbar-help-content-heading4-result' }
912 - },
913 - {
914 - 'description': { htmlMsg: 'wikieditor-toolbar-help-content-heading5-description' },
915 - 'syntax': { htmlMsg: 'wikieditor-toolbar-help-content-heading5-syntax' },
916 - 'result': { htmlMsg: 'wikieditor-toolbar-help-content-heading5-result' }
917 - }
918 - ]
919 - },
920 - 'list': {
921 - labelMsg: 'wikieditor-toolbar-help-page-list',
922 - layout: 'table',
923 - headings: [
924 - { textMsg: 'wikieditor-toolbar-help-heading-description' },
925 - { textMsg: 'wikieditor-toolbar-help-heading-syntax' },
926 - { textMsg: 'wikieditor-toolbar-help-heading-result' }
927 - ],
928 - rows: [
929 - {
930 - 'description': { htmlMsg: 'wikieditor-toolbar-help-content-ulist-description' },
931 - 'syntax': { htmlMsg: 'wikieditor-toolbar-help-content-ulist-syntax' },
932 - 'result': { htmlMsg: 'wikieditor-toolbar-help-content-ulist-result' }
933 - },
934 - {
935 - 'description': { htmlMsg: 'wikieditor-toolbar-help-content-olist-description' },
936 - 'syntax': { htmlMsg: 'wikieditor-toolbar-help-content-olist-syntax' },
937 - 'result': { htmlMsg: 'wikieditor-toolbar-help-content-olist-result' }
938 - }
939 - ]
940 - },
941 - 'file': {
942 - labelMsg: 'wikieditor-toolbar-help-page-file',
943 - layout: 'table',
944 - headings: [
945 - { textMsg: 'wikieditor-toolbar-help-heading-description' },
946 - { textMsg: 'wikieditor-toolbar-help-heading-syntax' },
947 - { textMsg: 'wikieditor-toolbar-help-heading-result' }
948 - ],
949 - rows: [
950 - {
951 - 'description': { htmlMsg: 'wikieditor-toolbar-help-content-file-description' },
952 - 'syntax': { htmlMsg: 'wikieditor-toolbar-help-content-file-syntax' },
953 - 'result': { htmlMsg: [ 'wikieditor-toolbar-help-content-file-result', stylepath ] }
954 - }
955 - ]
956 - },
957 - 'reference': {
958 - labelMsg: 'wikieditor-toolbar-help-page-reference',
959 - layout: 'table',
960 - headings: [
961 - { textMsg: 'wikieditor-toolbar-help-heading-description' },
962 - { textMsg: 'wikieditor-toolbar-help-heading-syntax' },
963 - { textMsg: 'wikieditor-toolbar-help-heading-result' }
964 - ],
965 - rows: [
966 - {
967 - 'description': { htmlMsg: 'wikieditor-toolbar-help-content-reference-description' },
968 - 'syntax': { htmlMsg: 'wikieditor-toolbar-help-content-reference-syntax' },
969 - 'result': { htmlMsg: 'wikieditor-toolbar-help-content-reference-result' }
970 - },
971 - {
972 - 'description': { htmlMsg: 'wikieditor-toolbar-help-content-rereference-description' },
973 - 'syntax': { htmlMsg: 'wikieditor-toolbar-help-content-rereference-syntax' },
974 - 'result': { htmlMsg: 'wikieditor-toolbar-help-content-rereference-result' }
975 - },
976 - {
977 - 'description': { htmlMsg: 'wikieditor-toolbar-help-content-showreferences-description' },
978 - 'syntax': { htmlMsg: 'wikieditor-toolbar-help-content-showreferences-syntax' },
979 - 'result': { htmlMsg: 'wikieditor-toolbar-help-content-showreferences-result' }
980 - }
981 - ]
982 - },
983 - 'discussion': {
984 - labelMsg: 'wikieditor-toolbar-help-page-discussion',
985 - layout: 'table',
986 - headings: [
987 - { textMsg: 'wikieditor-toolbar-help-heading-description' },
988 - { textMsg: 'wikieditor-toolbar-help-heading-syntax' },
989 - { textMsg: 'wikieditor-toolbar-help-heading-result' }
990 - ],
991 - rows: [
992 - {
993 - 'description': { htmlMsg: 'wikieditor-toolbar-help-content-signaturetimestamp-description' },
994 - 'syntax': { htmlMsg: 'wikieditor-toolbar-help-content-signaturetimestamp-syntax' },
995 - 'result': { htmlMsg: 'wikieditor-toolbar-help-content-signaturetimestamp-result' }
996 - },
997 - {
998 - 'description': { htmlMsg: 'wikieditor-toolbar-help-content-signature-description' },
999 - 'syntax': { htmlMsg: 'wikieditor-toolbar-help-content-signature-syntax' },
1000 - 'result': { htmlMsg: 'wikieditor-toolbar-help-content-signature-result' }
1001 - },
1002 - {
1003 - 'description': { htmlMsg: 'wikieditor-toolbar-help-content-indent-description' },
1004 - 'syntax': { htmlMsg: 'wikieditor-toolbar-help-content-indent-syntax' },
1005 - 'result': { htmlMsg: 'wikieditor-toolbar-help-content-indent-result' }
1006 - }
1007 - ]
1008 - }
1009 - }
1010 - }
1011 -},
1012 -'dialogs': {
1013 - 'insert-link': {
1014 - // For now, apply the old browser and iframe requirements to the link and table dialogs as well
1015 - // This'll be removed once these dialogs are confirmed stable without the iframe and/or in more browsers
1016 - /*
1017 - 'browsers': {
1018 - // Left-to-right languages
1019 - 'ltr': {
1020 - 'msie': [['>=', 7]],
1021 - 'firefox': [['>=', 3]],
1022 - 'opera': [['>=', 10]],
1023 - 'safari': [['>=', 4]],
1024 - 'chrome': [['>=', 4]]
1025 - },
1026 - // Right-to-left languages
1027 - 'rtl': {
1028 - 'msie': [['>=', 8]],
1029 - 'firefox': [['>=', 3]],
1030 - 'opera': [['>=', 10]],
1031 - 'safari': [['>=', 4]],
1032 - 'chrome': [['>=', 4]]
1033 - }
1034514 },
1035 - 'req': [ 'iframe' ],
1036 - */
1037 - filters: [ '#wpTextbox1.toolbar-dialogs' ],
1038 - titleMsg: 'wikieditor-toolbar-tool-link-title',
1039 - id: 'wikieditor-toolbar-link-dialog',
1040 - html: '\
1041 - <fieldset>\
1042 - <div class="wikieditor-toolbar-field-wrapper">\
1043 - <label for="wikieditor-toolbar-link-int-target" rel="wikieditor-toolbar-tool-link-int-target" id="wikieditor-toolbar-tool-link-int-target-label"></label>\
1044 - <div id="wikieditor-toolbar-link-int-target-status"></div>\
1045 - <input type="text" id="wikieditor-toolbar-link-int-target" />\
1046 - </div>\
1047 - <div class="wikieditor-toolbar-field-wrapper">\
1048 - <label for="wikieditor-toolbar-link-int-text" rel="wikieditor-toolbar-tool-link-int-text"></label>\
1049 - <input type="text" id="wikieditor-toolbar-link-int-text" />\
1050 - </div>\
1051 - <div class="wikieditor-toolbar-field-wrapper">\
1052 - <div class="wikieditor-toolbar-floated-field-wrapper">\
1053 - <input type="radio" id="wikieditor-toolbar-link-type-int" name="wikieditor-toolbar-link-type" selected />\
1054 - <label for="wikieditor-toolbar-link-type-int" rel="wikieditor-toolbar-tool-link-int"></label>\
1055 - </div>\
1056 - <div class="wikieditor-toolbar-floated-field-wrapper">\
1057 - <input type="radio" id="wikieditor-toolbar-link-type-ext" name="wikieditor-toolbar-link-type" />\
1058 - <label for="wikieditor-toolbar-link-type-ext" rel="wikieditor-toolbar-tool-link-ext"></label>\
1059 - </div>\
1060 - </div>\
1061 - </fieldset>',
1062 - init: function() {
1063 - function isExternalLink( s ) {
1064 - // The following things are considered to be external links:
1065 - // * Starts a URL protocol
1066 - // * Starts with www.
1067 - // All of these are potentially valid titles, and the latter two
1068 - // categories match about 6300 titles in enwiki's ns0. Out of 6.9M
1069 - // titles, that's 0.09%
1070 - if ( typeof arguments.callee.regex == 'undefined' ) {
1071 - // Cache the regex
1072 - arguments.callee.regex =
1073 - new RegExp( "^(" + wgUrlProtocols + "|www\\.)", 'i');
1074 - }
1075 - return s.match( arguments.callee.regex );
1076 - }
1077 - // Updates the status indicator above the target link
1078 - function updateWidget( status ) {
1079 - $j( '#wikieditor-toolbar-link-int-target-status' ).children().hide();
1080 - $j( '#wikieditor-toolbar-link-int-target' ).parent()
1081 - .removeClass( 'status-invalid status-external status-notexists status-exists status-loading' );
1082 - if ( status ) {
1083 - $j( '#wikieditor-toolbar-link-int-target-status-' + status ).show();
1084 - $j( '#wikieditor-toolbar-link-int-target' ).parent().addClass( 'status-' + status );
1085 - }
1086 - if ( status == 'invalid' ) {
1087 - $j( '.ui-dialog:visible .ui-dialog-buttonpane button:first' )
1088 - .attr( 'disabled', true )
1089 - .addClass( 'disabled' );
1090 - } else {
1091 - $j( '.ui-dialog:visible .ui-dialog-buttonpane button:first' )
1092 - .removeAttr('disabled')
1093 - .removeClass('disabled');
1094 - }
1095 - }
1096 - // Updates the UI to show if the page title being inputed by the user exists or not
1097 - // accepts parameter internal for bypassing external link detection
1098 - function updateExistence( internal ) {
1099 - // ensure the internal parameter is a boolean
1100 - if ( internal != true ) internal = false;
1101 - // Abort previous request
1102 - var request = $j( '#wikieditor-toolbar-link-int-target-status' ).data( 'request' );
1103 - if ( request ) {
1104 - request.abort();
1105 - }
1106 - var target = $j( '#wikieditor-toolbar-link-int-target' ).val();
1107 - var cache = $j( '#wikieditor-toolbar-link-int-target-status' ).data( 'existencecache' );
1108 - if ( cache[target] ) {
1109 - updateWidget( cache[target] );
1110 - return;
1111 - }
1112 - if ( target.replace( /^\s+$/,'' ) == '' ) {
1113 - // Hide the widget when the textbox is empty
1114 - updateWidget( false );
1115 - return;
1116 - }
1117 - // If the forced internal paremter was not true, check if the target is an external link
1118 - if ( !internal && isExternalLink( target ) ) {
1119 - updateWidget( 'external' );
1120 - return;
1121 - }
1122 - if ( target.indexOf( '|' ) != -1 ) {
1123 - // Title contains | , which means it's invalid
1124 - // but confuses the API. Show invalid and bypass API
1125 - updateWidget( 'invalid' );
1126 - return;
1127 - }
1128 - // Show loading spinner while waiting for the API to respond
1129 - updateWidget( 'loading' );
1130 - // Call the API to check page status, saving the request object so it can be aborted if necessary
1131 - $j( '#wikieditor-toolbar-link-int-target-status' ).data(
1132 - 'request',
1133 - $j.ajax( {
1134 - url: wgScriptPath + '/api.php',
1135 - dataType: 'json',
1136 - data: {
1137 - 'action': 'query',
1138 - 'indexpageids': '',
1139 - 'titles': target,
1140 - 'converttitles': '',
1141 - 'format': 'json'
 515+ 'characters': {
 516+ 'labelMsg': 'wikieditor-toolbar-section-characters',
 517+ 'type': 'booklet',
 518+ 'deferLoad': true,
 519+ 'pages': {
 520+ 'latin': {
 521+ 'labelMsg': 'wikieditor-toolbar-characters-page-latin',
 522+ 'layout': 'characters',
 523+ 'characters': [
 524+ "\u00c1", "\u00e1", "\u00c0", "\u00e0", "\u00c2", "\u00e2", "\u00c4", "\u00e4", "\u00c3",
 525+ "\u00e3", "\u01cd", "\u01ce", "\u0100", "\u0101", "\u0102", "\u0103", "\u0104", "\u0105",
 526+ "\u00c5", "\u00e5", "\u0106", "\u0107", "\u0108", "\u0109", "\u00c7", "\u00e7", "\u010c",
 527+ "\u010d", "\u010a", "\u010b", "\u0110", "\u0111", "\u010e", "\u010f", "\u00c9", "\u00e9",
 528+ "\u00c8", "\u00e8", "\u00ca", "\u00ea", "\u00cb", "\u00eb", "\u011a", "\u011b", "\u0112",
 529+ "\u0113", "\u0114", "\u0115", "\u0116", "\u0117", "\u0118", "\u0119", "\u011c", "\u011d",
 530+ "\u0122", "\u0123", "\u011e", "\u011f", "\u0120", "\u0121", "\u0124", "\u0125", "\u0126",
 531+ "\u0127", "\u00cd", "\u00ed", "\u00cc", "\u00ec", "\u00ce", "\u00ee", "\u00cf", "\u00ef",
 532+ "\u0128", "\u0129", "\u01cf", "\u01d0", "\u012a", "\u012b", "\u012c", "\u012d", "\u0130",
 533+ "\u0131", "\u012e", "\u012f", "\u0134", "\u0135", "\u0136", "\u0137", "\u0139", "\u013a",
 534+ "\u013b", "\u013c", "\u013d", "\u013e", "\u0141", "\u0142", "\u013f", "\u0140", "\u0143",
 535+ "\u0144", "\u00d1", "\u00f1", "\u0145", "\u0146", "\u0147", "\u0148", "\u00d3", "\u00f3",
 536+ "\u00d2", "\u00f2", "\u00d4", "\u00f4", "\u00d6", "\u00f6", "\u00d5", "\u00f5", "\u01d1",
 537+ "\u01d2", "\u014c", "\u014d", "\u014e", "\u014f", "\u01ea", "\u01eb", "\u0150", "\u0151",
 538+ "\u0154", "\u0155", "\u0156", "\u0157", "\u0158", "\u0159", "\u015a", "\u015b", "\u015c",
 539+ "\u015d", "\u015e", "\u015f", "\u0160", "\u0161", "\u0162", "\u0163", "\u0164", "\u0165",
 540+ "\u00da", "\u00fa", "\u00d9", "\u00f9", "\u00db", "\u00fb", "\u00dc", "\u00fc", "\u0168",
 541+ "\u0169", "\u016e", "\u016f", "\u01d3", "\u01d4", "\u016a", "\u016b", "\u01d6", "\u01d8",
 542+ "\u01da", "\u01dc", "\u016c", "\u016d", "\u0172", "\u0173", "\u0170", "\u0171", "\u0174",
 543+ "\u0175", "\u00dd", "\u00fd", "\u0176", "\u0177", "\u0178", "\u00ff", "\u0232", "\u0233",
 544+ "\u0179", "\u017a", "\u017d", "\u017e", "\u017b", "\u017c", "\u00c6", "\u00e6", "\u01e2",
 545+ "\u01e3", "\u00d8", "\u00f8", "\u0152", "\u0153", "\u00df", "\u00f0", "\u00de", "\u00fe",
 546+ "\u018f", "\u0259"
 547+ ]
 548+ },
 549+ 'latinextended': {
 550+ 'labelMsg': 'wikieditor-toolbar-characters-page-latinextended',
 551+ 'layout': 'characters',
 552+ 'characters': [
 553+ "\u1e00", "\u1e01", "\u1e9a", "\u1ea0", "\u1ea1", "\u1ea2", "\u1ea3", "\u1ea4", "\u1ea5",
 554+ "\u1ea6", "\u1ea7", "\u1ea8", "\u1ea9", "\u1eaa", "\u1eab", "\u1eac", "\u1ead", "\u1eae",
 555+ "\u1eaf", "\u1eb0", "\u1eb1", "\u1eb2", "\u1eb3", "\u1eb4", "\u1eb5", "\u1eb6", "\u1eb7",
 556+ "\u1e02", "\u1e03", "\u1e04", "\u1e05", "\u1e06", "\u1e07", "\u1e08", "\u1e09", "\u1e0a",
 557+ "\u1e0b", "\u1e0c", "\u1e0d", "\u1e0e", "\u1e0f", "\u1e10", "\u1e11", "\u1e12", "\u1e13",
 558+ "\u1e14", "\u1e15", "\u1e16", "\u1e17", "\u1e18", "\u1e19", "\u1e1a", "\u1e1b", "\u1e1c",
 559+ "\u1e1d", "\u1eb8", "\u1eb9", "\u1eba", "\u1ebb", "\u1ebc", "\u1ebd", "\u1ebe", "\u1ebf",
 560+ "\u1ec0", "\u1ec1", "\u1ec2", "\u1ec3", "\u1ec4", "\u1ec5", "\u1ec6", "\u1ec7", "\u1e1e",
 561+ "\u1e1f", "\u1e20", "\u1e21", "\u1e22", "\u1e23", "\u1e24", "\u1e25", "\u1e26", "\u1e27",
 562+ "\u1e28", "\u1e29", "\u1e2a", "\u1e2b", "\u1e96", "\u1e2c", "\u1e2d", "\u1e2e", "\u1e2f",
 563+ "\u1ec8", "\u1ec9", "\u1eca", "\u1ecb", "\u1e30", "\u1e31", "\u1e32", "\u1e33", "\u1e34",
 564+ "\u1e35", "\u1e36", "\u1e37", "\u1e38", "\u1e39", "\u1e3a", "\u1e3b", "\u1e3c", "\u1e3d",
 565+ "\u1efa", "\u1efb", "\u1e3e", "\u1e3f", "\u1e40", "\u1e41", "\u1e42", "\u1e43", "\u1e44",
 566+ "\u1e45", "\u1e46", "\u1e47", "\u1e48", "\u1e49", "\u1e4a", "\u1e4b", "\u1e4c", "\u1e4d",
 567+ "\u1e4e", "\u1e4f", "\u1e50", "\u1e51", "\u1e52", "\u1e53", "\u1ecc", "\u1ecd", "\u1ece",
 568+ "\u1ecf", "\u1ed0", "\u1ed1", "\u1ed2", "\u1ed3", "\u1ed4", "\u1ed5", "\u1ed6", "\u1ed7",
 569+ "\u1ed8", "\u1ed9", "\u1eda", "\u1edb", "\u1edc", "\u1edd", "\u1ede", "\u1edf", "\u1ee0",
 570+ "\u1ee1", "\u1ee2", "\u1ee3", "\u1e54", "\u1e55", "\u1e56", "\u1e57", "\u1e58", "\u1e59",
 571+ "\u1e5a", "\u1e5b", "\u1e5c", "\u1e5d", "\u1e5e", "\u1e5f", "\u1e60", "\u1e61", "\u1e9b",
 572+ "\u1e62", "\u1e63", "\u1e64", "\u1e65", "\u1e66", "\u1e67", "\u1e68", "\u1e69", "\u1e9c",
 573+ "\u1e9d", "\u1e6a", "\u1e6b", "\u1e6c", "\u1e6d", "\u1e6e", "\u1e6f", "\u1e70", "\u1e71",
 574+ "\u1e97", "\u1e72", "\u1e73", "\u1e74", "\u1e75", "\u1e76", "\u1e77", "\u1e78", "\u1e79",
 575+ "\u1e7a", "\u1e7b", "\u1ee4", "\u1ee5", "\u1ee6", "\u1ee7", "\u1ee8", "\u1ee9", "\u1eea",
 576+ "\u1eeb", "\u1eec", "\u1eed", "\u1eee", "\u1eef", "\u1ef0", "\u1ef1", "\u1e7c", "\u1e7d",
 577+ "\u1e7e", "\u1e7f", "\u1efc", "\u1efd", "\u1e80", "\u1e81", "\u1e82", "\u1e83", "\u1e84",
 578+ "\u1e85", "\u1e86", "\u1e87", "\u1e88", "\u1e89", "\u1e98", "\u1e8a", "\u1e8b", "\u1e8c",
 579+ "\u1e8d", "\u1e8e", "\u1e8f", "\u1e99", "\u1ef2", "\u1ef3", "\u1ef4", "\u1ef5", "\u1ef6",
 580+ "\u1ef7", "\u1ef8", "\u1ef9", "\u1efe", "\u1eff", "\u1e90", "\u1e91", "\u1e92", "\u1e93",
 581+ "\u1e94", "\u1e95", "\u1e9e", "\u1e9f"
 582+ ]
 583+ },
 584+ 'ipa': {
 585+ 'labelMsg': 'wikieditor-toolbar-characters-page-ipa',
 586+ 'layout': 'characters',
 587+ 'characters': [
 588+ "p", "t\u032a", "t", "\u0288", "c", "k", "q", "\u02a1", "\u0294", "b","d\u032a", "d", "\u0256",
 589+ "\u025f", "\u0261", "\u0262", "\u0253", "\u0257", "\u0284", "\u0260", "\u029b", "t\u0361s",
 590+ "t\u0361\u0283", "t\u0361\u0255", "d\u0361z", "d\u0361\u0292", "d\u0361\u0291", "\u0278", "f",
 591+ "\u03b8", "s", "\u0283", "\u0285", "\u0286", "\u0282", "\u0255", "\u00e7", "\u0267", "x",
 592+ "\u03c7", "\u0127", "\u029c", "h", "\u03b2", "v", "\u028d", "\u00f0", "z", "\u0292", "\u0293",
 593+ "\u0290", "\u0291", "\u029d", "\u0263", "\u0281", "\u0295", "\u0296", "\u02a2", "\u0266",
 594+ "\u026c", "\u026e", "m", "m\u0329", "\u0271", "\u0271\u0329", "\u0271\u030d", "n\u032a",
 595+ "n\u032a\u030d", "n", "n\u0329", "\u0273", "\u0273\u0329", "\u0272", "\u0272\u0329", "\u014b",
 596+ "\u014b\u030d", "\u014b\u0329", "\u0274", "\u0274\u0329", "\u0299", "\u0299\u0329", "r",
 597+ "r\u0329", "\u0280", "\u0280\u0329", "\u027e", "\u027d", "\u027f", "\u027a", "l\u032a",
 598+ "l\u032a\u0329", "l", "l\u0329", "\u026b", "\u026b\u0329", "\u026d", "\u026d\u0329", "\u028e",
 599+ "\u028e\u0329", "\u029f", "\u029f\u0329", "w", "\u0265", "\u028b", "\u0279", "\u027b", "j",
 600+ "\u0270", "\u0298", "\u01c2", "\u01c0", "!", "\u01c1", "\u02b0", "\u02b1", "\u02b7", "\u02b8",
 601+ "\u02b2", "\u02b3", "\u207f", "\u02e1", "\u02b4", "\u02b5", "\u02e2", "\u02e3", "\u02e0",
 602+ "\u02b6", "\u02e4", "\u02c1", "\u02c0", "\u02bc", "i", "i\u032f", "\u0129", "y", "y\u032f",
 603+ "\u1ef9", "\u026a", "\u026a\u032f", "\u026a\u0303", "\u028f", "\u028f\u032f", "\u028f\u0303",
 604+ "\u0268", "\u0268\u032f", "\u0268\u0303", "\u0289", "\u0289\u032f", "\u0289\u0303", "\u026f",
 605+ "\u026f\u032f", "\u026f\u0303", "u", "u\u032f", "\u0169", "\u028a", "\u028a\u032f",
 606+ "\u028a\u0303", "e", "e\u032f", "\u1ebd", "\u00f8", "\u00f8\u032f", "\u00f8\u0303", "\u0258",
 607+ "\u0258\u032f", "\u0258\u0303", "\u0275", "\u0275\u032f", "\u0275\u0303", "\u0264",
 608+ "\u0264\u032f", "\u0264\u0303", "o", "o\u032f", "\u00f5", "\u025b", "\u025b\u032f",
 609+ "\u025b\u0303", "\u0153", "\u0153\u032f", "\u0153\u0303", "\u025c", "\u025c\u032f",
 610+ "\u025c\u0303", "\u0259", "\u0259\u032f", "\u0259\u0303", "\u025e", "\u025e\u032f",
 611+ "\u025e\u0303", "\u028c", "\u028c\u032f", "\u028c\u0303", "\u0254", "\u0254\u032f",
 612+ "\u0254\u0303", "\u00e6", "\u00e6\u032f", "\u00e6\u0303", "\u0276", "\u0276\u032f",
 613+ "\u0276\u0303", "a", "a\u032f", "\u00e3", "\u0250", "\u0250\u032f", "\u0250\u0303", "\u0251",
 614+ "\u0251\u032f", "\u0251\u0303", "\u0252", "\u0252\u032f", "\u0252\u0303", "\u02c8", "\u02cc",
 615+ "\u02d0", "\u02d1", "\u02d8", ".", "\u203f", "|", "\u2016"
 616+ ]
 617+ },
 618+ 'symbols': {
 619+ 'labelMsg': 'wikieditor-toolbar-characters-page-symbols',
 620+ 'layout': 'characters',
 621+ 'characters': [
 622+ "~", "|", "\u00a1", "\u00bf", "\u2020", "\u2021", "\u2194", "\u2191", "\u2193", "\u2022",
 623+ "\u00b6", "#", "\u00bd", "\u2153", "\u2154", "\u00bc", "\u00be", "\u215b", "\u215c", "\u215d",
 624+ "\u215e", "\u221e", "\u2018", "\u2019",
 625+ {
 626+ 'label': "\u201c\u201d",
 627+ 'action': {
 628+ 'type': 'encapsulate', 'options': { 'pre': "\u201c", 'post': "\u201d" }
 629+ }
1142630 },
1143 - success: function( data ) {
1144 - var status;
1145 - if ( !data || typeof data.query == 'undefined' ) {
1146 - // This happens in some weird cases
1147 - status = false;
1148 - } else {
1149 - var page = data.query.pages[data.query.pageids[0]];
1150 - status = 'exists';
1151 - if ( typeof page.missing != 'undefined' )
1152 - status = 'notexists';
1153 - else if ( typeof page.invalid != 'undefined' )
1154 - status = 'invalid';
 631+ {
 632+ 'label': "\u201e\u201c",
 633+ 'action': {
 634+ 'type': 'encapsulate', 'options': { 'pre': "\u201e", 'post': "\u201c" }
1155635 }
1156 - // Cache the status of the link target if the force internal parameter was not passed
1157 - if ( !internal ) cache[target] = status;
1158 - updateWidget( status );
1159 - }
1160 - } )
1161 - );
1162 - }
1163 - $j( '#wikieditor-toolbar-link-type-int, #wikieditor-toolbar-link-type-ext' ).click( function() {
1164 - if( $j( '#wikieditor-toolbar-link-type-ext' ).is( ':checked' ) ) {
1165 - // Abort previous request
1166 - var request = $j( '#wikieditor-toolbar-link-int-target-status' ).data( 'request' );
1167 - if ( request ) {
1168 - request.abort();
1169 - }
1170 - updateWidget( 'external' );
1171 - }
1172 - if( $j( '#wikieditor-toolbar-link-type-int' ).is( ':checked' ) )
1173 - updateExistence( true );
1174 - });
1175 - // Set labels of tabs based on rel values
1176 - var u = mw.usability;
1177 - $j(this).find( '[rel]' ).each( function() {
1178 - $j(this).text( u.getMsg( $j(this).attr( 'rel' ) ) );
1179 - });
1180 - // Set tabindexes on form fields
1181 - $j.wikiEditor.modules.dialogs.fn.setTabindexes( $j(this).find( 'input' ).not( '[tabindex]' ) );
1182 - // Setup the tooltips in the textboxes
1183 - $j( '#wikieditor-toolbar-link-int-target' )
1184 - .data( 'tooltip', u.getMsg( 'wikieditor-toolbar-tool-link-int-target-tooltip' ) );
1185 - $j( '#wikieditor-toolbar-link-int-text' )
1186 - .data( 'tooltip', u.getMsg( 'wikieditor-toolbar-tool-link-int-text-tooltip' ) );
1187 - $j( '#wikieditor-toolbar-link-int-target, #wikieditor-toolbar-link-int-text' )
1188 - .each( function() {
1189 - var tooltip = u.getMsg( $j( this ).attr( 'id' ) + '-tooltip' );
1190 - if ( $j( this ).val() == '' )
1191 - $j( this )
1192 - .addClass( 'wikieditor-toolbar-dialog-hint' )
1193 - .val( $j( this ).data( 'tooltip' ) )
1194 - .data( 'tooltip-mode', true );
1195 - } )
1196 - .focus( function() {
1197 - if( $j( this ).val() == $j( this ).data( 'tooltip' ) ) {
1198 - $j( this )
1199 - .val( '' )
1200 - .removeClass( 'wikieditor-toolbar-dialog-hint' )
1201 - .data( 'tooltip-mode', false );
1202 - }
1203 - })
1204 - .bind( 'change', function() {
1205 - if ( $j( this ).val() != $j( this ).data( 'tooltip' ) ) {
1206 - $j( this )
1207 - .removeClass( 'wikieditor-toolbar-dialog-hint' )
1208 - .data( 'tooltip-mode', false );
1209 - }
1210 - })
1211 - .bind( 'blur', function() {
1212 - if ( $j( this ).val() == '' ) {
1213 - $j( this )
1214 - .addClass( 'wikieditor-toolbar-dialog-hint' )
1215 - .val( $j( this ).data( 'tooltip' ) )
1216 - .data( 'tooltip-mode', true );
1217 - }
1218 - });
1219 -
1220 - // Automatically copy the value of the internal link page title field to the link text field unless the user
1221 - // has changed the link text field - this is a convenience thing since most link texts are going to be the
1222 - // the same as the page title
1223 - // Also change the internal/external radio button accordingly
1224 - $j( '#wikieditor-toolbar-link-int-target' ).bind( 'change keydown paste cut', function() {
1225 - // $j(this).val() is the old value, before the keypress
1226 - // Defer this until $j(this).val() has been updated
1227 - setTimeout( function() {
1228 - if ( isExternalLink( $j( '#wikieditor-toolbar-link-int-target' ).val() ) ) {
1229 - $j( '#wikieditor-toolbar-link-type-ext' ).attr( 'checked', 'checked' );
1230 - updateWidget( 'external' );
1231 - } else {
1232 - $j( '#wikieditor-toolbar-link-type-int' ).attr( 'checked', 'checked' );
1233 - updateExistence();
1234 - }
1235 - if ( $j( '#wikieditor-toolbar-link-int-text' ).data( 'untouched' ) )
1236 - if ( $j( '#wikieditor-toolbar-link-int-target' ).val() ==
1237 - $j( '#wikieditor-toolbar-link-int-target' ).data( 'tooltip' ) ) {
1238 - $j( '#wikieditor-toolbar-link-int-text' )
1239 - .addClass( 'wikieditor-toolbar-dialog-hint' )
1240 - .val( $j( '#wikieditor-toolbar-link-int-text' ).data( 'tooltip' ) )
1241 - .change();
1242 - } else {
1243 - $j( '#wikieditor-toolbar-link-int-text' )
1244 - .val( $j( '#wikieditor-toolbar-link-int-target' ).val() )
1245 - .change();
 636+ },
 637+ {
 638+ 'label': "\u00ab\u00bb",
 639+ 'action': {
 640+ 'type': 'encapsulate', 'options': { 'pre': "\u00ab", 'post': "\u00bb" }
1246641 }
1247 - }, 0 );
1248 - });
1249 - $j( '#wikieditor-toolbar-link-int-text' ).bind( 'change keydown paste cut', function() {
1250 - var oldVal = $j(this).val();
1251 - var that = this;
1252 - setTimeout( function() {
1253 - if ( $j(that).val() != oldVal )
1254 - $j(that).data( 'untouched', false );
1255 - }, 0 );
1256 - });
1257 - // Add images to the page existence widget, which will be shown mutually exclusively to communicate if the
1258 - // page exists, does not exist or the title is invalid (like if it contains a | character)
1259 - var existsMsg = u.getMsg( 'wikieditor-toolbar-tool-link-int-target-status-exists' );
1260 - var notexistsMsg = u.getMsg( 'wikieditor-toolbar-tool-link-int-target-status-notexists' );
1261 - var invalidMsg = u.getMsg( 'wikieditor-toolbar-tool-link-int-target-status-invalid' );
1262 - var externalMsg = u.getMsg( 'wikieditor-toolbar-tool-link-int-target-status-external' );
1263 - var loadingMsg = u.getMsg( 'wikieditor-toolbar-tool-link-int-target-status-loading' );
1264 - $j( '#wikieditor-toolbar-link-int-target-status' )
1265 - .append( $j( '<div />' )
1266 - .attr( 'id', 'wikieditor-toolbar-link-int-target-status-exists' )
1267 - .append( existsMsg )
1268 - )
1269 - .append( $j( '<div />' )
1270 - .attr( 'id', 'wikieditor-toolbar-link-int-target-status-notexists' )
1271 - .append( notexistsMsg )
1272 - )
1273 - .append( $j( '<div />' )
1274 - .attr( 'id', 'wikieditor-toolbar-link-int-target-status-invalid' )
1275 - .append( invalidMsg )
1276 - )
1277 - .append( $j( '<div />' )
1278 - .attr( 'id', 'wikieditor-toolbar-link-int-target-status-external' )
1279 - .append( externalMsg )
1280 - )
1281 - .append( $j( '<div />' )
1282 - .attr( 'id', 'wikieditor-toolbar-link-int-target-status-loading' )
1283 - .append( $j( '<img />' ).attr( {
1284 - 'src': $j.wikiEditor.imgPath + 'dialogs/' + 'loading.gif',
1285 - 'alt': loadingMsg,
1286 - 'title': loadingMsg
1287 - } ) )
1288 - )
1289 - .data( 'existencecache', {} )
1290 - .children().hide();
1291 -
1292 - $j( '#wikieditor-toolbar-link-int-target' )
1293 - .bind( 'keyup paste cut', function() {
1294 - // Cancel the running timer if applicable
1295 - if ( typeof $j(this).data( 'timerID' ) != 'undefined' ) {
1296 - clearTimeout( $j(this).data( 'timerID' ) );
1297 - }
1298 - // Delay fetch for a while
1299 - // FIXME: Make 120 configurable elsewhere
1300 - var timerID = setTimeout( updateExistence, 120 );
1301 - $j(this).data( 'timerID', timerID );
1302 - } )
1303 - .change( function() {
1304 - // Cancel the running timer if applicable
1305 - if ( typeof $j(this).data( 'timerID' ) != 'undefined' ) {
1306 - clearTimeout( $j(this).data( 'timerID' ) );
1307 - }
1308 - // Fetch right now
1309 - updateExistence();
1310 - } );
1311 -
1312 - // Title suggestions
1313 - $j( '#wikieditor-toolbar-link-int-target' ).data( 'suggcache', {} ).suggestions( {
1314 - fetch: function( query ) {
1315 - var that = this;
1316 - var title = $j(this).val();
1317 -
1318 - if ( isExternalLink( title ) || title.indexOf( '|' ) != -1 || title == '') {
1319 - $j(this).suggestions( 'suggestions', [] );
1320 - return;
1321 - }
1322 -
1323 - var cache = $j(this).data( 'suggcache' );
1324 - if ( typeof cache[title] != 'undefined' ) {
1325 - $j(this).suggestions( 'suggestions', cache[title] );
1326 - return;
1327 - }
1328 -
1329 - var request = $j.ajax( {
1330 - url: wgScriptPath + '/api.php',
1331 - data: {
1332 - 'action': 'opensearch',
1333 - 'search': title,
1334 - 'namespace': 0,
1335 - 'suggest': '',
1336 - 'format': 'json'
1337642 },
1338 - dataType: 'json',
1339 - success: function( data ) {
1340 - cache[title] = data[1];
1341 - $j(that).suggestions( 'suggestions', data[1] );
1342 - }
1343 - });
1344 - $j(this).data( 'request', request );
 643+ "\u00a4", "\u20b3", "\u0e3f", "\u20b5", "\u00a2", "\u20a1", "\u20a2", "$", "\u20ab", "\u20af",
 644+ "\u20ac", "\u20a0", "\u20a3", "\u0192", "\u20b4", "\u20ad", "\u20a4", "\u2133", "\u20a5",
 645+ "\u20a6", "\u2116", "\u20a7", "\u20b0", "\u00a3", "\u17db", "\u20a8", "\u20aa", "\u09f3",
 646+ "\u20ae", "\u20a9", "\u00a5", "\u2660", "\u2663", "\u2665", "\u2666", "m\u00b2", "m\u00b3",
 647+ "\u2013", "\u2014", "\u2026", "\u2018", "\u2019", "\u201c", "\u201d", "\u00b0", "\u2032",
 648+ "\u2033", "\u2248", "\u2260", "\u2264", "\u2265", "\u00b1", "\u2212", "\u00d7", "\u00f7",
 649+ "\u2190", "\u2192", "\u00b7", "\u00a7"
 650+ ]
1345651 },
1346 - cancel: function() {
1347 - var request = $j(this).data( 'request' );
1348 - if ( request )
1349 - request.abort();
1350 - }
1351 - });
1352 - },
1353 - dialog: {
1354 - width: 500,
1355 - dialogClass: 'wikiEditor-toolbar-dialog',
1356 - buttons: {
1357 - 'wikieditor-toolbar-tool-link-insert': function() {
1358 - function escapeInternalText( s ) {
1359 - // FIXME: Should this escape [[ too? Seems to work without that
1360 - return s.replace( /(]{2,})/g, '<nowiki>$1</nowiki>' );
1361 - }
1362 - function escapeExternalTarget( s ) {
1363 - return s.replace( / /g, '%20' )
1364 - .replace( /\[/g, '%5B' )
1365 - .replace( /]/g, '%5D' );
1366 - }
1367 - function escapeExternalText( s ) {
1368 - // FIXME: Should this escape [ too? Seems to work without that
1369 - return s.replace( /(]+)/g, '<nowiki>$1</nowiki>' );
1370 - }
1371 - var insertText = '';
1372 - var whitespace = $j( '#wikieditor-toolbar-link-dialog' ).data( 'whitespace' );
1373 - var target = $j( '#wikieditor-toolbar-link-int-target' ).val();
1374 - var text = $j( '#wikieditor-toolbar-link-int-text' ).val();
1375 - // check if the tooltips were passed as target or text
1376 - if ( $j( '#wikieditor-toolbar-link-int-target' ).data( 'tooltip-mode' ) )
1377 - target = "";
1378 - if ( $j( '#wikieditor-toolbar-link-int-text' ).data( 'tooltip-mode' ) )
1379 - text = "";
1380 - var u = mw.usability;
1381 - if ( target == '' ) {
1382 - alert( u.getMsg( 'wikieditor-toolbar-tool-link-empty' ) );
1383 - return;
1384 - }
1385 - if ( $j.trim( text ) == '' ) {
1386 - // [[Foo| ]] creates an invisible link
1387 - // Instead, generate [[Foo|]]
1388 - text = '';
1389 - }
1390 - if ( $j( '#wikieditor-toolbar-link-type-int' ).is( ':checked' ) ) {
1391 - // FIXME: Exactly how fragile is this?
1392 - if ( $j( '#wikieditor-toolbar-link-int-target-status-invalid' ).is( ':visible' ) ) {
1393 - // Refuse to add links to invalid titles
1394 - alert( u.getMsg( 'wikieditor-toolbar-tool-link-int-invalid' ) );
1395 - return;
1396 - }
1397 -
1398 - if ( target == text || !text.length )
1399 - insertText = '[[' + target + ']]';
1400 - else
1401 - insertText = '[[' + target + '|' + escapeInternalText( text ) + ']]';
1402 - } else {
1403 - // Prepend http:// if there is no protocol
1404 - if ( !target.match( /^[a-z]+:\/\/./ ) )
1405 - target = 'http://' + target;
1406 -
1407 - // Detect if this is really an internal link in disguise
1408 - var match = target.match( $j(this).data( 'articlePathRegex' ) );
1409 - if ( match && !$j(this).data( 'ignoreLooksInternal' ) ) {
1410 - var buttons = { };
1411 - var that = this;
1412 - buttons[ u.getMsg( 'wikieditor-toolbar-tool-link-lookslikeinternal-int' ) ] = function() {
1413 - $j( '#wikieditor-toolbar-link-int-target' ).val( match[1] ).change();
1414 - $j(this).dialog( 'close' );
1415 - };
1416 - buttons[ u.getMsg( 'wikieditor-toolbar-tool-link-lookslikeinternal-ext' ) ] = function() {
1417 - $j(that).data( 'ignoreLooksInternal', true );
1418 - $j(that).closest( '.ui-dialog' ).find( 'button:first' ).click();
1419 - $j(that).data( 'ignoreLooksInternal', false );
1420 - $j(this).dialog( 'close' );
1421 - };
1422 - $j.wikiEditor.modules.dialogs.quickDialog(
1423 - u.getMsg( 'wikieditor-toolbar-tool-link-lookslikeinternal', match[1] ),
1424 - { buttons: buttons }
1425 - );
1426 - return;
1427 - }
1428 -
1429 - var escTarget = escapeExternalTarget( target );
1430 - var escText = escapeExternalText( text );
1431 -
1432 - if ( escTarget == escText )
1433 - insertText = escTarget;
1434 - else if ( text == '' )
1435 - insertText = '[' + escTarget + ']';
1436 - else
1437 - insertText = '[' + escTarget + ' ' + escText + ']';
1438 - }
1439 - // Preserve whitespace in selection when replacing
1440 - if ( whitespace ) insertText = whitespace[0] + insertText + whitespace[1];
1441 - $j(this).dialog( 'close' );
1442 - $j.wikiEditor.modules.toolbar.fn.doAction( $j(this).data( 'context' ), {
1443 - type: 'replace',
1444 - options: {
1445 - pre: insertText
1446 - }
1447 - }, $j(this) );
1448 -
1449 - // Blank form
1450 - $j( '#wikieditor-toolbar-link-int-target, #wikieditor-toolbar-link-int-text' ).val( '' );
1451 - $j( '#wikieditor-toolbar-link-type-int, #wikieditor-toolbar-link-type-ext' ).attr( 'checked', '' );
 652+ 'greek': {
 653+ 'labelMsg': 'wikieditor-toolbar-characters-page-greek',
 654+ 'layout': 'characters',
 655+ 'language': 'hl',
 656+ 'characters': [
 657+ "\u0391", "\u0386", "\u03b1", "\u03ac", "\u0392", "\u03b2", "\u0393", "\u03b3", "\u0394",
 658+ "\u03b4", "\u0395", "\u0388", "\u03b5", "\u03ad", "\u0396", "\u03b6", "\u0397", "\u0389",
 659+ "\u03b7", "\u03ae", "\u0398", "\u03b8", "\u0399", "\u038a", "\u03b9", "\u03af", "\u039a",
 660+ "\u03ba", "\u039b", "\u03bb", "\u039c", "\u03bc", "\u039d", "\u03bd", "\u039e", "\u03be",
 661+ "\u039f", "\u038c", "\u03bf", "\u03cc", "\u03a0", "\u03c0", "\u03a1", "\u03c1", "\u03a3",
 662+ "\u03c3", "\u03c2", "\u03a4", "\u03c4", "\u03a5", "\u038e", "\u03c5", "\u03cd", "\u03a6",
 663+ "\u03c6", "\u03a7", "\u03c7", "\u03a8", "\u03c8", "\u03a9", "\u038f", "\u03c9", "\u03ce"
 664+ ]
1452665 },
1453 - 'wikieditor-toolbar-tool-link-cancel': function() {
1454 - // Clear any saved selection state
1455 - var context = $j(this).data( 'context' );
1456 - context.fn.restoreStuffForIE();
1457 - $j(this).dialog( 'close' );
 666+ 'cyrillic': {
 667+ 'labelMsg': 'wikieditor-toolbar-characters-page-cyrillic',
 668+ 'layout': 'characters',
 669+ 'characters': [
 670+ "\u0410", "\u0430", "\u04d8", "\u04d9", "\u0411", "\u0431", "\u0412", "\u0432", "\u0413",
 671+ "\u0433", "\u0490", "\u0491", "\u0403", "\u0453", "\u0492", "\u0493", "\u0414", "\u0434",
 672+ "\u0402", "\u0452", "\u0415", "\u0435", "\u0404", "\u0454", "\u0401", "\u0451", "\u0416",
 673+ "\u0436", "\u0417", "\u0437", "\u0405", "\u0455", "\u0418", "\u0438", "\u0406", "\u0456",
 674+ "\u0407", "\u0457", "\u04c0", "\u0419", "\u0439", "\u04e2", "\u04e3", "\u0408", "\u0458",
 675+ "\u041a", "\u043a", "\u040c", "\u045c", "\u049a", "\u049b", "\u041b", "\u043b", "\u0409",
 676+ "\u0459", "\u041c", "\u043c", "\u041d", "\u043d", "\u040a", "\u045a", "\u04a2", "\u04a3",
 677+ "\u041e", "\u043e", "\u04e8", "\u04e9", "\u041f", "\u043f", "\u0420", "\u0440", "\u0421",
 678+ "\u0441", "\u0422", "\u0442", "\u040b", "\u045b", "\u0423", "\u0443", "\u040e", "\u045e",
 679+ "\u04ee", "\u04ef", "\u04b0", "\u04b1", "\u04ae", "\u04af", "\u0424", "\u0444", "\u0425",
 680+ "\u0445", "\u04b2", "\u04b3", "\u04ba", "\u04bb", "\u0426", "\u0446", "\u0427", "\u0447",
 681+ "\u04b6", "\u04b7", "\u040f", "\u045f", "\u0428", "\u0448", "\u0429", "\u0449", "\u042a",
 682+ "\u044a", "\u042b", "\u044b", "\u042c", "\u044c", "\u042d", "\u044d", "\u042e", "\u044e",
 683+ "\u042f", "\u044f"
 684+ ]
 685+ },
 686+ 'arabic': {
 687+ 'labelMsg': 'wikieditor-toolbar-characters-page-arabic',
 688+ 'layout': 'characters',
 689+ 'language': 'ar',
 690+ 'direction': 'rtl',
 691+ 'characters': [
 692+ "\u061b", "\u061f", "\u0621", "\u0622", "\u0623", "\u0624", "\u0625", "\u0626", "\u0627",
 693+ "\u0628", "\u0629", "\u062a", "\u062b", "\u062c", "\u062d", "\u062e", "\u062f", "\u0630",
 694+ "\u0631", "\u0632", "\u0633", "\u0634", "\u0635", "\u0636", "\u0637", "\u0638", "\u0639",
 695+ "\u063a", "\u0641", "\u0642", "\u0643", "\u0644", "\u0645", "\u0646", "\u0647", "\u0648",
 696+ "\u0649", "\u064a", "\u060c", "\u067e", "\u0686", "\u0698", "\u06af", "\u06ad"
 697+ ]
 698+ },
 699+ 'hebrew': {
 700+ 'labelMsg': 'wikieditor-toolbar-characters-page-hebrew',
 701+ 'layout': 'characters',
 702+ 'direction': 'rtl',
 703+ 'characters': [
 704+ "\u05d0", "\u05d1", "\u05d2", "\u05d3", "\u05d4", "\u05d5", "\u05d6", "\u05d7", "\u05d8",
 705+ "\u05d9", "\u05db", "\u05da", "\u05dc", "\u05de", "\u05dd", "\u05e0", "\u05df", "\u05e1",
 706+ "\u05e2", "\u05e4", "\u05e3", "\u05e6", "\u05e5", "\u05e7", "\u05e8", "\u05e9", "\u05ea",
 707+ "\u05f3", "\u05f4", "\u05f0", "\u05f1", "\u05f2", "\u05d0", "\u05d3", "\u05d4", "\u05d5",
 708+ "\u05d6", "\u05d7", "\u05d8", "\u05d9", "\u05da", "\u05db", "\u05dc", "\u05dd", "\u05de",
 709+ "\u05df", "\u05e0", "\u05e1", "\u05e2", "\u05e3", "\u05e4", "\u05be", "\u05f3", "\u05f4",
 710+ [ "\u05b0\u25cc", "\u05b0" ], [ "\u05b1\u25cc", "\u05b1" ], [ "\u05b2\u25cc", "\u05b2" ],
 711+ [ "\u05b3\u25cc", "\u05b3" ], [ "\u05b4\u25cc", "\u05b4" ], [ "\u05b5\u25cc", "\u05b5" ],
 712+ [ "\u05b6\u25cc", "\u05b6" ], [ "\u05b7\u25cc", "\u05b7" ], [ "\u05b8\u25cc", "\u05b8" ],
 713+ [ "\u05b9\u25cc", "\u05b9" ], [ "\u05bb\u25cc", "\u05bb" ], [ "\u05bc\u25cc", "\u05bc" ],
 714+ [ "\u05c1\u25cc", "\u05c1" ], [ "\u05c2\u25cc", "\u05c2" ], [ "\u05c7\u25cc", "\u05c7" ],
 715+ [ "\u0591\u25cc", "\u0591" ], [ "\u0592\u25cc", "\u0592" ], [ "\u0593\u25cc", "\u0593" ],
 716+ [ "\u0594\u25cc", "\u0594" ], [ "\u0595\u25cc", "\u0595" ], [ "\u0596\u25cc", "\u0596" ],
 717+ [ "\u0597\u25cc", "\u0597" ], [ "\u0598\u25cc", "\u0598" ], [ "\u0599\u25cc", "\u0599" ],
 718+ [ "\u059a\u25cc", "\u059a" ], [ "\u059b\u25cc", "\u059b" ], [ "\u059c\u25cc", "\u059c" ],
 719+ [ "\u059d\u25cc", "\u059d" ], [ "\u059e\u25cc", "\u059e" ], [ "\u059f\u25cc", "\u059f" ],
 720+ [ "\u05a0\u25cc", "\u05a0" ], [ "\u05a1\u25cc", "\u05a1" ], [ "\u05a2\u25cc", "\u05a2" ],
 721+ [ "\u05a3\u25cc", "\u05a3" ], [ "\u05a4\u25cc", "\u05a4" ], [ "\u05a5\u25cc", "\u05a5" ],
 722+ [ "\u05a6\u25cc", "\u05a6" ], [ "\u05a7\u25cc", "\u05a7" ], [ "\u05a8\u25cc", "\u05a8" ],
 723+ [ "\u05a9\u25cc", "\u05a9" ], [ "\u05aa\u25cc", "\u05aa" ], [ "\u05ab\u25cc", "\u05ab" ],
 724+ [ "\u05ac\u25cc", "\u05ac" ], [ "\u05ad\u25cc", "\u05ad" ], [ "\u05ae\u25cc", "\u05ae" ],
 725+ [ "\u05af\u25cc", "\u05af" ], [ "\u05bf\u25cc", "\u05bf" ], [ "\u05c0\u25cc", "\u05c0" ],
 726+ [ "\u05c3\u25cc", "\u05c3" ]
 727+ ]
 728+ },
 729+ 'bangla': {
 730+ 'labelMsg': 'wikieditor-toolbar-characters-page-bangla',
 731+ 'language': 'bn',
 732+ 'layout': 'characters',
 733+ 'characters': [
 734+ "\u0985", "\u0986", "\u0987", "\u0988", "\u0989", "\u098a", "\u098b", "\u098f", "\u0990",
 735+ "\u0993", "\u0994", "\u09be", "\u09bf", "\u09c0", "\u09c1", "\u09c2", "\u09c3", "\u09c7",
 736+ "\u09c8", "\u09cb", "\u09cc", "\u0995", "\u0996", "\u0997", "\u0998", "\u0999", "\u099a",
 737+ "\u099b", "\u099c", "\u099d", "\u099e", "\u099f", "\u09a0", "\u09a1", "\u09a2", "\u09a3",
 738+ "\u09a4", "\u09a5", "\u09a6", "\u09a7", "\u09a8", "\u09aa", "\u09ab", "\u09ac", "\u09ad",
 739+ "\u09ae", "\u09af", "\u09b0", "\u09b2", "\u09b6", "\u09b7", "\u09b8", "\u09b9", "\u09a1\u09bc",
 740+ "\u09a2\u09bc", "\u09af\u09bc", "\u09ce", "\u0982", "\u0983", "\u0981", "\u09cd", "\u09e7",
 741+ "\u09e8", "\u09e9", "\u09ea", "\u09eb", "\u09ec", "\u09ed", "\u09ee", "\u09ef", "\u09e6"
 742+ ]
 743+ },
 744+ 'telugu': {
 745+ 'labelMsg': 'wikieditor-toolbar-characters-page-telugu',
 746+ 'language': 'te',
 747+ 'layout': 'characters',
 748+ 'characters': [
 749+ "\u0c01", "\u0c02", "\u0c03", "\u0c05", "\u0c06", "\u0c07", "\u0c08", "\u0c09", "\u0c0a",
 750+ "\u0c0b", "\u0c60", "\u0c0c", "\u0c61", "\u0c0e", "\u0c0f", "\u0c10", "\u0c12", "\u0c13",
 751+ "\u0c14", "\u0c15", "\u0c16", "\u0c17", "\u0c18", "\u0c19", "\u0c1a", "\u0c1b", "\u0c1c",
 752+ "\u0c1d", "\u0c1e", "\u0c1f", "\u0c20", "\u0c21", "\u0c22", "\u0c23", "\u0c24", "\u0c25",
 753+ "\u0c26", "\u0c27", "\u0c28", "\u0c2a", "\u0c2b", "\u0c2c", "\u0c2d", "\u0c2e", "\u0c2f",
 754+ "\u0c30", "\u0c31", "\u0c32", "\u0c33", "\u0c35", "\u0c36", "\u0c37", "\u0c38", "\u0c39",
 755+ "\u0c3e", "\u0c3f", "\u0c40", "\u0c41", "\u0c42", "\u0c43", "\u0c44", "\u0c46", "\u0c47",
 756+ "\u0c48", "\u0c4a", "\u0c4b", "\u0c4c", "\u0c4d", "\u0c62", "\u0c63", "\u0c58", "\u0c59",
 757+ "\u0c66", "\u0c67", "\u0c68", "\u0c69", "\u0c6a", "\u0c6b", "\u0c6c", "\u0c6d", "\u0c6e",
 758+ "\u0c6f", "\u0c3d", "\u0c78", "\u0c79", "\u0c7a", "\u0c7b", "\u0c7c", "\u0c7d", "\u0c7e",
 759+ "\u0c7f"
 760+ ]
 761+ },
 762+ 'sinhala': {
 763+ 'labelMsg': 'wikieditor-toolbar-characters-page-sinhala',
 764+ 'language': 'si',
 765+ 'layout': 'characters',
 766+ 'characters': [
 767+ "\u0d85", "\u0d86", "\u0d87", "\u0d88", "\u0d89", "\u0d8a", "\u0d8b", "\u0d8c", "\u0d8d",
 768+ "\u0d8e", "\u0d8f", "\u0d90", "\u0d91", "\u0d92", "\u0d93", "\u0d94", "\u0d95", "\u0d96",
 769+ "\u0d9a", "\u0d9b", "\u0d9c", "\u0d9d", "\u0d9e", "\u0d9f", "\u0da0", "\u0da1", "\u0da2",
 770+ "\u0da3", "\u0da4", "\u0da5", "\u0da6", "\u0da7", "\u0da8", "\u0da9", "\u0daa", "\u0dab",
 771+ "\u0dac", "\u0dad", "\u0dae", "\u0daf", "\u0db0", "\u0db1", "\u0db3", "\u0db4", "\u0db5",
 772+ "\u0db6", "\u0db7", "\u0db8", "\u0db9", "\u0dba", "\u0dbb", "\u0dbd", "\u0dc0", "\u0dc1",
 773+ "\u0dc2", "\u0dc3", "\u0dc4", "\u0dc5", "\u0dc6",
 774+ [ "\u25cc\u0dcf", "\u0dcf" ], [ "\u25cc\u0dd0", "\u0dd0" ], [ "\u25cc\u0dd1", "\u0dd1" ],
 775+ [ "\u25cc\u0dd2", "\u0dd2" ], [ "\u25cc\u0dd3", "\u0dd3" ], [ "\u25cc\u0dd4", "\u0dd4" ],
 776+ [ "\u25cc\u0dd6", "\u0dd6" ], [ "\u25cc\u0dd8", "\u0dd8" ], [ "\u25cc\u0df2", "\u0df2" ],
 777+ [ "\u25cc\u0ddf", "\u0ddf" ], [ "\u25cc\u0df3", "\u0df3" ], [ "\u25cc\u0dd9", "\u0dd9" ],
 778+ [ "\u25cc\u0dda", "\u0dda" ], [ "\u25cc\u0ddc", "\u0ddc" ], [ "\u25cc\u0ddd", "\u0ddd" ],
 779+ [ "\u25cc\u0dde", "\u0dde" ], [ "\u25cc\u0dca", "\u0dca" ]
 780+ ]
 781+ },
 782+ 'gujarati': {
 783+ 'labelMsg': 'wikieditor-toolbar-characters-page-gujarati',
 784+ 'language': 'gu',
 785+ 'layout': 'characters',
 786+ 'characters': [
 787+ "\u0ad0", "\u0a85", "\u0a86", "\u0a87", "\u0a88", "\u0a89", "\u0a8a", "\u0a8b", "\u0ae0",
 788+ "\u0a8c", "\u0ae1", "\u0a8d", "\u0a8f", "\u0a90", "\u0a91", "\u0a93", "\u0a94", "\u0a95",
 789+ "\u0a96", "\u0a97", "\u0a98", "\u0a99", "\u0a9a", "\u0a9b", "\u0a9c", "\u0a9d", "\u0a9e",
 790+ "\u0a9f", "\u0aa0", "\u0aa1", "\u0aa2", "\u0aa3", "\u0aa4", "\u0aa5", "\u0aa6", "\u0aa7",
 791+ "\u0aa8", "\u0aaa", "\u0aab", "\u0aac", "\u0aad", "\u0aae", "\u0aaf", "\u0ab0", "\u0ab2",
 792+ "\u0ab5", "\u0ab6", "\u0ab7", "\u0ab8", "\u0ab9", "\u0ab3", "\u0abd",
 793+ [ "\u25cc\u0abe", "\u0abe" ], [ "\u25cc\u0abf", "\u0abf" ], [ "\u25cc\u0ac0", "\u0ac0" ],
 794+ [ "\u25cc\u0ac1", "\u0ac1" ], [ "\u25cc\u0ac2", "\u0ac2" ], [ "\u25cc\u0ac3", "\u0ac3" ],
 795+ [ "\u25cc\u0ac4", "\u0ac4" ], [ "\u25cc\u0ae2", "\u0ae2" ], [ "\u25cc\u0ae3", "\u0ae3" ],
 796+ [ "\u25cc\u0ac5", "\u0ac5" ], [ "\u25cc\u0ac7", "\u0ac7" ], [ "\u25cc\u0ac8", "\u0ac8" ],
 797+ [ "\u25cc\u0ac9", "\u0ac9" ], [ "\u25cc\u0acb", "\u0acb" ], [ "\u25cc\u0acc", "\u0acc" ],
 798+ [ "\u25cc\u0acd", "\u0acd" ]
 799+ ]
 800+ },
 801+ 'thai': {
 802+ 'labelMsg': 'wikieditor-toolbar-characters-page-thai',
 803+ 'language': 'th',
 804+ 'layout': 'characters',
 805+ 'characters': [
 806+ "\u0e01", "\u0e02", "\u0e03", "\u0e04", "\u0e05", "\u0e06", "\u0e07", "\u0e08", "\u0e09",
 807+ "\u0e0a", "\u0e0b", "\u0e0c", "\u0e0d", "\u0e0e", "\u0e0f", "\u0e10", "\u0e11", "\u0e12",
 808+ "\u0e13", "\u0e14", "\u0e15", "\u0e16", "\u0e17", "\u0e18", "\u0e19", "\u0e1a", "\u0e1b",
 809+ "\u0e1c", "\u0e1d", "\u0e1e", "\u0e1f", "\u0e20", "\u0e21", "\u0e22", "\u0e23", "\u0e24",
 810+ "\u0e25", "\u0e26", "\u0e27", "\u0e28", "\u0e29", "\u0e2a", "\u0e2b", "\u0e2c", "\u0e2d",
 811+ "\u0e2e", "\u0e30", "\u0e31", "\u0e32", "\u0e45", "\u0e33", "\u0e34", "\u0e35", "\u0e36",
 812+ "\u0e37", "\u0e38", "\u0e39", "\u0e40", "\u0e41", "\u0e42", "\u0e43", "\u0e44", "\u0e47",
 813+ "\u0e48", "\u0e49", "\u0e4a", "\u0e4b", "\u0e4c", "\u0e4d", "\u0e3a", "\u0e4e", "\u0e50",
 814+ "\u0e51", "\u0e52", "\u0e53", "\u0e54", "\u0e55", "\u0e56", "\u0e57", "\u0e58", "\u0e59",
 815+ "\u0e3f", "\u0e46", "\u0e2f", "\u0e5a", "\u0e4f", "\u0e5b"
 816+ ]
 817+ },
 818+ 'lao': {
 819+ 'labelMsg': 'wikieditor-toolbar-characters-page-lao',
 820+ 'language': 'lo',
 821+ 'layout': 'characters',
 822+ 'characters': [
 823+ "\u0e81", "\u0e82", "\u0e84", "\u0e87", "\u0e88", "\u0eaa", "\u0e8a", "\u0e8d", "\u0e94",
 824+ "\u0e95", "\u0e96", "\u0e97", "\u0e99", "\u0e9a", "\u0e9b", "\u0e9c", "\u0e9d", "\u0e9e",
 825+ "\u0e9f", "\u0ea1", "\u0ea2", "\u0ea5", "\u0ea7", "\u0eab", "\u0ead", "\u0eae", "\u0ea3",
 826+ "\u0edc", "\u0edd", "\u0ebc", "\u0ebd", "\u0eb0", "\u0eb1", "\u0eb2", "\u0eb3", "\u0eb4",
 827+ "\u0eb5", "\u0eb6", "\u0eb7", "\u0eb8", "\u0eb9", "\u0ebb", "\u0ec0", "\u0ec1", "\u0ec2",
 828+ "\u0ec3", "\u0ec4", "\u0ec8", "\u0ec9", "\u0eca", "\u0ecb", "\u0ecc", "\u0ecd", "\u0ed0",
 829+ "\u0ed1", "\u0ed2", "\u0ed3", "\u0ed4", "\u0ed5", "\u0ed6", "\u0ed7", "\u0ed8", "\u0ed9",
 830+ "\u20ad", "\u0ec6", "\u0eaf"
 831+ ]
 832+ },
 833+ 'khmer': {
 834+ 'labelMsg': 'wikieditor-toolbar-characters-page-khmer',
 835+ 'language': 'km',
 836+ 'layout': 'characters',
 837+ 'characters': [
 838+ "\u1780", "\u1781", "\u1782", "\u1783", "\u1784", "\u1785", "\u1786", "\u1787", "\u1788",
 839+ "\u1789", "\u178a", "\u178b", "\u178c", "\u178d", "\u178e", "\u178f", "\u1790", "\u1791",
 840+ "\u1792", "\u1793", "\u1794", "\u1795", "\u1796", "\u1797", "\u1798", "\u1799", "\u179a",
 841+ "\u179b", "\u179c", "\u179f", "\u17a0", "\u17a1", "\u17a2", "\u17a3", "\u17a4", "\u17a5",
 842+ "\u17a6", "\u17a7", "\u17a8", "\u17a9", "\u17aa", "\u17ab", "\u17ac", "\u17ad", "\u17ae",
 843+ "\u17af", "\u17b0", "\u17b1", "\u17b2", "\u17b3", "\u17d2", "\u17b4", "\u17b5", "\u17b6",
 844+ "\u17b7", "\u17b8", "\u17b9", "\u17ba", "\u17bb", "\u17bc", "\u17bd", "\u17be", "\u17bf",
 845+ "\u17c0", "\u17c1", "\u17c2", "\u17c3", "\u17c4", "\u17c5", "\u17c6", "\u17c7", "\u17c8",
 846+ "\u17c9", "\u17ca", "\u17cb", "\u17cc", "\u17cd", "\u17ce", "\u17cf", "\u17d0", "\u17d1",
 847+ "\u17d3", "\u17dd", "\u17dc", "\u17e0", "\u17e1", "\u17e2", "\u17e3", "\u17e4", "\u17e5",
 848+ "\u17e6", "\u17e7", "\u17e8", "\u17e9", "\u17db", "\u17d4", "\u17d5", "\u17d6", "\u17d7",
 849+ "\u17d8", "\u17d9", "\u17da", "\u17f0", "\u17f1", "\u17f2", "\u17f3", "\u17f4", "\u17f5",
 850+ "\u17f6", "\u17f7", "\u17f8", "\u17f9", "\u19e0", "\u19e1", "\u19e2", "\u19e3", "\u19e4",
 851+ "\u19e5", "\u19e6", "\u19e7", "\u19e8", "\u19e9", "\u19ea", "\u19eb", "\u19ec", "\u19ed",
 852+ "\u19ee", "\u19ef", "\u19f0", "\u19f1", "\u19f2", "\u19f3", "\u19f4", "\u19f5", "\u19f6",
 853+ "\u19f7", "\u19f8", "\u19f9", "\u19fa", "\u19fb", "\u19fc", "\u19fd", "\u19fe", "\u19ff"
 854+ ]
1458855 }
1459 - },
1460 - open: function() {
1461 - // Cache the articlepath regex
1462 - $j(this).data( 'articlePathRegex', new RegExp(
1463 - '^' + RegExp.escape( wgServer + wgArticlePath )
1464 - .replace( /\\\$1/g, '(.*)' ) + '$'
1465 - ) );
1466 - // Pre-fill the text fields based on the current selection
1467 - var context = $j(this).data( 'context' );
1468 - // Restore and immediately save selection state, needed for inserting stuff later
1469 - context.fn.restoreStuffForIE();
1470 - context.fn.saveStuffForIE();
1471 - var selection = context.$textarea.textSelection( 'getSelection' );
1472 - $j( '#wikieditor-toolbar-link-int-target' ).focus();
1473 - // Trigger the change event, so the link status indicator is up to date
1474 - $j( '#wikieditor-toolbar-link-int-target' ).change();
1475 - $j( '#wikieditor-toolbar-link-dialog' ).data( 'whitespace', [ '', '' ] );
1476 - if ( selection != '' ) {
1477 - var target, text, type;
1478 - var matches;
1479 - if ( ( matches = selection.match( /^(\s*)\[\[([^\]\|]+)(\|([^\]\|]*))?\]\](\s*)$/ ) ) ) {
1480 - // [[foo|bar]] or [[foo]]
1481 - target = matches[2];
1482 - text = ( matches[4] ? matches[4] : matches[2] );
1483 - type = 'int';
1484 - // Preserve whitespace when replacing
1485 - $j( '#wikieditor-toolbar-link-dialog' ).data( 'whitespace', [ matches[1], matches[5] ] );
1486 - } else if ( ( matches = selection.match( /^(\s*)\[([^\] ]+)( ([^\]]+))?\](\s*)$/ ) ) ) {
1487 - // [http://www.example.com foo] or [http://www.example.com]
1488 - target = matches[2];
1489 - text = ( matches[4] ? matches[4] : '' );
1490 - type = 'ext';
1491 - // Preserve whitespace when replacing
1492 - $j( '#wikieditor-toolbar-link-dialog' ).data( 'whitespace', [ matches[1], matches[5] ] );
1493 - } else {
1494 - // Trim any leading and trailing whitespace from the selection,
1495 - // but preserve it when replacing
1496 - target = text = $j.trim( selection );
1497 - if ( target.length < selection.length ) {
1498 - $j( '#wikieditor-toolbar-link-dialog' ).data( 'whitespace', [
1499 - selection.substr( 0, selection.indexOf( target.charAt( 0 ) ) ),
1500 - selection.substr(
1501 - selection.lastIndexOf( target.charAt( target.length - 1 ) ) + 1
1502 - ) ]
1503 - );
1504 - }
1505 - }
1506 -
1507 - // Change the value by calling val() doesn't trigger the change event, so let's do that ourselves
1508 - if ( typeof text != 'undefined' )
1509 - $j( '#wikieditor-toolbar-link-int-text' ).val( text ).change();
1510 - if ( typeof target != 'undefined' )
1511 - $j( '#wikieditor-toolbar-link-int-target' ).val( target ).change();
1512 - if ( typeof type != 'undefined' )
1513 - $j( '#wikieditor-toolbar-link-' + type ).attr( 'checked', 'checked' );
1514 - }
1515 - $j( '#wikieditor-toolbar-link-int-text' ).data( 'untouched',
1516 - $j( '#wikieditor-toolbar-link-int-text' ).val() ==
1517 - $j( '#wikieditor-toolbar-link-int-target' ).val() ||
1518 - $j( '#wikieditor-toolbar-link-int-text' ).hasClass( 'wikieditor-toolbar-dialog-hint' )
1519 - );
1520 - $j( '#wikieditor-toolbar-link-int-target' ).suggestions();
1521 -
1522 - //don't overwrite user's text
1523 - if( selection != '' ){
1524 - $j( '#wikieditor-toolbar-link-int-text' ).data( 'untouched', false );
1525 - }
1526 -
1527 - $j( '#wikieditor-toolbar-link-int-text, #wikiedit-toolbar-link-int-target' )
1528 - .each( function() {
1529 - if ( $j(this).val() == '' )
1530 - $j(this).parent().find( 'label' ).show();
1531 - });
1532 -
1533 - if ( !( $j(this).data( 'dialogkeypressset' ) ) ) {
1534 - $j(this).data( 'dialogkeypressset', true );
1535 - // Execute the action associated with the first button
1536 - // when the user presses Enter
1537 - $j(this).closest( '.ui-dialog' ).keypress( function( e ) {
1538 - if ( ( e.keyCode || e.which ) == 13 ) {
1539 - var button = $j(this).data( 'dialogaction' ) || $j(this).find( 'button:first' );
1540 - button.click();
1541 - e.preventDefault();
1542 - }
1543 - });
1544 -
1545 - // Make tabbing to a button and pressing
1546 - // Enter do what people expect
1547 - $j(this).closest( '.ui-dialog' ).find( 'button' ).focus( function() {
1548 - $j(this).closest( '.ui-dialog' ).data( 'dialogaction', this );
1549 - });
1550 - }
1551856 }
1552 - }
1553 - },
1554 - 'insert-reference': {
1555 - filters: [ '#wpTextbox1.toolbar-dialogs' ],
1556 - titleMsg: 'wikieditor-toolbar-tool-reference-title',
1557 - id: 'wikieditor-toolbar-reference-dialog',
1558 - html: '\
1559 - <div class="wikieditor-toolbar-dialog-wrapper">\
1560 - <fieldset><div class="wikieditor-toolbar-table-form">\
1561 - <div class="wikieditor-toolbar-field-wrapper">\
1562 - <label for="wikieditor-toolbar-reference-text"\
1563 - rel="wikieditor-toolbar-tool-reference-text"></label>\
1564 - <input type="text" id="wikieditor-toolbar-reference-text" />\
1565 - </div>\
1566 - </div></fieldset>\
1567 - </div>',
1568 - init: function() {
1569 - // Insert translated strings into labels
1570 - $j( this ).find( '[rel]' ).each( function() {
1571 - $j( this ).text( mw.usability.getMsg( $j( this ).attr( 'rel' ) ) );
1572 - } );
1573 -
1574857 },
1575 - dialog: {
1576 - dialogClass: 'wikiEditor-toolbar-dialog',
1577 - width: 590,
1578 - buttons: {
1579 - 'wikieditor-toolbar-tool-reference-insert': function() {
1580 - var insertText = $j( '#wikieditor-toolbar-reference-text' ).val();
1581 - var whitespace = $j( '#wikieditor-toolbar-reference-dialog' ).data( 'whitespace' );
1582 - var attributes = $j( '#wikieditor-toolbar-reference-dialog' ).data( 'attributes' );
1583 - // Close the dialog
1584 - $j( this ).dialog( 'close' );
1585 - $j.wikiEditor.modules.toolbar.fn.doAction(
1586 - $j( this ).data( 'context' ),
 858+ 'help': {
 859+ 'labelMsg': 'wikieditor-toolbar-section-help',
 860+ 'type': 'booklet',
 861+ 'deferLoad': true,
 862+ 'pages': {
 863+ 'format': {
 864+ 'labelMsg': 'wikieditor-toolbar-help-page-format',
 865+ 'layout': 'table',
 866+ 'headings': [
 867+ { 'textMsg': 'wikieditor-toolbar-help-heading-description' },
 868+ { 'textMsg': 'wikieditor-toolbar-help-heading-syntax' },
 869+ { 'textMsg': 'wikieditor-toolbar-help-heading-result' }
 870+ ],
 871+ 'rows': [
1587872 {
1588 - type: 'replace',
1589 - options: {
1590 - pre: whitespace[0] + '<ref' + attributes + '>',
1591 - peri: insertText,
1592 - post: '</ref>' + whitespace[1]
1593 - }
 873+ 'description': { 'htmlMsg': 'wikieditor-toolbar-help-content-italic-description' },
 874+ 'syntax': { 'htmlMsg': 'wikieditor-toolbar-help-content-italic-syntax' },
 875+ 'result': { 'htmlMsg': 'wikieditor-toolbar-help-content-italic-result' }
1594876 },
1595 - $j( this )
1596 - );
1597 - // Restore form state
1598 - $j( '#wikieditor-toolbar-reference-text' ).val( "" );
 877+ {
 878+ 'description': { 'htmlMsg': 'wikieditor-toolbar-help-content-bold-description' },
 879+ 'syntax': { 'htmlMsg': 'wikieditor-toolbar-help-content-bold-syntax' },
 880+ 'result': { 'htmlMsg': 'wikieditor-toolbar-help-content-bold-result' }
 881+ },
 882+ {
 883+ 'description': { 'htmlMsg': 'wikieditor-toolbar-help-content-bolditalic-description' },
 884+ 'syntax': { 'htmlMsg': 'wikieditor-toolbar-help-content-bolditalic-syntax' },
 885+ 'result': { 'htmlMsg': 'wikieditor-toolbar-help-content-bolditalic-result' }
 886+ }
 887+ ]
1599888 },
1600 - 'wikieditor-toolbar-tool-reference-cancel': function() {
1601 - // Clear any saved selection state
1602 - var context = $j( this ).data( 'context' );
1603 - context.fn.restoreStuffForIE();
1604 - $j( this ).dialog( 'close' );
1605 - }
1606 - },
1607 - open: function() {
1608 - // Pre-fill the text fields based on the current selection
1609 - var context = $j(this).data( 'context' );
1610 - // Restore and immediately save selection state, needed for inserting stuff later
1611 - context.fn.restoreStuffForIE();
1612 - context.fn.saveStuffForIE();
1613 - var selection = context.$textarea.textSelection( 'getSelection' );
1614 - // set focus
1615 - $j( '#wikieditor-toolbar-reference-text' ).focus();
1616 - $j( '#wikieditor-toolbar-reference-dialog' )
1617 - .data( 'whitespace', [ '', '' ] )
1618 - .data( 'attributes', '' );
1619 - if ( selection != '' ) {
1620 - var matches, text;
1621 - if ( ( matches = selection.match( /^(\s*)<ref([^\>]*)>([^\<]*)<\/ref\>(\s*)$/ ) ) ) {
1622 - text = matches[3];
1623 - // Preserve whitespace when replacing
1624 - $j( '#wikieditor-toolbar-reference-dialog' ).data( 'whitespace', [ matches[1], matches[4] ] );
1625 - $j( '#wikieditor-toolbar-reference-dialog' ).data( 'attributes', matches[2] );
1626 - } else {
1627 - text = selection;
1628 - }
1629 - $j( '#wikieditor-toolbar-reference-text' ).val( text );
1630 - }
1631 - if ( !( $j( this ).data( 'dialogkeypressset' ) ) ) {
1632 - $j( this ).data( 'dialogkeypressset', true );
1633 - // Execute the action associated with the first button
1634 - // when the user presses Enter
1635 - $j( this ).closest( '.ui-dialog' ).keypress( function( e ) {
1636 - if ( ( e.keyCode || e.which ) == 13 ) {
1637 - var button = $j( this ).data( 'dialogaction' ) || $j( this ).find( 'button:first' );
1638 - button.click();
1639 - e.preventDefault();
 889+ 'link': {
 890+ 'labelMsg': 'wikieditor-toolbar-help-page-link',
 891+ 'layout': 'table',
 892+ 'headings': [
 893+ { 'textMsg': 'wikieditor-toolbar-help-heading-description' },
 894+ { 'textMsg': 'wikieditor-toolbar-help-heading-syntax' },
 895+ { 'textMsg': 'wikieditor-toolbar-help-heading-result' }
 896+ ],
 897+ 'rows': [
 898+ {
 899+ 'description': { 'htmlMsg': 'wikieditor-toolbar-help-content-ilink-description' },
 900+ 'syntax': { 'htmlMsg': 'wikieditor-toolbar-help-content-ilink-syntax' },
 901+ 'result': { 'htmlMsg': 'wikieditor-toolbar-help-content-ilink-result' }
 902+ },
 903+ {
 904+ 'description': { 'htmlMsg': 'wikieditor-toolbar-help-content-xlink-description' },
 905+ 'syntax': { 'htmlMsg': 'wikieditor-toolbar-help-content-xlink-syntax' },
 906+ 'result': { 'htmlMsg': 'wikieditor-toolbar-help-content-xlink-result' }
1640907 }
1641 - } );
1642 - // Make tabbing to a button and pressing
1643 - // Enter do what people expect
1644 - $j( this ).closest( '.ui-dialog' ).find( 'button' ).focus( function() {
1645 - $j( this ).closest( '.ui-dialog' ).data( 'dialogaction', this );
1646 - } );
1647 - }
1648 - }
1649 - }
1650 - },
1651 - 'insert-table': {
1652 - // For now, apply the old browser and iframe requirements to the link and table dialogs as well
1653 - // This'll be removed once these dialogs are confirmed stable without the iframe and/or in more browsers
1654 - /*
1655 - 'browsers': {
1656 - // Left-to-right languages
1657 - 'ltr': {
1658 - 'msie': [['>=', 7]],
1659 - 'firefox': [['>=', 3]],
1660 - 'opera': [['>=', 10]],
1661 - 'safari': [['>=', 4]],
1662 - 'chrome': [['>=', 4]]
1663 - },
1664 - // Right-to-left languages
1665 - 'rtl': {
1666 - 'msie': [['>=', 8]],
1667 - 'firefox': [['>=', 3]],
1668 - 'opera': [['>=', 10]],
1669 - 'safari': [['>=', 4]],
1670 - 'chrome': [['>=', 4]]
1671 - }
1672 - },
1673 - 'req': [ 'iframe' ],
1674 - */
1675 - filters: [ '#wpTextbox1.toolbar-dialogs' ],
1676 - titleMsg: 'wikieditor-toolbar-tool-table-title',
1677 - id: 'wikieditor-toolbar-table-dialog',
1678 - // FIXME: Localize 'x'?
1679 - html: '\
1680 - <div class="wikieditor-toolbar-dialog-wrapper">\
1681 - <fieldset><div class="wikieditor-toolbar-table-form">\
1682 - <div class="wikieditor-toolbar-field-wrapper">\
1683 - <input type="checkbox" id="wikieditor-toolbar-table-dimensions-header" checked />\
1684 - <label for="wikieditor-toolbar-table-dimensions-header"\
1685 - rel="wikieditor-toolbar-tool-table-dimensions-header"></label>\
1686 - </div>\
1687 - <div class="wikieditor-toolbar-field-wrapper">\
1688 - <input type="checkbox" id="wikieditor-toolbar-table-wikitable" checked />\
1689 - <label for="wikieditor-toolbar-table-wikitable" rel="wikieditor-toolbar-tool-table-wikitable"></label>\
1690 - </div>\
1691 - <div class="wikieditor-toolbar-field-wrapper">\
1692 - <input type="checkbox" id="wikieditor-toolbar-table-sortable" />\
1693 - <label for="wikieditor-toolbar-table-sortable" rel="wikieditor-toolbar-tool-table-sortable"></label>\
1694 - </div>\
1695 - <div class="wikieditor-toolbar-table-dimension-fields">\
1696 - <div class="wikieditor-toolbar-field-wrapper">\
1697 - <label for="wikieditor-toolbar-table-dimensions-rows"\
1698 - rel="wikieditor-toolbar-tool-table-dimensions-rows"></label><br />\
1699 - <input type="text" id="wikieditor-toolbar-table-dimensions-rows" size="4" />\
1700 - </div>\
1701 - <div class="wikieditor-toolbar-field-wrapper">\
1702 - <label for="wikieditor-toolbar-table-dimensions-columns"\
1703 - rel="wikieditor-toolbar-tool-table-dimensions-columns"></label><br />\
1704 - <input type="text" id="wikieditor-toolbar-table-dimensions-columns" size="4" />\
1705 - </div>\
1706 - </div>\
1707 - </div></fieldset>\
1708 - <div class="wikieditor-toolbar-table-preview-wrapper" >\
1709 - <span rel="wikieditor-toolbar-tool-table-example"></span>\
1710 - <div class="wikieditor-toolbar-table-preview-content">\
1711 - <table id="wikieditor-toolbar-table-preview" class="wikieditor-toolbar-table-preview wikitable">\
1712 - <tr class="wikieditor-toolbar-table-preview-header">\
1713 - <th rel="wikieditor-toolbar-tool-table-example-header"></th>\
1714 - <th rel="wikieditor-toolbar-tool-table-example-header"></th>\
1715 - <th rel="wikieditor-toolbar-tool-table-example-header"></th>\
1716 - </tr><tr class="wikieditor-toolbar-table-preview-hidden" style="display: none;">\
1717 - <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\
1718 - <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\
1719 - <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\
1720 - </tr><tr>\
1721 - <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\
1722 - <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\
1723 - <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\
1724 - </tr><tr>\
1725 - <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\
1726 - <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\
1727 - <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\
1728 - </tr><tr>\
1729 - <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\
1730 - <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\
1731 - <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\
1732 - </tr>\
1733 - </table>\
1734 - </div>\
1735 - </div></div>',
1736 - init: function() {
1737 - $j(this).find( '[rel]' ).each( function() {
1738 - $j(this).text( mw.usability.getMsg( $j(this).attr( 'rel' ) ) );
1739 - });
1740 - // Set tabindexes on form fields
1741 - $j.wikiEditor.modules.dialogs.fn.setTabindexes( $j(this).find( 'input' ).not( '[tabindex]' ) );
1742 -
1743 - $j( '#wikieditor-toolbar-table-dimensions-rows' ).val( 3 );
1744 - $j( '#wikieditor-toolbar-table-dimensions-columns' ).val( 3 );
1745 - $j( '#wikieditor-toolbar-table-wikitable' ).click( function() {
1746 - $j( '.wikieditor-toolbar-table-preview' ).toggleClass( 'wikitable' );
1747 - });
1748 -
1749 - // Hack for sortable preview: dynamically adding
1750 - // sortable class doesn't work, so we use a clone
1751 - // FIXME: Relies on sortable table internals
1752 - $j( '#wikieditor-toolbar-table-preview' )
1753 - .clone()
1754 - .attr( 'id', 'wikieditor-toolbar-table-preview2' )
1755 - .addClass( 'sortable' )
1756 - .insertAfter( $j( '#wikieditor-toolbar-table-preview' ) )
1757 - .hide();
1758 - if ( typeof ts_makeSortable == 'function' )
1759 - ts_makeSortable( $j( '#wikieditor-toolbar-table-preview2' ).get( 0 ) );
1760 - $j( '#wikieditor-toolbar-table-sortable' ).click( function() {
1761 - // Swap the currently shown one clone with the other one
1762 - $j( '#wikieditor-toolbar-table-preview' )
1763 - .hide()
1764 - .attr( 'id', 'wikieditor-toolbar-table-preview3' );
1765 - $j( '#wikieditor-toolbar-table-preview2' )
1766 - .attr( 'id', 'wikieditor-toolbar-table-preview' )
1767 - .show();
1768 - $j( '#wikieditor-toolbar-table-preview3' ).attr( 'id', 'wikieditor-toolbar-table-preview2' );
1769 - });
1770 -
1771 - $j( '#wikieditor-toolbar-table-dimensions-header' ).click( function() {
1772 - // Instead of show/hiding, switch the HTML around
1773 - // We do this because the sortable tables script styles the first row,
1774 - // visible or not
1775 - var headerHTML = $j( '.wikieditor-toolbar-table-preview-header' ).html();
1776 - var hiddenHTML = $j( '.wikieditor-toolbar-table-preview-hidden' ).html();
1777 - $j( '.wikieditor-toolbar-table-preview-header' ).html( hiddenHTML );
1778 - $j( '.wikieditor-toolbar-table-preview-hidden' ).html( headerHTML );
1779 - if ( typeof ts_makeSortable == 'function' )
1780 - ts_makeSortable(
1781 - $j( '#wikieditor-toolbar-table-preview, #wikieditor-toolbar-table-preview2' )
1782 - .filter( '.sortable' )
1783 - .get( 0 )
1784 - );
1785 - });
1786 -
1787 - },
1788 - dialog: {
1789 - resizable: false,
1790 - dialogClass: 'wikiEditor-toolbar-dialog',
1791 - width: 590,
1792 - buttons: {
1793 - 'wikieditor-toolbar-tool-table-insert': function() {
1794 - var rowsVal = $j( '#wikieditor-toolbar-table-dimensions-rows' ).val();
1795 - var colsVal = $j( '#wikieditor-toolbar-table-dimensions-columns' ).val();
1796 - var rows = parseInt( rowsVal, 10 );
1797 - var cols = parseInt( colsVal, 10 );
1798 - var header = $j( '#wikieditor-toolbar-table-dimensions-header' ).is( ':checked' ) ? 1 : 0;
1799 - var u = mw.usability;
1800 - if ( isNaN( rows ) || isNaN( cols ) || rows != rowsVal || cols != colsVal ) {
1801 - alert( u.getMsg( 'wikieditor-toolbar-tool-table-invalidnumber' ) );
1802 - return;
1803 - }
1804 - if ( rows + header == 0 || cols == 0 ) {
1805 - alert( u.getMsg( 'wikieditor-toolbar-tool-table-zero' ) );
1806 - return;
1807 - }
1808 - if ( rows * cols > 1000 ) {
1809 - alert( u.getMsg( 'wikieditor-toolbar-tool-table-toomany', 1000 ) );
1810 - return;
1811 - }
1812 - var headerText = u.getMsg( 'wikieditor-toolbar-tool-table-example-header' );
1813 - var normalText = u.getMsg( 'wikieditor-toolbar-tool-table-example' );
1814 - var table = "";
1815 - for ( var r = 0; r < rows + header; r++ ) {
1816 - table += "|-\n";
1817 - for ( var c = 0; c < cols; c++ ) {
1818 - var isHeader = ( header && r == 0 );
1819 - var delim = isHeader ? '!' : '|';
1820 - if ( c > 0 ) {
1821 - delim += delim;
1822 - }
1823 - table += delim + ' ' + ( isHeader ? headerText : normalText ) + ' ';
 908+ ]
 909+ },
 910+ 'heading': {
 911+ 'labelMsg': 'wikieditor-toolbar-help-page-heading',
 912+ 'layout': 'table',
 913+ 'headings': [
 914+ { 'textMsg': 'wikieditor-toolbar-help-heading-description' },
 915+ { 'textMsg': 'wikieditor-toolbar-help-heading-syntax' },
 916+ { 'textMsg': 'wikieditor-toolbar-help-heading-result' }
 917+ ],
 918+ 'rows': [
 919+ {
 920+ 'description': { 'htmlMsg': 'wikieditor-toolbar-help-content-heading2-description' },
 921+ 'syntax': { 'htmlMsg': 'wikieditor-toolbar-help-content-heading2-syntax' },
 922+ 'result': { 'htmlMsg': 'wikieditor-toolbar-help-content-heading2-result' }
 923+ },
 924+ {
 925+ 'description': { 'htmlMsg': 'wikieditor-toolbar-help-content-heading3-description' },
 926+ 'syntax': { 'htmlMsg': 'wikieditor-toolbar-help-content-heading3-syntax' },
 927+ 'result': { 'htmlMsg': 'wikieditor-toolbar-help-content-heading3-result' }
 928+ },
 929+ {
 930+ 'description': { 'htmlMsg': 'wikieditor-toolbar-help-content-heading4-description' },
 931+ 'syntax': { 'htmlMsg': 'wikieditor-toolbar-help-content-heading4-syntax' },
 932+ 'result': { 'htmlMsg': 'wikieditor-toolbar-help-content-heading4-result' }
 933+ },
 934+ {
 935+ 'description': { 'htmlMsg': 'wikieditor-toolbar-help-content-heading5-description' },
 936+ 'syntax': { 'htmlMsg': 'wikieditor-toolbar-help-content-heading5-syntax' },
 937+ 'result': { 'htmlMsg': 'wikieditor-toolbar-help-content-heading5-result' }
1824938 }
1825 - // Replace trailing space by newline
1826 - // table[table.length - 1] is read-only
1827 - table = table.substr( 0, table.length - 1 ) + "\n";
1828 - }
1829 - var classes = [];
1830 - if ( $j( '#wikieditor-toolbar-table-wikitable' ).is( ':checked' ) )
1831 - classes.push( 'wikitable' );
1832 - if ( $j( '#wikieditor-toolbar-table-sortable' ).is( ':checked' ) )
1833 - classes.push( 'sortable' );
1834 - var classStr = classes.length > 0 ? ' class="' + classes.join( ' ' ) + '"' : '';
1835 - $j(this).dialog( 'close' );
1836 - $j.wikiEditor.modules.toolbar.fn.doAction(
1837 - $j(this).data( 'context' ),
 939+ ]
 940+ },
 941+ 'list': {
 942+ 'labelMsg': 'wikieditor-toolbar-help-page-list',
 943+ 'layout': 'table',
 944+ 'headings': [
 945+ { 'textMsg': 'wikieditor-toolbar-help-heading-description' },
 946+ { 'textMsg': 'wikieditor-toolbar-help-heading-syntax' },
 947+ { 'textMsg': 'wikieditor-toolbar-help-heading-result' }
 948+ ],
 949+ 'rows': [
1838950 {
1839 - type: 'replace',
1840 - options: {
1841 - pre: '{|' + classStr + "\n",
1842 - peri: table,
1843 - post: '|}',
1844 - ownline: true
1845 - }
 951+ 'description': { 'htmlMsg': 'wikieditor-toolbar-help-content-ulist-description' },
 952+ 'syntax': { 'htmlMsg': 'wikieditor-toolbar-help-content-ulist-syntax' },
 953+ 'result': { 'htmlMsg': 'wikieditor-toolbar-help-content-ulist-result' }
1846954 },
1847 - $j(this)
1848 - );
1849 -
1850 - // Restore form state
1851 - $j( '#wikieditor-toolbar-table-dimensions-rows' ).val( 3 );
1852 - $j( '#wikieditor-toolbar-table-dimensions-columns' ).val( 3 );
1853 - // Simulate clicks instead of setting values, so the according
1854 - // actions are performed
1855 - if ( !$j( '#wikieditor-toolbar-table-dimensions-header' ).is( ':checked' ) )
1856 - $j( '#wikieditor-toolbar-table-dimensions-header' ).click();
1857 - if ( !$j( '#wikieditor-toolbar-table-wikitable' ).is( ':checked' ) )
1858 - $j( '#wikieditor-toolbar-table-wikitable' ).click();
1859 - if ( $j( '#wikieditor-toolbar-table-sortable' ).is( ':checked' ) )
1860 - $j( '#wikieditor-toolbar-table-sortable' ).click();
 955+ {
 956+ 'description': { 'htmlMsg': 'wikieditor-toolbar-help-content-olist-description' },
 957+ 'syntax': { 'htmlMsg': 'wikieditor-toolbar-help-content-olist-syntax' },
 958+ 'result': { 'htmlMsg': 'wikieditor-toolbar-help-content-olist-result' }
 959+ }
 960+ ]
1861961 },
1862 - 'wikieditor-toolbar-tool-table-cancel': function() {
1863 - $j(this).dialog( 'close' );
1864 - }
1865 - },
1866 - open: function() {
1867 - $j( '#wikieditor-toolbar-table-dimensions-rows' ).focus();
1868 - if ( !( $j(this).data( 'dialogkeypressset' ) ) ) {
1869 - $j(this).data( 'dialogkeypressset', true );
1870 - // Execute the action associated with the first button
1871 - // when the user presses Enter
1872 - $j(this).closest( '.ui-dialog' ).keypress( function( e ) {
1873 - if ( ( e.keyCode || e.which ) == 13 ) {
1874 - var button = $j(this).data( 'dialogaction' ) || $j(this).find( 'button:first' );
1875 - button.click();
1876 - e.preventDefault();
 962+ 'file': {
 963+ 'labelMsg': 'wikieditor-toolbar-help-page-file',
 964+ 'layout': 'table',
 965+ 'headings': [
 966+ { 'textMsg': 'wikieditor-toolbar-help-heading-description' },
 967+ { 'textMsg': 'wikieditor-toolbar-help-heading-syntax' },
 968+ { 'textMsg': 'wikieditor-toolbar-help-heading-result' }
 969+ ],
 970+ 'rows': [
 971+ {
 972+ 'description': { 'htmlMsg': 'wikieditor-toolbar-help-content-file-description' },
 973+ 'syntax': { 'htmlMsg': 'wikieditor-toolbar-help-content-file-syntax' },
 974+ 'result': { 'htmlMsg': [ 'wikieditor-toolbar-help-content-file-result', stylepath ] }
1877975 }
1878 - });
1879 -
1880 - // Make tabbing to a button and pressing
1881 - // Enter do what people expect
1882 - $j(this).closest( '.ui-dialog' ).find( 'button' ).focus( function() {
1883 - $j(this).closest( '.ui-dialog' ).data( 'dialogaction', this );
1884 - });
1885 - }
1886 - }
1887 - }
1888 - },
1889 - 'search-and-replace': {
1890 - 'browsers': {
1891 - // Left-to-right languages
1892 - 'ltr': {
1893 - 'msie': false,
1894 - 'firefox': [['>=', 2]],
1895 - 'opera': false,
1896 - 'safari': [['>=', 3]],
1897 - 'chrome': [['>=', 3]]
1898 - },
1899 - // Right-to-left languages
1900 - 'rtl': {
1901 - 'msie': false,
1902 - 'firefox': [['>=', 2]],
1903 - 'opera': false,
1904 - 'safari': [['>=', 3]],
1905 - 'chrome': [['>=', 3]]
1906 - }
1907 - },
1908 - filters: [ '#wpTextbox1.toolbar-dialogs' ],
1909 - titleMsg: 'wikieditor-toolbar-tool-replace-title',
1910 - id: 'wikieditor-toolbar-replace-dialog',
1911 - html: '\
1912 - <div id="wikieditor-toolbar-replace-message">\
1913 - <div id="wikieditor-toolbar-replace-nomatch" rel="wikieditor-toolbar-tool-replace-nomatch"></div>\
1914 - <div id="wikieditor-toolbar-replace-success"></div>\
1915 - <div id="wikieditor-toolbar-replace-emptysearch" rel="wikieditor-toolbar-tool-replace-emptysearch"></div>\
1916 - <div id="wikieditor-toolbar-replace-invalidregex"></div>\
1917 - </div>\
1918 - <fieldset>\
1919 - <div class="wikieditor-toolbar-field-wrapper">\
1920 - <label for="wikieditor-toolbar-replace-search" rel="wikieditor-toolbar-tool-replace-search"></label>\
1921 - <input type="text" id="wikieditor-toolbar-replace-search" style="width: 100%;" />\
1922 - </div>\
1923 - <div class="wikieditor-toolbar-field-wrapper">\
1924 - <label for="wikieditor-toolbar-replace-replace" rel="wikieditor-toolbar-tool-replace-replace"></label>\
1925 - <input type="text" id="wikieditor-toolbar-replace-replace" style="width: 100%;" />\
1926 - </div>\
1927 - <div class="wikieditor-toolbar-field-wrapper">\
1928 - <input type="checkbox" id="wikieditor-toolbar-replace-case" />\
1929 - <label for="wikieditor-toolbar-replace-case" rel="wikieditor-toolbar-tool-replace-case"></label>\
1930 - </div>\
1931 - <div class="wikieditor-toolbar-field-wrapper">\
1932 - <input type="checkbox" id="wikieditor-toolbar-replace-regex" />\
1933 - <label for="wikieditor-toolbar-replace-regex" rel="wikieditor-toolbar-tool-replace-regex"></label>\
1934 - </div>\
1935 - </fieldset>',
1936 - init: function() {
1937 - var u = mw.usability;
1938 - $j(this).find( '[rel]' ).each( function() {
1939 - $j(this).text( u.getMsg( $j(this).attr( 'rel' ) ) );
1940 - });
1941 - // Set tabindexes on form fields
1942 - $j.wikiEditor.modules.dialogs.fn.setTabindexes( $j(this).find( 'input' ).not( '[tabindex]' ) );
1943 -
1944 - // TODO: Find a cleaner way to share this function
1945 - $j(this).data( 'replaceCallback', function( mode ) {
1946 - $j( '#wikieditor-toolbar-replace-nomatch, #wikieditor-toolbar-replace-success, #wikieditor-toolbar-replace-emptysearch, #wikieditor-toolbar-replace-invalidregex' ).hide();
1947 - var searchStr = $j( '#wikieditor-toolbar-replace-search' ).val();
1948 - if ( searchStr == '' ) {
1949 - $j( '#wikieditor-toolbar-replace-emptysearch' ).show();
1950 - return;
1951 - }
1952 - var replaceStr = $j( '#wikieditor-toolbar-replace-replace' ).val();
1953 - var flags = 'm';
1954 - var matchCase = $j( '#wikieditor-toolbar-replace-case' ).is( ':checked' );
1955 - var isRegex = $j( '#wikieditor-toolbar-replace-regex' ).is( ':checked' );
1956 - if ( !matchCase ) {
1957 - flags += 'i';
1958 - }
1959 - if ( mode == 'replaceAll' ) {
1960 - flags += 'g';
1961 - }
1962 - if ( !isRegex ) {
1963 - searchStr = RegExp.escape( searchStr );
1964 - }
1965 - try {
1966 - var regex = new RegExp( searchStr, flags );
1967 - } catch( e ) {
1968 - $j( '#wikieditor-toolbar-replace-invalidregex' )
1969 - .text( u.getMsg( 'wikieditor-toolbar-tool-replace-invalidregex',
1970 - e.message ) )
1971 - .show();
1972 - return;
1973 - }
1974 - var $textarea = $j(this).data( 'context' ).$textarea;
1975 - var text = $textarea.textSelection( 'getContents' );
1976 - var match = false;
1977 - var offset, s;
1978 - if ( mode != 'replaceAll' ) {
1979 - offset = $j(this).data( 'offset' );
1980 - s = text.substr( offset );
1981 - match = s.match( regex );
1982 - }
1983 - if ( !match ) {
1984 - // Search hit BOTTOM, continuing at TOP
1985 - offset = 0;
1986 - s = text;
1987 - match = s.match( regex );
1988 - }
1989 -
1990 - if ( !match ) {
1991 - $j( '#wikieditor-toolbar-replace-nomatch' ).show();
1992 - } else if ( mode == 'replaceAll' ) {
1993 - // Instead of using repetitive .match() calls, we use one .match() call with /g
1994 - // and indexOf() followed by substr() to find the offsets. This is actually
1995 - // faster because our indexOf+substr loop is faster than a match loop, and the
1996 - // /g match is so ridiculously fast that it's negligible.
1997 - // FIXME: Repetitively calling encapsulateSelection() is probably the best strategy
1998 - // in Firefox/Webkit, but in IE replacing the entire content once is better.
1999 - var index;
2000 - for ( var i = 0; i < match.length; i++ ) {
2001 - index = s.indexOf( match[i] );
2002 - if ( index == -1 ) {
2003 - // This shouldn't happen
2004 - break;
 976+ ]
 977+ },
 978+ 'reference': {
 979+ 'labelMsg': 'wikieditor-toolbar-help-page-reference',
 980+ 'layout': 'table',
 981+ 'headings': [
 982+ { 'textMsg': 'wikieditor-toolbar-help-heading-description' },
 983+ { 'textMsg': 'wikieditor-toolbar-help-heading-syntax' },
 984+ { 'textMsg': 'wikieditor-toolbar-help-heading-result' }
 985+ ],
 986+ 'rows': [
 987+ {
 988+ 'description': { 'htmlMsg': 'wikieditor-toolbar-help-content-reference-description' },
 989+ 'syntax': { 'htmlMsg': 'wikieditor-toolbar-help-content-reference-syntax' },
 990+ 'result': { 'htmlMsg': 'wikieditor-toolbar-help-content-reference-result' }
 991+ },
 992+ {
 993+ 'description': { 'htmlMsg': 'wikieditor-toolbar-help-content-rereference-description' },
 994+ 'syntax': { 'htmlMsg': 'wikieditor-toolbar-help-content-rereference-syntax' },
 995+ 'result': { 'htmlMsg': 'wikieditor-toolbar-help-content-rereference-result' }
 996+ },
 997+ {
 998+ 'description': { 'htmlMsg': 'wikieditor-toolbar-help-content-showreferences-description' },
 999+ 'syntax': { 'htmlMsg': 'wikieditor-toolbar-help-content-showreferences-syntax' },
 1000+ 'result': { 'htmlMsg': 'wikieditor-toolbar-help-content-showreferences-result' }
20051001 }
2006 - var matchedText = s.substr( index, match[i].length );
2007 - s = s.substr( index + match[i].length );
2008 -
2009 - var start = index + offset;
2010 - var end = start + match[i].length;
2011 - // Make regex placeholder substitution ($1) work
2012 - var replace = isRegex ? matchedText.replace( regex, replaceStr ) : replaceStr;
2013 - var newEnd = start + replace.length;
2014 - $textarea
2015 - .textSelection( 'setSelection', { 'start': start, 'end': end } )
2016 - .textSelection( 'encapsulateSelection', {
2017 - 'peri': replace,
2018 - 'replace': true } )
2019 - .textSelection( 'setSelection', { 'start': start, 'end': newEnd } );
2020 - offset = newEnd;
2021 - }
2022 - $j( '#wikieditor-toolbar-replace-success' )
2023 - .text( u.getMsg( 'wikieditor-toolbar-tool-replace-success', match.length ) )
2024 - .show();
2025 - $j(this).data( 'offset', 0 );
2026 - } else {
2027 - // Make regex placeholder substitution ($1) work
2028 - var replace = isRegex ? match[0].replace( regex, replaceStr ): replaceStr;
2029 - var start = match.index + offset;
2030 - var end = start + match[0].length;
2031 - var newEnd = start + replace.length;
2032 - var context = $j( this ).data( 'context' );
2033 - $textarea.textSelection( 'setSelection', { 'start': start,
2034 - 'end': end } );
2035 - if ( mode == 'replace' ) {
2036 - $textarea
2037 - .textSelection( 'encapsulateSelection', {
2038 - 'peri': replace,
2039 - 'replace': true } )
2040 - .textSelection( 'setSelection', {
2041 - 'start': start,
2042 - 'end': newEnd } );
2043 - }
2044 - $textarea.textSelection( 'scrollToCaretPosition' );
2045 - $textarea.textSelection( 'setSelection', { 'start': start,
2046 - 'end': mode == 'replace' ? newEnd : end } );
2047 - $j( this ).data( 'offset', mode == 'replace' ? newEnd : end );
2048 - var textbox = typeof context.$iframe != 'undefined' ? context.$iframe[0].contentWindow : $textarea[0];
2049 - textbox.focus();
2050 - }
2051 - });
2052 - },
2053 - dialog: {
2054 - width: 500,
2055 - dialogClass: 'wikiEditor-toolbar-dialog',
2056 - buttons: {
2057 - 'wikieditor-toolbar-tool-replace-button-findnext': function( e ) {
2058 - $j(this).closest( '.ui-dialog' ).data( 'dialogaction', e.target );
2059 - $j(this).data( 'replaceCallback' ).call( this, 'find' );
 1002+ ]
20601003 },
2061 - 'wikieditor-toolbar-tool-replace-button-replacenext': function( e ) {
2062 - $j(this).closest( '.ui-dialog' ).data( 'dialogaction', e.target );
2063 - $j(this).data( 'replaceCallback' ).call( this, 'replace' );
2064 - },
2065 - 'wikieditor-toolbar-tool-replace-button-replaceall': function( e ) {
2066 - $j(this).closest( '.ui-dialog' ).data( 'dialogaction', e.target );
2067 - $j(this).data( 'replaceCallback' ).call( this, 'replaceAll' );
2068 - },
2069 - 'wikieditor-toolbar-tool-replace-close': function() {
2070 - $j(this).dialog( 'close' );
2071 - }
2072 - },
2073 - open: function() {
2074 - $j(this).data( 'offset', 0 );
2075 - $j( '#wikieditor-toolbar-replace-search' ).focus();
2076 - $j( '#wikieditor-toolbar-replace-nomatch, #wikieditor-toolbar-replace-success, #wikieditor-toolbar-replace-emptysearch, #wikieditor-toolbar-replace-invalidregex' ).hide();
2077 - if ( !( $j(this).data( 'onetimeonlystuff' ) ) ) {
2078 - $j(this).data( 'onetimeonlystuff', true );
2079 - // Execute the action associated with the first button
2080 - // when the user presses Enter
2081 - $j(this).closest( '.ui-dialog' ).keypress( function( e ) {
2082 - if ( ( e.keyCode || e.which ) == 13 ) {
2083 - var button = $j(this).data( 'dialogaction' ) || $j(this).find( 'button:first' );
2084 - button.click();
2085 - e.preventDefault();
 1004+ 'discussion': {
 1005+ 'labelMsg': 'wikieditor-toolbar-help-page-discussion',
 1006+ 'layout': 'table',
 1007+ 'headings': [
 1008+ { 'textMsg': 'wikieditor-toolbar-help-heading-description' },
 1009+ { 'textMsg': 'wikieditor-toolbar-help-heading-syntax' },
 1010+ { 'textMsg': 'wikieditor-toolbar-help-heading-result' }
 1011+ ],
 1012+ 'rows': [
 1013+ {
 1014+ 'description': {
 1015+ 'htmlMsg': 'wikieditor-toolbar-help-content-signaturetimestamp-description'
 1016+ },
 1017+ 'syntax': { 'htmlMsg': 'wikieditor-toolbar-help-content-signaturetimestamp-syntax' },
 1018+ 'result': { 'htmlMsg': 'wikieditor-toolbar-help-content-signaturetimestamp-result' }
 1019+ },
 1020+ {
 1021+ 'description': { 'htmlMsg': 'wikieditor-toolbar-help-content-signature-description' },
 1022+ 'syntax': { 'htmlMsg': 'wikieditor-toolbar-help-content-signature-syntax' },
 1023+ 'result': { 'htmlMsg': 'wikieditor-toolbar-help-content-signature-result' }
 1024+ },
 1025+ {
 1026+ 'description': { 'htmlMsg': 'wikieditor-toolbar-help-content-indent-description' },
 1027+ 'syntax': { 'htmlMsg': 'wikieditor-toolbar-help-content-indent-syntax' },
 1028+ 'result': { 'htmlMsg': 'wikieditor-toolbar-help-content-indent-result' }
20861029 }
2087 - });
2088 - // Make tabbing to a button and pressing
2089 - // Enter do what people expect
2090 - $j(this).closest( '.ui-dialog' ).find( 'button' ).focus( function() {
2091 - $j(this).closest( '.ui-dialog' ).data( 'dialogaction', this );
2092 - });
 1030+ ]
20931031 }
2094 - var dialog = $j(this).closest( '.ui-dialog' );
2095 - var that = this;
2096 - var context = $j(this).data( 'context' );
2097 - var textbox = typeof context.$iframe != 'undefined' ?
2098 - context.$iframe[0].contentWindow.document : context.$textarea;
2099 -
2100 - $j( textbox )
2101 - .bind( 'keypress.srdialog', function( e ) {
2102 - if ( ( e.keyCode || e.which ) == 13 ) {
2103 - // Enter
2104 - var button = dialog.data( 'dialogaction' ) || dialog.find( 'button:first' );
2105 - button.click();
2106 - e.preventDefault();
2107 - } else if ( ( e.keyCode || e.which ) == 27 ) {
2108 - // Escape
2109 - $j(that).dialog( 'close' );
2110 - }
2111 - });
2112 - },
2113 - close: function() {
2114 - var context = $j(this).data( 'context' );
2115 - var textbox = typeof context.$iframe != 'undefined' ?
2116 - context.$iframe[0].contentWindow.document : context.$textarea;
2117 - $j( textbox ).unbind( 'keypress.srdialog' );
2118 - $j(this).closest( '.ui-dialog' ).data( 'dialogaction', false );
21191032 }
21201033 }
2121 - }
2122 -} } );
2123 -
2124 -} } );
2125 -
 1034+ } } );
 1035+} );
Index: trunk/extensions/WikiEditor/modules/jquery.wikiEditor.toc.js
@@ -55,18 +55,20 @@
5656 $.wikiEditor.modules.toc.fn.update( context );
5757 },
5858 ready: function( context, event ) {
59 - // Add the TOC to the document
60 - $.wikiEditor.modules.toc.fn.build( context );
61 - if ( !context.$content ) {
62 - return;
 59+ if ( 'module' in event && event.module === 'toc' ) {
 60+ // Add the TOC to the document
 61+ $.wikiEditor.modules.toc.fn.build( context );
 62+ if ( !context.$content ) {
 63+ return;
 64+ }
 65+ context.$content.parent()
 66+ .blur( function() {
 67+ var context = event.data.context;
 68+ $.wikiEditor.modules.toc.fn.unhighlight( context );
 69+ });
 70+ $.wikiEditor.modules.toc.fn.improveUI();
 71+ $.wikiEditor.modules.toc.evt.resize( context );
6372 }
64 - context.$content.parent()
65 - .blur( function() {
66 - var context = event.data.context;
67 - $.wikiEditor.modules.toc.fn.unhighlight( context );
68 - });
69 - $.wikiEditor.modules.toc.fn.improveUI();
70 - $.wikiEditor.modules.toc.evt.resize( context );
7173 },
7274 resize: function( context, event ) {
7375 var availableWidth = context.$wikitext.width() - parseFloat( $.wikiEditor.modules.toc.cfg.textMinimumWidth ),
@@ -179,8 +181,8 @@
180182 if ( '$toc' in context.modules.toc ) {
181183 return;
182184 }
183 - $.wikiEditor.modules.toc.cfg.rtl = config.rtl;
184 - $.wikiEditor.modules.toc.cfg.flexProperty = config.rtl ? 'marginLeft' : 'marginRight';
 185+ $.wikiEditor.modules.toc.cfg.rtl = $( 'body' ).is( '.rtl' );
 186+ $.wikiEditor.modules.toc.cfg.flexProperty = $.wikiEditor.modules.toc.cfg.rtl ? 'marginLeft' : 'marginRight';
185187 var height = context.$ui.find( '.wikiEditor-ui-left' ).height();
186188 context.modules.toc.$toc = $( '<div />' )
187189 .addClass( 'wikiEditor-ui-toc' )
@@ -193,9 +195,7 @@
194196 context.$ui.find( '.wikiEditor-ui-left' ).height()
195197 );
196198 $.wikiEditor.modules.toc.fn.redraw( context, $.wikiEditor.modules.toc.cfg.defaultWidth );
197 - },
198 -
199 -
 199+ },
200200 redraw: function( context, fixedWidth ) {
201201 var fixedWidth = parseFloat( fixedWidth );
202202 if( context.modules.toc.$toc.data( 'positionMode' ) == 'regular' ) {
@@ -512,7 +512,7 @@
513513 return false;
514514 } )
515515 .find( 'a' )
516 - .text( mw.usability.getMsg( 'wikieditor-toc-hide' ) );
 516+ .text( mediaWiki.msg.get( 'wikieditor-toc-hide' ) );
517517 $expandControl
518518 .addClass( 'wikiEditor-ui-toc-expandControl' )
519519 .append( '<a href="#" />' )
@@ -529,7 +529,7 @@
530530 } )
531531 .hide()
532532 .find( 'a' )
533 - .text( mw.usability.getMsg( 'wikieditor-toc-show' ) );
 533+ .text( mediaWiki.msg.get( 'wikieditor-toc-show' ) );
534534 $collapseControl.insertBefore( context.modules.toc.$toc );
535535 context.$ui.find( '.wikiEditor-ui-left .wikiEditor-ui-top' ).append( $expandControl );
536536 }
Index: trunk/extensions/WikiEditor/modules/wikiEditor.publish.js
@@ -1,12 +1,8 @@
2 -/* JavaScript for WikiEditor Publish module */
 2+/*
 3+ * JavaScript for WikiEditor Publish module
 4+ */
35
4 -$j(document).ready( function() {
5 - // Check preferences for publish
6 - if ( !wgWikiEditorEnabledModules.publish ) {
7 - return true;
8 - }
9 - // Add the publish module
10 - if ( $j.fn.wikiEditor ) {
11 - $j( 'textarea#wpTextbox1' ).wikiEditor( 'addModule', 'publish' );
12 - }
13 -});
 6+$( document ).ready( function() {
 7+ // Add publish module
 8+ $j( '#wpTextbox1' ).wikiEditor( 'addModule', 'publish' );
 9+} );
Index: trunk/extensions/WikiEditor/modules/wikiEditor.highlight.js
@@ -1,12 +1,8 @@
2 -/* JavaScript for WikiEditor Highlight module */
 2+/*
 3+ * JavaScript for WikiEditor Highlighting
 4+ */
35
4 -$j(document).ready( function() {
5 - // Check preferences for highlight
6 - if ( !wgWikiEditorEnabledModules.toc ) { //HACK
7 - return true;
8 - }
9 - // Add the highlight module
10 - if ( $j.fn.wikiEditor ) {
11 - $j( 'textarea#wpTextbox1' ).wikiEditor( 'addModule', 'highlight' );
12 - }
13 -});
 6+$( document ).ready( function() {
 7+ // Add highlight module
 8+ $( '#wpTextbox1' ).wikiEditor( 'addModule', 'highlight' );
 9+} );
Index: trunk/extensions/WikiEditor/modules/wikiEditor.addMediaWizard.js
@@ -1,10 +1,15 @@
2 -/* JavaScript for AddMediaWizard gadget */
3 -if ( wgWikiEditorEnabledModules.addMediaWizard ) {
4 - if( typeof mwAddMediaConfig == 'undefined' ) {
5 - mwAddMediaConfig = {};
 2+/*
 3+ * JavaScript for WikiEditor AddMediaWizard integration
 4+ */
 5+
 6+$( document ).ready( function() {
 7+ if ( typeof mwAddMediaConfig == 'undefined' ) {
 8+ mwAddMediaConfig = {};
69 }
710 mwAddMediaConfig['enabled_providers'] = [ 'wiki_commons', 'upload' ];
8 -
911 // Transclude mwEmbed support
10 - importScriptURI( 'http://prototype.wikimedia.org/s-2/js/mwEmbed/remotes/mediaWiki.js?&uselang=' + wgUserLanguage );
11 -}
 12+ mediaWiki.loader.load(
 13+ 'http://prototype.wikimedia.org/s-2/js/mwEmbed/remotes/mediaWiki.js?&uselang=' + wgUserLanguage,
 14+ 'text/javascript'
 15+ );
 16+}
\ No newline at end of file
Index: trunk/extensions/WikiEditor/modules/jquery.wikiEditor.preview.css
@@ -0,0 +1,26 @@
 2+/*
 3+ * CSS for WikiEditor Preview jQuery plugin
 4+ */
 5+
 6+.wikiEditor-preview-loading {
 7+ padding: 1em;
 8+ background-color: white;
 9+}
 10+.wikiEditor-preview-loading span {
 11+ color: #666666;
 12+}
 13+.wikiEditor-preview-spinner {
 14+ padding-right: 1em;
 15+}
 16+.wikiEditor-preview-contents {
 17+ padding: 1em;
 18+ background-color: white;
 19+}
 20+/* FIXME: This only works for the first wikiEditor on the page! */
 21+#wikiEditor-0-preview-dialog .wikiEditor-ui-loading {
 22+ overflow: hidden;
 23+ border: none;
 24+}
 25+.ui-dialog .ui-dialog-buttonpane {
 26+ margin: 0 !important;
 27+}
\ No newline at end of file
Property changes on: trunk/extensions/WikiEditor/modules/jquery.wikiEditor.preview.css
___________________________________________________________________
Added: svn:eol-style
128 + native
Index: trunk/extensions/WikiEditor/modules/jquery.wikiEditor.dialogs.css
@@ -0,0 +1,105 @@
 2+/*
 3+ * CSS for WikiEditor Dialogs jQuery plugin
 4+ */
 5+
 6+.wikiEditor-toolbar-dialog table {
 7+ margin-top: 0.75em;
 8+}
 9+.wikiEditor-toolbar-dialog table td {
 10+ padding: 0.5em;
 11+ height: 3em;
 12+ overflow: visible;
 13+}
 14+/* Put suggestions (default z-index 99) on top of dialogs (z-index 1002) */
 15+div.suggestions {
 16+ z-index: 1099;
 17+}
 18+.wikiEditor-toolbar-dialog .ui-dialog-titlebar-close:hover {
 19+ text-decoration: none;
 20+}
 21+.wikiEditor-toolbar-dialog .ui-dialog-content .status-invalid input {
 22+ border: 2px solid red;
 23+ padding: 2px 1px;
 24+}
 25+.wikiEditor-toolbar-dialog .ui-dialog-titlebar {
 26+ padding: 0.9em 1.4em 0.6em !important;
 27+}
 28+.wikiEditor-toolbar-dialog table td {
 29+ padding: 0 !important;
 30+}
 31+.wikiEditor-toolbar-dialog .ui-dialog-buttonpane button {
 32+ -moz-border-radius: 4px;
 33+ -webkit-border-radius: 4px;
 34+ padding: 0.2em 0.6em 0.15em !important;
 35+ margin: 0.5em 0 0.5em 0.4em !important;
 36+ border: 1px solid #a6a6a6 !important;
 37+ background: #f2f2f2 url(images/dialogs/button_off.png) repeat-x scroll 50% 100% !important;
 38+}
 39+.wikiEditor-toolbar-dialog .ui-dialog-buttonpane button:hover {
 40+ border-color: #6e7273;
 41+ background: #e1e1e1 url(images/dialogs/button_over.png) repeat-x scroll 50% 100% !important;
 42+}
 43+.wikiEditor-toolbar-dialog .ui-dialog-buttonpane button:active,
 44+.wikiEditor-toolbar-dialog .ui-dialog-buttonpane button:focus {
 45+ border-color: #707271;
 46+ background: #bfbfbf url(images/dialogs/button_down.png) repeat-x scroll 50% 100% !important;
 47+}
 48+.wikiEditor-toolbar-dialog .ui-dialog-buttonpane button.disabled {
 49+ color: #7f7f7f;
 50+ border-color: #cccccc;
 51+ background: #f2f2f2 url(images/dialogs/button_disabled.png) repeat-x scroll 50% 100% !important;
 52+}
 53+/* Disables the annoying dashed border Firefox puts on active buttons */
 54+.wikiEditor-toolbar-dialog .ui-dialog-buttonpane button::-moz-focus-inner {
 55+ border: 0;
 56+}
 57+.wikiEditor-toolbar-dialog .ui-widget-header {
 58+ background: #f0f0f0 url(images/dialogs/titlebar_fade.png) repeat-x scroll 50% 100% !important;
 59+}
 60+/* FIXME: Should just update the icon sprite if we're keeping this X */
 61+.wikiEditor-toolbar-dialog .ui-icon-closethick {
 62+ background: url(images/dialogs/close_x.png) no-repeat 50% 50% !important;
 63+}
 64+.wikiEditor-toolbar-dialog .ui-dialog-buttonpane {
 65+ margin-top: 0 !important;
 66+ padding:0.3em 1.4em 0.5em 1.4em !important;
 67+}
 68+
 69+.wikiEditor-toolbar-dialog .ui-dialog-content fieldset{
 70+ border: none !important;
 71+ margin: 0 !important;
 72+ padding: 0 !important;
 73+}
 74+.wikiEditor-toolbar-dialog .ui-widget-header {
 75+ border-bottom:1px solid #6bc8f3 !important;
 76+}
 77+.wikiEditor-toolbar-dialog .ui-dialog-content input[type=text] {
 78+ -moz-box-sizing: border-box;
 79+ -ms-box-sizing: border-box;
 80+ -webkit-box-sizing: border-box;
 81+ -khtml-box-sizing: border-box;
 82+}
 83+.wikiEditor-toolbar-dialog .ui-dialog-content input[type="radio"],
 84+.wikiEditor-toolbar-dialog .ui-dialog-content input[type="checkbox"] {
 85+ margin-left: 0;
 86+}
 87+.wikiEditor-toolbar-dialog .ui-dialog-titlebar-close {
 88+ padding: 0;
 89+}
 90+body.ltr .wikiEditor-toolbar-dialog .ui-dialog-titlebar-close {
 91+ right: 0.9em;
 92+}
 93+.wikieditor-toolbar-field-wrapper {
 94+ padding: 0 0 25px 0;
 95+}
 96+.wikieditor-toolbar-floated-field-wrapper {
 97+ float: left;
 98+ margin-right: 2em;
 99+}
 100+.wikieditor-toolbar-dialog-hint {
 101+ color: #999999;
 102+}
 103+.wikiEditor-toolbar-dialog,
 104+.wikiEditor-toolbar-dialog .ui-widget-content {
 105+ border: none !important;
 106+}
\ No newline at end of file
Property changes on: trunk/extensions/WikiEditor/modules/jquery.wikiEditor.dialogs.css
___________________________________________________________________
Added: svn:eol-style
1107 + native
Index: trunk/extensions/WikiEditor/modules/wikiEditor.css
@@ -1,4 +1,6 @@
2 -/* wikiEditor plugin */
 2+/*
 3+ * CSS for WikiEditor
 4+ */
35
46 /* This ID (#editform) could change in MediaWiki */
57 form#editform {
@@ -19,116 +21,3 @@
2022 .wikiEditor-ui .wikiEditor-ui-text > textarea#wpTextbox1 {
2123 margin: 0;
2224 }
23 -.wikiEditor-ui {
24 - float: left;
25 - position: relative;
26 - clear: both;
27 - width: 100%;
28 - background-color: #E0EEf7;
29 - border: solid silver 1px;
30 -}
31 -body.rtl .wikiEditor-ui {
32 - float: right;
33 -}
34 -.wikiEditor-ui .wikiEditor-ui-bottom {
35 -
36 -}
37 -.wikiEditor-ui .wikiEditor-ui-text {
38 - line-height: 0;
39 -}
40 -.wikiEditor-ui .wikiEditor-ui-top {
41 - position: relative;
42 - border-bottom: solid silver 1px;
43 -}
44 -.wikiEditor-ui .wikiEditor-ui-left {
45 - float: left;
46 - width: 100%;
47 -}
48 -body.rtl .wikiEditor-ui .wikiEditor-ui-left {
49 - float: right;
50 -}
51 -.wikiEditor-ui .wikiEditor-ui-right {
52 - float: right;
53 - background: #F3F3F3;
54 - overflow: hidden;
55 -}
56 -body.rtl .wikiEditor-ui .wikiEditor-ui-right {
57 - float: left;
58 -}
59 -.wikiEditor-wikitext {
60 - float: left;
61 - width: 100%;
62 -}
63 -.wikiEditor-ui-controls {
64 - float: left;
65 - width: 100%;
66 - background-color: white;
67 - margin-top: -1px;
68 - border-bottom: solid 1px silver;
69 -}
70 -.wikiEditor-ui-tabs {
71 - float: left;
72 - height: 2.5em;
73 - margin-left: -1px;
74 - background-color: white;
75 - border-left: solid 1px silver;
76 - border-top: solid 1px silver;
77 -}
78 -.wikiEditor-ui-buttons {
79 - float: right;
80 - height: 2.5em;
81 - margin-right: -1px;
82 - background-color: white;
83 - padding-left: 1em;
84 - border-top: solid 1px white;
85 -}
86 -.wikiEditor-ui-buttons button {
87 - margin-left: 0.5em;
88 -}
89 -.wikiEditor-ui-tabs div {
90 - float: left;
91 - height: 2.5em;
92 - background-color: #f3f3f3;
93 - border-right: solid 1px silver;
94 - border-bottom: solid 1px silver;
95 -}
96 -.wikiEditor-ui-tabs div.current {
97 - border-bottom: solid 1px white;
98 - background-color: white;
99 -}
100 -.wikiEditor-ui-tabs div a {
101 - display: inline-block;
102 - padding: 0 0.75em;
103 - line-height: 2.5em;
104 - color: #0645AD;
105 -}
106 -.wikiEditor-ui-tabs div.current a {
107 - color: #333333;
108 -}
109 -.wikiEditor-ui-tabs div.current a:hover {
110 - text-decoration: none;
111 -}
112 -
113 -.wikiEditor-view-wikitext {
114 - line-height: 1em;
115 -}
116 -.wikiEditor-ui-loading {
117 - background: #f3f3f3;
118 - z-index: 10;
119 - position: absolute;
120 - top: 0;
121 - left: 0;
122 - text-align: center;
123 - height: 100%;
124 - width: 100%;
125 - border: 1px solid silver;
126 - margin: -1px;
127 -}
128 -.wikiEditor-ui-loading span {
129 - display: block;
130 - height: 24px;
131 - width: 24px;
132 - background: url( ../images/wikiEditor/toolbar/loading.gif ) 0 0 no-repeat;
133 - text-indent: -9999px;
134 - margin: 0 auto;
135 -}
\ No newline at end of file
Index: trunk/extensions/WikiEditor/modules/jquery.wikiEditor.toc.css
@@ -0,0 +1,214 @@
 2+/*
 3+ * CSS for WikiEditor Table of Contents jQuery plugin
 4+ */
 5+
 6+.wikiEditor-ui-toc {
 7+ /* height and width are set dynamically */
 8+ /*float: right;*/
 9+ padding: 0;
 10+ overflow: auto;
 11+ overflow-x: hidden;
 12+}
 13+.wikiEditor-ui-toc {
 14+ border-left: solid silver 1px;
 15+}
 16+body.rtl .wikiEditor-ui-toc {
 17+ border-right: solid silver 1px;
 18+ border-left: none;
 19+}
 20+.wikiEditor-ui-toc ul {
 21+ padding: 0;
 22+ margin: 0;
 23+ list-style: none;
 24+ /* IE needs to be told in great detail how to act, or it misbehaves */
 25+ list-style-image: none;
 26+ list-style-position: outside;
 27+ list-style-type: none;
 28+ width: 100%;
 29+}
 30+.tab-toc {
 31+ /* Should match the toolbar */
 32+ background-image: url(images/toolbar/base.png);
 33+ background-position: left top;
 34+ background-repeat: repeat-x;
 35+ height: 26px;
 36+ padding: 3px 0;
 37+ line-height: 26px;
 38+ padding-left: 1em;
 39+ border-bottom: solid 1px silver;
 40+ white-space: nowrap;
 41+ overflow: hidden;
 42+}
 43+body.rtl .tab-toc {
 44+ background-position: right top;
 45+ padding-right: 2em;
 46+}
 47+.tab-toc a {
 48+ outline: none;
 49+}
 50+.wikiEditor-ui-toc li {
 51+ padding: 0;
 52+ margin: 0;
 53+}
 54+.wikiEditor-ui-toc ul ul {
 55+ padding: 0;
 56+ margin: 0;
 57+ margin-bottom: 0 !important;
 58+ margin-top: 0 !important;
 59+ list-style: none;
 60+ background-image: none;
 61+}
 62+.wikiEditor-ui-toc ul li div {
 63+ display: block;
 64+ font-size: 0.9em;
 65+ cursor: pointer;
 66+ color: #0645ad;
 67+}
 68+.wikiEditor-ui-toc ul li div {
 69+ padding: 0.125em;
 70+ padding-left: 1em;
 71+}
 72+body.rtl .wikiEditor-ui-toc ul li div {
 73+ padding-right: 1em;
 74+ padding-left: 0;
 75+}
 76+.wikiEditor-ui-toc ul ul li div {
 77+ padding-left: 2em;
 78+}
 79+body.rtl .wikiEditor-ui-toc ul ul li div {
 80+ padding-right: 2em;
 81+ padding-left: 0;
 82+}
 83+.wikiEditor-ui-toc ul ul ul li div {
 84+ padding-left: 3em;
 85+}
 86+body.rtl .wikiEditor-ui-toc ul ul ul li div {
 87+ padding-right: 3em;
 88+ padding-left: 0;
 89+}
 90+.wikiEditor-ui-toc ul ul ul ul li div {
 91+ padding-left: 4em;
 92+}
 93+body.rtl .wikiEditor-ui-toc ul ul ul ul li div {
 94+ padding-right: 4em;
 95+ padding-left: 0;
 96+}
 97+.wikiEditor-ui-toc ul ul ul ul ul li div {
 98+ padding-left: 5em;
 99+}
 100+body.rtl .wikiEditor-ui-toc ul ul ul ul ul li div {
 101+ padding-right: 5em;
 102+ padding-left: 0;
 103+}
 104+.wikiEditor-ui-toc ul ul ul ul ul ul li div {
 105+ padding-left: 6em;
 106+}
 107+body.rtl wikiEditor-ui-toc ul ul ul ul ul ul li div {
 108+ padding-right: 6em;
 109+ padding-left: 0;
 110+}
 111+.wikiEditor-ui-toc ul li div.current {
 112+ background-color: #FAFAFA;
 113+ color: #333333;
 114+}
 115+.wikiEditor-ui-toc ul li div.section-0 {
 116+ font-size: 1em;
 117+ padding-top: 0.5em;
 118+ padding-bottom: 0.5em;
 119+ border-bottom: solid 1px #DDDDDD;
 120+}
 121+/* Collapsing changes */
 122+.wikiEditor-ui-toc {
 123+ overflow-y: hidden;
 124+ position: relative;
 125+}
 126+.wikiEditor-ui-toc ul {
 127+ overflow-y: auto;
 128+ overflow-x: hidden;
 129+ height: 100%;
 130+ margin-bottom: 0 !important;
 131+
 132+}
 133+.wikiEditor-ui-toc ul ul {
 134+ float: none;
 135+ height: auto;
 136+}
 137+#wikiEditor-ui-toc-collapse {
 138+ height: 100%;
 139+ width: 18px;
 140+ position: absolute;
 141+ top: 0;
 142+ left: 0;
 143+}
 144+.wikiEditor-ui-toc-collapse-open {
 145+ background: #f3f3f3 url(images/toc/close.png) 4px 50% no-repeat;
 146+ border-left: 1px solid #DDDDDD;
 147+}
 148+.wikiEditor-ui-toc-collapse-closed {
 149+ background: #f3f3f3 url(images/toc/open.png) 4px 50% no-repeat;
 150+}
 151+/* Resizing Changes */
 152+.wikiEditor-ui-toc-resize-vertical,
 153+.ui-resizable-w {
 154+ width: 4px;
 155+ position: absolute;
 156+ top: 0;
 157+ left: 0;
 158+ height: 100%;
 159+ cursor: ew-resize;
 160+}
 161+.wikiEditor-ui .wikiEditor-ui-right {
 162+ overflow: visible;
 163+}
 164+.wikiEditor-ui-right .ui-resizable-w {
 165+ left: 0px !important;
 166+ z-index: 0;
 167+}
 168+.wikiEditor-ui-right .wikiEditor-ui-toc-resize-grip {
 169+ width: 5px;
 170+ height: 12px;
 171+ padding: 3px;
 172+ position: absolute;
 173+ top: 7px;
 174+ left: -12px !important;
 175+ cursor: ew-resize;
 176+ background: url(images/toc/grip.png) 50% 50% no-repeat;
 177+ z-index: 0;
 178+}
 179+body.rtl .wikiEditor-ui-right .wikiEditor-ui-toc-resize-grip {
 180+ right: 2px !important;
 181+}
 182+.wikiEditor-ui-toolbar .tab-toc {
 183+ float: right;
 184+ margin: 3px 16px 3px 3px;
 185+ line-height: 26px;
 186+}
 187+.wikiEditor-ui-toc-expandControl {
 188+ position: absolute;
 189+ z-index: 2;
 190+ top: 0px;
 191+ right: 10px;
 192+ height: 26px;
 193+ padding: 3px 0;
 194+ line-height: 26px;
 195+ padding-right: 1em;
 196+ white-space: nowrap;
 197+ overflow: hidden;
 198+}
 199+body.rtl .wikiEditor-ui-toc-expandControl {
 200+ padding-left: 1em;
 201+ padding-right: 0;
 202+ left: 10px;
 203+ right: auto;
 204+}
 205+.wikiEditor-ui-text textarea {
 206+ resize: none;
 207+}
 208+.wikiEditor-ui-text textarea:focus {
 209+ outline: none;
 210+}
 211+/* Self Clearing for the wikiText view */
 212+.wikiEditor-ui-view-wikiText {
 213+ overflow: auto;
 214+ width: 100%;
 215+}
\ No newline at end of file
Property changes on: trunk/extensions/WikiEditor/modules/jquery.wikiEditor.toc.css
___________________________________________________________________
Added: svn:eol-style
1216 + native
Index: trunk/extensions/WikiEditor/modules/jquery.wikiEditor.js
@@ -93,7 +93,7 @@
9494 return mod.supported;
9595 }
9696 // Run a browser support test and then cache and return the result
97 - return mod.supported = mw.usability.testBrowser( mod.browsers );
 97+ return mod.supported = $.client.test( mod.browsers );
9898 },
9999 /**
100100 * Checks if a module has a specific requirement
@@ -111,7 +111,7 @@
112112 return false;
113113 },
114114 /**
115 - * Provides a way to extract messages from objects. Wraps the mw.usability.getMsg() function, which
 115+ * Provides a way to extract messages from objects. Wraps the mediaWiki.msg.get() function, which
116116 * may eventually become a wrapper for some kind of core MW functionality.
117117 *
118118 * @param object Object to extract messages from
@@ -133,11 +133,12 @@
134134 if ( property in object ) {
135135 return object[property];
136136 } else if ( property + 'Msg' in object ) {
137 - if ( typeof object[property + 'Msg' ] == 'object' ) {
138 - // [ messageKey, arg1, arg2, ... ]
139 - return mw.usability.getMsg.apply( mw.usability, object[property + 'Msg' ] );
 137+ var p = object[property + 'Msg' ];
 138+ if ( typeof p == 'object' && typeof p.length !== undefined && p.length >= 2) {
 139+ // [ messageKey, { 'parameters': ['arg1, arg2, ...] } ]
 140+ return mediaWiki.msg.get( object[property + 'Msg' ][0], object[property + 'Msg' ][1] );
140141 } else {
141 - return mw.usability.getMsg( object[property + 'Msg'] );
 142+ return mediaWiki.msg.get( object[property + 'Msg'] );
142143 }
143144 } else {
144145 return '';
@@ -169,7 +170,7 @@
170171 if ( src.substr( 0, 7 ) != 'http://' && src.substr( 0, 8 ) != 'https://' && src[0] != '/' ) {
171172 src = path + src;
172173 }
173 - return src + '?' + wgWikiEditorIconVersion;
 174+ return src + '?' + wikiEditor.config.get( 'wgWikiEditorIconVersion' );
174175 },
175176 /**
176177 * Get the sprite offset for a language if available, icon for a language if available, or the default offset or icon,
@@ -280,6 +281,8 @@
281282 context.modules[module] = {};
282283 // Tell the module to create itself on the context
283284 $.wikiEditor.modules[module].fn.create( context, modules[module] );
 285+ // This is triggered each time a module is ready, the event will contain a module property
 286+ context.fn.trigger( 'ready', { 'module': module } );
284287 }
285288 }
286289 }
@@ -1815,7 +1818,7 @@
18161819 /* Disabling our loading div for now
18171820 var $loader = $( '<div></div>' )
18181821 .addClass( 'wikiEditor-ui-loading' )
1819 - .append( $( '<span>' + mw.usability.getMsg( 'wikieditor-loading' ) + '</span>' )
 1822+ .append( $( '<span>' + mediaWiki.msg.get( 'wikieditor-loading' ) + '</span>' )
18201823 .css( 'marginTop', context.$textarea.height() / 2 ) );
18211824 */
18221825 // Encapsulate the textarea with some containers for layout
Index: trunk/extensions/WikiEditor/modules/wikiEditor.preview.js
@@ -1,12 +1,8 @@
2 -/* JavaScript for WikiEditor Preview module */
 2+/*
 3+ * JavaScript for WikiEditor Preview module
 4+ */
35
4 -$j(document).ready( function() {
5 - // Check preferences for preview
6 - if ( !wgWikiEditorEnabledModules.preview ) {
7 - return true;
8 - }
9 - // Add the preview module
10 - if ( $j.fn.wikiEditor ) {
11 - $j( 'textarea#wpTextbox1' ).wikiEditor( 'addModule', 'preview' );
12 - }
13 -});
 6+$( document ).ready( function() {
 7+ // Add preview module
 8+ $j( 'textarea#wpTextbox1' ).wikiEditor( 'addModule', 'preview' );
 9+} );
Index: trunk/extensions/WikiEditor/modules/wikiEditor.dialogs.js
@@ -0,0 +1,1083 @@
 2+/*
 3+ * JavaScript for WikiEditor Dialogs
 4+ */
 5+
 6+$( document ).ready( function() {
 7+ if ( !$.wikiEditor.isSupported( $.wikiEditor.modules.dialogs ) ) {
 8+ return;
 9+ }
 10+ // Add dialogs module
 11+ $( '#wpTextbox1' ).wikiEditor( 'addModule', { 'dialogs': {
 12+ 'insert-link': {
 13+ filters: [ '#wpTextbox1.toolbar-dialogs' ],
 14+ titleMsg: 'wikieditor-toolbar-tool-link-title',
 15+ id: 'wikieditor-toolbar-link-dialog',
 16+ html: '\
 17+ <fieldset>\
 18+ <div class="wikieditor-toolbar-field-wrapper">\
 19+ <label for="wikieditor-toolbar-link-int-target" rel="wikieditor-toolbar-tool-link-int-target" id="wikieditor-toolbar-tool-link-int-target-label"></label>\
 20+ <div id="wikieditor-toolbar-link-int-target-status"></div>\
 21+ <input type="text" id="wikieditor-toolbar-link-int-target" />\
 22+ </div>\
 23+ <div class="wikieditor-toolbar-field-wrapper">\
 24+ <label for="wikieditor-toolbar-link-int-text" rel="wikieditor-toolbar-tool-link-int-text"></label>\
 25+ <input type="text" id="wikieditor-toolbar-link-int-text" />\
 26+ </div>\
 27+ <div class="wikieditor-toolbar-field-wrapper">\
 28+ <div class="wikieditor-toolbar-floated-field-wrapper">\
 29+ <input type="radio" id="wikieditor-toolbar-link-type-int" name="wikieditor-toolbar-link-type" selected />\
 30+ <label for="wikieditor-toolbar-link-type-int" rel="wikieditor-toolbar-tool-link-int"></label>\
 31+ </div>\
 32+ <div class="wikieditor-toolbar-floated-field-wrapper">\
 33+ <input type="radio" id="wikieditor-toolbar-link-type-ext" name="wikieditor-toolbar-link-type" />\
 34+ <label for="wikieditor-toolbar-link-type-ext" rel="wikieditor-toolbar-tool-link-ext"></label>\
 35+ </div>\
 36+ </div>\
 37+ </fieldset>',
 38+ init: function() {
 39+ function isExternalLink( s ) {
 40+ // The following things are considered to be external links:
 41+ // * Starts a URL protocol
 42+ // * Starts with www.
 43+ // All of these are potentially valid titles, and the latter two categories match about 6300
 44+ // titles in enwiki's ns0. Out of 6.9M titles, that's 0.09%
 45+ if ( typeof arguments.callee.regex == 'undefined' ) {
 46+ // Cache the regex
 47+ arguments.callee.regex =
 48+ new RegExp( "^(" + wgUrlProtocols + "|www\\.)", 'i');
 49+ }
 50+ return s.match( arguments.callee.regex );
 51+ }
 52+ // Updates the status indicator above the target link
 53+ function updateWidget( status ) {
 54+ $( '#wikieditor-toolbar-link-int-target-status' ).children().hide();
 55+ $( '#wikieditor-toolbar-link-int-target' ).parent()
 56+ .removeClass(
 57+ 'status-invalid status-external status-notexists status-exists status-loading'
 58+ );
 59+ if ( status ) {
 60+ $( '#wikieditor-toolbar-link-int-target-status-' + status ).show();
 61+ $( '#wikieditor-toolbar-link-int-target' ).parent().addClass( 'status-' + status );
 62+ }
 63+ if ( status == 'invalid' ) {
 64+ $( '.ui-dialog:visible .ui-dialog-buttonpane button:first' )
 65+ .attr( 'disabled', true )
 66+ .addClass( 'disabled' );
 67+ } else {
 68+ $( '.ui-dialog:visible .ui-dialog-buttonpane button:first' )
 69+ .removeAttr('disabled')
 70+ .removeClass('disabled');
 71+ }
 72+ }
 73+ // Updates the UI to show if the page title being inputed by the user exists or not
 74+ // accepts parameter internal for bypassing external link detection
 75+ function updateExistence( internal ) {
 76+ // ensure the internal parameter is a boolean
 77+ if ( internal != true ) internal = false;
 78+ // Abort previous request
 79+ var request = $( '#wikieditor-toolbar-link-int-target-status' ).data( 'request' );
 80+ if ( request ) {
 81+ request.abort();
 82+ }
 83+ var target = $( '#wikieditor-toolbar-link-int-target' ).val();
 84+ var cache = $( '#wikieditor-toolbar-link-int-target-status' ).data( 'existencecache' );
 85+ if ( cache[target] ) {
 86+ updateWidget( cache[target] );
 87+ return;
 88+ }
 89+ if ( target.replace( /^\s+$/,'' ) == '' ) {
 90+ // Hide the widget when the textbox is empty
 91+ updateWidget( false );
 92+ return;
 93+ }
 94+ // If the forced internal paremter was not true, check if the target is an external link
 95+ if ( !internal && isExternalLink( target ) ) {
 96+ updateWidget( 'external' );
 97+ return;
 98+ }
 99+ if ( target.indexOf( '|' ) != -1 ) {
 100+ // Title contains | , which means it's invalid
 101+ // but confuses the API. Show invalid and bypass API
 102+ updateWidget( 'invalid' );
 103+ return;
 104+ }
 105+ // Show loading spinner while waiting for the API to respond
 106+ updateWidget( 'loading' );
 107+ // Call the API to check page status, saving the request object so it can be aborted if
 108+ // necessary
 109+ $( '#wikieditor-toolbar-link-int-target-status' ).data(
 110+ 'request',
 111+ $.ajax( {
 112+ url: wgScriptPath + '/api.php',
 113+ dataType: 'json',
 114+ data: {
 115+ 'action': 'query',
 116+ 'indexpageids': '',
 117+ 'titles': target,
 118+ 'converttitles': '',
 119+ 'format': 'json'
 120+ },
 121+ success: function( data ) {
 122+ var status;
 123+ if ( !data || typeof data.query == 'undefined' ) {
 124+ // This happens in some weird cases
 125+ status = false;
 126+ } else {
 127+ var page = data.query.pages[data.query.pageids[0]];
 128+ status = 'exists';
 129+ if ( typeof page.missing != 'undefined' )
 130+ status = 'notexists';
 131+ else if ( typeof page.invalid != 'undefined' )
 132+ status = 'invalid';
 133+ }
 134+ // Cache the status of the link target if the force internal parameter was not
 135+ // passed
 136+ if ( !internal ) cache[target] = status;
 137+ updateWidget( status );
 138+ }
 139+ } )
 140+ );
 141+ }
 142+ $( '#wikieditor-toolbar-link-type-int, #wikieditor-toolbar-link-type-ext' ).click( function() {
 143+ if( $( '#wikieditor-toolbar-link-type-ext' ).is( ':checked' ) ) {
 144+ // Abort previous request
 145+ var request = $( '#wikieditor-toolbar-link-int-target-status' ).data( 'request' );
 146+ if ( request ) {
 147+ request.abort();
 148+ }
 149+ updateWidget( 'external' );
 150+ }
 151+ if( $( '#wikieditor-toolbar-link-type-int' ).is( ':checked' ) )
 152+ updateExistence( true );
 153+ });
 154+ // Set labels of tabs based on rel values
 155+ var msg = mediaWiki.msg;
 156+ $(this).find( '[rel]' ).each( function() {
 157+ $(this).text( msg.get( $(this).attr( 'rel' ) ) );
 158+ });
 159+ // Set tabindexes on form fields
 160+ $.wikiEditor.modules.dialogs.fn.setTabindexes( $(this).find( 'input' ).not( '[tabindex]' ) );
 161+ // Setup the tooltips in the textboxes
 162+ $( '#wikieditor-toolbar-link-int-target' )
 163+ .data( 'tooltip', msg.get( 'wikieditor-toolbar-tool-link-int-target-tooltip' ) );
 164+ $( '#wikieditor-toolbar-link-int-text' )
 165+ .data( 'tooltip', msg.get( 'wikieditor-toolbar-tool-link-int-text-tooltip' ) );
 166+ $( '#wikieditor-toolbar-link-int-target, #wikieditor-toolbar-link-int-text' )
 167+ .each( function() {
 168+ var tooltip = msg.get( $( this ).attr( 'id' ) + '-tooltip' );
 169+ if ( $( this ).val() == '' )
 170+ $( this )
 171+ .addClass( 'wikieditor-toolbar-dialog-hint' )
 172+ .val( $( this ).data( 'tooltip' ) )
 173+ .data( 'tooltip-mode', true );
 174+ } )
 175+ .focus( function() {
 176+ if( $( this ).val() == $( this ).data( 'tooltip' ) ) {
 177+ $( this )
 178+ .val( '' )
 179+ .removeClass( 'wikieditor-toolbar-dialog-hint' )
 180+ .data( 'tooltip-mode', false );
 181+ }
 182+ })
 183+ .bind( 'change', function() {
 184+ if ( $( this ).val() != $( this ).data( 'tooltip' ) ) {
 185+ $( this )
 186+ .removeClass( 'wikieditor-toolbar-dialog-hint' )
 187+ .data( 'tooltip-mode', false );
 188+ }
 189+ })
 190+ .bind( 'blur', function() {
 191+ if ( $( this ).val() == '' ) {
 192+ $( this )
 193+ .addClass( 'wikieditor-toolbar-dialog-hint' )
 194+ .val( $( this ).data( 'tooltip' ) )
 195+ .data( 'tooltip-mode', true );
 196+ }
 197+ });
 198+
 199+ // Automatically copy the value of the internal link page title field to the link text field unless the
 200+ // user has changed the link text field - this is a convenience thing since most link texts are going to
 201+ // be the the same as the page title - Also change the internal/external radio button accordingly
 202+ $( '#wikieditor-toolbar-link-int-target' ).bind( 'change keydown paste cut', function() {
 203+ // $(this).val() is the old value, before the keypress - Defer this until $(this).val() has
 204+ // been updated
 205+ setTimeout( function() {
 206+ if ( isExternalLink( $( '#wikieditor-toolbar-link-int-target' ).val() ) ) {
 207+ $( '#wikieditor-toolbar-link-type-ext' ).attr( 'checked', 'checked' );
 208+ updateWidget( 'external' );
 209+ } else {
 210+ $( '#wikieditor-toolbar-link-type-int' ).attr( 'checked', 'checked' );
 211+ updateExistence();
 212+ }
 213+ if ( $( '#wikieditor-toolbar-link-int-text' ).data( 'untouched' ) )
 214+ if ( $( '#wikieditor-toolbar-link-int-target' ).val() ==
 215+ $( '#wikieditor-toolbar-link-int-target' ).data( 'tooltip' ) ) {
 216+ $( '#wikieditor-toolbar-link-int-text' )
 217+ .addClass( 'wikieditor-toolbar-dialog-hint' )
 218+ .val( $( '#wikieditor-toolbar-link-int-text' ).data( 'tooltip' ) )
 219+ .change();
 220+ } else {
 221+ $( '#wikieditor-toolbar-link-int-text' )
 222+ .val( $( '#wikieditor-toolbar-link-int-target' ).val() )
 223+ .change();
 224+ }
 225+ }, 0 );
 226+ });
 227+ $( '#wikieditor-toolbar-link-int-text' ).bind( 'change keydown paste cut', function() {
 228+ var oldVal = $(this).val();
 229+ var that = this;
 230+ setTimeout( function() {
 231+ if ( $(that).val() != oldVal )
 232+ $(that).data( 'untouched', false );
 233+ }, 0 );
 234+ });
 235+ // Add images to the page existence widget, which will be shown mutually exclusively to communicate if
 236+ // the page exists, does not exist or the title is invalid (like if it contains a | character)
 237+ var existsMsg = msg.get( 'wikieditor-toolbar-tool-link-int-target-status-exists' );
 238+ var notexistsMsg = msg.get( 'wikieditor-toolbar-tool-link-int-target-status-notexists' );
 239+ var invalidMsg = msg.get( 'wikieditor-toolbar-tool-link-int-target-status-invalid' );
 240+ var externalMsg = msg.get( 'wikieditor-toolbar-tool-link-int-target-status-external' );
 241+ var loadingMsg = msg.get( 'wikieditor-toolbar-tool-link-int-target-status-loading' );
 242+ $( '#wikieditor-toolbar-link-int-target-status' )
 243+ .append( $( '<div />' )
 244+ .attr( 'id', 'wikieditor-toolbar-link-int-target-status-exists' )
 245+ .append( existsMsg )
 246+ )
 247+ .append( $( '<div />' )
 248+ .attr( 'id', 'wikieditor-toolbar-link-int-target-status-notexists' )
 249+ .append( notexistsMsg )
 250+ )
 251+ .append( $( '<div />' )
 252+ .attr( 'id', 'wikieditor-toolbar-link-int-target-status-invalid' )
 253+ .append( invalidMsg )
 254+ )
 255+ .append( $( '<div />' )
 256+ .attr( 'id', 'wikieditor-toolbar-link-int-target-status-external' )
 257+ .append( externalMsg )
 258+ )
 259+ .append( $( '<div />' )
 260+ .attr( 'id', 'wikieditor-toolbar-link-int-target-status-loading' )
 261+ .append( $( '<img />' ).attr( {
 262+ 'src': $.wikiEditor.imgPath + 'dialogs/' + 'loading.gif',
 263+ 'alt': loadingMsg,
 264+ 'title': loadingMsg
 265+ } ) )
 266+ )
 267+ .data( 'existencecache', {} )
 268+ .children().hide();
 269+
 270+ $( '#wikieditor-toolbar-link-int-target' )
 271+ .bind( 'keyup paste cut', function() {
 272+ // Cancel the running timer if applicable
 273+ if ( typeof $(this).data( 'timerID' ) != 'undefined' ) {
 274+ clearTimeout( $(this).data( 'timerID' ) );
 275+ }
 276+ // Delay fetch for a while
 277+ // FIXME: Make 120 configurable elsewhere
 278+ var timerID = setTimeout( updateExistence, 120 );
 279+ $(this).data( 'timerID', timerID );
 280+ } )
 281+ .change( function() {
 282+ // Cancel the running timer if applicable
 283+ if ( typeof $(this).data( 'timerID' ) != 'undefined' ) {
 284+ clearTimeout( $(this).data( 'timerID' ) );
 285+ }
 286+ // Fetch right now
 287+ updateExistence();
 288+ } );
 289+
 290+ // Title suggestions
 291+ $( '#wikieditor-toolbar-link-int-target' ).data( 'suggcache', {} ).suggestions( {
 292+ fetch: function( query ) {
 293+ var that = this;
 294+ var title = $(this).val();
 295+
 296+ if ( isExternalLink( title ) || title.indexOf( '|' ) != -1 || title == '') {
 297+ $(this).suggestions( 'suggestions', [] );
 298+ return;
 299+ }
 300+
 301+ var cache = $(this).data( 'suggcache' );
 302+ if ( typeof cache[title] != 'undefined' ) {
 303+ $(this).suggestions( 'suggestions', cache[title] );
 304+ return;
 305+ }
 306+
 307+ var request = $.ajax( {
 308+ url: wgScriptPath + '/api.php',
 309+ data: {
 310+ 'action': 'opensearch',
 311+ 'search': title,
 312+ 'namespace': 0,
 313+ 'suggest': '',
 314+ 'format': 'json'
 315+ },
 316+ dataType: 'json',
 317+ success: function( data ) {
 318+ cache[title] = data[1];
 319+ $(that).suggestions( 'suggestions', data[1] );
 320+ }
 321+ });
 322+ $(this).data( 'request', request );
 323+ },
 324+ cancel: function() {
 325+ var request = $(this).data( 'request' );
 326+ if ( request )
 327+ request.abort();
 328+ }
 329+ });
 330+ },
 331+ dialog: {
 332+ width: 500,
 333+ dialogClass: 'wikiEditor-toolbar-dialog',
 334+ buttons: {
 335+ 'wikieditor-toolbar-tool-link-insert': function() {
 336+ function escapeInternalText( s ) {
 337+ // FIXME: Should this escape [[ too? Seems to work without that
 338+ return s.replace( /(]{2,})/g, '<nowiki>$1</nowiki>' );
 339+ }
 340+ function escapeExternalTarget( s ) {
 341+ return s.replace( / /g, '%20' )
 342+ .replace( /\[/g, '%5B' )
 343+ .replace( /]/g, '%5D' );
 344+ }
 345+ function escapeExternalText( s ) {
 346+ // FIXME: Should this escape [ too? Seems to work without that
 347+ return s.replace( /(]+)/g, '<nowiki>$1</nowiki>' );
 348+ }
 349+ var insertText = '';
 350+ var whitespace = $( '#wikieditor-toolbar-link-dialog' ).data( 'whitespace' );
 351+ var target = $( '#wikieditor-toolbar-link-int-target' ).val();
 352+ var text = $( '#wikieditor-toolbar-link-int-text' ).val();
 353+ // check if the tooltips were passed as target or text
 354+ if ( $( '#wikieditor-toolbar-link-int-target' ).data( 'tooltip-mode' ) )
 355+ target = "";
 356+ if ( $( '#wikieditor-toolbar-link-int-text' ).data( 'tooltip-mode' ) )
 357+ text = "";
 358+ var msg = mediaWiki.msg;
 359+ if ( target == '' ) {
 360+ alert( msg.get( 'wikieditor-toolbar-tool-link-empty' ) );
 361+ return;
 362+ }
 363+ if ( $.trim( text ) == '' ) {
 364+ // [[Foo| ]] creates an invisible link
 365+ // Instead, generate [[Foo|]]
 366+ text = '';
 367+ }
 368+ if ( $( '#wikieditor-toolbar-link-type-int' ).is( ':checked' ) ) {
 369+ // FIXME: Exactly how fragile is this?
 370+ if ( $( '#wikieditor-toolbar-link-int-target-status-invalid' ).is( ':visible' ) ) {
 371+ // Refuse to add links to invalid titles
 372+ alert( msg.get( 'wikieditor-toolbar-tool-link-int-invalid' ) );
 373+ return;
 374+ }
 375+
 376+ if ( target == text || !text.length )
 377+ insertText = '[[' + target + ']]';
 378+ else
 379+ insertText = '[[' + target + '|' + escapeInternalText( text ) + ']]';
 380+ } else {
 381+ // Prepend http:// if there is no protocol
 382+ if ( !target.match( /^[a-z]+:\/\/./ ) )
 383+ target = 'http://' + target;
 384+
 385+ // Detect if this is really an internal link in disguise
 386+ var match = target.match( $(this).data( 'articlePathRegex' ) );
 387+ if ( match && !$(this).data( 'ignoreLooksInternal' ) ) {
 388+ var buttons = { };
 389+ var that = this;
 390+ buttons[ msg.get( 'wikieditor-toolbar-tool-link-lookslikeinternal-int' ) ] =
 391+ function() {
 392+ $( '#wikieditor-toolbar-link-int-target' ).val( match[1] ).change();
 393+ $(this).dialog( 'close' );
 394+ };
 395+ buttons[ msg.get( 'wikieditor-toolbar-tool-link-lookslikeinternal-ext' ) ] =
 396+ function() {
 397+ $(that).data( 'ignoreLooksInternal', true );
 398+ $(that).closest( '.ui-dialog' ).find( 'button:first' ).click();
 399+ $(that).data( 'ignoreLooksInternal', false );
 400+ $(this).dialog( 'close' );
 401+ };
 402+ $.wikiEditor.modules.dialogs.quickDialog(
 403+ msg.get( 'wikieditor-toolbar-tool-link-lookslikeinternal', match[1] ),
 404+ { buttons: buttons }
 405+ );
 406+ return;
 407+ }
 408+
 409+ var escTarget = escapeExternalTarget( target );
 410+ var escText = escapeExternalText( text );
 411+
 412+ if ( escTarget == escText )
 413+ insertText = escTarget;
 414+ else if ( text == '' )
 415+ insertText = '[' + escTarget + ']';
 416+ else
 417+ insertText = '[' + escTarget + ' ' + escText + ']';
 418+ }
 419+ // Preserve whitespace in selection when replacing
 420+ if ( whitespace ) insertText = whitespace[0] + insertText + whitespace[1];
 421+ $(this).dialog( 'close' );
 422+ $.wikiEditor.modules.toolbar.fn.doAction( $(this).data( 'context' ), {
 423+ type: 'replace',
 424+ options: {
 425+ pre: insertText
 426+ }
 427+ }, $(this) );
 428+
 429+ // Blank form
 430+ $( '#wikieditor-toolbar-link-int-target, #wikieditor-toolbar-link-int-text' ).val( '' );
 431+ $( '#wikieditor-toolbar-link-type-int, #wikieditor-toolbar-link-type-ext' )
 432+ .attr( 'checked', '' );
 433+ },
 434+ 'wikieditor-toolbar-tool-link-cancel': function() {
 435+ // Clear any saved selection state
 436+ var context = $(this).data( 'context' );
 437+ context.fn.restoreStuffForIE();
 438+ $(this).dialog( 'close' );
 439+ }
 440+ },
 441+ open: function() {
 442+ // Cache the articlepath regex
 443+ $(this).data( 'articlePathRegex', new RegExp(
 444+ '^' + RegExp.escape( wgServer + wgArticlePath )
 445+ .replace( /\\\$1/g, '(.*)' ) + '$'
 446+ ) );
 447+ // Pre-fill the text fields based on the current selection
 448+ var context = $(this).data( 'context' );
 449+ // Restore and immediately save selection state, needed for inserting stuff later
 450+ context.fn.restoreStuffForIE();
 451+ context.fn.saveStuffForIE();
 452+ var selection = context.$textarea.textSelection( 'getSelection' );
 453+ $( '#wikieditor-toolbar-link-int-target' ).focus();
 454+ // Trigger the change event, so the link status indicator is up to date
 455+ $( '#wikieditor-toolbar-link-int-target' ).change();
 456+ $( '#wikieditor-toolbar-link-dialog' ).data( 'whitespace', [ '', '' ] );
 457+ if ( selection != '' ) {
 458+ var target, text, type;
 459+ var matches;
 460+ if ( ( matches = selection.match( /^(\s*)\[\[([^\]\|]+)(\|([^\]\|]*))?\]\](\s*)$/ ) ) ) {
 461+ // [[foo|bar]] or [[foo]]
 462+ target = matches[2];
 463+ text = ( matches[4] ? matches[4] : matches[2] );
 464+ type = 'int';
 465+ // Preserve whitespace when replacing
 466+ $( '#wikieditor-toolbar-link-dialog' ).data( 'whitespace', [ matches[1], matches[5] ] );
 467+ } else if ( ( matches = selection.match( /^(\s*)\[([^\] ]+)( ([^\]]+))?\](\s*)$/ ) ) ) {
 468+ // [http://www.example.com foo] or [http://www.example.com]
 469+ target = matches[2];
 470+ text = ( matches[4] ? matches[4] : '' );
 471+ type = 'ext';
 472+ // Preserve whitespace when replacing
 473+ $( '#wikieditor-toolbar-link-dialog' ).data( 'whitespace', [ matches[1], matches[5] ] );
 474+ } else {
 475+ // Trim any leading and trailing whitespace from the selection,
 476+ // but preserve it when replacing
 477+ target = text = $.trim( selection );
 478+ if ( target.length < selection.length ) {
 479+ $( '#wikieditor-toolbar-link-dialog' ).data( 'whitespace', [
 480+ selection.substr( 0, selection.indexOf( target.charAt( 0 ) ) ),
 481+ selection.substr(
 482+ selection.lastIndexOf( target.charAt( target.length - 1 ) ) + 1
 483+ ) ]
 484+ );
 485+ }
 486+ }
 487+
 488+ // Change the value by calling val() doesn't trigger the change event, so let's do that
 489+ // ourselves
 490+ if ( typeof text != 'undefined' )
 491+ $( '#wikieditor-toolbar-link-int-text' ).val( text ).change();
 492+ if ( typeof target != 'undefined' )
 493+ $( '#wikieditor-toolbar-link-int-target' ).val( target ).change();
 494+ if ( typeof type != 'undefined' )
 495+ $( '#wikieditor-toolbar-link-' + type ).attr( 'checked', 'checked' );
 496+ }
 497+ $( '#wikieditor-toolbar-link-int-text' ).data( 'untouched',
 498+ $( '#wikieditor-toolbar-link-int-text' ).val() ==
 499+ $( '#wikieditor-toolbar-link-int-target' ).val() ||
 500+ $( '#wikieditor-toolbar-link-int-text' ).hasClass( 'wikieditor-toolbar-dialog-hint' )
 501+ );
 502+ $( '#wikieditor-toolbar-link-int-target' ).suggestions();
 503+
 504+ //don't overwrite user's text
 505+ if( selection != '' ){
 506+ $( '#wikieditor-toolbar-link-int-text' ).data( 'untouched', false );
 507+ }
 508+
 509+ $( '#wikieditor-toolbar-link-int-text, #wikiedit-toolbar-link-int-target' )
 510+ .each( function() {
 511+ if ( $(this).val() == '' )
 512+ $(this).parent().find( 'label' ).show();
 513+ });
 514+
 515+ if ( !( $(this).data( 'dialogkeypressset' ) ) ) {
 516+ $(this).data( 'dialogkeypressset', true );
 517+ // Execute the action associated with the first button
 518+ // when the user presses Enter
 519+ $(this).closest( '.ui-dialog' ).keypress( function( e ) {
 520+ if ( ( e.keyCode || e.which ) == 13 ) {
 521+ var button = $(this).data( 'dialogaction' ) || $(this).find( 'button:first' );
 522+ button.click();
 523+ e.preventDefault();
 524+ }
 525+ });
 526+
 527+ // Make tabbing to a button and pressing
 528+ // Enter do what people expect
 529+ $(this).closest( '.ui-dialog' ).find( 'button' ).focus( function() {
 530+ $(this).closest( '.ui-dialog' ).data( 'dialogaction', this );
 531+ });
 532+ }
 533+ }
 534+ }
 535+ },
 536+ 'insert-reference': {
 537+ filters: [ '#wpTextbox1.toolbar-dialogs' ],
 538+ titleMsg: 'wikieditor-toolbar-tool-reference-title',
 539+ id: 'wikieditor-toolbar-reference-dialog',
 540+ html: '\
 541+ <div class="wikieditor-toolbar-dialog-wrapper">\
 542+ <fieldset><div class="wikieditor-toolbar-table-form">\
 543+ <div class="wikieditor-toolbar-field-wrapper">\
 544+ <label for="wikieditor-toolbar-reference-text"\
 545+ rel="wikieditor-toolbar-tool-reference-text"></label>\
 546+ <input type="text" id="wikieditor-toolbar-reference-text" />\
 547+ </div>\
 548+ </div></fieldset>\
 549+ </div>',
 550+ init: function() {
 551+ // Insert translated strings into labels
 552+ $( this ).find( '[rel]' ).each( function() {
 553+ $( this ).text( mediaWiki.msg.get( $( this ).attr( 'rel' ) ) );
 554+ } );
 555+
 556+ },
 557+ dialog: {
 558+ dialogClass: 'wikiEditor-toolbar-dialog',
 559+ width: 590,
 560+ buttons: {
 561+ 'wikieditor-toolbar-tool-reference-insert': function() {
 562+ var insertText = $( '#wikieditor-toolbar-reference-text' ).val();
 563+ var whitespace = $( '#wikieditor-toolbar-reference-dialog' ).data( 'whitespace' );
 564+ var attributes = $( '#wikieditor-toolbar-reference-dialog' ).data( 'attributes' );
 565+ // Close the dialog
 566+ $( this ).dialog( 'close' );
 567+ $.wikiEditor.modules.toolbar.fn.doAction(
 568+ $( this ).data( 'context' ),
 569+ {
 570+ type: 'replace',
 571+ options: {
 572+ pre: whitespace[0] + '<ref' + attributes + '>',
 573+ peri: insertText,
 574+ post: '</ref>' + whitespace[1]
 575+ }
 576+ },
 577+ $( this )
 578+ );
 579+ // Restore form state
 580+ $( '#wikieditor-toolbar-reference-text' ).val( "" );
 581+ },
 582+ 'wikieditor-toolbar-tool-reference-cancel': function() {
 583+ // Clear any saved selection state
 584+ var context = $( this ).data( 'context' );
 585+ context.fn.restoreStuffForIE();
 586+ $( this ).dialog( 'close' );
 587+ }
 588+ },
 589+ open: function() {
 590+ // Pre-fill the text fields based on the current selection
 591+ var context = $(this).data( 'context' );
 592+ // Restore and immediately save selection state, needed for inserting stuff later
 593+ context.fn.restoreStuffForIE();
 594+ context.fn.saveStuffForIE();
 595+ var selection = context.$textarea.textSelection( 'getSelection' );
 596+ // set focus
 597+ $( '#wikieditor-toolbar-reference-text' ).focus();
 598+ $( '#wikieditor-toolbar-reference-dialog' )
 599+ .data( 'whitespace', [ '', '' ] )
 600+ .data( 'attributes', '' );
 601+ if ( selection != '' ) {
 602+ var matches, text;
 603+ if ( ( matches = selection.match( /^(\s*)<ref([^\>]*)>([^\<]*)<\/ref\>(\s*)$/ ) ) ) {
 604+ text = matches[3];
 605+ // Preserve whitespace when replacing
 606+ $( '#wikieditor-toolbar-reference-dialog' )
 607+ .data( 'whitespace', [ matches[1], matches[4] ] );
 608+ $( '#wikieditor-toolbar-reference-dialog' ).data( 'attributes', matches[2] );
 609+ } else {
 610+ text = selection;
 611+ }
 612+ $( '#wikieditor-toolbar-reference-text' ).val( text );
 613+ }
 614+ if ( !( $( this ).data( 'dialogkeypressset' ) ) ) {
 615+ $( this ).data( 'dialogkeypressset', true );
 616+ // Execute the action associated with the first button
 617+ // when the user presses Enter
 618+ $( this ).closest( '.ui-dialog' ).keypress( function( e ) {
 619+ if ( ( e.keyCode || e.which ) == 13 ) {
 620+ var button = $( this ).data( 'dialogaction' ) || $( this ).find( 'button:first' );
 621+ button.click();
 622+ e.preventDefault();
 623+ }
 624+ } );
 625+ // Make tabbing to a button and pressing
 626+ // Enter do what people expect
 627+ $( this ).closest( '.ui-dialog' ).find( 'button' ).focus( function() {
 628+ $( this ).closest( '.ui-dialog' ).data( 'dialogaction', this );
 629+ } );
 630+ }
 631+ }
 632+ }
 633+ },
 634+ 'insert-table': {
 635+ filters: [ '#wpTextbox1.toolbar-dialogs' ],
 636+ titleMsg: 'wikieditor-toolbar-tool-table-title',
 637+ id: 'wikieditor-toolbar-table-dialog',
 638+ // FIXME: Localize 'x'?
 639+ html: '\
 640+ <div class="wikieditor-toolbar-dialog-wrapper">\
 641+ <fieldset><div class="wikieditor-toolbar-table-form">\
 642+ <div class="wikieditor-toolbar-field-wrapper">\
 643+ <input type="checkbox" id="wikieditor-toolbar-table-dimensions-header" checked />\
 644+ <label for="wikieditor-toolbar-table-dimensions-header"\
 645+ rel="wikieditor-toolbar-tool-table-dimensions-header"></label>\
 646+ </div>\
 647+ <div class="wikieditor-toolbar-field-wrapper">\
 648+ <input type="checkbox" id="wikieditor-toolbar-table-wikitable" checked />\
 649+ <label for="wikieditor-toolbar-table-wikitable" rel="wikieditor-toolbar-tool-table-wikitable"></label>\
 650+ </div>\
 651+ <div class="wikieditor-toolbar-field-wrapper">\
 652+ <input type="checkbox" id="wikieditor-toolbar-table-sortable" />\
 653+ <label for="wikieditor-toolbar-table-sortable" rel="wikieditor-toolbar-tool-table-sortable"></label>\
 654+ </div>\
 655+ <div class="wikieditor-toolbar-table-dimension-fields">\
 656+ <div class="wikieditor-toolbar-field-wrapper">\
 657+ <label for="wikieditor-toolbar-table-dimensions-rows"\
 658+ rel="wikieditor-toolbar-tool-table-dimensions-rows"></label><br />\
 659+ <input type="text" id="wikieditor-toolbar-table-dimensions-rows" size="4" />\
 660+ </div>\
 661+ <div class="wikieditor-toolbar-field-wrapper">\
 662+ <label for="wikieditor-toolbar-table-dimensions-columns"\
 663+ rel="wikieditor-toolbar-tool-table-dimensions-columns"></label><br />\
 664+ <input type="text" id="wikieditor-toolbar-table-dimensions-columns" size="4" />\
 665+ </div>\
 666+ </div>\
 667+ </div></fieldset>\
 668+ <div class="wikieditor-toolbar-table-preview-wrapper" >\
 669+ <span rel="wikieditor-toolbar-tool-table-example"></span>\
 670+ <div class="wikieditor-toolbar-table-preview-content">\
 671+ <table id="wikieditor-toolbar-table-preview" class="wikieditor-toolbar-table-preview wikitable">\
 672+ <tr class="wikieditor-toolbar-table-preview-header">\
 673+ <th rel="wikieditor-toolbar-tool-table-example-header"></th>\
 674+ <th rel="wikieditor-toolbar-tool-table-example-header"></th>\
 675+ <th rel="wikieditor-toolbar-tool-table-example-header"></th>\
 676+ </tr><tr class="wikieditor-toolbar-table-preview-hidden" style="display: none;">\
 677+ <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\
 678+ <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\
 679+ <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\
 680+ </tr><tr>\
 681+ <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\
 682+ <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\
 683+ <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\
 684+ </tr><tr>\
 685+ <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\
 686+ <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\
 687+ <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\
 688+ </tr><tr>\
 689+ <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\
 690+ <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\
 691+ <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\
 692+ </tr>\
 693+ </table>\
 694+ </div>\
 695+ </div></div>',
 696+ init: function() {
 697+ $(this).find( '[rel]' ).each( function() {
 698+ $(this).text( mediaWiki.msg.get( $(this).attr( 'rel' ) ) );
 699+ });
 700+ // Set tabindexes on form fields
 701+ $.wikiEditor.modules.dialogs.fn.setTabindexes( $(this).find( 'input' ).not( '[tabindex]' ) );
 702+
 703+ $( '#wikieditor-toolbar-table-dimensions-rows' ).val( 3 );
 704+ $( '#wikieditor-toolbar-table-dimensions-columns' ).val( 3 );
 705+ $( '#wikieditor-toolbar-table-wikitable' ).click( function() {
 706+ $( '.wikieditor-toolbar-table-preview' ).toggleClass( 'wikitable' );
 707+ });
 708+
 709+ // Hack for sortable preview: dynamically adding
 710+ // sortable class doesn't work, so we use a clone
 711+ // FIXME: Relies on sortable table internals
 712+ $( '#wikieditor-toolbar-table-preview' )
 713+ .clone()
 714+ .attr( 'id', 'wikieditor-toolbar-table-preview2' )
 715+ .addClass( 'sortable' )
 716+ .insertAfter( $( '#wikieditor-toolbar-table-preview' ) )
 717+ .hide();
 718+ if ( typeof ts_makeSortable == 'function' )
 719+ ts_makeSortable( $( '#wikieditor-toolbar-table-preview2' ).get( 0 ) );
 720+ $( '#wikieditor-toolbar-table-sortable' ).click( function() {
 721+ // Swap the currently shown one clone with the other one
 722+ $( '#wikieditor-toolbar-table-preview' )
 723+ .hide()
 724+ .attr( 'id', 'wikieditor-toolbar-table-preview3' );
 725+ $( '#wikieditor-toolbar-table-preview2' )
 726+ .attr( 'id', 'wikieditor-toolbar-table-preview' )
 727+ .show();
 728+ $( '#wikieditor-toolbar-table-preview3' ).attr( 'id', 'wikieditor-toolbar-table-preview2' );
 729+ });
 730+
 731+ $( '#wikieditor-toolbar-table-dimensions-header' ).click( function() {
 732+ // Instead of show/hiding, switch the HTML around
 733+ // We do this because the sortable tables script styles the first row,
 734+ // visible or not
 735+ var headerHTML = $( '.wikieditor-toolbar-table-preview-header' ).html();
 736+ var hiddenHTML = $( '.wikieditor-toolbar-table-preview-hidden' ).html();
 737+ $( '.wikieditor-toolbar-table-preview-header' ).html( hiddenHTML );
 738+ $( '.wikieditor-toolbar-table-preview-hidden' ).html( headerHTML );
 739+ if ( typeof ts_makeSortable == 'function' )
 740+ ts_makeSortable(
 741+ $( '#wikieditor-toolbar-table-preview, #wikieditor-toolbar-table-preview2' )
 742+ .filter( '.sortable' )
 743+ .get( 0 )
 744+ );
 745+ });
 746+
 747+ },
 748+ dialog: {
 749+ resizable: false,
 750+ dialogClass: 'wikiEditor-toolbar-dialog',
 751+ width: 590,
 752+ buttons: {
 753+ 'wikieditor-toolbar-tool-table-insert': function() {
 754+ var rowsVal = $( '#wikieditor-toolbar-table-dimensions-rows' ).val();
 755+ var colsVal = $( '#wikieditor-toolbar-table-dimensions-columns' ).val();
 756+ var rows = parseInt( rowsVal, 10 );
 757+ var cols = parseInt( colsVal, 10 );
 758+ var header = $( '#wikieditor-toolbar-table-dimensions-header' ).is( ':checked' ) ? 1 : 0;
 759+ var msg = mediaWiki.msg;
 760+ if ( isNaN( rows ) || isNaN( cols ) || rows != rowsVal || cols != colsVal ) {
 761+ alert( msg.get( 'wikieditor-toolbar-tool-table-invalidnumber' ) );
 762+ return;
 763+ }
 764+ if ( rows + header == 0 || cols == 0 ) {
 765+ alert( msg.get( 'wikieditor-toolbar-tool-table-zero' ) );
 766+ return;
 767+ }
 768+ if ( rows * cols > 1000 ) {
 769+ alert( msg.get( 'wikieditor-toolbar-tool-table-toomany', 1000 ) );
 770+ return;
 771+ }
 772+ var headerText = msg.get( 'wikieditor-toolbar-tool-table-example-header' );
 773+ var normalText = msg.get( 'wikieditor-toolbar-tool-table-example' );
 774+ var table = "";
 775+ for ( var r = 0; r < rows + header; r++ ) {
 776+ table += "|-\n";
 777+ for ( var c = 0; c < cols; c++ ) {
 778+ var isHeader = ( header && r == 0 );
 779+ var delim = isHeader ? '!' : '|';
 780+ if ( c > 0 ) {
 781+ delim += delim;
 782+ }
 783+ table += delim + ' ' + ( isHeader ? headerText : normalText ) + ' ';
 784+ }
 785+ // Replace trailing space by newline
 786+ // table[table.length - 1] is read-only
 787+ table = table.substr( 0, table.length - 1 ) + "\n";
 788+ }
 789+ var classes = [];
 790+ if ( $( '#wikieditor-toolbar-table-wikitable' ).is( ':checked' ) )
 791+ classes.push( 'wikitable' );
 792+ if ( $( '#wikieditor-toolbar-table-sortable' ).is( ':checked' ) )
 793+ classes.push( 'sortable' );
 794+ var classStr = classes.length > 0 ? ' class="' + classes.join( ' ' ) + '"' : '';
 795+ $(this).dialog( 'close' );
 796+ $.wikiEditor.modules.toolbar.fn.doAction(
 797+ $(this).data( 'context' ),
 798+ {
 799+ type: 'replace',
 800+ options: {
 801+ pre: '{|' + classStr + "\n",
 802+ peri: table,
 803+ post: '|}',
 804+ ownline: true
 805+ }
 806+ },
 807+ $(this)
 808+ );
 809+
 810+ // Restore form state
 811+ $( '#wikieditor-toolbar-table-dimensions-rows' ).val( 3 );
 812+ $( '#wikieditor-toolbar-table-dimensions-columns' ).val( 3 );
 813+ // Simulate clicks instead of setting values, so the according
 814+ // actions are performed
 815+ if ( !$( '#wikieditor-toolbar-table-dimensions-header' ).is( ':checked' ) )
 816+ $( '#wikieditor-toolbar-table-dimensions-header' ).click();
 817+ if ( !$( '#wikieditor-toolbar-table-wikitable' ).is( ':checked' ) )
 818+ $( '#wikieditor-toolbar-table-wikitable' ).click();
 819+ if ( $( '#wikieditor-toolbar-table-sortable' ).is( ':checked' ) )
 820+ $( '#wikieditor-toolbar-table-sortable' ).click();
 821+ },
 822+ 'wikieditor-toolbar-tool-table-cancel': function() {
 823+ $(this).dialog( 'close' );
 824+ }
 825+ },
 826+ open: function() {
 827+ $( '#wikieditor-toolbar-table-dimensions-rows' ).focus();
 828+ if ( !( $(this).data( 'dialogkeypressset' ) ) ) {
 829+ $(this).data( 'dialogkeypressset', true );
 830+ // Execute the action associated with the first button
 831+ // when the user presses Enter
 832+ $(this).closest( '.ui-dialog' ).keypress( function( e ) {
 833+ if ( ( e.keyCode || e.which ) == 13 ) {
 834+ var button = $(this).data( 'dialogaction' ) || $(this).find( 'button:first' );
 835+ button.click();
 836+ e.preventDefault();
 837+ }
 838+ });
 839+
 840+ // Make tabbing to a button and pressing
 841+ // Enter do what people expect
 842+ $(this).closest( '.ui-dialog' ).find( 'button' ).focus( function() {
 843+ $(this).closest( '.ui-dialog' ).data( 'dialogaction', this );
 844+ });
 845+ }
 846+ }
 847+ }
 848+ },
 849+ 'search-and-replace': {
 850+ 'browsers': {
 851+ // Left-to-right languages
 852+ 'ltr': {
 853+ 'msie': false,
 854+ 'firefox': [['>=', 2]],
 855+ 'opera': false,
 856+ 'safari': [['>=', 3]],
 857+ 'chrome': [['>=', 3]]
 858+ },
 859+ // Right-to-left languages
 860+ 'rtl': {
 861+ 'msie': false,
 862+ 'firefox': [['>=', 2]],
 863+ 'opera': false,
 864+ 'safari': [['>=', 3]],
 865+ 'chrome': [['>=', 3]]
 866+ }
 867+ },
 868+ filters: [ '#wpTextbox1.toolbar-dialogs' ],
 869+ titleMsg: 'wikieditor-toolbar-tool-replace-title',
 870+ id: 'wikieditor-toolbar-replace-dialog',
 871+ html: '\
 872+ <div id="wikieditor-toolbar-replace-message">\
 873+ <div id="wikieditor-toolbar-replace-nomatch" rel="wikieditor-toolbar-tool-replace-nomatch"></div>\
 874+ <div id="wikieditor-toolbar-replace-success"></div>\
 875+ <div id="wikieditor-toolbar-replace-emptysearch" rel="wikieditor-toolbar-tool-replace-emptysearch"></div>\
 876+ <div id="wikieditor-toolbar-replace-invalidregex"></div>\
 877+ </div>\
 878+ <fieldset>\
 879+ <div class="wikieditor-toolbar-field-wrapper">\
 880+ <label for="wikieditor-toolbar-replace-search" rel="wikieditor-toolbar-tool-replace-search"></label>\
 881+ <input type="text" id="wikieditor-toolbar-replace-search" style="width: 100%;" />\
 882+ </div>\
 883+ <div class="wikieditor-toolbar-field-wrapper">\
 884+ <label for="wikieditor-toolbar-replace-replace" rel="wikieditor-toolbar-tool-replace-replace"></label>\
 885+ <input type="text" id="wikieditor-toolbar-replace-replace" style="width: 100%;" />\
 886+ </div>\
 887+ <div class="wikieditor-toolbar-field-wrapper">\
 888+ <input type="checkbox" id="wikieditor-toolbar-replace-case" />\
 889+ <label for="wikieditor-toolbar-replace-case" rel="wikieditor-toolbar-tool-replace-case"></label>\
 890+ </div>\
 891+ <div class="wikieditor-toolbar-field-wrapper">\
 892+ <input type="checkbox" id="wikieditor-toolbar-replace-regex" />\
 893+ <label for="wikieditor-toolbar-replace-regex" rel="wikieditor-toolbar-tool-replace-regex"></label>\
 894+ </div>\
 895+ </fieldset>',
 896+ init: function() {
 897+ var msg = mediaWiki.msg;
 898+ $(this).find( '[rel]' ).each( function() {
 899+ $(this).text( msg.get( $(this).attr( 'rel' ) ) );
 900+ });
 901+ // Set tabindexes on form fields
 902+ $.wikiEditor.modules.dialogs.fn.setTabindexes( $(this).find( 'input' ).not( '[tabindex]' ) );
 903+
 904+ // TODO: Find a cleaner way to share this function
 905+ $(this).data( 'replaceCallback', function( mode ) {
 906+ $( '#wikieditor-toolbar-replace-nomatch, #wikieditor-toolbar-replace-success, #wikieditor-toolbar-replace-emptysearch, #wikieditor-toolbar-replace-invalidregex' ).hide();
 907+ var searchStr = $( '#wikieditor-toolbar-replace-search' ).val();
 908+ if ( searchStr == '' ) {
 909+ $( '#wikieditor-toolbar-replace-emptysearch' ).show();
 910+ return;
 911+ }
 912+ var replaceStr = $( '#wikieditor-toolbar-replace-replace' ).val();
 913+ var flags = 'm';
 914+ var matchCase = $( '#wikieditor-toolbar-replace-case' ).is( ':checked' );
 915+ var isRegex = $( '#wikieditor-toolbar-replace-regex' ).is( ':checked' );
 916+ if ( !matchCase ) {
 917+ flags += 'i';
 918+ }
 919+ if ( mode == 'replaceAll' ) {
 920+ flags += 'g';
 921+ }
 922+ if ( !isRegex ) {
 923+ searchStr = RegExp.escape( searchStr );
 924+ }
 925+ try {
 926+ var regex = new RegExp( searchStr, flags );
 927+ } catch( e ) {
 928+ $( '#wikieditor-toolbar-replace-invalidregex' )
 929+ .text( msg.get( 'wikieditor-toolbar-tool-replace-invalidregex',
 930+ e.message ) )
 931+ .show();
 932+ return;
 933+ }
 934+ var $textarea = $(this).data( 'context' ).$textarea;
 935+ var text = $textarea.textSelection( 'getContents' );
 936+ var match = false;
 937+ var offset, s;
 938+ if ( mode != 'replaceAll' ) {
 939+ offset = $(this).data( 'offset' );
 940+ s = text.substr( offset );
 941+ match = s.match( regex );
 942+ }
 943+ if ( !match ) {
 944+ // Search hit BOTTOM, continuing at TOP
 945+ offset = 0;
 946+ s = text;
 947+ match = s.match( regex );
 948+ }
 949+
 950+ if ( !match ) {
 951+ $( '#wikieditor-toolbar-replace-nomatch' ).show();
 952+ } else if ( mode == 'replaceAll' ) {
 953+ // Instead of using repetitive .match() calls, we use one .match() call with /g
 954+ // and indexOf() followed by substr() to find the offsets. This is actually
 955+ // faster because our indexOf+substr loop is faster than a match loop, and the
 956+ // /g match is so ridiculously fast that it's negligible.
 957+ // FIXME: Repetitively calling encapsulateSelection() is probably the best strategy
 958+ // in Firefox/Webkit, but in IE replacing the entire content once is better.
 959+ var index;
 960+ for ( var i = 0; i < match.length; i++ ) {
 961+ index = s.indexOf( match[i] );
 962+ if ( index == -1 ) {
 963+ // This shouldn't happen
 964+ break;
 965+ }
 966+ var matchedText = s.substr( index, match[i].length );
 967+ s = s.substr( index + match[i].length );
 968+
 969+ var start = index + offset;
 970+ var end = start + match[i].length;
 971+ // Make regex placeholder substitution ($1) work
 972+ var replace = isRegex ? matchedText.replace( regex, replaceStr ) : replaceStr;
 973+ var newEnd = start + replace.length;
 974+ $textarea
 975+ .textSelection( 'setSelection', { 'start': start, 'end': end } )
 976+ .textSelection( 'encapsulateSelection', {
 977+ 'peri': replace,
 978+ 'replace': true } )
 979+ .textSelection( 'setSelection', { 'start': start, 'end': newEnd } );
 980+ offset = newEnd;
 981+ }
 982+ $( '#wikieditor-toolbar-replace-success' )
 983+ .text( msg.get( 'wikieditor-toolbar-tool-replace-success', match.length ) )
 984+ .show();
 985+ $(this).data( 'offset', 0 );
 986+ } else {
 987+ // Make regex placeholder substitution ($1) work
 988+ var replace = isRegex ? match[0].replace( regex, replaceStr ): replaceStr;
 989+ var start = match.index + offset;
 990+ var end = start + match[0].length;
 991+ var newEnd = start + replace.length;
 992+ var context = $( this ).data( 'context' );
 993+ $textarea.textSelection( 'setSelection', { 'start': start,
 994+ 'end': end } );
 995+ if ( mode == 'replace' ) {
 996+ $textarea
 997+ .textSelection( 'encapsulateSelection', {
 998+ 'peri': replace,
 999+ 'replace': true } )
 1000+ .textSelection( 'setSelection', {
 1001+ 'start': start,
 1002+ 'end': newEnd } );
 1003+ }
 1004+ $textarea.textSelection( 'scrollToCaretPosition' );
 1005+ $textarea.textSelection( 'setSelection', { 'start': start,
 1006+ 'end': mode == 'replace' ? newEnd : end } );
 1007+ $( this ).data( 'offset', mode == 'replace' ? newEnd : end );
 1008+ var textbox = typeof context.$iframe != 'undefined' ?
 1009+ context.$iframe[0].contentWindow : $textarea[0];
 1010+ textbox.focus();
 1011+ }
 1012+ });
 1013+ },
 1014+ dialog: {
 1015+ width: 500,
 1016+ dialogClass: 'wikiEditor-toolbar-dialog',
 1017+ buttons: {
 1018+ 'wikieditor-toolbar-tool-replace-button-findnext': function( e ) {
 1019+ $(this).closest( '.ui-dialog' ).data( 'dialogaction', e.target );
 1020+ $(this).data( 'replaceCallback' ).call( this, 'find' );
 1021+ },
 1022+ 'wikieditor-toolbar-tool-replace-button-replacenext': function( e ) {
 1023+ $(this).closest( '.ui-dialog' ).data( 'dialogaction', e.target );
 1024+ $(this).data( 'replaceCallback' ).call( this, 'replace' );
 1025+ },
 1026+ 'wikieditor-toolbar-tool-replace-button-replaceall': function( e ) {
 1027+ $(this).closest( '.ui-dialog' ).data( 'dialogaction', e.target );
 1028+ $(this).data( 'replaceCallback' ).call( this, 'replaceAll' );
 1029+ },
 1030+ 'wikieditor-toolbar-tool-replace-close': function() {
 1031+ $(this).dialog( 'close' );
 1032+ }
 1033+ },
 1034+ open: function() {
 1035+ $(this).data( 'offset', 0 );
 1036+ $( '#wikieditor-toolbar-replace-search' ).focus();
 1037+ $( '#wikieditor-toolbar-replace-nomatch, #wikieditor-toolbar-replace-success, #wikieditor-toolbar-replace-emptysearch, #wikieditor-toolbar-replace-invalidregex' ).hide();
 1038+ if ( !( $(this).data( 'onetimeonlystuff' ) ) ) {
 1039+ $(this).data( 'onetimeonlystuff', true );
 1040+ // Execute the action associated with the first button
 1041+ // when the user presses Enter
 1042+ $(this).closest( '.ui-dialog' ).keypress( function( e ) {
 1043+ if ( ( e.keyCode || e.which ) == 13 ) {
 1044+ var button = $(this).data( 'dialogaction' ) || $(this).find( 'button:first' );
 1045+ button.click();
 1046+ e.preventDefault();
 1047+ }
 1048+ });
 1049+ // Make tabbing to a button and pressing
 1050+ // Enter do what people expect
 1051+ $(this).closest( '.ui-dialog' ).find( 'button' ).focus( function() {
 1052+ $(this).closest( '.ui-dialog' ).data( 'dialogaction', this );
 1053+ });
 1054+ }
 1055+ var dialog = $(this).closest( '.ui-dialog' );
 1056+ var that = this;
 1057+ var context = $(this).data( 'context' );
 1058+ var textbox = typeof context.$iframe != 'undefined' ?
 1059+ context.$iframe[0].contentWindow.document : context.$textarea;
 1060+
 1061+ $( textbox )
 1062+ .bind( 'keypress.srdialog', function( e ) {
 1063+ if ( ( e.keyCode || e.which ) == 13 ) {
 1064+ // Enter
 1065+ var button = dialog.data( 'dialogaction' ) || dialog.find( 'button:first' );
 1066+ button.click();
 1067+ e.preventDefault();
 1068+ } else if ( ( e.keyCode || e.which ) == 27 ) {
 1069+ // Escape
 1070+ $(that).dialog( 'close' );
 1071+ }
 1072+ });
 1073+ },
 1074+ close: function() {
 1075+ var context = $(this).data( 'context' );
 1076+ var textbox = typeof context.$iframe != 'undefined' ?
 1077+ context.$iframe[0].contentWindow.document : context.$textarea;
 1078+ $( textbox ).unbind( 'keypress.srdialog' );
 1079+ $(this).closest( '.ui-dialog' ).data( 'dialogaction', false );
 1080+ }
 1081+ }
 1082+ }
 1083+ } } );
 1084+} );
\ No newline at end of file
Property changes on: trunk/extensions/WikiEditor/modules/wikiEditor.dialogs.js
___________________________________________________________________
Added: svn:eol-style
11085 + native
Index: trunk/extensions/WikiEditor/modules/wikiEditor.templateEditor.js
@@ -1,16 +1,12 @@
2 -/* JavaScript for WikiEditor Template Editor module */
 2+/*
 3+ * JavaScript for WikiEditor Template Editor
 4+ */
35
4 -$j(document).ready( function() {
5 - // Check preferences for templateEditor
6 - if ( !wgWikiEditorEnabledModules.templateEditor ) {
 6+$( document ).ready( function() {
 7+ // Disable in template namespace
 8+ if ( mediaWiki.config.get( 'wgNamespaceNumber' ) == 10 ) {
79 return true;
810 }
9 - //disable if in template namespace
10 - if ( wgNamespaceNumber == 10 ) {
11 - return true;
12 - }
13 - // Add the templateEditor module
14 - if ( $j.fn.wikiEditor ) {
15 - $j( 'textarea#wpTextbox1' ).wikiEditor( 'addModule', 'templateEditor' );
16 - }
 11+ // Add template editor module
 12+ $( 'textarea#wpTextbox1' ).wikiEditor( 'addModule', 'templateEditor' );
1713 });
Index: trunk/extensions/WikiEditor/modules/jquery.wikiEditor.publish.js
@@ -63,7 +63,7 @@
6464 </div>',
6565 init: function() {
6666 $(this).find( '[rel]' ).each( function() {
67 - $(this).text( mw.usability.getMsg( $(this).attr( 'rel' ) ) );
 67+ $(this).text( mediaWiki.msg.get( $(this).attr( 'rel' ) ) );
6868 });
6969
7070 /* REALLY DIRTY HACK! */
Index: trunk/extensions/WikiEditor/modules/wikiEditor.toc.js
@@ -1,18 +1,8 @@
2 -/* JavaScript for WikiEditor Toc module */
 2+/*
 3+ * JavaScript for WikiEditor Table of Contents
 4+ */
35
4 -$j(document).ready( function() {
5 - // Check preferences for toolbar
6 - if ( !wgWikiEditorPreferences || !( wgWikiEditorPreferences.toc && wgWikiEditorPreferences.toc.enable ) ) {
7 - return true;
8 - }
9 - // Add the toc module
10 - if ( $j.fn.wikiEditor ) {
11 - mw.usability.load( [ '$j.ui','$j.ui.draggable', '$j.ui.resizable' ], function() {
12 - // load the module and let it know were ready to go
13 - $j( '#wpTextbox1' )
14 - .wikiEditor( 'addModule', { 'toc' : { 'rtl' : ( $j( 'body' ).is( '.rtl' ) ) } } )
15 - //FIXME - should move the ready handler code to the create function so this isn't necissary
16 - .data( 'wikiEditor-context' ).fn.trigger( 'ready' );
17 - } );
18 - }
 6+$( document ).ready( function() {
 7+ // Add table of contents module
 8+ $( '#wpTextbox1' ).wikiEditor( 'addModule', 'toc' )
199 });

Comments

#Comment by Catrope (talk | contribs)   16:09, 1 October 2010

WikiEditor.hooks.php:

+ * Hooks for Vector extension

Messages are registered with the wikiEditor.* modules while they're used by the jquery.wikiEditor.* modules. That's asking for trouble.

I think it's probably desirable to load jQuery UI on demand, the way we do know on WMF. The reason for the latter is Netscape blowing up, but in general it'd probably be good to defer loading the fairly large JUI library to when user action requires it.

#Comment by Trevor Parscal (WMF) (talk | contribs)   18:16, 1 October 2010

r74084 fixes this, and some other comments with the same mistake.

As for the messages - agreed, we need to rethink some of this. This was just a direct port.

Status & tagging log