Collapse rows in detailed report after delete (#507, #293)

Hide columns without title in takings print view (#507)
Execute grunt after running bower uninstall
Try to fix integration tests
This commit is contained in:
jekkos
2016-05-12 18:02:26 +02:00
parent 5312dba499
commit 2a858b3f23
13 changed files with 30 additions and 17 deletions

View File

@@ -1,5 +1,6 @@
{
"scripts": {
"postinstall": "grunt"
"postinstall": "grunt",
"postuninstall": "grunt"
}
}

View File

@@ -194,6 +194,7 @@ module.exports = function(grunt) {
});
require('load-grunt-tasks')(grunt);
grunt.loadNpmTasks('grunt-mocha-webdriver');
grunt.registerTask('default', ['wiredep', 'bower_concat', 'bowercopy', 'concat', 'uglify', 'cssmin', 'tags', 'cachebreaker']);

View File

@@ -133,7 +133,7 @@ function transform_headers($array)
$element['sortable'] : current($element) != '',
'checkbox' => isset($element['checkbox']) ?
$element['checkbox'] : FALSE,
'class' => isset($element['checkbox']) || current($element) == '' ?
'class' => isset($element['checkbox']) || preg_match('(^$|&nbsp)', current($element)) ?
'print_hide' : '');
}
return json_encode($result);

View File

@@ -61,10 +61,10 @@
<!-- start mincss template tags -->
<link rel="stylesheet" type="text/css" href="dist/bootstrap.min.css?rel=9ed20b1ee8"/>
<link rel="stylesheet" type="text/css" href="dist/jquery-ui.css"/>
<link rel="stylesheet" type="text/css" href="dist/opensourcepos.min.css?rel=d260cbcc2a"/>
<link rel="stylesheet" type="text/css" href="dist/opensourcepos.min.css?rel=c264ea5ebc"/>
<!-- end mincss template tags -->
<!-- start minjs template tags -->
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=faf76c76c4" language="javascript"></script>
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=fcdf6cabb2" language="javascript"></script>
<!-- end minjs template tags -->
<?php endif; ?>

View File

@@ -74,4 +74,14 @@
{
display:none !important;
}
.fixed-table-container
{
border: none;
}
.fixed-table-container thead th .sortable
{
padding-right: 10px;
}
}

View File

@@ -44340,10 +44340,10 @@ THE SOFTWARE.*/
field: 'id',
values: selected_ids()
});
enable_actions();
$(this).remove();
$(this).siblings(".detail-view").remove();
});
enable_actions();
table().collapseAllRows();
$(this).remove();
});
set_feedback(response.message, 'alert alert-dismissible alert-success', false);
} else {

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

@@ -161,7 +161,8 @@
});
});
enable_actions();
$(this).remove().siblings(".detail-view").remove();
table().collapseAllRows();
$(this).remove();
});
set_feedback(response.message, 'alert alert-dismissible alert-success', false);
} else {

View File

@@ -61,11 +61,11 @@
<link rel="stylesheet" type="text/css" href="templates/spacelab/css/bootstrap.min.css?rel=9ed20b1ee8"/>
<!-- start mincss template tags -->
<link rel="stylesheet" type="text/css" href="dist/jquery-ui.css"/>
<link rel="stylesheet" type="text/css" href="dist/opensourcepos.min.css?rel=d260cbcc2a"/>
<link rel="stylesheet" type="text/css" href="dist/opensourcepos.min.css?rel=c264ea5ebc"/>
<!-- 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=faf76c76c4" language="javascript"></script>
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=fcdf6cabb2" language="javascript"></script>
<!-- end minjs template tags -->
<?php endif; ?>

View File

@@ -9,11 +9,11 @@ describe("giftcard numbering test", function () {
});
it.skip("issue #65: giftcard numbering should add properly", function(done) {
return this.browser.get(ospos.url("/index.php/giftcards")).waitForElementByCss(".big_button").click()
return this.browser.get(ospos.url("/index.php/giftcards")).waitForElementByCss(".modal-dlg").click()
.waitForElementByName("value", 10000).type("100").elementById('giftcard_number').clear().type("10")
.elementById("submit").click().waitForElementByXPath("//table/tbody/tr[td/text()='10']/td[4]", 2000).text().then(function (value) {
assert.ok(value, "giftcard failed to be added properly!");
}).elementByCss(".big_button").click().waitForElementByName("value", 4000).type("100").elementById("submit").click()
}).elementByCss(".modal-dlg").click().waitForElementByName("value", 4000).type("100").elementById("submit").click()
.waitForElementByXPath("//table/tbody/tr[td/text()='11']/td[4]").text().then(function (value) {
assert.equal(value, "11", "giftcard number not incrementing properly!!");
}).then(done, done);

View File

@@ -15,7 +15,7 @@ describe("create item and make sale", function () {
it("should be able to make sale", function(done) {
return this.browser.get(ospos.url("/index.php/sales"))
.elementById("item", def_timeout).type("1\r\n")
.waitForElementByName("quantity", def_timeout).clear().type("2").elementByName("discount", def_timeout).type(item.cost_price).elementByName("edit_item").click()
.waitForElementByName("quantity", def_timeout).clear().type("2").elementByName("discount", def_timeout).type(item.cost_price).waitForElementByCss(".glyphicon.glyphicon-refresh").click()
.elementById("add_payment_button", def_timeout).click().elementByCssSelector("tbody#payment_contents tr td:last-child", def_timeout).text().then(function(value) {
assert.equal(value, "$43.56", "price " + value + " in sale register is not correct!!");
}).elementById("finish_sale_button", def_timeout).submit().elementByCssSelector("#receipt_items tbody tr:nth-child(7) td:last-child", def_timeout).text().then(function(value) {

View File

@@ -19,7 +19,7 @@ describe("test receiving quantity", function() {
it("should be able to receive quantities with multiplier", function(done) {
this.browser.get(ospos.url('/index.php/receivings')).elementById("item").type(item.name)
.waitForElementByCssSelector(".ac_even", def_timeout).click().waitForElementByName("quantity", def_timeout)
.waitForElementByCssSelector(".ui-menu-item", def_timeout).click().waitForElementByName("quantity", def_timeout)
.elementByCssSelector("#cart_contents tr td:nth-child(5)").text().then(function(value) {
assert(value, "x " + item.receiving_quantity, "receiving quantity " + item.receiving_quantity + " is not displayed correctly in receivings module!");
}).elementById("finish_receiving_button", def_timeout).submit()