Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Meldinoor committed May 30, 2016
1 parent 213478c commit 64b7616
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "CurrencySelecter",
"version": "1.1.3",
"version": "1.1.4",
"authors": [
"Meldinoor <[email protected]>"
],
Expand Down
6 changes: 3 additions & 3 deletions app.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ module CurrencyModule {
bindToController: true,
controllerAs: 'ctrl',
controller: CurrencySelecterController,
scope: {disabled: '=ngDisabled'},
scope: {disabled: '=ngDisabled', defaultLabel: '='},
compile: function (element: ng.IAugmentedJQuery, attr: ng.IAttributes, transclude: ng.ITranscludeFunction) {
var preferredCurrencies: string[] = [];
var includeCurrencies: string[] = [];
Expand Down Expand Up @@ -238,7 +238,7 @@ module CurrencyModule {
var style = attr['style'] ? attr['style'] : '';

var options: string =
'<div class="' + dropdownClass + '" style="' + style + '"><button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" style="' + style + '; text-align: left; padding-left: 20px;" ng-disabled="ctrl.disabled">{{ctrl.ngModel.$viewValue}}<span class="caret" style="position: absolute; right: 10px; top: 48%;"></span></button>'
'<div class="' + dropdownClass + '" style="' + style + '"><button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" style="' + style + '; text-align: left; padding-left: 20px;" ng-disabled="ctrl.disabled">{{ctrl.ngModel.$viewValue ? ctrl.ngModel.$viewValue : ctrl.defaultValue}}<span class="caret" style="position: absolute; right: 10px; top: 48%;"></span></button>'
+ '<ul class="dropdown-menu currency-selecter-scrollable-menu" style="' + style + '">';

options += '<li><a href="" ng-click="ctrl.selectCurrency(\'\')" role="button">' + defaultLabel + '</a></li>';
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "CurrencySelecter",
"version": "1.1.3",
"version": "1.1.4",
"authors": [
"Meldinoor <[email protected]>"
],
Expand Down
6 changes: 3 additions & 3 deletions js/app.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions js/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ module CurrencyModule {
bindToController: true,
controllerAs: 'ctrl',
controller: CurrencySelecterController,
scope: {disabled: '=ngDisabled'},
scope: {disabled: '=ngDisabled', defaultLabel: '='},
compile: function (element: ng.IAugmentedJQuery, attr: ng.IAttributes, transclude: ng.ITranscludeFunction) {
var preferredCurrencies: string[] = [];
var includeCurrencies: string[] = [];
Expand Down Expand Up @@ -238,7 +238,7 @@ module CurrencyModule {
var style = attr['style'] ? attr['style'] : '';

var options: string =
'<div class="' + dropdownClass + '" style="' + style + '"><button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" style="' + style + '; text-align: left; padding-left: 20px;" ng-disabled="ctrl.disabled">{{ctrl.ngModel.$viewValue}}<span class="caret" style="position: absolute; right: 10px; top: 48%;"></span></button>'
'<div class="' + dropdownClass + '" style="' + style + '"><button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" style="' + style + '; text-align: left; padding-left: 20px;" ng-disabled="ctrl.disabled">{{ctrl.ngModel.$viewValue ? ctrl.ngModel.$viewValue : ctrl.defaultValue}}<span class="caret" style="position: absolute; right: 10px; top: 48%;"></span></button>'
+ '<ul class="dropdown-menu currency-selecter-scrollable-menu" style="' + style + '">';

options += '<li><a href="" ng-click="ctrl.selectCurrency(\'\')" role="button">' + defaultLabel + '</a></li>';
Expand Down

0 comments on commit 64b7616

Please sign in to comment.