[MediaWiki-commits] [Gerrit] (bug 45002) additional experts for jQuery.valueview - change (mediawiki...DataValues)

2013-04-08 Thread Henning Snater (Code Review)
Henning Snater has submitted this change and it was merged.

Change subject: (bug 45002) additional experts for jQuery.valueview
..


(bug 45002) additional experts for jQuery.valueview

* Introduction of a "BifidExpert" which is an abstract valueview expert 
definition which requires
  two other expert constructors in an implementation. The bifid expert will 
choose one of the two
  other experts depending on the valueview's current mode. This allows greater 
flexibility when
  defining new experts and allows for sharing code more efficiently.
* SuggestedStringValue expert which is basically a StringValue expert plus 
suggester jQuery
  widget on top. Also see the TODOs in the documentation.
* Introduces a "StaticDom" expert which can be used together with the 
"BifidExpert".
* Reintroduction of special handling for string data values that should match 
the CommonsMedia
  data type definition. This is done with a CommonsMediaType expert. This 
expert is combining the
  three experts described above.
* Added the commons media support to MediaWiki's default expert factory.

Change-Id: Ibf778f2ab544ec51f8f9574eb32aea82a5707caf
---
M ValueView/ValueView.resources.mw.php
M ValueView/ValueView.resources.php
A ValueView/resources/jquery.valueview/valueview.BifidExpert.js
A 
ValueView/resources/jquery.valueview/valueview.experts/experts.CommonsMediaType.js
A ValueView/resources/jquery.valueview/valueview.experts/experts.StaticDom.js
M ValueView/resources/jquery.valueview/valueview.experts/experts.StringValue.js
A 
ValueView/resources/jquery.valueview/valueview.experts/experts.SuggestedStringValue.js
M ValueView/resources/mw.ext.valueView.js
8 files changed, 438 insertions(+), 5 deletions(-)

Approvals:
  Henning Snater: Verified; Looks good to me, approved



diff --git a/ValueView/ValueView.resources.mw.php 
b/ValueView/ValueView.resources.mw.php
index 55227f3..8af3193 100644
--- a/ValueView/ValueView.resources.mw.php
+++ b/ValueView/ValueView.resources.mw.php
@@ -49,6 +49,7 @@
'dependencies' => array(
'jquery.valueview',
'jquery.valueview.experts.stringvalue',
+   'jquery.valueview.experts.commonsmediatype'
),
),
 
diff --git a/ValueView/ValueView.resources.php 
b/ValueView/ValueView.resources.php
index 9964c8c..f8c6032 100644
--- a/ValueView/ValueView.resources.php
+++ b/ValueView/ValueView.resources.php
@@ -143,6 +143,19 @@
'jquery.inputAutoExpand',
),
),
+
+   'jquery.valueview.experts.commonsmediatype' => $moduleTemplate 
+ array(
+   'scripts' => array(
+   'jquery.valueview/valueview.BifidExpert.js', // 
todo: define separate modules
+   
'jquery.valueview/valueview.experts/experts.StaticDom.js',
+   
'jquery.valueview/valueview.experts/experts.SuggestedStringValue.js',
+   
'jquery.valueview/valueview.experts/experts.CommonsMediaType.js',
+   ),
+   'dependencies' => array(
+   'jquery.valueview.experts.stringvalue',
+   'jquery.ui.suggester',
+   ),
+   ),
);
 
 } );
