Commit graph

520 commits

Author SHA1 Message Date
Roan Kattouw 0bcab80d2a Stop explicitly setting autoFocus to true now that it defaults to true.
Change-Id: I8544cf83d8665848b8da8a7e2bbef9f8518e23ef
2014-05-05 14:18:12 -07:00
Trevor Parscal 62324167ff Update VE core submodule to master (a1e9df1)
Also adjust calls to InputWidget methods changed in
I324dfc2 in OOUI.

New changes:
9da32d7 Update OOjs UI to v0.1.0-pre (e6edd86d37)
b6aa671 Localisation updates from https://translatewiki.net.
1cba6e0 Update OOjs UI to v0.1.0-pre (9a6c625f5f)
94629f9 Localisation updates from https://translatewiki.net.

Change-Id: Id58d199c7ce3332a104ab2a5c395561ab94ae060
2014-05-02 15:50:32 -07:00
Ed Sanders 5a65cb67fb Fix typo: this.transclusionNode -> this.selectedNode
this.transclusionNode doesn't exist. Also remove instanceof checks
as they are already done in #get(Selected|Reference)Node.

Bug: 64717
Change-Id: I7ff0133d1ad45edda8de2cbad459706dbaceb5f2
2014-05-02 16:48:10 +01:00
Ed Sanders 35c0694279 Use new mediawiki.language.names module
Depends on I63402b1e7 in core.

Change-Id: I803a966e380770609a32b6b64e0578e9be750f87
2014-05-02 14:04:14 +01:00
jenkins-bot ed324ea559 Merge "Style the FormatTool to be more like Vector's new look" 2014-05-01 19:33:42 +00:00
Ed Sanders 65d92173ea Use correct fragment in windows
In two cases we were using fragment.getSurface().getFragment() which
creates a new fragment from the current selection instead of using
the range of the original fragment.

Change-Id: Ib41efe2ceb670a125c0c306d143e56f9b9c349e7
2014-05-01 11:58:25 +01:00
jenkins-bot 654530f924 Merge "Make reference list dialog small again" 2014-05-01 01:45:58 +00:00
Roan Kattouw dfbb7815e9 Make reference list dialog small again
Also remove now-useless size setting in save dialog

Bug: 64670
Change-Id: I1abc760a27ce2b107a92413ff3d5da7d95915dc2
2014-04-30 18:05:41 -07:00
Trevor Parscal b00999c7a1 Style the FormatTool to be more like Vector's new look
But only for Vector; the VE-core default is more appropriate for Monobook.

Bug: 63540
Change-Id: I32e8da9dd071d0a9ba7cae58960a504010e1c4a2
2014-04-30 17:40:44 -07:00
jenkins-bot 00b4da635f Merge "Style external links and their suggestions with the right color" 2014-05-01 00:26:42 +00:00
jenkins-bot c574a40a72 Merge "Auto-choose selected item when adding a template" 2014-05-01 00:13:55 +00:00
Trevor Parscal 4bd7f743aa Auto-choose selected item when adding a template
Adding a template by clicking the button without dismissing the lookup
menu first was leaving the menu open and inserting a template with the
query instead of the match.

Changes:
* If the lookup menu is visible, choose the selected item before using
  the value of the lookup input

Depends on I3aa4e87 in OOUI

Bug: 64334
Change-Id: I22e04bd2d3628f03060d3734f9774b811c82f73b
2014-05-01 00:11:23 +00:00
Trevor Parscal 74b4573caa Style external links and their suggestions with the right color
Bug: 38726
Change-Id: I0f017bda9e5d4f8358db6656751fe1f13a7b845c
2014-04-30 16:49:46 -07:00
jenkins-bot e52883df5a Merge "Restyle parameter pages" 2014-04-30 23:32:44 +00:00
Trevor Parscal 853e4872b4 Restyle parameter pages
* Move description to a popup behind a little info icon button
* Make required indicator generic status indicator (required/deprecated)
  and move to left of the field
* Move param name and actions to above the field
* Show deprecated status and description

Bonus:

* Use auto-focus on CitationDialog (whoops!)
* Make pages that aren't meant to scroll not scroll (whoops again!?)

Depends on I59211b2 in OOUI

