Lines Matching refs:App

14 App = function(editor, container, lightbox)  class
40 '-alive_' + Math.round((Date.now() - App.startTime.getTime()) / 1000),
132 if (App.DrawPlugins != null)
134 for (var i = 0; i < App.DrawPlugins.length; i++)
138 App.DrawPlugins[i](this);
144 console.log('Plugin Error:', e, App.DrawPlugins[i]);
149 App.embedModePluginsCount--;
163 App.embedModePluginsCount--;
172 if (App.embedModePluginsCount > 0)
174 App.embedModePluginsCount = 0;
186 App.ERROR_TIMEOUT = 'timeout';
191 App.ERROR_BUSY = 'busy';
196 App.ERROR_UNKNOWN = 'unknown';
201 App.MODE_GOOGLE = 'google';
206 App.MODE_DROPBOX = 'dropbox';
211 App.MODE_ONEDRIVE = 'onedrive';
216 App.MODE_GITHUB = 'github';
221 App.MODE_GITLAB = 'gitlab';
226 App.MODE_DEVICE = 'device';
231 App.MODE_BROWSER = 'browser';
236 App.MODE_TRELLO = 'trello';
241 App.MODE_NOTION = 'notion';
246 App.MODE_EMBED = 'embed';
251 App.MODE_ATLAS = 'atlas';
256 App.DROPBOX_APPKEY = window.DRAWIO_DROPBOX_ID;
261 App.DROPBOX_URL = window.DRAWIO_BASE_URL + '/js/dropbox/Dropbox-sdk.min.js';
266 App.DROPINS_URL = 'https://www.dropbox.com/static/api/2/dropins.js';
272 App.ONEDRIVE_URL = mxClient.IS_IE11? 'https://js.live.net/v7.2/OneDrive.js' : window.DRAWIO_BASE_UR…
277 App.TRELLO_URL = 'https://api.trello.com/1/client.js';
282 App.TRELLO_JQUERY_URL = window.DRAWIO_BASE_URL + '/js/jquery/jquery-3.3.1.min.js';
287 App.PUSHER_KEY = '1e756b07a690c5bdb054';
292 App.PUSHER_CLUSTER = 'eu';
297 App.PUSHER_URL = 'https://js.pusher.com/4.3/pusher.min.js';
302 App.SOCKET_IO_URL = window.DRAWIO_BASE_URL + '/js/socket.io/socket.io.min.js';
303 App.SIMPLE_PEER_URL = window.DRAWIO_BASE_URL + '/js/socket.io/simplepeer9.10.0.min.js';
304 App.SOCKET_IO_SRV = 'http://localhost:3030';
310 App.GOOGLE_APIS = 'drive-share';
317 App.startTime = new Date();
323 App.pluginRegistry = {'4xAKTrabTpTzahoLthkwPNUn': 'plugins/explore.js',
341 App.publicPlugin = [
367 App.loadScripts = function(scripts, onload)
388 App.getStoredMode = function()
441 App.mode = urlParams['mode'];
444 if (App.mode == null)
447 App.mode = App.getStoredMode();
464 if (App.mode == App.MODE_GOOGLE || (urlParams['state'] != null &&
493 if (App.mode == App.MODE_DROPBOX || (window.location.hash != null &&
496 mxscript(App.DROPBOX_URL, function()
499 mxscript(App.DROPINS_URL, null, 'dropboxjs', App.DROPBOX_APPKEY, true);
521 if (App.mode == App.MODE_ONEDRIVE || (window.location.hash != null &&
525 mxscript(App.ONEDRIVE_URL);
546 if (App.mode == App.MODE_TRELLO || (window.location.hash != null &&
549 mxscript(App.TRELLO_JQUERY_URL, function()
551 mxscript(App.TRELLO_URL);
573 App.clearServiceWorker = function(success)
597 App.main = function(callback, createUi)
638 …if (urlParams['dev'] == '1' && CryptoJS != null && App.mode != App.MODE_DROPBOX && App.mode != App
674 App.clearServiceWorker(function()
703 mxscript(App.PUSHER_URL);
707 mxscript(App.SOCKET_IO_URL);
708 mxscript(App.SIMPLE_PEER_URL);
739 App.initPluginCallback();
744 App.loadPlugins(temp.split(';'));
769 if (App.pluginsLoaded[plugins[i]] == null)
771 App.pluginsLoaded[plugins[i]] = true;
772 App.embedModePluginsCount++;
834 for (var key in App.pluginRegistry)
836 trustedPlugins[App.pluginRegistry[key]] = true;
920 var ui = (createUi != null) ? createUi() : new App(new Editor(
934 mxscript(App.DROPBOX_URL, function()
937 mxscript(App.DROPINS_URL, function()
940 }, 'dropboxjs', App.DROPBOX_APPKEY);
957 mxscript(App.ONEDRIVE_URL, window.DrawOneDriveClientCallback);
971 mxscript(App.TRELLO_JQUERY_URL, function()
974 mxscript(App.TRELLO_URL, function()
1014 App.loadScripts(['js/shapes-14-6-5.min.js', 'js/stencils.min.js',
1199 mxUtils.extend(App, EditorUi);
1204 App.prototype.defaultUserPicture = IMAGE_PATH + '/default-user.jpg';
1209 App.prototype.shareImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAG…
1214 App.prototype.chevronUpImage = (!mxClient.IS_SVG) ? IMAGE_PATH + '/chevron-up.png' : 'data:image/pn…
1219 App.prototype.chevronDownImage = (!mxClient.IS_SVG) ? IMAGE_PATH + '/chevron-down.png' : 'data:imag…
1224 App.prototype.formatShowImage = (!mxClient.IS_SVG) ? IMAGE_PATH + '/format-show.png' : 'data:image/…
1229 App.prototype.formatHideImage = (!mxClient.IS_SVG) ? IMAGE_PATH + '/format-hide.png' : 'data:image/…
1234 App.prototype.fullscreenImage = (!mxClient.IS_SVG) ? IMAGE_PATH + '/fullscreen.png' : 'data:image/p…
1240 App.prototype.warnInterval = 300000;
1245 App.prototype.compactMode = false;
1250 App.prototype.fullscreenMode = false;
1257 App.prototype.menubarHeight = 64;
1261 App.prototype.footerHeight = 0;
1267 App.initPluginCallback = function()
1269 if (App.DrawPlugins == null)
1272 App.DrawPlugins = [];
1279 App.DrawPlugins.push(callback);
1287 App.pluginsLoaded = {};
1288 App.embedModePluginsCount = 0;
1293 App.loadPlugins = function(plugins, useInclude)
1303 var url = PLUGINS_BASE_PATH + App.pluginRegistry[plugins[i]];
1307 if (App.pluginsLoaded[url] == null)
1309 App.pluginsLoaded[url] = true;
1310 App.embedModePluginsCount++;
1355 App.prototype.initializeEmbedMode = function()
1364 if (App.embedModePluginsCount > 0 || this.initEmbedDone)
1380 App.prototype.initializeViewerMode = function()
1399 App.prototype.init = function()
1579 gapi.load(((urlParams['picker'] != '0') ? 'picker,': '') + App.GOOGLE_APIS, doInit);
1663 this.setMode(App.MODE_DEVICE);
1667 this.mode = App.mode;
1692 if (urlParams['extAuth'] != '1' && (mode == App.MODE_DEVICE || mode == App.MODE_BROWSER))
1791 App.prototype.scheduleSanityCheck = function()
1807 App.prototype.stopSanityCheck = function()
1819 App.prototype.sanityCheck = function()
1836 '-alive_' + Math.round((Date.now() - App.startTime.getTime()) / 1000),
1884 App.prototype.isDriveDomain = function()
1897 App.prototype.getPusher = function()
1901 this.pusher = new Pusher(App.PUSHER_KEY,
1903 cluster: App.PUSHER_CLUSTER,
1914 App.prototype.showNameChangeBanner = function()
1925 App.prototype.showNameConfBanner = function()
1936 App.prototype.showDownloadDesktopBanner = function()
1947 App.prototype.showRatingBanner = function()
2088 App.prototype.checkLicense = function()
2134 App.prototype.handleLicense = function(lic, domain)
2138 App.loadPlugins(lic.plugins.split(';'), true);
2145 App.prototype.getEditBlankXml = function()
2162 App.prototype.updateActionStates = function()
2172 App.prototype.addRecent = function(entry)
2205 App.prototype.getRecent = function()
2230 App.prototype.resetRecent = function(entry)
2248 App.prototype.onBeforeUnload = function()
2285 App.prototype.updateDocumentTitle = function()
2316 App.prototype.getThumbnail = function(width, fn)
2554 App.prototype.createBackground = function()
2579 App.prototype.setMode = function(mode, remember)
2587 Editor.useLocalStorage = this.mode == App.MODE_BROWSER;
2595 if (mode == App.MODE_GOOGLE)
2600 else if (mode == App.MODE_DROPBOX)
2605 else if (mode == App.MODE_ONEDRIVE)
2613 this.appIcon.style.cursor = (mode == App.MODE_DEVICE) ? 'pointer' : 'default';
2645 App.prototype.appIconClicked = function(evt)
2656 if (mode == App.MODE_GOOGLE)
2673 else if (mode == App.MODE_ONEDRIVE)
2692 else if (mode == App.MODE_DROPBOX)
2710 else if (mode == App.MODE_TRELLO)
2714 else if (mode == App.MODE_NOTION)
2718 else if (mode == App.MODE_GITHUB)
2729 else if (mode == App.MODE_GITLAB)
2740 else if (mode == App.MODE_DEVICE)
2754 App.prototype.clearMode = function()
2774 App.prototype.getDiagramId = function()
2801 App.prototype.open = function()
2868 App.prototype.loadGapi = function(then)
2872 gapi.load(((urlParams['picker'] != '0') ? 'picker,': '') + App.GOOGLE_APIS, then);
2882 App.prototype.load = function()
2918 if (this.mode == App.MODE_GOOGLE)
2949 App.prototype.showRefreshDialog = function(title, message)
2991 App.prototype.showAlert = function(message)
3058 App.prototype.start = function()
3455 this.setMode(App.MODE_GOOGLE);
3492 App.prototype.loadDraft = function(xml, success)
3516 App.prototype.checkDrafts = function()
3639 App.prototype.showSplash = function(force)
3700 App.prototype.addLanguageMenu = function(elt, addLabel)
3764 App.prototype.loadFileSystemEntry = function(fileHandle, success, error)
3826 App.prototype.createFileSystemOptions = function(name)
3872 App.prototype.showSaveFilePicker = function(success, error, opts)
3902 App.prototype.pickFile = function(mode)
3908 if (mode == App.MODE_GOOGLE)
3927 else if (mode == App.MODE_DEVICE && EditorUi.nativeFileSupport)
3944 else if (mode == App.MODE_DEVICE && Graph.fileSupport)
3995 Editor.useLocalStorage = (mode == App.MODE_BROWSER);
4011 this.fileLoaded((mode == App.MODE_BROWSER) ?
4058 App.prototype.pickLibrary = function(mode)
4062 if (mode == App.MODE_GOOGLE || mode == App.MODE_DROPBOX || mode == App.MODE_ONEDRIVE ||
4063 mode == App.MODE_GITHUB || mode == App.MODE_GITLAB || mode == App.MODE_TRELLO ||
4064 mode == App.MODE_NOTION)
4066 var peer = (mode == App.MODE_GOOGLE) ? this.drive :
4067 ((mode == App.MODE_ONEDRIVE) ? this.oneDrive :
4068 ((mode == App.MODE_GITHUB) ? this.gitHub :
4069 ((mode == App.MODE_GITLAB) ? this.gitLab :
4070 ((mode == App.MODE_TRELLO) ? this.trello :
4071 ((mode == App.MODE_NOTION) ? this.notion :
4114 else if (mode == App.MODE_DEVICE && Graph.fileSupport)
4182 Editor.useLocalStorage = mode == App.MODE_BROWSER;
4194 this.loadLibrary((mode == App.MODE_BROWSER) ? new StorageLibrary(this, xml, filename) :
4219 App.prototype.saveLibrary = function(name, images, file, mode, noSpin, noReload, fn)
4241 if (file == null && mode == App.MODE_DEVICE)
4250 …if (mode == App.MODE_GOOGLE && this.drive != null && this.spinner.spin(document.body, mxResources.…
4259 …else if (mode == App.MODE_GITHUB && this.gitHub != null && this.spinner.spin(document.body, mxReso…
4268 …else if (mode == App.MODE_GITLAB && this.gitLab != null && this.spinner.spin(document.body, mxReso…
4277 …else if (mode == App.MODE_NOTION && this.notion != null && this.spinner.spin(document.body, mxReso…
4286 …else if (mode == App.MODE_TRELLO && this.trello != null && this.spinner.spin(document.body, mxReso…
4295 …else if (mode == App.MODE_DROPBOX && this.dropbox != null && this.spinner.spin(document.body, mxRe…
4304 …else if (mode == App.MODE_ONEDRIVE && this.oneDrive != null && this.spinner.spin(document.body, mx…
4313 else if (mode == App.MODE_BROWSER)
4401 App.prototype.saveFile = function(forceDialog, success)
4419 if (file.getMode() != App.MODE_DEVICE)
4494 if (prev == null && mode == App.MODE_DEVICE)
4501 file.mode = App.MODE_DEVICE;
4505 this.setMode(App.MODE_DEVICE);
4517 this.setMode(App.MODE_DEVICE);
4570 App.prototype.loadTemplate = function(url, onload, onerror, templateFilename, asLibrary)
4660 App.prototype.getPeerForMode = function(mode)
4662 if (mode == App.MODE_GOOGLE)
4666 else if (mode == App.MODE_GITHUB)
4670 else if (mode == App.MODE_GITLAB)
4674 else if (mode == App.MODE_DROPBOX)
4678 else if (mode == App.MODE_ONEDRIVE)
4682 else if (mode == App.MODE_TRELLO)
4686 else if (mode == App.MODE_NOTION)
4702 App.prototype.createFile = function(title, data, libs, mode, done, replace, folderId, tempFile, cli…
4731 if (mode == App.MODE_GOOGLE && this.drive != null)
4744 else if (mode == App.MODE_GITHUB && this.gitHub != null)
4752 else if (mode == App.MODE_GITLAB && this.gitLab != null)
4760 else if (mode == App.MODE_NOTION && this.notion != null)
4768 else if (mode == App.MODE_TRELLO && this.trello != null)
4776 else if (mode == App.MODE_DROPBOX && this.dropbox != null)
4784 else if (mode == App.MODE_ONEDRIVE && this.oneDrive != null)
4792 else if (mode == App.MODE_BROWSER)
4800 else if (!tempFile && mode == App.MODE_DEVICE && EditorUi.nativeFileSupport)
4840 App.prototype.fileCreated = function(file, libs, replace, done, clibs)
4857 if (file.getMode() != App.MODE_DEVICE)
5003 App.prototype.loadFile = function(id, sameWindow, file, success, force)
5416 App.prototype.getLibraryStorageHint = function(file)
5460 App.prototype.restoreLibraries = function()
5471 App.prototype.loadLibraries = function(libs, done)
5735 App.prototype.updateButtonContainer = function()
5872 App.prototype.fetchAndShowNotification = function(target, subtarget)
5943 App.prototype.showNotification = function(notifs, lsReadFlag)
6147 App.prototype.save = function(name, done)
6206 App.prototype.pickFolder = function(mode, fn, enabled, direct, force)
6211 if (enabled && mode == App.MODE_GOOGLE && this.drive != null)
6231 else if (enabled && mode == App.MODE_ONEDRIVE && this.oneDrive != null)
6245 else if (enabled && mode == App.MODE_GITHUB && this.gitHub != null)
6253 else if (enabled && mode == App.MODE_GITLAB && this.gitLab != null)
6261 else if (enabled && mode == App.MODE_NOTION && this.notion != null)
6269 else if (enabled && mode == App.MODE_TRELLO && this.trello != null)
6286 App.prototype.exportFile = function(data, filename, mimeType, base64Encoded, mode, folderId)
6288 if (mode == App.MODE_DROPBOX)
6304 else if (mode == App.MODE_GOOGLE)
6342 else if (mode == App.MODE_ONEDRIVE)
6358 else if (mode == App.MODE_GITHUB)
6373 else if (mode == App.MODE_GITLAB)
6388 else if (mode == App.MODE_TRELLO)
6403 else if (mode == App.MODE_BROWSER)
6427 App.prototype.descriptorChanged = function()
6486 App.prototype.showAuthDialog = function(peer, showRememberOption, fn, closeFn)
6526 App.prototype.convertFile = function(url, filename, mimeType, extension, success, error, executeReq…
6691 error({code: App.ERROR_UNKNOWN});
6697 error({code: App.ERROR_UNKNOWN});
6703 error({code: App.ERROR_TIMEOUT, retry: fn});
6721 App.prototype.updateHeader = function()
6767 if (mode == App.MODE_GOOGLE)
6772 else if (mode == App.MODE_DROPBOX)
6777 else if (mode == App.MODE_ONEDRIVE)
6782 else if (mode == App.MODE_GITHUB)
6787 else if (mode == App.MODE_GITLAB)
6792 else if (mode == App.MODE_NOTION)
6797 else if (mode == App.MODE_TRELLO)
7041 App.prototype.toggleCompactMode = function(visible)
7057 this.menubarHeight = App.prototype.menubarHeight;
7084 App.prototype.updateUserElement = function()
7268 this.setMode(App.MODE_GOOGLE);
7313 this.setMode(App.MODE_GOOGLE);
7336 this.setMode(App.MODE_GOOGLE);
7739 App.prototype.getCurrentUser = function()