summaryrefslogtreecommitdiff
path: root/addons/web_dashboard/static/src
diff options
context:
space:
mode:
authorThibault Delavallée <tde@openerp.com>2012-06-28 14:26:49 +0200
committerThibault Delavallée <tde@openerp.com>2012-06-28 14:26:49 +0200
commitdb4fa6582ca84cda2147ded1e98dc22659bcb198 (patch)
treee8a4451c466b49f77cee00f7a83dcceffe63f4bb /addons/web_dashboard/static/src
parent48b08907c082164acc81cc770bc790e442a20f71 (diff)
parent492af8bef457c63e93a952a75a9ba7bae647dc01 (diff)
[MERGE] Merged with trunk web.
bzr revid: tde@openerp.com-20120628105323-p50min2k8by55jg0 bzr revid: tde@openerp.com-20120628122649-affstbyq1mt80qnt
Diffstat (limited to 'addons/web_dashboard/static/src')
-rw-r--r--addons/web_dashboard/static/src/css/dashboard.css131
-rw-r--r--addons/web_dashboard/static/src/js/dashboard.js38
-rw-r--r--addons/web_dashboard/static/src/xml/web_dashboard.xml26
3 files changed, 76 insertions, 119 deletions
diff --git a/addons/web_dashboard/static/src/css/dashboard.css b/addons/web_dashboard/static/src/css/dashboard.css
index 6c7e38fd8e2..74410b3e937 100644
--- a/addons/web_dashboard/static/src/css/dashboard.css
+++ b/addons/web_dashboard/static/src/css/dashboard.css
@@ -1,11 +1,11 @@
-.openerp table.oe-dashboard {
+.openerp table.oe_dashboard {
width: 100%;
}
-.openerp .oe-dashboard-links {
+.openerp .oe_dashboard_links {
text-align: right;
margin: 0 4px 6px 0;
}
-.openerp .oe-dashboard-action {
+.openerp .oe_dashboard_action {
margin: 0 0.5em 0.5em 0;
padding: 0px;
background-color: white;
@@ -14,7 +14,7 @@
-webkit-border-radius: 3px;
}
-.openerp .oe-dashboard-action .oe-dashboard-action-header {
+.openerp .oe_dashboard_action .oe_dashboard_action_header {
font-size: 85%;
font-weight: bold;
text-transform: uppercase;
@@ -24,7 +24,7 @@
background: white url("/web/static/src/img/box-a-header-a.gif") 0% 0% repeat-x;
}
-.openerp h2.oe-dashboard-action-header {
+.openerp h2.oe_dashboard_action_header {
margin: 0;
padding:4px 4px;
-moz-border-radius-topleft: 3px;
@@ -34,7 +34,7 @@
-webkit-border-top-right-radius: 3px;
border-top-right-radius: 3px;
}
-.openerp h2.oe-dashboard-action-header-empty {
+.openerp h2.oe_dashboard_action_header_empty {
padding-top: 0;
padding-bottom: 2px;
}
@@ -45,103 +45,103 @@
height: 16px !important;
}
-.openerp a.oe-dashboard-action-rename {
+.openerp a.oe_dashboard_action_rename {
float: left;
padding-right: 4px;
position: relative;
top: 1px;
}
-.openerp .oe-dashboard-action-input {
+.openerp .oe_dashboard_action_input {
height: 16px;
position: relative;
top: 2px;
}
-.openerp .oe-dashboard-action .oe-dashboard-action-header:hover {
+.openerp .oe_dashboard_action .oe_dashboard_action_header:hover {
cursor: move;
}
-.openerp .oe-dashboard-action .ui-icon {
+.openerp .oe_dashboard_action .ui-icon {
cursor: pointer;
}
-.openerp .oe-dashboard-action .ui-icon:hover {
+.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 {
+.openerp .oe_dashboard_action .oe_dashboard_action_header .ui-icon {
float: right;
}
-.openerp .oe-dashboard .ui-sortable-placeholder {
+.openerp .oe_dashboard .ui-sortable-placeholder {
border: 1px dotted black;
visibility: visible !important;
height: 50px !important;
}
-.openerp .oe-dashboard .ui-sortable-placeholder * {
+.openerp .oe_dashboard .ui-sortable-placeholder * {
visibility: hidden;
}
/* Base overwriting */
-.openerp .oe-dashboard .oe-listview-content, .openerp .oe-dashboard .ui-widget-header {
+.openerp .oe_dashboard .oe_list_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 {
+.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 {
+.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 {
+.openerp .oe_dashboard_layout_1-1 .oe_dashboard_column {
width: 50%;
}
-.openerp .oe-dashboard-layout_1-1 .oe-dashboard-column.index_2 {
+.openerp .oe_dashboard_layout_1-1 .oe_dashboard_column.index_2 {
display: none;
}
-.openerp .oe-dashboard-layout_1-1-1 .oe-dashboard-column {
+.openerp .oe_dashboard_layout_1-1-1 .oe_dashboard_column {
width: 33%;
}
-.openerp .oe-dashboard-layout_2-1 .oe-dashboard-column.index_0 {
+.openerp .oe_dashboard_layout_2-1 .oe_dashboard_column.index_0 {
width: 70%;
}
-.openerp .oe-dashboard-layout_2-1 .oe-dashboard-column.index_1 {
+.openerp .oe_dashboard_layout_2-1 .oe_dashboard_column.index_1 {
width: 30%;
}
-.openerp .oe-dashboard-layout_2-1 .oe-dashboard-column.index_2 {
+.openerp .oe_dashboard_layout_2-1 .oe_dashboard_column.index_2 {
display: none;
}
-.openerp .oe-dashboard-layout_1-2 .oe-dashboard-column.index_0 {
+.openerp .oe_dashboard_layout_1-2 .oe_dashboard_column.index_0 {
width: 30%;
}
-.openerp .oe-dashboard-layout_1-2 .oe-dashboard-column.index_1 {
+.openerp .oe_dashboard_layout_1-2 .oe_dashboard_column.index_1 {
width: 70%;
}
-.openerp .oe-dashboard-layout_1-2 .oe-dashboard-column.index_2 {
+.openerp .oe_dashboard_layout_1-2 .oe_dashboard_column.index_2 {
display: none;
}
-.openerp .oe-dashboard-layout-selector {
+.openerp .oe_dashboard_layout_selector {
overflow: auto;
padding: 10px;
}
-.openerp .oe-dashboard-layout-selector ul {
+.openerp .oe_dashboard_layout_selector ul {
margin: 0;
padding: 0;
}
-.openerp .oe-dashboard-layout-selector ul li {
+.openerp .oe_dashboard_layout_selector ul li {
position: relative;
float: left;
height: 51px;
@@ -152,16 +152,16 @@
cursor: pointer;
border: 1px solid white;
}
-.openerp .oe-dashboard-layout-selector ul li:hover {
+.openerp .oe_dashboard_layout_selector ul li:hover {
border: 1px solid #090;
}
-.openerp .oe-dashboard-layout-selector ul li img.oe-selected-layout {
+.openerp .oe_dashboard_layout_selector ul li img.oe_dashboard_selected_layout {
position: absolute;
top: 0px;
right: 0px;
}
-.openerp .oe-dashboard-home-tile {
+.openerp .oe_dashboard_home_tile {
text-align: center;
margin: 10px;
-webkit-border-radius: 10px;
@@ -171,7 +171,7 @@
-moz-box-shadow: 3px 3px 5px 3px #DADDDD;
box-shadow: 3px 3px 5px 3px #DADDDD;
}
-.openerp .oe-dashboard-home-tile span {
+.openerp .oe_dashboard_home_tile span {
display: block;
padding: 0 0 15px;
font-weight: bold;
@@ -179,79 +179,36 @@
color: #555;
white-space: nowrap;
}
-.openerp .oe-dashboard-home-tile-icon {
+.openerp .oe_dashboard_home_tile_icon {
height: 100px;
}
-.openerp .oe-dashboard-home-tile-icon img {
+.openerp .oe_dashboard_home_tile_icon img {
display: block;
margin: 0 auto;
}
-.openerp .oe-dashboard-home-tile-icon img.hover {
+.openerp .oe_dashboard_home_tile_icon img.hover {
display: none;
}
-.openerp .oe-dashboard-home-tile:hover {
+.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 {
+.openerp .oe_dashboard_home_tile:hover img {
display: none;
}
-.openerp .oe-dashboard-home-tile:hover img.hover {
+.openerp .oe_dashboard_home_tile:hover img.hover {
display: block;
}
-.openerp .oe-dashboard-home-tile:hover span {
+.openerp .oe_dashboard_home_tile:hover span {
color: black;
}
-.openerp .oe-dashboard-action .view-manager-main-content {
+.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;
}
@@ -306,11 +263,11 @@
}
/* changing icon for the change layout button */
-.openerp .oe-dashboard-link-change_layout, .openerp .oe-dashboard-link-reset {
+.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 > *{
+.openerp .oe_dashboard_link_change_layout > *, .openerp .oe_dashboard_link_reset > *{
vertical-align: middle;
}
diff --git a/addons/web_dashboard/static/src/js/dashboard.js b/addons/web_dashboard/static/src/js/dashboard.js
index 469bf86da1c..651c3808c2f 100644
--- a/addons/web_dashboard/static/src/js/dashboard.js
+++ b/addons/web_dashboard/static/src/js/dashboard.js
@@ -18,18 +18,18 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
var self = this;
this._super.apply(this, arguments);
- this.$element.find('.oe-dashboard-column').sortable({
- connectWith: '.oe-dashboard-column',
- handle: '.oe-dashboard-action-header',
+ 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.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);
+ 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) {
@@ -54,7 +54,7 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
on_change_layout: function() {
var self = this;
var qdict = {
- current_layout : this.$element.find('.oe-dashboard').attr('data-layout')
+ current_layout : this.$element.find('.oe_dashboard').attr('data-layout')
};
var $dialog = instance.web.dialog($('<div>'), {
modal: true,
@@ -69,7 +69,7 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
});
},
do_change_layout: function(new_layout) {
- var $dashboard = this.$element.find('.oe-dashboard');
+ 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,
@@ -77,22 +77,22 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
column_diff = clayout - nlayout;
if (column_diff > 0) {
var $last_column = $();
- $dashboard.find('.oe-dashboard-column').each(function(k, v) {
+ $dashboard.find('.oe_dashboard_column').each(function(k, v) {
if (k >= nlayout) {
- $(v).find('.oe-dashboard-action').appendTo($last_column);
+ $(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.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'),
+ $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';
@@ -100,12 +100,12 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
delete($action.data('action_attrs').fold);
}
$e.toggleClass('ui-icon-minusthick ui-icon-plusthick');
- $action.find('.oe-dashboard-action-content').toggle();
+ $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();
+ $(e.currentTarget).parents('.oe_dashboard_action:first').remove();
this.do_save_dashboard();
}
},
@@ -113,12 +113,12 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
var self = this;
var board = {
form_title : this.view.fields_view.arch.attrs.string,
- style : this.$element.find('.oe-dashboard').attr('data-layout'),
+ style : this.$element.find('.oe_dashboard').attr('data-layout'),
columns : []
};
- this.$element.find('.oe-dashboard-column').each(function() {
+ this.$element.find('.oe_dashboard_column').each(function() {
var actions = [];
- $(this).find('.oe-dashboard-action').each(function() {
+ $(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) {
@@ -138,7 +138,7 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
view_id: this.view.fields_view.view_id,
arch: arch
}, function() {
- self.$element.find('.oe-dashboard-link-reset').show();
+ self.$element.find('.oe_dashboard_link_reset').show();
});
},
on_load_action: function(result, index, action_attrs) {
diff --git a/addons/web_dashboard/static/src/xml/web_dashboard.xml b/addons/web_dashboard/static/src/xml/web_dashboard.xml
index c182d8b58a7..5ca2551255c 100644
--- a/addons/web_dashboard/static/src/xml/web_dashboard.xml
+++ b/addons/web_dashboard/static/src/xml/web_dashboard.xml
@@ -1,19 +1,19 @@
<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'">
+ <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..">
+ <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">
+ <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-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>
@@ -21,20 +21,20 @@
</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'}">
+ <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>
+ <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-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">
+ <div class="oe_dashboard_layout_selector">
<p>
<strong>Choose dashboard layout</strong>
</p>
@@ -42,7 +42,7 @@
<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"/>
+ src="/web/static/src/img/icons/gtk-apply.png" width="16" height="16" class="oe_dashboard_selected_layout"/>
</li>
</ul>
</div>
@@ -56,7 +56,7 @@
</board>
</form>
</t>
-<div t-name="HomeWidget" class="oe-dashboard-home-widget"/>
+<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"/>