Skip to content

Commit

Permalink
fix options filling in select
Browse files Browse the repository at this point in the history
  • Loading branch information
toniher committed Sep 18, 2015
1 parent 87ea546 commit 0a95764
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Original code from https://code.google.com/p/semanticformsselect/downloads/list

## Installation

The recommended way to install Semantic Signup is by using [Composer][composer] with an entry in MediaWiki's `composer.json`.
The recommended way to install Semantic Forms Select is by using [Composer][composer] with an entry in MediaWiki's `composer.json`.

```json
{
Expand Down
2 changes: 1 addition & 1 deletion SemanticFormsSelect.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
'author' =>array( '[http://www.mediawiki.org/wiki/User:Jasonzhang Jasonzhang]', 'Toniher'),
'url' => 'https://www.mediawiki.org/wiki/Extension:SemanticFormsSelect',
'description' => 'Generate a select field in Semantic Form which values are from query',
'version' => 1.2,
'version' => '1.2.1',
);

//$wgAjaxExportList[] = "QueryExecution";
Expand Down
5 changes: 2 additions & 3 deletions scriptSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,8 @@ function SFSelect_setDependentValues (nameobj, fobj, values){
selectedValues=[selectedValues];
}

element.options.length=values.length+1;
//add an empty value so that end user can select none
element.options[0]=new Option("");
element.options.length=values.length;

var newselected=[];

if ( fobj.label ) {
Expand Down

0 comments on commit 0a95764

Please sign in to comment.