web2py themes - feeling nostalgic?

55 views
Skip to first unread message

Chris Steel

unread,
Dec 7, 2010, 2:39:06 PM12/7/10
to web2py-users
I was playing with plugin_layout and could not resist the temptation to bring back the past. Of course then you might want to get back the current Web2py theme, so I did one for that as well.

Untested,

Have fun...

--
Christopher Steel

Voice of Access
web2py.plugin.layout_BlankBluegreen.w2p
web2py.plugin.layout_blank_1_81_5.w2p
web2py.plugin.layout_1_89_5.w2p

John Kim

unread,
Dec 9, 2010, 1:41:24 AM12/9/10
to web2py-users
Thanks~

Comparing these different themes, I found a bug in the current 1.89.5
theme:
The default view shows four buttons: admin, request, session, and
response. The last three buttons should expand to show some useful
information.
However, the information has a CSS visibility: hidden; property so it
can't be seen! This property was inherited from div#request_hidden
(base.css:232).
The information becomes visible if I uncheck this property from Chrome
developer tools.

How should this be fixed? Is there a reason the CSS file sets the
visibility to hidden?

John-Kim
>  web2py.plugin.layout_BlankBluegreen.w2p
> 77KViewDownload
>
>  web2py.plugin.layout_blank_1_81_5.w2p
> 60KViewDownload
>
>  web2py.plugin.layout_1_89_5.w2p
> 186KViewDownload

Christopher Steel

unread,
Dec 9, 2010, 4:38:50 PM12/9/10
to web2py-users
Hi John,

.hidden is part of the Web2py base.css

I am having difficulty finding the buttons you are referring to, how
about a url or perhaps the html where .hidden is being applied.

are you talking about in appadmin under state?

http://127.0.0.1:8000/a/appadmin/state



Chris

John-Kim Murphy

unread,
Dec 9, 2010, 5:00:19 PM12/9/10
to web...@googlegroups.com
You can see the four buttons by creating any action that doesn't have a view explicitly defined for it. So you could add an action to the welcome app default.py controller:

def action_without_a_view():
    return dict(message='Buttons are below...')

Then browse to localhost:8000/welcome/default/action_without_a_view/

The relevant HTML is in generic.html:
<button onclick="document.location='{{=URL("admin","default","design",args=request.application)}}'">admin</button>
<button onclick="jQuery('#request').slideToggle()">request</button>
<div class="hidden" id="request"><h2>request</h2>{{=BEAUTIFY(request)}}</div>
<button onclick="jQuery('#session').slideToggle()">session</button>
<div class="hidden" id="session"><h2>session</h2>{{=BEAUTIFY(session)}}</div>
<button onclick="jQuery('#response').slideToggle()">response</button>
<div class="hidden" id="response"><h2>response</h2>{{=BEAUTIFY(response)}}</div>
<script>jQuery('.hidden').hide();</script>


I removed the "visibility: hidden;" attribute from line 232 of base.css and it fixes the problem. This change does not seem to break anything else...

John

mdipierro

unread,
Dec 9, 2010, 6:25:58 PM12/9/10
to web2py-users
I do not have that in line 232 in my base.css. That has been already
remove from trunk some time ago but the change has not yet propagated
in stable. Thanks for confirming that was a problem. It will soon be
in stable.

Massimo

On Dec 9, 4:00 pm, John-Kim Murphy <left...@gmail.com> wrote:
> *You can see the four buttons by creating any action that doesn't have a
> view explicitly defined for it. So you could add an action to the welcome
> app default.py controller:*
>
> def action_without_a_view():
>     return dict(message='Buttons are below...')
>
> Then browse to localhost:8000/welcome/default/action_without_a_view/
>
> *The relevant HTML is in generic.html:*
> <button
> onclick="document.location='{{=URL("admin","default","design",args=request.application)}}'">admin</button>
> <button onclick="jQuery('#request').slideToggle()">request</button>
> <div class="hidden"
> id="request"><h2>request</h2>{{=BEAUTIFY(request)}}</div>
> <button onclick="jQuery('#session').slideToggle()">session</button>
> <div class="hidden"
> id="session"><h2>session</h2>{{=BEAUTIFY(session)}}</div>
> <button onclick="jQuery('#response').slideToggle()">response</button>
> <div class="hidden"
> id="response"><h2>response</h2>{{=BEAUTIFY(response)}}</div>
> <script>jQuery('.hidden').hide();</script>
>
> *I removed the "visibility: hidden;" attribute from line 232 of base.css and
> it fixes the problem. This change does not seem to break anything else...*
>
> John
Reply all
Reply to author
Forward
0 new messages