Fix css minification (#329)

Fix suspended sales dialog (set class to modal-dlg)
This commit is contained in:
jekkos committed 2016-02-19 19:03:56 +01:00
1 parent 967ba99c12
commit 30223c38e1
12 files changed
+7913 -185

No files matched your search

+143 -110
View File
@@ -1,119 +1,152 @@
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
wiredep: {
task: {
ignorePath: '../../../',
src: ['**/header.php']
}
},
bower_concat: {
all: {
dest: {
'js': 'dist/opensourcepos_bower.js'
}
}
},
concat: {
js: {
options: {
separator: ';'
},
files: {
'dist/<%= pkg.name %>.js': ['dist/opensourcepos_bower.js', 'js/jquery*', 'js/*.js']
}
},
sql: {
options: {
banner: '-- >> This file is autogenerated from tables.sql and constraints.sql. Do not modify directly << --'
},
files: {
'database/database.sql': ['database/tables.sql', 'database/constraints.sql'],
'database/migrate_phppos_dist.sql': ['database/tables.sql', 'database/phppos_migrate.sql', 'database/constraints.sql']
}
}
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
},
dist: {
files: {
'dist/<%= pkg.name %>.min.js': ['dist/<%= pkg.name %>.js']
}
}
},
jshint: {
files: ['Gruntfile.js', 'js/*.js'],
options: {
// options here to override JSHint defaults
globals: {
jQuery: true,
console: true,
module: true,
document: true
}
}
},
tags: {
js : {
options: {
scriptTemplate: '<script type="text/javascript" src="{{ path }}" language="javascript"></script>',
openTag: '<!-- start js template tags -->',
closeTag: '<!-- end js template tags -->',
absolutePath: true
},
src: [ 'js/jquery*', 'js/*.js' ],
dest: 'application/views/partial/header.php'
},
minjs : {
options: {
scriptTemplate: '<script type="text/javascript" src="{{ path }}" language="javascript"></script>',
openTag: '<!-- start minjs template tags -->',
closeTag: '<!-- end minjs template tags -->',
absolutePath: true
},
src: [
'dist/*min.js'
],
dest: 'application/views/partial/header.php'
}
},
mochaWebdriver: {
options: {
timeout: 1000 * 60 * 3
},
test : {
options: {
usePhantom: true,
usePromises: true
},
src: ['test/**/*.js']
}
},
watch: {
files: ['<%= jshint.files %>'],
tasks: ['jshint']
},
cachebreaker: {
dev: {
options: {
match: ['opensourcepos.min.js'],
src: {
path: 'dist/opensourcepos.min.js'
},
replacement: 'md5'
},
files: {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
wiredep: {
task: {
ignorePath: '../../../',
src: ['**/header.php']
}
},
bower_concat: {
all: {
mainFiles: {
'bootswatch-dist': ['css/bootstrap.css', 'js/bootstrap.js']
},
dest: {
'js': 'dist/opensourcepos_bower.js',
'css': 'dist/opensourcepos_bower.css'
}
}
},
cssmin: {
target: {
files: {
'dist/<%= pkg.name %>.min.css': ['dist/opensourcepos_bower.css', 'css/*.css']
}
}
},
concat: {
js: {
options: {
separator: ';'
},
files: {
'dist/<%= pkg.name %>.js': ['dist/opensourcepos_bower.js', 'js/jquery*', 'js/*.js']
}
},
sql: {
options: {
banner: '-- >> This file is autogenerated from tables.sql and constraints.sql. Do not modify directly << --'
},
files: {
'database/database.sql': ['database/tables.sql', 'database/constraints.sql'],
'database/migrate_phppos_dist.sql': ['database/tables.sql', 'database/phppos_migrate.sql', 'database/constraints.sql']
}
}
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
},
dist: {
files: {
'dist/<%= pkg.name %>.min.js': ['dist/<%= pkg.name %>.js']
}
}
},
jshint: {
files: ['Gruntfile.js', 'js/*.js'],
options: {
// options here to override JSHint defaults
globals: {
jQuery: true,
console: true,
module: true,
document: true
}
}
},
tags: {
css : {
options: {
scriptTemplate: '<rel type="text/css" src="{{ path }}"></rel>',
openTag: '<!-- start css template tags -->',
closeTag: '<!-- end css template tags -->',
absolutePath: true
},
src: [ 'css/*.css' ],
dest: 'application/views/partial/header.php'
},
mincss: {
options: {
scriptTemplate: '<rel type="text/css" src="{{ path }}"></rel>',
openTag: '<!-- start mincss template tags -->',
closeTag: '<!-- end mincss template tags -->',
absolutePath: true
},
src: [ 'dist/*min.css' ],
dest: 'application/views/partial/header.php'
},
js : {
options: {
scriptTemplate: '<script type="text/javascript" src="{{ path }}" language="javascript"></script>',
openTag: '<!-- start js template tags -->',
closeTag: '<!-- end js template tags -->',
absolutePath: true
},
src: [ 'js/jquery*', 'js/*.js' ],
dest: 'application/views/partial/header.php'
},
minjs : {
options: {
scriptTemplate: '<script type="text/javascript" src="{{ path }}" language="javascript"></script>',
openTag: '<!-- start minjs template tags -->',
closeTag: '<!-- end minjs template tags -->',
absolutePath: true
},
src: [
'dist/*min.js'
],
dest: 'application/views/partial/header.php'
}
},
mochaWebdriver: {
options: {
timeout: 1000 * 60 * 3
},
test : {
options: {
usePhantom: true,
usePromises: true
},
src: ['test/**/*.js']
}
},
watch: {
files: ['<%= jshint.files %>'],
tasks: ['jshint']
},
cachebreaker: {
dev: {
options: {
match: [
{
'opensourcepos.min.js': 'dist/opensourcepos.min.js',
'opensourcepos.min.css': 'dist/opensourcepos.min.css'
}
],
replacement: 'md5'
},
files: {
src: ['**/header.php']
}
}
}
}
});
});
require('load-grunt-tasks')(grunt);
require('load-grunt-tasks')(grunt);
grunt.registerTask('default', ['wiredep', 'tags:js', 'bower_concat', 'concat', 'uglify', 'tags:minjs', 'cachebreaker']);
grunt.registerTask('default', ['wiredep', 'bower_concat', 'concat', 'uglify', 'cssmin', 'tags', 'cachebreaker']);
};
+29 -10
View File
@@ -5,16 +5,29 @@
<base href="<?php echo base_url();?>" />
<title><?php echo $this->config->item('company').' -- '.$this->lang->line('common_powered_by').' OS Point Of Sale' ?></title>
<link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico">
<!-- bower:css -->
<link rel="stylesheet" href="bower_components/tablesorter/dist/css/theme.blue.min.css" />
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css" />
<link rel="stylesheet" href="bower_components/bootstrap3-dialog/dist/css/bootstrap-dialog.min.css" />
<link rel="stylesheet" href="bower_components/jasny-bootstrap/dist/css/jasny-bootstrap.css" />
<link rel="stylesheet" href="bower_components/smalot-bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" />
<!-- endbower -->
<link rel="stylesheet" type="text/css" href="css/ospos.css" />
<link rel="stylesheet" type="text/css" href="css/ospos_print.css" media="print" />
<?php if ($this->input->cookie('debug') == "true" || $this->input->get("debug") == "true") : ?>
<!-- bower:css -->
<link rel="stylesheet" href="bower_components/tablesorter/dist/css/theme.blue.min.css" />
<link rel="stylesheet" href="bower_components/bootstrap3-dialog/dist/css/bootstrap-dialog.min.css" />
<link rel="stylesheet" href="bower_components/jasny-bootstrap/dist/css/jasny-bootstrap.css" />
<link rel="stylesheet" href="bower_components/bootswatch-dist/css/bootstrap.css" />
<link rel="stylesheet" href="bower_components/smalot-bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" />
<!-- endbower -->
<!-- start css template tags -->
<link rel="stylesheet" type="text/css" href="css/autocomplete.css"/>
<link rel="stylesheet" type="text/css" href="css/barcode_font.css"/>
<link rel="stylesheet" type="text/css" href="css/general.css"/>
<link rel="stylesheet" type="text/css" href="css/invoice.css"/>
<link rel="stylesheet" type="text/css" href="css/invoice_email.css"/>
<link rel="stylesheet" type="text/css" href="css/login.css"/>
<link rel="stylesheet" type="text/css" href="css/ospos.css"/>
<link rel="stylesheet" type="text/css" href="css/ospos_print.css"/>
<link rel="stylesheet" type="text/css" href="css/popupbox.css"/>
<link rel="stylesheet" type="text/css" href="css/receipt.css"/>
<link rel="stylesheet" type="text/css" href="css/register.css"/>
<link rel="stylesheet" type="text/css" href="css/reports.css"/>
<link rel="stylesheet" type="text/css" href="css/tables.css"/>
<!-- end css template tags -->
<!-- bower:js -->
<script src="bower_components/jquery/dist/jquery.js"></script>
<script src="bower_components/jquery-bgiframe/jquery.bgiframe.js"></script>
@@ -42,8 +55,14 @@
<script type="text/javascript" src="js/phpjsdate.js" language="javascript"></script>
<!-- end js template tags -->
<?php else : ?>
<!--[if lte IE 8]>
<link rel="stylesheet" media="print" href="css/print.css" type="text/css" />
<![endif]-->
<!-- start mincss template tags -->
<link rel="stylesheet" type="text/css" href="dist/opensourcepos.min.css?rel=7c0e8d652d"/>
<!-- end mincss template tags -->
<!-- start minjs template tags -->
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=d794e57f0c" language="javascript"></script>
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=f57ef65f75" language="javascript"></script>
<!-- end minjs template tags -->
<?php endif; ?>
+1 -1
View File
@@ -32,7 +32,7 @@ if (isset($success))
}
echo anchor("sales/suspended/width:425", $this->lang->line('sales_suspended_sales'),
array('class'=>'btn btn-default btn-sm pull-right thickbox none', 'id'=>'show_suspended_sales_button', 'title'=>$this->lang->line('sales_suspended_sales')));
array('class'=>'btn btn-default btn-sm pull-right modal-dlg none', 'id'=>'show_suspended_sales_button', 'title'=>$this->lang->line('sales_suspended_sales')));
if ($this->Employee->has_grant('reports_sales', $this->session->userdata('person_id')))
{
+3 -3
View File
@@ -38,10 +38,10 @@
"smalot-bootstrap-datetimepicker": "^2.3.8"
},
"overrides": {
"bootstrap": {
"bootswatch-dist": {
"main": [
"dist/js/bootstrap.js",
"dist/css/bootstrap.css"
"js/bootstrap.js",
"css/bootstrap.css"
]
}
}
-2
View File
@@ -1,5 +1,3 @@
// Login page styling tuned for bootstrap
*
{
margin:0;
-9
View File
@@ -1,12 +1,3 @@
@import url(autocomplete.css);
@import url(general.css);
@import url(popupbox.css);
@import url(register.css);
@import url(receipt.css);
@import url(reports.css);
@import url(tables.css);
@import url(invoice.css);
html, body
{
height: 100%;
+52 -48
View File
@@ -1,59 +1,63 @@
#receipt_wrapper
{
/*background-color:#FFFFFF;*/
font-size:75%;
}
@media print {
.topbar
{
display:none;
}
#receipt_wrapper
{
/*background-color:#FFFFFF;*/
font-size:75%;
}
#menubar, #footer
{
display:none;
}
.topbar
{
display:none;
}
#sale_return_policy
{
width:100%;
text-align:center;
}
#menubar, #footer
{
display:none;
}
.short_name
{
display:inline;
}
#sale_return_policy
{
width:100%;
text-align:center;
}
#receipt_items td
{
white-space:nowrap;
}
.short_name
{
display:inline;
}
/* Hide links in table for printing */
table.innertable
{
display: table;
}
#receipt_items td
{
white-space:nowrap;
}
table.innertable a
{
color: #000000;
text-decoration: none;
}
/* Hide links in table for printing */
table.innertable
{
display: table;
}
table.report a.expand
{
visibility: hidden;
}
table.innertable a
{
color: #000000;
text-decoration: none;
}
table.report a
{
color: #000000;
text-decoration: none;
}
table.report a.expand
{
visibility: hidden;
}
table.report a
{
color: #000000;
text-decoration: none;
}
table.innertable thead
{
/*display:none;*/
}
table.innertable thead
{
/*display:none;*/
}
+23
View File
File diff suppressed because one or more lines are too long.
+1 -1
View File
File diff suppressed because one or more lines are too long.
+7659
View File
File diff suppressed because one or more lines are too long.
+1
View File
@@ -21,6 +21,7 @@
"grunt-bower-concat": "^1.0.0",
"grunt-cache-breaker": "^2.0.1",
"grunt-contrib-concat": "~0.5.1",
"grunt-contrib-cssmin": "^0.14.0",
"grunt-contrib-jshint": "~0.6.3",
"grunt-contrib-uglify": "~0.8.0",
"grunt-contrib-watch": "~0.5.3",
+1 -1
View File
@@ -38,7 +38,7 @@
<!-- end js template tags -->
<?php else : ?>
<!-- start minjs template tags -->
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=d794e57f0c" language="javascript"></script>
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=f57ef65f75" language="javascript"></script>
<!-- end minjs template tags -->
<?php endif; ?>