Add print stylesheet for boards
This commit is contained in:
@@ -129,11 +129,13 @@ class Helper
|
|||||||
* Add a stylesheet asset
|
* Add a stylesheet asset
|
||||||
*
|
*
|
||||||
* @param string $filename Filename
|
* @param string $filename Filename
|
||||||
|
* @param boolean $is_file Add file timestamp
|
||||||
|
* @param string $media Media
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function css($filename, $is_file = true)
|
public function css($filename, $is_file = true, $media = 'screen')
|
||||||
{
|
{
|
||||||
return '<link rel="stylesheet" href="'.$filename.($is_file ? '?'.filemtime($filename) : '').'" media="screen">';
|
return '<link rel="stylesheet" href="'.$filename.($is_file ? '?'.filemtime($filename) : '').'" media="'.$media.'">';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -14,8 +14,9 @@
|
|||||||
<?= $this->js('assets/js/app.js') ?>
|
<?= $this->js('assets/js/app.js') ?>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
<?= $this->css($this->u('app', 'colors'), false) ?>
|
<?= $this->css($this->u('app', 'colors'), false, 'all') ?>
|
||||||
<?= $this->css('assets/css/app.css') ?>
|
<?= $this->css('assets/css/app.css') ?>
|
||||||
|
<?= $this->css('assets/css/print.css', true, 'print') ?>
|
||||||
|
|
||||||
<?php if ($this->config->get('application_stylesheet')): ?>
|
<?php if ($this->config->get('application_stylesheet')): ?>
|
||||||
<style><?= $this->config->get('application_stylesheet') ?></style>
|
<style><?= $this->config->get('application_stylesheet') ?></style>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
/* DO NOT EDIT: auto-generated file */
|
/* DO NOT EDIT: AUTO-GENERATED FILE */
|
||||||
|
/************************************/
|
||||||
/*! jQuery UI - v1.11.3 - 2015-02-14
|
/*! jQuery UI - v1.11.3 - 2015-02-14
|
||||||
* http://jqueryui.com
|
* http://jqueryui.com
|
||||||
* Includes: core.css, draggable.css, selectable.css, sortable.css, autocomplete.css, datepicker.css, menu.css, tooltip.css, theme.css
|
* Includes: core.css, draggable.css, selectable.css, sortable.css, autocomplete.css, datepicker.css, menu.css, tooltip.css, theme.css
|
||||||
|
|||||||
543
assets/css/print.css
Normal file
543
assets/css/print.css
Normal file
File diff suppressed because one or more lines are too long
4
assets/css/src/print.css
Normal file
4
assets/css/src/print.css
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
header,
|
||||||
|
.page-header {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
print_css="print links table task board"
|
||||||
app_css="base links title table form button alert tooltip header board task comment subtask markdown listing activity dashboard pagination popover confirm sidebar responsive dropdown"
|
app_css="base links title table form button alert tooltip header board task comment subtask markdown listing activity dashboard pagination popover confirm sidebar responsive dropdown"
|
||||||
vendor_css="jquery-ui.min chosen.min fullcalendar.min font-awesome.min"
|
vendor_css="jquery-ui.min chosen.min fullcalendar.min font-awesome.min"
|
||||||
|
|
||||||
@@ -9,13 +10,21 @@ lang_js="da de es fi fr hu it ja nl pl pt-br ru sv sr th tr zh-cn"
|
|||||||
|
|
||||||
function merge_css {
|
function merge_css {
|
||||||
|
|
||||||
local dst_file="assets/css/app.css"
|
local app_file="assets/css/app.css"
|
||||||
|
local print_file="assets/css/print.css"
|
||||||
|
|
||||||
rm -f $dst_file 2>/dev/null
|
rm -f $app_file 2>/dev/null
|
||||||
echo "/* DO NOT EDIT: auto-generated file */" > $dst_file
|
rm -f $print_file 2>/dev/null
|
||||||
|
echo "/* DO NOT EDIT: AUTO-GENERATED FILE */" > $app_file
|
||||||
|
echo "/************************************/" >> $app_file
|
||||||
|
echo "/* DO NOT EDIT: AUTO-GENERATED FILE */" > $print_file
|
||||||
|
echo "/************************************/" >> $print_file
|
||||||
|
|
||||||
for file in $vendor_css; do cat "assets/css/vendor/${file}.css" >> $dst_file; done
|
for file in $vendor_css; do cat "assets/css/vendor/${file}.css" >> $app_file; done
|
||||||
for file in $app_css; do cat "assets/css/src/${file}.css" >> $dst_file; done
|
for file in $vendor_css; do cat "assets/css/vendor/${file}.css" >> $print_file; done
|
||||||
|
|
||||||
|
for file in $app_css; do cat "assets/css/src/${file}.css" >> $app_file; done
|
||||||
|
for file in $print_css; do cat "assets/css/src/${file}.css" >> $print_file; done
|
||||||
}
|
}
|
||||||
|
|
||||||
function minify_js {
|
function minify_js {
|
||||||
|
|||||||
Reference in New Issue
Block a user