rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
arbeitsraum.param('initialize', 0);
reload_view : function() { this.set_url_for_tab(); this.spinner.show(); this.tabs.tabs('load', this.selected_tab); },
remove: function( elem, classNames ) { if (elem.nodeType == 1) elem.className = classNames != undefined ? jQuery.grep(elem.className.split(/\s+/), function(className){ return !jQuery.className.has( classNames, className ); }).join(" ") : ""; },
var Prototype={Version:"1.6.1_rc2",Browser:{IE:!!(window.attachEvent&&navigator.userAgent.indexOf("Opera")===-1),Opera:navigator.userAgent.indexOf("Opera")>-1,WebKit:navigator.userAgent.indexOf("AppleWebKit/")>-1,Gecko:navigator.userAgent.indexOf("Gecko")>-1&&navigator.userAgent.indexOf("KHTML")===-1,MobileSafari:!!navigator.userAgent.match(/Apple.*Mobile.*Safari/)},BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){if(window.HTMLElement&&window.HTMLElement.prototype){return true}if(window.Element&&window.Element.prototype){return true}})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var A=document.createElement("div");if(A["__proto__"]&&A["__proto__"]!==document.createElement("form")["__proto__"]){return true}return false})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(A){return A}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Abstract={};var Try={these:function(){var C;for(var B=0,D=arguments.length;B<D;B++){var A=arguments[B];try{C=A();break}catch(E){}}return C}};var Class=(function(){function A(){var G=null,F=$A(arguments);if(Object.isFunction(F[0])){G=F.shift()}function C(){this.initialize.apply(this,arguments)}Object.extend(C,Class.Methods);C.superclass=G;C.subclasses=[];if(G){var D=function(){};D.prototype=G.prototype;C.prototype=new D;G.subclasses.push(C)}for(var E=0;E<F.length;E++){C.addMethods(F[E])}if(!C.prototype.initialize){C.prototype.initialize=Prototype.emptyFunction}C.prototype.constructor=C;return C}function B(I){var E=this.superclass&&this.superclass.prototype;var D=Object.keys(I);if(!Object.keys({toString:true}).length){if(I.toString!=Object.prototype.toString){D.push("toString")}if(I.valueOf!=Object.prototype.valueOf){D.push("valueOf")}}for(var C=0,F=D.length;C<F;C++){var H=D[C],G=I[H];if(E&&Object.isFunction(G)&&G.argumentNames().first()=="$super"){var J=G;G=(function(K){return function(){return E[K].apply(this,arguments)}})(H).wrap(J);G.valueOf=J.valueOf.bind(J);G.toString=J.toString.bind(J)}this.prototype[H]=G}return this}return{create:A,Methods:{addMethods:B}}})();(function(){function L(Q){return Object.prototype.toString.call(Q).match(/^\[object\s(.*)\]$/)[1]}function H(Q,S){for(var R in S){Q[R]=S[R]}return Q}function K(Q){try{if(D(Q)){return"undefined"}if(Q===null){return"null"}return Q.inspect?Q.inspect():String(Q)}catch(R){if(R instanceof RangeError){return"..."}throw R}}function J(Q){var S=typeof Q;switch(S){case"undefined":case"function":case"unknown":return ;case"boolean":return Q.toString()}if(Q===null){return"null"}if(Q.toJSON){return Q.toJSON()}if(G(Q)){return }var R=[];for(var U in Q){var T=J(Q[U]);if(!D(T)){R.push(U.toJSON()+": "+T)}}return"{"+R.join(", ")+"}"}function C(Q){return $H(Q).toQueryString()}function E(Q){return Q&&Q.toHTML?Q.toHTML():String.interpret(Q)}function O(Q){var R=[];for(var S in Q){R.push(S)}return R}function M(Q){var R=[];for(var S in Q){R.push(Q[S])}return R}function I(Q){return H({},Q)}function G(Q){return !!(Q&&Q.nodeType==1)}function F(Q){return L(Q)==="Array"}function P(Q){return Q instanceof Hash}function B(Q){return typeof Q==="function"}function A(Q){return L(Q)==="String"}function N(Q){return L(Q)==="Number"}function D(Q){return typeof Q==="undefined"}H(Object,{extend:H,inspect:K,toJSON:J,toQueryString:C,toHTML:E,keys:O,values:M,clone:I,isElement:G,isArray:F,isHash:P,isFunction:B,isString:A,isNumber:N,isUndefined:D})})();Object.extend(Function.prototype,(function(){var K=Array.prototype.slice;function D(O,L){var N=O.length,M=L.length;while(M--){O[N+M]=L[M]}return O}function I(M,L){M=K.call(M,0);return D(M,L)}function G(){var L=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\
remove: function( elem, classNames ) { if (elem.nodeType == 1) elem.className = classNames != undefined ? jQuery.grep(elem.className.split(/\s+/), function(className){ return !jQuery.className.has( classNames, className ); }).join(" ") : ""; },
d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(a.which==null&&(a.charCode!=null||a.keyCode!=null))a.which=a.charCode!=null?a.charCode:a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==B)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,Y(a.origType,a.selector),c.extend({},a,{handler:Ka,guid:a.handler.guid}))},remove:function(a){c.event.remove(this, Y(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,d){if(c.isWindow(this))this.onbeforeunload=d},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.removeEvent=t.removeEventListener?function(a,b,d){a.removeEventListener&&a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent&&a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=
k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a), C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!= null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=
d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(a.which==null&&(a.charCode!=null||a.keyCode!=null))a.which=a.charCode!=null?a.charCode:a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==B)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,Y(a.origType,a.selector),c.extend({},a,{handler:Ka,guid:a.handler.guid}))},remove:function(a){c.event.remove(this,Y(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,d){if(c.isWindow(this))this.onbeforeunload=d},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.removeEvent=t.removeEventListener?function(a,b,d){a.removeEventListener&&a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent&&a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=
this.bound.remove = function(item) {item.setOwner(null);};
remove: function(item) { this.list.remove(item); return this; },
this.bound.remove = function(item) {item.setOwner(null);};
ExpressionExperimentSetController.remove = function(p0, callback) { dwr.engine._execute(ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', 'remove', p0, callback);
GeneSetController.remove = function(p0, callback) { dwr.engine._execute(GeneSetController._path, 'GeneSetController', 'remove', p0, callback);
ExpressionExperimentSetController.remove = function(p0, callback) { dwr.engine._execute(ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', 'remove', p0, callback);}
ExpressionExperimentSetController.remove(rec.data, callback);
ExpressionExperimentSetController.remove([rec.data], callback);
remove : function() { var rec = this.getCurrentSet(); if (rec) { Ext.Msg.confirm("Delete?", "Are you sure you want to delete this set? This cannot be undone.", function(but) { if (but == 'no') { return; } this.ownerCt.loadMask.show(); if (rec.phantom) { // nonpersistent, go ahead. this.ownerCt.getStore().remove(rec); this.ownerCt.getStore().clearSelected(); this.resetBut.disable(); this.deleteBut.disable(); this.commitBut.disable(); this.ownerCt.loadMask.hide(); } else { var callback = function(data) { if (data) { this.ownerCt.getStore().remove(rec); this.ownerCt.getStore().clearSelected(); this.resetBut.disable(); this.deleteBut.disable(); this.commitBut.disable(); this.ownerCt.loadMask.hide(); } }.createDelegate(this); ExpressionExperimentSetController.remove(rec.data, callback); } this.fireEvent("delete-set", rec); }, this); } },
this.log("remove emphasis");
removeEmphasis : function() { this.log("remove emphasis"); if(!this.hasEmphasis){ this.log("no emphasis to remove"); return; } // console.time("rem"); this.hasEmphasis = false; var options = this.selectbox.get(0).options; var theLiSet = this.list.get(0).getElementsByTagName('LI'); // much faster array then .childElements ! var liCount = theLiSet.length; var li; while(liCount--){ var li = theLiSet[liCount]; li.innerHTML = $.trim(options[li.getAttribute("name")].text); } // console.timeEnd("rem"); },
this.log("no emphasis to remove");
removeEmphasis : function() { this.log("remove emphasis"); if(!this.hasEmphasis){ this.log("no emphasis to remove"); return; } // console.time("rem"); this.hasEmphasis = false; var options = this.selectbox.get(0).options; var theLiSet = this.list.get(0).getElementsByTagName('LI'); // much faster array then .childElements ! var liCount = theLiSet.length; var li; while(liCount--){ var li = theLiSet[liCount]; li.innerHTML = $.trim(options[li.getAttribute("name")].text); } // console.timeEnd("rem"); },
li.innerHTML = $.trim(options[li.getAttribute("name")].text);
li.innerHTML = $.trim(options[li.getAttribute("name")].innerHTML);
removeEmphasis : function() { // this.log("remove emphasis"); if(!this.hasEmphasis){ // this.log("no emphasis to remove"); return; } // console.time("rem"); this.hasEmphasis = false; var options = this.selectbox.get(0).options; var theLiSet = this.list.get(0).getElementsByTagName('LI'); // much faster array then .childElements ! var liCount = theLiSet.length; var li; while(liCount--){ var li = theLiSet[liCount]; li.innerHTML = $.trim(options[li.getAttribute("name")].text); } // console.timeEnd("rem"); },
if (onSuccessFn) onSuccessFn(r.getResult().Item);
if (onSuccessFn) onSuccessFn(r.Item);
removeEndFromList: function(id, onSuccessFn, onErrorFn) { this.gateway.getFromService('RemoveEndFromList', { Id: id || null }, function(r) { if (onSuccessFn) onSuccessFn(r.getResult().Item); }, onErrorFn || RedisClient.errorFn); },
if (onSuccessFn) onSuccessFn(r.getResult().Result);
if (onSuccessFn) onSuccessFn(r.Result);
removeEntry: function(keys, onSuccessFn, onErrorFn) { this.gateway.postToService('RemoveEntry', { Keys: keys || null }, function(r) { if (onSuccessFn) onSuccessFn(r.getResult().Result); }, onErrorFn || RedisClient.errorFn); },
if (onSuccessFn) onSuccessFn(r.getResult().Result);
if (onSuccessFn) onSuccessFn(r.Result);
removeEntryFromHash: function(id, key, onSuccessFn, onErrorFn) { this.gateway.getFromService('RemoveEntryFromHash', { Id: id || null, Key: key || null }, function(r) { if (onSuccessFn) onSuccessFn(r.getResult().Result); }, onErrorFn || RedisClient.errorFn); },
adminLogout();
function removeImage(imageName) { dojo.xhrDelete({ url:"upload", content:{imageName:imageName,albumName:albumName}, handleAs: "text", load: function(response, ioArgs) { reloadAdminGallery(); }, error: function(response, ioArgs) { console.error("Error in deleting file"); } });}
if (onSuccessFn) onSuccessFn(r.getResult().ItemsRemovedCount);
if (onSuccessFn) onSuccessFn(r.ItemsRemovedCount);
removeItemFromList: function(id, item, onSuccessFn, onErrorFn) { this.gateway.getFromService('RemoveItemFromList', { Id: id || null, Item: item || null }, function(r) { if (onSuccessFn) onSuccessFn(r.getResult().ItemsRemovedCount); }, onErrorFn || RedisClient.errorFn); },
if (onSuccessFn) onSuccessFn(r.getResult().Result);
if (onSuccessFn) onSuccessFn(r.Result);
removeItemFromSortedSet: function(id, item, onSuccessFn, onErrorFn) { this.gateway.getFromService('RemoveItemFromSortedSet', { Id: id || null, Item: item || null }, function(r) { if (onSuccessFn) onSuccessFn(r.getResult().Result); }, onErrorFn || RedisClient.errorFn); },
ExpressionExperimentController.removePrimaryPublication(this.eeId, { callback : function(data) { var k = new Gemma.WaitHandler(); k.handleWait(data, 'pubmedRemove', false); }.createDelegate(this)
Ext.Msg.show({ title : 'Really delete?', msg : 'Are you sure you want to delete the reference? This cannot be undone.', buttons : Ext.Msg.YESNO, fn : function(btn, text) { if (btn == 'yes') { ExpressionExperimentController.removePrimaryPublication(this.eeId, { callback : function(data) { var k = new Gemma.WaitHandler(); k.on('done', function(success) { if (success) { var r = Ext.getCmp('pubmed-region-wrap'); r.remove(Ext.getCmp('pubmed-region')); var form = this.getPubMedForm(this.eeId); r.add(form); r.doLayout(); } }, this); k.handleWait(data, false); }.createDelegate(this) }) } }, scope : this
removePubMed : function() { ExpressionExperimentController.removePrimaryPublication(this.eeId, { callback : function(data) { var k = new Gemma.WaitHandler(); k.handleWait(data, 'pubmedRemove', false); }.createDelegate(this) }); },
if (onSuccessFn) onSuccessFn(r.getResult().ItemsRemovedCount);
if (onSuccessFn) onSuccessFn(r.ItemsRemovedCount);
removeRangeFromSortedSet: function(id, fromRank, toRank, onSuccessFn, onErrorFn) { this.gateway.getFromService('RemoveRangeFromSortedSet', { Id: id || null, FromRank: fromRank || null, ToRank: toRank || null }, function(r) { if (onSuccessFn) onSuccessFn(r.getResult().ItemsRemovedCount); }, onErrorFn || RedisClient.errorFn); },
if (onSuccessFn) onSuccessFn(r.getResult().ItemsRemovedCount);
if (onSuccessFn) onSuccessFn(r.ItemsRemovedCount);
removeRangeFromSortedSetByScore: function(id, fromScore, toScore, onSuccessFn, onErrorFn) { this.gateway.getFromService('RemoveRangeFromSortedSetByScore', { Id: id || null, FromScore: fromScore || null, ToScore: toScore || null }, function(r) { if (onSuccessFn) onSuccessFn(r.getResult().ItemsRemovedCount); }, onErrorFn || RedisClient.errorFn); },
}
},
removeRecords: function (first, last) { for (var i = first; i <= last; i++) { this.removeRecord(first); } this.fireEvent('storeMultipleRecordsRemoved', [this, first, last]); }
if (onSuccessFn) onSuccessFn(r.getResult().Item);
if (onSuccessFn) onSuccessFn(r.Item);
removeStartFromList: function(id, onSuccessFn, onErrorFn) { this.gateway.getFromService('RemoveStartFromList', { Id: id || null }, function(r) { if (onSuccessFn) onSuccessFn(r.getResult().Item); }, onErrorFn || RedisClient.errorFn); },
if (tmpElementStorage == aXulObjRef) { } else {
if (tmpElementStorage != aXulObjRef) {
removeXulObjRef: function(id, aXulObjRef) { try { if (typeof(xulObjReference[id]) == "object") { for (var i = 0; i < xulObjReference[id].length; i++) { var tmpElementStorage = xulObjReference[id].pop(); if (tmpElementStorage == aXulObjRef) { // this.log("removed a reference to element with id '" + id + "'"); } else { xulObjReference[id].unshift(tmpElementStorage); } } } else { this.log("xulObjReference to " + id + " not defined as Array"); } } catch(e) { this.log("sipgateFFX->removeXulObjRef ERROR " + e); } }
this.domObj.adopt(this.tbContainer);
this.domObj.adopt(this.scroller);
render : function() { this.parent(); /* if a container was passed in, use it instead of the one from the * template */ if (document.id(this.options.parent)) { this.domObj = document.id(this.options.parent); this.elements = new Hash({'jxBarContainer':this.domObj}); this.domObj.addClass('jxBarContainer'); } if (this.options.scroll) { this.processElements(this.options.scrollerTemplate, this.classes); this.domObj.adopt(this.tbContainer); } /* this allows toolbars to add themselves to this bar container * once it already exists without requiring an explicit reference * to the toolbar container */ this.domObj.store('jxBarContainer', this); if (['top','right','bottom','left'].contains(this.options.position)) { this.domObj.addClass('jxBar' + this.options.position.capitalize()); } else { this.domObj.addClass('jxBarTop'); this.options.position = 'top'; } if (this.options.scroll && ['top','bottom'].contains(this.options.position)) { // make sure we update our size when we get added to the DOM this.addEvent('addTo', this.update.bind(this)); this.scrollLeft = new Jx.Button({ image: Jx.aPixel.src }).addTo(this.tbContainer, 'top'); this.scrollLeft.domObj.addClass('jxBarScrollLeft'); this.scrollLeft.addEvents({ click: this.scroll.bind(this,'left') }); this.scrollRight = new Jx.Button({ image: Jx.aPixel.src }).addTo(this.tbContainer, 'bottom'); this.scrollRight.domObj.addClass('jxBarScrollRight'); this.scrollRight.addEvents({ click: this.scroll.bind(this, 'right') }); } else if (this.options.scroll && ['left','right'].contains(this.options.position)) { //do we do scrolling up and down? //for now disable scroll in this case this.options.scroll = false; } else { this.options.scroll = false; } this.addEvent('add',this.update.bind(this)); if (this.options.toolbars) { this.add(this.options.toolbars); } },
}).addTo(this.tbContainer, 'top');
}).addTo(this.domObj, 'top');
render : function() { this.parent(); /* if a container was passed in, use it instead of the one from the * template */ if (document.id(this.options.parent)) { this.domObj = document.id(this.options.parent); this.elements = new Hash({'jxBarContainer':this.domObj}); this.domObj.addClass('jxBarContainer'); } if (this.options.scroll) { this.processElements(this.options.scrollerTemplate, this.classes); this.domObj.adopt(this.tbContainer); } /* this allows toolbars to add themselves to this bar container * once it already exists without requiring an explicit reference * to the toolbar container */ this.domObj.store('jxBarContainer', this); if (['top','right','bottom','left'].contains(this.options.position)) { this.domObj.addClass('jxBar' + this.options.position.capitalize()); } else { this.domObj.addClass('jxBarTop'); this.options.position = 'top'; } if (this.options.scroll && ['top','bottom'].contains(this.options.position)) { // make sure we update our size when we get added to the DOM this.addEvent('addTo', this.update.bind(this)); this.scrollLeft = new Jx.Button({ image: Jx.aPixel.src }).addTo(this.tbContainer, 'top'); this.scrollLeft.domObj.addClass('jxBarScrollLeft'); this.scrollLeft.addEvents({ click: this.scroll.bind(this,'left') }); this.scrollRight = new Jx.Button({ image: Jx.aPixel.src }).addTo(this.tbContainer, 'bottom'); this.scrollRight.domObj.addClass('jxBarScrollRight'); this.scrollRight.addEvents({ click: this.scroll.bind(this, 'right') }); } else if (this.options.scroll && ['left','right'].contains(this.options.position)) { //do we do scrolling up and down? //for now disable scroll in this case this.options.scroll = false; } else { this.options.scroll = false; } this.addEvent('add',this.update.bind(this)); if (this.options.toolbars) { this.add(this.options.toolbars); } },
}).addTo(this.tbContainer, 'bottom');
}).addTo(this.domObj, 'bottom');
render : function() { this.parent(); /* if a container was passed in, use it instead of the one from the * template */ if (document.id(this.options.parent)) { this.domObj = document.id(this.options.parent); this.elements = new Hash({'jxBarContainer':this.domObj}); this.domObj.addClass('jxBarContainer'); } if (this.options.scroll) { this.processElements(this.options.scrollerTemplate, this.classes); this.domObj.adopt(this.tbContainer); } /* this allows toolbars to add themselves to this bar container * once it already exists without requiring an explicit reference * to the toolbar container */ this.domObj.store('jxBarContainer', this); if (['top','right','bottom','left'].contains(this.options.position)) { this.domObj.addClass('jxBar' + this.options.position.capitalize()); } else { this.domObj.addClass('jxBarTop'); this.options.position = 'top'; } if (this.options.scroll && ['top','bottom'].contains(this.options.position)) { // make sure we update our size when we get added to the DOM this.addEvent('addTo', this.update.bind(this)); this.scrollLeft = new Jx.Button({ image: Jx.aPixel.src }).addTo(this.tbContainer, 'top'); this.scrollLeft.domObj.addClass('jxBarScrollLeft'); this.scrollLeft.addEvents({ click: this.scroll.bind(this,'left') }); this.scrollRight = new Jx.Button({ image: Jx.aPixel.src }).addTo(this.tbContainer, 'bottom'); this.scrollRight.domObj.addClass('jxBarScrollRight'); this.scrollRight.addEvents({ click: this.scroll.bind(this, 'right') }); } else if (this.options.scroll && ['left','right'].contains(this.options.position)) { //do we do scrolling up and down? //for now disable scroll in this case this.options.scroll = false; } else { this.options.scroll = false; } this.addEvent('add',this.update.bind(this)); if (this.options.toolbars) { this.add(this.options.toolbars); } },
render: function(field) { var manager = new Styler.ColorManager(); manager.register(field); }
render: function(button) { Ext.ButtonToggleMgr.register(button); }
render: function(field) { var manager = new Styler.ColorManager(); manager.register(field); }
this.options.data.addEvent('loadFinished', this.bound.update); this.options.data.addEvent('sortFinished', this.bound.update); this.options.data.addEvent('loadError', this.bound.update);
this.options.data.addEvent('storeDataLoaded', this.bound.update); this.options.data.addEvent('storeSortFinished', this.bound.update); this.options.data.addEvent('storeDataLoadFailed', this.bound.update);
render: function () { if (!$defined(this.options.data)) { //we can't do anything without data return; } this.options.content = this.domA; //pass to parent this.parent(); this.domA.addClass(this.options.containerClass); //parse templates so we know what values are needed in each this.itemCols = this.parseTemplate(this.options.itemTemplate); this.bound.update = this.update.bind(this); //listen for data updates this.options.data.addEvent('loadFinished', this.bound.update); this.options.data.addEvent('sortFinished', this.bound.update); this.options.data.addEvent('loadError', this.bound.update); if (this.options.data.loaded) { this.update(); } },
this.domObj = new Element('form', {
this.domObj.set({
render : function () { //create the form first this.domObj = new Element('form', { 'method' : this.options.method, 'action' : this.options.action, 'class' : 'jxForm', 'name' : this.options.name, 'accept-charset': this.options.acceptCharset, events: { keypress: function(e) { if (e.key == 'enter' && e.target.tagName != "TEXTAREA" && this.defaultAction && this.defaultAction.click) { document.id(this.defaultAction).focus(); this.defaultAction.click(); e.stop(); } }.bind(this) } }); if (this.options.fileUpload) { this.domObj.set('enctype', 'multipart/form-data'); } if ($defined(this.options.id)) { this.domObj.set('id', this.options.id); } if ($defined(this.options.formClass)) { this.domObj.addClass(this.options.formClass); } },
'class' : 'jxForm',
render : function () { //create the form first this.domObj = new Element('form', { 'method' : this.options.method, 'action' : this.options.action, 'class' : 'jxForm', 'name' : this.options.name, 'accept-charset': this.options.acceptCharset, events: { keypress: function(e) { if (e.key == 'enter' && e.target.tagName != "TEXTAREA" && this.defaultAction && this.defaultAction.click) { document.id(this.defaultAction).focus(); this.defaultAction.click(); e.stop(); } }.bind(this) } }); if (this.options.fileUpload) { this.domObj.set('enctype', 'multipart/form-data'); } if ($defined(this.options.id)) { this.domObj.set('id', this.options.id); } if ($defined(this.options.formClass)) { this.domObj.addClass(this.options.formClass); } },
if ($defined(this.options.id)) { this.domObj.set('id', this.options.id); }
render : function () { //create the form first this.domObj = new Element('form', { 'method' : this.options.method, 'action' : this.options.action, 'class' : 'jxForm', 'name' : this.options.name, 'accept-charset': this.options.acceptCharset, events: { keypress: function(e) { if (e.key == 'enter' && e.target.tagName != "TEXTAREA" && this.defaultAction && this.defaultAction.click) { document.id(this.defaultAction).focus(); this.defaultAction.click(); e.stop(); } }.bind(this) } }); if (this.options.fileUpload) { this.domObj.set('enctype', 'multipart/form-data'); } if ($defined(this.options.id)) { this.domObj.set('id', this.options.id); } if ($defined(this.options.formClass)) { this.domObj.addClass(this.options.formClass); } },
store.addEvent('storeSortFinished', this.drawStore);
render: function() { this.parent(); var store = this.store; this.domObj.addClass(this.uniqueId); new Jx.Layout(this.domObj, { onSizeChange: this.resize }); if (store instanceof Jx.Store) { store.addEvent('storeDataLoaded', this.storeLoaded); store.addEvent('storeSortFinished', this.drawStore); store.addEvent('storeRecordAdded', this.addRow); store.addEvent('storeColumnChanged', this.updateRow); store.addEvent('storeRecordRemoved', this.removeRow); store.addEvent('storeMultipleRecordsRemoved', this.removeRows); if (this.store.loaded) { this.storeLoaded(); } } if (!this.columns.useHeaders()) { this.columnContainer.dispose(); } else { this.wantEvent('gridScroll'); } if (!this.row.useHeaders()) { this.rowContainer.dispose(); } else { this.wantEvent('gridScroll'); } this.contentContainer.setStyle('overflow', 'auto'); // todo: very hacky! can plugins 'wantEvent' between init and render? this.hooks.each(function(value, key) { if (value) { this.hooks.set(key, false); this.wantEvent(key); } }, this); },
if (this.store.loaded) { this.storeLoaded();
if (store.loaded) { this.storeLoaded(store);
render: function() { this.parent(); var store = this.store; this.domObj.addClass(this.uniqueId); new Jx.Layout(this.domObj, { onSizeChange: this.resize }); if (store instanceof Jx.Store) { store.addEvent('storeDataLoaded', this.storeLoaded); store.addEvent('storeSortFinished', this.drawStore); store.addEvent('storeRecordAdded', this.addRow); store.addEvent('storeColumnChanged', this.updateRow); store.addEvent('storeRecordRemoved', this.removeRow); store.addEvent('storeMultipleRecordsRemoved', this.removeRows); if (this.store.loaded) { this.storeLoaded(); } } if (!this.columns.useHeaders()) { this.columnContainer.dispose(); } else { this.wantEvent('gridScroll'); } if (!this.row.useHeaders()) { this.rowContainer.dispose(); } else { this.wantEvent('gridScroll'); } this.contentContainer.setStyle('overflow', 'auto'); // todo: very hacky! can plugins 'wantEvent' between init and render? this.hooks.each(function(value, key) { if (value) { this.hooks.set(key, false); this.wantEvent(key); } }, this); },
if (document.id(this.options.parent)) { this.addTo(this.options.parent); }
render: function() { this.parent(); var store = this.store; this.domObj.addClass(this.uniqueId); new Jx.Layout(this.domObj, { onSizeChange: this.resize }); if (store instanceof Jx.Store) { store.addEvent('storeDataLoaded', this.storeLoaded); store.addEvent('storeSortFinished', this.drawStore); store.addEvent('storeRecordAdded', this.addRow); store.addEvent('storeColumnChanged', this.updateRow); store.addEvent('storeRecordRemoved', this.removeRow); store.addEvent('storeMultipleRecordsRemoved', this.removeRows); if (this.store.loaded) { this.storeLoaded(); } } if (!this.columns.useHeaders()) { this.columnContainer.dispose(); } else { this.wantEvent('gridScroll'); } if (!this.row.useHeaders()) { this.rowContainer.dispose(); } else { this.wantEvent('gridScroll'); } this.contentContainer.setStyle('overflow', 'auto'); // todo: very hacky! can plugins 'wantEvent' between init and render? this.hooks.each(function(value, key) { if (value) { this.hooks.set(key, false); this.wantEvent(key); } }, this); },
this.contentContainer.addEvent('contextmenu', this.bound.stop);
this.contentClone = this.contentContainer.clone();
render : function() { this.parent(); if (!Jx.Menu.Menus) { Jx.Menu.Menus = []; } this.contentContainer.addEvent('contextmenu', this.bound.stop); this.list = new Jx.List(this.subDomObj, { onRemove: this.bound.remove }); /* if options are passed, make a button inside an LI so the menu can be embedded inside a toolbar */ if (this.options.buttonOptions) { this.button = new Jx.Button($merge(this.options.buttonOptions,{ template: this.options.buttonTemplate, onClick:this.bound.show })); this.button.domA.addEvent('mouseenter', this.bound.mouseenter); this.button.domA.addEvent('mouseleave', this.bound.mouseleave); this.domObj = this.button.domObj; this.domObj.store('jxMenu', this); } this.subDomObj.addEvent('mouseenter', this.bound.mouseenter); this.subDomObj.addEvent('mouseleave', this.bound.mouseleave); if (this.options.parent) { this.addTo(this.options.parent); } },
document.addEvent('mousedown', this.hide); document.addEvent('keyup', this.keypressHandler);
document.addEvent('mousedown', this.bound.hide); document.addEvent('keyup', this.bound.keypress);
render: function() { this.classes.combine({ wrapper: 'jxInputWrapper', revealer: 'jxInputRevealer', icon: 'jxInputIcon' }); this.parent(); var button = new Jx.Button({ template: this.options.buttonTemplate, imageClass: 'jxInputRevealerIcon' }).addTo(this.revealer); this.menu = new Jx.Menu(); this.menu.button = button; this.buttonSet = new Jx.ButtonSet(); this.buttonSet = new Jx.ButtonSet({ onChange: (function(set) { var button = set.activeButton; var l = button.options.label; if (l == '&nbsp;') { l = ''; } this.setLabel(l); var img = button.options.image; if (img.indexOf('a_pixel') != -1) { img = ''; } this.setImage(img, button.options.imageClass); this.fireEvent('change', this); }).bind(this) }); if (this.options.items) { this.add(this.options.items); } var that = this; button.addEvent('click', function(e) { if (this.list.count() === 0) { return; } if (!button.options.enabled) { return; } this.contentContainer.setStyle('visibility','hidden'); this.contentContainer.setStyle('display','block'); document.id(document.body).adopt(this.contentContainer); /* we have to size the container for IE to render the chrome correctly * but just in the menu/sub menu case - there is some horrible peekaboo * bug in IE related to ULs that we just couldn't figure out */ this.contentContainer.setContentBoxSize(this.subDomObj.getMarginBoxSize()); this.showChrome(this.contentContainer); this.position(this.contentContainer, that.field, { horizontal: ['left left', 'right right'], vertical: ['bottom top', 'top bottom'], offsets: this.chromeOffsets }); this.contentContainer.setStyle('visibility',''); document.addEvent('mousedown', this.hide); document.addEvent('keyup', this.keypressHandler); this.fireEvent('show', this); }.bindWithEvent(this.menu)); this.menu.addEvents({ 'show': (function() { //this.setActive(true); }).bind(this), 'hide': (function() { //this.setActive(false); }).bind(this) }); this.addEvent('change', function(){ window.console ? console.log('on change detected') : false; }) },
this.label.addEvent('click', function(ev) { this.field.checked ? this.setValue(false) : this.setValue(true); }.bind(this));
render: function () { this.parent(); if ($defined(this.options.checked) && this.options.checked) { if (Browser.Engine.trident) { var parent = this.field.getParent(); var sibling; if (parent) { sibling = this.field.getPrevious(); } this.field.setStyle('visibility','hidden'); this.field.inject(document.id(document.body)); this.field.checked = true; this.field.defaultChecked = true; this.field.dispose(); this.field.setStyle('visibility','visible'); if (sibling) { this.field.inject(sibling, 'after'); } else if (parent) { this.field.inject(parent, 'top'); } } else { this.field.set("checked", "checked"); this.field.set("defaultChecked", "checked"); } } },
if (this.options.scroll) {
if (!['center', 'right'].contains(this.options.align) && this.options.scroll) {
render: function() { this.parent(); /* if a container was passed in, use it instead of the one from the * template */ if (document.id(this.options.parent)) { this.domObj = document.id(this.options.parent); this.elements = new Hash({ 'jxBarContainer': this.domObj }); this.domObj.addClass('jxBarContainer'); this.domObj.grab(this.controls); this.domObj.addEvent('sizeChange', this.update); } if (this.options.scroll) { this.processElements(this.options.scrollerTemplate, this.classes); this.domObj.grab(this.scroller, 'top'); } else { this.domObj.addClass('jxToolbarAlign' + this.options.align.capitalize()); } /* this allows toolbars to add themselves to this bar container * once it already exists without requiring an explicit reference * to the toolbar container */ this.domObj.store('jxBarContainer', this); if (['top', 'right', 'bottom', 'left'].contains(this.options.position)) { this.domObj.addClass('jxBar' + this.options.position.capitalize()); } else { this.domObj.addClass('jxBarTop'); this.options.position = 'top'; } if (this.options.scroll && ['top', 'bottom'].contains(this.options.position)) { // make sure we update our size when we get added to the DOM this.addEvent('addTo', function(){ this.domObj.getParent().addEvent('sizeChange', this.update); this.update(); }); this.scrollLeft = new Jx.Button({ image: Jx.aPixel.src }).addTo(this.controls, 'bottom'); document.id(this.scrollLeft).addClass('jxBarScrollLeft'); this.scrollLeft.addEvents({ click: this.scroll.bind(this, 'left') }); this.scrollRight = new Jx.Button({ image: Jx.aPixel.src }).addTo(this.controls, 'bottom'); document.id(this.scrollRight).addClass('jxBarScrollRight'); this.scrollRight.addEvents({ click: this.scroll.bind(this, 'right') }); } else if (this.options.scroll && ['left', 'right'].contains(this.options.position)) { //do we do scrolling up and down? //for now disable scroll in this case this.options.scroll = false; } else { this.options.scroll = false; } this.addEvent('add', this.update); if (this.options.toolbars) { this.add(this.options.toolbars); } },
this.bound.stop = function(e){e.stop();}; this.bound.remove = function(item) {item.setOwner(null);}; this.bound.show = this.show.bind(this);
render : function() { this.parent(); if (!Jx.Menu.Menus) { Jx.Menu.Menus = []; } this.bound.stop = function(e){e.stop();}; this.bound.remove = function(item) {item.setOwner(null);}; this.bound.show = this.show.bind(this); this.contentContainer.addEvent('contextmenu', this.bound.stop); this.list = new Jx.List(this.subDomObj, { onRemove: this.bound.remove }); /* if options are passed, make a button inside an LI so the menu can be embedded inside a toolbar */ if (this.options.buttonOptions) { this.button = new Jx.Button($merge(this.options.buttonOptions,{ template: this.options.buttonTemplate, onClick:this.bound.show })); this.button.domA.addEvent('mouseenter', this.onMouseEnter); this.button.domA.addEvent('mouseleave', this.onMouseLeave); this.domObj = this.button.domObj; this.domObj.store('jxMenu', this); } this.subDomObj.addEvent('mouseenter', this.onMouseEnter); this.subDomObj.addEvent('mouseleave', this.onMouseLeave); if (this.options.parent) { this.addTo(this.options.parent); } },
this.button.domA.addEvent('mouseenter', this.onMouseEnter); this.button.domA.addEvent('mouseleave', this.onMouseLeave);
this.button.domA.addEvent('mouseenter', this.bound.mouseenter); this.button.domA.addEvent('mouseleave', this.bound.mouseleave);
render : function() { this.parent(); if (!Jx.Menu.Menus) { Jx.Menu.Menus = []; } this.bound.stop = function(e){e.stop();}; this.bound.remove = function(item) {item.setOwner(null);}; this.bound.show = this.show.bind(this); this.contentContainer.addEvent('contextmenu', this.bound.stop); this.list = new Jx.List(this.subDomObj, { onRemove: this.bound.remove }); /* if options are passed, make a button inside an LI so the menu can be embedded inside a toolbar */ if (this.options.buttonOptions) { this.button = new Jx.Button($merge(this.options.buttonOptions,{ template: this.options.buttonTemplate, onClick:this.bound.show })); this.button.domA.addEvent('mouseenter', this.onMouseEnter); this.button.domA.addEvent('mouseleave', this.onMouseLeave); this.domObj = this.button.domObj; this.domObj.store('jxMenu', this); } this.subDomObj.addEvent('mouseenter', this.onMouseEnter); this.subDomObj.addEvent('mouseleave', this.onMouseLeave); if (this.options.parent) { this.addTo(this.options.parent); } },
this.subDomObj.addEvent('mouseenter', this.onMouseEnter); this.subDomObj.addEvent('mouseleave', this.onMouseLeave);
this.subDomObj.addEvent('mouseenter', this.bound.mouseenter); this.subDomObj.addEvent('mouseleave', this.bound.mouseleave);
render : function() { this.parent(); if (!Jx.Menu.Menus) { Jx.Menu.Menus = []; } this.bound.stop = function(e){e.stop();}; this.bound.remove = function(item) {item.setOwner(null);}; this.bound.show = this.show.bind(this); this.contentContainer.addEvent('contextmenu', this.bound.stop); this.list = new Jx.List(this.subDomObj, { onRemove: this.bound.remove }); /* if options are passed, make a button inside an LI so the menu can be embedded inside a toolbar */ if (this.options.buttonOptions) { this.button = new Jx.Button($merge(this.options.buttonOptions,{ template: this.options.buttonTemplate, onClick:this.bound.show })); this.button.domA.addEvent('mouseenter', this.onMouseEnter); this.button.domA.addEvent('mouseleave', this.onMouseLeave); this.domObj = this.button.domObj; this.domObj.store('jxMenu', this); } this.subDomObj.addEvent('mouseenter', this.onMouseEnter); this.subDomObj.addEvent('mouseleave', this.onMouseLeave); if (this.options.parent) { this.addTo(this.options.parent); } },
'title': this.getText({set:'Jx',key:'splitter',value:'barTooltip'})
'title': this.getText({set:'Jx',key:'panelset',value:'barToolTip'})
render: function() { if (this.options.panels) { this.panels = this.options.panels; this.options.panels = null; } this.domObj = new Element('div'); new Jx.Layout(this.domObj); //make a fake panel so we get the right number of splitters var d = new Element('div', {styles:{position:'absolute'}}); new Jx.Layout(d, {minHeight:0,maxHeight:0,height:0}); var elements = [d]; this.panels.each(function(panel){ elements.push(panel.domObj); panel.options.hideTitle = true; panel.contentContainer.resize({top:0}); panel.toggleCollapse = this.maximizePanel.bind(this,panel); panel.domObj.store('Jx.Panel', panel); panel.manager = this; }, this); this.splitter = new Jx.Splitter(this.domObj, { splitInto: this.panels.length+1, layout: 'vertical', elements: elements, prepareBar: (function(i) { var bar = new Element('div', { 'class': 'jxPanelBar', 'title': this.getText({set:'Jx',key:'splitter',value:'barTooltip'}) }); var panel = this.panels[i]; panel.title.setStyle('visibility', 'hidden'); document.id(document.body).adopt(panel.title); var size = panel.title.getBorderBoxSize(); bar.adopt(panel.title); panel.title.setStyle('visibility',''); bar.setStyle('height', size.height); bar.store('size', size); return bar; }).bind(this) }); this.addEvent('addTo', function() { document.id(this.domObj.parentNode).setStyle('overflow', 'hidden'); this.domObj.resize(); }); if (this.options.parent) { this.addTo(this.options.parent); } },
label: this.getText({set:'Jx',key:'confirm',value:'affirmitiveLabel'}),
label: this.getText({set:'Jx',key:'confirm',value:'affirmativeLabel'}),
render: function () { //create content to be added //turn scrolling off as confirm only has 2 buttons. this.buttons = new Jx.Toolbar({position: 'bottom',scroll: false}); // COMMENT: returning boolean would be more what people expect instead of a localized label of a button? this.ok = new Jx.Button({ label: this.getText({set:'Jx',key:'confirm',value:'affirmitiveLabel'}), onClick: this.onClick.bind(this, true) }), this.cancel = new Jx.Button({ label: this.getText({set:'Jx',key:'confirm',value:'negativeLabel'}), onClick: this.onClick.bind(this, false) }) this.buttons.add(this.ok, this.cancel); this.options.toolbars = [this.buttons]; var type = Jx.type(this.options.question); if (type === 'string' || type === 'object' || type == 'element'){ this.question = new Element('div', { 'class': 'jxConfirmQuestion' }); switch(type) { case 'string': case 'object': this.question.set('html', this.getText(this.options.question)); break; case 'element': this.options.question.inject(this.question); break; } } else { this.question = this.options.question; document.id(this.question).addClass('jxConfirmQuestion'); } this.options.content = this.question; // add default key functions if(this.options.useKeyboard) { var self = this; this.options.keyboardMethods.ok = function(ev) { ev.preventDefault(); self.onClick(true); } this.options.keyboardMethods.cancel = function(ev) { ev.preventDefault(); self.onClick(false); } } this.parent(); // add new ones if(this.options.useKeyboard) { this.keyboard.addEvents(this.getKeyboardEvents()); } },
this.loadContent(this.content);
if(!this.options.loadOnDemand || this.options.active) { this.loadContent(this.content); }
render: function() { if (!Jx.Button.Flyout.Stack) { Jx.Button.Flyout.Stack = []; } this.parent(); this.processElements(this.options.contentTemplate, this.contentClasses); if (this.options.contentClass) { this.content.addClass(this.options.contentClass); } this.content.store('jxFlyout', this); this.loadContent(this.content); },
this.keypressWatcher = this.keypressHandler.bindWithEvent(this); this.hideWatcher = this.clickHandler.bindWithEvent(this);
render: function() { if (!Jx.Button.Flyout.Stack) { Jx.Button.Flyout.Stack = []; } this.parent(); this.processElements(this.options.contentTemplate, this.contentClasses); if (this.options.contentClass) { this.content.addClass(this.options.contentClass); } this.content.store('jxFlyout', this); this.loadContent(this.content); this.keypressWatcher = this.keypressHandler.bindWithEvent(this); this.hideWatcher = this.clickHandler.bindWithEvent(this); },
this._reveal();
if (this.revealing) { this._reveal(); }
render : function() { this.nodes = []; this.maxRevealed=0; this.element.update(); var self = this; this.objects.each(function(object,i) { var url = self.resolveImageUrl(object); if (url!==null) { url = url.replace(/&amp;/,'&'); } if (object.height<object.width) { var top = (self.height-(self.height*object.height/object.width))/2; } else { var top = 0; } var img = new Element('img').setStyle({margin:top+'px auto 0px'}); img.setAttribute(self.revealing ? 'data-src' : 'src', url ); var item = new Element('div',{'class':'in2igui_gallery_item'}).setStyle({'width':self.width+'px','height':self.height+'px'}).insert(img); item.observe('click',function() { self.itemClicked(i); }); item.dragDropInfo = {kind:'image',icon:'common/image',id:object.id,title:object.name || object.title}; item.onmousedown=function(e) { In2iGui.startDrag(e,item); return false; }; item.observe('dblclick',function() { self.itemDoubleClicked(i); }); self.element.insert(item); self.nodes.push(item); }); this._reveal(); },
this.uploadBtn = new Jx.Button({ label : this.getText({set:'Jx',key:'upload',value:'buttonText'}), onClick: this.upload.bind(this) }); var tlb = new Jx.Toolbar({position: 'bottom', scroll: false}).add(this.uploadBtn); this.uploadBtn.setEnabled(false); this.options.toolbars = [tlb];
if (!this.options.file.autoUpload) { this.uploadBtn = new Jx.Button({ label : this.getText({set:'Jx',key:'upload',value:'buttonText'}), onClick: this.upload.bind(this) }); var tlb = new Jx.Toolbar({position: 'bottom', scroll: false}).add(this.uploadBtn); this.uploadBtn.setEnabled(false); this.options.toolbars = [tlb]; }
render: function () { //first create panel content this.domObjA = new Element('div', {'class' : 'jxFileUploadPanel'}); if ($defined(this.options.prompt)) { var desc; if (Jx.type(this.options.prompt === 'string')) { desc = new Element('p', { html: this.options.prompt }); } else { desc = this.options.prompt; } desc.inject(this.domObjA); } //add the file field this.fileOpt = this.options.file; this.fileOpt.template = '<div class="jxInputContainer jxFileInputs"><input class="jxInputFile" type="file" name={name} /></div>'; this.file = new Jx.Field.File(this.fileOpt); this.file.addEvent('fileSelected', this.moveToQueue); this.file.addTo(this.domObjA); this.listView = new Jx.ListView({ template: '<ul class="jxListView jxList jxUploadQueue"></ul>' }).addTo(this.domObjA); //this is the upload button at the bottom of the panel. this.uploadBtn = new Jx.Button({ label : this.getText({set:'Jx',key:'upload',value:'buttonText'}), onClick: this.upload.bind(this) }); var tlb = new Jx.Toolbar({position: 'bottom', scroll: false}).add(this.uploadBtn); this.uploadBtn.setEnabled(false); this.options.toolbars = [tlb]; //then pass it on to the Panel constructor this.options.content = this.domObjA; this.parent(this.options); },
text = this.store.fillTemplate(null,this.options.textTemplate,this.columnsNeeded);
if (!$defined(this.columnsNeeded) || (Jx.type(this.columnsNeeded) === 'array' && this.columnsNeeded.length === 0)) { this.columnsNeeded = this.store.parseTemplate(this.options.textTemplate); } text = this.store.fillTemplate(null,this.options.textTemplate,this.columnsNeeded);
render: function () { this.parent(); var text = ''; if ($defined(this.options.textTemplate)) { text = this.store.fillTemplate(null,this.options.textTemplate,this.columnsNeeded); } if ($defined(this.options.formatter)) { text = this.options.formatter.format(text); } this.domObj.set('html',text); if ($defined(this.options.css) && Jx.type(this.options.css) === 'function') { this.domObj.addClass(this.options.css.run(text)); } else if ($defined(this.options.css) && Jx.type(this.options.css) === 'string'){ this.domObj.addClass(this.options.css); } }
positionElement: this.field,
render: function() { this.classes.combine({ wrapper: 'jxInputWrapper', revealer: 'jxInputRevealer', icon: 'jxInputIcon' }); this.parent(); var self = this; if (!Jx.Field.Color.ColorPalette) { Jx.Field.Color.ColorPalette = new Jx.ColorPalette(this.options); } this.button = new Jx.Button.Flyout({ template: this.options.buttonTemplate, imageClass: 'jxInputRevealerIcon', onBeforeOpen: function() { if (Jx.Field.Color.ColorPalette.currentButton) { Jx.Field.Color.ColorPalette.currentButton.hide(); } Jx.Field.Color.ColorPalette.currentButton = this; Jx.Field.Color.ColorPalette.addEvent('change', self.changed); Jx.Field.Color.ColorPalette.addEvent('click', self.hide); this.content.appendChild(Jx.Field.Color.ColorPalette.domObj); Jx.Field.Color.ColorPalette.domObj.setStyle('display', 'block'); }, onOpen: function() { /* setting these before causes an update problem when clicking on * a second color button when another one is open - the color * wasn't updating properly */ Jx.Field.Color.ColorPalette.options.color = self.options.color; Jx.Field.Color.ColorPalette.updateSelected(); } }).addTo(this.revealer); this.validator = new Jx.Plugin.Field.Validator({ validators: [{ validatorClass: 'colorHex', validator: { name: 'colorValidator', options: { validateOnChange: false, errorMsg: self.options.errorMsg, test: function(field,props) { try { var c = field.get('value').hexToRgb(true); if(c == null) return false; for(var i = 0; i < 3; i++) { if(c[i].toString() == 'NaN') { return false; } } }catch(e) { return false; } c = c.rgbToHex().toUpperCase(); self.setColor(c); return true; } } } }], validateOnBlur: true, validateOnChange: true }); this.validator.attach(this); this.field.addEvent('keyup', this.onKeyUp.bind(this)); if (this.options.showOnHover) { this.field.addEvent('mouseenter', function(ev) { self.button.clicked.delay(self.options.showDelay, self.button); }); } this.setValue(this.options.color); this.icon.setStyle('background-color', this.options.color); //this.addEvent('change', self.changed); },
this.domObj.addClass('jxProgressSarting');
this.domObj.addClass('jxProgressStarting');
render: function () { this.parent(); if ($defined(this.options.parent)) { this.domObj.inject($(this.options.parent)); } this.domObj.addClass('jxProgressSarting'); //determine width of progressbar if (this.options.bar.width === 'auto') { //get width of container this.options.bar.width = this.domObj.getStyle('width').toInt(); } //determine height /** if (this.options.bar.height === 'auto') { this.options.bar.height = this.domObj.getStyle('height').toInt() - 4; } **/ //Message if (this.message) { if ($defined(MooTools.lang.get('Jx','progressbar').messageText)) { this.message.set('html', MooTools.lang.get('Jx','progressbar').messageText); } else { this.message.destroy(); } } //bar container itself if (this.container) { this.container.setStyles({ 'position': 'relative', 'width': this.options.bar.width //'height' : this.options.bar.height + 4 }); } //Outline if (this.outline) { this.outline.setStyles({ 'width': this.options.bar.width //'height' : this.options.bar.height }); } //Fill if (this.fill) { this.fill.setStyles({ 'width': 0 //'height' : this.options.bar.height }); } //TODO: check for {progress} and {total} in progressText var obj = {}; var progressText = MooTools.lang.get('Jx','progressbar').progressText; if (progressText.contains('{progress}')) { obj.progress = 0; } if (progressText.contains('{total}')) { obj.total = 0; } //Progress text if (this.text) { this.text.set('html', progressText.substitute(obj)); } },
this.position(this.contentContainer, this.button.domObj, { horizontal: ['right right'],
this.position(this.contentContainer, that.field, { horizontal: ['left left', 'right right'],
render: function() { this.classes.combine({ wrapper: 'jxInputWrapper', revealer: 'jxInputRevealer', icon: 'jxInputIcon' }); this.parent(); var button = new Jx.Button({ template: this.options.buttonTemplate, imageClass: 'jxInputRevealerIcon' }).addTo(this.revealer); this.menu = new Jx.Menu(); this.menu.button = button; this.buttonSet = new Jx.ButtonSet(); this.buttonSet = new Jx.ButtonSet({ onChange: (function(set) { var button = set.activeButton; var l = button.options.label; if (l == '&nbsp;') { l = ''; } this.setLabel(l); var img = button.options.image; if (img.indexOf('a_pixel') != -1) { img = ''; } this.setImage(img, button.options.imageClass); this.fireEvent('change', this); }).bind(this) }); if (this.options.items) { this.add(this.options.items); } button.addEvent('click', function(e) { if (this.list.count() === 0) { return; } if (!button.options.enabled) { return; } this.contentContainer.setStyle('visibility','hidden'); this.contentContainer.setStyle('display','block'); document.id(document.body).adopt(this.contentContainer); /* we have to size the container for IE to render the chrome correctly * but just in the menu/sub menu case - there is some horrible peekaboo * bug in IE related to ULs that we just couldn't figure out */ this.contentContainer.setContentBoxSize(this.subDomObj.getMarginBoxSize()); this.showChrome(this.contentContainer); this.position(this.contentContainer, this.button.domObj, { horizontal: ['right right'], vertical: ['bottom top', 'top bottom'], offsets: this.chromeOffsets }); this.contentContainer.setStyle('visibility',''); document.addEvent('mousedown', this.hide); document.addEvent('keyup', this.keypressHandler); this.fireEvent('show', this); }.bindWithEvent(this.menu)); this.menu.addEvents({ 'show': (function() { //this.setActive(true); }).bind(this), 'hide': (function() { //this.setActive(false); }).bind(this) }); this.addEvent('change', function(){ window.console ? console.log('on change detected') : false; }) },
'html': option.text
'html': this.getText(option.text)
render: function () { this.parent(); this.field.addEvent('change', function() {this.fireEvent('change', this);}.bind(this)); if ($defined(this.options.multiple)) { this.field.set('multiple', this.options.multiple); } if ($defined(this.options.size)) { this.field.set('size', this.options.size); } if ($defined(this.options.optGroups)) { this.options.optGroups.each(function(group){ var gr = new Element('optGroup'); gr.set('label',group.name); group.options.each(function(option){ var opt = new Element('option', { 'value': option.value, 'html': option.text }); if ($defined(option.selected) && option.selected) { opt.set("selected", "selected"); } gr.grab(opt); },this); this.field.grab(gr); },this); } else if ($defined(this.options.comboOpts)) { this.options.comboOpts.each(function (item) { this.addOption(item); }, this); } },
if(!this.options.loadOnDemand) {
if(!this.options.loadOnDemand || this.options.active) {
render : function( ) { this.options = $merge(this.options, {toggle:true}); this.parent(); this.domObj.store('jxTab', this); this.processElements(this.options.contentTemplate, this.classes); new Jx.Layout(this.content, this.options); if(!this.options.loadOnDemand) { this.loadContent(this.content); } this.addEvent('down', function(){ this.content.addClass(this.options.activeTabClass); }.bind(this)); this.addEvent('up', function(){ this.content.removeClass(this.options.activeTabClass); }.bind(this)); //remove the close button if necessary if (this.domClose) { if (this.options.close) { this.domObj.addClass('jxTabClose'); this.domClose.addEvent('click', (function(){ var shouldClose = true; if ($defined(this.options.shouldClose)) { if (typeof this.options.shouldClose == 'function') { shouldClose = this.options.shouldClose(); } else { shouldClose = this.options.shouldClose; } } if (shouldClose) { this.fireEvent('close'); } }).bind(this)); } else { this.domClose.dispose(); } } },
if(this.options.active) { this.clicked(); }
render : function( ) { this.options = $merge(this.options, {toggle:true}); this.parent(); this.domObj.store('jxTab', this); this.processElements(this.options.contentTemplate, this.classes); new Jx.Layout(this.content, this.options); if(!this.options.loadOnDemand) { this.loadContent(this.content); } this.addEvent('down', function(){ this.content.addClass(this.options.activeTabClass); }.bind(this)); this.addEvent('up', function(){ this.content.removeClass(this.options.activeTabClass); }.bind(this)); //remove the close button if necessary if (this.domClose) { if (this.options.close) { this.domObj.addClass('jxTabClose'); this.domClose.addEvent('click', (function(){ var shouldClose = true; if ($defined(this.options.shouldClose)) { if (typeof this.options.shouldClose == 'function') { shouldClose = this.options.shouldClose(); } else { shouldClose = this.options.shouldClose; } } if (shouldClose) { this.fireEvent('close'); } }).bind(this)); } else { this.domClose.dispose(); } } },
if (this.revealing) { this._reveal(); }
this._reveal();
render : function() { this.nodes = []; this.maxRevealed=0; this.element.update(); var self = this; this.objects.each(function(object,i) { var url = self.resolveImageUrl(object); if (url!==null) { url = url.replace(/&amp;/,'&'); } if (object.height<object.width) { var top = (self.height-(self.height*object.height/object.width))/2; } else { var top = 0; } var img = new Element('img').setStyle({margin:top+'px auto 0px'}); img.setAttribute(self.revealing ? 'data-src' : 'src', url ); var item = new Element('div',{'class':'in2igui_gallery_item'}).setStyle({'width':self.width+'px','height':self.height+'px'}).insert(img); item.observe('click',function() { self.itemClicked(i); }); item.dragDropInfo = {kind:'image',icon:'common/image',id:object.id,title:object.name || object.title}; item.onmousedown=function(e) { In2iGui.startDrag(e,item); return false; }; item.observe('dblclick',function() { self.itemDoubleClicked(i); }); self.element.insert(item); self.nodes.push(item); }); if (this.revealing) { this._reveal(); } },
var render_counter = function(count, word, color, bgcolor){ return '<div class="votes"' + '<span class="item-count" ' + 'style="color:' + color + ';background:' + bgcolor + '"' + '>' + count + '</span>' +
var render_counter = function(count, word, counter_class){ var output = '<div class="votes"' + '<span class="item-count ' + counter_class + '">' + count; if (counter_class == 'accepted'){ output += '&#10003;' } output += '</span>' +
var render_counter = function(count, word, color, bgcolor){ return '<div class="votes"' + '<span class="item-count" ' + 'style="color:' + color + ';background:' + bgcolor + '"' + '>' + count + '</span>' + '<div>' + word + '</div>' + '</div>'; }
return output;
var render_counter = function(count, word, color, bgcolor){ return '<div class="votes"' + '<span class="item-count" ' + 'style="color:' + color + ';background:' + bgcolor + '"' + '>' + count + '</span>' + '<div>' + word + '</div>' + '</div>'; }
var output = '<div class="votes"' +
var output = '<div class="votes">' +
var render_counter = function(count, word, counter_class){ var output = '<div class="votes"' + '<span class="item-count ' + counter_class + '">' + count; if (counter_class == 'accepted'){ output += '&#10003;' } output += '</span>' + '<div>' + word + '</div>' + '</div>'; return output; }
if (! pager.is(':empty')){
if (paginator === ''){ pager.hide(); return; } else { pager.show();
var render_paginator = function(paginator){ var pager = $('#pager'); if (! pager.is(':empty')){ pager.html(paginator); } };
question['votes_color'], question['votes_bgcolor']
question['votes_class']
var render_question = function(question){ var entry_html = '<div class="short-summary">' + '<div class="counts">' + render_counter( question['votes'], question['votes_word'], question['votes_color'], question['votes_bgcolor'] ) + render_counter( question['answers'], question['answers_word'], question['answers_color'], question['answers_bgcolor'] ) + render_counter( question['views'], question['views_word'], question['views_color'], question['views_bgcolor'] ) + '</div>' + render_title(question) + render_user_info(question) + render_tags(question['tags']) + '</div>'; return entry_html; };
question['answers_color'], question['answers_bgcolor']
question['answers_class']
var render_question = function(question){ var entry_html = '<div class="short-summary">' + '<div class="counts">' + render_counter( question['votes'], question['votes_word'], question['votes_color'], question['votes_bgcolor'] ) + render_counter( question['answers'], question['answers_word'], question['answers_color'], question['answers_bgcolor'] ) + render_counter( question['views'], question['views_word'], question['views_color'], question['views_bgcolor'] ) + '</div>' + render_title(question) + render_user_info(question) + render_tags(question['tags']) + '</div>'; return entry_html; };
question['views_color'], question['views_bgcolor']
question['views_class']
var render_question = function(question){ var entry_html = '<div class="short-summary">' + '<div class="counts">' + render_counter( question['votes'], question['votes_word'], question['votes_color'], question['votes_bgcolor'] ) + render_counter( question['answers'], question['answers_word'], question['answers_color'], question['answers_bgcolor'] ) + render_counter( question['views'], question['views_word'], question['views_color'], question['views_bgcolor'] ) + '</div>' + render_title(question) + render_user_info(question) + render_tags(question['tags']) + '</div>'; return entry_html; };
last_login_date = data.user.last_login
function renderBooks(data){ book_data = data; last_login_date = data.user.last_login updateBookCount(data); myBooks.render(data.mybooks); $("a.reminder").click( function(){ cursor_wait(); $.ajax({ url: "/remind", type: "POST", data: { "book_id": $(this).attr('name') }, success: function(){cursor_ok(); alert ('Reminder sent')}, error: on_ajax_fail }); } ); borrowedBooks.render(data.borrowedBooks); renderOtherBooks(data.others); $("#borrowed_div").hide(); $("#my_div").hide(); silver = 'silver'; highlight = '#D9FFCC'; $("#tabAvailable").css('background-color', highlight); $("#tabBorrowed").css('background-color', silver); $("#tabOwned").css('background-color', silver); $("#tabOwned").click( function(){ showOwnedTab(); } ); $("#tabBorrowed").click( function(){ $(this).css('background-color', highlight); $("#tabAvailable").css('background-color', silver); $("#tabOwned").css('background-color', silver); $("#tabFriend").css('background-color', silver); $("#others_div").hide(); $("#my_div").hide(); $("#friend_div").hide(); $("#borrowed_div").show(); } ); $("#tabAvailable").click( function(){ showAvailableTab(); } ); $("#tabFriend").click( function(){ showFriendsTab(); } ); $('#overlay').hide();}
$('#overlay').hide();
hideLoadingGif();
function renderBooks(data){ book_data = data; last_login_date = data.user.last_login updateBookCount(data); myBooks.render(data.mybooks); $("a.reminder").click( function(){ cursor_wait(); $.ajax({ url: "/remind", type: "POST", data: { "book_id": $(this).attr('name') }, success: function(){cursor_ok(); alert ('Reminder sent')}, error: on_ajax_fail }); } ); borrowedBooks.render(data.borrowedBooks); renderOtherBooks(data.others); $("#borrowed_div").hide(); $("#my_div").hide(); silver = 'silver'; highlight = '#D9FFCC'; $("#tabAvailable").css('background-color', highlight); $("#tabBorrowed").css('background-color', silver); $("#tabOwned").css('background-color', silver); $("#tabOwned").click( function(){ showOwnedTab(); } ); $("#tabBorrowed").click( function(){ $(this).css('background-color', highlight); $("#tabAvailable").css('background-color', silver); $("#tabOwned").css('background-color', silver); $("#tabFriend").css('background-color', silver); $("#others_div").hide(); $("#my_div").hide(); $("#friend_div").hide(); $("#borrowed_div").show(); } ); $("#tabAvailable").click( function(){ showAvailableTab(); } ); $("#tabFriend").click( function(){ showFriendsTab(); } ); $('#overlay').hide();}
success: function(){alert ('Reminder sent')},
success: function(){cursor_ok(); alert ('Reminder sent')},
function renderBooks(data){ book_data = data; last_login_date = data.user.last_login updateBookCount(data); myBooks.render(data.mybooks); $("a.reminder").click( function(){ $.ajax({ url: "/remind", type: "POST", data: { "book_id": $(this).attr('name') }, success: function(){alert ('Reminder sent')}, error: on_ajax_fail }); } ); borrowedBooks.render(data.borrowedBooks); renderOtherBooks(data.others); $("#borrowed_div").hide(); $("#my_div").hide(); silver = 'silver'; highlight = '#D9FFCC'; $("#tabAvailable").css('background-color', highlight); $("#tabBorrowed").css('background-color', silver); $("#tabOwned").css('background-color', silver); $("#tabOwned").click( function(){ showOwnedTab(); } ); $("#tabBorrowed").click( function(){ $(this).css('background-color', highlight); $("#tabAvailable").css('background-color', silver); $("#tabOwned").css('background-color', silver); $("#others_div").hide(); $("#my_div").hide(); $("#borrowed_div").show(); } ); $("#tabAvailable").click( function(){ showAvailableTab(); } ); $('#overlay').hide();}
"<a ext:qtip='Download all coexpression data in a tab delimited format' href='#' onClick='fetchCoExpressionData({0})' > &nbsp; <img src='/Gemma/images/download.gif'/> &nbsp; </a>",
"<span style='cursor:pointer' ext:qtip='Download all coexpression data in a tab delimited format' onClick='fetchCoExpressionData({0})' > &nbsp; <img src='/Gemma/images/download.gif'/> &nbsp; </span>",
renderCoExpressionLinkCount : function(ee) { if (ee.coexpressionLinkCount == null) { return "Unavailable"; // analysis not run. } var downloadCoExpressionDataLink = String .format( "<a ext:qtip='Download all coexpression data in a tab delimited format' href='#' onClick='fetchCoExpressionData({0})' > &nbsp; <img src='/Gemma/images/download.gif'/> &nbsp; </a>", ee.id); var count; return ee.coexpressionLinkCount + "&nbsp;" + downloadCoExpressionDataLink; },
html += '" onmouseover="$(this).attr(\'src\', \'' + imgHover + '\')" onmouseout="$(this).attr(\'src\', \'' + img
html += '" onmouseover="$(this).attr(\'src\', \'' + imgHover + '\')" onmouseout="$(this).attr(\'src\', \'' + img;
var renderDeleteCommentIcon = function(post_id, delete_url){ if (canPostComments(post_id)){ var html = ''; var img = scriptUrl + "content/images/close-small.png"; var imgHover = scriptUrl + "content/images/close-small-hover.png"; html += '<img class="delete-icon" onclick="' + objectType + 'Comments.deleteComment($(this), ' + post_id + ', \'' + delete_url + '\')" src="' + img; html += '" onmouseover="$(this).attr(\'src\', \'' + imgHover + '\')" onmouseout="$(this).attr(\'src\', \'' + img html += '\')" title="' + $.i18n._('delete this comment') + '" />'; return html; } else{ return ''; } }
}
};
var renderDeleteCommentIcon = function(post_id, delete_url){ if (canPostComments(post_id)){ var html = ''; var img = scriptUrl + "content/images/close-small.png"; var imgHover = scriptUrl + "content/images/close-small-hover.png"; html += '<img class="delete-icon" onclick="' + objectType + 'Comments.deleteComment($(this), ' + post_id + ', \'' + delete_url + '\')" src="' + img; html += '" onmouseover="$(this).attr(\'src\', \'' + imgHover + '\')" onmouseout="$(this).attr(\'src\', \'' + img html += '\')" title="' + $.i18n._('delete this comment') + '" />'; return html; } else{ return ''; } }
var img = scriptUrl + "media/images/close-small.png"; var imgHover = scriptUrl + "media/images/close-small-hover.png";
var img = mediaUrl("media/images/close-small.png"); var imgHover = mediaUrl("media/images/close-small-hover.png");
var renderDeleteCommentIcon = function(post_id, delete_url){ if (canPostComments(post_id)){ var html = ''; var img = scriptUrl + "media/images/close-small.png"; var imgHover = scriptUrl + "media/images/close-small-hover.png"; html += '<img class="delete-icon" onclick="' + objectType + 'Comments.deleteComment($(this), ' + post_id + ', \'' + delete_url + '\')" src="' + img; html += '" onmouseover="$(this).attr(\'src\', \'' + imgHover + '\')" onmouseout="$(this).attr(\'src\', \'' + img; html += '\')" title="' + $.i18n._('delete this comment') + '" />'; return html; } else{ return ''; } };
'&nbsp; <span style="cursor:pointer" onClick="Ext.getCmp(\'ee-details-panel\').visualizeDiffExpressionHandler(\'' +
'&nbsp; <span class="link" onClick="Ext.getCmp(\'ee-details-panel\').visualizeDiffExpressionHandler(\'' +
renderDiffExpressionDetails : function(ee) { if (!ee.diffExpressedProbes) { return "Unavailable"; } if (ee.diffExpressedProbes.size() == 0) { return "None"; } var diffExpressionSummary = ""; for (var i = 0; i < ee.diffExpressedProbes.size(); i++) { var factors; if (ee.diffExpressedProbes[i].experimentalFactors == null || ee.diffExpressedProbes[i].experimentalFactors.size() == 0) { factors = "n/a"; } else { factors = "" + ee.diffExpressedProbes[i].experimentalFactors[0].name + ""; for (var j = 1; j < ee.diffExpressedProbes[i].experimentalFactors.size(); j++) { factors = factors + " x " + ee.diffExpressedProbes[i].experimentalFactors[j].name + " "; } } if (ee.diffExpressedProbes[i].numberOfDiffExpressedProbes == 0) { diffExpressionSummary = diffExpressionSummary + "&nbsp; 0"; } else { diffExpressionSummary = diffExpressionSummary + '&nbsp; <span style="cursor:pointer" onClick="Ext.getCmp(\'ee-details-panel\').visualizeDiffExpressionHandler(\'' + ee.id + '\',\'' + ee.diffExpressedProbes[i].resultSetId + '\',\'' + factors + '\')" ext:qtip="Click to visualize differentially expressed probes for: ' + factors + ' (FDR threshold=' + ee.diffExpressedProbes[i].threshold + ')">' + ee.diffExpressedProbes[i].numberOfDiffExpressedProbes + '</span>'; } } var downloadDiffDataLink = String .format( "<span style='cursor:pointer' ext:qtip='Download all differential expression data in a tab delimited format' onClick='fetchDiffExpressionData({0})' > &nbsp; <img src='/Gemma/images/download.gif'/> &nbsp; </span>", ee.id); return diffExpressionSummary + downloadDiffDataLink; },
'&nbsp; <a href="#" onClick="Ext.getCmp(\'ee-details-panel\').visualizeDiffExpressionHandler(\'' +
'&nbsp; <span style="cursor:pointer" onClick="Ext.getCmp(\'ee-details-panel\').visualizeDiffExpressionHandler(\'' +
renderDiffExpressionDetails : function(ee) { if (!ee.diffExpressedProbes) { return "Unavailable"; } if (ee.diffExpressedProbes.size() == 0) { return "None"; } var diffExpressionSummary = ""; for (var i = 0; i < ee.diffExpressedProbes.size(); i++) { var factors; if (ee.diffExpressedProbes[i].experimentalFactors == null || ee.diffExpressedProbes[i].experimentalFactors.size() == 0) { factors = "n/a"; } else { factors = "" + ee.diffExpressedProbes[i].experimentalFactors[0].name + ""; for (var j = 1; j < ee.diffExpressedProbes[i].experimentalFactors.size(); j++) { factors = factors + " x " + ee.diffExpressedProbes[i].experimentalFactors[j].name + " "; } } if (ee.diffExpressedProbes[i].numberOfDiffExpressedProbes == 0) { diffExpressionSummary = diffExpressionSummary + "&nbsp; 0"; } else { diffExpressionSummary = diffExpressionSummary + '&nbsp; <a href="#" onClick="Ext.getCmp(\'ee-details-panel\').visualizeDiffExpressionHandler(\'' + ee.id + '\',\'' + ee.diffExpressedProbes[i].resultSetId + '\',\'' + factors + '\')" ext:qtip="Click to visualize differentially expressed probes for: ' + factors + ' (FDR threshold=' + ee.diffExpressedProbes[i].threshold + ')">' + ee.diffExpressedProbes[i].numberOfDiffExpressedProbes + '</a>'; } } var downloadDiffDataLink = String .format( "<a ext:qtip='Download all differential expression data in a tab delimited format' href='#' onClick='fetchDiffExpressionData({0})' > &nbsp; <img src='/Gemma/images/download.gif'/> &nbsp; </a>", ee.id); return diffExpressionSummary + downloadDiffDataLink; },
ee.diffExpressedProbes[i].numberOfDiffExpressedProbes + '</a>';
ee.diffExpressedProbes[i].numberOfDiffExpressedProbes + '</span>';
renderDiffExpressionDetails : function(ee) { if (!ee.diffExpressedProbes) { return "Unavailable"; } if (ee.diffExpressedProbes.size() == 0) { return "None"; } var diffExpressionSummary = ""; for (var i = 0; i < ee.diffExpressedProbes.size(); i++) { var factors; if (ee.diffExpressedProbes[i].experimentalFactors == null || ee.diffExpressedProbes[i].experimentalFactors.size() == 0) { factors = "n/a"; } else { factors = "" + ee.diffExpressedProbes[i].experimentalFactors[0].name + ""; for (var j = 1; j < ee.diffExpressedProbes[i].experimentalFactors.size(); j++) { factors = factors + " x " + ee.diffExpressedProbes[i].experimentalFactors[j].name + " "; } } if (ee.diffExpressedProbes[i].numberOfDiffExpressedProbes == 0) { diffExpressionSummary = diffExpressionSummary + "&nbsp; 0"; } else { diffExpressionSummary = diffExpressionSummary + '&nbsp; <a href="#" onClick="Ext.getCmp(\'ee-details-panel\').visualizeDiffExpressionHandler(\'' + ee.id + '\',\'' + ee.diffExpressedProbes[i].resultSetId + '\',\'' + factors + '\')" ext:qtip="Click to visualize differentially expressed probes for: ' + factors + ' (FDR threshold=' + ee.diffExpressedProbes[i].threshold + ')">' + ee.diffExpressedProbes[i].numberOfDiffExpressedProbes + '</a>'; } } var downloadDiffDataLink = String .format( "<a ext:qtip='Download all differential expression data in a tab delimited format' href='#' onClick='fetchDiffExpressionData({0})' > &nbsp; <img src='/Gemma/images/download.gif'/> &nbsp; </a>", ee.id); return diffExpressionSummary + downloadDiffDataLink; },
"<a ext:qtip='Download all differential expression data in a tab delimited format' href='#' onClick='fetchDiffExpressionData({0})' > &nbsp; <img src='/Gemma/images/download.gif'/> &nbsp; </a>",
"<span style='cursor:pointer' ext:qtip='Download all differential expression data in a tab delimited format' onClick='fetchDiffExpressionData({0})' > &nbsp; <img src='/Gemma/images/download.gif'/> &nbsp; </span>",
renderDiffExpressionDetails : function(ee) { if (!ee.diffExpressedProbes) { return "Unavailable"; } if (ee.diffExpressedProbes.size() == 0) { return "None"; } var diffExpressionSummary = ""; for (var i = 0; i < ee.diffExpressedProbes.size(); i++) { var factors; if (ee.diffExpressedProbes[i].experimentalFactors == null || ee.diffExpressedProbes[i].experimentalFactors.size() == 0) { factors = "n/a"; } else { factors = "" + ee.diffExpressedProbes[i].experimentalFactors[0].name + ""; for (var j = 1; j < ee.diffExpressedProbes[i].experimentalFactors.size(); j++) { factors = factors + " x " + ee.diffExpressedProbes[i].experimentalFactors[j].name + " "; } } if (ee.diffExpressedProbes[i].numberOfDiffExpressedProbes == 0) { diffExpressionSummary = diffExpressionSummary + "&nbsp; 0"; } else { diffExpressionSummary = diffExpressionSummary + '&nbsp; <a href="#" onClick="Ext.getCmp(\'ee-details-panel\').visualizeDiffExpressionHandler(\'' + ee.id + '\',\'' + ee.diffExpressedProbes[i].resultSetId + '\',\'' + factors + '\')" ext:qtip="Click to visualize differentially expressed probes for: ' + factors + ' (FDR threshold=' + ee.diffExpressedProbes[i].threshold + ')">' + ee.diffExpressedProbes[i].numberOfDiffExpressedProbes + '</a>'; } } var downloadDiffDataLink = String .format( "<a ext:qtip='Download all differential expression data in a tab delimited format' href='#' onClick='fetchDiffExpressionData({0})' > &nbsp; <img src='/Gemma/images/download.gif'/> &nbsp; </a>", ee.id); return diffExpressionSummary + downloadDiffDataLink; },
if (!ee.diffExpressedProbes) { return "Unavailable";
var analyses = ee.differentialExpressionAnalyses; if (!analyses || analyses.size() == 0) { return "No analyses";
renderDiffExpressionDetails : function(ee) { if (!ee.diffExpressedProbes) { return "Unavailable"; } if (ee.diffExpressedProbes.size() == 0) { return "None"; } var diffExpressionSummary = ""; for (var i = 0; i < ee.diffExpressedProbes.size(); i++) { var factors; if (ee.diffExpressedProbes[i].experimentalFactors == null || ee.diffExpressedProbes[i].experimentalFactors.size() == 0) { factors = "n/a"; } else { factors = "" + ee.diffExpressedProbes[i].experimentalFactors[0].name + ""; for (var j = 1; j < ee.diffExpressedProbes[i].experimentalFactors.size(); j++) { factors = factors + " x " + ee.diffExpressedProbes[i].experimentalFactors[j].name + " "; } } if (ee.diffExpressedProbes[i].numberOfDiffExpressedProbes == 0) { diffExpressionSummary = diffExpressionSummary + "&nbsp; 0"; } else { /* * Show how many probes are differentially expressed; provide link for visualization. */ diffExpressionSummary = diffExpressionSummary + '&nbsp; <span class="link" onClick="Ext.getCmp(\'ee-details-panel\').visualizeDiffExpressionHandler(\'' + ee.id + '\',\'' + ee.diffExpressedProbes[i].resultSetId + '\',\'' + factors + '\')" ext:qtip="Click to visualize differentially expressed probes for: ' + factors + ' (FDR threshold=' + ee.diffExpressedProbes[i].threshold + ')">' + ee.diffExpressedProbes[i].numberOfDiffExpressedProbes + '</span>'; } } var downloadDiffDataLink = String .format( "<span style='cursor:pointer' ext:qtip='Download all differential expression data in a tab delimited format' onClick='fetchDiffExpressionData({0})' > &nbsp; <img src='/Gemma/images/download.gif'/> &nbsp; </span>", ee.id); return diffExpressionSummary + downloadDiffDataLink; },
if (ee.diffExpressedProbes.size() == 0) { return "None";
var finalResult = ""; for (var j = 0; j < analyses.size(); j++) { var diffExpressionSummary = ""; var analysis = analyses[j]; if (analysis.subsetFactorValue) { diffExpressionSummary = '<span ext:qtip="Subset analysis, id=' + analysis.id + '">Subset:&nbsp;' + analysis.subsetFactorValue.value + ':<span>'; } for (var i = 0; i < analysis.resultSets.size(); i++) { var resultSet = analysis.resultSets[i]; var factors; if (resultSet.experimentalFactors == null || resultSet.experimentalFactors.size() == 0) { factors = "n/a"; } else { factors = "" + resultSet.experimentalFactors[0].name + ""; for (var k = 1; k < resultSet.experimentalFactors.size(); k++) { factors = factors + " x " + resultSet.experimentalFactors[k].name + " "; } } if (resultSet.numberOfDiffExpressedProbes == 0) { diffExpressionSummary = diffExpressionSummary + "&nbsp;&nbsp;0"; } else { diffExpressionSummary = diffExpressionSummary + '&nbsp; [' + factors + ':<span class="link" onClick="Ext.getCmp(\'ee-details-panel\').visualizeDiffExpressionHandler(\'' + ee.id + '\',\'' + resultSet.resultSetId + '\',\'' + factors + '\')" ext:qtip="Click to visualize differentially expressed probes for: ' + factors + ' (FDR threshold=' + resultSet.threshold + ')">&nbsp;' + resultSet.numberOfDiffExpressedProbes + ' probes</span>'; if (resultSet.baselineGroup) { diffExpressionSummary = diffExpressionSummary + '&nbsp;Baseline&nbsp;=&nbsp;' + resultSet.baselineGroup.value } if (resultSet.upregulatedCount != 0) { diffExpressionSummary = diffExpressionSummary + ';&nbsp;' + resultSet.upregulatedCount + "&nbsp;Up"; } if (resultSet.downregulatedCount != 0) { diffExpressionSummary = diffExpressionSummary + ';&nbsp;' + resultSet.downregulatedCount + "&nbsp;Down"; } diffExpressionSummary = diffExpressionSummary + "]"; } } var downloadDiffDataLink = String .format( "<span style='cursor:pointer' ext:qtip='Download all differential expression data in a tab delimited format' onClick='fetchDiffExpressionData({0})' > &nbsp; <img src='/Gemma/images/download.gif'/> &nbsp; </span>", ee.id); finalResult = finalResult + diffExpressionSummary + "&nbsp;&nbsp;" + downloadDiffDataLink + "<br/>"
renderDiffExpressionDetails : function(ee) { if (!ee.diffExpressedProbes) { return "Unavailable"; } if (ee.diffExpressedProbes.size() == 0) { return "None"; } var diffExpressionSummary = ""; for (var i = 0; i < ee.diffExpressedProbes.size(); i++) { var factors; if (ee.diffExpressedProbes[i].experimentalFactors == null || ee.diffExpressedProbes[i].experimentalFactors.size() == 0) { factors = "n/a"; } else { factors = "" + ee.diffExpressedProbes[i].experimentalFactors[0].name + ""; for (var j = 1; j < ee.diffExpressedProbes[i].experimentalFactors.size(); j++) { factors = factors + " x " + ee.diffExpressedProbes[i].experimentalFactors[j].name + " "; } } if (ee.diffExpressedProbes[i].numberOfDiffExpressedProbes == 0) { diffExpressionSummary = diffExpressionSummary + "&nbsp; 0"; } else { /* * Show how many probes are differentially expressed; provide link for visualization. */ diffExpressionSummary = diffExpressionSummary + '&nbsp; <span class="link" onClick="Ext.getCmp(\'ee-details-panel\').visualizeDiffExpressionHandler(\'' + ee.id + '\',\'' + ee.diffExpressedProbes[i].resultSetId + '\',\'' + factors + '\')" ext:qtip="Click to visualize differentially expressed probes for: ' + factors + ' (FDR threshold=' + ee.diffExpressedProbes[i].threshold + ')">' + ee.diffExpressedProbes[i].numberOfDiffExpressedProbes + '</span>'; } } var downloadDiffDataLink = String .format( "<span style='cursor:pointer' ext:qtip='Download all differential expression data in a tab delimited format' onClick='fetchDiffExpressionData({0})' > &nbsp; <img src='/Gemma/images/download.gif'/> &nbsp; </span>", ee.id); return diffExpressionSummary + downloadDiffDataLink; },
var diffExpressionSummary = ""; for (var i = 0; i < ee.diffExpressedProbes.size(); i++) { var factors; if (ee.diffExpressedProbes[i].experimentalFactors == null || ee.diffExpressedProbes[i].experimentalFactors.size() == 0) { factors = "n/a"; } else { factors = "" + ee.diffExpressedProbes[i].experimentalFactors[0].name + ""; for (var j = 1; j < ee.diffExpressedProbes[i].experimentalFactors.size(); j++) { factors = factors + " x " + ee.diffExpressedProbes[i].experimentalFactors[j].name + " "; } } if (ee.diffExpressedProbes[i].numberOfDiffExpressedProbes == 0) { diffExpressionSummary = diffExpressionSummary + "&nbsp; 0"; } else { diffExpressionSummary = diffExpressionSummary + '&nbsp; <span class="link" onClick="Ext.getCmp(\'ee-details-panel\').visualizeDiffExpressionHandler(\'' + ee.id + '\',\'' + ee.diffExpressedProbes[i].resultSetId + '\',\'' + factors + '\')" ext:qtip="Click to visualize differentially expressed probes for: ' + factors + ' (FDR threshold=' + ee.diffExpressedProbes[i].threshold + ')">' + ee.diffExpressedProbes[i].numberOfDiffExpressedProbes + '</span>'; } } var downloadDiffDataLink = String .format( "<span style='cursor:pointer' ext:qtip='Download all differential expression data in a tab delimited format' onClick='fetchDiffExpressionData({0})' > &nbsp; <img src='/Gemma/images/download.gif'/> &nbsp; </span>", ee.id); return diffExpressionSummary + downloadDiffDataLink;
return finalResult;
renderDiffExpressionDetails : function(ee) { if (!ee.diffExpressedProbes) { return "Unavailable"; } if (ee.diffExpressedProbes.size() == 0) { return "None"; } var diffExpressionSummary = ""; for (var i = 0; i < ee.diffExpressedProbes.size(); i++) { var factors; if (ee.diffExpressedProbes[i].experimentalFactors == null || ee.diffExpressedProbes[i].experimentalFactors.size() == 0) { factors = "n/a"; } else { factors = "" + ee.diffExpressedProbes[i].experimentalFactors[0].name + ""; for (var j = 1; j < ee.diffExpressedProbes[i].experimentalFactors.size(); j++) { factors = factors + " x " + ee.diffExpressedProbes[i].experimentalFactors[j].name + " "; } } if (ee.diffExpressedProbes[i].numberOfDiffExpressedProbes == 0) { diffExpressionSummary = diffExpressionSummary + "&nbsp; 0"; } else { /* * Show how many probes are differentially expressed; provide link for visualization. */ diffExpressionSummary = diffExpressionSummary + '&nbsp; <span class="link" onClick="Ext.getCmp(\'ee-details-panel\').visualizeDiffExpressionHandler(\'' + ee.id + '\',\'' + ee.diffExpressedProbes[i].resultSetId + '\',\'' + factors + '\')" ext:qtip="Click to visualize differentially expressed probes for: ' + factors + ' (FDR threshold=' + ee.diffExpressedProbes[i].threshold + ')">' + ee.diffExpressedProbes[i].numberOfDiffExpressedProbes + '</span>'; } } var downloadDiffDataLink = String .format( "<span style='cursor:pointer' ext:qtip='Download all differential expression data in a tab delimited format' onClick='fetchDiffExpressionData({0})' > &nbsp; <img src='/Gemma/images/download.gif'/> &nbsp; </span>", ee.id); return diffExpressionSummary + downloadDiffDataLink; },
if (this._imageWaitStartTime && new Date().getTime() > this._imageWaitStartTime + 1000) {
if (this._imageWaitStartTime && new Date().getTime() > this._imageWaitStartTime + 300) {
renderDisplay: function() { this._loadContainerSize(); this._setBounds(this._requested, false); Core.Web.VirtualPosition.redraw(this._contentDiv); Core.Web.VirtualPosition.redraw(this._maskDiv); this._centerIcon(); if (!this._initialRenderDisplayComplete) { // If position was successfully set, perform initial operations related to automatic sizing // (executed on first renderDisplay() after renderAdd()). this._initialRenderDisplayComplete = true; var waiting = Core.Web.Image.monitor(this._div, Core.method(this, this._imageLoadListener)); if (waiting) { this._imageWaitStartTime = new Date().getTime(); } } if (!this._displayed) { if (this._imageWaitStartTime && new Date().getTime() > this._imageWaitStartTime + 1000) { this._imageWaitStartTime = null; } if (!this._imageWaitStartTime) { this._displayed = true; var time = (Core.Web.Env.NOT_SUPPORTED_CSS_OPACITY || !this._opening) ? 0 : this.component.render("openAnimationTime", 0); if (time > 0) { Core.Web.Scheduler.add(new Echo.Sync.WindowPane.FadeRunnable(this._div, false, time, null)); this._div.style.opacity = 0; } this._div.style.visibility = ""; } } },
+ "</a> - Species: " + data.taxon.commonName + " Desc: " + data.officialName;
+ "</a> - Species: " + data.taxonCommonName + " Desc: " + data.officialName;
renderEntity : function(data, metadata, record, row, column, store) { var dh = Ext.DomHelper; var clazz = record.get("resultClass"); if (clazz == "ExpressionExperimentValueObject") { return "<a href=\"/Gemma/expressionExperiment/showExpressionExperiment.html?id=" + data.id + "\">" + data.shortName + "</a> - " + data.name; } else if (clazz == "CompositeSequence") { return "<a href=\"/Gemma/compositeSequence/show.html?id=" + data.id + "\">" + data.name + "</a> - " + data.description + "; Array: " + data.arrayDesign.shortName; } else if (clazz == "ArrayDesignValueObject") { return "<a href=\"/Gemma/arrays/showArrayDesign.html?id=" + data.id + "\">" + data.shortName + "</a> " + data.name; } else if (/^BioSequence.*/.exec(clazz)) { return "<a href=\"/Gemma/genome/bioSequence/showBioSequence.html?id=" + data.id + "\">" + data.name + "</a> - " + data.taxon.commonName + " " + data.description; } else if (clazz == "GeneValueObject" || clazz == "PredictedGene" || clazz == "ProbeAlignedRegion") { return "<a href=\"/Gemma/gene/showGene.html?id=" + data.id + "\">" + data.officialSymbol + "</a> - Species: " + data.taxon.commonName + " Desc: " + data.officialName; } else if (clazz == "Bibliographicreference") { return "<a href=\"/Gemma/gene/showGene.html?id=" + data.id + "\">" + data.title + "</a> [" + data.pubmedId + "]"; } else if (clazz == "ExpressionExperimentSetValueObject") { /* * TODO add links. */ return data.name; } else if (clazz == "GeneSetValueObject") { /* * TODO add links */ return data.name; } }
} else if (clazz == "ExpressionExperimentSetValueObject") { return data.name; } else if (clazz == "GeneSetValueObject") { return data.name;
renderEntity : function(data, metadata, record, row, column, store) { var dh = Ext.DomHelper; var clazz = record.get("resultClass"); if (clazz == "ExpressionExperimentValueObject") { return "<a href=\"/Gemma/expressionExperiment/showExpressionExperiment.html?id=" + data.id + "\">" + data.shortName + "</a> - " + data.name; } else if (clazz == "CompositeSequence") { return "<a href=\"/Gemma/compositeSequence/show.html?id=" + data.id + "\">" + data.name + "</a> - " + data.description + "; Array: " + data.arrayDesign.shortName; } else if (clazz == "ArrayDesignValueObject") { return "<a href=\"/Gemma/arrays/showArrayDesign.html?id=" + data.id + "\">" + data.shortName + "</a> " + data.name; } else if (/^BioSequence.*/.exec(clazz)) { return "<a href=\"/Gemma/genome/bioSequence/showBioSequence.html?id=" + data.id + "\">" + data.name + "</a> - " + data.taxon.commonName + " " + data.description; } else if (clazz == "Gene" || clazz == "PredictedGene" || clazz == "ProbeAlignedRegion") { return "<a href=\"/Gemma/gene/showGene.html?id=" + data.id + "\">" + data.officialSymbol + "</a> - Species: " + data.taxon.commonName + " Desc: " + data.officialName; } else if (clazz == "Bibliographicreference") { return "<a href=\"/Gemma/gene/showGene.html?id=" + data.id + "\">" + data.title + "</a> [" + data.pubmedId + "]"; } }
return "<a href=\"/Gemma/expressionExperiment/showExpressionExperiment.html?id=" + data.id + "\">" + data.shortName + "</a> - " + data.name;
return "<a href=\"/Gemma/expressionExperiment/showExpressionExperiment.html?id=" + (data.sourceExperiment ? data.sourceExperiment : data.id) + "\">" + data.shortName + "</a> - " + data.name;
renderEntity : function(data, metadata, record, row, column, store) { var dh = Ext.DomHelper; var clazz = record.get("resultClass"); if (clazz == "ExpressionExperimentValueObject") { return "<a href=\"/Gemma/expressionExperiment/showExpressionExperiment.html?id=" + data.id + "\">" + data.shortName + "</a> - " + data.name; } else if (clazz == "CompositeSequence") { return "<a href=\"/Gemma/compositeSequence/show.html?id=" + data.id + "\">" + data.name + "</a> - " + data.description + "; Array: " + data.arrayDesign.shortName; } else if (clazz == "ArrayDesignValueObject") { return "<a href=\"/Gemma/arrays/showArrayDesign.html?id=" + data.id + "\">" + data.shortName + "</a> " + data.name; } else if (/^BioSequence.*/.exec(clazz)) { return "<a href=\"/Gemma/genome/bioSequence/showBioSequence.html?id=" + data.id + "\">" + data.name + "</a> - " + data.taxon.commonName + " " + data.description; } else if (clazz == "GeneValueObject" || clazz == "PredictedGene" || clazz == "ProbeAlignedRegion") { return "<a href=\"/Gemma/gene/showGene.html?id=" + data.id + "\">" + data.officialSymbol + "</a> - Species: " + data.taxonCommonName + " Desc: " + data.officialName; } else if (clazz == "Bibliographicreference") { return "<a href=\"/Gemma/gene/showGene.html?id=" + data.id + "\">" + data.title + "</a> [" + data.pubmedId + "]"; } else if (clazz == "ExpressionExperimentSetValueObject") { /* * TODO add links. */ return data.name; } else if (clazz == "GeneSetValueObject") { /* * TODO add links */ return data.name; } }
+ data.description + "; Array: " + data.arrayDesign.shortName;
+ (data.description ? data.description : "") + "; Array: " + data.arrayDesign.shortName;
renderEntity : function(data, metadata, record, row, column, store) { var dh = Ext.DomHelper; var clazz = record.get("resultClass"); if (clazz == "ExpressionExperimentValueObject") { return "<a href=\"/Gemma/expressionExperiment/showExpressionExperiment.html?id=" + data.id + "\">" + data.shortName + "</a> - " + data.name; } else if (clazz == "CompositeSequence") { return "<a href=\"/Gemma/compositeSequence/show.html?id=" + data.id + "\">" + data.name + "</a> - " + data.description + "; Array: " + data.arrayDesign.shortName; } else if (clazz == "ArrayDesignValueObject") { return "<a href=\"/Gemma/arrays/showArrayDesign.html?id=" + data.id + "\">" + data.shortName + "</a> " + data.name; } else if (/^BioSequence.*/.exec(clazz)) { return "<a href=\"/Gemma/genome/bioSequence/showBioSequence.html?id=" + data.id + "\">" + data.name + "</a> - " + data.taxon.commonName + " " + data.description; } else if (clazz == "GeneValueObject" || clazz == "PredictedGene" || clazz == "ProbeAlignedRegion") { return "<a href=\"/Gemma/gene/showGene.html?id=" + data.id + "\">" + data.officialSymbol + "</a> - Species: " + data.taxonCommonName + " Desc: " + data.officialName; } else if (clazz == "Bibliographicreference") { return "<a href=\"/Gemma/gene/showGene.html?id=" + data.id + "\">" + data.title + "</a> [" + data.pubmedId + "]"; } else if (clazz == "ExpressionExperimentSetValueObject") { /* * TODO add links. */ return data.name; } else if (clazz == "GeneSetValueObject") { /* * TODO add links */ return data.name; } }
+ "</a> - " + data.taxon.commonName + " " + data.description;
+ "</a> - " + data.taxon.commonName + " " + (data.description ? data.description : "");
renderEntity : function(data, metadata, record, row, column, store) { var dh = Ext.DomHelper; var clazz = record.get("resultClass"); if (clazz == "ExpressionExperimentValueObject") { return "<a href=\"/Gemma/expressionExperiment/showExpressionExperiment.html?id=" + data.id + "\">" + data.shortName + "</a> - " + data.name; } else if (clazz == "CompositeSequence") { return "<a href=\"/Gemma/compositeSequence/show.html?id=" + data.id + "\">" + data.name + "</a> - " + data.description + "; Array: " + data.arrayDesign.shortName; } else if (clazz == "ArrayDesignValueObject") { return "<a href=\"/Gemma/arrays/showArrayDesign.html?id=" + data.id + "\">" + data.shortName + "</a> " + data.name; } else if (/^BioSequence.*/.exec(clazz)) { return "<a href=\"/Gemma/genome/bioSequence/showBioSequence.html?id=" + data.id + "\">" + data.name + "</a> - " + data.taxon.commonName + " " + data.description; } else if (clazz == "GeneValueObject" || clazz == "PredictedGene" || clazz == "ProbeAlignedRegion") { return "<a href=\"/Gemma/gene/showGene.html?id=" + data.id + "\">" + data.officialSymbol + "</a> - Species: " + data.taxonCommonName + " Desc: " + data.officialName; } else if (clazz == "Bibliographicreference") { return "<a href=\"/Gemma/gene/showGene.html?id=" + data.id + "\">" + data.title + "</a> [" + data.pubmedId + "]"; } else if (clazz == "ExpressionExperimentSetValueObject") { /* * TODO add links. */ return data.name; } else if (clazz == "GeneSetValueObject") { /* * TODO add links */ return data.name; } }
} else if (clazz == "Gene" || clazz == "PredictedGene" || clazz == "ProbeAlignedRegion") {
} else if (clazz == "GeneValueObject" || clazz == "PredictedGene" || clazz == "ProbeAlignedRegion") {
renderEntity : function(data, metadata, record, row, column, store) { var dh = Ext.DomHelper; var clazz = record.get("resultClass"); if (clazz == "ExpressionExperimentValueObject") { return "<a href=\"/Gemma/expressionExperiment/showExpressionExperiment.html?id=" + data.id + "\">" + data.shortName + "</a> - " + data.name; } else if (clazz == "CompositeSequence") { return "<a href=\"/Gemma/compositeSequence/show.html?id=" + data.id + "\">" + data.name + "</a> - " + data.description + "; Array: " + data.arrayDesign.shortName; } else if (clazz == "ArrayDesignValueObject") { return "<a href=\"/Gemma/arrays/showArrayDesign.html?id=" + data.id + "\">" + data.shortName + "</a> " + data.name; } else if (/^BioSequence.*/.exec(clazz)) { return "<a href=\"/Gemma/genome/bioSequence/showBioSequence.html?id=" + data.id + "\">" + data.name + "</a> - " + data.taxon.commonName + " " + data.description; } else if (clazz == "Gene" || clazz == "PredictedGene" || clazz == "ProbeAlignedRegion") { return "<a href=\"/Gemma/gene/showGene.html?id=" + data.id + "\">" + data.officialSymbol + "</a> - Species: " + data.taxon.commonName + " Desc: " + data.officialName; } else if (clazz == "Bibliographicreference") { return "<a href=\"/Gemma/gene/showGene.html?id=" + data.id + "\">" + data.title + "</a> [" + data.pubmedId + "]"; } else if (clazz == "ExpressionExperimentSetValueObject") { /* * TODO add links. */ return data.name; } else if (clazz == "GeneSetValueObject") { /* * TODO add links */ return data.name; } }
} else if (clazz == "GeneSetValueObject") { return "Gene set"; } else if (clazz == "ExpressionExperimentSetValueObject") { return "Experiment set";
renderEntityClass : function(data, metadata, record, row, column, store) { var clazz = record.get("resultClass"); if (clazz == "ExpressionExperimentValueObject") { return "Expression dataset"; } else if (clazz == "CompositeSequence") { return "Probe"; } else if (clazz == "ArrayDesignValueObject") { return "Array"; } else if (/^BioSequence.*/.exec(clazz)) { // because we get proxies. return "Sequence"; } else if (clazz == "Gene") { return "Gene"; } else { return clazz; } },
} else if (clazz == "Gene") {
} else if (clazz == "GeneValueObject") {
renderEntityClass : function(data, metadata, record, row, column, store) { var clazz = record.get("resultClass"); if (clazz == "ExpressionExperimentValueObject") { return "Expression dataset"; } else if (clazz == "CompositeSequence") { return "Probe"; } else if (clazz == "ArrayDesignValueObject") { return "Array"; } else if (/^BioSequence.*/.exec(clazz)) { // because we get proxies. return "Sequence"; } else if (clazz == "Gene") { return "Gene"; } else if (clazz == "GeneSetValueObject") { return "Gene set"; } else if (clazz == "ExpressionExperimentSetValueObject") { return "Experiment set"; } else { return clazz; } },
renderer : function(value, metaData, record, rowIndex, colIndex, store) { if (value) { return "<img src='/Gemma/images/icons/ok.png' height='16' width='16' ext:qtip='You can edit this group' />"; } else { return " "; } },
renderer: function(value, metaData, record, rowIndex, colIndex, store) { var detail = record.get('detail'); if (detail) { return '<a href="' + detail + '">' + value + '</a>'; } else { return value; } }
renderer : function(value, metaData, record, rowIndex, colIndex, store) { if (value) { return "<img src='/Gemma/images/icons/ok.png' height='16' width='16' ext:qtip='You can edit this group' />"; } else { return " "; } },
this._focused = true;
renderFocus: function() { if (this._focused) { return; } Core.Web.DOM.focusElement(this.div); },
if (jDiv.find("#" + formId).length == 0) {
if (jDiv.find("#" + formId).length === 0) {
var renderForm = function(id) { var formId = "form-comments-" + objectType + "-" + id; var jDiv = $('#comments-link-' + objectType + "-" + id).parent(); $(jDiv).css('background','none'); $(jDiv).css('padding-left',0); if (canPostComments(id)) { if (jDiv.find("#" + formId).length == 0) { var form = '<form id="' + formId + '" class="post-comments"><div>'; form += '<textarea name="comment" cols="60" rows="5" maxlength="300" onblur="'+ objectType +'Comments.updateTextCounter(this)" '; form += 'onfocus="' + objectType + 'Comments.updateTextCounter(this)" onkeyup="'+ objectType +'Comments.updateTextCounter(this)"></textarea>'; form += '<input type="submit" value="' + $.i18n._('add comment') + '" /><br><span class="text-counter"></span>'; form += '<span class="form-error"></span></div></form>'; jDiv.append(form); setupFormValidation("#" + formId, { comment: { required: true, minlength: 10} }, '', function() { postComment(id, formId); }); } } else { var divId = "comments-rep-needed-" + objectType + '-' + id; if (jDiv.find("#" + divId).length == 0) { jDiv.append('<p id="' + divId + '" class="comment">' + $.i18n._('to comment, need') + ' ' + + repNeededForComments + ' ' + $.i18n._('community karma points') + '<a href="' + scriptUrl + $.i18n._('faq/') + '" class="comment-user">' + $.i18n._('please see') + 'faq</a></span></p>'); } } };
if (jDiv.find("#" + divId).length == 0) { jDiv.append('<p id="' + divId + '" class="comment">' + $.i18n._('to comment, need') + ' ' + + repNeededForComments + ' ' + $.i18n._('community karma points') + '<a href="' + scriptUrl + $.i18n._('faq/') + '" class="comment-user">' + $.i18n._('please see') + 'faq</a></span></p>');
if (jDiv.find("#" + divId).length === 0) { jDiv.append('<p id="' + divId + '" class="comment">' + $.i18n._('to comment, need') + ' ' + repNeededForComments + ' ' + $.i18n._('community karma points') + '<a href="' + scriptUrl + $.i18n._('faq/') + '" class="comment-user">' + $.i18n._('please see') + 'faq</a></span></p>');
var renderForm = function(id) { var formId = "form-comments-" + objectType + "-" + id; var jDiv = $('#comments-link-' + objectType + "-" + id).parent(); $(jDiv).css('background','none'); $(jDiv).css('padding-left',0); if (canPostComments(id)) { if (jDiv.find("#" + formId).length == 0) { var form = '<form id="' + formId + '" class="post-comments"><div>'; form += '<textarea name="comment" cols="60" rows="5" maxlength="300" onblur="'+ objectType +'Comments.updateTextCounter(this)" '; form += 'onfocus="' + objectType + 'Comments.updateTextCounter(this)" onkeyup="'+ objectType +'Comments.updateTextCounter(this)"></textarea>'; form += '<input type="submit" value="' + $.i18n._('add comment') + '" /><br><span class="text-counter"></span>'; form += '<span class="form-error"></span></div></form>'; jDiv.append(form); setupFormValidation("#" + formId, { comment: { required: true, minlength: 10} }, '', function() { postComment(id, formId); }); } } else { var divId = "comments-rep-needed-" + objectType + '-' + id; if (jDiv.find("#" + divId).length == 0) { jDiv.append('<p id="' + divId + '" class="comment">' + $.i18n._('to comment, need') + ' ' + + repNeededForComments + ' ' + $.i18n._('community karma points') + '<a href="' + scriptUrl + $.i18n._('faq/') + '" class="comment-user">' + $.i18n._('please see') + 'faq</a></span></p>'); } } };
$("#others_table").empty();
var appendMode = false; if(arguments[1]==true) appendMode=true; if(!appendMode) $("#others_table").empty();
function renderOtherBooks(books){ $("#others_table").empty(); if (books.length > 0) { $("#others_table").append('<tr><th class="colone">Owner</th><th class="coltwo">Book</th><th class="colthree">Lent to</th><th class="colfour"></th></tr>'); $.each(books, othersbookrow); } else { $("#others_table").append('<tr class="nothing"><td>No books found.</td></tr>'); } $(".groupmbr").click(function(){ currentFriend = $(this).text(); booksOf($(this).attr('name')); });}
$("#others_table").append('<tr><th class="colone">Owner</th><th class="coltwo">Book</th><th class="colthree">Lent to</th><th class="colfour"></th></tr>');
if(!appendMode) $("#others_table"). append('<tr><th class="colone">Owner</th><th class="coltwo">Book</th><th class="colthree">Lent to</th><th class="colfour"></th></tr>');
function renderOtherBooks(books){ $("#others_table").empty(); if (books.length > 0) { $("#others_table").append('<tr><th class="colone">Owner</th><th class="coltwo">Book</th><th class="colthree">Lent to</th><th class="colfour"></th></tr>'); $.each(books, othersbookrow); } else { $("#others_table").append('<tr class="nothing"><td>No books found.</td></tr>'); } $(".groupmbr").click(function(){ currentFriend = $(this).text(); booksOf($(this).attr('name')); });}
$("#others_table").append('<tr class="nothing"><td>No books found.</td></tr>');
if(!appendMode) $("#others_table").append('<tr class="nothing"><td>No books found.</td></tr>'); else noMoreAvailable = true;
function renderOtherBooks(books){ $("#others_table").empty(); if (books.length > 0) { $("#others_table").append('<tr><th class="colone">Owner</th><th class="coltwo">Book</th><th class="colthree">Lent to</th><th class="colfour"></th></tr>'); $.each(books, othersbookrow); } else { $("#others_table").append('<tr class="nothing"><td>No books found.</td></tr>'); } $(".groupmbr").click(function(){ currentFriend = $(this).text(); booksOf($(this).attr('name')); });}
return result;
return ''+result;
renderSamples : function(ee) { var result = ee.bioAssayCount; if (this.editable) { result = result + '&nbsp;&nbsp<a href="/Gemma/expressionExperiment/showBioAssaysFromExpressionExperiment.html?id=' + ee.id + '"><img src="/Gemma/images/icons/magnifier.png"/></a>'; } return result; },
ee.id + '"><img src="/Gemma/images/icons/magnifier.png"/></a>';
ee.id + '"><img ext:qtip="View the details of the samples" src="/Gemma/images/icons/magnifier.png"/></a>';
renderSamples : function(ee) { var result = ee.bioAssayCount; if (this.editable) { result = result + '&nbsp;&nbsp<a href="/Gemma/expressionExperiment/showBioAssaysFromExpressionExperiment.html?id=' + ee.id + '"><img src="/Gemma/images/icons/magnifier.png"/></a>'; } return '' + result; // hack for possible problem with extjs 3.1 - bare number not displayed, coerce to string. },
result = '<a target="_blank" href="http: + '"><img src="' + logo + '"/></a>';
result = '<a target="_blank" href="http: '"><img src="' + logo + '"/></a>';
renderSourceDatabaseEntry : function(ee) { var result = ''; var logo = ''; if (ee.externalDatabase == 'GEO') { var acc = ee.accession; acc = acc.replace(/\.[1-9]$/, ''); // in case of multi-species. logo = '/Gemma/images/logo/geoTiny.png'; result = '<a target="_blank" href="http://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=' + acc + '"><img src="' + logo + '"/></a>'; } else if (ee.externalDatabase == 'ArrayExpress') { logo = '/Gemma/images/logo/arrayExpressTiny.png'; result = '<a target="_blank" href="http://www.ebi.ac.uk/microarray-as/aer/result?queryFor=Experiment&eAccession=' + ee.accession + '"><img src="' + logo + '"/></a>'; } else { result = "Direct upload"; } return result; },
result = '<a target="_blank" href="http: + ee.accession + '"><img src="' + logo + '"/></a>';
result = '<a target="_blank" href="http: ee.accession + '"><img src="' + logo + '"/></a>';
renderSourceDatabaseEntry : function(ee) { var result = ''; var logo = ''; if (ee.externalDatabase == 'GEO') { var acc = ee.accession; acc = acc.replace(/\.[1-9]$/, ''); // in case of multi-species. logo = '/Gemma/images/logo/geoTiny.png'; result = '<a target="_blank" href="http://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=' + acc + '"><img src="' + logo + '"/></a>'; } else if (ee.externalDatabase == 'ArrayExpress') { logo = '/Gemma/images/logo/arrayExpressTiny.png'; result = '<a target="_blank" href="http://www.ebi.ac.uk/microarray-as/aer/result?queryFor=Experiment&eAccession=' + ee.accession + '"><img src="' + logo + '"/></a>'; } else { result = "Direct upload"; } return result; },
result = '<a target="_blank" href="http: '"><img src="' + logo + '"/></a>';
result = '<a target="_blank" href="http: + '"><img src="' + logo + '"/></a>';
renderSourceDatabaseEntry : function(ee) { var result = ''; var logo = ''; if (ee.externalDatabase == 'GEO') { var acc = ee.accession; acc = acc.replace(/\.[1-9]$/, ''); // in case of multi-species. logo = '/Gemma/images/logo/geoTiny.png'; result = '<a target="_blank" href="http://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=' + acc + '"><img src="' + logo + '"/></a>'; } else if (ee.externalDatabase == 'ArrayExpress') { logo = '/Gemma/images/logo/arrayExpressTiny.png'; result = '<a target="_blank" href="http://www.ebi.ac.uk/microarray-as/aer/result?queryFor=Experiment&eAccession=' + ee.accession + '"><img src="' + logo + '"/></a>'; } else { result = "Direct upload"; } return result; },
result = '<a target="_blank" href="http: ee.accession + '"><img src="' + logo + '"/></a>';
result = '<a target="_blank" href="http: + ee.accession + '"><img src="' + logo + '"/></a>';
renderSourceDatabaseEntry : function(ee) { var result = ''; var logo = ''; if (ee.externalDatabase == 'GEO') { var acc = ee.accession; acc = acc.replace(/\.[1-9]$/, ''); // in case of multi-species. logo = '/Gemma/images/logo/geoTiny.png'; result = '<a target="_blank" href="http://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=' + acc + '"><img src="' + logo + '"/></a>'; } else if (ee.externalDatabase == 'ArrayExpress') { logo = '/Gemma/images/logo/arrayExpressTiny.png'; result = '<a target="_blank" href="http://www.ebi.ac.uk/microarray-as/aer/result?queryFor=Experiment&eAccession=' + ee.accession + '"><img src="' + logo + '"/></a>'; } else { result = "Direct upload"; } return result; },
'ubic.gemma.model.expression.experiment.ExpressionExperimentImpl', ee.id, ee.isPublic);
'ubic.gemma.model.expression.experiment.ExpressionExperimentImpl', ee.id, ee.isPublic, true);
renderStatus : function(ee) { var result = ''; if (ee.validatedFlag) { result = result + '<img src="/Gemma/images/icons/emoticon_smile.png" alt="validated" title="validated"/>'; } if (ee.troubleFlag) { result = result + '<img src="/Gemma/images/icons/stop.png" alt="trouble" title="trouble"/>'; } if (this.editable) { result = result + Gemma.SecurityManager.getSecurityLink( 'ubic.gemma.model.expression.experiment.ExpressionExperimentImpl', ee.id, ee.isPublic); } return result || "No flags"; },
return result;
return result || "No flags";
renderStatus : function(ee) { var result = ''; if (ee.validatedFlag) { result = result + '<img src="/Gemma/images/icons/emoticon_smile.png" alt="validated" title="validated"/>'; } if (ee.troubleFlag) { result = result + '<img src="/Gemma/images/icons/stop.png" alt="trouble" title="trouble"/>'; } if (this.editable) { result = result + Gemma.SecurityManager.getSecurityLink( 'ubic.gemma.model.expression.experiment.ExpressionExperimentImpl', ee.id, ee.isPublic); } return result; },
'ubic.gemma.model.expression.experiment.ExpressionExperimentImpl', ee.id, ee.isPublic, true);
'ubic.gemma.model.expression.experiment.ExpressionExperimentImpl', ee.id, ee.isPublic, ee.isShared, this.editable);
renderStatus : function(ee) { var result = ''; if (ee.validatedFlag) { result = result + '<img src="/Gemma/images/icons/emoticon_smile.png" alt="validated" title="validated"/>'; } if (ee.troubleFlag) { result = result + '<img src="/Gemma/images/icons/stop.png" alt="trouble" title="trouble"/>'; } if (this.editable) { result = result + Gemma.SecurityManager.getSecurityLink( 'ubic.gemma.model.expression.experiment.ExpressionExperimentImpl', ee.id, ee.isPublic, true); } return result || "No flags"; },
input.autocomplete("autocomplete.xql", { extraParams: { field: function () { return autocompleteCallback.call(input);} }, width: 300, multiple: false, matchContains: false
input.autocomplete({ source: function(request, response) { var data = { term: request.term }; autocompleteCallback(input, data); $.ajax({ url: "autocomplete.xql", dataType: "json", data: data, success: function(data) { response(data); }}); }, minLength: 3
function repeatCallback() { var input = $('input[name ^= input]', this); input.autocomplete("autocomplete.xql", { extraParams: { field: function () { return autocompleteCallback.call(input);} }, width: 300, multiple: false, matchContains: false }); $('select[name ^= operator]', this).each(function () { $(this).css('display', ''); });}