[MERGE] latest trunk

bzr revid: abo@openerp.com-20120628144113-fgmi7rxfabljiyio
This commit is contained in:
Antonin Bourguignon 2012-06-28 16:41:13 +02:00
commit 1c7f37d301
34 changed files with 467 additions and 353 deletions

View File

@ -1,7 +1,152 @@
.text-core { position: relative;}.text-core .text-wrap { background: #fff; position: absolute;}.text-core .text-wrap textarea, .text-core .text-wrap input { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; outline: none; resize: none; position: absolute; z-index: 1; background: none; overflow: hidden; margin: 0; padding: 3px 5px 4px 5px; white-space: nowrap; font: 11px "lucida grande", tahoma, verdana, arial, sans-serif; line-height: 13px; height: auto;}
.text-core .text-wrap .text-arrow { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; position: absolute; top: 0; right: 0; width: 22px; height: 22px; background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAOAQMAAADHWqTrAAAAA3NCSVQICAjb4U/gAAAABlBMVEX///8yXJnt8Ns4AAAACXBIWXMAAAsSAAALEgHS3X78AAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1MzmNZGAwAAABpJREFUCJljYEAF/xsY6hkY7BgYZBgYOFBkADkdAmFDagYFAAAAAElFTkSuQmCC") 50% 50% no-repeat; cursor: pointer; z-index: 2;}
.text-core .text-wrap .text-dropdown { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; padding: 0; position: absolute; z-index: 3; background: #fff; border: 1px solid #9daccc; width: 100%; max-height: 100px; padding: 1px; font: 11px "lucida grande", tahoma, verdana, arial, sans-serif; display: none; overflow-x: hidden; overflow-y: auto;}.text-core .text-wrap .text-dropdown.text-position-below { margin-top: 1px;}.text-core .text-wrap .text-dropdown.text-position-above { margin-bottom: 1px;}.text-core .text-wrap .text-dropdown .text-list .text-suggestion { padding: 3px 5px; cursor: pointer;}.text-core .text-wrap .text-dropdown .text-list .text-suggestion em { font-style: normal; text-decoration: underline;}.text-core .text-wrap .text-dropdown .text-list .text-suggestion.text-selected { color: #fff; background: #6d84b4;}
.text-core .text-wrap .text-focus { -webkit-box-shadow: 0px 0px 6px #6d84b4; -moz-box-shadow: 0px 0px 6px #6d84b4; box-shadow: 0px 0px 6px #6d84b4; position: absolute; width: 100%; height: 100%; display: none;}.text-core .text-wrap .text-focus.text-show-focus { display: block;}
.text-core .text-wrap .text-prompt { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; position: absolute; width: 100%; height: 100%; margin: 1px 0 0 2px; font: 11px "lucida grande", tahoma, verdana, arial, sans-serif; color: #c0c0c0; overflow: hidden; white-space: pre;}.text-core .text-wrap .text-prompt.text-hide-prompt { display: none;}
.text-core .text-wrap .text-tags { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; position: absolute; width: 100%; height: 100%; padding: 3px 35px 3px 3px; cursor: text;}.text-core .text-wrap .text-tags.text-tags-on-top { z-index: 2;}.text-core .text-wrap .text-tags .text-tag { float: left;}.text-core .text-wrap .text-tags .text-tag .text-button { -webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; position: relative; float: left; border: 1px solid #9daccc; background: #e2e6f0; color: #000; padding: 0px 17px 0px 3px; margin: 0 2px 2px 0; cursor: pointer; height: 16px; font: 11px "lucida grande", tahoma, verdana, arial, sans-serif;}.text-core .text-wrap .text-tags .text-tag .text-button a.text-remove { position: absolute; right: 3px; top: 2px; display: block; width: 11px; height: 11px; background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAhCAYAAAAPm1F2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAB50RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNS4xqx9I6wAAAQ5JREFUOI2dlD0WwiAQhCc8L6HHgAPoASwtSYvX8BrQxtIyveYA8RppLO1jE+LwE8lzms2yH8MCj1QoaBzH+VuUYNYMS213UlvDRamtUbXb5ZyPHuDoxwGgip3ipfvGuGzPz+vZ/coDONdzFuYCO6ramQQG0DJIE1oPBBvM6e9LqaS2FwD7FWwnVoIAsOc2Xn1jDlyd8pfPBRVOBHA8cc/3yCmQqt0jcY4LuTyAF3pOYS6wI48LAm4MUrx5JthgSQJAt5LtNgAUgEMBBIC3AL2xgo58dEPfhE9wygef89FtCeC49UwltR1pQrK2qr9vNr7uRTCBF3pOYS6wI4/zdQ8MUpxPI9hgSQL0Xyio/QBt54DzsHQx6gAAAABJRU5ErkJggg==") 0 0 no-repeat;}.text-core .text-wrap .text-tags .text-tag .text-button a.text-remove:hover { background-position: 0 -11px;}.text-core .text-wrap .text-tags .text-tag .text-button a.text-remove:active { background-position: 0 -22px;}
.text-core {
position: relative;
}
.text-core .text-wrap {
background: #fff;
position: absolute;
}
.text-core .text-wrap textarea, .text-core .text-wrap input {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
outline: none;
resize: none;
position: absolute;
background: none;
overflow: hidden;
margin: 0;
padding: 3px 5px 4px 5px;
white-space: nowrap;
font: 11px "lucida grande", tahoma, verdana, arial, sans-serif;
line-height: 13px;
height: auto;
}
.text-core .text-wrap .text-arrow {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
position: absolute;
top: 0;
right: 0;
width: 22px;
height: 22px;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAOAQMAAADHWqTrAAAAA3NCSVQICAjb4U/gAAAABlBMVEX///8yXJnt8Ns4AAAACXBIWXMAAAsSAAALEgHS3X78AAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1MzmNZGAwAAABpJREFUCJljYEAF/xsY6hkY7BgYZBgYOFBkADkdAmFDagYFAAAAAElFTkSuQmCC") 50% 50% no-repeat;
cursor: pointer;
z-index: 2;
}
.text-core .text-wrap .text-dropdown {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0;
position: absolute;
z-index: 3;
background: #fff;
border: 1px solid #9daccc;
width: 100%;
max-height: 100px;
padding: 1px;
font: 11px "lucida grande", tahoma, verdana, arial, sans-serif;
display: none;
overflow-x: hidden;
overflow-y: auto;
}
.text-core .text-wrap .text-dropdown.text-position-below {
margin-top: 1px;
}
.text-core .text-wrap .text-dropdown.text-position-above {
margin-bottom: 1px;
}
.text-core .text-wrap .text-dropdown .text-list .text-suggestion {
padding: 3px 5px;
cursor: pointer;
}
.text-core .text-wrap .text-dropdown .text-list .text-suggestion em {
font-style: normal;
text-decoration: underline;
}
.text-core .text-wrap .text-dropdown .text-list .text-suggestion.text-selected {
color: #fff;
background: #6d84b4;
}
.text-core .text-wrap .text-focus {
-webkit-box-shadow: 0px 0px 6px #6d84b4;
-moz-box-shadow: 0px 0px 6px #6d84b4;
box-shadow: 0px 0px 6px #6d84b4;
position: absolute;
width: 100%;
height: 100%;
display: none;
}
.text-core .text-wrap .text-focus.text-show-focus {
display: block;
}
.text-core .text-wrap .text-prompt {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
position: absolute;
width: 100%;
height: 100%;
margin: 1px 0 0 2px;
font: 11px "lucida grande", tahoma, verdana, arial, sans-serif;
color: #c0c0c0;
overflow: hidden;
white-space: pre;
}
.text-core .text-wrap .text-prompt.text-hide-prompt {
display: none;
}
.text-core .text-wrap .text-tags {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
position: absolute;
width: 100%;
height: 100%;
padding: 3px 35px 3px 3px;
cursor: text;
}
.text-core .text-wrap .text-tags.text-tags-on-top {
z-index: 2;
}
.text-core .text-wrap .text-tags .text-tag {
float: left;
}
.text-core .text-wrap .text-tags .text-tag .text-button {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
position: relative;
float: left;
border: 1px solid #9daccc;
background: #e2e6f0;
color: #000;
padding: 0px 17px 0px 3px;
margin: 0 2px 2px 0;
cursor: pointer;
height: 16px;
font: 11px "lucida grande", tahoma, verdana, arial, sans-serif;
}
.text-core .text-wrap .text-tags .text-tag .text-button a.text-remove {
position: absolute;
right: 3px;
top: 2px;
display: block;
width: 11px;
height: 11px;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAhCAYAAAAPm1F2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAB50RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNS4xqx9I6wAAAQ5JREFUOI2dlD0WwiAQhCc8L6HHgAPoASwtSYvX8BrQxtIyveYA8RppLO1jE+LwE8lzms2yH8MCj1QoaBzH+VuUYNYMS213UlvDRamtUbXb5ZyPHuDoxwGgip3ipfvGuGzPz+vZ/coDONdzFuYCO6ramQQG0DJIE1oPBBvM6e9LqaS2FwD7FWwnVoIAsOc2Xn1jDlyd8pfPBRVOBHA8cc/3yCmQqt0jcY4LuTyAF3pOYS6wI48LAm4MUrx5JthgSQJAt5LtNgAUgEMBBIC3AL2xgo58dEPfhE9wygef89FtCeC49UwltR1pQrK2qr9vNr7uRTCBF3pOYS6wI4/zdQ8MUpxPI9hgSQL0Xyio/QBt54DzsHQx6gAAAABJRU5ErkJggg==") 0 0 no-repeat;
}
.text-core .text-wrap .text-tags .text-tag .text-button a.text-remove:hover {
background-position: 0 -11px;
}
.text-core .text-wrap .text-tags .text-tag .text-button a.text-remove:active {
background-position: 0 -22px;
}

View File

@ -2465,7 +2465,7 @@
target = $(e.target)
;
if(target.is(CSS_DOT_SUGGESTION) || target.is(CSS_DOT_LABEL))
if($(CSS_DOT_SUGGESTION).has(target[0]) || $(CSS_DOT_LABEL).has(target[0]))
self.trigger('enterKeyPress');
if (self.core().hasPlugin('tags'))

View File

@ -20,7 +20,7 @@
font-style: normal;
}
.openerp.openerp-web-client-container {
.openerp.openerp_webclient_container {
height: 100%;
position: relative;
}
@ -779,6 +779,7 @@
border-top: 4px solid white;
}
.openerp .oe_topbar .oe_dropdown_menu {
top: 32px;
background: #333333;
background: rgba(37, 37, 37, 0.9);
border-color: #999999;
@ -1184,7 +1185,7 @@
.openerp .oe_view_manager_global > .oe_view_manager_header .oe_header_row:first-child td {
padding-top: 8px;
}
.openerp .oe-select-create-popup-view-form > .oe_formview > .oe_form_pager {
.openerp .oe_popup_form > .oe_formview > .oe_form_pager {
display: none !important;
}
.openerp .oe_searchview {
@ -1963,7 +1964,7 @@
width: 45px;
height: 30px;
}
.openerp .oe_hidden_input_file input.oe-binary-file {
.openerp .oe_hidden_input_file input.oe_form_binary_file {
z-index: 0;
line-height: 0;
font-size: 12px;
@ -2004,7 +2005,7 @@
.openerp .oe_form_field_many2one td:first-child {
position: relative;
}
.openerp .oe_form_field_many2one span.oe-m2o-drop-down-button {
.openerp .oe_form_field_many2one span.oe_m2o_drop_down_button {
position: absolute;
top: 3px;
right: 2px;
@ -2012,7 +2013,7 @@
.openerp .oe_form .oe_form_field_one2many > .oe_view_manager .oe_list_pager_single_page {
display: none;
}
.openerp .oe_form_field_one2many .oe-listview .oe-edit-row-save {
.openerp .oe_form_field_one2many .oe_list .oe_list_edit_row_save {
background-image: url(/web/static/src/img/iconset-b-remove.png);
}
.openerp .oe_form_field_one2many > .oe_view_manager .oe_header_row_top {
@ -2033,28 +2034,28 @@
height: auto;
line-height: 16px;
}
.openerp .oe_form .oe_form_field_many2many > .oe-listview .oe_list_pager_single_page {
.openerp .oe_form .oe_form_field_many2many > .oe_list .oe_list_pager_single_page {
display: none;
}
.openerp .oe-listview-content {
.openerp .oe_list_content {
width: 100%;
}
.openerp .oe-listview-content td:first-child:after, .openerp .oe-listview-content th:first-child:after {
.openerp .oe_list_content td:first-child:after, .openerp .oe_list_content th:first-child:after {
border-width: 0;
}
.openerp .oe-listview-content > thead {
.openerp .oe_list_content > thead {
border-bottom: 2px solid #cacaca;
background: #eeeeee;
vertical-align: top;
}
.openerp .oe-listview-content > thead th {
.openerp .oe_list_content > thead th {
position: relative;
}
.openerp .oe-listview-content td, .openerp .oe-listview-content th {
.openerp .oe_list_content td, .openerp .oe_list_content th {
padding: 3px 6px;
line-height: 18px;
}
.openerp .oe-listview-content th:after {
.openerp .oe_list_content th:after {
position: absolute;
right: 6px;
content: "";
@ -2064,12 +2065,12 @@
border-color: black transparent;
visibility: hidden;
}
.openerp .oe-listview-content th.sortup:after {
.openerp .oe_list_content th.sortup:after {
visibility: visible;
filter: alpha(opacity=60);
opacity: 0.6;
}
.openerp .oe-listview-content th.sortdown:after {
.openerp .oe_list_content th.sortdown:after {
border-bottom: none;
border-left: 4px solid transparent;
border-right: 4px solid transparent;
@ -2081,20 +2082,20 @@
filter: alpha(opacity=60);
opacity: 0.6;
}
.openerp .oe-listview-content > tbody {
.openerp .oe_list_content > tbody {
cursor: pointer;
background: white;
}
.openerp .oe-listview-content > tbody > tr {
.openerp .oe_list_content > tbody > tr {
border-top: 1px solid #dddddd;
}
.openerp .oe-listview-content > tbody > tr > td.oe-field-cell {
.openerp .oe_list_content > tbody > tr > td.oe_list_field_cell {
padding: 3px 6px;
}
.openerp .oe-listview-content > tbody > tr > td, .openerp .oe-listview-content > tbody > tr > th {
.openerp .oe_list_content > tbody > tr > td, .openerp .oe_list_content > tbody > tr > th {
line-height: 18px;
}
.openerp .oe-listview-content > tbody > tr > td > button, .openerp .oe-listview-content > tbody > tr > th > button {
.openerp .oe_list_content > tbody > tr > td > button, .openerp .oe_list_content > tbody > tr > th > button {
border: none;
background: transparent;
padding: 0;
@ -2102,16 +2103,16 @@
-webkit-box-shadow: none;
box-shadow: none;
}
.openerp .oe-listview-content > tbody > tr > td.oe_list_checkbox:first-child, .openerp .oe-listview-content > tbody > tr th.oe_list_checkbox:first-child {
.openerp .oe_list_content > tbody > tr > td.oe_list_checkbox:first-child, .openerp .oe_list_content > tbody > tr th.oe_list_checkbox:first-child {
width: 17px;
}
.openerp .oe-listview-content > tbody > tr > td.oe_list_checkbox:first-child:after, .openerp .oe-listview-content > tbody > tr th.oe_list_checkbox:first-child:after {
.openerp .oe_list_content > tbody > tr > td.oe_list_checkbox:first-child:after, .openerp .oe_list_content > tbody > tr th.oe_list_checkbox:first-child:after {
border-width: 0;
}
.openerp .oe-listview-content > tbody > tr > td.oe_number {
.openerp .oe_list_content > tbody > tr > td.oe_number {
text-align: right !important;
}
.openerp .oe-listview-content > tbody > tr:nth-child(odd) {
.openerp .oe_list_content > tbody > tr:nth-child(odd) {
background-color: #f0f0fa;
background-color: #f0f0fa;
background-image: -webkit-gradient(linear, left top, left bottom, from(#f0f0fa), to(#eeeef6));
@ -2121,13 +2122,13 @@
background-image: -o-linear-gradient(top, #f0f0fa, #eeeef6);
background-image: linear-gradient(to bottom, #f0f0fa, #eeeef6);
}
.openerp .oe-listview-content > tfoot {
.openerp .oe_list_content > tfoot {
border-top: 2px solid #cacaca;
border-bottom: 1px solid #cacaca;
background: #eeeeee;
font-weight: bold;
}
.openerp .oe-listview-content > tbody tr:hover td, .openerp .oe-listview-content tbody tr:hover th {
.openerp .oe_list_content > tbody tr:hover td, .openerp .oe_list_content tbody tr:hover th {
background-color: #eeeeee;
background-image: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), to(#dedede));
background-image: -webkit-linear-gradient(top, #eeeeee, #dedede);
@ -2136,11 +2137,11 @@
background-image: -o-linear-gradient(top, #eeeeee, #dedede);
background-image: linear-gradient(to bottom, #eeeeee, #dedede);
}
.openerp .oe-listview-content .numeric {
.openerp .oe_list_content .numeric {
text-align: right;
width: 82px;
}
.openerp .oe-listview-content .numeric input {
.openerp .oe_list_content .numeric input {
text-align: right;
}
.openerp .oe_trad_field.touched {

View File

@ -98,7 +98,7 @@ $colour4: #8a89ba
// }}}
.openerp.openerp-web-client-container
.openerp.openerp_webclient_container
height: 100%
position: relative
@ -612,6 +612,7 @@ $colour4: #8a89ba
.oe_dropdown_arrow:after
border-top: 4px solid white
.oe_dropdown_menu
top: 32px
background: #333
background: rgba(37,37,37,0.9)
border-color: #999
@ -927,7 +928,7 @@ $colour4: #8a89ba
padding-top: 8px
// }}}
// Viewmanager popup {{{
.oe-select-create-popup-view-form > .oe_formview > .oe_form_pager
.oe_popup_form > .oe_formview > .oe_form_pager
display: none !important
// }}}
// SearchView {{{
@ -1539,7 +1540,7 @@ $colour4: #8a89ba
display: inline-block
width: 45px
height: 30px
input.oe-binary-file
input.oe_form_binary_file
z-index: 0
line-height: 0
font-size: 12px
@ -1577,7 +1578,7 @@ $colour4: #8a89ba
.oe_form_field_many2one
td:first-child
position: relative
span.oe-m2o-drop-down-button
span.oe_m2o_drop_down_button
position: absolute
top: 3px
right: 2px
@ -1588,7 +1589,7 @@ $colour4: #8a89ba
display: none
.oe_form_field_one2many
// TODO: oe_form_field_one2many_list?
.oe-listview .oe-edit-row-save
.oe_list .oe_list_edit_row_save
background-image: url(/web/static/src/img/iconset-b-remove.png)
&> .oe_view_manager
@ -1608,12 +1609,12 @@ $colour4: #8a89ba
line-height: 16px
// }}}
// FormView.many2many {{{
.oe_form .oe_form_field_many2many > .oe-listview
.oe_form .oe_form_field_many2many > .oe_list
.oe_list_pager_single_page
display: none
// }}}
// ListView {{{
.oe-listview-content
.oe_list_content
width: 100%
td:first-child, th:first-child
&:after
@ -1652,7 +1653,7 @@ $colour4: #8a89ba
background: white
> tr
border-top: 1px solid #ddd
> td.oe-field-cell
> td.oe_list_field_cell
padding: 3px 6px
> td, > th
line-height: 18px

View File

@ -1,4 +1,4 @@
.openerp .oe-export {
.openerp .oe_export {
width: 100%;
}
.openerp .oe_export_row tr{

View File

@ -12,22 +12,22 @@
border-bottom: 1px solid #E3E3E3;
}
.openerp .oe-import-no-result .oe-import-result {
.openerp .oe_import_no_result .oe_import_result {
display: none;
}
.openerp .oe-import fieldset {
.openerp .oe_import fieldset {
cursor: pointer;
}
.openerp .oe-import fieldset legend:before {
.openerp .oe_import fieldset legend:before {
content: '\25BC ';
}
.openerp .oe-import fieldset.oe-closed legend:before {
.openerp .oe_import fieldset.oe_closed legend:before {
content: '\25B6 ';
}
.openerp .oe-import fieldset.oe-closed table {
.openerp .oe_import fieldset.oe_closed table {
display: none;
}
.openerp .oe-import .separator.horizontal {
.openerp .oe_import .separator.horizontal {
font-weight: bold;
border-bottom-width: 1px;
margin: 6px 4px 6px 1px;

View File

@ -538,6 +538,7 @@ instance.web.Login = instance.web.Widget.extend({
do_login: function (db, login, password) {
var self = this;
this.$element.removeClass('oe_login_invalid');
self.$(".oe_login_pane").fadeOut("slow");
return this.session.session_authenticate(db, login, password).pipe(function() {
if (self.has_local_storage) {
if(self.remember_credentials) {
@ -552,10 +553,12 @@ instance.web.Login = instance.web.Widget.extend({
localStorage.setItem('last_password_login_success', '');
}
}
self.$(".oe_login_pane").fadeOut("slow");
self.trigger("login");
},function () {
self.$(".oe_login_pane").fadeIn("fast");
self.$element.addClass("oe_login_invalid");
self.$element.find("form input[name=login]").removeAttr("disabled");
self.$element.find("form input[name=password]").removeAttr("disabled");
});
}
});
@ -855,12 +858,12 @@ instance.web.WebClient = instance.web.Widget.extend({
},
start: function() {
var self = this;
this.$element.addClass("openerp openerp-web-client-container");
this.$element.addClass("openerp openerp_webclient_container");
if (jQuery.param !== undefined && jQuery.deparam(jQuery.param.querystring()).kitten !== undefined) {
$("body").addClass("kitten-mode-activated");
self.$element.delegate('img.oe-record-edit-link-img', 'hover', function(e) {
self.$element.toggleClass('clark-gable');
});
if ($.blockUI) {
$.blockUI.defaults.message = '<img src="http://www.amigrave.com/kitten.gif">';
}
}
this.session.session_bind().then(function() {
self.destroy_content();

View File

@ -595,7 +595,7 @@ instance.web.qweb.preprocess_node = function() {
break;
case 1:
// Element
var attr, attrs = ['label', 'title', 'alt'];
var attr, attrs = ['label', 'title', 'alt', 'placeholder'];
while (attr = attrs.pop()) {
if (this.attributes[attr]) {
this.attributes[attr] = instance.web._t(this.attributes[attr]);

View File

@ -68,7 +68,7 @@ instance.web.DataImport = instance.web.Dialog.extend({
this.open({
buttons: [
{text: _t("Close"), click: function() { self.destroy(); }},
{text: _t("Import File"), click: function() { self.do_import(); }, 'class': 'oe-dialog-import-button'}
{text: _t("Import File"), click: function() { self.do_import(); }, 'class': 'oe_import_dialog_button'}
],
close: function(event, ui) {
self.destroy();
@ -78,7 +78,7 @@ instance.web.DataImport = instance.web.Dialog.extend({
this.$element.find('#csvfile').change(this.on_autodetect_data);
this.$element.find('fieldset').change(this.on_autodetect_data);
this.$element.delegate('fieldset legend', 'click', function() {
$(this).parent().toggleClass('oe-closed');
$(this).parent().toggleClass('oe_closed');
});
this.ready.push(new instance.web.DataSet(this, this.model).call(
'fields_get', [], function (fields) {
@ -157,7 +157,7 @@ instance.web.DataImport = instance.web.Dialog.extend({
},
toggle_import_button: function (newstate) {
instance.web.dialog(this.$element, 'widget')
.find('.oe-dialog-import-button')
.find('.oe_import_dialog_button')
.button('option', 'disabled', !newstate);
},
do_import: function() {
@ -202,7 +202,7 @@ instance.web.DataImport = instance.web.Dialog.extend({
if (results['error']) {
result_node.append(QWeb.render('ImportView.error', {
'error': results['error']}));
this.$element.find('fieldset').removeClass('oe-closed');
this.$element.find('fieldset').removeClass('oe_closed');
return;
}
if (results['success']) {
@ -224,11 +224,11 @@ instance.web.DataImport = instance.web.Dialog.extend({
: with_headers ? results.records.slice(1)
: results.records
}));
this.$element.find('fieldset').addClass('oe-closed');
this.$element.find('fieldset').addClass('oe_closed');
}
this.$element.find('form').removeClass('oe-import-no-result');
this.$element.find('form').removeClass('oe_import_no_result');
this.$element.delegate('.oe-m2o-drop-down-button', 'click', function () {
this.$element.delegate('.oe_m2o_drop_down_button', 'click', function () {
$(this).prev('input').focus();
});

View File

@ -309,7 +309,7 @@ instance.web.format_cell = function (row_data, column, options) {
'</button>', {
title: column.string || '',
additional_attributes: isNaN(row_data["id"].value) && instance.web.BufferedDataSet.virtual_id_regex.test(row_data["id"].value) ?
'disabled="disabled" class="oe-listview-button-disabled"' : '',
'disabled="disabled" class="oe_list_button_disabled"' : '',
prefix: instance.connection.prefix,
icon: column.icon,
alt: column.string || ''

View File

@ -635,12 +635,13 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea
(new instance.web.search.CustomFilters(this));
// add Advanced to this.inputs
(new instance.web.search.Advanced(this));
(new instance.web.search.AddToDashboard(this));
// build drawer
var drawer_started = $.when.apply(
null, _(this.select_for_drawer()).invoke(
'appendTo', this.$element.find('.oe_searchview_drawer')));
new instance.web.search.AddToDashboard(this).appendTo($('.oe_searchview_drawer', this.$element));
// load defaults
var defaults_fetched = $.when.apply(null, _(this.inputs).invoke(
@ -1638,7 +1639,7 @@ instance.web.search.Filters = instance.web.search.Input.extend({
}));
}
});
instance.web.search.AddToDashboard = instance.web.search.Input.extend({
instance.web.search.AddToDashboard = instance.web.Widget.extend({
template: 'SearchView.addtodashboard',
_in_drawer: true,
start: function () {
@ -1646,44 +1647,18 @@ instance.web.search.AddToDashboard = instance.web.search.Input.extend({
this.data_loaded = $.Deferred();
this.dashboard_data =[];
this.$element
.on('click', 'h4', this.proxy('show_option'))
.on('submit', 'form', function (e) {e.preventDefault(); self.add_dashboard();});
.on('click', 'h4', this.proxy('show_option'))
.on('submit', 'form', function (e) {
e.preventDefault();
self.add_dashboard();
});
return $.when(this.load_data(),this.data_loaded).pipe(this.proxy("render_data"));
},
load_data:function(){
// get from database if dashboard position change than also works(from Reporting to else).
/*var self = this,
ir_actions_act_window = new instance.web.Model('ir.actions.act_window',{},[['res_model','=',"board.board"],['view_id','!=',false]])
.query(['name','id']),
map_data = function(){
var ir_actions_values = arguments[0],ir_values = arguments[1];
_(ir_values).each(function(res){
var get_name = _.detect(ir_actions_values,function(name){ return name.id == parseInt((res.value).split(",")[1]);});
self.dashboard_data.push({"res_id":res.res_id,"name":get_name.name})
});
self.data_loaded.resolve();
},
make_domain = function(result){
var domain = [];
_(result).map(function(value,key){
domain.push(["value","=","ir.actions.act_window,"+value.id]);
((result.length)- 1 !== key)?domain.unshift("|"):false;
})
return domain;
};
return ir_actions_act_window._execute().then(function(ir_actions_values){
if(!ir_actions_values.length) {self.data_loaded.resolve();return;}
var ir_value = new instance.web.Model('ir.values',{},make_domain(ir_actions_values)).query(['res_id','value']);
ir_value._execute().done(function(ir_values){
map_data(ir_actions_values,ir_values);
})
});*/
//===============================get from instance.webclient.menu (with less rpc call)
var self = this,dashbaord_menu = instance.webclient.menu.data.data.children,
ir_model_data = new instance.web.Model('ir.model.data',{},[['name','=','menu_reporting_dashboard']]).query(['res_id']),
map_data = function(result){
_.detect(dashbaord_menu,function(dash){
var self = this,dashboard_menu = instance.webclient.menu.data.data.children;
var ir_model_data = new instance.web.Model('ir.model.data',{},[['name','=','menu_reporting_dashboard']]).query(['res_id']);
var map_data = function(result){
_.detect(dashboard_menu, function(dash){
var id = _.pluck(dash.children, "id"),indexof = _.indexOf(id, result.res_id);
if(indexof !== -1){
self.dashboard_data = dash.children[indexof].children
@ -1701,8 +1676,10 @@ instance.web.search.AddToDashboard = instance.web.search.Input.extend({
this.$element.find("input").before(selection)
},
add_dashboard:function(){
var self = this,getParent = this.getParent(),view_parent = this.view.getParent();
if(!view_parent.action || !this.$element.find("select").val())
var self = this;
var getParent = this.getParent();
var view_parent = this.getParent().getParent();
if (! view_parent.action || ! this.$element.find("select").val())
return this.do_warn("Can't find dashboard action");
data = getParent.build_search_data(),
context = new instance.web.CompoundContext(getParent.dataset.get_context() || []),
@ -1732,6 +1709,7 @@ instance.web.search.AddToDashboard = instance.web.search.Input.extend({
this.$element.find("input").val(this.getParent().fields_view.name || "" );
}
});
instance.web.search.Advanced = instance.web.search.Input.extend({
template: 'SearchView.advanced',
_in_drawer: true,

View File

@ -322,9 +322,6 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
if (self.sidebar) {
self.sidebar.do_attachement_update(self.dataset, self.datarecord.id);
}
if (self.default_focus_field) {
self.default_focus_field.focus();
}
if (record.id) {
self.do_push_state({id:record.id});
}
@ -573,6 +570,16 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
_.each(this.fields,function(field){
field.set({"force_readonly": false});
});
var fields_order = self.fields_order.slice(0);
if (self.default_focus_field) {
fields_order.unshift(self.default_focus_field);
}
for (var i = 0; i < fields_order.length; i += 1) {
var field = self.fields[fields_order[i]];
if (!field.get('effective_invisible') && !field.get('effective_readonly') && field.focus() !== false) {
break;
}
}
}
},
on_button_save: function() {
@ -909,6 +916,9 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
register_field: function(field, name) {
this.fields[name] = field;
this.fields_order.push(name);
if (field.node.attrs.default_focus == '1') {
this.default_focus_field = field;
}
field.on('focused', null, this.proxy('widgetFocused'))
.on('blurred', null, this.proxy('widgetBlurred'));
@ -1513,7 +1523,9 @@ instance.web.form.FormWidget = instance.web.Widget.extend(instance.web.form.Invi
this._super.apply(this, arguments);
},
/**
* Sets up blur/focus forwarding from DOM elements to a widget (`this`)
* Sets up blur/focus forwarding from DOM elements to a widget (`this`).
*
* This method is an utility method that is meant to be called by child classes.
*
* @param {jQuery} $e jQuery object of elements to bind focus/blur on
*/
@ -1762,7 +1774,7 @@ instance.web.form.FieldInterface = {
*/
is_syntax_valid: function() {},
/**
* Must set the focus on the field.
* Must set the focus on the field. Return false if field is not focusable.
*/
focus: function() {},
};
@ -1790,8 +1802,9 @@ instance.web.form.AbstractField = instance.web.form.FormWidget.extend(instance.w
this._super(field_manager, node);
this.field_manager = field_manager;
this.name = this.node.attrs.name;
this.set({'value': false});
this.field = this.field_manager.get_field(this.name);
this.widget = this.node.attrs.widget;
this.set({'value': false});
this.set({required: this.modifiers['required'] === true});
// some events to make the property "effective_readonly" sync automatically with "readonly" and
@ -2002,7 +2015,7 @@ instance.web.form.FieldEmail = instance.web.form.FieldChar.extend({
} else {
this.$element.find('a')
.attr('href', 'mailto:' + this.get('value'))
.text(this.get('value'));
.text(this.get('value') || '');
}
},
on_button_clicked: function() {
@ -2031,7 +2044,7 @@ instance.web.form.FieldUrl = instance.web.form.FieldChar.extend({
if (!s) {
tmp = "http://" + this.get('value');
}
this.$element.find('a').attr('href', tmp).text(tmp);
this.$element.find('a').attr('href', tmp).text(this.get('value') ? tmp : '');
}
},
on_button_clicked: function() {
@ -2445,15 +2458,16 @@ instance.web.form.CompletionFieldMixin = {
return this.orderer.add(dataset.name_search(
search_val, new instance.web.CompoundDomain(self.build_domain(), [["id", "not in", blacklist]]),
'ilike', this.limit + 1)).pipe(function(data) {
'ilike', this.limit + 1, self.build_context())).pipe(function(data) {
self.last_search = data;
// possible selections for the m2o
var values = _.map(data, function(x) {
x[1] = x[1].split("\n")[0];
return {
label: _.str.escapeHTML(x[1]),
value:x[1],
name:x[1],
id:x[0]
value: x[1],
name: x[1],
id: x[0],
};
});
@ -2564,8 +2578,8 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
fade: true,
});
this.$drop_down = this.$element.find(".oe-m2o-drop-down-button");
this.$follow_button = $(".oe-m2o-cm-button", this.$element);
this.$drop_down = this.$element.find(".oe_m2o_drop_down_button");
this.$follow_button = $(".oe_m2o_cm_button", this.$element);
this.$follow_button.click(function() {
if (!self.get('value')) {
@ -2707,7 +2721,7 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
return;
}
if (! no_recurse) {
var dataset = new instance.web.DataSetStatic(this, this.field.relation, self.view.dataset.get_context());
var dataset = new instance.web.DataSetStatic(this, this.field.relation, self.build_context());
dataset.name_get([self.get("value")], function(data) {
self.display_value["" + self.get("value")] = data[0][1];
self.render_value(true);
@ -2717,11 +2731,12 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
display_string: function(str) {
var self = this;
if (!this.get("effective_readonly")) {
this.$input.val(str);
this.$input.val(str.split("\n")[0]);
} else {
str = _.escape(str).split("\n").join("<br />");
this.$element.find('a')
.unbind('click')
.text(str)
.html(str)
.click(function () {
self.do_action({
type: 'ir.actions.act_window',
@ -2739,7 +2754,9 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
var self = this;
if (value_ instanceof Array) {
this.display_value = {};
this.display_value["" + value_[0]] = value_[1];
if (! this.get_definition_options().always_reload) {
this.display_value["" + value_[0]] = value_[1];
}
value_ = value_[0];
}
value_ = value_ || false;
@ -3251,8 +3268,8 @@ instance.web.form.One2ManyList = instance.web.ListView.List.extend({
return this._super.apply(this, arguments).then(function () {
// Replace the "Save Row" button with "Cancel Edition"
self.edition_form.$element
.undelegate('button.oe-edit-row-save', 'click')
.delegate('button.oe-edit-row-save', 'click', function () {
.undelegate('button.oe_list_edit_row_save', 'click')
.delegate('button.oe_list_edit_row_save', 'click', function () {
self.cancel_pending_edition();
});
@ -3852,7 +3869,7 @@ instance.web.form.AbstractFormPopup = instance.web.OldWidget.extend({
if (this.options.alternative_form_view) {
this.view_form.set_embedded_view(this.options.alternative_form_view);
}
this.view_form.appendTo(this.$element.find(".oe-form-view-popup-form-placeholder"));
this.view_form.appendTo(this.$element.find(".oe_popup_form"));
this.view_form.on_loaded.add_last(function() {
var $buttons = self.view_form.$element.find(".oe_form_buttons");
var multi_select = self.row_id === null && ! self.options.disable_multiple_selection;
@ -3983,7 +4000,7 @@ instance.web.form.SelectCreatePopup = instance.web.form.AbstractFormPopup.extend
'read_only': true,
}, self.options.list_view_options || {}));
self.view_list.popup = self;
self.view_list.appendTo($(".oe-select-create-popup-view-list", self.$element)).pipe(function() {
self.view_list.appendTo($(".oe_popup_list", self.$element)).pipe(function() {
self.view_list.do_show();
}).pipe(function() {
self.searchview.do_search();
@ -4005,7 +4022,7 @@ instance.web.form.SelectCreatePopup = instance.web.form.AbstractFormPopup.extend
});
});
});
this.searchview.appendTo($(".oe-select-create-popup-view-list", self.$element));
this.searchview.appendTo($(".oe_popup_list", self.$element));
},
do_search: function(domains, contexts, groupbys) {
var self = this;
@ -4167,9 +4184,9 @@ instance.web.form.FieldBinary = instance.web.form.AbstractField.extend(instance.
this._super.apply(this, arguments);
},
initialize_content: function() {
this.$element.find('input.oe-binary-file').change(this.on_file_change);
this.$element.find('button.oe_binary_file_save').click(this.on_save_as);
this.$element.find('.oe-binary-file-clear').click(this.on_clear);
this.$element.find('input.oe_form_binary_file').change(this.on_file_change);
this.$element.find('button.oe_form_binary_file_save').click(this.on_save_as);
this.$element.find('.oe_form_binary_file_clear').click(this.on_clear);
},
human_filesize : function(size) {
var units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
@ -4186,10 +4203,10 @@ instance.web.form.FieldBinary = instance.web.form.AbstractField.extend(instance.
// http://deepliquid.com/projects/Jcrop/demos.php?demo=handler
if ($(e.target).val() !== '') {
this.$element.find('form.oe-binary-form input[name=session_id]').val(this.session.session_id);
this.$element.find('form.oe-binary-form').submit();
this.$element.find('.oe-binary-progress').show();
this.$element.find('.oe-binary').hide();
this.$element.find('form.oe_form_binary_form input[name=session_id]').val(this.session.session_id);
this.$element.find('form.oe_form_binary_form').submit();
this.$element.find('.oe_form_binary_progress').show();
this.$element.find('.oe_form_binary').hide();
}
},
on_file_uploaded: function(size, name, content_type, file_base64) {
@ -4201,8 +4218,8 @@ instance.web.form.FieldBinary = instance.web.form.AbstractField.extend(instance.
this.filename = name;
this.on_file_uploaded_and_valid.apply(this, arguments);
}
this.$element.find('.oe-binary-progress').hide();
this.$element.find('.oe-binary').show();
this.$element.find('.oe_form_binary_progress').hide();
this.$element.find('.oe_form_binary').show();
},
on_file_uploaded_and_valid: function(size, name, content_type, file_base64) {
},
@ -4212,7 +4229,7 @@ instance.web.form.FieldBinary = instance.web.form.AbstractField.extend(instance.
this.do_warn(_t("Save As..."), _t("The field is empty, there's nothing to save !"));
ev.stopPropagation();
} else if (this._dirty_flag) {
var link = this.$('.oe_binary_file_save_data')[0];
var link = this.$('.oe_form_binary_file_save_data')[0];
link.download = this.filename || "download.bin"; // Works on only on Google Chrome
//link.target = '_blank';
link.href = "data:application/octet-stream;base64," + value;
@ -4456,6 +4473,9 @@ instance.web.form.FieldStatus = instance.web.form.AbstractField.extend({
elem.css("color", color);
}
},
focus: function() {
return false;
},
});
/**

View File

@ -140,13 +140,13 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
});
},
/**
* View startup method, the default behavior is to set the ``oe-listview``
* View startup method, the default behavior is to set the ``oe_listw``
* class on its root element and to perform an RPC load call.
*
* @returns {$.Deferred} loading promise
*/
start: function() {
this.$element.addClass('oe-listview');
this.$element.addClass('oe_list');
return this.reload_view(null, null, true);
},
/**
@ -250,18 +250,19 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
this.setup_columns(this.fields_view.fields, grouped);
this.$element.html(QWeb.render(this._template, this));
this.$element.addClass(this.fields_view.arch.attrs['class']);
// Head hook
// Selecting records
this.$element.find('.all-record-selector').click(function(){
self.$element.find('.oe-record-selector input').prop('checked',
self.$element.find('.all-record-selector').prop('checked') || false);
this.$element.find('.oe_list_record_selector').click(function(){
self.$element.find('.oe_list_record_selector input').prop('checked',
self.$element.find('.oe_list_record_selector').prop('checked') || false);
var selection = self.groups.get_selection();
$(self.groups).trigger(
'selected', [selection.ids, selection.records]);
});
// Sorting columns
this.$element.find('thead').delegate('th.oe-sortable[data-id]', 'click', function (e) {
this.$element.find('thead').delegate('th.oe_sortable[data-id]', 'click', function (e) {
e.stopPropagation();
var $this = $(this);
self.dataset.sort($this.data('id'));
@ -270,7 +271,7 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
} else {
$this.toggleClass("sortdown");
}
$this.siblings('.oe-sortable').removeClass("sortup sortdown");
$this.siblings('.oe_sortable').removeClass("sortup sortdown");
self.reload_content();
});
@ -322,7 +323,7 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
self.page = 0;
}
self.reload_content();
}).find('.oe-pager-state')
}).find('.oe_list_pager_state')
.click(function (e) {
e.stopPropagation();
var $this = $(this);
@ -372,18 +373,19 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
}
var total = dataset.size();
this.$pager.toggleClass('oe_list_pager_single_page', (total <= this.limit()));
var limit = this.limit() || total;
this.$pager.toggleClass('oe_list_pager_single_page', (total <= limit));
var spager = '-';
if (total) {
var range_start = this.page * this.limit() + 1;
var range_stop = range_start - 1 + this.limit();
var range_start = this.page * limit + 1;
var range_stop = range_start - 1 + limit;
if (range_stop > total) {
range_stop = total;
}
spager = _.str.sprintf('%d-%d of %d', range_start, range_stop, total);
}
this.$pager.find('.oe-pager-state').text(spager);
this.$pager.find('.oe_list_pager_state').text(spager);
},
/**
* Sets up the listview's columns: merges view and fields data, move
@ -533,10 +535,10 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
*/
reload_content: function () {
var self = this;
self.$element.find('.all-record-selector').prop('checked', false);
self.$element.find('.oe_list_record_selector').prop('checked', false);
this.records.reset();
var reloaded = $.Deferred();
this.$element.find('.oe-listview-content').append(
this.$element.find('.oe_list_content').append(
this.groups.render(function () {
if (self.dataset.index == null) {
var has_one = false;
@ -788,7 +790,7 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
},
display_aggregates: function (aggregation) {
var self = this;
var $footer_cells = this.$element.find('.oe-list-footer');
var $footer_cells = this.$element.find('.oe_list_footer');
_(this.aggregate_columns).each(function (column) {
if (!column['function']) {
return;
@ -826,9 +828,9 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
}
// Padding for column titles, footer and data rows
var $rows = this.$element
.find('.oe-listview-header-columns, tr:not(thead tr)')
.find('.oe_list_header_columns, tr:not(thead tr)')
.not(options['except']);
var newcols = new Array(count+1).join('<td class="oe-listview-padding"></td>');
var newcols = new Array(count+1).join('<td class="oe_list_padding"></td>');
if (options.position === 'before') {
$rows.prepend(newcols);
} else {
@ -839,7 +841,7 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
* Removes all padding columns of the table
*/
unpad_columns: function () {
this.$element.find('.oe-listview-padding').remove();
this.$element.find('.oe_list_padding').remove();
if (this.previous_colspan) {
this.$element
.find('thead tr:first th')
@ -939,18 +941,18 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web.
this.$_element = $('<tbody>')
.appendTo(document.body)
.delegate('th.oe-record-selector', 'click', function (e) {
.delegate('th.oe_list_record_selector', 'click', function (e) {
e.stopPropagation();
var selection = self.get_selection();
$(self).trigger(
'selected', [selection.ids, selection.records]);
})
.delegate('td.oe-record-delete button', 'click', function (e) {
.delegate('td.oe_list_record_delete button', 'click', function (e) {
e.stopPropagation();
var $row = $(e.target).closest('tr');
$(self).trigger('deleted', [[self.row_id($row)]]);
})
.delegate('td.oe-field-cell button', 'click', function (e) {
.delegate('td.oe_list_field_cell button', 'click', function (e) {
e.stopPropagation();
var $target = $(e.currentTarget),
field = $target.closest('td').data('field'),
@ -1048,20 +1050,20 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web.
}
var cells = [];
if (this.options.selectable) {
cells.push('<th class="oe-record-selector"></td>');
cells.push('<th class="oe_list_record_selector"></td>');
}
_(this.columns).each(function(column) {
if (column.invisible === '1') {
return;
}
if (column.tag === 'button') {
cells.push('<td class="oe-button" title="' + column.string + '">&nbsp;</td>');
cells.push('<td class="oe_button" title="' + column.string + '">&nbsp;</td>');
} else {
cells.push('<td title="' + column.string + '">&nbsp;</td>');
}
});
if (this.options.deletable) {
cells.push('<td class="oe-record-delete"><button type="button" style="visibility: hidden"> </button></td>');
cells.push('<td class="oe_list_record_delete"><button type="button" style="visibility: hidden"> </button></td>');
}
cells.unshift('<tr>');
cells.push('</tr>');
@ -1082,7 +1084,7 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web.
return result;
}
var records = this.records;
this.$current.find('th.oe-record-selector input:checked')
this.$current.find('th.oe_list_record_selector input:checked')
.closest('tr').each(function () {
var record = records.get($(this).data('id'));
result.ids.push(record.get('id'));
@ -1249,7 +1251,7 @@ instance.web.ListView.Groups = instance.web.Class.extend( /** @lends instance.we
});
this.$row.children().last()
.append($prev)
.append('<span class="oe-pager-state"></span>')
.append('<span class="oe_list_pager_state"></span>')
.append($next);
},
open: function (point_insertion) {
@ -1315,7 +1317,7 @@ instance.web.ListView.Groups = instance.web.Class.extend( /** @lends instance.we
}
placeholder.appendChild($row[0]);
var $group_column = $('<th class="oe-group-name">').appendTo($row);
var $group_column = $('<th class="oe_list_group_name">').appendTo($row);
// Don't fill this if group_by_no_leaf but no group_by
if (group.grouped_on) {
var row_data = {};
@ -1365,7 +1367,7 @@ instance.web.ListView.Groups = instance.web.Class.extend( /** @lends instance.we
}
});
if (self.options.deletable) {
$row.append('<td class="oe-group-pagination">');
$row.append('<td class="oe_list_group_pagination">');
}
});
return placeholder;
@ -1416,11 +1418,11 @@ instance.web.ListView.Groups = instance.web.Class.extend( /** @lends instance.we
} else {
if (dataset.size() == records.length) {
// only one page
self.$row.find('td.oe-group-pagination').empty();
self.$row.find('td.oe_list_group_pagination').empty();
} else {
var pages = Math.ceil(dataset.size() / limit);
self.$row
.find('.oe-pager-state')
.find('.oe_list_pager_state')
.text(_.str.sprintf(_t("%(page)d/%(page_count)d"), {
page: page + 1,
page_count: pages

View File

@ -210,7 +210,7 @@ openerp.web.list_editable = function (instance) {
click: function (e) {e.stopPropagation();}
})
.addClass('oe_form oe_form_container')
.delegate('button.oe-edit-row-save', 'click', function () {
.delegate('button.oe_list_edit_row_save', 'click', function () {
self.save_row();
})
.delegate('button', 'keyup', function (e) {
@ -258,7 +258,7 @@ openerp.web.list_editable = function (instance) {
return $.when(self.edition_form.on_loaded(self.get_form_fields_view())).then(function () {
$new_row.find('> td')
.end()
.find('td:last').removeClass('oe-field-cell').end();
.find('td:last').removeClass('oe_list_field_cell').end();
// pad in case of groupby
_(self.columns).each(function (column) {
if (column.meta) {

View File

@ -84,6 +84,7 @@ instance.web.TreeView = instance.web.View.extend(/** @lends instance.web.TreeVie
'fields': this.fields,
'toolbar': has_toolbar
}));
this.$element.addClass(this.fields_view.arch.attrs['class']);
this.dataset.read_slice(this.fields_list()).then(function(records) {
if (!has_toolbar) {
@ -179,7 +180,7 @@ instance.web.TreeView = instance.web.View.extend(/** @lends instance.web.TreeVie
}
});
if (is_loaded === 0) {
if (!$this.parent().hasClass('oe-open')) {
if (!$this.parent().hasClass('oe_open')) {
self.getdata(record_id, children_ids);
}
} else {
@ -208,7 +209,7 @@ instance.web.TreeView = instance.web.View.extend(/** @lends instance.web.TreeVie
});
if ($curr_node.length) {
$curr_node.addClass('oe-open');
$curr_node.addClass('oe_open');
$curr_node.after(children_rows);
} else {
self.$element.find('tbody').html(children_rows);
@ -247,11 +248,11 @@ instance.web.TreeView = instance.web.View.extend(/** @lends instance.web.TreeVie
// show & hide the contents
showcontent: function (record_id, show) {
this.$element.find('#treerow_' + record_id)
.toggleClass('oe-open', show);
.toggleClass('oe_open', show);
_(this.records[record_id][this.children_field]).each(function (child_id) {
var $child_row = this.$element.find('#treerow_' + child_id);
if ($child_row.hasClass('oe-open')) {
if ($child_row.hasClass('oe_open')) {
this.showcontent(child_id, false);
}
$child_row.toggle(show);

View File

@ -862,13 +862,13 @@ instance.web.Sidebar = instance.web.Widget.extend({
});
self.items['files'] = attachments;
self.redraw();
this.$('.oe_sidebar_add_attachment .oe-binary-file').change(this.on_attachment_changed);
this.$('.oe_sidebar_add_attachment .oe_form_binary_file').change(this.on_attachment_changed);
this.$element.find('.oe_sidebar_delete_item').click(this.on_attachment_delete);
},
on_attachment_changed: function(e) {
var $e = $(e.target);
if ($e.val() !== '') {
this.$element.find('form.oe-binary-form').submit();
this.$element.find('form.oe_form_binary_form').submit();
$e.parent().find('input[type=file]').prop('disabled', true);
$e.parent().find('button').prop('disabled', true).find('img, span').toggle();
this.$('.oe_sidebar_add_attachment span').text(_t('Uploading...'));

View File

@ -27,9 +27,9 @@
</t>
<t t-name="CrashManager.warning">
<table cellspacing="0" cellpadding="0" border="0" class="oe-dialog-warning">
<table cellspacing="0" cellpadding="0" border="0" class="oe_dialog_warning">
<tr>
<td><img t-att-src='_s + "/web/static/src/img/warning.png"' class="oe-dialog-icon"/></td>
<td><img t-att-src='_s + "/web/static/src/img/warning.png"' class="oe_dialog_icon"/></td>
<td>
<p>
<t t-js="d">
@ -537,7 +537,7 @@
<t t-name="TreeView">
<select t-if="toolbar" style="width: 30%">
</select>
<table class="oe-treeview-table">
<table class="oe_tree_table">
<thead>
<tr>
<th t-foreach="fields_view" t-as="field"
@ -557,7 +557,7 @@
t-att-data-id="record.id" t-att-data-level="level + 1">
<t t-set="children" t-value="record[children_field]"/>
<t t-set="class" t-value="children and children.length ? 'treeview-tr' : 'treeview-td'"/>
<t t-set="rank" t-value="'oe-treeview-first'"/>
<t t-set="rank" t-value="'oe_tree_first'"/>
<t t-set="style" t-value="'background-position: ' + 19*level + 'px; padding-left: ' + 19*level + 'px;'"/>
<td t-foreach="fields_view" t-as="field"
@ -576,7 +576,7 @@
</td>
</tr>
<table t-name="ListView" class="oe-listview-content">
<table t-name="ListView" class="oe_list_content">
<t t-set="columns_count" t-value="visible_columns.length + (options.selectable ? 1 : 0) + (options.deletable ? 1 : 0)"/>
<thead>
<tr t-if="(!!options.action_buttons and !options.$buttons) or (!!options.pager and !options.$pager)">
@ -586,18 +586,18 @@
<div class="oe_list_pager"/>
</th>
</tr>
<tr t-if="options.header" class="oe-listview-header-columns">
<tr t-if="options.header" class="oe_list_header_columns">
<t t-foreach="columns" t-as="column">
<th t-if="column.meta">
<t t-esc="column.string"/>
</th>
</t>
<th t-if="options.selectable" width="1" >
<input type="checkbox" class="all-record-selector"/>
<input type="checkbox" class="oe_list_record_selector"/>
</th>
<t t-foreach="columns" t-as="column">
<th t-if="!column.meta and column.invisible !== '1'" t-att-data-id="column.id"
t-att-class="((options.sortable and column.tag !== 'button') ? 'oe-sortable' : null)">
t-att-class="((options.sortable and column.tag !== 'button') ? 'oe_sortable' : null)">
<t t-if="column.tag !== 'button'"><t t-esc="column.string"/></t>
</th>
</t>
@ -607,7 +607,7 @@
<tfoot>
<tr>
<td t-if="options.selectable"/>
<td t-foreach="aggregate_columns" t-as="column" class="oe-list-footer oe_number"
<td t-foreach="aggregate_columns" t-as="column" class="oe_list_footer oe_number"
t-att-data-field="column.id" t-att-title="column.label">
</td>
<td t-if="options.deletable"/>
@ -625,7 +625,7 @@
<t t-name="ListView.pager">
<div class="oe_list_pager" t-att-colspan="widget.columns_count">
<t t-if="!widget.no_leaf and widget.options.pager !== false" t-call="ViewPager">
<span class="oe-pager-state">
<span class="oe_list_pager_state">
</span>
</t>
</div>
@ -644,7 +644,7 @@
</td>
</t>
<th t-if="options.selectable" class="oe-record-selector" width="1">
<th t-if="options.selectable" class="oe_list_record_selector" width="1">
<t t-set="checked" t-value="options.select_view_id == record.get('id') ? 'checked' : null"/>
<input t-if="options.radio" type="radio" name="radiogroup" t-att-checked="checked"/>
<input t-if="!options.radio" type="checkbox" name="radiogroup" t-att-checked="checked"/>
@ -652,20 +652,20 @@
<t t-foreach="columns" t-as="column">
<t t-set="align" t-value="column.type === 'integer' or column.type == 'float'"/>
<td t-if="!column.meta and column.invisible !== '1'" t-att-title="column.help"
t-att-class="'oe-field-cell' + (align ? ' oe_number' : '')
+ (column.tag === 'button' ? ' oe-button' : '')"
t-att-class="'oe_list_field_cell' + (align ? ' oe_number' : '')
+ (column.tag === 'button' ? ' oe_button' : '')"
t-att-data-field="column.id">
<t t-raw="render_cell(record, column)"/>
</td>
</t>
<td t-if="options.deletable" class='oe-record-delete' width="1">
<td t-if="options.deletable" class='oe_list_record_delete' width="1">
<button type="button" name="delete" class="oe_i">d</button>
</td>
</tr>
<t t-name="ListView.row.save">
<td>
<button class='oe_i oe-edit-row-save' type='button' name='save'>S</button>
<button class='oe_i oe_list_edit_row_save' type='button' name='save'>S</button>
</td>
</t>
@ -874,7 +874,7 @@
</t>
<t t-name="FieldEmail">
<span class="oe_form_field oe_form_field_email oe_form_field_with_button">
<a t-if="widget.get('effective_readonly')" href="#" class="oe_form_uri"/>
<a t-if="widget.get('effective_readonly')" href="#" class="oe_form_uri" target="_blank"/>
<t t-if="!widget.get('effective_readonly')">
<div>
<input type="text"
@ -904,7 +904,7 @@
class="field_text"
t-att-tabindex="widget.node.attrs.tabindex"
t-att-autofocus="widget.node.attrs.autofocus"
t-att-placeholder="widget.node.attrs.placeholder"
t-att-placeholder="! widget.get('effective_readonly') ? widget.node.attrs.placeholder : ''"
></textarea>
<img class="oe_field_translate oe_input_icon" t-if="widget.field.translate"
t-att-src='_s + "/web/static/src/img/icons/terp-translate.png"' width="16" height="16" border="0"/>
@ -945,7 +945,7 @@
<span class="oe_form_field oe_form_field_many2one oe_form_field_with_button">
<a t-if="widget.get('effective_readonly')" href="#" class="oe_form_uri"/>
<t t-if="!widget.get('effective_readonly')">
<button class="oe_button oe-m2o-cm-button" title="Open Resource">
<button class="oe_button oe_m2o_cm_button" title="Open Resource">
<img t-att-src='_s + "/web/static/src/img/icons/terp-folder-yellow.png"'/>
</button>
<div>
@ -955,7 +955,7 @@
t-att-autofocus="widget.node.attrs.autofocus"
t-att-placeholder="widget.node.attrs.placeholder"
/>
<span class="oe-m2o-drop-down-button">
<span class="oe_m2o_drop_down_button">
<img t-att-src='_s + "/web/static/src/img/down-arrow.png"'/>
</span>
</div>
@ -965,7 +965,8 @@
<t t-name="FieldMany2ManyTags">
<div class="oe_form_field oe_form_field_many2manytags">
<t t-if="! widget.get('effective_readonly')">
<textarea rows="1" style="width: 100%"></textarea>
<textarea rows="1" style="width: 100%"
t-att-placeholder="widget.node.attrs.placeholder"></textarea>
</t>
</div>
</t>
@ -1026,10 +1027,10 @@
<img t-att-src='_s + "/web/static/src/img/icons/STOCK_DIRECTORY.png"'/>
</button>
</t>
<button class="oe_button oe-binary-file-clear" type="button" title="Clear">
<button class="oe_button oe_form_binary_file_clear" type="button" title="Clear">
<img t-att-src='_s + "/web/static/src/img/icons/STOCK_MISSING_IMAGE.png"'/>
</button>
<div class="oe-binary-progress" style="display: none">
<div class="oe_form_binary_progress" style="display: none">
<img t-att-src='_s + "/web/static/src/img/throbber.gif"' width="16" height="16"/>
<b>Uploading ...</b>
</div>
@ -1056,7 +1057,7 @@
class="field_binary"
/>
</td>
<td class="oe-binary" nowrap="true">
<td class="oe_form_binary" nowrap="true">
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td>
@ -1070,15 +1071,15 @@
</t>
</td>
<td>
<a class="oe_binary_file_save_data">
<button class="oe_button oe_binary_file_save" type="button" title="Save As">
<a class="oe_form_binary_file_save_data">
<button class="oe_button oe_form_binary_file_save" type="button" title="Save As">
<img t-att-src='_s + "/web/static/src/img/icons/gtk-save.png"'/>
<span>Save As</span>
</button>
</a>
</td>
<td>
<button class="oe_button oe-binary-file-clear" type="button" title="Clear">
<button class="oe_button oe_form_binary_file_clear" type="button" title="Clear">
<img t-att-src='_s + "/web/static/src/img/icons/STOCK_MISSING_IMAGE.png"'/>
<span>Clear</span>
</button>
@ -1086,7 +1087,7 @@
</tr>
</table>
</td>
<td class="oe-binary-progress" style="display: none" nowrap="true">
<td class="oe_form_binary_progress" style="display: none" nowrap="true">
<img t-att-src='_s + "/web/static/src/img/throbber.gif"' width="16" height="16"/>
<b>Uploading ...</b>
</td>
@ -1101,12 +1102,12 @@
</t>
<t t-name="HiddenInputFile">
<div t-attf-class="oe_hidden_input_file #{fileupload_class or ''}" t-att-style="fileupload_style">
<form class="oe-binary-form" t-att-target="fileupload_id"
<form class="oe_form_binary_form" t-att-target="fileupload_id"
method="post" enctype="multipart/form-data" t-att-action="fileupload_action || '/web/binary/upload'">
<input type="hidden" name="session_id" value=""/>
<input type="hidden" name="callback" t-att-value="fileupload_id"/>
<t t-raw="__content__"/>
<input type="file" class="oe-binary-file" name="ufile"/>
<input type="file" class="oe_form_binary_file" name="ufile"/>
</form>
<iframe t-att-id="fileupload_id" t-att-name="fileupload_id" style="display: none"/>
</div>
@ -1201,7 +1202,7 @@
<div t-name="SearchView" class="oe_searchview">
<div class="oe_searchview_facets"/>
<div class="oe_searchview_clear"/>
<div class="oe_searchview_unfold_drawer"/>
<div class="oe_searchview_unfold_drawer" title="Advanced Search..."/>
<div class="oe_searchview_drawer"/>
</div>
@ -1225,7 +1226,7 @@
</span>
<t t-name="SearchView.managed-filters">
<option class="oe-filters-title" value="">Filters</option>
<option class="oe_search_filters_title" value="">Filters</option>
<optgroup label="-- Filters --">
<t t-foreach="filters" t-as="filter">
<option t-attf-value="get:#{filter_index}"
@ -1250,7 +1251,7 @@
</t>
<t t-name="SearchView.render_lines">
<table class="oe-searchview-render-line" border="0" cellspacing="0" cellpadding="0"
<table class="oe_search_render_line" border="0" cellspacing="0" cellpadding="0"
t-foreach="lines" t-as="line">
<tr>
<td t-foreach="line" t-as="widget" class="oe_searchview_field">
@ -1450,16 +1451,16 @@
<table style="width:100%">
<tr style="width:100%">
<td style="width:100%">
<div class="oe-select-create-popup-view-search" style="width:100%"></div>
<div class="oe_popup_search" style="width:100%"></div>
</td>
</tr>
<tr style="width:100%">
<td style="width:100%">
<div class="oe-select-create-popup-view-list" style="width:100%"></div>
<div class="oe_popup_list" style="width:100%"></div>
</td>
</tr>
</table>
<div class="oe-form-view-popup-form-placeholder oe-select-create-popup-view-form" style="width:100%"></div>
<div class="oe_popup_form" style="width:100%"></div>
</div>
</t>
<t t-name="SelectCreatePopup.search.buttons">
@ -1482,7 +1483,7 @@
missing columns
-->
<t t-jquery="&gt; :last" t-operation="after">
<td t-if="edited and !options.deletable" class="oe-listview-padding"/>
<td t-if="edited and !options.deletable" class="oe_list_padding"/>
</t>
</t>
@ -1552,7 +1553,7 @@
<t t-name="ExportView">
<a id="exportview" href="javascript: void(0)" style="text-decoration: none;color: #3D3D3D;">Export</a>
</t>
<table t-name="ExportTreeView" class="oe-export"
<table t-name="ExportTreeView" class="oe_export"
style="background-color: #F3F3F3;">
<tr>
<td colspan="3">
@ -1657,7 +1658,7 @@
</t>
<t t-name="ImportDataView">
<form name="import_data" id="import_data" action="" method="post" enctype="multipart/form-data"
class="oe-import oe-import-no-result">
class="oe_import oe_import_no_result">
<input type="hidden" name="session_id" t-att-value="widget.session.session_id"/>
<h2 class="separator horizontal">1. Import a .CSV file</h2>
<p>Select a .CSV file to import. If you need a sample of file to import,
@ -1667,9 +1668,9 @@
<label for="csvfile">CSV File:</label>
<input type="file" id="csvfile" size="50" name="csvfile"/>
</p>
<h2 class="separator horizontal oe-import-result">2. Check your file format</h2>
<div id="result" class="oe-import-result"></div>
<fieldset class="oe-closed oe-import-result">
<h2 class="separator horizontal oe_import_result">2. Check your file format</h2>
<div id="result" class="oe_import_result"></div>
<fieldset class="oe_closed oe_import_result">
<legend>Import Options</legend>
<table>
<tr>
@ -1709,7 +1710,7 @@
</tr>
<tr>
<td t-foreach="records[0]" t-as="column">
<input class="sel_fields" placeholder="--- Don't Import ---"/><span class="oe-m2o-drop-down-button">
<input class="sel_fields" placeholder="--- Don't Import ---"/><span class="oe_m2o_drop_down_button">
<img t-att-src='_s + "/web/static/src/img/down-arrow.png"' /></span>
</td>
</tr>

View File

@ -50,6 +50,7 @@ instance.web_calendar.CalendarView = instance.web.View.extend({
},
on_loaded: function(data) {
this.fields_view = data;
this.$element.addClass(this.fields_view.arch.attrs['class']);
this.calendar_fields = {};
this.ids = this.dataset.ids;
this.color_values = [];

View File

@ -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;
}

View File

@ -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) {

View File

@ -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"/>

View File

@ -45,6 +45,7 @@ instance.web.DiagramView = instance.web.View.extend({
this.connector = this.connectors.attrs.object;
this.$element.html(QWeb.render("DiagramView", this));
this.$element.addClass(this.fields_view.arch.attrs['class']);
this.$element.find('div.oe_diagram_pager button[data-pager-action]').click(function() {
var action = $(this).data('pager-action');

View File

@ -1,9 +1,9 @@
.openerp .oe-gantt-view-view {
.openerp .oe_gantt {
min-height: 500px;
}
.openerp .oe-gantt-view-view .oe-gantt-view-create {
.openerp .oe_gantt .oe_gantt_button_create {
position: absolute;
top: 5px;
}

View File

@ -19,6 +19,7 @@ instance.web_gantt.GanttView = instance.web.View.extend({
on_loaded: function(fields_view_get, fields_get) {
var self = this;
this.fields_view = fields_view_get;
this.$element.addClass(this.fields_view.arch.attrs['class']);
return this.rpc("/web/searchview/fields_get", {"model": this.dataset.model}).pipe(function(fields_get) {
self.fields = fields_get.fields;
self.has_been_loaded.resolve();
@ -68,7 +69,7 @@ instance.web_gantt.GanttView = instance.web.View.extend({
},
on_data_loaded_2: function(tasks, group_bys) {
var self = this;
$(".oe-gantt-view-view", this.$element).html("");
$(".oe_gantt", this.$element).html("");
//prevent more that 1 group by
if (group_bys.length > 0) {
@ -187,7 +188,7 @@ instance.web_gantt.GanttView = instance.web.View.extend({
var td = $($("table td", self.$element)[0]);
var rendered = QWeb.render("GanttView-create-button");
$(rendered).prependTo(td);
$(".oe-gantt-view-create", this.$element).click(this.on_task_create);
$(".oe_gantt_button_create", this.$element).click(this.on_task_create);
},
on_task_changed: function(task_obj) {
var self = this;

View File

@ -3,10 +3,10 @@
<templates>
<t t-name="GanttView">
<div>
<div t-att-id="widget.chart_id" class="oe-gantt-view-view"/>
<div t-att-id="widget.chart_id" class="oe_gantt"/>
</div>
</t>
<t t-name="GanttView-create-button">
<button class="oe_button oe-gantt-view-create">Create</button>
<button class="oe_button oe_gantt_button_create">Create</button>
</t>
</templates>

View File

@ -53,6 +53,7 @@ instance.web_graph.GraphView = instance.web.View.extend({
// TODO: move to load_view and document
var self = this;
this.fields_view = fields_view_get;
this.$element.addClass(this.fields_view.arch.attrs['class']);
this.mode = this.fields_view.arch.attrs.type || 'bar';
this.orientation = this.fields_view.arch.attrs.orientation == 'horizontal';

View File

@ -8,7 +8,7 @@ instance.web.views.add('kanban', 'instance.web_kanban.KanbanView');
instance.web_kanban.KanbanView = instance.web.View.extend({
template: "KanbanView",
display_name: _lt('Kanban'),
default_nr_columns: 3,
default_nr_columns: 1,
view_type: "kanban",
quick_create_class: "instance.web_kanban.QuickCreate",
number_of_color_schemes: 10,
@ -48,6 +48,7 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
},
on_loaded: function(data) {
this.fields_view = data;
this.$element.addClass(this.fields_view.arch.attrs['class']);
this.$buttons = $(QWeb.render("KanbanView.buttons", {'widget': this}));
if (this.options.$buttons) {
this.$buttons.appendTo(this.options.$buttons);
@ -313,7 +314,7 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
},
open_record: function(id, editable) {
if (this.dataset.select_id(id)) {
this.do_switch_view('form', null, { editable: editable });
this.do_switch_view('form', null);
} else {
this.do_warn("Kanban: could not find id#" + id);
}
@ -798,10 +799,10 @@ instance.web_kanban.QuickCreate = instance.web.Widget.extend({
self.quick_add();
}
});
$(".oe-kanban-quick_create_add", this.$element).click(function () {
$(".oe_kanban_quick_create_add", this.$element).click(function () {
self.quick_add();
});
$(".oe-kanban-quick_create_close", this.$element).click(function () {
$(".oe_kanban_quick_create_close", this.$element).click(function () {
self.trigger('close');
});
self.$input.keyup(function(e) {

View File

@ -13,7 +13,7 @@
<div t-name="KanbanView.buttons" class="oe_kanban_buttons">
<t t-if="widget.options.action_buttons !== false">
<t t-if="widget._is_create_enabled()">
<button type="button" class="oe_button oe_kanban_button_new oe_form_button_hi">
<button type="button" class="oe_button oe_kanban_button_new oe_highlight">
<t t-esc="widget.options.create_text || _t('Create')"/>
</button>
</t>
@ -68,8 +68,8 @@
<input t-att-placeholder="_t('Create a new record')"/>
<t t-if="widget._buttons">
<div class="oe_kanban_quick_create_buttons">
<button class="oe-kanban-quick_create_add">Add</button>
or <a class="oe-kanban-quick_create_close">Cancel</a>
<button class="oe_kanban_quick_create_add">Add</button>
or <a class="oe_kanban_quick_create_close">Cancel</a>
</div>
</t>
</div>

View File

@ -50,7 +50,7 @@ a.cta-a strong {
display: table-cell;
}
.oe-process-view {
.oe_process {
height: 20px;
margin-top:8px;
padding: 0;

View File

@ -14,7 +14,7 @@ openerp.web_process = function (instance) {
var self = this,
grandparent = this.getParent() && this.getParent().getParent(),
view = this.views[this.views_src[0].view_type],
$process_view = this.$element.find('.oe-process-view');
$process_view = this.$element.find('.oe_process');
if (!(grandparent instanceof instance.web.WebClient) ||
!(view.view_type === this.views_src[0].view_type
&& view.view_id === this.views_src[0].view_id)) {

View File

@ -3,7 +3,7 @@
-->
<t t-extend="ViewManager" t-name="ViewManagerAction">
<t t-jquery=".oe-view-manager-header" t-operation="append">
<a t-if="self.flags.display_title !== false" class="oe-process-view" title="Process View" href="javascript: void(0)"></a>
<a t-if="self.flags.display_title !== false" class="oe_process" title="Process View" href="javascript: void(0)"></a>
</t>
</t>
<t t-name="ProcessView">

View File

@ -1,3 +1,3 @@
.oe-bunchaforms > div {
.oe_bunchaforms > div {
float: left;
}

View File

@ -13,7 +13,7 @@ openerp.web_tests = function (instance) {
this.form.registry = instance.web.form.readonly;
},
render: function () {
return '<div class="oe-bunchaforms"></div>';
return '<div class="oe_bunchaforms"></div>';
},
start: function () {
$.when(

View File

@ -107,7 +107,7 @@ def extract_qweb(fileobj, keywords, comment_tags, options):
not ("t-jquery" in el.attrib and "t-operation" not in el.attrib) and \
not ("t-translation" in el.attrib and el.attrib["t-translation"].strip() == "off"):
handle_text(el.text, el.sourceline)
for att in ('title', 'alt', 'label'):
for att in ('title', 'alt', 'label', 'placeholder'):
if att in el.attrib:
handle_text(el.attrib[att], el.sourceline)
iter_elements(el)