revert a change affecting order or js when running grunt

This commit is contained in:
FrancescoUK
2016-04-13 18:34:06 +01:00
parent 61a50577fa
commit fa084ec8d2
5 changed files with 96 additions and 96 deletions

View File

@@ -61,7 +61,7 @@ module.exports = function(grunt) {
separator: ';'
},
files: {
'dist/<%= pkg.name %>.js': ['tmp/opensourcepos_bower.js', 'js/*.js']
'dist/<%= pkg.name %>.js': ['tmp/opensourcepos_bower.js', 'js/jquery*', 'js/*.js']
}
},
sql: {
@@ -85,7 +85,7 @@ module.exports = function(grunt) {
}
},
jshint: {
files: [ 'Gruntfile.js', 'js/*.js' ],
files: ['Gruntfile.js', 'js/*.js'],
options: {
// options here to override JSHint defaults
globals: {
@@ -104,7 +104,7 @@ module.exports = function(grunt) {
closeTag: '<!-- end css template tags -->',
absolutePath: true
},
src: [ 'css/*.css', '!css/login.css', '!css/invoice_email.css' ],
src: ['css/*.css', '!css/login.css', '!css/invoice_email.css'],
dest: 'application/views/partial/header.php',
dest: 'templates/spacelab/views/partial/header.php'
},
@@ -115,7 +115,7 @@ module.exports = function(grunt) {
closeTag: '<!-- end mincss template tags -->',
absolutePath: true
},
src: [ 'dist/*.css' ],
src: ['dist/*.css'],
dest: 'application/views/partial/header.php',
},
mincss_header_templates: {
@@ -125,7 +125,7 @@ module.exports = function(grunt) {
closeTag: '<!-- end mincss template tags -->',
absolutePath: true
},
src: [ 'dist/*.css', '!dist/bootstrap.min.css' ],
src: ['dist/*.css', '!dist/bootstrap.min.css'],
dest: 'templates/spacelab/views/partial/header.php'
},
css_login: {
@@ -135,7 +135,7 @@ module.exports = function(grunt) {
closeTag: '<!-- end css template tags -->',
absolutePath: true
},
src: [ 'dist/bootstrap.min.css', 'css/login.css' ],
src: ['dist/bootstrap.min.css', 'css/login.css'],
dest: 'application/views/login.php'
},
js: {
@@ -145,7 +145,7 @@ module.exports = function(grunt) {
closeTag: '<!-- end js template tags -->',
absolutePath: true
},
src: [ 'js/*.js' ],
src: ['js/jquery*', 'js/*.js'],
dest: 'application/views/partial/header.php',
dest: 'templates/spacelab/views/partial/header.php'
},
@@ -156,7 +156,7 @@ module.exports = function(grunt) {
closeTag: '<!-- end minjs template tags -->',
absolutePath: true
},
src: [ 'dist/*min.js' ],
src: ['dist/*min.js'],
dest: 'application/views/partial/header.php',
dest: 'templates/spacelab/views/partial/header.php'
}
@@ -188,7 +188,7 @@ module.exports = function(grunt) {
replacement: 'md5'
},
files: {
src: [ '**/header.php', '**/login.php' ]
src: ['**/header.php', '**/login.php']
}
}
}

View File

@@ -64,7 +64,7 @@
<link rel="stylesheet" type="text/css" href="dist/opensourcepos.min.css?rel=6ad34bf178"/>
<!-- end mincss template tags -->
<!-- start minjs template tags -->
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=593270d361" language="javascript"></script>
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=3d8bf015a8" language="javascript"></script>
<!-- end minjs template tags -->
<?php endif; ?>

164
dist/opensourcepos.js vendored
View File

