Created
June 10, 2013 15:29
-
-
Save knownasilya/5749678 to your computer and use it in GitHub Desktop.
Custom Select
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{view App.CustomSelectView | |
optionsBinding="content" | |
selectedBinding="selected" | |
title="Broadband Maps" | |
}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App.CustomSelectView = Ember.View.extend({ | |
templateName: "customSelect", | |
tagName: "ul", | |
classNames: ["custom-select"], | |
title: "Custom Select", | |
selected: null, | |
options: null, | |
click: function (event) { | |
console.dir(event.target); | |
}, | |
didInsertElement: function () { | |
this._super(); | |
L.DomEvent.disableClickPropagation(document.getElementById(this.get("elementId"))); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<li class="title"> | |
{{view.title}} | |
<small class="pull-right">(Select One)</small> | |
</li> | |
{{#each option in view.options}} | |
<li class="option{{#selected}} selected{{/selected}}" data-value="{{value}}"> | |
{{option}} | |
<a class="settings pull-right"> | |
<i class="icon-cog icon-white"></i> | |
</a> | |
</li> | |
{{/each}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment