Skip to content

Commit

Permalink
Merge pull request #121 from neurospeech/dev
Browse files Browse the repository at this point in the history
Fixed AtomListBox for SELECT
  • Loading branch information
ackava committed Jul 28, 2015
2 parents ff66dd5 + fed25ef commit 8171bc0
Show file tree
Hide file tree
Showing 7 changed files with 112 additions and 61 deletions.
73 changes: 45 additions & 28 deletions atoms-debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -7186,34 +7186,51 @@ this.setLocalValue('src', Atom.get(this,'templateParent.url'), e);

/*Line 87 - 'AtomListBox.js' */ },

/*Line 89 - 'AtomListBox.js' */ init: function () {

/*Line 91 - 'AtomListBox.js' */ this.setClass();

/*Line 93 - 'AtomListBox.js' */ baseType.init.call(this);
/*Line 94 - 'AtomListBox.js' */ var self = this;

/*Line 96 - 'AtomListBox.js' */ var e = this._element;
/*Line 97 - 'AtomListBox.js' */ if (/select/i.test(e.tagName)) {
/*Line 98 - 'AtomListBox.js' */ this.set_allowSelectFirst(true);
/*Line 99 - 'AtomListBox.js' */ this.bindEvent(e, 'change', function () {
/*Line 100 - 'AtomListBox.js' */ AtomBinder.setValue(self, 'selectedIndex', e.selectedIndex);
/*Line 101 - 'AtomListBox.js' */ });
/*Line 102 - 'AtomListBox.js' */ }

/*Line 104 - 'AtomListBox.js' */ this.selectCommand = function () {
/*Line 105 - 'AtomListBox.js' */ self.onSelectItem.apply(self, arguments);
/*Line 106 - 'AtomListBox.js' */ };
/*Line 107 - 'AtomListBox.js' */ this.selectAllCommand = function () {
/*Line 108 - 'AtomListBox.js' */ self.set_selectAll(true);
/*Line 109 - 'AtomListBox.js' */ };
/*Line 110 - 'AtomListBox.js' */ this.clearSelectionCommand = function () {
/*Line 111 - 'AtomListBox.js' */ self.set_selectedIndex(-1);
/*Line 112 - 'AtomListBox.js' */ };
/*Line 113 - 'AtomListBox.js' */ }
/*Line 114 - 'AtomListBox.js' */ }
/*Line 115 - 'AtomListBox.js' */ });
/*Line 116 - 'AtomListBox.js' */})(WebAtoms.AtomItemsControl.prototype);

/*Line 90 - 'AtomListBox.js' */ updateChildSelections: function () {
/*Line 91 - 'AtomListBox.js' */ var e = this._element;
/*Line 92 - 'AtomListBox.js' */ if (/select/i.test(e.tagName)) {
/*Line 93 - 'AtomListBox.js' */ var i = this.get_selectedIndex();
/*Line 94 - 'AtomListBox.js' */ if (e.selectedIndex != i) {
/*Line 95 - 'AtomListBox.js' */ WebAtoms.dispatcher.callLater(function () {
/*Line 96 - 'AtomListBox.js' */ e.selectedIndex = i;
/*Line 97 - 'AtomListBox.js' */ });
/*Line 98 - 'AtomListBox.js' */ }
/*Line 99 - 'AtomListBox.js' */ } else {
/*Line 100 - 'AtomListBox.js' */ baseType.updateChildSelections.apply(this, arguments);
/*Line 101 - 'AtomListBox.js' */ }
/*Line 102 - 'AtomListBox.js' */ },

