[MediaWiki-commits] [Gerrit] [coordinate.js] Implemented list rotator to set precision - change (mediawiki...DataValues)
Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/66089 Change subject: [coordinate.js] Implemented list rotator to set precision .. [coordinate.js] Implemented list rotator to set precision A list rotator widget instance may be used to adjust the automatically detected coordinate precision. Change-Id: I00af947ac30a26cdac76fbe7f6eb23d6e3164f05 --- M ValueView/ValueView.i18n.php M ValueView/ValueView.resources.php A ValueView/resources/jquery.valueview/valueview.experts/experts.CoordinateInput.css M ValueView/resources/jquery.valueview/valueview.experts/experts.CoordinateInput.js 4 files changed, 136 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues refs/changes/89/66089/1 diff --git a/ValueView/ValueView.i18n.php b/ValueView/ValueView.i18n.php index e1962c9..b4a93b3 100644 --- a/ValueView/ValueView.i18n.php +++ b/ValueView/ValueView.i18n.php @@ -45,6 +45,9 @@ // EmptyValue expert: 'valueview-expert-emptyvalue-empty' = 'empty', + // CoordinateInput expert: + 'valueview-expert-coordinateinput-precision' = 'Precision:', + // TimeInput expert: 'valueview-expert-timeinput-precision' = 'Precision:', 'valueview-expert-timeinput-calendar' = 'Calendar:', @@ -76,6 +79,7 @@ * $1 - the name of the data type which lacks support', 'valueview-expert-emptyvalue-empty' = 'Message expressing that there is currently no value set in a jQuery valueview. {{Identical|Empty}}', + 'valueview-expert-coordinateinput-precision' = 'Label for the user interface element used to set a specific precision (e.g. 1, 0.1, 0.001) when entering a coordinate value.', 'valueview-expert-timeinput-precision' = 'Label for the user interface element used to set a specific precision (e.g. hour, day, month, year) when entering a time value.', 'valueview-expert-timeinput-calendar' = 'Label for the user interface element used to select a specific calendar (e.g. Gregorian, Julian) entering a time value. diff --git a/ValueView/ValueView.resources.php b/ValueView/ValueView.resources.php index e55a3b5..c1e4f85 100644 --- a/ValueView/ValueView.resources.php +++ b/ValueView/ValueView.resources.php @@ -210,6 +210,7 @@ 'jquery.valueview.preview', ), 'messages' = array( + 'valueview-expert-coordinateinput-precision', 'valueview-preview-label', 'valueview-preview-novalue', ), @@ -219,6 +220,9 @@ 'scripts' = array( 'jquery.valueview/valueview.experts/experts.CoordinateValue.js', ), + 'styles' = array( + 'jquery.valueview/valueview.experts/experts.CoordinateInput.css', + ), 'dependencies' = array( 'jquery.valueview.experts.staticdom', 'jquery.valueview.BifidExpert', diff --git a/ValueView/resources/jquery.valueview/valueview.experts/experts.CoordinateInput.css b/ValueView/resources/jquery.valueview/valueview.experts/experts.CoordinateInput.css new file mode 100644 index 000..cc34775 --- /dev/null +++ b/ValueView/resources/jquery.valueview/valueview.experts/experts.CoordinateInput.css @@ -0,0 +1,23 @@ +/** + * Styles for valueview's CoordinateInput expert. + * + * @since 0.1 + * @file + * @ingroup ValueView + * + * @license GNU GPL v2+ + * @author H. Snater mediaw...@snater.com + */ + +.valueview-expert-coordinateinput-input { + width: 100%; +} + +.ui-inputextender-extension .valueview-expert-coordinateinput-advancedtoggler { + border: none; + background: none; + margin-top: 0.5em; + padding-top: 0.5em; + border-top: 1px dashed #CCC; + width: 100%; +} diff --git a/ValueView/resources/jquery.valueview/valueview.experts/experts.CoordinateInput.js b/ValueView/resources/jquery.valueview/valueview.experts/experts.CoordinateInput.js index 4fa6ff2..9664bf8 100644 --- a/ValueView/resources/jquery.valueview/valueview.experts/experts.CoordinateInput.js +++ b/ValueView/resources/jquery.valueview/valueview.experts/experts.CoordinateInput.js @@ -5,8 +5,12 @@ * * @author H. Snater mediaw...@snater.com */ -( function( dv, vp, $, vv, Coordinate ) { +// TODO: Remove mediaWiki dependency +( function( dv, vp, $, vv, coordinate, mw ) { 'use strict'; + + var Coordinate = coordinate.Coordinate, + coordinateSettings = coordinate.settings; var PARENT = vv.Expert; @@ -41,10 +45,63 @@ preview: null, /** +* Container node for precision input
[MediaWiki-commits] [Gerrit] [coordinate.js] Implemented list rotator to set precision - change (mediawiki...DataValues)
Daniel Werner has submitted this change and it was merged. Change subject: [coordinate.js] Implemented list rotator to set precision .. [coordinate.js] Implemented list rotator to set precision A list rotator widget instance may be used to adjust the automatically detected coordinate precision. Change-Id: I00af947ac30a26cdac76fbe7f6eb23d6e3164f05 --- M ValueView/ValueView.i18n.php M ValueView/ValueView.resources.php A ValueView/resources/jquery.valueview/valueview.experts/experts.CoordinateInput.css M ValueView/resources/jquery.valueview/valueview.experts/experts.CoordinateInput.js 4 files changed, 136 insertions(+), 3 deletions(-) Approvals: Daniel Werner: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/ValueView/ValueView.i18n.php b/ValueView/ValueView.i18n.php index e1962c9..b4a93b3 100644 --- a/ValueView/ValueView.i18n.php +++ b/ValueView/ValueView.i18n.php @@ -45,6 +45,9 @@ // EmptyValue expert: 'valueview-expert-emptyvalue-empty' = 'empty', + // CoordinateInput expert: + 'valueview-expert-coordinateinput-precision' = 'Precision:', + // TimeInput expert: 'valueview-expert-timeinput-precision' = 'Precision:', 'valueview-expert-timeinput-calendar' = 'Calendar:', @@ -76,6 +79,7 @@ * $1 - the name of the data type which lacks support', 'valueview-expert-emptyvalue-empty' = 'Message expressing that there is currently no value set in a jQuery valueview. {{Identical|Empty}}', + 'valueview-expert-coordinateinput-precision' = 'Label for the user interface element used to set a specific precision (e.g. 1, 0.1, 0.001) when entering a coordinate value.', 'valueview-expert-timeinput-precision' = 'Label for the user interface element used to set a specific precision (e.g. hour, day, month, year) when entering a time value.', 'valueview-expert-timeinput-calendar' = 'Label for the user interface element used to select a specific calendar (e.g. Gregorian, Julian) entering a time value. diff --git a/ValueView/ValueView.resources.php b/ValueView/ValueView.resources.php index e55a3b5..c1e4f85 100644 --- a/ValueView/ValueView.resources.php +++ b/ValueView/ValueView.resources.php @@ -210,6 +210,7 @@ 'jquery.valueview.preview', ), 'messages' = array( + 'valueview-expert-coordinateinput-precision', 'valueview-preview-label', 'valueview-preview-novalue', ), @@ -219,6 +220,9 @@ 'scripts' = array( 'jquery.valueview/valueview.experts/experts.CoordinateValue.js', ), + 'styles' = array( + 'jquery.valueview/valueview.experts/experts.CoordinateInput.css', + ), 'dependencies' = array( 'jquery.valueview.experts.staticdom', 'jquery.valueview.BifidExpert', diff --git a/ValueView/resources/jquery.valueview/valueview.experts/experts.CoordinateInput.css b/ValueView/resources/jquery.valueview/valueview.experts/experts.CoordinateInput.css new file mode 100644 index 000..cc34775 --- /dev/null +++ b/ValueView/resources/jquery.valueview/valueview.experts/experts.CoordinateInput.css @@ -0,0 +1,23 @@ +/** + * Styles for valueview's CoordinateInput expert. + * + * @since 0.1 + * @file + * @ingroup ValueView + * + * @license GNU GPL v2+ + * @author H. Snater mediaw...@snater.com + */ + +.valueview-expert-coordinateinput-input { + width: 100%; +} + +.ui-inputextender-extension .valueview-expert-coordinateinput-advancedtoggler { + border: none; + background: none; + margin-top: 0.5em; + padding-top: 0.5em; + border-top: 1px dashed #CCC; + width: 100%; +} diff --git a/ValueView/resources/jquery.valueview/valueview.experts/experts.CoordinateInput.js b/ValueView/resources/jquery.valueview/valueview.experts/experts.CoordinateInput.js index 4fa6ff2..9664bf8 100644 --- a/ValueView/resources/jquery.valueview/valueview.experts/experts.CoordinateInput.js +++ b/ValueView/resources/jquery.valueview/valueview.experts/experts.CoordinateInput.js @@ -5,8 +5,12 @@ * * @author H. Snater mediaw...@snater.com */ -( function( dv, vp, $, vv, Coordinate ) { +// TODO: Remove mediaWiki dependency +( function( dv, vp, $, vv, coordinate, mw ) { 'use strict'; + + var Coordinate = coordinate.Coordinate, + coordinateSettings = coordinate.settings; var PARENT = vv.Expert; @@ -41,10 +45,63 @@ preview: null, /** +* Container node for precision input and label. +* @type {jQuery} +