Merge with 81e5be7f10f94ac2cdeb1aed99f5a5e8fcbe529f
authorymh <ymh.work@gmail.com>
Fri, 24 May 2013 21:55:08 +0200
changeset 1196 0d86ca7ccc7b
parent 1186 3fb6b550840c (diff)
parent 1195 81e5be7f10f9 (current diff)
child 1197 a731809df0fd
Merge with 81e5be7f10f94ac2cdeb1aed99f5a5e8fcbe529f
src/ldt/ldt/__init__.py
src/ldt/ldt/core/handlers/modpython.py
src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/create_content.html
src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/groups.html
src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/published_projects.html
src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/workspace_base.html
src/ldt/ldt/ldt_utils/views/lignesdetemps.py
--- a/.hgtags	Fri May 24 17:30:29 2013 +0200
+++ b/.hgtags	Fri May 24 21:55:08 2013 +0200
@@ -162,3 +162,5 @@
 56c6497c0785d20c3c17da90446d030eba3c78f3 V01.48
 e590a85b91cccd905ddd25db54357f4f584e83fa V01.49
 
+d6cd3baa8b001700bf37d977b5062a37e3add296 V01.49.01
+c0a7d3cee89f9df085bb7dd54e4d6c6dd9cbc7e2 V01.49.02
--- a/src/ldt/ldt/__init__.py	Fri May 24 17:30:29 2013 +0200
+++ b/src/ldt/ldt/__init__.py	Fri May 24 21:55:08 2013 +0200
@@ -1,6 +1,6 @@
 __all__ = ["VERSION", "get_version", "__version__"]
 
-VERSION = (1, 49, 0, "final", 0)
+VERSION = (1, 49, 2, "final", 0)
 
 
 def get_version():
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/groups.html	Fri May 24 17:30:29 2013 +0200
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/groups.html	Fri May 24 21:55:08 2013 +0200
@@ -20,7 +20,7 @@
 var get_group_projects_url = "{% url 'ldt.ldt_utils.views.group.get_group_projects_view' %}";
 
 function init_events(base_node) {
-	init_events_projects(base_node, "{% url 'ldt.ldt_utils.views.workspace.popup_embed' %}", project_filter_url, publish_project_url, unpublish_project_url)
+	init_events_projects(base_node, "{% url 'ldt.ldt_utils.views.workspace.popup_embed' %}", project_filter_url, publish_project_url, unpublish_project_url);
 }
 	
 var global_csrf_token = "{{ csrf_token }}";
