Skip to content

Commit

Permalink
Merge pull request #181 from wmde/release0151
Browse files Browse the repository at this point in the history
Fix minor issues in UnitSelector and related
  • Loading branch information
JonasKress committed Aug 20, 2015
2 parents 665f9a2 + d64a8d9 commit e36e184
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 13 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,15 @@ Other methods an `Expert` needs to provide:

## Release notes

### 0.15.1 (2015-08-20)

#### Enhancements
* `jQuery.valueview.experts.QuantityInput` also submits the `unit` option if it's null.

#### Bugfixes
* `jQuery.ui.unitsuggester` now queries the `wbsearchentities` API for a specific language.
* Fixed `jQuery.valueview.ExpertExtender.UnitSelector.destroy`.

### 0.15.0 (2015-08-19)

#### Breaking changes
Expand Down
2 changes: 1 addition & 1 deletion ValueView.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
return 1;
}

define( 'VALUEVIEW_VERSION', '0.15.0' );
define( 'VALUEVIEW_VERSION', '0.15.1' );

// Include the composer autoloader if it is present.
if ( is_readable( __DIR__ . '/vendor/autoload.php' ) ) {
Expand Down
1 change: 1 addition & 0 deletions lib/jquery.ui/jquery.ui.unitsuggester.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ $.widget( 'wikibase.unitsuggester', PARENT, {
search: term,
format: 'json',
language: this.options.language,
uselang: this.options.language,
type: 'item'
};
},
Expand Down
5 changes: 3 additions & 2 deletions src/ExpertExtender/ExpertExtender.UnitSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,11 @@
* Callback for the `destroy` `ExpertExtender` event.
*/
destroy: function() {
this._getUpstreamValue = null;
this.$selector = null;
this._messageProvider = null;
this._getUpstreamValue = null;
this._onValueChange = null;
this._options = null;
this.$selector = null;
},

/**
Expand Down
13 changes: 3 additions & 10 deletions src/experts/QuantityInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,9 @@
* @inheritdoc
*/
valueCharacteristics: function() {
var options = {};

if( this._unitSelector ) {
var unit = this._unitSelector.getConceptUri();
if( unit ) {
options.unit = unit;
}
}

return options;
return {
unit: this._unitSelector && this._unitSelector.getConceptUri() || null
};
},

/**
Expand Down

0 comments on commit e36e184

Please sign in to comment.