jQuery.noConflict(); (function(win, $){ $.widget( "custom.SPPropertie", { options: { //solo per valori di default }, _create: function(){ this.options = { 'id': this.element.prop('id'), 'label': $(this.element).attr('ps-label'), 'type': $(this.element).attr('ps-type'), 'buttons': $(this.element).attr('ps-button') ? JSON.parse( $(this.element).attr('ps-button')) : null, 'value': $(this.element).attr('ps-value') ? JSON.parse( $(this.element).attr('ps-value')) : null, 'help': $(this.element).attr('ps-help') ? $(this.element).attr('ps-help') : null, 'tooltip': $(this.element).attr('ps-tooltip') ? $(this.element).attr('ps-tooltip') : null } var table = $( '' ), tr = $( '' ); /* Creazione label */ $( '' ).appendTo(table))); /* Creazione input */ this.Input; this.Buttons=[]; switch( this.options.type ){ case 'text': case 'number': this.Input = $( '', { 'class': "property_item", 'id': this.options.id+"_input", type: this.options.type }).on('blur', this._valueChange.bind(this)) break; case 'checkbox': this.Input =$( '', { 'class': "property_item", type: this.options.type }).on( 'change', this._valueChange.bind(this)) break; case 'select': this.Input = $( '
' ).appendTo($( '