rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
getColumnCount : function () { return this.columns.length; | getColumnCount : function (noHidden) { noHidden = $defined(noHidden) ? false : true; var total = this.columns.length; if (noHidden) { this.columns.each(function(col){ if (col.isHidden()) { total -= 1; } },this); } return total; | getColumnCount : function () { return this.columns.length; }, |
$.getJSON(scriptUrl + objectType + "s/" + id + "/" + $.i18n._("comments/"), | $.getJSON(scriptUrl + $.i18n._(objectType + "s/") + id + "/" + $.i18n._("comments/"), | var getComments = function(id, jDiv) { //appendLoaderImg(id); $.getJSON(scriptUrl + objectType + "s/" + id + "/" + $.i18n._("comments/"), function(json) { showComments(id, json); }); }; |
getContainerSize: function() { return this.currentSize; }, | getContainerSize: function() { return this.currentSize; }.bind(this), | getContainerSize: function() { return this.currentSize; }, |
$('#simple-search-form input[name = collection]').val(); | return $('#simple-search-form input[name = collection]').val(); | function getCurrentCollection() { $('#simple-search-form input[name = collection]').val();} |
this.log("Using input value: " + input); | getCurrentTextValue: function() { var input = $.trim(this.input.val()); this.log("Using input value: " + input); return input; }, |
|
var ONE_MONTH = 2678400000; | function getDaysRemaining(plandate) { var ONE_DAY = 86400000; var ONE_MONTH = 2678400000; var startDate = new Date(plandate); var endDate = new Date(startDate.getTime() + ONE_MONTH); var currDate = new Date(); currDate.setHours(0); currDate.setMinutes(0); currDate.setSeconds(0); var dayRemain = Math.ceil((endDate.getTime() - currDate.getTime()) / ONE_DAY); return dayRemain;} |
|
var currDate = new Date(); currDate.setHours(0); currDate.setMinutes(0); currDate.setSeconds(0); | var endDate = new Date( startDate.getFullYear(), startDate.getMonth() + 1, startDate.getDate()); var currDate = new Date(); currDate.setHours(0); currDate.setMinutes(0); currDate.setSeconds(0); | function getDaysRemaining(plandate) { var ONE_DAY = 86400000; var ONE_MONTH = 2678400000; var startDate = new Date(plandate); var endDate = new Date(startDate.getTime() + ONE_MONTH); var currDate = new Date(); currDate.setHours(0); currDate.setMinutes(0); currDate.setSeconds(0); var dayRemain = Math.ceil((endDate.getTime() - currDate.getTime()) / ONE_DAY); return dayRemain;} |
return this.service.getBoolean('hudson.debug'); | return this.service.getBoolean('extensions.hudson.buildmonitor.debug'); | getDebug: function() { return this.service.getBoolean('hudson.debug'); }, |
return this.name + ' - ' + prettyDateUTC(this.date); | return this.name + ' - ' + org_ejohn_prettyDateUTC(this.date); | getDetails: function() { return this.name + ' - ' + prettyDateUTC(this.date); }, |
if (onSuccessFn) onSuccessFn(r.getResult().Items); | if (onSuccessFn) onSuccessFn(r.Items); | getDifferencesFromSet: function(id, setIds, onSuccessFn, onErrorFn) { this.gateway.postToService('GetDifferencesFromSet', { Id: id || null, SetIds: setIds || null }, function(r) { if (onSuccessFn) onSuccessFn(r.getResult().Items); }, onErrorFn || RedisClient.errorFn); }, |
return; } if(this.systemArea != 'team') { this.log("*** getDoNotDisturb *** systemArea does not support DND ***"); | getDoNotDisturb: function() { this.log("*** getDoNotDisturb *** BEGIN ***"); if (!this.isLoggedIn) { this.log("*** getDoNotDisturb *** USER NOT LOGGED IN ***"); return; } var result = function(ourParsedResponse, aXML){ dumpJson(ourParsedResponse); if (ourParsedResponse.StatusCode && ourParsedResponse.StatusCode == 200) { _sgffx.DND = ourParsedResponse.DND; _sgffx.showDoNotDisturb(); } else { _sgffx.log("getDoNotDisturb failed toSTRING: "+ aXML.toString()); } var delay = _sgffx.recommendedIntervals["samurai.DoNotDisturbGet"]; _sgffx.getDoNotDisturbTimer.initWithCallback({ notify: function(timer) { _sgffx.getDoNotDisturb(); } }, delay * 1000, Components.interfaces.nsITimer.TYPE_ONE_SHOT); _sgffx.log("getDoNotDisturb: polling enabled. set to " + delay + " seconds"); }; try { this._rpcCall("samurai.DoNotDisturbGet", {}, result); } catch(e) { this.log('Exception in xmlrpc-request: ' + e); this.log('Request sent: ' + request); } this.log("*** getDoNotDisturb *** END ***"); }, |
|
var sheet = new Element('style').set('type', 'text/css').set('title', name).inject(document.head); | var sheet = new Element('style').set('type', 'text/css').inject(document.head); | getDynamicStyleSheet: function (name) { name = (name) ? name : 'default'; if (!this.dynamicStyleMap.has(name)) { var sheet = new Element('style').set('type', 'text/css').set('title', name).inject(document.head); sheet.indicies = []; this.dynamicStyleMap.set(name, sheet); } return this.dynamicStyleMap.get(name); }, |
Gemma.ProbeLevelDiffExGrid.eeNameTemplate = new Ext.Template("<tpl for='.'><a target='_blank' title='{name}' href='/Gemma/expressionExperiment/showExpressionExperiment.html?id={id}' ext:qtip='{name}'>{shortName}</a></tpl>"); | Gemma.ProbeLevelDiffExGrid.eeNameTemplate = new Ext.XTemplate( '<tpl for="."><a target="_blank" title="{name}" href="/Gemma/expressionExperiment/showExpressionExperiment.html?id=', '{[values.sourceExperiment ? values.sourceExperiment : values.id]}"', ' ext:qtip="{name}">{shortName}</a></tpl>'); | Gemma.ProbeLevelDiffExGrid.getEEStyler = function() { if (Gemma.ProbeLevelDiffExGrid.eeNameStyler === undefined) { Gemma.ProbeLevelDiffExGrid.eeNameTemplate = new Ext.Template("<tpl for='.'><a target='_blank' title='{name}' href='/Gemma/expressionExperiment/showExpressionExperiment.html?id={id}' ext:qtip='{name}'>{shortName}</a></tpl>"); Gemma.ProbeLevelDiffExGrid.eeNameStyler = function(value, metadata, record, row, col, ds) { var ee = record.data.expressionExperiment; return Gemma.ProbeLevelDiffExGrid.eeNameTemplate.apply(ee); }; } return Gemma.ProbeLevelDiffExGrid.eeNameStyler;}; |
if (onSuccessFn) onSuccessFn(r.getResult().KeyType); | if (onSuccessFn) onSuccessFn(r.KeyType); | getEntryType: function(key, onSuccessFn, onErrorFn) { this.gateway.getFromService('GetEntryType', { Key: key || null }, function(r) { if (onSuccessFn) onSuccessFn(r.getResult().KeyType); }, onErrorFn || RedisClient.errorFn); }, |
if (onSuccessFn) onSuccessFn(RedisClient.convertKeyValuePairsToMap(r.getResult().KeyTypes)); | if (onSuccessFn) onSuccessFn(RedisClient.convertKeyValuePairsToMap(r.KeyTypes)); | getEntryTypes: function(keys, onSuccessFn, onErrorFn) { this.gateway.postToService('GetEntryTypes', { Keys: keys || null }, function(r) { if (onSuccessFn) onSuccessFn(RedisClient.convertKeyValuePairsToMap(r.getResult().KeyTypes)); }, onErrorFn || RedisClient.errorFn); } |
return; } if(this.systemArea != 'team') { this.log("*** getEventSummary *** systemArea does not support event summary ***"); | getEventSummary: function () { this.log("*** getEventSummary *** BEGIN ***"); if (!this.isLoggedIn) { this.log("*** getEventSummary *** USER NOT LOGGED IN ***"); return; } var params = { // 'LabelName': [] // 'TOS': ["voice", "fax", "text"] }; var result = function(ourParsedResponse, aXML){ // dumpJson(ourParsedResponse); if (ourParsedResponse.StatusCode && ourParsedResponse.StatusCode == 200) { try { var timestamp = parseInt(new Date().getTime() / 1000); _sgffx.log('getEventSummary: got ' + ourParsedResponse.EventSummary.length + ' EventSummaries'); for (var i = 0; i < ourParsedResponse.EventSummary.length; i++) { // check for new events if(_sgffx.unreadEvents[ourParsedResponse.EventSummary[i].TOS]['count'] != null && ourParsedResponse.EventSummary[i].Unread > _sgffx.unreadEvents[ourParsedResponse.EventSummary[i].TOS]['count'] ) { var diff = ourParsedResponse.EventSummary[i].Unread - _sgffx.unreadEvents[ourParsedResponse.EventSummary[i].TOS]['count']; var msg = _sgffx.strings.getFormattedString('notification.' + ourParsedResponse.EventSummary[i].TOS, [diff]); _sgffx.log("getEventSummary: "+ msg); var text = _sgffx.strings.getFormattedString('notification.prefix', [msg]); _sgffx.runXulObjectCommand('sipgatenotificationPanel', 'clearLines'); _sgffx.runXulObjectCommand('sipgatenotificationPanel', 'addLine', [text]); _sgffx.runXulObjectCommand('sipgatenotificationPanel', 'open'); } // store new event count _sgffx.unreadEvents[ourParsedResponse.EventSummary[i].TOS]['count'] = ourParsedResponse.EventSummary[i].Unread; _sgffx.unreadEvents[ourParsedResponse.EventSummary[i].TOS]['time'] = timestamp; _sgffx.showEventSummary(); } } catch(e) { _sgffx.log("getEventSummary: Error occured during parsing ("+e+")"); } } else { _sgffx.log("getEventSummary failed toSTRING: "+ aXML.toString()); } if (_sgffx.getPref("extensions.sipgateffx.polling", "bool")) { // set update timer var delay = _sgffx.recommendedIntervals["samurai.EventSummaryGet"]; _sgffx.getEventSummaryTimer.initWithCallback({ notify: function(timer) { _sgffx.getEventSummary(); } }, delay * 1000, Components.interfaces.nsITimer.TYPE_ONE_SHOT); _sgffx.log("getEventSummary: polling enabled. set to " + delay + " seconds"); } }; try { this._rpcCall("samurai.EventSummaryGet", params, result); } catch(e) { this.log('Exception in xmlrpc-request: ' + e); this.log('Request sent: ' + request); } this.log("*** getEventSummary *** END ***"); }, |
|
return this.service.getBoolean('hudson.executor'); | return this.service.getBoolean('extensions.hudson.buildmonitor.executor'); | getExecutor: function() { return this.service.getBoolean('hudson.executor'); }, |
type : Ext.getCmp('factor-type-checkbox').getValue() ? "Continuous" : "Categorical" | type : Ext.getCmp('factor-type-checkbox').getValue() ? "continuous" : "categorical" | getExperimentalFactorValueObject : function() { var category = Ext.getCmp('factor-mged-combo').getTerm(); var description = Ext.getCmp('factor-description-field').getValue(); return { name : category.term, description : description, category : category.term, categoryUri : category.uri, type : Ext.getCmp('factor-type-checkbox').getValue() ? "Continuous" : "Categorical" }; } |
var name = this.service.getString('hudson.feeds.' + i + '.name'); var url = this.service.getString('hudson.feeds.' + i + '.url'); | var name = this.service.getString('extensions.hudson.buildmonitor.feeds.' + i + '.name'); var url = this.service.getString('extensions.hudson.buildmonitor.feeds.' + i + '.url'); | getFeeds: function() { var feeds = []; for (var i = 0; i < this.numOfFeeds; i++) { var name = this.service.getString('hudson.feeds.' + i + '.name'); var url = this.service.getString('hudson.feeds.' + i + '.url'); var lastFail = null; var lastFailISOString = this.service.getString('hudson.feeds.' + i + '.lastfail'); if (lastFailISOString !== null && lastFailISOString.length > 0) { lastFail = com_mattkruse_getDateFromFormat(lastFailISOString, 'yyyy-MM-ddTHH:mm:ssZ'); } feeds[i] = new org_hudsonci.Feed(i, name, url, lastFail); } return feeds; }, |
var lastFailISOString = this.service.getString('hudson.feeds.' + i + '.lastfail'); | var lastFailISOString = this.service.getString('extensions.hudson.buildmonitor.feeds.' + i + '.lastfail'); | getFeeds: function() { var feeds = []; for (var i = 0; i < this.numOfFeeds; i++) { var name = this.service.getString('hudson.feeds.' + i + '.name'); var url = this.service.getString('hudson.feeds.' + i + '.url'); var lastFail = null; var lastFailISOString = this.service.getString('hudson.feeds.' + i + '.lastfail'); if (lastFailISOString !== null && lastFailISOString.length > 0) { lastFail = com_mattkruse_getDateFromFormat(lastFailISOString, 'yyyy-MM-ddTHH:mm:ssZ'); } feeds[i] = new org_hudsonci.Feed(i, name, url, lastFail); } return feeds; }, |
lastFail = getDateFromFormat(lastFailISOString, 'yyyy-MM-ddTHH:mm:ssZ'); | lastFail = com_mattkruse_getDateFromFormat(lastFailISOString, 'yyyy-MM-ddTHH:mm:ssZ'); | getFeeds: function() { var feeds = []; for (var i = 0; i < this.numOfFeeds; i++) { var name = this.service.getString('hudson.feeds.' + i + '.name'); var url = this.service.getString('hudson.feeds.' + i + '.url'); var lastFail = null; var lastFailISOString = this.service.getString('hudson.feeds.' + i + '.lastfail'); if (lastFailISOString !== null && lastFailISOString.length > 0) { lastFail = getDateFromFormat(lastFailISOString, 'yyyy-MM-ddTHH:mm:ssZ'); } feeds[i] = new org_hudsonci.Feed(i, name, url, lastFail); } return feeds; }, |
return this.service.getString('hudson.feedstatustype'); | return this.service.getString('extensions.hudson.buildmonitor.feedstatustype'); | getFeedStatusType: function() { return this.service.getString('hudson.feedstatustype'); }, |
} | }, | getField: function (id) { if (this.fields.has(id)) { return this.fields.get(id); } return null; } |
} | }, | getFieldsByName: function (name) { var fields = []; this.fields.each(function(val, id){ if (val.name === name) { fields.push(val); } },this); return fields; } |
var ids = []; var all = this.getStore().getRange(); for (var i = 0; i < all.length; ++i) { ids.push(all[i].data.id); } var gene = this.getTopToolbar().geneCombo.getGene(); if (gene) { for (var j = 0; j < ids.length; ++j) { if (ids[j] == gene.id) { return ids; | var ids = []; var all = this.getStore().getRange(); for (var i = 0; i < all.length; ++i) { ids.push(all[i].data.id); | getGeneIds : function() { var ids = []; var all = this.getStore().getRange(); for (var i = 0; i < all.length; ++i) { ids.push(all[i].data.id); } var gene = this.getTopToolbar().geneCombo.getGene(); if (gene) { for (var j = 0; j < ids.length; ++j) { // don't add twice. if (ids[j] == gene.id) { return ids; } } ids.push(gene.id); } return ids; }, |
} ids.push(gene.id); } return ids; }, | var gene = this.getTopToolbar().geneCombo.getGene(); if (gene) { for (var j = 0; j < ids.length; ++j) { if (ids[j] == gene.id) { return ids; } } ids.push(gene.id); } return ids; }, | getGeneIds : function() { var ids = []; var all = this.getStore().getRange(); for (var i = 0; i < all.length; ++i) { ids.push(all[i].data.id); } var gene = this.getTopToolbar().geneCombo.getGene(); if (gene) { for (var j = 0; j < ids.length; ++j) { // don't add twice. if (ids[j] == gene.id) { return ids; } } ids.push(gene.id); } return ids; }, |
var ids = []; var all = this.getStore().getRange(); for (var i = 0; i < all.length; ++i) { ids.push(all[i].data.id); | var ids = []; var all = this.getStore().getRange(); for (var i = 0; i < all.length; ++i) { ids.push(all[i].data.id); } var gene = this.getTopToolbar().geneCombo.getGene(); if (gene) { for (var j = 0; j < ids.length; ++j) { if (ids[j] == gene.id) { return ids; | getGeneIds : function() { var ids = []; var all = this.getStore().getRange(); for (var i = 0; i < all.length; ++i) { ids.push(all[i].data.id); } var gene = this.getTopToolbar().geneCombo.getGene(); if (gene) { for (var j = 0; j < ids.length; ++j) { // don't add twice. if (ids[j] == gene.id) { return ids; } } ids.push(gene.id); } return ids; }, |
var gene = this.getTopToolbar().geneCombo.getGene(); if (gene) { for (var j = 0; j < ids.length; ++j) { if (ids[j] == gene.id) { return ids; } } ids.push(gene.id); } return ids; }, | } ids.push(gene.id); } return ids; }, | getGeneIds : function() { var ids = []; var all = this.getStore().getRange(); for (var i = 0; i < all.length; ++i) { ids.push(all[i].data.id); } var gene = this.getTopToolbar().geneCombo.getGene(); if (gene) { for (var j = 0; j < ids.length; ++j) { // don't add twice. if (ids[j] == gene.id) { return ids; } } ids.push(gene.id); } return ids; }, |
var genes = []; var all = this.getStore().getRange(); for (var i = 0; i < all.length; ++i) { genes.push(all[i].data); } var gene = this.getTopToolbar().geneCombo.getGene(); if (gene) { for (var j = 0; j < genes.length; ++j) { if (genes[j].id == gene.id) { return genes; | var genes = []; var all = this.getStore().getRange(); for (var i = 0; i < all.length; ++i) { genes.push(all[i].data); | getGenes : function() { var genes = []; var all = this.getStore().getRange(); for (var i = 0; i < all.length; ++i) { genes.push(all[i].data); } var gene = this.getTopToolbar().geneCombo.getGene(); if (gene) { for (var j = 0; j < genes.length; ++j) { // don't add twice. if (genes[j].id == gene.id) { return genes; } } genes.push(gene); } return genes; } |
genes.push(gene); } return genes; } | getGenes : function() { var genes = []; var all = this.getStore().getRange(); for (var i = 0; i < all.length; ++i) { genes.push(all[i].data); } var gene = this.getTopToolbar().geneCombo.getGene(); if (gene) { for (var j = 0; j < genes.length; ++j) { // don't add twice. if (genes[j].id == gene.id) { return genes; } } genes.push(gene); } return genes; } |
|
var genes = []; var all = this.getStore().getRange(); for (var i = 0; i < all.length; ++i) { genes.push(all[i].data); | var genes = []; var all = this.getStore().getRange(); for (var i = 0; i < all.length; ++i) { genes.push(all[i].data); } var gene = this.getTopToolbar().geneCombo.getGene(); if (gene) { for (var j = 0; j < genes.length; ++j) { if (genes[j].id == gene.id) { return genes; | getGenes : function() { var genes = []; var all = this.getStore().getRange(); for (var i = 0; i < all.length; ++i) { genes.push(all[i].data); } var gene = this.getTopToolbar().geneCombo.getGene(); if (gene) { for (var i = 0; i < genes.length; ++i) { // don't add twice. if (genes[i].id == gene.id) { return genes; } } genes.push(gene); } return genes; } |
var gene = this.getTopToolbar().geneCombo.getGene(); if (gene) { for (var i = 0; i < genes.length; ++i) { if (genes[i].id == gene.id) { return genes; } } genes.push(gene); } return genes; | } genes.push(gene); } return genes; | getGenes : function() { var genes = []; var all = this.getStore().getRange(); for (var i = 0; i < all.length; ++i) { genes.push(all[i].data); } var gene = this.getTopToolbar().geneCombo.getGene(); if (gene) { for (var i = 0; i < genes.length; ++i) { // don't add twice. if (genes[i].id == gene.id) { return genes; } } genes.push(gene); } return genes; } |
var genes = []; var all = this.getStore().getRange(); for (var i = 0; i < all.length; ++i) { genes.push(all[i].data); | var genes = []; var all = this.getStore().getRange(); for (var i = 0; i < all.length; ++i) { genes.push(all[i].data); } var gene = this.getTopToolbar().geneCombo.getGene(); if (gene) { for (var i = 0; i < genes.length; ++i) { if (genes[i].id == gene.id) { return genes; | getGenes : function() { var genes = []; var all = this.getStore().getRange(); for (var i = 0; i < all.length; ++i) { genes.push(all[i].data); } var gene = this.getTopToolbar().geneCombo.getGene(); if (gene) { for (var i = 0; i < genes.length; ++i) { // don't add twice. if (genes[i].id == gene.id) { return genes; } } genes.push(gene); } return genes; } |
SecurityController.getGenesInGroup = function(p0, callback) { dwr.engine._execute(SecurityController._path, 'SecurityController', 'getGenesInGroup', p0, callback); | GeneSetController.getGenesInGroup = function(p0, callback) { dwr.engine._execute(GeneSetController._path, 'GeneSetController', 'getGenesInGroup', p0, callback); | SecurityController.getGenesInGroup = function(p0, callback) { dwr.engine._execute(SecurityController._path, 'SecurityController', 'getGenesInGroup', p0, callback);} |
getGridRowElement : function () { | getGridRowElement : function (row) { | getGridRowElement : function () { var tr = new Element('tr'); tr.setStyle('height', this.getHeight()); if (this.options.alternateRowColors) { tr.className = (this.grid.getModel().getPosition() % 2) ? this.options.rowClasses.even : this.options.rowClasses.odd; } else { tr.className = this.options.rowClasses.all; } return tr; }, |
tr.setStyle('height', this.getHeight()); | getGridRowElement : function () { var tr = new Element('tr'); tr.setStyle('height', this.getHeight()); if (this.options.alternateRowColors) { tr.className = (this.grid.getModel().getPosition() % 2) ? this.options.rowClasses.even : this.options.rowClasses.odd; } else { tr.className = this.options.rowClasses.all; } return tr; }, |
|
tr.store('jxRowData', {row: row}); tr.addClass('jxGridRow'+row); | getGridRowElement : function () { var tr = new Element('tr'); tr.setStyle('height', this.getHeight()); if (this.options.alternateRowColors) { tr.className = (this.grid.getModel().getPosition() % 2) ? this.options.rowClasses.even : this.options.rowClasses.odd; } else { tr.className = this.options.rowClasses.all; } return tr; }, |
|
if (onSuccessFn) onSuccessFn(r.getResult().Count); | if (onSuccessFn) onSuccessFn(r.Count); | getHashCount: function(id, onSuccessFn, onErrorFn) { this.gateway.getFromService('GetHashCount', { Id: id || null }, function(r) { if (onSuccessFn) onSuccessFn(r.getResult().Count); }, onErrorFn || RedisClient.errorFn); }, |
if (onSuccessFn) onSuccessFn(r.getResult().Keys); | if (onSuccessFn) onSuccessFn(r.Keys); | getHashKeys: function(id, onSuccessFn, onErrorFn) { this.gateway.getFromService('GetHashKeys', { Id: id || null }, function(r) { if (onSuccessFn) onSuccessFn(r.getResult().Keys); }, onErrorFn || RedisClient.errorFn); }, |
if (onSuccessFn) onSuccessFn(r.getResult().Values); | if (onSuccessFn) onSuccessFn(r.Values); | getHashValues: function(id, onSuccessFn, onErrorFn) { this.gateway.getFromService('GetHashValues', { Id: id || null }, function(r) { if (onSuccessFn) onSuccessFn(r.getResult().Values); }, onErrorFn || RedisClient.errorFn); }, |
var text = this.options.header ? this.options.header : this.options.modelField; var ht = this.options.templates.header; var el = new Element(ht.tag, { 'class' : 'jxGridCellContent', 'html' : text }); new Element('img', { src: Jx.aPixel.src }).inject(el); if ($defined(ht.cssClass)) { if (Jx.type(ht.cssClass) === 'function') { el.addClass(ht.cssClass.run(text)); } else { el.addClass(ht.cssClass); } } this.header = el; return el; | if (this.isSortable()) { new Element('img', { src: Jx.aPixel.src }).inject(this.domObj); } return this.domObj; | getHeaderHTML : function () { var text = this.options.header ? this.options.header : this.options.modelField; var ht = this.options.templates.header; var el = new Element(ht.tag, { 'class' : 'jxGridCellContent', 'html' : text }); new Element('img', { src: Jx.aPixel.src }).inject(el); if ($defined(ht.cssClass)) { if (Jx.type(ht.cssClass) === 'function') { el.addClass(ht.cssClass.run(text)); } else { el.addClass(ht.cssClass); } } this.header = el; return el; }, |
new Element('img', { src: Jx.aPixel.src }).inject(el); | getHeaderHTML : function () { var text = this.options.header ? this.options.header : this.options.modelField; var ht = this.options.templates.header; var el = new Element(ht.tag, { 'class' : 'jxGridCellContent', 'html' : text }); if ($defined(ht.cssClass)) { if (Jx.type(ht.cssClass) === 'function') { el.addClass(ht.cssClass.run(text)); } else { el.addClass(ht.cssClass); } } this.header = el; return el; }, |
|
var classes = ['jxGridColHead', 'jxGridCol'+idx, 'jxGridCol'+col.options.name], | var classes = ['jxGridColHead', 'jxGridCol'+idx, 'jxCol-'+col.options.name, 'jxColHead-'+col.options.name], | getHeaders : function (tr) { var grid = this.grid, row = grid.row, rhc = grid.row.useHeaders() ? this.getByName(row.options.headerColumn) : null; if (this.useHeaders()) { this.columns.each(function(col, idx) { if (!col.isHidden() && col != rhc) { var classes = ['jxGridColHead', 'jxGridCol'+idx, 'jxGridCol'+col.options.name], th; if (col.isEditable()) { classes.push('jxColEditable'); } if (col.isResizable()) { classes.push('jxColResizable'); } if (col.isSortable()) { classes.push('jxColSortable'); } th = new Element('th', { 'class': classes.join(' ') }); th.store('jxCellData', { column: col, colHeader: true, index: idx }); th.adopt(col.getHeaderHTML()); th.inject(tr); } }); if (!this.hasExpandable) { new Element('th', { 'class': 'jxGridColHead jxGridCellUnattached' }).inject(tr); } } }, |
var hf = this.grid.row.getRowHeaderField(); | var hf = this.grid.row.getRowHeaderColumn(); | getHeaders : function (list) { var r = this.grid.row.useHeaders(); var hf = this.grid.row.getRowHeaderField(); this.columns.each(function (col, idx) { if (r && hf === col.options.modelField) { //do nothing } else if (!col.isHidden()) { var th = new Element('td', { 'class' : 'jxGridColHead jxGridCol'+idx }); th.adopt(col.getHeaderHTML()); // th.setStyle('width', col.getWidth()); th.addClass('jxColHead-' + col.options.modelField); //add other styles for different attributes if (col.isEditable()) { th.addClass('jxColEditable'); } if (col.isResizable()) { th.addClass('jxColResizable'); } if (col.isSortable()) { th.addClass('jxColSortable'); } list.add(th); th.store('jxCellData', { column: col, colHeader: true, index: idx }); } }, this); return list; }, |
if (r && hf === col.options.modelField) { | if (r && hf === col.options.name) { | getHeaders : function (list) { var r = this.grid.row.useHeaders(); var hf = this.grid.row.getRowHeaderField(); this.columns.each(function (col, idx) { if (r && hf === col.options.modelField) { //do nothing } else if (!col.isHidden()) { var th = new Element('td', { 'class' : 'jxGridColHead jxGridCol'+idx }); th.adopt(col.getHeaderHTML()); // th.setStyle('width', col.getWidth()); th.addClass('jxColHead-' + col.options.modelField); //add other styles for different attributes if (col.isEditable()) { th.addClass('jxColEditable'); } if (col.isResizable()) { th.addClass('jxColResizable'); } if (col.isSortable()) { th.addClass('jxColSortable'); } list.add(th); th.store('jxCellData', { column: col, colHeader: true, index: idx }); } }, this); return list; }, |
th.addClass('jxColHead-' + col.options.modelField); | th.addClass('jxColHead-' + col.name); | getHeaders : function (list) { var r = this.grid.row.useHeaders(); var hf = this.grid.row.getRowHeaderField(); this.columns.each(function (col, idx) { if (r && hf === col.options.modelField) { //do nothing } else if (!col.isHidden()) { var th = new Element('td', { 'class' : 'jxGridColHead jxGridCol'+idx }); th.adopt(col.getHeaderHTML()); // th.setStyle('width', col.getWidth()); th.addClass('jxColHead-' + col.options.modelField); //add other styles for different attributes if (col.isEditable()) { th.addClass('jxColEditable'); } if (col.isResizable()) { th.addClass('jxColResizable'); } if (col.isSortable()) { th.addClass('jxColSortable'); } list.add(th); th.store('jxCellData', { column: col, colHeader: true, index: idx }); } }, this); return list; }, |
var h = this.options.rowHeight; | var h = this.options.rowHeight, rowEl; | getHeight : function (row) { var h = this.options.rowHeight; //this should eventually compute a height, however, we would need //a fixed width to do so reliably. For right now, we use a fixed height //for all rows. if ($defined(this.heights[row])) { h = this.heights[row]; } else if ($defined(this.options.rowHeight)) { if (this.options.rowHeight == 'auto') { // this.calculateHeight(row); h = 20; // TODO calculate? } else if (Jx.type(this.options.rowHeight) !== 'number') { h = 20; // TODO calculate? } } return h; }, |
rowEl = this.grid.gridTableBody.rows[row] if (rowEl) { h = rowEl.getContentBoxSize().height; } | getHeight : function (row) { var h = this.options.rowHeight; //this should eventually compute a height, however, we would need //a fixed width to do so reliably. For right now, we use a fixed height //for all rows. if ($defined(this.heights[row])) { h = this.heights[row]; } else if ($defined(this.options.rowHeight)) { if (this.options.rowHeight == 'auto') { // this.calculateHeight(row); h = 20; // TODO calculate? } else if (Jx.type(this.options.rowHeight) !== 'number') { h = 20; // TODO calculate? } } return h; }, |
|
getHeight : function () { | getHeight : function (row) { | getHeight : function () { //this should eventually compute a height, however, we would need //a fixed width to do so reliably. For right now, we use a fixed height //for all rows. return this.options.rowHeight; }, |
return this.options.rowHeight; | if ((!$defined(this.options.rowHeight) || this.options.rowHeight === 'auto') && $defined(this.heights[row])) { return this.heights[row]; } else if (Jx.type(this.options.rowHeight === 'number')) { return this.options.rowHeight; } | getHeight : function () { //this should eventually compute a height, however, we would need //a fixed width to do so reliably. For right now, we use a fixed height //for all rows. return this.options.rowHeight; }, |
return this.service.getBoolean('hudson.hidename'); | return this.service.getBoolean('extensions.hudson.buildmonitor.hidename'); | getHideName: function() { return this.service.getBoolean('hudson.hidename'); }, |
var text = this.grid.getModel().get(this.options.modelField); var ct = this.options.templates.cell; if ($defined(this.options.formatter)) { text = this.options.formatter.format(text); } var el = new Element(ct.tag, { 'html' : text, 'class' : 'jxGridCellContent', styles: { } }); if ($defined(ct.cssClass)) { if (Jx.type(ct.cssClass) === 'function') { el.addClass(ct.cssClass.run(text)); } else { el.addClass(ct.cssClass); } } return el; | this.options.renderer.render(); return document.id(this.options.renderer); | getHTML : function () { var text = this.grid.getModel().get(this.options.modelField); var ct = this.options.templates.cell; if ($defined(this.options.formatter)) { text = this.options.formatter.format(text); } var el = new Element(ct.tag, { 'html' : text, 'class' : 'jxGridCellContent', styles: { // width: this.getWidth() } }); if ($defined(ct.cssClass)) { if (Jx.type(ct.cssClass) === 'function') { el.addClass(ct.cssClass.run(text)); } else { el.addClass(ct.cssClass); } } return el; } |
return this.service.getBoolean('hudson.identifyrsspattern'); | return this.service.getBoolean('extensions.hudson.buildmonitor.identifyrsspattern'); | getIdentifyRssPattern: function() { return this.service.getBoolean('hudson.identifyrsspattern'); }, |
var headers = this.grid.colTableBody.getFirst().getChildren(); | var headers = this.options.useHeaders ? this.grid.colTableBody.getFirst().getChildren() : this.grid.gridTableBody.getFirst().getChildren(); | getIndexFromGrid : function (name) { var headers = this.grid.colTableBody.getFirst().getChildren(); var c; var i = -1; headers.each(function (h) { i++; var hClasses = h.get('class').split(' ').filter(function (cls) { return cls.test('jxColHead-'); }); hClasses.each(function (cls) { if (cls.test(name)) { c = i; } }); }, this); return c; } |
return cls.test('jxColHead-'); | if(self.options.useHeaders) return cls.test('jxColHead-'); else return cls.test('jxCol-'); | getIndexFromGrid : function (name) { var headers = this.grid.colTableBody.getFirst().getChildren(); var c; var i = -1; headers.each(function (h) { i++; var hClasses = h.get('class').split(' ').filter(function (cls) { return cls.test('jxColHead-'); }); hClasses.each(function (cls) { if (cls.test(name)) { c = i; } }); }, this); return c; } |
authorurl : 'http: infourl : 'http: version : "0.3" | authorurl : 'http: infourl : 'http: version : "0.6" | getInfo : function() { return { longname : 'WP-PhotoNav plugin', author : 'Fabian Moser', authorurl : 'http://fabianmoser.at', infourl : 'http://fabianmoser.at/wp-photonav', version : "0.3" }; } |
if (onSuccessFn) onSuccessFn(r.getResult().Items); | if (onSuccessFn) onSuccessFn(r.Items); | getIntersectFromSets: function(setIds, onSuccessFn, onErrorFn) { this.gateway.postToService('GetIntersectFromSets', { SetIds: setIds || null }, function(r) { if (onSuccessFn) onSuccessFn(r.getResult().Items); }, onErrorFn || RedisClient.errorFn); }, |
return this.service.getInteger('hudson.interval'); | return this.service.getInteger('extensions.hudson.buildmonitor.interval'); | getInterval: function() { return this.service.getInteger('hudson.interval'); }, |
if (onSuccessFn) onSuccessFn(r.getResult().Item); | if (onSuccessFn) onSuccessFn(r.Item); | getItemFromList: function(id, index, onSuccessFn, onErrorFn) { this.gateway.getFromService('GetItemFromList', { Id: id || null, Index: index || null }, function(r) { if (onSuccessFn) onSuccessFn(r.getResult().Item); }, onErrorFn || RedisClient.errorFn); }, |
if (onSuccessFn) onSuccessFn(r.getResult().Index); | if (onSuccessFn) onSuccessFn(r.Index); | getItemIndexInSortedSet: function(id, item, onSuccessFn, onErrorFn) { this.gateway.getFromService('GetItemIndexInSortedSet', { Id: id || null, Item: item || null }, function(r) { if (onSuccessFn) onSuccessFn(r.getResult().Index); }, onErrorFn || RedisClient.errorFn); }, |
if (onSuccessFn) onSuccessFn(r.getResult().Score); | if (onSuccessFn) onSuccessFn(r.Score); | getItemScoreInSortedSet: function(id, item, onSuccessFn, onErrorFn) { this.gateway.getFromService('GetItemScoreInSortedSet', { Id: id || null, Item: item || null }, function(r) { if (onSuccessFn) onSuccessFn(r.getResult().Score); }, onErrorFn || RedisClient.errorFn); }, |
populateUserInfo(); populateSelect(); | if( userInit==false){ populateUserInfo(); } | function getJSONAccessList() { dojo.xhrPost({ sync: true, url:"../security", //photark.constants.SecurityEndpoint, content:{request:"getJSONAccessList"}, handleAs: "json", load: function(response, ioArgs) { userId = response.userId; SECURITY_TOKEN = response.token; permissions = response.permissions; populateUserInfo(); populateSelect(); }, error: function(response, ioArgs) { console.error("Error in getting JSON Access List"); } });} |
adminLogout(); | function getJSONAccessList() { dojo.xhrPost({ sync: true, url:"../security", //photark.constants.SecurityEndpoint, content:{request:"getJSONAccessList"}, handleAs: "json", load: function(response, ioArgs) { userId = response.userId; SECURITY_TOKEN = response.token; permissions = response.permissions; populateUserInfo(); populateSelect(); }, error: function(response, ioArgs) { console.error("Error in getting JSON Access List"); } });} |
|
permissions = response.defaultPermissions; | permissions = response.permissions; | function getJSONAccessList() { dojo.xhrPost({ sync: true, url:"security", //photark.constants.SecurityEndpoint, content:{request:"getJSONAccessList"}, handleAs: "json", load: function(response, ioArgs) { userId = response.userId; SECURITY_TOKEN = response.token; permissions = response.defaultPermissions; }, error: function(response, ioArgs) { console.error("Error in getting JSON Access List"); } });} |
logout(); | function getJSONAccessList() { dojo.xhrPost({ sync: true, url:"security", //photark.constants.SecurityEndpoint, content:{request:"getJSONAccessList"}, handleAs: "json", load: function(response, ioArgs) { userId = response.userId; SECURITY_TOKEN = response.token; permissions = response.defaultPermissions; }, error: function(response, ioArgs) { console.error("Error in getting JSON Access List"); } });} |
|
} | }, | getKeyboardEvents : function() { var self = this; for(var i in this.options.keys) { // only add a reference once, otherwise keyboard events will be fired twice in subclasses if(!$defined(this.keyboardEvents[i])) { if($defined(this.keyboardMethods[this.options.keys[i]])) { this.keyboardEvents[i] = this.keyboardMethods[this.options.keys[i]]; }else if($defined(this.options.keyboardMethods[this.options.keys[i]])){ this.keyboardEvents[i] = this.options.keyboardMethods[this.options.keys[i]].bind(self); }else if(Jx.type(this.options.keys[i]) == 'function') { this.keyboardEvents[i] = this.options.keys[i].bind(self); }else{ // allow disabling of special keys by setting them to false or null with having a warning if(this.options.keyboardMethods[this.options.keys[i]] != false) { $defined(console) ? console.warn("keyboard method %o not defined for %o", this.options.keys[i], this) : false; } } } } return this.keyboardEvents; } |
return this.button.getLabel(); | return this.button ? this.button.getLabel() : ''; | getLabel: function() { return this.button.getLabel(); }, |
if (link == '#') return this.getHtml(); | if (link == '#') { return "<span class=\"webfx-tree-item-label\" tabindex=\"-1\"" + (toolTip ? " title=\"" + webFXTreeHandler.textToHtml(toolTip) + "\"" : "") + " onfocus=\"webFXTreeHandler.handleEvent(event)\"" + " onblur=\"webFXTreeHandler.handleEvent(event)\">" + this.getHtml() + "</span>"; } | _p.getLabelHtml = function () { var toolTip = this.getToolTip(); var target = this.getTarget(); var link = this._getHref(); if (link == '#') return this.getHtml(); return "<a href=\"" + webFXTreeHandler.textToHtml(link) + "\" class=\"webfx-tree-item-label\" tabindex=\"-1\"" + (toolTip ? " title=\"" + webFXTreeHandler.textToHtml(toolTip) + "\"" : "") + (target ? " target=\"" + target + "\"" : "") + " onfocus=\"webFXTreeHandler.handleEvent(event)\"" + " onblur=\"webFXTreeHandler.handleEvent(event)\">" + this.getHtml() + "</a>";}; |
if (onSuccessFn) onSuccessFn(r.getResult().Count); | if (onSuccessFn) onSuccessFn(r.Count); | getListCount: function(id, onSuccessFn, onErrorFn) { this.gateway.getFromService('GetListCount', { Id: id || null }, function(r) { if (onSuccessFn) onSuccessFn(r.getResult().Count); }, onErrorFn || RedisClient.errorFn); }, |
return this.service.getString('hudson.networkusername'); | return this.service.getString('extensions.hudson.buildmonitor.networkusername'); | getNetworkUsername: function() { return this.service.getString('hudson.networkusername'); }, |
var getNewTrie = function(isInfix, isCaseSensitive) { isInfix = !!isInfix; isCaseSensitive = !!isCaseSensitive; var root = [null, {}, false]; var infixRoots = (isInfix) ? {} : null; var cleanString = function( inStr ) { if(!isCaseSensitive){ inStr = inStr.toLowerCase(); } return inStr; } var mapNewArray = function(nodeArr, chr) { if(nodeArr[0] == root) { return isInfix ? infixRoots[chr] : [root[1][chr]]; } var retArray = []; var aLen = nodeArr.length; var thisNodesArray; for (var i = 0; i < aLen; i++) { thisNodesArray = nodeArr[i][1]; if(thisNodesArray.hasOwnProperty(chr)){ retArray.push(thisNodesArray[chr]); } } return retArray; }; var findNodeArray = function(key) { key = cleanString(key); var retArray = [root]; var kLen = key.length; var chr; for (var i = 0; i < kLen; i++) { chr = key.charAt(i); retArray = mapNewArray(retArray, chr); } return retArray; }; var markAndRetrieve = function(array, trie, toggleSet) { var stack = [ trie ]; while (stack.length > 0) { var thisTrie = stack.pop(); if (thisTrie[2] == toggleSet) continue; thisTrie[2] = toggleSet; if (thisTrie[0]) array.unshift(thisTrie[0]); for (chr in thisTrie[1]) { if (thisTrie[1].hasOwnProperty(chr)) { stack.push(thisTrie[1][chr]); } } } } return { add : function( key, object ) { key = cleanString(key); var curNode = root; var kLen = key.length; var chr, node; for(var i = 0; i < kLen; i++) { chr = key.charAt(i); node = curNode[1]; if(chr in node) { curNode = node[chr]; } else { curNode = node[chr] = [null, {}, root[2]]; if(isInfix) { if(chr in infixRoots) { infixRoots[chr].push(curNode); } else { infixRoots[chr] = [curNode]; } } } } if(curNode[0]) curNode[0].push(object); else curNode[0] = [object]; return true; }, find : function(key) { var trieNodeArray = findNodeArray(key); var toggleTo = !root[2]; var matches = []; var misses = []; var trie; for(arrName in trieNodeArray){ trie = trieNodeArray[arrName]; markAndRetrieve(matches, trie, toggleTo); } markAndRetrieve(misses, root, toggleTo); return { matches : matches, misses : misses }; } } }; | $.ui.ufd.getNewTrie = function(isCaseSensitive, isInfix){ return new InfixTrie(isCaseSensitive, isInfix); } | var getNewTrie = function(isInfix, isCaseSensitive) { isInfix = !!isInfix; isCaseSensitive = !!isCaseSensitive; var root = [null, {}, false]; //masterNode: object, char -> trieNode map, traverseToggle var infixRoots = (isInfix) ? {} : null; var cleanString = function( inStr ) { if(!isCaseSensitive){ inStr = inStr.toLowerCase(); } //invalid char clean here return inStr; } /** * Take an array of nodes, and construct new array of children nodes along the given chr. */ var mapNewArray = function(nodeArr, chr) { if(nodeArr[0] == root) { return isInfix ? infixRoots[chr] : [root[1][chr]]; } var retArray = []; var aLen = nodeArr.length; var thisNodesArray; for (var i = 0; i < aLen; i++) { thisNodesArray = nodeArr[i][1]; if(thisNodesArray.hasOwnProperty(chr)){ retArray.push(thisNodesArray[chr]); } } return retArray; }; /** * Find array of trieNodes that match the infix key */ var findNodeArray = function(key) { key = cleanString(key); var retArray = [root]; var kLen = key.length; var chr; for (var i = 0; i < kLen; i++) { chr = key.charAt(i); retArray = mapNewArray(retArray, chr); } return retArray; }; /** * retrieves objects on the given array of trieNodes. * Also sets toggleSet and doesnt traverse already marked branches. * You must call this with root to ensure complete tree is toggled. */ var markAndRetrieve = function(array, trie, toggleSet) { var stack = [ trie ]; while (stack.length > 0) { var thisTrie = stack.pop(); if (thisTrie[2] == toggleSet) continue; //already traversed thisTrie[2] = toggleSet; if (thisTrie[0]) array.unshift(thisTrie[0]); for (chr in thisTrie[1]) { if (thisTrie[1].hasOwnProperty(chr)) { stack.push(thisTrie[1][chr]); } } } } return { /** * Add (String, Object) to store */ add : function( key, object ) { key = cleanString(key); var curNode = root; var kLen = key.length; var chr, node; for(var i = 0; i < kLen; i++) { chr = key.charAt(i); node = curNode[1]; if(chr in node) { curNode = node[chr]; } else { curNode = node[chr] = [null, {}, root[2]]; // match roots' toggle setting if(isInfix) { // only add curNodes once, when created. if(chr in infixRoots) { infixRoots[chr].push(curNode); } else { infixRoots[chr] = [curNode]; } } } } if(curNode[0]) curNode[0].push(object); else curNode[0] = [object]; return true; }, /** * Get object with two properties: * matches: array of all objects not matching entire key (String) * misses: array of all objects exactly matching the key (String) * */ find : function(key) { // string var trieNodeArray = findNodeArray(key); var toggleTo = !root[2]; var matches = []; var misses = []; var trie; for(arrName in trieNodeArray){ trie = trieNodeArray[arrName]; markAndRetrieve(matches, trie, toggleTo); } markAndRetrieve(misses, root, toggleTo); //will ensure whole tree is toggled also. return { matches : matches, misses : misses }; } }}; |
var getNewTrie = function(isCaseSensitive) { | var getNewTrie = function(isInfix, isCaseSensitive) { isInfix = !!isInfix; | var getNewTrie = function(isCaseSensitive) { isCaseSensitive = !!isCaseSensitive; var root = [null, {}, false]; //masterNode var infixRoots = {}; var cleanString = function( inStr ) { if(!isCaseSensitive){ inStr = inStr.toLowerCase(); } //invalid char clean here return inStr; } /** * Take an array of nodes, and construct new array of children nodes along the given chr. */ var mapNewArray = function(nodeArr, chr) { if(nodeArr[0] == root) { //return [root[1][chr]]; //prefix return infixRoots[chr]; //infix } var retArray = []; var aLen = nodeArr.length; var thisNodesArray; for (var i = 0; i < aLen; i++) { thisNodesArray = nodeArr[i][1]; if(thisNodesArray.hasOwnProperty(chr)){ retArray.push(thisNodesArray[chr]); } } return retArray; }; /** * Find array of trieNodes that match the infix key */ var findNodeArray = function(key) { key = cleanString(key); var retArray = [root]; var kLen = key.length; var chr; for (var i = 0; i < kLen; i++) { chr = key.charAt(i); retArray = mapNewArray(retArray, chr); } return retArray; }; /** * */ var markAndRetrieve = function(array, trie, toggleSet) { var stack = [ trie ]; while (stack.length > 0) { var thisTrie = stack.pop(); if (thisTrie[2] == toggleSet) continue; //already traversed thisTrie[2] = toggleSet; if (thisTrie[0]) array.unshift(thisTrie[0]); for (chr in thisTrie[1]) { if (thisTrie[1].hasOwnProperty(chr)) { stack.push(thisTrie[1][chr]); } } } } return { /** * Add (String, Object) to store */ add : function( key, object ) { key = cleanString(key); var curNode = root; var kLen = key.length; var chr, node; for(var i = 0; i < kLen; i++) { chr = key.charAt(i); node = curNode[1]; if(chr in node) { curNode = node[chr]; } else { curNode = node[chr] = [null, {}, false]; //only add new curNodes if(chr in infixRoots) { infixRoots[chr].push(curNode); } else { infixRoots[chr] = [curNode]; } } } if(curNode[0]) curNode[0].push(object); else curNode[0] = [object]; return true; }, /** * Get object with two properties: * matches: array of all objects not matching entire key (String) * misses: array of all objects exactly matching the key (String) * */ find : function(key) { // string var trieNodeArray = findNodeArray(key); var toggleTo = !root[2]; var matches = []; var misses = []; var trie; for(arrName in trieNodeArray){ trie = trieNodeArray[arrName]; markAndRetrieve(matches, trie, toggleTo); } markAndRetrieve(misses, root, toggleTo); return { matches : matches, misses : misses }; } }}; |
var root = [null, {}, false]; var infixRoots = {}; | var root = [null, {}, false]; var infixRoots = (isInfix) ? {} : null; | var getNewTrie = function(isCaseSensitive) { isCaseSensitive = !!isCaseSensitive; var root = [null, {}, false]; //masterNode var infixRoots = {}; var cleanString = function( inStr ) { if(!isCaseSensitive){ inStr = inStr.toLowerCase(); } //invalid char clean here return inStr; } /** * Take an array of nodes, and construct new array of children nodes along the given chr. */ var mapNewArray = function(nodeArr, chr) { if(nodeArr[0] == root) { //return [root[1][chr]]; //prefix return infixRoots[chr]; //infix } var retArray = []; var aLen = nodeArr.length; var thisNodesArray; for (var i = 0; i < aLen; i++) { thisNodesArray = nodeArr[i][1]; if(thisNodesArray.hasOwnProperty(chr)){ retArray.push(thisNodesArray[chr]); } } return retArray; }; /** * Find array of trieNodes that match the infix key */ var findNodeArray = function(key) { key = cleanString(key); var retArray = [root]; var kLen = key.length; var chr; for (var i = 0; i < kLen; i++) { chr = key.charAt(i); retArray = mapNewArray(retArray, chr); } return retArray; }; /** * */ var markAndRetrieve = function(array, trie, toggleSet) { var stack = [ trie ]; while (stack.length > 0) { var thisTrie = stack.pop(); if (thisTrie[2] == toggleSet) continue; //already traversed thisTrie[2] = toggleSet; if (thisTrie[0]) array.unshift(thisTrie[0]); for (chr in thisTrie[1]) { if (thisTrie[1].hasOwnProperty(chr)) { stack.push(thisTrie[1][chr]); } } } } return { /** * Add (String, Object) to store */ add : function( key, object ) { key = cleanString(key); var curNode = root; var kLen = key.length; var chr, node; for(var i = 0; i < kLen; i++) { chr = key.charAt(i); node = curNode[1]; if(chr in node) { curNode = node[chr]; } else { curNode = node[chr] = [null, {}, false]; //only add new curNodes if(chr in infixRoots) { infixRoots[chr].push(curNode); } else { infixRoots[chr] = [curNode]; } } } if(curNode[0]) curNode[0].push(object); else curNode[0] = [object]; return true; }, /** * Get object with two properties: * matches: array of all objects not matching entire key (String) * misses: array of all objects exactly matching the key (String) * */ find : function(key) { // string var trieNodeArray = findNodeArray(key); var toggleTo = !root[2]; var matches = []; var misses = []; var trie; for(arrName in trieNodeArray){ trie = trieNodeArray[arrName]; markAndRetrieve(matches, trie, toggleTo); } markAndRetrieve(misses, root, toggleTo); return { matches : matches, misses : misses }; } }}; |
return infixRoots[chr]; | return isInfix ? infixRoots[chr] : [root[1][chr]]; | var getNewTrie = function(isCaseSensitive) { isCaseSensitive = !!isCaseSensitive; var root = [null, {}, false]; //masterNode var infixRoots = {}; var cleanString = function( inStr ) { if(!isCaseSensitive){ inStr = inStr.toLowerCase(); } //invalid char clean here return inStr; } /** * Take an array of nodes, and construct new array of children nodes along the given chr. */ var mapNewArray = function(nodeArr, chr) { if(nodeArr[0] == root) { //return [root[1][chr]]; //prefix return infixRoots[chr]; //infix } var retArray = []; var aLen = nodeArr.length; var thisNodesArray; for (var i = 0; i < aLen; i++) { thisNodesArray = nodeArr[i][1]; if(thisNodesArray.hasOwnProperty(chr)){ retArray.push(thisNodesArray[chr]); } } return retArray; }; /** * Find array of trieNodes that match the infix key */ var findNodeArray = function(key) { key = cleanString(key); var retArray = [root]; var kLen = key.length; var chr; for (var i = 0; i < kLen; i++) { chr = key.charAt(i); retArray = mapNewArray(retArray, chr); } return retArray; }; /** * */ var markAndRetrieve = function(array, trie, toggleSet) { var stack = [ trie ]; while (stack.length > 0) { var thisTrie = stack.pop(); if (thisTrie[2] == toggleSet) continue; //already traversed thisTrie[2] = toggleSet; if (thisTrie[0]) array.unshift(thisTrie[0]); for (chr in thisTrie[1]) { if (thisTrie[1].hasOwnProperty(chr)) { stack.push(thisTrie[1][chr]); } } } } return { /** * Add (String, Object) to store */ add : function( key, object ) { key = cleanString(key); var curNode = root; var kLen = key.length; var chr, node; for(var i = 0; i < kLen; i++) { chr = key.charAt(i); node = curNode[1]; if(chr in node) { curNode = node[chr]; } else { curNode = node[chr] = [null, {}, false]; //only add new curNodes if(chr in infixRoots) { infixRoots[chr].push(curNode); } else { infixRoots[chr] = [curNode]; } } } if(curNode[0]) curNode[0].push(object); else curNode[0] = [object]; return true; }, /** * Get object with two properties: * matches: array of all objects not matching entire key (String) * misses: array of all objects exactly matching the key (String) * */ find : function(key) { // string var trieNodeArray = findNodeArray(key); var toggleTo = !root[2]; var matches = []; var misses = []; var trie; for(arrName in trieNodeArray){ trie = trieNodeArray[arrName]; markAndRetrieve(matches, trie, toggleTo); } markAndRetrieve(misses, root, toggleTo); return { matches : matches, misses : misses }; } }}; |
* | * retrieves objects on the given array of trieNodes. * Also sets toggleSet and doesnt traverse already marked branches. * You must call this with root to ensure complete tree is toggled. | var getNewTrie = function(isCaseSensitive) { isCaseSensitive = !!isCaseSensitive; var root = [null, {}, false]; //masterNode var infixRoots = {}; var cleanString = function( inStr ) { if(!isCaseSensitive){ inStr = inStr.toLowerCase(); } //invalid char clean here return inStr; } /** * Take an array of nodes, and construct new array of children nodes along the given chr. */ var mapNewArray = function(nodeArr, chr) { if(nodeArr[0] == root) { //return [root[1][chr]]; //prefix return infixRoots[chr]; //infix } var retArray = []; var aLen = nodeArr.length; var thisNodesArray; for (var i = 0; i < aLen; i++) { thisNodesArray = nodeArr[i][1]; if(thisNodesArray.hasOwnProperty(chr)){ retArray.push(thisNodesArray[chr]); } } return retArray; }; /** * Find array of trieNodes that match the infix key */ var findNodeArray = function(key) { key = cleanString(key); var retArray = [root]; var kLen = key.length; var chr; for (var i = 0; i < kLen; i++) { chr = key.charAt(i); retArray = mapNewArray(retArray, chr); } return retArray; }; /** * */ var markAndRetrieve = function(array, trie, toggleSet) { var stack = [ trie ]; while (stack.length > 0) { var thisTrie = stack.pop(); if (thisTrie[2] == toggleSet) continue; //already traversed thisTrie[2] = toggleSet; if (thisTrie[0]) array.unshift(thisTrie[0]); for (chr in thisTrie[1]) { if (thisTrie[1].hasOwnProperty(chr)) { stack.push(thisTrie[1][chr]); } } } } return { /** * Add (String, Object) to store */ add : function( key, object ) { key = cleanString(key); var curNode = root; var kLen = key.length; var chr, node; for(var i = 0; i < kLen; i++) { chr = key.charAt(i); node = curNode[1]; if(chr in node) { curNode = node[chr]; } else { curNode = node[chr] = [null, {}, false]; //only add new curNodes if(chr in infixRoots) { infixRoots[chr].push(curNode); } else { infixRoots[chr] = [curNode]; } } } if(curNode[0]) curNode[0].push(object); else curNode[0] = [object]; return true; }, /** * Get object with two properties: * matches: array of all objects not matching entire key (String) * misses: array of all objects exactly matching the key (String) * */ find : function(key) { // string var trieNodeArray = findNodeArray(key); var toggleTo = !root[2]; var matches = []; var misses = []; var trie; for(arrName in trieNodeArray){ trie = trieNodeArray[arrName]; markAndRetrieve(matches, trie, toggleTo); } markAndRetrieve(misses, root, toggleTo); return { matches : matches, misses : misses }; } }}; |
curNode = node[chr] = [null, {}, false]; if(chr in infixRoots) { infixRoots[chr].push(curNode); } else { infixRoots[chr] = [curNode]; | curNode = node[chr] = [null, {}, root[2]]; if(isInfix) { if(chr in infixRoots) { infixRoots[chr].push(curNode); } else { infixRoots[chr] = [curNode]; } | var getNewTrie = function(isCaseSensitive) { isCaseSensitive = !!isCaseSensitive; var root = [null, {}, false]; //masterNode var infixRoots = {}; var cleanString = function( inStr ) { if(!isCaseSensitive){ inStr = inStr.toLowerCase(); } //invalid char clean here return inStr; } /** * Take an array of nodes, and construct new array of children nodes along the given chr. */ var mapNewArray = function(nodeArr, chr) { if(nodeArr[0] == root) { //return [root[1][chr]]; //prefix return infixRoots[chr]; //infix } var retArray = []; var aLen = nodeArr.length; var thisNodesArray; for (var i = 0; i < aLen; i++) { thisNodesArray = nodeArr[i][1]; if(thisNodesArray.hasOwnProperty(chr)){ retArray.push(thisNodesArray[chr]); } } return retArray; }; /** * Find array of trieNodes that match the infix key */ var findNodeArray = function(key) { key = cleanString(key); var retArray = [root]; var kLen = key.length; var chr; for (var i = 0; i < kLen; i++) { chr = key.charAt(i); retArray = mapNewArray(retArray, chr); } return retArray; }; /** * */ var markAndRetrieve = function(array, trie, toggleSet) { var stack = [ trie ]; while (stack.length > 0) { var thisTrie = stack.pop(); if (thisTrie[2] == toggleSet) continue; //already traversed thisTrie[2] = toggleSet; if (thisTrie[0]) array.unshift(thisTrie[0]); for (chr in thisTrie[1]) { if (thisTrie[1].hasOwnProperty(chr)) { stack.push(thisTrie[1][chr]); } } } } return { /** * Add (String, Object) to store */ add : function( key, object ) { key = cleanString(key); var curNode = root; var kLen = key.length; var chr, node; for(var i = 0; i < kLen; i++) { chr = key.charAt(i); node = curNode[1]; if(chr in node) { curNode = node[chr]; } else { curNode = node[chr] = [null, {}, false]; //only add new curNodes if(chr in infixRoots) { infixRoots[chr].push(curNode); } else { infixRoots[chr] = [curNode]; } } } if(curNode[0]) curNode[0].push(object); else curNode[0] = [object]; return true; }, /** * Get object with two properties: * matches: array of all objects not matching entire key (String) * misses: array of all objects exactly matching the key (String) * */ find : function(key) { // string var trieNodeArray = findNodeArray(key); var toggleTo = !root[2]; var matches = []; var misses = []; var trie; for(arrName in trieNodeArray){ trie = trieNodeArray[arrName]; markAndRetrieve(matches, trie, toggleTo); } markAndRetrieve(misses, root, toggleTo); return { matches : matches, misses : misses }; } }}; |
var nextRow, nextCell; nextRow = this.activeCell.cell.getParent().getNext(); if(nextRow == null) { nextRow = this.activeCell.cell.getParent('tbody').getFirst(); | if(this.activeCell.cell != null) { var nextRow, nextCell; nextRow = this.activeCell.cell.getParent().getNext(); if(nextRow == null) { nextRow = this.activeCell.cell.getParent('tbody').getFirst(); } nextCell = nextRow.getElement('td.jxGridCol'+this.activeCell.coords.index); if(save === false) { this.deactivate(save); } this.grid.selection.select(nextCell); | getNextCellInCol : function(save) { save = $defined(save) ? save : true; var nextRow, nextCell; nextRow = this.activeCell.cell.getParent().getNext(); if(nextRow == null) { nextRow = this.activeCell.cell.getParent('tbody').getFirst(); } nextCell = nextRow.getElement('td.jxGridCol'+this.activeCell.coords.index); if(save === false) { this.deactivate(save); } this.grid.selection.select(nextCell); }, |
nextCell = nextRow.getElement('td.jxGridCol'+this.activeCell.coords.index); if(save === false) { this.deactivate(save); } this.grid.selection.select(nextCell); | getNextCellInCol : function(save) { save = $defined(save) ? save : true; var nextRow, nextCell; nextRow = this.activeCell.cell.getParent().getNext(); if(nextRow == null) { nextRow = this.activeCell.cell.getParent('tbody').getFirst(); } nextCell = nextRow.getElement('td.jxGridCol'+this.activeCell.coords.index); if(save === false) { this.deactivate(save); } this.grid.selection.select(nextCell); }, |
|
var nextCell = true, nextRow = true; | var nextCell = true, nextRow = true, sumCols = this.grid.columns.columns.length; | getNextCellInRow: function(save) { save = $defined(save) ? save : true; if(this.activeCell.cell != null) { var nextCell = true, nextRow = true; var i = 0; do { nextCell = i > 0 ? nextCell.getNext() : this.activeCell.cell.getNext(); // check if cell is still in row, otherwise returns null if(nextCell == null) { nextRow = this.activeCell.cell.getParent('tr').getNext(); // check if this was the last row in the table if(nextRow == null) { nextRow = this.activeCell.cell.getParent('tbody').getFirst(); } nextCell = nextRow.getFirst(); } var data = nextCell.retrieve('jxCellData'), row = data.row, index = data.index; i++; }while(!data.col.options.isEditable); if(save === false) { this.deactivate(save); } this.grid.selection.select(nextCell); } }, |
if(i == sumCols*2) { this.deactivate(save); return; } | getNextCellInRow: function(save) { save = $defined(save) ? save : true; if(this.activeCell.cell != null) { var nextCell = true, nextRow = true; var i = 0; do { nextCell = i > 0 ? nextCell.getNext() : this.activeCell.cell.getNext(); // check if cell is still in row, otherwise returns null if(nextCell == null) { nextRow = this.activeCell.cell.getParent('tr').getNext(); // check if this was the last row in the table if(nextRow == null) { nextRow = this.activeCell.cell.getParent('tbody').getFirst(); } nextCell = nextRow.getFirst(); } var data = nextCell.retrieve('jxCellData'), row = data.row, index = data.index; i++; }while(!data.col.options.isEditable); if(save === false) { this.deactivate(save); } this.grid.selection.select(nextCell); } }, |
|
if(nextRow == null) { | if(nextRow == null && this.options.keypressLoop) { | getNextCellInRow: function(save) { save = $defined(save) ? save : true; if(this.activeCell.cell != null) { var nextCell = true, nextRow = true, sumCols = this.grid.columns.columns.length, jxCellClass = 'td.jxGridCell'; var i = 0; do { nextCell = i > 0 ? nextCell.getNext(jxCellClass) : this.activeCell.cell.getNext(jxCellClass); // check if cell is still in row, otherwise returns null if(nextCell == null) { nextRow = this.activeCell.cell.getParent('tr').getNext(); // check if this was the last row in the table if(nextRow == null) { nextRow = this.activeCell.cell.getParent('tbody').getFirst(); } nextCell = nextRow.getFirst(jxCellClass); } var data = nextCell.retrieve('jxCellData'); i++; // if all columns are set to uneditable during runtime, jump out of the loop after // running through 2 times to prevent an endless-loop and browser crash :) if(i == sumCols*2) { this.deactivate(save); return; } }while(!data.col.options.isEditable); if(save === false) { this.deactivate(save); } this.grid.selection.select(nextCell); } }, |
}else if(nextRow == null && !this.options.keypressLoop){ return; | getNextCellInRow: function(save) { save = $defined(save) ? save : true; if(this.activeCell.cell != null) { var nextCell = true, nextRow = true, sumCols = this.grid.columns.columns.length, jxCellClass = 'td.jxGridCell'; var i = 0; do { nextCell = i > 0 ? nextCell.getNext(jxCellClass) : this.activeCell.cell.getNext(jxCellClass); // check if cell is still in row, otherwise returns null if(nextCell == null) { nextRow = this.activeCell.cell.getParent('tr').getNext(); // check if this was the last row in the table if(nextRow == null) { nextRow = this.activeCell.cell.getParent('tbody').getFirst(); } nextCell = nextRow.getFirst(jxCellClass); } var data = nextCell.retrieve('jxCellData'); i++; // if all columns are set to uneditable during runtime, jump out of the loop after // running through 2 times to prevent an endless-loop and browser crash :) if(i == sumCols*2) { this.deactivate(save); return; } }while(!data.col.options.isEditable); if(save === false) { this.deactivate(save); } this.grid.selection.select(nextCell); } }, |
|
var nextCell = true, nextRow = true; var i = 0; do { nextCell = i > 0 ? nextCell.getNext() : this.activeCell.cell.getNext(); if(nextCell == null) { nextRow = this.activeCell.cell.getParent('tr').getNext(); if(nextRow == null) { nextRow = this.activeCell.cell.getParent('tbody').getFirst(); | if(this.activeCell.cell != null) { var nextCell = true, nextRow = true; var i = 0; do { nextCell = i > 0 ? nextCell.getNext() : this.activeCell.cell.getNext(); if(nextCell == null) { nextRow = this.activeCell.cell.getParent('tr').getNext(); if(nextRow == null) { nextRow = this.activeCell.cell.getParent('tbody').getFirst(); } nextCell = nextRow.getFirst(); | getNextCellInRow: function(save) { save = $defined(save) ? save : true; var nextCell = true, nextRow = true; var i = 0; do { nextCell = i > 0 ? nextCell.getNext() : this.activeCell.cell.getNext(); // check if cell is still in row, otherwise returns null if(nextCell == null) { nextRow = this.activeCell.cell.getParent('tr').getNext(); // check if this was the last row in the table if(nextRow == null) { nextRow = this.activeCell.cell.getParent('tbody').getFirst(); } nextCell = nextRow.getFirst(); } var data = nextCell.retrieve('jxCellData'), row = data.row, index = data.index; i++; }while(!data.col.options.isEditable); if(save === false) { this.deactivate(save); } this.grid.selection.select(nextCell); }, |
nextCell = nextRow.getFirst(); | var data = nextCell.retrieve('jxCellData'), row = data.row, index = data.index; i++; }while(!data.col.options.isEditable); if(save === false) { this.deactivate(save); | getNextCellInRow: function(save) { save = $defined(save) ? save : true; var nextCell = true, nextRow = true; var i = 0; do { nextCell = i > 0 ? nextCell.getNext() : this.activeCell.cell.getNext(); // check if cell is still in row, otherwise returns null if(nextCell == null) { nextRow = this.activeCell.cell.getParent('tr').getNext(); // check if this was the last row in the table if(nextRow == null) { nextRow = this.activeCell.cell.getParent('tbody').getFirst(); } nextCell = nextRow.getFirst(); } var data = nextCell.retrieve('jxCellData'), row = data.row, index = data.index; i++; }while(!data.col.options.isEditable); if(save === false) { this.deactivate(save); } this.grid.selection.select(nextCell); }, |
var data = nextCell.retrieve('jxCellData'), row = data.row, index = data.index; i++; }while(!data.col.options.isEditable); if(save === false) { this.deactivate(save); | this.grid.selection.select(nextCell); | getNextCellInRow: function(save) { save = $defined(save) ? save : true; var nextCell = true, nextRow = true; var i = 0; do { nextCell = i > 0 ? nextCell.getNext() : this.activeCell.cell.getNext(); // check if cell is still in row, otherwise returns null if(nextCell == null) { nextRow = this.activeCell.cell.getParent('tr').getNext(); // check if this was the last row in the table if(nextRow == null) { nextRow = this.activeCell.cell.getParent('tbody').getFirst(); } nextCell = nextRow.getFirst(); } var data = nextCell.retrieve('jxCellData'), row = data.row, index = data.index; i++; }while(!data.col.options.isEditable); if(save === false) { this.deactivate(save); } this.grid.selection.select(nextCell); }, |
this.grid.selection.select(nextCell); | getNextCellInRow: function(save) { save = $defined(save) ? save : true; var nextCell = true, nextRow = true; var i = 0; do { nextCell = i > 0 ? nextCell.getNext() : this.activeCell.cell.getNext(); // check if cell is still in row, otherwise returns null if(nextCell == null) { nextRow = this.activeCell.cell.getParent('tr').getNext(); // check if this was the last row in the table if(nextRow == null) { nextRow = this.activeCell.cell.getParent('tbody').getFirst(); } nextCell = nextRow.getFirst(); } var data = nextCell.retrieve('jxCellData'), row = data.row, index = data.index; i++; }while(!data.col.options.isEditable); if(save === false) { this.deactivate(save); } this.grid.selection.select(nextCell); }, |
|
} else if (c[i].nodeType==n2i.ELEMENT_NODE) { txt+=n2i.dom.getNodeText(c[i]); | getNodeText : function(node) { var txt = ''; var c = node.childNodes; for (var i=0; i < c.length; i++) { if (c[i].nodeType==n2i.TEXT_NODE && c[i].nodeValue!=null) { txt+=c[i].nodeValue; } }; return txt; }, |
|
return this.service.getString('hudson.openpage'); | return this.service.getString('extensions.hudson.buildmonitor.openpage'); | getOpenPage: function() { return this.service.getString('hudson.openpage'); }, |
'SipUri': ourParsedResponse.OwnUriList[i].SipUri, | 'SipUri': ourParsedResponse.OwnUriList[i].SipUri | getOwnUriList: function () { this.log("*** getOwnUriList *** BEGIN ***"); if (!this.isLoggedIn) { this.log("*** getOwnUriList *** USER NOT LOGGED IN ***"); return; } var result = function(ourParsedResponse, aXML){ if (ourParsedResponse.StatusCode && ourParsedResponse.StatusCode == 200) { if (ourParsedResponse.OwnUriList.length > 0) { // clear old list var uriList = []; _sgffx.ownUriList = {"voice": [], "text": [], "fax": []}; for (var i = 0; i < ourParsedResponse.OwnUriList.length; i++) { uriList.push(ourParsedResponse.OwnUriList[i].SipUri); for (var k = 0; k < ourParsedResponse.OwnUriList[i].TOS.length; k++) { var tmp = bfXMLRPC.utf8decode(ourParsedResponse.OwnUriList[i].UriAlias); var extensionInfo = { 'UriAlias': tmp, 'DefaultUri': ourParsedResponse.OwnUriList[i].DefaultUri, 'E164In': ourParsedResponse.OwnUriList[i].E164In, 'E164Out': ourParsedResponse.OwnUriList[i].E164Out, 'SipUri': ourParsedResponse.OwnUriList[i].SipUri, }; _sgffx.ownUriList[ourParsedResponse.OwnUriList[i].TOS[k]].push(extensionInfo); if (ourParsedResponse.OwnUriList[i].DefaultUri === true) { _sgffx.defaultExtension[ourParsedResponse.OwnUriList[i].TOS[k]] = { 'alias': (ourParsedResponse.OwnUriList[i].UriAlias!='' ? ourParsedResponse.OwnUriList[i].UriAlias : ourParsedResponse.OwnUriList[i].SipUri), 'extensionSipUri': ourParsedResponse.OwnUriList[i].SipUri }; } } } var defaultExtensionPref = _sgffx.getPref("extensions.sipgateffx.defaultExtension", "char"); if (uriList.indexOf(defaultExtensionPref) == -1) { _sgffx.setPref("extensions.sipgateffx.defaultExtension", _sgffx.defaultExtension.voice.extensionSipUri, "char"); } } } }; try { this._rpcCall("samurai.OwnUriListGet", {}, result); } catch(e) { this.log('Exception in xmlrpc-request: ' + e); this.log('Request sent: ' + request); } this.log("*** getOwnUriList *** END ***"); }, |
return [query, this.characteristic.categoryUri]; | return [query, this.characteristic.categoryUri, this.taxonId]; | getParams : function(query) { return [query, this.characteristic.categoryUri]; }, |
} else { return null; | getPosition : function () { if ($defined(this.data)) { return this.index; } else { return null; } }, |
|
return null; | getPosition : function () { if ($defined(this.data)) { return this.index; } else { return null; } }, |
|
var prevRow, prevCell; prevRow = this.activeCell.cell.getParent().getPrevious(); if(prevRow == null) { prevRow = this.activeCell.cell.getParent('tbody').getLast(); | if(this.activeCell.cell != null) { var prevRow, prevCell; prevRow = this.activeCell.cell.getParent().getPrevious(); if(prevRow == null) { prevRow = this.activeCell.cell.getParent('tbody').getLast(); } prevCell = prevRow.getElement('td.jxGridCol'+this.activeCell.coords.index); if(save === false) { this.deactivate(save); } this.grid.selection.select(prevCell); | getPrevCellInCol : function(save) { save = $defined(save) ? save : true; var prevRow, prevCell; prevRow = this.activeCell.cell.getParent().getPrevious(); if(prevRow == null) { prevRow = this.activeCell.cell.getParent('tbody').getLast(); } prevCell = prevRow.getElement('td.jxGridCol'+this.activeCell.coords.index); if(save === false) { this.deactivate(save); } this.grid.selection.select(prevCell); }, |
prevCell = prevRow.getElement('td.jxGridCol'+this.activeCell.coords.index); if(save === false) { this.deactivate(save); } this.grid.selection.select(prevCell); | getPrevCellInCol : function(save) { save = $defined(save) ? save : true; var prevRow, prevCell; prevRow = this.activeCell.cell.getParent().getPrevious(); if(prevRow == null) { prevRow = this.activeCell.cell.getParent('tbody').getLast(); } prevCell = prevRow.getElement('td.jxGridCol'+this.activeCell.coords.index); if(save === false) { this.deactivate(save); } this.grid.selection.select(prevCell); }, |
|
var prevCell, prevRow, i = 0; | var prevCell, prevRow, i = 0, sumCols = this.grid.columns.columns.length; | getPrevCellInRow: function(save) { save = $defined(save) ? save : true; if(this.activeCell.cell != null) { var prevCell, prevRow, i = 0; do { prevCell = i > 0 ? prevCell.getPrevious() : this.activeCell.cell.getPrevious(); // check if cell is still in row, otherwise returns null if(prevCell == null) { prevRow = this.activeCell.cell.getParent('tr').getPrevious(); // check if this was the last row in the table if(prevRow == null) { // @todo this does not always work when shift+tab is hold pressed (out of grid error) prevRow = this.activeCell.cell.getParent('tbody').getLast(); } prevCell = prevRow.getLast(); } var data = prevCell.retrieve('jxCellData'), row = data.row, index = data.index; i++; }while(!data.col.options.isEditable); if(save === false) { this.deactivate(save); } this.grid.selection.select(prevCell); } }, |
if(i == sumCols*2) { this.deactivate(save); return; } | getPrevCellInRow: function(save) { save = $defined(save) ? save : true; if(this.activeCell.cell != null) { var prevCell, prevRow, i = 0; do { prevCell = i > 0 ? prevCell.getPrevious() : this.activeCell.cell.getPrevious(); // check if cell is still in row, otherwise returns null if(prevCell == null) { prevRow = this.activeCell.cell.getParent('tr').getPrevious(); // check if this was the last row in the table if(prevRow == null) { // @todo this does not always work when shift+tab is hold pressed (out of grid error) prevRow = this.activeCell.cell.getParent('tbody').getLast(); } prevCell = prevRow.getLast(); } var data = prevCell.retrieve('jxCellData'), row = data.row, index = data.index; i++; }while(!data.col.options.isEditable); if(save === false) { this.deactivate(save); } this.grid.selection.select(prevCell); } }, |
|
if(prevRow == null) { | if(prevRow == null && this.options.keypressLoop) { | getPrevCellInRow: function(save) { save = $defined(save) ? save : true; if(this.activeCell.cell != null) { var prevCell, prevRow, i = 0, sumCols = this.grid.columns.columns.length, jxCellClass = 'td.jxGridCell'; do { prevCell = i > 0 ? prevCell.getPrevious(jxCellClass) : this.activeCell.cell.getPrevious(jxCellClass); // check if cell is still in row, otherwise returns null if(prevCell == null) { prevRow = this.activeCell.cell.getParent('tr').getPrevious(); // check if this was the last row in the table if(prevRow == null) { // @todo this does not always work when shift+tab is hold pressed (out of grid error) prevRow = this.activeCell.cell.getParent('tbody').getLast(); } prevCell = prevRow.getLast(jxCellClass); } var data = prevCell.retrieve('jxCellData'), row = data.row, index = data.index; i++; // if all columns are set to uneditable during runtime, jump out of the loop after // running through 2 times to prevent an endless-loop and browser crash :) if(i == sumCols*2) { this.deactivate(save); return; } }while(!data.col.options.isEditable); if(save === false) { this.deactivate(save); } this.grid.selection.select(prevCell); } }, |
}else if(prevRow == null && !this.options.keypressLoop) { return; | getPrevCellInRow: function(save) { save = $defined(save) ? save : true; if(this.activeCell.cell != null) { var prevCell, prevRow, i = 0, sumCols = this.grid.columns.columns.length, jxCellClass = 'td.jxGridCell'; do { prevCell = i > 0 ? prevCell.getPrevious(jxCellClass) : this.activeCell.cell.getPrevious(jxCellClass); // check if cell is still in row, otherwise returns null if(prevCell == null) { prevRow = this.activeCell.cell.getParent('tr').getPrevious(); // check if this was the last row in the table if(prevRow == null) { // @todo this does not always work when shift+tab is hold pressed (out of grid error) prevRow = this.activeCell.cell.getParent('tbody').getLast(); } prevCell = prevRow.getLast(jxCellClass); } var data = prevCell.retrieve('jxCellData'), row = data.row, index = data.index; i++; // if all columns are set to uneditable during runtime, jump out of the loop after // running through 2 times to prevent an endless-loop and browser crash :) if(i == sumCols*2) { this.deactivate(save); return; } }while(!data.col.options.isEditable); if(save === false) { this.deactivate(save); } this.grid.selection.select(prevCell); } }, |
|
var prevCell, prevRow, i = 0; do { prevCell = i > 0 ? prevCell.getPrevious() : this.activeCell.cell.getPrevious(); if(prevCell == null) { prevRow = this.activeCell.cell.getParent('tr').getPrevious(); if(prevRow == null) { prevRow = this.activeCell.cell.getParent('tbody').getLast(); | if(this.activeCell.cell != null) { var prevCell, prevRow, i = 0; do { prevCell = i > 0 ? prevCell.getPrevious() : this.activeCell.cell.getPrevious(); if(prevCell == null) { prevRow = this.activeCell.cell.getParent('tr').getPrevious(); if(prevRow == null) { prevRow = this.activeCell.cell.getParent('tbody').getLast(); } prevCell = prevRow.getLast(); | getPrevCellInRow: function(save) { save = $defined(save) ? save : true; var prevCell, prevRow, i = 0; do { prevCell = i > 0 ? prevCell.getPrevious() : this.activeCell.cell.getPrevious(); // check if cell is still in row, otherwise returns null if(prevCell == null) { prevRow = this.activeCell.cell.getParent('tr').getPrevious(); // check if this was the last row in the table if(prevRow == null) { // @todo this does not always work when shift+tab is hold pressed (out of grid error) prevRow = this.activeCell.cell.getParent('tbody').getLast(); } prevCell = prevRow.getLast(); } var data = prevCell.retrieve('jxCellData'), row = data.row, index = data.index; i++; }while(!data.col.options.isEditable); if(save === false) { this.deactivate(save); } this.grid.selection.select(prevCell); }, |
prevCell = prevRow.getLast(); | var data = prevCell.retrieve('jxCellData'), row = data.row, index = data.index; i++; }while(!data.col.options.isEditable); if(save === false) { this.deactivate(save); | getPrevCellInRow: function(save) { save = $defined(save) ? save : true; var prevCell, prevRow, i = 0; do { prevCell = i > 0 ? prevCell.getPrevious() : this.activeCell.cell.getPrevious(); // check if cell is still in row, otherwise returns null if(prevCell == null) { prevRow = this.activeCell.cell.getParent('tr').getPrevious(); // check if this was the last row in the table if(prevRow == null) { // @todo this does not always work when shift+tab is hold pressed (out of grid error) prevRow = this.activeCell.cell.getParent('tbody').getLast(); } prevCell = prevRow.getLast(); } var data = prevCell.retrieve('jxCellData'), row = data.row, index = data.index; i++; }while(!data.col.options.isEditable); if(save === false) { this.deactivate(save); } this.grid.selection.select(prevCell); }, |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.