** Changed in: openobject-client-web
       Status: Fix Committed => Fix Released

-- 
new_design branch still mixes styling in HTML templates
https://bugs.launchpad.net/bugs/569066
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.

Status in OpenObject Web Client: Fix Released

Bug description:
Hello,

usually in web development it's advise to remove any style information from the 
HTML. This is not what is being done in the new_design refactoring branch. For 
instance, in new_design/addons/openerp/controllers/templates/form.mako I can 
see code like:

<td align="center" valign="middle" width="16" style="padding: 0px 5px 0px 0px;">
                                        <img 
                                            class="button" width="16" 
height="16"

This would be impossible to restyle and makes pages a bit larger to load. 
Instead you should give element class and id names and reuse them in CSS files 
(a nice way to maintain CSS files is SaSS by the way: http://sass-lang.com/ 
it's not a ruby specific tool, even some PHP guys use it).


Also, this is less critic, but it's advisable to avoid embedding Javascript 
scripts inside the HTML and do "unobtrusive" javascript instead ( 
http://en.wikipedia.org/wiki/Unobtrusive_JavaScript ): that is attach 
Javascript behavior to CSS selected elements.
So for instance code like this is not optimal:
                                    <td id="title_details" width="50%" 
style="padding: 0px 5px 1px 0px;">
                                        <h1>${form.screen.string}
                                                <a target="appFrame" 
class="help" href="javascript: void(0)" title="${_('Corporate 
Intelligence...')}" onclick="show_process_view()">
                                                        <small>Help</small>
                                                        </a>
                                        </h1>
                                    </td>


Hope to see the some clean up effort, this will save you a ton of work in the 
future and having a cleaner code would make it more likely to receive community 
contribs in this part of OpenERP.
Regards.



_______________________________________________
Mailing list: https://launchpad.net/~c2c-oerpscenario
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~c2c-oerpscenario
More help   : https://help.launchpad.net/ListHelp

Reply via email to