Sha256: 52ee9a642cac8a86a11e3f56caee359032b3f10fceedbe0fa50a9c8b9b444e80

Contents?: true

Size: 679 Bytes

Versions: 2

Compression:

Stored size: 679 Bytes

Contents

Spider.defineWidget('Spider.Forms.Select', 'Spider.Forms.Input', {
	
	autoInit: true,
	
	ready: function(){
		if (this.el.is('select[multiple]')){
            this.el.attr('title', 'Aggiungi...');
		    this.el.bsmSelect({
    			removeLabel: 'togli',
    			highlightAddedLabel: 'Aggiunto: ',
    			highlightRemovedLabel: 'Tolto: ',
    			addItemTarget: 'top'
    		});
            $('.bsmSelect option:first', this.el.parent()).addClass('bsmSelectTitle')
                .attr("selected", false)
				.attr("disabled", true);
		} 
	},
	
	onConnectedChange: function(connected, val){
		var params = {};
		params[connected] = val;
		this.reload({connected: params});
	}
    
});

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
spiderfw-0.6.1 apps/core/forms/public/select.js
spiderfw-0.6.0 apps/core/forms/public/select.js