diff options
author | Mark Wells <mark@freeside.biz> | 2016-04-05 12:51:49 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2016-04-05 13:06:36 -0700 |
commit | 06809c379e25e6753d39ca79a39c977e5194c696 (patch) | |
tree | 939e5eacd056b404aefc637fbf23e4a3ae6b305d /httemplate/elements | |
parent | 4b39a40f110de90403417bc75a40f35a2861126c (diff) |
persistent user prefs for UI pages, #41397
Diffstat (limited to 'httemplate/elements')
-rw-r--r-- | httemplate/elements/header.html | 8 | ||||
-rw-r--r-- | httemplate/elements/page_pref.js | 10 |
2 files changed, 18 insertions, 0 deletions
diff --git a/httemplate/elements/header.html b/httemplate/elements/header.html index a5dedd749..a67538d11 100644 --- a/httemplate/elements/header.html +++ b/httemplate/elements/header.html @@ -61,6 +61,12 @@ Example: <% $head |n %> +%# announce our base path, and the Mason comp path of this page + <script type="text/javascript"> + window.fsurl = <% $fsurl |js_string %>; + window.request_comp_path = <% $m->request_comp->path |js_string %>; + </script> + </HEAD> <BODY BGCOLOR="#f8f8f8" <% $etc |n %> STYLE="margin-top:0; margin-bottom:0; margin-left:0px; margin-right:0px"> <table width="100%" CELLPADDING=0 CELLSPACING=0 STYLE="padding-left:0px; padding-right:4px" CLASS="fshead"> @@ -184,6 +190,7 @@ Example: % } <% $menubar !~ /^\s*$/ ? "$menubar<BR><BR>" : '' %> + <%init> my( $title, $title_noescape, $menubar, $etc, $head ) = ( '', '', '', '', '' ); @@ -231,4 +238,5 @@ if ( scalar(@agentnums) == 1 ) { $company_name = $conf->config('company_name'); $company_url = $conf->config('company_url'); } + </%init> diff --git a/httemplate/elements/page_pref.js b/httemplate/elements/page_pref.js new file mode 100644 index 000000000..253c6da86 --- /dev/null +++ b/httemplate/elements/page_pref.js @@ -0,0 +1,10 @@ +function set_page_pref(prefname, tablenum, prefvalue, success) { + jQuery.post( window.fsurl + 'misc/process/set_page_pref.html', + { path: window.request_comp_path, + name: prefname, + num: tablenum, + value: prefvalue + }, + success + ); +} |