aboutsummaryrefslogtreecommitdiffstats
path: root/resources/src/mediawiki.Upload.BookletLayout
Commit message (Collapse)AuthorAgeFilesLines
* build: Fix and re-enable eslint rule unicorn/prefer-includesJames D. Forrester2025-03-211-1/+1
| | | | Change-Id: I34bb289e941751ae4722c708511326a2a5431bfc
* Remove unnecessary local context variablesEd Sanders2024-11-081-27/+20
| | | | Change-Id: I52fdc5e5bc64bbe7ea895b9d7106dd3c99b0a908
* eslint: Manually enforce prefer-const in all remaining codeEd Sanders2024-10-051-16/+8
| | | | Change-Id: Ic9f254b55d3936f351ba9c7cc3b553544fc63a58
* eslint: Autofix var to let/constEd Sanders2024-09-121-13/+13
| | | | | | | Temporarily disable no-var & prefer-const as resulting errors need to be fixed manually. Change-Id: I6cb62a2c70a4c1fc265a00b1f18af127ac9d5029
* JSDoc: fix some eslint warningsNovem Linguae2024-07-011-1/+1
| | | | | Bug: T356455 Change-Id: Id0296c6bd464a868a9dc9624a5d4b61f5372fb7b
* ESLint: Enforce prefer-arrow-callback and autofixEd Sanders2024-06-112-43/+41
| | | | Change-Id: Iddfa574e42e569ac5e2a2b098ad2f11ca80c5955
* resources/src: Fix several trivial files to use let/const not varsJames D. Forrester2024-05-031-4/+4
| | | | Change-Id: I59199e24efd85240d6a40b288bd06f455d4524d2
* docs: Standardize use of class descriptions in JSDocapaskulin2024-04-251-3/+2
| | | | | | | | | * Uses class descriptions for classes and descriptions for constructors. * Switch out deprecated "done" function for Promise compatible "then" Bug: T357164 Change-Id: I6071851a2519638d67954bba5d74260d99237863
* styles: Use newly-introduced static 'neutral' background tokensVolker E.2024-04-012-2/+4
| | | | | | | | | | | | | Applying new tokens: - @background-color-neutral: #eaecf0; - @background-color-neutral-subtle: #f8f9fa; … instead of static values. Also import skin variables and change files to Less where necessary. Change-Id: I64c9f570fdd36abe5c8d62a98425911ef7b9e6d3
* docs: Fix JSDoc syntaxapaskulin2024-03-261-10/+9
| | | | | | | | Various fixes for typos, punctuation, examples, and links Bug: T360241 Bug: T360475 Change-Id: Ib1061b1cd008b947071dde9900d87fd9e0c9d32c
* Add missing summaries to upload classesJon Robson2024-02-281-0/+2
| | | | | | Follow up to I110c51616e9994338d2de1a53523f4dc291765cd Change-Id: I77b8d0950b139a01d5c1a72dc23ec034aa1ad148
* docs: Convert mw.Upload.Dialog and friends to jsdocRoan Kattouw2024-02-282-67/+71
| | | | | | | | | This converts mw.Upload.Dialog, mw.Upload.BookletLayout, mw.ForeignStructuredUpload.Bookletlayout, and mw.widgets.StashedFileWidget. Bug: T352308 Change-Id: I110c51616e9994338d2de1a53523f4dc291765cd
* Replace deprecated OO.ui.SelectFileWidget with SelectFileInputWidgetRoan Kattouw2024-02-221-3/+3
| | | | Change-Id: I2aec6bf8b2c5ac9178449016014ae2c80f339825
* Fix remaining uses of 'parent'->'super'Ed Sanders2023-11-022-2/+2
| | | | | Bug: T120821 Change-Id: Ia26c1242c69cba169d3ef600fa435b7280e1fc8a
* Prompt temporary users without upload permissions to log inThalia2023-05-241-1/+1
| | | | | | | | | mw.Upload.BookletLayout and ApiUpload prompt IP users to log in if they do not have the permission to upload. Show the same prompt to temporary users if they do not have the permission. Bug: T331578 Change-Id: Ic35d8277772d69155fe95b24cc028f91b8a366bb
* mediawiki.widgets, mediawiki.ui: Use skin variablesVolker E2023-04-251-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | Now that we've got Codex design tokens available via 'mediawiki.skin.variables.less', let's standardize on them where applicable. Starting here with all color related, `border-*`, `border-radius`, `cursor` and `transition` properties. Replacing or removing deprecated mediawiki.ui variables where possible. Some replacements are back to static values for now as the new tokens would result in a different value and the colors might be wrongly applied. Returning in this few exceptions to the static values signals a design issue better than before. Also - moving one mediawiki.ui variable `size-input-binary` to checkbox and radio - syncing checkboxes, radios, inputs and buttons with Codex styles - putting variables import always first consistently - removing unnecessary `:hover` `border-color` on button Bug: T319381 Bug: T332541 Change-Id: Ib38ca0b01bb43b42c5227296b8ff9b2a00ef8616
* Replace deprecated Less `.box-shadow()` mixin with standard CSSVolker E2022-04-191-4/+2
| | | | | | | Also remove 'mediawiki.mixins' includes where unused. Bug: T306488 Change-Id: Ie36ed1feb8382415a8017522404bb8f59437606b
* Merge mediawiki.widgets.StashedFileWidget module into only userDannyS7122021-09-262-0/+321
| | | | | | | | | The mediawiki.widgets.StashedFileWidget module was only used as a dependency of mediawiki.Upload.BookletLayout and thus doesn't need to exist as its own module. Bug: T291443 Change-Id: I8cd85516f80cd32f017b7e34c8c26a24d2a0fee5
* UploadBooklet: Don't show form until initialization completesEd Sanders2020-10-021-2/+12
| | | | | | | | | Previously users had to take the promise from #initialize and wait for it to resolve. This makes usage simpler by providing a simple loading page. Bug: T264441 Change-Id: Ib2e1bd5df9ad2d745e1d55fe267bec966bd2aa87
* mw.Upload.BookletLayout: Fix pre-setting a fileBartosz Dziewoński2020-02-111-1/+1
| | | | | | | | | There was an unintentional breaking change to this API in OOUI in f70fa9df0 (v0.31.3 / 2019-04-03). It only supports an array of files now. This fixes uploading by dragging-and-dropping or copy-pasting an image into VisualEditor editing surface. Change-Id: I6dcd109c085d2542b0256e37bfbf130c92261e2e
* mw.Api: Add helper method #getErrorMessageBartosz Dziewoński2019-12-141-22/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given an API response indicating an error, it returns a jQuery object containing a human-readable error message that you can display somewhere on the page. Handling the "real" API responses from the server is easy, since they already contain the error message and we basically just extract it. The important part of this patch is handling the issues that happen on the client, or server-side issues where the error-handling API code never runs, so we have to figure out what happened and make up our own error message. I have not yet seen any mw.Api consumer that handles all the error cases correctly (I thought VisualEditor did, but in the process of writing this patch I learned that we missed a few cases there as well), and most don't even try. This might not be perfect but it should be the closest thing so far. The new code is inspired by error handling in VisualEditor (see I69d9432162f195dcfe9470485b549a1b007617ff) and in mw.Upload.BookletLayout. New messages: * 'api-clientside-error-noconnect' - Adapted from 'apierror-offline' and 'visualeditor-error-noconnect' * 'api-clientside-error-http' - Adapted from 'visualeditor-loadwarning' and 'visualeditor-error-http' * 'api-clientside-error-timeout' - Copied from 'apierror-timeout' * 'api-clientside-error-aborted' - Entirely new * 'api-clientside-error-invalidresponse' - Copied from 'visualeditor-error-invalidresponse' Update some existing code to use it, as an example: * mediawiki.page.watch.ajax - Removed messages: 'watcherrortext' * mediawiki.special.unwatchedPages - Removed messages: 'watcherrortext' * mediawiki.action.edit.preview - (errors were hardcoded in English) * mediawiki.feedback - Removed messages: 'feedback-error2', 'feedback-error3' (error1 and error4 remain, they handle errors not caused by the API) * mediawiki.Upload.BookletLayout - Removed messages: 'apierror-timeout', 'apierror-offline', 'apierror-unknownerror' * mediawiki.page.ready - Removed messages: 'logout-failed' * 'mediawiki.page.patrol.ajax - (the messages are already used by the patrol API) Example usages in extensions: * VisualEditor: I69d9432162f195dcfe9470485b549a1b007617ff * DiscussionTools: Ice92fafb1f546510dab28e3f8aa7d2280668965a Bug: T240519 Change-Id: Ie18666b41f4aff1ab4bcf93f9df6e3000ac7b500
* Use plugin to ensure all message keys are documentedEd Sanders2019-10-211-0/+1
| | | | | Bug: T235502 Change-Id: If77ddf2caf667504bd0f7e0150649745ae31c4e2
* resources: Strip '$' and 'mw' from file closuresTimo Tijhof2018-09-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follows-up Id6d13bbea6: - '$': mw.loader.implement does this already. - 'mw': Use the canonical name directly. This replaces the following patterns: File closures (common): - `( function ( $, mw ) {` => `( function () {` - `( function ( $ ) {` => `( function () {` - `( function ( mw ) {` => `( function () {` - `( function ( mw, $ ) {` => `( function () {` File closures (rare): - `( function ( mw, $, OO ) {` => `( function () {` - `( function ( mw, OO, $ ) {` => `( function () {` - `( function ( mw, document ) {` => `( function () {` Combined dom-ready and file closure (rare): - `jQuery( function ( $ ) {` => `$( function () { - `jQuery( function () {` => `$( function () { Remaining references in files without a closure, as found by the new ESLint setting (rare): - `jQuery` => `$` - `mediaWiki` => `mw` Change-Id: I7cf2426cde597259e8c6f3f6f615a1a81a0ca82b
* mw.Upload.BookletLayout: Update padding/margin to match OOUI to avoid scrollbarsBartosz Dziewoński2018-07-031-3/+5
| | | | Change-Id: Ie3b246fcb064a04bc90fec06f6285306a013a819
* resources: Move the remaining src/mediawiki/ filesTimo Tijhof2018-05-092-0/+745
Single-file modules to src/, the remaining as sub directories. A few highlights: * mediawiki.Upload.BookletLayout. (stylesheet: no image references) * mediawiki.feedback - Also move the image to its own images/ subdir. * mediawiki.searchSuggest. (stylesheet: no image references) * mediawiki.toc. (stylesheet: no image references) Also updated any other references to 'src/mediawiki/' that I could find in core: * Fixed references in docs/uidesign/*.html * Remove redundant exclude from jsduck.json. After this, there are 4 files remaining in src/mediawiki, which are the 4 files used by the actual 'mediawiki' base module. Bug: T193826 Change-Id: I8058652892a78b3f5976397bd850741dd5c92427