Commit graph

167 commits

Author SHA1 Message Date
Trevor Parscal 703328d770 Make parameter search widget have a horizontal limit
Objective:

* Cut off really long parameter names with ellipsis

Changes:

ve.ui.Widget.css
* Use ellipsis when option labels get too long

ve-mw/ve.ui.Widget.css
* Limit the size of a parameter result widget label - this is a hack, but
  since there are strange bugs with using ellipsis together with % based
  width, it's the best we can do for now

Bug: 50800
Change-Id: Idbfa336d2bba376b0d078fdd0ece65926d610d81
2013-07-10 01:35:38 +00:00
Trevor Parscal 9297f33989 Tool and context menu size and alignment fixes
Objectives:

* Make context menu toolbar consistently sized and aligned, especially
  in monobook

Changes:

ve.ui.Toolbar.css
* Remove vertical line between groups, just use whitespace
* Switch from padding to margins to avoid size calculation issues

ve.ui.Tool.css
* Remove tiny margin on button tools, tightening them up a bit
* Replace 50% 50% with center center

ve.ui.Context.css
* Switch from padding to margins to avoid size calculation issues
* Use different margins depending on text direction
* Reverse the 0.8em rule used in the dialog - this is a hack, it should
  be cleanup up later with a better strategy for normalizing the size
  of text within VE elements

Change-Id: If65f12382625efa33777e284bd23a94dc509436a
2013-07-10 01:33:37 +00:00
Trevor Parscal 461e518fca Remove dead CSS code
Reference counting indicates these styles are not in use, so they can now be safely garbage collected.

Change-Id: I432f73490eeb00ff414f150fcf26c718607bac95
2013-07-10 01:32:57 +00:00
Trevor Parscal 3a6e91dfb7 RTL Improvements
Objectives:

* Make option widget icons correctly placed in RTL
* Make embedded context toolbar correctly placed in RTL

Approach:

Use separate elements for icons within option widgets which have more
flexibility when rendering in either LTR or RTL when compared to CSS
background position. The simpler approach, using CSS background
position offsets, isn't cross-browser compatible at this time.

Changes:

ve.ui.OutlineItemWidget.js
* Remove custom icon implementation, using parent class implementation
  instead

ve.ui.OptionWidget.js
* Add icon option, which adds an icon element only if an icon was
  specified

ve.ui.MenuItemWidget.js, ve-mw/ve.ui.MWParameterResultWidget.js
* Add override for icon config option
* Document icon config as private

ve.ui.Context.js
* Add detection and special handling for positioning embedded context
  toolbar when rendering in RTL

ve.ui.Widget.css
* Add styles for option widget's new icon option
* Add styles to make indentation still work for outline item widgets
* Adjust styles for menu item widget as per changes in option widget

ve-mw/ve.ui.Widget.css
* Adjust styles for parameter result widget as per changes in option
  widget