@@ -49732,6 +49732,87 @@ if(ac){if(/\?/.test(ac)){ac=ac.split("?")[1]}if(ad==null){return N(ac)}var ab=ac
return $.tablesorter;
}));
;/*
*
* StaticRow widget for jQuery TableSorter 2.0
* Version 1.0
*
* Copyright (c) 2011 Nils Luxton
* Licensed under the MIT license:
* http://www.opensource.org/licenses/mit-license.php
*
*/
$.tablesorter.addWidget({
// Give the new Widget an ID to be used in the tablesorter() call, as follows:
// $('#myElement').tablesorter({ widgets: ['zebra','staticRow'] });
id: 'staticRow',
// "Format" is run on all widgets once when the tablesorter has finished initialising,
// and then again every time a sort has finished.
format: function(table) {
// Use a property of the function to determine
// whether this is the first run of "Format"
// (i.e. is this the table's default starting position,
// or has it been sorted?)
if (typeof $(table).data('hasSorted') == 'undefined')
{
$(table).data('hasSorted', true); // This will force us into the "else" block the next time "Format" is run
// "Index" the static rows, saving their current (starting)
// position in the table inside a data() param on the
// <tr> element itself for later use.
$('tbody .static', table).each(function() {
$(this).data('tableindex', $(this).index());
});
}
else
{
// Loop the static rows, moving them to their
// original "indexed" position, and keep doing
// this until no more re-shuffling needs doing
var hasShuffled = true;
while (hasShuffled)
{
hasShuffled = false;
$('tbody .static', table).each(function() {
var targetIndex = $(this).data('tableindex');
if (targetIndex != $(this).index())
{
hasShuffled = true;
var thisRow = $(this).detach();
var numRows = $('tbody tr', table).length;
// Are we trying to be the last row?
if (targetIndex >= numRows)
{
thisRow.appendTo($('tbody', table));
}
// Are we trying to be the first row?
else if (targetIndex == 0)
{
thisRow.prependTo($('tbody', table));
}
// No, we want to be somewhere in the middle!
else
{
thisRow.insertBefore($('tbody tr:eq(' + targetIndex + ')', table));
}
}
});
}
}
$('tbody .static-last', table).each(function() {
var row = $(this).detach();
row.appendTo($('tbody', table));
});
}
});
;function set_feedback(text, classname, keep_displayed)
{
if(text)
@@ -49860,88 +49941,7 @@ return $.tablesorter;
};
})(jQuery);;/*
*
* StaticRow widget for jQuery TableSorter 2.0
* Version 1.0
*
* Copyright (c) 2011 Nils Luxton
* Licensed under the MIT license:
* http://www.opensource.org/licenses/mit-license.php
*
*/
$.tablesorter.addWidget({
// Give the new Widget an ID to be used in the tablesorter() call, as follows:
// $('#myElement').tablesorter({ widgets: ['zebra','staticRow'] });
id: 'staticRow',
// "Format" is run on all widgets once when the tablesorter has finished initialising,
// and then again every time a sort has finished.
format: function(table) {
// Use a property of the function to determine
// whether this is the first run of "Format"
// (i.e. is this the table's default starting position,
// or has it been sorted?)
if (typeof $(table).data('hasSorted') == 'undefined')
{
$(table).data('hasSorted', true); // This will force us into the "else" block the next time "Format" is run
// "Index" the static rows, saving their current (starting)
// position in the table inside a data() param on the
// <tr> element itself for later use.
$('tbody .static', table).each(function() {
$(this).data('tableindex', $(this).index());
});
}
else
{
// Loop the static rows, moving them to their
// original "indexed" position, and keep doing
// this until no more re-shuffling needs doing
var hasShuffled = true;
while (hasShuffled)
{
hasShuffled = false;
$('tbody .static', table).each(function() {
var targetIndex = $(this).data('tableindex');
if (targetIndex != $(this).index())
{
hasShuffled = true;
var thisRow = $(this).detach();
var numRows = $('tbody tr', table).length;
// Are we trying to be the last row?
if (targetIndex >= numRows)
{
thisRow.appendTo($('tbody', table));
}
// Are we trying to be the first row?
else if (targetIndex == 0)
{
thisRow.prependTo($('tbody', table));
}
// No, we want to be somewhere in the middle!
else
{
thisRow.insertBefore($('tbody tr:eq(' + targetIndex + ')', table));
}
}
});
}
}
$('tbody .static-last', table).each(function() {
var row = $(this).detach();
row.appendTo($('tbody', table));
});
}
});
;function checkbox_click(event)
})(jQuery);;function checkbox_click(event)
{
event.stopPropagation();
do_email(enable_email.url);

View File

File diff suppressed because one or more lines are too long

View File

@@ -47,9 +47,9 @@
<script src="bower_components/bootstrap-daterangepicker/daterangepicker.js"></script>
<!-- endbower -->
<!-- start js template tags -->
<script type="text/javascript" src="js/jquery.tablesorter.staticrow.js" language="javascript"></script>
<script type="text/javascript" src="js/common.js" language="javascript"></script>
<script type="text/javascript" src="js/imgpreview.full.jquery.js" language="javascript"></script>
<script type="text/javascript" src="js/jquery.tablesorter.staticrow.js" language="javascript"></script>
<script type="text/javascript" src="js/manage_tables.js" language="javascript"></script>
<script type="text/javascript" src="js/nominatim.autocomplete.js" language="javascript"></script>
<script type="text/javascript" src="js/phpjsdate.js" language="javascript"></script>
@@ -65,7 +65,7 @@
<!-- end mincss template tags -->
<link rel="stylesheet" type="text/css" href="templates/spacelab/css/style.css"/>
<!-- start minjs template tags -->
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=593270d361" language="javascript"></script>
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=3d8bf015a8" language="javascript"></script>
<!-- end minjs template tags -->
<?php endif; ?>