Changeset 1321

Show
Ignore:
Timestamp:
22-12-10 18:46:07 (3 years ago)
Author:
work@…
Message:

Automated continuous integration commit of minified JS/CSS

Location:
trunk/web-app/js
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • trunk/web-app/js/jquery.ui.ipad.min.js

    r1320 r1321  
     1$(function(){$.extend($.support,{touch:typeof Touch=="object"});if($.support.touch){document.addEventListener("touchstart",iPadTouchHandler,false);document.addEventListener("touchmove",iPadTouchHandler,false);document.addEventListener("touchend",iPadTouchHandler,false);document.addEventListener("touchcancel",iPadTouchHandler,false)}});var lastTap=null;var tapValid=false;var tapTimeout=null;function cancelTap(){tapValid=false}var rightClickPending=false;var rightClickEvent=null;var holdTimeout=null;var cancelMouseUp=false;function cancelHold(){if(rightClickPending){window.clearTimeout(holdTimeout);rightClickPending=false;rightClickEvent=null}}function startHold(a){if(rightClickPending){return}rightClickPending=true;rightClickEvent=(a.changedTouches)[0];holdTimeout=window.setTimeout("doRightClick();",800)}function doRightClick(){rightClickPending=false;var b=rightClickEvent,a=document.createEvent("MouseEvent");a.initMouseEvent("mouseup",true,true,window,1,b.screenX,b.screenY,b.clientX,b.clientY,false,false,false,false,0,null);b.target.dispatchEvent(a);a=document.createEvent("MouseEvent");a.initMouseEvent("mousedown",true,true,window,1,b.screenX,b.screenY,b.clientX,b.clientY,false,false,false,false,2,null);b.target.dispatchEvent(a);a=document.createEvent("MouseEvent");a.initMouseEvent("contextmenu",true,true,window,1,b.screenX+50,b.screenY+5,b.clientX+50,b.clientY+5,false,false,false,false,2,null);b.target.dispatchEvent(a);cancelMouseUp=true;rightClickEvent=null}function iPadTouchStart(c){var d=c.changedTouches,e=d[0],a="mouseover",b=document.createEvent("MouseEvent");b.initMouseEvent(a,true,true,window,1,e.screenX,e.screenY,e.clientX,e.clientY,false,false,false,false,0,null);e.target.dispatchEvent(b);a="mousedown";b=document.createEvent("MouseEvent");b.initMouseEvent(a,true,true,window,1,e.screenX,e.screenY,e.clientX,e.clientY,false,false,false,false,0,null);e.target.dispatchEvent(b);if(!tapValid){lastTap=e.target;tapValid=true;tapTimeout=window.setTimeout("cancelTap();",600);startHold(c)}else{window.clearTimeout(tapTimeout);if(e.target==lastTap){lastTap=null;tapValid=false;a="click";b=document.createEvent("MouseEvent");b.initMouseEvent(a,true,true,window,1,e.screenX,e.screenY,e.clientX,e.clientY,false,false,false,false,0,null);e.target.dispatchEvent(b);a="dblclick";b=document.createEvent("MouseEvent");b.initMouseEvent(a,true,true,window,1,e.screenX,e.screenY,e.clientX,e.clientY,false,false,false,false,0,null);e.target.dispatchEvent(b)}else{lastTap=e.target;tapValid=true;tapTimeout=window.setTimeout("cancelTap();",600);startHold(c)}}}function iPadTouchHandler(d){var b="",a=0;if(d.touches.length>1){return}switch(d.type){case"touchstart":if($(d.changedTouches[0].target).is("select")){return}iPadTouchStart(d);d.preventDefault();return false;break;case"touchmove":cancelHold();b="mousemove";d.preventDefault();break;case"touchend":if(cancelMouseUp){cancelMouseUp=false;d.preventDefault();return false}cancelHold();b="mouseup";break;default:return}var e=d.changedTouches,f=e[0],c=document.createEvent("MouseEvent");c.initMouseEvent(b,true,true,window,1,f.screenX,f.screenY,f.clientX,f.clientY,false,false,false,false,a,null);f.target.dispatchEvent(c);if(b=="mouseup"&&tapValid&&f.target==lastTap){c=document.createEvent("MouseEvent");c.initMouseEvent("click",true,true,window,1,f.screenX,f.screenY,f.clientX,f.clientY,false,false,false,false,a,null);f.target.dispatchEvent(c)}}; 
  • trunk/web-app/js/ontology-chooser.min.js

    r1320 r1321  
     1function OntologyChooser(){}OntologyChooser.prototype={cache:[],ctrl:false,noSearch:false,clipboard:[],options:{minLength:3,showHide:null,spinner:"../images/spinner.gif"},init:function(a){var b=this;if(a){$.each(a,function(c,d){b.options[c]=d})}if(this.options.showHide){this.options.showHide.hide()}$("input[rel*='ontology']").each(function(){b.initAutocomplete(this)})},initAutocomplete:function(d){var f=this;var g=$(d);var e=false;var c=g.attr("rel").split("-");var b=c[1];var a=c[2];if(b=="all"){b=""}g.bind("keydown",function(h){if(h.keyCode==17||h.keyCode==224){f.ctrl=true}if(h.keyCode==13){return false}if(h.keyCode==8&&f.options.showHide){f.options.showHide.hide()}if(h.keyCode==67&&f.ctrl){return f.copy(g)}if(h.keyCode==86&&f.ctrl){return f.paste(g)}});g.bind("keyup",function(h){if(h.keyCode==17||h.keyCode==224){f.ctrl=false}});g.autocomplete({minLength:f.options.minLength,delay:300,search:function(h,i){if(f.noSearch){f.noSearch=false;return false}if(f.options.spinner){g.css({background:"url("+f.options.spinner+") no-repeat right top"})}e=false},source:function(j,h){var k=$.trim(j.term);var i="http://bioportal.bioontology.org/search/json_search/"+b+"?q="+j.term+"&response=json&callback=?";if(f.cache[k]){g.css({background:"none"});h(f.cache[k])}else{$.getJSON(i,function(m){var l=f.parseData(m.data,b);f.cache[k]=l;g.css({background:"none"});if(!m.data){if(f.options.showHide){f.options.showHide.hide()}f.setInputValue(g,"concept_id",null);f.setInputValue(g,"ontology_id",null);f.setInputValue(g,"ncbo_id",null);f.setInputValue(g,"full_id",null)}h(l)})}},select:function(i,j){e=true;var h=g;f.setInputValue(h,"concept_id",j.item.concept_id);f.setInputValue(h,"ontology_id",j.item.ontology_id);f.setInputValue(h,"ncbo_id",j.item.ncbo_id);f.setInputValue(h,"full_id",j.item.full_id);h.removeClass("error");if(f.options.showHide){f.options.showHide.show()}},close:function(i,j){if(!e){var h=g;g.val("");f.setInputValue(h,"concept_id","");f.setInputValue(h,"ontology_id","");f.setInputValue(h,"ncbo_id","");f.setInputValue(h,"full_id","");h.addClass("error")}},html:true})},setInputValue:function(e,c,d){var a=e.attr("name")+"-"+c;var b=e.parent().find("input[name='"+a+"']");if(b.size()>0){$(b[0]).val(d)}else{e.after('<input type="hidden" name="'+a+'" value="'+d+'"/>')}},getInputValue:function(d,c){var a=d.attr("name")+"-"+c;var b=d.parent().find("input[name='"+a+"']");return(b.size()>0)?$(b[0]).val():""},parseData:function(d,f){var a=[];var c=d.split("~!~");for(var b=0;b<c.length;b++){var g=$.trim(c[b]);if(g){var e=g.split("|");var h;if(e.length>8){h=e[8]}else{h=f}a[a.length]={value:e[0],label:e[0]+' <span class="about">('+e[2]+')</span> <span class="from">from: '+e[(e.length-2)]+"</span>",preferred_name:e[0],concept_id:e[1],ontology_id:e[3],full_id:e[4],ncbo_id:h}}}return a},copy:function(a){this.clipboard={sourceValue:$(a).val(),concept_id:this.getInputValue(a,"concept_id"),ontology_id:this.getInputValue(a,"ontology_id"),ncbo_id:this.getInputValue(a,"ncbo_id"),full_id:this.getInputValue(a,"full_id")};return false},paste:function(b){if(this.clipboard.sourceValue&&this.clipboard.concept_id&&this.clipboard.ncbo_id&&this.clipboard.full_id){var a=new RegExp(this.clipboard.ncbo_id);if(b.attr("rel").match(a)||b.attr("rel").match(/all/)){this.noSearch=true;$(b).val(this.clipboard.sourceValue);this.setInputValue(b,"concept_id",this.clipboard.concept_id);this.setInputValue(b,"ontology_id",this.clipboard.ontology_id);this.setInputValue(b,"ncbo_id",this.clipboard.ncbo_id);this.setInputValue(b,"full_id",this.clipboard.full_id)}}return false}}; 
  • trunk/web-app/js/swfobject.min.js

    r1320 r1321  
     1var swfobject=function(){var aq="undefined",aD="object",ab="Shockwave Flash",X="ShockwaveFlash.ShockwaveFlash",aE="application/x-shockwave-flash",ac="SWFObjectExprInst",ax="onreadystatechange",af=window,aL=document,aB=navigator,aa=false,Z=[aN],aG=[],ag=[],al=[],aJ,ad,ap,at,ak=false,aU=false,aH,an,aI=true,ah=function(){var a=typeof aL.getElementById!=aq&&typeof aL.getElementsByTagName!=aq&&typeof aL.createElement!=aq,e=aB.userAgent.toLowerCase(),c=aB.platform.toLowerCase(),h=c?/win/.test(c):/win/.test(e),j=c?/mac/.test(c):/mac/.test(e),g=/webkit/.test(e)?parseFloat(e.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,d=!+"\v1",f=[0,0,0],k=null;if(typeof aB.plugins!=aq&&typeof aB.plugins[ab]==aD){k=aB.plugins[ab].description;if(k&&!(typeof aB.mimeTypes!=aq&&aB.mimeTypes[aE]&&!aB.mimeTypes[aE].enabledPlugin)){aa=true;d=false;k=k.replace(/^.*\s+(\S+\s+\S+$)/,"$1");f[0]=parseInt(k.replace(/^(.*)\..*$/,"$1"),10);f[1]=parseInt(k.replace(/^.*\.(.*)\s.*$/,"$1"),10);f[2]=/[a-zA-Z]/.test(k)?parseInt(k.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof af.ActiveXObject!=aq){try{var i=new ActiveXObject(X);if(i){k=i.GetVariable("$version");if(k){d=true;k=k.split(" ")[1].split(",");f=[parseInt(k[0],10),parseInt(k[1],10),parseInt(k[2],10)]}}}catch(b){}}}return{w3:a,pv:f,wk:g,ie:d,win:h,mac:j}}(),aK=function(){if(!ah.w3){return}if((typeof aL.readyState!=aq&&aL.readyState=="complete")||(typeof aL.readyState==aq&&(aL.getElementsByTagName("body")[0]||aL.body))){aP()}if(!ak){if(typeof aL.addEventListener!=aq){aL.addEventListener("DOMContentLoaded",aP,false)}if(ah.ie&&ah.win){aL.attachEvent(ax,function(){if(aL.readyState=="complete"){aL.detachEvent(ax,arguments.callee);aP()}});if(af==top){(function(){if(ak){return}try{aL.documentElement.doScroll("left")}catch(a){setTimeout(arguments.callee,0);return}aP()})()}}if(ah.wk){(function(){if(ak){return}if(!/loaded|complete/.test(aL.readyState)){setTimeout(arguments.callee,0);return}aP()})()}aC(aP)}}();function aP(){if(ak){return}try{var b=aL.getElementsByTagName("body")[0].appendChild(ar("span"));b.parentNode.removeChild(b)}catch(a){return}ak=true;var d=Z.length;for(var c=0;c<d;c++){Z[c]()}}function aj(a){if(ak){a()}else{Z[Z.length]=a}}function aC(a){if(typeof af.addEventListener!=aq){af.addEventListener("load",a,false)}else{if(typeof aL.addEventListener!=aq){aL.addEventListener("load",a,false)}else{if(typeof af.attachEvent!=aq){aM(af,"onload",a)}else{if(typeof af.onload=="function"){var b=af.onload;af.onload=function(){b();a()}}else{af.onload=a}}}}}function aN(){if(aa){Y()}else{am()}}function Y(){var d=aL.getElementsByTagName("body")[0];var b=ar(aD);b.setAttribute("type",aE);var a=d.appendChild(b);if(a){var c=0;(function(){if(typeof a.GetVariable!=aq){var e=a.GetVariable("$version");if(e){e=e.split(" ")[1].split(",");ah.pv=[parseInt(e[0],10),parseInt(e[1],10),parseInt(e[2],10)]}}else{if(c<10){c++;setTimeout(arguments.callee,10);return}}d.removeChild(b);a=null;am()})()}else{am()}}function am(){var g=aG.length;if(g>0){for(var h=0;h<g;h++){var c=aG[h].id;var l=aG[h].callbackFn;var a={success:false,id:c};if(ah.pv[0]>0){var i=aS(c);if(i){if(ao(aG[h].swfVersion)&&!(ah.wk&&ah.wk<312)){ay(c,true);if(l){a.success=true;a.ref=av(c);l(a)}}else{if(aG[h].expressInstall&&au()){var e={};e.data=aG[h].expressInstall;e.width=i.getAttribute("width")||"0";e.height=i.getAttribute("height")||"0";if(i.getAttribute("class")){e.styleclass=i.getAttribute("class")}if(i.getAttribute("align")){e.align=i.getAttribute("align")}var f={};var d=i.getElementsByTagName("param");var k=d.length;for(var j=0;j<k;j++){if(d[j].getAttribute("name").toLowerCase()!="movie"){f[d[j].getAttribute("name")]=d[j].getAttribute("value")}}ae(e,f,c,l)}else{aF(i);if(l){l(a)}}}}}else{ay(c,true);if(l){var b=av(c);if(b&&typeof b.SetVariable!=aq){a.success=true;a.ref=b}l(a)}}}}}function av(b){var d=null;var c=aS(b);if(c&&c.nodeName=="OBJECT"){if(typeof c.SetVariable!=aq){d=c}else{var a=c.getElementsByTagName(aD)[0];if(a){d=a}}}return d}function au(){return !aU&&ao("6.0.65")&&(ah.win||ah.mac)&&!(ah.wk&&ah.wk<312)}function ae(f,d,h,e){aU=true;ap=e||null;at={success:false,id:h};var a=aS(h);if(a){if(a.nodeName=="OBJECT"){aJ=aO(a);ad=null}else{aJ=a;ad=h}f.id=ac;if(typeof f.width==aq||(!/%$/.test(f.width)&&parseInt(f.width,10)<310)){f.width="310"}if(typeof f.height==aq||(!/%$/.test(f.height)&&parseInt(f.height,10)<137)){f.height="137"}aL.title=aL.title.slice(0,47)+" - Flash Player Installation";var b=ah.ie&&ah.win?"ActiveX":"PlugIn",c="MMredirectURL="+af.location.toString().replace(/&/g,"%26")+"&MMplayerType="+b+"&MMdoctitle="+aL.title;if(typeof d.flashvars!=aq){d.flashvars+="&"+c}else{d.flashvars=c}if(ah.ie&&ah.win&&a.readyState!=4){var g=ar("div");h+="SWFObjectNew";g.setAttribute("id",h);a.parentNode.insertBefore(g,a);a.style.display="none";(function(){if(a.readyState==4){a.parentNode.removeChild(a)}else{setTimeout(arguments.callee,10)}})()}aA(f,d,h)}}function aF(a){if(ah.ie&&ah.win&&a.readyState!=4){var b=ar("div");a.parentNode.insertBefore(b,a);b.parentNode.replaceChild(aO(a),b);a.style.display="none";(function(){if(a.readyState==4){a.parentNode.removeChild(a)}else{setTimeout(arguments.callee,10)}})()}else{a.parentNode.replaceChild(aO(a),a)}}function aO(b){var d=ar("div");if(ah.win&&ah.ie){d.innerHTML=b.innerHTML}else{var e=b.getElementsByTagName(aD)[0];if(e){var a=e.childNodes;if(a){var f=a.length;for(var c=0;c<f;c++){if(!(a[c].nodeType==1&&a[c].nodeName=="PARAM")&&!(a[c].nodeType==8)){d.appendChild(a[c].cloneNode(true))}}}}}return d}function aA(e,g,c){var d,a=aS(c);if(ah.wk&&ah.wk<312){return d}if(a){if(typeof e.id==aq){e.id=c}if(ah.ie&&ah.win){var f="";for(var i in e){if(e[i]!=Object.prototype[i]){if(i.toLowerCase()=="data"){g.movie=e[i]}else{if(i.toLowerCase()=="styleclass"){f+=' class="'+e[i]+'"'}else{if(i.toLowerCase()!="classid"){f+=" "+i+'="'+e[i]+'"'}}}}}var h="";for(var j in g){if(g[j]!=Object.prototype[j]){h+='<param name="'+j+'" value="'+g[j]+'" />'}}a.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+f+">"+h+"</object>";ag[ag.length]=e.id;d=aS(e.id)}else{var b=ar(aD);b.setAttribute("type",aE);for(var k in e){if(e[k]!=Object.prototype[k]){if(k.toLowerCase()=="styleclass"){b.setAttribute("class",e[k])}else{if(k.toLowerCase()!="classid"){b.setAttribute(k,e[k])}}}}for(var l in g){if(g[l]!=Object.prototype[l]&&l.toLowerCase()!="movie"){aQ(b,l,g[l])}}a.parentNode.replaceChild(b,a);d=b}}return d}function aQ(b,d,c){var a=ar("param");a.setAttribute("name",d);a.setAttribute("value",c);b.appendChild(a)}function aw(a){var b=aS(a);if(b&&b.nodeName=="OBJECT"){if(ah.ie&&ah.win){b.style.display="none";(function(){if(b.readyState==4){aT(a)}else{setTimeout(arguments.callee,10)}})()}else{b.parentNode.removeChild(b)}}}function aT(a){var b=aS(a);if(b){for(var c in b){if(typeof b[c]=="function"){b[c]=null}}b.parentNode.removeChild(b)}}function aS(a){var c=null;try{c=aL.getElementById(a)}catch(b){}return c}function ar(a){return aL.createElement(a)}function aM(a,c,b){a.attachEvent(c,b);al[al.length]=[a,c,b]}function ao(a){var b=ah.pv,c=a.split(".");c[0]=parseInt(c[0],10);c[1]=parseInt(c[1],10)||0;c[2]=parseInt(c[2],10)||0;return(b[0]>c[0]||(b[0]==c[0]&&b[1]>c[1])||(b[0]==c[0]&&b[1]==c[1]&&b[2]>=c[2]))?true:false}function az(b,f,a,c){if(ah.ie&&ah.mac){return}var e=aL.getElementsByTagName("head")[0];if(!e){return}var g=(a&&typeof a=="string")?a:"screen";if(c){aH=null;an=null}if(!aH||an!=g){var d=ar("style");d.setAttribute("type","text/css");d.setAttribute("media",g);aH=e.appendChild(d);if(ah.ie&&ah.win&&typeof aL.styleSheets!=aq&&aL.styleSheets.length>0){aH=aL.styleSheets[aL.styleSheets.length-1]}an=g}if(ah.ie&&ah.win){if(aH&&typeof aH.addRule==aD){aH.addRule(b,f)}}else{if(aH&&typeof aL.createTextNode!=aq){aH.appendChild(aL.createTextNode(b+" {"+f+"}"))}}}function ay(a,c){if(!aI){return}var b=c?"visible":"hidden";if(ak&&aS(a)){aS(a).style.visibility=b}else{az("#"+a,"visibility:"+b)}}function ai(b){var a=/[\\\"<>\.;]/;var c=a.exec(b)!=null;return c&&typeof encodeURIComponent!=aq?encodeURIComponent(b):b}var aR=function(){if(ah.ie&&ah.win){window.attachEvent("onunload",function(){var a=al.length;for(var b=0;b<a;b++){al[b][0].detachEvent(al[b][1],al[b][2])}var d=ag.length;for(var c=0;c<d;c++){aw(ag[c])}for(var e in ah){ah[e]=null}ah=null;for(var f in swfobject){swfobject[f]=null}swfobject=null})}}();return{registerObject:function(a,e,c,b){if(ah.w3&&a&&e){var d={};d.id=a;d.swfVersion=e;d.expressInstall=c;d.callbackFn=b;aG[aG.length]=d;ay(a,false)}else{if(b){b({success:false,id:a})}}},getObjectById:function(a){if(ah.w3){return av(a)}},embedSWF:function(k,e,h,f,c,a,b,i,g,j){var d={success:false,id:e};if(ah.w3&&!(ah.wk&&ah.wk<312)&&k&&e&&h&&f&&c){ay(e,false);aj(function(){h+="";f+="";var q={};if(g&&typeof g===aD){for(var o in g){q[o]=g[o]}}q.data=k;q.width=h;q.height=f;var n={};if(i&&typeof i===aD){for(var p in i){n[p]=i[p]}}if(b&&typeof b===aD){for(var l in b){if(typeof n.flashvars!=aq){n.flashvars+="&"+l+"="+b[l]}else{n.flashvars=l+"="+b[l]}}}if(ao(c)){var m=aA(q,n,e);if(q.id==e){ay(e,true)}d.success=true;d.ref=m}else{if(a&&au()){q.data=a;ae(q,n,e,j);return}else{ay(e,true)}}if(j){j(d)}})}else{if(j){j(d)}}},switchOffAutoHideShow:function(){aI=false},ua:ah,getFlashPlayerVersion:function(){return{major:ah.pv[0],minor:ah.pv[1],release:ah.pv[2]}},hasFlashPlayerVersion:ao,createSWF:function(a,b,c){if(ah.w3){return aA(a,b,c)}else{return undefined}},showExpressInstall:function(b,a,d,c){if(ah.w3&&au()){ae(b,a,d,c)}},removeSWF:function(a){if(ah.w3){aw(a)}},createCSS:function(b,a,c,d){if(ah.w3){az(b,a,c,d)}},addDomLoadEvent:aj,addLoadEvent:aC,getQueryParamValue:function(b){var a=aL.location.search||aL.location.hash;if(a){if(/\?/.test(a)){a=a.split("?")[1]}if(b==null){return ai(a)}var c=a.split("&");for(var d=0;d<c.length;d++){if(c[d].substring(0,c[d].indexOf("="))==b){return ai(c[d].substring((c[d].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(aU){var a=aS(ac);if(a&&aJ){a.parentNode.replaceChild(aJ,a);if(ad){ay(ad,true);if(ah.ie&&ah.win){aJ.style.display="block"}}if(ap){ap(at)}}aU=false}}}}(); 
  • trunk/web-app/js/table-editor.min.js

    r1320 r1321  
     1function TableEditor(){}TableEditor.prototype={options:{tableIdentifier:"div.table",headerIdentifier:"div.header",rowIdentifier:"div.row",columnIdentifier:"div.column",selected:null},allSelected:false,init:function(a){var c=this;if(a){$.each(a,function(d,e){c.options[d]=e})}var b=$(this.options.tableIdentifier);if(b){c=this;b.each(function(){c.initializeTable(this)})}},initializeTable:function(d){var c=this;var a=$(d);a.selectable({filter:this.options.rowIdentifier,selected:function(e,f){c.cleanup(a);c.attachColumnHandlers(f.selected)},unselected:function(e,f){c.cleanup(a);c.detachColumnHandlers(f.selected)}});var b=$($(this.options.headerIdentifier+":eq(0)",a).find(":nth-child(1)")[0]);if(b){b.addClass("selectAll").html("&nbsp;&nbsp;&nbsp;").bind("click",function(){c.selectAll(a)});b.qtip({content:"leftMiddle",position:{corner:{tooltip:"leftMiddle",target:"rightMiddle"}},style:{border:{width:5,radius:10},padding:10,textAlign:"center",tip:true,name:"blue"},content:"Click to select all rows in this table",show:"mouseover",hide:"mouseout",api:{beforeShow:function(){}}})}},selectAll:function(b){var a=this;this.cleanup(b);$(this.options.rowIdentifier,b).each(function(){var c=$(this);c.addClass("ui-selected");a.attachColumnHandlers(c)});this.allSelected=true},cleanup:function(a){if(this.allSelected){this.deselectAll(a)}},deselectAll:function(b){var a=this;$(this.options.rowIdentifier,b).each(function(){var c=$(this);c.removeClass("ui-selected");a.detachColumnHandlers(c)});this.allSelected=false},detachColumnHandlers:function(b){var a=this;$(this.options.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.options.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.options.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)}}}}; 
  • trunk/web-app/js/timepicker-0.2.1.min.js

    r1320 r1321  
     1/* 
     2 * jQuery UI Timepicker 0.2.1 
     3 * 
     4 * Copyright (c) 2009 Martin Milesich (http://milesich.com/) 
     5 * 
     6 * Some parts are 
     7 *   Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) 
     8 * 
     9 * $Id: timepicker.js 28 2009-08-11 20:31:23Z majlo $ 
     10 * 
     11 * Depends: 
     12 *  ui.core.js 
     13 *  ui.datepicker.js 
     14 *  ui.slider.js 
     15 */ 
     16(function(b){b.extend(b.datepicker._defaults,{stepMinutes:1,stepHours:1,time24h:false,showTime:false,altTimeField:""});b.datepicker._connectDatepickerOverride=b.datepicker._connectDatepicker;b.datepicker._connectDatepicker=function(e,d){b.datepicker._connectDatepickerOverride(e,d);if(this._get(d,"showTime")){d.settings.showButtonPanel=true}var c=this._get(d,"showOn");if(c=="button"||c=="both"){d.trigger.unbind("click");d.trigger.click(function(){if(b.datepicker._datepickerShowing&&b.datepicker._lastInput==e){b.datepicker._hideDatepicker(null)}else{b.datepicker._showDatepicker(e)}return false})}};b.datepicker._showDatepickerOverride=b.datepicker._showDatepicker;b.datepicker._showDatepicker=function(d){b.datepicker._showDatepickerOverride(d);d=d.target||d;if(d.nodeName.toLowerCase()!="input"){d=b("input",d.parentNode)[0]}if(b.datepicker._isDisabledDatepicker(d)){return}var e=b.datepicker._getInst(d);var c=b.datepicker._get(e,"showTime");if(c){b.timepicker.show(d)}};b.datepicker._checkExternalClickOverride=b.datepicker._checkExternalClick;b.datepicker._checkExternalClick=function(d){if(!b.datepicker._curInst){return}var c=b(d.target);if((c.parents("#"+b.timepicker._mainDivId).length==0)){b.datepicker._checkExternalClickOverride(d)}};b.datepicker._hideDatepickerOverride=b.datepicker._hideDatepicker;b.datepicker._hideDatepicker=function(d,f){var e=this._curInst;if(!e||(d&&e!=b.data(d,PROP_NAME))){return}var c=this._get(e,"showTime");if(d===undefined&&c){if(e.input){e.input.val(this._formatDate(e));e.input.trigger("change")}this._updateAlternate(e);if(c){b.timepicker.update(this._formatDate(e))}}b.datepicker._hideDatepickerOverride(d,f);if(c){b.timepicker.hide()}};b.datepicker._selectDate=function(h,d){var g=b(h);var f=this._getInst(g[0]);var c=this._get(f,"showTime");d=(d!=null?d:this._formatDate(f));if(!c){if(f.input){f.input.val(d)}this._updateAlternate(f)}var e=this._get(f,"onSelect");if(e){e.apply((f.input?f.input[0]:null),[d,f])}else{if(f.input&&!c){f.input.trigger("change")}}if(f.inline){this._updateDatepicker(f)}else{if(!f.stayOpen){if(c){this._updateDatepicker(f)}else{this._hideDatepicker(null,this._get(f,"duration"));this._lastInput=f.input[0];if(typeof(f.input[0])!="object"){f.input[0].focus()}this._lastInput=null}}}};b.datepicker._updateDatepickerOverride=b.datepicker._updateDatepicker;b.datepicker._updateDatepicker=function(c){b.datepicker._updateDatepickerOverride(c);b.timepicker.resize()};function a(){}a.prototype={init:function(){this._mainDivId="ui-timepicker-div";this._inputId=null;this._orgValue=null;this._orgHour=null;this._orgMinute=null;this._colonPos=-1;this._visible=false;this.tpDiv=b('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible" style="width: 100px; display: none; position: absolute;"></div>');this._generateHtml()},show:function(j){var e=b.datepicker._getInst(j);this._time24h=b.datepicker._get(e,"time24h");this._altTimeField=b.datepicker._get(e,"altTimeField");var c=parseInt(b.datepicker._get(e,"stepMinutes"),10)||1;var i=parseInt(b.datepicker._get(e,"stepHours"),10)||1;if(60%c!=0){c=1}if(24%i!=0){i=1}b("#hourSlider").slider("option","max",24-i);b("#hourSlider").slider("option","step",i);b("#minuteSlider").slider("option","max",60-c);b("#minuteSlider").slider("option","step",c);this._inputId=j.id;if(!this._visible){this._parseTime();this._orgValue=b("#"+this._inputId).val()}var h=this;b("#"+this._mainDivId).show("slow",function(){h.resize()});this._visible=true;var d=b("#"+b.datepicker._mainDivId);var g=d.position();var f=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)+b(document).scrollLeft();var k=this.tpDiv.offset().left+this.tpDiv.outerWidth();if(k>f){d.css("left",g.left-(k-f)-5);this.tpDiv.css("left",d.offset().left+d.outerWidth()+"px")}},update:function(d){var e=b("#"+this._mainDivId+" span.fragHours").text()+":"+b("#"+this._mainDivId+" span.fragMinutes").text();if(!this._time24h){e+=" "+b("#"+this._mainDivId+" span.fragAmpm").text()}var c=b("#"+this._inputId).val();b("#"+this._inputId).val(d+" "+e);if(this._altTimeField){b(this._altTimeField).each(function(){b(this).val(e)})}},hide:function(){this._visible=false;b("#"+this._mainDivId).hide()},resize:function(){var d=b("#"+b.datepicker._mainDivId);var e=d.position();var c=b("#"+b.datepicker._mainDivId+" > div.ui-datepicker-header:first-child").height();b("#"+this._mainDivId+" > div.ui-datepicker-header:first-child").css("height",c);this.tpDiv.css({height:d.height(),top:e.top,left:e.left+d.outerWidth()+"px"});b("#hourSlider").css("height",this.tpDiv.height()-(3.5*c));b("#minuteSlider").css("height",this.tpDiv.height()-(3.5*c))},_generateHtml:function(){var d="";d+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix ui-corner-all">';d+='<div class="ui-datepicker-title" style="margin:0">';d+='<span class="fragHours">08</span><span class="delim">:</span><span class="fragMinutes">45</span> <span class="fragAmpm"></span></div></div><table>';d+="<tr><th>Hour</th><th>Minute</th></tr>";d+='<tr><td align="center"><div id="hourSlider" class="slider"></div></td><td align="center"><div id="minuteSlider" class="slider"></div></td></tr>';d+="</table>";this.tpDiv.empty().append(d);b("body").append(this.tpDiv);var c=this;b("#hourSlider").slider({orientation:"vertical",range:"min",min:0,max:23,step:1,slide:function(e,f){c._writeTime("hour",f.value)},stop:function(e,f){b("#"+c._inputId).focus()}});b("#minuteSlider").slider({orientation:"vertical",range:"min",min:0,max:59,step:1,slide:function(e,f){c._writeTime("minute",f.value)},stop:function(e,f){b("#"+c._inputId).focus()}});b("#hourSlider > a").css("padding",0);b("#minuteSlider > a").css("padding",0)},_writeTime:function(c,d){if(c=="hour"){if(!this._time24h){if(d<12){b("#"+this._mainDivId+" span.fragAmpm").text("am")}else{b("#"+this._mainDivId+" span.fragAmpm").text("pm");d-=12}if(d==0){d=12}}else{b("#"+this._mainDivId+" span.fragAmpm").text("")}if(d<10){d="0"+d}b("#"+this._mainDivId+" span.fragHours").text(d)}if(c=="minute"){if(d<10){d="0"+d}b("#"+this._mainDivId+" span.fragMinutes").text(d)}},_parseTime:function(){var f=b("#"+this._inputId).val();this._colonPos=f.search(":");var c=0,e=0,d="";if(this._colonPos!=-1){e=parseInt(f.substr(this._colonPos-2,2),10);c=parseInt(f.substr(this._colonPos+1,2),10);d=jQuery.trim(f.substr(this._colonPos+3,3))}d=d.toLowerCase();if(d!="am"&&d!="pm"){d=""}if(e<0){e=0}if(c<0){c=0}if(e>23){e=23}if(c>59){c=59}if(d=="pm"&&e<12){e+=12}if(d=="am"&&e==12){e=0}this._setTime("hour",e);this._setTime("minute",c);this._orgHour=e;this._orgMinute=c},_setTime:function(c,d){if(isNaN(d)){d=0}if(d<0){d=0}if(d>23&&c=="hour"){d=23}if(d>59&&c=="minute"){d=59}if(c=="hour"){b("#hourSlider").slider("value",d)}if(c=="minute"){b("#minuteSlider").slider("value",d)}this._writeTime(c,d)}};b.timepicker=new a();b("document").ready(function(){b.timepicker.init()})})(jQuery);