diff --git a/debian/changelog b/debian/changelog index 43277e68..fb06bb26 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -hedera-web (1.239-deb8) stable; urgency=low +hedera-web (1.240-deb8) stable; urgency=low * Initial Release. diff --git a/web/forms/admin/shelves/shelves.js b/web/forms/admin/shelves/shelves.js index f048b626..99a42498 100755 --- a/web/forms/admin/shelves/shelves.js +++ b/web/forms/admin/shelves/shelves.js @@ -78,7 +78,7 @@ Vn.ShelvesReport = new Class res.next (); var maxWidth = 170; - var maxHeight = 230; + var maxHeight = 200; var scale = maxWidth / res.get ('width'); @@ -112,7 +112,8 @@ Vn.ShelvesReport = new Class if (!this.maxAmount || res.get ('etiquetas') <= this.maxAmount) { items.push ({ - name: res.get ('Article') + id: res.get ('Id_Article') + ,name: res.get ('Article') ,packing: res.get ('packing') ,boxHeight: res.get ('z') * 10 * scale ,boxWidth: res.get ('x') * 10 * scale @@ -123,7 +124,8 @@ Vn.ShelvesReport = new Class else { remainings.push ({ - name: res.get ('Article') + id: res.get ('Id_Article') + ,name: res.get ('Article') ,packing: res.get ('packing') ,amount: res.get ('etiquetas') }); @@ -160,9 +162,14 @@ Vn.ShelvesReport = new Class this.doc.body.appendChild (sheet); var title = this.doc.createElement ('h1'); - title.appendChild (this.doc.createTextNode (this.title +' - ')); - title.appendChild (this.doc.createTextNode (_('Pallets'))); + title.className = 'title'; + title.appendChild (this.doc.createTextNode (this.title)); sheet.appendChild (title); + + var subtitle = this.doc.createElement ('h2'); + subtitle.className = 'subtitle'; + subtitle.appendChild (this.doc.createTextNode (_('Pallets'))); + sheet.appendChild (subtitle); var ul = this.doc.createElement ('ul'); sheet.appendChild (ul); @@ -171,6 +178,11 @@ Vn.ShelvesReport = new Class { var li = this.doc.createElement ('li'); ul.appendChild (li); + + var span = this.doc.createElement ('span'); + span.className = 'item-id'; + span.appendChild (this.doc.createTextNode (remainings[i].id.toLocaleString ())); + li.appendChild (span); var span = this.doc.createElement ('span'); span.className = 'item'; @@ -192,7 +204,7 @@ Vn.ShelvesReport = new Class alloc.run (); } - ,drawShelf: function (allocator) + ,drawShelf: function (allocator, item) { var shelf = this.shelf; @@ -202,15 +214,20 @@ Vn.ShelvesReport = new Class // Draws the title + var pageNumber = this.doc.createElement ('h1'); + pageNumber.className = 'page-number'; + pageNumber.appendChild (this.doc.createTextNode (allocator.currentShelf + 1)); + sheet.appendChild (pageNumber); + var title = this.doc.createElement ('h1'); title.className = 'title'; title.appendChild (this.doc.createTextNode (this.title)); sheet.appendChild (title); - var pageNumber = this.doc.createElement ('h1'); - pageNumber.className = 'page-number'; - pageNumber.appendChild (this.doc.createTextNode (allocator.currentShelf + 1)); - sheet.appendChild (pageNumber); + var subtitle = this.doc.createElement ('h2'); + subtitle.className = 'subtitle'; + subtitle.appendChild (this.doc.createTextNode (item.id.toLocaleString ())); + sheet.appendChild (subtitle); // Draws the shelf @@ -283,15 +300,15 @@ Vn.ShelvesReport = new Class var boxLabel = this.doc.createElement ('div'); boxLabel.className = 'box-label'; - if (this.showPacking) +/* if (this.showPacking) { var packing = this.doc.createElement ('span'); packing.className = 'packing'; packing.appendChild (this.doc.createTextNode (item.packing)); boxLabel.appendChild (packing); } - - boxLabel.appendChild (this.doc.createTextNode (item.name)); +*/ + boxLabel.appendChild (this.doc.createTextNode (item.id.toLocaleString () /* item.name */)); box.appendChild (boxLabel); } } @@ -299,20 +316,20 @@ Vn.ShelvesReport = new Class Vn.Allocator = new Class ({ - addShelf: function () + addShelf: function (item) { this.currentShelf++; this.firstShelfBox = true; if (this.shelfFunc) - this.shelfFunc (this); + this.shelfFunc (this, item); } - ,addTray: function () + ,addTray: function (item) { if (this.currentTray <= 0) { - this.addShelf (); + this.addShelf (item); this.currentTray = this.nTrays - 1; } else @@ -321,17 +338,17 @@ Vn.Allocator = new Class this.trayX = 0; } - ,addColumn: function (width) + ,addColumn: function (item) { - if (this.trayX + this.columnWidth + width > this.width + if (this.trayX + this.columnWidth + item.boxWidth > this.width || this.currentTray == -1) - this.addTray (); + this.addTray (item); else this.trayX += this.columnWidth; this.trayY = 0; - this.columnWidth = width; - this.lastBoxWidth = width; + this.columnWidth = item.boxWidth; + this.lastBoxWidth = item.boxWidth; } ,addBox: function (item, amount) @@ -344,7 +361,7 @@ Vn.Allocator = new Class if (this.trayY + item.boxHeight > trayHeight || item.boxWidth > this.lastBoxWidth || (!this.stack && amount == 0)) - this.addColumn (item.boxWidth); + this.addColumn (item); if (this.boxFunc) this.boxFunc (this, item, amount); diff --git a/web/reports/shelves/style.css b/web/reports/shelves/style.css index 626314de..0b331b89 100644 --- a/web/reports/shelves/style.css +++ b/web/reports/shelves/style.css @@ -4,12 +4,18 @@ h1 { font-weight: normal; - font-size: 15mm; + font-size: 600%; margin: 0; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; } -h1.title +h2.subtitle { - float: left; + margin: 3mm 0; + font-size: 500%; + font-weight: normal; + color: #333; } h1.page-number { @@ -20,7 +26,8 @@ h1.page-number { position: relative; margin: 0 auto; - padding-top: 40mm; + top: 50%; + margin-top: -120mm; } .edge, .tray @@ -42,19 +49,19 @@ h1.page-number } .box .box-label { - text-align: left; + text-align: right; font-size: 55%; word-wrap: break-word; box-sizing: border-box; - padding: 4%; + padding: 3%; } -.box .packing +/*.box .packing { - margin-left: 4%; + margin-left: 3%; display: block; float: right; font-size: 140%; -} +}*/ .color0 { background-color: #FDD !important; @@ -88,13 +95,20 @@ ul } li * { - font-size: 6mm; - line-height: 12mm; + font-size: 200%; + line-height: 200%; +} +.item-id +{ + display: inline-block; + text-align: right; + margin: 0 5mm; + width: 30mm; } .item { display: inline-block; - width: 100mm; + width: 80mm; } .amount {