code
stringlengths 12
2.05k
| label_name
stringclasses 5
values | label
int64 0
4
|
---|---|---|
p-A,ha);c.lineTo(l+p-B-A,ha+B/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Ma);mxUtils.extend(Oa,mxEllipse);Oa.prototype.drawHidden=!0;Oa.prototype.paintVertexShape=function(c,l,x,p,v){this.outline||c.setStrokeColor(null);if(null!=this.style){var A=c.pointerEvents,B=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||B||(c.pointerEvents=!1);var ha="1"==mxUtils.getValue(this.style,"top","1"),K="1"==mxUtils.getValue(this.style,
"left","1"),xa="1"==mxUtils.getValue(this.style,"right","1"),na="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||B||this.outline||ha||xa||na||K?(c.rect(l,x,p,v),c.fill(),c.pointerEvents=A,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,x),this.outline||ha?c.lineTo(l+p,x):c.moveTo(l+p,x),this.outline||xa?c.lineTo(l+p,x+v):c.moveTo(l+p,x+v),this.outline||na?c.lineTo(l,x+v):c.moveTo(l,x+v),(this.outline||K)&&c.lineTo(l,x),c.end(),c.stroke(),c.setLineCap("flat")):
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, | Class | 2 |
process.removeListener = function(e, fn){
if ('uncaughtException' == e) {
global.onerror = function() {};
var i = Mocha.utils.indexOf(uncaughtExceptionHandlers, fn);
if (i != -1) { uncaughtExceptionHandlers.splice(i, 1); }
}
}; | Base | 1 |
"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(u){var E=null;null!=u&&0<u.length&&("ER"==u.substring(0,2)?E="mxgraph.er":"sysML"==u.substring(0,5)&&(E="mxgraph.sysml"));return E};var V=mxMarker.createMarker;mxMarker.createMarker= | Base | 1 |
function(){if(null!=this.marker&&(bb.apply(this),null!=this.state&&null!=this.linkHint)){var z=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(z=new mxRectangle(z.x,z.y,z.width,z.height),z.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(z.y+z.height+Editor.hintOffset)+"px"}};var Pa=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Pa.apply(this,arguments); | Class | 2 |
OAuthServer.prototype.generateAccessToken = function(refreshToken) {
let username = this.tokens[refreshToken],
accessToken = crypto.randomBytes(10).toString('base64');
if (!username) {
return {
error: 'Invalid refresh token'
};
}
this.users[username].accessToken = accessToken;
this.users[username].expiresIn = Date.now + this.options.expiresIn * 1000;
if (this.options.onUpdate) {
this.options.onUpdate(username, accessToken);
}
return {
access_token: accessToken,
expires_in: this.options.expiresIn,
token_type: 'Bearer'
};
}; | Base | 1 |
lex:function lex() {
var r = this.next();
if (r) {
return r;
} else {
return this.lex();
}
}, | Base | 1 |
EditorUi.prototype.patchPages=function(b,f,l,d,u){var t={},D=[],c={},e={},g={},k={};if(null!=d&&null!=d[EditorUi.DIFF_UPDATE])for(var m in d[EditorUi.DIFF_UPDATE])t[m]=d[EditorUi.DIFF_UPDATE][m];if(null!=f[EditorUi.DIFF_REMOVE])for(d=0;d<f[EditorUi.DIFF_REMOVE].length;d++)e[f[EditorUi.DIFF_REMOVE][d]]=!0;if(null!=f[EditorUi.DIFF_INSERT])for(d=0;d<f[EditorUi.DIFF_INSERT].length;d++)c[f[EditorUi.DIFF_INSERT][d].previous]=f[EditorUi.DIFF_INSERT][d];if(null!=f[EditorUi.DIFF_UPDATE])for(m in f[EditorUi.DIFF_UPDATE])d=
f[EditorUi.DIFF_UPDATE][m],null!=d.previous&&(k[d.previous]=m);if(null!=b){var q="";for(d=0;d<b.length;d++){var v=b[d].getId();g[v]=b[d];null!=k[q]||e[v]||null!=f[EditorUi.DIFF_UPDATE]&&null!=f[EditorUi.DIFF_UPDATE][v]&&null!=f[EditorUi.DIFF_UPDATE][v].previous||(k[q]=v);q=v}}var x={},A=mxUtils.bind(this,function(L){var M=null!=L?L.getId():"";if(null!=L&&!x[M]){x[M]=!0;D.push(L);var n=null!=f[EditorUi.DIFF_UPDATE]?f[EditorUi.DIFF_UPDATE][M]:null;null!=n&&(this.updatePageRoot(L),null!=n.name&&L.setName(n.name),
null!=n.view&&this.patchViewState(L,n.view),null!=n.cells&&this.patchPage(L,n.cells,t[L.getId()],u),!l||null==n.cells&&null==n.view||(L.needsUpdate=!0))}L=k[M];null!=L&&(delete k[M],A(g[L]));L=c[M];null!=L&&(delete c[M],z(L))}),z=mxUtils.bind(this,function(L){L=mxUtils.parseXml(L.data).documentElement;L=new DiagramPage(L);this.updatePageRoot(L);var M=g[L.getId()];null==M?A(L):(this.patchPage(M,this.diffPages([M],[L]),t[M.getId()],u),l&&(M.needsUpdate=!0))});A();for(m in k)A(g[k[m]]),delete k[m];for(m in c)z(c[m]),
delete c[m];return D};EditorUi.prototype.patchViewState=function(b,f){if(null!=b.viewState&&null!=f){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var l in f)try{this.patchViewStateProperty(b,f,l)}catch(d){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,f,l){b.viewState[l]=JSON.parse(f[l])}; | Base | 1 |
var render = function(disabled){
var name;
self.empty();
l = panels.length;
while (l--) {
if (panels[l]) {
panel = $('<div class="ui-widget-content ui-corner-all elfinder-buttonset"/>');
i = panels[l].length;
while (i--) {
name = panels[l][i];
if ((!disabled || $.inArray(name, disabled) === -1) && (cmd = commands[name])) {
button = 'elfinder'+cmd.options.ui;
$.fn[button] && panel.prepend($('<div/>')[button](cmd));
}
}
panel.children().length && self.prepend(panel);
panel.children(':gt(0)').before('<span class="ui-widget-content elfinder-toolbar-button-separator"/>');
}
}
self.children().length? self.show() : self.hide();
self.trigger('load');
}; | 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"); | Class | 2 |
1E3<=F&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=F||"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 M=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(B){B=M.apply(this,arguments); | Class | 2 |
p&&I[T].getAttribute("data-font-src")!=C&&I[T].setAttribute("data-font-src",C)}};var n=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return n.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var p=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=p)for(var C in p)this.globalVars[C]=
p[C]}catch(I){null!=window.console&&console.log("Error in vars URL parameter: "+I)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var y=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(p){var C=y.apply(this,arguments);null==C&&null!=this.globalVars&&(C=this.globalVars[p]);return C};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var p=this.themes["default-style2"];this.defaultStylesheet= | Class | 2 |
value: Number(number)
});
}, | Class | 2 |
!1;null!=H&&(S="1"==x.getCurrentCellStyle(H).treeMoving);return S}function t(H){var S=!1;null!=H&&(H=A.getParent(H),S=x.view.getState(H),S="tree"==(null!=S?S.style:x.getCellStyle(H)).containerType);return S}function D(H){var S=!1;null!=H&&(H=A.getParent(H),S=x.view.getState(H),x.view.getState(H),S=null!=(null!=S?S.style:x.getCellStyle(H)).childLayout);return S}function c(H){H=x.view.getState(H);if(null!=H){var S=x.getIncomingTreeEdges(H.cell);if(0<S.length&&(S=x.view.getState(S[0]),null!=S&&(S=S.absolutePoints,
null!=S&&0<S.length&&(S=S[S.length-1],null!=S)))){if(S.y==H.y&&Math.abs(S.x-H.getCenterX())<H.width/2)return mxConstants.DIRECTION_SOUTH;if(S.y==H.y+H.height&&Math.abs(S.x-H.getCenterX())<H.width/2)return mxConstants.DIRECTION_NORTH;if(S.x>H.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function e(H,S){S=null!=S?S:!0;x.model.beginUpdate();try{var U=x.model.getParent(H),Q=x.getIncomingTreeEdges(H),W=x.cloneCells([Q[0],H]);x.model.setTerminal(W[0],x.model.getTerminal(Q[0], | Class | 2 |
function createSubscription(session, callback) {
const publishingInterval = 1000;
const createSubscriptionRequest = new CreateSubscriptionRequest({
requestedPublishingInterval: publishingInterval,
requestedLifetimeCount: 60,
requestedMaxKeepAliveCount: 10,
maxNotificationsPerPublish: 10,
publishingEnabled: true,
priority: 6
});
session.performMessageTransaction(createSubscriptionRequest, function(err/*, response*/) {
callback(err);
});
} | Base | 1 |
(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);z.apply(this,arguments)};var L=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(B){L.apply(this,arguments);if(B){var F=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
1E3<=F&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=F||"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 M=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(B){B=M.apply(this,arguments); | Class | 2 |
return_: function(id) {
this.current().body.push('return ', id, ';');
}, | Class | 2 |
mxEvent.getClientX(za);I.popupMenuHandler.hideMenu();mxEvent.consume(za)});mxEvent.addGestureListeners(document.body,null,function(za){var wa=!1;null!=Ma&&(U.diagramContainer.style.width=Math.max(20,Qa+mxEvent.getClientX(za)-Ma)+"px",wa=!0);null!=Oa&&(U.diagramContainer.style.height=Math.max(20,Ta+mxEvent.getClientY(za)-Oa)+"px",wa=!0);wa&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:U.diagramContainer.getBoundingClientRect()}),
"*"),Z(),U.refresh())},function(za){null==Ma&&null==Oa||mxEvent.consume(za);Oa=Ma=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";U.bottomResizer.style.visibility="hidden";U.rightResizer.style.visibility="hidden";P.style.visibility="hidden";W.style.visibility="hidden";S.style.display="none"}"1"==urlParams.prefetchFonts&&U.editor.loadFonts()}}}; | Base | 1 |
6)},function(L){for(var C=0;C<L.length;C++)L[C]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){n?k.focus():g.focus();mxEvent.addListener(k,"focus",function(){v.removeAttribute("checked");d.setAttribute("checked","checked");d.checked=!0});mxEvent.addListener(g,"focus",function(){d.removeAttribute("checked");v.setAttribute("checked","checked");v.checked=!0});if(Graph.fileSupport){g.setAttribute("placeholder",mxResources.get("dragImagesHere"));var z=c.parentNode,L=null;mxEvent.addListener(z,
"dragleave",function(C){null!=L&&(L.parentNode.removeChild(L),L=null);C.stopPropagation();C.preventDefault()});mxEvent.addListener(z,"dragover",mxUtils.bind(this,function(C){null==L&&(!mxClient.IS_IE||10<document.documentMode)&&(L=b.highlightElement(z));C.stopPropagation();C.preventDefault()}));mxEvent.addListener(z,"drop",mxUtils.bind(this,function(C){null!=L&&(L.parentNode.removeChild(L),L=null);if(0<C.dataTransfer.files.length)B(C.dataTransfer.files);else if(0<=mxUtils.indexOf(C.dataTransfer.types,
"text/uri-list")){var D=C.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(D)&&(g.value=decodeURIComponent(D),A())}C.stopPropagation();C.preventDefault()}),!1)}};c.appendChild(v);c.appendChild(g);mxUtils.br(c);l=document.createElement("span");l.style.marginLeft="30px";mxUtils.write(l,mxResources.get("width")+":");c.appendChild(l);var I=document.createElement("input");I.setAttribute("type","text");I.style.width="60px";I.style.marginLeft="8px";I.style.marginRight="16px"; | Class | 2 |
getHasOwnProperty: function(element, property) {
var key = element + '.' + property;
var own = this.current().own;
if (!own.hasOwnProperty(key)) {
own[key] = this.nextId(false, element + '&&(' + this.escape(property) + ' in ' + element + ')');
}
return own[key];
}, | Class | 2 |
nonComputedMember: function(left, right, context, create) {
return function(scope, locals, assign, inputs) {
var lhs = left(scope, locals, assign, inputs);
if (create && create !== 1) {
if (lhs && lhs[right] == null) {
lhs[right] = {};
}
}
var value = lhs != null ? lhs[right] : undefined;
if (context) {
return {context: lhs, name: right, value: value};
} else {
return value;
}
};
}, | Class | 2 |
"25px";btn.className="geColorBtn";return btn}function Y(za,ta,ka,pa,sa,ya,va){if(0<sa){var ra=Array(sa);ta=null!=ta?ta.split(","):[];for(var wa=0;wa<sa;wa++)ra[wa]=null!=ta[wa]?ta[wa]:null!=pa?pa:"";aa.push({name:za,values:ra,type:ka,defVal:pa,parentRow:ya,flipBkg:va,size:sa})}return document.createElement("div")}function da(za,ta,ka){var pa=document.createElement("input");pa.type="checkbox";pa.checked="1"==ta;mxEvent.addListener(pa,"change",function(){T(za,pa.checked?"1":"0",ka)});return pa}function ha(za, | Base | 1 |
$scope.delete = function(foreignSource) {
bootbox.confirm('Are you sure you want to remove the requisition ' + foreignSource + '?', function(ok) {
if (ok) {
RequisitionsService.startTiming();
RequisitionsService.deleteRequisition(foreignSource).then(
function() { // success
growl.success('The requisition ' + foreignSource + ' has been deleted.');
},
$scope.errorHandler
);
}
});
}; | Base | 1 |
function tileRec(inPath, outPath, zoom, tileSize, tempDir, pattern, zoomToDisplay, invertZoom, quality) {
var inPathMpc = tempDir + '/temp_level_' + zoom + '.mpc';
var inPathCache = tempDir + '/temp_level_' + zoom + '.cache';
execSync('convert ' + inPath + ' ' + inPathMpc);
return tileLevel(inPathMpc, outPath, zoomToDisplay, tileSize, pattern, quality)
.then(function () {
if (imageBiggerThanTile(inPath, tileSize)) {
var newZoom = zoom + 1;
var newZoomToDisplay = zoomToDisplay + 1;
if (!invertZoom) {
newZoomToDisplay = zoomToDisplay - 1;
}
var newInPath = tempDir + '/temp_level_' + zoom + '.png';
execSync('convert ' + inPathMpc + ' -resize 50% -quality ' + quality + ' ' + newInPath);
fs.unlinkSync(inPathMpc);
fs.unlinkSync(inPathCache);
return tileRec(newInPath, outPath, newZoom, tileSize, tempDir, pattern, newZoomToDisplay, invertZoom, quality);
} else {
fs.unlinkSync(inPathMpc);
fs.unlinkSync(inPathCache);
}
});
} | Class | 2 |
new FileReader;m.onload=mxUtils.bind(this,function(q){try{this.openFileHandle(q.target.result,k.name,k,e)}catch(v){this.handleError(v)}});m.onerror=mxUtils.bind(this,function(q){this.spinner.stop();this.handleError(q);window.openFile=null});"image"!==k.type.substring(0,5)&&"application/pdf"!==k.type||"image/svg"===k.type.substring(0,9)?m.readAsText(k):m.readAsDataURL(k)})(c[g])};EditorUi.prototype.openLocalFile=function(c,e,g,k,m){var q=this.getCurrentFile(),v=mxUtils.bind(this,function(){window.openFile=
null;if(null==e&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var x=mxUtils.parseXml(c);null!=x&&(this.editor.setGraphXml(x.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,c,e||this.defaultFilename,g,k,m))});if(null!=c&&0<c.length)null==q||!q.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=k)?v():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=k)&&null!=q&&q.isModified()?this.confirm(mxResources.get("allChangesLost"),null,v,
mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,e),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=q&&q.isModified()?this.confirm(mxResources.get("allChangesLost"),null,v,mxResources.get("cancel"),mxResources.get("discardChanges")):v()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var e= | Base | 1 |
var O=mxText.prototype.redraw;mxText.prototype.redraw=function(){O.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(t,E,K){function T(){for(var ma=S.getSelectionCells(),Aa=[],Da=0;Da<ma.length;Da++)S.isCellVisible(ma[Da])&&Aa.push(ma[Da]);S.setSelectionCells(Aa)}function P(ma){S.setHiddenTags(ma?[]:Y.slice());T();S.refresh()}function Q(ma,Aa){da.innerHTML="";if(0<ma.length){var Da=document.createElement("table"); | Base | 1 |
function(){};var E=l.getSelectionModel().changeSelection;l.getSelectionModel().changeSelection=function(){E.call(this,[x],[x])}};g.onerror=function(){g.onload=null;g.src=Editor.errorImage};g.setAttribute("src",e);g.style.maxWidth="300px";g.style.maxHeight="300px";d.appendChild(g);v.appendChild(d);var k=document.createElement("div");k.style.width="300px";k.style.height="300px";k.style.overflow="hidden";k.style.backgroundColor="#fff9";v.appendChild(k);var l=null,p=new mxGeometry(100,100,100,100),q= | Base | 1 |
' <md-button ng-click="close()">' + l('Close') + '</md-button>',
' </md-dialog-actions>',
'</md-dialog>'
].join(''),
controller: ComponentRawSourceDialogController
});
/**
* @ngInject
*/
ComponentRawSourceDialogController.$inject = ['scope', '$mdDialog'];
function ComponentRawSourceDialogController(scope, $mdDialog) {
scope.close = function() {
$mdDialog.hide();
};
}
});
} | Base | 1 |
$scope.refresh = function(requisition) {
RequisitionsService.startTiming();
RequisitionsService.updateDeployedStatsForRequisition(requisition).then(
function() { // success
growl.success('The deployed statistics for ' + requisition.foreignSource + ' has been updated.');
},
$scope.errorHandler
);
}; | Base | 1 |
m=P.name;v="";O(null,!0)})));k.appendChild(F)})(D[G],G)}100==D.length&&(k.appendChild(A),B=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&C()},mxEvent.addListener(k,"scroll",B))}),y)});t()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes}; | Class | 2 |
if(0<x.length){var A=parseFloat(x[0].getAttribute("width")),z=parseFloat(x[0].getAttribute("height"));if(isNaN(A)||isNaN(z))try{var L=x[0].getAttribute("viewBox").split(/\s+/);A=parseFloat(L[2]);z=parseFloat(L[3])}catch(M){A=A||100,z=z||100}g(m.convertDataUri(Editor.createSvgDataUri(v)),A,z)}else k({message:mxResources.get("invalidInput")})}catch(M){k(M)}})}catch(v){k(v)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?q():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js", | Base | 1 |
let errHandler = function(err) {
callback(err);
}; | 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 |
m=P.name;v="";O(null,!0)})));k.appendChild(F)})(D[G],G)}100==D.length&&(k.appendChild(A),B=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&C()},mxEvent.addListener(k,"scroll",B))}),y)});t()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes}; | Base | 1 |
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 |
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 |
$scope.clone = function(foreignSource) {
var availableForeignSources = [];
angular.forEach($scope.requisitionsData.requisitions, function(r) {
if (r.foreignSource !== foreignSource) {
availableForeignSources.push(r.foreignSource);
}
});
var modalInstance = $uibModal.open({
backdrop: 'static',
keyboard: false,
controller: 'CloneForeignSourceController',
templateUrl: cloneForeignsourceView,
resolve: {
foreignSource: function() { return foreignSource; },
availableForeignSources: function() { return availableForeignSources; }
}
});
modalInstance.result.then(function(targetForeignSource) {
bootbox.confirm('This action will override the existing foreign source definition for the requisition named ' + targetForeignSource + ', using ' + foreignSource + ' as a template. Are you sure you want to continue ? This cannot be undone.', function(ok) {
if (!ok) {
return;
}
RequisitionsService.startTiming();
RequisitionsService.cloneForeignSourceDefinition(foreignSource, targetForeignSource).then(
function() { // success
growl.success('The foreign source definition for ' + foreignSource + ' has been cloned to ' + targetForeignSource);
},
$scope.errorHandler
);
});
});
}; | Base | 1 |
getFormData(form) {
let serialized = [];
// Loop through each field in the form
for (let i = 0; i < form.elements.length; i++) {
let field = form.elements[i];
// Don't serialize a couple of field types (button and submit are important to exclude, eg. invoice preview would fail otherwise)
if (!field.name || field.disabled || field.type === 'file' || field.type === 'reset' || field.type === 'submit' || field.type === 'button') {
continue;
}
// If a multi-select, get all selections
if (field.type === 'select-multiple') {
for (var n = 0; n < field.options.length; n++) {
if (!field.options[n].selected) continue;
serialized.push({
name: field.name,
value: field.options[n].value
});
}
} else if ((field.type !== 'checkbox' && field.type !== 'radio') || field.checked) {
serialized.push({
name: field.name,
value: field.value
});
}
}
return serialized;
} | Base | 1 |
D=C.createElement("output");C.appendChild(D);C=new mxXmlCanvas2D(D);C.translate(Math.floor((1-z.x)/L),Math.floor((1-z.y)/L));C.scale(1/L);var G=0,P=C.save;C.save=function(){G++;P.apply(this,arguments)};var K=C.restore;C.restore=function(){G--;K.apply(this,arguments)};var F=t.drawShape;t.drawShape=function(H){mxLog.debug("entering shape",H,G);F.apply(this,arguments);mxLog.debug("leaving shape",H,G)};t.drawState(m.getView().getState(m.model.root),C);mxLog.show();mxLog.debug(mxUtils.getXml(D));mxLog.debug("stateCounter", | Class | 2 |
n);var Ya=Math.tan(mxUtils.toRadians(30)),Ua=(.5-Ya)/2;mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(D,mxCylinder);D.prototype.size=6;D.prototype.paintVertexShape=function(c,l,x,p,v){c.setFillColor(this.stroke);var A=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(l+.5*(p-A),x+.5*(v-A),A,A);c.fill();c.setFillColor(mxConstants.NONE);c.rect(l,x,p,v);c.fill()};mxCellRenderer.registerShape("waypoint",D);mxUtils.extend(t,mxActor);t.prototype.size= | Base | 1 |
this.stderr._read = function(n) {
if (self._waitChanDrain) {
self._waitChanDrain = false;
if (incoming.window <= WINDOW_THRESHOLD)
windowAdjust(self);
}
}; | Base | 1 |
aa[ua+5]);this.lastX=Z;this.lastY=ea}};p.prototype.rect=function(O,R,Y,da){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(O,R,Y,da,this.getStyle(!0,!0)))};p.prototype.ellipse=function(O,R,Y,da){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(O+Y/2,R+da/2,Y,da,this.getStyle(!0,!0)))};p.prototype.roundrect=function(O,R,Y,da,ha,Z){this.passThrough?this.originalRoundrect.apply(this.canvas, | Class | 2 |
S&&S(M)}}))}catch(L){null!=S&&S(L)}}),N,sa)}catch(Pa){null!=S&&S(Pa)}};Editor.crcTable=[];for(var D=0;256>D;D++)for(var t=D,F=0;8>F;F++)t=1==(t&1)?3988292384^t>>>1:t>>>1,Editor.crcTable[D]=t;Editor.updateCRC=function(u,J,N,W){for(var S=0;S<W;S++)u=Editor.crcTable[(u^J.charCodeAt(N+S))&255]^u>>>8;return u};Editor.crc32=function(u){for(var J=-1,N=0;N<u.length;N++)J=J>>>8^Editor.crcTable[(J^u.charCodeAt(N))&255];return(J^-1)>>>0};Editor.writeGraphModelToPng=function(u,J,N,W,S){function P(sa,Ba){var ta= | Base | 1 |
Context.prototype.slow = function(ms){
this.runnable().slow(ms);
return this;
}; | Base | 1 |
DotObject.prototype._fill = function (a, obj, v, mod) {
var k = a.shift()
if (a.length > 0) {
obj[k] = obj[k] ||
(this.useArray && isIndex(a[0]) ? [] : {})
if (!isArrayOrObject(obj[k])) {
if (this.override) {
obj[k] = {}
} else {
if (!(isArrayOrObject(v) && isEmptyObject(v))) {
throw new Error(
'Trying to redefine `' + k + '` which is a ' + typeof obj[k]
)
}
return
}
}
this._fill(a, obj[k], v, mod)
} else {
if (!this.override &&
isArrayOrObject(obj[k]) && !isEmptyObject(obj[k])) {
if (!(isArrayOrObject(v) && isEmptyObject(v))) {
throw new Error("Trying to redefine non-empty obj['" + k + "']")
}
return
}
obj[k] = _process(v, mod)
}
} | Class | 2 |
z,mxUtils.bind(this,function(){var E=null;if(!t){E=parseInt(H.value);var J=parseInt(V.value);E=K.checked||E==G&&J==G?null:{from:Math.max(0,Math.min(D-1,E-1)),to:Math.max(0,Math.min(D-1,J-1))}}c.downloadFile("pdf",null,null,!M.checked,t?!0:!K.checked&&null==E,!W.checked,null!=X&&X.checked,null,null,U.checked,null!=u&&u.checked,E)}),null,mxResources.get("export"));c.showDialog(z.container,300,L,!0,!0)}else c.showDialog((new PrintDialog(c,mxResources.get("formatPdf"))).container,360,null!=c.pages&&1< | Class | 2 |
Editor.enableExportUrl=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(u){u.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(u,E){return"1"==mxUtils.getValue(u.style,"enumerate","0")}}, | Base | 1 |
function refresh()
{
changed = true;
if (plugins.length == 0)
{
inner.innerHTML = mxUtils.htmlEntities(mxResources.get('noPlugins'));
}
else
{
inner.innerHTML = '';
for (var i = 0; i < plugins.length; i++)
{
var span = document.createElement('span');
span.style.whiteSpace = 'nowrap';
var img = document.createElement('span');
img.className = 'geSprite geSprite-delete';
img.style.position = 'relative';
img.style.cursor = 'pointer';
img.style.top = '5px';
img.style.marginRight = '4px';
img.style.display = 'inline-block';
span.appendChild(img);
mxUtils.write(span, plugins[i]);
inner.appendChild(span);
mxUtils.br(inner);
mxEvent.addListener(img, 'click', (function(index)
{
return function()
{
editorUi.confirm(mxResources.get('delete') + ' "' + plugins[index] + '"?', function()
{
if (delFn != null)
{
delFn(plugins[index]);
}
plugins.splice(index, 1);
refresh();
});
};
})(i));
}
}
} | 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()&& | Class | 2 |
var determineWebcamStreamType = function (streamUrl) {
if (streamUrl) {
if (streamUrl.startsWith("webrtc")) {
return "webrtc";
}
var lastDotPosition = streamUrl.lastIndexOf(".");
var firstQuotationSignPosition = streamUrl.indexOf("?");
if (
lastDotPosition != -1 &&
firstQuotationSignPosition != -1 &&
lastDotPosition >= firstQuotationSignPosition
) {
throw "Malformed URL. Cannot determine stream type.";
}
// If we have found a dot, try to extract the extension.
if (lastDotPosition > -1) {
if (firstQuotationSignPosition > -1) {
var extension = streamUrl.slice(
lastDotPosition + 1,
firstQuotationSignPosition - 1
);
} else {
var extension = streamUrl.slice(lastDotPosition + 1);
}
if (extension.toLowerCase() == "m3u8") {
return "hls";
}
}
// By default, 'mjpg' is the stream type.
return "mjpg";
} else {
throw "Empty streamUrl. Cannot determine stream type.";
}
}; | Base | 1 |
"geTempDlgCreateBtn geTempDlgBtnDisabled")}function z(ha,da){if(null!=J){var ca=function(pa){qa.isExternal?g(qa,function(na){la(na,pa)},ia):qa.url?mxUtils.get(TEMPLATE_PATH+"/"+qa.url,mxUtils.bind(this,function(na){200<=na.getStatus()&&299>=na.getStatus()?la(na.getText(),pa):ia()})):la(b.emptyDiagramXml,pa)},la=function(pa,na){y||b.hideDialog(!0);e(pa,na,qa,da)},ia=function(){A(mxResources.get("cannotLoad"));ma()},ma=function(){J=qa;za.className="geTempDlgCreateBtn";da&&(Ga.className="geTempDlgOpenBtn")}, | Base | 1 |
function PMA_current_version(data)
{
var current = parseVersionString(pmaversion);
var latest = parseVersionString(data['version']);
var version_information_message = PMA_messages['strLatestAvailable'] + ' ' + data['version'];
if (latest > current) {
var message = $.sprintf(PMA_messages['strNewerVersion'], data['version'], data['date']);
if (Math.floor(latest / 10000) == Math.floor(current / 10000)) {
/* Security update */
klass = 'error';
} else {
klass = 'notice';
}
$('#maincontainer').after('<div class="' + klass + '">' + message + '</div>');
}
if (latest == current) {
version_information_message = ' (' + PMA_messages['strUpToDate'] + ')';
}
$('#li_pma_version').append(version_information_message);
} | 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)} | Class | 2 |
EditorUi.initMinimalTheme=function(){function b(C,D){if(EditorUi.windowed){var G=C.editor.graph;G.popupMenuHandler.hideMenu();if(null==C.formatWindow){D="1"==urlParams.sketch?Math.max(10,C.diagramContainer.clientWidth-241):Math.max(10,C.diagramContainer.clientWidth-248);var P="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;G="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,G.container.clientHeight-10);C.formatWindow=new n(C,mxResources.get("format"),D,P,240,G,function(F){var H=
C.createFormat(F);H.init();C.addListener("darkModeChanged",mxUtils.bind(this,function(){H.refresh()}));return H});C.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){C.formatWindow.window.fit()}));C.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else C.formatWindow.window.setVisible(null!=D?D:!C.formatWindow.window.isVisible())}else{if(null==C.formatElt){C.formatElt=m();var K=C.createFormat(C.formatElt);K.init();C.formatElt.style.border="none";C.formatElt.style.width=
"240px";C.formatElt.style.borderLeft="1px solid gray";C.formatElt.style.right="0px";C.addListener("darkModeChanged",mxUtils.bind(this,function(){K.refresh()}))}G=C.diagramContainer.parentNode;null!=C.formatElt.parentNode?(C.formatElt.parentNode.removeChild(C.formatElt),G.style.right="0px"):(G.parentNode.appendChild(C.formatElt),G.style.right=C.formatElt.style.width)}}function e(C,D){function G(H,S){var V=C.menus.get(H);H=F.addMenu(S,mxUtils.bind(this,function(){V.funct.apply(this,arguments)}));H.style.cssText= | Class | 2 |
EditorUi.prototype.updateCssForMarker=function(a,b,f,d,g){a.style.verticalAlign="top";a.style.height="21px";a.style.width="21px";a.innerHTML="";"flexArrow"==f?a.className=null!=d&&d!=mxConstants.NONE?"geSprite geSprite-"+b+"blocktrans":"geSprite geSprite-noarrow":(f=this.getImageForMarker(d,g),null!=f?(d=document.createElement("img"),d.style.position="absolute",d.style.marginTop="0.5px",d.setAttribute("src",f),a.className="","end"==b&&mxUtils.setPrefixedStyle(d.style,"transform","scaleX(-1)"),Editor.isDarkMode()&&
(d.style.filter="invert(100%)"),a.appendChild(d)):(a.className="geSprite geSprite-noarrow",a.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),a.style.backgroundImage="none",a.style.verticalAlign="top",a.style.marginTop="4px",a.style.fontSize="10px",a.style.filter="none",a.style.color=this.defaultStrokeColor,a.nextSibling.style.marginTop="0px"))}; | Base | 1 |
var itemClicked = function(evt)
{
if (evt == null || mxEvent.getSource(evt).nodeName != 'INPUT')
{
preview.style.textAlign = 'center';
preview.style.padding = '0px';
preview.style.color = '';
preview.innerHTML = '';
if (entry.desc != null)
{
var pre = document.createElement('pre');
pre.style.boxSizing = 'border-box';
pre.style.fontFamily = 'inherit';
pre.style.margin = '20px';
pre.style.right = '0px';
pre.style.textAlign = 'left';
mxUtils.write(pre, entry.desc);
preview.appendChild(pre);
}
if (entry.imageCallback != null)
{
entry.imageCallback(preview);
}
else if (entry.image != null)
{
preview.innerHTML += '<img border="0" src="' + entry.image + '"/>';
}
else if (entry.desc == null)
{
preview.style.padding = '20px';
preview.style.color = 'rgb(179, 179, 179)';
mxUtils.write(preview, mxResources.get('noPreview'));
}
if (currentListItem != null)
{
currentListItem.style.backgroundColor = '';
}
currentListItem = option;
currentListItem.style.backgroundColor = Editor.isDarkMode() ? '#000000' : '#ebf2f9';
if (evt != null)
{
mxEvent.consume(evt);
}
}
}; | Base | 1 |
this.update);this.refresh()};Format.prototype.clear=function(){this.container.innerHTML="";if(null!=this.panels)for(var a=0;a<this.panels.length;a++)this.panels[a].destroy();this.panels=[]};Format.prototype.refresh=function(){null!=this.pendingRefresh&&(window.clearTimeout(this.pendingRefresh),this.pendingRefresh=null);this.pendingRefresh=window.setTimeout(mxUtils.bind(this,function(){this.immediateRefresh()}))}; | Base | 1 |
"table": PMA_commonParams.get('table'),
"step": '2.1'
}, function(data) {
$("#page_content h3").html(PMA_messages.str2NFNormalization);
$("#mainContent legend").html(data.legendText);
$("#mainContent h4").html(data.headText);
$("#mainContent p").html(data.subText);
$("#mainContent #extra").html(data.extra);
$("#mainContent #newCols").html('');
if (data.subText !== '') {
$('.tblFooters').html('<input type="submit" value="' + PMA_messages.strDone + '" onclick="processDependencies(\'' + data.primary_key + '\');">');
} else {
if (normalizeto === '3nf') {
$("#mainContent #newCols").html(PMA_messages.strToNextStep);
setTimeout(function() {
goTo3NFStep1([PMA_commonParams.get('table')]);
}, 3000);
}
}
});
} | Base | 1 |
jQuery.fn[ type ] = function( fn ){
return this.on( type, fn );
}; | 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 |
module.exports.checkout = function (callback) {
cp.exec(gitApp + ' checkout -- .', gitExtra, callback);
}; | Class | 2 |
mxResources.get("dragImagesHere"));f.appendChild(y);var A={},B=null,I=null,O=null;e=function(D){"true"!=mxEvent.getSource(D).getAttribute("contentEditable")&&null!=O&&(O(),O=null,mxEvent.consume(D))};mxEvent.addListener(x,"mousedown",e);mxEvent.addListener(x,"pointerdown",e);mxEvent.addListener(x,"touchstart",e);var t=new mxUrlConverter,z=!1;if(null!=c)for(e=0;e<c.length;e++)p=c[e],d(p.data,null,0,0,p.w,p.h,p,p.aspect,p.title);mxEvent.addListener(x,"dragleave",function(D){y.style.cursor="";for(var G= | Class | 2 |
var O=mxText.prototype.redraw;mxText.prototype.redraw=function(){O.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(t,E,K){function T(){for(var ma=S.getSelectionCells(),Aa=[],Da=0;Da<ma.length;Da++)S.isCellVisible(ma[Da])&&Aa.push(ma[Da]);S.setSelectionCells(Aa)}function P(ma){S.setHiddenTags(ma?[]:Y.slice());T();S.refresh()}function Q(ma,Aa){da.innerHTML="";if(0<ma.length){var Da=document.createElement("table"); | Base | 1 |
Note.renderStars = function(notes) {
var me = this;
var notes = notes || me.starNotes;
me.starNotes = notes;
me.starNotesO.html('');
for (var i = 0; i < notes.length; ++i) {
var note = notes[i];
var t = tt(me.starItemT, note.NoteId, note.Title || getMsg('Untitled'));
me.starNotesO.append(t);
}
if (notes.length == 0) {
me.starNotesO.html('<p class="no-info">' + getMsg('No Starred Note') + '</p>');
}
}; | Base | 1 |
elFinder.prototype.commands.search = function() {
this.title = 'Find files';
this.options = {ui : 'searchbutton'}
this.alwaysEnabled = true;
this.updateOnSelect = false;
/**
* Return command status.
* Search does not support old api.
*
* @return Number
**/
this.getstate = function() {
return 0;
}
/**
* Send search request to backend.
*
* @param String search string
* @return $.Deferred
**/
this.exec = function(q, target, mime) {
var fm = this.fm,
reqDef;
if (typeof q == 'string' && q) {
if (typeof target == 'object') {
mime = target.mime || '';
target = target.target || '';
}
target = target? target : '';
mime = mime? $.trim(mime).replace(',', ' ').split(' ') : [];
$.each(mime, function(){ return $.trim(this); });
fm.trigger('searchstart', {query : q, target : target, mimes : mime});
reqDef = fm.request({
data : {cmd : 'search', q : q, target : target, mimes : mime},
notify : {type : 'search', cnt : 1, hideCnt : true},
cancel : true
});
return reqDef;
}
fm.getUI('toolbar').find('.'+fm.res('class', 'searchbtn')+' :text').focus();
return $.Deferred().reject();
}
} | Base | 1 |
mxResources.get(Qa);null==Ma&&(Ma=Qa.substring(0,1).toUpperCase()+Qa.substring(1));Qa=Ma+" ("+Ya.length+")";var Ta=Ma=mxUtils.htmlEntities(Ma);15<Ma.length&&(Ma=Ma.substring(0,15)+"…");return{lbl:Ma+" ("+Ya.length+")",fullLbl:Qa,lblOnly:Ta}}function ia(Qa,Ya,Ma,Ta,Ua){mxEvent.addListener(Ma,"click",function(){X!=Ma&&(null!=X?(X.style.fontWeight="normal",X.style.textDecoration="none"):(ra.style.display="none",Ha.style.minHeight="100%"),X=Ma,X.style.fontWeight="bold",X.style.textDecoration="underline",
Ba.scrollTop=0,W&&(U=!0),va.innerHTML=Ya,ja.style.display="none",C(Ua?da[Qa]:Ta?ka[Qa][Ta]:ha[Qa],Ua?!1:!0))})}var ma=M.querySelector(".geTemplatesList");if(0<ca){ca=document.createElement("div");ca.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(ca,mxResources.get("custom"));ma.appendChild(ca);for(var qa in da){ca=document.createElement("div");var pa=da[qa];pa=la(qa,pa);ca.className="geTemplateCatLink";ca.setAttribute("title", | Base | 1 |
mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(B&&b.hideDialog(),O=!y.model.contains(A),!B||O||I!=q){I=Graph.compress(I);y.getModel().beginUpdate();try{if(O){var t=b.editor.graph.getFreeInsertPoint();A.geometry.x=t.x;A.geometry.y=t.y;y.addCell(A)}y.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+I+")",[A])}catch(z){throw z;}finally{y.getModel().endUpdate()}O&&(y.setSelectionCell(A),y.scrollCellToVisible(A))}};f=mxUtils.button(mxResources.get("preview"),function(){x(l, | Class | 2 |
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()|| | Class | 2 |
EditorUi.prototype.updateCssForMarker=function(a,b,f,d,g){a.style.verticalAlign="top";a.style.height="21px";a.style.width="21px";a.innerHTML="";"flexArrow"==f?a.className=null!=d&&d!=mxConstants.NONE?"geSprite geSprite-"+b+"blocktrans":"geSprite geSprite-noarrow":(f=this.getImageForMarker(d,g),null!=f?(d=document.createElement("img"),d.style.position="absolute",d.style.marginTop="0.5px",d.setAttribute("src",f),a.className="","end"==b&&mxUtils.setPrefixedStyle(d.style,"transform","scaleX(-1)"),Editor.isDarkMode()&&
(d.style.filter="invert(100%)"),a.appendChild(d)):(a.className="geSprite geSprite-noarrow",a.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),a.style.backgroundImage="none",a.style.verticalAlign="top",a.style.marginTop="4px",a.style.fontSize="10px",a.style.filter="none",a.style.color=this.defaultStrokeColor,a.nextSibling.style.marginTop="0px"))}; | Base | 1 |
mxEvent.consume(H))}}catch(M){x.handleError(M)}mxEvent.isConsumed(H)||C.apply(this,arguments)};var D=y.connectVertex;y.connectVertex=function(H,S,V,M,W,U,X){var u=y.getIncomingTreeEdges(H);if(c(H)){var E=d(H),J=E==mxConstants.DIRECTION_EAST||E==mxConstants.DIRECTION_WEST,T=S==mxConstants.DIRECTION_EAST||S==mxConstants.DIRECTION_WEST;return E==S||0==u.length?l(H,S):J==T?k(H):g(H,S!=mxConstants.DIRECTION_NORTH&&S!=mxConstants.DIRECTION_WEST)}return D.apply(this,arguments)};y.getSubtree=function(H){var S= | Base | 1 |
copySync: function (from, dist) {
this._supportExecSync();
try {
var cmd = '';
var stats = fs.lstatSync(from);
dist = path.resolve(dist);
if (stats.isDirectory()) {
if (this._win32) {
// windows
cmd = 'echo da|xcopy /s /e "' + path.join(from, '*') + '" "' + dist + '"';
} else {
// linux or mac
cmd = 'cp -f -R -p ' + path.join(from, '*').replace(/ /g, '\\ ') + ' ' + dist.replace(/ /g, '\\ ');
}
} else if (stats.isFile()) {
if (this._win32) {
// windows
cmd = 'echo fa|xcopy "' + from + '" "' + dist + '"';
} else {
// linux or mac
cmd = 'cp -f -p ' + from.replace(/ /g, '\\ ') + ' ' + dist.replace(/ /g, '\\ ');
}
}
cmd && child_process.execSync(cmd);
} catch (e) {}
}, | Class | 2 |
!0));q.push(B)}this.updatePageLinks(c,q)}}if(null!=L&&"mxGraphModel"===L.nodeName){x=A.importGraphModel(L,e,g,k);if(null!=x)for(y=0;y<x.length;y++)this.updatePageLinksForCell(c,x[y]);var G=A.parseBackgroundImage(L.getAttribute("backgroundImage"));if(null!=G&&null!=G.originalSrc){this.updateBackgroundPageLink(c,G);var N=new ChangePageSetup(this,null,G);N.ignoreColor=!0;A.model.execute(N)}}v&&this.insertHandler(x,null,null,A.defaultVertexStyle,A.defaultEdgeStyle,!1,!0)}finally{A.model.endUpdate()}}}catch(J){if(m)throw J;
this.handleError(J)}return x};EditorUi.prototype.updatePageLinks=function(c,e){for(var g=0;g<e.length;g++)this.updatePageLinksForCell(c,e[g].root),null!=e[g].viewState&&this.updateBackgroundPageLink(c,e[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,e){try{if(null!=e&&Graph.isPageLink(e.originalSrc)){var g=c[e.originalSrc.substring(e.originalSrc.indexOf(",")+1)];null!=g&&(e.originalSrc="data:page/id,"+g)}}catch(k){}};EditorUi.prototype.updatePageLinksForCell= | Base | 1 |
var H=z.div.querySelector(".geCommentEditTxtArea"),F=z.div.querySelector(".geCommentEditBtns");z.comment.content=H.value;H.parentNode.removeChild(H);F.parentNode.removeChild(F)}catch(J){b.handleError(J)}N.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";x=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(J){function R(W){if(null!=W){W.sort(function(V,U){return new Date(V.modifiedDate)-
new Date(U.modifiedDate)});for(var O=0;O<W.length;O++)R(W[O].replies)}}J.sort(function(W,O){return new Date(W.modifiedDate)-new Date(O.modifiedDate)});N.innerHTML="";N.appendChild(K);K.style.display="block";B=J;for(J=0;J<B.length;J++)R(B[J].replies),p(B[J],B,null,0,A);null!=z&&null==z.comment.id&&null==z.comment.pCommentId&&(N.appendChild(z.div),c(z.comment,z.div,z.saveCallback,z.deleteOnCancel))},mxUtils.bind(this,function(J){N.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(J&&J.message? | Base | 1 |
parse() {
// 获取数据
const info = antSword['ipcRenderer'].sendSync('shell-findOne', this.manager.opt['_id']);
const conf = info['database'] || {};
// 刷新UI
// 1.清空数据
this.tree.deleteChildItems(0);
// 2.添加数据
let items = [];
for (let _ in conf) {
items.push({
id: `conn::${_}`,
text: `${conf[_]['type']}:\/\/${conf[_]['user']}@${conf[_]['host']}`,
im0: this.manager.list.imgs[0],
im1: this.manager.list.imgs[0],
im2: this.manager.list.imgs[0]
});
}
// 3.刷新UI
this.tree.parse({
id: 0,
item: items
}, 'json');
// 禁用按钮
this.disableToolbar();
this.disableEditor();
} | Base | 1 |
var CommentsWindow=function(b,f,l,d,t,u){function E(){for(var H=N.getElementsByTagName("div"),F=0,J=0;J<H.length;J++)"none"!=H[J].style.display&&H[J].parentNode==N&&F++;K.style.display=0==F?"block":"none"}function c(H,F,J,R){function W(){F.removeChild(U);F.removeChild(Y);V.style.display="block";O.style.display="block"}z={div:F,comment:H,saveCallback:J,deleteOnCancel:R};var O=F.querySelector(".geCommentTxt"),V=F.querySelector(".geCommentActionsList"),U=document.createElement("textarea");U.className=
"geCommentEditTxtArea";U.style.minHeight=O.offsetHeight+"px";U.value=H.content;F.insertBefore(U,O);var Y=document.createElement("div");Y.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){R?(F.parentNode.removeChild(F),E()):W();z=null});n.className="geCommentEditBtn";Y.appendChild(n);var D=mxUtils.button(mxResources.get("save"),function(){O.innerHTML="";H.content=U.value;mxUtils.write(O,H.content);W();J(H);z=null});mxEvent.addListener(U,"keydown",mxUtils.bind(this,
function(I){mxEvent.isConsumed(I)||((mxEvent.isControlDown(I)||mxClient.IS_MAC&&mxEvent.isMetaDown(I))&&13==I.keyCode?(D.click(),mxEvent.consume(I)):27==I.keyCode&&(n.click(),mxEvent.consume(I)))}));D.focus();D.className="geCommentEditBtn gePrimaryBtn";Y.appendChild(D);F.insertBefore(Y,O);V.style.display="none";O.style.display="none";U.focus()}function e(H,F){F.innerHTML="";H=new Date(H.modifiedDate);var J=b.timeSince(H);null==J&&(J=mxResources.get("lessThanAMinute"));mxUtils.write(F,mxResources.get("timeAgo", | 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 |
mxResources.get("pageWithNumber",[l+1]));p.setAttribute("value","data:page/id,"+b.pages[l].getId());b.pages[l]==b.currentPage&&p.setAttribute("disabled","disabled");null!=f&&f.originalSrc==p.getAttribute("value")&&(p.setAttribute("selected","selected"),m=!0);k.appendChild(p)}n||null!=b.pages&&1!=b.pages.length||(v.style.display="none",d.style.display="none",k.style.display="none");var q=document.createElement("option"),x=!1,y=!1,A=function(z,L){x||null!=z&&y||(d.checked?null!=L&&L(q.selected?null:
k.value):""==g.value||b.isOffline()?(I.value="",O.value="",null!=L&&L("")):(g.value=mxUtils.trim(g.value),b.loadImage(g.value,function(C){I.value=C.width;O.value=C.height;null!=L&&L(g.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));I.value="";O.value="";null!=L&&L(null)})))},B=mxUtils.bind(this,function(z){b.importFiles(z,0,0,b.maxBackgroundSize,function(L,C,D,G,P,K){g.value=L;A();g.focus()},function(){},function(L){return"image/"==L.type.substring(0, | Class | 2 |
mxEvent.consume(ca)});mxEvent.addGestureListeners(document.body,null,function(ca){var ba=!1;null!=va&&(E.diagramContainer.style.width=Math.max(20,wa+mxEvent.getClientX(ca)-va)+"px",ba=!0);null!=ra&&(E.diagramContainer.style.height=Math.max(20,fa+mxEvent.getClientY(ca)-ra)+"px",ba=!0);ba&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:E.diagramContainer.getBoundingClientRect()}),"*"),R(),E.refresh())},function(ca){null==va&&null== | 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", | Class | 2 |
NyanCat.prototype.drawRainbow = function(){
var self = this;
this.trajectories.forEach(function(line, index) {
write('\u001b[' + self.scoreboardWidth + 'C');
write(line.join(''));
write('\n');
});
this.cursorUp(this.numberOfLines);
}; | Base | 1 |
$scope.save = function() {
var form = this.fsForm;
RequisitionsService.startTiming();
RequisitionsService.saveForeignSourceDefinition($scope.foreignSourceDef).then(
function() { // success
growl.success('The definition for the requisition ' + $scope.foreignSource + ' has been saved.');
form.$dirty = false;
},
$scope.errorHandler
);
}; | Base | 1 |
exports.database.prototype.get = function (key, callback)
{
this.db.query("SELECT `value` FROM `store` WHERE `key` = ?", [key], function(err,results)
{
var value = null;
if(!err && results.length == 1)
{
value = results[0].value;
}
callback(err,value);
});
this.schedulePing();
} | Pillar | 3 |
"top center";da.style.backgroundRepeat="no-repeat";da.setAttribute("title","Minimize");var fa=!1,ma=mxUtils.bind(this,function(){S.innerHTML="";if(!fa){var aa=function(la,oa,ra){la=B("",la.funct,null,oa,la,ra);la.style.width="40px";la.style.opacity="0.7";return ca(la,null,"pointer")},ca=function(la,oa,ra){null!=oa&&la.setAttribute("title",oa);la.style.cursor=null!=ra?ra:"default";la.style.margin="2px 0px";S.appendChild(la);mxUtils.br(S);return la};ca(F.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;", | Base | 1 |
function formcheck_enrollment_code(this_DET) {
var this_button_id = this_DET.id;
var frmvalidator = new Validator("F1", this_button_id);
var sn = document.getElementById("values[new][SHORT_NAME]").value;
var t = document.getElementsByName("values[new][TYPE]")[0].value;
if (sn.trim() != "" || t != "") {
frmvalidator.addValidation(
"values[new][TITLE]",
"req",
"Title cannot be blank"
);
frmvalidator.addValidation(
"values[new][TITLE]",
"alphanumeric",
"Title allows only alphanumeric value"
);
frmvalidator.addValidation(
"values[new][TITLE]",
"maxlen=100",
"Max length for title is 100 characters"
);
} else {
frmvalidator.clearAllValidations();
}
var title = document.getElementsByName("values[new][TITLE]")[0].value;
if (title != "" && sn == "") {
frmvalidator.addValidation(
"values[new][SHORT_NAME]",
"req",
"Short name cannot be blank"
);
}
if (title != "" && t == "") {
frmvalidator.addValidation(
"values[new][TYPE]",
"req",
"Type cannot be blank"
);
}
var ar_id = document.getElementById("id_arr").value;
ar_id = ar_id.trim();
if (ar_id != 0) {
var ar_id = ar_id.split(",");
for (var i = 0; i < ar_id.length; i++) {
frmvalidator.addValidation(
"values[" + ar_id[i] + "][TITLE]",
"req",
"Title cannot be blank"
);
frmvalidator.addValidation(
"values[" + ar_id[i] + "][TITLE]",
"alphanumeric",
"Title allows only alphanumeric value"
);
frmvalidator.addValidation(
"values[" + ar_id[i] + "][TITLE]",
"maxlen=100",
"Max length for title is 100 characters"
);
frmvalidator.addValidation(
"values[" + ar_id[i] + "][SHORT_NAME]",
"req",
"Short name cannot be blank"
);
frmvalidator.addValidation(
"values[" + ar_id[i] + "][TYPE]",
"req",
"Type cannot be blank"
);
}
}
} | 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 |
t.toDataURL();if(z.length<g.length){var L=document.createElement("canvas");L.width=I;L.height=O;var C=L.toDataURL();z!==C&&(g=z,y=I,A=O)}}}catch(D){}k(g,y,A)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,g,k){try{var l=new Image;l.onload=function(){l.width=0<l.width?l.width:120;l.height=0<l.height?l.height:120;g(l)};null!=k&&(l.onerror=k);l.src=d}catch(p){if(null!=k)k(p);else throw p;}};EditorUi.prototype.getDefaultSketchMode= | Class | 2 |
"none"};var Ia=function(){pa.innerHTML="";if(null!=F.currentPage){mxUtils.write(pa,F.currentPage.getName());var aa=null!=F.pages?F.pages.length:1,ca=F.getPageIndex(F.currentPage);ca=null!=ca?ca+1:1;var na=F.currentPage.getId();pa.setAttribute("title",F.currentPage.getName()+" ("+ca+"/"+aa+")"+(null!=na?" ["+na+"]":""))}};Ha.parentNode.removeChild(Ha);var Ma=F.actions.get("delete"),za=C("",Ma.funct,null,mxResources.get("delete"),Ma,Editor.trashImage);za.style.opacity="0.1";P.appendChild(za);Ma.addListener("stateChanged", | Base | 1 |
return function directory(req, res, next) {
if ('GET' != req.method && 'HEAD' != req.method) return next();
var url = parse(req.url)
, dir = decodeURIComponent(url.pathname)
, path = normalize(join(root, dir))
, originalUrl = parse(req.originalUrl)
, originalDir = decodeURIComponent(originalUrl.pathname)
, showUp = path != root;
// null byte(s), bad request
if (~path.indexOf('\0')) return next(utils.error(400));
// malicious path, forbidden
if (0 != path.indexOf(root)) return next(utils.error(403));
// check if we have a directory
fs.stat(path, function(err, stat){
if (err) return 'ENOENT' == err.code
? next()
: next(err);
if (!stat.isDirectory()) return next();
// fetch files
fs.readdir(path, function(err, files){
if (err) return next(err);
if (!hidden) files = removeHidden(files);
if (filter) files = files.filter(filter);
files.sort();
// content-negotiation
var type = new Negotiator(req).preferredMediaType(mediaTypes);
// not acceptable
if (!type) return next(utils.error(406));
exports[mediaType[type]](req, res, files, next, originalDir, showUp, icons, path, view, template);
});
});
}; | Base | 1 |
ca.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=da;Da=!0;ca.src="/images/aui-wait.gif";ha.isExt?g(ha,pa,function(){A(mxResources.get("cantLoadPrev"));Da=!1;ca.src="/images/icon-search.svg"}):ia(ha.url,pa)}}function t(ha,da,ca){if(null!=E){for(var la=E.className.split(" "),ia=0;ia<la.length;ia++)if(-1<la[ia].indexOf("Active")){la.splice(ia,1);break}E.className=la.join(" ")}null!=ha?(E=ha,E.className+=" "+da,J=ca,za.className="geTempDlgCreateBtn"):(J=E=null,za.className=
"geTempDlgCreateBtn geTempDlgBtnDisabled")}function z(ha,da){if(null!=J){var ca=function(pa){qa.isExternal?g(qa,function(na){la(na,pa)},ia):qa.url?mxUtils.get(TEMPLATE_PATH+"/"+qa.url,mxUtils.bind(this,function(na){200<=na.getStatus()&&299>=na.getStatus()?la(na.getText(),pa):ia()})):la(b.emptyDiagramXml,pa)},la=function(pa,na){y||b.hideDialog(!0);e(pa,na,qa,da)},ia=function(){A(mxResources.get("cannotLoad"));ma()},ma=function(){J=qa;za.className="geTempDlgCreateBtn";da&&(Ga.className="geTempDlgOpenBtn")}, | Class | 2 |
mxResources.get("ok"),aa,ia,function(ta){var ka=null!=ta&&0<ta.length;return ka&&y?(aa(ta),!1):ka},null,null,null,la,x?null:[]),b.showDialog(ia.container,350,80,!0,!0),ia.init())}}function D(ia){Ba.innerHTML=mxUtils.htmlEntities(mxResources.get(Z||ia?"create":"copy"));ia=ia?"none":"";p&&(Ea.style.display=ia);for(var ra=J.querySelectorAll(".geTempDlgLinkToDiagram"),aa=0;aa<ra.length;aa++)ra[aa].style.display=ia}function B(ia,ra,aa,ca,na){na||(ea.innerHTML="",M(),S=ia,Y=ca);var la=null;if(aa){la=document.createElement("table"); | Base | 1 |
this.init=function(){function G(H){if(null!=H){var R=H.getAttribute("background");if(null==R||""==R||R==mxConstants.NONE)R=Editor.isDarkMode()?"transparent":"#ffffff";A.style.backgroundColor=R;(new mxCodec(H.ownerDocument)).decode(H,L.getModel());L.maxFitScale=1;L.fit(8);L.center()}return H}function N(H){null!=H&&(H=G(Editor.parseDiagramNode(H)));return H}mxEvent.addListener(C,"change",function(H){u=parseInt(C.value);N(D[u]);mxEvent.consume(H)});if("mxfile"==M.nodeName){var I=M.getElementsByTagName("diagram");
D=[];for(var F=0;F<I.length;F++)D.push(I[F]);0<D.length&&N(D[u]);C.innerHTML="";if(1<D.length)for(C.style.display="",F=0;F<D.length;F++)I=document.createElement("option"),mxUtils.write(I,D[F].getAttribute("name")||mxResources.get("pageWithNumber",[F+1])),I.setAttribute("value",F),F==u&&I.setAttribute("selected","selected"),C.appendChild(I);else C.style.display="none"}else G(M)};z.appendChild(C);z.appendChild(f);z.appendChild(l);z.appendChild(x);z.appendChild(e);f=mxUtils.button(mxResources.get("cancel"), | Base | 1 |
window.open = async function(url)
{
if (url != null && url.startsWith('http'))
{
await requestSync({action: 'openExternal', url: url});
}
else
{
return oldWindowOpen(url);
}
} | Base | 1 |
dfrd.abort = function() {
xhr.state() == 'pending' && xhr.abort();
} | Base | 1 |
$.fn.elfinderviewbutton = function(cmd) {
return this.each(function() {
var button = $(this).elfinderbutton(cmd),
icon = button.children('.elfinder-button-icon');
cmd.change(function() {
var icons = cmd.value == 'icons';
icon.toggleClass('elfinder-button-icon-view-list', icons);
button.attr('title', cmd.fm.i18n(icons ? 'viewlist' : 'viewicons'));
});
});
} | Base | 1 |
function(O){O=da.apply(this,arguments);var X=this.editorUi,ea=X.editor.graph;if(ea.isEnabled()&&"1"==urlParams.sketch){var ka=this.createOption(mxResources.get("sketch"),function(){return Editor.sketchMode},function(ja,U){X.setSketchMode(!Editor.sketchMode);null!=U&&mxEvent.isShiftDown(U)||ea.updateCellStyles({sketch:ja?"1":null},ea.getVerticesAndEdges())},{install:function(ja){this.listener=function(){ja(Editor.sketchMode)};X.addListener("sketchModeChanged",this.listener)},destroy:function(){X.removeListener(this.listener)}}); | Class | 2 |
function(P,K){0<D.getSelectionCount()?(C.appendChild(G),G.innerHTML="Selected: "+D.getSelectionCount()):null!=G.parentNode&&G.parentNode.removeChild(G)}))};var z=!1;EditorUi.prototype.initFormatWindow=function(){if(!z&&null!=this.formatWindow){z=!0;this.formatWindow.window.setClosable(!1);var C=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){C.apply(this,arguments);this.minimized?(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left=
parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(D){mxEvent.getSource(D)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var L=EditorUi.prototype.init;EditorUi.prototype.init=function(){function C(da,ca,la){var ia=F.menus.get(da),ma=M.addMenu(mxResources.get(da), | Class | 2 |
arguments);for(ua=0;ua<pa.length;ua++)!T&&this.model.contains(pa[ua])&&0==this.model.getChildCount(pa[ua])&&this.model.remove(pa[ua]);T&&this.updateCustomLinks(this.createCellMapping(ma,this.createCellLookup(z)),Ya)}finally{this.model.endUpdate()}return Ya};var q=Graph.prototype.removeCells;Graph.prototype.removeCells=function(z,L){var M=[];this.model.beginUpdate();try{for(var T=0;T<z.length;T++)if(this.isTableCell(z[T])){var ca=this.model.getParent(z[T]),ia=this.model.getParent(ca);1==this.model.getChildCount(ca)&& | Class | 2 |
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, | Class | 2 |
d[c]=e,"o"===b[1]&&Y(a[e])});a._hungarianMap=d}function J(a,b,c){a._hungarianMap||Y(a);var d;h.each(b,function(e){d=a._hungarianMap[e];if(d!==k&&(c||b[d]===k))"o"===d.charAt(0)?(b[d]||(b[d]={}),h.extend(!0,b[d],b[e]),J(a[d],b[d],c)):b[d]=b[e]})}function Fa(a){var b=m.defaults.oLanguage,c=a.sZeroRecords;!a.sEmptyTable&&(c&&"No data available in table"===b.sEmptyTable)&&F(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&(c&&"Loading..."===b.sLoadingRecords)&&F(a,a,"sZeroRecords","sLoadingRecords"); | Base | 1 |
1E3<=D&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=D||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var O=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(C){C=O.apply(this,arguments); | Class | 2 |
function draw(plot, ctx){
var plotOffset = plot.getPlotOffset();
ctx.save();
ctx.translate(plotOffset.left, plotOffset.top);
$.each(plot.getData(), function (i, s) {
if (s.points.errorbars && (s.points.xerr.show || s.points.yerr.show))
drawSeriesErrors(plot, ctx, s);
});
ctx.restore();
} | Base | 1 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.