Merge branch 'printcode' into staging

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

@ -9,10 +9,6 @@
max-height: none;
overflow: visible;
display: block;
@page {
margin: 0;
size: landscape;
}
// Slide app
body.cp-app-slide {
display: block;
@ -48,11 +44,15 @@
// Code app
body.cp-app-code {
display: block;
height: auto;
* {
visibility: hidden;
height: auto;
max-height: none;
}
.cp-toolbar-userlist-drawer {
display: none;
}
#cme_toolbox {
display: none;
}
@ -64,6 +64,7 @@
#cp-app-code-preview {
display: block;
#cp-app-code-print {
font-size: 20px;
display: block;
overflow: visible !important;
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 {
position: relative;
display: none;
margin: 50px;
.markdown_preformatted-code;
.markdown_gfm-table(black);
}

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

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class="cp-app-noscroll">
<html class="cp-app-noscroll cp-app-print">
<head>
<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>

@ -47,6 +47,7 @@ define([
'/bower_components/diff-dom/diffDOM.js',
'css!/customize/src/print.css',
'css!/bower_components/bootstrap/dist/css/bootstrap.min.css',
'css!/bower_components/components-font-awesome/css/font-awesome.min.css',
'less!/pad/app-pad.less'
@ -500,6 +501,12 @@ define([
var mkPrintButton = function (framework, editor) {
var $printButton = framework._.sfCommon.createButton('print', true);
$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');
framework.feedback('PRINT_PAD');
});

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

Loading…
Cancel
Save