mediawiki-extensions-Visual.../modules/ve/ui
Trevor Parscal 7ac32bc0f6 No more confusing boolean argument for closing windows
window.close( true ) thing sucked, and was being named and used
inconsistently throughout the code.

The new approach uses an action string, so it looks more like
window.close( 'accept' ) or window.close( 'back' ). This makes it easy
to steer the behavior at any point in the window close code path.

Most importantly for the link inspector, this allows us to now restore
the previous selection when the user presses escape or clicks the back
button, while still moving the cursor to the end and collapsing the
selection upon pressing enter and allowing removal by clicking the
trash can.

This commit also cleans some things up, like the various ways we have
to close an inspector which all seem useless because we wouldn't want
to just randomly close an inspector on someone. An inspector should
be closed only when the user has dealt with it.

ve.InspectorAction.js
* Removed close method

ve.ui.LinkInspector.js
* Updated documentation
* Passing action to parent method
* Updated logic to deal with change from "remove" to "action" argument
* Added selection restauration on "back" action

ve.ui.Context.js
* Added action to call to close
* Removed closeInspector method

ve.ui.Dialog.js
* Moved event handlers to the top
* Added actions to calls to close
* Added click block event handler to prevent focus changes

ve.ui.Inspector.js
* Added actions to calls to close
* Added storing of previous selection - this is different from
  initialSelection because it's captured before the selection is
  modified by setup

ve.ui.Window.js
* Updated documentation
* Updated argument name from "remove" to "action"

ve.ui.WindowSet.js
* Updated documentation
* Removed auto-close, replaced it with error if trying to open a window
  when another is already open
* Removed close method

Change-Id: Ie8f72504177dd6ba169fdddbb776fd5397b831c4
2013-04-10 12:31:49 -07:00
..
dialogs Added icon for reference, switched from category to tag icons 2013-04-09 15:30:20 -07:00
elements Stack panel, element mixins, cleanup 2013-03-28 12:40:01 -07:00
inspectors No more confusing boolean argument for closing windows 2013-04-10 12:31:49 -07:00
layouts Stack panel, element mixins, cleanup 2013-03-28 12:40:01 -07:00
styles Added icon for reference, switched from category to tag icons 2013-04-09 15:30:20 -07:00
tools Media dialog support 2013-04-05 11:52:57 -07:00
widgets Great Annotation Refactor of 2013 2013-04-08 18:10:16 -07:00
ve.ui.Context.js No more confusing boolean argument for closing windows 2013-04-10 12:31:49 -07:00
ve.ui.Dialog.js No more confusing boolean argument for closing windows 2013-04-10 12:31:49 -07:00
ve.ui.DialogFactory.js Media dialog support 2013-04-05 11:52:57 -07:00
ve.ui.Element.js Doc: Replace "@property @type {Type}" with "@property {Type}". 2013-03-28 21:21:56 +01:00
ve.ui.Frame.js Support loading stylesheets into frames from different locations 2013-04-08 13:58:50 -07:00
ve.ui.Inspector.js No more confusing boolean argument for closing windows 2013-04-10 12:31:49 -07:00
ve.ui.InspectorFactory.js Media dialog support 2013-04-05 11:52:57 -07:00
ve.ui.js Group, Select, Option, Outline and MenuSection widgets 2013-03-20 22:55:32 +00:00
ve.ui.Layout.js Layouts, grids and panels 2013-03-15 15:12:56 -07:00
ve.ui.Tool.js Doc: Replace "@property @type {Type}" with "@property {Type}". 2013-03-28 21:21:56 +01:00
ve.ui.Toolbar.js Store data in LinearData class with an index-value store for objects 2013-03-30 10:06:34 +00:00
ve.ui.ToolFactory.js Bump copyright notice year range to -2013 over -2012 2013-02-19 15:37:34 -08:00
ve.ui.Widget.js Layouts, grids and panels 2013-03-15 15:12:56 -07:00
ve.ui.Window.js No more confusing boolean argument for closing windows 2013-04-10 12:31:49 -07:00
ve.ui.WindowSet.js No more confusing boolean argument for closing windows 2013-04-10 12:31:49 -07:00