|
@@ -3674,558 +3674,6 @@ var ImageDialog = function(editorUi, title, initialValue, fn, ignoreExisting, co
|
|
|
this.container = div;
|
|
|
};
|
|
|
|
|
|
-/**
|
|
|
- * Constructs a new print dialog.
|
|
|
- */
|
|
|
-PrintDialog.prototype.create = function(editorUi, titleText)
|
|
|
-{
|
|
|
- var graph = editorUi.editor.graph;
|
|
|
- var div = document.createElement('div');
|
|
|
-
|
|
|
- var title = document.createElement('h3');
|
|
|
- title.style.width = '100%';
|
|
|
- title.style.textAlign = 'center';
|
|
|
- title.style.marginTop = '0px';
|
|
|
- mxUtils.write(title, titleText || mxResources.get('print'));
|
|
|
- div.appendChild(title);
|
|
|
-
|
|
|
- var pageCount = 1;
|
|
|
- var currentPage = 1;
|
|
|
-
|
|
|
- // Pages
|
|
|
- var pagesSection = document.createElement('div');
|
|
|
- pagesSection.style.cssText = 'border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;';
|
|
|
-
|
|
|
- var allPagesRadio = document.createElement('input');
|
|
|
- allPagesRadio.style.cssText = 'margin-right:8px;margin-bottom:8px;';
|
|
|
- allPagesRadio.setAttribute('value', 'all');
|
|
|
- allPagesRadio.setAttribute('type', 'radio');
|
|
|
- allPagesRadio.setAttribute('name', 'pages-printdialog');
|
|
|
-
|
|
|
- pagesSection.appendChild(allPagesRadio);
|
|
|
-
|
|
|
- var span = document.createElement('span');
|
|
|
- mxUtils.write(span, mxResources.get('printAllPages'));
|
|
|
- pagesSection.appendChild(span);
|
|
|
-
|
|
|
- mxUtils.br(pagesSection);
|
|
|
-
|
|
|
- // Pages ... to ...
|
|
|
- var pagesRadio = allPagesRadio.cloneNode(true);
|
|
|
- allPagesRadio.setAttribute('checked', 'checked');
|
|
|
- pagesRadio.setAttribute('value', 'range');
|
|
|
- pagesSection.appendChild(pagesRadio);
|
|
|
-
|
|
|
- var span = document.createElement('span');
|
|
|
- mxUtils.write(span, mxResources.get('pages') + ':');
|
|
|
- pagesSection.appendChild(span);
|
|
|
-
|
|
|
- var pagesFromInput = document.createElement('input');
|
|
|
- pagesFromInput.style.cssText = 'margin:0 8px 0 8px;'
|
|
|
- pagesFromInput.setAttribute('value', '1');
|
|
|
- pagesFromInput.setAttribute('type', 'number');
|
|
|
- pagesFromInput.setAttribute('min', '1');
|
|
|
- pagesFromInput.style.width = '50px';
|
|
|
- pagesSection.appendChild(pagesFromInput);
|
|
|
-
|
|
|
- var span = document.createElement('span');
|
|
|
- mxUtils.write(span, mxResources.get('to'));
|
|
|
- pagesSection.appendChild(span);
|
|
|
-
|
|
|
- var pagesToInput = pagesFromInput.cloneNode(true);
|
|
|
- pagesSection.appendChild(pagesToInput);
|
|
|
-
|
|
|
- mxEvent.addListener(pagesFromInput, 'focus', function()
|
|
|
- {
|
|
|
- pagesRadio.checked = true;
|
|
|
- });
|
|
|
-
|
|
|
- mxEvent.addListener(pagesToInput, 'focus', function()
|
|
|
- {
|
|
|
- pagesRadio.checked = true;
|
|
|
- });
|
|
|
-
|
|
|
- function validatePageRange()
|
|
|
- {
|
|
|
- pagesToInput.value = Math.max(1, Math.min(pageCount, Math.max(parseInt(pagesToInput.value), parseInt(pagesFromInput.value))));
|
|
|
- pagesFromInput.value = Math.max(1, Math.min(pageCount, Math.min(parseInt(pagesToInput.value), parseInt(pagesFromInput.value))));
|
|
|
- };
|
|
|
-
|
|
|
- mxEvent.addListener(pagesFromInput, 'change', validatePageRange);
|
|
|
- mxEvent.addListener(pagesToInput, 'change', validatePageRange);
|
|
|
-
|
|
|
- if (editorUi.pages != null)
|
|
|
- {
|
|
|
- pageCount = editorUi.pages.length;
|
|
|
-
|
|
|
- if (editorUi.currentPage != null)
|
|
|
- {
|
|
|
- for (var i = 0; i < editorUi.pages.length; i++)
|
|
|
- {
|
|
|
- if (editorUi.currentPage == editorUi.pages[i])
|
|
|
- {
|
|
|
- currentPage = i + 1;
|
|
|
- pagesFromInput.value = currentPage;
|
|
|
- pagesToInput.value = currentPage;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- pagesFromInput.setAttribute('max', pageCount);
|
|
|
- pagesToInput.setAttribute('max', pageCount);
|
|
|
-
|
|
|
- if (pageCount > 1)
|
|
|
- {
|
|
|
- div.appendChild(pagesSection);
|
|
|
- }
|
|
|
-
|
|
|
- // Adjust to ...
|
|
|
- var adjustSection = document.createElement('div');
|
|
|
- adjustSection.style.marginBottom = '10px';
|
|
|
-
|
|
|
- var adjustRadio = document.createElement('input');
|
|
|
- adjustRadio.style.marginRight = '8px';
|
|
|
-
|
|
|
- adjustRadio.setAttribute('value', 'adjust');
|
|
|
- adjustRadio.setAttribute('type', 'radio');
|
|
|
- adjustRadio.setAttribute('name', 'printZoom');
|
|
|
- adjustSection.appendChild(adjustRadio);
|
|
|
-
|
|
|
- var span = document.createElement('span');
|
|
|
- mxUtils.write(span, mxResources.get('adjustTo'));
|
|
|
- adjustSection.appendChild(span);
|
|
|
-
|
|
|
- var zoomInput = document.createElement('input');
|
|
|
- zoomInput.style.cssText = 'margin:0 8px 0 8px;';
|
|
|
- zoomInput.setAttribute('value', '100 %');
|
|
|
- zoomInput.style.width = '50px';
|
|
|
- adjustSection.appendChild(zoomInput);
|
|
|
-
|
|
|
- mxEvent.addListener(zoomInput, 'focus', function()
|
|
|
- {
|
|
|
- adjustRadio.checked = true;
|
|
|
- });
|
|
|
-
|
|
|
- div.appendChild(adjustSection);
|
|
|
-
|
|
|
- // Fit to ...
|
|
|
- var fitSection = pagesSection.cloneNode(false);
|
|
|
-
|
|
|
- var fitRadio = adjustRadio.cloneNode(true);
|
|
|
- fitRadio.setAttribute('value', 'fit');
|
|
|
- adjustRadio.setAttribute('checked', 'checked');
|
|
|
-
|
|
|
- var spanFitRadio = document.createElement('div');
|
|
|
- spanFitRadio.style.cssText = 'display:inline-block;height:100%;vertical-align:top;padding-top:2px;';
|
|
|
- spanFitRadio.appendChild(fitRadio);
|
|
|
- fitSection.appendChild(spanFitRadio);
|
|
|
-
|
|
|
- var table = document.createElement('table');
|
|
|
- table.style.display = 'inline-block';
|
|
|
- var tbody = document.createElement('tbody');
|
|
|
-
|
|
|
- var row1 = document.createElement('tr');
|
|
|
- var row2 = row1.cloneNode(true);
|
|
|
-
|
|
|
- var td1 = document.createElement('td');
|
|
|
- var td2 = td1.cloneNode(true);
|
|
|
- var td3 = td1.cloneNode(true);
|
|
|
-
|
|
|
- var td4 = td1.cloneNode(true);
|
|
|
- var td5 = td1.cloneNode(true);
|
|
|
- var td6 = td1.cloneNode(true);
|
|
|
-
|
|
|
- td1.style.textAlign = 'right';
|
|
|
- td4.style.textAlign = 'right';
|
|
|
-
|
|
|
- mxUtils.write(td1, mxResources.get('fitTo'));
|
|
|
-
|
|
|
- var sheetsAcrossInput = document.createElement('input');
|
|
|
- sheetsAcrossInput.style.cssText = 'margin:0 8px 0 8px;';
|
|
|
- sheetsAcrossInput.setAttribute('value', '1');
|
|
|
- sheetsAcrossInput.setAttribute('min', '1');
|
|
|
- sheetsAcrossInput.setAttribute('type', 'number');
|
|
|
- sheetsAcrossInput.style.width = '40px';
|
|
|
- td2.appendChild(sheetsAcrossInput);
|
|
|
-
|
|
|
- var span = document.createElement('span');
|
|
|
- mxUtils.write(span, mxResources.get('fitToSheetsAcross'));
|
|
|
- td3.appendChild(span);
|
|
|
-
|
|
|
- mxUtils.write(td4, mxResources.get('fitToBy'));
|
|
|
-
|
|
|
- var sheetsDownInput = sheetsAcrossInput.cloneNode(true);
|
|
|
- td5.appendChild(sheetsDownInput);
|
|
|
-
|
|
|
- mxEvent.addListener(sheetsAcrossInput, 'focus', function()
|
|
|
- {
|
|
|
- fitRadio.checked = true;
|
|
|
- });
|
|
|
-
|
|
|
- mxEvent.addListener(sheetsDownInput, 'focus', function()
|
|
|
- {
|
|
|
- fitRadio.checked = true;
|
|
|
- });
|
|
|
-
|
|
|
- var span = document.createElement('span');
|
|
|
- mxUtils.write(span, mxResources.get('fitToSheetsDown'));
|
|
|
- td6.appendChild(span);
|
|
|
-
|
|
|
- row1.appendChild(td1);
|
|
|
- row1.appendChild(td2);
|
|
|
- row1.appendChild(td3);
|
|
|
-
|
|
|
- row2.appendChild(td4);
|
|
|
- row2.appendChild(td5);
|
|
|
- row2.appendChild(td6);
|
|
|
-
|
|
|
- tbody.appendChild(row1);
|
|
|
- tbody.appendChild(row2);
|
|
|
- table.appendChild(tbody);
|
|
|
- fitSection.appendChild(table);
|
|
|
-
|
|
|
- div.appendChild(fitSection);
|
|
|
-
|
|
|
- // Page scale ...
|
|
|
- var pageScaleSection = document.createElement('div');
|
|
|
-
|
|
|
- var span = document.createElement('div');
|
|
|
- span.style.fontWeight = 'bold';
|
|
|
- span.style.marginBottom = '12px';
|
|
|
- mxUtils.write(span, mxResources.get('paperSize'));
|
|
|
- pageScaleSection.appendChild(span);
|
|
|
-
|
|
|
- var span = document.createElement('div');
|
|
|
- span.style.marginBottom = '12px';
|
|
|
-
|
|
|
- var accessor = PageSetupDialog.addPageFormatPanel(span, 'printdialog',
|
|
|
- editorUi.editor.graph.pageFormat || mxConstants.PAGE_FORMAT_A4_PORTRAIT);
|
|
|
- pageScaleSection.appendChild(span);
|
|
|
-
|
|
|
- var span = document.createElement('span');
|
|
|
- mxUtils.write(span, mxResources.get('pageScale'));
|
|
|
- pageScaleSection.appendChild(span);
|
|
|
-
|
|
|
- var pageScaleInput = document.createElement('input');
|
|
|
- pageScaleInput.style.cssText = 'margin:0 8px 0 8px;';
|
|
|
- pageScaleInput.setAttribute('value', '100 %');
|
|
|
- pageScaleInput.style.width = '60px';
|
|
|
- pageScaleSection.appendChild(pageScaleInput);
|
|
|
-
|
|
|
- div.appendChild(pageScaleSection);
|
|
|
-
|
|
|
- // Buttons
|
|
|
- var buttons = document.createElement('div');
|
|
|
- buttons.style.cssText = 'text-align:right;margin:62px 0 0 0;';
|
|
|
-
|
|
|
- // Overall scale for print-out to account for print borders in dialogs etc
|
|
|
- function preview(print)
|
|
|
- {
|
|
|
- var printScale = parseInt(pageScaleInput.value) / 100;
|
|
|
-
|
|
|
- if (isNaN(printScale))
|
|
|
- {
|
|
|
- printScale = 1;
|
|
|
- pageScaleInput.value = '100 %';
|
|
|
- }
|
|
|
-
|
|
|
- // Workaround to match available paper size in actual print output
|
|
|
- printScale *= 0.75;
|
|
|
-
|
|
|
- function printGraph(thisGraph, pv, forcePageBreaks)
|
|
|
- {
|
|
|
- // Negative coordinates are cropped or shifted if page visible
|
|
|
- var gb = thisGraph.getGraphBounds();
|
|
|
- var border = 0;
|
|
|
- var x0 = 0;
|
|
|
- var y0 = 0;
|
|
|
-
|
|
|
- var pf = accessor.get();
|
|
|
- var scale = 1 / thisGraph.pageScale;
|
|
|
- var autoOrigin = fitRadio.checked;
|
|
|
-
|
|
|
- if (autoOrigin)
|
|
|
- {
|
|
|
- var h = parseInt(sheetsAcrossInput.value);
|
|
|
- var v = parseInt(sheetsDownInput.value);
|
|
|
-
|
|
|
- scale = Math.min((pf.height * v) / (gb.height / thisGraph.view.scale),
|
|
|
- (pf.width * h) / (gb.width / thisGraph.view.scale));
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- scale = parseInt(zoomInput.value) / (100 * thisGraph.pageScale);
|
|
|
-
|
|
|
- if (isNaN(scale))
|
|
|
- {
|
|
|
- printScale = 1 / thisGraph.pageScale;
|
|
|
- zoomInput.value = '100 %';
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // Applies print scale
|
|
|
- pf = mxRectangle.fromRectangle(pf);
|
|
|
- pf.width = Math.ceil(pf.width * printScale);
|
|
|
- pf.height = Math.ceil(pf.height * printScale);
|
|
|
- scale *= printScale;
|
|
|
-
|
|
|
- // Starts at first visible page
|
|
|
- if (!autoOrigin && thisGraph.pageVisible)
|
|
|
- {
|
|
|
- var layout = thisGraph.getPageLayout();
|
|
|
- x0 -= layout.x * pf.width;
|
|
|
- y0 -= layout.y * pf.height;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- autoOrigin = true;
|
|
|
- }
|
|
|
-
|
|
|
- if (pv == null)
|
|
|
- {
|
|
|
- pv = PrintDialog.createPrintPreview(thisGraph, scale, pf, border, x0, y0, autoOrigin);
|
|
|
- pv.pageSelector = false;
|
|
|
- pv.mathEnabled = false;
|
|
|
-
|
|
|
- if (typeof(MathJax) !== 'undefined')
|
|
|
- {
|
|
|
- // Adds class to ignore if math is disabled
|
|
|
- var printPreviewRenderPage = pv.renderPage;
|
|
|
-
|
|
|
- pv.renderPage = function(w, h, dx, dy, content, pageNumber)
|
|
|
- {
|
|
|
- var result = printPreviewRenderPage.apply(this, arguments);
|
|
|
-
|
|
|
- if (this.graph.mathEnabled)
|
|
|
- {
|
|
|
- this.mathEnabled = true;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- result.className = 'geDisableMathJax';
|
|
|
- }
|
|
|
-
|
|
|
- return result;
|
|
|
- };
|
|
|
- }
|
|
|
-
|
|
|
- pv.open(null, null, forcePageBreaks, true);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- var bg = thisGraph.background;
|
|
|
-
|
|
|
- if (bg == null || bg == '' || bg == mxConstants.NONE)
|
|
|
- {
|
|
|
- bg = '#ffffff';
|
|
|
- }
|
|
|
-
|
|
|
- pv.backgroundColor = bg;
|
|
|
- pv.autoOrigin = autoOrigin;
|
|
|
- pv.appendGraph(thisGraph, scale, x0, y0, forcePageBreaks, true);
|
|
|
- }
|
|
|
-
|
|
|
- return pv;
|
|
|
- };
|
|
|
-
|
|
|
- var pagesFrom = pagesFromInput.value;
|
|
|
- var pagesTo = pagesToInput.value;
|
|
|
- var ignorePages = !allPagesRadio.checked;
|
|
|
- var pv = null;
|
|
|
-
|
|
|
- if (ignorePages)
|
|
|
- {
|
|
|
- ignorePages = pagesFrom == currentPage && pagesTo == currentPage;
|
|
|
- }
|
|
|
-
|
|
|
- if (!ignorePages && editorUi.pages != null && editorUi.pages.length)
|
|
|
- {
|
|
|
- var i0 = 0;
|
|
|
- var imax = editorUi.pages.length - 1;
|
|
|
-
|
|
|
- if (!allPagesRadio.checked)
|
|
|
- {
|
|
|
- i0 = parseInt(pagesFrom) - 1;
|
|
|
- imax = parseInt(pagesTo) - 1;
|
|
|
- }
|
|
|
-
|
|
|
- for (var i = i0; i <= imax; i++)
|
|
|
- {
|
|
|
- var page = editorUi.pages[i];
|
|
|
- var tempGraph = (page == editorUi.currentPage) ? graph : null;
|
|
|
-
|
|
|
- if (tempGraph == null)
|
|
|
- {
|
|
|
- tempGraph = editorUi.createTemporaryGraph(graph.getStylesheet());
|
|
|
-
|
|
|
- // Restores graph settings that are relevant for printing
|
|
|
- var pageVisible = true;
|
|
|
- var mathEnabled = false;
|
|
|
- var bg = null;
|
|
|
- var bgImage = null;
|
|
|
-
|
|
|
- if (page.viewState == null && page.mapping == null)
|
|
|
- {
|
|
|
- // Workaround to extract view state from XML node
|
|
|
- // This changes the state of the page and parses
|
|
|
- // the XML for the graph model even if not needed.
|
|
|
- if (page.root == null)
|
|
|
- {
|
|
|
- editorUi.updatePageRoot(page);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if (page.viewState != null)
|
|
|
- {
|
|
|
- pageVisible = page.viewState.pageVisible;
|
|
|
- mathEnabled = page.viewState.mathEnabled;
|
|
|
- bg = page.viewState.background;
|
|
|
- bgImage = page.viewState.backgroundImage;
|
|
|
- }
|
|
|
- else if (page.mapping != null && page.mapping.diagramMap != null)
|
|
|
- {
|
|
|
- // Default pageVisible in realtime is true
|
|
|
- mathEnabled = page.mapping.diagramMap.get('mathEnabled') != '0';
|
|
|
- bg = page.mapping.diagramMap.get('background');
|
|
|
-
|
|
|
- var temp = page.mapping.diagramMap.get('backgroundImage');
|
|
|
- bgImage = (temp != null && temp.length > 0) ? JSON.parse(temp) : null;
|
|
|
- }
|
|
|
-
|
|
|
- tempGraph.background = bg;
|
|
|
- tempGraph.backgroundImage = (bgImage != null) ? new mxImage(bgImage.src, bgImage.width, bgImage.height) : null;
|
|
|
- tempGraph.pageVisible = pageVisible;
|
|
|
- tempGraph.mathEnabled = mathEnabled;
|
|
|
-
|
|
|
- // Redirects placeholders to current page
|
|
|
- var graphGetGlobalVariable = tempGraph.getGlobalVariable;
|
|
|
-
|
|
|
- tempGraph.getGlobalVariable = function(name)
|
|
|
- {
|
|
|
- if (name == 'page')
|
|
|
- {
|
|
|
- return page.getName();
|
|
|
- }
|
|
|
- else if (name == 'pagenumber')
|
|
|
- {
|
|
|
- return i + 1;
|
|
|
- }
|
|
|
-
|
|
|
- return graphGetGlobalVariable.apply(this, arguments);
|
|
|
- };
|
|
|
-
|
|
|
- document.body.appendChild(tempGraph.container);
|
|
|
- editorUi.updatePageRoot(page);
|
|
|
- tempGraph.model.setRoot(page.root);
|
|
|
- }
|
|
|
-
|
|
|
- pv = printGraph(tempGraph, pv, i != imax);
|
|
|
-
|
|
|
- if (tempGraph != graph)
|
|
|
- {
|
|
|
- tempGraph.container.parentNode.removeChild(tempGraph.container);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- pv = printGraph(graph);
|
|
|
- }
|
|
|
-
|
|
|
- if (pv.mathEnabled)
|
|
|
- {
|
|
|
- var doc = pv.wnd.document;
|
|
|
-
|
|
|
- doc.writeln('<script type="text/x-mathjax-config">');
|
|
|
- doc.writeln('MathJax.Hub.Config({');
|
|
|
- doc.writeln('messageStyle: "none",');
|
|
|
- doc.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],');
|
|
|
- doc.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],');
|
|
|
- doc.writeln('TeX: {');
|
|
|
- doc.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]');
|
|
|
- doc.writeln('},');
|
|
|
- // Ignores math in in-place editor
|
|
|
- doc.writeln('tex2jax: {');
|
|
|
- doc.writeln(' ignoreClass: "geDisableMathJax"');
|
|
|
- doc.writeln('},');
|
|
|
- doc.writeln('asciimath2jax: {');
|
|
|
- doc.writeln(' ignoreClass: "geDisableMathJax"');
|
|
|
- doc.writeln('}');
|
|
|
- doc.writeln('});');
|
|
|
-
|
|
|
- // Adds asynchronous printing when MathJax finished rendering
|
|
|
- if (print)
|
|
|
- {
|
|
|
- doc.writeln('MathJax.Hub.Queue(function () {');
|
|
|
- doc.writeln('window.print();');
|
|
|
- doc.writeln('});');
|
|
|
- }
|
|
|
-
|
|
|
- doc.writeln('</script>');
|
|
|
- doc.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js"></script>');
|
|
|
- }
|
|
|
-
|
|
|
- pv.closeDocument();
|
|
|
-
|
|
|
- if (!pv.mathEnabled && print)
|
|
|
- {
|
|
|
- PrintDialog.printPreview(pv);
|
|
|
- }
|
|
|
- };
|
|
|
-
|
|
|
- var cancelBtn = mxUtils.button(mxResources.get('cancel'), function()
|
|
|
- {
|
|
|
- editorUi.hideDialog();
|
|
|
- });
|
|
|
- cancelBtn.className = 'geBtn';
|
|
|
-
|
|
|
- if (editorUi.editor.cancelFirst)
|
|
|
- {
|
|
|
- buttons.appendChild(cancelBtn);
|
|
|
- }
|
|
|
-
|
|
|
- if (!editorUi.isOffline())
|
|
|
- {
|
|
|
- var helpBtn = mxUtils.button(mxResources.get('help'), function()
|
|
|
- {
|
|
|
- window.open('https://desk.draw.io/support/solutions/articles/16000048947');
|
|
|
- });
|
|
|
-
|
|
|
- helpBtn.className = 'geBtn';
|
|
|
- buttons.appendChild(helpBtn);
|
|
|
- }
|
|
|
-
|
|
|
- if (PrintDialog.previewEnabled)
|
|
|
- {
|
|
|
- var previewBtn = mxUtils.button(mxResources.get('preview'), function()
|
|
|
- {
|
|
|
- editorUi.hideDialog();
|
|
|
- preview(false);
|
|
|
- });
|
|
|
- previewBtn.className = 'geBtn';
|
|
|
- buttons.appendChild(previewBtn);
|
|
|
- }
|
|
|
-
|
|
|
- var printBtn = mxUtils.button(mxResources.get((!PrintDialog.previewEnabled) ? 'ok' : 'print'), function()
|
|
|
- {
|
|
|
- editorUi.hideDialog();
|
|
|
- preview(true);
|
|
|
- });
|
|
|
- printBtn.className = 'geBtn gePrimaryBtn';
|
|
|
- buttons.appendChild(printBtn);
|
|
|
-
|
|
|
- if (!editorUi.editor.cancelFirst)
|
|
|
- {
|
|
|
- buttons.appendChild(cancelBtn);
|
|
|
- }
|
|
|
-
|
|
|
- div.appendChild(buttons);
|
|
|
-
|
|
|
- this.container = div;
|
|
|
-};
|
|
|
-
|
|
|
/**
|
|
|
* Overrides link dialog to add Google Picker.
|
|
|
*/
|