Changeset 734


Ignore:
Timestamp:
Jul 27, 2010, 4:09:43 PM (9 years ago)
Author:
duh
Message:

Automated continuous integration commit of minified JS/CSS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/web-app/js/table-editor.min.js

    r460 r734  
    1 function TableEditor(){}TableEditor.prototype={tableIdentifier:null,rowIdentifier:null,columnIdentifier:null,selected:null,init:function(d,a,b){this.tableIdentifier=d;this.rowIdentifier=a;this.columnIdentifier=b;var c=$(d);if(c){that=this;c.each(function(){that.initializeTable(this)})}},initializeTable:function(b){var a=this;$(b).selectable({filter:this.rowIdentifier,selected:function(c,d){a.attachColumnHandlers(d.selected)},unselected:function(c,d){a.deAttachColumnHandlers(d.selected)}})},deAttachColumnHandlers:function(b){var a=this;$(this.columnIdentifier,b).each(function(){var c=$(":input",$(this));if(c){$(c).unbind(".tableEditor")}})},attachColumnHandlers:function(d){var c=this;var b=0;var a=new RegExp("ui-autocomplete-input");$(this.columnIdentifier,d).each(function(){var e=$(":input",$(this));var h=$(e);var g=h.attr("type");if(e&&g){switch(g){case"text":var f=b;if(a.test(h.attr("class"))){h.bind("autocompleteclose.tableEditor",function(){c.updateSingleInputElements(e,f,"input")})}else{h.bind("keyup.tableEditor",function(){c.updateSingleInputElements(e,f,"input")})}break;case"select-one":var f=b;h.bind("change.tableEditor",function(){c.updateSingleInputElements(e,f,"select")});break;case"checkbox":var f=b;h.bind("click.tableEditor",function(){c.updateSingleInputElements(e,f,"input")});break;case"hidden":break;case null:break;default:alert("unsupported element of type "+g+", please file a bug report containing this message and a screenshot for table-editor.js");break}}b++})},updateSingleInputElements:function(f,d,b){var g=this;var h=$(f);var i=h.parent();var a=i.parent();var k=a.parent();var j=this.getValue(h);$(".ui-selected",k).each(function(){$(g.columnIdentifier+":eq("+d+") "+b,$(this)).each(function(){var c=$(this);if(c.attr("type")!="hidden"){var e=g.getValue(c);if(e!=j){g.setValue(c,j)}}})})},getValue:function(a){var b=$(a);switch(b.attr("type")){case"checkbox":return b.attr("checked");break;default:return b.val();break}},setValue:function(a,c){var b=$(a);switch(b.attr("type")){case"checkbox":return b.attr("checked",c);break;default:return b.val(c);break}}};
     1function TableEditor(){}TableEditor.prototype={tableIdentifier:null,rowIdentifier:null,columnIdentifier:null,selected:null,init:function(d,a,b){this.tableIdentifier=d;this.rowIdentifier=a;this.columnIdentifier=b;var c=$(d);if(c){that=this;c.each(function(){that.initializeTable(this)})}},initializeTable:function(b){var a=this;$(b).selectable({filter:this.rowIdentifier,selected:function(c,d){a.attachColumnHandlers(d.selected)},unselected:function(c,d){a.deAttachColumnHandlers(d.selected)}})},deAttachColumnHandlers:function(b){var a=this;$(this.columnIdentifier,b).each(function(){var c=$(":input",$(this));if(c){$(c).unbind(".tableEditor")}})},attachColumnHandlers:function(d){var c=this;var b=0;var a=new RegExp("ui-autocomplete-input");$(this.columnIdentifier,d).each(function(){var e=$(":input",$(this));var h=$(e);var g=h.attr("type");if(e&&g){switch(g){case"text":var f=b;if(a.test(h.attr("class"))){h.bind("autocompleteclose.tableEditor",function(){c.updateSingleInputElements(e,f,"input")})}else{h.bind("keyup.tableEditor",function(){c.updateSingleInputElements(e,f,"input")})}break;case"select-one":var f=b;h.bind("change.tableEditor",function(){c.updateSingleInputElements(e,f,"select");c.handleExtraEvents(h)});break;case"checkbox":var f=b;h.bind("click.tableEditor",function(){c.updateSingleInputElements(e,f,"input")});break;case"hidden":break;case null:break;default:alert("unsupported element of type "+g+", please file a bug report containing this message and a screenshot for table-editor.js");break}}b++})},updateSingleInputElements:function(f,d,b){var g=this;var h=$(f);var i=h.parent();var a=i.parent();var k=a.parent();var j=this.getValue(h);$(".ui-selected",k).each(function(){$(g.columnIdentifier+":eq("+d+") "+b,$(this)).each(function(){var c=$(this);if(c.attr("type")!="hidden"){var e=g.getValue(c);if(e!=j){g.setValue(c,j)}}})})},getValue:function(a){var b=$(a);switch(b.attr("type")){case"checkbox":return b.attr("checked");break;default:return b.val();break}},setValue:function(a,c){var b=$(a);switch(b.attr("type")){case"checkbox":return b.attr("checked",c);break;default:return b.val(c);break}},handleExtraEvents:function(element){var events=["change"];for(var i=0;i<events.length;i++){var call=element.attr("tableEditor"+events[i].substr(0,1).toUpperCase()+events[i].substr(1).toLowerCase()+"Event");if(call){eval(call)}}}};
Note: See TracChangeset for help on using the changeset viewer.