dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #09648
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2598: Reverted r 2500, jquery period parser, not working
------------------------------------------------------------
revno: 2598
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2011-01-17 15:26:28 +0100
message:
Reverted r 2500, jquery period parser, not working
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.ext.js
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js 2011-01-12 08:57:11 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js 2011-01-17 14:26:28 +0000
@@ -914,7 +914,7 @@
{
if(sortList==undefined) sortList = [[0,0]];
- jQuery("#" + tableId ).tablesorter({dateFormat:dateFormat});
+ jQuery("#" + tableId ).tablesorter();
if($("#" + tableId ).find("tbody").children().size() > 0 )
{
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.ext.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.ext.js 2011-01-10 06:17:21 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.ext.js 2011-01-17 14:26:28 +0000
@@ -2,25 +2,4 @@
postJSON: function( url, data, callback ) {
return jQuery.post(url, data, callback, "json");
}
-});
-
-$.tablesorter.addParser({
- id: "period",
- is: function (s) {
- return /\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s);
- }, format: function (s, table, cell) {
- var v = $(cell).attr('value');
- var c = table.config;
- v = v.replace(/\-/g, "/");
- if (c.dateFormat == "us") {
- // reformat the string in ISO format
- v = v.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/, "$3/$1/$2");
- } else if (c.dateFormat == "uk") {
- // reformat the string in ISO format
- v = v.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/, "$3/$2/$1");
- } else if (c.dateFormat == "dd/mm/yy" || c.dateFormat == "dd-mm-yy") {
- v = v.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/, "$1/$2/$3");
- }
- return $.tablesorter.formatFloat(new Date(v).getTime());
- }, type: "numeric"
});
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm 2011-01-10 06:17:21 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm 2011-01-17 14:26:28 +0000
@@ -20,7 +20,8 @@
<script type="text/javascript">
var dateFormat = '$encoder.jsEscape($i18n.getString( 'format.date.label.jquery' ) , "'")';
</script>
- <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.min.js"></script>
+ <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.min.js"></script>
+ <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.ext.js"></script>
<script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/ui/jquery-ui.min.js"></script>
<script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.metadata.js"></script>
<script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.tablesorter.min.js"></script>
@@ -30,7 +31,6 @@
<script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.validate.js"></script>
<script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.validate.ext.js"></script>
<script type="text/javascript" src="../dhis-web-commons/i18nJavaScriptSupport.action"></script>
- <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.ext.js"></script>
<script type="text/javascript" src="../dhis-web-commons/javascripts/commons.js"></script>
<script type="text/javascript" src="../dhis-web-commons/javascripts/commons.ajax.js"></script>
<script type="text/javascript" src="../dhis-web-commons/javascripts/lists.js"></script>