Merge lp:~therp-nl/web-addons/7.0-web_popup_large into lp:~webaddons-core-editors/web-addons/7.0

Proposed by Stefan Rijnhart (Opener)
Status: Merged
Merged at revision: 7
Proposed branch: lp:~therp-nl/web-addons/7.0-web_popup_large
Merge into: lp:~webaddons-core-editors/web-addons/7.0
Diff against target: 73 lines (+59/-0)
2 files modified
web_popup_large/__openerp__.py (+34/-0)
web_popup_large/static/src/js/web_popup_large.js (+25/-0)
To merge this branch: bzr merge lp:~therp-nl/web-addons/7.0-web_popup_large
Reviewer Review Type Date Requested Status
Pedro Manuel Baeza Approve
Nhomar - Vauxoo Approve
Holger Brunn (Therp) code review Approve
Review via email: mp+186496@code.launchpad.net

Description of the change

This is a very small module to set default pop-up width in the web client to 95%, instead of the hardcoded 900 pixels.

If you think this module does not qualify for a community project because it is too trivial or the cosmetic change that it imposes is just arbitrary, let me know and I'll simply retract this proposal.

To post a comment you must log in.
8. By Stefan Rijnhart (Opener)

[FIX] Fix the wording of the description in the module description

Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote :

To make a point against this MP's arbitrarity: It actually helps usability if we use the screen efficiently. Further, 900px hurt on a small screen, then we also have to scroll horizontally sometimes.

review: Approve (code review)
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

I also see this as an usability improvement. Only one question: why the "if (!options.width)" check and not putting always options.width ='95%'?

Regards.

review: Needs Information (code review, no test)
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

@Pedro: because the options dictionary can be filled with a distinct values for the various parameters. We only want to set a default.

Revision history for this message
Nhomar - Vauxoo (nhomar) wrote :

For me is good.

I tested and i think it is so trivial but useful....

Regards.

review: Approve
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

@Stefan, OK, I get it. Thanks for the explanation.

I proceed with the merge.

Regards.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'web_popup_large'
2=== added file 'web_popup_large/__init__.py'
3=== added file 'web_popup_large/__openerp__.py'
4--- web_popup_large/__openerp__.py 1970-01-01 00:00:00 +0000
5+++ web_popup_large/__openerp__.py 2013-09-19 10:29:04 +0000
6@@ -0,0 +1,34 @@
7+# -*- coding: utf-8 -*-
8+##############################################################################
9+#
10+# OpenERP, Open Source Management Solution
11+# This module copyright (C) 2013 Therp BV (<http://therp.nl>).
12+#
13+# This program is free software: you can redistribute it and/or modify
14+# it under the terms of the GNU Affero General Public License as
15+# published by the Free Software Foundation, either version 3 of the
16+# License, or (at your option) any later version.
17+#
18+# This program is distributed in the hope that it will be useful,
19+# but WITHOUT ANY WARRANTY; without even the implied warranty of
20+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21+# GNU Affero General Public License for more details.
22+#
23+# You should have received a copy of the GNU Affero General Public License
24+# along with this program. If not, see <http://www.gnu.org/licenses/>.
25+#
26+##############################################################################
27+{
28+ "name": "Large pop-ups in web client",
29+ "version": "7.0.1.0",
30+ "author": "Therp BV",
31+ "category": 'Usability',
32+ "description": """
33+Pop-ups in the web client have a width of 900 pixels by default.
34+This module changes this default width to 95% of the parent window.
35+ """,
36+ 'website': 'https://launchpad.net/web-addons',
37+ 'depends': ['web'],
38+ "license": 'AGPL-3',
39+ "js": ['static/src/js/web_popup_large.js'],
40+}
41
42=== added directory 'web_popup_large/static'
43=== added directory 'web_popup_large/static/src'
44=== added directory 'web_popup_large/static/src/js'
45=== added file 'web_popup_large/static/src/js/web_popup_large.js'
46--- web_popup_large/static/src/js/web_popup_large.js 1970-01-01 00:00:00 +0000
47+++ web_popup_large/static/src/js/web_popup_large.js 2013-09-19 10:29:04 +0000
48@@ -0,0 +1,25 @@
49+/*
50+
51+ Copyright (C) 2013 Therp BV
52+ License: GNU AFFERO GENERAL PUBLIC LICENSE
53+ Version 3 or any later version
54+
55+ @authors: Holger Brunn (hbrunn@therp.nl)
56+ Stefan Rijnhart (stefan@therp.nl)
57+
58+*/
59+
60+openerp.web_popup_large = function(instance) {
61+ instance.web.Dialog.include({
62+ init: function(parent, options, content)
63+ {
64+ if(!options) {
65+ options = {}
66+ }
67+ if (!options.width) {
68+ options.width = '95%';
69+ }
70+ return this._super(parent, options, content);
71+ },
72+ });
73+}

Subscribers

People subscribed via source and target branches