summaryrefslogtreecommitdiff
path: root/addons/web_dashboard
diff options
context:
space:
mode:
authorVidhin Mehta (OpenERP) <vme@tinyerp.com>2011-10-25 16:55:48 +0530
committerVidhin Mehta (OpenERP) <vme@tinyerp.com>2011-10-25 16:55:48 +0530
commitc17c8a0bd10d5c9cedd6c34bc0110c02ecdcd6b2 (patch)
treeb4543c28941307f8ebdd60191f2eb2494139aad2 /addons/web_dashboard
parent1ee677eadbfa3e4c7d9836c48bea735f41f6a5a7 (diff)
parent55ad46220db83d2f5d6dd86d243d0d9843b74511 (diff)
[IMP]merge with main branch of view editor.
bzr revid: vme@tinyerp.com-20111025112548-eakr7fio6diovn2m
Diffstat (limited to 'addons/web_dashboard')
-rw-r--r--addons/web_dashboard/controllers.py12
-rw-r--r--addons/web_dashboard/po/es.po46
-rw-r--r--addons/web_dashboard/po/fr.po46
-rw-r--r--addons/web_dashboard/po/gl.po46
-rw-r--r--addons/web_dashboard/po/sk.po46
-rw-r--r--addons/web_dashboard/po/sl.po46
-rw-r--r--addons/web_dashboard/static/src/css/dashboard.css4
-rw-r--r--addons/web_dashboard/static/src/js/dashboard.js42
-rw-r--r--addons/web_dashboard/static/src/xml/web_dashboard.xml3
9 files changed, 258 insertions, 33 deletions
diff --git a/addons/web_dashboard/controllers.py b/addons/web_dashboard/controllers.py
index ebf74837899..0f6ae5dad7d 100644
--- a/addons/web_dashboard/controllers.py
+++ b/addons/web_dashboard/controllers.py
@@ -22,11 +22,7 @@ class Widgets(openerpweb.Controller):
_cp_path = '/web_dashboard/widgets'
@openerpweb.httprequest
- def content(self, req, widget_id):
- Widget = req.session.model('res.widget')
- w = Widget.read([widget_id], ['content'], req.session.eval_context(req.context))
- if w:
- r = WIDGET_CONTENT_PATTERN % w[0]
- else:
- r = "Widget unavailable"
- return r
+ def content(self, request, widget_id):
+ return WIDGET_CONTENT_PATTERN % request.session.model('res.widget').read(
+ [int(widget_id)], ['content'], request.session.eval_context(request.context)
+ )[0]
diff --git a/addons/web_dashboard/po/es.po b/addons/web_dashboard/po/es.po
new file mode 100644
index 00000000000..8cd91812416
--- /dev/null
+++ b/addons/web_dashboard/po/es.po
@@ -0,0 +1,46 @@
+# Spanish translation for openerp-web
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the openerp-web package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openerp-web\n"
+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
+"POT-Creation-Date: 2011-10-07 10:39+0200\n"
+"PO-Revision-Date: 2011-10-18 10:44+0000\n"
+"Last-Translator: Amós Oviedo <Unknown>\n"
+"Language-Team: Spanish <es@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2011-10-19 06:05+0000\n"
+"X-Generator: Launchpad (build 14157)\n"
+
+#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
+msgid "Reset"
+msgstr "Reiniciar"
+
+#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
+msgid "Undo"
+msgstr "Deshacer"
+
+#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
+msgid "Add Widget"
+msgstr "Añadir Widget"
+
+#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
+msgid "Change layout"
+msgstr "Cambiar disposición"
+
+#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
+msgid "Choose dashboard layout"
+msgstr "Cambiar disposición del tablero"
+
+#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
+msgid "progress:"
+msgstr "progreso:"
+
+#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
+msgid "%"
+msgstr "%"
diff --git a/addons/web_dashboard/po/fr.po b/addons/web_dashboard/po/fr.po
new file mode 100644
index 00000000000..b02d061cdd2
--- /dev/null
+++ b/addons/web_dashboard/po/fr.po
@@ -0,0 +1,46 @@
+# French translation for openerp-web
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the openerp-web package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openerp-web\n"
+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
+"POT-Creation-Date: 2011-10-07 10:39+0200\n"
+"PO-Revision-Date: 2011-10-23 12:11+0000\n"
+"Last-Translator: Xavier (Open ERP) <Unknown>\n"
+"Language-Team: French <fr@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2011-10-24 05:18+0000\n"
+"X-Generator: Launchpad (build 14185)\n"
+
+#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
+msgid "Reset"
+msgstr ""
+
+#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
+msgid "Undo"
+msgstr "Annuler"
+
+#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
+msgid "Add Widget"
+msgstr "Ajouter un Gadget"
+
+#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
+msgid "Change layout"
+msgstr "Changer la mise en page"
+
+#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
+msgid "Choose dashboard layout"
+msgstr "Choisissez la mise en page du tableau de bord"
+
+#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
+msgid "progress:"
+msgstr "progrès"
+
+#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
+msgid "%"
+msgstr "%"
diff --git a/addons/web_dashboard/po/gl.po b/addons/web_dashboard/po/gl.po
new file mode 100644
index 00000000000..b7a081aff6f
--- /dev/null
+++ b/addons/web_dashboard/po/gl.po
@@ -0,0 +1,46 @@
+# Galician translation for openerp-web
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the openerp-web package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openerp-web\n"
+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
+"POT-Creation-Date: 2011-10-07 10:39+0200\n"
+"PO-Revision-Date: 2011-10-19 10:29+0000\n"
+"Last-Translator: Amós Oviedo <Unknown>\n"
+"Language-Team: Galician <gl@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2011-10-20 04:48+0000\n"
+"X-Generator: Launchpad (build 14165)\n"
+
+#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
+msgid "Reset"
+msgstr "Reiniciar"
+
+#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
+msgid "Undo"
+msgstr "Desfacer"
+
+#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
+msgid "Add Widget"
+msgstr "Engadir un widget"
+
+#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
+msgid "Change layout"
+msgstr "Cambiar disposición"
+
+#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
+msgid "Choose dashboard layout"
+msgstr "Cambiar disposición do taboleiro"
+
+#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
+msgid "progress:"
+msgstr "progreso:"
+
+#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
+msgid "%"
+msgstr "%"
diff --git a/addons/web_dashboard/po/sk.po b/addons/web_dashboard/po/sk.po
new file mode 100644
index 00000000000..d2c2b2160a0
--- /dev/null
+++ b/addons/web_dashboard/po/sk.po
@@ -0,0 +1,46 @@
+# Slovak translation for openerp-web
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the openerp-web package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openerp-web\n"
+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
+"POT-Creation-Date: 2011-10-07 10:39+0200\n"
+"PO-Revision-Date: 2011-10-23 14:45+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Slovak <sk@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2011-10-24 05:18+0000\n"
+"X-Generator: Launchpad (build 14185)\n"
+
+#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
+msgid "Reset"
+msgstr ""
+
+#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
+msgid "Undo"
+msgstr ""
+
+#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
+msgid "Add Widget"
+msgstr ""
+
+#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
+msgid "Change layout"
+msgstr ""
+
+#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
+msgid "Choose dashboard layout"
+msgstr ""
+
+#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
+msgid "progress:"
+msgstr ""
+
+#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
+msgid "%"
+msgstr ""
diff --git a/addons/web_dashboard/po/sl.po b/addons/web_dashboard/po/sl.po
new file mode 100644
index 00000000000..9eee401c427
--- /dev/null
+++ b/addons/web_dashboard/po/sl.po
@@ -0,0 +1,46 @@
+# Slovenian translation for openerp-web
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the openerp-web package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openerp-web\n"
+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
+"POT-Creation-Date: 2011-10-07 10:39+0200\n"
+"PO-Revision-Date: 2011-10-19 06:25+0000\n"
+"Last-Translator: Anze (Neotek) <Unknown>\n"
+"Language-Team: Slovenian <sl@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2011-10-20 04:48+0000\n"
+"X-Generator: Launchpad (build 14165)\n"
+
+#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
+msgid "Reset"
+msgstr "Ponastavi"
+
+#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
+msgid "Undo"
+msgstr "Razveljavi"
+
+#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
+msgid "Add Widget"
+msgstr "Dodaj gradnik"
+
+#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
+msgid "Change layout"
+msgstr "Spreminjanje postavitve"
+
+#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
+msgid "Choose dashboard layout"
+msgstr "Izberite postavitev nadzorne plošče"
+
+#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
+msgid "progress:"
+msgstr "napredek:"
+
+#: addons/web_dashboard/static/src/xml/web_dashboard.xml:0
+msgid "%"
+msgstr "%"
diff --git a/addons/web_dashboard/static/src/css/dashboard.css b/addons/web_dashboard/static/src/css/dashboard.css
index 4d48cd4ffbd..54b1cc7d2b5 100644
--- a/addons/web_dashboard/static/src/css/dashboard.css
+++ b/addons/web_dashboard/static/src/css/dashboard.css
@@ -34,6 +34,10 @@
-webkit-border-top-right-radius: 3px;
border-top-right-radius: 3px;
}
+.openerp h2.oe-dashboard-action-header-empty {
+ padding-top: 0;
+ padding-bottom: 2px;
+}
.openerp a.oe-dashboard-action-rename {
float: left;
diff --git a/addons/web_dashboard/static/src/js/dashboard.js b/addons/web_dashboard/static/src/js/dashboard.js
index 3163453a122..923b43ce034 100644
--- a/addons/web_dashboard/static/src/js/dashboard.js
+++ b/addons/web_dashboard/static/src/js/dashboard.js
@@ -378,8 +378,8 @@ openerp.web_dashboard.apps = {
module: 'account_voucher', name: 'Invoicing',
help: "Send invoice, track payments and reminders"
}, {
- module: 'project', name: 'Projects',
- help: "Manage projects, track tasks, invoice task works, follow issues, \u2026"
+ module: 'point_of_sale', name: 'Point of Sales',
+ help: "Manage shop sales, use touch-screen POS"
}
], [
{
@@ -389,19 +389,19 @@ openerp.web_dashboard.apps = {
module: 'stock', name: 'Warehouse',
help: "Track your stocks, schedule product moves, manage incoming and outgoing shipments, \u2026"
}, {
- module: 'hr', name: 'Human Resources',
- help: "Manage employees and their contracts, follow laves, recruit people, \u2026"
+ module: 'mrp', name: 'Manufacturing',
+ help: "Manage your manufacturing, control your supply chain, personalize master data, \u2026"
}, {
- module: 'point_of_sale', name: 'Point of Sales',
- help: "Manage shop sales, use touch-screen POS"
+ module: 'account_accountant', name: 'Accounting and Finance',
+ help: "Record financial operations, automate followup, manage multi-currency, \u2026"
}
], [
{
- module: 'profile_tools', name: 'Extra Tools',
- help: "Track ideas, manage lunch, create surveys, share data"
+ module: 'project', name: 'Projects',
+ help: "Manage projects, track tasks, invoice task works, follow issues, \u2026"
}, {
- module: 'mrp', name: 'Manufacturing',
- help: "Manage your manufacturing, control your supply chain, personalize master data, \u2026"
+ module: 'hr', name: 'Human Resources',
+ help: "Manage employees and their contracts, follow laves, recruit people, \u2026"
}, {
module: 'marketing', name: 'Marketing',
help: "Manage campaigns, follow activities, automate emails, \u2026"
@@ -420,18 +420,15 @@ openerp.web_dashboard.ApplicationTiles = openerp.web.View.extend({
// Check for installed application
var Installer = new openerp.web.DataSet(this, 'base.setup.installer');
Installer.call('default_get', [], function (installed_modules) {
- var installed = false;
- _.each(installed_modules, function(v,k) {
- if(_.startsWith(k,"cat")) {
- installed =installed || v;
- }
- });
+ var installed = _(installed_modules).any(function (active, name) {
+ return _.startsWith(name, 'cat') && active; });
+
if(installed) {
self.do_display_root_menu();
} else {
self.do_display_installer();
}
- } );
+ });
},
do_display_root_menu: function() {
var self = this;
@@ -446,10 +443,8 @@ openerp.web_dashboard.ApplicationTiles = openerp.web.View.extend({
self.$element.append(tiles)
.find('.oe-dashboard-home-tile')
.click(function () {
- var $this = $(this);
- $this.closest('.openerp')
- .find('.menu a[data-menu=' + $this.data('menuid') + ']')
- .click();});
+ openerp.webclient.menu.on_menu_click(null, $(this).data('menuid'))
+ });
});
return r;
},
@@ -490,9 +485,8 @@ openerp.web_dashboard.ApplicationTiles = openerp.web.View.extend({
var self = this;
new openerp.web.DataSet(this, 'res.config').call('start', [[]], function (action) {
$.unblockUI();
- self.do_action(action, function () {
- // TODO: less brutal reloading
- window.location.reload(true);
+ self.widget_parent.widget_parent.do_action(action, function () {
+ openerp.webclient.do_reload();
});
});
}
diff --git a/addons/web_dashboard/static/src/xml/web_dashboard.xml b/addons/web_dashboard/static/src/xml/web_dashboard.xml
index fe96d72855d..87222baa5fd 100644
--- a/addons/web_dashboard/static/src/xml/web_dashboard.xml
+++ b/addons/web_dashboard/static/src/xml/web_dashboard.xml
@@ -30,9 +30,10 @@
</t>
<t t-name="DashBoard.action">
<div t-att-data-id="action.attrs.name" class="oe-dashboard-action">
- <h2 class="oe-dashboard-action-header oe_view_title">
+ <h2 t-attf-class="oe-dashboard-action-header oe_view_title #{action.attrs.string ? '' : 'oe-dashboard-action-header-empty'}">
<input class="oe-dashboard-action-input" type="text" name="title" value="" style="display: none"/>
<t t-esc="action.attrs.string"/>
+ <t t-if="!action.attrs.string">&amp;nbsp;</t>
<span class='ui-icon ui-icon-closethick'></span>
<span class='ui-icon ui-icon-minusthick oe-dashboard-fold' t-if="!action.attrs.fold"></span>
<span class='ui-icon ui-icon-plusthick oe-dashboard-fold' t-if="action.attrs.fold"></span>