Bug: 53612
Change-Id: I3b968ad14aa6c43b6484e2565a9367d2ebc72fc5
2014-04-30 16:27:19 -07:00
jenkins-bot be8b5b0783 Merge "Bring the transclusion title back to life" 2014-04-30 22:28:00 +00:00
Trevor Parscal c04c0f750e Bring the transclusion title back to life
At some point getTitle was changed to updateTitle but the caller was still
assuming it would return a string. Also, we removed the transclusion
dialog title message, but were still trying to use it.

Changes:
* Change the logic so we use the parent method for updateTItle correctly
* Bring the transclusion title message back

Bug: 64671
Change-Id: I3beb8b1d4304ba73c428868b9ac2d0f6a1cc9944
2014-04-30 21:41:19 +00:00
Trevor Parscal 03306d8528 Make inserting existing references work again
When MWReferenceDialog was modified to inherit from ActionDialog the
search select method didn't get changed to call applyChanges. But really,
you can't just call applyChanges because you need all the promise setup
stuff that onApplyButtonClick does. The API for ActionDialog needs to be
improved, but this works just fine in the mean time.

Bug: 64677
Change-Id: Ib38a624811dc26ead7b9de64cb41aff642820452
2014-04-30 21:11:17 +00:00
jenkins-bot c3a043f206 Merge "Call clearAllMessages in setup instead of swapPanel on the save dialog" 2014-04-30 18:19:14 +00:00
Ed Sanders 265a739c07 Use window 'ready' event to focus surfaces
Depends on I57864586b in OOUI.

Change-Id: Ic9a6e8d466c4d8b1273f54e621bb5a6cab50be53
2014-04-30 11:15:41 -07:00
Trevor Parscal e4e6f8883e Use ActionDialog and NodeDialog
Based on I70e88f6 in VE core

* Cleanup dialogs by using node dialog and action dialog
* Move "Loading..." text from label of dialog apply button to dialog title
  (repurpose identical message)

Save dialog will be converted in a follow up.

Change-Id: I6a290f4bdc29e577c7c89b4babdab5853c4c10e5
2014-04-29 17:27:14 -07:00
Trevor Parscal c2a2e32ecb Allow citation tools to be shown "instead of" reference tools
As opposed to "with".

Change-Id: I50796945b31340e578ed3986053ace3718e99adb
2014-04-29 14:04:29 -07:00
Ed Sanders f0f314cbbf Remove useless overrides in HieroInpsector
Change-Id: Id13670bcfb4a3da112298a756415d5fe70af4b3b
2014-04-28 16:33:42 -07:00
James D. Forrester 3569efba3b Use TemplateData's suggested status for parameters
Change-Id: I8c8522d1fcc7e7b26984d72a8f8aaaedbddb9cb4
2014-04-28 12:10:31 -07:00
Ed Sanders 9beb92a102 Delete extensions nodes which have been made empty
If they have allowedEmpty=false.

Also remove unnecessary instanceof check.

Change-Id: I388202c9da5673534486b1d9d345296feeec53c3
2014-04-25 16:13:31 -07:00
Krenair 7645b9805b Call clearAllMessages in setup instead of swapPanel on the save dialog
Was clearing things like captchas when swapping panels. It still makes
sense to clear these when opening up the dialog though.

Bug: 62766
Change-Id: I37ceeebc672e2866b805631b189108d8363bdc9f
2014-04-25 22:44:39 +01:00
Ed Sanders 2bc50e2e83 Image frame icons
Change-Id: Icc2d4f44db2860ce11b8022035ba670d7d5bf064
2014-04-24 10:50:00 -07:00
Ed Sanders be36dfca25 Use core language search dialog
Depends on I21a9d7e in core.

Change-Id: I12cacf775b490d7c676011a5a154deeefe5527c5
2014-04-23 18:43:03 -07:00
jenkins-bot 3050b22ea2 Merge "Fix docs in ve.ui.MWParameterSearchWidget.js" 2014-04-24 01:17:15 +00:00
Ed Sanders 69ef943e46 Fix docs in ve.ui.MWParameterSearchWidget.js
Also re-use hasQuery variable.

Change-Id: I6166e45c6397723c6949f22f02af8b160e45ad4e
2014-04-23 18:14:42 -07:00
Trevor Parscal 30d9d99ae4 Make citation dialog display like transclusion dialog in single mode
This is a hack, should be cleaned up soon.

