Aude has uploaded a new change for review.
https://gerrit.wikimedia.org/r/219166
Change subject: Fix handling of deleted property text in references + qualifiers
......................................................................
Fix handling of deleted property text in references + qualifiers
@todo: fix handling of the values on references and qualifiers
with deleted property.
Change-Id: I025d858ae43b313bc8f12dcf4a2e5a3069ba6d69
---
M view/resources/jquery/wikibase/snakview/snakview.js
M view/resources/jquery/wikibase/snakview/snakview.variations.Value.js
2 files changed, 2 insertions(+), 17 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/66/219166/1
diff --git a/view/resources/jquery/wikibase/snakview/snakview.js
b/view/resources/jquery/wikibase/snakview/snakview.js
index 2a1bd71..de8a123 100644
--- a/view/resources/jquery/wikibase/snakview/snakview.js
+++ b/view/resources/jquery/wikibase/snakview/snakview.js
@@ -734,7 +734,7 @@
this.options.entityStore.get( propertyId )
.done( function( fetchedProperty ) {
deferred.resolve( self._createPropertyDOM(
- fetchedProperty ?
fetchedProperty.getContent() : undefined,
+ fetchedProperty ?
fetchedProperty.getContent() : propertyId,
fetchedProperty ?
fetchedProperty.getTitle() : undefined
) );
} )
diff --git
a/view/resources/jquery/wikibase/snakview/snakview.variations.Value.js
b/view/resources/jquery/wikibase/snakview/snakview.variations.Value.js
index fea0e98..359e178 100644
--- a/view/resources/jquery/wikibase/snakview/snakview.variations.Value.js
+++ b/view/resources/jquery/wikibase/snakview/snakview.variations.Value.js
@@ -331,23 +331,8 @@
this._valueView = null;
this.$viewPort.empty();
}
+
$valueViewDom = this.$viewPort.wrapInner( '<div/>'
).children();
-
- // Can't choose a view for displaying empty value
without indication by data type
- // definition which kind of value should be creatable
by the new valueview.
- // NOTE: We run into this situation if we have a Snak
which is using a deleted property,
- // so the DataType can not be determined while we
still want to display the valueview.
- if( !dataType && dataValue === null ) {
- // This message will be shown if the initial
value uses a different Snak type but
- // the user tries to change the snak type to
value Snak. This simply doesn't make
- // any sense since we have no indicator for
what kind of value should be entered
- // if the Property doesn't provide us with that
info.
- $valueViewDom
- .text( mw.msg(
'wikibase-snakview-variation-nonewvaluefordeletedproperty' ) )
- .addClass( this.variationBaseClass +
'-nonewvaluefordeletedproperty' );
-
- return false; // no valueview created!
- }
this._valueView = this._valueViewBuilder.initValueView(
$valueViewDom,
--
To view, visit https://gerrit.wikimedia.org/r/219166
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I025d858ae43b313bc8f12dcf4a2e5a3069ba6d69
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits