# HG changeset patch
# User cavaliet
# Date 1368525908 -7200
# Node ID d6cd3baa8b001700bf37d977b5062a37e3add296
# Parent 6ab716dd58f8e06a4f0d5bd323da726a5836d573
Correct js history. Add version number 1.49.1
diff -r 6ab716dd58f8 -r d6cd3baa8b00 src/ldt/ldt/__init__.py
--- a/src/ldt/ldt/__init__.py Mon May 13 14:22:37 2013 +0200
+++ b/src/ldt/ldt/__init__.py Tue May 14 12:05:08 2013 +0200
@@ -1,4 +1,4 @@
-VERSION = (1, 49, 0, "final", 0)
+VERSION = (1, 49, 1, "final", 0)
def get_version():
diff -r 6ab716dd58f8 -r d6cd3baa8b00 src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/create_content.html
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/create_content.html Mon May 13 14:22:37 2013 +0200
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/create_content.html Tue May 14 12:05:08 2013 +0200
@@ -10,8 +10,7 @@
{{ block.super }}
-
-
+
diff -r 6ab716dd58f8 -r d6cd3baa8b00 src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/groups.html
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/groups.html Mon May 13 14:22:37 2013 +0200
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/groups.html Tue May 14 12:05: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(){
diff -r 6ab716dd58f8 -r d6cd3baa8b00 src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/published_projects.html
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/published_projects.html Mon May 13 14:22:37 2013 +0200
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/published_projects.html Tue May 14 12:05: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(){
diff -r 6ab716dd58f8 -r d6cd3baa8b00 src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/workspace_base.html
--- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/workspace_base.html Mon May 13 14:22:37 2013 +0200
+++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/workspace_base.html Tue May 14 12:05: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);