Bug: 64199
Change-Id: I01effbfd0fc6da41596c73e375d237443ebb9d70
2014-04-23 17:36:49 -07:00
jenkins-bot fe04b902fb Merge "Add checkboxes to set some metadata on page metadata panel" 2014-04-21 23:34:27 +00:00
Krenair 021152586b Add checkboxes to set some metadata on page metadata panel
Also fixes some errors in I752705f6
And while we're there, clean up some mostly duplicate functions

Bug: 57169
Bug: 57170
Bug: 57171
Bug: 57172
Change-Id: I1e3dca3868a267e91bccb0ae277012c26ca82174
2014-04-21 16:29:31 -07:00
jenkins-bot 5429c78eac Merge "Hide ULS button" 2014-04-21 22:54:17 +00:00
Roan Kattouw ba455643fc [BREAKING CHANGE] Update VE core to master (cb2e61b)
Update dialogs and inspectors for breaking change in VE core

New changes:
a553012 [BREAKING CHANGE] Merge dialog and inspector actions into window actions
f9a0419 Localisation updates from https://translatewiki.net.
cbe81a0 Fix path to spinner in ve.ui.SpecialCharacterInspector.css

Change-Id: Icf90ace6442364283b66b234e3c78fc65212f070
2014-04-21 15:32:59 -07:00
Ed Sanders b74aa4160b Hide ULS button
Currently it steals focus it doesn't use an iFrame, so we can't use
it in this way.

Change-Id: I4df95f3b60bc63b0ce296a06da648e96d94bf20f
2014-04-21 14:24:49 -07:00
Roan Kattouw 1313e70618 Use wgPageName instead of wgTitle when fetching language links
Bug: 49226
Change-Id: I4085457ba8601ee8a1f09bd1008a2bbf15209a25
2014-04-21 19:04:05 +00:00
jenkins-bot fd0b1d34b9 Merge "Use new OOUI pending feature rather than loading bar thing on save dialog" 2014-04-18 21:20:51 +00:00
Amir E. Aharoni e21b4db424 Add GENDER to visualeditor-dialog-transclusion-no-template-description
Change-Id: I0ba67a8a705cd652a75bbf72892056813705e7d6
2014-04-19 00:04:39 +03:00
Krenair b6f1793bf8 Use new OOUI pending feature rather than loading bar thing on save dialog
See I5c45cc6 for the oojs-ui change and I2fa71a1d for a similar commit

Change-Id: I77e3274a196bc13ae19a9520197f4a8b624fd528
2014-04-18 21:57:14 +01:00
Roan Kattouw 654d641c5f Update VE core submodule to master (33ca43b)
Reorganize stylesheets in VE-MW to match JS directory structures,
and update VisualEditor.php for similar reorganization in VE core.

New changes:
c6ed962 Reorganize stylesheets

Change-Id: I4f1070643744fb2ee6726cb03e012e31a9a05c64
2014-04-18 13:28:31 -07:00
jenkins-bot f002889376 Merge "Make transclusion dialog "pending" while loading" 2014-04-18 20:12:05 +00:00
jenkins-bot 3ca0b1f677 Merge "Disable transclusion dialog mode button while loading" 2014-04-18 19:13:10 +00:00
Ed Sanders 28bd951c90 Make Hiero node live update
Just change inheritence.

Change-Id: Id63f545d16a478e336ddeb6cc8f1a31c88ee1aaa
2014-04-17 17:59:00 -07:00
James D. Forrester e09e6c9f28 Create MWLiveExtensionInspector base class
Most of the code stolen from MWMathInspector and genericised.

Also fix issues with fragment not wrapping the new node correctly.

Bug: 58286
Bug: 58045
Change-Id: I708c4cb012becf8c493d5b65a051c0b13f7a11ac
2014-04-17 17:58:56 -07:00
Ed Sanders 29476afe83 Use forced directionality for HieroInspector
Change-Id: I2f4b15fb7bc1b3d028106e09fb5039ee5cb2987a
2014-04-17 17:03:51 -07:00
Trevor Parscal 062b2ed681 Make transclusion dialog "pending" while loading
Also, only allow animation of anything after things are ready

Depends on I5c45cc6 in oojs-ui

