code
stringlengths 12
2.05k
| label_name
stringclasses 5
values | label
int64 0
4
|
---|---|---|
drag : function(e, ui) {
var helper = ui.helper;
if (helper.data('refreshPositions') && $(this).draggable('instance')) {
if (helper.data('refreshPositions') > 0) {
$(this).draggable('option', { refreshPositions : true });
helper.data('refreshPositions', -1);
} else {
$(this).draggable('option', { refreshPositions : false });
helper.data('refreshPositions', null);
}
}
}, | Base | 1 |
$scope.addRequisition = function() {
bootbox.prompt('A requisition is required, please enter the name for a new requisition', function(foreignSource) {
if (foreignSource) {
RequisitionsService.addRequisition(foreignSource).then(
function() { // success
RequisitionsService.synchronizeRequisition(foreignSource, false).then(
function() {
growl.success('The requisition ' + foreignSource + ' has been created and synchronized.');
$scope.foreignSources.push(foreignSource);
},
$scope.errorHandler
);
},
$scope.errorHandler
);
} else {
window.location.href = Util.getBaseHref() + 'admin/opennms/index.jsp'; // TODO Is this the best way ?
}
});
}; | Compound | 4 |
mxShape.prototype.clear=function(){if(null!=this.node.ownerSVGElement)for(;null!=this.node.lastChild;)this.node.removeChild(this.node.lastChild);else this.node.style.cssText="position:absolute;"+(null!=this.cursor?"cursor:"+this.cursor+";":""),this.node.innerHTML=""}; | Base | 1 |
Q.marginBottom||0;R.allowGaps=Q.allowGaps||0;R.horizontal="1"==mxUtils.getValue(Q,"horizontalRack","0");R.resizeParent=!1;R.fill=!0;return R}return T.apply(this,arguments)};this.updateGlobalUrlVariables()};var B=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(u,E){return Graph.processFontStyle(B.apply(this,arguments))};var I=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(u,E,J,T,N,Q,R,Y,ba,ea,Z){I.apply(this,arguments);Graph.processFontAttributes(Z)}; | Class | 2 |
setup: function () {
var data = this.model.get('data') || {};
this.emailId = data.emailId;
this.emailName = data.emailName;
if (
this.parentModel
&&
(this.model.get('parentType') == this.parentModel.name && this.model.get('parentId') == this.parentModel.id)
) {
if (this.model.get('post')) {
this.createField('post', null, null, 'views/stream/fields/post');
this.hasPost = true;
}
if ((this.model.get('attachmentsIds') || []).length) {
this.createField('attachments', 'attachmentMultiple', {}, 'views/stream/fields/attachment-multiple');
this.hasAttachments = true;
}
}
this.messageData['email'] = '<a href="#Email/view/' + data.emailId + '">' + data.emailName + '</a>';
this.messageName = 'emailSent';
this.messageData['by'] = '<a href="#'+data.personEntityType+'/view/' + data.personEntityId + '">' + data.personEntityName + '</a>';
if (this.isThis) {
this.messageName += 'This';
}
this.createMessage();
}, | Base | 1 |
function(z){var L=null;null!=z&&0<z.length&&(z=JSON.parse(z),L=new mxImage(z.src,z.width,z.height));return L};Graph.prototype.getBackgroundImageObject=function(z){return z};Graph.prototype.getSvg=function(z,L,M,T,ca,ia,ma,pa,ua,ya,Fa,Ma,Oa,Qa){var Ta=null;if(null!=Qa)for(Ta=new mxDictionary,Fa=0;Fa<Qa.length;Fa++)Ta.put(Qa[Fa],!0);if(Qa=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{L=null!=L?L:1;M=null!=M?M:0;ca=null!=ca?ca:!0;ia=null!=ia?ia:!0;ma= | Class | 2 |
function _typed(name, signatures) {
var refs = new Refs();
// parse signatures, expand them
var _signatures = parseSignatures(signatures);
if (_signatures.length == 0) {
throw new Error('No signatures provided');
}
// filter all any type signatures
var anys = filterAnyTypeSignatures(_signatures);
// parse signatures into a node tree
var node = parseTree(_signatures, [], anys);
//var util = require('util');
//console.log('ROOT');
//console.log(util.inspect(node, { depth: null }));
// generate code for the typed function
var code = [];
var _name = name || '';
var _args = getArgs(maxParams(_signatures));
code.push('function ' + _name + '(' + _args.join(', ') + ') {');
code.push(' "use strict";');
code.push(' var name = \'' + _name + '\';');
code.push(node.toCode(refs, ' ', false));
code.push('}');
// generate body for the factory function
var body = [
refs.toCode(),
'return ' + code.join('\n')
].join('\n');
// evaluate the JavaScript code and attach function references
var factory = (new Function(refs.name, 'createError', body));
var fn = factory(refs, createError);
//console.log('FN\n' + fn.toString()); // TODO: cleanup
// attach the signatures with sub-functions to the constructed function
fn.signatures = mapSignatures(_signatures);
return fn;
} | Class | 2 |
Za.decode(La,Wa);La=Wa.root.getChildAt(0).children;b.sidebar.createTooltip(na,La,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ya?mxResources.get(ya,null,ya):null,!0,new mxPoint(Ta,Ua),!0,function(){Ya=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;y(na,null,null,pa,fa,ia)},!0,!1)}}function oa(La,Ta){null==pa||Ra||
b.sidebar.currentElt==na?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),null!=Sa?(Ta='<mxfile><diagram id="d" name="n">'+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+Sa.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+Sa.naturalWidth+'" height="'+Sa.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>",qa(Ta,mxEvent.getClientX(La),mxEvent.getClientY(La))):(b.sidebar.currentElt=
na,Ra=!0,ma(pa,function(Ua){Ra&&b.sidebar.currentElt==na&&qa(Ua,mxEvent.getClientX(La),mxEvent.getClientY(La));Ra=!1})))}var na=document.createElement("div");na.className="geTemplate";na.style.position="relative";na.style.height=Fa+"px";na.style.width=xa+"px";var Ja=null,Ga=pa;Editor.isDarkMode()&&(na.style.filter="invert(100%)");null!=ya?na.setAttribute("title",mxResources.get(ya,null,ya)):null!=va&&0<va.length&&na.setAttribute("title",va);var Ra=!1,Sa=null;if(null!=wa){na.style.display="inline-flex"; | Base | 1 |
1;A(l?0:e,l?e:0,e,e);v.fillStyle=k.cornerClr;v.fillRect(0,0,e,e)},L=-1,M=function(){null!=D?(null!=c&&c(L),L=D(z)):z()};this.drawRuler=M;this.sizeListener=f=t(function(){var n=x.container;l?(n=n.offsetHeight+e,q.height!=n&&(q.height=n,m.style.height=n+"px",M())):(n=n.offsetWidth+e,q.width!=n&&(q.width=n,m.style.width=n+"px",M()))},10);this.pageListener=function(){M()};this.scrollListener=d=t(function(){var n=l?x.container.scrollTop:x.container.scrollLeft;g.lastScroll!=n&&(g.lastScroll=n,M())},10); | Class | 2 |
q=g.isEventsEnabled();g.setEventsEnabled(!1);var r=this.graph.isEnabled();this.graph.setEnabled(!1);var t=g.getTranslate();g.translate=new mxPoint(a,b);var u=this.graph.cellRenderer.redraw,x=g.states;a=g.scale;if(this.clipping){var y=new mxRectangle((f.x+t.x)*a,(f.y+t.y)*a,f.width*a/p,f.height*a/p),C=this;this.graph.cellRenderer.redraw=function(B,z,v){if(null!=B){var D=x.get(B.cell);if(null!=D&&(D=g.getBoundingBox(D,!1),null!=D&&0<D.width&&0<D.height&&!mxUtils.intersects(y,D))||!C.isCellVisible(B.cell))return}u.apply(this,
arguments)}}a=null;try{var A=[this.getRoot()];a=new mxTemporaryCellStates(g,c,A,null,mxUtils.bind(this,function(B){return this.getLinkForCellState(B)}))}finally{if(mxClient.IS_IE)g.overlayPane.innerHTML="",g.canvas.style.overflow="hidden",g.canvas.style.position="relative",g.canvas.style.top=this.marginTop+"px",g.canvas.style.width=f.width+"px",g.canvas.style.height=f.height+"px";else for(c=e.firstChild;null!=c;)A=c.nextSibling,b=c.nodeName.toLowerCase(),"svg"==b?(c.style.overflow="hidden",c.style.position= | Base | 1 |
this.menus.addPopupMenuEditItems=function(D,G,P){d.editor.graph.isSelectionEmpty()?B.apply(this,arguments):d.menus.addMenuItems(D,"delete - cut copy copyAsImage - duplicate".split(" "),null,P)}}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=d.pages&&1<d.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var I=g.getExportVariables;g.getExportVariables=function(){var D=I.apply(this,arguments),G=d.getCurrentFile();null!=
G&&(D.filename=G.getTitle());D.pagecount=null!=d.pages?d.pages.length:1;D.page=null!=d.currentPage?d.currentPage.getName():"";D.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return D};var O=g.getGlobalVariable;g.getGlobalVariable=function(D){var G=d.getCurrentFile();return"filename"==D&&null!=G?G.getTitle():"page"==D&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==D?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1: | Class | 2 |
delete_row(row_id) {
var tr = document.getElementById(row_id);
var array = this.__get_array_from_DOM_row(tr);
var data_index = this.__find_array_index(array, this.data);
tr.outerHTML = "";
this.data.splice(data_index, 1);
} | Base | 1 |
addLinkHtml: function (id, name) {
if (this.mode == 'search') {
return Dep.prototype.addLinkHtml.call(this, id, name);
}
var $container = this.$el.find('.link-container');
var $el = $('<div class="form-inline list-group-item link-with-role clearfix link-group-item-with-primary">').addClass('link-' + id).attr('data-id', id);
var nameHtml = '<div>' + name + ' ' + '</div>';
var removeHtml = '<a href="javascript:" class="pull-right" data-id="' + id + '" data-action="clearLink"><span class="fas fa-times"></a>';
$left = $('<div>');
$left.append(nameHtml);
$el.append($left);
$right = $('<div>');
$right.append(removeHtml);
$el.append($right);
var isPrimary = (id == this.primaryId);
var iconHtml = '<span class="fas fa-star fa-sm ' + (!isPrimary ? 'text-muted' : '') + '"></span>';
var title = this.translate('Primary');
var $primary = $('<button type="button" class="btn btn-link btn-sm pull-right hidden" title="'+title+'" data-action="switchPrimary" data-id="'+id+'">'+iconHtml+'</button>');
$primary.insertBefore($el.children().first().children().first());
$container.append($el);
this.managePrimaryButton();
return $el;
}, | Base | 1 |
d.addHours=function(a,c){return d.addMinutes(a,60*c)};d.addMinutes=function(a,c){return d.addSeconds(a,60*c)};d.addSeconds=function(a,c){return d.addMilliseconds(a,1E3*c)};d.addMilliseconds=function(a,c){return new Date(a.getTime()+c)};d.subtract=function(a,c){var b=a.getTime()-c.getTime();return{toMilliseconds:function(){return b},toSeconds:function(){return b/1E3},toMinutes:function(){return b/6E4},toHours:function(){return b/36E5},toDays:function(){return b/864E5}}};d.isLeapYear=function(a){return!(a% | Class | 2 |
"startWidth",this.defaultArrowWidth)};Ca.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ca.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Ca);mxUtils.extend(Ra,mxActor);Ra.prototype.size=30;Ra.prototype.isRoundable=function(){return!0};Ra.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,parseFloat(mxUtils.getValue(this.style,
"size",this.size)));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(0,l),new mxPoint(p,0),new mxPoint(p,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("manualInput",Ra);mxUtils.extend(ab,mxRectangleShape);ab.prototype.dx=20;ab.prototype.dy=20;ab.prototype.isHtmlAllowed=function(){return!1};ab.prototype.paintForeground=function(c,l,x,p,v){mxRectangleShape.prototype.paintForeground.apply(this,arguments); | Base | 1 |
function jqMix(obj, props){
// summary:
// an attempt at a mixin that follows
// jquery's .extend rules. Seems odd. Not sure how
// to resolve this with dojo.mixin and what the use
// cases are for the jquery version.
// Copying some code from dojo._mixin.
if(obj == props){
return obj;
}
var tobj = {};
for(var x in props){
// the "tobj" condition avoid copying properties in "props"
// inherited from Object.prototype. For example, if obj has a custom
// toString() method, don't overwrite it with the toString() method
// that props inherited from Object.prototype
if((tobj[x] === undefined || tobj[x] != props[x]) && props[x] !== undefined && obj != props[x]){
if(dojo.isObject(obj[x]) && dojo.isObject(props[x])){
if(dojo.isArray(props[x])){
obj[x] = props[x];
}else{
obj[x] = jqMix(obj[x], props[x]);
}
}else{
obj[x] = props[x];
}
}
}
// IE doesn't recognize custom toStrings in for..in
if(dojo.isIE && props){
var p = props.toString;
if(typeof p == "function" && p != obj.toString && p != tobj.toString &&
p != "\nfunction toString() {\n [native code]\n}\n"){
obj.toString = props.toString;
}
}
return obj; // Object
} | Class | 2 |
applyPatch: function(oldStr, uniDiff) {
var diffstr = uniDiff.split('\n');
var diff = [];
var remEOFNL = false,
addEOFNL = false;
for (var i = (diffstr[0][0]==='I'?4:0); i < diffstr.length; i++) {
if(diffstr[i][0] === '@') {
var meh = diffstr[i].split(/@@ -(\d+),(\d+) \+(\d+),(\d+) @@/);
diff.unshift({
start:meh[3],
oldlength:meh[2],
oldlines:[],
newlength:meh[4],
newlines:[]
});
} else if(diffstr[i][0] === '+') {
diff[0].newlines.push(diffstr[i].substr(1));
} else if(diffstr[i][0] === '-') {
diff[0].oldlines.push(diffstr[i].substr(1));
} else if(diffstr[i][0] === ' ') {
diff[0].newlines.push(diffstr[i].substr(1));
diff[0].oldlines.push(diffstr[i].substr(1));
} else if(diffstr[i][0] === '\\') {
if (diffstr[i-1][0] === '+') {
remEOFNL = true;
} else if(diffstr[i-1][0] === '-') {
addEOFNL = true;
}
}
}
var str = oldStr.split('\n');
for (var i = diff.length - 1; i >= 0; i--) {
var d = diff[i];
for (var j = 0; j < d.oldlength; j++) {
if(str[d.start-1+j] !== d.oldlines[j]) {
return false;
}
}
Array.prototype.splice.apply(str,[d.start-1,+d.oldlength].concat(d.newlines));
}
if (remEOFNL) {
while (!str[str.length-1]) {
str.pop();
}
} else if (addEOFNL) {
str.push('');
}
return str.join('\n');
}, | Base | 1 |
function(I){mxEvent.isConsumed(I)||((mxEvent.isControlDown(I)||mxClient.IS_MAC&&mxEvent.isMetaDown(I))&&13==I.keyCode?(D.click(),mxEvent.consume(I)):27==I.keyCode&&(n.click(),mxEvent.consume(I)))}));D.focus();D.className="geCommentEditBtn gePrimaryBtn";Y.appendChild(D);F.insertBefore(Y,O);V.style.display="none";O.style.display="none";U.focus()}function e(H,F){F.innerHTML="";H=new Date(H.modifiedDate);var J=b.timeSince(H);null==J&&(J=mxResources.get("lessThanAMinute"));mxUtils.write(F,mxResources.get("timeAgo",
[J],"{1} ago"));F.setAttribute("title",H.toLocaleDateString()+" "+H.toLocaleTimeString())}function g(H){var F=document.createElement("img");F.className="geCommentBusyImg";F.src=IMAGE_PATH+"/spin.gif";H.appendChild(F);H.busyImg=F}function k(H){H.style.border="1px solid red";H.removeChild(H.busyImg)}function m(H){H.style.border="";H.removeChild(H.busyImg)}function p(H,F,J,R,W){function O(Q,P,T){var X=document.createElement("li");X.className="geCommentAction";var ba=document.createElement("a");ba.className= | Base | 1 |
exports.expressCreateServer = function (hook_name, args, cb) {
args.app.get('/tests/frontend/specs_list.js', function(req, res){
async.parallel({
coreSpecs: function(callback){
exports.getCoreTests(callback);
},
pluginSpecs: function(callback){
exports.getPluginTests(callback);
}
},
function(err, results){
var files = results.coreSpecs; // push the core specs to a file object
files = files.concat(results.pluginSpecs); // add the plugin Specs to the core specs
console.debug("Sent browser the following test specs:", files.sort());
res.send("var specs_list = " + JSON.stringify(files.sort()) + ";\n");
});
});
var url2FilePath = function(url){
var subPath = url.substr("/tests/frontend".length);
if (subPath == ""){
subPath = "index.html"
}
subPath = subPath.split("?")[0];
var filePath = path.normalize(npm.root + "/../tests/frontend/")
filePath += subPath.replace("..", "");
return filePath;
}
args.app.get('/tests/frontend/specs/*', function (req, res) {
var specFilePath = url2FilePath(req.url);
var specFileName = path.basename(specFilePath);
fs.readFile(specFilePath, function(err, content){
if(err){ return res.send(500); }
content = "describe(" + JSON.stringify(specFileName) + ", function(){ " + content + " });";
res.send(content);
});
});
args.app.get('/tests/frontend/*', function (req, res) {
var filePath = url2FilePath(req.url);
res.sendfile(filePath);
});
args.app.get('/tests/frontend', function (req, res) {
res.redirect('/tests/frontend/');
});
} | Base | 1 |
function initSocket(server, store) {
socket = new SocketIO(server, adapter.config, adapter, objects, states, store);
socket.subscribe(null, 'objectChange', '*');
}
| Base | 1 |
labels: templateInstance.topTasks.get().map((task) => task._id), | Base | 1 |
mxShape.prototype.clear=function(){if(null!=this.node.ownerSVGElement)for(;null!=this.node.lastChild;)this.node.removeChild(this.node.lastChild);else this.node.style.cssText="position:absolute;"+(null!=this.cursor?"cursor:"+this.cursor+";":""),this.node.innerHTML=""}; | Base | 1 |
this.error = function() {
var arg = arguments[0];
return arguments.length == 1 && typeof(arg) == 'function'
? self.bind('error', arg)
: self.trigger('error', {error : arg});
} | Base | 1 |
"url("+Editor.plusImage+")",ta.setAttribute("title",mxResources.get("insert")),ta.style.width="24px",Na=!0)}));Ca();U.addListener("darkModeChanged",Ca);U.addListener("sketchModeChanged",Ca)}else U.editor.addListener("statusChanged",mxUtils.bind(this,function(){U.setStatusText(U.editor.getStatus())}));if(null!=J){var Ra=function(za){I.popupMenuHandler.hideMenu();mxEvent.isAltDown(za)||mxEvent.isShiftDown(za)?U.actions.get("customZoom").funct():U.actions.get("smartFit").funct()},ab=U.actions.get("zoomIn"), | Base | 1 |
exports.list = function(failures){
console.error();
failures.forEach(function(test, i){
// format
var fmt = color('error title', ' %s) %s:\n')
+ color('error message', ' %s')
+ color('error stack', '\n%s\n');
// msg
var err = test.err
, message = err.message || ''
, stack = err.stack || message
, index = stack.indexOf(message) + message.length
, msg = stack.slice(0, index)
, actual = err.actual
, expected = err.expected
, escape = true;
// uncaught
if (err.uncaught) {
msg = 'Uncaught ' + msg;
}
// explicitly show diff
if (err.showDiff && sameType(actual, expected)) {
escape = false;
err.actual = actual = stringify(canonicalize(actual));
err.expected = expected = stringify(canonicalize(expected));
}
// actual / expected diff
if ('string' == typeof actual && 'string' == typeof expected) {
fmt = color('error title', ' %s) %s:\n%s') + color('error stack', '\n%s\n');
var match = message.match(/^([^:]+): expected/);
msg = '\n ' + color('error message', match ? match[1] : msg);
if (exports.inlineDiffs) {
msg += inlineDiff(err, escape);
} else {
msg += unifiedDiff(err, escape);
}
}
// indent stack trace without msg
stack = stack.slice(index ? index + 1 : index)
.replace(/^/gm, ' ');
console.error(fmt, (i + 1), test.fullTitle(), msg, stack);
});
}; | Base | 1 |
na},null,null,null,ma,x?null:[]),b.showDialog(ha.container,350,80,!0,!0),ha.init())}}function L(ha){za.innerHTML=mxUtils.htmlEntities(mxResources.get(Z||ha?"create":"copy"));ha=ha?"none":"";p&&(Ga.style.display=ha);for(var da=M.querySelectorAll(".geTempDlgLinkToDiagram"),ca=0;ca<da.length;ca++)da[ca].style.display=ha}function C(ha,da,ca,la,ia){ia||(aa.innerHTML="",t(),R=ha,Y=la);var ma=null;if(ca){ma=document.createElement("table");ma.className="geTempDlgDiagramsListGrid";var qa=document.createElement("tr"), | Base | 1 |
null!=this.linkHint&&(this.linkHint.style.visibility="")};var Za=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(c,l,x){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=x?x:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function n(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function t(){mxActor.call(this)}function F(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function m(){mxShape.call(this)}function q(){mxShape.call(this)} | Class | 2 |
var filter = function(data) {
if (data) {
data = data.replace(new RegExp('<!--(.*?)-->', 'gsi'), '');
}
var span = document.createElement('span');
span.innerHTML = data;
parse(span);
return span;
}
| Base | 1 |
m=P.name;v="";O(null,!0)})));k.appendChild(F)})(D[G],G)}100==D.length&&(k.appendChild(A),B=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&C()},mxEvent.addListener(k,"scroll",B))}),y)});t()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes}; | Base | 1 |
H.x+" "+H.y;S="";d=[];for(V=2;V<x.length;V+=2)H=P(V),S+=" L"+H.x+" "+H.y,d.push(H);c.setAttribute("d",n+S)}p&&(H=b.view.translate,b.scrollRectToVisible((new mxRectangle(K.x-H.x,K.y-H.y)).grow(20)));F.consume()}}),mouseUp:mxUtils.bind(this,function(K,F){c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(z(F.getEvent()),F.consume())})});var D=function(K){return mxUtils.convertPoint(b.container,mxEvent.getClientX(K),mxEvent.getClientY(K))},G=function(K){for(x.push(K);x.length>f;)x.shift()},P= | Class | 2 |
(function(a){function e(h){var k,j=this,l=h.data||{};if(l.elem)j=h.dragTarget=l.elem,h.dragProxy=d.proxy||j,h.cursorOffsetX=l.pageX-l.left,h.cursorOffsetY=l.pageY-l.top,h.offsetX=h.pageX-h.cursorOffsetX,h.offsetY=h.pageY-h.cursorOffsetY;else if(d.dragging||l.which>0&&h.which!=l.which||a(h.target).is(l.not))return;switch(h.type){case"mousedown":return a.extend(l,a(j).offset(),{elem:j,target:h.target,pageX:h.pageX,pageY:h.pageY}),b.add(document,"mousemove mouseup",e,l),i(j,!1),d.dragging=null,!1;case!d.dragging&&"mousemove":if(g(h.pageX-l.pageX)+g(h.pageY-l.pageY)<l.distance)break;h.target=l.target,k=f(h,"dragstart",j),k!==!1&&(d.dragging=j,d.proxy=h.dragProxy=a(k||j)[0]);case"mousemove":if(d.dragging){if(k=f(h,"drag",j),c.drop&&(c.drop.allowed=k!==!1,c.drop.handler(h)),k!==!1)break;h.type="mouseup"}case"mouseup":b.remove(document,"mousemove mouseup",e),d.dragging&&(c.drop&&c.drop.handler(h),f(h,"dragend",j)),i(j,!0),d.dragging=d.proxy=l.elem=!1}return!0}function f(b,c,d){b.type=c;var e=a.event.dispatch.call(d,b);return e===!1?!1:e||b.result}function g(a){return Math.pow(a,2)}function h(){return d.dragging===!1}function i(a,b){a&&(a.unselectable=b?"off":"on",a.onselectstart=function(){return b},a.style&&(a.style.MozUserSelect=b?"":"none"))}a.fn.drag=function(a,b,c){return b&&this.bind("dragstart",a),c&&this.bind("dragend",c),a?this.bind("drag",b?b:a):this.trigger("drag")};var b=a.event,c=b.special,d=c.drag={not:":input",distance:0,which:1,dragging:!1,setup:function(c){c=a.extend({distance:d.distance,which:d.which,not:d.not},c||{}),c.distance=g(c.distance),b.add(this,"mousedown",e,c),this.attachEvent&&this.attachEvent("ondragstart",h)},teardown:function(){b.remove(this,"mousedown",e),this===d.dragging&&(d.dragging=d.proxy=!1),i(this,!0),this.detachEvent&&this.detachEvent("ondragstart",h)}};c.dragstart=c.dragend={setup:function(){},teardown:function(){}}})(jQuery); | Base | 1 |
I.height,Y.y+Y.height)-Math.max(I.y,Y.y))/C))}}P?X=0:Q=0;for(O=0;O<T.length;O++)if(R=x.model.getTerminal(T[O],!1),V==c(R)&&(Y=x.view.getState(R),R!=H&&null!=Y&&(P&&S!=Y.getCenterX()<p.getCenterX()||!P&&S!=Y.getCenterY()<p.getCenterY()))){var da=[];x.traverse(Y.cell,!0,function(ha,Z){var ea=null!=Z&&x.isTreeEdge(Z);ea&&da.push(Z);(null==Z||ea)&&da.push(ha);return null==Z||ea});x.moveCells(da,(S?1:-1)*Q,(S?1:-1)*X)}}}return x.addCells(W,U)}finally{x.model.endUpdate()}}function g(H){x.model.beginUpdate(); | Base | 1 |
!function(a,b,c){function d(b,c){this.element=a(b),this.settings=a.extend({},f,c),this._defaults=f,this._name=e,this.init()}var e="metisMenu",f={toggle:!0,doubleTapToGo:!1};d.prototype={init:function(){var b=this.element,d=this.settings.toggle,f=this;this.isIE()<=9?(b.find("li.active").has("ul").children("ul").collapse("show"),b.find("li").not(".active").has("ul").children("ul").collapse("hide")):(b.find("li.active").has("ul").children("ul").addClass("collapse in"),b.find("li").not(".active").has("ul").children("ul").addClass("collapse")),f.settings.doubleTapToGo&&b.find("li.active").has("ul").children("a").addClass("doubleTapToGo"),b.find("li").has("ul").children("a").on("click."+e,function(b){return b.preventDefault(),f.settings.doubleTapToGo&&f.doubleTapToGo(a(this))&&"#"!==a(this).attr("href")&&""!==a(this).attr("href")?(b.stopPropagation(),void(c.location=a(this).attr("href"))):(a(this).parent("li").toggleClass("active").children("ul").collapse("toggle"),void(d&&a(this).parent("li").siblings().removeClass("active").children("ul.in").collapse("hide")))})},isIE:function(){for(var a,b=3,d=c.createElement("div"),e=d.getElementsByTagName("i");d.innerHTML="<!--[if gt IE "+ ++b+"]><i></i><![endif]-->",e[0];)return b>4?b:a},doubleTapToGo:function(a){var b=this.element;return a.hasClass("doubleTapToGo")?(a.removeClass("doubleTapToGo"),!0):a.parent().children("ul").length?(b.find(".doubleTapToGo").removeClass("doubleTapToGo"),a.addClass("doubleTapToGo"),!1):void 0},remove:function(){this.element.off("."+e),this.element.removeData(e)}},a.fn[e]=function(b){return this.each(function(){var c=a(this);c.data(e)&&c.data(e).remove(),c.data(e,new d(this,b))}),this}}(jQuery,window,document); | Base | 1 |
function customFilter(node) {
//if (node.parent && node.parent.match) return true;
if (that.currentFilter) {
if (!that.data[node.key]) return false;
var title = that.data[node.key].title;
if (title && typeof title === 'object') {
title = title[systemLang] || title.en;
}
var desc = that.data[node.key].desc;
if (desc && typeof desc === 'object') {
desc = desc[systemLang] || desc.en;
}
if ((that.data[node.key].name && that.data[node.key].name.toLowerCase().indexOf(that.currentFilter) !== -1) ||
(title && title.toLowerCase().indexOf(that.currentFilter) !== -1) ||
(that.data[node.key].keywords && that.data[node.key].keywords.toLowerCase().indexOf(that.currentFilter) !== -1) ||
(desc && desc.toLowerCase().indexOf(that.currentFilter) !== -1)){
return true;
} else {
return false;
}
} else {
return true;
}
} | Base | 1 |
DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,e,g,k,m,q,v,x){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(c,e,g,k,m,q,v,x)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)}; | Base | 1 |
function(c,e,g,k,m,q,v,x,A,z,L){e=null!=e?e:this.editor.graph;m=null!=m?m:!1;A=null!=A?A:!0;var M=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var n="_blank";else M=n=k;if(null==c)return"";var y=c;if("mxfile"!=y.nodeName.toLowerCase()){if(L){var K=c.ownerDocument.createElement("diagram");K.setAttribute("id",Editor.guid());K.appendChild(c)}else{K=Graph.zapGremlins(mxUtils.getXml(c));y=Graph.compress(K);if(Graph.decompress(y)!=K)return K;K=c.ownerDocument.createElement("diagram");
K.setAttribute("id",Editor.guid());mxUtils.setTextContent(K,y)}y=c.ownerDocument.createElement("mxfile");y.appendChild(K)}z?(y=y.cloneNode(!0),y.removeAttribute("modified"),y.removeAttribute("host"),y.removeAttribute("agent"),y.removeAttribute("etag"),y.removeAttribute("userAgent"),y.removeAttribute("version"),y.removeAttribute("editor"),y.removeAttribute("type")):(y.removeAttribute("userAgent"),y.removeAttribute("version"),y.removeAttribute("editor"),y.removeAttribute("pages"),y.removeAttribute("type"),
mxClient.IS_CHROMEAPP?y.setAttribute("host","Chrome"):EditorUi.isElectronApp?y.setAttribute("host","Electron"):y.setAttribute("host",window.location.hostname),y.setAttribute("modified",(new Date).toISOString()),y.setAttribute("agent",navigator.appVersion),y.setAttribute("version",EditorUi.VERSION),y.setAttribute("etag",Editor.guid()),c=null!=g?g.getMode():this.mode,null!=c&&y.setAttribute("type",c),1<y.getElementsByTagName("diagram").length&&null!=this.pages&&y.setAttribute("pages",this.pages.length));
L=L?mxUtils.getPrettyXml(y):mxUtils.getXml(y);if(!q&&!m&&(v||null!=g&&/(\.html)$/i.test(g.getTitle())))L=this.getHtml2(mxUtils.getXml(y),e,null!=g?g.getTitle():null,n,M);else if(q||!m&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(k=null),L=this.getEmbeddedSvg(L,e,k,null,x,A,M);return L};EditorUi.prototype.getXmlFileData=function(c,e,g,k){c=null!=c?c:!0;e=null!=e?e:!1;g=null!=g?g:!Editor.compressXml;var m=this.editor.getGraphXml(c,k); | Class | 2 |
mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null)):K.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,e,g,k,m){var q=document.createElement("div");q.style.whiteSpace="nowrap";var v=document.createElement("h3");mxUtils.write(v,mxResources.get("image"));v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(m?"10":"4")+"px";q.appendChild(v);if(m){mxUtils.write(q,mxResources.get("zoom")+":");var x=document.createElement("input");
x.setAttribute("type","text");x.style.marginRight="16px";x.style.width="60px";x.style.marginLeft="4px";x.style.marginRight="12px";x.value=this.lastExportZoom||"100%";q.appendChild(x);mxUtils.write(q,mxResources.get("borderWidth")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.marginRight="16px";A.style.width="60px";A.style.marginLeft="4px";A.value=this.lastExportBorder||"0";q.appendChild(A);mxUtils.br(q)}var z=this.addCheckbox(q,mxResources.get("selectionOnly"),!1,
this.editor.graph.isSelectionEmpty()),L=k?null:this.addCheckbox(q,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);v=this.editor.graph;var M=k?null:this.addCheckbox(q,mxResources.get("transparentBackground"),v.background==mxConstants.NONE||null==v.background);null!=M&&(M.style.marginBottom="16px");c=new CustomDialog(this,q,mxUtils.bind(this,function(){var n=parseInt(x.value)/100||1,y=parseInt(A.value)||0;g(!z.checked,null!=L?L.checked:!1,null!=M?M.checked:!1,n,y)}),null,c,e);
this.showDialog(c.container,300,(m?25:0)+(k?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,e,g,k,m,q,v,x,A){v=null!=v?v:Editor.defaultIncludeDiagram;var z=document.createElement("div");z.style.whiteSpace="nowrap";var L=this.editor.graph,M="jpeg"==x?220:300,n=document.createElement("h3");mxUtils.write(n,c);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";z.appendChild(n);mxUtils.write(z,mxResources.get("zoom")+":");var y=document.createElement("input"); | Base | 1 |
function pa(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function ya(){mxRhombus.call(this)}function Fa(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Oa(){mxEllipse.call(this)}function Qa(){mxEllipse.call(this)}function Ta(){mxActor.call(this)}function za(){mxActor.call(this)}function wa(){mxActor.call(this)}function Ea(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
!0;this.indent=2;this.rectOutline="single"}function Da(){mxConnector.call(this)}function La(c,l,x,p,v,A,B,ha,K,xa){B+=K;var na=p.clone();p.x-=v*(2*B+K);p.y-=A*(2*B+K);v*=B+K;A*=B+K;return function(){c.ellipse(na.x-v-B,na.y-A-B,2*B,2*B);xa?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var x=this.line[l];null!=x&&(x=new mxRectangle(x.x,x.y,this.strokewidth,this.strokewidth),null== | Class | 2 |
function(){try{var O=I.width,t=I.height;if(0==O&&0==t){var z=A.result,L=z.indexOf(","),C=decodeURIComponent(escape(atob(z.substring(L+1)))),D=mxUtils.parseXml(C).getElementsByTagName("svg");0<D.length&&(O=parseFloat(D[0].getAttribute("width")),t=parseFloat(D[0].getAttribute("height")))}k(A.result,O,t)}catch(G){l(G)}};I.src=A.result};A.onerror=function(B){l(B)}}else l(y)};x.onerror=function(y){l(y)};x.send()};EditorUi.prototype.insertAsPreText=function(d,g,k){var l=this.editor.graph,p=null;l.getModel().beginUpdate(); | Base | 1 |
App.Actions.DB.update_db_databasename_hint = function(elm, hint) {
if (hint.trim() == '') {
$(elm).parent().find('.hint').html('');
}
$(elm).parent().find('.hint').text(GLOBAL.DB_DBNAME_PREFIX + hint);
} | Base | 1 |
(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="18.0.3";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage= | Class | 2 |
serialize: function(o) {
var items = this._getItemsAsjQuery(o && o.connected),
str = [];
o = o || {};
$(items).each(function() {
var res = ($(o.item || this).attr(o.attribute || "id") || "").match(o.expression || (/(.+)[\-=_](.+)/));
if (res) {
str.push((o.key || res[1]+"[]")+"="+(o.key && o.expression ? res[1] : res[2]));
}
});
if(!str.length && o.key) {
str.push(o.key + "=");
}
return str.join("&");
}, | Base | 1 |
function(k){this.actions.get("shapes").funct();mxEvent.consume(k)}));c.appendChild(e);return c};EditorUi.prototype.handleError=function(c,e,g,k,m,q,v){var x=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},A=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{v?null!=window.console&&console.error("EditorUi.handleError:",c):EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber, | Base | 1 |
function(O){O=da.apply(this,arguments);var X=this.editorUi,ea=X.editor.graph;if(ea.isEnabled()&&"1"==urlParams.sketch){var ka=this.createOption(mxResources.get("sketch"),function(){return Editor.sketchMode},function(ja,U){X.setSketchMode(!Editor.sketchMode);null!=U&&mxEvent.isShiftDown(U)||ea.updateCellStyles({sketch:ja?"1":null},ea.getVerticesAndEdges())},{install:function(ja){this.listener=function(){ja(Editor.sketchMode)};X.addListener("sketchModeChanged",this.listener)},destroy:function(){X.removeListener(this.listener)}}); | Base | 1 |
expression: function() {
return this.assignment();
}, | Class | 2 |
return this.editor.exportToCanvas(c,e,g,k,m,q,v,x,A,z,L,M,n,y,K,B)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,e,g,k){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,e,g,k)};EditorUi.prototype.convertImageToDataUri=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri"); | Class | 2 |
exports.filter = function(arr, fn){
var ret = [];
for (var i = 0, l = arr.length; i < l; i++) {
var val = arr[i];
if (fn(val, i, arr)) ret.push(val);
}
return ret;
}; | Base | 1 |
computedMember: function (left, right) {
return left + "[" + right + "]";
}, | Class | 2 |
page.onResourceRequested = function (request, networkRequest) {
console.log('Request ' + request.url);
if (request.url.lastIndexOf(body.url, 0) === 0) {
return;
}
//potentially dangerous request
if (request.url.lastIndexOf("file:///", 0) === 0 && !body.allowLocalFilesAccess) {
networkRequest.abort();
return;
}
//to support cdn like format //cdn.jquery...
if (request.url.lastIndexOf("file://", 0) === 0 && request.url.lastIndexOf("file:///", 0) !== 0) {
networkRequest.changeUrl(request.url.replace("file://", "http://"));
}
if (body.waitForJS && request.url.lastIndexOf("http://intruct-javascript-ending", 0) === 0) {
pageJSisDone = true;
}
}; | Base | 1 |
function(c,l,x){return tb(c,["width"],l,function(p,v,A,B,ha){ha=c.shape.getEdgeWidth()*c.view.scale+x;return new mxPoint(B.x+v*p/4+A*ha/2,B.y+A*p/4-v*ha/2)},function(p,v,A,B,ha,K){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,K.x,K.y));c.style.width=Math.round(2*p)/c.view.scale-x})},tb=function(c,l,x,p,v){return fb(c,l,function(A){var B=c.absolutePoints,ha=B.length-1;A=c.view.translate;var K=c.view.scale,xa=x?B[0]:B[ha];B=x?B[1]:B[ha-1];ha=B.x-xa.x;var na=B.y-xa.y,$a=Math.sqrt(ha*ha+na*na);xa= | Class | 2 |
O.checked,t.getLink(),C.checked)}),null,mxResources.get("embed"),p);this.showDialog(g.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,g,k,l,p,q,x,y){function A(z){var L=" ",C="";l&&(L=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
EditorUi.lightboxHost+"/?client=1"+(null!=I?"&page="+I:"")+(p?"&edit=_blank":"")+(q?"&layers=1":"")+"');}})(this);\"",C+="cursor:pointer;");d&&(C+="max-width:100%;");var D="";k&&(D=' width="'+Math.round(B.width)+'" height="'+Math.round(B.height)+'"');x('<img src="'+z+'"'+D+(""!=C?' style="'+C+'"':"")+L+"/>")}var B=this.editor.graph.getGraphBounds(),I=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(z){var L=l?this.getFileData(!0):null;z= | Class | 2 |
this.customFonts)))}finally{V.getModel().endUpdate()}}}));this.editorUi.showDialog(W.container,380,Editor.enableWebFonts?250:180,!0,!0);W.init()}),z,null,!0)})))}})();function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")}; | Base | 1 |
if(p||q){var M=[],W=null,U=null,X=null,u=function(oa){V.setAttribute("disabled","disabled");for(var sa=0;sa<M.length;sa++)M[sa].className=sa==oa?"geBtn gePrimaryBtn":"geBtn"};P=!0;A=document.createElement("div");A.style.whiteSpace="nowrap";A.style.height="30px";G.appendChild(A);D=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Ba.style.display="";fa.style.display="";Z.style.left="160px";u(0);Z.scrollTop=0;Z.innerHTML="";H=0;W!=La&&(La=W,Ca=U,Na=X,Ba.innerHTML="",C(),W=null)}); | Class | 2 |
handler: function ({log, command} = {}) {
this.connector = new ActiveConnector(this);
const rawConnection = _.get(command, 'arg', '').split(',');
if (rawConnection.length !== 6) return this.reply(425);
const ip = rawConnection.slice(0, 4).join('.');
const portBytes = rawConnection.slice(4).map((p) => parseInt(p));
const port = portBytes[0] * 256 + portBytes[1];
return this.connector.setupConnection(ip, port)
.then(() => this.reply(200))
.catch((err) => {
log.error(err);
return this.reply(425);
});
}, | Base | 1 |
0>M?(H=M*V.width,M=0):1<M&&(H=(M-1)*V.width,M=1);0>F?(S=F*V.height,F=0):1<F&&(S=(F-1)*V.height,F=1);return{x:M,y:F,dx:parseInt(H),dy:parseInt(S)}}function k(){if(1==p.getSelectionCount()){var F=p.getSelectionCell();F=g(F);D.value=100*F.x;P.value=100*F.y;G.value=F.dx;K.value=F.dy;C.style.visibility=""}else C.style.visibility="hidden"}var l=document.createElement("div");l.style.width="350px";l.style.height="350px";l.style.overflow="hidden";l.style.border="1px solid lightGray";l.style.boxSizing="border-box"; | Class | 2 |
expand: function( id ) {
var self = this;
// Set the current theme model
this.model = self.collection.get( id );
// Trigger a route update for the current model
themes.router.navigate( themes.router.baseUrl( themes.router.themePath + this.model.id ) );
// Sets this.view to 'detail'
this.setView( 'detail' );
$( 'body' ).addClass( 'modal-open' );
// Set up the theme details view
this.overlay = new themes.view.Details({
model: self.model
});
this.overlay.render();
this.$overlay.html( this.overlay.el );
// Bind to theme:next and theme:previous
// triggered by the arrow keys
//
// Keep track of the current model so we
// can infer an index position
this.listenTo( this.overlay, 'theme:next', function() {
// Renders the next theme on the overlay
self.next( [ self.model.cid ] );
})
.listenTo( this.overlay, 'theme:previous', function() {
// Renders the previous theme on the overlay
self.previous( [ self.model.cid ] );
});
}, | Compound | 4 |
("/"==R.charAt(0)?"":u)+R);E.push('url("'+R+'"'+J[Q].substring(T))}else E.push(J[Q])}else E=[u]}return null!=E?E.join(""):null};Editor.prototype.mapFontUrl=function(u,E,J){/^https?:\/\//.test(E)&&!this.isCorsEnabledForUrl(E)&&(E=PROXY_URL+"?url="+encodeURIComponent(E));J(u,E)};Editor.prototype.embedCssFonts=function(u,E){var J=u.split("url("),T=0;null==this.cachedFonts&&(this.cachedFonts={});var N=mxUtils.bind(this,function(){if(0==T){for(var ba=[J[0]],ea=1;ea<J.length;ea++){var Z=J[ea].indexOf(")"); | Base | 1 |
Ya.height,Ua.y-Ya.y-Ya.height);La=mxEvent.isShiftDown(eb.getEvent());null!=Ea&&La&&(Da=Math.min(Da,Ea.height-Graph.minTableRowHeight))};za.execute=function(Ya){if(0!=Da)T.setTableRowHeight(this.state.cell,Da,!La);else if(!M.blockDelayedSelection){var Ua=T.getCellAt(Ya.getGraphX(),Ya.getGraphY())||ma.cell;T.graphHandler.selectCellForEvent(Ua,Ya)}Da=0};za.reset=function(){Da=0};z.push(za)})(ca);for(ca=0;ca<Ma.length;ca++)mxUtils.bind(this,function(Ta){var za=T.view.getState(Ma[Ta]),wa=T.getCellGeometry(Ma[Ta]), | Base | 1 |
j=a.oInstance,i=function(b){v(a,null,"xhr",[a,b,a.jqXHR]);c(b)};if(h.isPlainObject(g)&&g.data){f=g.data;var o=h.isFunction(f)?f(b,a):f,b=h.isFunction(f)&&o?o:h.extend(!0,b,o);delete g.data}o={data:b,success:function(b){var c=b.error||b.sError;c&&K(a,0,c);a.json=b;i(b)},dataType:"json",cache:!1,type:a.sServerMethod,error:function(b,c){var d=v(a,null,"xhr",[a,null,a.jqXHR]);-1===h.inArray(!0,d)&&("parsererror"==c?K(a,0,"Invalid JSON response",1):4===b.readyState&&K(a,0,"Ajax error",7));C(a,!1)}};a.oAjaxData= | Base | 1 |
function drawChart() {
currentSettings.width = $('#resizer').width() - 20;
currentSettings.height = $('#resizer').height() - 20;
// TODO: a better way using .redraw() ?
if (currentChart !== null) {
currentChart.destroy();
}
var columnNames = [];
$('select[name="chartXAxis"] option').each(function () {
columnNames.push($(this).text());
});
try {
currentChart = PMA_queryChart(chart_data, columnNames, currentSettings);
if (currentChart != null) {
$('#saveChart').attr('href', currentChart.toImageString());
}
} catch (err) {
PMA_ajaxShowMessage(err.message, false);
}
} | Base | 1 |
mxConstants.DIRECTION_NORTH);da.intraCellSpacing=W;da.parallelEdgeSpacing=M;da.interRankCellSpacing=U;da.disableEdgeStyle=!1;this.executeLayout(function(){da.execute(A.getDefaultParent(),ta);A.moveCells(ta,J,T)},!0,u);u=null}else if("organic"==Q||"auto"==Q&&ta.length>q.length){A.view.validate();var ca=new mxFastOrganicLayout(A);ca.forceConstant=3*W;ca.disableEdgeStyle=!1;ca.resetEdges=!1;var la=ca.isVertexIgnored;ca.isVertexIgnored=function(ia){return la.apply(this,arguments)||0>mxUtils.indexOf(q,
ia)};this.executeLayout(function(){ca.execute(A.getDefaultParent());ya()},!0,u);u=null}}this.hideDialog()}finally{A.model.endUpdate()}null!=u&&u()}}catch(ia){this.handleError(ia)}};EditorUi.prototype.getSearch=function(d){var g="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var k="?",l;for(l in urlParams)0>mxUtils.indexOf(d,l)&&null!=urlParams[l]&&(g+=k+l+"="+urlParams[l],k="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(d){d= | Class | 2 |
shortcuts = function() {
var sh = fm.shortcuts();
// shortcuts tab
html.push('<div id="shortcuts" class="ui-tabs-panel ui-widget-content ui-corner-bottom">');
if (sh.length) {
html.push('<div class="ui-widget-content elfinder-help-shortcuts">');
$.each(sh, function(i, s) {
html.push(stpl.replace(/\{pattern\}/, s[0]).replace(/\{descrip\}/, s[1]));
});
html.push('</div>');
} else {
html.push('<div class="elfinder-help-disabled">'+fm.i18n('shortcutsof')+'</div>');
}
html.push('</div>');
}, | Base | 1 |
icon = function(f) {
var mime = f.mime, i;
i = '<div class="elfinder-cwd-icon '+self.mime2class(mime)+' ui-corner-all"/>';
if (f.tmb && f.tmb !== 1) {
i = $(i).css('background', "url('"+self.option('tmbUrl')+f.tmb+"') center center no-repeat").get(0).outerHTML;
}
return i;
}, | Base | 1 |
!function(a,b,c){function d(b,c){this.element=a(b),this.settings=a.extend({},f,c),this._defaults=f,this._name=e,this.init()}var e="metisMenu",f={toggle:!0,doubleTapToGo:!1};d.prototype={init:function(){var b=this.element,d=this.settings.toggle,f=this;this.isIE()<=9?(b.find("li.active").has("ul").children("ul").collapse("show"),b.find("li").not(".active").has("ul").children("ul").collapse("hide")):(b.find("li.active").has("ul").children("ul").addClass("collapse in"),b.find("li").not(".active").has("ul").children("ul").addClass("collapse")),f.settings.doubleTapToGo&&b.find("li.active").has("ul").children("a").addClass("doubleTapToGo"),b.find("li").has("ul").children("a").on("click."+e,function(b){return b.preventDefault(),f.settings.doubleTapToGo&&f.doubleTapToGo(a(this))&&"#"!==a(this).attr("href")&&""!==a(this).attr("href")?(b.stopPropagation(),void(c.location=a(this).attr("href"))):(a(this).parent("li").toggleClass("active").children("ul").collapse("toggle"),void(d&&a(this).parent("li").siblings().removeClass("active").children("ul.in").collapse("hide")))})},isIE:function(){for(var a,b=3,d=c.createElement("div"),e=d.getElementsByTagName("i");d.innerHTML="<!--[if gt IE "+ ++b+"]><i></i><![endif]-->",e[0];)return b>4?b:a},doubleTapToGo:function(a){var b=this.element;return a.hasClass("doubleTapToGo")?(a.removeClass("doubleTapToGo"),!0):a.parent().children("ul").length?(b.find(".doubleTapToGo").removeClass("doubleTapToGo"),a.addClass("doubleTapToGo"),!1):void 0},remove:function(){this.element.off("."+e),this.element.removeData(e)}},a.fn[e]=function(b){return this.each(function(){var c=a(this);c.data(e)&&c.data(e).remove(),c.data(e,new d(this,b))}),this}}(jQuery,window,document); | Base | 1 |
var close = function(){
dfrd.reject();
ta.elfinderdialog('close');
}; | Base | 1 |
function reloadWithDebugInfo() {
window.name = 'NG_ENABLE_DEBUG_INFO!' + window.name;
window.location.reload();
} | Class | 2 |
ia){ja=fa.getAttribute("section");ba=fa.getAttribute("subsection");if(null==ja&&(ma=ia.indexOf("/"),ja=ia.substring(0,ma),null==ba)){var qa=ia.indexOf("/",ma+1);-1<qa&&(ba=ia.substring(ma+1,qa))}ma=ta[ja];null==ma&&(ya++,ma=[],ta[ja]=ma);ia=fa.getAttribute("clibs");null!=ca[ia]&&(ia=ca[ia]);ia={url:fa.getAttribute("url"),libs:fa.getAttribute("libs"),title:fa.getAttribute("title")||fa.getAttribute("name"),preview:fa.getAttribute("preview"),clibs:ia,tags:fa.getAttribute("tags")};ma.push(ia);null!=ba&&
(ma=ka[ja],null==ma&&(ma={},ka[ja]=ma),ja=ma[ba],null==ja&&(ja=[],ma[ba]=ja),ja.push(ia))}fa=fa.nextSibling}G(ta,pa,va)}})}function J(fa){D&&(Aa.scrollTop=0,aa.innerHTML="",Ea.spin(aa),V=!1,W=!0,ua.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),da=null,D(ra,function(){A(mxResources.get("cannotLoad"));ra([])},fa?null:t))}function E(fa){if(""==fa)null!=p&&(p.click(),p=null);else{if(null==TemplatesDialog.tagsList[d]){var ca={};for(Ja in ta)for(var ba=ta[Ja],ja=0;ja<ba.length;ja++){var ia= | Class | 2 |
c.value&&c.value.nodeType==mxConstants.NODETYPE_ELEMENT){var e=d;d=mxUtils.importNode(b.document,c.value,!0);d.appendChild(e);b=e.getAttribute("id");d.setAttribute("id",b);e.removeAttribute("id")}return d};a.beforeDecode=function(b,c,d){var e=c.cloneNode(!0),f=this.getName();c.nodeName!=f?(e=c.getElementsByTagName(f)[0],null!=e&&e.parentNode==c?(mxUtils.removeWhitespace(e,!0),mxUtils.removeWhitespace(e,!1),e.parentNode.removeChild(e)):e=null,d.value=c.cloneNode(!0),c=d.value.getAttribute("id"),null!=
c&&(d.setId(c),d.value.removeAttribute("id"))):d.setId(c.getAttribute("id"));if(null!=e)for(c=0;c<this.idrefs.length;c++){f=this.idrefs[c];var g=e.getAttribute(f);if(null!=g){e.removeAttribute(f);var k=b.objects[g]||b.lookup(g);null==k&&(g=b.getElementById(g),null!=g&&(k=(mxCodecRegistry.codecs[g.nodeName]||this).decode(b,g)));d[f]=k}}return e};return a}()); | Base | 1 |
"geCommentActionLnk";mxUtils.write(ba,N);Y.appendChild(ba);mxEvent.addListener(ba,"click",function(ea){Q(ea,K);ea.preventDefault();mxEvent.consume(ea)});T.appendChild(Y);R&&(Y.style.display="none")}function W(){function N(Y){Q.push(R);if(null!=Y.replies)for(var ba=0;ba<Y.replies.length;ba++)R=R.nextSibling,N(Y.replies[ba])}var Q=[],R=X;N(K);return{pdiv:R,replies:Q}}function U(N,Q,R,Y,ba){function ea(){k(va);K.addReply(aa,function(ja){aa.id=ja;K.replies.push(aa);p(va);R&&R()},function(ja){Z();l(va);
b.handleError(ja,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Y,ba)}function Z(){d(aa,va,function(ja){ea()},!0)}var fa=W().pdiv,aa=b.newComment(N,b.getCurrentUser());aa.pCommentId=K.id;null==K.replies&&(K.replies=[]);var va=q(aa,K.replies,fa,S+1);Q?Z():ea()}if(V||!K.isResolved){t.style.display="none";var X=document.createElement("div");X.className="geCommentContainer";X.setAttribute("data-commentId",K.id);X.style.marginLeft=20*S+5+"px";K.isResolved&&!Editor.isDarkMode()&& | Class | 2 |
function valueFn(value) {return function valueRef() {return value;};} | Class | 2 |
qtip: Tine.Tinebase.common.doubleEncode(record.data.description),
leaf: true
});
rootNode.appendChild(node);
}, this); | Base | 1 |
function Md(a,b,c,d){var e=a+" ";switch(c){case"s":return b||d?"nekaj sekund":"nekaj sekundami";case"m":return b?"ena minuta":"eno minuto";case"mm":return e+=1===a?b?"minuta":"minuto":2===a?b||d?"minuti":"minutama":5>a?b||d?"minute":"minutami":b||d?"minut":"minutami";case"h":return b?"ena ura":"eno uro";case"hh":return e+=1===a?b?"ura":"uro":2===a?b||d?"uri":"urama":5>a?b||d?"ure":"urami":b||d?"ur":"urami";case"d":return b||d?"en dan":"enim dnem";case"dd":return e+=1===a?b||d?"dan":"dnem":2===a?b||d?"dni":"dnevoma":b||d?"dni":"dnevi";case"M":return b||d?"en mesec":"enim mesecem";case"MM":return e+=1===a?b||d?"mesec":"mesecem":2===a?b||d?"meseca":"mesecema":5>a?b||d?"mesece":"meseci":b||d?"mesecev":"meseci";case"y":return b||d?"eno leto":"enim letom";case"yy":return e+=1===a?b||d?"leto":"letom":2===a?b||d?"leti":"letoma":5>a?b||d?"leta":"leti":b||d?"let":"leti"}}function Nd(a){var b=a;return b=-1!==a.indexOf("jaj")?b.slice(0,-3)+"leS":-1!==a.indexOf("jar")?b.slice(0,-3)+"waQ":-1!==a.indexOf("DIS")?b.slice(0,-3)+"nem":b+" pIq"}function Od(a){var b=a;return b=-1!==a.indexOf("jaj")?b.slice(0,-3)+"Hu’":-1!==a.indexOf("jar")?b.slice(0,-3)+"wen":-1!==a.indexOf("DIS")?b.slice(0,-3)+"ben":b+" ret"}function Pd(a,b,c,d){var e=Qd(a);switch(c){case"mm":return e+" tup";case"hh":return e+" rep";case"dd":return e+" jaj";case"MM":return e+" jar";case"yy":return e+" DIS"}}function Qd(a){var b=Math.floor(a%1e3/100),c=Math.floor(a%100/10),d=a%10,e="";return b>0&&(e+=Sg[b]+"vatlh"),c>0&&(e+=(""!==e?" ":"")+Sg[c]+"maH"),d>0&&(e+=(""!==e?" ":"")+Sg[d]),""===e?"pagh":e}function Rd(a,b,c,d){var e={s:["viensas secunds","'iensas secunds"],m:["'n míut","'iens míut"],mm:[a+" míuts",""+a+" míuts"],h:["'n þora","'iensa þora"],hh:[a+" þoras",""+a+" þoras"],d:["'n ziua","'iensa ziua"],dd:[a+" ziuas",""+a+" ziuas"],M:["'n mes","'iens mes"],MM:[a+" mesen",""+a+" mesen"],y:["'n ar","'iens ar"],yy:[a+" ars",""+a+" ars"]};return d?e[c][0]:b?e[c][0]:e[c][1]} | Base | 1 |
mxTooltipHandler.prototype.show=function(a,b,c){if(!this.destroyed&&null!=a&&0<a.length){null==this.div&&this.init();var d=mxUtils.getScrollOrigin();this.div.style.zIndex=this.zIndex;this.div.style.left=b+d.x+"px";this.div.style.top=c+mxConstants.TOOLTIP_VERTICAL_OFFSET+d.y+"px";mxUtils.isNode(a)?(this.div.innerHTML="",this.div.appendChild(a)):this.div.innerHTML=a.replace(/\n/g,"<br>");this.div.style.visibility="";mxUtils.fit(this.div)}}; | Base | 1 |
v=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",Za.prototype.arrowSize)));return new mxPoint(x.x+(1-v)*x.width,x.y+(1-p)*x.height/2)},function(x,p){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(x.y+x.height/2-p.y)/x.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(x.x+x.width-p.x)/x.width))})]}},yb=function(c){return function(l){return[fb(l,["size"],function(x){var p=Math.max(0,Math.min(.5*x.height,parseFloat(mxUtils.getValue(this.state.style,"size",
c))));return new mxPoint(x.x,x.y+p)},function(x,p){this.state.style.size=Math.max(0,p.y-x.y)},!0)]}},ub=function(c,l,x){return function(p){var v=[fb(p,["size"],function(A){var B=Math.max(0,Math.min(A.width,Math.min(A.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(A.x+B,A.y+B)},function(A,B){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(A.width,B.x-A.x),Math.min(A.height,B.y-A.y)))/c)},!1)];x&&mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED, | Base | 1 |
wp.updates.updateError = function( response ) {
var $card = $( '.plugin-card-' + response.slug ),
$message,
$button,
name,
error_message;
wp.updates.updateDoneSuccessfully = false;
if ( response.errorCode && response.errorCode == 'unable_to_connect_to_filesystem' && wp.updates.shouldRequestFilesystemCredentials ) {
wp.updates.credentialError( response, 'update-plugin' );
return;
}
error_message = wp.updates.l10n.updateFailed.replace( '%s', response.error );
if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) {
$message = $( '[data-plugin="' + response.plugin + '"]' ).next().find( '.update-message' );
$message.html( error_message ).removeClass( 'updating-message' );
} else if ( 'plugin-install' === pagenow ) {
$button = $card.find( '.update-now' );
name = $button.data( 'name' );
$card
.addClass( 'plugin-card-update-failed' )
.append( '<div class="notice notice-error is-dismissible"><p>' + error_message + '</p></div>' );
$button
.attr( 'aria-label', wp.updates.l10n.updateFailedLabel.replace( '%s', name ) )
.html( wp.updates.l10n.updateFailedShort ).removeClass( 'updating-message' );
$card.on( 'click', '.notice.is-dismissible .notice-dismiss', function() {
// Use same delay as the total duration of the notice fadeTo + slideUp animation.
setTimeout( function() {
$card
.removeClass( 'plugin-card-update-failed' )
.find( '.column-name a' ).focus();
}, 200 );
});
}
wp.a11y.speak( error_message, 'assertive' );
/*
* The lock can be released since this failure was
* after the credentials form.
*/
wp.updates.updateLock = false;
$(document).trigger( 'wp-plugin-update-error', response );
wp.updates.queueChecker();
}; | Compound | 4 |
elFinder.prototype.commands.view = function() {
this.value = this.fm.viewType;
this.alwaysEnabled = true;
this.updateOnSelect = false;
this.options = { ui : 'viewbutton'};
this.getstate = function() {
return 0;
}
this.exec = function() {
var value = this.fm.storage('view', this.value == 'list' ? 'icons' : 'list');
this.fm.viewchange();
this.update(void(0), value);
}
} | Base | 1 |
"top center";da.style.backgroundRepeat="no-repeat";da.setAttribute("title","Minimize");var fa=!1,ma=mxUtils.bind(this,function(){S.innerHTML="";if(!fa){var aa=function(la,oa,ra){la=B("",la.funct,null,oa,la,ra);la.style.width="40px";la.style.opacity="0.7";return ca(la,null,"pointer")},ca=function(la,oa,ra){null!=oa&&la.setAttribute("title",oa);la.style.cursor=null!=ra?ra:"default";la.style.margin="2px 0px";S.appendChild(la);mxUtils.br(S);return la};ca(F.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;", | Base | 1 |
"remote",R.etag,"rev",f.desc.headRevisionId,"response",[R],"file",[f]),q(Q,R)}catch(ba){x(ba)}}),mxUtils.bind(this,function(){q(Q)})):q(Q)}catch(R){x(R)}}}))}catch(Q){x(Q)}}),X=mxUtils.bind(this,function(E){f.saveLevel=9;if(E||null==W)U(E);else{var J=!0,T=null;try{T=window.setTimeout(mxUtils.bind(this,function(){J=!1;q({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(N){}this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(N){window.clearTimeout(T);
if(J){f.saveLevel=10;try{null!=N&&N.headRevisionId==I?("1"==urlParams.test&&W!=N.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",W,"to",N.etag,"rev",f.desc.headRevisionId,"response",[N],"file",[f]),W=N.etag,U(E)):q({error:{code:412}},N)}catch(Q){x(Q)}}}),mxUtils.bind(this,function(N){window.clearTimeout(T);J&&(f.saveLevel=11,q(N))}))}});if(O&&null==D){f.saveLevel=8;var u=new Image;u.onload=mxUtils.bind(this,function(){try{var E=this.thumbnailWidth/u.width,J=document.createElement("canvas"); | Base | 1 |
"geCommentActionLnk";mxUtils.write(da,P);Y.appendChild(da);mxEvent.addListener(da,"click",function(ha){O(ha,J);ha.preventDefault();mxEvent.consume(ha)});T.appendChild(Y);R&&(Y.style.display="none")}function W(){function P(Y){O.push(R);if(null!=Y.replies)for(var da=0;da<Y.replies.length;da++)R=R.nextSibling,P(Y.replies[da])}var O=[],R=X;P(J);return{pdiv:R,replies:O}}function V(P,O,R,Y,da){function ha(){g(ua);J.addReply(aa,function(la){aa.id=la;J.replies.push(aa);m(ua);R&&R()},function(la){Z();k(ua); | Class | 2 |
E=J}return E};Graph.prototype.getCellsById=function(u){var E=[];if(null!=u)for(var J=0;J<u.length;J++)if("*"==u[J]){var T=this.model.getRoot();E=E.concat(this.model.filterDescendants(function(Q){return Q!=T},T))}else{var N=this.model.getCell(u[J]);null!=N&&E.push(N)}return E};var S=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(u){return S.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(u))};Graph.prototype.isAllTagsHidden=function(u){if(null==u||0==u.length|| | Class | 2 |
var T=document.createElement("tbody"),N=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(g=mxUtils.indexOf(b.pages,b.currentPage));for(q=e.length-1;0<=q;q--){var Q=function(R){var Y=new Date(R.modifiedDate),ba=null;if(0<=Y.getTime()){var ea=function(fa){x.stop();v.innerHTML="";var aa=mxUtils.parseXml(fa),va=b.editor.extractGraphModel(aa.documentElement,!0);if(null!=va){var ja=function(Ha){null!=Ha&&(Ha=Ba(Editor.parseDiagramNode(Ha)));return Ha},Ba=function(Ha){var ra=Ha.getAttribute("background");
if(null==ra||""==ra||ra==mxConstants.NONE)ra=d.defaultPageBackgroundColor;n.style.backgroundColor=ra;(new mxCodec(Ha.ownerDocument)).decode(Ha,d.getModel());d.maxFitScale=1;d.fit(8);d.center();return Ha};M.style.display="none";M.innerHTML="";t=aa;z=fa;k=parseSelectFunction=null;l=0;if("mxfile"==va.nodeName){aa=va.getElementsByTagName("diagram");k=[];for(fa=0;fa<aa.length;fa++)k.push(aa[fa]);l=Math.min(g,k.length-1);0<k.length&&ja(k[l]);if(1<k.length)for(M.removeAttribute("disabled"),M.style.display= | Base | 1 |
function(){b.hideDialog(!0)});l.className="geBtn";c=null!=c?mxUtils.button(mxResources.get("ignore"),c):null;null!=c&&(c.className="geBtn");b.editor.cancelFirst?(x.appendChild(l),null!=c&&x.appendChild(c),x.appendChild(D),x.appendChild(t)):(x.appendChild(t),x.appendChild(D),null!=c&&x.appendChild(c),x.appendChild(l));g.appendChild(x);g.appendChild(A);this.container=g},FindWindow=function(b,f,l,d,u,t){function D(V,X,p,C){if("object"===typeof X.value&&null!=X.value.attributes){X=X.value.attributes;
for(var I=0;I<X.length;I++)if("label"!=X[I].nodeName){var T=mxUtils.trim(X[I].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==V&&(C&&0<=T.indexOf(p)||!C&&T.substring(0,p.length)===p)||null!=V&&V.test(T))return!0}}return!1}function c(){v&&K.value?(S.removeAttribute("disabled"),U.removeAttribute("disabled")):(S.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"));K.value&&y.value?Q.removeAttribute("disabled"):Q.setAttribute("disabled","disabled")}function e(V, | Class | 2 |
function(c,e,g,k,m,q,v,x,A,z,L){e=null!=e?e:this.editor.graph;m=null!=m?m:!1;A=null!=A?A:!0;var M=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var n="_blank";else M=n=k;if(null==c)return"";var y=c;if("mxfile"!=y.nodeName.toLowerCase()){if(L){var K=c.ownerDocument.createElement("diagram");K.setAttribute("id",Editor.guid());K.appendChild(c)}else{K=Graph.zapGremlins(mxUtils.getXml(c));y=Graph.compress(K);if(Graph.decompress(y)!=K)return K;K=c.ownerDocument.createElement("diagram");
K.setAttribute("id",Editor.guid());mxUtils.setTextContent(K,y)}y=c.ownerDocument.createElement("mxfile");y.appendChild(K)}z?(y=y.cloneNode(!0),y.removeAttribute("modified"),y.removeAttribute("host"),y.removeAttribute("agent"),y.removeAttribute("etag"),y.removeAttribute("userAgent"),y.removeAttribute("version"),y.removeAttribute("editor"),y.removeAttribute("type")):(y.removeAttribute("userAgent"),y.removeAttribute("version"),y.removeAttribute("editor"),y.removeAttribute("pages"),y.removeAttribute("type"),
mxClient.IS_CHROMEAPP?y.setAttribute("host","Chrome"):EditorUi.isElectronApp?y.setAttribute("host","Electron"):y.setAttribute("host",window.location.hostname),y.setAttribute("modified",(new Date).toISOString()),y.setAttribute("agent",navigator.appVersion),y.setAttribute("version",EditorUi.VERSION),y.setAttribute("etag",Editor.guid()),c=null!=g?g.getMode():this.mode,null!=c&&y.setAttribute("type",c),1<y.getElementsByTagName("diagram").length&&null!=this.pages&&y.setAttribute("pages",this.pages.length));
L=L?mxUtils.getPrettyXml(y):mxUtils.getXml(y);if(!q&&!m&&(v||null!=g&&/(\.html)$/i.test(g.getTitle())))L=this.getHtml2(mxUtils.getXml(y),e,null!=g?g.getTitle():null,n,M);else if(q||!m&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(k=null),L=this.getEmbeddedSvg(L,e,k,null,x,A,M);return L};EditorUi.prototype.getXmlFileData=function(c,e,g,k){c=null!=c?c:!0;e=null!=e?e:!1;g=null!=g?g:!Editor.compressXml;var m=this.editor.getGraphXml(c,k); | Base | 1 |
get_data() {
return this.data;
} | Base | 1 |
const globalLibvipsVersion = function () {
if (process.platform !== 'win32') {
const globalLibvipsVersion = spawnSync(`PKG_CONFIG_PATH="${pkgConfigPath()}" pkg-config --modversion vips-cpp`, spawnSyncOptions).stdout;
/* istanbul ignore next */
return (globalLibvipsVersion || '').trim();
} else {
return '';
}
}; | Class | 2 |
"none"};var Fa=function(){pa.innerHTML="";if(null!=F.currentPage){mxUtils.write(pa,F.currentPage.getName());var aa=null!=F.pages?F.pages.length:1,ca=F.getPageIndex(F.currentPage);ca=null!=ca?ca+1:1;var na=F.currentPage.getId();pa.setAttribute("title",F.currentPage.getName()+" ("+ca+"/"+aa+")"+(null!=na?" ["+na+"]":""))}};Ea.parentNode.removeChild(Ea);var Pa=F.actions.get("delete"),Aa=B("",Pa.funct,null,mxResources.get("delete"),Pa,Editor.trashImage);Aa.style.opacity="0.1";Q.appendChild(Aa);Pa.addListener("stateChanged", | Base | 1 |
S==mxConstants.DIRECTION_WEST?-1:1,0<=H&&H<=Q.length-1&&x.setSelectionCell(Q[H].cell)))))}var v=this,x=v.editor.graph,A=x.getModel(),z=v.menus.createPopupMenu;v.menus.createPopupMenu=function(H,S,U){z.apply(this,arguments);if(1==x.getSelectionCount()){S=x.getSelectionCell();var Q=x.getOutgoingTreeEdges(S);H.addSeparator();0<Q.length&&(d(x.getSelectionCell())&&this.addMenuItems(H,["selectChildren"],null,U),this.addMenuItems(H,["selectDescendants"],null,U));d(x.getSelectionCell())?(H.addSeparator(),
0<x.getIncomingTreeEdges(S).length&&this.addMenuItems(H,["selectSiblings","selectParent"],null,U)):0<x.model.getEdgeCount(S)&&this.addMenuItems(H,["selectConnections"],null,U)}};v.actions.addAction("selectChildren",function(){if(x.isEnabled()&&1==x.getSelectionCount()){var H=x.getSelectionCell();H=x.getOutgoingTreeEdges(H);if(null!=H){for(var S=[],U=0;U<H.length;U++)S.push(x.model.getTerminal(H[U],!1));x.setSelectionCells(S)}}},null,null,"Alt+Shift+X");v.actions.addAction("selectSiblings",function(){if(x.isEnabled()&& | Base | 1 |
Runner.prototype.runSuite = function(suite, fn){
var total = this.grepTotal(suite)
, self = this
, i = 0;
debug('run suite %s', suite.fullTitle());
if (!total) return fn();
this.emit('suite', this.suite = suite);
function next(errSuite) {
if (errSuite) {
// current suite failed on a hook from errSuite
if (errSuite == suite) {
// if errSuite is current suite
// continue to the next sibling suite
return done();
} else {
// errSuite is among the parents of current suite
// stop execution of errSuite and all sub-suites
return done(errSuite);
}
}
if (self._abort) return done();
var curr = suite.suites[i++];
if (!curr) return done();
self.runSuite(curr, next);
}
function done(errSuite) {
self.suite = suite;
self.hook('afterAll', function(){
self.emit('suite end', suite);
fn(errSuite);
});
}
this.hook('beforeAll', function(err){
if (err) return done();
self.runTests(suite, next);
});
}; | Base | 1 |
function PMA_createProfilingChartJqplot(target, data)
{
return $.jqplot(target, [data],
{
seriesDefaults: {
renderer: $.jqplot.PieRenderer,
rendererOptions: {
showDataLabels: true
}
},
legend: {
show: true,
location: 'e'
},
// from http://tango.freedesktop.org/Tango_Icon_Theme_Guidelines#Color_Palette
seriesColors: [
'#fce94f',
'#fcaf3e',
'#e9b96e',
'#8ae234',
'#729fcf',
'#ad7fa8',
'#ef2929',
'#eeeeec',
'#888a85',
'#c4a000',
'#ce5c00',
'#8f5902',
'#4e9a06',
'#204a87',
'#5c3566',
'#a40000',
'#babdb6',
'#2e3436'
]
}
);
} | Base | 1 |
null!=this.linkHint&&(this.linkHint.style.visibility="")};var Za=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(c,l,x){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=x?x:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function n(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function t(){mxActor.call(this)}function F(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function m(){mxShape.call(this)}function q(){mxShape.call(this)} | Base | 1 |
function m(file) {
const p = path.join(certificateFolder, file);
if (!fs.existsSync(p)) {
console.error(" cannot find ", p);
}
return p;
} | Class | 2 |
mxConstants.GUIDE_STROKEWIDTH);V.dialect=mxConstants.DIALECT_SVG;V.pointerEvents=!1;V.init(p.graph.getView().getOverlayPane());return V};D=function(V,M){if(V&&null!=p.guidesArrHor)for(V=0;V<p.guidesArrHor.length;V++)p.guidesArrHor[V].node.style.visibility="hidden";if(M&&null!=p.guidesArrVer)for(V=0;V<p.guidesArrVer.length;V++)p.guidesArrVer[V].node.style.visibility="hidden"};if(1<C&&C==B.length-1){C=[];P=p.guidesArrHor;k=[];g=0;I=B[0]==q?1:0;F=B[I].y+B[I].height;if(0<G)for(I=0;I<B.length-1;I++)x= | Class | 2 |
handler: function ({command} = {}) {
const [, protocol, ip, port] = _.chain(command).get('arg', '').split('|').value();
const family = FAMILY[protocol];
if (!family) return this.reply(504, 'Unknown network protocol');
this.connector = new ActiveConnector(this);
return this.connector.setupConnection(ip, port, family)
.then(() => this.reply(200));
}, | Base | 1 |
document.documentElement.clientWidth||document.body.clientWidth;1E3<=X&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=X||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var da=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView= | Base | 1 |
window.addEventListener("message",v)}})));c(q);q.onversionchange=function(){q.close()}});k.onerror=e;k.onblocked=function(){}}catch(m){null!=e&&e(m)}else null!=e&&e()}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,e,g,k,m){this.openDatabase(mxUtils.bind(this,function(q){try{m=m||"objects";Array.isArray(m)||(m=[m],c=[c],e=[e]);var v=q.transaction(m,"readwrite");v.oncomplete=g;v.onerror=k;for(q=0;q<m.length;q++)v.objectStore(m[q]).put(null!=c&&null!=c[q]?{key:c[q],data:e[q]}:e[q])}catch(x){null!= | Base | 1 |
Number(I.value),[e[t]])}}finally{f.getModel().endUpdate()}});O.className="geBtn gePrimaryBtn";mxEvent.addListener(m,"keypress",function(t){13==t.keyCode&&O.click()});n=document.createElement("div");n.style.marginTop="20px";n.style.textAlign="right";b.editor.cancelFirst?(n.appendChild(c),n.appendChild(O)):(n.appendChild(O),n.appendChild(c));m.appendChild(n);this.container=m},LibraryDialog=function(b,e,f,c,m,n){function v(D){for(D=document.elementFromPoint(D.clientX,D.clientY);null!=D&&D.parentNode!=
x;)D=D.parentNode;var G=null;if(null!=D){var P=x.firstChild;for(G=0;null!=P&&P!=D;)P=P.nextSibling,G++}return G}function d(D,G,P,K,F,H,S,V,M){try{if(b.spinner.stop(),null==G||"image/"==G.substring(0,6))if(null==D&&null!=S||null==A[D]){var W=function(){Q.innerHTML="";Q.style.cursor="pointer";Q.style.whiteSpace="nowrap";Q.style.textOverflow="ellipsis";mxUtils.write(Q,null!=R.title&&0<R.title.length?R.title:mxResources.get("untitled"));Q.style.color=null==R.title||0==R.title.length?"#d0d0d0":""};x.style.backgroundImage= | Class | 2 |
mxText.prototype.updateValue=function(){if(mxUtils.isNode(this.value))this.node.innerHTML="",this.node.appendChild(this.value);else{var a=this.value;this.dialect!=mxConstants.DIALECT_STRICTHTML&&(a=mxUtils.htmlEntities(a,!1));a=mxUtils.replaceTrailingNewlines(a,"<div><br></div>");a=this.replaceLinefeeds?a.replace(/\n/g,"<br/>"):a;var b=null!=this.background&&this.background!=mxConstants.NONE?this.background:null,c=null!=this.border&&this.border!=mxConstants.NONE?this.border:null;if("fill"==this.overflow||
"width"==this.overflow)null!=b&&(this.node.style.backgroundColor=b),null!=c&&(this.node.style.border="1px solid "+c);else{var d="";null!=b&&(d+="background-color:"+mxUtils.htmlEntities(b)+";");null!=c&&(d+="border:1px solid "+mxUtils.htmlEntities(c)+";");a='<div style="zoom:1;'+d+"display:inline-block;_display:inline;text-decoration:inherit;padding-bottom:1px;padding-right:1px;line-height:"+(mxConstants.ABSOLUTE_LINE_HEIGHT?this.size*mxConstants.LINE_HEIGHT+"px":mxConstants.LINE_HEIGHT)+'">'+a+"</div>"}this.node.innerHTML=
a;a=this.node.getElementsByTagName("div");0<a.length&&(b=this.textDirection,b==mxConstants.TEXT_DIRECTION_AUTO&&this.dialect!=mxConstants.DIALECT_STRICTHTML&&(b=this.getAutoDirection()),b==mxConstants.TEXT_DIRECTION_LTR||b==mxConstants.TEXT_DIRECTION_RTL?a[a.length-1].setAttribute("dir",b):a[a.length-1].removeAttribute("dir"))}}; | Base | 1 |
V+";"))}),mxUtils.bind(this,function(u){g.setSelectionCells(this.insertTextAt(V,H,S,!0))})):0<=mxUtils.indexOf(D.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(D.dataTransfer.getData("text/plain"),H,S,!0))}}D.stopPropagation();D.preventDefault()}),!1)}g.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",
mxUtils.bind(this,function(g){if(!mxEvent.isConsumed(g))try{for(var k=g.clipboardData||g.originalEvent.clipboardData,l=!1,p=0;p<k.types.length;p++)if("text/"===k.types[p].substring(0,5)){l=!0;break}if(!l){var q=k.items;for(index in q){var x=q[index];if("file"===x.kind){if(d.isEditing())this.importFiles([x.getAsFile()],0,0,this.maxImageSize,function(A,B,I,O,t,z){d.insertImage(A,t,z)},function(){},function(A){return"image/"==A.type.substring(0,6)},function(A){for(var B=0;B<A.length;B++)A[B]()});else{var y=
this.editor.graph.getInsertPoint();this.importFiles([x.getAsFile()],y.x,y.y,this.maxImageSize);mxEvent.consume(g)}break}}}}catch(A){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){k.innerHTML=" ";k.focus();document.execCommand("selectAll",!1,null)},0)}var g=this.editor.graph,k=document.createElement("div");k.setAttribute("autocomplete","off");k.setAttribute("autocorrect","off");k.setAttribute("autocapitalize","off");k.setAttribute("spellcheck", | Base | 1 |
var policy = function (tagName, attribs) {
if (!(html4.ELEMENTS[tagName] & html4.eflags.UNSAFE)) {
return {
'attribs': sanitizeAttribs(tagName, attribs,
noop, noop, record_messages)
};
} else {
record_messages(tagName + " removed", {
change: "removed",
tagName: tagName
});
}
};
var sanitized = caja.sanitizeWithPolicy(html, policy);
if (allow_css) {
// sanitize style tags as stylesheets
sanitized = sanitize_stylesheets(sanitized, policy);
}
return sanitized;
}; | Base | 1 |
render(markupLanguage, markup, theme, options) {
return this.renderer(markupLanguage).render(markup, theme, options);
} | Base | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.