Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Default View in preferences

#75

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.

Reported by Charles Brunet · November 17th, 2008 @ 06:16 PM

State: resolved
Milestone: 5.0.4
Assigned to: semias semias

Activity

  1. lux
    lux

    This seems to be working fine for me. Is it still happening for you in the latest version of the code?

    January 4th, 2009 @ 02:52 PM

  2. Charles Brunet
    Charles Brunet

    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.

    January 7th, 2009 @ 06:37 AM

  3. lux
    lux
    • 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.

    January 7th, 2009 @ 04:24 PM

  4. Charles Brunet
    Charles Brunet

    Then 'Control Panel' tab shouldn't be selected since this is WebView that is displayed...

    January 8th, 2009 @ 07:38 AM

  5. Charles Brunet
    Charles Brunet
    • Milestone set to 5.0.3

    [milestone:id#47011 bulk edit command]

    August 7th, 2009 @ 09:41 AM

  6. semias
    semias
    • 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.

    March 11th, 2011 @ 03:18 PM

  7. semias
    semias
    • State changed from open to invalid

    Tested on:
    FF3.6, IE7.
    Sitellite 5.0.3 -> Oct 18th 2010 build.

    Could not be reproduced.

    March 18th, 2011 @ 04:37 AM

  8. semias
    semias
    • State changed from invalid to open

    March 25th, 2011 @ 04:09 AM

  9. semias
    semias
    • 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".

    March 25th, 2011 @ 05:12 AM

  10. lux
    lux

    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>
    

    March 25th, 2011 @ 10:34 AM

  11. semias
    semias
    • State changed from resolved to open

    Reopened

    April 8th, 2011 @ 05:09 AM

  12. semias
    semias
    • State changed from open to resolved

    Implemented the change lux supposed.

    April 8th, 2011 @ 05:26 AM

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.