Default View in preferences
Reported by Charles Brunet | November 17th, 2008 @ 06:16 PM | in 5.0.4 (closed)
When I select 'Control Panel' as default view in preferences, the 'Control Panel' is selected on login, but web view still is displayed in the bottom frame. If 'Web View' is selected in preferences, then it works as expected.
Comments and changes to this ticket
-
lux January 4th, 2009 @ 02:52 PM
This seems to be working fine for me. Is it still happening for you in the latest version of the code?
-
Charles Brunet January 7th, 2009 @ 06:37 AM
It works if I login from /cms-app but when I login from sitemember sidebar, it displays webview instead of ControlPanel view, even if ControlPanel is selected in the upper part of the window.
-
lux January 7th, 2009 @ 04:24 PM
- State changed from new to resolved
Ah I see. This is actually the correct behaviour then.
When you log in from the public site as an admin, Sitellite looks at what the current URL is and forwards you back there after login. So if you log in as an admin through the sidebar on /some-page, then when you're logged in, Sitellite will take you back to /some-page so you don't lose your place if you wanted to start there to find the page you wanted to edit (such as the current page :). Otherwise, you'd have to browse back to it if that's where you wanted to be.
-
Charles Brunet January 8th, 2009 @ 07:38 AM
Then 'Control Panel' tab shouldn't be selected since this is WebView that is displayed...
-
Charles Brunet August 7th, 2009 @ 09:41 AM
- Milestone set to 5.0.3
[milestone:id#47011 bulk edit command]
-
semias March 11th, 2011 @ 03:18 PM
- State changed from resolved to open
- Milestone changed from 5.0.3 to 5.0.4
- Assigned user changed from lux to semias
- Milestone order changed from 0 to 0
comment from Charles still applicable.
-
semias March 18th, 2011 @ 04:37 AM
- State changed from open to invalid
Tested on:
FF3.6, IE7.
Sitellite 5.0.3 -> Oct 18th 2010 build.Could not be reproduced.
-
semias March 25th, 2011 @ 04:09 AM
- State changed from invalid to open
-
semias March 25th, 2011 @ 05:12 AM
- State changed from open to resolved
At first it was not clear what the exact issue was, but after carefully reading charles his comment again I finally saw what was wrong.
The fix was pretty easy. In the file /inc/app/cms/boxes/login/index.php:116 there was a different rule for forwarding when logging in through the sidebar login.
Namely:if (! empty ($cgi->forward)) { header ('Location: ' . base64_decode ($cgi->forward)); exit; }
Removing this if loop fixes the "issue".
-
lux March 25th, 2011 @ 10:34 AM
That fix will break the function of having an admin log in via the login form on a give web page and having them forwarded back to that page so they don't lose their place.
For example, suppose I'm browsing my site and I spot a typo on my contact page. I can log in using the sidebar login on my site, and Sitellite will log me in and send me back to the contact page. From here, it's one click to edit the page and correct the typo. Otherwise, I would have had to browse to find my place again.
The issue is simply with the highlighting in the top frame. In the case of logging in from the web view and being forwarded, it should highlight the Web View instead of Control Panel, regardless of the default preference. It looks like the fix should be in the body onload of inc/app/cms/html/layout/top.spt since that's where the initial highlight is made based on the preference setting. Something like this ought to do it:
diff --git a/inc/app/cms/boxes/top/index.php b/inc/app/cms/boxes/top/index.php index 8745685..48e9653 100755 --- a/inc/app/cms/boxes/top/index.php +++ b/inc/app/cms/boxes/top/index.php @@ -3,7 +3,8 @@ echo template_simple ( 'layout/top.spt', array ( - 'default_view' => str_replace (' ', '-', session_pref ('start_page')) + 'default_view' => str_replace (' ', '-', session_pref ('start_page')), + 'forward' => $parameters['forward'] ) ); exit; diff --git a/inc/app/cms/html/layout/frames.spt b/inc/app/cms/html/layout/frames.spt index bbc9907..b312ac7 100755 --- a/inc/app/cms/html/layout/frames.spt +++ b/inc/app/cms/html/layout/frames.spt @@ -13,7 +13,7 @@ <frameset rows="97,*" border="0" frameborder="0" framespacing="0"> <frame - src="{site/prefix}/index/cms-top-action" + src="{site/prefix}/index/cms-top-action?forward={if obj[forward]}{filter base64_encode}{forward}{end filter}{end if}" name="cms-top-window" id="cms-top-window" scrolling="no" diff --git a/inc/app/cms/html/layout/top.spt b/inc/app/cms/html/layout/top.spt index 6deca39..f790f30 100755 --- a/inc/app/cms/html/layout/top.spt +++ b/inc/app/cms/html/layout/top.spt @@ -98,6 +98,15 @@ return false; } + function onload () { + var forward = '{forward}'; + if (forward.length > 0) { + active ('web-view'); + } else { + active ('{php str_replace (' ', '-', session_pref ('start_page'))}'); + } + } + function active (id) { if (document.all) { for (i = 0; i < links.length; i++) { @@ -125,7 +134,7 @@ } </script> </head> - <body onload="active ('{php str_replace (' ', '-', session_pref ('start_page'))}')"> + <body onload="onload ()"> <div id="product-version">{php array_shift (explode ('-', SITELLITE_VERSION))}</div>
-
semias April 8th, 2011 @ 05:26 AM
- State changed from open to resolved
Implemented the change lux supposed.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
The Sitellite web content management system.