From: <dai...@us...> - 2013-07-20 00:32:16
|
Revision: 6115 http://sourceforge.net/p/web-erp/reponame/6115 Author: daintree Date: 2013-07-20 00:32:12 +0000 (Sat, 20 Jul 2013) Log Message: ----------- Tims javascript table sorting function Modified Paths: -------------- trunk/SelectProduct.php trunk/css/aguapop/default.css trunk/css/default/default.css trunk/css/fluid/default.css trunk/css/fresh/default.css trunk/css/gel/default.css trunk/css/professional/default.css trunk/css/professional-rtl/default.css trunk/css/silverwolf/default.css trunk/doc/Change.log trunk/javascripts/MiscFunctions.js Added Paths: ----------- trunk/css/aguapop/images/ascending.png trunk/css/aguapop/images/descending.png trunk/css/default/images/ascending.png trunk/css/default/images/descending.png trunk/css/fluid/images/ascending.png trunk/css/fluid/images/descending.png trunk/css/fresh/images/ascending.png trunk/css/fresh/images/descending.png trunk/css/gel/images/ascending.png trunk/css/gel/images/descending.png trunk/css/professional/images/ascending.png trunk/css/professional/images/descending.png trunk/css/professional-rtl/images/ascending.png trunk/css/professional-rtl/images/descending.png trunk/css/silverwolf/images/ascending.png trunk/css/silverwolf/images/descending.png trunk/css/wood/images/ascending.png trunk/css/wood/images/descending.png Modified: trunk/SelectProduct.php =================================================================== --- trunk/SelectProduct.php 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/SelectProduct.php 2013-07-20 00:32:12 UTC (rev 6115) @@ -765,8 +765,8 @@ echo '<table id="ItemSearchTable" class="selection">'; $TableHeader = '<tr> <th>' . _('Stock Status') . '</th> - <th class="sort-header" onclick="SortSelect(this)">' . _('Code') . '</th> - <th class="sort-header" onclick="SortSelect(this)">' . _('Description') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Code') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Description') . '</th> <th>' . _('Total Qty On Hand') . '</th> <th>' . _('Units') . '</th> </tr>'; @@ -803,11 +803,14 @@ <td>' . $myrow['units'] . '</td> <td><a target="_blank" href="' . $RootPath . '/StockStatus.php?StockID=' . $myrow['stockid'].'">' . _('View') . '</a></td> </tr>'; +/* $j++; + if ($j == 20 AND ($RowIndex + 1 != $_SESSION['DisplayRecordsMax'])) { $j = 1; echo $TableHeader; } + */ $RowIndex = $RowIndex + 1; //end of page full new headings if } Modified: trunk/css/aguapop/default.css =================================================================== --- trunk/css/aguapop/default.css 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/aguapop/default.css 2013-07-20 00:32:12 UTC (rev 6115) @@ -70,15 +70,24 @@ font-weight:normal; padding:3px; } + +th.ascending { + cursor: s-resize; + color:green; + background: url(images/ascending.png) center right no-repeat; +} + +th.descending { + cursor: n-resize; + color:blue; + background: url(images/descending.png) centre right no-repeat; +} th.number { text-align: right; font-weight: normal; background-color: skyblue; color: white; } -th.SortableColumn { - cursor: s-resize; -} td { font-family: Arial, Verdana, Helvetica, sans-serif; text-align: left; Added: trunk/css/aguapop/images/ascending.png =================================================================== (Binary files differ) Index: trunk/css/aguapop/images/ascending.png =================================================================== --- trunk/css/aguapop/images/ascending.png 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/aguapop/images/ascending.png 2013-07-20 00:32:12 UTC (rev 6115) Property changes on: trunk/css/aguapop/images/ascending.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/css/aguapop/images/descending.png =================================================================== (Binary files differ) Index: trunk/css/aguapop/images/descending.png =================================================================== --- trunk/css/aguapop/images/descending.png 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/aguapop/images/descending.png 2013-07-20 00:32:12 UTC (rev 6115) Property changes on: trunk/css/aguapop/images/descending.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: trunk/css/default/default.css =================================================================== --- trunk/css/default/default.css 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/default/default.css 2013-07-20 00:32:12 UTC (rev 6115) @@ -30,7 +30,7 @@ padding:5px; font-weight:bold; color:black; - TEXT-ALIGN:center; + text-align:center; } p.good{ font-weight:bold; @@ -54,35 +54,19 @@ background-color:#B06161; color:white; } -th.sort-header { + +th.ascending { cursor: s-resize; + color:#B06161; + background: url(images/ascending.png) center right no-repeat; } -th.sort-header::-moz-selection, -th.sort-header::selection { - background:transparent; - } -table th.sort-header:after { - content:''; - float:right; - margin-top:7px; - border-width:0 4px 4px; - border-style:solid; - border-color:#404040 transparent; - visibility:hidden; - } -table th.sort-header:hover:after { - visibility:visible; - } -table th.sort-up:after, -table th.sort-down:after, -table th.sort-down:hover:after { - visibility:visible; - opacity:0.4; - } -table th.sort-up:after { - border-bottom:none; - border-width:4px 4px 0; + +th.descending { + cursor: n-resize; + color:#B06161; + background: url(images/descending.png) centre right no-repeat; } + th.number{ text-align:right; font-weight:normal; @@ -133,9 +117,9 @@ background-color:#EEEEEE; } div.error{ -background-color:#fddbdb; -color:red; -border:1px solid red; + background-color:#fddbdb; + color:red; + border:1px solid red; } div.warn{ background-color:#f5dbfd; Added: trunk/css/default/images/ascending.png =================================================================== (Binary files differ) Index: trunk/css/default/images/ascending.png =================================================================== --- trunk/css/default/images/ascending.png 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/default/images/ascending.png 2013-07-20 00:32:12 UTC (rev 6115) Property changes on: trunk/css/default/images/ascending.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/css/default/images/descending.png =================================================================== (Binary files differ) Index: trunk/css/default/images/descending.png =================================================================== --- trunk/css/default/images/descending.png 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/default/images/descending.png 2013-07-20 00:32:12 UTC (rev 6115) Property changes on: trunk/css/default/images/descending.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: trunk/css/fluid/default.css =================================================================== --- trunk/css/fluid/default.css 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/fluid/default.css 2013-07-20 00:32:12 UTC (rev 6115) @@ -56,9 +56,16 @@ color:#330000; text-align:right; } -th.SortableColumn { - cursor: s-resize; + +th.ascending { + cursor: s-resize; + background: url(images/ascending.png) center right no-repeat; } + +th.descending { + cursor: n-resize; + background: url(images/descending.png) centre right no-repeat; +} td{ font-family:Arial, Verdana, Helvetica; text-align:left; Added: trunk/css/fluid/images/ascending.png =================================================================== (Binary files differ) Index: trunk/css/fluid/images/ascending.png =================================================================== --- trunk/css/fluid/images/ascending.png 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/fluid/images/ascending.png 2013-07-20 00:32:12 UTC (rev 6115) Property changes on: trunk/css/fluid/images/ascending.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/css/fluid/images/descending.png =================================================================== (Binary files differ) Index: trunk/css/fluid/images/descending.png =================================================================== --- trunk/css/fluid/images/descending.png 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/fluid/images/descending.png 2013-07-20 00:32:12 UTC (rev 6115) Property changes on: trunk/css/fluid/images/descending.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: trunk/css/fresh/default.css =================================================================== --- trunk/css/fresh/default.css 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/fresh/default.css 2013-07-20 00:32:12 UTC (rev 6115) @@ -75,9 +75,14 @@ background-color: #800000; color: white; } -th.SortableColumn { - cursor: s-resize; +th.ascending { + cursor: s-resize; + background: url(images/ascending.png) center right no-repeat; } +th.descending { + cursor: n-resize; + background: url(images/descending.png) centre right no-repeat; +} td { text-align: left; } Added: trunk/css/fresh/images/ascending.png =================================================================== (Binary files differ) Index: trunk/css/fresh/images/ascending.png =================================================================== --- trunk/css/fresh/images/ascending.png 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/fresh/images/ascending.png 2013-07-20 00:32:12 UTC (rev 6115) Property changes on: trunk/css/fresh/images/ascending.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/css/fresh/images/descending.png =================================================================== (Binary files differ) Index: trunk/css/fresh/images/descending.png =================================================================== --- trunk/css/fresh/images/descending.png 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/fresh/images/descending.png 2013-07-20 00:32:12 UTC (rev 6115) Property changes on: trunk/css/fresh/images/descending.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: trunk/css/gel/default.css =================================================================== --- trunk/css/gel/default.css 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/gel/default.css 2013-07-20 00:32:12 UTC (rev 6115) @@ -74,9 +74,17 @@ background-color: #ccc; color: #330000; } -th.SortableColumn { - cursor: s-resize; +th.ascending { + cursor: s-resize; + color:green; + background: url(images/ascending.png) center right no-repeat; } + +th.descending { + cursor: n-resize; + color:blue; + background: url(images/descending.png) centre right no-repeat; +} td { font-family: Arial, Verdana, Helvetica, sans-serif; text-align: left; Added: trunk/css/gel/images/ascending.png =================================================================== (Binary files differ) Index: trunk/css/gel/images/ascending.png =================================================================== --- trunk/css/gel/images/ascending.png 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/gel/images/ascending.png 2013-07-20 00:32:12 UTC (rev 6115) Property changes on: trunk/css/gel/images/ascending.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/css/gel/images/descending.png =================================================================== (Binary files differ) Index: trunk/css/gel/images/descending.png =================================================================== --- trunk/css/gel/images/descending.png 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/gel/images/descending.png 2013-07-20 00:32:12 UTC (rev 6115) Property changes on: trunk/css/gel/images/descending.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: trunk/css/professional/default.css =================================================================== --- trunk/css/professional/default.css 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/professional/default.css 2013-07-20 00:32:12 UTC (rev 6115) @@ -94,15 +94,20 @@ color: #330000; text-align: center; } +th.ascending { + cursor: s-resize; + background: url(images/ascending.png) center right no-repeat; +} +th.descending { + cursor: n-resize; + background: url(images/descending.png) centre right no-repeat; +} th.number { font-weight: normal; background-color: #cccce5; color: #330000; text-align: right; } -th.SortableColumn { - cursor: s-resize; -} div.error { background-color:#fddbdb; color: red; Added: trunk/css/professional/images/ascending.png =================================================================== (Binary files differ) Index: trunk/css/professional/images/ascending.png =================================================================== --- trunk/css/professional/images/ascending.png 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/professional/images/ascending.png 2013-07-20 00:32:12 UTC (rev 6115) Property changes on: trunk/css/professional/images/ascending.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/css/professional/images/descending.png =================================================================== (Binary files differ) Index: trunk/css/professional/images/descending.png =================================================================== --- trunk/css/professional/images/descending.png 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/professional/images/descending.png 2013-07-20 00:32:12 UTC (rev 6115) Property changes on: trunk/css/professional/images/descending.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: trunk/css/professional-rtl/default.css =================================================================== --- trunk/css/professional-rtl/default.css 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/professional-rtl/default.css 2013-07-20 00:32:12 UTC (rev 6115) @@ -84,7 +84,6 @@ td.number { text-align: right; } - .EvenTableRows { background-color: #CCCCCC; } @@ -106,9 +105,14 @@ color: #330000; text-align: right; } -th.SortableColumn { - cursor: s-resize; +th.ascending { + cursor: s-resize; + background: url(images/ascending.png) center right no-repeat; } +th.descending { + cursor: n-resize; + background: url(images/descending.png) centre right no-repeat; +} div.error { background-color:#fddbdb; color: red; Added: trunk/css/professional-rtl/images/ascending.png =================================================================== (Binary files differ) Index: trunk/css/professional-rtl/images/ascending.png =================================================================== --- trunk/css/professional-rtl/images/ascending.png 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/professional-rtl/images/ascending.png 2013-07-20 00:32:12 UTC (rev 6115) Property changes on: trunk/css/professional-rtl/images/ascending.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/css/professional-rtl/images/descending.png =================================================================== (Binary files differ) Index: trunk/css/professional-rtl/images/descending.png =================================================================== --- trunk/css/professional-rtl/images/descending.png 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/professional-rtl/images/descending.png 2013-07-20 00:32:12 UTC (rev 6115) Property changes on: trunk/css/professional-rtl/images/descending.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: trunk/css/silverwolf/default.css =================================================================== --- trunk/css/silverwolf/default.css 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/silverwolf/default.css 2013-07-20 00:32:12 UTC (rev 6115) @@ -76,9 +76,15 @@ text-align:right; vertical-align:middle; } -th.SortableColumn { - cursor: s-resize; +th.ascending { + cursor: s-resize; + background: url(images/ascending.png) center right no-repeat; } + +th.descending { + cursor: n-resize; + background: url(images/descending.png) centre right no-repeat; +} td{ font-family:Arial, Verdana, Helvetica, sans-serif; font-size:100%; Added: trunk/css/silverwolf/images/ascending.png =================================================================== (Binary files differ) Index: trunk/css/silverwolf/images/ascending.png =================================================================== --- trunk/css/silverwolf/images/ascending.png 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/silverwolf/images/ascending.png 2013-07-20 00:32:12 UTC (rev 6115) Property changes on: trunk/css/silverwolf/images/ascending.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/css/silverwolf/images/descending.png =================================================================== (Binary files differ) Index: trunk/css/silverwolf/images/descending.png =================================================================== --- trunk/css/silverwolf/images/descending.png 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/silverwolf/images/descending.png 2013-07-20 00:32:12 UTC (rev 6115) Property changes on: trunk/css/silverwolf/images/descending.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/css/wood/images/ascending.png =================================================================== (Binary files differ) Index: trunk/css/wood/images/ascending.png =================================================================== --- trunk/css/wood/images/ascending.png 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/wood/images/ascending.png 2013-07-20 00:32:12 UTC (rev 6115) Property changes on: trunk/css/wood/images/ascending.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/css/wood/images/descending.png =================================================================== (Binary files differ) Index: trunk/css/wood/images/descending.png =================================================================== --- trunk/css/wood/images/descending.png 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/wood/images/descending.png 2013-07-20 00:32:12 UTC (rev 6115) Property changes on: trunk/css/wood/images/descending.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/doc/Change.log 2013-07-20 00:32:12 UTC (rev 6115) @@ -1,18 +1,21 @@ webERP Change Log -19/7/2013 Exson: add required to the input field of WWW_Access.php -7/19/2013: Exson make the WWW_Access.php html5 compatible -7/18/2013: Exson: Move the hidden input after the html document type definition. Reported by Tim. -07/18/2013 Exson: fixed the LanguageSetup.php extra language mark introduced by handle locale number. Reported by Tim. -07/18/2013: Exson: Fixed the missing negative mark problem reported by Tim. -07/18/2013: Exson add a locale style check to pass the style to MisFunctions.js to do locale number format validation in LanguageSetup.php. -07/18/2013 Exson: modify the MisFunctions.js to improve the locale number validation feature. -17/7/2013 icedlava: stripslashes on Description for consistency with LongDescription but why- only until we fix source of this problem in the code -17/7/2013 icedlava: add checkbox option in UI to clear item image -17/7/2013 Exson: Add space bar as a accepted charcode for number input in MiscFunctions.js -16/7/2013 icedlava: Add date check on purchase price effective date. -16/7/2013 icedlava: AllowCompanySelectionBox comparison fix to allow boolean value to evaluate correctly -14/7/2013 Exson: Add new directory for new installer and add those default installation sql file. -14/7/2013 Exson: Rewrite the installer by removing the save.php file and revise the index.php file. + +20/7/13 Phil: Added Tim's javascript as modified a bit to use different styles to allow sorting of tables - images for styles to all themes and added th.ascending th.descending to theme/default.css scripts +19/7/13 Phil: Swag of scripts updated for html5 <input type="tel" "email" pattern required="required" autofocus="autofocus" as per http://www.weberp.org/wiki/TransitionToHtml5 also added many title="" tooltips +19/7/13 Exson: add required to the input field of WWW_Access.php +19/7/13: Exson make the WWW_Access.php html5 compatible +18/7/13: Exson: Move the hidden input after the html document type definition. Reported by Tim. +18/7/13 Exson: fixed the LanguageSetup.php extra language mark introduced by handle locale number. Reported by Tim. +18/7/13: Exson: Fixed the missing negative mark problem reported by Tim. +18/7/13: Exson add a locale style check to pass the style to MisFunctions.js to do locale number format validation in LanguageSetup.php. +18/7/13 Exson: modify the MisFunctions.js to improve the locale number validation feature. +17/7/13 icedlava: stripslashes on Description for consistency with LongDescription but why- only until we fix source of this problem in the code +17/7/13 icedlava: add checkbox option in UI to clear item image +17/7/13 Exson: Add space bar as a accepted charcode for number input in MiscFunctions.js +16/7/13 icedlava: Add date check on purchase price effective date. +16/7/13 icedlava: AllowCompanySelectionBox comparison fix to allow boolean value to evaluate correctly +14/7/13 Exson: Add new directory for new installer and add those default installation sql file. +14/7/13 Exson: Rewrite the installer by removing the save.php file and revise the index.php file. 24/6/13 Phil: webSHOP ShopParameters.php script and new configuration variables to allow integrated shop 21/6/13 Phil: ContractCosting.php fix references to contract issues object which should just have been an array. 18/6/13 Phil: Reworked the display of stock category properties on the SelectProduct.php inquiry Modified: trunk/javascripts/MiscFunctions.js =================================================================== --- trunk/javascripts/MiscFunctions.js 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/javascripts/MiscFunctions.js 2013-07-20 00:32:12 UTC (rev 6115) @@ -259,13 +259,12 @@ for (var j = 0, col; col = row.cells[j]; j++) { if (row.cells[j].innerHTML==columnText) { columnNumber=j; - s=getComputedStyle(row.cells[j], null); - if (s.cursor=="s-resize") { - row.cells[j].style.cursor="n-resize"; + if (selElem.className=="ascending") { + selElem.className='descending'; direction="a"; } else { - row.cells[j].style.cursor="s-resize"; - direction="d"; + selElem.className='ascending'; + direction="a"; } } } |