code
stringlengths 12
2.05k
| label_name
stringclasses 5
values | label
int64 0
4
|
---|---|---|
(c(g.sort)||c(g.type)||c(g.filter));b.fnGetData=function(a,b,c){var d=j(a,b,k,c);return i&&b?i(d,b,a,c):d};b.fnSetData=function(a,b,c){return R(g)(a,b,c)};"number"!==typeof g&&(a._rowReadObject=!0);a.oFeatures.bSort||(b.bSortable=!1,e.addClass(d.sSortableNone));a=-1!==h.inArray("asc",b.asSorting);c=-1!==h.inArray("desc",b.asSorting);!b.bSortable||!a&&!c?(b.sSortingClass=d.sSortableNone,b.sSortingClassJUI=""):a&&!c?(b.sSortingClass=d.sSortableAsc,b.sSortingClassJUI=d.sSortJUIAscAllowed):!a&&c?(b.sSortingClass= | Base | 1 |
function setHashKey(obj, h) {
if (h) {
obj.$$hashKey = h;
} else {
delete obj.$$hashKey;
}
} | Class | 2 |
var create_html = function() {
var html = "";
for (var id in all_tags) {
var tag = all_tags[id];
if (tag && !(id in child_tags)) {
html += create_tag_html(tag.t, tag.d, owners[tag.o], tag.i,
null, tag.s !== 0);
tag.sort_key = tag.t.toLowerCase();
if (tag.s) {
for (var sid in tag.s) {
var child = all_tags[tag.s[sid]];
if (child) {
child.sort_key = (tag.t.toLowerCase() +
child.t.toLowerCase());
html += create_tag_html(
child.t, child.d, owners[child.o], child.i,
tag.i);
}
}
}
}
}
div_all_tags.append(html);
// TODO This tooltip application is used until the extra data has loaded
// at which point the tooltips are updated and this handler is replaced?
$(".tag_selection div").on('click', tag_click).tooltip({
track: false,
show: false,
hide: false,
items: '[data-content]',
content: function() {
return $(this).data('content');
}
});
}; | Base | 1 |
function node_link_action(link_selector, url, label) {
var node = $.trim($("#node_info_header_title_name").text());
fade_in_out(link_selector);
$.ajax({
type: 'POST',
url: url,
data: {"name": node},
success: function() {
},
error: function (xhr, status, error) {
alert(
"Unable to " + label + " node '" + node + "' "
+ ajax_simple_error(xhr, status, error)
);
}
});
} | Compound | 4 |
mxResources.get("pageWithNumber",[k+1]));m.setAttribute("value","data:page/id,"+b.pages[k].getId());b.pages[k]==b.currentPage&&m.setAttribute("disabled","disabled");null!=l&&l.originalSrc==m.getAttribute("value")&&(m.setAttribute("selected","selected"),u=!0);g.appendChild(m)}t||null!=b.pages&&1!=b.pages.length||(D.style.display="none",c.style.display="none",g.style.display="none");var q=document.createElement("option"),v=!1,x=!1,A=function(y,K){v||null!=y&&x||(c.checked?null!=K&&K(q.selected?null:
g.value):""==e.value||b.isOffline()?(L.value="",M.value="",null!=K&&K("")):(e.value=mxUtils.trim(e.value),b.loadImage(e.value,function(B){L.value=B.width;M.value=B.height;null!=K&&K(e.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));L.value="";M.value="";null!=K&&K(null)})))},z=mxUtils.bind(this,function(y){b.importFiles(y,0,0,b.maxBackgroundSize,function(K,B,F,G,N,J){e.value=K;A();e.focus()},function(){},function(K){return"image/"==K.type.substring(0, | Base | 1 |
try{for(var J=0;J<u.length;J++){for(var T=this.getTagsForCell(u[J]),N=T.split(" "),Q=!1,R=0;R<E.length;R++){var Y=mxUtils.trim(E[R]);""!=Y&&0>mxUtils.indexOf(N,Y)&&(T=0<T.length?T+" "+Y:Y,Q=!0)}Q&&this.setAttributeForCell(u[J],"tags",T)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(u,E){if(0<u.length&&0<E.length){this.model.beginUpdate();try{for(var J=0;J<u.length;J++){var T=this.getTagsForCell(u[J]);if(0<T.length){for(var N=T.split(" "),Q=!1,R=0;R<E.length;R++){var Y= | Base | 1 |
var GoogleSitesDialog=function(b,f){function l(){var F=null!=B&&null!=B.getTitle()?B.getTitle():this.defaultFilename;if(y.checked&&""!=q.value){var G="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(q.value));null!=F&&(G+="&title="+encodeURIComponent(F));0<K.length&&(G+="&s="+K);""!=v.value&&"0"!=v.value&&(G+="&border="+v.value);""!=m.value&&(G+="&height="+m.value);G+="&pan="+(x.checked?"1":"0");G+="&zoom="+(A.checked?"1":"0");G+="&fit="+(n.checked?"1":"0");
G+="&resize="+(M.checked?"1":"0");G+="&x0="+Number(k.value);G+="&y0="+e;u.mathEnabled&&(G+="&math=1");L.checked?G+="&edit=_blank":z.checked&&(G+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));g.value=G}else B.constructor==DriveFile||B.constructor==DropboxFile?(G="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?G+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(G+=B.getHash().substring(1),G=B.constructor==DropboxFile?G+"&type=2":G+"&type=1"),null!=
F&&(G+="&title="+encodeURIComponent(F)),""!=m.value&&(F=parseInt(m.value)+parseInt(k.value),G+="&height="+F),g.value=G):g.value=""}var d=document.createElement("div"),u=b.editor.graph,t=u.getGraphBounds(),D=u.view.scale,c=Math.floor(t.x/D-u.view.translate.x),e=Math.floor(t.y/D-u.view.translate.y);mxUtils.write(d,mxResources.get("googleGadget")+":");mxUtils.br(d);var g=document.createElement("input");g.setAttribute("type","text");g.style.marginBottom="8px";g.style.marginTop="2px";g.style.width="410px"; | Base | 1 |
H&&!V)if("sharepoint"==S)z("site",null,H.id,H.displayName);else if("site"==S)z("subsite",null,H.id,H.name);else{var N=H.folder;H=H.remoteItem?H.remoteItem:H;var Q=(H.parentReference?H.parentReference.driveId:null)||S,R=H.id;N?z(Q,R,null,H.name):B()}}function z(N,Q,R,Y,ba){function ea(ra){P.stop();var Ca=document.createElement("table");Ca.className="odFileListGrid";for(var za=null,Ga=0,Na=0;null!=ra&&Na<ra.length;Na++){var Fa=ra[Na];if(1!=fa||!Fa.webUrl||0<Fa.webUrl.indexOf("sharepoint.com/sites/")||
0>Fa.webUrl.indexOf("sharepoint.com/")){var Ea=Fa.displayName||Fa.name,Da=mxUtils.htmlEntities(Fa.description||Ea);fa&&(Fa.folder=2==fa?{isRoot:!0}:!0);var La=null!=Fa.folder;if(!g||La){var Aa=document.createElement("tr");Aa.className=Ga++%2?"odOddRow":"odEvenRow";var ta=document.createElement("td");ta.style.width="36px";var ka=document.createElement("img");ka.src="/images/"+(La?"folder.png":"file.png");ka.className="odFileImg";ta.appendChild(ka);Aa.appendChild(ta);ta=document.createElement("td");
La=document.createElement("div");La.className="odFileTitle";La.innerHTML=mxUtils.htmlEntities(Ea);La.setAttribute("title",Da);ta.appendChild(La);Aa.appendChild(ta);Ca.appendChild(Aa);null==za&&(za=Aa,za.className+=" odRowSelected",H=Fa,S=N,x||e(H));(function(oa,sa){Aa.addEventListener("dblclick",t);Aa.addEventListener("click",function(){za!=sa&&(za.className=za.className.replace("odRowSelected",""),za=sa,za.className+=" odRowSelected",H=oa,S=N,x||e(H))})})(Fa,Aa)}}}0==Ga?(ra=document.createElement("div"),
ra.className="odEmptyFolder",ra.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),va.appendChild(ra)):va.appendChild(Ca);O();V=!1}if(!V){y(".odCatsList").style.display="block";y(".odFilesSec").style.display="block";null!=E&&(E.innerHTML="",E.style.top="50%");var Z=V=!0,fa=0;W=arguments;var aa=setTimeout(function(){V=Z=!1;P.stop();d(mxResources.get("timeout"))},2E4),va=y(".odFilesList");va.innerHTML="";P.spin(va);switch(N){case "recent":M=[{name:mxResources.get("recent", | Base | 1 |
"",ea=0;ea<g.length;ea++)aa=document.createElement("option"),mxUtils.write(aa,g[ea].getAttribute("name")||mxResources.get("pageWithNumber",[ea+1])),aa.setAttribute("value",ea),ea==k&&aa.setAttribute("selected","selected"),Q.appendChild(aa);W=function(){try{var Fa=parseInt(Q.value);k=e=Fa;la(g[Fa])}catch(xa){Q.value=e,b.handleError(xa)}}}else Aa(ua);ea=R.lastModifyingUserName;null!=ea&&20<ea.length&&(ea=ea.substring(0,20)+"...");H.innerHTML="";mxUtils.write(H,(null!=ea?ea+" ":"")+Y.toLocaleDateString()+ | Base | 1 |
k&&k(q)})):p("")};EditorUi.prototype.updateDiagram=function(d){function g(K){var F=new mxCellOverlay(K.image||p.warningImage,K.tooltip,K.align,K.valign,K.offset);F.addListener(mxEvent.CLICK,function(H,S){l.alert(K.tooltip)});return F}var k=null,l=this;if(null!=d&&0<d.length&&(k=mxUtils.parseXml(d),d=null!=k?k.documentElement:null,null!=d&&"updates"==d.nodeName)){var p=this.editor.graph,q=p.getModel();q.beginUpdate();var x=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var y=q.getCell(d.getAttribute("id")); | Class | 2 |
function colorLines(name, str) {
return str.split('\n').map(function(str){
return color(name, str);
}).join('\n');
} | Base | 1 |
"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, | Base | 1 |
join: function(segments) {
return segments.reduce(function(path, part) {
return (
path +
(isQuoted(part) || DIGIT_REGEX.test(part)
? '[' + part + ']'
: (path ? '.' : '') + part)
)
}, '')
}, | Base | 1 |
L.value=null==l||t?"":l.width;d.appendChild(L);mxUtils.write(d,mxResources.get("height")+":");var M=document.createElement("input");M.setAttribute("type","text");M.style.width="60px";M.style.marginLeft="8px";M.style.marginRight="16px";M.value=null==l||t?"":l.height;d.appendChild(M);mxUtils.br(d);mxUtils.br(d);mxEvent.addListener(e,"change",A);ImageDialog.filePicked=function(y){y.action==google.picker.Action.PICKED&&null!=y.docs[0].thumbnails&&(y=y.docs[0].thumbnails[y.docs[0].thumbnails.length-1],
null!=y&&(e.value=y.url,A()));e.focus()};d.appendChild(c);d.appendChild(g);mxUtils.br(d);t?(c.setAttribute("checked","checked"),c.checked=!0):(D.setAttribute("checked","checked"),D.checked=!0);!u&&c.checked&&(mxUtils.write(q,mxResources.get("pageNotFound")),q.setAttribute("disabled","disabled"),q.setAttribute("selected","selected"),q.setAttribute("value","pageNotFound"),g.appendChild(q),mxEvent.addListener(g,"change",function(){null==q.parentNode||q.selected||q.parentNode.removeChild(q)}));l=document.createElement("div"); | Base | 1 |
P)this.editPlantUmlData(D,G,P);else if(P=this.graph.getAttributeForCell(D,"mermaidData"),null!=P)this.editMermaidData(D,G,P);else{var K=g.getCellStyle(D);"1"==mxUtils.getValue(K,"metaEdit","0")?d.showDataDialog(D):k.apply(this,arguments)}}catch(F){d.handleError(F)}};g.getLinkTitle=function(D){return d.getLinkTitle(D)};g.customLinkClicked=function(D){var G=!1;try{d.handleCustomLink(D),G=!0}catch(P){d.handleError(P)}return G};var l=g.parseBackgroundImage;g.parseBackgroundImage=function(D){var G=l.apply(this, | Class | 2 |
date : function(file1, file2) {
var date1 = file1.ts || file1.date,
date2 = file2.ts || file2.date;
return date1 == date2 ? 0 : date1 > date2 ? 1 : -1
} | Base | 1 |
remove = function(files) {
var l = files.length, hash, n, ndx;
// removed cwd
if (!fm.cwd().hash && fm.currentReqCmd !== 'open') {
$.each(cwdParents.reverse(), function(i, h) {
if (fm.files()[h]) {
fm.one(fm.currentReqCmd, function(e, fm) {
!fm.cwd().hash && fm.exec('open', h);
});
return false;
}
});
return;
}
while (l--) {
hash = files[l];
if ((n = $('#'+fm.cwdHash2Id(hash))).length) {
try {
n.remove();
} catch(e) {
fm.debug('error', e);
}
} else if ((ndx = index(hash)) != -1) {
buffer.splice(ndx, 1);
}
}
// refresh cwd if empty for a bug of browser (ex. Android Chrome 43.0.2357.93)
if (cwd.children().length < 1) {
wrapper.addClass('elfinder-cwd-wrapper-empty');
cwd.hide();
setTimeout(function(){ cwd.show(); }, 0);
}
}, | Base | 1 |
mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(B&&b.hideDialog(),O=!y.model.contains(A),!B||O||I!=q){I=Graph.compress(I);y.getModel().beginUpdate();try{if(O){var t=b.editor.graph.getFreeInsertPoint();A.geometry.x=t.x;A.geometry.y=t.y;y.addCell(A)}y.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+I+")",[A])}catch(z){throw z;}finally{y.getModel().endUpdate()}O&&(y.setSelectionCell(A),y.scrollCellToVisible(A))}};f=mxUtils.button(mxResources.get("preview"),function(){x(l,
p,!1)});f.className="geBtn";g.appendChild(f);f=mxUtils.button(mxResources.get("apply"),function(){x(b.editor.graph,e,!0)});f.className="geBtn gePrimaryBtn";g.appendChild(f);b.editor.cancelFirst||g.appendChild(m);d.appendChild(g);v.appendChild(d);n.appendChild(v);this.container=n},CustomDialog=function(b,e,f,c,m,n,v,d,g,k,l){var p=document.createElement("div");p.appendChild(e);var q=document.createElement("div");q.style.marginTop="30px";q.style.textAlign="center";null!=v&&q.appendChild(v);b.isOffline()|| | Base | 1 |
mxResources.get("loading"))&&(c.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",K)})})}):mxscript("js/extensions.min.js",K))}var C=null,D=20,G=20,P=!0,K=function(){c.loadingOrgChart=!1;c.spinner.stop();if("undefined"!==typeof mxOrgChartLayout&&null!=C&&P){var X=c.editor.graph,u=new mxOrgChartLayout(X,C,
D,G),E=X.getDefaultParent();1<X.model.getChildCount(X.getSelectionCell())&&(E=X.getSelectionCell());u.execute(E);P=!1}},F=document.createElement("div"),H=document.createElement("div");H.style.marginTop="6px";H.style.display="inline-block";H.style.width="140px";mxUtils.write(H,mxResources.get("orgChartType")+": ");F.appendChild(H);var S=document.createElement("select");S.style.width="200px";S.style.boxSizing="border-box";H=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"), | Class | 2 |
q(x)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,e,k)}));else{if("image/png"==g.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==g.type){var v=Editor.extractGraphModelFromPdf(c);null!=v&&(m=null,k=!0,c=v)}this.spinner.stop();this.openLocalFile(c,e,k,m,null!=m?g:null)}}};EditorUi.prototype.openFiles=function(c,e){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<c.length;g++)mxUtils.bind(this,function(k){var m=
new FileReader;m.onload=mxUtils.bind(this,function(q){try{this.openFileHandle(q.target.result,k.name,k,e)}catch(v){this.handleError(v)}});m.onerror=mxUtils.bind(this,function(q){this.spinner.stop();this.handleError(q);window.openFile=null});"image"!==k.type.substring(0,5)&&"application/pdf"!==k.type||"image/svg"===k.type.substring(0,9)?m.readAsText(k):m.readAsDataURL(k)})(c[g])};EditorUi.prototype.openLocalFile=function(c,e,g,k,m){var q=this.getCurrentFile(),v=mxUtils.bind(this,function(){window.openFile= | Class | 2 |
showEmptyFolder: function (albumPath, errorMessage) {
var message = '<div class="icon-gallery"></div>';
var uploadAllowed = true;
this.element.children().detach();
this.removeLoading();
if (!_.isUndefined(errorMessage) && errorMessage !== null) {
message += '<h2>' + t('gallery',
'Album cannot be shown') + '</h2>';
message += '<p>' + errorMessage + '</p>';
uploadAllowed = false;
} else {
message += '<h2>' + t('gallery',
'No media files found') + '</h2>';
// We can't upload yet on the public side
if (Gallery.token) {
message += '<p>' + t('gallery',
'Upload pictures in the files app to display them here') + '</p>';
} else {
message += '<p>' + t('gallery',
'Upload new files via drag and drop or by using the [+] button above') +
'</p>';
}
}
this.emptyContentElement.html(message);
this.emptyContentElement.removeClass('hidden');
this._hideButtons(uploadAllowed);
Gallery.currentAlbum = albumPath;
var availableWidth = $(window).width() - Gallery.buttonsWidth;
this.breadcrumb.init(albumPath, availableWidth);
Gallery.config.albumDesign = null;
}, | Base | 1 |
for(ja=ma=0;ja<oa.length;ja++)if(0<oa[ja].length){na=ca[oa[ja]];var Ga={};Ja=[];if(null!=na)for(qa=0;qa<na.length;qa++)ia=na[qa],0==ma==(null==ba[ia.url])&&(Ga[ia.url]=!0,Ja.push(ia));ba=Ga;ma++}0==Ja.length?ua.innerHTML=mxResources.get("noResultsFor",[fa]):B(Ja,!0)}}function H(fa){if(da!=fa||P!=ha)z(),Aa.scrollTop=0,aa.innerHTML="",ua.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(fa)+'"',wa=null,Z?E(fa):c&&(fa?(Ea.spin(aa),V=!1,W=!0,c(fa,ra,function(){A(mxResources.get("searchFailed"));
ra([])},P?null:t)):J(P)),da=fa,ha=P}function S(fa){null!=wa&&clearTimeout(wa);13==fa.keyCode?H(Oa.value):wa=setTimeout(function(){H(Oa.value)},1E3)}var U='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(c?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">< '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+ | Base | 1 |
arguments):(this.addOp(this.lineOp,O,R),this.lastX=O,this.lastY=R)};p.prototype.moveTo=function(O,R){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,O,R),this.lastX=O,this.lastY=R,this.firstX=O,this.firstY=R)};p.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};p.prototype.quadTo=function(O,R,Y,da){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,O,
R,Y,da),this.lastX=Y,this.lastY=da)};p.prototype.curveTo=function(O,R,Y,da,ha,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,O,R,Y,da,ha,Z),this.lastX=ha,this.lastY=Z)};p.prototype.arcTo=function(O,R,Y,da,ha,Z,ea){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var aa=mxUtils.arcToCurves(this.lastX,this.lastY,O,R,Y,da,ha,Z,ea);if(null!=aa)for(var ua=0;ua<aa.length;ua+=6)this.curveTo(aa[ua],aa[ua+1],aa[ua+2],aa[ua+3],aa[ua+4], | Class | 2 |
is: function(ch, chars) {
return chars.indexOf(ch) !== -1;
}, | Class | 2 |
consume: function(e1) {
if (this.tokens.length === 0) {
throw $parseMinErr('ueoe', 'Unexpected end of expression: {0}', this.text);
}
var token = this.expect(e1);
if (!token) {
this.throwError('is unexpected, expecting [' + e1 + ']', this.peek());
}
return token;
}, | Class | 2 |
fa=Array(Z.length);for(var aa=0;aa<Z.length;aa++)fa[aa]=String.fromCharCode(Z[aa]);fa=fa.join("")}Q=null!=Q?Q:"data:image/png;base64,";fa=Q+Editor.base64Encode(fa)}E(fa)}}else null!=J&&(0==Z.getStatus()?J({message:mxResources.get("accessDenied")},Z):J({message:mxResources.get("error")+" "+Z.getStatus()},Z))}),function(Z){null!=J&&J({message:mxResources.get("error")+" "+Z.getStatus()})},ba,this.timeout,function(){N&&null!=J&&J({code:App.ERROR_TIMEOUT,retry:ea})},Y)});ea()}catch(Z){null!=J&&J(Z)}}; | Class | 2 |
cssclass : function(dir) {
var cname = (fm.UA.Touch ? 'elfinder-touch ' : '')+(dir.phash ? '' : root)+' '+navdir+' '+fm.perms2class(dir);
dir.dirs && !dir.link && (cname += ' ' + collapsed);
opts.getClass && (cname += ' ' + opts.getClass(dir));
dir.csscls && (cname += ' ' + fm.escape(dir.csscls));
return cname;
}, | Base | 1 |
ka-aa,fa=ra+(ya.y-ra)/ka-aa,ca=new Image;ca.onload=function(){try{for(var ba=-Math.round(sa-mxUtils.mod((va-wa)*Y,sa)),ja=-Math.round(sa-mxUtils.mod((ra-fa)*Y,sa));ba<Ca;ba+=sa)for(var ia=ja;ia<Ma;ia+=sa)za.drawImage(ca,ba/Y,ia/Y);Ia()}catch(ma){null!=P&&P(ma)}};ca.onerror=function(ba){null!=P&&P(ba)};ca.src=pa}else Ia()}catch(ba){null!=P&&P(ba)}});Ka.onerror=function(Ia){null!=P&&P(Ia)};ha&&this.graph.addSvgShadow(Ba);this.graph.mathEnabled&&this.addMathCss(Ba);var Oa=mxUtils.bind(this,function(){try{null!= | 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 |
$.fn.datepicker = function(options){
/* Verify an empty collection wasn't passed - Fixes #6976 */
if ( !this.length ) {
return this;
}
/* Initialise the date picker. */
if (!$.datepicker.initialized) {
$(document).mousedown($.datepicker._checkExternalClick);
$.datepicker.initialized = true;
}
/* Append datepicker main container to body if not exist. */
if ($("#"+$.datepicker._mainDivId).length === 0) {
$("body").append($.datepicker.dpDiv);
}
var otherArgs = Array.prototype.slice.call(arguments, 1);
if (typeof options === "string" && (options === "isDisabled" || options === "getDate" || options === "widget")) {
return $.datepicker["_" + options + "Datepicker"].
apply($.datepicker, [this[0]].concat(otherArgs));
}
if (options === "option" && arguments.length === 2 && typeof arguments[1] === "string") {
return $.datepicker["_" + options + "Datepicker"].
apply($.datepicker, [this[0]].concat(otherArgs));
}
return this.each(function() {
typeof options === "string" ?
$.datepicker["_" + options + "Datepicker"].
apply($.datepicker, [this].concat(otherArgs)) :
$.datepicker._attachDatepicker(this, options);
});
}; | Base | 1 |
function(C){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=C?C:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var B=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(), | Class | 2 |
c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(v){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(v){}}catch(v){this.fileLoadedError=v;if(null!=c)try{c.close()}catch(x){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=c?c.getHash():"none"),action:"message_"+v.message,label:"stack_"+v.stack})}catch(x){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,
mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||m():m()});e?c():this.handleError(v,mxResources.get("errorLoadingFile"),c,!0,null,null,!0)}else m();return k};EditorUi.prototype.getHashValueForPages=function(c,e){var g=0,k=new mxGraphModel,m=new mxCodec;null!=e&&(e.byteCount=0,e.attrCount=0,e.eltCount=0,e.nodeCount=0);for(var q=0;q<c.length;q++){this.updatePageRoot(c[q]);var v=c[q].node.cloneNode(!1);v.removeAttribute("name");k.root=c[q].root; | Base | 1 |
function isPromiseLike(obj) {
return obj && isFunction(obj.then);
} | Class | 2 |
wp.updates.updatePlugin = function( plugin, slug ) {
var $message, name,
$card = $( '.plugin-card-' + slug );
if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) {
$message = $( '[data-plugin="' + plugin + '"]' ).next().find( '.update-message' );
} else if ( 'plugin-install' === pagenow ) {
$message = $card.find( '.update-now' );
name = $message.data( 'name' );
$message.attr( 'aria-label', wp.updates.l10n.updatingLabel.replace( '%s', name ) );
// Remove previous error messages, if any.
$card.removeClass( 'plugin-card-update-failed' ).find( '.notice.notice-error' ).remove();
}
$message.addClass( 'updating-message' );
if ( $message.html() !== wp.updates.l10n.updating ){
$message.data( 'originaltext', $message.html() );
}
$message.text( wp.updates.l10n.updating );
wp.a11y.speak( wp.updates.l10n.updatingMsg );
if ( wp.updates.updateLock ) {
wp.updates.updateQueue.push( {
type: 'update-plugin',
data: {
plugin: plugin,
slug: slug
}
} );
return;
}
wp.updates.updateLock = true;
var data = {
_ajax_nonce: wp.updates.ajaxNonce,
plugin: plugin,
slug: slug,
username: wp.updates.filesystemCredentials.ftp.username,
password: wp.updates.filesystemCredentials.ftp.password,
hostname: wp.updates.filesystemCredentials.ftp.hostname,
connection_type: wp.updates.filesystemCredentials.ftp.connectionType,
public_key: wp.updates.filesystemCredentials.ssh.publicKey,
private_key: wp.updates.filesystemCredentials.ssh.privateKey
};
wp.ajax.post( 'update-plugin', data )
.done( wp.updates.updateSuccess )
.fail( wp.updates.updateError );
}; | Compound | 4 |
c+";"))}}),mxUtils.bind(this,function(){var n=null;A.getModel().beginUpdate();try{n=A.insertVertex(A.getDefaultParent(),null,c,A.snap(e),A.snap(g),1,1,"text;"+(k?"html=1;":"")),A.updateCellSize(n),A.fireEvent(new mxEventObject("textInserted","cells",[n]))}finally{A.getModel().endUpdate()}A.setSelectionCell(n)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,e,g,q,null,x);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this, | Class | 2 |
_refreshItems: function(event) {
this.items = [];
this.containers = [this];
var i, j, cur, inst, targetData, _queries, item, queriesLength,
items = this.items,
queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]],
connectWith = this._connectWith();
if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down
for (i = connectWith.length - 1; i >= 0; i--){
cur = $(connectWith[i], this.document[0]);
for (j = cur.length - 1; j >= 0; j--){
inst = $.data(cur[j], this.widgetFullName);
if(inst && inst !== this && !inst.options.disabled) {
queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]);
this.containers.push(inst);
}
}
}
}
for (i = queries.length - 1; i >= 0; i--) {
targetData = queries[i][1];
_queries = queries[i][0];
for (j=0, queriesLength = _queries.length; j < queriesLength; j++) {
item = $(_queries[j]);
item.data(this.widgetName + "-item", targetData); // Data for target checking (mouse manager)
items.push({
item: item,
instance: targetData,
width: 0, height: 0,
left: 0, top: 0
});
}
}
}, | Base | 1 |
function(q){q&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var l=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var e=l.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&e.refresh()}));return e};EditorUi.prototype.createSidebarFooterContainer=function(){var c=this.createDiv("geSidebarContainer geSidebarFooter");c.style.position="absolute";c.style.overflow=
"hidden";var e=document.createElement("a");e.className="geTitle";e.style.color="#DF6C0C";e.style.fontWeight="bold";e.style.height="100%";e.style.paddingTop="9px";e.innerHTML="<span>+</span>";var g=e.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(e,mxResources.get("moreShapes")+"...");mxEvent.addListener(e,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(k){k.preventDefault()}));mxEvent.addListener(e,"click",mxUtils.bind(this,
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, | Class | 2 |
digest: hash(TEST_DATA, 'sha512'),
// Options must use VCHAR
options: ['\x01']
}]
}
t.equal(
ssri.stringify(sriLike, {strict: true}),
`sha256-${hash(TEST_DATA, 'sha256')}?foo`,
'entries that do not conform to strict spec interpretation removed'
)
t.equal(
ssri.stringify('sha512-foo sha256-bar', {sep: ' \r|\n\t', strict: true}),
'sha512-foo \r \n\tsha256-bar',
'strict mode replaces non-whitespace characters in separator with space'
)
t.done()
}) | Class | 2 |
2;ua.y+=ua.height/2-ua.width/2;var Ea=ua.width;ua.width=ua.height;ua.height=Ea;M.setGeometry(ia,ua)}var Da=this.view.getState(ia);if(null!=Da){var La=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Ya=mxUtils.getValue(Da.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,La[mxUtils.mod(mxUtils.indexOf(La,Ya)+(L?-1:1),La.length)],[ia])}T.push(ia)}}}finally{M.endUpdate()}return T}; | Base | 1 |
Suite.prototype.beforeAll = function(fn){
if (this.pending) return this;
var hook = new Hook('"before all" hook', fn);
hook.parent = this;
hook.timeout(this.timeout());
hook.slow(this.slow());
hook.ctx = this.ctx;
this._beforeAll.push(hook);
this.emit('beforeAll', hook);
return this;
}; | Base | 1 |
b.Z||840<b.Z)};d.parse=function(a,c,b){a=d.preparse(a,c);return d.isValid(a)?(a.M-=100>a.Y?22801:1,b||a.Z?new Date(Date.UTC(a.Y,a.M,a.D,a.H,a.m+a.Z,a.s,a.S)):new Date(a.Y,a.M,a.D,a.H,a.m,a.s,a.S)):new Date(NaN)};d.transform=function(a,c,b,e){return d.format(d.parse(a,c),b,e)};d.addYears=function(a,c){return d.addMonths(a,12*c)};d.addMonths=function(a,c){var b=new Date(a.getTime());b.setMonth(b.getMonth()+c);return b};d.addDays=function(a,c){var b=new Date(a.getTime());b.setDate(b.getDate()+c);return b}; | Class | 2 |
ta.style.width="40px";ta.style.height="12px";ta.style.marginBottom="-2px";ta.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";ta.style.backgroundPosition="top center";ta.style.backgroundRepeat="no-repeat";ta.setAttribute("title","Minimize");var Na=!1,Ca=mxUtils.bind(this,function(){S.innerHTML="";if(!Na){var za=function(Da,La,Ya){Da=X("",Da.funct,null,La,Da,Ya);Da.style.width="40px";Da.style.opacity="0.7";return wa(Da,null,"pointer")},wa=function(Da,La,Ya){null!=La&&Da.setAttribute("title",
La);Da.style.cursor=null!=Ya?Ya:"default";Da.style.margin="2px 0px";S.appendChild(Da);mxUtils.br(S);return Da};wa(U.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");wa(U.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;", | Base | 1 |
function(){return ja.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var U=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(z){return z.tableHandle||U.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var z=0;this.graph.isTableRow(this.state.cell)?z=1:this.graph.isTableCell(this.state.cell)&&
(z=2);return z};var I=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return I.apply(this,arguments).grow(-this.getSelectionBorderInset())};var V=null,Q=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==V&&(V=mxCellRenderer.defaultShapes.tableLine);var z=Q.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var L=function(Ta,za,wa){for(var Ea=[],Da=0;Da<Ta.length;Da++){var La= | Base | 1 |
labels: templateInstance.topTasks.get().map((task) => task._id),
datasets: [{
values: templateInstance.topTasks.get().map((task) => task.count),
}],
},
tooltipOptions: {
},
})
}
})
})
}
}
}) | Base | 1 |
function AddUserPawn() {
const Players = [...document.getElementsByClassName('Players')[0].children];
Players.length -= 1;
if (Players.length === 2) {
document.getElementById('C0').style.display = 'block';
document.getElementById('C1').style.display = 'block';
document.getElementById('C2').style.display = 'none';
document.getElementById('C3').style.display = 'none';
} else if (Players.length === 3) {
document.getElementById('C0').style.display = 'block';
document.getElementById('C1').style.display = 'block';
document.getElementById('C2').style.display = 'block';
document.getElementById('C3').style.display = 'none';
} else if (Players.length === 4) {
document.getElementById('C0').style.display = 'block';
document.getElementById('C1').style.display = 'block';
document.getElementById('C2').style.display = 'block';
document.getElementById('C3').style.display = 'block';
} else {
document.getElementById('C0').style.display = 'block';
document.getElementById('C1').style.display = 'none';
document.getElementById('C2').style.display = 'none';
document.getElementById('C3').style.display = 'none';
}
} | Compound | 4 |
function(d){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var g="?",m;for(m in urlParams)0>mxUtils.indexOf(d,m)&&null!=urlParams[m]&&(f+=g+m+"="+urlParams[m],g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var f=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
m;for(m in urlParams)0>mxUtils.indexOf(g,m)&&(d=0==f?d+"?":d+"&",null!=urlParams[m]&&(d+=m+"="+urlParams[m],f++))}return d};EditorUi.prototype.showLinkDialog=function(d,f,g,m,q){d=new LinkDialog(this,d,f,g,!0,m,q);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient|| | Base | 1 |
module.exports.assign = function(/* target, ... sources */) {
let args = Array.from(arguments);
let target = args.shift() || {};
args.forEach(source => {
Object.keys(source || {}).forEach(key => {
if (['tls', 'auth'].includes(key) && source[key] && typeof source[key] === 'object') {
// tls and auth are special keys that need to be enumerated separately
// other objects are passed as is
if (!target[key]) {
// ensure that target has this key
target[key] = {};
}
Object.keys(source[key]).forEach(subKey => {
target[key][subKey] = source[key][subKey];
});
} else {
target[key] = source[key];
}
});
});
return target;
}; | Base | 1 |
function usercheck_init_staff(i) {
var obj = document.getElementById('ajax_output_st');
obj.innerHTML = '';
document.getElementById('usr_err_check').value = '0';
if (i.value.length < 1)
return;
var err = new Array();
if (i.value.match(/[^A-Za-z0-9_]/))
err[err.length] = 'Username can only contain letters, numbers and underscores';
if (i.value.length < 3)
err[err.length] = 'Username Too Short';
if (err != '') {
obj.style.color = '#ff0000';
obj.innerHTML = err.join('<br />');
return;
}
ajax_call('Validator.php?u=' + i.value + 'stud', usercheck_callback_staff);
}
| Base | 1 |
pa=ma.scale;ma.scale=1;var ua=btoa(unescape(encodeURIComponent(ma.createSvgGrid(ma.gridColor))));ma.scale=pa;ua="data:image/svg+xml;base64,"+ua;var ya=Ba.gridSize*ma.gridSteps*oa,Fa=Ba.getGraphBounds(),Ma=ma.translate.x*pa,Oa=ma.translate.y*pa,Qa=Ma+(Fa.x-Ma)/pa-ta,Ta=Oa+(Fa.y-Oa)/pa-ta,za=new Image;za.onload=function(){try{for(var wa=-Math.round(ya-mxUtils.mod((Ma-Qa)*oa,ya)),Ea=-Math.round(ya-mxUtils.mod((Oa-Ta)*oa,ya));wa<T;wa+=ya)for(var Da=Ea;Da<ca;Da+=ya)ia.drawImage(za,wa/oa,Da/oa);L()}catch(La){null!=
S&&S(La)}};za.onerror=function(wa){null!=S&&S(wa)};za.src=ua}else L()}catch(wa){null!=S&&S(wa)}});Za.onerror=function(L){null!=S&&S(L)};Aa&&this.graph.addSvgShadow(Pa);this.graph.mathEnabled&&this.addMathCss(Pa);var z=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Pa,this.resolvedFontCss),Za.src=Editor.createSvgDataUri(mxUtils.getXml(Pa))}catch(L){null!=S&&S(L)}});this.embedExtFonts(mxUtils.bind(this,function(L){try{null!=L&&this.addFontCss(Pa,L),this.loadFonts(z)}catch(M){null!= | Class | 2 |
Runner.prototype.runTest = function(fn){
var test = this.test
, self = this;
if (this.asyncOnly) test.asyncOnly = true;
try {
test.on('error', function(err){
self.fail(test, err);
});
test.run(fn);
} catch (err) {
fn(err);
}
}; | Base | 1 |
exports.watch = function(files, fn){
var options = { interval: 100 };
files.forEach(function(file){
debug('file %s', file);
fs.watchFile(file, options, function(curr, prev){
if (prev.mtime < curr.mtime) fn(file);
});
});
}; | Base | 1 |
labels: templateInstance.topTasks.get().map((task) => task._id),
datasets: [{
values: templateInstance.topTasks.get().map((task) => task.count),
}],
},
tooltipOptions: {
},
})
})
})
}
}
}) | Base | 1 |
c=mb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var rb=new mxPoint(1,0),zb=new mxPoint(1,0),Bb=mxUtils.toRadians(-30);rb=mxUtils.getRotatedPoint(rb,Math.cos(Bb),Math.sin(Bb));var Ab=mxUtils.toRadians(-150);zb=mxUtils.getRotatedPoint(zb,Math.cos(Ab),Math.sin(Ab));mxEdgeStyle.IsometricConnector=function(c,l,x,p,v){var A=c.view;p=null!=p&&0<p.length?p[0]:null;var B=c.absolutePoints,ha=B[0];B=B[B.length-1];null!=p&&(p=A.transformControlPoint(c,p));
null==ha&&null!=l&&(ha=new mxPoint(l.getCenterX(),l.getCenterY()));null==B&&null!=x&&(B=new mxPoint(x.getCenterX(),x.getCenterY()));var K=rb.x,xa=rb.y,na=zb.x,$a=zb.y,ib="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=ha){c=function(Ga,Ja,Ia){Ga-=db.x;var Ha=Ja-db.y;Ja=($a*Ga-na*Ha)/(K*$a-xa*na);Ga=(xa*Ga-K*Ha)/(xa*na-K*$a);ib?(Ia&&(db=new mxPoint(db.x+K*Ja,db.y+xa*Ja),v.push(db)),db=new mxPoint(db.x+na*Ga,db.y+$a*Ga)):(Ia&&(db=new mxPoint(db.x+na*Ga,db.y+$a*Ga),v.push(db)),
db=new mxPoint(db.x+K*Ja,db.y+xa*Ja));v.push(db)};var db=ha;null==p&&(p=new mxPoint(ha.x+(B.x-ha.x)/2,ha.y+(B.y-ha.y)/2));c(p.x,p.y,!0);c(B.x,B.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var nb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var x=new mxElbowEdgeHandler(c);x.snapToTerminals=!1;return x}return nb.apply(this,arguments)};t.prototype.constraints=[];F.prototype.getConstraints= | Base | 1 |
Editor.enableExportUrl=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(u){u.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(u,E){return"1"==mxUtils.getValue(u.style,"enumerate","0")}}, | Base | 1 |
StyleFormatPanel.prototype.addEffects=function(a){var b=this.editorUi,f=b.editor.graph,d=b.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="0px";var g=document.createElement("table");g.style.width="210px";g.style.fontWeight="bold";g.style.tableLayout="fixed";var e=document.createElement("tbody"),k=document.createElement("tr");k.style.padding="0px";var n=document.createElement("td");n.style.padding="0px";n.style.width="50%";n.setAttribute("valign","top");var u=n.cloneNode(!0);u.style.paddingLeft=
"8px";k.appendChild(n);k.appendChild(u);e.appendChild(k);g.appendChild(e);a.appendChild(g);var m=n,r=0,x=mxUtils.bind(this,function(C,F,K){C=this.createCellOption(C,F,K);C.style.width="100%";m.appendChild(C);m=m==n?u:n;r++}),A=mxUtils.bind(this,function(C,F,K){d=b.getSelectionState();n.innerHTML="";u.innerHTML="";m=n;d.rounded&&x(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);d.swimlane&&x(mxResources.get("divider"),"swimlaneLine",1);d.containsImage||x(mxResources.get("shadow"),mxConstants.STYLE_SHADOW,
0);d.glass&&x(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);x(mxResources.get("sketch"),"sketch",0)});f.getModel().addListener(mxEvent.CHANGE,A);this.listeners.push({destroy:function(){f.getModel().removeListener(A)}});A();return a};StyleFormatPanel.prototype.addStyleOps=function(a){a.style.paddingTop="10px";a.style.paddingBottom="10px";this.addActions(a,["setAsDefaultStyle"]);return a};DiagramStylePanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()}; | Base | 1 |
Editor.prototype.absoluteCssFonts=function(u){var E=null;if(null!=u){var J=u.split("url(");if(0<J.length){E=[J[0]];u=window.location.pathname;var T=null!=u?u.lastIndexOf("/"):-1;0<=T&&(u=u.substring(0,T+1));T=document.getElementsByTagName("base");var N=null;null!=T&&0<T.length&&(N=T[0].getAttribute("href"));for(var Q=1;Q<J.length;Q++)if(T=J[Q].indexOf(")"),0<T){var R=Editor.trimCssUrl(J[Q].substring(0,T));this.graph.isRelativeUrl(R)&&(R=null!=N?N+R:window.location.protocol+"//"+window.location.hostname+
("/"==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 |
refreshTabs : function(){
"use strict";
window.console.log('refreshTabs');
var self = this;
var pltabs = '';
for(var i=0; i<this.managedPlaylists.length; i++){
var pl = this.managedPlaylists[i];
var isactive = ''
if(pl.id == this.editingPlaylist){
isactive = ' class="active" ';
} else {
isactive = ' class="playlist-tab-inactive" ';
}
pltabs += '<li '+isactive+' id="'+this.tabid2htmlid(pl.id)+'">';
var isplaying = '';
if(pl.id == this.playingPlaylist){
isplaying += '▶';
}
var isunsaved = '';
if(!pl.saved && pl.reason_open !== 'queue'){
isunsaved += ' <em>(unsaved)</em>';
}
pltabs += '<a href="#" onclick="playlistManager.showPlaylist('+pl.id+')">'+isplaying+' '+pl.name+ isunsaved;
if(pl.closable){
pltabs += '<span class="playlist-tab-closer pointer" href="#" onclick="playlistManager.closePlaylist('+pl.id+')">×</span>';
}
pltabs += '</a></li>';
}
pltabs += '<li class="playlist-tab-inactive playlist-tab-new"><a href="#" onclick="playlistManager.newPlaylist()"><b>+</b></a></li>';
$(self.cssSelectorPlaylistChooser+' ul').empty()
$(self.cssSelectorPlaylistChooser+' ul').append(pltabs);
}, | Base | 1 |
c.executeLayoutList(L);c.customLayoutConfig=L}catch(C){c.handleError(C),null!=window.console&&console.error(C)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");c.showDialog(t.container,620,460,!0,!0);t.init()});l=this.get("layout");var y=l.funct;l.funct=function(t,z){y.apply(this,arguments);t.addItem(mxResources.get("orgChart"),null,function(){function L(){"undefined"!==typeof mxOrgChartLayout||c.loadingOrgChart||c.isOffline(!0)?K():c.spinner.spin(document.body,
mxResources.get("loading"))&&(c.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",K)})})}):mxscript("js/extensions.min.js",K))}var C=null,D=20,G=20,P=!0,K=function(){c.loadingOrgChart=!1;c.spinner.stop();if("undefined"!==typeof mxOrgChartLayout&&null!=C&&P){var X=c.editor.graph,u=new mxOrgChartLayout(X,C, | Base | 1 |
(ua.appendChild(Z),ua.appendChild(ea),da.appendChild(ua));return{div:da,refresh:aa}};Graph.prototype.getCustomFonts=function(){var p=this.extFonts;p=null!=p?p.slice():[];for(var C in Graph.customFontElements){var I=Graph.customFontElements[C];p.push({name:I.name,url:I.url})}return p};Graph.prototype.setFont=function(p,C){Graph.addFont(p,C);document.execCommand("fontname",!1,p);if(null!=C){var I=this.cellEditor.textarea.getElementsByTagName("font");C=Graph.getFontUrl(p,C);for(var T=0;T<I.length;T++)I[T].getAttribute("face")==
p&&I[T].getAttribute("data-font-src")!=C&&I[T].setAttribute("data-font-src",C)}};var n=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return n.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var p=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=p)for(var C in p)this.globalVars[C]= | Class | 2 |
aa&&(la=pa[ca],null==la&&(la={},pa[ca]=la),ca=la[aa],null==ca&&(ca=[],la[aa]=ca),ca.push(na))}ia=ia.nextSibling}G(ya,fa,wa)}})}function I(ia){v&&(Aa.scrollTop=0,ea.innerHTML="",Ha.spin(ea),U=!1,V=!0,ha.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),ba=null,v(ua,function(){z(mxResources.get("cannotLoad"));ua([])},ia?null:n))}function F(ia){if(""==ia)null!=t&&(t.click(),t=null);else{if(null==TemplatesDialog.tagsList[c]){var ra={};for(Ja in ya)for(var aa=ya[Ja],ca=0;ca<aa.length;ca++){var na=
aa[ca];if(null!=na.tags)for(var la=na.tags.toLowerCase().split(";"),qa=0;qa<la.length;qa++)null==ra[la[qa]]&&(ra[la[qa]]=[]),ra[la[qa]].push(na)}TemplatesDialog.tagsList[c]=ra}var ta=ia.toLowerCase().split(" ");ra=TemplatesDialog.tagsList[c];if(0<wa&&null==ra.__tagsList__){for(Ja in fa)for(aa=fa[Ja],ca=0;ca<aa.length;ca++)for(na=aa[ca],la=na.title.split(" "),la.push(Ja),qa=0;qa<la.length;qa++){var ka=la[qa].toLowerCase();null==ra[ka]&&(ra[ka]=[]);ra[ka].push(na)}ra.__tagsList__=!0}var Ja=[];aa={};
for(ca=la=0;ca<ta.length;ca++)if(0<ta[ca].length){ka=ra[ta[ca]];var La={};Ja=[];if(null!=ka)for(qa=0;qa<ka.length;qa++)na=ka[qa],0==la==(null==aa[na.url])&&(La[na.url]=!0,Ja.push(na));aa=La;la++}0==Ja.length?ha.innerHTML=mxResources.get("noResultsFor",[ia]):B(Ja,!0)}}function H(ia){if(ba!=ia||P!=da)A(),Aa.scrollTop=0,ea.innerHTML="",ha.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(ia)+'"',va=null,Z?F(ia):d&&(ia?(Ha.spin(ea),U=!1,V=!0,d(ia,ua,function(){z(mxResources.get("searchFailed")); | Base | 1 |
T.appendChild(T.importNode(u[0],!0)),T=T.documentElement));return T};Editor.getDiagramNodeXml=function(u){var E=mxUtils.getTextContent(u),J=null;0<E.length?J=Graph.decompress(E):null!=u.firstChild&&(J=mxUtils.getXml(u.firstChild));return J};Editor.extractGraphModelFromPdf=function(u){u=u.substring(u.indexOf(",")+1);u=window.atob&&!mxClient.IS_SF?atob(u):Base64.decode(u,!0);if("%PDF-1.7"==u.substring(0,8)){var E=u.indexOf("EmbeddedFile");if(-1<E){var J=u.indexOf("stream",E)+9;if(0<u.substring(E,J).indexOf("application#2Fvnd.jgraph.mxfile"))return E=
u.indexOf("endstream",J-1),pako.inflateRaw(Graph.stringToArrayBuffer(u.substring(J,E)),{to:"string"})}return null}J=null;E="";for(var T=0,N=0,Q=[],R=null;N<u.length;){var Y=u.charCodeAt(N);N+=1;10!=Y&&(E+=String.fromCharCode(Y));Y=="/Subject (%3Cmxfile".charCodeAt(T)?T++:T=0;if(19==T){var ba=u.indexOf("%3C%2Fmxfile%3E)",N)+15;N-=9;if(ba>N){J=u.substring(N,ba);break}}10==Y&&("endobj"==E?R=null:"obj"==E.substring(E.length-3,E.length)||"xref"==E||"trailer"==E?(R=[],Q[E.split(" ")[0]]=R):null!=R&&R.push(E),
E="")}null==J&&(J=Editor.extractGraphModelFromXref(Q));null!=J&&(J=decodeURIComponent(J.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return J};Editor.extractGraphModelFromXref=function(u){var E=u.trailer,J=null;null!=E&&(E=/.* \/Info (\d+) (\d+) R/g.exec(E.join("\n")),null!=E&&0<E.length&&(E=u[E[1]],null!=E&&(E=/.* \/Subject (\d+) (\d+) R/g.exec(E.join("\n")),null!=E&&0<E.length&&(u=u[E[1]],null!=u&&(u=u.join("\n"),J=u.substring(1,u.length-1))))));return J};Editor.extractParserError=function(u,E){var J= | Base | 1 |
isAttributeLink(attributeValue) {
/* eslint-disable no-useless-escape */
const URL_REGEX = /^https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)$/gm;
return URL_REGEX.test(attributeValue);
}, | Base | 1 |
k.scrollHeight-k.offsetHeight&&D()},mxEvent.addListener(k,"scroll",B))}}),y)});p.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(k,mxResources.get("loading"));var t=mxUtils.bind(this,function(z){var L=this.ui.spinner,C=0;this.ui.spinner.stop();var D=function(){L.spin(k,mxResources.get("loading"));C+=1},G=function(){--C;0===C&&L.stop()};null==z&&(k.innerHTML="",z=1);null!=B&&(mxEvent.removeListener(k,"scroll",B),B=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a"); | Class | 2 |
function(K){l=K};this.setAutoScroll=function(K){p=K};this.setOpenFill=function(K){q=K};this.setStopClickEnabled=function(K){A=K};this.setSelectInserted=function(K){B=K};this.setSmoothing=function(K){f=K};this.setPerfectFreehandMode=function(K){O=K};this.setBrushSize=function(K){I.size=K};this.getBrushSize=function(){return I.size};var t=function(K){y=K;b.getRubberband().setEnabled(!K);b.graphHandler.setSelectEnabled(!K);b.graphHandler.setMoveEnabled(!K);b.container.style.cursor=K?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))}; | Class | 2 |
ca,ca,!1)[0];ia.push(Fa);if(L)T.add(ya,ua[M]);else{var Ma=ya.getIndex(z[M]);T.add(ya,ua[M],Ma+1)}if(this.isTable(ya)){var Oa=this.getCellGeometry(ua[M]),Qa=this.getCellGeometry(ya);null!=Oa&&null!=Qa&&(Qa=Qa.clone(),Qa.height+=Oa.height,T.setGeometry(ya,Qa))}}else ia.push(ua[M])}this.updateCustomLinks(this.createCellMapping(ma,pa),ua,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ua))}finally{T.endUpdate()}return ia};Graph.prototype.insertImage=function(z,L,M){if(null!=z&&null!= | Class | 2 |
'binary<=': function(left, right, context) {
return function(scope, locals, assign, inputs) {
var arg = left(scope, locals, assign, inputs) <= right(scope, locals, assign, inputs);
return context ? {value: arg} : arg;
};
}, | Class | 2 |
show : typeof(opts.show) == 'function' ? opts.show : function() { },
hide : typeof(opts.hide) == 'function' ? opts.hide : function() { }
});
});
if (opts == 'show') {
var o = this.eq(0),
cnt = o.data('cnt') + 1,
show = o.data('show');
o.data('cnt', cnt);
if (o.is(':hidden')) {
o.show();
show();
}
}
if (opts == 'hide') {
var o = this.eq(0),
cnt = o.data('cnt') - 1,
hide = o.data('hide');
o.data('cnt', cnt);
if (cnt == 0 && o.is(':visible')) {
o.hide();
hide();
}
}
return this;
} | Base | 1 |
text: conf[_]['type'].toUpperCase(),
im0: this.manager.list.imgs[0],
im1: this.manager.list.imgs[0],
im2: this.manager.list.imgs[0]
});
}
// 3.刷新UI
this.tree.parse({
id: 0,
item: items
}, 'json');
// 禁用按钮
this.disableToolbar();
this.disableEditor();
} | Base | 1 |
$scope.provision = function() {
$scope.isSaving = true;
growl.info($sanitize('The node ' + $scope.node.nodeLabel + ' is being added to requisition ' + $scope.node.foreignSource + '. Please wait...'));
var successMessage = $sanitize('The node ' + $scope.node.nodeLabel + ' has been added to requisition ' + $scope.node.foreignSource);
RequisitionsService.quickAddNode($scope.node).then(
function() { // success
$scope.reset();
bootbox.dialog({
message: successMessage,
title: 'Success',
buttons: {
main: {
label: 'Ok',
className: 'btn-secondary'
}
}
});
},
$scope.errorHandler
);
}; | Base | 1 |
d.sSortableDesc,b.sSortingClassJUI=d.sSortJUIDescAllowed):(b.sSortingClass=d.sSortable,b.sSortingClassJUI=d.sSortJUI)}function U(a){if(!1!==a.oFeatures.bAutoWidth){var b=a.aoColumns;Ha(a);for(var c=0,d=b.length;c<d;c++)b[c].nTh.style.width=b[c].sWidth}b=a.oScroll;(""!==b.sY||""!==b.sX)&&Z(a);v(a,null,"column-sizing",[a])}function $(a,b){var c=aa(a,"bVisible");return"number"===typeof c[b]?c[b]:null}function ba(a,b){var c=aa(a,"bVisible"),c=h.inArray(b,c);return-1!==c?c:null}function ca(a){return aa(a, | Base | 1 |
C=new mxAsyncCanvas(this.thumbImageCache);L.images=this.thumbImageCache.images;var D=new mxImageExport;D.drawShape=function(G,P){G.shape instanceof mxShape&&G.shape.checkBounds()&&(P.save(),P.translate(.5,.5),G.shape.paint(P),P.translate(-.5,-.5),P.restore())};D.drawText=function(G,P){};D.drawState(v.getView().getState(v.model.root),C);C.finish(mxUtils.bind(this,function(){try{D.drawState(v.getView().getState(v.model.root),L),v!=this.editor.graph&&null!=v.container.parentNode&&v.container.parentNode.removeChild(v.container)}catch(G){p= | Class | 2 |
getItemName: function($row) {
return $row.attr(this.settings.nameAttribute);
}, | Base | 1 |
1);break}E.className=ca.join(" ")}null!=ia?(E=ia,E.className+=" "+ra,K=aa,Ba.className="geTempDlgCreateBtn"):(K=E=null,Ba.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function u(ia,ra){if(null!=K){var aa=function(ta){qa.isExternal?g(qa,function(ka){ca(ka,ta)},na):qa.url?mxUtils.get(TEMPLATE_PATH+"/"+qa.url,mxUtils.bind(this,function(ka){200<=ka.getStatus()&&299>=ka.getStatus()?ca(ka.getText(),ta):na()})):ca(b.emptyDiagramXml,ta)},ca=function(ta,ka){y||b.hideDialog(!0);e(ta,ka,qa,ra)},na=function(){z(mxResources.get("cannotLoad"));
la()},la=function(){K=qa;Ba.className="geTempDlgCreateBtn";ra&&(Ea.className="geTempDlgOpenBtn")},qa=K;K=null;"boolean"!==typeof ra&&(ra=qa.isExternal&&p);1==ia?k(qa.url,qa):ra?(Ea.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",aa()):(Ba.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ia=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),ia=new FilenameDialog(b,b.defaultFilename+".drawio",
mxResources.get("ok"),aa,ia,function(ta){var ka=null!=ta&&0<ta.length;return ka&&y?(aa(ta),!1):ka},null,null,null,la,x?null:[]),b.showDialog(ia.container,350,80,!0,!0),ia.init())}}function D(ia){Ba.innerHTML=mxUtils.htmlEntities(mxResources.get(Z||ia?"create":"copy"));ia=ia?"none":"";p&&(Ea.style.display=ia);for(var ra=J.querySelectorAll(".geTempDlgLinkToDiagram"),aa=0;aa<ra.length;aa++)ra[aa].style.display=ia}function B(ia,ra,aa,ca,na){na||(ea.innerHTML="",M(),S=ia,Y=ca);var la=null;if(aa){la=document.createElement("table"); | Base | 1 |
$scope.save = function() {
var form = this.nodeForm;
RequisitionsService.startTiming();
RequisitionsService.saveNode($scope.node).then(
function() { // success
growl.success('The node ' + $scope.node.nodeLabel + ' has been saved.');
$scope.foreignId = $scope.node.foreignId;
form.$dirty = false;
},
$scope.errorHandler
);
}; | 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 |
setup: function () {
var data = this.model.get('data') || {};
this.style = data.style || 'text-muted';
this.messageTemplate = this.model.get('message') || data.message || '';
this.userId = data.userId;
this.messageData['entityType'] = Espo.Utils.upperCaseFirst((this.translate(data.entityType, 'scopeNames') || '').toLowerCase());
this.messageData['user'] = '<a href="#User/view/' + data.userId + '">' + data.userName + '</a>';
this.messageData['entity'] = '<a href="#'+data.entityType+'/view/' + data.entityId + '">' + data.entityName + '</a>';
this.createMessage();
} | Base | 1 |
function(N,J){0<F.getSelectionCount()?(B.appendChild(G),G.innerHTML="Selected: "+F.getSelectionCount()):null!=G.parentNode&&G.parentNode.removeChild(G)}))};var y=!1;EditorUi.prototype.initFormatWindow=function(){if(!y&&null!=this.formatWindow){y=!0;this.formatWindow.window.setClosable(!1);var B=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){B.apply(this,arguments);this.minimized?(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left=
parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(F){mxEvent.getSource(F)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var K=EditorUi.prototype.init;EditorUi.prototype.init=function(){function B(ca,ba,ja){var ia=E.menus.get(ca),ma=Q.addMenu(mxResources.get(ca), | Base | 1 |
save = function() {
var hashes = [], data = [];
hashes = $.map(subtree.children().find('[id]'), function(n) {
return id2hash(n.id);
});
$.each(hashes.reverse(), function(i, h) {
data.push(h + '#' + dirs[h].name);
});
fm.storage(key, data.join(','));
}, | 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=
p.call(this,$a,ha/$a,na/$a,xa,B);return new mxPoint(xa.x/K-A.x,xa.y/K-A.y)},function(A,B,ha){var K=c.absolutePoints,xa=K.length-1;A=c.view.translate;var na=c.view.scale,$a=x?K[0]:K[xa];K=x?K[1]:K[xa-1];xa=K.x-$a.x;var ib=K.y-$a.y,db=Math.sqrt(xa*xa+ib*ib);B.x=(B.x+A.x)*na;B.y=(B.y+A.y)*na;v.call(this,db,xa/db,ib/db,$a,K,B,ha)})},qb=function(c){return function(l){return[fb(l,["arrowWidth","arrowSize"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Za.prototype.arrowWidth))), | Base | 1 |
labels: templateInstance.topTasks.get().map((task) => task._id),
datasets: [{
values: templateInstance.topTasks.get().map((task) => task.count),
}],
},
tooltipOptions: {
},
})
})
})
} | Base | 1 |
N.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(u,E){u=null!=u?u:!0;var J=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&J.setAttribute("style",this.graph.currentStyle);var T=this.graph.getBackgroundImageObject(this.graph.backgroundImage,
E);null!=T&&J.setAttribute("backgroundImage",JSON.stringify(T));J.setAttribute("math",this.graph.mathEnabled?"1":"0");J.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(T=this.graph.extFonts.map(function(N){return N.name+"^"+N.url}),J.setAttribute("extFonts",T.join("|")));return J};Editor.prototype.isDataSvg=function(u){try{var E=mxUtils.parseXml(u).documentElement.getAttribute("content");if(null!=E&&(null!=E&&"<"!=E.charAt(0)&&"%"!= | Class | 2 |
function(N,J){0<F.getSelectionCount()?(B.appendChild(G),G.innerHTML="Selected: "+F.getSelectionCount()):null!=G.parentNode&&G.parentNode.removeChild(G)}))};var y=!1;EditorUi.prototype.initFormatWindow=function(){if(!y&&null!=this.formatWindow){y=!0;this.formatWindow.window.setClosable(!1);var B=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){B.apply(this,arguments);this.minimized?(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left=
parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(F){mxEvent.getSource(F)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var K=EditorUi.prototype.init;EditorUi.prototype.init=function(){function B(ca,ba,ja){var ia=E.menus.get(ca),ma=Q.addMenu(mxResources.get(ca), | Class | 2 |
add_row(row) {
if (!this.__data_already_exists(row)) {
var id = this.__add_row(row);
this.tr_id_mapping[this.data.length] = id;
this.data.push(row);
}
} | Base | 1 |
u[E]}catch(J){null!=window.console&&console.log("Error in vars URL parameter: "+J)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var z=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(u){var E=z.apply(this,arguments);null==E&&null!=this.globalVars&&(E=this.globalVars[u]);return E};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var u=this.themes["default-style2"];this.defaultStylesheet= | Class | 2 |
teams: function (next) {
if (!postData.teams) return next()
Team.getTeamsByIds(postData.teams, function (err, teams) {
if (err) return next(err)
async.each(
teams,
function (team, callback) {
team.addMember(savedId, function () {
team.save(callback)
})
},
function (err) {
if (err) return next(err)
return next(null, teams)
}
)
})
}, | Base | 1 |
context.test.skip = function(title){
context.test(title);
}; | Base | 1 |
value: function __cast(field) {
var isColumns = Array.isArray(this.options.columns); // Dont loose time calling cast if the field wont be part of the final record
if (isColumns === true && this.options.columns.length <= this.state.record.length) {
return [undefined, undefined];
}
var context = {
column: isColumns === true ? this.options.columns[this.state.record.length].name : this.state.record.length,
empty_lines: this.info.empty_lines,
header: this.options.columns === true,
index: this.state.record.length,
invalid_field_length: this.info.invalid_field_length,
quoting: this.state.wasQuoting,
lines: this.info.lines,
records: this.info.records
};
if (this.state.castField !== null) {
try {
return [undefined, this.state.castField.call(null, field, context)];
} catch (err) {
return [err];
}
}
if (this.__isInt(field) === true) {
return [undefined, parseInt(field)];
} else if (this.__isFloat(field)) {
return [undefined, parseFloat(field)];
} else if (this.options.cast_date !== false) {
return [undefined, this.options.cast_date.call(null, field, context)];
}
return [undefined, field];
} | Class | 2 |
function(){function N(){d(K,X,function(){k(X);K.editComment(K.content,function(){p(X)},function(Q){l(X);N();b.handleError(Q,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}N()},K.isResolved),M(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){k(X);K.deleteComment(function(N){if(!0===N){N=X.querySelector(".geCommentTxt");N.innerHTML="";mxUtils.write(N,mxResources.get("msgDeleted"));var Q=X.querySelectorAll(".geCommentAction");for(N= | Base | 1 |
new mxPoint(l,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",Ka);mxUtils.extend(bb,mxActor);bb.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.lineTo(0,v);c.end();c.moveTo(p,0);c.lineTo(p,v);c.end();c.moveTo(0,v/2);c.lineTo(p,v/2);c.end()};mxCellRenderer.registerShape("crossbar",bb);mxUtils.extend(Pa,mxActor);Pa.prototype.dx=20;Pa.prototype.dy=20;Pa.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style, | Base | 1 |
me.urls2links = function(element)
{
element.html(
DOMPurify.sanitize(
element.html().replace(
/(((https?|ftp):\/\/[\w?!=&.\/-;#@~%+*-]+(?![\w\s?!&.\/;#~%"=-]>))|((magnet):[\w?=&.\/-;#@~%+*-]+))/ig,
'<a href="$1" rel="nofollow noopener noreferrer">$1</a>'
)
)
);
}; | Base | 1 |
message: new MockBuilder(
{
from: '[email protected]',
to: '[email protected]'
},
message
)
},
function(err) {
expect(err).to.exist;
pool.close();
done();
}
);
}); | Base | 1 |
Menus.prototype.createPopupMenu=function(B,F,G){var N=this.editorUi.editor.graph;B.smartSeparators=!0;x.apply(this,arguments);"1"==urlParams.sketch?N.isEnabled()&&(B.addSeparator(),1==N.getSelectionCount()&&this.addMenuItems(B,["-","lockUnlock"],null,G)):1==N.getSelectionCount()?(N.isCellFoldable(N.getSelectionCell())&&this.addMenuItems(B,N.isCellCollapsed(F)?["expand"]:["collapse"],null,G),this.addMenuItems(B,["collapsible","-","lockUnlock","enterGroup"],null,G),B.addSeparator(),this.addSubmenu("layout",
B)):N.isSelectionEmpty()&&N.isEnabled()?(B.addSeparator(),this.addMenuItems(B,["editData"],null,G),B.addSeparator(),this.addSubmenu("layout",B),this.addSubmenu("insert",B),this.addMenuItems(B,["-","exitGroup"],null,G)):N.isEnabled()&&this.addMenuItems(B,["-","lockUnlock"],null,G)};var A=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(B,F,G){A.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(B,["copyAsImage"],null,G)};EditorUi.prototype.toggleFormatPanel= | Base | 1 |
1E3<=D&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=D||"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 O=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(C){C=O.apply(this,arguments); | Base | 1 |
[CHECKPATH] (entry) {
if (this.strip) {
const parts = entry.path.split(/\/|\\/)
if (parts.length < this.strip)
return false
entry.path = parts.slice(this.strip).join('/')
if (entry.type === 'Link') {
const linkparts = entry.linkpath.split(/\/|\\/)
if (linkparts.length >= this.strip)
entry.linkpath = linkparts.slice(this.strip).join('/')
}
}
if (!this.preservePaths) {
const p = entry.path
if (p.match(/(^|\/|\\)\.\.(\\|\/|$)/)) {
this.warn('TAR_ENTRY_ERROR', `path contains '..'`, {
entry,
path: p,
})
return false
}
// absolutes on posix are also absolutes on win32
// so we only need to test this one to get both
if (path.win32.isAbsolute(p)) {
const parsed = path.win32.parse(p)
entry.path = p.substr(parsed.root.length)
const r = parsed.root
this.warn('TAR_ENTRY_INFO', `stripping ${r} from absolute path`, {
entry,
path: p,
})
}
}
// only encode : chars that aren't drive letter indicators
if (this.win32) {
const parsed = path.win32.parse(entry.path)
entry.path = parsed.root === '' ? wc.encode(entry.path)
: parsed.root + wc.encode(entry.path.substr(parsed.root.length))
}
if (path.isAbsolute(entry.path))
entry.absolute = entry.path
else
entry.absolute = path.resolve(this.cwd, entry.path)
return true
} | Base | 1 |
R=0;R<N.length;R++)if(null==E||null!=E[N[R]])Q[N[R]]=!0,J.push(N[R]);E=Q}else return[]}return J};Graph.prototype.getTagsForCells=function(u){for(var E=[],J={},T=0;T<u.length;T++){var N=this.getTagsForCell(u[T]);if(0<N.length){N=N.split(" ");for(var Q=0;Q<N.length;Q++)null==J[N[Q]]&&(J[N[Q]]=!0,E.push(N[Q]))}}return E};Graph.prototype.getTagsForCell=function(u){return this.getAttributeForCell(u,"tags","")};Graph.prototype.addTagsForCells=function(u,E){if(0<u.length&&0<E.length){this.model.beginUpdate(); | Class | 2 |
function(u,E,J,T,N,Q,R,Y,ba,ea){if(null!=J&&null==mxMarker.markers[J]){var Z=this.getPackageForType(J);null!=Z&&mxStencilRegistry.getStencil(Z)}return V.apply(this,arguments)};var M=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(u,E,J,T,N,Q){"1"==mxUtils.getValue(E.style,"lineShape",null)&&u.setFillColor(mxUtils.getValue(E.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return M.apply(this,arguments)};PrintDialog.prototype.create=function(u,E){function J(){aa.value=Math.max(1, | Class | 2 |
null,"Error fetching folder items")+(null!=Ca?" ("+Ca+")":""));V=!1;P.stop()}})}}function L(N){J.className=J.className.replace("odCatSelected","");J=N;J.className+=" odCatSelected"}function C(N){V||(T=null,z("search",null,null,null,N))}var D="";null==e&&(e=I,D='<div style="text-align: center;" class="odPreview"></div>');null==m&&(m=function(){var N=null;try{N=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(Q){}return N});null==n&&(n=function(N){if(null!=N){var Q=m()||{};delete N["@microsoft.graph.downloadUrl"];
Q[N.id]=N;localStorage.setItem("mxODPickerRecentList",JSON.stringify(Q))}});D='<div class="odCatsList"><div class="odCatsListLbl">OneDrive</div><div id="odFiles" class="odCatListTitle odCatSelected">'+mxUtils.htmlEntities(mxResources.get("files"))+'</div><div id="odRecent" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("recent"))+'</div><div id="odShared" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("shared"))+'</div><div id="odSharepoint" class="odCatListTitle">'+ | Class | 2 |
function drawError(ctx,err,x,y,upper,lower,drawUpper,drawLower,radius,offset,minmax){
//shadow offset
y += offset;
upper += offset;
lower += offset;
// error bar - avoid plotting over circles
if (err.err == 'x'){
if (upper > x + radius) drawPath(ctx, [[upper,y],[Math.max(x + radius,minmax[0]),y]]);
else drawUpper = false;
if (lower < x - radius) drawPath(ctx, [[Math.min(x - radius,minmax[1]),y],[lower,y]] );
else drawLower = false;
}
else {
if (upper < y - radius) drawPath(ctx, [[x,upper],[x,Math.min(y - radius,minmax[0])]] );
else drawUpper = false;
if (lower > y + radius) drawPath(ctx, [[x,Math.max(y + radius,minmax[1])],[x,lower]] );
else drawLower = false;
}
//internal radius value in errorbar, allows to plot radius 0 points and still keep proper sized caps
//this is a way to get errorbars on lines without visible connecting dots
radius = err.radius != null? err.radius: radius;
// upper cap
if (drawUpper) {
if (err.upperCap == '-'){
if (err.err=='x') drawPath(ctx, [[upper,y - radius],[upper,y + radius]] );
else drawPath(ctx, [[x - radius,upper],[x + radius,upper]] );
} else if ($.isFunction(err.upperCap)){
if (err.err=='x') err.upperCap(ctx, upper, y, radius);
else err.upperCap(ctx, x, upper, radius);
}
}
// lower cap
if (drawLower) {
if (err.lowerCap == '-'){
if (err.err=='x') drawPath(ctx, [[lower,y - radius],[lower,y + radius]] );
else drawPath(ctx, [[x - radius,lower],[x + radius,lower]] );
} else if ($.isFunction(err.lowerCap)){
if (err.err=='x') err.lowerCap(ctx, lower, y, radius);
else err.lowerCap(ctx, x, lower, radius);
}
}
} | Base | 1 |
rest = function(){
if (!overlay.is(':hidden')) {
overlay.addClass('ui-front')
.elfinderoverlay('hide')
.off('click', cancel);
}
node.removeClass('ui-front').css('position', '');
if (tarea) {
nnode.css('max-height', '');
} else {
pnode.css('width', '')
.parent('td').css('overflow', '');
}
}, colwidth, | Base | 1 |
setup: function () {
if (this.model.get('data')) {
var data = this.model.get('data');
this.assignedUserId = data.assignedUserId || null;
this.assignedUserName = data.assignedUserName || null;
this.messageData['assignee'] = '<a href="#User/view/' + this.assignedUserId + '">' + this.assignedUserName + '</a>';
var isYou = false;
if (this.isUserStream) {
if (this.assignedUserId == this.getUser().id) {
isYou = true;
}
}
if (this.assignedUserId) {
this.messageName = 'createAssigned';
if (this.isThis) {
this.messageName += 'This';
if (this.assignedUserId == this.model.get('createdById')) {
this.messageName += 'Self';
}
} else {
if (this.assignedUserId == this.model.get('createdById')) {
this.messageName += 'Self';
} else {
if (isYou) {
this.messageName += 'You';
}
}
}
}
if (data.statusField) {
var statusField = this.statusField = data.statusField;
var statusValue = data.statusValue;
this.statusStyle = data.statusStyle || 'default';
this.statusText = this.getLanguage().translateOption(statusValue, statusField, this.model.get('parentType'));
}
}
this.createMessage();
}, | Base | 1 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.