Skip to content

Commit e36e184

Browse files
committed
Merge pull request #181 from wmde/release0151
Fix minor issues in UnitSelector and related
2 parents 665f9a2 + d64a8d9 commit e36e184

File tree

5 files changed

+17
-13
lines changed

5 files changed

+17
-13
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,15 @@ Other methods an `Expert` needs to provide:
105105

106106
## Release notes
107107

108+
### 0.15.1 (2015-08-20)
109+
110+
#### Enhancements
111+
* `jQuery.valueview.experts.QuantityInput` also submits the `unit` option if it's null.
112+
113+
#### Bugfixes
114+
* `jQuery.ui.unitsuggester` now queries the `wbsearchentities` API for a specific language.
115+
* Fixed `jQuery.valueview.ExpertExtender.UnitSelector.destroy`.
116+
108117
### 0.15.0 (2015-08-19)
109118

110119
#### Breaking changes

ValueView.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
return 1;
66
}
77

8-
define( 'VALUEVIEW_VERSION', '0.15.0' );
8+
define( 'VALUEVIEW_VERSION', '0.15.1' );
99

1010
// Include the composer autoloader if it is present.
1111
if ( is_readable( __DIR__ . '/vendor/autoload.php' ) ) {

lib/jquery.ui/jquery.ui.unitsuggester.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ $.widget( 'wikibase.unitsuggester', PARENT, {
151151
search: term,
152152
format: 'json',
153153
language: this.options.language,
154+
uselang: this.options.language,
154155
type: 'item'
155156
};
156157
},

src/ExpertExtender/ExpertExtender.UnitSelector.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,11 @@
9898
* Callback for the `destroy` `ExpertExtender` event.
9999
*/
100100
destroy: function() {
101-
this._getUpstreamValue = null;
102-
this.$selector = null;
103101
this._messageProvider = null;
102+
this._getUpstreamValue = null;
104103
this._onValueChange = null;
104+
this._options = null;
105+
this.$selector = null;
105106
},
106107

107108
/**

src/experts/QuantityInput.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,9 @@
4848
* @inheritdoc
4949
*/
5050
valueCharacteristics: function() {
51-
var options = {};
52-
53-
if( this._unitSelector ) {
54-
var unit = this._unitSelector.getConceptUri();
55-
if( unit ) {
56-
options.unit = unit;
57-
}
58-
}
59-
60-
return options;
51+
return {
52+
unit: this._unitSelector && this._unitSelector.getConceptUri() || null
53+
};
6154
},
6255

6356
/**

0 commit comments

Comments
 (0)