Merge branch 'printcode' into staging

pull/1/head
ansuz 4 years ago
commit 32d173a37c

@ -9,10 +9,6 @@
max-height: none; max-height: none;
overflow: visible; overflow: visible;
display: block; display: block;
@page {
margin: 0;
size: landscape;
}
// Slide app // Slide app
body.cp-app-slide { body.cp-app-slide {
display: block; display: block;
@ -48,11 +44,15 @@
// Code app // Code app
body.cp-app-code { body.cp-app-code {
display: block; display: block;
height: auto;
* { * {
visibility: hidden; visibility: hidden;
height: auto; height: auto;
max-height: none; max-height: none;
} }
.cp-toolbar-userlist-drawer {
display: none;
}
#cme_toolbox { #cme_toolbox {
display: none; display: none;
} }
@ -64,6 +64,7 @@
#cp-app-code-preview { #cp-app-code-preview {
display: block; display: block;
#cp-app-code-print { #cp-app-code-print {
font-size: 20px;
display: block; display: block;
overflow: visible !important; overflow: visible !important;
width: 100%; width: 100%;

@ -0,0 +1,5 @@
@page {
margin: 0;
size: A4 landscape;
}

@ -0,0 +1,4 @@
@page {
margin: 3cm;
size: A4 portrait;
}

@ -136,7 +136,6 @@
#cp-app-code-print { #cp-app-code-print {
position: relative; position: relative;
display: none; display: none;
margin: 50px;
.markdown_preformatted-code; .markdown_preformatted-code;
.markdown_gfm-table(black); .markdown_gfm-table(black);
} }

@ -42,6 +42,7 @@ define([
'cm/addon/fold/comment-fold', 'cm/addon/fold/comment-fold',
'cm/addon/display/placeholder', 'cm/addon/display/placeholder',
'css!/customize/src/print.css',
'less!/code/app-code.less' 'less!/code/app-code.less'
], function ( ], function (

@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html class="cp-app-noscroll"> <html class="cp-app-noscroll cp-app-print">
<head> <head>
<meta content="text/html; charset=utf-8" http-equiv="content-type"/> <meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<script async data-bootload="/pad/inner.js" data-main="/common/sframe-boot.js?ver=1.6" src="/bower_components/requirejs/require.js?ver=2.3.5"></script> <script async data-bootload="/pad/inner.js" data-main="/common/sframe-boot.js?ver=1.6" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>

@ -47,6 +47,7 @@ define([
'/bower_components/diff-dom/diffDOM.js', '/bower_components/diff-dom/diffDOM.js',
'css!/customize/src/print.css',
'css!/bower_components/bootstrap/dist/css/bootstrap.min.css', 'css!/bower_components/bootstrap/dist/css/bootstrap.min.css',
'css!/bower_components/components-font-awesome/css/font-awesome.min.css', 'css!/bower_components/components-font-awesome/css/font-awesome.min.css',
'less!/pad/app-pad.less' 'less!/pad/app-pad.less'
@ -500,6 +501,12 @@ define([
var mkPrintButton = function (framework, editor) { var mkPrintButton = function (framework, editor) {
var $printButton = framework._.sfCommon.createButton('print', true); var $printButton = framework._.sfCommon.createButton('print', true);
$printButton.click(function () { $printButton.click(function () {
/*
// NOTE: alternative print system in case we keep having more issues on Firefox
var $iframe = $('html').find('iframe');
var iframe = $iframe[0].contentWindow;
iframe.print();
*/
editor.execCommand('print'); editor.execCommand('print');
framework.feedback('PRINT_PAD'); framework.feedback('PRINT_PAD');
}); });

@ -15,6 +15,7 @@ define([
'css!/bower_components/bootstrap/dist/css/bootstrap.min.css', 'css!/bower_components/bootstrap/dist/css/bootstrap.min.css',
'css!/bower_components/components-font-awesome/css/font-awesome.min.css', 'css!/bower_components/components-font-awesome/css/font-awesome.min.css',
'css!/customize/src/print-landscape.css',
'less!/slide/app-slide.less', 'less!/slide/app-slide.less',
'css!cm/lib/codemirror.css', 'css!cm/lib/codemirror.css',

Loading…
Cancel
Save