/*Line 104 - 'AtomListBox.js' */ init: function () {

/*Line 106 - 'AtomListBox.js' */ this.setClass();

/*Line 108 - 'AtomListBox.js' */ baseType.init.call(this);
/*Line 109 - 'AtomListBox.js' */ var self = this;

/*Line 111 - 'AtomListBox.js' */ var e = this._element;
/*Line 112 - 'AtomListBox.js' */ if (/select/i.test(e.tagName)) {
/*Line 113 - 'AtomListBox.js' */ this.set_allowSelectFirst(true);
/*Line 114 - 'AtomListBox.js' */ this.bindEvent(e, 'change', function () {
/*Line 115 - 'AtomListBox.js' */ AtomBinder.setValue(self, 'selectedIndex', e.selectedIndex);
/*Line 116 - 'AtomListBox.js' */ });
/*Line 117 - 'AtomListBox.js' */ }



/*Line 121 - 'AtomListBox.js' */ this.selectCommand = function () {
/*Line 122 - 'AtomListBox.js' */ self.onSelectItem.apply(self, arguments);
/*Line 123 - 'AtomListBox.js' */ };
/*Line 124 - 'AtomListBox.js' */ this.selectAllCommand = function () {
/*Line 125 - 'AtomListBox.js' */ self.set_selectAll(true);
/*Line 126 - 'AtomListBox.js' */ };
/*Line 127 - 'AtomListBox.js' */ this.clearSelectionCommand = function () {
/*Line 128 - 'AtomListBox.js' */ self.set_selectedIndex(-1);
/*Line 129 - 'AtomListBox.js' */ };
/*Line 130 - 'AtomListBox.js' */ }
/*Line 131 - 'AtomListBox.js' */ }
/*Line 132 - 'AtomListBox.js' */ });
/*Line 133 - 'AtomListBox.js' */})(WebAtoms.AtomItemsControl.prototype);

/*Line 0 - 'AtomAutoCompleteBox.js' */
/*Line 1 - 'AtomAutoCompleteBox.js' */
Expand Down
73 changes: 45 additions & 28 deletions atoms.js
Original file line number Diff line number Diff line change
Expand Up @@ -7186,34 +7186,51 @@ this.setLocalValue('src', Atom.get(this,'templateParent.url'), e);

/*Line 87 - 'AtomListBox.js' */ },

/*Line 89 - 'AtomListBox.js' */ init: function () {

/*Line 91 - 'AtomListBox.js' */ this.setClass();

/*Line 93 - 'AtomListBox.js' */ baseType.init.call(this);
/*Line 94 - 'AtomListBox.js' */ var self = this;

/*Line 96 - 'AtomListBox.js' */ var e = this._element;
/*Line 97 - 'AtomListBox.js' */ if (/select/i.test(e.tagName)) {
/*Line 98 - 'AtomListBox.js' */ this.set_allowSelectFirst(true);
/*Line 99 - 'AtomListBox.js' */ this.bindEvent(e, 'change', function () {
/*Line 100 - 'AtomListBox.js' */ AtomBinder.setValue(self, 'selectedIndex', e.selectedIndex);
/*Line 101 - 'AtomListBox.js' */ });
/*Line 102 - 'AtomListBox.js' */ }

/*Line 104 - 'AtomListBox.js' */ this.selectCommand = function () {
/*Line 105 - 'AtomListBox.js' */ self.onSelectItem.apply(self, arguments);
/*Line 106 - 'AtomListBox.js' */ };
/*Line 107 - 'AtomListBox.js' */ this.selectAllCommand = function () {
/*Line 108 - 'AtomListBox.js' */ self.set_selectAll(true);
/*Line 109 - 'AtomListBox.js' */ };
/*Line 110 - 'AtomListBox.js' */ this.clearSelectionCommand = function () {
/*Line 111 - 'AtomListBox.js' */ self.set_selectedIndex(-1);
/*Line 112 - 'AtomListBox.js' */ };
/*Line 113 - 'AtomListBox.js' */ }
/*Line 114 - 'AtomListBox.js' */ }
/*Line 115 - 'AtomListBox.js' */ });
/*Line 116 - 'AtomListBox.js' */})(WebAtoms.AtomItemsControl.prototype);