Change-Id: Ibfa4b613e0fd7902f8a2c78b5717de402c5f82b8
2013-07-10 00:09:22 +00:00
Roan Kattouw e9ca44c86c Transplant CSS from the main document to each iframe
We previously manually loaded CSS into these frames, which is flawed
because it completely bypasses ResourceLoader (so CSSJanus didn't flip
them, necessitating a bunch of hacks for RTL), and doesn't pull in
MediaWiki styles (so templates inside references don't render correctly).
Instead, this commit copies all styles from the main document into each
frame's document, inlining what it can.

Loading all styles in dialogs and inspectors caused some problems,
initially. We didn't namespace our styles for dialogs vs. inspectors
at all; the only reason inspector styles weren't being applied to dialogs
and vice versa was because we controlled which files were being loaded
in which context. This commit namespaces the inspector and dialog styles
where needed so they don't conflict and try to override each other.

Tested in Vector and Monobook, but not in Apex and not in RTL.

ve.init.mw.ViewPageTarget*.css:
* Namespace styles that are only intended for the main document
* Undo Monobook's font-size: x-small; in frames

*Dialog.js:
* Remove addLocalStylesheet() calls, we don't need those any more
** ve.ui.MWDialog seems to be unneeded now, we may want to remove it

*.css:
* Remove @noflip-ped RTL rules where they were just flipped versions of
  their LTR counterparts

ve.ui.Dialog.css, ve.ui.Inspector.css:
* Namespace styles with .ve-ui-dialog-content / .ve-ui-inspector-content

ve.ui.Frame.css:
* Move the margin:0 and padding:0 here (were in the frame <body>'s style
  attribute) and add background:none to prevent frames from getting
  the skin's background (grey in Vector, a book in Monobook)

ve.ui.Dialog.js, ve.ui.Inspector.js:
* Add ve-ui-dialog-content / ve-ui-inspector-content class to the
  frame's content <div> so we can restrict styles to only apply in
  dialogs / inspectors

ve.ui.Frame.js:
* Replace infrastructure for @import-ing stylesheets with transplantation
* Remove code polling to see when the stylesheets were loaded
** We can't do this in the new approach AFAIK, since all styles in the
   frame are either inlined or inaccessible due to the same-origin policy
** We also shouldn't need it because the browser should have cached the
   styles when it loaded the main document
* Apply ve-ui-frame-body class to the frame's <body> so we can style it
** Move inline padding:0;margin:0; into ve.ui.Frame.css
** Move the ve-ltr/ve-rtl class up to the <body>

ve.ui.Window.js:
* Remove infrastructure registering stylesheet URLs to load

Change-Id: I4a37115301811ad860f4578344a04873ea8c2b69
2013-07-09 16:13:28 -07:00
Catrope 30ebc9a656 Revert "Add support for <blockquote> elements"
Whoops, merged too soon. The dropdown part of it doesn't
actually work right.

This reverts commit 3c51ebad93.

Change-Id: Ieafbf18ca8a43b07e33a787772abbc77aef63e4c
2013-07-09 21:35:47 +00:00
James D. Forrester 3c51ebad93 Add support for <blockquote> elements
Bug: 51009
Change-Id: I7ba1635e4f856a021e1a7a2d26a8714230c9364a
2013-07-09 13:15:06 -07:00
Ed Sanders 11453371c6 Fix CSS lint error ('0px' => '0')
Change-Id: If9bfd8b061c0cd8240980cbd4ee4db5f24d40104
2013-07-05 22:22:31 +02:00
jenkins-bot 3456c7c441 Merge "Moved embed statement where it does something" 2013-07-05 18:41:37 +00:00
Moriel Schottlender 1dc21c01e3 Page settings fix-fix
This re-fixes the fix to the frame fix. fix fix.
Two things changed: Background position flipped to the right properly
(was somewhat off before) and text-alignment flipped as well.

Bug: 49613
Change-Id: I0aa317ef674537d20d7ed64e74eaa3cfe8030c8c
2013-07-05 13:44:13 -04:00
Niklas Laxström 96b7dbacb5 Moved embed statement where it does something
Followup to Ibdc2410cc

Change-Id: I5e665f5d720366650c362ed603693a223c96ee77
2013-07-05 09:47:12 +00:00
Roan Kattouw 92c38eab85 The great directory split of 2013
Move all MW-specific files into the ve-mw directory, in preparation
for moving them out into a separate repo.

All MW-specific files were moved into a parallel directory structure
in modules/ve-mw . Files with both generic and MW-specific things were
split up. Files in ve/init/mw/ were moved to ve-mw/init/ rather than
ve-mw/init/mw ; they're still named ve.init.mw.* but we should change
that. Some of the test files for core classes had MW-specific test cases,
so those were split up and the test runner was duplicated; we should
refactor our tests to use data providers so we can add cases more easily.

Split files:
* ve.ce.Node.css
* ve.ce.ContentBranchNode.test.js (MWEntityNode)
* ve.ce.Document.test.js (some core test cases genericized)
* ve.dm.InternalList.test.js (uses mwReference test document)
* ve.dm.SurfaceFragment.test.js, ve.ui.FormatAction.test.js
** Made core tests use heading instead of mwHeading
** Updated core tests because normal headings don't break out of lists
** Moved test runners into ve.test.utils.js
* ve.ui.Icons-*.css
* ve.ui.Dialog.css (MW parts into ve.ui.MWDialog.css)
* ve.ui.Tool.css
* ve.ui.Widget.css (move ve-ui-rtl and ve-ui-ltr to ve.ui.css)

ve.dm.Converter.test.js: Moved runner functions into ve.test.utils.js

ve.dm.example.js:
* Refactored createExampleDocument so mwExample can use it
* Removed wgExtensionAssetsPath detection, moved into mw-preload.js
* Genericized withMeta example document (original version copied to mwExample)
* Moved references example document to mwExample

ve.dm.mwExample.js:
* Move withMeta and references example documents from ve.dm.example.js
* Add createExampleDocument function

ve-mw/test/index.php: Runner for MW-specific tests only

ve-mw/test/mw-preload.js: Sets VE_TESTDIR for Special:JavaScriptTest only

ve.ui.Window.js:
* Remove magic path interpolation in addLocalStyleSheets()
* Pass full(er) paths to addLocalStyleSheets(), here and in subclasses

ve.ui.MWDialog.js: Subclass of Dialog that adds MW versions of stylesheets

ve.ui.MW*Dialog.js:
* Subclass MWDialog rather than Dialog
* Load both core and MW versions of stylesheets that have both

ve.ui.PagedDialog.js: Converted to a mixin rather than an abstract base class
* Don't inherit ve.ui.Dialog
* Rather than overriding initialize(), provide initializePages() which the
  host class is supposed to call from its initialize()
* Rename onOutlineSelect to onPageOutlineSelect

ve.ui.MWMetaDialog.js, ve.ui.MWTransclusionDialog.js:
* Use PagedDialog as a mixin rather than a base class, inherit MWDialog

bullet-icon.png: Unused, deleted

Stuff we should do later:
* Refactor tests to use data providers
* Write utility function for SVG compat check
* Separate omnibus CSS files such as ve.ui.Widget.css
* Separate omnibus RL modules
* Use icon classes in ViewPageTarget

Change-Id: I1b28f8ba7f2d2513e5c634927a854686fb9dd5a5
2013-07-02 20:51:38 -07:00
Trevor Parscal 69c10c5c66 Restore callout image white-space
Oops.

Change-Id: I24039e7f4ee83cc26c7d600252ac8b9290eeda19
2013-07-02 17:17:33 -07:00
Trevor Parscal 4568274949 Template parameter adding
Objective:

* Allow browsing, searching and adding documented parameters

Changes:

ve.ui.MWTransclusionDialog.js
* Replace regular text input with ve.ui.ParameterSearchWidget
* Fix uses of $(), this.frame.$$ is correct

ve.ui.Dialog.css
* Change rules for addParameterFieldset to make search widget auto-size vertically

ve.ui.Widget.css
* Add styles for ve.ui.MWParameterResultWidget

ve.ui.MWParameterSearchWidget.js, ve.ui.MWParameterResultWidget.js
* New classes
* Provides a way to search and select parameter for a template
* Displays parameter label, name, aliases and description

*.php
* Links to new files and messages

Change-Id: Ie5dbe8c44ce5d64c4b49b09517fb66cd30dd7304
2013-07-02 13:40:54 -07:00
jenkins-bot 21476b37ef Merge "Dir fix for iframes and widgets" 2013-07-02 20:22:34 +00:00
Moriel Schottlender c4c9923c91 Dir fix for iframes and widgets
This fix adds a directionality property to the frame objects so directions
can be inherited and manipulated inside the frame <body> tags.
There are also several corrections to flipping positioning of panels
in the GridLayout and of the icons in fieldsets and labeled elements
so they appear properly (right instead of left).

I've added a 've-rtl' / 've-ltr' class to frame content divs to serve as
selectors for rtl fixes and general language fixes. Most CSS corrections
would likely be fixed when CSSJanus works in iframes, but the selectors
would still be useful.

This sets the stage for directionality inheritance inside iframes,
and fixes most of the problem with the Page Settings window in RTL wikis.
It also fixes all the labels with icons across VE interface.

Bug: 49613
Change-Id: I418e669b0999552167683352acb365a4249ab9cc
2013-07-02 20:20:43 +00:00
Trevor Parscal 995f9fb382 Icon cleanup
Objectives:

* Remove "big" icons, which we don't use anywhere
* Remove unnecessary crap from SVG files
* \r\n -> \n

Change-Id: Iedfcaf43e4e15acd4ae3a2671ba7b2e3d9c2f4b4
2013-07-02 13:13:45 -07:00
Rob Moen c472b2fe4a Make local overlays local to surface and remove insane z-indexes
ve.ui.Surface.js
* Make local overlay a child of ve-ui-surface and a sibling to
  ve-ce-surface elements.
** This keeps local overlays relative to their surface and eliminates the
   need for insane z-indexes.

ve.ui.PopupWidget.js
* PopupWidget boundaries are now relative to ve-ce-surface and no longer
  protrude out

ve.ce.Node.css, ve.ui.Window.css
* Removal or replacement of insane z-indexes.

ve.ce.FocusableNode.js, ve.ce.ProtectedNode.js, ve.ce.ResizableNode.js,
ve.ui.Context.js
* Translate offsets from local overlay

ve.init.mw.ViewPageTarget-monobook.css,
ve.init.mw.ViewPageTarget-vector.css
* Skin specific z-indexes for global overlay

ve.init.mw.ViewPageTarget.js
* Applied direction specific mw class to ce.Surface vs ui.Surface to
  prevent mw content styles from being applied to ui elements.

ve.ui.Dialog.css
* Adjustments to surface inside of dialog so that relative offsets for
  local overlays can be properly calculated.

ve.ui.Surface.css
* Explicitly force .ve-ui-surface to be relative so that it's children can
  be relatively positioned.

ve.ui.Widget.css
* Removal of unnecessary font-size properties now that local overlay is
  sibling of surface.

ve.js
* Added get relative position helper method to translate position offsets
  from target parent

Bug: 50241
Change-Id: Ibadce404a2286bc5dcec48f0d9da89004dbbd867
2013-07-02 19:35:43 +00:00
James D. Forrester 662d35178f Add user guide link to beta icon drop down
As part of this, put the 'help' icon next to the beta icon, make the
text not greyed-out (now that it's an actual action) and provide the
link.

On hover, all three items get underlined, which is irritating, however.

Bug: 50476
Change-Id: Id65968072b7134f5864bbd96acf34fd0c23fe17c
2013-07-01 11:07:08 -07:00
Inez Korczyński b0b832a796 Make toolbar look correct with non-standard browser font size settings
Assumption about toolbar height never exceeding 88px is not correct. At
least in Chrome, after setting in advanced configuration font size to
"Large" instead of "Medium", the toolbar's height is 110px and part of it
is transparent. Because it is transparent user can see content behind it
when scrolled down, which makes for a not really good experience.

Change-Id: Ibdc2410cc4ab29bfe774961fc062d172386975d4
2013-06-30 19:46:00 +00:00
Trevor Parscal 0aac4c7e60 Reference insertion, new and existing
Objectives:

* Split reference dialog (at least for now) an edit and an insert dialog
* Add reference search widget for selecting an existing source, or
  choosing to add a new one
* Abstract reference names, don't allow editing them and generate them
  when needed
* When editing groups, move the internal item and update all references
  to it
* Resolve name conflicts when moving a reference to a new group by
  generating a new list key

Bonus:

* Add getNodeGroups method to internal list
* Add getUniqueListKey method to internal list
* Add destroy functionality to ce.node to release events and references

Bug: 49733
Change-Id: Ib244ff6ad9b4cee1decfd9b9e1d3d4e9cdcfb78c
2013-06-27 18:11:31 -07:00
Trevor Parscal 256ed827d9 Option widget improvements
Objectives:

* Make options unable to be selected or highlighted when disabled
* Add default styles for selected state
* Fix line-height for option labels
* Use default cursor when field is disabled

Change-Id: I8a535cd6b259b092c2abce27ddb10882cdde6cf5
2013-06-28 00:08:00 +00:00
Trevor Parscal ed7d42592f Move some of MediaSelectWidget into SearchWidget
Objectives:

* Break apart MediaSelectWidget for re-use
* Rename classes to follow search/result naming scheme

Change-Id: I65aab3dc3d41e31af13e2754e77b7dd185ac90f1
2013-06-27 23:51:09 +00:00
Christian Williams eee17a8f09 Fix overlay for Monobook
Because of the z-indexes of major elements of the mono book
skin, and because the overlay containers are appended to the
body, the overlays can't be positioned between the surface and
the toolbar. Before this fix, the overlays are appearing beneath
the surface. This fix will retain proper positioning of the overlays
between the surface and the toolbar for Vector, and will overlay
everything in Monobook.

Later, we will have the overlay container more tightly integrated
with the surface to avoid this stacking problem.

Change-Id: Ibb1553099cc1e35e6a0928a99b584885508ca5b6
2013-06-26 16:10:56 -07:00
James D. Forrester eafe5d844c Discourage (ab)use of H1s, and relabel them
Re-label the headings in the MWFormatDropdownTool with MW-specific
headings per bug 43334, reduce the size of the dropdown's contents a
little to make the headings less vibrant, and move the H1 option to the
end of the list to further discourage its use.

Note that there are some issues with the underlying structure here and our
ability to split the repos into VE-core and VE-MW will need this to be
refactored.

Bug: 43334
Change-Id: I5a58b4dcebd6ceae0ffcd24f663429f25bdc3db9
2013-06-26 19:19:51 +00:00
jenkins-bot a7844ec34a Merge changes Icbf9ac6c,I1e7a1e67
* changes:
  Prevent visual effect on disabled toolbar buttons
  Remove use of filter property for CSS opacity
2013-06-26 02:37:14 +00:00
Christian Williams a7f471e6e7 Fix z-index of local overlay
Local overlay z-index is positioning overlay items (phantoms, etc)
above the floated toolbar. The overlay container is a sibling to the
toolbar's parent and is later in the DOM. z-indexing is
unnecessary and has been removed.

Bug: 50096
Change-Id: Ib46f66b1d1bea36d761f793e9966e09db6e675ca
2013-06-26 00:00:27 +00:00
Rob Moen 8e8584cc9e Prevent visual effect on disabled toolbar buttons
Bug: 33113
Change-Id: Icbf9ac6cff5e3f914268fe14d1b430609dedd49e
2013-06-25 16:58:14 -07:00
Trevor Parscal c2196b1fe7 Remove use of filter property for CSS opacity
Was used for IE8 support, no longer needed.

Change-Id: I1e7a1e676022dd7607c808bd44848cbf22a9e958
2013-06-25 16:44:06 -07:00
Roan Kattouw 0bf155bb36 Fix empty inspector popout bug in Firefox
Due to some sort of mysterious race condition (probably deferred reflow)
calling this.$menu.show() set style="" rather than style="display:block;"
because Firefox believed the parent was still hidden.

Work around this by removing display:none; from the context's CSS rules.
We don't need it because we always manually .hide() these things anyway.

Bug: 50073
Change-Id: I29e210aba9a6265d8364ff8ae49408cb4c2428b9
2013-06-23 19:12:13 -07:00
Timo Tijhof 8a2c9431e6 Create ref list insertion tool
Fixes (follows-up I1b48ef5240, I6daff5c596):
* Invalid html passed to jQuery constructor.
* Use prop() instead of attr() for boolean values.
* Use append() instead of html() when appending nodes instead
  of parsing html.
* Rename shadowed variable name clash 'mw' to 'mwData'.
* Fix odd construction where we parse '{}' to create an empty
  object.
* Have ve.ce.MWReferenceListNode#update perform changes off-document
  in a detached tree.
* Fix deep property access that can fail. mwData is set to
  either JSON parse of data-mw attr or empty object.
  Accessing mwData.attrs.group needs to be guarded by whether
  mw.attrs is indeed set.
* Have `mw` and `about` attribtue in references list roundtrip
  (especially mw which can data we aren't editing/re-creating).
* Add missing 'refGroup' property to MWReferenceListNode's
  data element (similar to what MWReferenceNode already has).

Change-Id: I67e4f378ccd04e97361d8e58ae57db5353075756
2013-06-22 20:23:22 -07:00
Inez Korczyński 25d8d2895d Fix incorrectly written CSS that was affecting all table cells on the page instead of cells in mwMetaDialog only
Change-Id: If3d01346d7267aec444d573ac83516083a3689bc
2013-06-21 12:33:38 -07:00
Trevor Parscal 469cb4aa99 Add reference icon
Objectives:

* Introduce new icon for a reference
* Repurpose existing reference icon for references block

Change-Id: I1bfcdbeda3b9730d62d6b264ef72921e93623f7e
2013-06-21 10:31:43 -07:00
Timo Tijhof 85c4ebf373 mw.ViewPageTarget: Move save dialog out of toolbar tree
Bug: 49275
Bug: 49361
Change-Id: I2fbc4c8af943f1b096b8912191924961405d5c47
2013-06-20 14:16:50 -07:00
Timo Tijhof 82997d73e8 ve.ui.PanelLayout: Set default to span accross available space
Without these properties set, the layout is collapsed into a 0x0px square due to the
parent having overflow-x: auto; and no width/height set.

Change-Id: I77aef8afa3327b11f453196badcdfad3f51f7c3d
2013-06-19 16:20:10 -07:00
Inez Korczyński a886952563 Support for editing captions of block images
Bug: 38129
Change-Id: I02207e78f5c28eaccd9bc97a48baa78280192255
2013-06-18 17:57:10 -07:00
Trevor Parscal 23b2da91fd Template and content adding
Objectives:

* Allow adding content or templates within a transclusion
* Add template placeholder to model and view which resolves to nothing
  when saving (thus disappearing if not resolved)

Changes:

*.php
* Add links to new messages and files

ve.ui.OutlineControlsWidget.js
* Organize controls into "adders" and "movers"

ve.ui.Widget.css
* Add styles for adders/movers sections of outline controls
* Make adders appear on hover to reduce clutter

ve.ui.Icons-*.css
* Add icon for "add item"

ve.ui.Dialog.css
* Add styles for add template fieldsets
* Make placeholder items in the outline italic

ve.ui.PagedDialog.js
* Pass adders config to outline controls

ve.ui.MWTransclusionDialog.js
* Add support for adding content and templates

ve.dm.MWTransclusionModel.js
* Add addPlaceholder method

ve.dm.MWTemplatePlaceholderModel.js
* New class, pretty much an empty part
* Using this makes the UI much easier to work with - no need to special
  case the outline control for new items
* Because it's not supported specifically in
  ve.dm.MWTransclusionModel.getPlainObject, it produces nothing and goes
  away naturally on apply

Change-Id: I3478560fb53ba2ccd3fb26bafb6a61e6415565eb
2013-06-18 23:37:44 +00:00
Trevor Parscal e8d8308d9a dialog: Remove background color body
This was causing strange rendering problems, and it's really not even
needed.

Change-Id: I130e9e5c5f2c5ab99b5245de6c0243e9be9cf558
2013-06-18 21:52:43 +00:00
Trevor Parscal 00d5c41e02 ve.ui.IconButtonWidget: Extend css transition from 100ms to 200ms
Makes make it look nicer.

Change-Id: Ib7c1021a31f607b6e697f16fe797358c0167acee
2013-06-18 21:45:33 +00:00
jenkins-bot 8b414bf426 Merge "grunt: Also delete QUnit temp files when test fails" 2013-06-17 18:29:21 +00:00
Ed Sanders 4986576cc4 grunt: Also delete QUnit temp files when test fails
Move post-qunit task to qunit.done event which fires both on
success and failure.

Define pre-qunit + qunit as a group test 'unit', so they can
be run from the command line (previously 'grunt qunit' would
fail) as 'grunt unit'.

Also add override comment to css file using non-standard
property so csslint passes again (follows-up b2fbe35).

Bug: 49431
Change-Id: I5079d00a63d43276a12dd78c306bb3819470631d
2013-06-17 11:27:52 -07:00
Trevor Parscal ac26f5fc69 Outline controls
Objectives:

* Allow reordering items in outline widgets using an outline control
  widget
* Use an outline control widget to reorder transclusion parts

Changes:

ve.ui.SelectWidget.js
* Emit add and remove events

ve.ui.OutlineItemWidget.js
* Add movable config options
* Add isMovable method

ve.ui.OutlineControlsWidget.js
* New class
* Displays move up/down buttons which are synchronized with an outline
  widget
* Doesn't actually move items (since an outline widget is probably
  data-driven) just emits events

ve.ui.Widget.css
* Add disabled style for icon button widgets
* Add styles for outline controls widget

ve.ui.Icons*.css
* Add missing icon styles

ve.ui.Dialog.css
* Add styles for outline and controls in editable paged dialogs

ve.ui.GroupElement.js
* Fix bug where items are insertions are in the wrong place when "moving"
  them

ve.ui.PagedDialog.js
* Add editable config option which shows outline controls under the
  outline
* Pass through movable config option when creating pages

ve.ui.MWTranclusionDialog.js
* Configure paged dialog outline as editable
* Add initialize method to connect outline controls widget events
* Make addPart method automatically add parameters when templates are
  added
* Add handler for outline controls move event which re-orders parts
* Make parts movable (params are automatically ordered, so they aren't
  movable)

ve.dm.MWTransclusionModel.js
* Add addPart method and use it within the addContent and addTemplate
  methods
* Fix documentation lies
* Add getPartFromId method

*.php
* Add links to new files and messages

Change-Id: I919d4c3e9b85d07a97a99c0b2e8739a859bdf2b1
2013-06-14 11:56:30 -07:00
jenkins-bot 0bffa7b119 Merge "Improve category widget styling" 2013-06-13 19:27:57 +00:00
Trevor Parscal 6fba13b453 Improve category widget styling
Objectives:

* Get rid of the border and ensure pixel-perfect positioning of the input.
* Always render the arrow on the top right of the category item
* Make the popup positioning based on the arrow div's position and size

Bug 49420
Change-Id: I3ad4ff1c41e6108161b5b7c8718c676eb850de68
2013-06-13 19:26:29 +00:00
jenkins-bot 03127491b2 Merge changes Ic189011e,I7617a35b
* changes:
  Make references dialog scroll
  Make fieldset layout icons optional
2013-06-13 17:04:19 +00:00
jenkins-bot 628fd18930 Merge "Category popup fixes" 2013-06-13 15:30:07 +00:00
Trevor Parscal e2b7504b8e Category popup fixes
Objectives:

* Make category popup show "Category" rather than missing message -
this is more similar to other popups like inspectors, which identify
what that thing is that you are working on
* Fix alignment of icon and label in category popup

Changes:

ve.ui.Widget.css
* Make popup title align properly with the remove button

ve.ui.MWCategoryPopupWidget.js
* Update message key

*.php
* Add new message

Change-Id: Ia8051125bbc9bde47ceb931e1ebf42b2955481ff
2013-06-12 16:44:10 -07:00
Trevor Parscal d3a2fab2c4 Transclusion editing
Objectives:

* Rename just about every use of "template" to "transclusion"
* Make a proper data structure for transclusions
* Abstract away template data
* Use more template data in the user interface
* Allow adding parameters
* Allow removing templates, parameters and content

Changes:

ve.ui.Dialog.css
* Add rule to place add param controls on a single line

ve.ui.MWTemplateDialogs.js
* Move template spec loading into transclusion class
* Add remove button for parts and parameters
* Add parameter adding form
* Use template data for labels and descriptions

ve.dm.*
* Add new transclusion data structures

*.php
* Add links to new files

*.*
* Rename all things "template" to "transclusion"

Bug: 39598
Bug: 49403
Change-Id: I3bcf924a3e179cb65f19e833277a39dfd3dad8bd
2013-06-12 16:39:13 -07:00
Trevor Parscal caa16737d5 Make references dialog scroll
If the content in the sub-editor gets big enough, this can be a problem.

Change-Id: Ic189011e64090186d87a397b2b047057a97f2a3d
2013-06-12 16:24:38 -07:00
Trevor Parscal 91d615e684 Make fieldset layout icons optional
Change-Id: I7617a35bd9e8322d0b9f8e225885ccbe5fa230ee
2013-06-12 16:23:48 -07:00