Change-Id: I2fa71a1d9a43db960aac4c1fad87eae96c898fad
2014-04-17 15:06:11 -07:00
Trevor Parscal 89f040626e Disable transclusion dialog mode button while loading
Change-Id: Iec8ea9d490b43504d25ecf05bd4a43701d503c35
2014-04-17 15:03:43 -07:00
Ed Sanders 8070f48d27 Extension inspector directionality
Use a dir string instead of isLtr boolean like we do everywhere
else. Also use this.constructor.static, not this.static inside
methods.

Fixes Ie0525628.

Bug: 64072
Change-Id: I5321b71a446802d89ca86d55a0bff855b69825eb
2014-04-17 22:00:36 +00:00
jenkins-bot 564e77bc43 Merge "Allow MWExtensionInspector to be set to forced LTR status" 2014-04-17 03:21:17 +00:00
jenkins-bot 07a7708da1 Merge "Follow redirects in the category widgets" 2014-04-17 02:44:41 +00:00
Trevor Parscal 926700fbca Re-split the transclusion dialog
We used to have two dialogs; a complex one, and a subclass that dumbed it
down - this was rubbish.

Then we merged them together - this was a'ight.

Now we have two dialogs again; a simple one, and a subclass that fancies
it up a bit - this is wicked keen broham.

Change-Id: I4b2ba31bed5c4f80940623702d635cacd19e0a66
2014-04-17 01:39:18 +00:00
James D. Forrester 0e4676e6a9 Allow MWExtensionInspector to be set to forced LTR status
This is used in e.g. the formula editor and it's potentially useful.

Change-Id: Ie05256285e517c2d0d464822befbf81f2d9209e3
2014-04-16 18:34:26 -07:00
Roan Kattouw 4fc08d24c5 Make the Add template button not wrap to the next line
By default, MWTitleInputWidgets are now 30em wide, but this doesn't
work in the transclusion dialog where we want to put the "Add template"
button after an MWTitleInputWidget and have it not wrap to the next line.
So make the MWTitleInputWidget on the add template page 20em wide instead
(this is what they all were before the default was changed to 30em).

Change-Id: I2f33a87427657f4e27939c401436c4ce6441208c
2014-04-16 16:24:45 -07:00
Roan Kattouw 9d1b7432fd Also focus surface in media edit dialog
16ec8ffdcf did this for the reference dialog, but the media edit
dialog needs it too. Additionally, we need to focus it when the
user switches to a different page then comes back.

Bug: 63909
Change-Id: If1b9587f4d10dbe6374e987b35c781954bcc566d
2014-04-16 15:12:39 -07:00
jenkins-bot 4d6a59b16b Merge "Focus the surface in the reference dialog after it opens" 2014-04-16 19:00:51 +00:00
Roan Kattouw d335e59330 Fix another surfaceModel.getFragment() in MWCitationDialog
Change-Id: Ic12652bf3d53396f84d558595ce1e4a2d0a22796
2014-04-16 11:42:15 -07:00
Roan Kattouw 16ec8ffdcf Make inserting reference lists work again
surfaceModel.getFragment() is a null fragment, use this.getFragment()

Bug: 64012
Change-Id: I995929ff0dda60220e17e579994b51ffb406f149
2014-04-16 11:40:26 -07:00
jenkins-bot e708595f14 Merge "Make fieldsets render properly" 2014-04-16 18:27:16 +00:00
Moriel Schottlender fa72f5fdc2 Border checkbox disabling/enabling fix
Due to a lack of clarity in the wikitext documentation the border
checkbox wasn't set up right. This is the proper behavior: border is
allowed for all unframed images (frameless and basic) while the
framed images (frame and thumb) have it anyways. Wikitext
documentation was also clarified for prosperity.

Change-Id: I4dd4775da473d669781553796be99646240c13fe
2014-04-16 13:14:58 -04:00
Krenair 9c2e1d8048 Follow redirects in the category widgets
Display the redirects nicely in the UI, etc.

Bug: 52414
Change-Id: Ib62144cb90899d0c525d6f08f6b5f1159b7d2a86
2014-04-16 15:30:14 +00:00
Moriel Schottlender 8d99aa88c8 Fix border checkbox
Make sure border is enabled for unframed types and disabled for
framed images.