@@ -33,10 +33,10 @@
 }
 function update_history(){
     // Group id
-    g = $("#id_group").val();
+    s = "g=" + $("#id_group").val();
     // Project filter
-    pf = ($("#searchprojectsinput").val()==undefined || $("#searchprojectsinput").val()=="") ? "undefined" : $("#searchprojectsinput").val();
-    History.replaceState(null, null, "?pf=" + pf + "&g=" + g);
+    s += ($("#searchprojectsinput").val()===undefined || $("#searchprojectsinput").val()=="") ? "" : ("&pf=" + $("#searchprojectsinput").val());
+    History.replaceState(null, null, "?" + s);
 }
 
 $(document).ready(function(){
@@ -138,7 +138,7 @@
 		<div class="span-12 last titlediv" >
 			<div class="span-8 projectscontentstitle" >{% trans "The group's projects" %}</div>
 			<div class="span-4 last searchfielddiv" >
-			    <div class="searchfield rounded"><input id="searchprojectsinput" class="searchfieldinput searchfieldinputbase" placeholder="{% trans 'search' %}" type="text" /><img id="projectsajaxloader" class="searchajaxloader" src='{% static "ldt/img/ajax-loader-16x16.gif" %}' alt="loader"/><img id="projecsclear" class="searchclear" src='{% static "ldt/img/clear-left.png" %}' /></div>
+			    <div class="searchfield rounded"><input id="searchprojectsinput" class="searchfieldinput searchfieldinputbase" placeholder="{% trans 'search' %}" type="text" /><img id="projectsajaxloader" class="searchajaxloader" src='{% absstatic "ldt/img/ajax-loader-16x16.gif" %}' alt="loader"/><img id="projecsclear" class="searchclear" src='{% absstatic "ldt/img/clear-left.png" %}' /></div>
 			</div>
 		</div>
 		<div class="span-12 last projectscontentsdiv" id="projectslistcontainer">
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/published_projects.html	Fri May 24 17:30:29 2013 +0200
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/published_projects.html	Fri May 24 21:55:08 2013 +0200
@@ -19,9 +19,7 @@
 
 
 function init_events(base_node) {
-
 	init_events_all(base_node, "{% url 'ldt.ldt_utils.views.workspace.popup_embed' %}", content_filter_url, project_filter_url, publish_project_url, unpublish_project_url);
-	
 }
 	
 var global_csrf_token = "{{ csrf_token }}";
@@ -33,11 +31,12 @@
     );
 }
 function update_history(){
+	s = "";
     // Project filter
-    pf = ($("#searchprojectsinput").val()==undefined || $("#searchprojectsinput").val()=="") ? "undefined" : $("#searchprojectsinput").val();
+    s += ($("#searchprojectsinput").val()==undefined || $("#searchprojectsinput").val()=="") ? "" : ("pf=" + $("#searchprojectsinput").val());
     // Project page
-    pp = $("#current_project_page").val();
-    History.replaceState(null, null, "?pf=" + pf + "&pp=" + pp);
+    s += ((s=="") ? "" : "&") + "pp=" + $("#current_project_page").val();
+    History.replaceState(null, null, "?" + s);
 }
 
 $(document).ready(function(){
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/workspace_base.html	Fri May 24 17:30:29 2013 +0200
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/workspace_base.html	Fri May 24 21:55:08 2013 +0200
@@ -20,7 +20,6 @@
 
 function init_events(base_node) {
 	init_events_all(base_node, "{% url 'ldt.ldt_utils.views.workspace.popup_embed' %}", content_filter_url, project_filter_url, publish_project_url, unpublish_project_url);
-	
 }
 	
 var global_csrf_token = "{{ csrf_token }}";
@@ -32,17 +31,18 @@
     );
 }
 function update_history(){
+	s = "";
     // Content filter
-    cf = ($("#searchcontentsinput").val()==undefined || $("#searchcontentsinput").val()=="") ? "undefined" : $("#searchcontentsinput").val();
+    s += ($("#searchcontentsinput").val()===undefined || $("#searchcontentsinput").val()=="") ? "" : ("cf=" + $("#searchcontentsinput").val());
     // Content page
-    cp = $("#current_content_page").val();
+    s += ((s=="") ? "" : "&") + "cp=" + parseInt($("#current_content_page").val());
     // Content tag
-    ct = ($("#current_content_tag").val()==undefined || $("#current_content_tag").val()=="") ? "undefined" : $("#current_content_tag").val();
+    s += ((s=="" || (s.charAt(s.length-1)=="&")) ? "" : "&") + (($("#current_content_tag").val()===undefined || $("#current_content_tag").val()=="") ? "" : ("ct=" + $("#current_content_tag").val()));
     // Project filter
-    pf = ($("#searchprojectsinput").val()==undefined || $("#searchprojectsinput").val()=="") ? "undefined" : $("#searchprojectsinput").val();
+    s += ((s=="" || (s.charAt(s.length-1)=="&")) ? "" : "&") + (($("#searchprojectsinput").val()===undefined || $("#searchprojectsinput").val()=="") ? "" : ("pf=" + $("#searchprojectsinput").val()));
     // Project page
-    pp = $("#current_project_page").val();
-    History.replaceState(null, null, "?cf=" + cf + "&cp=" + cp + "&ct=" + ct + "&pf=" + pf + "&pp=" + pp);
+    s += ((s=="" || (s.charAt(s.length-1)=="&")) ? "" : "&") + "pp=" + parseInt($("#current_project_page").val());
+    History.replaceState(null, null, "?" + s);
 }
 
 $(document).ready(function(){
@@ -60,13 +60,13 @@
 	cf = getURLParameter("cf");
 	ct = getURLParameter("ct");
 	cp = parseInt(getURLParameter("cp"));
-	if(cf=="null" || cf==null || cf=="undefined" || cf==undefined){
+	if(cf=="null" || cf===null || cf===undefined){
 		cf = "";
 	}
-    if(ct=="null" || ct==null || ct=="undefined" || ct==undefined){
+    if(ct=="null" || ct===null || ct===undefined){
         ct = "";
     }
-	if(cf!="" || cp>0){
+	if(cf!="" || ct!="" || cp>0){
 		// Content filter with current page cp and current tag ct
 		$("#searchcontentsinput").val(cf);
 		searchCallback($("#searchcontentsinput"), "#contentslistcontainer", content_filter_url, 0, cp, ct);