aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
Diffstat (limited to 'view')
-rw-r--r--view/js/main.js2
-rw-r--r--view/pdl/mod_home.pdl3
-rw-r--r--view/pdl/mod_login.pdl6
-rw-r--r--view/tpl/build_query.tpl61
4 files changed, 41 insertions, 31 deletions
diff --git a/view/js/main.js b/view/js/main.js
index 3307086d4..2ad7b86fb 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -1144,7 +1144,7 @@ function pageUpdate() {
bParam_page = 1;
}
- update_url = baseurl + '/' + decodeURIComponent(page_query) + '/?aj=1&page=' + bParam_page + extra_args ;
+ update_url = baseurl + '/' + decodeURIComponent(page_query) + '?aj=1&page=' + bParam_page + extra_args ;
$("#page-spinner").show();
update_mode = 'append';
diff --git a/view/pdl/mod_home.pdl b/view/pdl/mod_home.pdl
index 8b3ff52f8..2660f63e0 100644
--- a/view/pdl/mod_home.pdl
+++ b/view/pdl/mod_home.pdl
@@ -1,3 +1,6 @@
+[region=aside]
+[widget=notifications][var=sys_only]1[/var][/widget]
+[/region]
[region=content]
$content
[/region]
diff --git a/view/pdl/mod_login.pdl b/view/pdl/mod_login.pdl
new file mode 100644
index 000000000..3065703de
--- /dev/null
+++ b/view/pdl/mod_login.pdl
@@ -0,0 +1,6 @@
+[region=aside]
+[widget=notifications][var=sys_only]1[/var][/widget]
+[/region]
+[region=content]
+$content
+[/region]
diff --git a/view/tpl/build_query.tpl b/view/tpl/build_query.tpl
index af70a9595..b009d4c9c 100644
--- a/view/tpl/build_query.tpl
+++ b/view/tpl/build_query.tpl
@@ -41,36 +41,37 @@
var bParam_unseen = "{{$unseen}}";
function buildCmd() {
- var udargs = ((page_load) ? "/load" : "");
- var bCmd = bParam_cmd + udargs + "?f=" ;
- if(bParam_uid) bCmd = bCmd + "&p=" + bParam_uid;
- if(bParam_cmin != (-1)) bCmd = bCmd + "&cmin=" + bParam_cmin;
- if(bParam_cmax != (-1)) bCmd = bCmd + "&cmax=" + bParam_cmax;
- if(bParam_gid != 0) { bCmd = bCmd + "&gid=" + bParam_gid; } else
- if(bParam_cid != 0) { bCmd = bCmd + "&cid=" + bParam_cid; }
- if(bParam_star != 0) bCmd = bCmd + "&star=" + bParam_star;
- if(bParam_liked != 0) bCmd = bCmd + "&liked=" + bParam_liked;
- if(bParam_conv!= 0) bCmd = bCmd + "&conv=" + bParam_conv;
- if(bParam_spam != 0) bCmd = bCmd + "&spam=" + bParam_spam;
- if(bParam_new != 0) bCmd = bCmd + "&new=" + bParam_new;
- if(bParam_wall != 0) bCmd = bCmd + "&wall=" + bParam_wall;
- if(bParam_list != 0) bCmd = bCmd + "&list=" + bParam_list;
- if(bParam_fh != 0) bCmd = bCmd + "&fh=" + bParam_fh;
- if(bParam_dm != 0) bCmd = bCmd + "&dm=" + bParam_dm;
- if(bParam_search != "") bCmd = bCmd + "&search=" + bParam_search;
- if(bParam_xchan != "") bCmd = bCmd + "&xchan=" + bParam_xchan;
- if(bParam_order != "") bCmd = bCmd + "&order=" + bParam_order;
- if(bParam_file != "") bCmd = bCmd + "&file=" + bParam_file;
- if(bParam_cats != "") bCmd = bCmd + "&cat=" + bParam_cats;
- if(bParam_tags != "") bCmd = bCmd + "&tag=" + bParam_tags;
- if(bParam_dend != "") bCmd = bCmd + "&dend=" + bParam_dend;
- if(bParam_dbegin != "") bCmd = bCmd + "&dbegin=" + bParam_dbegin;
- if(bParam_mid != "") bCmd = bCmd + "&mid=" + bParam_mid;
- if(bParam_verb != "") bCmd = bCmd + "&verb=" + bParam_verb;
- if(bParam_net != "") bCmd = bCmd + "&net=" + bParam_net;
- if(bParam_page != 1) bCmd = bCmd + "&page=" + bParam_page;
- if(bParam_pf != 0) bCmd = bCmd + "&pf=" + bParam_pf;
- if(bParam_unseen != 0) bCmd = bCmd + "&unseen=" + bParam_unseen;
+ let udargs = ((page_load) ? "/load" : "");
+ let bCmd = bParam_cmd + udargs;
+
+ if(bParam_uid) bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "p=" + bParam_uid;
+ if(bParam_cmin != (-1)) bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "cmin=" + bParam_cmin;
+ if(bParam_cmax != (-1)) bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "cmax=" + bParam_cmax;
+ if(bParam_gid != 0) { bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "gid=" + bParam_gid; } else
+ if(bParam_cid != 0) { bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "cid=" + bParam_cid; }
+ if(bParam_star != 0) bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "star=" + bParam_star;
+ if(bParam_liked != 0) bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "liked=" + bParam_liked;
+ if(bParam_conv!= 0) bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "conv=" + bParam_conv;
+ if(bParam_spam != 0) bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "spam=" + bParam_spam;
+ if(bParam_new != 0) bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "new=" + bParam_new;
+ if(bParam_wall != 0) bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "wall=" + bParam_wall;
+ if(bParam_list != 0) bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "list=" + bParam_list;
+ if(bParam_fh != 0) bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "fh=" + bParam_fh;
+ if(bParam_dm != 0) bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "dm=" + bParam_dm;
+ if(bParam_search != "") bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "search=" + bParam_search;
+ if(bParam_xchan != "") bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "xchan=" + bParam_xchan;
+ if(bParam_order != "") bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "order=" + bParam_order;
+ if(bParam_file != "") bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "file=" + bParam_file;
+ if(bParam_cats != "") bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "cat=" + bParam_cats;
+ if(bParam_tags != "") bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "tag=" + bParam_tags;
+ if(bParam_dend != "") bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "dend=" + bParam_dend;
+ if(bParam_dbegin != "") bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "dbegin=" + bParam_dbegin;
+ if(bParam_mid != "") bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "mid=" + bParam_mid;
+ if(bParam_verb != "") bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "verb=" + bParam_verb;
+ if(bParam_net != "") bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "net=" + bParam_net;
+ if(bParam_page != 1) bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "page=" + bParam_page;
+ if(bParam_pf != 0) bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "pf=" + bParam_pf;
+ if(bParam_unseen != 0) bCmd = bCmd + ((bCmd.includes('?')) ? '&' : '?') + "unseen=" + bParam_unseen;
return(bCmd);
}