Commit graph

10 commits

Author SHA1 Message Date
Moriel Schottlender e6e728b58e Change global class variables to mw.TemplateData
Nest all classes for the templatedata dialog in mw.TemplateData
namespace.

Change-Id: Ib514378c9fbc0fb993b3cbc2fa48ced920167226
2015-02-18 17:47:08 -08:00
jenkins-bot 39da09b516 Merge "Use ActionFieldLayout for language and auto-choose new lang on add" 2015-02-03 00:54:15 +00:00
jenkins-bot 492f933bb8 Merge "Reset paramOrder widget on dialog setup" 2015-01-30 17:50:17 +00:00
Moriel Schottlender 3ad7e0b1e3 Reset paramOrder widget on dialog setup
Make sure that every time the dialog is open, the paramOrder
widget is emptied so it can be refilled fresh from the model.

Bug: T88126
Change-Id: I628c66710cb1f2f77385b16c627585350f357c45
2015-01-30 17:41:41 +00:00
Moriel Schottlender d141e924f6 Use ActionFieldLayout for language and auto-choose new lang on add
Change the current hacky layout to the proper ActionFieldLayout,
and also make sure that when the user adds a language, the new
language is selected.

Change-Id: I737a1dcfc08bd47829661daf3c08e2e480670842
2015-01-29 11:58:56 -08:00
Moriel Schottlender b3877b327d Allow adding a deleted parameter in the templatedata dialog
If a user adds a parameter that was previously deleted, the
parameter properties will be completely emptied, and the parameter
will be added as if it is new.

Bug: T86916
Change-Id: Ib739ee09229750f94314636d4290dbe6662b4c0f
2015-01-28 18:50:43 -08:00
Moriel Schottlender d212901649 Add param order drag/drop widget to TemplateData dialog
Make sure the parameter order is editable with the drag/drop widget.

Change-Id: I35079907b2ed9f5ecdcd438dd69ed9892ce3e428
2015-01-23 19:02:56 +00:00
Moriel Schottlender edf70972e1 Adapt the type input to work with the new ooui getMenu()
The type in the templatedata editor didn't update because the events
were attached to the previous ooui SelectWidget, and should be
adjusted to use the new methods.

Bug: T86922
Change-Id: I619d1cc69f672d2d03d7dafa97ba3d950de9d89d
2015-01-20 17:19:40 +00:00
Moriel Schottlender ee56d518fb Add deprecated switch to the editor
The 'deprecated' boolean property was missing from the templatedata
edit dialog.

Change-Id: Ib05e832d8fc91896816b3f8b22f7678dacb245cd
2015-01-16 11:00:27 -08:00
Moriel Schottlender df59f0179a Eventify TemplateDataGenerator and use oojs-ui
Change the ui/data behavior to work with oojs and event emitters,
and replace the gui from jquery ui to oojs-ui.

Changes made:
* Recreate the templatedata editor with oojs and ooui.
* Create a standalone templatedata model with internal validation.
* Allow the user to insert language-specific strings:
  * Allow adding arbitrary languages and values
  * Normalize output between language object and 'simple' string
  * Add new language code by searching for its name or code
* Import parameters from template code
  * If the template is in subpage and there is no code in the
    current page, the code will request the contents of the parent
    page.

Change-Id: I985ea03dfee58984ec22ec9a157a00968bfca878
2014-12-22 12:58:37 -05:00