2013-07-03 01:30:10 +00:00
|
|
|
/*!
|
2014-05-21 23:02:22 +00:00
|
|
|
* VisualEditor MediaWiki UserInterface icon styles.
|
2013-07-03 01:30:10 +00:00
|
|
|
*
|
2015-01-08 23:54:03 +00:00
|
|
|
* @copyright 2011-2015 VisualEditor Team and others; see AUTHORS.txt
|
2013-07-03 01:30:10 +00:00
|
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
|
|
*/
|
2014-01-15 03:11:36 +00:00
|
|
|
/*csslint duplicate-background-images:false */
|
2013-07-03 01:30:10 +00:00
|
|
|
|
2013-10-09 20:09:59 +00:00
|
|
|
.oo-ui-icon-alienextension {
|
2013-08-07 05:21:10 +00:00
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/alienextension.svg );
|
2013-08-07 05:21:10 +00:00
|
|
|
}
|
|
|
|
|
2014-07-01 03:48:07 +00:00
|
|
|
/* @noflip */
|
2014-07-03 02:54:07 +00:00
|
|
|
.ve-ui-dir-block-rtl .oo-ui-icon-gallery,
|
|
|
|
/* HACK */ .ve-ui-surface-dir-rtl .oo-ui-icon-gallery,
|
|
|
|
/* HACK */ .oo-ui-rtl .oo-ui-icon-gallery {
|
2014-01-15 03:04:58 +00:00
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/gallery-rtl.svg );
|
2014-07-01 03:48:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* @noflip */
|
2014-07-03 02:54:07 +00:00
|
|
|
.ve-ui-dir-block-ltr .oo-ui-icon-gallery,
|
|
|
|
/* HACK */ .ve-ui-surface-dir-ltr .oo-ui-icon-gallery,
|
|
|
|
/* HACK */ .oo-ui-ltr .oo-ui-icon-gallery {
|
2014-07-01 03:48:07 +00:00
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/gallery-ltr.svg );
|
2014-01-15 03:04:58 +00:00
|
|
|
}
|
|
|
|
|
2014-03-03 12:40:07 +00:00
|
|
|
.oo-ui-icon-image-none {
|
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/image-none.svg );
|
2014-03-03 12:40:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.oo-ui-icon-image-frame {
|
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/image-frame.svg );
|
2014-03-03 12:40:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.oo-ui-icon-image-frameless {
|
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/image-frameless.svg );
|
2014-03-03 12:40:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.oo-ui-icon-image-thumbnail {
|
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/image-thumbnail.svg );
|
2014-03-03 12:40:07 +00:00
|
|
|
}
|
|
|
|
|
2014-10-28 00:49:42 +00:00
|
|
|
.oo-ui-icon-parameter {
|
2013-07-03 01:30:10 +00:00
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/parameter-ltr.svg );
|
2013-07-03 01:30:10 +00:00
|
|
|
}
|
|
|
|
|
2014-10-28 00:49:42 +00:00
|
|
|
.oo-ui-icon-parameter-set {
|
2013-07-26 10:30:35 +00:00
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/parameter-set-ltr.svg );
|
2013-07-26 10:30:35 +00:00
|
|
|
}
|
|
|
|
|
2014-07-01 03:48:07 +00:00
|
|
|
/* @noflip */
|
2014-07-03 02:54:07 +00:00
|
|
|
.ve-ui-dir-block-rtl .oo-ui-icon-reference,
|
|
|
|
/* HACK */ .ve-ui-surface-dir-rtl .oo-ui-icon-reference,
|
|
|
|
/* HACK */ .oo-ui-rtl .oo-ui-icon-reference {
|
2013-07-26 10:30:35 +00:00
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/reference-rtl.svg );
|
2014-07-01 03:48:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* @noflip */
|
2014-07-03 02:54:07 +00:00
|
|
|
.ve-ui-dir-block-ltr .oo-ui-icon-reference,
|
|
|
|
/* HACK */ .ve-ui-surface-dir-ltr .oo-ui-icon-reference,
|
|
|
|
/* HACK */ .oo-ui-ltr .oo-ui-icon-reference {
|
2014-07-01 03:48:07 +00:00
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/reference-ltr.svg );
|
2014-07-01 03:48:07 +00:00
|
|
|
}
|
|
|
|
|
2014-07-03 20:42:54 +00:00
|
|
|
/* @noflip */
|
|
|
|
.ve-ui-dir-block-rtl .oo-ui-icon-reference-existing,
|
|
|
|
/* HACK */ .ve-ui-surface-dir-rtl .oo-ui-icon-reference-existing,
|
|
|
|
/* HACK */ .oo-ui-rtl .oo-ui-icon-reference-existing {
|
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/reference-existing-rtl.svg );
|
2014-07-03 20:42:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* @noflip */
|
|
|
|
.ve-ui-dir-block-ltr .oo-ui-icon-reference-existing,
|
|
|
|
/* HACK */ .ve-ui-surface-dir-ltr .oo-ui-icon-reference-existing,
|
|
|
|
/* HACK */ .oo-ui-ltr .oo-ui-icon-reference-existing {
|
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/reference-existing-ltr.svg );
|
2014-07-03 20:42:54 +00:00
|
|
|
}
|
|
|
|
|
2014-07-01 03:48:07 +00:00
|
|
|
/* @noflip */
|
2014-07-03 02:54:07 +00:00
|
|
|
.ve-ui-dir-block-rtl .oo-ui-icon-references,
|
|
|
|
/* HACK */ .ve-ui-surface-dir-rtl .oo-ui-icon-references,
|
|
|
|
/* HACK */ .oo-ui-rtl .oo-ui-icon-references {
|
2014-07-01 03:48:07 +00:00
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/references-rtl.svg );
|
2014-07-01 03:48:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* @noflip */
|
2014-07-03 02:54:07 +00:00
|
|
|
.ve-ui-dir-block-ltr .oo-ui-icon-references,
|
|
|
|
/* HACK */ .ve-ui-surface-dir-ltr .oo-ui-icon-references,
|
|
|
|
/* HACK */ .oo-ui-ltr .oo-ui-icon-references {
|
2014-07-01 03:48:07 +00:00
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/references-ltr.svg );
|
2013-07-26 10:30:35 +00:00
|
|
|
}
|
|
|
|
|
Ultra-mega-hyper-citation editing on crack
Objectives:
* Allow users on-wiki to create tools and dialogs for citation templates
of their choosing
* Allow editing of citation templates directly, without having to go
through the reference dialog
* Provide citation template tools within reference editing that use the
same titles and icons as the citation tools do, but don't wrap the
inserted content in a ref tag
Changes:
* Reference list was cloning the DOM element it was inserting into its
view before the generated content node could finish rendering, so it
never ended up showing the finished rendering in the reference list
* Documenting hack about use of reference list node's destroy method,
and how we are depending on destroy not canceling generated content
rendering
* Introduced reference model
* Added saving/updating method to transclusion model
* Added getPartsList method to dm transclusion node, which caches the
result and invalidates the cache on update
* Added citation dialog, which extends transclusion dialog
* Added cite group to toolbars, cite-template in reference dialog toolbar
* Factored out getting the node to edit and saving changes procedures in
transclusion dialog so they could be extended in citation dialog
* Updated uses of autoAdd as per changes in oojs-ui (Ic353f91)
* Renamed MWDialogTool file since there was only one tool in it
* Expanded TransclusionDialogTool file out since there is now more logic
to it
* Switched to using ve.dm.MWReferenceModel instead of plain objects in
reference search widget
Configuration:
If you add to MediaWiki:Visualeditor-cite-tool-definition.json the
following code you will magically be presented with a delightful array
of citation options:
[
{ "name": "web", "icon": "ref-cite-web", "template": "Cite web" },
{ "name": "book", "icon": "ref-cite-book", "template": "Cite book" },
{ "name": "news", "icon": "ref-cite-news", "template": "Cite news" },
{ "name": "journal", "icon": "ref-cite-journal", "template": "Cite journal" }
]
...or...
[
{
"name": "any-name",
"icon": "any-ooui-icon",
"template": "Any template",
"title": "Any title text"
}
]
The title text is derived either from the title property or from the name
property by pre-pending the string 'visualeditor-cite-tool-name-' to
generate a message key. Titles for 'web', 'book', 'news' and 'journal' are
provided. The icon is a normal oo-ui-icon name, and more icons can be
added, as usual, by adding a class called .oo-ui-icon-{icon name} to
MediaWiki:Common.css. 'ref-cite-web', 'ref-cite-book', 'ref-cite-news'
and 'ref-cite-journal' are provided. The template name is simply the name
of the template without its namespace prefix.
Depends on Ic353f91 in oojs-ui
Bug: 50110
Bug: 50768
Change-Id: Id401d973b8d5fe2faec481cc777c17a24fd19dd4
2014-03-21 18:56:46 +00:00
|
|
|
.oo-ui-icon-ref-cite-book {
|
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/ref-cite-book.svg );
|
Ultra-mega-hyper-citation editing on crack
Objectives:
* Allow users on-wiki to create tools and dialogs for citation templates
of their choosing
* Allow editing of citation templates directly, without having to go
through the reference dialog
* Provide citation template tools within reference editing that use the
same titles and icons as the citation tools do, but don't wrap the
inserted content in a ref tag
Changes:
* Reference list was cloning the DOM element it was inserting into its
view before the generated content node could finish rendering, so it
never ended up showing the finished rendering in the reference list
* Documenting hack about use of reference list node's destroy method,
and how we are depending on destroy not canceling generated content
rendering
* Introduced reference model
* Added saving/updating method to transclusion model
* Added getPartsList method to dm transclusion node, which caches the
result and invalidates the cache on update
* Added citation dialog, which extends transclusion dialog
* Added cite group to toolbars, cite-template in reference dialog toolbar
* Factored out getting the node to edit and saving changes procedures in
transclusion dialog so they could be extended in citation dialog
* Updated uses of autoAdd as per changes in oojs-ui (Ic353f91)
* Renamed MWDialogTool file since there was only one tool in it
* Expanded TransclusionDialogTool file out since there is now more logic
to it
* Switched to using ve.dm.MWReferenceModel instead of plain objects in
reference search widget
Configuration:
If you add to MediaWiki:Visualeditor-cite-tool-definition.json the
following code you will magically be presented with a delightful array
of citation options:
[
{ "name": "web", "icon": "ref-cite-web", "template": "Cite web" },
{ "name": "book", "icon": "ref-cite-book", "template": "Cite book" },
{ "name": "news", "icon": "ref-cite-news", "template": "Cite news" },
{ "name": "journal", "icon": "ref-cite-journal", "template": "Cite journal" }
]
...or...
[
{
"name": "any-name",
"icon": "any-ooui-icon",
"template": "Any template",
"title": "Any title text"
}
]
The title text is derived either from the title property or from the name
property by pre-pending the string 'visualeditor-cite-tool-name-' to
generate a message key. Titles for 'web', 'book', 'news' and 'journal' are
provided. The icon is a normal oo-ui-icon name, and more icons can be
added, as usual, by adding a class called .oo-ui-icon-{icon name} to
MediaWiki:Common.css. 'ref-cite-web', 'ref-cite-book', 'ref-cite-news'
and 'ref-cite-journal' are provided. The template name is simply the name
of the template without its namespace prefix.
Depends on Ic353f91 in oojs-ui
Bug: 50110
Bug: 50768
Change-Id: Id401d973b8d5fe2faec481cc777c17a24fd19dd4
2014-03-21 18:56:46 +00:00
|
|
|
}
|
|
|
|
|
2014-07-01 03:48:07 +00:00
|
|
|
/* @noflip */
|
2014-07-03 02:54:07 +00:00
|
|
|
.ve-ui-dir-block-rtl .oo-ui-icon-ref-cite-journal,
|
|
|
|
/* HACK */ .ve-ui-surface-dir-rtl .oo-ui-icon-ref-cite-journal,
|
|
|
|
/* HACK */ .oo-ui-rtl .oo-ui-icon-ref-cite-journal {
|
2014-07-01 03:48:07 +00:00
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/ref-cite-journal-rtl.svg );
|
2014-07-01 03:48:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* @noflip */
|
2014-07-03 02:54:07 +00:00
|
|
|
.ve-ui-dir-block-ltr .oo-ui-icon-ref-cite-journal,
|
|
|
|
/* HACK */ .ve-ui-surface-dir-ltr .oo-ui-icon-ref-cite-journal,
|
|
|
|
/* HACK */ .oo-ui-ltr .oo-ui-icon-ref-cite-journal {
|
2014-07-01 03:48:07 +00:00
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/ref-cite-journal-ltr.svg );
|
2014-07-01 03:48:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* @noflip */
|
2014-07-03 02:54:07 +00:00
|
|
|
.ve-ui-dir-block-rtl .oo-ui-icon-ref-cite-news,
|
|
|
|
/* HACK */ .ve-ui-surface-dir-rtl .oo-ui-icon-ref-cite-news,
|
|
|
|
/* HACK */ .oo-ui-rtl .oo-ui-icon-ref-cite-news {
|
Ultra-mega-hyper-citation editing on crack
Objectives:
* Allow users on-wiki to create tools and dialogs for citation templates
of their choosing
* Allow editing of citation templates directly, without having to go
through the reference dialog
* Provide citation template tools within reference editing that use the
same titles and icons as the citation tools do, but don't wrap the
inserted content in a ref tag
Changes:
* Reference list was cloning the DOM element it was inserting into its
view before the generated content node could finish rendering, so it
never ended up showing the finished rendering in the reference list
* Documenting hack about use of reference list node's destroy method,
and how we are depending on destroy not canceling generated content
rendering
* Introduced reference model
* Added saving/updating method to transclusion model
* Added getPartsList method to dm transclusion node, which caches the
result and invalidates the cache on update
* Added citation dialog, which extends transclusion dialog
* Added cite group to toolbars, cite-template in reference dialog toolbar
* Factored out getting the node to edit and saving changes procedures in
transclusion dialog so they could be extended in citation dialog
* Updated uses of autoAdd as per changes in oojs-ui (Ic353f91)
* Renamed MWDialogTool file since there was only one tool in it
* Expanded TransclusionDialogTool file out since there is now more logic
to it
* Switched to using ve.dm.MWReferenceModel instead of plain objects in
reference search widget
Configuration:
If you add to MediaWiki:Visualeditor-cite-tool-definition.json the
following code you will magically be presented with a delightful array
of citation options:
[
{ "name": "web", "icon": "ref-cite-web", "template": "Cite web" },
{ "name": "book", "icon": "ref-cite-book", "template": "Cite book" },
{ "name": "news", "icon": "ref-cite-news", "template": "Cite news" },
{ "name": "journal", "icon": "ref-cite-journal", "template": "Cite journal" }
]
...or...
[
{
"name": "any-name",
"icon": "any-ooui-icon",
"template": "Any template",
"title": "Any title text"
}
]
The title text is derived either from the title property or from the name
property by pre-pending the string 'visualeditor-cite-tool-name-' to
generate a message key. Titles for 'web', 'book', 'news' and 'journal' are
provided. The icon is a normal oo-ui-icon name, and more icons can be
added, as usual, by adding a class called .oo-ui-icon-{icon name} to
MediaWiki:Common.css. 'ref-cite-web', 'ref-cite-book', 'ref-cite-news'
and 'ref-cite-journal' are provided. The template name is simply the name
of the template without its namespace prefix.
Depends on Ic353f91 in oojs-ui
Bug: 50110
Bug: 50768
Change-Id: Id401d973b8d5fe2faec481cc777c17a24fd19dd4
2014-03-21 18:56:46 +00:00
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/ref-cite-news-rtl.svg );
|
Ultra-mega-hyper-citation editing on crack
Objectives:
* Allow users on-wiki to create tools and dialogs for citation templates
of their choosing
* Allow editing of citation templates directly, without having to go
through the reference dialog
* Provide citation template tools within reference editing that use the
same titles and icons as the citation tools do, but don't wrap the
inserted content in a ref tag
Changes:
* Reference list was cloning the DOM element it was inserting into its
view before the generated content node could finish rendering, so it
never ended up showing the finished rendering in the reference list
* Documenting hack about use of reference list node's destroy method,
and how we are depending on destroy not canceling generated content
rendering
* Introduced reference model
* Added saving/updating method to transclusion model
* Added getPartsList method to dm transclusion node, which caches the
result and invalidates the cache on update
* Added citation dialog, which extends transclusion dialog
* Added cite group to toolbars, cite-template in reference dialog toolbar
* Factored out getting the node to edit and saving changes procedures in
transclusion dialog so they could be extended in citation dialog
* Updated uses of autoAdd as per changes in oojs-ui (Ic353f91)
* Renamed MWDialogTool file since there was only one tool in it
* Expanded TransclusionDialogTool file out since there is now more logic
to it
* Switched to using ve.dm.MWReferenceModel instead of plain objects in
reference search widget
Configuration:
If you add to MediaWiki:Visualeditor-cite-tool-definition.json the
following code you will magically be presented with a delightful array
of citation options:
[
{ "name": "web", "icon": "ref-cite-web", "template": "Cite web" },
{ "name": "book", "icon": "ref-cite-book", "template": "Cite book" },
{ "name": "news", "icon": "ref-cite-news", "template": "Cite news" },
{ "name": "journal", "icon": "ref-cite-journal", "template": "Cite journal" }
]
...or...
[
{
"name": "any-name",
"icon": "any-ooui-icon",
"template": "Any template",
"title": "Any title text"
}
]
The title text is derived either from the title property or from the name
property by pre-pending the string 'visualeditor-cite-tool-name-' to
generate a message key. Titles for 'web', 'book', 'news' and 'journal' are
provided. The icon is a normal oo-ui-icon name, and more icons can be
added, as usual, by adding a class called .oo-ui-icon-{icon name} to
MediaWiki:Common.css. 'ref-cite-web', 'ref-cite-book', 'ref-cite-news'
and 'ref-cite-journal' are provided. The template name is simply the name
of the template without its namespace prefix.
Depends on Ic353f91 in oojs-ui
Bug: 50110
Bug: 50768
Change-Id: Id401d973b8d5fe2faec481cc777c17a24fd19dd4
2014-03-21 18:56:46 +00:00
|
|
|
}
|
|
|
|
|
2014-07-01 03:48:07 +00:00
|
|
|
/* @noflip */
|
2014-07-03 02:54:07 +00:00
|
|
|
.ve-ui-dir-block-ltr .oo-ui-icon-ref-cite-news,
|
|
|
|
/* HACK */ .ve-ui-surface-dir-ltr .oo-ui-icon-ref-cite-news,
|
|
|
|
/* HACK */ .oo-ui-ltr .oo-ui-icon-ref-cite-news {
|
Ultra-mega-hyper-citation editing on crack
Objectives:
* Allow users on-wiki to create tools and dialogs for citation templates
of their choosing
* Allow editing of citation templates directly, without having to go
through the reference dialog
* Provide citation template tools within reference editing that use the
same titles and icons as the citation tools do, but don't wrap the
inserted content in a ref tag
Changes:
* Reference list was cloning the DOM element it was inserting into its
view before the generated content node could finish rendering, so it
never ended up showing the finished rendering in the reference list
* Documenting hack about use of reference list node's destroy method,
and how we are depending on destroy not canceling generated content
rendering
* Introduced reference model
* Added saving/updating method to transclusion model
* Added getPartsList method to dm transclusion node, which caches the
result and invalidates the cache on update
* Added citation dialog, which extends transclusion dialog
* Added cite group to toolbars, cite-template in reference dialog toolbar
* Factored out getting the node to edit and saving changes procedures in
transclusion dialog so they could be extended in citation dialog
* Updated uses of autoAdd as per changes in oojs-ui (Ic353f91)
* Renamed MWDialogTool file since there was only one tool in it
* Expanded TransclusionDialogTool file out since there is now more logic
to it
* Switched to using ve.dm.MWReferenceModel instead of plain objects in
reference search widget
Configuration:
If you add to MediaWiki:Visualeditor-cite-tool-definition.json the
following code you will magically be presented with a delightful array
of citation options:
[
{ "name": "web", "icon": "ref-cite-web", "template": "Cite web" },
{ "name": "book", "icon": "ref-cite-book", "template": "Cite book" },
{ "name": "news", "icon": "ref-cite-news", "template": "Cite news" },
{ "name": "journal", "icon": "ref-cite-journal", "template": "Cite journal" }
]
...or...
[
{
"name": "any-name",
"icon": "any-ooui-icon",
"template": "Any template",
"title": "Any title text"
}
]
The title text is derived either from the title property or from the name
property by pre-pending the string 'visualeditor-cite-tool-name-' to
generate a message key. Titles for 'web', 'book', 'news' and 'journal' are
provided. The icon is a normal oo-ui-icon name, and more icons can be
added, as usual, by adding a class called .oo-ui-icon-{icon name} to
MediaWiki:Common.css. 'ref-cite-web', 'ref-cite-book', 'ref-cite-news'
and 'ref-cite-journal' are provided. The template name is simply the name
of the template without its namespace prefix.
Depends on Ic353f91 in oojs-ui
Bug: 50110
Bug: 50768
Change-Id: Id401d973b8d5fe2faec481cc777c17a24fd19dd4
2014-03-21 18:56:46 +00:00
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/ref-cite-news-ltr.svg );
|
Ultra-mega-hyper-citation editing on crack
Objectives:
* Allow users on-wiki to create tools and dialogs for citation templates
of their choosing
* Allow editing of citation templates directly, without having to go
through the reference dialog
* Provide citation template tools within reference editing that use the
same titles and icons as the citation tools do, but don't wrap the
inserted content in a ref tag
Changes:
* Reference list was cloning the DOM element it was inserting into its
view before the generated content node could finish rendering, so it
never ended up showing the finished rendering in the reference list
* Documenting hack about use of reference list node's destroy method,
and how we are depending on destroy not canceling generated content
rendering
* Introduced reference model
* Added saving/updating method to transclusion model
* Added getPartsList method to dm transclusion node, which caches the
result and invalidates the cache on update
* Added citation dialog, which extends transclusion dialog
* Added cite group to toolbars, cite-template in reference dialog toolbar
* Factored out getting the node to edit and saving changes procedures in
transclusion dialog so they could be extended in citation dialog
* Updated uses of autoAdd as per changes in oojs-ui (Ic353f91)
* Renamed MWDialogTool file since there was only one tool in it
* Expanded TransclusionDialogTool file out since there is now more logic
to it
* Switched to using ve.dm.MWReferenceModel instead of plain objects in
reference search widget
Configuration:
If you add to MediaWiki:Visualeditor-cite-tool-definition.json the
following code you will magically be presented with a delightful array
of citation options:
[
{ "name": "web", "icon": "ref-cite-web", "template": "Cite web" },
{ "name": "book", "icon": "ref-cite-book", "template": "Cite book" },
{ "name": "news", "icon": "ref-cite-news", "template": "Cite news" },
{ "name": "journal", "icon": "ref-cite-journal", "template": "Cite journal" }
]
...or...
[
{
"name": "any-name",
"icon": "any-ooui-icon",
"template": "Any template",
"title": "Any title text"
}
]
The title text is derived either from the title property or from the name
property by pre-pending the string 'visualeditor-cite-tool-name-' to
generate a message key. Titles for 'web', 'book', 'news' and 'journal' are
provided. The icon is a normal oo-ui-icon name, and more icons can be
added, as usual, by adding a class called .oo-ui-icon-{icon name} to
MediaWiki:Common.css. 'ref-cite-web', 'ref-cite-book', 'ref-cite-news'
and 'ref-cite-journal' are provided. The template name is simply the name
of the template without its namespace prefix.
Depends on Ic353f91 in oojs-ui
Bug: 50110
Bug: 50768
Change-Id: Id401d973b8d5fe2faec481cc777c17a24fd19dd4
2014-03-21 18:56:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.oo-ui-icon-ref-cite-web {
|
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/ref-cite-web.svg );
|
Ultra-mega-hyper-citation editing on crack
Objectives:
* Allow users on-wiki to create tools and dialogs for citation templates
of their choosing
* Allow editing of citation templates directly, without having to go
through the reference dialog
* Provide citation template tools within reference editing that use the
same titles and icons as the citation tools do, but don't wrap the
inserted content in a ref tag
Changes:
* Reference list was cloning the DOM element it was inserting into its
view before the generated content node could finish rendering, so it
never ended up showing the finished rendering in the reference list
* Documenting hack about use of reference list node's destroy method,
and how we are depending on destroy not canceling generated content
rendering
* Introduced reference model
* Added saving/updating method to transclusion model
* Added getPartsList method to dm transclusion node, which caches the
result and invalidates the cache on update
* Added citation dialog, which extends transclusion dialog
* Added cite group to toolbars, cite-template in reference dialog toolbar
* Factored out getting the node to edit and saving changes procedures in
transclusion dialog so they could be extended in citation dialog
* Updated uses of autoAdd as per changes in oojs-ui (Ic353f91)
* Renamed MWDialogTool file since there was only one tool in it
* Expanded TransclusionDialogTool file out since there is now more logic
to it
* Switched to using ve.dm.MWReferenceModel instead of plain objects in
reference search widget
Configuration:
If you add to MediaWiki:Visualeditor-cite-tool-definition.json the
following code you will magically be presented with a delightful array
of citation options:
[
{ "name": "web", "icon": "ref-cite-web", "template": "Cite web" },
{ "name": "book", "icon": "ref-cite-book", "template": "Cite book" },
{ "name": "news", "icon": "ref-cite-news", "template": "Cite news" },
{ "name": "journal", "icon": "ref-cite-journal", "template": "Cite journal" }
]
...or...
[
{
"name": "any-name",
"icon": "any-ooui-icon",
"template": "Any template",
"title": "Any title text"
}
]
The title text is derived either from the title property or from the name
property by pre-pending the string 'visualeditor-cite-tool-name-' to
generate a message key. Titles for 'web', 'book', 'news' and 'journal' are
provided. The icon is a normal oo-ui-icon name, and more icons can be
added, as usual, by adding a class called .oo-ui-icon-{icon name} to
MediaWiki:Common.css. 'ref-cite-web', 'ref-cite-book', 'ref-cite-news'
and 'ref-cite-journal' are provided. The template name is simply the name
of the template without its namespace prefix.
Depends on Ic353f91 in oojs-ui
Bug: 50110
Bug: 50768
Change-Id: Id401d973b8d5fe2faec481cc777c17a24fd19dd4
2014-03-21 18:56:46 +00:00
|
|
|
}
|
|
|
|
|
2013-10-09 20:09:59 +00:00
|
|
|
.oo-ui-icon-source {
|
2013-07-03 01:30:10 +00:00
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/source.svg );
|
2013-07-03 01:30:10 +00:00
|
|
|
}
|
2013-07-26 10:30:35 +00:00
|
|
|
|
2013-10-09 20:09:59 +00:00
|
|
|
.oo-ui-icon-template {
|
2013-07-26 10:30:35 +00:00
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/template.svg );
|
2013-07-26 10:30:35 +00:00
|
|
|
}
|
2014-09-18 19:49:22 +00:00
|
|
|
|
|
|
|
.oo-ui-icon-time {
|
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/time.svg );
|
2014-09-18 19:49:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.oo-ui-icon-public-domain {
|
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/public-domain.svg );
|
2014-09-18 19:49:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.oo-ui-icon-creative-commons {
|
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/creative-commons.svg );
|
2014-09-18 19:49:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.oo-ui-icon-profile {
|
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/profile.svg );
|
2014-09-18 19:49:22 +00:00
|
|
|
}
|
2015-04-28 15:26:42 +00:00
|
|
|
|
|
|
|
/* Link inpsector icons */
|
|
|
|
|
|
|
|
/* @noflip */
|
|
|
|
.ve-ui-dir-block-rtl .oo-ui-icon-page-disambiguation,
|
|
|
|
/* HACK */ .ve-ui-surface-dir-rtl .oo-ui-icon-page-disambiguation,
|
|
|
|
/* HACK */ .oo-ui-rtl .oo-ui-icon-page-disambiguation {
|
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/page-disambiguation-rtl.svg );
|
2015-04-28 15:26:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* @noflip */
|
|
|
|
.ve-ui-dir-block-ltr .oo-ui-icon-page-disambiguation,
|
|
|
|
/* HACK */ .ve-ui-surface-dir-ltr .oo-ui-icon-page-disambiguation,
|
|
|
|
/* HACK */ .oo-ui-ltr .oo-ui-icon-page-disambiguation {
|
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/page-disambiguation-ltr.svg );
|
2015-04-28 15:26:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* @noflip */
|
|
|
|
.ve-ui-dir-block-rtl .oo-ui-icon-page-existing,
|
|
|
|
/* HACK */ .ve-ui-surface-dir-rtl .oo-ui-icon-page-existing,
|
|
|
|
/* HACK */ .oo-ui-rtl .oo-ui-icon-page-existing {
|
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/page-existing-rtl.svg );
|
2015-04-28 15:26:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* @noflip */
|
|
|
|
.ve-ui-dir-block-ltr .oo-ui-icon-page-existing,
|
|
|
|
/* HACK */ .ve-ui-surface-dir-ltr .oo-ui-icon-page-existing,
|
|
|
|
/* HACK */ .oo-ui-ltr .oo-ui-icon-page-existing {
|
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/page-existing-ltr.svg );
|
2015-04-28 15:26:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* @noflip */
|
|
|
|
.ve-ui-dir-block-rtl .oo-ui-icon-page-not-found,
|
|
|
|
/* HACK */ .ve-ui-surface-dir-rtl .oo-ui-icon-page-not-found,
|
|
|
|
/* HACK */ .oo-ui-rtl .oo-ui-icon-page-not-found {
|
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/page-not-found-rtl.svg );
|
2015-04-28 15:26:42 +00:00
|
|
|
}
|
|
|
|
|
2015-08-26 23:05:37 +00:00
|
|
|
/* @noflip */
|
|
|
|
.ve-ui-dir-block-rtl .oo-ui-icon-page-not-found:lang(he),
|
|
|
|
/* HACK */ .ve-ui-surface-dir-rtl .oo-ui-icon-page-not-found:lang(he),
|
|
|
|
/* HACK */ .oo-ui-rtl .oo-ui-icon-page-not-found:lang(he) {
|
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/page-not-found-he-yi.svg );
|
2015-08-26 23:05:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* @noflip */
|
|
|
|
.ve-ui-dir-block-rtl .oo-ui-icon-page-not-found:lang(yi),
|
|
|
|
/* HACK */ .ve-ui-surface-dir-rtl .oo-ui-icon-page-not-found:lang(yi),
|
|
|
|
/* HACK */ .oo-ui-rtl .oo-ui-icon-page-not-found:lang(yi) {
|
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/page-not-found-he-yi.svg );
|
2015-08-26 23:05:37 +00:00
|
|
|
}
|
|
|
|
|
2015-04-28 15:26:42 +00:00
|
|
|
/* @noflip */
|
|
|
|
.ve-ui-dir-block-ltr .oo-ui-icon-page-not-found,
|
|
|
|
/* HACK */ .ve-ui-surface-dir-ltr .oo-ui-icon-page-not-found,
|
|
|
|
/* HACK */ .oo-ui-ltr .oo-ui-icon-page-not-found {
|
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/page-not-found-ltr.svg );
|
2015-04-28 15:26:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* @noflip */
|
|
|
|
.ve-ui-dir-block-rtl .oo-ui-icon-page-redirect,
|
|
|
|
/* HACK */ .ve-ui-surface-dir-rtl .oo-ui-icon-page-redirect,
|
|
|
|
/* HACK */ .oo-ui-rtl .oo-ui-icon-page-redirect {
|
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/page-redirect-rtl.svg );
|
2015-04-28 15:26:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* @noflip */
|
|
|
|
.ve-ui-dir-block-ltr .oo-ui-icon-page-redirect,
|
|
|
|
/* HACK */ .ve-ui-surface-dir-ltr .oo-ui-icon-page-redirect,
|
|
|
|
/* HACK */ .oo-ui-ltr .oo-ui-icon-page-redirect {
|
|
|
|
/* @embed */
|
2015-10-02 18:23:13 +00:00
|
|
|
background-image: url( images/icons/page-redirect-ltr.svg );
|
2015-04-28 15:26:42 +00:00
|
|
|
}
|