Change-Id: I716e9bc4140fbc09aac52930d1dd8213f31617a3
2014-04-16 00:03:35 -04:00
jenkins-bot 24071290a8 Merge "Fix name of advanced settings page in open command" 2014-04-16 02:57:30 +00:00
Krenair 96cdfe28ce Fix name of advanced settings page in open command
Bug: 63984
Change-Id: I924520be81a183a1de3f8f81c60d9ed26fb3a80e
2014-04-16 02:08:30 +01:00
Roan Kattouw b764ecc7f4 Focus the surface in the reference dialog after it opens
Otherwise the surface ends up in a weird half-focused state which
causes it to behave strangely.

Bug: 63909
Change-Id: I3ebc30fde0202116b383a5b497aca65b66732922
2014-04-15 22:25:41 +00:00
James D. Forrester 37030882d1 Fix fencepost error with MWMoreParametersSearchWidget overflow
The logic was checking that there were at least three items to show, then triggering
the MWMoreParametersResultWidget widget with the number of items left in the overflow
if the limit was two. Whoops. :-)

Change-Id: Icec16a2d26bef8bf8d74ed619341afd494ca0479
2014-04-15 12:30:40 -07:00
Trevor Parscal 9cd05d05a0 Make fieldsets render properly
Depends on I797ec22 in OOJS-UI

Change-Id: I3841bc50346e67dfe92814ebe337fd92365ae1d4
2014-04-15 11:47:15 -07:00
Trevor Parscal 9e6451d40c Fix inserting references list while selecting another kind of node
There are two ways dialogs determine if they are inserting or updating.

1. They evaluate whether the dialog is inserting or not and set a boolean
   flag, used later to steer the saving code

2. They evaluate whether the dialog is inserting or not and, if not,
   store the node to be updated in a property, used later to steer the
   saving code

In the reference list dialog, setup used strategy 1, and teardown used
strategy 2. We've now normalized to use strategy 2 in both methods, which
fixes this bug.

Bug: 61885
Change-Id: I1b077b2aef4121328bce2b373874dd7373e405a1
2014-04-14 19:44:28 +00:00
Roan Kattouw 2d671a38a2 Also set requiresRange for CitationDialogTool
The citation tools weren't being greyed out when the selection was null

Change-Id: I7d4d486a010f4c1301f3081661e7f343c24452df
2014-04-11 12:19:04 -07:00
Roan Kattouw b54b517dbc Followup b2296bdd2: the property is called requiresRange, not requiresFocus
Change-Id: I09937603e1957f1acbdbe4cc56e47e00f31c892b
2014-04-11 11:59:55 -07:00
jenkins-bot d8453acff5 Merge "Remove remaining uses of surfaceModel#getSelection in dialogs" 2014-04-11 18:43:14 +00:00
Ed Sanders 340a939c97 Remove remaining uses of surfaceModel#getSelection in dialogs
These were being used indirectly in the MW*Model's. Use surface
fragments instead.

Fixes I0fae3e5ff2bd.

Change-Id: I1d6aa5e00a9315cf7088f87f9e9d828833feec64
2014-04-11 11:14:43 -07:00
Ed Sanders b2296bdd2a Disable MW tools when surface loses focus
Bug: 62410
Change-Id: I00fa2de637b2c1f2a57c8c1f09e90f71285feab7
2014-04-10 12:01:47 -07:00
Ed Sanders 0e51180709 Update VE core submodule to master (55a5cdc): use new ve.ui.Dialogs and ve.ui.Inspectors
Move various bits of code from initialize to setup as required.

MWDialog is now useless so use ve.ui.Dialog directly.

New changes:
0b2d03f [BREAKING CHANGE] Pass fragments, not surfaces, to windows (reprise)
0101ac4 Update OOjs UI to v0.1.0-pre (ac6848398c)

Change-Id: I0fae3e5ff2bd0da5b74c244af226b07b1f5883bd
2014-04-09 20:28:30 -07:00
Roan Kattouw f2422d916c Update VE core submodule to master (c150259) for scalable changes
ve.dm.Scalable is now a computational model for image scaling and
size manipulation. This commit adjusts the nodes and the edit and
insertion dialog to handle the new scalable model, and by that
use a centralized computational engine for all scaling and size
changes.

New changes:
3ec19fb8 Refactor Scalable functionality

Change-Id: I017a017924f544cc8bc9b7d8245335759ae0e890
2014-04-09 17:29:49 -07:00
jenkins-bot 93d2175901 Merge "Limit the number of initially visible parameters in the parameter search widget" 2014-04-09 23:06:13 +00:00
Trevor Parscal 70655da2b9 Limit the number of initially visible parameters in the parameter search widget
* Truncate beyond 3 parameters
* Add a special option class that, when clicked, shows the remaining parameters
* Use a special option class for the no parameters item instead of hacking the normal one
* Simplify the design of the no parameters item: no icon, centered text

