rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
jq('form[name=tabbedview_form]').append(data); | var table = jq('form[name=tabbedview_form] table.listing'); var ddata = jq(data); ddata.find('#above_visibles .hidden_items').insertBefore(table); ddata.find('#beneath_visibles .hidden_items').insertAfter(table); | success: function(data) { jq('.hidden_items').remove(); jq('form[name=tabbedview_form]').append(data); } |
success: function(dtnode) { $.get("script.xql", {action:"showCollectionResources", collection: "/db"}, function(data){ $("#resourcesTable").html(data); renderToDataTable(); }, "text"); } | success: function(data) { response(data); }}); | success: function(dtnode) { $.get("script.xql", {action:"showCollectionResources", collection: "/db"}, function(data){ $("#resourcesTable").html(data); renderToDataTable(); }, "text"); } |
if (OperationResult.isResponseSuccessful(response.ResponseStatus, onError)) | var status = JsvServiceClient.parseResponseStatus_(response.ResponseStatus); if (status.isSuccess) | success: function(response) { var endCallTime = new Date(); var callDuration = endCallTime.getTime() - startCallTime.getTime(); if (!response) { if (onSuccess) onSuccess(null); return; } if (OperationResult.isResponseSuccessful(response.ResponseStatus, onError)) { if (onSuccess) onSuccess(new ResultEvent(response)); JsonServiceClient.onSuccess({ id: id, webMethod: webMethod, request: request, response: response, durationMs: callDuration }); } else { JsonServiceClient.onError({ id: id, webMethod: webMethod, request: request, error: OperationResult.Parse(response.ResponseStatus), durationMs: callDuration }); } }, |
if (onSuccess) onSuccess(new ResultEvent(response)); | if (onSuccess) onSuccess(response); | success: function(response) { var endCallTime = new Date(); var callDuration = endCallTime.getTime() - startCallTime.getTime(); if (!response) { if (onSuccess) onSuccess(null); return; } if (OperationResult.isResponseSuccessful(response.ResponseStatus, onError)) { if (onSuccess) onSuccess(new ResultEvent(response)); JsonServiceClient.onSuccess({ id: id, webMethod: webMethod, request: request, response: response, durationMs: callDuration }); } else { JsonServiceClient.onError({ id: id, webMethod: webMethod, request: request, error: OperationResult.Parse(response.ResponseStatus), durationMs: callDuration }); } }, |
error: OperationResult.Parse(response.ResponseStatus), durationMs: callDuration | error: status, durationMs: callDuration | success: function(response) { var endCallTime = new Date(); var callDuration = endCallTime.getTime() - startCallTime.getTime(); if (!response) { if (onSuccess) onSuccess(null); return; } if (OperationResult.isResponseSuccessful(response.ResponseStatus, onError)) { if (onSuccess) onSuccess(new ResultEvent(response)); JsonServiceClient.onSuccess({ id: id, webMethod: webMethod, request: request, response: response, durationMs: callDuration }); } else { JsonServiceClient.onError({ id: id, webMethod: webMethod, request: request, error: OperationResult.Parse(response.ResponseStatus), durationMs: callDuration }); } }, |
success : function(data) { if (state.byMetricCache == null) state.byMetricCache = new Array(); if (state.byResourceCache == null) state.byResourceCache = new Array(); $.each(data, function(i, val) { if (state.byMetricCache[metricId] == null) state.byMetricCache[metricId] = new Array(); state.byMetricCache[metricId].push(val); if (state.byResourceCache[val.r.resourceId] == null) state.byResourceCache[val.r.resourceId] = new Array(); state.byResourceCache[val.r.resourceId].push(val); }); if (callback != null) callback(metricId, callbackargs); | success: function (data) { ver = data; | success : function(data) { if (state.byMetricCache == null) state.byMetricCache = new Array(); if (state.byResourceCache == null) state.byResourceCache = new Array(); $.each(data, function(i, val) { if (state.byMetricCache[metricId] == null) state.byMetricCache[metricId] = new Array(); state.byMetricCache[metricId].push(val); if (state.byResourceCache[val.r.resourceId] == null) state.byResourceCache[val.r.resourceId] = new Array(); state.byResourceCache[val.r.resourceId].push(val); }); if (callback != null) callback(metricId, callbackargs); }, |
$(el).after($div).appendTo($div); | $.fn.media.swf = function(el, opts) { if (!window.SWFObject && !window.swfobject) { // roll our own if (opts.flashvars) { var a = []; for (var f in opts.flashvars) a.push(f + '=' + opts.flashvars[f]); if (!opts.params) opts.params = {}; opts.params.flashvars = a.join('&'); } return generate(el, opts, 'flash'); } var id = el.id ? (' id="'+el.id+'"') : ''; var cls = opts.cls ? (' class="' + opts.cls + '"') : ''; var $div = $('<div' + id + cls + '>'); // swfobject v2+ if (window.swfobject) { $(el).after($div).appendTo($div); if (!el.id) el.id = 'movie_player_' + counter++; // replace el with swfobject content swfobject.embedSWF(opts.src, el.id, opts.width, opts.height, opts.flashVersion, opts.expressInstaller, opts.flashvars, opts.params, opts.attrs); } // swfobject < v2 else { $(el).after($div).remove(); var so = new SWFObject(opts.src, 'movie_player_' + counter++, opts.width, opts.height, opts.flashVersion, opts.bgColor); if (opts.expressInstaller) so.useExpressInstall(opts.expressInstaller); for (var p in opts.params) if (p != 'bgColor') so.addParam(p, opts.params[p]); for (var f in opts.flashvars) so.addVariable(f, opts.flashvars[f]); so.write($div[0]); } if (opts.caption) $('<div>').appendTo($div).html(opts.caption); return $div;}; |
|
var id = el.id ? (' id="'+el.id+'"') : ''; $div = $('<div' + id + cls + '>'); $(el).after($div).appendTo($div); | $.fn.media.swf = function(el, opts) { if (!window.SWFObject && !window.swfobject) { // roll our own if (opts.flashvars) { var a = []; for (var f in opts.flashvars) a.push(f + '=' + opts.flashvars[f]); if (!opts.params) opts.params = {}; opts.params.flashvars = a.join('&'); } return generate(el, opts, 'flash'); } var id = el.id ? (' id="'+el.id+'"') : ''; var cls = opts.cls ? (' class="' + opts.cls + '"') : ''; var $div = $('<div' + id + cls + '>'); // swfobject v2+ if (window.swfobject) { $(el).after($div).appendTo($div); if (!el.id) el.id = 'movie_player_' + counter++; // replace el with swfobject content swfobject.embedSWF(opts.src, el.id, opts.width, opts.height, opts.flashVersion, opts.expressInstaller, opts.flashvars, opts.params, opts.attrs); } // swfobject < v2 else { $(el).after($div).remove(); var so = new SWFObject(opts.src, 'movie_player_' + counter++, opts.width, opts.height, opts.flashVersion, opts.bgColor); if (opts.expressInstaller) so.useExpressInstall(opts.expressInstaller); for (var p in opts.params) if (p != 'bgColor') so.addParam(p, opts.params[p]); for (var f in opts.flashvars) so.addVariable(f, opts.flashvars[f]); so.write($div[0]); } if (opts.caption) $('<div>').appendTo($div).html(opts.caption); return $div;}; |
|
output.value = "No errors found (KoLmafia syntax checker v1.0)"; | output.value = "No errors found (KoLmafia syntax checker v1.1)"; | function syntaxcheck(){ timeout = false; output.value = ""; var ln = 1; var stack = []; var lines = input.value.match(/\x0D\x0A|\x0D|\x0A|;|#?[^\x0D\x0A;#]*/g); for (ix in lines) { var cmd = lines[ix]; var c0 = cmd.charAt(0); cmd = trim(cmd); if (c0 == '\x0D' || c0 == '\x0A') { ++ln; continue; } if (c0 == ';' || c0 == '#' || cmd =='') { continue; } var params = '', param1 = '', paramrest = ''; var pos = cmd.indexOf(' '); if (pos != -1) { param1 = params = trim(cmd.slice(pos)); cmd = cmd.slice(0, pos) pos = params.indexOf(' '); if (pos != -1) { paramrest = trim(params.slice(pos)); param1 = params.slice(0, pos); } } var err = "Line " + ln + ': "' + cmd + '" '; if (openCmds[cmd]) { stack.push(openCmds[cmd]); } else if (closeCmds[cmd]) { if (stack.length == 0) { output.value += err + "without corresponding block opener.\n"; continue; } while (stack.length > 0) { var block = stack.pop(); if (block == cmd) break; output.value += "Line " + ln + ': an "' + block + '" is missing.\n'; } } if (errCmds[cmd]) { output.value += err + 'is not a known command; did you mean "' + errCmds[cmd] + '"?\n'; continue; } if (arglessCmds[cmd] || closeCmds[cmd]) { if (params != '') { output.value += err + 'should not be followed by anything. ' + 'Especially not "' + params + '"!\n'; } continue; } if (optargCmds[cmd] && params == '') continue; if (argCmds[cmd]) { if (params == '') { output.value += err + 'requires a parameter.\n'; } continue; } if (labelCmds[cmd]) { if (params == '') { output.value += err + 'requires a label name.\n'; } else if (paramrest != '') { output.value += err + 'should be followed by a single word, ' + 'not "' + params + '".\n'; } continue; } if (predCmds[cmd]) { if (params == '') { output.value += err + 'requires a predicate.\n'; } predicate(params, err); continue; } // Special cases: if (cmd == "goto") { if (params == '') { output.value += err + 'requires a label name.\n'; } else if (paramrest != '') { predicate(paramrest, err); } continue; } output.value += err + "is not a known command.\n"; } while (stack.length > 0) { output.value += 'At end: there is a missing "' + stack.pop() + '" somewhere.'; } if (output.value == "") { output.value = "No errors found (KoLmafia syntax checker v1.0)"; }} |
n=g=null})();(function(){var g=t.createElement("div");g.appendChild(t.createComment(""));if(g.getElementsByTagName("*").length>0)o.find.TAG=function(i,n){var m=n.getElementsByTagName(i[1]);if(i[1]==="*"){for(var p=[],q=0;m[q];q++)m[q].nodeType===1&&p.push(m[q]);m=p}return m};g.innerHTML="<a href='#'></a>";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")o.attrHandle.href=function(i){return i.getAttribute("href",2)};g=null})();t.querySelectorAll&& | "")+" ";if(q)return g;q=0;for(var u;(u=i[q])!=null;q++)if(u)if(p^(u.className&&(" "+u.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))n||m.push(u);else if(n)i[q]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var i=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=i[1]+(i[2]||1)-0;g[3]=i[3]-0}g[0]=e++;return g},ATTR:function(g,i,n, | n=g=null})();(function(){var g=t.createElement("div");g.appendChild(t.createComment(""));if(g.getElementsByTagName("*").length>0)o.find.TAG=function(i,n){var m=n.getElementsByTagName(i[1]);if(i[1]==="*"){for(var p=[],q=0;m[q];q++)m[q].nodeType===1&&p.push(m[q]);m=p}return m};g.innerHTML="<a href='#'></a>";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")o.attrHandle.href=function(i){return i.getAttribute("href",2)};g=null})();t.querySelectorAll&& |
tagger : function(id, taxonId, canEdit) { | tagger : function(id, taxonId, canEdit, isValidated) { | tagger : function(id, taxonId, canEdit) { var annotator = new Ext.Panel({ id : 'annotator-wrap', collapsible : false, stateful : false, bodyBorder : false, layout : 'fit', items : [new Gemma.AnnotationGrid({ id : 'annotator-grid', readMethod : ExpressionExperimentController.getAnnotation, writeMethod : AnnotationController.createExperimentTag, removeMethod : AnnotationController.removeExperimentTag, readParams : [{ id : id }], editable : canEdit, showParent : false, mgedTermKey : "experiment", taxonId : taxonId, entId : id })] }); this.change = false; Ext.getCmp('annotator-grid').on('refresh', function() { this.change = true; }.createDelegate(this)); var w = new Ext.Window({ modal : false, stateful : false, title : "Experiment tags", layout : 'fit', width : 600, height : 200, items : [annotator], buttons : [{ text : 'Help', handler : function() { Ext.Msg .alert( "Help with tagging", "Select a 'category' for the term; then enter a term, " + "choosing from existing terms if possible. " + "Click 'create' to save it. You can also edit existing terms;" + " click 'save' to make the change stick, or 'delete' to remove a selected tag."); } }, { text : 'Done', handler : function() { var r = Ext.getCmp('annotator-grid').getEditedCharacteristics(); if (r.length > 0) { Ext.Msg.confirm("Unsaved changes", "There are unsaved changes. Do you want to continue without saving?", function( btn, txt) { if (btn == 'OK') { w.hide(); } }); } else { w.hide(); } if (this.change) { /* Update the display of the tags. */ this.fireEvent('tagsUpdated'); } }, scope : this }] }); w.show(); }, |
title : "Tags", | tagger : function(id, taxonId) { var annotator = new Ext.Panel({ id : 'annotator-wrap', title : "Tags", collapsible : false, stateful : false, bodyBorder : false, width : 600, height : 200, layout : 'fit', items : [new Gemma.AnnotationGrid({ id : 'annotator-grid', readMethod : ExpressionExperimentController.getAnnotation, writeMethod : OntologyService.saveExpressionExperimentStatement, removeMethod : OntologyService.removeExpressionExperimentStatement, readParams : [{ id : id }], editable : this.editable, showParent : false, mgedTermKey : "experiment", taxonId : taxonId, entId : id })] }); this.change = false; Ext.getCmp('annotator-grid').on('refresh', function() { this.change = true; }.createDelegate(this)); var w = new Ext.Window({ modal : false, stateful : false, layout : 'fit', items : [annotator], buttons : [{ text : 'Help', handler : function() { Ext.Msg .alert( "Help with tagging", "Select a 'category' for the term; then enter a term, " + "choosing from existing terms if possible. " + "Click 'create' to save it. You can also edit existing terms;" + " click 'save' to make the change stick, or 'delete' to remove a selected tag."); } }, { text : 'Done', handler : function() { if (this.change) { /* Update the display of the tags. */ this.fireEvent('tagsUpdated'); } w.hide(); }, scope : this }] }); w.show(); }, |
|
width : 600, height : 200, | tagger : function(id, taxonId) { var annotator = new Ext.Panel({ id : 'annotator-wrap', title : "Tags", collapsible : false, stateful : false, bodyBorder : false, width : 600, height : 200, layout : 'fit', items : [new Gemma.AnnotationGrid({ id : 'annotator-grid', readMethod : ExpressionExperimentController.getAnnotation, writeMethod : OntologyService.saveExpressionExperimentStatement, removeMethod : OntologyService.removeExpressionExperimentStatement, readParams : [{ id : id }], editable : this.editable, showParent : false, mgedTermKey : "experiment", taxonId : taxonId, entId : id })] }); this.change = false; Ext.getCmp('annotator-grid').on('refresh', function() { this.change = true; }.createDelegate(this)); var w = new Ext.Window({ modal : false, stateful : false, layout : 'fit', items : [annotator], buttons : [{ text : 'Help', handler : function() { Ext.Msg .alert( "Help with tagging", "Select a 'category' for the term; then enter a term, " + "choosing from existing terms if possible. " + "Click 'create' to save it. You can also edit existing terms;" + " click 'save' to make the change stick, or 'delete' to remove a selected tag."); } }, { text : 'Done', handler : function() { if (this.change) { /* Update the display of the tags. */ this.fireEvent('tagsUpdated'); } w.hide(); }, scope : this }] }); w.show(); }, |
|
width : 600, height : 200, | tagger : function(id, taxonId) { var annotator = new Ext.Panel({ id : 'annotator-wrap', title : "Tags", collapsible : false, stateful : false, bodyBorder : false, width : 600, height : 200, layout : 'fit', items : [new Gemma.AnnotationGrid({ id : 'annotator-grid', readMethod : ExpressionExperimentController.getAnnotation, writeMethod : OntologyService.saveExpressionExperimentStatement, removeMethod : OntologyService.removeExpressionExperimentStatement, readParams : [{ id : id }], editable : this.editable, showParent : false, mgedTermKey : "experiment", taxonId : taxonId, entId : id })] }); this.change = false; Ext.getCmp('annotator-grid').on('refresh', function() { this.change = true; }.createDelegate(this)); var w = new Ext.Window({ modal : false, stateful : false, layout : 'fit', items : [annotator], buttons : [{ text : 'Help', handler : function() { Ext.Msg .alert( "Help with tagging", "Select a 'category' for the term; then enter a term, " + "choosing from existing terms if possible. " + "Click 'create' to save it. You can also edit existing terms;" + " click 'save' to make the change stick, or 'delete' to remove a selected tag."); } }, { text : 'Done', handler : function() { if (this.change) { /* Update the display of the tags. */ this.fireEvent('tagsUpdated'); } w.hide(); }, scope : this }] }); w.show(); }, |
|
modal : true, | modal : false, | tagger : function(id, taxonId) { var annotator = new Ext.Panel({ id : 'annotator-wrap', title : "Tags", collapsible : false, stateful : false, bodyBorder : false, width : 600, height : 200, layout : 'fit', items : [new Gemma.AnnotationGrid({ id : 'annotator-grid', readMethod : ExpressionExperimentController.getAnnotation, writeMethod : OntologyService.saveExpressionExperimentStatement, removeMethod : OntologyService.removeExpressionExperimentStatement, readParams : [{ id : id }], editable : this.editable, showParent : false, mgedTermKey : "experiment", taxonId : taxonId, entId : id })] }); this.change = false; Ext.getCmp('annotator-grid').on('refresh', function() { this.change = true; }.createDelegate(this)); var w = new Ext.Window({ modal : true, stateful : false, layout : 'fit', items : [annotator], buttons : [{ text : 'Help', handler : function() { Ext.Msg .alert( "Help with tagging", "Select a 'category' for the term; then enter a term, " + "choosing from existing terms if possible. " + "Click 'create' to save it. You can also edit existing terms;" + " click 'save' to make the change stick, or 'delete' to remove a selected tag."); } }, { text : 'Done', handler : function() { if (this.change) { /* Update the display of the tags. */ this.fireEvent('tagsUpdated'); } w.hide(); }, scope : this }] }); w.show(); }, |
tagger : function(id) { | tagger : function(id, taxonId) { | tagger : function(id) { var annotator = new Ext.Panel({ id : 'annotator-wrap', title : "Tags", collapsible : false, stateful : false, bodyBorder : false, width : 600, height : 200, layout : 'fit', items : [new Gemma.AnnotationGrid({ id : 'annotator-grid', readMethod : ExpressionExperimentController.getAnnotation, writeMethod : OntologyService.saveExpressionExperimentStatement, removeMethod : OntologyService.removeExpressionExperimentStatement, readParams : [{ id : id }], editable : this.editable, showParent : false, mgedTermKey : "experiment", entId : id })] }); this.change = false; Ext.getCmp('annotator-grid').on('refresh', function() { this.change = true; }.createDelegate(this)); var w = new Ext.Window({ modal : true, stateful : false, layout : 'fit', items : [annotator], buttons : [{ text : 'Help', handler : function() { Ext.Msg .alert( "Help with tagging", "Select a 'category' for the term; then enter a term, " + "choosing from existing terms if possible. " + "Click 'create' to save it. You can also edit existing terms;" + " click 'save' to make the change stick, or 'delete' to remove a selected tag."); } }, { text : 'Done', handler : function() { if (this.change) { /* Update the display of the tags. */ this.fireEvent('tagsUpdated'); } w.hide(); }, scope : this }] }); w.show(); }, |
taxonId : taxonId, | tagger : function(id) { var annotator = new Ext.Panel({ id : 'annotator-wrap', title : "Tags", collapsible : false, stateful : false, bodyBorder : false, width : 600, height : 200, layout : 'fit', items : [new Gemma.AnnotationGrid({ id : 'annotator-grid', readMethod : ExpressionExperimentController.getAnnotation, writeMethod : OntologyService.saveExpressionExperimentStatement, removeMethod : OntologyService.removeExpressionExperimentStatement, readParams : [{ id : id }], editable : this.editable, showParent : false, mgedTermKey : "experiment", entId : id })] }); this.change = false; Ext.getCmp('annotator-grid').on('refresh', function() { this.change = true; }.createDelegate(this)); var w = new Ext.Window({ modal : true, stateful : false, layout : 'fit', items : [annotator], buttons : [{ text : 'Help', handler : function() { Ext.Msg .alert( "Help with tagging", "Select a 'category' for the term; then enter a term, " + "choosing from existing terms if possible. " + "Click 'create' to save it. You can also edit existing terms;" + " click 'save' to make the change stick, or 'delete' to remove a selected tag."); } }, { text : 'Done', handler : function() { if (this.change) { /* Update the display of the tags. */ this.fireEvent('tagsUpdated'); } w.hide(); }, scope : this }] }); w.show(); }, |
|
tagger : function(id, taxonId) { | tagger : function(id, taxonId, canEdit) { | tagger : function(id, taxonId) { var annotator = new Ext.Panel({ id : 'annotator-wrap', collapsible : false, stateful : false, bodyBorder : false, layout : 'fit', items : [new Gemma.AnnotationGrid({ id : 'annotator-grid', readMethod : ExpressionExperimentController.getAnnotation, writeMethod : AnnotationController.createExperimentTag, removeMethod : AnnotationController.removeExperimentTag, readParams : [{ id : id }], editable : this.editable, showParent : false, mgedTermKey : "experiment", taxonId : taxonId, entId : id })] }); this.change = false; Ext.getCmp('annotator-grid').on('refresh', function() { this.change = true; }.createDelegate(this)); var w = new Ext.Window({ modal : false, stateful : false, title : "Experiment tags", layout : 'fit', width : 600, height : 200, items : [annotator], buttons : [{ text : 'Help', handler : function() { Ext.Msg .alert( "Help with tagging", "Select a 'category' for the term; then enter a term, " + "choosing from existing terms if possible. " + "Click 'create' to save it. You can also edit existing terms;" + " click 'save' to make the change stick, or 'delete' to remove a selected tag."); } }, { text : 'Done', handler : function() { var r = Ext.getCmp('annotator-grid').getEditedCharacteristics(); if (r.length > 0) { Ext.Msg.confirm("Unsaved changes", "There are unsaved changes. Do you want to continue without saving?", function( btn, txt) { if (btn == 'OK') { w.hide(); } }); } else { w.hide(); } if (this.change) { /* Update the display of the tags. */ this.fireEvent('tagsUpdated'); } }, scope : this }] }); w.show(); }, |
editable : this.editable, | editable : canEdit, | tagger : function(id, taxonId) { var annotator = new Ext.Panel({ id : 'annotator-wrap', collapsible : false, stateful : false, bodyBorder : false, layout : 'fit', items : [new Gemma.AnnotationGrid({ id : 'annotator-grid', readMethod : ExpressionExperimentController.getAnnotation, writeMethod : AnnotationController.createExperimentTag, removeMethod : AnnotationController.removeExperimentTag, readParams : [{ id : id }], editable : this.editable, showParent : false, mgedTermKey : "experiment", taxonId : taxonId, entId : id })] }); this.change = false; Ext.getCmp('annotator-grid').on('refresh', function() { this.change = true; }.createDelegate(this)); var w = new Ext.Window({ modal : false, stateful : false, title : "Experiment tags", layout : 'fit', width : 600, height : 200, items : [annotator], buttons : [{ text : 'Help', handler : function() { Ext.Msg .alert( "Help with tagging", "Select a 'category' for the term; then enter a term, " + "choosing from existing terms if possible. " + "Click 'create' to save it. You can also edit existing terms;" + " click 'save' to make the change stick, or 'delete' to remove a selected tag."); } }, { text : 'Done', handler : function() { var r = Ext.getCmp('annotator-grid').getEditedCharacteristics(); if (r.length > 0) { Ext.Msg.confirm("Unsaved changes", "There are unsaved changes. Do you want to continue without saving?", function( btn, txt) { if (btn == 'OK') { w.hide(); } }); } else { w.hide(); } if (this.change) { /* Update the display of the tags. */ this.fireEvent('tagsUpdated'); } }, scope : this }] }); w.show(); }, |
writeMethod : OntologyService.saveExpressionExperimentStatement, removeMethod : OntologyService.removeExpressionExperimentStatement, | writeMethod : AnnotationController.createExperimentTag, removeMethod : AnnotationController.removeExperimentTag, | tagger : function(id, taxonId) { var annotator = new Ext.Panel({ id : 'annotator-wrap', collapsible : false, stateful : false, bodyBorder : false, layout : 'fit', items : [new Gemma.AnnotationGrid({ id : 'annotator-grid', readMethod : ExpressionExperimentController.getAnnotation, writeMethod : OntologyService.saveExpressionExperimentStatement, removeMethod : OntologyService.removeExpressionExperimentStatement, readParams : [{ id : id }], editable : this.editable, showParent : false, mgedTermKey : "experiment", taxonId : taxonId, entId : id })] }); this.change = false; Ext.getCmp('annotator-grid').on('refresh', function() { this.change = true; }.createDelegate(this)); var w = new Ext.Window({ modal : false, stateful : false, title : "Experiment tags", layout : 'fit', width : 600, height : 200, items : [annotator], buttons : [{ text : 'Help', handler : function() { Ext.Msg .alert( "Help with tagging", "Select a 'category' for the term; then enter a term, " + "choosing from existing terms if possible. " + "Click 'create' to save it. You can also edit existing terms;" + " click 'save' to make the change stick, or 'delete' to remove a selected tag."); } }, { text : 'Done', handler : function() { if (this.change) { /* Update the display of the tags. */ this.fireEvent('tagsUpdated'); } w.hide(); }, scope : this }] }); w.show(); }, |
SystemMonitorController.getHibernateStatus(handleSuccess); SystemMonitorController.getCacheStatus(handleCacheData); SystemMonitorController.getSpaceStatus(handleSpaceStatus); } | SystemMonitorController.getHibernateStatus(handleSuccess); if (!pauseBx.getValue()) { SystemMonitorController.getCacheStatus(handleCacheData); } SystemMonitorController.getSpaceStatus(handleSpaceStatus); } | function task() { SystemMonitorController.getHibernateStatus(handleSuccess); SystemMonitorController.getCacheStatus(handleCacheData); SystemMonitorController.getSpaceStatus(handleSpaceStatus);} |
if (all[i].data.taxon.id != taxon.id) { | if (all[i].get('taxonId') != taxon.id) { | taxonChanged : function(taxon) { if (!taxon || (this.geneCombo.getTaxon() && this.geneCombo.getTaxon().id === taxon.id)) { return; } this.geneCombo.setTaxon(taxon); // clear any genes. var all = this.getStore().getRange(); for (var i = 0; i < all.length; ++i) { if (all[i].data.taxon.id != taxon.id) { this.getStore().remove(all[i]); } } this.taxonCombo.setTaxon(taxon); this.fireEvent("taxonchanged", taxon); }, |
"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};P.optgroup=P.option;P.tbody=P.tfoot=P.colgroup=P.caption=P.thead;P.th=P.td;if(!c.support.htmlSerialize)P._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d= c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==B)return this.empty().append((this[0]&&this[0].ownerDocument||t).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, | true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,i,n){return!!k(n[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"=== | "<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};P.optgroup=P.option;P.tbody=P.tfoot=P.colgroup=P.caption=P.thead;P.th=P.td;if(!c.support.htmlSerialize)P._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==B)return this.empty().append((this[0]&&this[0].ownerDocument||t).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, |
var input = $(that); | jQuery.fn.textPlaceholder = function (color) { color = color || '#AAA'; return this.each(function(){ var that = this; if (that.placeholder && 'placeholder' in document.createElement(that.tagName)) return; var default_color = that.style.color; var placeholder = that.getAttribute('placeholder'); if (that.value === '' || that.value == placeholder) { that.value = placeholder; that.style.color = color; } var input = $(that); input.focus(function(){ this.style.color = default_color; if (this.value == placeholder) { this.value = ''; } }); input.blur(function(){ if (this.value === '') { this.value = placeholder; this.style.color = color; } else { this.style.color = default_color; } }); that.form && $(that.form).submit(function(){ if (that.value == placeholder) { that.value = ''; } }); });}; |
|
if (this.value == placeholder) { | if (input.data('placeholder-visible')) { input.data('placeholder-visible', false); | jQuery.fn.textPlaceholder = function (color) { color = color || '#AAA'; return this.each(function(){ var that = this; if (that.placeholder && 'placeholder' in document.createElement(that.tagName)) return; var default_color = that.style.color; var placeholder = that.getAttribute('placeholder'); if (that.value === '' || that.value == placeholder) { that.value = placeholder; that.style.color = color; } var input = $(that); input.focus(function(){ this.style.color = default_color; if (this.value == placeholder) { this.value = ''; } }); input.blur(function(){ if (this.value === '') { this.value = placeholder; this.style.color = color; } else { this.style.color = default_color; } }); that.form && $(that.form).submit(function(){ if (that.value == placeholder) { that.value = ''; } }); });}; |
if (that.value == placeholder) { | if (input.data('placeholder-visible')) { | jQuery.fn.textPlaceholder = function (color) { color = color || '#AAA'; return this.each(function(){ var that = this; if (that.placeholder && 'placeholder' in document.createElement(that.tagName)) return; var default_color = that.style.color; var placeholder = that.getAttribute('placeholder'); if (that.value === '' || that.value == placeholder) { that.value = placeholder; that.style.color = color; } var input = $(that); input.focus(function(){ this.style.color = default_color; if (this.value == placeholder) { this.value = ''; } }); input.blur(function(){ if (this.value === '') { this.value = placeholder; this.style.color = color; } else { this.style.color = default_color; } }); that.form && $(that.form).submit(function(){ if (that.value == placeholder) { that.value = ''; } }); });}; |
return String(s).replace(/&|<|>|\n|\"\u00A0/g, this._textToHtml); | return String(s).replace(/&|<|>|\n|\"|\u00A0/g, this._textToHtml); | textToHtml: function (s) { return String(s).replace(/&|<|>|\n|\"\u00A0/g, this._textToHtml); }, |
eval(settings.advanced_timeoutFn); | eval(settings.advanced_timeoutfn); | settings.opts.timeoutFn = function(currSlideElement, nextSlideElement, options, forwardFlag) { eval(settings.advanced_timeoutFn); } |
: '"' + text.replace('"', '""') + '"'; | : '"' + text.replace(/"/g, '""') + '"'; | JSV.toCsvField = function(text){ return !text || JSV.containsAny_(JSV.ESCAPE_CHARS) ? text : '"' + text.replace('"', '""') + '"';} |
else{if(this.nav['isOpera']){eAs[id]["textarea"].setSelectionRange(0,0);}try{eAs[id]["textarea"].setSelectionRange(selStart,selEnd);}catch(e){};}eAs[id]["textarea"].scrollTop=scrollTop;eAs[id]["textarea"].scrollLeft=scrollLeft;frame.editArea.execCommand("toggle_off");}},toggle_on:function(id){if(window.frames["frame_"+id]){var frame=window.frames["frame_"+id];area=window.frames["frame_"+id].editArea;area.textarea.value=eAs[id]["textarea"].value;var selStart=0;var selEnd=0;var scrollTop=0;var scrollLeft=0;if(eAs[id]["textarea"].use_last==true){var selStart=eAs[id]["textarea"].last_selectionStart;var selEnd=eAs[id]["textarea"].last_selectionEnd;var scrollTop=eAs[id]["textarea"].last_scrollTop;var scrollLeft=eAs[id]["textarea"].last_scrollLeft;eAs[id]["textarea"].use_last=false;} else{try{var selStart=eAs[id]["textarea"].selectionStart;var selEnd=eAs[id]["textarea"].selectionEnd;var scrollTop=eAs[id]["textarea"].scrollTop;var scrollLeft=eAs[id]["textarea"].scrollLeft;}catch(ex){}}this.set_editarea_size_from_textarea(id,document.getElementById("frame_"+id));eAs[id]["textarea"].style.display="none";document.getElementById("frame_"+id).style.display="inline";area.execCommand("focus");eAs[id]["displayed"]=true;area.execCommand("update_size");window.frames["frame_"+id].document.getElementById("result").scrollTop=scrollTop;window.frames["frame_"+id].document.getElementById("result").scrollLeft=scrollLeft;area.area_select(selStart,selEnd-selStart);area.execCommand("toggle_on");} else{var elem=document.getElementById(id);elem.last_selectionStart=elem.selectionStart;elem.last_selectionEnd=elem.selectionEnd;elem.last_scrollTop=elem.scrollTop;elem.last_scrollLeft=elem.scrollLeft;elem.use_last=true;eAL.start(id);}},set_editarea_size_from_textarea:function(id,frame){var elem=document.getElementById(id);var width=Math.max(eAs[id]["settings"]["min_width"],elem.offsetWidth)+"px";var height=Math.max(eAs[id]["settings"]["min_height"],elem.offsetHeight)+"px";if(elem.style.width.indexOf("%")!=-1)width=elem.style.width;if(elem.style.height.indexOf("%")!=-1)height=elem.style.height;frame.style.width=width;frame.style.height=height;},set_base_url:function(){if (!this.baseURL){var elements=document.getElementsByTagName('script');for (var i=0;i<elements.length;i++){if (elements[i].src&&elements[i].src.match(/edit_area_[^\\\/]*$/i)){var src=elements[i].src;src=src.substring(0,src.lastIndexOf('/'));this.baseURL=src;this.file_name=elements[i].src.substr(elements[i].src.lastIndexOf("/")+1);break;}}}var documentBasePath=document.location.href;if (documentBasePath.indexOf('?')!=-1)documentBasePath=documentBasePath.substring(0,documentBasePath.indexOf('?'));var documentURL=documentBasePath;documentBasePath=documentBasePath.substring(0,documentBasePath.lastIndexOf('/'));if (this.baseURL.indexOf(': | else{if(this.isOpera&&this.isOpera < 9.6){t.setSelectionRange(0,0);}try{t.setSelectionRange(selStart,selEnd);}catch(e){};}t.scrollTop=scrollTop;t.scrollLeft=scrollLeft;f.editArea.execCommand("toggle_off");}},toggle_on:function(id){var fs=window.frames,f,t,selStart=0,selEnd=0,scrollTop=0,scrollLeft=0,curPos,elem;if(fs["frame_"+id]){f=fs["frame_"+id];t=eAs[id]["textarea"];area=f.editArea;area.textarea.value=t.value;curPos=eAs[id]["settings"]["cursor_position"];if(t.use_last==true){selStart=t.last_selectionStart;selEnd=t.last_selectionEnd;scrollTop=t.last_scrollTop;scrollLeft=t.last_scrollLeft;t.use_last=false;} else if(curPos=="auto"){try{selStart=t.selectionStart;selEnd=t.selectionEnd;scrollTop=t.scrollTop;scrollLeft=t.scrollLeft;}catch(ex){}}this.set_editarea_size_from_textarea(id,document.getElementById("frame_"+id));t.style.display="none";document.getElementById("frame_"+id).style.display="inline";area.execCommand("focus");eAs[id]["displayed"]=true;area.execCommand("update_size");f.document.getElementById("result").scrollTop=scrollTop;f.document.getElementById("result").scrollLeft=scrollLeft;area.area_select(selStart,selEnd-selStart);area.execCommand("toggle_on");} else{elem=document.getElementById(id);elem.last_selectionStart=elem.selectionStart;elem.last_selectionEnd=elem.selectionEnd;elem.last_scrollTop=elem.scrollTop;elem.last_scrollLeft=elem.scrollLeft;elem.use_last=true;eAL.start(id);}},set_editarea_size_from_textarea:function(id,frame){var elem,width,height;elem=document.getElementById(id);width=Math.max(eAs[id]["settings"]["min_width"],elem.offsetWidth)+"px";height=Math.max(eAs[id]["settings"]["min_height"],elem.offsetHeight)+"px";if(elem.style.width.indexOf("%")!=-1)width=elem.style.width;if(elem.style.height.indexOf("%")!=-1)height=elem.style.height;frame.style.width=width;frame.style.height=height;},set_base_url:function(){var t=this,elems,i,docBasePath;if(!this.baseURL){elems=document.getElementsByTagName('script');for(i=0;i<elems.length;i++){if(elems[i].src&&elems[i].src.match(/edit_area_[^\\\/]*$/i)){var src=unescape(elems[i].src);src=src.substring(0,src.lastIndexOf('/'));this.baseURL=src;this.file_name=elems[i].src.substr(elems[i].src.lastIndexOf("/")+1);break;}}}docBasePath=document.location.href;if(docBasePath.indexOf('?')!=-1)docBasePath=docBasePath.substring(0,docBasePath.indexOf('?'));docBasePath=docBasePath.substring(0,docBasePath.lastIndexOf('/'));if(t.baseURL.indexOf(': | else{if(this.nav['isOpera']){eAs[id]["textarea"].setSelectionRange(0,0);}try{eAs[id]["textarea"].setSelectionRange(selStart,selEnd);}catch(e){};}eAs[id]["textarea"].scrollTop=scrollTop;eAs[id]["textarea"].scrollLeft=scrollLeft;frame.editArea.execCommand("toggle_off");}},toggle_on:function(id){if(window.frames["frame_"+id]){var frame=window.frames["frame_"+id];area=window.frames["frame_"+id].editArea;area.textarea.value=eAs[id]["textarea"].value;var selStart=0;var selEnd=0;var scrollTop=0;var scrollLeft=0;if(eAs[id]["textarea"].use_last==true){var selStart=eAs[id]["textarea"].last_selectionStart;var selEnd=eAs[id]["textarea"].last_selectionEnd;var scrollTop=eAs[id]["textarea"].last_scrollTop;var scrollLeft=eAs[id]["textarea"].last_scrollLeft;eAs[id]["textarea"].use_last=false;}else{try{var selStart=eAs[id]["textarea"].selectionStart;var selEnd=eAs[id]["textarea"].selectionEnd;var scrollTop=eAs[id]["textarea"].scrollTop;var scrollLeft=eAs[id]["textarea"].scrollLeft;}catch(ex){}}this.set_editarea_size_from_textarea(id,document.getElementById("frame_"+id));eAs[id]["textarea"].style.display="none";document.getElementById("frame_"+id).style.display="inline";area.execCommand("focus");eAs[id]["displayed"]=true;area.execCommand("update_size");window.frames["frame_"+id].document.getElementById("result").scrollTop=scrollTop;window.frames["frame_"+id].document.getElementById("result").scrollLeft=scrollLeft;area.area_select(selStart,selEnd-selStart);area.execCommand("toggle_on");}else{var elem=document.getElementById(id);elem.last_selectionStart=elem.selectionStart;elem.last_selectionEnd=elem.selectionEnd;elem.last_scrollTop=elem.scrollTop;elem.last_scrollLeft=elem.scrollLeft;elem.use_last=true;eAL.start(id);}},set_editarea_size_from_textarea:function(id,frame){var elem=document.getElementById(id);var width=Math.max(eAs[id]["settings"]["min_width"],elem.offsetWidth)+"px";var height=Math.max(eAs[id]["settings"]["min_height"],elem.offsetHeight)+"px";if(elem.style.width.indexOf("%")!=-1)width=elem.style.width;if(elem.style.height.indexOf("%")!=-1)height=elem.style.height;frame.style.width=width;frame.style.height=height;},set_base_url:function(){if (!this.baseURL){var elements=document.getElementsByTagName('script');for (var i=0;i<elements.length;i++){if (elements[i].src&&elements[i].src.match(/edit_area_[^\\\/]*$/i)){var src=elements[i].src;src=src.substring(0,src.lastIndexOf('/'));this.baseURL=src;this.file_name=elements[i].src.substr(elements[i].src.lastIndexOf("/")+1);break;}}}var documentBasePath=document.location.href;if (documentBasePath.indexOf('?')!=-1)documentBasePath=documentBasePath.substring(0,documentBasePath.indexOf('?'));var documentURL=documentBasePath;documentBasePath=documentBasePath.substring(0,documentBasePath.lastIndexOf('/'));if (this.baseURL.indexOf('://')==-1&&this.baseURL.charAt(0)!='/'){this.baseURL=documentBasePath+"/"+this.baseURL;}this.baseURL+="/";},get_button_html:function(id,img,exec,isFileSpecific,baseURL){if(!baseURL)baseURL=this.baseURL;var cmd='editArea.execCommand(\''+exec+'\')';html='<a id="a_'+id +'" href="javascript:'+cmd+'" onclick="'+cmd+';return false;" onmousedown="return false;" target="_self" fileSpecific="'+(isFileSpecific?'yes':'no')+'">';html+='<img id="'+id+'" src="'+baseURL +'images/'+img+'" title="{$'+id+'}" width="20" height="20" class="editAreaButtonNormal" onmouseover="editArea.switchClass(this,\'editAreaButtonOver\');" onmouseout="editArea.restoreClass(this);" onmousedown="editArea.restoreAndSwitchClass(this,\'editAreaButtonDown\');" /></a>';return html;},get_control_html:function(button_name,lang){for (var i=0;i<this.advanced_buttons.length;i++){var but=this.advanced_buttons[i];if (but[0]==button_name){return this.get_button_html(but[0],but[1],but[2],but[3]);}}switch (button_name){case "*":case "return":return "<br />";case "|":case "separator":return '<img src="'+this.baseURL +'images/spacer.gif" width="1" height="15" class="editAreaSeparatorLine">';case "select_font":html="<select id='area_font_size' onchange='javascript:editArea.execCommand(\"change_font_size\")' fileSpecific='yes'>" +"<option value='-1'>{$font_size}</option>" +"<option value='8'>8 pt</option>" +"<option value='9'>9 pt</option>" +"<option value='10'>10 pt</option>" +"<option value='11'>11 pt</option>" +"<option value='12'>12 pt</option>" +"<option value='14'>14 pt</option>" +"</select>";return html;case "syntax_selection":var html="<select id='syntax_selection' onchange='javascript:editArea.execCommand(\"change_syntax\",this.value)' fileSpecific='yes'>";html+="<option value='-1'>{$syntax_selection}</option>";html+="</select>";return html;}return "<span id='tmp_tool_"+button_name+"'>["+button_name+"]</span>";},get_template:function(){if(this.template==""){var xhr_object=null;if(window.XMLHttpRequest)xhr_object=new XMLHttpRequest(); |
return false; | this.toggle_show = function (ctrl, caller) { var cnt = document.getElementById(ctrl); var block_hidden = false; if (! cnt.style.display && caller.innerHTML == "(+)") { block_hidden = true; } if (cnt.style.display == "none" || block_hidden) { cnt.style.display = "inline"; caller.innerHTML = "(-)"; } else { cnt.style.display = "none"; caller.innerHTML = "(+)"; } } |
|
.keyup(autocomplete) .keypress(move) | .bind('keyup.ac_action', autocomplete) .bind('focus.ac_action', autocomplete) .bind('keypress.ac_action', move) | function triggerAc(ac) { if (ac) { jQuery.ppa.attrs .keyup(autocomplete) .keypress(move) .addClass('ac_field'); } else { jQuery.ppa.attrs .removeClass('ac_field') .unbind('keyup',autocomplete) .unbind('keypress',move); }} |
.unbind('keyup',autocomplete) .unbind('keypress',move); | .unbind('.ac_action'); | function triggerAc(ac) { if (ac) { jQuery.ppa.attrs .keyup(autocomplete) .keypress(move) .addClass('ac_field'); } else { jQuery.ppa.attrs .removeClass('ac_field') .unbind('keyup',autocomplete) .unbind('keypress',move); }} |
target.trigger(eventname, [ pos, item ]); | placeholder.trigger(eventname, [ pos, item ]); | function triggerClickHoverEvent(eventname, event, seriesFilter) { var offset = eventHolder.offset(), pos = { pageX: event.pageX, pageY: event.pageY }, canvasX = event.pageX - offset.left - plotOffset.left, canvasY = event.pageY - offset.top - plotOffset.top; if (axes.xaxis.used) pos.x = axes.xaxis.c2p(canvasX); if (axes.yaxis.used) pos.y = axes.yaxis.c2p(canvasY); if (axes.x2axis.used) pos.x2 = axes.x2axis.c2p(canvasX); if (axes.y2axis.used) pos.y2 = axes.y2axis.c2p(canvasY); var item = findNearbyItem(canvasX, canvasY, seriesFilter); if (item) { // fill in mouse pos for any listeners out there item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left + plotOffset.left); item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top + plotOffset.top); } if (options.grid.autoHighlight) { // clear auto-highlights for (var i = 0; i < highlights.length; ++i) { var h = highlights[i]; if (h.auto == eventname && !(item && h.series == item.series && h.point == item.datapoint)) unhighlight(h.series, h.point); } if (item) highlight(item.series, item.datapoint, eventname); } target.trigger(eventname, [ pos, item ]); } |
if (currentString.search(/^\s*((public|protected|private)\s*\S*|(signals|Q_SIGNALS)\s*):/) == -1) | if (currentString.search(/^\s*((public|protected|private)\s*(slots|Q_SLOTS)?|(signals|Q_SIGNALS)\s*):\s*$/) == -1) | function tryAccessModifiers(line){ if (cfgAccessModifiers < 0) return -1; var currentString = document.line(line); if (currentString.search(/^\s*((public|protected|private)\s*\S*|(signals|Q_SIGNALS)\s*):/) == -1) return -1; var cursor = document.anchor(line, 0, '{'); if (!cursor.isValid()) return -1; var indentation = document.firstVirtualColumn(cursor.line); for ( var i = 0; i < cfgAccessModifiers; ++i ) { indentation += gIndentWidth; } if (indentation != -1) dbg("tryAccessModifiers: success in line " + cursor.line); return indentation;} |
indentation = document.firstVirtualColumn(currentLine); if (indentation == 0) | var currentIndentation = document.firstVirtualColumn(currentLine); if (currentIndentation == 0) | function tryCondition(line){ var currentLine = document.prevNonEmptyLine(line - 1); if (currentLine < 0) return -1; // found non-empty line var currentString = document.line(currentLine); var lastPos = document.lastColumn(currentLine); var lastChar = currentString.charAt(lastPos); var indentation = -1; if (lastChar == ';' && currentString.search(/^\s*(if\b|[}]?\s*else|do\b|while\b|for)/) == -1) { // idea: we had something like: // if/while/for (expression) // statement(); <-- we catch this trailing ';' // Now, look for a line that starts with if/for/while, that has one // indent level less. indentation = document.firstVirtualColumn(currentLine); if (indentation == 0) return -1; var lineDelimiter = 10; // 10 limit search, hope this is a sane value while (currentLine > 0 && lineDelimiter > 0) { --currentLine; --lineDelimiter; var firstPosVirtual = document.firstVirtualColumn(currentLine); if (firstPosVirtual == -1) continue; if (firstPosVirtual < indentation) { currentString = document.line(currentLine); if (currentString.search(/^\s*(if\b|[}]?\s*else|do\b|while\b|for)[^{]*$/) != -1) indentation = firstPosVirtual; break; } } } if (indentation != -1) dbg("tryCondition: success in line " + currentLine); return indentation;} |
if (firstPosVirtual < indentation) { | if (firstPosVirtual < currentIndentation) { | function tryCondition(line){ var currentLine = document.prevNonEmptyLine(line - 1); if (currentLine < 0) return -1; // found non-empty line var currentString = document.line(currentLine); var lastPos = document.lastColumn(currentLine); var lastChar = currentString.charAt(lastPos); var indentation = -1; if (lastChar == ';' && currentString.search(/^\s*(if\b|[}]?\s*else|do\b|while\b|for)/) == -1) { // idea: we had something like: // if/while/for (expression) // statement(); <-- we catch this trailing ';' // Now, look for a line that starts with if/for/while, that has one // indent level less. indentation = document.firstVirtualColumn(currentLine); if (indentation == 0) return -1; var lineDelimiter = 10; // 10 limit search, hope this is a sane value while (currentLine > 0 && lineDelimiter > 0) { --currentLine; --lineDelimiter; var firstPosVirtual = document.firstVirtualColumn(currentLine); if (firstPosVirtual == -1) continue; if (firstPosVirtual < indentation) { currentString = document.line(currentLine); if (currentString.search(/^\s*(if\b|[}]?\s*else|do\b|while\b|for)[^{]*$/) != -1) indentation = firstPosVirtual; break; } } } if (indentation != -1) dbg("tryCondition: success in line " + currentLine); return indentation;} |
if ( expectedIndentation < actualIndentation ) { | if ( expectedIndentation <= actualIndentation ) { | function tryMatchedAnchor(line){ var char = document.firstChar(line); if ( char != '}' && char != ')' && char != ']' ) { return -1; } // we pressed enter in e.g. () var closingAnchor = document.anchor(line, 0, document.firstChar(line)); if (!closingAnchor.isValid()) { // nothing found, continue with other cases return -1; } var lastChar = document.lastChar(line - 1); var charsMatch = ( lastChar == '(' && char == ')' ) || ( lastChar == '{' && char == '}' ) || ( lastChar == '[' && char == ']' ); var indentLine = -1; var indentation = -1; if ( !charsMatch && char != '}' ) { // otherwise check whether the last line has the expected // indentation, if not use it instead and place the closing // anchor on the level of the openeing anchor var expectedIndentation = document.firstVirtualColumn(closingAnchor.line) + gIndentWidth; var actualIndentation = document.firstVirtualColumn(line - 1); var indentation = -1; if ( expectedIndentation < actualIndentation ) { if ( lastChar == ',' ) { // use indentation of last line instead and place closing anchor // in same column of the openeing anchor document.insertText(line, document.firstColumn(line), "\n"); view.setCursorPosition(line, actualIndentation); // indent closing anchor document.indent(new Range(line + 1, 0, line + 1, 1), document.toVirtualColumn(closingAnchor) / gIndentWidth); // make sure we add spaces to align perfectly on closing anchor var padding = document.toVirtualColumn(closingAnchor) % gIndentWidth; if ( padding > 0 ) { document.insertText(line + 1, document.column - padding, String().fill(' ', padding)); } indentation = actualIndentation; } else { // otherwise don't add a new line, just align on closing anchor indentation = document.toVirtualColumn(closingAnchor); } dbg("tryMatchedAnchor: success in line " + closingAnchor.line); return indentation; } } // otherwise we i.e. pressed enter between (), [] or when we enter before curly brace // increase indentation and place closing anchor on the next line indentation = document.firstVirtualColumn(closingAnchor.line); document.insertText(line, document.firstColumn(line), "\n"); view.setCursorPosition(line, indentation); // indent closing brace document.indent(new Range(line + 1, 0, line + 1, 1), indentation / gIndentWidth); dbg("tryMatchedAnchor: success in line " + closingAnchor.line); return indentation + gIndentWidth;} |
} else if ( expectedIndentation == actualIndentation ) { indentation = document.firstVirtualColumn(closingAnchor.line); | function tryMatchedAnchor(line){ var char = document.firstChar(line); if ( char != '}' && char != ')' && char != ']' ) { return -1; } // we pressed enter in e.g. () var closingAnchor = document.anchor(line, 0, document.firstChar(line)); if (!closingAnchor.isValid()) { // nothing found, continue with other cases return -1; } var lastChar = document.lastChar(line - 1); var charsMatch = ( lastChar == '(' && char == ')' ) || ( lastChar == '{' && char == '}' ) || ( lastChar == '[' && char == ']' ); var indentLine = -1; var indentation = -1; if ( !charsMatch && char != '}' ) { // otherwise check whether the last line has the expected // indentation, if not use it instead and place the closing // anchor on the level of the openeing anchor var expectedIndentation = document.firstVirtualColumn(closingAnchor.line) + gIndentWidth; var actualIndentation = document.firstVirtualColumn(line - 1); var indentation = -1; if ( expectedIndentation < actualIndentation ) { if ( lastChar == ',' ) { // use indentation of last line instead and place closing anchor // in same column of the openeing anchor document.insertText(line, document.firstColumn(line), "\n"); view.setCursorPosition(line, actualIndentation); // indent closing anchor document.indent(new Range(line + 1, 0, line + 1, 1), document.toVirtualColumn(closingAnchor) / gIndentWidth); // make sure we add spaces to align perfectly on closing anchor var padding = document.toVirtualColumn(closingAnchor) % gIndentWidth; if ( padding > 0 ) { document.insertText(line + 1, document.column - padding, String().fill(' ', padding)); } indentation = actualIndentation; } else { // otherwise don't add a new line, just align on closing anchor indentation = document.toVirtualColumn(closingAnchor); } dbg("tryMatchedAnchor: success in line " + closingAnchor.line); return indentation; } } // otherwise we i.e. pressed enter between (), [] or when we enter before curly brace // increase indentation and place closing anchor on the next line indentation = document.firstVirtualColumn(closingAnchor.line); document.insertText(line, document.firstColumn(line), "\n"); view.setCursorPosition(line, indentation); // indent closing brace document.indent(new Range(line + 1, 0, line + 1, 1), indentation / gIndentWidth); dbg("tryMatchedAnchor: success in line " + closingAnchor.line); return indentation + gIndentWidth;} |
|
function tryMatchedAnchor(line) | function tryMatchedAnchor(line, alignOnly) | function tryMatchedAnchor(line){ var char = document.firstChar(line); if ( char != '}' && char != ')' && char != ']' ) { return -1; } // we pressed enter in e.g. () var closingAnchor = document.anchor(line, 0, document.firstChar(line)); if (!closingAnchor.isValid()) { // nothing found, continue with other cases return -1; } var lastChar = document.lastChar(line - 1); var charsMatch = ( lastChar == '(' && char == ')' ) || ( lastChar == '{' && char == '}' ) || ( lastChar == '[' && char == ']' ); var indentLine = -1; var indentation = -1; if ( !charsMatch && char != '}' ) { // otherwise check whether the last line has the expected // indentation, if not use it instead and place the closing // anchor on the level of the openeing anchor var expectedIndentation = document.firstVirtualColumn(closingAnchor.line) + gIndentWidth; var actualIndentation = document.firstVirtualColumn(line - 1); var indentation = -1; if ( expectedIndentation <= actualIndentation ) { if ( lastChar == ',' ) { // use indentation of last line instead and place closing anchor // in same column of the openeing anchor document.insertText(line, document.firstColumn(line), "\n"); view.setCursorPosition(line, actualIndentation); // indent closing anchor document.indent(new Range(line + 1, 0, line + 1, 1), document.toVirtualColumn(closingAnchor) / gIndentWidth); // make sure we add spaces to align perfectly on closing anchor var padding = document.toVirtualColumn(closingAnchor) % gIndentWidth; if ( padding > 0 ) { document.insertText(line + 1, document.column - padding, String().fill(' ', padding)); } indentation = actualIndentation; } else if ( expectedIndentation == actualIndentation ) { // otherwise don't add a new line, just use indentation of closing anchor line indentation = document.firstVirtualColumn(closingAnchor.line); } else { // otherwise don't add a new line, just align on closing anchor indentation = document.toVirtualColumn(closingAnchor); } dbg("tryMatchedAnchor: success in line " + closingAnchor.line); return indentation; } } // otherwise we i.e. pressed enter between (), [] or when we enter before curly brace // increase indentation and place closing anchor on the next line indentation = document.firstVirtualColumn(closingAnchor.line); document.insertText(line, document.firstColumn(line), "\n"); view.setCursorPosition(line, indentation); // indent closing brace document.indent(new Range(line + 1, 0, line + 1, 1), indentation / gIndentWidth); dbg("tryMatchedAnchor: success in line " + closingAnchor.line); return indentation + gIndentWidth;} |
} if (alignOnly) { return document.firstVirtualColumn(closingAnchor.line); | function tryMatchedAnchor(line){ var char = document.firstChar(line); if ( char != '}' && char != ')' && char != ']' ) { return -1; } // we pressed enter in e.g. () var closingAnchor = document.anchor(line, 0, document.firstChar(line)); if (!closingAnchor.isValid()) { // nothing found, continue with other cases return -1; } var lastChar = document.lastChar(line - 1); var charsMatch = ( lastChar == '(' && char == ')' ) || ( lastChar == '{' && char == '}' ) || ( lastChar == '[' && char == ']' ); var indentLine = -1; var indentation = -1; if ( !charsMatch && char != '}' ) { // otherwise check whether the last line has the expected // indentation, if not use it instead and place the closing // anchor on the level of the openeing anchor var expectedIndentation = document.firstVirtualColumn(closingAnchor.line) + gIndentWidth; var actualIndentation = document.firstVirtualColumn(line - 1); var indentation = -1; if ( expectedIndentation <= actualIndentation ) { if ( lastChar == ',' ) { // use indentation of last line instead and place closing anchor // in same column of the openeing anchor document.insertText(line, document.firstColumn(line), "\n"); view.setCursorPosition(line, actualIndentation); // indent closing anchor document.indent(new Range(line + 1, 0, line + 1, 1), document.toVirtualColumn(closingAnchor) / gIndentWidth); // make sure we add spaces to align perfectly on closing anchor var padding = document.toVirtualColumn(closingAnchor) % gIndentWidth; if ( padding > 0 ) { document.insertText(line + 1, document.column - padding, String().fill(' ', padding)); } indentation = actualIndentation; } else if ( expectedIndentation == actualIndentation ) { // otherwise don't add a new line, just use indentation of closing anchor line indentation = document.firstVirtualColumn(closingAnchor.line); } else { // otherwise don't add a new line, just align on closing anchor indentation = document.toVirtualColumn(closingAnchor); } dbg("tryMatchedAnchor: success in line " + closingAnchor.line); return indentation; } } // otherwise we i.e. pressed enter between (), [] or when we enter before curly brace // increase indentation and place closing anchor on the next line indentation = document.firstVirtualColumn(closingAnchor.line); document.insertText(line, document.firstColumn(line), "\n"); view.setCursorPosition(line, indentation); // indent closing brace document.indent(new Range(line + 1, 0, line + 1, 1), indentation / gIndentWidth); dbg("tryMatchedAnchor: success in line " + closingAnchor.line); return indentation + gIndentWidth;} |
|
document.indent(new Range(line + 1, 0, line + 1, 1), indentation / 2); | document.indent(new Range(line + 1, 0, line + 1, 1), indentation / gIndentWidth); | function tryMatchedAnchor(line){ var closingAnchor = document.anchor(line, 0, document.firstChar(line)); if (!closingAnchor.isValid()) { // nothing found, continue with other cases return -1; } // otherwise it's found, increase indentation and place closing anchor on the next line var indentation = document.firstVirtualColumn(closingAnchor.line); document.insertText(line, document.firstColumn(line), "\n"); view.setCursorPosition(line, indentation); // indent closing brace document.indent(new Range(line + 1, 0, line + 1, 1), indentation / 2); dbg("tryMatchedAnchor: success in line " + closingAnchor.line); return indentation + gIndentWidth;} |
this.log("t.s.m"); | tryToSetMaster: function() { this.log("t.s.m"); var optionIndex = null; var active = this.getActive(); if (active.length) { optionIndex = active.attr("name"); //sBox pointer index } if (optionIndex == null || optionIndex == "" || optionIndex < 0) { this.log("no active, master not set."); if (this.options.submitFreeText) { return false; } else { this.log("Not freetext and no active set; revert."); this.revertSelected(); return false; } } // else optionIndex is set to activeIndex var sBox = this.selectbox.get(0); var curIndex = sBox.selectedIndex; var option = sBox.options[optionIndex]; if(!this.options.submitFreeText || this.input.val() == option.text){ //freetext only if exact match this.input.val(option.text); // input may be only partially set if(optionIndex != curIndex){ this.isUpdatingMaster = true; sBox.selectedIndex = optionIndex; this.log("master selectbox set to: " + option.text); this._triggerEventOnMaster("change"); } // else already correctly set, no change return true; } // else have a non-matched freetext this.log("unmatched freetext, master not set."); return false; }, |
|
this.log("no active, master not set."); | tryToSetMaster: function() { this.log("t.s.m"); var optionIndex = null; var active = this.getActive(); if (active.length) { optionIndex = active.attr("name"); //sBox pointer index } if (optionIndex == null || optionIndex == "" || optionIndex < 0) { this.log("no active, master not set."); if (this.options.submitFreeText) { return false; } else { this.log("Not freetext and no active set; revert."); this.revertSelected(); return false; } } // else optionIndex is set to activeIndex var sBox = this.selectbox.get(0); var curIndex = sBox.selectedIndex; var option = sBox.options[optionIndex]; if(!this.options.submitFreeText || this.input.val() == option.text){ //freetext only if exact match this.input.val(option.text); // input may be only partially set if(optionIndex != curIndex){ this.isUpdatingMaster = true; sBox.selectedIndex = optionIndex; this.log("master selectbox set to: " + option.text); this._triggerEventOnMaster("change"); } // else already correctly set, no change return true; } // else have a non-matched freetext this.log("unmatched freetext, master not set."); return false; }, |
|
this.log("Not freetext and no active set; revert."); | tryToSetMaster: function() { this.log("t.s.m"); var optionIndex = null; var active = this.getActive(); if (active.length) { optionIndex = active.attr("name"); //sBox pointer index } if (optionIndex == null || optionIndex == "" || optionIndex < 0) { this.log("no active, master not set."); if (this.options.submitFreeText) { return false; } else { this.log("Not freetext and no active set; revert."); this.revertSelected(); return false; } } // else optionIndex is set to activeIndex var sBox = this.selectbox.get(0); var curIndex = sBox.selectedIndex; var option = sBox.options[optionIndex]; if(!this.options.submitFreeText || this.input.val() == option.text){ //freetext only if exact match this.input.val(option.text); // input may be only partially set if(optionIndex != curIndex){ this.isUpdatingMaster = true; sBox.selectedIndex = optionIndex; this.log("master selectbox set to: " + option.text); this._triggerEventOnMaster("change"); } // else already correctly set, no change return true; } // else have a non-matched freetext this.log("unmatched freetext, master not set."); return false; }, |
|
this.log("master selectbox set to: " + option.text); | tryToSetMaster: function() { this.log("t.s.m"); var optionIndex = null; var active = this.getActive(); if (active.length) { optionIndex = active.attr("name"); //sBox pointer index } if (optionIndex == null || optionIndex == "" || optionIndex < 0) { this.log("no active, master not set."); if (this.options.submitFreeText) { return false; } else { this.log("Not freetext and no active set; revert."); this.revertSelected(); return false; } } // else optionIndex is set to activeIndex var sBox = this.selectbox.get(0); var curIndex = sBox.selectedIndex; var option = sBox.options[optionIndex]; if(!this.options.submitFreeText || this.input.val() == option.text){ //freetext only if exact match this.input.val(option.text); // input may be only partially set if(optionIndex != curIndex){ this.isUpdatingMaster = true; sBox.selectedIndex = optionIndex; this.log("master selectbox set to: " + option.text); this._triggerEventOnMaster("change"); } // else already correctly set, no change return true; } // else have a non-matched freetext this.log("unmatched freetext, master not set."); return false; }, |
|
this.log("unmatched freetext, master not set."); | tryToSetMaster: function() { this.log("t.s.m"); var optionIndex = null; var active = this.getActive(); if (active.length) { optionIndex = active.attr("name"); //sBox pointer index } if (optionIndex == null || optionIndex == "" || optionIndex < 0) { this.log("no active, master not set."); if (this.options.submitFreeText) { return false; } else { this.log("Not freetext and no active set; revert."); this.revertSelected(); return false; } } // else optionIndex is set to activeIndex var sBox = this.selectbox.get(0); var curIndex = sBox.selectedIndex; var option = sBox.options[optionIndex]; if(!this.options.submitFreeText || this.input.val() == option.text){ //freetext only if exact match this.input.val(option.text); // input may be only partially set if(optionIndex != curIndex){ this.isUpdatingMaster = true; sBox.selectedIndex = optionIndex; this.log("master selectbox set to: " + option.text); this._triggerEventOnMaster("change"); } // else already correctly set, no change return true; } // else have a non-matched freetext this.log("unmatched freetext, master not set."); return false; }, |
|
if (itm.match(/^\d\d[\/-]\d\d[\/-]\d\d\d\d$/)) sortfn = ts_sort_date; if (itm.match(/^\d\d[\/-]\d\d[\/-]\d\d$/)) sortfn = ts_sort_date; if (itm.match(/^[$]/)) sortfn = ts_sort_currency; if (itm.match(/^[\d\.]+$/)) sortfn = ts_sort_numeric; | if (itm.match(/^\s*\d\d[\/-]\d\d[\/-]\d\d\d\d\s+/)) sortfn = ts_sort_date; else if (itm.match(/^\s*\d\d[\/-]\d\d[\/-]\d\d$/)) sortfn = ts_sort_date; else if (itm.match(/^\s*[$]/)) sortfn = ts_sort_currency; else if (itm.match(/^\s*\d+\.\d+\.\d+\.\d+\s*$/)) sortfn = ts_sort_ip; else if (itm.match(/^\s*[\d\.]+/)) sortfn = ts_sort_numeric; | function ts_resortTable(lnk) { // get the span var span; for (var ci=0;ci<lnk.childNodes.length;ci++) { if (lnk.childNodes[ci].tagName && lnk.childNodes[ci].tagName.toLowerCase() == 'span') span = lnk.childNodes[ci]; } var spantext = ts_getInnerText(span); var td = lnk.parentNode; var column = td.cellIndex; var table = getParent(td,'TABLE'); // Work out a type for the column if (table.rows.length <= 1) return; var itm = ts_getInnerText(table.rows[1].cells[column]); sortfn = ts_sort_caseinsensitive; if (itm.match(/^\d\d[\/-]\d\d[\/-]\d\d\d\d$/)) sortfn = ts_sort_date; if (itm.match(/^\d\d[\/-]\d\d[\/-]\d\d$/)) sortfn = ts_sort_date; if (itm.match(/^[$]/)) sortfn = ts_sort_currency; if (itm.match(/^[\d\.]+$/)) sortfn = ts_sort_numeric; SORT_COLUMN_INDEX = column; var firstRow = new Array(); var newRows = new Array(); for (i=0;i<table.rows[0].length;i++) { firstRow[i] = table.rows[0][i]; } for (j=1;j<table.rows.length;j++) { newRows[j-1] = table.rows[j]; } newRows.sort(sortfn); if (span.getAttribute("sortdir") == 'down') { ARROW = ' <img src="'+ image_path + image_up + '" alt="↑"/>'; newRows.reverse(); span.setAttribute('sortdir','up'); } else { ARROW = ' <img src="'+ image_path + image_down + '" alt="↓"/>'; span.setAttribute('sortdir','down'); } // We appendChild rows that already exist to the tbody, so it moves them rather than creating new ones // don't do sortbottom rows for (i=0; i<newRows.length; i++) { if (!newRows[i].className || (newRows[i].className && (newRows[i].className.indexOf('sortbottom') == -1))) { table.tBodies[0].appendChild(newRows[i]); } } // do sortbottom rows only for (i=0; i<newRows.length; i++) { if (newRows[i].className && (newRows[i].className.indexOf('sortbottom') != -1)) table.tBodies[0].appendChild(newRows[i]); } // Delete any other arrows there may be showing var allspans = document.getElementsByTagName("span"); for (var ci=0;ci<allspans.length;ci++) { if (allspans[ci].className == 'sortarrow') { if (getParent(allspans[ci],"table") == getParent(lnk,"table")) { // in the same table as us? allspans[ci].innerHTML = ' <img src="'+ image_path + image_none + '" alt="↓"/>'; } } } span.innerHTML = ARROW; alternate(table); } |
aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]); bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]); | atext = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]); btext = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]); aa = atext.match(/^\s*(\d\d[\/-]\d\d[\/-]\d+)\s+/)[1]; bb = btext.match(/^\s*(\d\d[\/-]\d\d[\/-]\d+)\s+/)[1]; | function ts_sort_date(a,b) { // y2k notes: two digit years less than 50 are treated as 20XX, greater than 50 are treated as 19XX aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]); bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]); if (aa.length == 10) { dt1 = aa.substr(6,4)+aa.substr(3,2)+aa.substr(0,2); } else { yr = aa.substr(6,2); if (parseInt(yr) < 50) { yr = '20'+yr; } else { yr = '19'+yr; } dt1 = yr+aa.substr(3,2)+aa.substr(0,2); } if (bb.length == 10) { dt2 = bb.substr(6,4)+bb.substr(3,2)+bb.substr(0,2); } else { yr = bb.substr(6,2); if (parseInt(yr) < 50) { yr = '20'+yr; } else { yr = '19'+yr; } dt2 = yr+bb.substr(3,2)+bb.substr(0,2); } if (dt1==dt2) { return 0; } if (dt1<dt2) { return -1; } return 1;} |
if (dt1==dt2) { return 0; } | function ts_sort_date(a,b) { // y2k notes: two digit years less than 50 are treated as 20XX, greater than 50 are treated as 19XX aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]); bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]); if (aa.length == 10) { dt1 = aa.substr(6,4)+aa.substr(3,2)+aa.substr(0,2); } else { yr = aa.substr(6,2); if (parseInt(yr) < 50) { yr = '20'+yr; } else { yr = '19'+yr; } dt1 = yr+aa.substr(3,2)+aa.substr(0,2); } if (bb.length == 10) { dt2 = bb.substr(6,4)+bb.substr(3,2)+bb.substr(0,2); } else { yr = bb.substr(6,2); if (parseInt(yr) < 50) { yr = '20'+yr; } else { yr = '19'+yr; } dt2 = yr+bb.substr(3,2)+bb.substr(0,2); } if (dt1==dt2) { return 0; } if (dt1<dt2) { return -1; } return 1;} |
|
return 1; | if (dt1>dt2) { return 1; } aa = atext.match(/^\s*\d\d[\/-]\d\d[\/-]\d+\s+(\d+:\d+:\d+)/)[1]; bb = btext.match(/^\s*\d\d[\/-]\d\d[\/-]\d+\s+(\d+:\d+:\d+)/)[1]; dt1 = aa.substr(0,2)+aa.substr(3,2)+aa.substr(6,2) dt2 = bb.substr(0,2)+bb.substr(3,2)+bb.substr(6,2) if (dt1<dt2) { return -1; } if (dt1>dt2) { return 1; } return 0; | function ts_sort_date(a,b) { // y2k notes: two digit years less than 50 are treated as 20XX, greater than 50 are treated as 19XX aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]); bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]); if (aa.length == 10) { dt1 = aa.substr(6,4)+aa.substr(3,2)+aa.substr(0,2); } else { yr = aa.substr(6,2); if (parseInt(yr) < 50) { yr = '20'+yr; } else { yr = '19'+yr; } dt1 = yr+aa.substr(3,2)+aa.substr(0,2); } if (bb.length == 10) { dt2 = bb.substr(6,4)+bb.substr(3,2)+bb.substr(0,2); } else { yr = bb.substr(6,2); if (parseInt(yr) < 50) { yr = '20'+yr; } else { yr = '19'+yr; } dt2 = yr+bb.substr(3,2)+bb.substr(0,2); } if (dt1==dt2) { return 0; } if (dt1<dt2) { return -1; } return 1;} |
return lines; | function uniq(){ each(function(lines) { for ( var i = 1; i < lines.length; ++i ) { for ( var j = i - 1; j >= 0; --j ) { if ( lines[i] == lines[j] ) { lines.splice(i, 1); // gets increased in the for --i; break; } } } });} |
|
} | }; | var unpickTag = function(from_target ,tagname, reason, send_ajax){ //send ajax request to delete tag var deleteTagLocally = function(){ from_target[tagname].remove(); delete from_target[tagname]; } if (send_ajax){ sendAjax(tagname,reason,'remove',deleteTagLocally); } else { deleteTagLocally(); } } |
newValue : { data: null, error: false}, | unsetActiveField: function() { this.activeCell.field.destroy(); if(this.popup.domObj != null) { this.popup.domObj.removeEvent('mouseenter'); this.popup.domObj.hide(); } this.activeCell.cell.setStyle('outline', '0px'); this.activeCell = { field : null, oldValue : null, cell : null, span : null, timeoutId : null, //popup : null, // do not destroy the popup, it might be used again colOptions : {}, coords : {}, fieldOptions : {}, validator : null } }, |
|
this.setZindex(this.els[i], i); | this.setZIndex(this.els[i], i); | unstack: function(el) { if (this.els.contains(el)) { el.setStyle('z-index', ''); var idx = this.els.indexOf(el); this.els.erase(el); for (var i=idx; i<this.els.length; i++) { this.setZindex(this.els[i], i); } } }, |
ExpressionExperimentSetController.update = function(p0, callback) { dwr.engine._execute(ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', 'update', p0, callback); | GeneSetController.update = function(p0, callback) { dwr.engine._execute(GeneSetController._path, 'GeneSetController', 'update', p0, callback); | ExpressionExperimentSetController.update = function(p0, callback) { dwr.engine._execute(ExpressionExperimentSetController._path, 'ExpressionExperimentSetController', 'update', p0, callback);} |
if (data) { Ext.Msg.alert("Created", "The set was updated in the database"); } else { Ext.Msg.alert("Error", "Could not updated. See the logs for details."); } | Ext.Msg.alert("Updated", "The set was updated in the database"); | update : function(rec) { if (!rec) { return; } this.resetBut.disable(); this.commitBut.disable(); if (rec.get("id") < 0) { if (this.userCanWriteToDB) { /* * try to create it in the db. */ var callback = function(data) { if (data) { Ext.Msg.alert("Created", "The set was created in the database"); } else { Ext.Msg.alert("Error", "Could not create. See the logs for details."); } }.createDelegate(this); var errorHandler = function(data) { Ext.Msg.alert("Error", "Could not create. See the logs for details. " + data); // FIXME: mark dirty. } ExpressionExperimentSetController.create(rec.data, { callback : callback, errorHandler : errorHandler }); } else { this.grid.getStore().cookieSaveOrUpdateEESet(rec); } } else { if (this.userCanWriteToDB) { var updateCallback = function(data) { if (data) { Ext.Msg.alert("Created", "The set was updated in the database"); } else { Ext.Msg.alert("Error", "Could not updated. See the logs for details."); } }.createDelegate(this); var updateErrorHandler = function(data) { Ext.Msg.alert("Error", "Could not update. See the logs for details.<br/>" + data); // FIXME: mark dirty. } ExpressionExperimentSetController.update(rec.data, { callback : updateCallback, errorHandler : updateErrorHandler }); } else { Ext.Msg.alert("Permission denied", "Sorry, you can't edit this set. Try saving a clone instead."); } } this.cloneBut.enable(); }, |
var eeInfoTitle = "<a ext.qtip='Click for details on experiment (opens in new window)' target='_blank' href='/Gemma/expressionExperiment/showExpressionExperiment.html?id=" + eevo.id + " '>" + eevo.shortName + "</a> (" + Ext.util.Format.ellipsis(eevo.name, 35) + ")"; | var eeInfoTitle = "<a ext.qtip='Click for details on experiment (opens in new window)' target='_blank' href='/Gemma/expressionExperiment/showExpressionExperiment.html?id=" + (eevo.sourceExperiment ? eevo.sourceExperiment : eevo.id) + " '>" + eevo.shortName + "</a> (" + Ext.util.Format.ellipsis(eevo.name, 35) + ")"; | update : function(eevo, profiles, sampleNames) { if (profiles === undefined || profiles === null) { var record = this.dv.getSelectedOrFirst(); if (record === null || record === undefined) { // can happen at startup. return; } profiles = record.get("profiles"); if (profiles === undefined) { // hopefully this doesn't happen. return; } sampleNames = record.get("sampleNames"); } if (profiles === undefined) { throw "No profiles!!"; } if (eevo) { var eeInfoTitle = "<a ext.qtip='Click for details on experiment (opens in new window)' target='_blank' href='/Gemma/expressionExperiment/showExpressionExperiment.html?id=" + eevo.id + " '>" + eevo.shortName + "</a> (" + Ext.util.Format.ellipsis(eevo.name, 35) + ")"; if (this.ownerCt && this.ownerCt.originalTitle) { this.ownerCt.setTitle(this.ownerCt.originalTitle + " In: " + eeInfoTitle); } else { this.setTitle(eeInfoTitle); } } var forceFit = this.ownerCt ? this.ownerCt.forceFitPlots : this.forceFitPlots; var smooth = this.ownerCt ? this.ownerCt.smoothLineGraphs : this.smoothLineGraphs; var graphConfig = { xaxis : { noTicks : 0 }, yaxis : { noTicks : 0 }, grid : { labelMargin : 0, marginColor : "white" }, shadowSize : 0, forceFit : forceFit, smoothLineGraphs : smooth, legend : { show : this.showLegend || this.heatmapMode, // container : this.legendDiv ? this.legendDiv : this.body.id, labelFormatter : function(s) { // assume we only have one link defined... var k = s.split("</a>", 2); return k[0] + "</a>" + Ext.util.Format.ellipsis(k[1], Gemma.MAX_THUMBNAILLABEL_LENGTH_CHAR); }, position : "sw" // best to be west, if we're expanded...applies to linecharts. }, label : true }; Ext.DomHelper.overwrite(this.body.id, ''); var doHeatmap = this.ownerCt ? this.ownerCt.heatmapMode : this.heatmapMode; this.showMask(); if (doHeatmap) { graphConfig.legend.container = this.legendDiv ? this.legendDiv : this.body.id; profiles.sort(Gemma.sortByImportance); Heatmap.draw($(this.body.id), profiles, graphConfig, sampleNames, Gemma.sortByImportance); } else { profiles.sort(Gemma.sortByImportance); // clear the heatmap legend, if it's there if (this.legendDiv && this.legendDiv != this.body.id) { Ext.DomHelper.overwrite(this.legendDiv, ''); } LinePlot.draw($(this.body.id), profiles, graphConfig, sampleNames); // make the line chart legend clickable. Selector is based on flotr's output. legend = Ext.DomQuery.select("div.flotr-legend", this.el.dom); if (legend && legend[0]) { var onLegendClick = function(event, component) { var probeId = event.getTarget().id; var record; if (this.dv.getSelectionCount() > 0) { record = this.dv.getSelectedRecords()[0]; } else { record = this.dv.getStore().getRange(0, 0)[0]; } var eevo = record.get("eevo"); var profiles = record.get("profiles"); var sampleNames = record.get("sampleNames"); for (var i = 0; i < profiles.size(); i++) { if (profiles[i].labelID == probeId) { if (profiles[i].selected) { profiles[i].lines.lineWidth = (profiles[i].lines.lineWidth / Gemma.SELECTED); // profiles[i].lines.color = profile[i].lines.color; // put it back... Ext.DomHelper.applyStyles(event.getTarget(), "border:black 2px"); profiles[i].selected = false; } else { profiles[i].selected = true; profiles[i].lines.lineWidth = profiles[i].lines.lineWidth * Gemma.SELECTED; // profiles[i].lines.color = profile[i].lines.color; // make it selected Ext.DomHelper.applyStyles(event.getTarget(), "border:green 2px"); } break; } } this.update(eevo, profiles, sampleNames); }; var el = new Ext.Element(legend[0]); el.on('click', onLegendClick.createDelegate(this)); } } this.hideMask(); } |
this.relayEvents(k, ['done']); | this.relayEvents(k, ['done', 'fail']); | updateAllEEReports : function() { var callParams = []; callParams.push({ callback : function(data) { var k = new Gemma.WaitHandler(); k.handleWait(data, true); this.relayEvents(k, ['done']); k.on('done', function(payload) { this.fireEvent('reportUpdated', payload); }); }.createDelegate(this) }); ExpressionExperimentReportGenerationController.runAll.apply(this, callParams); }, |
var badge = {}; var badgeDisplay = "Quota Used"; var remaining = (data[0].limit - data[0].usagemb); badgeDisplay = localStorage['badgeDisplay']; switch(badgeDisplay){ case "Quota Used": badgeContent = fB(data[i].usagemb,byteFormat,0)+''; break; case "Quota Remaining": badgeContent = fB(remaining,byteFormat,0)+''; break; case "Quota Remaining per day": badgeContent = dataperday+''; break; case "Percent Used": badgeContent = pc+'%'; break; case "Percent Remaining": badgeContent = 100-pc+'%'; break; case "Target": badgeContent = fB(data.target,byteFormat,0)+''; break; default: badgeContent = ''; } badge.text = badgeContent; chrome.browserAction.setBadgeText(badge); | function updateBadge(data) { if(!data) return; // Update the Chrome extension "badge" var badge = {}; var badgeDisplay = "Quota Used"; var remaining = (data[0].limit - data[0].usagemb); badgeDisplay = localStorage['badgeDisplay']; /* TODO: Show suffix on badge. Too complex for tonight and not really useful. var format = 'none'; //if (localStorage['formatData'] == 'formatted') { format = 'GB'; } //else { var suf = false; } */ switch(badgeDisplay){ case "Quota Used": badgeContent = fB(data[i].usagemb,byteFormat,0)+''; break; case "Quota Remaining": badgeContent = fB(remaining,byteFormat,0)+''; break; case "Quota Remaining per day": badgeContent = dataperday+''; break; case "Percent Used": badgeContent = pc+'%'; break; case "Percent Remaining": badgeContent = 100-pc+'%'; break; case "Target": badgeContent = fB(data.target,byteFormat,0)+''; break; default: badgeContent = ''; } badge.text = badgeContent; chrome.browserAction.setBadgeText(badge);} |
|
if (data) { Ext.Msg.alert("Created", "The set was updated in the database"); } else { Ext.Msg.alert("Error", "Could not updated. See the logs for details."); } | Ext.Msg.alert("Updated", "The set was updated in the database"); | var updateCallback = function(data) { if (data) { Ext.Msg.alert("Created", "The set was updated in the database"); } else { Ext.Msg.alert("Error", "Could not updated. See the logs for details."); } }.createDelegate(this); |
key = key.replace(/^\/db/, ""); | key = key.replace(/^\/db\ | function updateCollectionPaths(title, key) { key = key.replace(/^\/db/, ""); //search forms var form = $('#simple-search-form'); $('input[name = collection]', form).val(key); var form = $('#advanced-search-form'); $('input[name = collection]', form).val(key); //dialog collection paths $('span[id $= collection-path_]').text(title); $('input[id $= collection-path_]').val(key); // $('#collection-create-resource').attr("href", "../edit/edit.xq?type=book-chapter&collection=" + key);}; |
var restriction = $('#update-collection-permissions-form input[name = restriction]').val(); var userGroup = $('#update-collection-permissions-form input[name = userGroup]').val(); | var restriction = $('#update-collection-permissions-form input[name = restriction]:checked').val(); var userGroup = $('#update-collection-permissions-form select[name = userGroup]').val(); | function updateCollectionPermissions(dialog) { var restriction = $('#update-collection-permissions-form input[name = restriction]').val(); var userGroup = $('#update-collection-permissions-form input[name = userGroup]').val(); var collection = $('#simple-search-form input[name = collection]').val(); var params = { action: 'update-collection-permissions', restriction: restriction, userGroup: userGroup, collection: collection }; $.get("operations.xql", params, function (data) { $("#collection-tree-tree").dynatree("getRoot").reload(); dialog.dialog("close"); });} |
this.relayEvents(k, ['done']); | this.relayEvents(k, ['done', 'fail']); | updateEEReport : function(id, throbberEl) { var callParams = []; callParams.push(id); callParams.push({ callback : function(data) { var k = new Gemma.WaitHandler({ throbberEl : throbberEl }); this.relayEvents(k, ['done']); k.handleWait(data, false); k.on('done', function(payload) { this.fireEvent('reportUpdated', payload); }); }.createDelegate(this) }); ExpressionExperimentReportGenerationController.run.apply(this, callParams); }, |
updateEEReport : function(id) { | updateEEReport : function(id, throbberEl) { | updateEEReport : function(id) { var callParams = []; callParams.push(id); callParams.push({ callback : function(data) { var k = new Gemma.WaitHandler(); this.relayEvents(k, ['done']); k.handleWait(data, false); k.on('done', function(payload) { this.fireEvent('reportUpdated', payload); }); }.createDelegate(this) }); ExpressionExperimentReportGenerationController.run.apply(this, callParams); }, |
var k = new Gemma.WaitHandler(); | var k = new Gemma.WaitHandler({ throbberEl : throbberEl }); | updateEEReport : function(id) { var callParams = []; callParams.push(id); callParams.push({ callback : function(data) { var k = new Gemma.WaitHandler(); this.relayEvents(k, ['done']); k.handleWait(data, false); k.on('done', function(payload) { this.fireEvent('reportUpdated', payload); }); }.createDelegate(this) }); ExpressionExperimentReportGenerationController.run.apply(this, callParams); }, |
SecurityController.updateGeneGroup = function(p0, p1, callback) { dwr.engine._execute(SecurityController._path, 'SecurityController', 'updateGeneGroup', p0, p1, callback); | GeneSetController.updateGeneGroup = function(p0, p1, callback) { dwr.engine._execute(GeneSetController._path, 'GeneSetController', 'updateGeneGroup', p0, p1, callback); | SecurityController.updateGeneGroup = function(p0, p1, callback) { dwr.engine._execute(SecurityController._path, 'SecurityController', 'updateGeneGroup', p0, p1, callback);} |
GeneSetController.updateGeneGroup = function(p0, p1, callback) { dwr.engine._execute(GeneSetController._path, 'GeneSetController', 'updateGeneGroup', p0, p1, callback); | GeneSetController.updateGeneGroup = function(p0, p1, p2, callback) { dwr.engine._execute(GeneSetController._path, 'GeneSetController', 'updateGeneGroup', p0, p1,p2, callback); | GeneSetController.updateGeneGroup = function(p0, p1, callback) { dwr.engine._execute(GeneSetController._path, 'GeneSetController', 'updateGeneGroup', p0, p1, callback);} |
col.cellRule.style.width = col.getCellWidth() + "px"; | updateRule: function(column) { var col = this.getByName(column); if (col.options.renderMode === 'fit') { col.calculateWidth(); } col.rule.style.width = col.getWidth() + "px"; }, |
|
col.rule.style.width = col.getWidth(true) + "px"; | if (col.options.renderMode === 'fit') { col.calculateWidth(); } col.rule.style.width = col.getWidth() + "px"; | updateRule: function(column) { var col = this.getByName(column); col.rule.style.width = col.getWidth(true) + "px"; }, |
} | }; | Gemma.SecurityManager.updateSecurityLink = function(elid, isPublic, isShared) { var icon = isPublic ? '<img src="/Gemma/images/icons/lock_open2.png" alt="public"/>' : '<img src="/Gemma/images/icons/lock.png" alt="public"/>'; var sharedIcon = isShared ? '<img src="/Gemma/images/icons/group.png" alt="shared"/>' : ''; Ext.DomHelper.overwrite(elid, icon + ' ' + sharedIcon);} |
Gemma.SecurityManager.updateSecurityLink = function(elid, isPublic, isShared) { | Gemma.SecurityManager.updateSecurityLink = function(elid, clazz, id, isPublic, isShared, canEdit) { | Gemma.SecurityManager.updateSecurityLink = function(elid, isPublic, isShared) { var icon = isPublic ? '<img src="/Gemma/images/icons/lock_open2.png" ext:qtip="Public" alt="public"/>' : '<img src="/Gemma/images/icons/lock.png" ext:qtip="Private" alt="private"/>'; var sharedIcon = isShared ? '<img src="/Gemma/images/icons/group.png" ext:qtip="Shared" alt="shared"/>' : ''; Ext.DomHelper.overwrite(elid, icon + ' ' + sharedIcon);}; |
var icon = isPublic ? '<img src="/Gemma/images/icons/lock_open2.png" ext:qtip="Public" alt="public"/>' : '<img src="/Gemma/images/icons/lock.png" ext:qtip="Private" alt="private"/>'; | var newLink = Gemma.SecurityManager.getSecurityLink(clazz, id, isPublic, isShared, canEdit); | Gemma.SecurityManager.updateSecurityLink = function(elid, isPublic, isShared) { var icon = isPublic ? '<img src="/Gemma/images/icons/lock_open2.png" ext:qtip="Public" alt="public"/>' : '<img src="/Gemma/images/icons/lock.png" ext:qtip="Private" alt="private"/>'; var sharedIcon = isShared ? '<img src="/Gemma/images/icons/group.png" ext:qtip="Shared" alt="shared"/>' : ''; Ext.DomHelper.overwrite(elid, icon + ' ' + sharedIcon);}; |
var sharedIcon = isShared ? '<img src="/Gemma/images/icons/group.png" ext:qtip="Shared" alt="shared"/>' : ''; Ext.DomHelper.overwrite(elid, icon + ' ' + sharedIcon); | Ext.DomHelper.overwrite(elid, newLink); | Gemma.SecurityManager.updateSecurityLink = function(elid, isPublic, isShared) { var icon = isPublic ? '<img src="/Gemma/images/icons/lock_open2.png" ext:qtip="Public" alt="public"/>' : '<img src="/Gemma/images/icons/lock.png" ext:qtip="Private" alt="private"/>'; var sharedIcon = isShared ? '<img src="/Gemma/images/icons/group.png" ext:qtip="Shared" alt="shared"/>' : ''; Ext.DomHelper.overwrite(elid, icon + ' ' + sharedIcon);}; |
? '<img src="/Gemma/images/icons/lock_open2.png" alt="public"/>' : '<img src="/Gemma/images/icons/lock.png" alt="public"/>'; | ? '<img src="/Gemma/images/icons/lock_open2.png" ext:qtip="Public" alt="public"/>' : '<img src="/Gemma/images/icons/lock.png" ext:qtip="Private" alt="private"/>'; | Gemma.SecurityManager.updateSecurityLink = function(elid, isPublic, isShared) { var icon = isPublic ? '<img src="/Gemma/images/icons/lock_open2.png" alt="public"/>' : '<img src="/Gemma/images/icons/lock.png" alt="public"/>'; var sharedIcon = isShared ? '<img src="/Gemma/images/icons/group.png" alt="shared"/>' : ''; Ext.DomHelper.overwrite(elid, icon + ' ' + sharedIcon);}; |
var sharedIcon = isShared ? '<img src="/Gemma/images/icons/group.png" alt="shared"/>' : ''; | var sharedIcon = isShared ? '<img src="/Gemma/images/icons/group.png" ext:qtip="Shared" alt="shared"/>' : ''; | Gemma.SecurityManager.updateSecurityLink = function(elid, isPublic, isShared) { var icon = isPublic ? '<img src="/Gemma/images/icons/lock_open2.png" alt="public"/>' : '<img src="/Gemma/images/icons/lock.png" alt="public"/>'; var sharedIcon = isShared ? '<img src="/Gemma/images/icons/group.png" alt="shared"/>' : ''; Ext.DomHelper.overwrite(elid, icon + ' ' + sharedIcon);}; |
href : "http: + seq.sequenceDatabaseEntry.accession, | href : "http: seq.sequenceDatabaseEntry.accession, | updateSequenceInfo : function() { var dh = Ext.DomHelper; if (this.getStore().getCount() === 0) { // This shouldn't happen any more because we always return at least // a // dummy record holding the sequence dh.overwrite("probe-description", { tag : 'li', id : "probe-description", html : "Probe description: " + "[unavailable]" }); return; } var record = this.getStore().getAt(0); // Note this can be a dummy with no real blat result. var seq = record.get("blatResult").querySequence; var cs = record.get("compositeSequence"); if (cs !== null && Ext.get("probe-description")) { var csDesc = cs.description !== null ? cs.description : "[None provided]"; dh.overwrite("probe-description", { tag : 'li', id : "probe-description", html : "Probe description: " + csDesc, "ext:qtip" : "Provider's description, may not be accurate" }); } if (seq && Ext.get("sequence-info")) { dh.append("sequence-info", { tag : 'li', html : "Length: " + seq.length, "ext:qtip" : "Sequence length in bases" }); dh.append("sequence-info", { tag : 'li', html : "Type: " + seq.type.value, "ext:qtip" : "Sequence type as classified by Gemma" }); var repeatFrac = seq.fractionRepeats ? Math.round((seq.fractionRepeats * 1000) / 10) : 0; dh.append("sequence-info", { tag : 'li', html : "Repeat-masked bases: " + repeatFrac + "%", "ext:qtip" : "Percent bases masked by RepeatMasker" }); dh.append("sequence-info", { tag : 'li', html : "Sequence: <div ext:qtip='Bases in lower-case were masked by RepeatMasker' class='clob' style='margin:3px;height:30px;font-size:smaller;font-style:courier'>" + seq.sequence + "</div>" }); if (seq.sequenceDatabaseEntry && Ext.get("probe-sequence-name")) { dh.append("probe-sequence-name", { tag : 'a', id : "ncbiLink", target : "_blank", title : "view at NCBI", href : "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=Nucleotide&cmd=search&term=" + seq.sequenceDatabaseEntry.accession, html : "<img src ='" + Gemma.NCBI_ICON + "'/>", "ext:qtip" : "View sequence at NCBI" }); } } } |
$('#group-sharing-premissions-read').get(0).checked = true; | $('#group-sharing-permissions-read').get(0).checked = true; | function updateSharingGroupCheckboxes(groupId) { //set the read/write checkboxes var collection = getCurrentCollection(); var params = { action: "get-group-permissions", groupId: groupId, collection: collection }; $.get("operations.xql", params, function(data) { //set read checkbox var readPermissions = $(data).find('read'); if(readPermissions.size() == 1){ //$('#group-sharing-premissions-read').attr('checked','checked'); $('#group-sharing-premissions-read').get(0).checked = true; } else { //$('#group-sharing-premissions-read').removeAttr('checked'); $('#group-sharing-premissions-read').get(0).checked = false; } //set write checkbox var writePermissions = $(data).find('write'); if(writePermissions.size() == 1){ //$('#group-sharing-premissions-write').attr('checked','checked'); $('#group-sharing-premissions-write').get(0).checked = true; } else { //$('#group-sharing-premissions-write').removeAttr('checked'); $('#group-sharing-premissions-write').get(0).checked = false; } //set sharing checkbox if(readPermissions.size() + writePermissions.size() >= 1) { //$('#sharing-collection-with-group').attr('checked','checked'); $('#sharing-collection-with-group').get(0).checked = true; //$('#group-sharing-panel').show(); } else { //$('#sharing-collection-with-group').removeAttr('checked'); $('#sharing-collection-with-group').get(0).checked = false; //$('#group-sharing-panel').hide(); } });} |
$('#group-sharing-premissions-read').get(0).checked = false; | $('#group-sharing-permissions-read').get(0).checked = false; | function updateSharingGroupCheckboxes(groupId) { //set the read/write checkboxes var collection = getCurrentCollection(); var params = { action: "get-group-permissions", groupId: groupId, collection: collection }; $.get("operations.xql", params, function(data) { //set read checkbox var readPermissions = $(data).find('read'); if(readPermissions.size() == 1){ //$('#group-sharing-premissions-read').attr('checked','checked'); $('#group-sharing-premissions-read').get(0).checked = true; } else { //$('#group-sharing-premissions-read').removeAttr('checked'); $('#group-sharing-premissions-read').get(0).checked = false; } //set write checkbox var writePermissions = $(data).find('write'); if(writePermissions.size() == 1){ //$('#group-sharing-premissions-write').attr('checked','checked'); $('#group-sharing-premissions-write').get(0).checked = true; } else { //$('#group-sharing-premissions-write').removeAttr('checked'); $('#group-sharing-premissions-write').get(0).checked = false; } //set sharing checkbox if(readPermissions.size() + writePermissions.size() >= 1) { //$('#sharing-collection-with-group').attr('checked','checked'); $('#sharing-collection-with-group').get(0).checked = true; //$('#group-sharing-panel').show(); } else { //$('#sharing-collection-with-group').removeAttr('checked'); $('#sharing-collection-with-group').get(0).checked = false; //$('#group-sharing-panel').hide(); } });} |
$('#group-sharing-premissions-write').get(0).checked = true; | $('#group-sharing-permissions-write').get(0).checked = true; | function updateSharingGroupCheckboxes(groupId) { //set the read/write checkboxes var collection = getCurrentCollection(); var params = { action: "get-group-permissions", groupId: groupId, collection: collection }; $.get("operations.xql", params, function(data) { //set read checkbox var readPermissions = $(data).find('read'); if(readPermissions.size() == 1){ //$('#group-sharing-premissions-read').attr('checked','checked'); $('#group-sharing-premissions-read').get(0).checked = true; } else { //$('#group-sharing-premissions-read').removeAttr('checked'); $('#group-sharing-premissions-read').get(0).checked = false; } //set write checkbox var writePermissions = $(data).find('write'); if(writePermissions.size() == 1){ //$('#group-sharing-premissions-write').attr('checked','checked'); $('#group-sharing-premissions-write').get(0).checked = true; } else { //$('#group-sharing-premissions-write').removeAttr('checked'); $('#group-sharing-premissions-write').get(0).checked = false; } //set sharing checkbox if(readPermissions.size() + writePermissions.size() >= 1) { //$('#sharing-collection-with-group').attr('checked','checked'); $('#sharing-collection-with-group').get(0).checked = true; //$('#group-sharing-panel').show(); } else { //$('#sharing-collection-with-group').removeAttr('checked'); $('#sharing-collection-with-group').get(0).checked = false; //$('#group-sharing-panel').hide(); } });} |
$('#group-sharing-premissions-write').get(0).checked = false; | $('#group-sharing-permissions-write').get(0).checked = false; | function updateSharingGroupCheckboxes(groupId) { //set the read/write checkboxes var collection = getCurrentCollection(); var params = { action: "get-group-permissions", groupId: groupId, collection: collection }; $.get("operations.xql", params, function(data) { //set read checkbox var readPermissions = $(data).find('read'); if(readPermissions.size() == 1){ //$('#group-sharing-premissions-read').attr('checked','checked'); $('#group-sharing-premissions-read').get(0).checked = true; } else { //$('#group-sharing-premissions-read').removeAttr('checked'); $('#group-sharing-premissions-read').get(0).checked = false; } //set write checkbox var writePermissions = $(data).find('write'); if(writePermissions.size() == 1){ //$('#group-sharing-premissions-write').attr('checked','checked'); $('#group-sharing-premissions-write').get(0).checked = true; } else { //$('#group-sharing-premissions-write').removeAttr('checked'); $('#group-sharing-premissions-write').get(0).checked = false; } //set sharing checkbox if(readPermissions.size() + writePermissions.size() >= 1) { //$('#sharing-collection-with-group').attr('checked','checked'); $('#sharing-collection-with-group').get(0).checked = true; //$('#group-sharing-panel').show(); } else { //$('#sharing-collection-with-group').removeAttr('checked'); $('#sharing-collection-with-group').get(0).checked = false; //$('#group-sharing-panel').hide(); } });} |
var params = { action: "get-sharing-group-members", groupId: groupId }; $.get("operations.xql", params, function(data) { | if(groupId){ var params = { action: "get-sharing-group-members", groupId: groupId }; $.get("operations.xql", params, function(data) { $('#group-members-list').find('li').remove(); | function updateSharingGroupMembers(groupId) { var params = { action: "get-sharing-group-members", groupId: groupId }; $.get("operations.xql", params, function(data) { //remove any existing members $('#group-members-list').find('li').remove(); var owner = false; if($(data).find('owner true').size() == 1) { owner = true; $('#add-new-member-to-group-button').show(); } else if($('#group-list :selected').val() == $('#group-list :selected').text()) { owner = true; //this is a new group i.e. we own it! $('#add-new-member-to-group-button').show(); } else { $('#add-new-member-to-group-button').hide(); } //add new members $(data).find('member').each(function(){ addMemberToSharingGroupMembers($(this).text(), owner); }); }); updateSharingGroupCheckboxes(groupId);} |
$('#group-members-list').find('li').remove(); var owner = false; if($(data).find('owner true').size() == 1) { owner = true; $('#add-new-member-to-group-button').show(); } else if($('#group-list :selected').val() == $('#group-list :selected').text()) { owner = true; $('#add-new-member-to-group-button').show(); } else { $('#add-new-member-to-group-button').hide(); } $(data).find('member').each(function(){ addMemberToSharingGroupMembers($(this).text(), owner); | var owner = false; if($(data).find('owner true').size() == 1) { owner = true; $('#add-new-member-to-group-button').show(); } else if($('#group-list :selected').val() == $('#group-list :selected').text()) { owner = true; $('#add-new-member-to-group-button').show(); } else { $('#add-new-member-to-group-button').hide(); } $(data).find('member').each(function(){ addMemberToSharingGroupMembers($(this).text(), owner); }); | function updateSharingGroupMembers(groupId) { var params = { action: "get-sharing-group-members", groupId: groupId }; $.get("operations.xql", params, function(data) { //remove any existing members $('#group-members-list').find('li').remove(); var owner = false; if($(data).find('owner true').size() == 1) { owner = true; $('#add-new-member-to-group-button').show(); } else if($('#group-list :selected').val() == $('#group-list :selected').text()) { owner = true; //this is a new group i.e. we own it! $('#add-new-member-to-group-button').show(); } else { $('#add-new-member-to-group-button').hide(); } //add new members $(data).find('member').each(function(){ addMemberToSharingGroupMembers($(this).text(), owner); }); }); updateSharingGroupCheckboxes(groupId);} |
}); updateSharingGroupCheckboxes(groupId); | updateSharingGroupCheckboxes(groupId); } | function updateSharingGroupMembers(groupId) { var params = { action: "get-sharing-group-members", groupId: groupId }; $.get("operations.xql", params, function(data) { //remove any existing members $('#group-members-list').find('li').remove(); var owner = false; if($(data).find('owner true').size() == 1) { owner = true; $('#add-new-member-to-group-button').show(); } else if($('#group-list :selected').val() == $('#group-list :selected').text()) { owner = true; //this is a new group i.e. we own it! $('#add-new-member-to-group-button').show(); } else { $('#add-new-member-to-group-button').hide(); } //add new members $(data).find('member').each(function(){ addMemberToSharingGroupMembers($(this).text(), owner); }); }); updateSharingGroupCheckboxes(groupId);} |
$('#other-sharing-premissions-read').get(0).checked = true; | $('#other-sharing-permissions-read').get(0).checked = true; | function updateSharingOtherCheckboxes() { //set the read/write checkboxes var collection = getCurrentCollection(); var params = { action: "get-other-permissions", collection: collection }; $.get("operations.xql", params, function(data) { //set read checkbox var readPermissions = $(data).find('read'); if(readPermissions.size() == 1){ $('#other-sharing-premissions-read').get(0).checked = true; } else { $('#other-sharing-premissions-read').get(0).checked = false; } //set write checkbox var writePermissions = $(data).find('write'); if(writePermissions.size() == 1){ $('#other-sharing-premissions-write').get(0).checked = true; } else { $('#other-sharing-premissions-write').get(0).checked = false; } //set sharing checkbox if(readPermissions.size() + writePermissions.size() >= 1) { $('#sharing-collection-with-other').get(0).checked = true; //$('#other-sharing-panel').show(); } else { $('#sharing-collection-with-other').get(0).checked = false; //$('#other-sharing-panel').hide(); } });} |
$('#other-sharing-premissions-read').get(0).checked = false; | $('#other-sharing-permissions-read').get(0).checked = false; | function updateSharingOtherCheckboxes() { //set the read/write checkboxes var collection = getCurrentCollection(); var params = { action: "get-other-permissions", collection: collection }; $.get("operations.xql", params, function(data) { //set read checkbox var readPermissions = $(data).find('read'); if(readPermissions.size() == 1){ $('#other-sharing-premissions-read').get(0).checked = true; } else { $('#other-sharing-premissions-read').get(0).checked = false; } //set write checkbox var writePermissions = $(data).find('write'); if(writePermissions.size() == 1){ $('#other-sharing-premissions-write').get(0).checked = true; } else { $('#other-sharing-premissions-write').get(0).checked = false; } //set sharing checkbox if(readPermissions.size() + writePermissions.size() >= 1) { $('#sharing-collection-with-other').get(0).checked = true; //$('#other-sharing-panel').show(); } else { $('#sharing-collection-with-other').get(0).checked = false; //$('#other-sharing-panel').hide(); } });} |
$('#other-sharing-premissions-write').get(0).checked = true; | $('#other-sharing-permissions-write').get(0).checked = true; | function updateSharingOtherCheckboxes() { //set the read/write checkboxes var collection = getCurrentCollection(); var params = { action: "get-other-permissions", collection: collection }; $.get("operations.xql", params, function(data) { //set read checkbox var readPermissions = $(data).find('read'); if(readPermissions.size() == 1){ $('#other-sharing-premissions-read').get(0).checked = true; } else { $('#other-sharing-premissions-read').get(0).checked = false; } //set write checkbox var writePermissions = $(data).find('write'); if(writePermissions.size() == 1){ $('#other-sharing-premissions-write').get(0).checked = true; } else { $('#other-sharing-premissions-write').get(0).checked = false; } //set sharing checkbox if(readPermissions.size() + writePermissions.size() >= 1) { $('#sharing-collection-with-other').get(0).checked = true; //$('#other-sharing-panel').show(); } else { $('#sharing-collection-with-other').get(0).checked = false; //$('#other-sharing-panel').hide(); } });} |
$('#other-sharing-premissions-write').get(0).checked = false; | $('#other-sharing-permissions-write').get(0).checked = false; | function updateSharingOtherCheckboxes() { //set the read/write checkboxes var collection = getCurrentCollection(); var params = { action: "get-other-permissions", collection: collection }; $.get("operations.xql", params, function(data) { //set read checkbox var readPermissions = $(data).find('read'); if(readPermissions.size() == 1){ $('#other-sharing-premissions-read').get(0).checked = true; } else { $('#other-sharing-premissions-read').get(0).checked = false; } //set write checkbox var writePermissions = $(data).find('write'); if(writePermissions.size() == 1){ $('#other-sharing-premissions-write').get(0).checked = true; } else { $('#other-sharing-premissions-write').get(0).checked = false; } //set sharing checkbox if(readPermissions.size() + writePermissions.size() >= 1) { $('#sharing-collection-with-other').get(0).checked = true; //$('#other-sharing-panel').show(); } else { $('#sharing-collection-with-other').get(0).checked = false; //$('#other-sharing-panel').hide(); } });} |
jSpan.html($.i18n._('can write') + | jSpan.html($.i18n._('can write') + ' ' + | updateTextCounter: function(textarea) { var length = textarea.value ? textarea.value.length : 0; var length1 = maxCommentLength - 100; if (length1 < 0){ length1 = Math.round(0.7*maxCommentLength); } var length2 = maxCommentLength - 30; if (length2 < 0){ length2 = Math.round(0.9*maxCommentLength); } var color = length > length2 ? "#f00" : length > length1 ? "#f60" : "#999"; var jSpan = $(textarea).siblings("span.text-counter"); jSpan.html($.i18n._('can write') + (maxCommentLength - length) + ' ' + $.i18n._('characters')).css("color", color); } |
var host = location.host + (location.port ? ':' + location.port : ''); | var host = location.host; | updateUI: function() { //file urls. var furl = imce.conf.furl, isabs = furl.indexOf('://') > -1; var absurls = imce.conf.absurls = imce.vars.absurls || imce.conf.absurls; var host = location.host + (location.port ? ':' + location.port : ''); var baseurl = location.protocol + '//' + host; if (furl.charAt(furl.length - 1) != '/') { furl += '/'; } imce.conf.modfix = imce.conf.clean && furl.indexOf(host + '/system/') > -1; if (absurls && !isabs) { imce.conf.furl = baseurl + furl; } else if (!absurls && isabs && furl.indexOf(baseurl) == 0) { imce.conf.furl = furl.substr(baseurl.length); } //convert button elements to input elements. imce.convertButtons(imce.el('forms-wrapper')); //ops-list $('#ops-list').removeClass('tabs secondary').addClass('clear-block clearfix'); imce.opCloseLink = $(imce.newEl('a')).attr({id: 'op-close-link', href: '#', title: Drupal.t('Close')}).click(function() { imce.vars.op && imce.opClick(imce.vars.op); return false; }).appendTo('#op-contents')[0]; //navigation-header if (!$('#navigation-header').size()) { $('#navigation-wrapper > .navigation-text').attr('id', 'navigation-header').wrapInner('<span></span>'); } //log $('#log-prv-wrapper').before($('#log-prv-wrapper > #preview-wrapper')).remove(); $('#log-clearer').remove(); //content resizer $('#content-resizer').remove(); //message-box imce.msgBox = imce.el('message-box') || $('<div id="message-box"></div>').prependTo('#imce-content')[0]; //help box & ie fix var $hbox = $('#help-box'); $hbox.is('a') && $hbox.replaceWith($(imce.newEl('div')).attr('id', 'help-box').append($hbox.children())); var $htitle = $('#help-box-title'); if ($.browser.msie) { $('html').addClass('ie'); if (parseFloat($.browser.version) < 8) { var $hcontent = $('#help-box-content'); $hcontent.add($htitle).hover(function() { $hcontent.addClass('hover'); }, function() { $hcontent.removeClass('hover'); }); $('html').addClass('ie-7'); } } !$htitle.children('span').size() && $htitle.wrapInner('<span></span>'); //scrolling file list imce.syncScroll(imce.SBW, '#file-header-wrapper'); imce.syncScroll(imce.SBW, '#dir-stat', true); //scrolling directory tree imce.syncScroll('#navigation-wrapper', '#navigation-header');} |
var cellText = tree.view.getCellText(row.value, col.value); if (col.value.id == 'buildmonitor-prefs-feeds-remove' && !treeFeeds[row.value].isIgnored()) { this._removeFeed(row.value); } else if (col.value.id == 'buildmonitor-prefs-feeds-up' && !treeFeeds[row.value].isIgnored() && row.value > 0) { this._swapFeeds(row.value - 1, row.value); } else if (col.value.id == 'buildmonitor-prefs-feeds-down' && !treeFeeds[row.value].isIgnored() && row.value < NUM_OF_FEEDS - 1) { this._swapFeeds(row.value, row.value + 1); | if (row.value != null && col.value != null) { var cellText = tree.view.getCellText(row.value, col.value); if (col.value.id == 'buildmonitor-prefs-feeds-remove' && !treeFeeds[row.value].isIgnored()) { this._removeFeed(row.value); } else if (col.value.id == 'buildmonitor-prefs-feeds-up' && !treeFeeds[row.value].isIgnored() && row.value > 0) { this._swapFeeds(row.value - 1, row.value); } else if (col.value.id == 'buildmonitor-prefs-feeds-down' && !treeFeeds[row.value].isIgnored() && row.value < NUM_OF_FEEDS - 1) { this._swapFeeds(row.value, row.value + 1); } | updateView: function(event) { var tree = document.getElementById('buildmonitor-prefs-feeds'); var tbo = tree.treeBoxObject; var row = { }, col = { }, child = { }; tbo.getCellAt(event.clientX, event.clientY, row, col, child); var cellText = tree.view.getCellText(row.value, col.value); if (col.value.id == 'buildmonitor-prefs-feeds-remove' && !treeFeeds[row.value].isIgnored()) { this._removeFeed(row.value); } else if (col.value.id == 'buildmonitor-prefs-feeds-up' && !treeFeeds[row.value].isIgnored() && row.value > 0) { this._swapFeeds(row.value - 1, row.value); } else if (col.value.id == 'buildmonitor-prefs-feeds-down' && !treeFeeds[row.value].isIgnored() && row.value < NUM_OF_FEEDS - 1) { this._swapFeeds(row.value, row.value + 1); } }, |
function upload_add_link(e) { | this.upload_add_link = function (e) { | function upload_add_link(e) { var ext = this.value.replace(/^(.*)(\..+)$/, "$2"); var img_exts = new Array('.png', '.jpg', '.jpeg', '.bmp', '.gif', '.tiff', '.tif'); var is_img = false; var check_add = document.getElementById("adduploadlink"); if (check_add && ! check_add.checked) return false; for (i=0; i< img_exts.length; i++) { if (img_exts[i] == ext) { is_img = true; break; } } var components = new Array(); var splitchar = ''; if (this.value.indexOf("\\") > 0 && this.value.indexOf("/") < 0) { splitchar = "\\"; } else { splitchar = "/"; } components = this.value.split(splitchar); var fname = components[components.length - 1]; var prompt_text = false; // Prompt user for descriptive text. // The alternative is just using the filename. if (prompt_text) { if (is_img) { var res = window.prompt(strings.get('editor_addImageDesc', this.value)); } else { var res = window.prompt(strings.get('editor_addLinkDesc', this.value)); } } else { res = fname; } if (res) { var body = document.getElementById('body'); if (is_img) { if (document.getElementById('input_mode').value == 1) { lnblog.insertAtCursor(body, '[img='+fname+']'+res+'[/img]'); } else { lnblog.insertAtCursor(body, "<img src=\""+fname+"\" alt=\""+res+"\" title=\""+res+"\" />"); } } else { if (document.getElementById('input_mode').value == 1) { lnblog.insertAtCursor(body, '[url='+fname+']'+res+'[/url]'); } else { lnblog.insertAtCursor(body, "<a href=\""+fname+"\">"+res+"</a>"); } } } } |
return false; | function upload_add_link(e) { var ext = this.value.replace(/^(.*)(\..+)$/, "$2"); var img_exts = new Array('.png', '.jpg', '.jpeg', '.bmp', '.gif', '.tiff', '.tif'); var is_img = false; var check_add = document.getElementById("adduploadlink"); if (check_add && ! check_add.checked) return false; for (i=0; i< img_exts.length; i++) { if (img_exts[i] == ext) { is_img = true; break; } } var components = new Array(); var splitchar = ''; if (this.value.indexOf("\\") > 0 && this.value.indexOf("/") < 0) { splitchar = "\\"; } else { splitchar = "/"; } components = this.value.split(splitchar); var fname = components[components.length - 1]; var prompt_text = false; // Prompt user for descriptive text. // The alternative is just using the filename. if (prompt_text) { if (is_img) { var res = window.prompt(strings.get('editor_addImageDesc', this.value)); } else { var res = window.prompt(strings.get('editor_addLinkDesc', this.value)); } } else { res = fname; } if (res) { var body = document.getElementById('body'); if (is_img) { if (document.getElementById('input_mode').value == 1) { lnblog.insertAtCursor(body, '[img='+fname+']'+res+'[/img]'); } else { lnblog.insertAtCursor(body, "<img src=\""+fname+"\" alt=\""+res+"\" title=\""+res+"\" />"); } } else { if (document.getElementById('input_mode').value == 1) { lnblog.insertAtCursor(body, '[url='+fname+']'+res+'[/url]'); } else { lnblog.insertAtCursor(body, "<a href=\""+fname+"\">"+res+"</a>"); } } } } |
|
(function(c,j){c.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:{my:"center",at:"center",of:window,collision:"fit",using:function(a){var b=c(this).css(a).offset().top;b<0&&c(this).css("top",a.top-b)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title"); | g}})}else if(typeof a==="object"){if("left"in a){b[0]="left";d[0]=a.left}else if("right"in a){b[0]="right";d[0]=-a.right}if("top"in a){b[1]="top";d[1]=a.top}else if("bottom"in a){b[1]="bottom";d[1]=-a.bottom}}(a=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position({my:b.join(" "),at:b.join(" "),offset:d.join(" "),of:window,collision:"fit",using:function(e){var g=c(this).css(e).offset().top;g<0&&c(this).css("top",e.top-g)}});a||this.uiDialog.hide()},_setOption:function(a, | (function(c,j){c.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:{my:"center",at:"center",of:window,collision:"fit",using:function(a){var b=c(this).css(a).offset().top;b<0&&c(this).css("top",a.top-b)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title"); |
var previous = this.base || Base.prototype.base; | var previous = this.base || name_edwards_dean_Base.prototype.base; | value = function() { var previous = this.base || Base.prototype.base; this.base = ancestor; var returnValue = method.apply(this, arguments); this.base = previous; return returnValue; }; |
if($('#verplot1plot').val() == null) $('#verplot1plot').val(2); loadVerPlot1(); loadVerPlot2(); | function verReplot() { } |
|
var playText = Drupal.theme.prototype['viewsSlideshowControlsPlay'] ? Drupal.theme('viewsSlideshowControlsPlay') : ''; $(this).text(playText); viewsSlideshowPlay(uniqueID, 'views_slideshow_controls'); | viewsSlideshowPlay(uniqueID, ''); | Drupal.behaviors.viewsSlideshow = function (context) { // Process previous link $('.views_slideshow_controls_previous:not(.views-slideshow-controls-previous-processed)', context).addClass('views-slideshow-controls-previous-processed').each(function() { var uniqueID = $(this).attr('id').replace('views_slideshow_controls_previous_', ''); $(this).click(function() { viewsSlideshowPreviousSlide(uniqueID, 'views_slideshow_controls'); return false; }); }); // Process next link $('.views_slideshow_controls_next:not(.views-slideshow-controls-next-processed)', context).addClass('views-slideshow-controls-next-processed').each(function() { var uniqueID = $(this).attr('id').replace('views_slideshow_controls_next_', ''); $(this).click(function() { viewsSlideshowNextSlide(uniqueID, 'views_slideshow_controls'); return false; }); }); // Process pause link $('.views_slideshow_controls_pause:not(.views-slideshow-controls-pause-processed)', context).addClass('views-slideshow-controls-pause-processed').each(function() { var uniqueID = $(this).attr('id').replace('views_slideshow_controls_pause_', ''); $(this).click(function() { if (Drupal.settings.viewsSlideshow[uniqueID].paused) { var playText = Drupal.theme.prototype['viewsSlideshowControlsPlay'] ? Drupal.theme('viewsSlideshowControlsPlay') : ''; $(this).text(playText); viewsSlideshowPlay(uniqueID, 'views_slideshow_controls'); } else { var pauseText = Drupal.theme.prototype['viewsSlideshowControlsPause'] ? Drupal.theme('viewsSlideshowControlsPause') : ''; $(this).text(pauseText); viewsSlideshowPause(uniqueID, 'views_slideshow_controls'); } return false; }); });} |
var pauseText = Drupal.theme.prototype['viewsSlideshowControlsPause'] ? Drupal.theme('viewsSlideshowControlsPause') : ''; $(this).text(pauseText); viewsSlideshowPause(uniqueID, 'views_slideshow_controls'); | viewsSlideshowPause(uniqueID, ''); | Drupal.behaviors.viewsSlideshow = function (context) { // Process previous link $('.views_slideshow_controls_previous:not(.views-slideshow-controls-previous-processed)', context).addClass('views-slideshow-controls-previous-processed').each(function() { var uniqueID = $(this).attr('id').replace('views_slideshow_controls_previous_', ''); $(this).click(function() { viewsSlideshowPreviousSlide(uniqueID, 'views_slideshow_controls'); return false; }); }); // Process next link $('.views_slideshow_controls_next:not(.views-slideshow-controls-next-processed)', context).addClass('views-slideshow-controls-next-processed').each(function() { var uniqueID = $(this).attr('id').replace('views_slideshow_controls_next_', ''); $(this).click(function() { viewsSlideshowNextSlide(uniqueID, 'views_slideshow_controls'); return false; }); }); // Process pause link $('.views_slideshow_controls_pause:not(.views-slideshow-controls-pause-processed)', context).addClass('views-slideshow-controls-pause-processed').each(function() { var uniqueID = $(this).attr('id').replace('views_slideshow_controls_pause_', ''); $(this).click(function() { if (Drupal.settings.viewsSlideshow[uniqueID].paused) { var playText = Drupal.theme.prototype['viewsSlideshowControlsPlay'] ? Drupal.theme('viewsSlideshowControlsPlay') : ''; $(this).text(playText); viewsSlideshowPlay(uniqueID, 'views_slideshow_controls'); } else { var pauseText = Drupal.theme.prototype['viewsSlideshowControlsPause'] ? Drupal.theme('viewsSlideshowControlsPause') : ''; $(this).text(pauseText); viewsSlideshowPause(uniqueID, 'views_slideshow_controls'); } return false; }); });} |
$('.views_slideshow_pager_field:not(.views-slideshow-pager-field-processed)', context).addClass('views-slideshow-pager-field-processed').each(function() { var pagerInfo = $(this).attr('id').split('_'); var location = pagerInfo[2]; pagerInfo.splice(0, 3); var uniqueID = pagerInfo.join('_'); if (Drupal.settings.viewsSlideshowPagerFields[uniqueID][location].activatePauseOnHover) { $(this).children().each(function(index, pagerItem) { $(pagerItem).hover(function() { viewsSlideshowGoToSlide(uniqueID, '', index); viewsSlideshowPause(uniqueID, ''); }, function() { viewsSlideshowPlay(uniqueID, ''); }); }); } }); | Drupal.behaviors.viewsSlideshow = function (context) { // Process previous link $('.views_slideshow_controls_previous:not(.views-slideshow-controls-previous-processed)', context).addClass('views-slideshow-controls-previous-processed').each(function() { var uniqueID = $(this).attr('id').replace('views_slideshow_controls_previous_', ''); $(this).click(function() { viewsSlideshowPreviousSlide(uniqueID, 'views_slideshow_controls'); return false; }); }); // Process next link $('.views_slideshow_controls_next:not(.views-slideshow-controls-next-processed)', context).addClass('views-slideshow-controls-next-processed').each(function() { var uniqueID = $(this).attr('id').replace('views_slideshow_controls_next_', ''); $(this).click(function() { viewsSlideshowNextSlide(uniqueID, 'views_slideshow_controls'); return false; }); }); // Process pause link $('.views_slideshow_controls_pause:not(.views-slideshow-controls-pause-processed)', context).addClass('views-slideshow-controls-pause-processed').each(function() { var uniqueID = $(this).attr('id').replace('views_slideshow_controls_pause_', ''); $(this).click(function() { if (Drupal.settings.viewsSlideshow[uniqueID].paused) { var playText = Drupal.theme.prototype['viewsSlideshowControlsPlay'] ? Drupal.theme('viewsSlideshowControlsPlay') : ''; $(this).text(playText); viewsSlideshowPlay(uniqueID, 'views_slideshow_controls'); } else { var pauseText = Drupal.theme.prototype['viewsSlideshowControlsPause'] ? Drupal.theme('viewsSlideshowControlsPause') : ''; $(this).text(pauseText); viewsSlideshowPause(uniqueID, 'views_slideshow_controls'); } return false; }); });} |
|
if (settings.controls > 0) { | if (settings.controls != 0) { | viewsSlideshowCyclePause = function (settings) { // Make Resume translatable var resume = Drupal.t('Resume'); $(settings.targetId).cycle('pause'); if (settings.controls > 0) { $('#views_slideshow_cycle_playpause_' + settings.vss_id) .addClass('views_slideshow_cycle_play') .addClass('views_slideshow_play') .removeClass('views_slideshow_cycle_pause') .removeClass('views_slideshow_pause') .text(resume); } settings.paused = true;} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.