| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
ve.ui.MWVeOnlyDialogTool = function VeUiMWVeOnlyDialogTool() { |
| 17 |
ve.ui.MWVeOnlyDialogTool.super.apply( this, arguments ); |
| 18 |
}; |
| 19 |
OO.inheritClass( ve.ui.MWVeOnlyDialogTool, ve.ui.WindowTool ); |
| 20 |
ve.ui.MWVeOnlyDialogTool.prototype.onUpdateState = function () { |
| 21 |
|
| 22 |
ve.ui.MWVeOnlyDialogTool.super.prototype.onUpdateState.apply( this, arguments ); |
| 23 |
|
| 24 |
|
| 25 |
this.setDisabled( !this.toolbar.getSurface() || this.toolbar.getSurface().getMode() === 'source' ); |
| 26 |
}; |
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
ve.ui.MWMetaDialogTool = function VeUiMWMetaDialogTool() { |
| 38 |
ve.ui.MWMetaDialogTool.super.apply( this, arguments ); |
| 39 |
}; |
| 40 |
OO.inheritClass( ve.ui.MWMetaDialogTool, ve.ui.WindowTool ); |
| 41 |
ve.ui.MWMetaDialogTool.static.name = 'meta'; |
| 42 |
ve.ui.MWMetaDialogTool.static.group = 'utility'; |
| 43 |
ve.ui.MWMetaDialogTool.static.icon = 'window'; |
| 44 |
ve.ui.MWMetaDialogTool.static.title = |
| 45 |
OO.ui.deferMsg( 'visualeditor-meta-tool' ); |
| 46 |
ve.ui.MWMetaDialogTool.static.commandName = 'meta'; |
| 47 |
ve.ui.MWMetaDialogTool.static.autoAddToCatchall = false; |
| 48 |
ve.ui.toolFactory.register( ve.ui.MWMetaDialogTool ); |
| 49 |
|
| 50 |
ve.ui.commandRegistry.register( |
| 51 |
new ve.ui.Command( |
| 52 |
'meta', 'window', 'open', |
| 53 |
{ args: [ 'meta' ] } |
| 54 |
) |
| 55 |
); |
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
ve.ui.MWCategoriesDialogTool = function VeUiMWCategoriesDialogTool() { |
| 67 |
ve.ui.MWCategoriesDialogTool.super.apply( this, arguments ); |
| 68 |
}; |
| 69 |
OO.inheritClass( ve.ui.MWCategoriesDialogTool, ve.ui.MWVeOnlyDialogTool ); |
| 70 |
ve.ui.MWCategoriesDialogTool.static.name = 'categories'; |
| 71 |
ve.ui.MWCategoriesDialogTool.static.group = 'utility'; |
| 72 |
ve.ui.MWCategoriesDialogTool.static.icon = 'tag'; |
| 73 |
ve.ui.MWCategoriesDialogTool.static.title = |
| 74 |
OO.ui.deferMsg( 'visualeditor-categories-tool' ); |
| 75 |
ve.ui.MWCategoriesDialogTool.static.commandName = 'meta/categories'; |
| 76 |
ve.ui.MWCategoriesDialogTool.static.autoAddToCatchall = false; |
| 77 |
ve.ui.toolFactory.register( ve.ui.MWCategoriesDialogTool ); |
| 78 |
|
| 79 |
ve.ui.commandRegistry.register( |
| 80 |
new ve.ui.Command( |
| 81 |
'meta/categories', 'window', 'open', |
| 82 |
{ args: [ 'meta', { page: 'categories' } ] } |
| 83 |
) |
| 84 |
); |
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
ve.ui.MWPageSettingsDialogTool = function VeUiMWPageSettingsDialogTool() { |
| 96 |
ve.ui.MWPageSettingsDialogTool.super.apply( this, arguments ); |
| 97 |
}; |
| 98 |
OO.inheritClass( ve.ui.MWPageSettingsDialogTool, ve.ui.MWVeOnlyDialogTool ); |
| 99 |
ve.ui.MWPageSettingsDialogTool.static.name = 'settings'; |
| 100 |
ve.ui.MWPageSettingsDialogTool.static.group = 'utility'; |
| 101 |
ve.ui.MWPageSettingsDialogTool.static.icon = 'pageSettings'; |
| 102 |
ve.ui.MWPageSettingsDialogTool.static.title = |
| 103 |
OO.ui.deferMsg( 'visualeditor-settings-tool' ); |
| 104 |
ve.ui.MWPageSettingsDialogTool.static.commandName = 'meta/settings'; |
| 105 |
ve.ui.MWPageSettingsDialogTool.static.autoAddToCatchall = false; |
| 106 |
ve.ui.toolFactory.register( ve.ui.MWPageSettingsDialogTool ); |
| 107 |
|
| 108 |
ve.ui.commandRegistry.register( |
| 109 |
new ve.ui.Command( |
| 110 |
'meta/settings', 'window', 'open', |
| 111 |
{ args: [ 'meta', { page: 'settings' } ] } |
| 112 |
) |
| 113 |
); |
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
ve.ui.MWAdvancedPageSettingsDialogTool = function VeUiMWAdvancedPageSettingsDialogTool() { |
| 125 |
ve.ui.MWAdvancedPageSettingsDialogTool.super.apply( this, arguments ); |
| 126 |
}; |
| 127 |
OO.inheritClass( ve.ui.MWAdvancedPageSettingsDialogTool, ve.ui.MWVeOnlyDialogTool ); |
| 128 |
ve.ui.MWAdvancedPageSettingsDialogTool.static.name = 'advancedSettings'; |
| 129 |
ve.ui.MWAdvancedPageSettingsDialogTool.static.group = 'utility'; |
| 130 |
ve.ui.MWAdvancedPageSettingsDialogTool.static.icon = 'settings'; |
| 131 |
ve.ui.MWAdvancedPageSettingsDialogTool.static.title = |
| 132 |
OO.ui.deferMsg( 'visualeditor-advancedsettings-tool' ); |
| 133 |
ve.ui.MWAdvancedPageSettingsDialogTool.static.commandName = 'meta/advanced'; |
| 134 |
ve.ui.MWAdvancedPageSettingsDialogTool.static.autoAddToCatchall = false; |
| 135 |
ve.ui.toolFactory.register( ve.ui.MWAdvancedPageSettingsDialogTool ); |
| 136 |
|
| 137 |
ve.ui.commandRegistry.register( |
| 138 |
new ve.ui.Command( |
| 139 |
'meta/advanced', 'window', 'open', |
| 140 |
{ args: [ 'meta', { page: 'advancedSettings' } ] } |
| 141 |
) |
| 142 |
); |
| 143 |
|
| 144 |
|
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
|
| 149 |
|
| 150 |
|
| 151 |
|
| 152 |
|
| 153 |
ve.ui.MWLanguagesDialogTool = function VeUiMWLanguagesDialogTool() { |
| 154 |
ve.ui.MWLanguagesDialogTool.super.apply( this, arguments ); |
| 155 |
}; |
| 156 |
OO.inheritClass( ve.ui.MWLanguagesDialogTool, ve.ui.MWVeOnlyDialogTool ); |
| 157 |
ve.ui.MWLanguagesDialogTool.static.name = 'languages'; |
| 158 |
ve.ui.MWLanguagesDialogTool.static.group = 'utility'; |
| 159 |
ve.ui.MWLanguagesDialogTool.static.icon = 'textLanguage'; |
| 160 |
ve.ui.MWLanguagesDialogTool.static.title = |
| 161 |
OO.ui.deferMsg( 'visualeditor-languages-tool' ); |
| 162 |
ve.ui.MWLanguagesDialogTool.static.commandName = 'meta/languages'; |
| 163 |
ve.ui.MWLanguagesDialogTool.static.autoAddToCatchall = false; |
| 164 |
ve.ui.toolFactory.register( ve.ui.MWLanguagesDialogTool ); |
| 165 |
|
| 166 |
ve.ui.commandRegistry.register( |
| 167 |
new ve.ui.Command( |
| 168 |
'meta/languages', 'window', 'open', |
| 169 |
{ args: [ 'meta', { page: 'languages' } ] } |
| 170 |
) |
| 171 |
); |
| 172 |
|
| 173 |
|
| 174 |
|
| 175 |
|
| 176 |
|
| 177 |
|
| 178 |
|
| 179 |
|
| 180 |
|
| 181 |
|
| 182 |
ve.ui.MWTemplatesUsedDialogTool = function VeUiMWTemplatesUsedDialogTool() { |
| 183 |
ve.ui.MWTemplatesUsedDialogTool.super.apply( this, arguments ); |
| 184 |
}; |
| 185 |
OO.inheritClass( ve.ui.MWTemplatesUsedDialogTool, ve.ui.WindowTool ); |
| 186 |
ve.ui.MWTemplatesUsedDialogTool.static.name = 'templatesUsed'; |
| 187 |
ve.ui.MWTemplatesUsedDialogTool.static.group = 'utility'; |
| 188 |
ve.ui.MWTemplatesUsedDialogTool.static.icon = 'puzzle'; |
| 189 |
ve.ui.MWTemplatesUsedDialogTool.static.title = |
| 190 |
OO.ui.deferMsg( 'visualeditor-templatesused-tool' ); |
| 191 |
ve.ui.MWTemplatesUsedDialogTool.static.commandName = 'meta/templatesUsed'; |
| 192 |
ve.ui.MWTemplatesUsedDialogTool.static.autoAddToCatchall = false; |
| 193 |
ve.ui.toolFactory.register( ve.ui.MWTemplatesUsedDialogTool ); |
| 194 |
|
| 195 |
ve.ui.commandRegistry.register( |
| 196 |
new ve.ui.Command( |
| 197 |
'meta/templatesUsed', 'window', 'open', |
| 198 |
{ args: [ 'meta', { page: 'templatesUsed' } ] } |
| 199 |
) |
| 200 |
); |