/*Line 90 - 'AtomListBox.js' */ updateChildSelections: function () {
/*Line 91 - 'AtomListBox.js' */ var e = this._element;
/*Line 92 - 'AtomListBox.js' */ if (/select/i.test(e.tagName)) {
/*Line 93 - 'AtomListBox.js' */ var i = this.get_selectedIndex();
/*Line 94 - 'AtomListBox.js' */ if (e.selectedIndex != i) {
/*Line 95 - 'AtomListBox.js' */ WebAtoms.dispatcher.callLater(function () {
/*Line 96 - 'AtomListBox.js' */ e.selectedIndex = i;
/*Line 97 - 'AtomListBox.js' */ });
/*Line 98 - 'AtomListBox.js' */ }
/*Line 99 - 'AtomListBox.js' */ } else {
/*Line 100 - 'AtomListBox.js' */ baseType.updateChildSelections.apply(this, arguments);
/*Line 101 - 'AtomListBox.js' */ }
/*Line 102 - 'AtomListBox.js' */ },

/*Line 104 - 'AtomListBox.js' */ init: function () {

/*Line 106 - 'AtomListBox.js' */ this.setClass();

/*Line 108 - 'AtomListBox.js' */ baseType.init.call(this);
/*Line 109 - 'AtomListBox.js' */ var self = this;

/*Line 111 - 'AtomListBox.js' */ var e = this._element;
/*Line 112 - 'AtomListBox.js' */ if (/select/i.test(e.tagName)) {
/*Line 113 - 'AtomListBox.js' */ this.set_allowSelectFirst(true);
/*Line 114 - 'AtomListBox.js' */ this.bindEvent(e, 'change', function () {
/*Line 115 - 'AtomListBox.js' */ AtomBinder.setValue(self, 'selectedIndex', e.selectedIndex);
/*Line 116 - 'AtomListBox.js' */ });
/*Line 117 - 'AtomListBox.js' */ }



/*Line 121 - 'AtomListBox.js' */ this.selectCommand = function () {
/*Line 122 - 'AtomListBox.js' */ self.onSelectItem.apply(self, arguments);
/*Line 123 - 'AtomListBox.js' */ };
/*Line 124 - 'AtomListBox.js' */ this.selectAllCommand = function () {
/*Line 125 - 'AtomListBox.js' */ self.set_selectAll(true);
/*Line 126 - 'AtomListBox.js' */ };
/*Line 127 - 'AtomListBox.js' */ this.clearSelectionCommand = function () {
/*Line 128 - 'AtomListBox.js' */ self.set_selectedIndex(-1);
/*Line 129 - 'AtomListBox.js' */ };
/*Line 130 - 'AtomListBox.js' */ }
/*Line 131 - 'AtomListBox.js' */ }
/*Line 132 - 'AtomListBox.js' */ });
/*Line 133 - 'AtomListBox.js' */})(WebAtoms.AtomItemsControl.prototype);

/*Line 0 - 'AtomAutoCompleteBox.js' */
/*Line 1 - 'AtomAutoCompleteBox.js' */
Expand Down
6 changes: 3 additions & 3 deletions atoms.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion atoms.min.map

Large diffs are not rendered by default.

Binary file modified nuget/Atoms.js/NuGet.log
Binary file not shown.
2 changes: 1 addition & 1 deletion nuget/Atoms.js/Package.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>Atoms.js</id>
<version>1.2.867</version>
<version>1.2.871</version>
<title>Atoms.js</title>
<authors>Akash Kava</authors>
<owners></owners>
Expand Down
17 changes: 17 additions & 0 deletions src/Controls/AtomListBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,21 @@

},


updateChildSelections: function () {
var e = this._element;
if (/select/i.test(e.tagName)) {
var i = this.get_selectedIndex();
if (e.selectedIndex != i) {
WebAtoms.dispatcher.callLater(function () {
e.selectedIndex = i;
});
}
} else {
baseType.updateChildSelections.apply(this, arguments);
}
},

init: function () {

this.setClass();
Expand All @@ -102,6 +117,8 @@
});
}



this.selectCommand = function () {
self.onSelectItem.apply(self, arguments);
};
Expand Down

0 comments on commit 8171bc0

Please sign in to comment.