Change-Id: Ia8259e91b42a59c2b08019df36217d485208ad99
2014-04-09 12:56:02 -07:00
Ed Sanders 164cf27299 Use new model directionality in MW
Depends on I2065e17020dc89 in core.

Change-Id: I6e99db601af58a9c4200f885887de451f9f70daa
2014-04-09 18:21:25 +00:00
Trevor Parscal 84ed719cd0 Additional initializeSelection methodicde
Changes:

* Change uses of initializeSelection to selectItem
* Use "choose" event to respond to deliberate item selection by the user

Depends on changes in OOJS-UI (Ib3826ed)

Change-Id: Ia167a70ca5f40b1f15adad30620fdb13ef0d02d7
2014-04-07 12:15:40 -07:00
Trevor Parscal fc94173ff6 Fix more intalize typos
Change-Id: I24e0b3a93c15cc8a781eb9a35d9ba09510db40bd
2014-04-04 17:13:34 -07:00
Trevor Parscal 9556467595 Revert edit mode tool's onSelect method
Turns out surfaces don't have access to targets after all.

Bug: 63503
Change-Id: Ib14291ce4efe4b3dd5579cd270828936b6a175ae
2014-04-04 00:04:29 +00:00
Trevor Parscal 793fbb0e24 Correctly insert or update citations based on template option
When using a tool that opens a citation or citation transclusion dialog,
the dialog shouldn't use edit mode unless the template in the node and the
template the tool would insert match.

Bug: 63452
Change-Id: I34a5a2da576247f4046da45f742bccc3cec22c5a
2014-04-02 16:38:34 -07:00
Roan Kattouw 03c5822b6b Update VE core submodule to master (c5f4f78)
Also update tools for changes in VE core.

New changes:
e4de14b Make tools use commands
e029817 Make getToolsForNode place primary commands first

Change-Id: I66575ee6d49e6b2f5a5f789978da98bb55e6dc5e
2014-04-02 16:30:12 -07:00
Trevor Parscal 9e38cafc9f Remove constructive flag from return to save form button
It doesn't create anything, so it shouldn't be constructive.

Change-Id: I97d6fc3c5f992033e55ee6cde48245b1e96ddc16
2014-03-31 15:31:43 -07:00
James D. Forrester f1471a59f3 MWMediaSearchWidget: Bump media search result size to 20
At 15 the new, taller dialog means we never get to search for more…

Change-Id: I255d93b8230f962579e1a07840b7cc209577876b
2014-03-29 00:08:59 +00:00
James D. Forrester e56b425120 Update VE core submodule to master (e972bb7)
New changes:
e972bb7 Split-up theme-specific styles

Local changes:
* Split-up theme-specific styles

Change-Id: I4af6c03413d49cb05031d439caf340ddef996355
2014-03-28 12:56:19 -07:00
Trevor Parscal 7e80d5dfa8 Rename CSS file to relate to actual style names
Change-Id: Iece39a7cb34ea4a51e5aba10df60ea870bf912f8
2014-03-28 11:56:02 -07:00
jenkins-bot 50f9f2b983 Merge "Fix copyright year range for fourteen files not updated to 2011-2014" 2014-03-26 22:55:08 +00:00
jenkins-bot 927d24968d Merge "Make cite transclusion tools actually work" 2014-03-26 22:48:54 +00:00
Trevor Parscal ca95923d73 Make cite transclusion tools actually work
The transclusion tools shown in the toolbar in the reference dialog
passed a template to open with to the transclusion dialog, but it
didn't take that config parameter.

Moved this parameter up from CitationDialog to TransclusionDialog,
and moved its logic into the setup function.

