Merge lp:~openerp-dev/openobject-client-web/web-dashboard into lp:openobject-client-web/trunk
- web-dashboard
- Merge into trunk
Status: | Merged |
---|---|
Merged at revision: | 3440 |
Proposed branch: | lp:~openerp-dev/openobject-client-web/web-dashboard |
Merge into: | lp:openobject-client-web/trunk |
Diff against target: |
729 lines (+279/-293) 9 files modified
addons/openerp/controllers/root.py (+38/-65) addons/openerp/controllers/templates/closepopup.mako (+1/-1) addons/openerp/controllers/templates/dashboard.mako (+0/-52) addons/openerp/controllers/templates/header.mako (+51/-52) addons/openerp/controllers/templates/index.mako (+159/-0) addons/openerp/controllers/templates/menu.mako (+0/-99) addons/openerp/static/css/screen.css (+21/-10) addons/openerp/static/javascript/openerp/openerp.base.js (+9/-0) addons/openerp/static/javascript/openerp/openerp.ui.js (+0/-14) |
To merge this branch: | bzr merge lp:~openerp-dev/openobject-client-web/web-dashboard |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Xavier (Open ERP) (community) | Approve | ||
Review via email: mp+37436@code.launchpad.net |
Commit message
Description of the change
Improvements in dashboard.
- 3423. By Vaibhav Darji
-
[FIX] Fix header actions for dashboard.
Xavier (Open ERP) (xmo-deactivatedaccount) wrote : | # |
- 3424. By Vaibhav Darji
-
[FIX] Fixes as per reviews.
- 3425. By Vaibhav Darji
-
[FIX] Fixes.
- 3426. By Vaibhav Darji
-
[FIX] Fix show tools options.
- 3427. By Vaibhav Darji
-
[FIX] Fixes for show tools options.
Xavier (Open ERP) (xmo-deactivatedaccount) wrote : | # |
Review as of revision 3425:
* Missing images (Warehouse, Point of Sale, Tools)
- Point of Sale had an icon, doesn't seem to be implemented
- Remove "Inventory" (doesn't exist), use its icon for Warehouse
- Remove "Chat" icon from CSS, there is no chat toplevel application.
- apr sent icon for Tools (applications-
* Font on buttons is too small, and they don't size correctly
as per previous review, remove subtext in gray and make font bigger
* Also bigger font for applications names
* Homepage generates the following errors in Webkit console:
<div> is not allowed inside <tr>. Inserting <div> before the <table> instead.
<td> is not allowed inside <div>. Moving <td> into the nearest enclosing <tabe>.
<table> is not allowed inside <tbody>. Closing the current <table> and inserting the new <table> as a sibling.
<div> is not allowed inside <tbody>. Inserting <div> before the <table> instead.
* in index() when calling menu() use keyword arguments:
return self.menu(
instead of
return self.menu(None, next)
* I think menu() can be simplified and custom_action has no reason to be in the application URLs, see if this patch seems to work correctly:
=== modified file 'addons/
--- addons/
+++ addons/
@@ -104,22 +104,17 @@
proxy = rpc.RPCProxy(
ids = proxy.search(
parents = proxy.read(ids, ['name', 'action'], ctx)
- show_tools = False
- if not id and ids:
- id = ids[0]
-
+ show_tools = False
+
+ if next:
+ show_tools = True
for parent in parents:
if parent['id'] == id:
+ show_tools = True
-
- if parent.
- parent['url'] = url('/openerp/
- else:
- parent['url'] = url('/openerp/
- if parent['id'] == id:
- show_tools = True
- if next:
- show_tools = True
+ if parent.
+ next = url('/openerp/
+
tools = []
if show_tools:
ids = proxy.search(
=== modified file 'addons/
--- addons/
+++ addons/
@@ -36,7 +36,7 @@
- <a href="$
+ <a href="$
...
Xavier (Open ERP) (xmo-deactivatedaccount) wrote : | # |
Patch probably won't apply anymore as you changed conditional in 3426 and 3427 (for the better i think).
Xavier (Open ERP) (xmo-deactivatedaccount) wrote : | # |
Though you forgot to remove the now-unused ``show_tools`` flag.
Xavier (Open ERP) (xmo-deactivatedaccount) wrote : | # |
Yeah followup on the errors displayed by webkit, template is basically broken, it doesn't make sense. There are divs in tables directly and in trs as well. And table tags which are not closed but an other table is opened (~line 120 in index.mako)
- 3428. By Vaibhav Darji
-
[FIX] Fixed template issue, specified proper class name, Fixes per review.
- 3429. By Vaibhav Darji
-
[FIX] Fixed default first id when there is no active id.
- 3430. By Vaibhav Darji
-
[FIX] Fixes for activate parent class when selected.
- 3431. By Vaibhav Darji
-
[ADD] Image for tools .
Xavier (Open ERP) (xmo-deactivatedaccount) : | # |
Preview Diff
1 | === modified file 'addons/openerp/controllers/root.py' |
2 | --- addons/openerp/controllers/root.py 2010-10-03 11:25:14 +0000 |
3 | +++ addons/openerp/controllers/root.py 2010-10-05 13:06:51 +0000 |
4 | @@ -50,45 +50,19 @@ |
5 | def index(self, next=None): |
6 | """Index page, loads the view defined by `action_id`. |
7 | """ |
8 | - if next: arguments = {'next': next} |
9 | - else: arguments = {'next': '/openerp/home'} |
10 | - |
11 | - proxy = rpc.RPCProxy("res.users") |
12 | - act_id = proxy.read([rpc.session.uid], ['action_id', 'name'], rpc.session.context) |
13 | - |
14 | - if act_id[0]['action_id'] : |
15 | - raise redirect("/openerp/menu", **arguments) |
16 | - else: |
17 | - raise redirect('/openerp/dashboard') |
18 | - |
19 | - |
20 | - def user_action(self, id='action_id'): |
21 | - """Perform default user action. |
22 | - |
23 | - @param id: `action_id` or `menu_id` |
24 | - """ |
25 | - proxy = rpc.RPCProxy("res.users") |
26 | - act_id = proxy.read([rpc.session.uid], [id, 'name'], rpc.session.context) |
27 | - |
28 | - if not act_id[0][id]: |
29 | - common.warning(_('You can not log into the system!\nAsk the administrator to verify\nyou have an action defined for your user.'), _('Access Denied!')) |
30 | - rpc.session.logout() |
31 | - raise redirect('/openerp') |
32 | - else: |
33 | - act_id = act_id[0][id][0] |
34 | - from openerp import controllers |
35 | - return controllers.actions.execute_by_id(act_id) |
36 | - |
37 | - @expose(template="/openerp/controllers/templates/dashboard.mako") |
38 | - def dashboard(self): |
39 | - ctx = rpc.session.context.copy() |
40 | - proxy = rpc.RPCProxy("ir.ui.menu") |
41 | - ids = proxy.search([('parent_id', '=', False)], 0, 0, 0, ctx) |
42 | - parents = proxy.read(ids, ['name', 'icon', 'action'], ctx) |
43 | - return dict(parents = parents) |
44 | + |
45 | + if not next: |
46 | + user_action_id = rpc.RPCProxy("res.users").read([rpc.session.uid], ['action_id'], rpc.session.context)[0]['action_id'] |
47 | + if user_action_id: |
48 | + next = '/openerp/home' |
49 | + |
50 | + return self.menu(next=next) |
51 | + |
52 | @expose() |
53 | def home(self): |
54 | - return self.user_action('action_id') |
55 | + user_action_id = rpc.RPCProxy("res.users").read([rpc.session.uid], ['action_id'], rpc.session.context)[0]['action_id'] |
56 | + from openerp import controllers |
57 | + return controllers.actions.execute_by_id(user_action_id[0]) |
58 | |
59 | @expose(content_type='application/octet-stream') |
60 | def report(self, report_name=None, **kw): |
61 | @@ -117,9 +91,8 @@ |
62 | </html> |
63 | """ % (url("/openerp/static/images/loading.gif")) |
64 | |
65 | - @expose(template="/openerp/controllers/templates/menu.mako") |
66 | + @expose(template="/openerp/controllers/templates/index.mako") |
67 | def menu(self, active=None, next=None): |
68 | - from openerp.utils import icons |
69 | from openerp.widgets import tree_view |
70 | |
71 | try: |
72 | @@ -128,37 +101,37 @@ |
73 | id = False |
74 | form.Form().reset_notebooks() |
75 | ctx = rpc.session.context.copy() |
76 | - proxy = rpc.RPCProxy("ir.ui.menu") |
77 | - ids = proxy.search([('parent_id', '=', False)], 0, 0, 0, ctx) |
78 | - parents = proxy.read(ids, ['name', 'icon', 'action'], ctx) |
79 | - |
80 | - if not id and ids: |
81 | - id = ids[0] |
82 | + menus = rpc.RPCProxy("ir.ui.menu") |
83 | + ids = menus.search([('parent_id', '=', False)], 0, 0, 0, ctx) |
84 | + parents = menus.read(ids, ['name', 'action'], ctx) |
85 | |
86 | for parent in parents: |
87 | if parent['id'] == id: |
88 | parent['active'] = 'active' |
89 | - # explicit next takes precedence on menu item action |
90 | - if not next and parent.get('action'): |
91 | - next = url('/openerp/custom_action', action=id) |
92 | - |
93 | - ids = proxy.search([('parent_id', '=', id)], 0, 0, 0, ctx) |
94 | - tools = proxy.read(ids, ['name', 'icon', 'action'], ctx) |
95 | - view = cache.fields_view_get('ir.ui.menu', 1, 'tree', {}) |
96 | - fields = cache.fields_get(view['model'], False, ctx) |
97 | + if parent.get('action') and not next: |
98 | + next = url('/openerp/custom_action', action=id) |
99 | |
100 | - for tool in tools: |
101 | - tid = tool['id'] |
102 | - tool['icon'] = icons.get_icon(tool['icon']) |
103 | - tool['tree'] = tree = tree_view.ViewTree(view, 'ir.ui.menu', tid, |
104 | - domain=[('parent_id', '=', tid)], |
105 | - context=ctx, action="/openerp/tree/action", fields=fields) |
106 | - tree._name = "tree_%s" %(tid) |
107 | - tree.tree.onselection = None |
108 | - tree.tree.onheaderclick = None |
109 | - tree.tree.showheaders = 0 |
110 | - |
111 | - return dict(parents=parents, tools=tools, load_content=(next and next or '')) |
112 | + tools = [] |
113 | + if next or active: |
114 | + if not id and ids: |
115 | + id = ids[0] |
116 | + ids = menus.search([('parent_id', '=', id)], 0, 0, 0, ctx) |
117 | + tools = menus.read(ids, ['name', 'action'], ctx) |
118 | + view = cache.fields_view_get('ir.ui.menu', 1, 'tree', {}) |
119 | + fields = cache.fields_get(view['model'], False, ctx) |
120 | + |
121 | + for tool in tools: |
122 | + tid = tool['id'] |
123 | + tool['tree'] = tree = tree_view.ViewTree(view, 'ir.ui.menu', tid, |
124 | + domain=[('parent_id', '=', tid)], |
125 | + context=ctx, action="/openerp/tree/action", fields=fields) |
126 | + tree._name = "tree_%s" %(tid) |
127 | + tree.tree.onselection = None |
128 | + tree.tree.onheaderclick = None |
129 | + tree.tree.showheaders = 0 |
130 | + widgets = rpc.RPCProxy('res.widget') |
131 | + return dict(parents=parents, tools=tools, load_content=(next and next or ''), |
132 | + widgets=widgets.read(widgets.search([], 0, 0, 0, ctx), [], ctx)) |
133 | |
134 | @expose(allow_json=True) |
135 | @unsecured |
136 | |
137 | === modified file 'addons/openerp/controllers/templates/closepopup.mako' |
138 | --- addons/openerp/controllers/templates/closepopup.mako 2010-09-15 12:29:56 +0000 |
139 | +++ addons/openerp/controllers/templates/closepopup.mako 2010-10-05 13:06:51 +0000 |
140 | @@ -27,7 +27,7 @@ |
141 | window.close(); |
142 | |
143 | } else { |
144 | - window.location.href='/openerp/menu'; |
145 | + window.location.href='/openerp'; |
146 | } |
147 | }); |
148 | </script> |
149 | |
150 | === removed file 'addons/openerp/controllers/templates/dashboard.mako' |
151 | --- addons/openerp/controllers/templates/dashboard.mako 2010-10-01 08:16:56 +0000 |
152 | +++ addons/openerp/controllers/templates/dashboard.mako 1970-01-01 00:00:00 +0000 |
153 | @@ -1,52 +0,0 @@ |
154 | -<%inherit file="/openerp/controllers/templates/base_dispatch.mako"/> |
155 | -<%def name="header()"> |
156 | - <title>OpenERP Dashboard</title> |
157 | - |
158 | - <script type="text/javascript" src="/openerp/static/javascript/accordion.js"></script> |
159 | - <script type="text/javascript" src="/openerp/static/javascript/treegrid.js"></script> |
160 | - <script type="text/javascript" src="/openerp/static/javascript/notebook/notebook.js"></script> |
161 | -</%def> |
162 | -<%def name="content()"> |
163 | - <div id="root"> |
164 | - <table id="content" class="three-a" width="100%"> |
165 | - <tr> |
166 | - <%include file="header.mako"/> |
167 | - </tr> |
168 | - <tr> |
169 | - <td id="main_nav" colspan="3"> |
170 | - <div id="applications_menu"> |
171 | - <ul> |
172 | - %for parent in parents: |
173 | - <li> |
174 | - <a href="${py.url('/openerp/menu', active=parent['id'])}" |
175 | - target="_top" class="${parent.get('active', '')}"> |
176 | - <span>${parent['name']}</span> |
177 | - </a> |
178 | - </li> |
179 | - % endfor |
180 | - </ul> |
181 | - </div> |
182 | - </td> |
183 | - </tr> |
184 | - <tr> |
185 | - <td id="primary" width="100%"> |
186 | - <div class="wrap" style="padding: 10px;"> |
187 | - <ul class="sections-a"> |
188 | - %for parent in parents: |
189 | - <li id="${parent['id']}" class="${'-'.join(parent['name'].split(' ')).lower()}"> |
190 | - <span class="wrap"> |
191 | - <a href="${py.url('/openerp/menu', active=parent['id'])}"> |
192 | - <span> |
193 | - <strong>${parent['name']}</strong> |
194 | - </span> |
195 | - </a> |
196 | - </span> |
197 | - </li> |
198 | - % endfor |
199 | - </ul> |
200 | - </div> |
201 | - </td> |
202 | - </tr> |
203 | - </table> |
204 | - </div> |
205 | -</%def> |
206 | |
207 | === modified file 'addons/openerp/controllers/templates/header.mako' |
208 | --- addons/openerp/controllers/templates/header.mako 2010-09-30 10:04:42 +0000 |
209 | +++ addons/openerp/controllers/templates/header.mako 2010-10-05 13:06:51 +0000 |
210 | @@ -37,61 +37,60 @@ |
211 | <li><a href="#footer" accesskey="f">Skip to footer [f]</a></li> |
212 | </ul> |
213 | % if logged: |
214 | - <div id="corner"> |
215 | - <ul class="tools"> |
216 | - <li><a href="javascript: void(0)" onclick="header_actions('/openerp/home')" class="home">${_("Home")}</a> |
217 | - <ul> |
218 | - <li class="first last"><a href="javascript: void(0)" onclick="header_actions('/openerp/home')">${_("Home")}</a></li> |
219 | - </ul> |
220 | - </li> |
221 | - <li> |
222 | - <a href="javascript: void(0)" onclick="header_actions('/openerp/requests')" class="req_messages"><small>${total_request}</small></a> |
223 | - <ul> |
224 | - <li class="first last"><a href="javascript: void(0)" onclick="header_actions('/openerp/requests')">${_("Requests")}</a></li> |
225 | - </ul> |
226 | - </li> |
227 | - |
228 | - <li><a href="javascript: void(0)" onclick="header_actions('/openerp/pref/create')" class="preferences">${_("Preferences")}</a> |
229 | - <ul> |
230 | - <li class="first last"><a href="javascript: void(0)" onclick="header_actions('/openerp/pref/create')">${_("Edit Preferences")}</a></li> |
231 | - </ul> |
232 | - </li> |
233 | - <li><a href="javascript: void(0)" onclick="header_actions('/openerp/about')" class="info">${_("About")}</a> |
234 | - <ul> |
235 | - <li class="first last"><a href="javascript: void(0)" onclick="header_actions('/openerp/about')">${_("About")}</a></li> |
236 | - </ul> |
237 | - </li> |
238 | - |
239 | - <li><a target="_blank" href="http://doc.openerp.com/" class="help">${_("Help")}</a> |
240 | - <ul> |
241 | - <li class="first last"><a target="_blank" href="http://doc.openerp.com/">${_("Help")}</a></li> |
242 | - </ul> |
243 | - </li> |
244 | - |
245 | - % if cp.config('server.environment') == 'production': |
246 | - <li id="clear_cache"><a href="javascript: void(0)" onclick="header_actions('/openerp/pref/clear_cache')" class="clear_cache">${_("Clear Cache")}</a> |
247 | - <ul> |
248 | - <li class="first last"><a href="javascript: void(0);">${_("Clear Cache")}</a></li> |
249 | - </ul> |
250 | - </li> |
251 | - % endif |
252 | - </ul> |
253 | - <p class="logout"><a href="${py.url('/openerp/logout')}" target="_top">${_("Logout")}</a></p> |
254 | - </div> |
255 | - % endif |
256 | - |
257 | + <div id="corner"> |
258 | + <ul class="tools"> |
259 | + <li><a href="${py.url('/openerp')}" target="_top" class="home">${_("Home")}</a> |
260 | + <ul> |
261 | + <li class="first last"><a href="${py.url('/openerp')}" target="_top">${_("Home")}</a></li> |
262 | + </ul> |
263 | + </li> |
264 | + <li> |
265 | + <a href="${py.url('/openerp/requests')}" class="req_messages"><small>${total_request}</small></a> |
266 | + <ul> |
267 | + <li class="first last"><a href="${py.url('/openerp/requests')}">${_("Requests")}</a></li> |
268 | + </ul> |
269 | + </li> |
270 | + |
271 | + <li><a href="${py.url('/openerp/pref/create')}" class="preferences">${_("Preferences")}</a> |
272 | + <ul> |
273 | + <li class="first last"><a href="${py.url('/openerp/pref/create')}">${_("Edit Preferences")}</a></li> |
274 | + </ul> |
275 | + </li> |
276 | + <li><a href="/openerp/about" class="info">${_("About")}</a> |
277 | + <ul> |
278 | + <li class="first last"><a href="/openerp/about">${_("About")}</a></li> |
279 | + </ul> |
280 | + </li> |
281 | + |
282 | + <li><a target="_blank" href="http://doc.openerp.com/" class="help">${_("Help")}</a> |
283 | + <ul> |
284 | + <li class="first last"><a target="_blank" href="http://doc.openerp.com/">${_("Help")}</a></li> |
285 | + </ul> |
286 | + </li> |
287 | + |
288 | + % if cp.config('server.environment') == 'production': |
289 | + <li id="clear_cache"><a href="${py.url('/openerp/pref/clear_cache')}" class="clear_cache">${_("Clear Cache")}</a> |
290 | + <ul> |
291 | + <li class="first last"><a href="javascript: void(0);">${_("Clear Cache")}</a></li> |
292 | + </ul> |
293 | + </li> |
294 | + % endif |
295 | + </ul> |
296 | + <p class="logout"><a href="${py.url('/openerp/logout')}" target="_top">${_("Logout")}</a></p> |
297 | + </div> |
298 | + % endif |
299 | + |
300 | <div id="shortcuts" class="menubar"> |
301 | % if logged: |
302 | <ul> |
303 | - % for i, sc in enumerate(shortcuts): |
304 | - <li class="${i == 0 and 'first' or ''}"> |
305 | - <a id="shortcut_${sc['res_id']}" |
306 | - href="javascript: void(0)" |
307 | - onclick='header_actions("/openerp/tree/open","${sc['res_id']}", "ir.ui.menu")'> |
308 | - <span>${sc['name']}</span> |
309 | - </a> |
310 | - </li> |
311 | - % endfor |
312 | + % for i, sc in enumerate(shortcuts): |
313 | + <li class="${i == 0 and 'first' or ''}"> |
314 | + <a id="shortcut_${sc['res_id']}" |
315 | + href="${py.url('/openerp/tree/open', id=sc['res_id'], model='ir.ui.menu')}"> |
316 | + <span>${sc['name']}</span> |
317 | + </a> |
318 | + </li> |
319 | + % endfor |
320 | </ul> |
321 | % endif |
322 | </div> |
323 | |
324 | === added file 'addons/openerp/controllers/templates/index.mako' |
325 | --- addons/openerp/controllers/templates/index.mako 1970-01-01 00:00:00 +0000 |
326 | +++ addons/openerp/controllers/templates/index.mako 2010-10-05 13:06:51 +0000 |
327 | @@ -0,0 +1,159 @@ |
328 | +<%inherit file="/openerp/controllers/templates/base_dispatch.mako"/> |
329 | + |
330 | +<%def name="header()"> |
331 | + <title>OpenERP</title> |
332 | + |
333 | + <script type="text/javascript" src="/openerp/static/javascript/accordion.js"></script> |
334 | + <script type="text/javascript" src="/openerp/static/javascript/treegrid.js"></script> |
335 | + <script type="text/javascript" src="/openerp/static/javascript/notebook/notebook.js"></script> |
336 | + |
337 | + <script type="text/javascript"> |
338 | + var DOCUMENT_TO_LOAD = "${load_content}"; |
339 | + var CAL_INSTANCE = null; |
340 | + |
341 | + jQuery(document).ready(function () { |
342 | + // Don't load doc if there is a hash-url, it takes precedence |
343 | + if(DOCUMENT_TO_LOAD && !hashUrl()) { |
344 | + openLink(DOCUMENT_TO_LOAD); |
345 | + } |
346 | + |
347 | + jQuery('.toggle-menu').toggler('#content') |
348 | + }); |
349 | + |
350 | + </script> |
351 | +</%def> |
352 | + |
353 | +<%def name="content()"> |
354 | + |
355 | + <div id="root"> |
356 | + <table id="content" class="three-a open" width="100%"> |
357 | + <tr> |
358 | + <%include file="header.mako"/> |
359 | + </tr> |
360 | + <tr> |
361 | + <td id="main_nav" colspan="3"> |
362 | + <div id="applications_menu"> |
363 | + <ul> |
364 | + %for parent in parents: |
365 | + <li> |
366 | + <a href="${py.url('/openerp/menu', active=parent['id'])}" |
367 | + target="_top" class="${parent.get('active', '')}"> |
368 | + <span>${parent['name']}</span> |
369 | + </a> |
370 | + </li> |
371 | + % endfor |
372 | + </ul> |
373 | + </div> |
374 | + </td> |
375 | + </tr> |
376 | + % if tools: |
377 | + <tr> |
378 | + <td id="secondary" class="sidenav-open"> |
379 | + <div class="wrap"> |
380 | + <ul id="sidenav-a" class="accordion"> |
381 | + % for tool in tools: |
382 | + % if tool.get('action'): |
383 | + <li class="accordion-title" id="${tool['id']}"> |
384 | + % else: |
385 | + <li class="accordion-title"> |
386 | + % endif |
387 | + <span>${tool['name']}</span> |
388 | + </li> |
389 | + <li class="accordion-content" id="content_${tool['id']}"> |
390 | + ${tool['tree'].display()} |
391 | + </li> |
392 | + % endfor |
393 | + </ul> |
394 | + <script type="text/javascript"> |
395 | + new Accordion("sidenav-a"); |
396 | + </script> |
397 | + </div> |
398 | + </td> |
399 | + <td class="toggle-menu"></td> |
400 | + <td id="primary" width="100%"> |
401 | + <div class="wrap"> |
402 | + <div id="appContent"></div> |
403 | + </div> |
404 | + </td> |
405 | + </tr> |
406 | + % else: |
407 | + <tr> |
408 | + <td colspan="3"> |
409 | + <table width="100%"> |
410 | + <tr> |
411 | + <td id="primary" width="70%"> |
412 | + <div class="wrap" style="padding: 10px;"> |
413 | + <ul class="sections-a"> |
414 | + % for parent in parents: |
415 | + <li class="${'-'.join(parent['name'].split(' ')).lower()}"> |
416 | + <span class="wrap"> |
417 | + <a href="${py.url('/openerp/menu', active=parent['id'])}" target="_top"> |
418 | + <span> |
419 | + <strong>${parent['name']}</strong> |
420 | + </span> |
421 | + </a> |
422 | + </span> |
423 | + </li> |
424 | + % endfor |
425 | + </ul> |
426 | + </div> |
427 | + </td> |
428 | + <td class="tertiary"> |
429 | + <div class="wrap" style="padding: 10px;"> |
430 | + <ul class="split-a"> |
431 | + <li class="one"> |
432 | + <a class="cta-a" href="http://www.openerp.com/services/subscribe-onsite" target="_blank"> |
433 | + <span> |
434 | + <strong>${_('Use On-Site')}</strong> |
435 | + Get the openERP Warranty |
436 | + </span> |
437 | + </a> |
438 | + </li> |
439 | + <li class="two"> |
440 | + <a class="cta-a" href="http://www.openerp.com/online" target="_blank"> |
441 | + <span> |
442 | + <strong>${_('Use Online')}</strong> |
443 | + Subscribe and start |
444 | + </span> |
445 | + </a> |
446 | + </li> |
447 | + </ul> |
448 | + </div> |
449 | + <div class="box-a"> |
450 | + <ul class="side"> |
451 | + </ul> |
452 | + % for widget in widgets: |
453 | + <div> |
454 | + <h3>${widget['title']}</h3> |
455 | + ${widget['content']|n} |
456 | + </div> |
457 | + % endfor |
458 | + </div> |
459 | + </td> |
460 | + </tr> |
461 | + </table> |
462 | + </td> |
463 | + </tr> |
464 | + % endif |
465 | + <tr> |
466 | + <td id="footer_section" colspan="3"> |
467 | + % if cp.config('server.environment') == 'development': |
468 | + <div class="footer-a"> |
469 | + <p class="one"> |
470 | + <span>${rpc.session.protocol}://${_("%(user)s", user=rpc.session.loginname)}@${rpc.session.host}:${rpc.session.port}</span> |
471 | + </p> |
472 | + <p class="powered">${_("Powered by %(openerp)s ", |
473 | + openerp="""<a target="_blank" href="http://www.openerp.com/">openerp.com</a>""")|n}</p> |
474 | + </div> |
475 | + % else: |
476 | + <div class="footer-b"> |
477 | + <p class="powered">${_("Powered by %(openerp)s ", |
478 | + openerp="""<a target="_blank" href="http://www.openerp.com/">openerp.com</a>""")|n}</p> |
479 | + </div> |
480 | + % endif |
481 | + </td> |
482 | + </tr> |
483 | + </table> |
484 | + </div> |
485 | +</%def> |
486 | + |
487 | |
488 | === removed file 'addons/openerp/controllers/templates/menu.mako' |
489 | --- addons/openerp/controllers/templates/menu.mako 2010-10-01 08:16:56 +0000 |
490 | +++ addons/openerp/controllers/templates/menu.mako 1970-01-01 00:00:00 +0000 |
491 | @@ -1,99 +0,0 @@ |
492 | -<%inherit file="/openerp/controllers/templates/base_dispatch.mako"/> |
493 | - |
494 | -<%def name="header()"> |
495 | - <title>OpenERP</title> |
496 | - |
497 | - <script type="text/javascript" src="/openerp/static/javascript/accordion.js"></script> |
498 | - <script type="text/javascript" src="/openerp/static/javascript/treegrid.js"></script> |
499 | - <script type="text/javascript" src="/openerp/static/javascript/notebook/notebook.js"></script> |
500 | - |
501 | - <script type="text/javascript"> |
502 | - var DOCUMENT_TO_LOAD = "${load_content}"; |
503 | - var CAL_INSTANCE = null; |
504 | - |
505 | - jQuery(document).ready(function () { |
506 | - // Don't load doc if there is a hash-url, it takes precedence |
507 | - if(DOCUMENT_TO_LOAD && !hashUrl()) { |
508 | - openLink(DOCUMENT_TO_LOAD); |
509 | - } |
510 | - |
511 | - jQuery('.toggle-menu').toggler('#content') |
512 | - }); |
513 | - |
514 | - </script> |
515 | -</%def> |
516 | - |
517 | -<%def name="content()"> |
518 | - |
519 | - <div id="root"> |
520 | - <table id="content" class="three-a open" width="100%"> |
521 | - <tr> |
522 | - <%include file="header.mako"/> |
523 | - </tr> |
524 | - <tr> |
525 | - <td id="main_nav" colspan="3"> |
526 | - <div id="applications_menu"> |
527 | - <ul> |
528 | - %for parent in parents: |
529 | - <li> |
530 | - <a href="${py.url('/openerp/menu', active=parent['id'])}" |
531 | - target="_top" class="${parent.get('active', '')}"> |
532 | - <span>${parent['name']}</span> |
533 | - </a> |
534 | - </li> |
535 | - % endfor |
536 | - </ul> |
537 | - </div> |
538 | - </td> |
539 | - </tr> |
540 | - <tr> |
541 | - <td id="secondary" class="sidenav-open"> |
542 | - <div class="wrap"> |
543 | - <ul id="sidenav-a" class="accordion"> |
544 | - % for tool in tools: |
545 | - % if tool.get('action'): |
546 | - <li class="accordion-title" id="${tool['id']}"> |
547 | - % else: |
548 | - <li class="accordion-title"> |
549 | - % endif |
550 | - <span>${tool['name']}</span> |
551 | - </li> |
552 | - <li class="accordion-content" id="content_${tool['id']}"> |
553 | - ${tool['tree'].display()} |
554 | - </li> |
555 | - % endfor |
556 | - </ul> |
557 | - <script type="text/javascript"> |
558 | - new Accordion("sidenav-a"); |
559 | - </script> |
560 | - </div> |
561 | - </td> |
562 | - <td class="toggle-menu"></td> |
563 | - <td id="primary" width="100%"> |
564 | - <div class="wrap"> |
565 | - <div id="appContent"></div> |
566 | - </div> |
567 | - </td> |
568 | - </tr> |
569 | - <tr> |
570 | - <td id="footer_section" colspan="3"> |
571 | - % if cp.config('server.environment') == 'development': |
572 | - <div class="footer-a"> |
573 | - <p class="one"> |
574 | - <span>${rpc.session.protocol}://${_("%(user)s", user=rpc.session.loginname)}@${rpc.session.host}:${rpc.session.port}</span> |
575 | - </p> |
576 | - <p class="powered">${_("Powered by %(openerp)s ", |
577 | - openerp="""<a target="_blank" href="http://www.openerp.com/">openerp.com</a>""")|n}</p> |
578 | - </div> |
579 | - % else: |
580 | - <div class="footer-b"> |
581 | - <p class="powered">${_("Powered by %(openerp)s ", |
582 | - openerp="""<a target="_blank" href="http://www.openerp.com/">openerp.com</a>""")|n}</p> |
583 | - </div> |
584 | - % endif |
585 | - </td> |
586 | - </tr> |
587 | - </table> |
588 | - </div> |
589 | -</%def> |
590 | - |
591 | |
592 | === modified file 'addons/openerp/static/css/screen.css' |
593 | --- addons/openerp/static/css/screen.css 2010-10-01 08:16:56 +0000 |
594 | +++ addons/openerp/static/css/screen.css 2010-10-05 13:06:51 +0000 |
595 | @@ -1689,7 +1689,7 @@ |
596 | background-image: url(../images/sections-a-i-flag.png); |
597 | } |
598 | |
599 | -ul.sections-a li.inventory span.wrap a { |
600 | +ul.sections-a li.warehouse span.wrap a { |
601 | background-image: url(../images/sections-a-i-box.png); |
602 | } |
603 | |
604 | @@ -1705,7 +1705,7 @@ |
605 | background-image: url(../images/sections-a-i-wallet.png); |
606 | } |
607 | |
608 | -ul.sections-a li.point span.wrap a { |
609 | +ul.sections-a li.point-of-sale span.wrap a { |
610 | background-image: url(../images/sections-a-i-tag.png); |
611 | } |
612 | |
613 | @@ -1721,14 +1721,14 @@ |
614 | background-image: url(../images/sections-a-i-charts.png); |
615 | } |
616 | |
617 | -ul.sections-a li.chat span.wrap a { |
618 | - background-image: url(../images/sections-a-i-dialog.png); |
619 | -} |
620 | - |
621 | ul.sections-a li.administration span.wrap a { |
622 | background-image: url(../images/sections-a-i-briefcase.png); |
623 | } |
624 | |
625 | +ul.sections-a li.tools span.wrap a { |
626 | + background-image: url(../images/sections-a-i-tools.png); |
627 | +} |
628 | + |
629 | ul.sections-a li span.wrap a span { |
630 | position: absolute; |
631 | left: -5px; |
632 | @@ -1866,12 +1866,12 @@ |
633 | |
634 | ul.split-a .one { |
635 | float: left; |
636 | - width: 150px; |
637 | + width: 55%; |
638 | } |
639 | |
640 | ul.split-a .two { |
641 | float: right; |
642 | - width: 150px; |
643 | + width: 45%; |
644 | } |
645 | |
646 | #view-selector { |
647 | @@ -2064,6 +2064,17 @@ |
648 | } |
649 | |
650 | /* sidebar */ |
651 | +td.tertiary { |
652 | + background: url(../images/tertiary-bg-a.gif) repeat-y scroll 0 0 #EAE7E7; |
653 | + min-height: 100%; |
654 | + border-left: 1px solid #D2CFCF; |
655 | + vertical-align: top; |
656 | +} |
657 | + |
658 | +td.tertiary div.wrap { |
659 | + margin-top: 9px; |
660 | +} |
661 | + |
662 | #tertiary { |
663 | position: relative; |
664 | float: right; |
665 | @@ -2318,6 +2329,7 @@ |
666 | text-transform: uppercase; |
667 | font-weight: bold; |
668 | text-shadow: #fff 0 1px 0; |
669 | + margin: 2px; |
670 | } |
671 | |
672 | a.cta-a:hover,a.cta-a:focus,a.cta-a:active { |
673 | @@ -2326,8 +2338,7 @@ |
674 | |
675 | a.cta-a span { |
676 | float: left; |
677 | - width: 95px; |
678 | - padding: 7px 0 5px 32px; |
679 | + padding: 7px 0 5px 5px; |
680 | background-position: 0 50%; |
681 | background-repeat: no-repeat; |
682 | cursor: pointer; |
683 | |
684 | === added file 'addons/openerp/static/images/sections-a-i-tools.png' |
685 | Binary files addons/openerp/static/images/sections-a-i-tools.png 1970-01-01 00:00:00 +0000 and addons/openerp/static/images/sections-a-i-tools.png 2010-10-05 13:06:51 +0000 differ |
686 | === modified file 'addons/openerp/static/javascript/openerp/openerp.base.js' |
687 | --- addons/openerp/static/javascript/openerp/openerp.base.js 2010-09-27 07:52:12 +0000 |
688 | +++ addons/openerp/static/javascript/openerp/openerp.base.js 2010-10-05 13:06:51 +0000 |
689 | @@ -120,6 +120,15 @@ |
690 | }); |
691 | return false; |
692 | }); |
693 | + } else { |
694 | + if (jQuery(document).find('div#root').length) { |
695 | + jQuery(document).delegate('a[href]:not([target]):not([href^="#"]):not([href^="javascript"]):not([rel=external])', 'click', function(){ |
696 | + window.location.href = openobject.http.getURL('/openerp', { |
697 | + 'next': jQuery(this).attr('href') |
698 | + }) |
699 | + return false; |
700 | + }); |
701 | + } |
702 | } |
703 | |
704 | // wash for hash changes |
705 | |
706 | === modified file 'addons/openerp/static/javascript/openerp/openerp.ui.js' |
707 | --- addons/openerp/static/javascript/openerp/openerp.ui.js 2010-10-01 08:16:56 +0000 |
708 | +++ addons/openerp/static/javascript/openerp/openerp.ui.js 2010-10-05 13:06:51 +0000 |
709 | @@ -158,20 +158,6 @@ |
710 | } |
711 | })(jQuery); |
712 | |
713 | -function header_actions(url) { |
714 | - // For shortcuts |
715 | - if(arguments[1]) { |
716 | - url = openobject.http.getURL(url, {'id': arguments[1], 'model': arguments[2]}); |
717 | - } |
718 | - |
719 | - if(jQuery('#appContent').length) { |
720 | - openLink(url) |
721 | - } |
722 | - else { |
723 | - window.location.href = openobject.http.getURL('/openerp/menu', {'next': url}) |
724 | - } |
725 | -} |
726 | - |
727 | jQuery(document).ready(function () { |
728 | jQuery('#applications_menu').scrollify(); |
729 | jQuery('#shortcuts').scrollify(); |
* Don't change link from OpenERP logo, it should direct to "/" not the openerp website.
* Why still have home() and index()?
* Homepage is broken in webkit (size of sidebar is wrong)
* Margins and paddings are not good for buttons:
- Image on left of button was removed but padding wasn't.
- Buttons are too big, remove subtext (in gray), make font size bigger (too small), fix paddings so they're same distance from borders of sidebar as from one another
* Remove "Dashboard" title on left side
* Home is on url /openerp/menu, should be on /openerp after fusion of /openerp and /openerp/home
* There are still references to /openerp/home in code why?
* Handling of menu item actions is broken (in homepage and applications menu): when there is no action associated with the application, we get an error message (e.g. in home page or menu, click on "Administration")