jenkins-bot has submitted this change and it was merged.

Change subject: Adapt to changes in data-model-javascript 0.2.0
......................................................................


Adapt to changes in data-model-javascript 0.2.0

Change-Id: Ic431180db6cac0540242c24887487eab82367b26
---
M composer.json
M lib/resources/Resources.php
M 
lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.variations.Value.js
M 
lib/resources/wikibase.serialization/serialization.EntityUnserializer.propertyExpert.js
4 files changed, 13 insertions(+), 8 deletions(-)

Approvals:
  WikidataJenkins: Verified
  Thiemo Mättig (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/composer.json b/composer.json
index 9bcc2d4..3df78c5 100644
--- a/composer.json
+++ b/composer.json
@@ -36,7 +36,7 @@
                "data-values/value-view": "~0.6.3",
 
                "wikibase/data-model": "~0.8.1",
-               "wikibase/data-model-javascript": "~0.1.0",
+               "wikibase/data-model-javascript": "~0.2.0",
                "wikibase/internal-serialization": "~1.1",
 
                "diff/diff": "~1.0",
diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php
index 6c317ae..80f0f68 100644
--- a/lib/resources/Resources.php
+++ b/lib/resources/Resources.php
@@ -106,7 +106,6 @@
                                'util.inherit',
                                'wikibase.serialization',
                                'wikibase.datamodel',
-                               'wikibase.dataTypes',
                        )
                ),
 
@@ -545,6 +544,7 @@
                                'mediawiki.legacy.shared',
                                'util.inherit',
                                'wikibase.datamodel',
+                               'wikibase.dataTypes',
                                'wikibase.experts',
                                'wikibase.formatters',
                                'wikibase.parsers',
diff --git 
a/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.variations.Value.js
 
b/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.variations.Value.js
index d4b5053..f254169 100644
--- 
a/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.variations.Value.js
+++ 
b/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.variations.Value.js
@@ -2,7 +2,7 @@
  * @licence GNU GPL v2+
  * @author Daniel Werner < [email protected] >
  */
-( function( mw, wb, $, expertStore, formatterStore, parserStore ) {
+( function( mw, wb, $, expertStore, formatterStore, parserStore, dataTypeStore 
) {
        'use strict';
 
        var MODULE = $.wikibase.snakview.variations,
@@ -167,9 +167,14 @@
                                        // If the set property is not there, we 
have to display a warning. This can
                                        // happen if a property got deleted but 
the Snaks using it didn't change the
                                        // property.
-                                       var dataType = fetchedProperty
+                                       var dataTypeId = fetchedProperty
                                                ? 
fetchedProperty.getContent().getDataType()
                                                : false;
+                                       var dataType = false;
+
+                                       if( dataTypeId ) {
+                                               dataType = 
dataTypeStore.getDataType( dataTypeId );
+                                       }
 
                                        // If the new value's type is not the 
data value type used by the Snak's
                                        // property data type, something is 
very wrong. Display warning!
@@ -358,4 +363,4 @@
                }
        } );
 
-}( mediaWiki, wikibase, jQuery, wikibase.experts.store, 
wikibase.formatters.store, wikibase.parsers.store ) );
+}( mediaWiki, wikibase, jQuery, wikibase.experts.store, 
wikibase.formatters.store, wikibase.parsers.store, wikibase.dataTypes ) );
diff --git 
a/lib/resources/wikibase.serialization/serialization.EntityUnserializer.propertyExpert.js
 
b/lib/resources/wikibase.serialization/serialization.EntityUnserializer.propertyExpert.js
index 995a854..387ce23 100644
--- 
a/lib/resources/wikibase.serialization/serialization.EntityUnserializer.propertyExpert.js
+++ 
b/lib/resources/wikibase.serialization/serialization.EntityUnserializer.propertyExpert.js
@@ -2,7 +2,7 @@
  * @licence GNU GPL v2+
  * @author Daniel Werner < [email protected] >
  */
-( function( wb, util, dataTypeStore ) {
+( function( wb, util ) {
        'use strict';
 
        var MODULE = wb.serialization,
@@ -30,7 +30,7 @@
                        }
 
                        return {
-                               datatype: dataTypeStore.getDataType( 
serialization.datatype )
+                               datatype: dataTypeId
                        };
                }
        } );
@@ -41,4 +41,4 @@
                PropertyUnserializationExpert
        );
 
-}( wikibase, util, wikibase.dataTypes ) );
+}( wikibase, util ) );

-- 
To view, visit https://gerrit.wikimedia.org/r/142209
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic431180db6cac0540242c24887487eab82367b26
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang <[email protected]>
Gerrit-Reviewer: Adrian Lang <[email protected]>
Gerrit-Reviewer: Henning Snater <[email protected]>
Gerrit-Reviewer: Jeroen De Dauw <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: WikidataJenkins <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to