code
stringlengths 12
2.05k
| label_name
stringclasses 5
values | label
int64 0
4
|
---|---|---|
formatDate : function(file, ts) {
var self = this,
ts = ts || file.ts,
i18 = self.i18,
date, format, output, d, dw, m, y, h, g, i, s;
if (self.options.clientFormatDate && ts > 0) {
date = new Date(ts*1000);
h = date[self.getHours]();
g = h > 12 ? h - 12 : h;
i = date[self.getMinutes]();
s = date[self.getSeconds]();
d = date[self.getDate]();
dw = date[self.getDay]();
m = date[self.getMonth]() + 1;
y = date[self.getFullYear]();
format = ts >= this.yesterday
? this.fancyFormat
: this.dateFormat;
output = format.replace(/[a-z]/gi, function(val) {
switch (val) {
case 'd': return d > 9 ? d : '0'+d;
case 'j': return d;
case 'D': return self.i18n(i18.daysShort[dw]);
case 'l': return self.i18n(i18.days[dw]);
case 'm': return m > 9 ? m : '0'+m;
case 'n': return m;
case 'M': return self.i18n(i18.monthsShort[m-1]);
case 'F': return self.i18n(i18.months[m-1]);
case 'Y': return y;
case 'y': return (''+y).substr(2);
case 'H': return h > 9 ? h : '0'+h;
case 'G': return h;
case 'g': return g;
case 'h': return g > 9 ? g : '0'+g;
case 'a': return h > 12 ? 'pm' : 'am';
case 'A': return h > 12 ? 'PM' : 'AM';
case 'i': return i > 9 ? i : '0'+i;
case 's': return s > 9 ? s : '0'+s;
}
return val;
});
return ts >= this.yesterday
? output.replace('$1', this.i18n(ts >= this.today ? 'Today' : 'Yesterday'))
: output;
} else if (file.date) {
return file.date.replace(/([a-z]+)\s/i, function(a1, a2) { return self.i18n(a2)+' '; });
}
return self.i18n('dateUnknown');
}, | Base | 1 |
var M=mxText.prototype.redraw;mxText.prototype.redraw=function(){M.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(p,C,I){function T(){for(var la=R.getSelectionCells(),Aa=[],Fa=0;Fa<la.length;Fa++)R.isCellVisible(la[Fa])&&Aa.push(la[Fa]);R.setSelectionCells(Aa)}function P(la){R.hiddenTags=la?[]:Y.slice();T();R.refresh()}function O(la,Aa){ha.innerHTML="";if(0<la.length){var Fa=document.createElement("table"); | Base | 1 |
0);l+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&(c.setShadow(!1),cb.apply(this,[c,l,x,p,v]))}};mxUtils.extend(Q,mxRectangleShape);Q.prototype.isHtmlAllowed=function(){return!1};Q.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};Q.prototype.paintForeground=function(c,l,x,p,v){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A=
Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var B=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=B){var ha=this.style["symbol"+A+"Align"],K=this.style["symbol"+A+"VerticalAlign"],xa=this.style["symbol"+A+"Width"],na=this.style["symbol"+A+"Height"],$a=this.style["symbol"+A+"Spacing"]||0,ib=this.style["symbol"+A+"VSpacing"]||
$a,db=this.style["symbol"+A+"ArcSpacing"];null!=db&&(db*=this.getArcSize(p+this.strokewidth,v+this.strokewidth),$a+=db,ib+=db);db=l;var Ga=x;db=ha==mxConstants.ALIGN_CENTER?db+(p-xa)/2:ha==mxConstants.ALIGN_RIGHT?db+(p-xa-$a):db+$a;Ga=K==mxConstants.ALIGN_MIDDLE?Ga+(v-na)/2:K==mxConstants.ALIGN_BOTTOM?Ga+(v-na-ib):Ga+ib;c.save();ha=new B;ha.style=this.style;B.prototype.paintVertexShape.call(ha,c,db,Ga,xa,na);c.restore()}A++}while(null!=B)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)}; | Class | 2 |
Context.prototype.runnable = function(runnable){
if (0 == arguments.length) return this._runnable;
this.test = this._runnable = runnable;
return this;
}; | Base | 1 |
function isNumber(value) {return typeof value === 'number';} | Class | 2 |
c.init()};EditorUi.prototype.confirm=function(c,e,g,k,m,q){var v=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},x=Math.min(200,28*Math.ceil(c.length/50));c=new ConfirmDialog(this,c,function(){v();null!=e&&e()},function(){v();null!=g&&g()},k,m,null,null,null,null,x);this.showDialog(c.container,340,46+x,!0,q);c.init()};EditorUi.prototype.showBanner=function(c,e,g,k){var m=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!= | Base | 1 |
start : function(e, ui) {
var targets = $.map(ui.helper.data('files')||[], function(h) { return h || null ;}),
locked = false,
cnt, h;
self.draggingUiHelper = ui.helper;
cnt = targets.length;
while (cnt--) {
h = targets[cnt];
if (files[h].locked) {
locked = true;
ui.helper.data('locked', true);
break;
}
}
!locked && self.trigger('lockfiles', {files : targets});
}, | Base | 1 |
ja.isResolved));F||ja.isLocked||0!=V||R(ja.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(T){function Q(){var Z=T.target;Z.innerHTML="";ja.isResolved=!ja.isResolved;mxUtils.write(Z,ja.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var na=ja.isResolved?"none":"",va=ia(ja).replies,Ba=Editor.isDarkMode()?"transparent":ja.isResolved?"ghostWhite":"white",sa=0;sa<va.length;sa++){va[sa].style.backgroundColor=Ba;for(var Da=va[sa].querySelectorAll(".geCommentAction"),
Aa=0;Aa<Da.length;Aa++)Da[Aa]!=Z.parentNode&&(Da[Aa].style.display=na);O||(va[sa].style.display="none")}E()}ja.isResolved?la(mxResources.get("reOpened")+": ",!0,Q,!1,!0):la(mxResources.get("markedAsResolved"),!1,Q,!0)});ta.appendChild(u);null!=J?da.insertBefore(ta,J.nextSibling):da.appendChild(ta);for(J=0;null!=ja.replies&&J<ja.replies.length;J++)u=ja.replies[J],u.isResolved=ja.isResolved,y(u,ja.replies,null,V+1,P);null!=H&&(H.comment.id==ja.id?(P=ja.content,ja.content=H.comment.content,d(ja,ta,H.saveCallback, | Base | 1 |
context.before = function(fn){
suites[0].beforeAll(fn);
}; | Base | 1 |
Editor.createRoughCanvas=function(u){var E=rough.canvas({getContext:function(){return u}});E.draw=function(J){var T=J.sets||[];J=J.options||this.getDefaultOptions();for(var N=0;N<T.length;N++){var Q=T[N];switch(Q.type){case "path":null!=J.stroke&&this._drawToContext(u,Q,J);break;case "fillPath":this._drawToContext(u,Q,J);break;case "fillSketch":this.fillSketch(u,Q,J)}}};E.fillSketch=function(J,T,N){var Q=u.state.strokeColor,R=u.state.strokeWidth,Y=u.state.strokeAlpha,ba=u.state.dashed,ea=N.fillWeight; | Base | 1 |
u.appendChild(E));return u}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(u){return u.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(u){return Graph.isGoogleFontUrl(u)};Graph.createFontElement=function(u,
E){var J=Graph.fontMapping[E];null==J&&Graph.isCssFontUrl(E)?(u=document.createElement("link"),u.setAttribute("rel","stylesheet"),u.setAttribute("type","text/css"),u.setAttribute("charset","UTF-8"),u.setAttribute("href",E)):(null==J&&(J='@font-face {\nfont-family: "'+u+'";\nsrc: url("'+E+'");\n}'),u=document.createElement("style"),mxUtils.write(u,J));return u};Graph.addFont=function(u,E,J){if(null!=u&&0<u.length&&null!=E&&0<E.length){var T=u.toLowerCase();if("helvetica"!=T&&"arial"!=u&&"sans-serif"!= | Base | 1 |
(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 |
urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var A=Graph.prototype.init;Graph.prototype.init=function(){function u(N){E=N}A.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var E=null;mxEvent.addListener(this.container,"mouseenter",u);mxEvent.addListener(this.container,"mousemove",u);mxEvent.addListener(this.container,"mouseleave",function(N){E=null});this.isMouseInsertPoint=function(){return null!=E};var J=this.getInsertPoint; | 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= | Base | 1 |
qtip: Tine.Tinebase.common.doubleEncode(attr.name.name)
});
}
// copy 'real' data to a node record NOTE: not a full record as we have no record reader here
var nodeData = Ext.copyTo({}, attr, Tine.Filemanager.Model.Node.getFieldNames());
attr.nodeRecord = new Tine.Filemanager.Model.Node(nodeData);
}, | Base | 1 |
this.url = function(hash) {
var file = files[hash];
if (!file || !file.read) {
return '';
}
if (file.url == '1') {
this.request({
data : {cmd : 'url', target : hash},
preventFail : true,
options: {async: false}
})
.done(function(data) {
file.url = data.url || '';
})
.fail(function() {
file.url = '';
});
}
if (file.url) {
return file.url;
}
if (cwdOptions.url && file.hash.indexOf(self.cwd().volumeid) === 0) {
return cwdOptions.url + $.map(this.path2array(hash), function(n) { return encodeURIComponent(n); }).slice(1).join('/')
}
var params = $.extend({}, this.customData, {
cmd: 'file',
target: file.hash
});
if (this.oldAPI) {
params.cmd = 'open';
params.current = file.phash;
}
return this.options.url + (this.options.url.indexOf('?') === -1 ? '?' : '&') + $.param(params, true);
} | 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);
b.handleError(la,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Y,da)}function Z(){c(aa,ua,function(la){ha()},!0)}var ea=W().pdiv,aa=b.newComment(P,b.getCurrentUser());aa.pCommentId=J.id;null==J.replies&&(J.replies=[]);var ua=q(aa,J.replies,ea,S+1);O?Z():ha()}if(U||!J.isResolved){n.style.display="none";var X=document.createElement("div");X.className="geCommentContainer";X.setAttribute("data-commentId",J.id);X.style.marginLeft=20*S+5+"px";J.isResolved&&!Editor.isDarkMode()&& | Base | 1 |
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 |
context.teardown = function(fn){
suites[0].afterEach(fn);
}; | Base | 1 |
body: function(section) {
return this.state[section].body.join('');
}, | Class | 2 |
mxCellEditor.prototype.installListeners=function(a){mxEvent.addListener(a,"dragstart",mxUtils.bind(this,function(d){this.graph.stopEditing(!1);mxEvent.consume(d)}));mxEvent.addListener(a,"blur",mxUtils.bind(this,function(d){this.blurEnabled&&this.focusLost(d)}));mxEvent.addListener(a,"keydown",mxUtils.bind(this,function(d){mxEvent.isConsumed(d)||(this.isStopEditingEvent(d)?(this.graph.stopEditing(!1),mxEvent.consume(d)):27==d.keyCode&&(this.graph.stopEditing(this.isCancelEditingKeyEvent(d)),mxEvent.consume(d)))}));
var b=mxUtils.bind(this,function(d){null!=this.editingCell&&this.clearOnChange&&a.innerHTML==this.getEmptyLabelText()&&(!mxClient.IS_FF||8!=d.keyCode&&46!=d.keyCode)&&(this.clearOnChange=!1,a.innerHTML="")});mxEvent.addListener(a,"keypress",b);mxEvent.addListener(a,"paste",b);b=mxUtils.bind(this,function(d){null!=this.editingCell&&(0==this.textarea.innerHTML.length||"<br>"==this.textarea.innerHTML?(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length):
this.clearOnChange=!1)});mxEvent.addListener(a,mxClient.IS_IE11||mxClient.IS_IE?"keyup":"input",b);mxEvent.addListener(a,"cut",b);mxEvent.addListener(a,"paste",b);b=mxClient.IS_IE11||mxClient.IS_IE?"keydown":"input";var c=mxUtils.bind(this,function(d){null!=this.editingCell&&this.autoSize&&!mxEvent.isConsumed(d)&&(null!=this.resizeThread&&window.clearTimeout(this.resizeThread),this.resizeThread=window.setTimeout(mxUtils.bind(this,function(){this.resizeThread=null;this.resize()}),0))});mxEvent.addListener(a,
b,c);mxEvent.addListener(window,"resize",c);9<=document.documentMode?(mxEvent.addListener(a,"DOMNodeRemoved",c),mxEvent.addListener(a,"DOMNodeInserted",c)):(mxEvent.addListener(a,"cut",c),mxEvent.addListener(a,"paste",c))};mxCellEditor.prototype.isStopEditingEvent=function(a){return 113==a.keyCode||this.graph.isEnterStopsCellEditing()&&13==a.keyCode&&!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)};mxCellEditor.prototype.isEventSource=function(a){return mxEvent.getSource(a)==this.textarea}; | Base | 1 |
function(){return null!=q?q.readyState:3};this.getLastError=function(){return S};this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(M,W){},mouseMove:function(M,W){var U,X=-1;return function(){clearTimeout(U);var u=this,E=arguments,J=function(){U=null;X=Date.now();M.apply(u,E)};Date.now()-X>W?J():U=setTimeout(J,W)}}(function(M,W){m(W)},200),mouseUp:function(M,W){m(W)}};l.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||
c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);this.selectionChangeListener=function(M,W){M=function(u){return null!=u?u.id:null};var U=null!=b.currentPage?b.currentPage.getId():null,X=W.getProperty("added");W=W.getProperty("removed");c("selectionChange",{pageId:U,removed:X?X.map(M):[],added:W?W.map(M):[]})};l.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionChangeListener);this.cursorHandler=mxUtils.bind(this,function(){for(var M in y)n(y[M])}); | Base | 1 |
EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");f.apply(this,arguments)};var g=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){g.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var m=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(O,
X){null!=X.shortcut&&900>n&&!mxClient.IS_IOS?O.firstChild.nextSibling.setAttribute("title",X.shortcut):m.apply(this,arguments)};var q=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){q.apply(this,arguments);if(null!=this.userElement){var O=this.userElement;O.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+O.style.display;O.className="geToolbarButton";O.innerHTML="";O.style.backgroundImage="url("+Editor.userImage+")";O.style.backgroundPosition="center center"; | Base | 1 |
dirclass : function(f) {
return f.mime == 'directory' ? 'directory' : '';
}, | Base | 1 |
function apply(changes, target, modify) {
var obj, clone;
if (modify) {
obj = target;
} else {
clone = require('udc');
obj = clone(target);
}
changes.forEach(function (ch) {
var ptr, keys, len;
switch (ch.type) {
case 'put':
ptr = obj;
keys = ch.key;
len = keys.length;
if (len) {
keys.forEach(function (prop, i) {
if (!(prop in ptr)) {
ptr[prop] = {};
}
if (i < len - 1) {
ptr = ptr[prop];
} else {
ptr[prop] = ch.value;
}
});
} else {
obj = ch.value;
}
break;
case 'del':
ptr = obj;
keys = ch.key;
len = keys.length;
if (len) {
keys.forEach(function (prop, i) {
if (!(prop in ptr)) {
ptr[prop] = {};
}
if (i < len - 1) {
ptr = ptr[prop];
} else {
if (Array.isArray(ptr)) {
ptr.splice(parseInt(prop, 10), 1);
} else {
delete ptr[prop];
}
}
});
} else {
obj = null;
}
break;
}
});
return obj;
} | Variant | 0 |
function angularInit(element, bootstrap) {
var appElement,
module,
config = {};
// The element `element` has priority over any other element.
forEach(ngAttrPrefixes, function (prefix) {
var name = prefix + "app";
if (!appElement && element.hasAttribute && element.hasAttribute(name)) {
appElement = element;
module = element.getAttribute(name);
}
});
forEach(ngAttrPrefixes, function (prefix) {
var name = prefix + "app";
var candidate;
if (
!appElement &&
(candidate = element.querySelector("[" + name.replace(":", "\\:") + "]"))
) {
appElement = candidate;
module = candidate.getAttribute(name);
}
});
if (appElement) {
if (!isAutoBootstrapAllowed) {
window.console.error(
"Angular: disabling automatic bootstrap. <script> protocol indicates " +
"an extension, document.location.href does not match."
);
return;
}
config.strictDi = getNgAttribute(appElement, "strict-di") !== null;
bootstrap(appElement, module ? [module] : [], config);
}
} | Class | 2 |
"nowrap";J.style.overflow="hidden";J.style.textOverflow="ellipsis";J.setAttribute("title",F.title+" ("+F.id+")");var R=document.createElement("input");R.setAttribute("type","checkbox");R.checked=b.sidebar.isEntryVisible(F.id);R.defaultChecked=R.checked;J.appendChild(R);mxUtils.write(J," "+F.title);k.appendChild(J);var W=function(O){if(null==O||"INPUT"!=mxEvent.getSource(O).nodeName){m.style.textAlign="center";m.style.padding="0px";m.style.color="";m.innerHTML="";if(null!=F.desc){var V=document.createElement("pre");
V.style.boxSizing="border-box";V.style.fontFamily="inherit";V.style.margin="20px";V.style.right="0px";V.style.textAlign="left";mxUtils.write(V,F.desc);m.appendChild(V)}null!=F.imageCallback?F.imageCallback(m):null!=F.image?m.innerHTML+='<img border="0" src="'+F.image+'"/>':null==F.desc&&(m.style.padding="20px",m.style.color="rgb(179, 179, 179)",mxUtils.write(m,mxResources.get("noPreview")));null!=p&&(p.style.backgroundColor="");p=J;p.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=
O&&mxEvent.consume(O)}};mxEvent.addListener(J,"click",W);mxEvent.addListener(J,"dblclick",function(O){R.checked=!R.checked;mxEvent.consume(O)});v.push(function(){return R.checked?F.id:null});0==B&&0==H&&W()})(G.entries[H])})(A[B])});e=document.createElement("div");e.className="geDialogTitle";mxUtils.write(e,mxResources.get("shapes"));e.style.position="absolute";e.style.top="0px";e.style.left="0px";e.style.lineHeight="40px";e.style.height="40px";e.style.right="0px";var k=document.createElement("div"), | Base | 1 |
0);l+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&(c.setShadow(!1),cb.apply(this,[c,l,x,p,v]))}};mxUtils.extend(Q,mxRectangleShape);Q.prototype.isHtmlAllowed=function(){return!1};Q.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};Q.prototype.paintForeground=function(c,l,x,p,v){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A=
Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var B=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=B){var ha=this.style["symbol"+A+"Align"],K=this.style["symbol"+A+"VerticalAlign"],xa=this.style["symbol"+A+"Width"],na=this.style["symbol"+A+"Height"],$a=this.style["symbol"+A+"Spacing"]||0,ib=this.style["symbol"+A+"VSpacing"]||
$a,db=this.style["symbol"+A+"ArcSpacing"];null!=db&&(db*=this.getArcSize(p+this.strokewidth,v+this.strokewidth),$a+=db,ib+=db);db=l;var Ga=x;db=ha==mxConstants.ALIGN_CENTER?db+(p-xa)/2:ha==mxConstants.ALIGN_RIGHT?db+(p-xa-$a):db+$a;Ga=K==mxConstants.ALIGN_MIDDLE?Ga+(v-na)/2:K==mxConstants.ALIGN_BOTTOM?Ga+(v-na-ib):Ga+ib;c.save();ha=new B;ha.style=this.style;B.prototype.paintVertexShape.call(ha,c,db,Ga,xa,na);c.restore()}A++}while(null!=B)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)}; | Base | 1 |
l,x,p,v){l=Math.min(p,v/2);c.moveTo(0,0);c.lineTo(p-l,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-l,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("delay",Ta);mxUtils.extend(za,mxActor);za.prototype.size=.2;za.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,p);var A=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(v-A)/2;x=l+A;var B=(p-A)/2;A=B+A;c.moveTo(0,l);c.lineTo(B,l);c.lineTo(B,0);c.lineTo(A,0);c.lineTo(A,l);c.lineTo(p,l);c.lineTo(p,x);
c.lineTo(A,x);c.lineTo(A,v);c.lineTo(B,v);c.lineTo(B,x);c.lineTo(0,x);c.close();c.end()};mxCellRenderer.registerShape("cross",za);mxUtils.extend(wa,mxActor);wa.prototype.size=.25;wa.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p,v/2);x=Math.min(p-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*p);c.moveTo(0,v/2);c.lineTo(x,0);c.lineTo(p-l,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-l,v);c.lineTo(x,v);c.close();c.end()};mxCellRenderer.registerShape("display",wa);mxUtils.extend(Ea, | Base | 1 |
elFinder.prototype.commands.mkdir = function() {
var fm = this.fm,
self = this;
this.value = '';
this.disableOnSearch = true;
this.updateOnSelect = false;
this.mime = 'directory';
this.prefix = 'untitled folder';
this.exec = $.proxy(fm.res('mixin', 'make'), this);
this.shortcuts = [{
pattern : 'ctrl+shift+n'
}];
this.options = { ui : 'mkdirbutton' };
fm.bind('select', function(e) {
var sel = (e.data && e.data.selected)? e.data.selected : [];
self.title = sel.length? fm.i18n('cmdmkdirin') : fm.i18n('cmdmkdir');
self.update(void(0), self.title);
});
this.getstate = function(sel) {
var cwd = fm.cwd(),
sel = (sel && sel[0] != cwd.hash)? this.files(sel) : [],
cnt = sel.length;
return !this._disabled && cwd.write && (!cnt || $.map(sel, function(f) { return f.phash && f.read && !f.locked ? f : null }).length == cnt)? 0 : -1;
}
} | Base | 1 |
null);mxEvent.consume(ca)})))}if(null!=L)for(M=0;M<L.length;M++){var T=document.createElement("div");T.style.marginTop=null!=z||0<M?"6px":"0px";T.appendChild(this.graph.createLinkForHint(L[M].getAttribute("href"),mxUtils.getTextContent(L[M])));this.linkHint.appendChild(T)}}}catch(ca){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var Ca=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){Ca.apply(this,arguments);this.constraintHandler.isEnabled=
mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var z=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(T,ca){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));
z();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var L=this.graph.getLinkForCell(this.state.cell),M=this.graph.getLinksForState(this.state);if(null!=L||null!=M&&0<M.length)this.updateLinkHint(L,M),this.redrawHandles()};var Ra=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Ra.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this, | Base | 1 |
null,null,function(P){console.log(P)},600,null,null,null,null,null,F):(v(H,void 0),n(H))}function L(P){function Q(S){E.style.background="transparent";E.innerHTML="";var Y=document.createElement("div");Y.className="odPreviewStatus";mxUtils.write(Y,S);E.appendChild(Y);N.stop()}if(null!=E)if(E.style.background="transparent",E.innerHTML="",null==P||P.folder||/\.drawiolib$/.test(P.name))Q(mxResources.get("noPreview"));else try{null!=P.remoteItem&&(P=P.remoteItem),U=P,N.spin(E),z(P,function(S){N.stop();
if(U==P)if("mxlibrary"==S.documentElement.nodeName)Q(mxResources.get("noPreview"));else{var Y=S.getElementsByTagName("diagram");F=AspectDialog.prototype.createViewer(E,0==Y.length?S.documentElement:Y[0],null,"transparent")}},function(){H=null;Q(mxResources.get("notADiagramFile"))})}catch(S){H=null,Q(mxResources.get("notADiagramFile"))}}function O(){var P=y(".odFilesBreadcrumb");if(null!=P){P.innerHTML="";for(var Q=0;Q<J.length-1;Q++){var S=document.createElement("span");S.className="odBCFolder";S.innerHTML= | 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 |
var S=document.createElement("tbody"),Q=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(e=mxUtils.indexOf(b.pages,b.currentPage));for(p=f.length-1;0<=p;p--){var P=function(T){var X=new Date(T.modifiedDate),ba=null;if(0<=X.getTime()){var ja=function(ka){v.stop();E.innerHTML="";var da=mxUtils.parseXml(ka),fa=b.editor.extractGraphModel(da.documentElement,!0);if(null!=fa){var ma=function(Ba){null!=Ba&&(Ba=ya(Editor.parseDiagramNode(Ba)));return Ba},ya=function(Ba){var Ha=Ba.getAttribute("background");
if(null==Ha||""==Ha||Ha==mxConstants.NONE)Ha=c.defaultPageBackgroundColor;u.style.backgroundColor=Ha;(new mxCodec(Ba.ownerDocument)).decode(Ba,c.getModel());c.maxFitScale=1;c.fit(8);c.center();return Ba};O.style.display="none";O.innerHTML="";K=da;q=ka;g=parseSelectFunction=null;k=0;if("mxfile"==fa.nodeName){da=fa.getElementsByTagName("diagram");g=[];for(ka=0;ka<da.length;ka++)g.push(da[ka]);k=Math.min(e,g.length-1);0<g.length&&ma(g[k]);if(1<g.length)for(O.removeAttribute("disabled"),O.style.display= | Base | 1 |
Ra,"geMenuItem");null!=Na?(Ra.style.backgroundImage="url("+Na+")",Ra.style.backgroundPosition="center center",Ra.style.backgroundRepeat="no-repeat",Ra.style.backgroundSize="24px 24px",Ra.style.width="34px",Ra.innerHTML=""):ya||(Ra.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Ra.style.backgroundPosition="right 6px center",Ra.style.backgroundRepeat="no-repeat",Ra.style.paddingRight="22px");return Ra}function X(ua,ya,Na,Fa,Ra,db){var Va=document.createElement("a");Va.className=
"1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Va.style.display="inline-block";Va.style.boxSizing="border-box";Va.style.height="30px";Va.style.padding="6px";Va.style.position="relative";Va.style.verticalAlign="top";Va.style.top="0px";"1"==urlParams.sketch&&(Va.style.borderStyle="none",Va.style.boxShadow="none",Va.style.padding="6px",Va.style.margin="0px");null!=U.statusContainer?V.insertBefore(Va,U.statusContainer):V.appendChild(Va);null!=db?(Va.style.backgroundImage="url("+db+")",Va.style.backgroundPosition=
"center center",Va.style.backgroundRepeat="no-repeat",Va.style.backgroundSize="24px 24px",Va.style.width="34px"):mxUtils.write(Va,ua);mxEvent.addListener(Va,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(fb){fb.preventDefault()}));mxEvent.addListener(Va,"click",function(fb){"disabled"!=Va.getAttribute("disabled")&&ya(fb);mxEvent.consume(fb)});null==Na&&(Va.style.marginRight="4px");null!=Fa&&Va.setAttribute("title",Fa);null!=Ra&&(ua=function(){Ra.isEnabled()?(Va.removeAttribute("disabled"),
Va.style.cursor="pointer"):(Va.setAttribute("disabled","disabled"),Va.style.cursor="default")},Ra.addListener("stateChanged",ua),J.addListener("enabledChanged",ua),ua());return Va}function ea(ua,ya,Na){Na=document.createElement("div");Na.className="geMenuItem";Na.style.display="inline-block";Na.style.verticalAlign="top";Na.style.marginRight="6px";Na.style.padding="0 4px 0 4px";Na.style.height="30px";Na.style.position="relative";Na.style.top="0px";"1"==urlParams.sketch&&(Na.style.boxShadow="none"); | Base | 1 |
1?0:Ua.y*ia);this.shape.bounds.height=ma.height-(Ta==Ma.length-1?0:(Ua.height+Ua.y)*ia)}this.shape.redraw()}};var Ya=!1;za.setPosition=function(Ua,eb,jb){La=Math.max(Graph.minTableColumnWidth-Ea.width,eb.x-Ua.x-Ea.width);Ya=mxEvent.isShiftDown(jb.getEvent());null==Da||Ya||(La=Math.min(La,Da.width-Graph.minTableColumnWidth))};za.execute=function(Ua){if(0!=La)T.setTableColumnWidth(this.state.cell,La,Ya);else if(!M.blockDelayedSelection){var eb=T.getCellAt(Ua.getGraphX(),Ua.getGraphY())||ma.cell;T.graphHandler.selectCellForEvent(eb, | Base | 1 |
function(){return this.editor.graph.openLink(A.helpLink)})):null!=A&&null!=A.ownerEmail&&(q=mxResources.get("contactOwner"),v+=mxUtils.htmlEntities(" ("+q+": "+A.ownerEmail+")"),n=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(A.ownerEmail))}));this.showError(e,v,z,g,L,null,null,q,n,null,null,null,k?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(c,e,g){c=new ErrorDialog(this,null,c,mxResources.get("ok"),e);this.showDialog(c.container,g||340,100,!0,!1);
c.init()};EditorUi.prototype.confirm=function(c,e,g,k,m,q){var v=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},x=Math.min(200,28*Math.ceil(c.length/50));c=new ConfirmDialog(this,c,function(){v();null!=e&&e()},function(){v();null!=g&&g()},k,m,null,null,null,null,x);this.showDialog(c.container,340,46+x,!0,q);c.init()};EditorUi.prototype.showBanner=function(c,e,g,k){var m=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!= | Class | 2 |
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 |
function(J){k=J};this.setAutoScroll=function(J){m=J};this.setOpenFill=function(J){q=J};this.setStopClickEnabled=function(J){A=J};this.setSelectInserted=function(J){z=J};this.setSmoothing=function(J){l=J};this.setPerfectFreehandMode=function(J){M=J};this.setBrushSize=function(J){L.size=J};this.getBrushSize=function(){return L.size};var n=function(J){x=J;b.getRubberband().setEnabled(!J);b.graphHandler.setSelectEnabled(!J);b.graphHandler.setMoveEnabled(!J);b.container.style.cursor=J?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))}; | 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 |
g?"&mime="+g:"")+(null!=m?"&format="+m:"")+(null!=q?"&base64="+q:"")+(null!=e?"&filename="+encodeURIComponent(e):"")+(k?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(c,e){e=e||"";c=atob(c);for(var g=c.length,k=Math.ceil(g/1024),m=Array(k),q=0;q<k;++q){for(var v=1024*q,x=Math.min(v+1024,g),A=Array(x-v),z=0;v<x;++z,++v)A[z]=c[v].charCodeAt(0);m[q]=new Uint8Array(A)}return new Blob(m,{type:e})};EditorUi.prototype.saveLocalFile=function(c,e,g,k,m,q,v,x){q=null!=q?q:!1;v=null!=v?v:"vsdx"!= | Class | 2 |
"plantUmlData",JSON.stringify({data:F,format:K.format}))}finally{g.getModel().endUpdate()}},function(H){d.handleError(H)})},null,null,400,220);d.showDialog(G.container,420,300,!0,!0);G.init()};g.cellEditor.editMermaidData=function(D,G,P){var K=JSON.parse(P);G=new TextareaDialog(d,mxResources.get("mermaid")+":",K.data,function(F){null!=F&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(F,K.config,function(H,S,V){d.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image", | Class | 2 |
H&&!W)if("sharepoint"==R)u("site",null,H.id,H.displayName);else if("site"==R)u("subsite",null,H.id,H.name);else{var P=H.folder;H=H.remoteItem?H.remoteItem:H;var Q=(H.parentReference?H.parentReference.driveId:null)||R,S=H.id;P?u(Q,S,null,H.name):A()}}function u(P,Q,S,Y,ba){function da(Ca){N.stop();var oa=document.createElement("table");oa.className="odFileListGrid";for(var Ba=null,Ea=0,Ka=0;null!=Ca&&Ka<Ca.length;Ka++){var Fa=Ca[Ka];if(1!=ja||!Fa.webUrl||0<Fa.webUrl.indexOf("sharepoint.com/sites/")||
0>Fa.webUrl.indexOf("sharepoint.com/")){var Ha=Fa.displayName||Fa.name,Ia=mxUtils.htmlEntities(Fa.description||Ha);ja&&(Fa.folder=2==ja?{isRoot:!0}:!0);var Ma=null!=Fa.folder;if(!g||Ma){var za=document.createElement("tr");za.className=Ea++%2?"odOddRow":"odEvenRow";var ya=document.createElement("td");ya.style.width="36px";var pa=document.createElement("img");pa.src="/images/"+(Ma?"folder.png":"file.png");pa.className="odFileImg";ya.appendChild(pa);za.appendChild(ya);ya=document.createElement("td");
Ma=document.createElement("div");Ma.className="odFileTitle";Ma.innerHTML=mxUtils.htmlEntities(Ha);Ma.setAttribute("title",Ia);ya.appendChild(Ma);za.appendChild(ya);oa.appendChild(za);null==Ba&&(Ba=za,Ba.className+=" odRowSelected",H=Fa,R=P,x||e(H));(function(fa,sa){za.addEventListener("dblclick",M);za.addEventListener("click",function(){Ba!=sa&&(Ba.className=Ba.className.replace("odRowSelected",""),Ba=sa,Ba.className+=" odRowSelected",H=fa,R=P,x||e(H))})})(Fa,za)}}}0==Ea?(Ca=document.createElement("div"),
Ca.className="odEmptyFolder",Ca.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),ha.appendChild(Ca)):ha.appendChild(oa);O();W=!1}if(!W){y(".odCatsList").style.display="block";y(".odFilesSec").style.display="block";null!=E&&(E.innerHTML="",E.style.top="50%");var Z=W=!0,ja=0;V=arguments;var ea=setTimeout(function(){W=Z=!1;N.stop();d(mxResources.get("timeout"))},2E4),ha=y(".odFilesList");ha.innerHTML="";N.spin(ha);switch(P){case "recent":J=[{name:mxResources.get("recent", | Base | 1 |
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 |
u.substring(0,29)||"https://fonts.gstatic.com/"===u.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var u=new mxUrlConverter;u.updateBaseUrl();var E=u.convert,J=this;u.convert=function(T){if(null!=T){var N="http://"==T.substring(0,7)||"https://"==T.substring(0,8);N&&!navigator.onLine?T=Editor.svgBrokenImage.src:!N||T.substring(0,u.baseUrl.length)==u.baseUrl||J.crossOriginImages&&J.isCorsEnabledForUrl(T)?"chrome-extension://"==T.substring(0,19)||mxClient.IS_CHROMEAPP||(T=E.apply(this,
arguments)):T=PROXY_URL+"?url="+encodeURIComponent(T)}return T};return u};Editor.createSvgDataUri=function(u){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(u)))};Editor.prototype.convertImageToDataUri=function(u,E){try{var J=!0,T=window.setTimeout(mxUtils.bind(this,function(){J=!1;E(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(u))mxUtils.get(u,mxUtils.bind(this,function(Q){window.clearTimeout(T);J&&E(Editor.createSvgDataUri(Q.getText()))}),function(){window.clearTimeout(T); | Base | 1 |
self.redraw = function() {
var items = options.items;
var columns = options.columns;
var builder = [];
var m = {};
for (var i = 0, length = items.length; i < length; i++) {
builder.push('<tr class="ui-grid-row" data-index="' + i + '">');
for (var j = 0, jl = columns.length; j < jl; j++) {
var column = columns[j];
var val = items[i][column.name];
m.value = column.template ? column.template(items[i], column) : column.render ? column.render(val, column, items[i]) : val == null ? '' : (column.format ? val.format(column.format) : val);
m.index = j;
m.align = column.align;
m.background = column.background;
builder.push(self.template(m, column));
}
builder.push('</tr>');
}
tbody.find('.ui-grid-row').remove();
tbody.prepend(builder.join(''));
container.rclass('noscroll');
scroll && container.prop('scrollTop', 0);
scroll = false;
eheight = 0;
self.resize(0);
}; | Base | 1 |
function(K){mxEvent.isConsumed(K)||((mxEvent.isControlDown(K)||mxClient.IS_MAC&&mxEvent.isMetaDown(K))&&13==K.keyCode?(E.click(),mxEvent.consume(K)):27==K.keyCode&&(t.click(),mxEvent.consume(K)))}));E.focus();E.className="geCommentEditBtn gePrimaryBtn";X.appendChild(E);F.insertBefore(X,J);V.style.display="none";J.style.display="none";U.focus()}function g(I,F){F.innerHTML="";I=new Date(I.modifiedDate);var H=b.timeSince(I);null==H&&(H=mxResources.get("lessThanAMinute"));mxUtils.write(F,mxResources.get("timeAgo",
[H],"{1} ago"));F.setAttribute("title",I.toLocaleDateString()+" "+I.toLocaleTimeString())}function k(I){var F=document.createElement("img");F.className="geCommentBusyImg";F.src=IMAGE_PATH+"/spin.gif";I.appendChild(F);I.busyImg=F}function l(I){I.style.border="1px solid red";I.removeChild(I.busyImg)}function p(I){I.style.border="";I.removeChild(I.busyImg)}function q(I,F,H,R,W){function J(P,Q,S){var Y=document.createElement("li");Y.className="geCommentAction";var ba=document.createElement("a");ba.className= | Base | 1 |
this.startDrawing=function(){n(!0)};this.isDrawing=function(){return x};var y=mxUtils.bind(this,function(J){if(d){var E=c.length,H=A&&0<D.length&&null!=c&&2>c.length;H||D.push.apply(D,c);c=[];D.push(null);u.push(d);d=null;(H||k)&&this.stopDrawing();k&&2<=E&&this.startDrawing();mxEvent.consume(J)}}),K=new mxCell;K.edge=!0;var B=function(){var J=b.getCurrentCellStyle(K);J=mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(J,mxConstants.STYLE_STROKECOLOR,"#000"));"default"== | Class | 2 |
"blank"===y.value?"_blank":q:null},getEditInput:function(){return g},getEditSelect:function(){return y}}};EditorUi.prototype.addLinkSection=function(d,f){function g(){var C=document.createElement("div");C.style.width="100%";C.style.height="100%";C.style.boxSizing="border-box";null!=y&&y!=mxConstants.NONE?(C.style.border="1px solid black",C.style.backgroundColor=y):(C.style.backgroundPosition="center center",C.style.backgroundRepeat="no-repeat",C.style.backgroundImage="url('"+Dialog.prototype.closeImage+
"')");F.innerHTML="";F.appendChild(C)}mxUtils.write(d,mxResources.get("links")+":");var m=document.createElement("select");m.style.width="100px";m.style.padding="0px";m.style.marginLeft="8px";m.style.marginRight="10px";m.className="geBtn";var q=document.createElement("option");q.setAttribute("value","auto");mxUtils.write(q,mxResources.get("automatic"));m.appendChild(q);q=document.createElement("option");q.setAttribute("value","blank");mxUtils.write(q,mxResources.get("openInNewWindow"));m.appendChild(q); | Base | 1 |
arguments)):T=PROXY_URL+"?url="+encodeURIComponent(T)}return T};return u};Editor.createSvgDataUri=function(u){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(u)))};Editor.prototype.convertImageToDataUri=function(u,E){try{var J=!0,T=window.setTimeout(mxUtils.bind(this,function(){J=!1;E(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(u))mxUtils.get(u,mxUtils.bind(this,function(Q){window.clearTimeout(T);J&&E(Editor.createSvgDataUri(Q.getText()))}),function(){window.clearTimeout(T); | 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 |
setstat = function(files, cwd) {
var c = 0,
s = 0;
$.each(files, function(i, file) {
if (!cwd || file.phash == cwd) {
c++;
s += parseInt(file.size)||0;
}
})
size.html(titleitems+': '+c+', '+titlesize+': '+fm.formatSize(s));
}, | Base | 1 |
v=q.getChildren(q.root);for(k=0;k<v.length;k++){var x=v[k];q.setVisible(x,e[x.id]||!1)}}catch(A){}};EditorUi.prototype.getBaseFilename=function(c){var e=this.getCurrentFile();e=null!=e&&null!=e.getTitle()?e.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(e)||/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||/(\.png)$/i.test(e))e=e.substring(0,e.lastIndexOf("."));/(\.drawio)$/i.test(e)&&(e=e.substring(0,e.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&
0<this.currentPage.getName().length&&(e=e+"-"+this.currentPage.getName());return e};EditorUi.prototype.downloadFile=function(c,e,g,k,m,q,v,x,A,z,L,M){try{k=null!=k?k:this.editor.graph.isSelectionEmpty();var n=this.getBaseFilename("remoteSvg"==c?!1:!m),y=n+("xml"==c||"pdf"==c&&L?".drawio":"")+"."+c;if("xml"==c){var K=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,k,m,null,null,null,e);this.saveData(y,c,K,"text/xml")}else if("html"==c)K=this.getHtml2(this.getFileData(!0),this.editor.graph, | Base | 1 |
localStorage : function(key, val) {
var s = window.localStorage,
oldkey = 'elfinder-'+key+this.id, // old key of elFinder < 2.1.6
retval, oldval;
// new key of elFinder >= 2.1.6
key = window.location.pathname+'-elfinder-'+key+this.id;
if (val === null) {
return s.removeItem(key);
}
if (val === void(0) && !(retval = s.getItem(key)) && (oldval = s.getItem(oldkey))) {
val = oldval;
s.removeItem(oldkey);
}
if (val !== void(0)) {
try {
s.setItem(key, val);
} catch (e) {
s.clear();
s.setItem(key, val);
}
retval = s.getItem(key);
}
return retval;
}, | 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); | Base | 1 |
Runner.prototype.checkGlobals = function(test){
if (this.ignoreLeaks) return;
var ok = this._globals;
var globals = this.globalProps();
var isNode = process.kill;
var leaks;
if (test) {
ok = ok.concat(test._allowedGlobals || []);
}
if(this.prevGlobalsLength == globals.length) return;
this.prevGlobalsLength = globals.length;
leaks = filterLeaks(ok, globals);
this._globals = this._globals.concat(leaks);
if (leaks.length > 1) {
this.fail(test, new Error('global leaks detected: ' + leaks.join(', ') + ''));
} else if (leaks.length) {
this.fail(test, new Error('global leak detected: ' + leaks[0]));
}
}; | Base | 1 |
Number(L.value),[f[n]])}}finally{l.getModel().endUpdate()}});M.className="geBtn gePrimaryBtn";mxEvent.addListener(u,"keypress",function(n){13==n.keyCode&&M.click()});t=document.createElement("div");t.style.marginTop="20px";t.style.textAlign="right";b.editor.cancelFirst?(t.appendChild(d),t.appendChild(M)):(t.appendChild(M),t.appendChild(d));u.appendChild(t);this.container=u},LibraryDialog=function(b,f,l,d,u,t){function D(F){for(F=document.elementFromPoint(F.clientX,F.clientY);null!=F&&F.parentNode!=
v;)F=F.parentNode;var G=null;if(null!=F){var N=v.firstChild;for(G=0;null!=N&&N!=F;)N=N.nextSibling,G++}return G}function c(F,G,N,J,E,H,S,U,Q){try{if(b.spinner.stop(),null==G||"image/"==G.substring(0,6))if(null==F&&null!=S||null==A[F]){var W=function(){O.innerHTML="";O.style.cursor="pointer";O.style.whiteSpace="nowrap";O.style.textOverflow="ellipsis";mxUtils.write(O,null!=R.title&&0<R.title.length?R.title:mxResources.get("untitled"));O.style.color=null==R.title||0==R.title.length?"#d0d0d0":""};v.style.backgroundImage= | Base | 1 |
var digest = function() {
var updated = false;
entries.forEach(function(e) {
var interpreter = ConnieLang.firstInnermostInterpreterFromValue(e.value, context);
if (!interpreter) return;
var newValue = interpreter.replaceInValue(e.value, context);
if (newValue !== e.value) {
e.value = newValue;
updated = true;
}
});
return updated;
}; | Base | 1 |
function vdesc_validate()
{
if (!V2validateData(this.desc, this.itemobj, this.error))
{
this.itemobj.focus();
if(typeof submitBtn !== 'undefined' && submitBtn != '')
{
document.getElementById(submitBtn).disabled = false;
}
return false;
}
if(typeof submitBtn !== 'undefined' && submitBtn != '')
{
document.getElementById(submitBtn).disabled = true;
}
return true;
} | Base | 1 |
qtip: Tine.Tinebase.common.doubleEncode(attr.name.name)
});
}
// copy 'real' data to a node record NOTE: not a full record as we have no record reader here
var nodeData = Ext.copyTo({}, attr, Tine.Filemanager.Model.Node.getFieldNames());
attr.nodeRecord = new Tine.Filemanager.Model.Node(nodeData);
}, | Base | 1 |
this.graph.getTooltip(c,d,e,f);this.show(k,e,f);this.state=c;this.node=d;this.stateSource=g}}),this.delay)}};mxTooltipHandler.prototype.hide=function(){this.resetTimer();this.hideTooltip()};mxTooltipHandler.prototype.hideTooltip=function(){null!=this.div&&(this.div.style.visibility="hidden",this.div.innerHTML="")}; | Base | 1 |
X){null!=X.shortcut&&900>n&&!mxClient.IS_IOS?O.firstChild.nextSibling.setAttribute("title",X.shortcut):m.apply(this,arguments)};var q=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){q.apply(this,arguments);if(null!=this.userElement){var O=this.userElement;O.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+O.style.display;O.className="geToolbarButton";O.innerHTML="";O.style.backgroundImage="url("+Editor.userImage+")";O.style.backgroundPosition="center center";
O.style.backgroundRepeat="no-repeat";O.style.backgroundSize="24px 24px";O.style.height="24px";O.style.width="24px";O.style.cssFloat="right";O.setAttribute("title",mxResources.get("changeUser"));if("none"!=O.style.display){O.style.display="inline-block";var X=this.getCurrentFile();if(null!=X&&X.isRealtimeEnabled()&&X.isRealtimeSupported()){var ea=document.createElement("img");ea.setAttribute("border","0");ea.style.position="absolute";ea.style.left="18px";ea.style.top="2px";ea.style.width="12px";ea.style.height=
"12px";ea.style.cursor="default";var ka=X.getRealtimeError(),ja=X.getRealtimeState();X=mxResources.get("realtimeCollaboration");1==ja?(ea.src=Editor.syncImage,X+=" ("+mxResources.get("online")+")"):(ea.src=Editor.syncProblemImage,X=null!=ka&&null!=ka.message?X+(" ("+ka.message+")"):X+(" ("+mxResources.get("disconnected")+")"));mxEvent.addListener(ea,"click",mxUtils.bind(this,function(U){this.showError(mxResources.get("realtimeCollaboration"),mxUtils.htmlEntities(1==ja?mxResources.get("online"):null!=
ka&&null!=ka.message?ka.message:mxResources.get("disconnected")));mxEvent.consume(U)}));ea.setAttribute("title",X);O.style.paddingRight="4px";O.appendChild(ea)}}}};var y=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){y.apply(this,arguments);if(null!=this.shareButton){var O=this.shareButton;O.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";O.className="geToolbarButton";O.innerHTML="";O.style.backgroundImage= | Base | 1 |
0;P<Q.length;P++)Q[P].parentNode.removeChild(Q[P]);p(X);X.style.opacity="0.5"}else{Q=V(I).replies;for(P=0;P<Q.length;P++)O.removeChild(Q[P]);for(P=0;P<F.length;P++)if(F[P]==I){F.splice(P,1);break}M.style.display=0==O.getElementsByTagName("div").length?"block":"none"}},function(P){l(X);b.handleError(P,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},I.isResolved));x||I.isLocked||0!=R||J(I.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(P){function Q(){var S=
P.target;S.innerHTML="";I.isResolved=!I.isResolved;mxUtils.write(S,I.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Y=I.isResolved?"none":"",ba=V(I).replies,da=Editor.isDarkMode()?"transparent":I.isResolved?"ghostWhite":"white",Z=0;Z<ba.length;Z++){ba[Z].style.backgroundColor=da;for(var ja=ba[Z].querySelectorAll(".geCommentAction"),ea=0;ea<ja.length;ea++)ja[ea]!=S.parentNode&&(ja[ea].style.display=Y);B||(ba[Z].style.display="none")}v()}I.isResolved?U(mxResources.get("reOpened")+ | 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 |
"default")},ma.addListener("stateChanged",ca),H.addListener("enabledChanged",ca),ca());return oa}function G(ca,ba,ja){ja=document.createElement("div");ja.className="geMenuItem";ja.style.display="inline-block";ja.style.verticalAlign="top";ja.style.marginRight="6px";ja.style.padding="0 4px 0 4px";ja.style.height="30px";ja.style.position="relative";ja.style.top="0px";"1"==urlParams.sketch&&(ja.style.boxShadow="none");for(var ia=0;ia<ca.length;ia++)null!=ca[ia]&&("1"==urlParams.sketch&&(ca[ia].style.padding=
"10px 8px",ca[ia].style.width="30px"),ca[ia].style.margin="0px",ca[ia].style.boxShadow="none",ja.appendChild(ca[ia]));null!=ba&&mxUtils.setOpacity(ja,ba);null!=E.statusContainer&&"1"!=urlParams.sketch?S.insertBefore(ja,E.statusContainer):S.appendChild(ja);return ja}function N(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(O.style.left=58>P.offsetTop-P.offsetHeight/2?"70px":"10px");else{for(var ca=S.firstChild;null!=ca;){var ba=ca.nextSibling;"geMenuItem"!=ca.className&&"geItem"!=ca.className|| | Base | 1 |
text : Ext.util.Format.htmlEncode(this.app.i18n._hidden(attr.name)),
qtip : Tine.Tinebase.common.doubleEncode(attr.description ? this.app.i18n._hidden(attr.description) + ' ' + addText : addText),
selected : attr.id === this.selectedFilterId,
id : attr.id,
sorting : attr.sorting,
draggable : true,
allowDrop : false,
leaf : attr.leaf === false ? attr.leaf : true,
cls : 'tinebase-westpanel-node-favorite' + addClass
});
} | Base | 1 |
[];for(G=0;G<d.length;G++)C.push(d[G]);d=C;this.confirmImageResize(function(K){L=K;P()},A)}else P()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,g){g=null!=g?g:!1;var k=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},l=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():
null,p=function(q,x){if(q||g)mxSettings.setResizeImages(q?x:null),mxSettings.save();k();d(x)};null==l||g?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(q){p(q,!0)},function(q){p(q,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,
!0,!0):p(!1,l)};EditorUi.prototype.parseFile=function(d,g,k){k=null!=k?k:d.name;var l=new FileReader;l.onload=mxUtils.bind(this,function(){this.parseFileData(l.result,g,k)});l.readAsText(d)};EditorUi.prototype.parseFileData=function(d,g,k){var l=new XMLHttpRequest;l.open("POST",OPEN_URL);l.setRequestHeader("Content-Type","application/x-www-form-urlencoded");l.onreadystatechange=function(){g(l)};l.send("format=xml&filename="+encodeURIComponent(k)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE", | Base | 1 |
function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);D.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,e,g,k,m,q,v,x){var A=c.editor.graph;if("xml"==g)c.hideDialog(),c.saveData(e,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==g)c.hideDialog(),c.saveData(e,"svg",mxUtils.getXml(A.getSvg(k,m,q)),"image/svg+xml"); | Base | 1 |
function makeDirectory (path, stats, cb) {
cb = inflight('makeDirectory:' + path, cb)
if (!cb) {
return log.silly('makeDirectory', path, 'creation already in flight; waiting')
} else {
log.silly('makeDirectory', path, 'creation not in flight; initializing')
}
var owner = calculateOwner()
if (!process.getuid) {
return mkdirp(path, function (er) {
log.verbose('makeCacheDir', 'UID & GID are irrelevant on', process.platform)
stats[path] = owner
return cb(er, stats[path])
})
}
if (owner.uid !== 0 || !process.env.HOME) {
log.silly(
'makeDirectory', path,
'uid:', owner.uid,
'gid:', owner.gid
)
stats[path] = owner
mkdirp(path, afterMkdir)
} else {
fs.stat(process.env.HOME, function (er, st) {
if (er) {
log.error('makeDirectory', 'homeless?')
return cb(er)
}
log.silly(
'makeDirectory', path,
'uid:', st.uid,
'gid:', st.gid
)
stats[path] = st
mkdirp(path, afterMkdir)
})
}
function afterMkdir (er, made) {
if (er || !stats[path] || isNaN(stats[path].uid) || isNaN(stats[path].gid)) {
return cb(er, stats[path])
}
if (!made) return cb(er, stats[path])
setPermissions(made, stats[path], cb)
}
} | Class | 2 |
init: function() {
// Load saved config
var _self = this,
fields = [
'html', 'xhtmlOut', 'breaks', 'langPrefix', 'linkify', 'typographer'
],
defaults = {
'html': false,
'xhtmlOut': true,
'breaks': true,
'langPrefix': 'language-',
'linkify': true,
'typographer': false,
'highlight': true,
'highlightTheme': 'railscasts.css'
};
meta.settings.get('markdown', function(err, options) {
for(var field in defaults) {
// If not set in config (nil)
if (!options.hasOwnProperty(field)) {
_self.config[field] = defaults[field];
} else {
if (field !== 'langPrefix' && field !== 'highlightTheme' && field !== 'headerPrefix') {
_self.config[field] = options[field] === 'on' ? true : false;
} else {
_self.config[field] = options[field];
}
}
}
_self.highlight = _self.config.highlight || true;
delete _self.config.highlight;
parser = new Remarkable(_self.config);
});
}, | Base | 1 |
function(qb,yb){var ub=tb.apply(this,arguments);return null==ub||qb.view.graph.isCustomLink(ub)?null:ub};pa.getLinkTargetForCellState=function(qb,yb){return qb.view.graph.getLinkTargetForCell(qb.cell)};pa.drawCellState=function(qb,yb){for(var ub=qb.view.graph,vb=null!=Ta?Ta.get(qb.cell):ub.isCellSelected(qb.cell),wb=ub.model.getParent(qb.cell);!(ia&&null==Ta||vb)&&null!=wb;)vb=null!=Ta?Ta.get(wb):ub.isCellSelected(wb),wb=ub.model.getParent(wb);(ia&&null==Ta||vb)&&gb.apply(this,arguments)};pa.drawState(this.getView().getState(this.model.root), | Class | 2 |
DriveComment.prototype.deleteComment=function(b,e){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},b,e)};function mxODPicker(b,e,f,c,m,n,v,d,g,k,l,p,q,x){function y(N,Q){Q=Q||document;return Q.querySelector(N)}function A(N,Q,R){if(null==N["@microsoft.graph.downloadUrl"])if(null==N.parentReference)R();else{c(N.id,N.parentReference.driveId,function(ea){A(ea,Q,R)},R);return}var Y=new XMLHttpRequest;Y.open("GET",N["@microsoft.graph.downloadUrl"]);var ba=N.file?"image/png"==N.file.mimeType:!1;Y.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var ea=Y.responseText;
ba&&(ea="data:image/png;base64,"+Editor.base64Encode(ea),ea=Editor.extractGraphModelFromPng(ea));var Z=mxUtils.parseXml(ea),fa="mxlibrary"==Z.documentElement.nodeName?Z.documentElement:Editor.extractGraphModel(Z.documentElement);if(null!=fa){Q(fa.ownerDocument);return}}catch(aa){}R()}};ba&&Y.overrideMimeType&&Y.overrideMimeType("text/plain; charset=x-user-defined");Y.send()}function B(){p&&null!=F?K.exportToCanvas(function(N){N=EditorUi.prototype.createImageDataUri(N,null,"png");v(H,N);n(H)},400, | Base | 1 |
ia){la=ha.getAttribute("section");ca=ha.getAttribute("subsection");if(null==la&&(ma=ia.indexOf("/"),la=ia.substring(0,ma),null==ca)){var qa=ia.indexOf("/",ma+1);-1<qa&&(ca=ia.substring(ma+1,qa))}ma=ta[la];null==ma&&(ya++,ma=[],ta[la]=ma);ia=ha.getAttribute("clibs");null!=da[ia]&&(ia=da[ia]);ia={url:ha.getAttribute("url"),libs:ha.getAttribute("libs"),title:ha.getAttribute("title")||ha.getAttribute("name"),preview:ha.getAttribute("preview"),clibs:ia,tags:ha.getAttribute("tags")};ma.push(ia);null!=ca&&
(ma=ka[la],null==ma&&(ma={},ka[la]=ma),la=ma[ca],null==la&&(la=[],ma[ca]=la),la.push(ia))}ha=ha.nextSibling}G(ta,oa,wa)}})}function K(ha){v&&(Ba.scrollTop=0,aa.innerHTML="",Ea.spin(aa),U=!1,W=!0,va.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),ba=null,v(ua,function(){A(mxResources.get("cannotLoad"));ua([])},ha?null:n))}function F(ha){if(""==ha)null!=u&&(u.click(),u=null);else{if(null==TemplatesDialog.tagsList[c]){var da={};for(Ka in ta)for(var ca=ta[Ka],la=0;la<ca.length;la++){var ia= | Base | 1 |
function(y){this.spinner.stop();this.handleError(y)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,v,null,1<x,A,k,q,m);x=this.isServices(x)?4<x?390:280:160;this.showDialog(c.container,420,x,!0,!0);c.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,e,g,k,m,q){};EditorUi.prototype.pickFolder=function(c, | Base | 1 |
this.getstate = function() {
var sel = this.fm.selected(),
cnt = sel.length,
cwdWrapper;
if (cnt !== 1) {
return -1;
}
cwdWrapper = this.fm.getUI('cwd').parent();
return cwdWrapper.hasClass('elfinder-search-result')? 0 : -1;
} | Base | 1 |
this.unitListener=function(n,y){g.setUnit(y.getProperty("unit"))};x.addListener(mxEvent.SIZE,f);x.container.addEventListener("scroll",d);x.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(n){k=n;m.style.background=k.bkgClr;z()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(n,y,K,B){if(l&&4<n.height|| | Base | 1 |
$scope.initialize = function() {
growl.success('Retrieving definition for requisition ' + $scope.foreignSource + '...');
RequisitionsService.getForeignSourceDefinition($scope.foreignSource).then(
function(foreignSourceDef) { // success
$scope.foreignSourceDef = foreignSourceDef;
// Updating pagination variables for detectors.
$scope.filteredDetectors = $scope.foreignSourceDef.detectors;
$scope.updateFilteredDetectors();
// Updating pagination variables for policies.
$scope.filteredPolicies = $scope.foreignSourceDef.policies;
$scope.updateFilteredPolicies();
},
$scope.errorHandler
);
}; | Base | 1 |
function doSearch(searchStr)
{
if (lastSearchStr == searchStr && isGetAll == lastGetAll) return;
deselectTempCat();
tempDlgContent.scrollTop = 0;
diagramsTiles.innerHTML = '';
diagramsListTitle.innerHTML = mxUtils.htmlEntities(mxResources.get('searchResults')) +
' "' + mxUtils.htmlEntities(searchStr) + '"';
delayTimer = null;
if (inTempScreen)
{
//Do search in templates
filterTemplates(searchStr);
}
else if (searchDocsCallback)
{
if (searchStr)
{
spinner.spin(diagramsTiles);
cancelPendingCall = false;
callInitiated = true;
//TODO use request id to allow only last request to show results
searchDocsCallback(searchStr, extDiagramsCallback, function()
{
showError(mxResources.get('searchFailed'));
extDiagramsCallback([]);
}, isGetAll? null : username);
}
else
{
getRecentDocs(isGetAll); //Load recent doc again
}
}
lastSearchStr = searchStr;
lastGetAll = isGetAll;
}; | Base | 1 |
u&&J[T].getAttribute("data-font-src")!=E&&J[T].setAttribute("data-font-src",E)}};var t=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return t.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 u=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=u)for(var E in u)this.globalVars[E]= | Base | 1 |
(new mxCodec(u.ownerDocument)).decode(u)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var L=Graph.prototype.getSvg;Graph.prototype.getSvg=function(u,E,J,T,N,Q,R,Y,ba,ea,Z,fa,aa,va){var ja=null,Ba=null,Ha=null;fa||null==this.themes||"darkTheme"!=this.defaultThemeName||(ja=this.stylesheet,Ba=this.shapeForegroundColor,Ha=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor= | Base | 1 |
Graph.prototype.openLink = function(href, target, allowOpener)
{
var result = window;
try
{
// Workaround for blocking in same iframe
if (target == '_self' && window != window.top)
{
window.location.href = href;
}
else
{
// Avoids page reload for anchors (workaround for IE but used everywhere)
if (href.substring(0, this.baseUrl.length) == this.baseUrl &&
href.charAt(this.baseUrl.length) == '#' &&
target == '_top' && window == window.top)
{
var hash = href.split('#')[1];
// Forces navigation if on same hash
if (window.location.hash == '#' + hash)
{
window.location.hash = '';
}
window.location.hash = hash;
}
else
{
result = window.open(href, (target != null) ? target : '_blank');
if (result != null && !allowOpener)
{
result.opener = null;
}
}
}
}
catch (e)
{
// ignores permission denied
}
return result;
}; | Base | 1 |
this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Ra(){mxActor.call(this)}function ab(){mxRectangleShape.call(this)}function Ka(){mxActor.call(this)}function bb(){mxActor.call(this)}function Pa(){mxActor.call(this)}function Za(){mxActor.call(this)}function z(){mxActor.call(this)}function L(){mxActor.call(this)}function M(){mxActor.call(this)}function T(){mxActor.call(this)}function ca(){mxActor.call(this)}function ia(){mxActor.call(this)}function ma(){mxEllipse.call(this)} | Base | 1 |
sanitizeHtmlLight: function (value) {
value = value || '';
value = value.replace(/<[\/]{0,1}(base)[^><]*>/gi, '');
value = value.replace(/<[\/]{0,1}(object)[^><]*>/gi, '');
value = value.replace(/<[\/]{0,1}(embed)[^><]*>/gi, '');
value = value.replace(/<[\/]{0,1}(applet)[^><]*>/gi, '');
value = value.replace(/<[\/]{0,1}(iframe)[^><]*>/gi, '');
value = value.replace(/<[\/]{0,1}(script)[^><]*>/gi, '');
value = value.replace(/<[^><]*([^a-z]{1}on[a-z]+)=[^><]*>/gi, function (match) {
return match.replace(/[^a-z]{1}on[a-z]+=/gi, ' data-handler-stripped=');
});
value = value.replace(/href=" *javascript\:(.*?)"/gi, function(m, $1) {
return 'removed=""';
});
value = value.replace(/href=' *javascript\:(.*?)'/gi, function(m, $1) {
return 'removed=""';
});
value = value.replace(/src=" *javascript\:(.*?)"/gi, function(m, $1) {
return 'removed=""';
});
value = value.replace(/src=' *javascript\:(.*?)'/gi, function(m, $1) {
return 'removed=""';
});
return value;
}, | Base | 1 |
$scope.refresh = function() {
growl.success('Retrieving node ' + $scope.foreignId + ' from requisition ' + $scope.foreignSource + '...');
RequisitionsService.getNode($scope.foreignSource, $scope.foreignId).then(
function(node) { // success
$scope.node = node;
},
$scope.errorHandler
);
}; | Base | 1 |
TagCreationContainer.prototype._convertInputToTag = function(textfield, value, span) {
var that = this;
var link = $('<a>', {
'html': value
});
textfield.remove();
span.find ('.delete-tag').remove ();
that._appendRemove (span);
span.append(link);
$(link).attr (
'href', that.searchUrl + '?term=' + encodeURIComponent ($(link).text ()));
link.click(function(e) {
e.stopPropagation(); // prevent #x2-inline-tags click event
});
return link;
}; | Class | 2 |
function(la,ra){"1"==urlParams.sketch?(O.insertTemplateEnabled&&!O.isOffline()&&O.menus.addMenuItems(la,["insertTemplate"],ra),O.menus.addMenuItems(la,["insertImage","insertLink","-"],ra),O.menus.addSubmenu("insertLayout",la,ra,mxResources.get("layout")),O.menus.addSubmenu("insertAdvanced",la,ra,mxResources.get("advanced"))):(fa.apply(this,arguments),O.menus.addSubmenu("table",la,ra))}})();var V="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),Q=function(R, | Base | 1 |
if(0==D&&0==C)D=H,C=1;else if(Math.abs(D-H)<=(S||1==I&&F?y:0))C+=1;else if(1<C&&F){B=B.slice(0,I+1);break}else if(3<=B.length-I&&!F)C=0,G=D=0!=P?P:0,B.splice(0,0==I?1:I),I=-1;else break;0!=G||S||(D=G=H)}3==B.length&&B[1]==q&&(G=0)}y=function(V,M,W,U){var X=[];if(U){U=K;var u=0}else U=0,u=K;X.push(new mxPoint(V.x-U,V.y-u));X.push(new mxPoint(V.x+U,V.y+u));X.push(V);X.push(M);X.push(new mxPoint(M.x-U,M.y-u));X.push(new mxPoint(M.x+U,M.y+u));if(null!=W)return W.points=X,W;V=new mxPolyline(X,mxConstants.GUIDE_COLOR,
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= | Base | 1 |
function sliceArgs(args, startIndex) {
return slice.call(args, startIndex || 0);
} | Class | 2 |
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 |
c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Oa);mxUtils.extend(Qa,mxEllipse);Qa.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+p/2,x),c.lineTo(l+p/2,x+v)):(c.moveTo(l,x+v/2),c.lineTo(l+p,x+v/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Qa);mxUtils.extend(Ta,mxActor);Ta.prototype.redrawPath=function(c, | Base | 1 |
this.parents = function(hash) {
var parents = [],
dir;
while ((dir = this.file(hash))) {
parents.unshift(dir.hash);
hash = dir.phash;
}
return parents;
} | Base | 1 |
function(y){this.spinner.stop();this.handleError(y)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,v,null,1<x,A,k,q,m);x=this.isServices(x)?4<x?390:280:160;this.showDialog(c.container,420,x,!0,!0);c.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,e,g,k,m,q){};EditorUi.prototype.pickFolder=function(c, | Class | 2 |
$scope.initialize = function(customHandler) {
var value = $cookies.get('requisitions_page_size');
if (value) {
$scope.pageSize = value;
}
growl.success('Retrieving requisition ' + $scope.foreignSource + '...');
RequisitionsService.getRequisition($scope.foreignSource).then(
function(requisition) { // success
$scope.requisition = requisition;
$scope.filteredNodes = requisition.nodes;
$scope.updateFilteredNodes();
if (customHandler) {
customHandler();
}
},
$scope.errorHandler
);
}; | 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, | 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 |
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 |
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"))}; | Base | 1 |
n.toDataURL();if(y.length<e.length){var K=document.createElement("canvas");K.width=L;K.height=M;var B=K.toDataURL();y!==B&&(e=y,x=L,A=M)}}}catch(F){}g(e,x,A)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,e,g){try{var k=new Image;k.onload=function(){k.width=0<k.width?k.width:120;k.height=0<k.height?k.height:120;e(k)};null!=g&&(k.onerror=g);k.src=c}catch(m){if(null!=g)g(m);else throw m;}};EditorUi.prototype.getDefaultSketchMode= | Class | 2 |
var uppercase = function(string) {return isString(string) ? string.toUpperCase() : string;}; | Class | 2 |
DrawioFileSync.prototype.merge=function(b,f,l,d,u,t){try{this.file.stats.merged++;this.lastModified=new Date;var D=this.file.getDescriptorRevisionId(l);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var c=this.file.getShadowPages();this.file.backupPatch=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(c,this.ui.pages):null;var e=this.file.isRealtime()?this.ui.diffPages(c,this.file.ownPages):null;c=this.ui.applyPatches(c,b);var g=null==f?null:this.ui.getHashValueForPages(c);
this.file.setShadowPages(c);EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"backup",this.file.backupPatch,"pending",e,"checksum",f,"current",g,"valid",f==g,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",D,"etag",this.file.getDescriptorEtag(l));if(null!=f&&f!=g){var k=this.ui.hashValue(D),m=this.ui.hashValue(this.file.getCurrentRevisionId());this.file.checksumError(u,b,"From: "+m+"\nTo: "+k+"\nChecksum: "+f+"\nCurrent: "+g,D,"merge");
"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.merge.checksumError",[this],"data",[this.file.data,this.file.createData(),this.ui.getXmlForPages(c)]);return}null==this.patchRealtime(b,null,e)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),l);this.file.backupPatch=null;null!=d&&d(!0)}catch(x){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();
null!=u&&u(x);try{if(this.file.errorReportsEnabled)m=this.ui.hashValue(this.file.getCurrentRevisionId()),k=this.ui.hashValue(D),this.file.sendErrorReport("Error in merge","From: "+m+"\nTo: "+k+"\nChecksum: "+f+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),x);else{var q=this.file.getCurrentUser(),v=null!=q?q.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),v,x)}}catch(A){}}}; | Class | 2 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.