summaryrefslogtreecommitdiff
path: root/addons/web_dashboard/static/src
diff options
context:
space:
mode:
authorOlivier Dony <odo@openerp.com>2012-10-01 16:53:08 +0200
committerOlivier Dony <odo@openerp.com>2012-10-01 16:53:08 +0200
commit9e6920415e41a052cffa7b898bf044dbf82b5ccb (patch)
tree05e8d64788da1ff9f65e7406e3ff3d96d58a5762 /addons/web_dashboard/static/src
parent4ed79f3457a0252dcee4780385dc474ff2af356e (diff)
parent1370ae133d4477d0a7a2239732f529a1eef39824 (diff)
[MERGE] Sync with trunk
bzr revid: odo@openerp.com-20121001145308-ri5rp2cazxqxcxme
Diffstat (limited to 'addons/web_dashboard/static/src')
-rw-r--r--addons/web_dashboard/static/src/css/dashboard.css352
-rw-r--r--addons/web_dashboard/static/src/img/layout_1-1-1.pngbin306 -> 0 bytes
-rw-r--r--addons/web_dashboard/static/src/img/layout_1-1.pngbin313 -> 0 bytes
-rw-r--r--addons/web_dashboard/static/src/img/layout_1-2.pngbin313 -> 0 bytes
-rw-r--r--addons/web_dashboard/static/src/img/layout_1.pngbin292 -> 0 bytes
-rw-r--r--addons/web_dashboard/static/src/img/layout_2-1.pngbin304 -> 0 bytes
-rw-r--r--addons/web_dashboard/static/src/js/dashboard.js320
-rw-r--r--addons/web_dashboard/static/src/xml/web_dashboard.xml64
8 files changed, 0 insertions, 736 deletions
diff --git a/addons/web_dashboard/static/src/css/dashboard.css b/addons/web_dashboard/static/src/css/dashboard.css
deleted file mode 100644
index 6c7e38fd8e2..00000000000
--- a/addons/web_dashboard/static/src/css/dashboard.css
+++ /dev/null
@@ -1,352 +0,0 @@
-.openerp table.oe-dashboard {
- width: 100%;
-}
-.openerp .oe-dashboard-links {
- text-align: right;
- margin: 0 4px 6px 0;
-}
-.openerp .oe-dashboard-action {
- margin: 0 0.5em 0.5em 0;
- padding: 0px;
- background-color: white;
- border-radius: 3px;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
-}
-
-.openerp .oe-dashboard-action .oe-dashboard-action-header {
- font-size: 85%;
- font-weight: bold;
- text-transform: uppercase;
- text-indent: 10px;
- vertical-align: middle;
- border-bottom: 1px solid #e5e5e5;
- background: white url("/web/static/src/img/box-a-header-a.gif") 0% 0% repeat-x;
-}
-
-.openerp h2.oe-dashboard-action-header {
- margin: 0;
- padding:4px 4px;
- -moz-border-radius-topleft: 3px;
- -webkit-border-top-left-radius: 3px;
- border-top-left-radius: 3px;
- -moz-border-radius-topright: 3px;
- -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 .oe_dashboard_button_create {
- margin-left: 4px;
- padding: 0 4px 0 4px;
- height: 16px !important;
-}
-
-.openerp a.oe-dashboard-action-rename {
- float: left;
- padding-right: 4px;
- position: relative;
- top: 1px;
-}
-.openerp .oe-dashboard-action-input {
- height: 16px;
- position: relative;
- top: 2px;
-}
-
-.openerp .oe-dashboard-action .oe-dashboard-action-header:hover {
- cursor: move;
-}
-.openerp .oe-dashboard-action .ui-icon {
- cursor: pointer;
-}
-.openerp .oe-dashboard-action .ui-icon:hover {
- background-color: #ccc;
- border-radius: 4px;
- -moz-border-radius: 4px;
- -webkit-border-radius: 4px;
-}
-
-.openerp .oe-dashboard-action .oe-dashboard-action-header .ui-icon {
- float: right;
-}
-
-.openerp .oe-dashboard .ui-sortable-placeholder {
- border: 1px dotted black;
- visibility: visible !important;
- height: 50px !important;
-}
-
-.openerp .oe-dashboard .ui-sortable-placeholder * {
- visibility: hidden;
-}
-
-/* Base overwriting */
-.openerp .oe-dashboard .oe-listview-content, .openerp .oe-dashboard .ui-widget-header {
- border-right:none !important;
- padding:0 3px;
-}
-
-/* Layouts */
-.openerp .oe-dashboard-layout_1 .oe-dashboard-column.index_0 {
- width: 100%;
-}
-.openerp .oe-dashboard-layout_1 .oe-dashboard-column.index_1,
-.openerp .oe-dashboard-layout_1 .oe-dashboard-column.index_2 {
- display: none;
-}
-
-.openerp .oe-dashboard-layout_1-1 .oe-dashboard-column {
- width: 50%;
-}
-.openerp .oe-dashboard-layout_1-1 .oe-dashboard-column.index_2 {
- display: none;
-}
-
-.openerp .oe-dashboard-layout_1-1-1 .oe-dashboard-column {
- width: 33%;
-}
-
-.openerp .oe-dashboard-layout_2-1 .oe-dashboard-column.index_0 {
- width: 70%;
-}
-.openerp .oe-dashboard-layout_2-1 .oe-dashboard-column.index_1 {
- width: 30%;
-}
-.openerp .oe-dashboard-layout_2-1 .oe-dashboard-column.index_2 {
- display: none;
-}
-
-.openerp .oe-dashboard-layout_1-2 .oe-dashboard-column.index_0 {
- width: 30%;
-}
-.openerp .oe-dashboard-layout_1-2 .oe-dashboard-column.index_1 {
- width: 70%;
-}
-.openerp .oe-dashboard-layout_1-2 .oe-dashboard-column.index_2 {
- display: none;
-}
-
-
-.openerp .oe-dashboard-layout-selector {
- overflow: auto;
- padding: 10px;
-}
-
-.openerp .oe-dashboard-layout-selector ul {
- margin: 0;
- padding: 0;
-}
-
-.openerp .oe-dashboard-layout-selector ul li {
- position: relative;
- float: left;
- height: 51px;
- list-style-type: none;
- margin: 5px;
- padding: 0;
- width: 82px;
- cursor: pointer;
- border: 1px solid white;
-}
-.openerp .oe-dashboard-layout-selector ul li:hover {
- border: 1px solid #090;
-}
-.openerp .oe-dashboard-layout-selector ul li img.oe-selected-layout {
- position: absolute;
- top: 0px;
- right: 0px;
-}
-
-.openerp .oe-dashboard-home-tile {
- text-align: center;
- margin: 10px;
- -webkit-border-radius: 10px;
- -moz-border-radius: 10px;
- border-radius: 10px;
- -webkit-box-shadow: 3px 3px 5px 3px #DADDDD;
- -moz-box-shadow: 3px 3px 5px 3px #DADDDD;
- box-shadow: 3px 3px 5px 3px #DADDDD;
-}
-.openerp .oe-dashboard-home-tile span {
- display: block;
- padding: 0 0 15px;
- font-weight: bold;
- text-transform: uppercase;
- color: #555;
- white-space: nowrap;
-}
-.openerp .oe-dashboard-home-tile-icon {
- height: 100px;
-}
-.openerp .oe-dashboard-home-tile-icon img {
- display: block;
- margin: 0 auto;
-}
-.openerp .oe-dashboard-home-tile-icon img.hover {
- display: none;
-}
-.openerp .oe-dashboard-home-tile:hover {
- background-color: #fafafa;
- -webkit-box-shadow: 3px 3px 5px 3px #979797;
- -moz-box-shadow: 3px 3px 5px 3px #979797;
- box-shadow: 3px 3px 5px 3px #979797;
-}
-.openerp .oe-dashboard-home-tile:hover img {
- display: none;
-}
-.openerp .oe-dashboard-home-tile:hover img.hover {
- display: block;
-}
-.openerp .oe-dashboard-home-tile:hover span {
- color: black;
-}
-
-.openerp .oe-dashboard-action .view-manager-main-content {
- padding: 2px;
-}
-
-.oe-static-home {
- padding: 0.5em 0.5em;
- text-align: center;
-}
-.oe-static-home h1 {
- margin: 0 0 0.3em;
-}
-.oe-static-home-banner {
- display: inline-block;
- margin: auto 0;
- padding: 0.5em 5em;
- text-align: left;
-}
-.oe-static-home-banner li {
- font-size: 150%;
- font-weight: bold;
-}
-.oe-static-home address {
- font-style: normal;
- padding-left: 2em;
-}
-
-.oe-static-home-tiles {
- text-align: left;
-}
-.oe-static-home-tiles td {
- vertical-align: top;
-}
-.oe-static-home-tile {
- margin: 0.5em;
- padding: 0 1em;
-}
-.oe-static-home-tile-logo {
- margin-right: 0.5em;
-}
-.oe-static-home-tile-text h2 {
- margin-top: 0;
- margin-bottom: 0.2em;
-}
-.oe-static-home-tile-text p {
- margin: 0.5em 0;
-}
-
-.openerp .oe_app_tiles h1, .openerp .oe_app_tiles h3 {
- margin: 16px 24px;
-}
-
-.openerp .oe_app_tiles {
- padding: 0 10px;
-}
-
-.openerp .oe_app_tiles li {
- float: left;
- list-style: none;
-}
-
-.openerp .oe_app_tiles li img {
- display: block;
- margin: 0 auto;
- height: 100px;
- width: 100px;
-}
-.openerp .oe_app_tiles li img.hover {
- display: none;
-}
-.openerp .oe_app_tiles li:hover img {
- display: none;
-}
-.openerp .oe_app_tiles li:hover img.hover {
- display: block;
-}
-
-.openerp .oe_app_tiles li a {
- display: block;
- height: 120px;
- width: 194px;
- color: #4C4C4C;
- border: 1px solid #f4f2f2;
- margin: 6px;
- padding: 12px;
- text-align: center;
- text-transform: uppercase;
- text-decoration: none;
- font-size: 12px;
- font-weight: 800;
- background: white;
- -moz-border-radius: 6px;
- -webkit-border-radius: 6px;
- -ms-border-radius: 6px;
- border-radius: 6px;
- -moz-box-shadow: 0 1px 2px #bbb;
- -webkit-box-shadow: 0 1px 2px #bbb;
- -o-box-shadow: 0 1px 2px #bbb;
- box-shadow: 0 1px 2px #bbb;
-}
-/* changing icon for the change layout button */
-
-.openerp .oe-dashboard-link-change_layout, .openerp .oe-dashboard-link-reset {
- padding-top: 1px;
- height: 22px;
-}
-.openerp .oe-dashboard-link-change_layout > *, .openerp .oe-dashboard-link-reset > *{
- vertical-align: middle;
-}
-
-.openerp .oe_welcome_message {
- display:none;
-}
-.openerp .oe_initial_welcome_message {
- width:30%;
- text-align:center;
- margin:10px 35% 0 35%;
- padding: 5px 10px;
- border: 1px solid #ccc;
- border-radius: 5px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- background: #eeeded;
- box-shadow: 0 1px 0 #fff;
- -moz-box-shadow: 0 1px 0 #fff;
- -webkit-box-shadow: 0 1px 0 #fff;
- color: #8c8c8c;
- font-size: 90%;
- text-transform: uppercase;
- font-weight: bold;
- text-shadow: #fff 0 1px 0;
-}
-
-.openerp .oe_initial_welcome_message ul{
- padding:10px 0 0 0;
- margin:0;
- list-style-type: none;
- padding: 7px 0 5px 5px;
- background-position: 0 50%;
- background-repeat: no-repeat;
- cursor: pointer;
-}
-.openerp .oe_initial_welcome_message ul a, .openerp .initial_welcome_message ul a:hover, .openerp .initial_welcome_message ul a:active, .openerp .initial_welcome_message ul a:focus {
- color:#222;
- text-decoration:none;
-}
diff --git a/addons/web_dashboard/static/src/img/layout_1-1-1.png b/addons/web_dashboard/static/src/img/layout_1-1-1.png
deleted file mode 100644
index 5eda2823c46..00000000000
--- a/addons/web_dashboard/static/src/img/layout_1-1-1.png
+++ /dev/null
Binary files differ
diff --git a/addons/web_dashboard/static/src/img/layout_1-1.png b/addons/web_dashboard/static/src/img/layout_1-1.png
deleted file mode 100644
index e72aa3a0533..00000000000
--- a/addons/web_dashboard/static/src/img/layout_1-1.png
+++ /dev/null
Binary files differ
diff --git a/addons/web_dashboard/static/src/img/layout_1-2.png b/addons/web_dashboard/static/src/img/layout_1-2.png
deleted file mode 100644
index 4b14d7aeaad..00000000000
--- a/addons/web_dashboard/static/src/img/layout_1-2.png
+++ /dev/null
Binary files differ
diff --git a/addons/web_dashboard/static/src/img/layout_1.png b/addons/web_dashboard/static/src/img/layout_1.png
deleted file mode 100644
index 69a0e30854c..00000000000
--- a/addons/web_dashboard/static/src/img/layout_1.png
+++ /dev/null
Binary files differ
diff --git a/addons/web_dashboard/static/src/img/layout_2-1.png b/addons/web_dashboard/static/src/img/layout_2-1.png
deleted file mode 100644
index ed866add47c..00000000000
--- a/addons/web_dashboard/static/src/img/layout_2-1.png
+++ /dev/null
Binary files differ
diff --git a/addons/web_dashboard/static/src/js/dashboard.js b/addons/web_dashboard/static/src/js/dashboard.js
deleted file mode 100644
index 761876929da..00000000000
--- a/addons/web_dashboard/static/src/js/dashboard.js
+++ /dev/null
@@ -1,320 +0,0 @@
-openerp.web_dashboard = function(instance) {
-var QWeb = instance.web.qweb,
- _t = instance.web._t;
-
-if (!instance.web_dashboard) {
- /** @namespace */
- instance.web_dashboard = {};
-}
-
-instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
- init: function(view, node) {
- this._super(view, node);
- this.form_template = 'DashBoard';
- this.actions_attrs = {};
- this.action_managers = [];
- },
- start: function() {
- var self = this;
- this._super.apply(this, arguments);
-
- this.$element.find('.oe-dashboard-column').sortable({
- connectWith: '.oe-dashboard-column',
- handle: '.oe-dashboard-action-header',
- scroll: false
- }).disableSelection().bind('sortstop', self.do_save_dashboard);
-
- // Events
- this.$element.find('.oe-dashboard-link-reset').click(this.on_reset);
- this.$element.find('.oe-dashboard-link-change_layout').click(this.on_change_layout);
-
- this.$element.delegate('.oe-dashboard-column .oe-dashboard-fold', 'click', this.on_fold_action);
- this.$element.delegate('.oe-dashboard-column .ui-icon-closethick', 'click', this.on_close_action);
-
- // Init actions
- _.each(this.node.children, function(column, column_index) {
- _.each(column.children, function(action, action_index) {
- delete(action.attrs.width);
- delete(action.attrs.height);
- delete(action.attrs.colspan);
- self.rpc('/web/action/load', {
- action_id: parseInt(action.attrs.name, 10)
- }, function(result) {
- self.on_load_action(result, column_index + '_' + action_index, action.attrs);
- });
- });
- });
- },
- on_reset: function() {
- this.rpc('/web/view/undo_custom', {
- view_id: this.view.fields_view.view_id,
- reset: true
- }, this.do_reload);
- },
- on_change_layout: function() {
- var self = this;
- var qdict = {
- current_layout : this.$element.find('.oe-dashboard').attr('data-layout')
- };
- var $dialog = instance.web.dialog($('<div>'), {
- modal: true,
- title: _t("Edit Layout"),
- width: 'auto',
- height: 'auto'
- }).html(QWeb.render('DashBoard.layouts', qdict));
- $dialog.find('li').click(function() {
- var layout = $(this).attr('data-layout');
- $dialog.dialog('destroy');
- self.do_change_layout(layout);
- });
- },
- do_change_layout: function(new_layout) {
- var $dashboard = this.$element.find('.oe-dashboard');
- var current_layout = $dashboard.attr('data-layout');
- if (current_layout != new_layout) {
- var clayout = current_layout.split('-').length,
- nlayout = new_layout.split('-').length,
- column_diff = clayout - nlayout;
- if (column_diff > 0) {
- var $last_column = $();
- $dashboard.find('.oe-dashboard-column').each(function(k, v) {
- if (k >= nlayout) {
- $(v).find('.oe-dashboard-action').appendTo($last_column);
- } else {
- $last_column = $(v);
- }
- });
- }
- $dashboard.toggleClass('oe-dashboard-layout_' + current_layout + ' oe-dashboard-layout_' + new_layout);
- $dashboard.attr('data-layout', new_layout);
- this.do_save_dashboard();
- }
- },
- on_fold_action: function(e) {
- var $e = $(e.currentTarget),
- $action = $e.parents('.oe-dashboard-action:first'),
- id = parseInt($action.attr('data-id'), 10);
- if ($e.is('.ui-icon-minusthick')) {
- $action.data('action_attrs').fold = '1';
- } else {
- delete($action.data('action_attrs').fold);
- }
- $e.toggleClass('ui-icon-minusthick ui-icon-plusthick');
- $action.find('.oe-dashboard-action-content').toggle();
- this.do_save_dashboard();
- },
- on_close_action: function(e) {
- if (confirm(_t("Are you sure you want to remove this item ?"))) {
- $(e.currentTarget).parents('.oe-dashboard-action:first').remove();
- this.do_save_dashboard();
- }
- },
- do_save_dashboard: function() {
- var self = this;
- var board = {
- form_title : this.view.fields_view.arch.attrs.string,
- style : this.$element.find('.oe-dashboard').attr('data-layout'),
- columns : []
- };
- this.$element.find('.oe-dashboard-column').each(function() {
- var actions = [];
- $(this).find('.oe-dashboard-action').each(function() {
- var action_id = $(this).attr('data-id'),
- new_attrs = _.clone($(this).data('action_attrs'));
- if (new_attrs.domain) {
- new_attrs.domain = new_attrs.domain_string;
- delete(new_attrs.domain_string);
- }
- if (new_attrs.context) {
- new_attrs.context = new_attrs.context_string;
- delete(new_attrs.context_string);
- }
- actions.push(new_attrs);
- });
- board.columns.push(actions);
- });
- var arch = QWeb.render('DashBoard.xml', board);
- this.rpc('/web/view/add_custom', {
- view_id: this.view.fields_view.view_id,
- arch: arch
- }, function() {
- self.$element.find('.oe-dashboard-link-reset').show();
- });
- },
- on_load_action: function(result, index, action_attrs) {
- var self = this,
- action = result.result,
- view_mode = action_attrs.view_mode;
-
- if (action_attrs.context && action_attrs.context['dashboard_merge_domains_contexts'] === false) {
- // TODO: replace this 6.1 workaround by attribute on <action/>
- action.context = action_attrs.context || {};
- action.domain = action_attrs.domain || [];
- } else {
- if (action_attrs.context) {
- action.context = _.extend((action.context || {}), action_attrs.context);
- }
- if (action_attrs.domain) {
- action.domain = action.domain || [];
- action.domain.unshift.apply(action.domain, action_attrs.domain);
- }
- }
-
- var action_orig = _.extend({ flags : {} }, action);
-
- if (view_mode && view_mode != action.view_mode) {
- var action_view_mode = action.view_mode.split(',');
- action.views = _.map(view_mode.split(','), function(mode) {
- if (_.indexOf(action_view_mode, mode) < 0) {
- return [false, mode == 'tree' ? 'list': mode];
- } else {
- mode = mode === 'tree' ? 'list' : mode;
- return _.find(action.views, function(view) {
- return view[1] == mode;
- });
- }
- });
- }
-
- action.flags = {
- search_view : false,
- sidebar : false,
- views_switcher : false,
- action_buttons : false,
- pager: false,
- low_profile: true,
- display_title: false,
- list: {
- selectable: false
- }
- };
- var am = new instance.web.ActionManager(this),
- // FIXME: ideally the dashboard view shall be refactored like kanban.
- $action = $('#' + this.view.element_id + '_action_' + index);
- $action.parent().data('action_attrs', action_attrs);
- this.action_managers.push(am);
- am.appendTo($action);
- am.do_action(action);
- am.do_action = function (action) {
- self.do_action(action);
- };
- if (action_attrs.creatable && action_attrs.creatable !== 'false') {
- var action_id = parseInt(action_attrs.creatable, 10);
- $action.parent().find('button.oe_dashboard_button_create').click(function() {
- if (isNaN(action_id)) {
- action_orig.flags.default_view = 'form';
- self.do_action(action_orig);
- } else {
- self.rpc('/web/action/load', {
- action_id: action_id
- }, function(result) {
- result.result.flags = result.result.flags || {};
- result.result.flags.default_view = 'form';
- self.do_action(result.result);
- });
- }
- });
- }
- if (am.inner_viewmanager) {
- am.inner_viewmanager.on_mode_switch.add(function(mode) {
- var new_views = [];
- _.each(action_orig.views, function(view) {
- new_views[view[1] === mode ? 'unshift' : 'push'](view);
- });
- if (!new_views.length || new_views[0][1] !== mode) {
- new_views.unshift([false, mode]);
- }
- action_orig.views = new_views;
- action_orig.res_id = am.inner_viewmanager.dataset.ids[am.inner_viewmanager.dataset.index];
- self.do_action(action_orig);
- });
- }
- },
- renderElement: function() {
- // We should start with three columns available
- for (var i = this.node.children.length; i < 3; i++) {
- this.node.children.push({
- tag: 'column',
- attrs: {},
- children: []
- });
- }
- var rendered = QWeb.render(this.form_template, this);
- this.$element.html(rendered);
- },
- do_reload: function() {
- var view_manager = this.view.getParent(),
- action_manager = view_manager.getParent();
- this.view.destroy();
- action_manager.do_action(view_manager.action);
- }
-});
-instance.web.form.DashBoardLegacy = instance.web.form.DashBoard.extend({
- renderElement: function() {
- if (this.node.tag == 'hpaned') {
- this.node.attrs.style = '2-1';
- } else if (this.node.tag == 'vpaned') {
- this.node.attrs.style = '1';
- }
- this.node.tag = 'board';
- _.each(this.node.children, function(child) {
- if (child.tag.indexOf('child') == 0) {
- child.tag = 'column';
- var actions = [], first_child = child.children[0];
- if (first_child && first_child.tag == 'vpaned') {
- _.each(first_child.children, function(subchild) {
- actions.push.apply(actions, subchild.children);
- });
- child.children = actions;
- }
- }
- });
- this._super(this);
- }
-});
-
-instance.web.form.tags.add('hpaned', 'instance.web.form.DashBoardLegacy');
-instance.web.form.tags.add('vpaned', 'instance.web.form.DashBoardLegacy');
-instance.web.form.tags.add('board', 'instance.web.form.DashBoard');
-
-/*
- * Widgets
- * This client action designed to be used as a dashboard widget display
- * the html content of a res_widget given as argument
- */
-instance.web.client_actions.add( 'board.home.widgets', 'instance.web_dashboard.Widget');
-instance.web_dashboard.Widget = instance.web.View.extend(/** @lends instance.web_dashboard.Widgets# */{
- template: 'HomeWidget',
- /**
- * Initializes a "HomeWidget" client widget: handles the display of a given
- * res.widget objects in an OpenERP view (mainly a dashboard).
- *
- * @constructs instance.web_dashboard.Widget
- * @extends instance.web.View
- *
- * @param {Object} parent
- * @param {Object} options
- * @param {Number} options.widget_id
- */
- init: function (parent, options) {
- this._super(parent);
- this.widget_id = options.widget_id;
- },
- start: function () {
- var ds = new instance.web.DataSet(this, 'res.widget');
- return ds.read_ids([this.widget_id], ['title']).then(this.on_widget_loaded);
- },
- on_widget_loaded: function (widgets) {
- var widget = widgets[0];
- var url = _.str.sprintf(
- '/web_dashboard/widgets/content?session_id=%s&widget_id=%d',
- this.session.session_id, widget.id);
- this.$element.html(QWeb.render('HomeWidget.content', {
- widget: widget,
- url: url
- }));
- }
-});
-
-
-};
diff --git a/addons/web_dashboard/static/src/xml/web_dashboard.xml b/addons/web_dashboard/static/src/xml/web_dashboard.xml
deleted file mode 100644
index c182d8b58a7..00000000000
--- a/addons/web_dashboard/static/src/xml/web_dashboard.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<template>
-<t t-name="DashBoard">
- <div class="oe-dashboard-links">
- <button type="button" class="button oe-dashboard-link-reset" title="Reset Layout.." t-att-style="view.fields_view.custom_view_id ? null : 'display: none'">
- <img src="/web_dashboard/static/src/img/layout_2-1.png" width="16" height="16"/>
- <span> Reset </span>
- </button>
- <button type="button" class="button oe-dashboard-link-change_layout" title="Change Layout..">
- <img src="/web_dashboard/static/src/img/layout_1-1-1.png" width="16" height="16"/>
- <span> Change Layout </span>
- </button>
- </div>
- <table t-att-data-layout="node.attrs.style" t-attf-class="oe-dashboard oe-dashboard-layout_#{node.attrs.style}" cellspacing="0" cellpadding="0" border="0">
- <tr>
- <td t-foreach="node.children" t-as="column" t-if="column.tag == 'column'"
- t-att-id="view.element_id + '_column_' + column_index" t-attf-class="oe-dashboard-column index_#{column_index}">
-
- <t t-foreach="column.children" t-as="action" t-if="action.tag == 'action'" t-call="DashBoard.action"/>
- </td>
- </tr>
- </table>
-</t>
-<t t-name="DashBoard.action">
- <div t-att-data-id="action.attrs.name" class="oe-dashboard-action">
- <h2 t-attf-class="oe-dashboard-action-header #{action.attrs.string ? '' : 'oe-dashboard-action-header-empty'}">
- <t t-esc="action.attrs.string"/>
- <t t-if="!action.attrs.string">&amp;nbsp;</t>
- <button t-if="action.attrs.creatable and action.attrs.creatable !== 'false'" class="oe_button oe_dashboard_button_create">Create</button>
- <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>
- </h2>
- <div t-attf-id="#{view.element_id}_action_#{column_index}_#{action_index}" class="oe-dashboard-action-content" t-att-style="action.attrs.fold ? 'display: none' : null"></div>
- </div>
-</t>
-<t t-name="DashBoard.layouts">
- <div class="oe-dashboard-layout-selector">
- <p>
- <strong>Choose dashboard layout</strong>
- </p>
- <ul>
- <li t-foreach="'1 1-1 1-1-1 1-2 2-1'.split(' ')" t-as="layout" t-att-data-layout="layout">
- <img t-attf-src="/web_dashboard/static/src/img/layout_#{layout}.png"/>
- <img t-if="layout == current_layout"
- src="/web/static/src/img/icons/gtk-apply.png" width="16" height="16" class="oe-selected-layout"/>
- </li>
- </ul>
- </div>
-</t>
-<t t-name="DashBoard.xml">
- <form t-att-string="form_title">
- <board t-att-style="style">
- <column t-foreach="columns" t-as="column">
- <action t-foreach="column" t-as="action" t-att="action"/>
- </column>
- </board>
- </form>
-</t>
-<div t-name="HomeWidget" class="oe-dashboard-home-widget"/>
-<t t-name="HomeWidget.content">
- <h3><t t-esc="widget.title"/></h3>
- <iframe width="100%" frameborder="0" t-att-src="url"/>
-</t>
-</template>