diff --git a/ValueView/resources/jquery.valueview/valueview.BifidExpert.js 
b/ValueView/resources/jquery.valueview/valueview.BifidExpert.js
new file mode 100644
index 000..04c0007
--- /dev/null
+++ b/ValueView/resources/jquery.valueview/valueview.BifidExpert.js
@@ -0,0 +1,167 @@
+/**
+ * @file
+ * @ingroup ValueView
+ * @licence GNU GPL v2+
+ * @author Daniel Werner < daniel.wer...@wikimedia.de >
+ */
+( function( dv, vp, $, vv ) {
+   'use strict';
+
+   var PARENT = vv.Expert;
+
+   /**
+* Abstract definition of a Valueview expert whose responsibilities are 
shared by two valueview
+* experts; one taking over during edit mode, one being responsible 
while in static mode.
+*
+* @since 0.1
+*
+* @abstract
+* @constructor
+* @extends jQuery.valueview.Expert
+*/
+   vv.BifidExpert = dv.util.inherit( PARENT, {
+   /**
+* Constructor for the valueview expert responsible during 
static mode.
+* @type Function
+*/
+   _staticExpert: null,
+
+   /**
+* Options map, the constructor of "_staticExpert" will be 
initialized with.
+*/
+   _staticExpertOptions: null,
+
+   /**
+* Constructor for the valueview expert responsible during edit 
mode.
+* @type Function
+*/
+   _editableExpert: null,
+
+

[MediaWiki-commits] [Gerrit] (bug 45002) additional experts for jQuery.valueview - change (mediawiki...DataValues)

2013-04-05 Thread Daniel Werner (Code Review)
Daniel Werner has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/57738


Change subject: (bug 45002) additional experts for jQuery.valueview
..

(bug 45002) additional experts for jQuery.valueview

* Introduction of a "BifidExpert" which is an abstract valueview expert 
definition which requires
  two other expert constructors in an implementation. The bifid expert will 
choose one of the two
  other experts depending on the valueview's current mode. This allows greater 
flexibility when
  defining new experts and allows for sharing code more efficiently.
* SuggestedStringValue expert which is basically a StringValue expert plus 
suggester jQuery
  widget on top. Also see the TODOs in the documentation.
* Introduces a "StaticDom" expert which can be used together with the 
"BifidExpert".
* Reintroduction of special handling for string data values that should match 
the CommonsMedia
  data type definition. This is done with a CommonsMediaType expert. This 
expert is combining the
  three experts described above.
* Added the commons media support to MediaWiki's default expert factory.

Change-Id: Ibf778f2ab544ec51f8f9574eb32aea82a5707caf
---
M ValueView/ValueView.resources.mw.php
M ValueView/ValueView.resources.php
A ValueView/resources/jquery.valueview/valueview.BifidExpert.js
A 
ValueView/resources/jquery.valueview/valueview.experts/experts.CommonsMediaType.js
A ValueView/resources/jquery.valueview/valueview.experts/experts.StaticDom.js
A 
ValueView/resources/jquery.valueview/valueview.experts/experts.SuggestedStringValue.js
M ValueView/resources/mw.ext.valueView.js
7 files changed, 424 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues 
refs/changes/38/57738/1

diff --git a/ValueView/ValueView.resources.mw.php 
b/ValueView/ValueView.resources.mw.php
index 55227f3..8af3193 100644
--- a/ValueView/ValueView.resources.mw.php
+++ b/ValueView/ValueView.resources.mw.php
@@ -49,6 +49,7 @@
'dependencies' => array(
'jquery.valueview',
'jquery.valueview.experts.stringvalue',
+   'jquery.valueview.experts.commonsmediatype'
),
),
 
diff --git a/ValueView/ValueView.resources.php 
b/ValueView/ValueView.resources.php
index 9964c8c..f8c6032 100644
--- a/ValueView/ValueView.resources.php
+++ b/ValueView/ValueView.resources.php
@@ -143,6 +143,19 @@
'jquery.inputAutoExpand',
),
),
+
+   'jquery.valueview.experts.commonsmediatype' => $moduleTemplate 
+ array(
+   'scripts' => array(
+   'jquery.valueview/valueview.BifidExpert.js', // 
todo: define separate modules
+   
'jquery.valueview/valueview.experts/experts.StaticDom.js',
+   
'jquery.valueview/valueview.experts/experts.SuggestedStringValue.js',
+   
'jquery.valueview/valueview.experts/experts.CommonsMediaType.js',
+   ),
+   'dependencies' => array(
+   'jquery.valueview.experts.stringvalue',
+   'jquery.ui.suggester',
+   ),
+   ),
);
 
 } );
