Skip to content

Commit

Permalink
Fixed #10
Browse files Browse the repository at this point in the history
  • Loading branch information
madein-server committed Jun 10, 2013
1 parent a4c0d78 commit eab0784
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion web_static/leaflet
Submodule leaflet updated 123 files
20 changes: 16 additions & 4 deletions web_static/lib/Selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,25 @@ window.bMa = window.bMa || {}
window.bMa.Selector = function(container, label){

var proto = {
ICON_UP: '▵',
ICON_DOWN: '▿',
init : function(container, label){
this.root_label = label;
this.container = container;
this.selected = undefined;
this.container.addClass('selector-root');

this.button = $('<div />');
this.button.addClass('selector-button');
this.button.text(label);
this.button = $('<div />').addClass('selector-button');

this.button_text = $('<span />').addClass('selector-button-text');
this.button_text.text(label);

this.button_icon = $('<span />').addClass('selector-button-text');
this.button_icon.text(this.ICON_UP);
this.button_icon.css({float:'right'});

this.button.append(this.button_text);
this.button.append(this.button_icon);

this.items = $('<div />');
this.items.addClass('selector-items');
Expand Down Expand Up @@ -86,11 +96,13 @@ window.bMa.Selector = function(container, label){
{
this.items.removeClass(sio);
this.items.hide(500);
this.button_icon.text(this.ICON_UP);
}
else
{
this.items.addClass(sio);
this.items.show(500);
this.button_icon.text(this.ICON_DOWN);
}
},
set_current:function(item, label){
Expand All @@ -99,7 +111,7 @@ window.bMa.Selector = function(container, label){
{
return false;
}
this.button.text(label);
this.button_text.text(label);
if(this.selected !== undefined)
{
this.selected.removeClass(sk);
Expand Down

0 comments on commit eab0784

Please sign in to comment.