dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #07524
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2156: Added jquery urlencode plugin. We should replace our custom (html)encoding with this. Updated inv...
------------------------------------------------------------
revno: 2156
committer: Lars <larshelg@larshelg-laptop>
branch nick: trunk
timestamp: Fri 2010-09-17 18:11:27 +0200
message:
Added jquery urlencode plugin. We should replace our custom (html)encoding with this. Updated invalid references to javascripts in popup.vm
added:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.urlencode.js
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/popup.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
=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.urlencode.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.urlencode.js 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.urlencode.js 2010-09-17 16:11:27 +0000
@@ -0,0 +1,11 @@
+$.extend({URLEncode:function(c){var o='';var x=0;c=c.toString();var r=/(^[a-zA-Z0-9_.]*)/;
+ while(x<c.length){var m=r.exec(c.substr(x));
+ if(m!=null && m.length>1 && m[1]!=''){o+=m[1];x+=m[1].length;
+ }else{if(c[x]==' ')o+='+';else{var d=c.charCodeAt(x);var h=d.toString(16);
+ o+='%'+(h.length<2?'0':'')+h.toUpperCase();}x++;}}return o;},
+URLDecode:function(s){var o=s;var binVal,t;var r=/(%[^%]{2})/;
+ while((m=r.exec(o))!=null && m.length>1 && m[1]!=''){b=parseInt(m[1].substr(1),16);
+ t=String.fromCharCode(b);o=o.replace(m[1],t);}return o;}
+});
+
+
=== 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 2010-09-14 09:03:41 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm 2010-09-17 16:11:27 +0000
@@ -22,6 +22,7 @@
<script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.metadata.js"></script>
<script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/ui/ui.datepicker.js"></script>
<script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.tablesorter.js"></script>
+ <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.urlencode.js"></script>
<script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/ui/jquery.blockUI.js"></script>
<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>
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/popup.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/popup.vm 2010-03-08 14:50:40 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/popup.vm 2010-09-17 16:11:27 +0000
@@ -8,9 +8,11 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="../request.js"></script>
- <script type="text/javascript" src="../dhis-web-commons/util/jquery.js"></script>
- <script type="text/javascript" src="../dhis-web-commons/util/commons.js"></script>
- <script type="text/javascript" src="../dhis-web-commons/util/lists.js"></script>
+ <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.js"></script>
+ <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.urlencode.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>
#foreach( $javascript in $javascripts )
<script type="text/javascript" src="$javascript"></script>