From 39d666f254532a3d2d75c44b22ffe482073ed65b Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Tue, 5 Apr 2016 12:51:49 -0700 Subject: persistent user prefs for UI pages, #41397 --- httemplate/elements/header.html | 8 ++++++++ httemplate/elements/page_pref.js | 10 ++++++++++ 2 files changed, 18 insertions(+) create mode 100644 httemplate/elements/page_pref.js (limited to 'httemplate/elements') diff --git a/httemplate/elements/header.html b/httemplate/elements/header.html index c8a83ca7e..699f82c53 100644 --- a/httemplate/elements/header.html +++ b/httemplate/elements/header.html @@ -53,6 +53,12 @@ Example: <% $head |n %> +%# announce our base path, and the Mason comp path of this page + + STYLE="margin-top:0; margin-bottom:0; margin-left:0px; margin-right:0px"> @@ -178,6 +184,7 @@ Example: % } <% $menubar !~ /^\s*$/ ? "$menubar

" : '' %> + <%init> my( $title, $title_noescape, $menubar, $etc, $head ) = ( '', '', '', '', '' ); @@ -225,4 +232,5 @@ if ( scalar(@agentnums) == 1 ) { $company_name = $conf->config('company_name'); $company_url = $conf->config('company_url'); } + 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 + ); +} -- cgit v1.2.1