Add print stylesheet for boards

This commit is contained in:
Frederic Guillot 2015-04-25 15:08:02 -04:00
parent 8d15d0641f
commit 956f88f527
6 changed files with 569 additions and 9 deletions

View File

@ -129,11 +129,13 @@ class Helper
* Add a stylesheet asset
*
* @param string $filename Filename
* @param boolean $is_file Add file timestamp
* @param string $media Media
* @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.'">';
}
/**

View File

@ -14,8 +14,9 @@
<?= $this->js('assets/js/app.js') ?>
<?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/print.css', true, 'print') ?>
<?php if ($this->config->get('application_stylesheet')): ?>
<style><?= $this->config->get('application_stylesheet') ?></style>

View File

@ -1,4 +1,5 @@
/* DO NOT EDIT: auto-generated file */
/* DO NOT EDIT: AUTO-GENERATED FILE */
/************************************/
/*! jQuery UI - v1.11.3 - 2015-02-14
* http://jqueryui.com
* 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

File diff suppressed because one or more lines are too long

4
assets/css/src/print.css Normal file
View File

@ -0,0 +1,4 @@
header,
.page-header {
display: none;
}

View File

@ -1,5 +1,6 @@
#!/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"
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 {
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
echo "/* DO NOT EDIT: auto-generated file */" > $dst_file
rm -f $app_file 2>/dev/null
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 $app_css; do cat "assets/css/src/${file}.css" >> $dst_file; done
for file in $vendor_css; do cat "assets/css/vendor/${file}.css" >> $app_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 {