mediawiki-extensions-Visual.../modules/ve/ui/styles/ve.ui.Dialog.css

186 lines
4.4 KiB
CSS
Raw Normal View History

Context, frame, window, dialog and inspector refactor This is a major refactor of user interface context, frame, dialog and inspector classes, including adding several new classes which generalize managing inspectors/dialogs (which are now subclasses of window). New classes: * ve.ui.Window.js - base class for inspector and dialog classes * ve.ui.WindowSet.js - manages mutually exclusive windows, used by surface and context for dialogs and inspectors respectively * ve.ui.DialogFactory - generates dialogs * ve.ui.IconButtonWidget - used in inspector for buttons in the head Refactored classes: * ve.ui.Context - moved inspector management to window set * ve.ui.Frame - made iframes initialize asynchronously * ve.ui.Dialog and ve.ui.Inspector - moved initialization to async initialize method Other interesting bits: ve.ui.*Icons*.css, *.svg, *.png, *.ai * Merged icon stylesheets so all icons are available inside windows * Renamed inspector icon to window ve.ui.*.css * Reorganized styles so that different windows can include only what they need * Moved things to where they belonged (some things were in strange places) ve.init.Target.js, ve.init.mw.ViewPageTarget.js, ve.init.sa.Target.js * Removed dialog management - dialogs are managed by the surface now ve.ui.*Dialog.js * Renamed title message static property * Added registration ve.ui.*Inspector.js * Switch to accept surface object rather than context, which conforms to the more general window class without losing any functionality (in fact, most of the time the surface was what we actually wanted) ve.ui.MenuWidget.js, ve.ui.MWLinkTargetInputWidget.js * Using surface overly rather than passing an overlay around through constructors Change-Id: Ifd16a1003ff44c48ee7b2c66928cf9cc858b2564
2013-03-13 00:06:57 +00:00
/*!
* VisualEditor UserInterface Dialog styles.
*
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
.ve-ui-dialog {
Context, frame, window, dialog and inspector refactor This is a major refactor of user interface context, frame, dialog and inspector classes, including adding several new classes which generalize managing inspectors/dialogs (which are now subclasses of window). New classes: * ve.ui.Window.js - base class for inspector and dialog classes * ve.ui.WindowSet.js - manages mutually exclusive windows, used by surface and context for dialogs and inspectors respectively * ve.ui.DialogFactory - generates dialogs * ve.ui.IconButtonWidget - used in inspector for buttons in the head Refactored classes: * ve.ui.Context - moved inspector management to window set * ve.ui.Frame - made iframes initialize asynchronously * ve.ui.Dialog and ve.ui.Inspector - moved initialization to async initialize method Other interesting bits: ve.ui.*Icons*.css, *.svg, *.png, *.ai * Merged icon stylesheets so all icons are available inside windows * Renamed inspector icon to window ve.ui.*.css * Reorganized styles so that different windows can include only what they need * Moved things to where they belonged (some things were in strange places) ve.init.Target.js, ve.init.mw.ViewPageTarget.js, ve.init.sa.Target.js * Removed dialog management - dialogs are managed by the surface now ve.ui.*Dialog.js * Renamed title message static property * Added registration ve.ui.*Inspector.js * Switch to accept surface object rather than context, which conforms to the more general window class without losing any functionality (in fact, most of the time the surface was what we actually wanted) ve.ui.MenuWidget.js, ve.ui.MWLinkTargetInputWidget.js * Using surface overly rather than passing an overlay around through constructors Change-Id: Ifd16a1003ff44c48ee7b2c66928cf9cc858b2564
2013-03-13 00:06:57 +00:00
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
padding: 1em;
line-height: 1em;
Context, frame, window, dialog and inspector refactor This is a major refactor of user interface context, frame, dialog and inspector classes, including adding several new classes which generalize managing inspectors/dialogs (which are now subclasses of window). New classes: * ve.ui.Window.js - base class for inspector and dialog classes * ve.ui.WindowSet.js - manages mutually exclusive windows, used by surface and context for dialogs and inspectors respectively * ve.ui.DialogFactory - generates dialogs * ve.ui.IconButtonWidget - used in inspector for buttons in the head Refactored classes: * ve.ui.Context - moved inspector management to window set * ve.ui.Frame - made iframes initialize asynchronously * ve.ui.Dialog and ve.ui.Inspector - moved initialization to async initialize method Other interesting bits: ve.ui.*Icons*.css, *.svg, *.png, *.ai * Merged icon stylesheets so all icons are available inside windows * Renamed inspector icon to window ve.ui.*.css * Reorganized styles so that different windows can include only what they need * Moved things to where they belonged (some things were in strange places) ve.init.Target.js, ve.init.mw.ViewPageTarget.js, ve.init.sa.Target.js * Removed dialog management - dialogs are managed by the surface now ve.ui.*Dialog.js * Renamed title message static property * Added registration ve.ui.*Inspector.js * Switch to accept surface object rather than context, which conforms to the more general window class without losing any functionality (in fact, most of the time the surface was what we actually wanted) ve.ui.MenuWidget.js, ve.ui.MWLinkTargetInputWidget.js * Using surface overly rather than passing an overlay around through constructors Change-Id: Ifd16a1003ff44c48ee7b2c66928cf9cc858b2564
2013-03-13 00:06:57 +00:00
background-color: #fff;
background-color: rgba(255,255,255,0.5);
-webkit-animation: ve-ui-fade-in 250ms ease-in-out 0 1 normal;
-moz-animation: ve-ui-fade-in 250ms ease-in-out 0 1 normal;
-ms-animation: ve-ui-fade-in 250ms ease-in-out 0 1 normal;
-o-animation: ve-ui-fade-in 250ms ease-in-out 0 1 normal;
animation: ve-ui-fade-in 250ms ease-in-out 0 1 normal;
}
.ve-ui-dialog-closing {
-webkit-animation: ve-ui-fade-in 250ms ease-in-out 0 1 reverse;
-moz-animation: ve-ui-fade-in 250ms ease-in-out 0 1 reverse;
-ms-animation: ve-ui-fade-in 250ms ease-in-out 0 1 reverse;
-o-animation: ve-ui-fade-in 250ms ease-in-out 0 1 reverse;
animation: ve-ui-fade-in 250ms ease-in-out 0 1 reverse;
}
Context, frame, window, dialog and inspector refactor This is a major refactor of user interface context, frame, dialog and inspector classes, including adding several new classes which generalize managing inspectors/dialogs (which are now subclasses of window). New classes: * ve.ui.Window.js - base class for inspector and dialog classes * ve.ui.WindowSet.js - manages mutually exclusive windows, used by surface and context for dialogs and inspectors respectively * ve.ui.DialogFactory - generates dialogs * ve.ui.IconButtonWidget - used in inspector for buttons in the head Refactored classes: * ve.ui.Context - moved inspector management to window set * ve.ui.Frame - made iframes initialize asynchronously * ve.ui.Dialog and ve.ui.Inspector - moved initialization to async initialize method Other interesting bits: ve.ui.*Icons*.css, *.svg, *.png, *.ai * Merged icon stylesheets so all icons are available inside windows * Renamed inspector icon to window ve.ui.*.css * Reorganized styles so that different windows can include only what they need * Moved things to where they belonged (some things were in strange places) ve.init.Target.js, ve.init.mw.ViewPageTarget.js, ve.init.sa.Target.js * Removed dialog management - dialogs are managed by the surface now ve.ui.*Dialog.js * Renamed title message static property * Added registration ve.ui.*Inspector.js * Switch to accept surface object rather than context, which conforms to the more general window class without losing any functionality (in fact, most of the time the surface was what we actually wanted) ve.ui.MenuWidget.js, ve.ui.MWLinkTargetInputWidget.js * Using surface overly rather than passing an overlay around through constructors Change-Id: Ifd16a1003ff44c48ee7b2c66928cf9cc858b2564
2013-03-13 00:06:57 +00:00
.ve-ui-dialog .ve-ui-window-frame {
position: fixed;
top: 1em;
right: 0;
bottom: 1em;
left: 0;
Group, Select, Option, Outline and MenuSection widgets Objective: Refactor menu widgets so that the majority of their code can be reused, and then add an outline widget which shares the same base classes. ve.ui.Dialog.css * Make dialog a fixed width and have a minimum and maximum height while always being centered in the window. * Add style for the outline panel * Add border below the title * Move font-size adjustment to child elements to preserve layout scale ve.ui.Inspector.css * Make inspectors fade in when being opened (will happen after the size transition is complete) * Add initial size for inspector to prevent the default size of the unfinished contents from making it too large while loading ve.ui.Tool.css * Update classes according to changes in labeled widgets ve.ui.Widget.css * Add display: block to widget labels to support use of autoEllipsis on them * Update classes according to changes in labeled widgets * Add styles for new select, option and outline item widgets * Remove unused group and items classes for menu widgets (which are now subclasses of the select widget and no longer have grouping built-in) ve.ui.Window.css.js * Moved selection disabling rules up to the head to prevent selection drawing around the title ve.ui.GroupWidget.js * New widget that manages "items", allowing getting, adding, removing and clearing ve.ui.MenuSectionItemWidget.js * New widget that can be used inside a menu to create an unselectable, unhighlightable item that describes a section of the menu ve.ui.OptionWidget.js * New widget to be used with select widgets, provides select and highlight functionality ve.ui.OutlineItemWidget.js * New widget to be used with outline widgets, extends option and adds support for an icon to be rendered to the left of the label ve.ui.OutlineWidget.js * New widget that provides a vertically stacked list of mutually exclusive options, extends select ve.ui.SelectWidget.js * New widget that implements most of what menu once did, only now it also handles all the events for it's child elements internally ve.ui.MetaDialog.js * Hacked in support for an outline widget in the outline pane * Added classes for styling purposes ve.ui.FormatDropDownTool.js * Modified call to menu item constructor as per changes therein * Reorganized options config to make construction simpler * Changed to setLabel after selecting the item to prevent the label from being changed to the wrong value as a side-effect of setting the item ve.ui.DropDownTool.js * Added $$ in config for menu widget - just in case later on we use a drop-down inside of a frame * Using jQuery .text() method to propagate the selected item's text to the label rather than keeping around a plain text copy of the label in a property ve.ui.Context.js * Improve context/inspector behavior in regards to initial sizing ve.ui.js * Added context property to $$ returned by get$$ so it's easy to get the document object (for event binding) wherever you have a $$ ve.ui.Window.js * Fixed incorrect case for boolean type in comment * Added getFrame method ve.ui.ButtonWidget.js * Removed extra class being set on label ve.ui.LabeledWidget.js * Added class on label * Added fitLabel method which uses autoEllipsis internally ve.ui.MenuItemWidget.js * Moved nearly all of the implementation to option so it could be reused ve.ui.Menu.js * Moved most of the implementation to select and group ve.ui.MWLinkTargetInputWidget * Prevent aborting and re-querying if the value hasn't actually changed * Updated populateMenu method as per changes in menu class *.php * Added links to new files Change-Id: I2271b5cc0554973b13cfbff94caf16901c02caa5
2013-03-19 22:59:49 +00:00
margin: auto;
width: 800px;
min-height: 12em;
max-height: 600px;
Context, frame, window, dialog and inspector refactor This is a major refactor of user interface context, frame, dialog and inspector classes, including adding several new classes which generalize managing inspectors/dialogs (which are now subclasses of window). New classes: * ve.ui.Window.js - base class for inspector and dialog classes * ve.ui.WindowSet.js - manages mutually exclusive windows, used by surface and context for dialogs and inspectors respectively * ve.ui.DialogFactory - generates dialogs * ve.ui.IconButtonWidget - used in inspector for buttons in the head Refactored classes: * ve.ui.Context - moved inspector management to window set * ve.ui.Frame - made iframes initialize asynchronously * ve.ui.Dialog and ve.ui.Inspector - moved initialization to async initialize method Other interesting bits: ve.ui.*Icons*.css, *.svg, *.png, *.ai * Merged icon stylesheets so all icons are available inside windows * Renamed inspector icon to window ve.ui.*.css * Reorganized styles so that different windows can include only what they need * Moved things to where they belonged (some things were in strange places) ve.init.Target.js, ve.init.mw.ViewPageTarget.js, ve.init.sa.Target.js * Removed dialog management - dialogs are managed by the surface now ve.ui.*Dialog.js * Renamed title message static property * Added registration ve.ui.*Inspector.js * Switch to accept surface object rather than context, which conforms to the more general window class without losing any functionality (in fact, most of the time the surface was what we actually wanted) ve.ui.MenuWidget.js, ve.ui.MWLinkTargetInputWidget.js * Using surface overly rather than passing an overlay around through constructors Change-Id: Ifd16a1003ff44c48ee7b2c66928cf9cc858b2564
2013-03-13 00:06:57 +00:00
background-color: #fff;
border: solid 1px #ccc;
border-radius: 0.5em;
box-shadow: 0 0.2em 1em rgba(0, 0, 0, 0.3);
overflow: hidden;
-webkit-animation: ve-ui-zoom-in 250ms ease-in-out 0 1 normal;
-moz-animation: ve-ui-zoom-in 250ms ease-in-out 0 1 normal;
-ms-animation: ve-ui-zoom-in 250ms ease-in-out 0 1 normal;
-o-animation: ve-ui-zoom-in 250ms ease-in-out 0 1 normal;
animation: ve-ui-zoom-in 250ms ease-in-out 0 1 normal;
}
.ve-ui-dialog .ve-ui-window-frame.ve-ui-window-frame-small {
width: 600px;
min-height: 200px;
height: 200px;
}
.ve-ui-dialog-closing .ve-ui-window-frame {
-webkit-animation: ve-ui-zoom-in 250ms ease-in-out 0 1 reverse;
-moz-animation: ve-ui-zoom-in 250ms ease-in-out 0 1 reverse;
-ms-animation: ve-ui-zoom-in 250ms ease-in-out 0 1 reverse;
-o-animation: ve-ui-zoom-in 250ms ease-in-out 0 1 reverse;
animation: ve-ui-zoom-in 250ms ease-in-out 0 1 reverse;
}
Context, frame, window, dialog and inspector refactor This is a major refactor of user interface context, frame, dialog and inspector classes, including adding several new classes which generalize managing inspectors/dialogs (which are now subclasses of window). New classes: * ve.ui.Window.js - base class for inspector and dialog classes * ve.ui.WindowSet.js - manages mutually exclusive windows, used by surface and context for dialogs and inspectors respectively * ve.ui.DialogFactory - generates dialogs * ve.ui.IconButtonWidget - used in inspector for buttons in the head Refactored classes: * ve.ui.Context - moved inspector management to window set * ve.ui.Frame - made iframes initialize asynchronously * ve.ui.Dialog and ve.ui.Inspector - moved initialization to async initialize method Other interesting bits: ve.ui.*Icons*.css, *.svg, *.png, *.ai * Merged icon stylesheets so all icons are available inside windows * Renamed inspector icon to window ve.ui.*.css * Reorganized styles so that different windows can include only what they need * Moved things to where they belonged (some things were in strange places) ve.init.Target.js, ve.init.mw.ViewPageTarget.js, ve.init.sa.Target.js * Removed dialog management - dialogs are managed by the surface now ve.ui.*Dialog.js * Renamed title message static property * Added registration ve.ui.*Inspector.js * Switch to accept surface object rather than context, which conforms to the more general window class without losing any functionality (in fact, most of the time the surface was what we actually wanted) ve.ui.MenuWidget.js, ve.ui.MWLinkTargetInputWidget.js * Using surface overly rather than passing an overlay around through constructors Change-Id: Ifd16a1003ff44c48ee7b2c66928cf9cc858b2564
2013-03-13 00:06:57 +00:00
.ve-ui-dialog .ve-ui-frame {
width: 100%;
height: 100%;
}
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-03 21:47:52 +00:00
.ve-ui-dialog-content .ve-ui-window-head,
.ve-ui-dialog-content .ve-ui-window-body,
.ve-ui-dialog-content .ve-ui-window-foot {
position: absolute;
left: 0;
right: 0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
overflow: hidden;
}
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-03 21:47:52 +00:00
.ve-ui-dialog-content .ve-ui-window-head {
top: 0;
height: 3.8em;
padding: 0.5em;
}
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-03 21:47:52 +00:00
.ve-ui-dialog-content .ve-ui-window-foot {
bottom: 0;
height: 4.8em;
padding: 1em;
}
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-03 21:47:52 +00:00
.ve-ui-dialog-content .ve-ui-window-body {
box-shadow: 0 0 0.66em rgba(0,0,0,0.25);
top: 3.8em;
bottom: 4.8em;
}
Single-click insertion Objectives: * Reduce the number of clicks and mouse maneuvers required to insert media, references or template parameters * Make use of highlighting with mouse movement or arrow key presses, similar to menus, to suggest action when clicked * Improve the way media search results look and feel Changes: ve.ui.SelectWidget.js * Add mouseleave handler to un-highlight when the mouse exits the widget * Document highlight events (already being emitted) ve.ui.SearchWidget.js * Propagate both select and highlight events from results widget * Make arrow keys change highlight instead of selection * Get rid of enter event, make enter key select highlighted item instead * Provide direct access to results widget through getResults method ve.ui.MenuWidget.js * Use the selected item as a starting point if nothing is currently highlighted when adjusting the highlight position ve.ui.Dialog.js * Add footless option to hide the foot element and make the body extend all the way down to the bottom * Remove applyButton, which only some dialogs need, and should be creating themselves, along with other buttons as needed ve.ui.Widget.css * Change highlight and selected colors of option widgets to match other selection colors used elsewhere * Leave selected and highlighted widget looking selected ve.ui.Frame.css * Add background color to combat any color that might have been applied to the frame body in the imported CSS from the parent frame ve.ui.Dialog.css * Add rules for footless mode ve.ui.MWReferenceResultWidget.js, ve.ui.MWParameterResultWidget.js, ve.ui.MWMediaResultWidget.js * Allow highlighting ve.ui.MWParamterSearchWidget.js * Switch from selecting the first item when filtering to highlighting ve-mw/ve.ui.Widget.js * Adjust media result widget styling to better match other elements ve.ui.MWTransclusionDialog.js, ve.ui.MWReferenceListDialog.js, ve.ui.MWReferenceEditDialog.js, ve.ui.MWMetaDialog.js ve.ui.MWMediaEditDialog.js * Add apply button, as per it being removed from parent class ve.ui.MWTransclusionDialog.js, ve.ui.MWReferenceInsertDialog.js, ve.ui.MWMediaInsertDialog.js * Insert parameter/reference/media on select, instead of clicking an insert button * Use 'insert' instead of 'apply' as argument for close method Bug: 50774 Bug: 51143 Change-Id: Ia18e79f1f8df2540f465468edb01f5ce989bf843
2013-07-15 21:07:53 +00:00
.ve-ui-dialog-content-footless .ve-ui-window-body {
bottom: 0;
}
.ve-ui-dialog-content-footless .ve-ui-window-foot {
display: none;
}
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-03 21:47:52 +00:00
.ve-ui-dialog-content .ve-ui-window-icon {
Context, frame, window, dialog and inspector refactor This is a major refactor of user interface context, frame, dialog and inspector classes, including adding several new classes which generalize managing inspectors/dialogs (which are now subclasses of window). New classes: * ve.ui.Window.js - base class for inspector and dialog classes * ve.ui.WindowSet.js - manages mutually exclusive windows, used by surface and context for dialogs and inspectors respectively * ve.ui.DialogFactory - generates dialogs * ve.ui.IconButtonWidget - used in inspector for buttons in the head Refactored classes: * ve.ui.Context - moved inspector management to window set * ve.ui.Frame - made iframes initialize asynchronously * ve.ui.Dialog and ve.ui.Inspector - moved initialization to async initialize method Other interesting bits: ve.ui.*Icons*.css, *.svg, *.png, *.ai * Merged icon stylesheets so all icons are available inside windows * Renamed inspector icon to window ve.ui.*.css * Reorganized styles so that different windows can include only what they need * Moved things to where they belonged (some things were in strange places) ve.init.Target.js, ve.init.mw.ViewPageTarget.js, ve.init.sa.Target.js * Removed dialog management - dialogs are managed by the surface now ve.ui.*Dialog.js * Renamed title message static property * Added registration ve.ui.*Inspector.js * Switch to accept surface object rather than context, which conforms to the more general window class without losing any functionality (in fact, most of the time the surface was what we actually wanted) ve.ui.MenuWidget.js, ve.ui.MWLinkTargetInputWidget.js * Using surface overly rather than passing an overlay around through constructors Change-Id: Ifd16a1003ff44c48ee7b2c66928cf9cc858b2564
2013-03-13 00:06:57 +00:00
width: 2.4em;
height: 2.8em;
line-height: 2.8em;
}
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-03 21:47:52 +00:00
.ve-ui-dialog-content .ve-ui-window-title {
Context, frame, window, dialog and inspector refactor This is a major refactor of user interface context, frame, dialog and inspector classes, including adding several new classes which generalize managing inspectors/dialogs (which are now subclasses of window). New classes: * ve.ui.Window.js - base class for inspector and dialog classes * ve.ui.WindowSet.js - manages mutually exclusive windows, used by surface and context for dialogs and inspectors respectively * ve.ui.DialogFactory - generates dialogs * ve.ui.IconButtonWidget - used in inspector for buttons in the head Refactored classes: * ve.ui.Context - moved inspector management to window set * ve.ui.Frame - made iframes initialize asynchronously * ve.ui.Dialog and ve.ui.Inspector - moved initialization to async initialize method Other interesting bits: ve.ui.*Icons*.css, *.svg, *.png, *.ai * Merged icon stylesheets so all icons are available inside windows * Renamed inspector icon to window ve.ui.*.css * Reorganized styles so that different windows can include only what they need * Moved things to where they belonged (some things were in strange places) ve.init.Target.js, ve.init.mw.ViewPageTarget.js, ve.init.sa.Target.js * Removed dialog management - dialogs are managed by the surface now ve.ui.*Dialog.js * Renamed title message static property * Added registration ve.ui.*Inspector.js * Switch to accept surface object rather than context, which conforms to the more general window class without losing any functionality (in fact, most of the time the surface was what we actually wanted) ve.ui.MenuWidget.js, ve.ui.MWLinkTargetInputWidget.js * Using surface overly rather than passing an overlay around through constructors Change-Id: Ifd16a1003ff44c48ee7b2c66928cf9cc858b2564
2013-03-13 00:06:57 +00:00
line-height: 2.8em;
}
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-03 21:47:52 +00:00
.ve-ui-dialog-content .ve-ui-window-foot .ve-ui-buttonWidget {
float: left;
Context, frame, window, dialog and inspector refactor This is a major refactor of user interface context, frame, dialog and inspector classes, including adding several new classes which generalize managing inspectors/dialogs (which are now subclasses of window). New classes: * ve.ui.Window.js - base class for inspector and dialog classes * ve.ui.WindowSet.js - manages mutually exclusive windows, used by surface and context for dialogs and inspectors respectively * ve.ui.DialogFactory - generates dialogs * ve.ui.IconButtonWidget - used in inspector for buttons in the head Refactored classes: * ve.ui.Context - moved inspector management to window set * ve.ui.Frame - made iframes initialize asynchronously * ve.ui.Dialog and ve.ui.Inspector - moved initialization to async initialize method Other interesting bits: ve.ui.*Icons*.css, *.svg, *.png, *.ai * Merged icon stylesheets so all icons are available inside windows * Renamed inspector icon to window ve.ui.*.css * Reorganized styles so that different windows can include only what they need * Moved things to where they belonged (some things were in strange places) ve.init.Target.js, ve.init.mw.ViewPageTarget.js, ve.init.sa.Target.js * Removed dialog management - dialogs are managed by the surface now ve.ui.*Dialog.js * Renamed title message static property * Added registration ve.ui.*Inspector.js * Switch to accept surface object rather than context, which conforms to the more general window class without losing any functionality (in fact, most of the time the surface was what we actually wanted) ve.ui.MenuWidget.js, ve.ui.MWLinkTargetInputWidget.js * Using surface overly rather than passing an overlay around through constructors Change-Id: Ifd16a1003ff44c48ee7b2c66928cf9cc858b2564
2013-03-13 00:06:57 +00:00
margin: 0.125em 0.25em;
}
.ve-ui-dialog-content .ve-ui-window-foot .ve-ui-buttonWidget.ve-ui-flaggableElement-primary,
.ve-ui-dialog-content .ve-ui-window-foot .ve-ui-buttonWidget.ve-ui-flaggableElement-constructive,
.ve-ui-dialog-content .ve-ui-window-foot .ve-ui-buttonWidget.ve-ui-flaggableElement-destructive {
float: right;
}
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-03 21:47:52 +00:00
.ve-ui-dialog-content .ve-ui-window-closeButton {
float: right;
margin: 0.25em 0.25em;
}
Group, Select, Option, Outline and MenuSection widgets Objective: Refactor menu widgets so that the majority of their code can be reused, and then add an outline widget which shares the same base classes. ve.ui.Dialog.css * Make dialog a fixed width and have a minimum and maximum height while always being centered in the window. * Add style for the outline panel * Add border below the title * Move font-size adjustment to child elements to preserve layout scale ve.ui.Inspector.css * Make inspectors fade in when being opened (will happen after the size transition is complete) * Add initial size for inspector to prevent the default size of the unfinished contents from making it too large while loading ve.ui.Tool.css * Update classes according to changes in labeled widgets ve.ui.Widget.css * Add display: block to widget labels to support use of autoEllipsis on them * Update classes according to changes in labeled widgets * Add styles for new select, option and outline item widgets * Remove unused group and items classes for menu widgets (which are now subclasses of the select widget and no longer have grouping built-in) ve.ui.Window.css.js * Moved selection disabling rules up to the head to prevent selection drawing around the title ve.ui.GroupWidget.js * New widget that manages "items", allowing getting, adding, removing and clearing ve.ui.MenuSectionItemWidget.js * New widget that can be used inside a menu to create an unselectable, unhighlightable item that describes a section of the menu ve.ui.OptionWidget.js * New widget to be used with select widgets, provides select and highlight functionality ve.ui.OutlineItemWidget.js * New widget to be used with outline widgets, extends option and adds support for an icon to be rendered to the left of the label ve.ui.OutlineWidget.js * New widget that provides a vertically stacked list of mutually exclusive options, extends select ve.ui.SelectWidget.js * New widget that implements most of what menu once did, only now it also handles all the events for it's child elements internally ve.ui.MetaDialog.js * Hacked in support for an outline widget in the outline pane * Added classes for styling purposes ve.ui.FormatDropDownTool.js * Modified call to menu item constructor as per changes therein * Reorganized options config to make construction simpler * Changed to setLabel after selecting the item to prevent the label from being changed to the wrong value as a side-effect of setting the item ve.ui.DropDownTool.js * Added $$ in config for menu widget - just in case later on we use a drop-down inside of a frame * Using jQuery .text() method to propagate the selected item's text to the label rather than keeping around a plain text copy of the label in a property ve.ui.Context.js * Improve context/inspector behavior in regards to initial sizing ve.ui.js * Added context property to $$ returned by get$$ so it's easy to get the document object (for event binding) wherever you have a $$ ve.ui.Window.js * Fixed incorrect case for boolean type in comment * Added getFrame method ve.ui.ButtonWidget.js * Removed extra class being set on label ve.ui.LabeledWidget.js * Added class on label * Added fitLabel method which uses autoEllipsis internally ve.ui.MenuItemWidget.js * Moved nearly all of the implementation to option so it could be reused ve.ui.Menu.js * Moved most of the implementation to select and group ve.ui.MWLinkTargetInputWidget * Prevent aborting and re-querying if the value hasn't actually changed * Updated populateMenu method as per changes in menu class *.php * Added links to new files Change-Id: I2271b5cc0554973b13cfbff94caf16901c02caa5
2013-03-19 22:59:49 +00:00
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-03 21:47:52 +00:00
.ve-ui-dialog-content .ve-ui-window-body .ve-ui-surface {
border: solid 1px #ddd;
border-radius: 0.25em;
border-top-right-radius: 0;
border-top-left-radius: 0;
}
.ve-ui-pagedDialog-outlinePanel {
Group, Select, Option, Outline and MenuSection widgets Objective: Refactor menu widgets so that the majority of their code can be reused, and then add an outline widget which shares the same base classes. ve.ui.Dialog.css * Make dialog a fixed width and have a minimum and maximum height while always being centered in the window. * Add style for the outline panel * Add border below the title * Move font-size adjustment to child elements to preserve layout scale ve.ui.Inspector.css * Make inspectors fade in when being opened (will happen after the size transition is complete) * Add initial size for inspector to prevent the default size of the unfinished contents from making it too large while loading ve.ui.Tool.css * Update classes according to changes in labeled widgets ve.ui.Widget.css * Add display: block to widget labels to support use of autoEllipsis on them * Update classes according to changes in labeled widgets * Add styles for new select, option and outline item widgets * Remove unused group and items classes for menu widgets (which are now subclasses of the select widget and no longer have grouping built-in) ve.ui.Window.css.js * Moved selection disabling rules up to the head to prevent selection drawing around the title ve.ui.GroupWidget.js * New widget that manages "items", allowing getting, adding, removing and clearing ve.ui.MenuSectionItemWidget.js * New widget that can be used inside a menu to create an unselectable, unhighlightable item that describes a section of the menu ve.ui.OptionWidget.js * New widget to be used with select widgets, provides select and highlight functionality ve.ui.OutlineItemWidget.js * New widget to be used with outline widgets, extends option and adds support for an icon to be rendered to the left of the label ve.ui.OutlineWidget.js * New widget that provides a vertically stacked list of mutually exclusive options, extends select ve.ui.SelectWidget.js * New widget that implements most of what menu once did, only now it also handles all the events for it's child elements internally ve.ui.MetaDialog.js * Hacked in support for an outline widget in the outline pane * Added classes for styling purposes ve.ui.FormatDropDownTool.js * Modified call to menu item constructor as per changes therein * Reorganized options config to make construction simpler * Changed to setLabel after selecting the item to prevent the label from being changed to the wrong value as a side-effect of setting the item ve.ui.DropDownTool.js * Added $$ in config for menu widget - just in case later on we use a drop-down inside of a frame * Using jQuery .text() method to propagate the selected item's text to the label rather than keeping around a plain text copy of the label in a property ve.ui.Context.js * Improve context/inspector behavior in regards to initial sizing ve.ui.js * Added context property to $$ returned by get$$ so it's easy to get the document object (for event binding) wherever you have a $$ ve.ui.Window.js * Fixed incorrect case for boolean type in comment * Added getFrame method ve.ui.ButtonWidget.js * Removed extra class being set on label ve.ui.LabeledWidget.js * Added class on label * Added fitLabel method which uses autoEllipsis internally ve.ui.MenuItemWidget.js * Moved nearly all of the implementation to option so it could be reused ve.ui.Menu.js * Moved most of the implementation to select and group ve.ui.MWLinkTargetInputWidget * Prevent aborting and re-querying if the value hasn't actually changed * Updated populateMenu method as per changes in menu class *.php * Added links to new files Change-Id: I2271b5cc0554973b13cfbff94caf16901c02caa5
2013-03-19 22:59:49 +00:00
border-right: solid 1px #ddd;
}
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 00:46:45 +00:00
.ve-ui-pagedDialog-outlinePanel-editable .ve-ui-outlineWidget {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 3em;
overflow-y: auto;
}
.ve-ui-pagedDialog-outlinePanel .ve-ui-outlineControlsWidget {
position: absolute;
bottom: 0;
left: 0;
right: 0;
box-shadow: 0 0 0.25em rgba(0,0,0,0.25);
}
.ve-ui-pagedDialog-pagesPanel .ve-ui-panelLayout {
padding: 1.5em;
width: 100%;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
overflow: hidden;
}
The Great ve.ui.Surface refactor of 2013 Prologue: Farewell ve.Editor my good chap… Oh, hey there HTML frames - I didn't see you there! In a world where iframes are outlaws, and symbols like document and window are global, there were more than a few assumptions about which document or window was being used. But fear not - for this commit (probably) tracks them all down, leaving a trail of iframe-compatible awesomeness in its wake. With the great ve.ui.Surface now able to be used inside of iframes, let the reference editing commence. But there, lurking in the darkness is a DM issue so fierce it may take Roan and/or Ed up to 3 whole hours to sort it out. Note to Roan and/or Ed: Editing references seems to work fine, but when saving the page there are "no changes" which is a reasonable indication to the contrary. Objectives: * Make it possible to have multiple surfaces be instantiated, get along nicely, and be embedded inside of iframes if needed. * Make reference content editable within a dialog Approach: * Move what's left of ve.Editor to ve.ui.Surface and essentially obliterate all use of it * Make even more stuff inherit from ve.Element (long live this.$$) * Use the correct document or window anywhere it was being assumed to be the top level one * Resolve stacking order issues by removing the excessive use of z-index and introducing global and local overlay elements for each editor * Add a surface to the reference dialog, load up the reference contents and save them back on apply * Actually destroy what we create in ce and ui surfaces * Add recursive frame offset calculation method to ve.Element * Moved ve.ce.Surface's getSelectionRect method to the prototype Bonus: * Move ve.ce.DocumentNode.css contents to ve.ce.Node.css (not sure why it was separate in the first place, but I'm likely the one to blame) * Fix blatant lies in documentation * Whitespace cleanup here and there * Get rid of ve.ui.Window overlays - not used or needed Change-Id: Iede83e7d24f7cb249b6ba3dc45d770445b862e08
2013-05-20 22:45:50 +00:00
.ve-ui-pagedDialog-pagesPanel .ve-ui-panelLayout-scrollable {
overflow-y: auto;
}
.ve-ui-pagedDialog-pagesPanel .ve-ui-panelLayout-padded {
padding: 2em;
}
.ve-ui-window-body .ve-ce-documentNode {
padding: 1.875em; /* 1.5/0.8 */
}