code
stringlengths 12
2.05k
| label_name
stringclasses 5
values | label
int64 0
4
|
---|---|---|
mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(c,e,g,k,m,q,v){q=null!=q?q:0<=c.indexOf("NetworkError")||0<=c.indexOf("SecurityError")||0<=c.indexOf("NS_ERROR_FAILURE")||0<=c.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
"1"!=urlParams.dev)try{if(c!=EditorUi.lastErrorMessage&&(null==c||null==e||-1==c.indexOf("Script error")&&-1==c.indexOf("extension"))&&null!=c&&0>c.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=c;var x=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";m=null!=m?m:Error(c);(new Image).src=x+"/log?severity="+q+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=k?":colno:"+
encodeURIComponent(k):"")+(null!=m&&null!=m.stack?"&stack="+encodeURIComponent(m.stack):"")}}catch(A){}try{v||null==window.console||console.error(q,c,e,g,k,m)}catch(A){}};EditorUi.logEvent=function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi.enableLogging)try{var e=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=e+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(g){}};EditorUi.sendReport= | Class | 2 |
qtip: Tine.Tinebase.common.doubleEncode(attr.name),
leaf: !!attr.account_grants,
allowDrop: !!attr.account_grants && attr.account_grants.addGrant
});
// copy 'real' data to container space
attr.container = Ext.copyTo({}, attr, Tine.Tinebase.Model.Container.getFieldNames());
}, | Base | 1 |
inputs: function(input, watchId) {
return function(scope, value, locals, inputs) {
if (inputs) return inputs[watchId];
return input(scope, value, locals);
};
} | Class | 2 |
function genericAjaxPopupFind($sel) {
$devblocksPopups = $('#devblocksPopups');
$data = $devblocksPopups.data();
$element = $($sel).closest('DIV.devblocks-popup');
for($key in $data) {
if($element.attr('id') == $data[$key].attr('id'))
return $data[$key];
}
return null;
} | Compound | 4 |
App.Actions.WEB.update_custom_doc_root = function(elm, hint) {
var prepath = $('input[name="v-custom-doc-root_prepath"]').val();
var domain = $('select[name="v-custom-doc-domain"]').val();
var folder = $('input[name="v-custom-doc-folder"]').val();
console.log(domain, folder);
$('.custom_docroot_hint').html(prepath+domain+'/public_html/'+folder);
} | Base | 1 |
function(K){var F=x.length;if(1===F%2||F>=f){var H=0,S=0,V,M=0;for(V=K;V<F;V++)M++,K=x[V],H+=K.x,S+=K.y;return{x:H/M,y:S/M}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;function P2PCollab(b,e,f){function c(M,W){if(!P){var U=e.file.getCurrentUser();if(G&&null!=U&&null!=U.email&&(W=JSON.stringify({from:z,id:A,type:M,sessionId:e.clientId,userId:U.id,username:U.displayName,data:W,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION}),K&&"cursor"!=M&&EditorUi.debug("P2PCollab: sending to socket server",[W]),A++,M=!K&&("cursor"==M||"selectionChange"==M),D&&!M&&V("message",W),M))for(p2pId in C)C[p2pId].send(W)}}function m(M){if(b.shareCursorPosition&&!l.isMouseDown){var W= | Class | 2 |
mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxCell,["children","edges","overlays","mxTransient"],["parent","source","target"]);a.isCellCodec=function(){return!0};a.isNumericAttribute=function(b,c,d){return"value"!==c.nodeName&&mxObjectCodec.prototype.isNumericAttribute.apply(this,arguments)};a.isExcluded=function(b,c,d,e){return mxObjectCodec.prototype.isExcluded.apply(this,arguments)||e&&"value"==c&&d.nodeType==mxConstants.NODETYPE_ELEMENT};a.afterEncode=function(b,c,d){if(null!= | Base | 1 |
Client.prototype.rekey = function(cb) {
var stream = this._sshstream;
var ret = true;
var error;
try {
ret = stream.rekey();
} catch (ex) {
error = ex;
}
// TODO: re-throw error if no callback?
if (typeof cb === 'function') {
if (error) {
process.nextTick(function() {
cb(error);
});
} else
this.once('rekey', cb);
}
return ret;
}; | Base | 1 |
d.addHours=function(a,c){return d.addMinutes(a,60*c)};d.addMinutes=function(a,c){return d.addSeconds(a,60*c)};d.addSeconds=function(a,c){return d.addMilliseconds(a,1E3*c)};d.addMilliseconds=function(a,c){return new Date(a.getTime()+c)};d.subtract=function(a,c){var b=a.getTime()-c.getTime();return{toMilliseconds:function(){return b},toSeconds:function(){return b/1E3},toMinutes:function(){return b/6E4},toHours:function(){return b/36E5},toDays:function(){return b/864E5}}};d.isLeapYear=function(a){return!(a% | Class | 2 |
k.scrollHeight-k.offsetHeight&&C()},mxEvent.addListener(k,"scroll",A))}}),y)});p.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(k,mxResources.get("loading"));var M=mxUtils.bind(this,function(u){var D=this.ui.spinner,B=0;this.ui.spinner.stop();var C=function(){D.spin(k,mxResources.get("loading"));B+=1},G=function(){--B;0===B&&D.stop()};null==u&&(k.innerHTML="",u=1);null!=A&&(mxEvent.removeListener(k,"scroll",A),A=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a"); | Base | 1 |
mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxCell,["children","edges","overlays","mxTransient"],["parent","source","target"]);a.isCellCodec=function(){return!0};a.isNumericAttribute=function(b,c,d){return"value"!==c.nodeName&&mxObjectCodec.prototype.isNumericAttribute.apply(this,arguments)};a.isExcluded=function(b,c,d,e){return mxObjectCodec.prototype.isExcluded.apply(this,arguments)||e&&"value"==c&&d.nodeType==mxConstants.NODETYPE_ELEMENT};a.afterEncode=function(b,c,d){if(null!=
c.value&&c.value.nodeType==mxConstants.NODETYPE_ELEMENT){var e=d;d=mxUtils.importNode(b.document,c.value,!0);d.appendChild(e);b=e.getAttribute("id");d.setAttribute("id",b);e.removeAttribute("id")}return d};a.beforeDecode=function(b,c,d){var e=c.cloneNode(!0),f=this.getName();c.nodeName!=f?(e=c.getElementsByTagName(f)[0],null!=e&&e.parentNode==c?(mxUtils.removeWhitespace(e,!0),mxUtils.removeWhitespace(e,!1),e.parentNode.removeChild(e)):e=null,d.value=c.cloneNode(!0),c=d.value.getAttribute("id"),null!= | Base | 1 |
function usercheck_init_mod(i, opt) {
var obj = document.getElementById('ajax_output_' + opt);
obj.innerHTML = '';
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;
}
var pqr = i.value;
if (opt == '1')
ajax_call('Validator.php?u=' + i.value + 'user', usercheck_callback_p, usercheck_error);
if (opt == '2')
ajax_call('Validator.php?u=' + i.value + 'user', usercheck_callback_s, usercheck_error);
}
| Base | 1 |
this.exec = function(hashes, type) {
var files = this.files(hashes),
cnt = files.length,
mime = type || mimes[0],
cwd = fm.cwd(),
error = ['errArchive', 'errPerm', 'errCreatingTempDir', 'errFtpDownloadFile', 'errFtpUploadFile', 'errFtpMkdir', 'errArchiveExec', 'errExtractExec', 'errRm'],
i, makeDfrd;
dfrd = $.Deferred().fail(function(error) {
error && fm.error(error);
});
if (!(this.enabled() && cnt && mimes.length && $.inArray(mime, mimes) !== -1)) {
return dfrd.reject();
}
if (!cwd.write) {
return dfrd.reject(error);
}
for (i = 0; i < cnt; i++) {
if (!files[i].read) {
return dfrd.reject(error);
}
}
self.mime = mime;
self.prefix = ((cnt > 1)? 'Archive' : files[0].name) + '.' + fm.option('archivers')['createext'][mime];
self.data = {targets : self.hashes(hashes), type : mime};
makeDfrd = $.proxy(fm.res('mixin', 'make'), self)();
dfrd.reject();
return makeDfrd;
}
} | Base | 1 |
function updatePageName()
{
pageMenu.innerHTML = '';
if (ui.currentPage != null)
{
mxUtils.write(pageMenu, ui.currentPage.getName());
var n = (ui.pages != null) ? ui.pages.length : 1;
var idx = ui.getPageIndex(ui.currentPage);
idx = (idx != null) ? idx + 1 : 1;
var id = ui.currentPage.getId();
pageMenu.setAttribute('title', ui.currentPage.getName() +
' (' + idx + '/' + n + ')' + ((id != null) ?
' [' + id + ']' : ''));
}
}; | 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= | Class | 2 |
function decorateStream(stream) {
stream.setKeepAlive = noop;
stream.setNoDelay = noop;
stream.setTimeout = noop;
stream.ref = noop;
stream.unref = noop;
stream.destroySoon = stream.destroy;
return stream;
} | Base | 1 |
mxTooltipHandler.prototype.show=function(a,b,c){if(!this.destroyed&&null!=a&&0<a.length){null==this.div&&this.init();var d=mxUtils.getScrollOrigin();this.div.style.zIndex=this.zIndex;this.div.style.left=b+d.x+"px";this.div.style.top=c+mxConstants.TOOLTIP_VERTICAL_OFFSET+d.y+"px";mxUtils.isNode(a)?(this.div.innerHTML="",this.div.appendChild(a)):this.div.innerHTML=a.replace(/\n/g,"<br>");this.div.style.visibility="";mxUtils.fit(this.div)}}; | Base | 1 |
D;var E=y(".odPreview"),J=y("#odFiles");b=function(N,Q){Q=Q||document;return Q.querySelectorAll(N)}(".odCatListTitle");for(D=0;D<b.length;D++)b[D].addEventListener("click",function(){H=U=null;if(!V)switch(L(this),this.id){case "odFiles":z();break;case "odRecent":z("recent");break;case "odShared":z("shared");break;case "odSharepoint":z("sharepoint")}});var T=null;y("#odSearchBox").addEventListener("keyup",function(N){var Q=this;null!=T&&clearTimeout(T);13==N.keyCode?C(Q.value):T=setTimeout(function(){C(Q.value)}, | Class | 2 |
function id(a,b,c,d){var e={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[a+" Tage",a+" Tagen"],M:["ein Monat","einem Monat"],MM:[a+" Monate",a+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[a+" Jahre",a+" Jahren"]};return b?e[c][0]:e[c][1]} | Base | 1 |
(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= | Class | 2 |
c.nodeName&&(v=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{q.endUpdate()}null!=v&&this.chromelessResize&&this.chromelessResize(!0,v)}return g};EditorUi.prototype.getCopyFilename=function(c,e){var g=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var k=g.lastIndexOf(".");0<=k&&(c=g.substring(k),g=g.substring(0,k));if(e){e=g;var m=new Date;g=m.getFullYear();k=m.getMonth()+1;var q=m.getDate(),v=m.getHours(),x=m.getMinutes();m=m.getSeconds(); | Base | 1 |
null;u=null!=u?u.getElementsByTagName("parsererror"):null;null!=u&&0<u.length&&(J=E||mxResources.get("invalidChars"),E=u[0].getElementsByTagName("div"),0<E.length&&(J=mxUtils.getTextContent(E[0])));return null!=J?mxUtils.trim(J):J};Editor.addRetryToError=function(u,E){null!=u&&(u=null!=u.error?u.error:u,null==u.retry&&(u.retry=E))};Editor.configure=function(u,E){if(null!=u){Editor.config=u;Editor.configVersion=u.version;Menus.prototype.defaultFonts=u.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors= | Base | 1 |
PLANT_URL+"/svg/")+function(y){r="";for(i=0;i<y.length;i+=3)r=i+2==y.length?r+p(y.charCodeAt(i),y.charCodeAt(i+1),0):i+1==y.length?r+p(y.charCodeAt(i),0,0):r+p(y.charCodeAt(i),y.charCodeAt(i+1),y.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=g&&(x.responseType="blob");x.onload=function(y){if(200<=this.status&&300>this.status)if("txt"==g)k(this.response);else{var A=new FileReader;A.readAsDataURL(this.response);A.onloadend=function(B){var I=new Image;I.onload=
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(); | Class | 2 |
this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.window.setVisible(!1),this.menus.findReplaceWindow.window.destroy(),this.menus.findReplaceWindow=null);G.apply(this,arguments)};var aa=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(O){aa.apply(this,arguments);if(O){var X=window.innerWidth||
document.documentElement.clientWidth||document.body.clientWidth;1E3<=X&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=X||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var da=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView= | Base | 1 |
Graph.sanitizeHtml=function(a,c){return DOMPurify.sanitize(a,{ADD_ATTR:["target"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^(?:(?:https?|mailto|tel|callto|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i})};Graph.sanitizeSvg=function(a){return DOMPurify.sanitize(a,{IN_PLACE:!0})}; | Base | 1 |
Number(I.value),[e[t]])}}finally{f.getModel().endUpdate()}});O.className="geBtn gePrimaryBtn";mxEvent.addListener(m,"keypress",function(t){13==t.keyCode&&O.click()});n=document.createElement("div");n.style.marginTop="20px";n.style.textAlign="right";b.editor.cancelFirst?(n.appendChild(c),n.appendChild(O)):(n.appendChild(O),n.appendChild(c));m.appendChild(n);this.container=m},LibraryDialog=function(b,e,f,c,m,n){function v(D){for(D=document.elementFromPoint(D.clientX,D.clientY);null!=D&&D.parentNode!= | 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 |
v=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",Za.prototype.arrowSize)));return new mxPoint(x.x+(1-v)*x.width,x.y+(1-p)*x.height/2)},function(x,p){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(x.y+x.height/2-p.y)/x.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(x.x+x.width-p.x)/x.width))})]}},yb=function(c){return function(l){return[fb(l,["size"],function(x){var p=Math.max(0,Math.min(.5*x.height,parseFloat(mxUtils.getValue(this.state.style,"size",
c))));return new mxPoint(x.x,x.y+p)},function(x,p){this.state.style.size=Math.max(0,p.y-x.y)},!0)]}},ub=function(c,l,x){return function(p){var v=[fb(p,["size"],function(A){var B=Math.max(0,Math.min(A.width,Math.min(A.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(A.x+B,A.y+B)},function(A,B){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(A.width,B.x-A.x),Math.min(A.height,B.y-A.y)))/c)},!1)];x&&mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED, | Base | 1 |
name : function(f) {
var name = fm.escape(f.name);
!list && (name = name.replace(/([_.])/g, '​$1'));
return name;
}, | Base | 1 |
generateWebProxyAccessToken () {
return this._transport
.execute('signer_generateWebProxyAccessToken');
} | Class | 2 |
render: function(relations) {
if ((! relations) || (relations.length == 0)) {
return '';
}
if (! this.recordClass) {
if (! Tine[this.foreignApp]) {
Tine.log.warn('Tine.widgets.relation.GridRenderer::render - ForeignApp not found: ' + this.foreignApp);
return '';
}
this.recordClass = Tine[this.foreignApp].Model[this.foreignModel];
}
for (var index = 0; index < relations.length; index++) {
var el = relations[index];
if (el.type == this.type && el.related_model == this.relModel) {
var record = new this.recordClass(el.related_record);
return record.getTitle();
}
}
} | Base | 1 |
"12px";var ka=X.getRealtimeError();X=X.getRealtimeState();var ja=mxResources.get("realtimeCollaboration");1==X?(ea.src=Editor.syncImage,ja+=" ("+mxResources.get("online")+")"):(ea.src=Editor.syncProblemImage,ja=null!=ka&&null!=ka.message?ja+(" ("+ka.message+")"):ja+(" ("+mxResources.get("disconnected")+")"));ea.setAttribute("title",ja);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="url("+Editor.shareImage+")";O.style.backgroundPosition="center center";O.style.backgroundRepeat="no-repeat";O.style.backgroundSize="24px 24px";O.style.height="24px";O.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop=
"-2px",this.buttonContainer.style.paddingTop="4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var O=document.createElement("div");O.style.display="inline-block";O.style.position="relative";O.style.marginTop="6px";O.style.marginRight="4px";var X=document.createElement("a");X.className="geMenuItem gePrimaryBtn";X.style.marginLeft="8px";X.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var ea="1"==urlParams.publishClose? | Base | 1 |
var DEBUG_NOOP = function(msg) {}; | Base | 1 |
var T=document.createElement("tbody"),N=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(g=mxUtils.indexOf(b.pages,b.currentPage));for(q=e.length-1;0<=q;q--){var Q=function(R){var Y=new Date(R.modifiedDate),ba=null;if(0<=Y.getTime()){var ea=function(fa){x.stop();v.innerHTML="";var aa=mxUtils.parseXml(fa),va=b.editor.extractGraphModel(aa.documentElement,!0);if(null!=va){var ja=function(Ha){null!=Ha&&(Ha=Ba(Editor.parseDiagramNode(Ha)));return Ha},Ba=function(Ha){var ra=Ha.getAttribute("background"); | Base | 1 |
setTimeout(function(){Fa.style.display="none"},4E3)}function B(){null!=X&&(X.style.fontWeight="normal",X.style.textDecoration="none",u=X,X=null)}function I(ha,da,ca,la,ia,ma,qa){if(-1<ha.className.indexOf("geTempDlgRadioBtnActive"))return!1;ha.className+=" geTempDlgRadioBtnActive";M.querySelector(".geTempDlgRadioBtn[data-id="+la+"]").className="geTempDlgRadioBtn "+(qa?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");M.querySelector("."+da).src="/images/"+ca+"-sel.svg";M.querySelector("."+ia).src= | Base | 1 |
function send_to_iframes(key, data) {
// propagate events to iframes
iframes.forEach(function(iframe) {
var payload = {
name: uniq_prefix,
key: key,
data: data
};
iframe.window.postMessage(JSON.stringify(payload), "*");
});
} | Class | 2 |
l.style.verticalAlign="middle";l.className="geBtn";M.appendChild(l);b.isOffline()&&!mxClient.IS_CHROMEAPP&&(l.style.display="none");l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.style.verticalAlign="middle";l.className="geBtn";b.editor.cancelFirst&&M.appendChild(l);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(n){if(n.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=n.docs;var y=n.docs[0].url;"application/mxe"==n.docs[0].mimeType||null!=n.docs[0].mimeType&&
"application/vnd.jgraph."==n.docs[0].mimeType.substring(0,23)?y="https://www.draw.io/#G"+n.docs[0].id:"application/vnd.google-apps.folder"==n.docs[0].mimeType&&(y="https://drive.google.com/#folders/"+n.docs[0].id);k.value=y;k.focus()}else LinkDialog.selectedDocs=null;k.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&c(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this, | Class | 2 |
Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var f=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(f=a.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==f&&(f=a.value.getAttribute("tooltip"));if(null!=f)null!=f&&this.isReplacePlaceholders(a)&&(f=this.replacePlaceholders(a,f)),b=this.sanitizeHtml(f);else{f=this.builtInProperties;a=a.value.attributes;var d=[];this.isEnabled()&&(f.push("linkTarget"),f.push("link"));for(var g=0;g<a.length;g++)0>
mxUtils.indexOf(f,a[g].nodeName)&&0<a[g].nodeValue.length&&d.push({name:a[g].nodeName,value:a[g].nodeValue});d.sort(function(e,k){return e.name<k.name?-1:e.name>k.name?1:0});for(g=0;g<d.length;g++)"link"==d[g].name&&this.isCustomLink(d[g].value)||(b+=("link"!=d[g].name?"<b>"+d[g].name+":</b> ":"")+mxUtils.htmlEntities(d[g].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1),mxClient.IS_SVG&&(b='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+b+"</div>"))}}return b}; | 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 |
null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(l){this.handleError(l)}};EditorUi.prototype.writeImageToClipboard=function(d,g,k,l){var p=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":p,"text/html":new Blob(['<img src="'+d+'" width="'+g+'" height="'+k+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](l)};EditorUi.prototype.copyCells=function(d,g){var k=this.editor.graph;if(k.isSelectionEmpty())d.innerHTML="";else{var l= | Base | 1 |
(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(f,l,d){d.ui=f.ui;return l};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="18.0.3";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage= | Class | 2 |
0;e<this.pages.length;e++)this.updatePageRoot(this.pages[e]),this.addBasenamesForCell(this.pages[e].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);e=[];for(var g in c)e.push(g);return e};EditorUi.prototype.addBasenamesForCell=function(c,e){function g(v){if(null!=v){var x=v.lastIndexOf(".");0<x&&(v=v.substring(x+1,v.length));null==e[v]&&(e[v]=!0)}}var k=this.editor.graph,m=k.getCellStyle(c);g(mxStencilRegistry.getBasenameForStencil(m[mxConstants.STYLE_SHAPE]));k.model.isEdge(c)&&
(g(mxMarker.getPackageForType(m[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(m[mxConstants.STYLE_ENDARROW])));m=k.model.getChildCount(c);for(var q=0;q<m;q++)this.addBasenamesForCell(k.model.getChildAt(c,q),e)};EditorUi.prototype.setGraphEnabled=function(c){this.diagramContainer.style.visibility=c?"":"hidden";this.formatContainer.style.visibility=c?"":"hidden";this.sidebarFooterContainer.style.display=c?"":"none";this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display= | Class | 2 |
html: Buffer.from('<p>Tere, tere</p><p>vana kere!</p>\n')
}
};
shared.resolveContent(mail.data, 'html', function(err, value) {
expect(err).to.not.exist;
expect(value).to.deep.equal(mail.data.html);
done();
});
}); | Base | 1 |
function ondrain() {
if (self._waitClientDrain) {
self._waitClientDrain = false;
if (!self._waitWindow) {
if (self._chunk)
self._write(self._chunk, null, self._chunkcb);
else if (self._chunkcb)
self._chunkcb();
else if (self._chunkErr)
self.stderr._write(self._chunkErr, null, self._chunkcbErr);
else if (self._chunkcbErr)
self._chunkcbErr();
}
}
} | Base | 1 |
EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,e)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,e,g,k,m,q,v,x,A,z,L,M,n,y,K,B){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");
return this.editor.exportToCanvas(c,e,g,k,m,q,v,x,A,z,L,M,n,y,K,B)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,e,g,k){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,e,g,k)};EditorUi.prototype.convertImageToDataUri=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri"); | Class | 2 |
function(){try{var M=L.width,n=L.height;if(0==M&&0==n){var y=A.result,K=y.indexOf(","),B=decodeURIComponent(escape(atob(y.substring(K+1)))),F=mxUtils.parseXml(B).getElementsByTagName("svg");0<F.length&&(M=parseFloat(F[0].getAttribute("width")),n=parseFloat(F[0].getAttribute("height")))}g(A.result,M,n)}catch(G){k(G)}};L.src=A.result};A.onerror=function(z){k(z)}}else k(x)};v.onerror=function(x){k(x)};v.send()};EditorUi.prototype.insertAsPreText=function(c,e,g){var k=this.editor.graph,m=null;k.getModel().beginUpdate(); | Class | 2 |
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(" "), | Class | 2 |
c,b){var e=function(h,f,l){var p=function(n){n&&(this.res=n)};p.prototype=h;p.prototype.constructor=p;h=new p(l);for(var k in f||{})l=f[k],h[k]=l.slice?l.slice():l;return h},g={res:e(c.res,b.res)};g.formatter=e(c.formatter,b.formatter,g.res);g.parser=e(c.parser,b.parser,g.res);t[a]=g};d.compile=function(a){for(var c=/\[([^\[\]]*|\[[^\[\]]*\])*\]|([A-Za-z])\2+|\.{3}|./g,b,e=[a];b=c.exec(a);)e[e.length]=b[0];return e};d.format=function(a,c,b){c="string"===typeof c?d.compile(c):c;a=d.addMinutes(a,b? | Class | 2 |
O.focus();document.execCommand("selectAll",!1,null);M=function(){O.removeAttribute("contentEditable");O.style.cursor="pointer";R.title=O.innerHTML;W()};mxEvent.consume(Z)}};mxEvent.addListener(O,"click",T);mxEvent.addListener(C,"dblclick",T);v.appendChild(C);mxEvent.addListener(C,"dragstart",function(Z){null==F&&null!=S&&(P.style.visibility="hidden",O.style.visibility="hidden");mxClient.IS_FF&&null!=S.xml&&Z.dataTransfer.setData("Text",S.xml);z=D(Z);mxClient.IS_GC&&(C.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(C.style, | Class | 2 |
setup: function () {
var data = this.model.get('data') || {};
this.emailId = data.emailId;
this.emailName = data.emailName;
if (
this.parentModel
&&
(this.model.get('parentType') == this.parentModel.name && this.model.get('parentId') == this.parentModel.id)
) {
if (this.model.get('post')) {
this.createField('post', null, null, 'views/stream/fields/post');
this.hasPost = true;
}
if ((this.model.get('attachmentsIds') || []).length) {
this.createField('attachments', 'attachmentMultiple', {}, 'views/stream/fields/attachment-multiple');
this.hasAttachments = true;
}
}
this.messageData['email'] = '<a href="#Email/view/' + data.emailId + '">' + data.emailName + '</a>';
this.messageName = 'emailReceived';
if (data.isInitial) {
this.messageName += 'Initial';
}
if (data.personEntityId) {
this.messageName += 'From';
this.messageData['from'] = '<a href="#'+data.personEntityType+'/view/' + data.personEntityId + '">' + data.personEntityName + '</a>';
}
if (this.model.get('parentType') === data.personEntityType && this.model.get('parentId') == data.personEntityId) {
this.isThis = true;
}
if (this.isThis) {
this.messageName += 'This';
}
this.createMessage();
}, | Base | 1 |
mxTooltipHandler.prototype.show=function(a,b,c){if(!this.destroyed&&null!=a&&0<a.length){null==this.div&&this.init();var d=mxUtils.getScrollOrigin();this.div.style.zIndex=this.zIndex;this.div.style.left=b+d.x+"px";this.div.style.top=c+mxConstants.TOOLTIP_VERTICAL_OFFSET+d.y+"px";mxUtils.isNode(a)?(this.div.innerHTML="",this.div.appendChild(a)):this.div.innerHTML=a.replace(/\n/g,"<br>");this.div.style.visibility="";mxUtils.fit(this.div)}}; | Base | 1 |
this.shape){this.shape.stroke=0==Da?mxConstants.NONE:pa.stroke;if(this.shape.constructor==V)this.shape.line=L(Qa[Ta],0,Da),this.shape.updateBoundsFromLine();else{var Ya=T.getActualStartSize(ma.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Da*ia;this.shape.bounds.x=ma.x+(Ta==Fa.length-1?0:Ya.x*ia);this.shape.bounds.width=ma.width-(Ta==Fa.length-1?0:Ya.width+Ya.x+ia)}this.shape.redraw()}};var La=!1;za.setPosition=function(Ya,Ua,eb){Da=Math.max(Graph.minTableRowHeight-
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 |
null!=sa[ua]&&(ua=sa[ua]);ua={url:oa.getAttribute("url"),libs:oa.getAttribute("libs"),title:oa.getAttribute("title"),tooltip:oa.getAttribute("name")||oa.getAttribute("url"),preview:oa.getAttribute("preview"),clibs:ua,tags:oa.getAttribute("tags")};xa.push(ua);null!=ya&&(xa=za[wa],null==xa&&(xa={},za[wa]=xa),wa=xa[ya],null==wa&&(wa=[],xa[ya]=wa),wa.push(ua))}oa=oa.nextSibling}S.stop();C()}})};G.appendChild(fa);G.appendChild(Ba);G.appendChild(Z);var ta=!1,ka=l;/^https?:\/\//.test(ka)&&!b.editor.isCorsEnabledForUrl(ka)&& | Base | 1 |
"dblclick",function(La){n();mxEvent.consume(La)})}else if(!ja&&null!=pa&&0<pa.length){var Na=function(La){U.setAttribute("disabled","disabled");na.style.backgroundColor="transparent";na.style.border="1px solid transparent";S.spin(Z);ma(pa,function(Ta,Ua){S.stop();null!=Ta&&(y(na,Ta,sa,null,null,ia,Ua),La&&n())})};ra=ba||TEMPLATE_PATH+"/"+pa.substring(0,pa.length-4)+".png";na.style.backgroundImage="url("+ra+")";na.style.backgroundPosition="center center";na.style.backgroundRepeat="no-repeat";if(null!= | Class | 2 |
function afterUser () {
// globalconfig and globalignorefile defaults
// need to respond to the 'prefix' setting up to this point.
// Eg, `npm config get globalconfig --prefix ~/local` should
// return `~/local/etc/npmrc`
// annoying humans and their expectations!
if (conf.get('prefix')) {
var etc = path.resolve(conf.get('prefix'), 'etc')
correctMkdir(etc, function () {
defaults.globalconfig = path.resolve(etc, 'npmrc')
defaults.globalignorefile = path.resolve(etc, 'npmignore')
afterUserContinuation()
})
} else {
afterUserContinuation()
}
} | Class | 2 |
return this.editor.exportToCanvas(c,e,g,k,m,q,v,x,A,z,L,M,n,y,K,B)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,e,g,k){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,e,g,k)};EditorUi.prototype.convertImageToDataUri=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri"); | Class | 2 |
function(){g({message:JSON.parse(n.result).Message})},n.readAsText(L.response))}catch(y){g({})}});L.send(v)}else try{this.doImportVisio(c,e,g,k)}catch(M){g(M)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.importGraphML=function(c,e,g){g=null!=g?g:mxUtils.bind(this,function(m){this.handleError(m)}); | Class | 2 |
D=this.editor.graph.getModel().getStyle(D),this.styleInput.value=D||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var L=this.isSelectionAllowed;this.isSelectionAllowed=function(D){return mxEvent.getSource(D)==this.styleInput?!0:L.apply(this,arguments)}}z=document.getElementById("geInfo");null!=z&&z.parentNode.removeChild(z);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var C=null;mxEvent.addListener(g.container,"dragleave",function(D){g.isEnabled()&& | Base | 1 |
Graph.sanitizeSvg = function(div)
{
return DOMPurify.sanitize(div, {IN_PLACE: true});
}; | Base | 1 |
"geCommentActionLnk";mxUtils.write(ba,N);Y.appendChild(ba);mxEvent.addListener(ba,"click",function(ea){Q(ea,K);ea.preventDefault();mxEvent.consume(ea)});T.appendChild(Y);R&&(Y.style.display="none")}function W(){function N(Y){Q.push(R);if(null!=Y.replies)for(var ba=0;ba<Y.replies.length;ba++)R=R.nextSibling,N(Y.replies[ba])}var Q=[],R=X;N(K);return{pdiv:R,replies:Q}}function U(N,Q,R,Y,ba){function ea(){k(va);K.addReply(aa,function(ja){aa.id=ja;K.replies.push(aa);p(va);R&&R()},function(ja){Z();l(va);
b.handleError(ja,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Y,ba)}function Z(){d(aa,va,function(ja){ea()},!0)}var fa=W().pdiv,aa=b.newComment(N,b.getCurrentUser());aa.pCommentId=K.id;null==K.replies&&(K.replies=[]);var va=q(aa,K.replies,fa,S+1);Q?Z():ea()}if(V||!K.isResolved){t.style.display="none";var X=document.createElement("div");X.className="geCommentContainer";X.setAttribute("data-commentId",K.id);X.style.marginLeft=20*S+5+"px";K.isResolved&&!Editor.isDarkMode()&& | Class | 2 |
"pagecount"==F?null!=c.pages?c.pages.length:1:M.apply(this,arguments)};var n=e.labelLinkClicked;e.labelLinkClicked=function(F,G,N){var J=G.getAttribute("href");if(null==J||!e.isCustomLink(J)||!mxEvent.isTouchEvent(N)&&mxEvent.isPopupTrigger(N))n.apply(this,arguments);else{if(!e.isEnabled()||null!=F&&e.isCellLocked(F.cell))e.customLinkClicked(J),e.getRubberband().reset();mxEvent.consume(N)}};this.editor.getOrCreateFilename=function(){var F=c.defaultFilename,G=c.getCurrentFile();null!=G&&(F=null!=G.getTitle()?
G.getTitle():F);return F};var y=this.actions.get("print");y.setEnabled(!mxClient.IS_IOS||!navigator.standalone);y.visible=y.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75, | Base | 1 |
Mocha.prototype.growl = function(){
this.options.growl = true;
return this;
}; | Base | 1 |
InputToolTip.prototype.createDom = function() {
var element = this.makeElement('div');
this._element = element;
element.addClass('input-tool-tip');
element.html(gettext('search or ask your question'));
this.decorate(element);
}; | Base | 1 |
(H.geometry.height-U[1].geometry.height)/2:(N.y+N.height)/R-Q.y+-J.y+10);return y.addCells(U,V)}finally{y.model.endUpdate()}}function p(H,S,V){H=y.getOutgoingTreeEdges(H);V=y.view.getState(V);var M=[];if(null!=V&&null!=H){for(var W=0;W<H.length;W++){var U=y.view.getState(y.model.getTerminal(H[W],!1));null!=U&&(!S&&Math.min(U.x+U.width,V.x+V.width)>=Math.max(U.x,V.x)||S&&Math.min(U.y+U.height,V.y+V.height)>=Math.max(U.y,V.y))&&M.push(U)}M.sort(function(X,u){return S?X.x+X.width-u.x-u.width:X.y+X.height-
u.y-u.height})}return M}function q(H,S){var V=d(H),M=S==mxConstants.DIRECTION_EAST||S==mxConstants.DIRECTION_WEST;(V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST)==M&&V!=S?x.actions.get("selectParent").funct():V==S?(S=y.getOutgoingTreeEdges(H),null!=S&&0<S.length&&y.setSelectionCell(y.model.getTerminal(S[0],!1))):(V=y.getIncomingTreeEdges(H),null!=V&&0<V.length&&(M=p(y.model.getTerminal(V[0],!0),M,H),H=y.view.getState(H),null!=H&&(H=mxUtils.indexOf(M,H),0<=H&&(H+=S==mxConstants.DIRECTION_NORTH|| | Base | 1 |
var sanitizeAttribs = function (tagName, attribs, opt_naiveUriRewriter, opt_nmTokenPolicy, opt_logger) {
/**
* add trusting data-attributes to the default sanitizeAttribs from caja
* this function is mostly copied from the caja source
*/
var ATTRIBS = caja.html4.ATTRIBS;
for (var i = 0; i < attribs.length; i += 2) {
var attribName = attribs[i];
if (attribName.substr(0,5) == 'data-') {
var attribKey = '*::' + attribName;
if (!ATTRIBS.hasOwnProperty(attribKey)) {
ATTRIBS[attribKey] = 0;
}
}
}
// Caja doesn't allow data uri for img::src, see
// https://github.com/google/caja/issues/1558
// This is not a security issue for browser post ie6 though, so we
// disable the check
// https://www.owasp.org/index.php/Script_in_IMG_tags
ATTRIBS['img::src'] = 0;
return caja.sanitizeAttribs(tagName, attribs, opt_naiveUriRewriter, opt_nmTokenPolicy, opt_logger);
}; | 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 |
this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(Q){return new u(Q,Editor.createRoughCanvas(Q),this)};var E=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(Q){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?E.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle", | 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 |
null!=na){ca=ia.getAttribute("section");aa=ia.getAttribute("subsection");if(null==ca&&(la=na.indexOf("/"),ca=na.substring(0,la),null==aa)){var qa=na.indexOf("/",la+1);-1<qa&&(aa=na.substring(la+1,qa))}la=ya[ca];null==la&&(xa++,la=[],ya[ca]=la);na=ia.getAttribute("clibs");null!=ra[na]&&(na=ra[na]);na={url:ia.getAttribute("url"),libs:ia.getAttribute("libs"),title:ia.getAttribute("title")||ia.getAttribute("name"),preview:ia.getAttribute("preview"),clibs:na,tags:ia.getAttribute("tags")};la.push(na);null!=
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= | Base | 1 |
c.nodeName&&(v=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{q.endUpdate()}null!=v&&this.chromelessResize&&this.chromelessResize(!0,v)}return g};EditorUi.prototype.getCopyFilename=function(c,e){var g=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var k=g.lastIndexOf(".");0<=k&&(c=g.substring(k),g=g.substring(0,k));if(e){e=g;var m=new Date;g=m.getFullYear();k=m.getMonth()+1;var q=m.getDate(),v=m.getHours(),x=m.getMinutes();m=m.getSeconds();
g=e+(" "+(g+"-"+k+"-"+q+"-"+v+"-"+x+"-"+m))}return g=mxResources.get("copyOf",[g])+c};EditorUi.prototype.fileLoaded=function(c,e){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var k=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var m=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null); | Base | 1 |
_Plugin.registry["createLink"] = function(){
return new LinkDialog({command: "createLink"});
}; | Base | 1 |
.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-v),x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));return c};z.prototype.getConstraints=function(c,l,x){c=[];var p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Za.prototype.arrowWidth)))),v=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Za.prototype.arrowSize))));p=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};za.prototype.getConstraints= | Base | 1 |
this.put("editCell",new Menu(mxUtils.bind(this,function(R,fa){var la=this.editorUi.editor.graph,ra=la.getSelectionCell();ka.call(this,R,ra,null,fa);this.addMenuItems(R,["editTooltip"],fa);la.model.isVertex(ra)&&this.addMenuItems(R,["editGeometry"],fa);this.addMenuItems(R,["-","edit"],fa)})));this.addPopupMenuCellEditItems=function(R,fa,la,ra){R.addSeparator();this.addSubmenu("editCell",R,ra,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,function(R,fa){var la=O.getCurrentFile(); | Class | 2 |
aa&&(la=pa[ca],null==la&&(la={},pa[ca]=la),ca=la[aa],null==ca&&(ca=[],la[aa]=ca),ca.push(na))}ha=ha.nextSibling}G(za,ea,wa)}})}function H(ha){E&&(ya.scrollTop=0,da.innerHTML="",Ea.spin(da),U=!1,V=!0,fa.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),ba=null,E(ua,function(){z(mxResources.get("cannotLoad"));ua([])},ha?null:u))}function F(ha){if(""==ha)null!=n&&(n.click(),n=null);else{if(null==TemplatesDialog.tagsList[d]){var qa={};for(Da in za)for(var aa=za[Da],ca=0;ca<aa.length;ca++){var na=
aa[ca];if(null!=na.tags)for(var la=na.tags.toLowerCase().split(";"),oa=0;oa<la.length;oa++)null==qa[la[oa]]&&(qa[la[oa]]=[]),qa[la[oa]].push(na)}TemplatesDialog.tagsList[d]=qa}var ra=ha.toLowerCase().split(" ");qa=TemplatesDialog.tagsList[d];if(0<wa&&null==qa.__tagsList__){for(Da in ea)for(aa=ea[Da],ca=0;ca<aa.length;ca++)for(na=aa[ca],la=na.title.split(" "),la.push(Da),oa=0;oa<la.length;oa++){var ia=la[oa].toLowerCase();null==qa[ia]&&(qa[ia]=[]);qa[ia].push(na)}qa.__tagsList__=!0}var Da=[];aa={};
for(ca=la=0;ca<ra.length;ca++)if(0<ra[ca].length){ia=qa[ra[ca]];var Ja={};Da=[];if(null!=ia)for(oa=0;oa<ia.length;oa++)na=ia[oa],0==la==(null==aa[na.url])&&(Ja[na.url]=!0,Da.push(na));aa=Ja;la++}0==Da.length?fa.innerHTML=mxResources.get("noResultsFor",[ha]):A(Da,!0)}}function J(ha){if(ba!=ha||Q!=ja)y(),ya.scrollTop=0,da.innerHTML="",fa.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(ha)+'"',va=null,Z?F(ha):c&&(ha?(Ea.spin(da),U=!1,V=!0,c(ha,ua,function(){z(mxResources.get("searchFailed")); | Base | 1 |
r=g.isEventsEnabled();g.setEventsEnabled(!1);var q=this.graph.isEnabled();this.graph.setEnabled(!1);var t=g.getTranslate();g.translate=new mxPoint(a,b);var u=this.graph.cellRenderer.redraw,x=g.states;a=g.scale;if(this.clipping){var A=new mxRectangle((f.x+t.x)*a,(f.y+t.y)*a,f.width*a/p,f.height*a/p),E=this;this.graph.cellRenderer.redraw=function(D,B,v){if(null!=D){var y=x.get(D.cell);if(null!=y&&(y=g.getBoundingBox(y,!1),null!=y&&0<y.width&&0<y.height&&!mxUtils.intersects(A,y))||!E.isCellVisible(D.cell))return}u.apply(this,
arguments)}}a=null;try{var C=[this.getRoot()];a=new mxTemporaryCellStates(g,c,C,null,mxUtils.bind(this,function(D){return this.getLinkForCellState(D)}))}finally{if(mxClient.IS_IE)g.overlayPane.innerHTML="",g.canvas.style.overflow="hidden",g.canvas.style.position="relative",g.canvas.style.top=this.marginTop+"px",g.canvas.style.width=f.width+"px",g.canvas.style.height=f.height+"px";else for(c=e.firstChild;null!=c;)C=c.nextSibling,b=c.nodeName.toLowerCase(),"svg"==b?(c.style.overflow="hidden",c.style.position= | Base | 1 |
function(b,c){b=typeof c;"function"==b?c=mxStyleRegistry.getName(c):"object"==b&&(c=null);return c};a.decode=function(b,c,d){d=d||new this.template.constructor;var e=c.getAttribute("id");null!=e&&(b.objects[e]=d);for(c=c.firstChild;null!=c;){if(!this.processInclude(b,c,d)&&"add"==c.nodeName&&(e=c.getAttribute("as"),null!=e)){var f=c.getAttribute("extend"),g=null!=f?mxUtils.clone(d.styles[f]):null;null==g&&(null!=f&&mxLog.warn("mxStylesheetCodec.decode: stylesheet "+f+" not found to extend"),g={});
for(f=c.firstChild;null!=f;){if(f.nodeType==mxConstants.NODETYPE_ELEMENT){var k=f.getAttribute("as");if("add"==f.nodeName){var l=mxUtils.getTextContent(f);null!=l&&0<l.length&&mxStylesheetCodec.allowEval?l=mxUtils.eval(l):(l=f.getAttribute("value"),mxUtils.isNumeric(l)&&(l=parseFloat(l)));null!=l&&(g[k]=l)}else"remove"==f.nodeName&&delete g[k]}f=f.nextSibling}d.putCellStyle(e,g)}c=c.nextSibling}return d};return a}());mxStylesheetCodec.allowEval=!0;/* | Base | 1 |
(k?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(K);null!=m&&m(K);return K});e.mathEnabled&&this.editor.addMathCss(q);if(null!=m)this.embedFonts(q,mxUtils.bind(this,function(K){x?this.editor.convertImages(K,mxUtils.bind(this,function(B){y(B)})):y(K)}));else return y(q)};EditorUi.prototype.embedFonts=function(c,e){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),
this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(c,g),e(c)}catch(k){e(c)}}))}catch(g){e(c)}}))};EditorUi.prototype.exportImage=function(c,e,g,k,m,q,v,x,A,z,L,M,n){A=null!=A?A:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var y=this.editor.graph.isSelectionEmpty();g=null!=g?g:y;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(K){this.spinner.stop();try{this.saveCanvas(K, | Base | 1 |
d.style.width="300px";d.style.display="inline-flex";d.style.justifyContent="center";d.style.alignItems="center";d.style.position="absolute";var g=document.createElement("img");g.onload=function(){function C(){l.model.setStyle(x,y+m())}l=new Graph(k);l.autoExtend=!1;l.autoScroll=!1;l.setGridEnabled(!1);l.setEnabled(!0);l.setPanning(!1);l.setConnectable(!1);l.getRubberband().setEnabled(!1);l.graphHandler.allowLivePreview=!1;var D=l.createVertexHandler;l.createVertexHandler=function(){var J=D.apply(this,
arguments);J.livePreview=!1;return J};if(null!=f)try{if("inset"==f.substring(0,5)){var G=x.geometry,P=g.width,K=g.height,F=(300-P)/2,H=(300-K)/2,S=f.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),V=parseFloat(S[0]),M=parseFloat(S[1]),W=parseFloat(S[2]),U=parseFloat(S[3]);isFinite(V)&&isFinite(M)&&isFinite(W)&&isFinite(U)?(G.x=U/100*P+F,G.y=V/100*K+H,G.width=(100-M)/100*P+F-G.x,G.height=(100-W)/100*K+H-G.y,"round"==S[4]?"50%"==S[5]?I.setAttribute("checked","checked"):(q=parseInt(S[5]),t.value=q,B.setAttribute("checked", | Base | 1 |
typeof h&&"string"!==typeof h)return h;var f=0>h?"-":"",g=parseFloat(h);if(isNaN(g))return yb(h);g=g.toFixed(c);h=Math.abs(g);g=parseInt(h,10);h=c?b+(h-g).toFixed(c).substring(2):"";0===g&&0===parseFloat(h)&&(f="");return f+(d||"")+g.toString().replace(/\B(?=(\d{3})+(?!\d))/g,a)+h+(e||"")}}},text:function(){return{display:yb,filter:yb}}};l.extend(u.ext.internal,{_fnExternApiFunc:fc,_fnBuildAjax:Oa,_fnAjaxUpdate:Gb,_fnAjaxParameters:Pb,_fnAjaxUpdateDraw:Qb,_fnAjaxDataSrc:Aa,_fnAddColumn:Xa,_fnColumnOptions:Ga, | Base | 1 |
$scope.reset = function() {
bootbox.confirm('Are you sure you want to reset the foreign source definition to the default ?', function(ok) {
if (ok) {
RequisitionsService.startTiming();
RequisitionsService.deleteForeignSourceDefinition($scope.foreignSource).then(
function() { // success
growl.success('The foreign source definition for ' + $scope.foreignSource + 'has been reseted.');
$scope.initialize();
},
$scope.errorHandler
);
}
});
}; | Compound | 4 |
setup: function () {
var data = this.model.get('data') || {};
this.userId = data.userId;
this.messageData['entityType'] = Espo.Utils.upperCaseFirst((this.translate(data.entityType, 'scopeNames') || '').toLowerCase());
this.messageData['entity'] = '<a href="#' + data.entityType + '/view/' + data.entityId + '">' + data.entityName + '</a>';
this.createMessage();
}, | Base | 1 |
Da.addListener("stateChanged",function(){La.style.opacity=Da.enabled?"":"0.1"});var Aa=function(){Na.style.display=0<F.editor.undoManager.history.length||H.isEditing()?"inline-block":"none";Fa.style.display=Na.style.display;Na.style.opacity=za.enabled?"":"0.1";Fa.style.opacity=Ga.enabled?"":"0.1"};Q.appendChild(Na);Q.appendChild(Fa);za.addListener("stateChanged",Aa);Ga.addListener("stateChanged",Aa);Aa();var ta=this.createPageMenuTab(!1,!0);ta.style.display="none";ta.style.position="";ta.style.marginLeft= | Base | 1 |
function parseDCC(source,start,domBuilder,errorHandler){//sure start with '<!'
var next= source.charAt(start+2)
switch(next){
case '-':
if(source.charAt(start + 3) === '-'){
var end = source.indexOf('-->',start+4);
//append comment source.substring(4,end)//<!--
if(end>start){
domBuilder.comment(source,start+4,end-start-4);
return end+3;
}else{
errorHandler.error("Unclosed comment");
return -1;
}
}else{
//error
return -1;
}
default:
if(source.substr(start+3,6) == 'CDATA['){
var end = source.indexOf(']]>',start+9);
domBuilder.startCDATA();
domBuilder.characters(source,start+9,end-start-9);
domBuilder.endCDATA()
return end+3;
}
//<!DOCTYPE
//startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId)
var matchs = split(source,start);
var len = matchs.length;
if(len>1 && /!doctype/i.test(matchs[0][0])){
var name = matchs[1][0];
var pubid = false;
var sysid = false;
if(len>3){
if(/^public$/i.test(matchs[2][0])){
pubid = matchs[3][0];
sysid = len>4 && matchs[4][0];
}else if(/^system$/i.test(matchs[2][0])){
sysid = matchs[3][0];
}
}
var lastMatch = matchs[len-1]
domBuilder.startDTD(name,pubid && pubid.replace(/^(['"])(.*?)\1$/,'$2'),
sysid && sysid.replace(/^(['"])(.*?)\1$/,'$2'));
domBuilder.endDTD();
return lastMatch.index+lastMatch[0].length
}
}
return -1;
} | Class | 2 |
Editor.isDarkMode()?Editor.darkColor:"#ffffff";Q.style.overflow="hidden";Q.style.textAlign="center";var S=null;null!=C?(S={data:C,w:F,h:H,title:J},null!=W&&(S.aspect=W),z[C]=K,l.push(S)):null!=R&&(R.aspect="fixed",l.push(R),S=R);mxEvent.addListener(Q,"keydown",function(Z){13==Z.keyCode&&null!=O&&(O(),O=null,mxEvent.consume(Z))});V();E.appendChild(Q);mxEvent.addListener(Q,"mousedown",function(Z){"true"!=Q.getAttribute("contentEditable")&&mxEvent.consume(Z)});T=function(Z){if(mxClient.IS_IOS||mxClient.IS_FF||
!(null==document.documentMode||9<document.documentMode)){var ja=new FilenameDialog(b,S.title||"",mxResources.get("ok"),function(ea){null!=ea&&(S.title=ea,V())},mxResources.get("enterValue"));b.showDialog(ja.container,300,80,!0,!0);ja.init();mxEvent.consume(Z)}else if("true"!=Q.getAttribute("contentEditable")){null!=O&&(O(),O=null);if(null==S.title||0==S.title.length)Q.innerHTML="";Q.style.textOverflow="";Q.style.whiteSpace="";Q.style.cursor="text";Q.style.color="";Q.setAttribute("contentEditable",
"true");mxUtils.setPrefixedStyle(Q.style,"user-select","text");Q.focus();document.execCommand("selectAll",!1,null);O=function(){Q.removeAttribute("contentEditable");Q.style.cursor="pointer";S.title=Q.innerHTML;V()};mxEvent.consume(Z)}};mxEvent.addListener(Q,"click",T);mxEvent.addListener(E,"dblclick",T);x.appendChild(E);mxEvent.addListener(E,"dragstart",function(Z){null==C&&null!=R&&(P.style.visibility="hidden",Q.style.visibility="hidden");mxClient.IS_FF&&null!=R.xml&&Z.dataTransfer.setData("Text", | Base | 1 |
function(e){var f=e.split("/");return 1<f.length?{driveId:f[0],id:f[1]}:{id:e}};OneDriveClient.prototype.getItemURL=function(e,f){var c=e.split("/");return 1<c.length?(e=c[1],(f?"":this.baseUrl)+"/drives/"+c[0]+("root"==e?"/root":"/items/"+e)):(f?"":this.baseUrl)+"/me/drive/items/"+e};OneDriveClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!1,!0)};OneDriveClient.prototype.removeExtraHtmlContent=function(e){var f=e.lastIndexOf('<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"><meta name="Robots" '); | Base | 1 |
departmentSchema.statics.getUserDepartments = function (userId, callback) {
var self = this
Teams.getTeamsOfUser(userId, function (err, teams) {
if (err) return callback(err)
return self
.model(COLLECTION)
.find({ teams: { $in: teams } })
.exec(callback)
})
} | Base | 1 |
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;
var x=m.encode(k);this.editor.graph.saveViewState(c[q].viewState,x,!0);x.removeAttribute("pageWidth");x.removeAttribute("pageHeight");v.appendChild(x);null!=e&&(e.eltCount+=v.getElementsByTagName("*").length,e.nodeCount+=v.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(v,function(A,z,L,M){return!M||"mxGeometry"!=A.nodeName&&"mxPoint"!=A.nodeName||"x"!=z&&"y"!=z&&"width"!=z&&"height"!=z?M&&"mxCell"==A.nodeName&&"previous"==z?null:L:Math.round(L)},e)<<0}return g};EditorUi.prototype.hashValue= | Class | 2 |
Q.focus();document.execCommand("selectAll",!1,null);O=function(){Q.removeAttribute("contentEditable");Q.style.cursor="pointer";R.title=Q.innerHTML;W()};mxEvent.consume(Z)}};mxEvent.addListener(Q,"click",T);mxEvent.addListener(E,"dblclick",T);x.appendChild(E);mxEvent.addListener(E,"dragstart",function(Z){null==D&&null!=S&&(N.style.visibility="hidden",Q.style.visibility="hidden");mxClient.IS_FF&&null!=S.xml&&Z.dataTransfer.setData("Text",S.xml);B=v(Z);mxClient.IS_GC&&(E.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(E.style, | Base | 1 |
"size",this.size)));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(0,l),new mxPoint(p,0),new mxPoint(p,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("manualInput",Ra);mxUtils.extend(ab,mxRectangleShape);ab.prototype.dx=20;ab.prototype.dy=20;ab.prototype.isHtmlAllowed=function(){return!1};ab.prototype.paintForeground=function(c,l,x,p,v){mxRectangleShape.prototype.paintForeground.apply(this,arguments); | Base | 1 |
"#fc_showFooter_info",function(){$(this).toggleClass("fc_active").parent("#fc_footer_info").children("ul").slideToggle(300)});void 0!==typeof window.qtip&&$('[title!=""]').qtip({content:{attr:"title"},style:{classes:"qtip-light qtip-shadow qtip-rounded"}})});(function(a){a.fn.page_tree=function(b){b=a.extend({beforeSend:function(){},afterSend:function(){}},b);return this.each(function(){var b=a(this);1<b.find("li").size()&&b.find("ul").sortable({cancel:".ui-state-disabled",helper:"clone",handle:"div.fc_page_link",axis:"y",update:function(e,d){var f={page_id:a(this).sortable("toArray"),table:"pages",_cat_ajax:1};a.ajax({type:"POST",url:CAT_ADMIN_URL+"/pages/ajax_reorder.php",dataType:"json",data:f,cache:!1,beforeSend:function(a){a.process=set_activity("Reorder pages")},
success:function(d,e,f){var l=a(this);a(".popup").dialog("destroy").remove();b.children("span").removeClass("fc_page_loader");!0===d.success?(return_success(f.process,d.message),l.slideUp(300,function(){l.remove()})):return_error(f.process,d.message)},error:function(b,c,d){a(".popup").dialog("destroy").remove();alert(c+": "+d)}})}});b.find(".fc_page_tree_options_open").add("#fc_add_page button:reset").on("click",function(b){b.preventDefault();var c=a(this);b=a("#fc_add_page");a(".page_tree_open_options").removeClass("page_tree_open_options"); | Base | 1 |
Ua.style.cursor="pointer"):(Ua.setAttribute("disabled","disabled"),Ua.style.cursor="default")},La.addListener("stateChanged",za),I.addListener("enabledChanged",za),za());return Ua}function ea(za,wa,Ea){Ea=document.createElement("div");Ea.className="geMenuItem";Ea.style.display="inline-block";Ea.style.verticalAlign="top";Ea.style.marginRight="6px";Ea.style.padding="0 4px 0 4px";Ea.style.height="30px";Ea.style.position="relative";Ea.style.top="0px";"1"==urlParams.sketch&&(Ea.style.boxShadow="none");
for(var Da=0;Da<za.length;Da++)null!=za[Da]&&("1"==urlParams.sketch&&(za[Da].style.padding="10px 8px",za[Da].style.width="30px"),za[Da].style.margin="0px",za[Da].style.boxShadow="none",Ea.appendChild(za[Da]));null!=wa&&mxUtils.setOpacity(Ea,wa);null!=U.statusContainer&&"1"!=urlParams.sketch?V.insertBefore(Ea,U.statusContainer):V.appendChild(Ea);return Ea}function ka(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(P.style.left=58>S.offsetTop-S.offsetHeight/2?"70px":"10px");else{for(var za= | Class | 2 |
k.scrollHeight-k.offsetHeight&&C()},mxEvent.addListener(k,"scroll",A))}}),y)});p.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(k,mxResources.get("loading"));var M=mxUtils.bind(this,function(u){var D=this.ui.spinner,B=0;this.ui.spinner.stop();var C=function(){D.spin(k,mxResources.get("loading"));B+=1},G=function(){--B;0===B&&D.stop()};null==u&&(k.innerHTML="",u=1);null!=A&&(mxEvent.removeListener(k,"scroll",A),A=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a"); | Base | 1 |
fetch: function () {
var data = Dep.prototype.fetch.call(this);
data.translatedOptions = {};
(data[this.name] || []).forEach(function (value) {
data.translatedOptions[value] = this.$el.find('input[data-name="translatedValue"][data-value="'+value+'"]').val() || value;
}, this);
return data;
} | Base | 1 |
rect:F.diagramContainer.getBoundingClientRect()}),"*");F.refresh()}Q.style.left=F.diagramContainer.offsetLeft+"px";Q.style.top=F.diagramContainer.offsetTop-Q.offsetHeight-4+"px";N.style.display="";N.style.left=F.diagramContainer.offsetLeft-N.offsetWidth-4+"px";N.style.top=F.diagramContainer.offsetTop+"px";T.style.left=F.diagramContainer.offsetLeft+F.diagramContainer.offsetWidth-T.offsetWidth+"px";T.style.top=Q.style.top;T.style.right="";F.bottomResizer.style.left=F.diagramContainer.offsetLeft+(F.diagramContainer.offsetWidth-
F.bottomResizer.offsetWidth)/2+"px";F.bottomResizer.style.top=F.diagramContainer.offsetTop+F.diagramContainer.offsetHeight-F.bottomResizer.offsetHeight/2-1+"px";F.rightResizer.style.left=F.diagramContainer.offsetLeft+F.diagramContainer.offsetWidth-F.rightResizer.offsetWidth/2-1+"px";F.rightResizer.style.top=F.diagramContainer.offsetTop+(F.diagramContainer.offsetHeight-F.bottomResizer.offsetHeight)/2+"px"}F.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";F.rightResizer.style.visibility=
F.bottomResizer.style.visibility;S.style.display="none";Q.style.visibility="";T.style.visibility=""}),Y=mxUtils.bind(this,function(){Ea.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";R()});u=mxUtils.bind(this,function(){Y();b(F,!0);F.initFormatWindow();var da=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(da.x+ | Base | 1 |
mxCellRenderer.prototype.destroy=function(u){D.apply(this,arguments);null!=u.secondLabel&&(u.secondLabel.destroy(),u.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(u){return[u.shape,u.text,u.secondLabel,u.control]};var G=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){G.apply(this,arguments);this.enumerationState=0};var P=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(u){null!=u.shape&&this.redrawEnumerationState(u); | Base | 1 |
F=this.editor.graph.getModel().getStyle(F),this.styleInput.value=F||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var K=this.isSelectionAllowed;this.isSelectionAllowed=function(F){return mxEvent.getSource(F)==this.styleInput?!0:K.apply(this,arguments)}}y=document.getElementById("geInfo");null!=y&&y.parentNode.removeChild(y);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var B=null;mxEvent.addListener(e.container,"dragleave",function(F){e.isEnabled()&& | Base | 1 |
result = { type: AST.AssignmentExpression, left: result, right: this.assignment(), operator: '='};
}
return result;
}, | Class | 2 |
r=g.isEventsEnabled();g.setEventsEnabled(!1);var q=this.graph.isEnabled();this.graph.setEnabled(!1);var t=g.getTranslate();g.translate=new mxPoint(a,b);var u=this.graph.cellRenderer.redraw,x=g.states;a=g.scale;if(this.clipping){var A=new mxRectangle((f.x+t.x)*a,(f.y+t.y)*a,f.width*a/p,f.height*a/p),E=this;this.graph.cellRenderer.redraw=function(D,B,v){if(null!=D){var y=x.get(D.cell);if(null!=y&&(y=g.getBoundingBox(y,!1),null!=y&&0<y.width&&0<y.height&&!mxUtils.intersects(A,y))||!E.isCellVisible(D.cell))return}u.apply(this,
arguments)}}a=null;try{var C=[this.getRoot()];a=new mxTemporaryCellStates(g,c,C,null,mxUtils.bind(this,function(D){return this.getLinkForCellState(D)}))}finally{if(mxClient.IS_IE)g.overlayPane.innerHTML="",g.canvas.style.overflow="hidden",g.canvas.style.position="relative",g.canvas.style.top=this.marginTop+"px",g.canvas.style.width=f.width+"px",g.canvas.style.height=f.height+"px";else for(c=e.firstChild;null!=c;)C=c.nextSibling,b=c.nodeName.toLowerCase(),"svg"==b?(c.style.overflow="hidden",c.style.position= | Base | 1 |
function sort(c1, c2) {
//var d1 = that.data[c1.key], d2 = that.data[c1.key];
var inst1 = c1.data.installed || 0, inst2 = c2.data.installed || 0;
var ret = inst2 - inst1;
if (ret) return ret;
var t1 = c1.titleLang || c1.title || '';
if (typeof t1 === 'object') {
t1 = t1[systemLang] || t1.en;
}
var t2 = c2.titleLang || c2.title || '';
if (typeof t2 === 'object') {
t2 = t2[systemLang] || t2.en;
}
t1 = t1.toLowerCase();
t2 = t2.toLowerCase();
if (t1 > t2) return 1;
if (t1 < t2) return -1;
return 0;
} | 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"))}; | 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.