Bug: 63037
Change-Id: I9249c845a5ae7cca2ec4d75d69e1236f7755d246
2014-03-26 22:42:30 +00:00
jenkins-bot 24efd6bd8d Merge "Blank the reference and media search queries when closing dialogs" 2014-03-26 21:49:36 +00:00
James D. Forrester 95dee3ceee Fix copyright year range for fourteen files not updated to 2011-2014
Change-Id: Ibef2bf965dbd970b235a57058bcb3922a8777aa2
2014-03-24 18:36:51 -07:00
James D. Forrester 3f21a91c2b Blank the reference and media search queries when closing dialogs
Bug: 61959
Change-Id: I45e161d322d4fb0a63d35c1a75a2a39ba9f73def
2014-03-24 17:41:29 -07:00
jenkins-bot 2b84bbbfca Merge "Use "Insert citation" label for apply button of CitationDialog" 2014-03-25 00:19:56 +00:00
Trevor Parscal c385c01096 Use "Insert citation" label for apply button of CitationDialog
* Create a method to produce the correct label
* Override that method in the citation dialog subclass

Change-Id: Ic74a23dcf30aae201f3d6c312b760cf058aadf11
2014-03-24 17:16:43 -07:00
Trevor Parscal 1363d15c53 Move cite to be after link, instead of after structure
Change-Id: I69170b68997b8df595cc12e10b3467444e3ae952
2014-03-24 17:13:59 -07:00
jenkins-bot cc45c6a0d1 Merge "Fix 'original dimensions' async call in MediaEdit dialog" 2014-03-24 22:54:01 +00:00
Roan Kattouw 81876bc81a Update reference's internal item after inserting reference
This fails before the reference has been inserted, because
it's not yet in keyedNodes at that point.

Bug: 63031
Change-Id: I34ea1a88c0f332c23e43597d1c42158bfb0f1e98
2014-03-24 15:05:26 -07:00
Trevor Parscal be199c0bf2 Ultra-mega-hyper-citation editing on crack
Objectives:
* Allow users on-wiki to create tools and dialogs for citation templates
of their choosing
* Allow editing of citation templates directly, without having to go
through the reference dialog
* Provide citation template tools within reference editing that use the
same titles and icons as the citation tools do, but don't wrap the
inserted content in a ref tag

Changes:

* Reference list was cloning the DOM element it was inserting into its
view before the generated content node could finish rendering, so it
never ended up showing the finished rendering in the reference list
* Documenting hack about use of reference list node's destroy method,
and how we are depending on destroy not canceling generated content
rendering
* Introduced reference model
* Added saving/updating method to transclusion model
* Added getPartsList method to dm transclusion node, which caches the
result and invalidates the cache on update
* Added citation dialog, which extends transclusion dialog
* Added cite group to toolbars, cite-template in reference dialog toolbar
* Factored out getting the node to edit and saving changes procedures in
transclusion dialog so they could be extended in citation dialog
* Updated uses of autoAdd as per changes in oojs-ui (Ic353f91)
* Renamed MWDialogTool file since there was only one tool in it
* Expanded TransclusionDialogTool file out since there is now more logic
to it
* Switched to using ve.dm.MWReferenceModel instead of plain objects in
reference search widget

Configuration:

If you add to MediaWiki:Visualeditor-cite-tool-definition.json the
following code you will magically be presented with a delightful array
of citation options:

[
    { "name": "web", "icon": "ref-cite-web", "template": "Cite web" },
    { "name": "book", "icon": "ref-cite-book", "template": "Cite book" },
    { "name": "news", "icon": "ref-cite-news", "template": "Cite news" },
    { "name": "journal", "icon": "ref-cite-journal", "template": "Cite journal" }
]

...or...

[
    {
         "name": "any-name",
         "icon": "any-ooui-icon",
         "template": "Any template",
         "title": "Any title text"
     }
]

The title text is derived either from the title property or from the name
property by pre-pending the string 'visualeditor-cite-tool-name-' to
generate a message key. Titles for 'web', 'book', 'news' and 'journal' are
provided. The icon is a normal oo-ui-icon name, and more icons can be
added, as usual, by adding a class called .oo-ui-icon-{icon name} to
MediaWiki:Common.css. 'ref-cite-web', 'ref-cite-book', 'ref-cite-news'
and 'ref-cite-journal' are provided. The template name is simply the name
of the template without its namespace prefix.

Depends on Ic353f91 in oojs-ui

Bug: 50110
Bug: 50768
Change-Id: Id401d973b8d5fe2faec481cc777c17a24fd19dd4
2014-03-24 19:24:38 +00:00
James D. Forrester f8720326b0 Split out omnibus CSS files
Change-Id: I195a0e4091cf2d003c325e9c653dd634e7096779
2014-03-21 20:14:52 +00:00