diff --git a/ValueView/resources/jquery.valueview/valueview.BifidExpert.js 
b/ValueView/resources/jquery.valueview/valueview.BifidExpert.js
new file mode 100644
index 000..04c0007
--- /dev/null
+++ b/ValueView/resources/jquery.valueview/valueview.BifidExpert.js
@@ -0,0 +1,167 @@
+/**
+ * @file
+ * @ingroup ValueView
+ * @licence GNU GPL v2+
+ * @author Daniel Werner < daniel.wer...@wikimedia.de >
+ */
+( function( dv, vp, $, vv ) {
+   'use strict';
+
+   var PARENT = vv.Expert;
+
+   /**
+* Abstract definition of a Valueview expert whose responsibilities are 
shared by two valueview
+* experts; one taking over during edit mode, one being responsible 
while in static mode.
+*
+* @since 0.1
+*
+* @abstract
+* @constructor
+* @extends jQuery.valueview.Expert
+*/
+   vv.BifidExpert = dv.util.inherit( PARENT, {
+   /**
+* Constructor for the valueview expert responsible during 
static mode.
+* @type Function
+*/
+   _staticExpert: null,
+
+   /**
+* Options map, the constructor of "_staticExpert" will be 
initialized with.
+*/
+   _staticExpertOptions: null,
+
+   /**
+* Constructor for the valueview expert responsible during edit 
mode.
+* @type Function
+*/
+   _editableExpert: null,
+
+   /**

[MediaWiki-commits] [Gerrit] (bug 45002) additional experts for jQuery.valueview - change (mediawiki...DataValues)

2013-04-03 Thread Daniel Werner (Code Review)
Daniel Werner has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/57321


Change subject: (bug 45002) additional experts for jQuery.valueview
..

(bug 45002) additional experts for jQuery.valueview

* Introduction of a "BifidExpert" which is an abstract valueview expert 
definition which requires
  two other expert constructors in an implementation. The bifid expert will 
choose one of the two
  other experts depending on the valueview's current mode. This allows greater 
flexibility when
  defining new experts and allows for sharing code more efficiently.
* SuggestedStringValue expert which is basically a StringValue expert plus 
suggester jQuery
  widget on top. Also see the TODOs in the documentation.
* Introduces a "StaticDom" expert which can be used together with the 
"BifidExpert".
* Reintroduction of special handling for string data values that should match 
the CommonsMedia
  data type definition. This is done with a CommonsMediaType expert. This 
expert is combining the
  three experts described above.
* Added the commons media support to MediaWiki's default expert factory.

Change-Id: I980d54e0e8c60d704c36d10ea9096464c99bb525
---
M ValueView/ValueView.resources.mw.php
M ValueView/ValueView.resources.php
A ValueView/resources/jquery.valueview/valueview.BifidExpert.js
A 
ValueView/resources/jquery.valueview/valueview.experts/experts.CommonsMediaType.js
A ValueView/resources/jquery.valueview/valueview.experts/experts.StaticDom.js
A 
ValueView/resources/jquery.valueview/valueview.experts/experts.SuggestedStringValue.js
M ValueView/resources/mw.ext.valueView.js
7 files changed, 424 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues 
refs/changes/21/57321/1

diff --git a/ValueView/ValueView.resources.mw.php 
b/ValueView/ValueView.resources.mw.php
index 55227f3..8af3193 100644
--- a/ValueView/ValueView.resources.mw.php
+++ b/ValueView/ValueView.resources.mw.php
@@ -49,6 +49,7 @@
'dependencies' => array(
'jquery.valueview',
'jquery.valueview.experts.stringvalue',
+   'jquery.valueview.experts.commonsmediatype'
),
),
 
diff --git a/ValueView/ValueView.resources.php 
b/ValueView/ValueView.resources.php
index 9964c8c..f8c6032 100644
--- a/ValueView/ValueView.resources.php
+++ b/ValueView/ValueView.resources.php
@@ -143,6 +143,19 @@
'jquery.inputAutoExpand',
),
),
+
+   'jquery.valueview.experts.commonsmediatype' => $moduleTemplate 
+ array(
+   'scripts' => array(
+   'jquery.valueview/valueview.BifidExpert.js', // 
todo: define separate modules
+   
'jquery.valueview/valueview.experts/experts.StaticDom.js',
+   
'jquery.valueview/valueview.experts/experts.SuggestedStringValue.js',
+   
'jquery.valueview/valueview.experts/experts.CommonsMediaType.js',
+   ),
+   'dependencies' => array(
+   'jquery.valueview.experts.stringvalue',
+   'jquery.ui.suggester',
+   ),
+   ),
);
 
 } );
diff --git a/ValueView/resources/jquery.valueview/valueview.BifidExpert.js 
b/ValueView/resources/jquery.valueview/valueview.BifidExpert.js
new file mode 100644
index 000..04c0007
--- /dev/null
+++ b/ValueView/resources/jquery.valueview/valueview.BifidExpert.js
@@ -0,0 +1,167 @@
+/**
+ * @file
+ * @ingroup ValueView
+ * @licence GNU GPL v2+
+ * @author Daniel Werner < daniel.wer...@wikimedia.de >
+ */
+( function( dv, vp, $, vv ) {
+   'use strict';
+
+   var PARENT = vv.Expert;
+
+   /**
+* Abstract definition of a Valueview expert whose responsibilities are 
shared by two valueview
+* experts; one taking over during edit mode, one being responsible 
while in static mode.
+*
+* @since 0.1
+*
+* @abstract
+* @constructor
+* @extends jQuery.valueview.Expert
+*/
+   vv.BifidExpert = dv.util.inherit( PARENT, {
+   /**
+* Constructor for the valueview expert responsible during 
static mode.
+* @type Function
+*/
+   _staticExpert: null,
+
+   /**
+* Options map, the constructor of "_staticExpert" will be 
initialized with.
+*/
+   _staticExpertOptions: null,
+
+   /**
+* Constructor for the valueview expert responsible during edit 
mode.
+* @type Function
+*/
+   _editableExpert: null,
+
+   /**

[MediaWiki-commits] [Gerrit] (bug 45002) additional experts for jQuery.valueview - change (mediawiki...DataValues)

2013-04-02 Thread Daniel Werner (Code Review)
Daniel Werner has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/57051


Change subject: (bug 45002) additional experts for jQuery.valueview
..

(bug 45002) additional experts for jQuery.valueview

* Introduction of a "BifidExpert" which is an abstract valueview expert 
definition which requires
  two other expert constructors in an implementation. The bifid expert will 
choose one of the two
  other experts depending on the valueview's current mode. This allows greater 
flexibility when
  defining new experts and allows for sharing code more efficiently.
* SuggestedStringValue expert which is basically a StringValue expert plus 
suggester jQuery
  widget on top. Also see the TODOs in the documentation.
* Introduces a "StaticDom" expert which can be used together with the 
"BifidExpert".
* Reintroduction of special handling for string data values that should match 
the CommonsMedia
  data type definition. This is done with a CommonsMediaType expert. This 
expert is combining the
  three experts described above.
* Added the commons media support to MediaWiki's default expert factory.

Change-Id: I09cd9f42ca1a22f11ff102a18e56321b451eed34
---
M ValueView/ValueView.resources.mw.php
M ValueView/ValueView.resources.php
A ValueView/resources/jquery.valueview/valueview.BifidExpert.js
A 
ValueView/resources/jquery.valueview/valueview.experts/experts.CommonsMediaType.js
A ValueView/resources/jquery.valueview/valueview.experts/experts.StaticDom.js
A 
ValueView/resources/jquery.valueview/valueview.experts/experts.SuggestedStringValue.js
M ValueView/resources/mw.ext.valueView.js
7 files changed, 424 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues 
refs/changes/51/57051/1

diff --git a/ValueView/ValueView.resources.mw.php 
b/ValueView/ValueView.resources.mw.php
index 55227f3..8af3193 100644
--- a/ValueView/ValueView.resources.mw.php
+++ b/ValueView/ValueView.resources.mw.php
@@ -49,6 +49,7 @@
'dependencies' => array(
'jquery.valueview',
'jquery.valueview.experts.stringvalue',
+   'jquery.valueview.experts.commonsmediatype'
),
),
 
diff --git a/ValueView/ValueView.resources.php 
b/ValueView/ValueView.resources.php
index 9964c8c..f8c6032 100644
--- a/ValueView/ValueView.resources.php
+++ b/ValueView/ValueView.resources.php
@@ -143,6 +143,19 @@
'jquery.inputAutoExpand',
),
),
+
+   'jquery.valueview.experts.commonsmediatype' => $moduleTemplate 
+ array(
+   'scripts' => array(
+   'jquery.valueview/valueview.BifidExpert.js', // 
todo: define separate modules
+   
'jquery.valueview/valueview.experts/experts.StaticDom.js',
+   
'jquery.valueview/valueview.experts/experts.SuggestedStringValue.js',
+   
'jquery.valueview/valueview.experts/experts.CommonsMediaType.js',
+   ),
+   'dependencies' => array(
+   'jquery.valueview.experts.stringvalue',
+   'jquery.ui.suggester',
+   ),
+   ),
);
 
 } );
diff --git a/ValueView/resources/jquery.valueview/valueview.BifidExpert.js 
b/ValueView/resources/jquery.valueview/valueview.BifidExpert.js
new file mode 100644
index 000..04c0007
--- /dev/null
+++ b/ValueView/resources/jquery.valueview/valueview.BifidExpert.js
@@ -0,0 +1,167 @@
+/**
+ * @file
+ * @ingroup ValueView
+ * @licence GNU GPL v2+
+ * @author Daniel Werner < daniel.wer...@wikimedia.de >
+ */
+( function( dv, vp, $, vv ) {
+   'use strict';
+
+   var PARENT = vv.Expert;
+
+   /**
+* Abstract definition of a Valueview expert whose responsibilities are 
shared by two valueview
+* experts; one taking over during edit mode, one being responsible 
while in static mode.
+*
+* @since 0.1
+*
+* @abstract
+* @constructor
+* @extends jQuery.valueview.Expert
+*/
+   vv.BifidExpert = dv.util.inherit( PARENT, {
+   /**
+* Constructor for the valueview expert responsible during 
static mode.
+* @type Function
+*/
+   _staticExpert: null,
+
+   /**
+* Options map, the constructor of "_staticExpert" will be 
initialized with.
+*/
+   _staticExpertOptions: null,
+
+   /**
+* Constructor for the valueview expert responsible during edit 
mode.
+* @type Function
+*/
+   _editableExpert: null,
+
+   /**