projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1cd1ff1
)
make customer view selection semi-sticky
author
Mark Wells
<mark@freeside.biz>
Wed, 29 Jun 2016 06:28:19 +0000
(23:28 -0700)
committer
Mark Wells
<mark@freeside.biz>
Wed, 29 Jun 2016 06:28:19 +0000
(23:28 -0700)
httemplate/view/cust_main.cgi
patch
|
blob
|
history
diff --git
a/httemplate/view/cust_main.cgi
b/httemplate/view/cust_main.cgi
index
fac126f
..
c5ee920
100755
(executable)
--- a/
httemplate/view/cust_main.cgi
+++ b/
httemplate/view/cust_main.cgi
@@
-262,6
+262,15
@@
$views{$conf->config('cust_main-custom_title') || emt('Custom')} = 'custom'
my %viewname = reverse %views;
my $view = $cgi->param('show') || $curuser->default_customer_view;
my %viewname = reverse %views;
my $view = $cgi->param('show') || $curuser->default_customer_view;
+
+if ($view eq 'last') {
+ # something took us away from the page and is now bouncing back
+ $view = get_page_pref('last_view', $custnum);
+} else {
+ # remember which view is open so we _can_ bounce back
+ set_page_pref('last_view', $custnum, $view);
+}
+
$view = 'basics' if $view eq 'jumbo';
my $ie_compat = $conf->config('ie-compatibility_mode');
$view = 'basics' if $view eq 'jumbo';
my $ie_compat = $conf->config('ie-compatibility_mode');