Thibault Delavallée 2012-07-19 10:33:41 +02:00
commit 2a268329c5
34 changed files with 1248 additions and 1047 deletions

View File

@ -1,10 +1,10 @@
{
"name" : "web",
"name" : "Web",
"category": "Hidden",
"description":
"""
OpenERP Web core module.
This module provides the core of the OpenERP web client.
This module provides the core of the OpenERP Web Client.
""",
"depends" : [],
'auto_install': True,

View File

@ -417,6 +417,18 @@ class ControllerType(type):
class Controller(object):
__metaclass__ = ControllerType
class DisableCacheMiddleware(object):
def __init__(self, app):
self.app = app
def __call__(self, environ, start_response):
def start_wrapped(status, headers):
debug = environ.get('HTTP_REFERER', '').find('debug') != -1
filtered_headers = [(k,v) for k,v in headers if not (k=='Last-Modified' or (debug and k=='Cache-Control'))]
if debug:
filtered_headers.append(('Cache-Control', 'no-cache'))
start_response(status, filtered_headers)
return self.app(environ, start_wrapped)
class Root(object):
"""Root WSGI application for the OpenERP Web Client.
@ -452,8 +464,8 @@ class Root(object):
static_dirs = self._load_addons(openerp_addons_namespace)
if options.serve_static:
self.dispatch = werkzeug.wsgi.SharedDataMiddleware(
self.dispatch, static_dirs, cache=False)
app = werkzeug.wsgi.SharedDataMiddleware( self.dispatch, static_dirs)
self.dispatch = DisableCacheMiddleware(app)
if options.session_storage:
if not os.path.exists(options.session_storage):

View File

@ -258,8 +258,7 @@ class WebClient(openerpweb.Controller):
file_map = dict(files)
rx_import = re.compile(r"""@import\s+('|")(?!'|"|/|https?://)""", re.U)
rx_url = re.compile(r"""url\s*\(\s*('|"|)(?!'|"|/|https?://)""", re.U)
rx_url = re.compile(r"""url\s*\(\s*('|"|)(?!'|"|/|https?://|data:)""", re.U)
def reader(f):
"""read the a css file and absolutify all relative uris"""
@ -1494,10 +1493,6 @@ class Binary(openerpweb.Controller):
class Action(openerpweb.Controller):
_cp_path = "/web/action"
action_mapping = {
"ir.actions.act_url": "ir.actions.url",
}
# For most actions, the type attribute and the model name are the same, but
# there are exceptions. This dict is used to remap action type attributes
@ -1511,6 +1506,17 @@ class Action(openerpweb.Controller):
Actions = req.session.model('ir.actions.actions')
value = False
context = req.session.eval_context(req.context)
try:
action_id = int(action_id)
except ValueError:
try:
module, xmlid = action_id.split('.', 1)
model, action_id = req.session.model('ir.model.data').get_object_reference(module, xmlid)
assert model.startswith('ir.actions.')
except Exception:
action_id = 0 # force failed read
base_action = Actions.read([action_id], ['type'], context)
if base_action:
ctx = {}

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
@charset "utf-8";
@charset "UTF-8";
@font-face {
font-family: "mnmliconsRegular";
src: url("/web/static/src/font/mnmliconsv21-webfont.eot") format("eot");
@ -34,7 +34,7 @@
background: white;
/* http://www.quirksmode.org/dom/inputfile.html
* http://stackoverflow.com/questions/2855589/replace-input-type-file-by-an-image
*/ */
*/
}
.openerp a {
text-decoration: none;
@ -188,13 +188,7 @@
}
.openerp.ui-dialog {
display: none;
position: fixed;
padding: 6px;
top: 50%;
left: 50%;
z-index: 1050;
width: 560px;
margin: -150px 0 0 -280px;
background-color: rgba(60, 60, 60, 0.7);
border: 1px solid;
border-color: #888888 #555555 #444444;
@ -208,6 +202,9 @@
-moz-background-clip: padding-box;
background-clip: padding-box;
}
.openerp.ui-dialog .ui-dialog-content {
padding: 0px;
}
.openerp.ui-dialog .ui-dialog-titlebar, .openerp.ui-dialog .ui-dialog-content, .openerp.ui-dialog .ui-dialog-buttonpane {
padding: 16px;
}
@ -237,14 +234,16 @@
.openerp.ui-dialog .ui-dialog-buttonpane {
border-top: 1px solid #e0e0e0;
background: #f5f7f9;
padding: 8px;
margin: 0;
-moz-border-radius: 0 0 2px 2px;
-webkit-border-radius: 0 0 2px 2px;
border-radius: 0 0 2px 2px;
}
.openerp.ui-dialog .ui-dialog-buttonpane button {
margin-left: 8px;
margin: 0;
}
.openerp.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
float: left;
}
.openerp.ui-dialog .ui-dialog-titlebar-close {
padding: 0;
@ -268,6 +267,9 @@
color: black;
text-decoration: none;
}
.openerp.ui-dialog.oe_act_window .ui-dialog-content {
padding: 0px;
}
.openerp .modal-backdrop {
position: fixed;
top: 0;
@ -308,6 +310,7 @@
}
.openerp .oe_fade {
color: #888888;
font-weight: normal;
}
.openerp .oe_bold {
font-weight: bold;
@ -376,7 +379,8 @@
background: #ed6f6a;
}
.openerp .oe_title {
width: 60%;
width: 50%;
float: left;
}
.openerp .oe_title:after {
content: ".";
@ -386,17 +390,18 @@
visibility: hidden;
}
.openerp .oe_button_box {
width: 38%;
width: 270px;
text-align: right;
}
.openerp .oe_button_box button {
margin: 4px;
}
.openerp .oe_avatar {
margin: 0 16px 0 0;
margin: 0 6px 15px 0;
}
.openerp .oe_avatar img {
height: 50px;
.openerp .oe_avatar > img {
height: 90px;
max-width: 100px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
@ -405,6 +410,9 @@
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
border: none;
}
.openerp .oe_avatar + div {
margin-left: 5px;
}
.openerp .oe_button.oe_link {
border: none;
padding: 0;
@ -450,6 +458,29 @@
.openerp .oe_webclient .oe_star_on {
color: gold;
}
.openerp .oe_tag {
border-radius: 2px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing: border-box;
border: 1px solid #9daccc;
background: #e2e6f0;
color: black !important;
padding: 0px 3px 0px 3px;
margin: 0 2px 2px 0;
height: 16px;
}
.openerp .oe_tags .text-wrap {
width: 100% !important;
}
.openerp .oe_tags .text-wrap textarea {
width: 100% !important;
}
.openerp .oe_tags .text-core .text-wrap .text-dropdown .text-list .text-suggestion em {
font-style: italic;
text-decoration: none;
}
.openerp.oe_tooltip {
font-size: 12px;
}
@ -1136,63 +1167,63 @@
.openerp .oe_view_manager .oe_view_manager_view_kanban {
height: inherit;
}
.openerp .oe_view_manager .oe_view_manager_header {
.openerp .oe_view_manager table.oe_view_manager_header {
width: 100%;
table-layout: fixed;
}
.openerp .oe_view_manager .oe_view_manager_header .oe_header_row {
.openerp .oe_view_manager table.oe_view_manager_header .oe_header_row {
clear: both;
text-shadow: 0 1px 1px white;
}
.openerp .oe_view_manager .oe_view_manager_header .oe_header_row:last-child td {
.openerp .oe_view_manager table.oe_view_manager_header .oe_header_row:last-child td {
padding-top: 0;
}
.openerp .oe_view_manager .oe_view_manager_header .oe_view_manager_sidebar {
.openerp .oe_view_manager table.oe_view_manager_header .oe_view_manager_sidebar {
margin: 0px auto;
width: 400px;
text-align: center;
}
.openerp .oe_view_manager .oe_view_manager_header td {
.openerp .oe_view_manager table.oe_view_manager_header td {
line-height: 26px;
}
.openerp .oe_view_manager .oe_view_manager_header h2 {
.openerp .oe_view_manager table.oe_view_manager_header h2 {
font-size: 18px;
margin: 0;
float: left;
}
.openerp .oe_view_manager .oe_view_manager_header h2 a {
.openerp .oe_view_manager table.oe_view_manager_header h2 a {
color: #8a89ba;
}
.openerp .oe_view_manager .oe_view_manager_header .oe_button_group {
.openerp .oe_view_manager table.oe_view_manager_header .oe_button_group {
display: inline-block;
border: 1px solid #ababab;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
}
.openerp .oe_view_manager .oe_view_manager_header .oe_button_group li {
.openerp .oe_view_manager table.oe_view_manager_header .oe_button_group li {
float: left;
border-right: 1px solid #ababab;
}
.openerp .oe_view_manager .oe_view_manager_header .oe_button_group li:last-child {
.openerp .oe_view_manager table.oe_view_manager_header .oe_button_group li:last-child {
border: none;
}
.openerp .oe_view_manager .oe_view_manager_header .oe_button_group a {
.openerp .oe_view_manager table.oe_view_manager_header .oe_button_group a {
color: #4c4c4c;
}
.openerp .oe_view_manager .oe_view_manager_header .oe_button_group a:hover {
.openerp .oe_view_manager table.oe_view_manager_header .oe_button_group a:hover {
text-decoration: none;
}
.openerp .oe_view_manager .oe_view_manager_header .oe_button_group .active {
.openerp .oe_view_manager table.oe_view_manager_header .oe_button_group .active {
background: #999999;
-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) inset;
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) inset;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) inset;
}
.openerp .oe_view_manager .oe_view_manager_header .oe_button_group .active a {
.openerp .oe_view_manager table.oe_view_manager_header .oe_button_group .active a {
color: white;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.openerp .oe_view_manager .oe_view_manager_header .oe_view_manager_buttons {
.openerp .oe_view_manager table.oe_view_manager_header .oe_view_manager_buttons {
white-space: nowrap;
}
.openerp .oe_view_manager .oe_view_manager_pager {
@ -1319,7 +1350,7 @@
float: right;
padding: 1px 0;
line-height: 18px;
width: 480px;
width: 400px;
border: 1px solid #ababab;
background: white;
-moz-border-radius: 13px;
@ -1741,12 +1772,12 @@
width: auto;
}
.openerp .oe_form_nosheet {
margin-left: 10px;
margin-right: 10px;
margin: 20px;
}
.openerp .oe_form_nosheet > header {
margin-left: -10px;
margin-right: -10px;
margin-top: -20px;
margin-left: -20px;
margin-right: -20px;
}
.openerp .oe_form header {
position: relative;
@ -1765,7 +1796,7 @@
display: inline-block;
float: right;
}
.openerp .oe_form footer {
.openerp .oe_form div.oe_chatter {
min-width: 650px;
max-width: 860px;
margin: 0 auto;
@ -1817,17 +1848,21 @@
.openerp .oe_form .oe_subtotal_footer td.oe_form_group_cell_label {
border-right: none;
}
.openerp .oe_form .oe_subtotal_footer .oe_form_field {
width: auto !important;
}
.openerp .oe_form .oe_subtotal_footer .oe_subtotal_footer_separator {
width: 108px;
border-top: 1px solid #cacaca;
font-sie: 120%;
font-weight: bold;
font-size: 18px;
}
.openerp .oe_form .oe_subtotal_footer label:after {
content: ":";
}
.openerp .oe_form .oe_subtotal_footer label.oe_subtotal_footer_separator {
font-weight: bold !important;
padding: 2px 8px 2px 0px !important;
padding: 2px 11px 2px 0px !important;
}
.openerp .oe_form .oe_subtotal_footer label.oe_form_label_help {
font-weight: normal;
}
.openerp .oe_application .oe_form_sheetbg {
background: url(/web/static/src/img/form_sheetbg.png);
@ -1854,6 +1889,9 @@
.openerp .oe_application .oe_form_sheet .oe_notebook_page {
padding: 0 16px;
}
.openerp .oe_form .oe_form_button {
margin: 2px;
}
.openerp .oe_form td.oe_form_group_cell_label {
border-right: 1px solid #dddddd;
padding: 2px 0px 2px 0px;
@ -1861,17 +1899,17 @@
.openerp .oe_form td.oe_form_group_cell_label label {
line-height: 18px;
display: block;
min-width: 110px;
min-width: 120px;
}
.openerp .oe_form td.oe_form_group_cell + .oe_form_group_cell {
padding-left: 6px;
}
.openerp .oe_form .oe_form_group {
width: 100%;
margin: 4px 0 4px 0;
margin: 6px 0 6px 0;
}
.openerp .oe_form .oe_form_group .oe_group_right > tbody > tr > td:first-child {
padding-left: 18px;
.openerp .oe_form .oe_form_group .oe_form_group_cell.oe_group_right {
padding-left: 20px;
}
.openerp .oe_form .oe_form_label_help[for], .openerp .oe_form .oe_form_label[for] {
font-weight: bold;
@ -1941,15 +1979,6 @@
.openerp .oe_form .oe_form_field_text.oe_inline, .openerp .oe_form .oe_form_field_text.oe_inline > textarea {
width: 500px;
}
.openerp .oe_form .oe_form_field_float input {
width: 100px;
}
.openerp .oe_form h1 .oe_form_field_float input {
width: 140px;
}
.openerp .oe_form h2 .oe_form_field_float input {
width: 120px;
}
.openerp .oe_form h1, .openerp .oe_form h2, .openerp .oe_form h3, .openerp .oe_form h4, .openerp .oe_form h5, .openerp .oe_form h6 {
margin: 0 0 4px 0;
}
@ -1966,18 +1995,6 @@
.openerp .oe_form .oe_form_field input {
margin: 0px;
}
.openerp .oe_form .oe_form_field_integer {
width: 180px;
}
.openerp .oe_form .oe_form_field_float {
width: 180px;
}
.openerp .oe_form .oe_form_field_date {
width: 7.5em;
}
.openerp .oe_form .oe_form_field_datetime {
width: 11em;
}
.openerp .oe_form input[type="text"], .openerp .oe_form input[type="password"], .openerp .oe_form input[type="file"], .openerp .oe_form select {
height: 22px;
padding-top: 2px;
@ -2017,32 +2034,6 @@
padding-top: 4px;
width: auto;
}
.openerp .oe_form .oe_form_field_many2manytags .text-wrap {
width: 100% !important;
}
.openerp .oe_form .oe_form_field_many2manytags .text-wrap textarea {
width: 100% !important;
}
.openerp .oe_form .oe_form_field_many2manytags .oe_form_field_many2manytags_box {
border-radius: 2px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing: border-box;
position: relative;
float: left;
border: 1px solid #9daccc;
background: #e2e6f0;
color: black;
padding: 0px 3px 0px 3px;
margin: 0 2px 2px 0;
height: 16px;
font: 11px "lucida grande", tahoma, verdana, arial, sans-serif;
}
.openerp .oe_form .oe_form_field_many2manytags .text-core .text-wrap .text-dropdown .text-list .text-suggestion em {
font-style: italic;
text-decoration: none;
}
.openerp .oe_form .oe_datepicker_container {
display: none;
}
@ -2072,15 +2063,6 @@
.openerp .oe_form .oe_form_field_with_button.oe_no_button > .oe_button {
display: none;
}
.openerp .oe_form .oe_form_field_with_button:not(.oe_no_button) input {
border-right: none;
-webkit-border-top-right-radius: 0px;
-webkit-border-bottom-right-radius: 0px;
-moz-border-radius-topright: 0px;
-moz-border-radius-bottomright: 0px;
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
}
.openerp .oe_form .oe_form_field_with_button:not(.oe_no_button) > .oe_button {
float: right;
-moz-border-radius: 0;
@ -2096,6 +2078,18 @@
position: relative;
overflow: hidden;
}
.openerp .oe_form_editable .oe_form .oe_form_field_integer {
width: 7em !important;
}
.openerp .oe_form_editable .oe_form .oe_form_field_float {
width: 8em !important;
}
.openerp .oe_form_editable .oe_form .oe_form_field_date {
width: 7.5em !important;
}
.openerp .oe_form_editable .oe_form .oe_form_field_datetime {
width: 11.5em !important;
}
.openerp .oe_hidden_input_file {
overflow: hidden;
position: relative;
@ -2125,6 +2119,7 @@
}
.openerp .oe_form .oe_form_field_image .oe_form_field_image_controls {
position: absolute;
white-space: nowrap;
top: 1px;
padding: 3px 0 0 0;
margin: 0 1px;
@ -2146,33 +2141,42 @@
}
.openerp .oe_form_field_many2one span.oe_m2o_drop_down_button {
position: absolute;
top: 1px;
top: 2px;
right: 0px;
}
.openerp .oe_form_field_many2one .oe_m2o_cm_button {
line-height: 14px;
}
.openerp .oe_form .oe_form_field_one2many > .oe_view_manager .oe_list_pager_single_page {
display: none;
}
.openerp .oe_form_field_one2many .oe_list .oe_list_edit_row_save {
.openerp .oe_form_field_one2many .oe_list_content > thead, .openerp .oe_form_field_many2many .oe_list_content > thead {
border-bottom: 1px;
}
.openerp .oe_form_field_one2many .oe_list_content > tbody tr:nth-child(odd), .openerp .oe_form_field_many2many .oe_list_content > tbody tr:nth-child(odd) {
background: transparent;
}
.openerp .oe_form_field_one2many .oe_list .oe_list_edit_row_save, .openerp .oe_form_field_many2many .oe_list .oe_list_edit_row_save {
background: url(/web/static/src/img/iconset-b-remove.png) 50% 50% no-repeat;
}
.openerp .oe_form_field_one2many .oe_list .oe_list_edit_row_save:before {
.openerp .oe_form_field_one2many .oe_list .oe_list_edit_row_save:before, .openerp .oe_form_field_many2many .oe_list .oe_list_edit_row_save:before {
visibility: hidden;
}
.openerp .oe_form_field_one2many > .oe_view_manager .oe_header_row_top {
.openerp .oe_form_field_one2many > .oe_view_manager .oe_header_row_top, .openerp .oe_form_field_many2many > .oe_view_manager .oe_header_row_top {
display: none;
}
.openerp .oe_form_field_one2many > .oe_view_manager .oe_view_manager_header2 td {
.openerp .oe_form_field_one2many > .oe_view_manager .oe_view_manager_header2 td, .openerp .oe_form_field_many2many > .oe_view_manager .oe_view_manager_header2 td {
padding: 0px 8px;
line-height: 16px;
}
.openerp .oe_form_field_one2many > .oe_view_manager .oe_view_manager_header2 td .oe_i {
.openerp .oe_form_field_one2many > .oe_view_manager .oe_view_manager_header2 td .oe_i, .openerp .oe_form_field_many2many > .oe_view_manager .oe_view_manager_header2 td .oe_i {
font-size: 13px;
}
.openerp .oe_form_field_one2many > .oe_view_manager .oe_view_manager_header2 td .oe_pager_group {
.openerp .oe_form_field_one2many > .oe_view_manager .oe_view_manager_header2 td .oe_pager_group, .openerp .oe_form_field_many2many > .oe_view_manager .oe_view_manager_header2 td .oe_pager_group {
height: auto;
line-height: 16px;
}
.openerp .oe_form_field_one2many > .oe_view_manager .oe_view_manager_header2 td .oe_pager_group li {
.openerp .oe_form_field_one2many > .oe_view_manager .oe_view_manager_header2 td .oe_pager_group li, .openerp .oe_form_field_many2many > .oe_view_manager .oe_view_manager_header2 td .oe_pager_group li {
height: auto;
line-height: 16px;
}
@ -2185,6 +2189,10 @@
.openerp .oe_list_content td:first-child:after, .openerp .oe_list_content th:first-child:after {
border-width: 0;
}
.openerp .oe_list_content td.oe_number {
text-align: right !important;
max-width: 100px;
}
.openerp .oe_list_content > thead {
border-bottom: 2px solid #cacaca;
background: #eeeeee;
@ -2233,8 +2241,8 @@
.openerp .oe_list_content > tbody > tr > td.oe_list_field_cell {
padding: 3px 6px;
}
.openerp .oe_list_content > tbody > tr > td, .openerp .oe_list_content > tbody > tr > th {
line-height: 18px;
.openerp .oe_list_content > tbody > tr > td.oe_list_field_cell progress {
width: 100%;
}
.openerp .oe_list_content > tbody > tr > td > button, .openerp .oe_list_content > tbody > tr > th > button {
border: none;
@ -2250,9 +2258,6 @@
.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_list_content > tbody > tr > td.oe_number {
text-align: right !important;
}
.openerp .oe_list_content > tbody > tr:nth-child(odd) {
background-color: #f0f0fa;
background-color: #f0f0fa;

View File

@ -205,13 +205,7 @@ $sheet-max-width: 860px
// Modal box
&.ui-dialog
display: none
position: fixed
padding: 6px
top: 50%
left: 50%
z-index: 1050
width: 560px
margin: -150px 0 0 -280px
//overflow: hidden
background-color: rgba(60,60,60,0.7)
border: 1px solid
@ -220,6 +214,8 @@ $sheet-max-width: 860px
@include radius(8px)
@include box-shadow(0 1px 12px rgba(0, 0, 0, 0.6))
@include background-clip()
.ui-dialog-content
padding: 0px
.ui-dialog-titlebar, .ui-dialog-content, .ui-dialog-buttonpane
padding: 16px
.ui-dialog-titlebar
@ -236,11 +232,12 @@ $sheet-max-width: 860px
.ui-dialog-buttonpane
border-top: 1px solid #e0e0e0
background: #f5f7f9
padding: 8px
margin: 0
@include radius(0 0 2px 2px)
button
margin-left: 8px
margin: 0
.ui-dialog-buttonset
float: left
.ui-dialog-titlebar-close
padding: 0
.ui-icon-closethick
@ -260,6 +257,10 @@ $sheet-max-width: 860px
color: black
text-decoration: none
&.ui-dialog.oe_act_window
.ui-dialog-content
padding: 0px
.modal-backdrop
position: fixed
top: 0
@ -294,6 +295,7 @@ $sheet-max-width: 860px
cursor: wait
.oe_fade
color: #888
font-weight: normal
.oe_bold
font-weight: bold
.oe_inline
@ -322,7 +324,8 @@ $sheet-max-width: 860px
&:hover
background: #ED6F6A
.oe_title
width: 60%
width: 50%
float: left
.oe_title:after
content: "."
display: block
@ -330,17 +333,20 @@ $sheet-max-width: 860px
clear: both
visibility: hidden
.oe_button_box
width: 38%
width: 270px
text-align: right
button
margin: 4px
.oe_avatar
margin: 0 16px 0 0
img
height: 50px
margin: 0 6px 15px 0
> img
height: 90px
max-width: 100px
@include radius(3px)
@include box-shadow(0 1px 3px rgba(0, 0, 0, 0.3))
border: none
.oe_avatar + div
margin-left: 5px
.oe_button.oe_link
@include reset()
img
@ -362,8 +368,26 @@ $sheet-max-width: 860px
text-decoration: none
.oe_star_on
color: gold
//.oe_edit_only 
// }}}
// Tags (for many2many tags, among others) {{{
.oe_tag
border-radius: 2px
@include box-sizing(border)
border: 1px solid #9DACCC
background: #E2E6F0
color: black !important
padding: 0px 3px 0px 3px
margin: 0 2px 2px 0
height: 16px
// font: 11px "lucida grande", tahoma, verdana, arial, sans-serif
.oe_tags
.text-wrap
width: 100% !important
textarea
width: 100% !important
.text-core .text-wrap .text-dropdown .text-list .text-suggestion em
font-style: italic
text-decoration: none
// }}}
// Tooltips {{{
&.oe_tooltip
@ -823,7 +847,7 @@ $sheet-max-width: 860px
text-shadow: 0 1px 1px rgba(0,0,0,0.2)
@include radius(4px)
@include box-shadow(inset 0 1px 1px rgba(0, 0, 0, 0.2))
.oe_menu_counter
.oe_menu_counter
float: right
background: #8a89ba
color: #eee
@ -846,7 +870,7 @@ $sheet-max-width: 860px
color: $colour4
text-shadow: 0 1px 1px white
@include box-shadow(0 1px 1px rgba(0, 0, 0, 0.2))
.oe_menu_counter
.oe_menu_counter
background: #eee
color: #8a89ba
.oe_menu_toggler:before
@ -888,8 +912,9 @@ $sheet-max-width: 860px
.oe_view_manager_view_kanban
height: inherit
.oe_view_manager_header
table.oe_view_manager_header
width: 100%
table-layout: fixed
.oe_header_row
//min-height: 26px
//line-height: 26px
@ -900,7 +925,6 @@ $sheet-max-width: 860px
padding-top: 0
.oe_view_manager_sidebar
margin: 0px auto
width: 400px
text-align: center
td
line-height: 26px
@ -1033,7 +1057,7 @@ $sheet-max-width: 860px
float: right
padding: 1px 0
line-height: 18px
width: 480px
width: 400px
border: 1px solid #ababab
background: white
@include radius(13px)
@ -1312,7 +1336,7 @@ $sheet-max-width: 860px
margin: 0 0 0 4px
padding: 0
// }}}
// Views Common {{{
.oe_view_nocontent
@ -1356,25 +1380,25 @@ $sheet-max-width: 860px
display: none !important
.oe_form .oe_form_field_date
width: auto
.oe_form_nosheet
margin-left: 10px
margin-right: 10px
.oe_form_nosheet
margin: 20px
.oe_form_nosheet > header
margin-left: -10px
margin-right: -10px
margin-top: -20px
margin-left: -20px
margin-right: -20px
// }}}
// FormView.custom tags and classes {{{
.oe_form
.oe_form
header
position: relative
border-bottom: 1px solid #cacaca
@include vertical-gradient(#fcfcfc, #dedede)
padding: 0 8px
line-height: 30px
line-height: 30px
ul
display: inline-block
float: right
footer
div.oe_chatter
min-width: 650px
max-width: $sheet-max-width
margin: 0 auto
@ -1387,12 +1411,12 @@ $sheet-max-width: 860px
vertical-align: top
margin-left: 8px
li
border-right: none
border-right: none
padding: 0
margin: 0
float: left
float: left
vertical-align: top
height: 30px
height: 30px
padding: 0 0 0 12px
&:first-child
border-left: 1px solid #cacaca
@ -1414,21 +1438,24 @@ $sheet-max-width: 860px
padding: 0 !important
td.oe_form_group_cell_label
border-right: none
.oe_form_field
width: auto !important
.oe_subtotal_footer_separator
width: 108px
border-top: 1px solid #cacaca
font-sie: 120%
font-weight: bold
font-size: 18px
label:after
content: ":"
label.oe_subtotal_footer_separator
font-weight: bold !important
padding: 2px 8px 2px 0px !important
padding: 2px 11px 2px 0px !important
label.oe_form_label_help
font-weight: normal
// no sheet in popups
.oe_application
.oe_form_sheetbg
background: url(/web/static/src/img/form_sheetbg.png)
padding: 8px 0
border-bottom: 1px solid #ddd
border-bottom: 1px solid #ddd
.oe_form_sheet_width
min-width: 650px
max-width: $sheet-max-width
@ -1446,21 +1473,22 @@ $sheet-max-width: 860px
// }}}
// FormView.group {{{
.oe_form
.oe_form_button
margin: 2px
td.oe_form_group_cell_label
border-right: 1px solid #ddd
padding: 2px 0px 2px 0px
label
line-height: 18px
display: block
min-width: 110px
min-width: 120px
td.oe_form_group_cell + .oe_form_group_cell
padding-left: 6px
.oe_form_group
width: 100%
margin: 4px 0 4px 0
.oe_group_right
> tbody > tr > td:first-child
padding-left: 18px
margin: 6px 0 6px 0
.oe_form_group_cell.oe_group_right
padding-left: 20px
// }}}
// FormView.label {{{
.oe_form
@ -1521,12 +1549,6 @@ $sheet-max-width: 860px
width: 100%
.oe_form_field_text.oe_inline, .oe_form_field_text.oe_inline > textarea
width: 500px
.oe_form_field_float input
width: 100px
h1 .oe_form_field_float input
width: 140px
h2 .oe_form_field_float input
width: 120px
h1, h2, h3, h4, h5, h6
margin: 0 0 4px 0
input
@ -1539,14 +1561,6 @@ $sheet-max-width: 860px
line-height: 18px
input
margin: 0px
.oe_form_field_integer
width: 180px
.oe_form_field_float
width: 180px
.oe_form_field_date
width: 7.5em
.oe_form_field_datetime
width: 11em
input[type="text"], input[type="password"], input[type="file"], select
height: 22px
padding-top: 2px
@ -1572,26 +1586,6 @@ $sheet-max-width: 860px
.oe_form_field_boolean
padding-top: 4px
width: auto
.oe_form_field_many2manytags
.text-wrap
width: 100% !important
textarea
width: 100% !important
.oe_form_field_many2manytags_box
border-radius: 2px
@include box-sizing(border)
position: relative
float: left
border: 1px solid #9DACCC
background: #E2E6F0
color: black
padding: 0px 3px 0px 3px
margin: 0 2px 2px 0
height: 16px
font: 11px "lucida grande", tahoma, verdana, arial, sans-serif
.text-core .text-wrap .text-dropdown .text-list .text-suggestion em
font-style: italic
text-decoration: none
.oe_datepicker_container
display: none
.oe_datepicker_root
@ -1617,14 +1611,6 @@ $sheet-max-width: 860px
.oe_form_field_with_button.oe_no_button > .oe_button
display: none
.oe_form_field_with_button:not(.oe_no_button)
input
border-right: none
-webkit-border-top-right-radius: 0px
-webkit-border-bottom-right-radius: 0px
-moz-border-radius-topright: 0px
-moz-border-radius-bottomright: 0px
border-top-right-radius: 0px
border-bottom-right-radius: 0px
> .oe_button
float: right
@include radius(0)
@ -1636,6 +1622,16 @@ $sheet-max-width: 860px
> div
position: relative
overflow: hidden
.oe_form_editable
.oe_form
.oe_form_field_integer
width: 7em !important
.oe_form_field_float
width: 8em !important
.oe_form_field_date
width: 7.5em !important
.oe_form_field_datetime
width: 11.5em !important
// }}}
// FormView.fields_binary {{{
/* http://www.quirksmode.org/dom/inputfile.html
@ -1669,6 +1665,7 @@ $sheet-max-width: 860px
vertical-align: top
.oe_form_field_image_controls
position: absolute
white-space: nowrap
top: 1px
padding: 3px 0 0 0
margin: 0 1px
@ -1687,15 +1684,23 @@ $sheet-max-width: 860px
position: relative
span.oe_m2o_drop_down_button
position: absolute
top: 1px
top: 2px
right: 0px
.oe_m2o_cm_button
line-height: 14px
// }}}
// FormView.one2many {{{
.oe_form .oe_form_field_one2many > .oe_view_manager
.oe_list_pager_single_page
display: none
.oe_form_field_one2many
.oe_form_field_one2many,.oe_form_field_many2many
// TODO: oe_form_field_one2many_list?
.oe_list_content
> thead
border-bottom: 1px
> tbody
tr:nth-child(odd)
background: transparent
.oe_list .oe_list_edit_row_save
background: url(/web/static/src/img/iconset-b-remove.png) 50% 50% no-repeat
&:before
@ -1728,6 +1733,9 @@ $sheet-max-width: 860px
td:first-child, th:first-child
&:after
border-width: 0
td.oe_number
text-align: right !important
max-width: 100px
> thead
border-bottom: 2px solid #cacaca
background: #eee
@ -1763,8 +1771,9 @@ $sheet-max-width: 860px
border-top: 1px solid #ddd
> td.oe_list_field_cell
padding: 3px 6px
progress
width: 100%
> td, > th
line-height: 18px
> button
border: none
background: transparent
@ -1774,8 +1783,6 @@ $sheet-max-width: 860px
width: 17px
&:after
border-width: 0
> td.oe_number
text-align: right !important
> tr:nth-child(odd)
background-color: #f0f0fa
@include vertical-gradient(#f0f0fa, #eeeef6)

View File

@ -63,7 +63,7 @@ instance.web.Dialog = instance.web.Widget.extend({
this.dialog_options = {
modal: true,
destroy_on_close: true,
width: $(window).width() * (($(window).width() > 1024) ? 0.5 : 0.75),
width: 900,
min_width: 0,
max_width: '95%',
height: 'auto',
@ -145,9 +145,9 @@ instance.web.Dialog = instance.web.Widget.extend({
_.each(this.getChildren(), function(el) {
el.destroy();
});
if (! this.isDestroyed()) {
this.$element.dialog('destroy');
}
if (! this.isDestroyed()) {
this.$element.dialog('destroy');
}
this._super();
}
});
@ -212,11 +212,11 @@ instance.web.CrashManager = instance.web.CallbackEnabled.extend({
dialog.$element.html(QWeb.render('CrashManager.error', {session: instance.connection, error: error}));
},
on_javascript_exception: function(exception) {
this.on_traceback({
type: _t("Client Error"),
message: exception,
data: {debug: ""}
});
this.on_traceback({
type: _t("Client Error"),
message: exception,
data: {debug: ""}
});
},
});
@ -482,24 +482,26 @@ instance.web.Login = instance.web.Widget.extend({
}
}
},
open_db_manager: function(){
var self = this;
self.$element.find('.oe_login_bottom').hide();
self.$element.find('.oe_login_pane').hide();
self.databasemanager = new instance.web.DatabaseManager(self);
self.databasemanager.appendTo(self.$element);
self.databasemanager.do_exit.add_last(function() {
self.databasemanager.destroy();
self.$element.find('.oe_login_bottom').show();
self.$element.find('.oe_login_pane').show();
self.load_db_list(true).then(self.on_db_list_loaded);
});
},
start: function() {
var self = this;
self.$element.find("form").submit(self.on_submit);
self.$element.find('.oe_login_manage_db').click(function() {
self.$element.find('.oe_login_bottom').hide();
self.$element.find('.oe_login_pane').hide();
self.databasemanager = new instance.web.DatabaseManager(self);
self.databasemanager.appendTo(self.$element);
self.databasemanager.do_exit.add_last(function() {
self.databasemanager.destroy();
self.$element.find('.oe_login_bottom').show();
self.$element.find('.oe_login_pane').show();
self.load_db_list(true).then(self.proxy('_db_list_loaded'));
});
self.open_db_manager();
});
return self.load_db_list().then(self.proxy('_db_list_loaded'));
return self.load_db_list().then(self.on_db_list_loaded);
},
load_db_list: function (force) {
var d = $.when(), self = this;
@ -514,11 +516,14 @@ instance.web.Login = instance.web.Widget.extend({
}
return d;
},
_db_list_loaded: function () {
var list = this._db_list,
dbdiv = this.$element.find('div.oe_login_dbpane');
on_db_list_loaded: function () {
var self = this;
var list = this._db_list;
var dbdiv = this.$element.find('div.oe_login_dbpane');
this.$element.find("[name=db]").replaceWith(instance.web.qweb.render('Login.dblist', { db_list: list, selected_db: this.selected_db}));
if(list && list.length === 1) {
if(list.length === 0) {
self.open_db_manager();
} else if(list && list.length === 1) {
dbdiv.hide();
} else {
dbdiv.show();
@ -667,7 +672,7 @@ instance.web.Menu = instance.web.Widget.extend({
* @param {Number} id the action_id to match
*/
open_action: function (id) {
var $menu = this.$element.add(this.$secondary_menus).find('a[data-action-id=' + id + ']');
var $menu = this.$element.add(this.$secondary_menus).find('a[data-action-id="' + id + '"]');
var menu_id = $menu.data('menu');
if (menu_id) {
this.open_menu(menu_id);
@ -822,8 +827,8 @@ instance.web.UserMenu = instance.web.Widget.extend({
{text: _t("Change password"), click: function(){ self.change_password(); }},
{text: _t("Cancel"), click: function(){ $(this).dialog('destroy'); }},
{text: _t("Save"), click: function(){
var inner_viewmanager = action_manager.inner_viewmanager;
inner_viewmanager.views[inner_viewmanager.active_view].controller.do_save()
var inner_widget = action_manager.inner_widget;
inner_widget.views[inner_widget.active_view].controller.do_save()
.then(function() {
self.dialog.destroy();
// needs to refresh interface in case language changed
@ -1037,6 +1042,7 @@ instance.web.WebClient = instance.web.Widget.extend({
if (options.needaction) {
action.context.search_default_needaction_pending = true;
}
self.action_manager.clear_breadcrumbs();
self.action_manager.do_action(action);
});
},

View File

@ -404,10 +404,11 @@ instance.web.Session = instance.web.JsonRPC.extend( /** @lends instance.web.Sess
}
});
/**
* Event Bus used to bind events scoped in the current instance
*/
instance.web.bus = new (instance.web.Class.extend(instance.web.EventDispatcherMixin, {
instance.web.Bus = instance.web.Class.extend(instance.web.EventDispatcherMixin, {
init: function() {
instance.web.EventDispatcherMixin.init.call(this, parent);
var self = this;
@ -425,7 +426,8 @@ instance.web.bus = new (instance.web.Class.extend(instance.web.EventDispatcherMi
});
});
}
}))();
})
instance.web.bus = new instance.web.Bus();
/** OpenERP Translations */
instance.web.TranslationDataBase = instance.web.Class.extend(/** @lends instance.web.TranslationDataBase# */{

View File

@ -53,7 +53,7 @@ instance.web.ViewEditor = instance.web.OldWidget.extend({
this.main_view_id = this.parent.fields_view.view_id;
this.action_manager = new instance.web.ActionManager(this);
$.when(this.action_manager.do_action(action)).then(function() {
var viewmanager = self.action_manager.inner_viewmanager,
var viewmanager = self.action_manager.inner_widget,
controller = viewmanager.views[viewmanager.active_view].controller;
self.action_manager.appendTo(self.view_edit_dialog.$element);
self.action_manager.renderElement(self.view_edit_dialog);
@ -88,7 +88,7 @@ instance.web.ViewEditor = instance.web.OldWidget.extend({
} else {
$.when(self.do_save_view(view_values)).then(function() {
self.create_view_dialog.close();
var controller = self.action_manager.inner_viewmanager.views[self.action_manager.inner_viewmanager.active_view].controller;
var controller = self.action_manager.inner_widget.views[self.action_manager.inner_widget.active_view].controller;
controller.reload_content();
});
}
@ -167,7 +167,7 @@ instance.web.ViewEditor = instance.web.OldWidget.extend({
do_delete_view: function() {
var self = this;
if (confirm(_t("Do you really want to remove this view?"))) {
var controller = this.action_manager.inner_viewmanager.views[this.action_manager.inner_viewmanager.active_view].controller;
var controller = this.action_manager.inner_widget.views[this.action_manager.inner_widget.active_view].controller;
this.dataset.unlink([this.main_view_id]).then(function() {
controller.reload_content();
self.main_view_id = self.parent.fields_view.view_id;
@ -397,7 +397,7 @@ instance.web.ViewEditor = instance.web.OldWidget.extend({
action_manager.do_action(action);
}},
{text: _t("Close"), click: function(){
self.action_manager.inner_viewmanager.views[self.action_manager.inner_viewmanager.active_view].controller.reload_content();
self.action_manager.inner_widget.views[self.action_manager.inner_widget.active_view].controller.reload_content();
self.edit_xml_dialog.close();
}}
]
@ -998,7 +998,7 @@ instance.web.ViewEditor = instance.web.OldWidget.extend({
};
var action_manager = new instance.web.ActionManager(self);
$.when(action_manager.do_action(action)).then(function() {
var controller = action_manager.dialog_viewmanager.views['form'].controller;
var controller = action_manager.dialog_widget.views['form'].controller;
controller.on_button_cancel.add_last(function(){
action_manager.destroy()
});

View File

@ -9,7 +9,7 @@ instance.web.form = {};
/**
* Interface implemented by the form view or any other object
* able to provide the features necessary for the fields to work.
*
*
* Properties:
* - display_invalid_fields : if true, all fields where is_valid() return true should
* be displayed as invalid.
@ -287,10 +287,12 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
on_record_loaded: function(record) {
var self = this, set_values = [];
if (!record) {
this.set({ 'title' : undefined });
this.do_warn("Form", "The record could not be found in the database.", true);
return $.Deferred().reject();
}
this.datarecord = record;
this.set({ 'title' : record.id ? record.name : "New record" });
if (this.qweb) {
this.kill_current_form();
@ -524,7 +526,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
this.on_form_changed();
}
if (!_.isEmpty(result.warning)) {
instance.web.dialog($(QWeb.render("CrashManager.warning", result.warning)), {
instance.web.dialog($(QWeb.render("CrashManager.warning", result.warning)), {
title:result.warning.title,
modal: true,
buttons: [
@ -800,13 +802,13 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
});
},
get_fields_values: function(blacklist) {
blacklist = blacklist || [];
blacklist = blacklist || [];
var values = {};
var ids = this.get_selected_ids();
values["id"] = ids.length > 0 ? ids[0] : false;
_.each(this.fields, function(value_, key) {
if (_.include(blacklist, key))
return;
if (_.include(blacklist, key))
return;
var val = value_.get_value();
values[key] = val;
});
@ -863,6 +865,9 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
return option[0] === value;
})[1];
break;
case 'many2one':
displayed = field.get_displayed();
break;
}
return {
@ -953,7 +958,7 @@ instance.web.form.FormRenderingEngineInterface = instance.web.Class.extend({
/**
* Default rendering engine for the form view.
*
*
* It is necessary to set the view using set_view() before usage.
*/
instance.web.form.FormRenderingEngine = instance.web.form.FormRenderingEngineInterface.extend({
@ -1184,8 +1189,7 @@ instance.web.form.FormRenderingEngine = instance.web.form.FormRenderingEngineInt
row_cols = cols;
} else if (tagName==='group') {
// When <group> <group/><group/> </group>, we need a spacing between the two groups
$child.addClass('oe_group_right')
$td.addClass('oe_group_right')
}
row_cols -= colspan;
@ -1211,12 +1215,6 @@ instance.web.form.FormRenderingEngine = instance.web.form.FormRenderingEngineInt
$child = $td.children(':first');
switch ($child[0].tagName.toLowerCase()) {
case 'separator':
if ($child.attr('orientation') === 'vertical') {
$td.addClass('oe_vertical_separator').attr('width', '1');
$td.empty();
row_cols-= $td.attr('colspan') || 1;
total--;
}
break;
case 'label':
if ($child.attr('for')) {
@ -1276,7 +1274,7 @@ instance.web.form.FormRenderingEngine = instance.web.form.FormRenderingEngineInt
page_attrs.__page = $new_page;
page_attrs.__ic = ic;
pages.push(page_attrs);
$new_page.children().each(function() {
self.process($(this));
});
@ -1302,7 +1300,7 @@ instance.web.form.FormRenderingEngine = instance.web.form.FormRenderingEngineInt
}
});
});
this.handle_common_properties($new_notebook, $notebook);
return $new_notebook;
},
@ -1585,7 +1583,7 @@ instance.web.form.FormWidget = instance.web.Widget.extend(instance.web.form.Invi
parent: {}
});
if (a_dataset.parent_view) {
fields_values.parent = a_dataset.parent_view.get_fields_values([a_dataset.child_name]);
fields_values.parent = a_dataset.parent_view.get_fields_values([a_dataset.child_name]);
}
return fields_values;
},
@ -1603,7 +1601,7 @@ instance.web.form.FormWidget = instance.web.Widget.extend(instance.web.form.Invi
if (! v_context) {
v_context = (this.field || {}).context || {};
}
if (v_context.__ref || true) { //TODO: remove true
var fields_values = this._build_eval_context(blacklist);
v_context = new instance.web.CompoundContext(v_context).set_eval_context(fields_values);
@ -1711,14 +1709,14 @@ instance.web.form.WidgetButton = instance.web.form.FormWidget.extend({
/**
* Interface to be implemented by fields.
*
*
* Properties:
* - readonly: boolean. If set to true the field should appear in readonly mode.
* - force_readonly: boolean, When it is true, the field should always appear
* in read only mode, no matter what the value of the "readonly" property can be.
* Events:
* - changed_value: triggered to inform the view to check on_changes
*
*
*/
instance.web.form.FieldInterface = {
/**
@ -1729,14 +1727,14 @@ instance.web.form.FieldInterface = {
init: function(field_manager, node) {},
/**
* Called by the form view to indicate the value of the field.
*
*
* set_value() may return an object that can be passed to $.when() that represents the moment when
* the field has finished all operations necessary before the user can effectively use the widget.
*
*
* Multiple calls to set_value() can occur at any time and must be handled correctly by the implementation,
* regardless of any asynchronous operation currently running and the status of any promise that a
* previous call to set_value() could have returned.
*
*
* set_value() must be able, at any moment, to handle the syntax returned by the "read" method of the
* osv class in the OpenERP server as well as the syntax used by the set_value() (see below). It must
* also be able to handle any other format commonly used in the _defaults key on the models in the addons
@ -1746,16 +1744,16 @@ instance.web.form.FieldInterface = {
set_value: function(value_) {},
/**
* Get the current value of the widget.
*
*
* Must always return a syntaxically correct value to be passed to the "write" method of the osv class in
* the OpenERP server, although it is not assumed to respect the constraints applied to the field.
* For example if the field is marqued as "required", a call to get_value() can return false.
*
*
* get_value() can also be called *before* a call to set_value() and, in that case, is supposed to
* return a defaut value according to the type of field.
*
*
* This method is always assumed to perform synchronously, it can not return a promise.
*
*
* If there was no user interaction to modify the value of the field, it is always assumed that
* get_value() return the same semantic value than the one passed in the last call to set_value(),
* altough the syntax can be different. This can be the case for type of fields that have a different
@ -1785,14 +1783,14 @@ instance.web.form.FieldInterface = {
/**
* Abstract class for classes implementing FieldInterface.
*
*
* Properties:
* - effective_readonly: when it is true, the widget is displayed as readonly. Vary depending
* the values of the "readonly" property and the "force_readonly" property on the field manager.
* - value: useful property to hold the value of the field. By default, set_value() and get_value()
* set and retrieve the value property. Changing the value property also triggers automatically
* a 'changed_value' event that inform the view to trigger on_changes.
*
*
*/
instance.web.form.AbstractField = instance.web.form.FormWidget.extend(instance.web.form.FieldInterface, {
/**
@ -1811,7 +1809,7 @@ instance.web.form.AbstractField = instance.web.form.FormWidget.extend(instance.w
this.string = this.node.attrs.string || this.field.string || this.name;
this.set({'value': false});
this.set({required: this.modifiers['required'] === true});
// some events to make the property "effective_readonly" sync automatically with "readonly" and
// "force_readonly"
this.set({"readonly": this.modifiers['readonly'] === true});
@ -1821,7 +1819,7 @@ instance.web.form.AbstractField = instance.web.form.FormWidget.extend(instance.w
this.on("change:readonly", this, test_effective_readonly);
this.on("change:force_readonly", this, test_effective_readonly);
_.bind(test_effective_readonly, this)();
this.on("change:value", this, function() {
if (! this._inhibit_on_change)
this.trigger('changed_value');
@ -2003,7 +2001,7 @@ instance.web.form.FieldChar = instance.web.form.AbstractField.extend(instance.we
});
instance.web.form.FieldID = instance.web.form.FieldChar.extend({
});
instance.web.form.FieldEmail = instance.web.form.FieldChar.extend({
@ -2454,7 +2452,7 @@ instance.web.form.FieldSelection = instance.web.form.AbstractField.extend(instan
} else {
var self = this;
var option = _(this.values)
.detect(function (record) { return record[0] === self.get('value'); });
.detect(function (record) { return record[0] === self.get('value'); });
this.$element.text(option ? option[1] : this.values[0][1]);
}
},
@ -2633,7 +2631,7 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
render_editable: function() {
var self = this;
this.$input = this.$element.find("input");
self.$input.tipsy({
title: function() {
return "No element was selected, you should create or select one from the dropdown list.";
@ -2641,10 +2639,10 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
trigger:'manual',
fade: true,
});
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')) {
self.focus();
@ -2802,10 +2800,20 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
this.$input.val(str.split("\n")[0]);
this.current_display = this.$input.val();
} else {
str = _.escape(str).split("\n").join("<br />");
var lines = _.escape(str).split("\n");
var link = "";
var follow = "";
if (! this.get_definition_options().highlight_first_line) {
link = lines.join("<br />");
} else {
link = lines[0];
follow = _.rest(lines).join("<br />");
if (follow)
link += "<br />";
}
this.$element.find('a')
.unbind('click')
.html(str)
.html(link)
.click(function () {
self.do_action({
type: 'ir.actions.act_window',
@ -2817,6 +2825,7 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
});
return false;
});
$(".oe_form_m2o_follow").html(follow);
}
},
set_value: function(value_) {
@ -2833,6 +2842,9 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
this._super(value_);
this.inhibit_on_change = false;
},
get_displayed: function() {
return this.display_value["" + this.get("value")];
},
add_id: function(id) {
this.display_value = {};
this.set({value: id});
@ -2938,7 +2950,7 @@ instance.web.form.FieldOne2Many = instance.web.form.AbstractField.extend({
},
load_views: function() {
var self = this;
var modes = this.node.attrs.mode;
modes = !!modes ? modes.split(",") : ["tree"];
var views = [];
@ -3140,30 +3152,30 @@ instance.web.form.FieldOne2Many = instance.web.form.AbstractField.extend({
save_any_view: function() {
if (this.doing_on_change)
return false;
return this.session.synchronized_mode(_.bind(function() {
if (this.viewmanager && this.viewmanager.views && this.viewmanager.active_view &&
this.viewmanager.views[this.viewmanager.active_view] &&
this.viewmanager.views[this.viewmanager.active_view].controller) {
var view = this.viewmanager.views[this.viewmanager.active_view].controller;
if (this.viewmanager.active_view === "form") {
if (!view.is_initialized.isResolved()) {
return false;
}
var res = $.when(view.do_save());
if (!res.isResolved() && !res.isRejected()) {
console.warn("Asynchronous get_value() is not supported in form view.");
}
return res;
} else if (this.viewmanager.active_view === "list") {
var res = $.when(view.ensure_saved());
if (!res.isResolved() && !res.isRejected()) {
console.warn("Asynchronous get_value() is not supported in list view.");
}
return res;
}
}
return false;
}, this));
return this.session.synchronized_mode(_.bind(function() {
if (this.viewmanager && this.viewmanager.views && this.viewmanager.active_view &&
this.viewmanager.views[this.viewmanager.active_view] &&
this.viewmanager.views[this.viewmanager.active_view].controller) {
var view = this.viewmanager.views[this.viewmanager.active_view].controller;
if (this.viewmanager.active_view === "form") {
if (!view.is_initialized.isResolved()) {
return false;
}
var res = $.when(view.do_save());
if (!res.isResolved() && !res.isRejected()) {
console.warn("Asynchronous get_value() is not supported in form view.");
}
return res;
} else if (this.viewmanager.active_view === "list") {
var res = $.when(view.ensure_saved());
if (!res.isResolved() && !res.isRejected()) {
console.warn("Asynchronous get_value() is not supported in list view.");
}
return res;
}
}
return false;
}, this));
},
is_syntax_valid: function() {
if (!this.viewmanager.views[this.viewmanager.active_view])
@ -3520,7 +3532,7 @@ instance.web.form.FieldMany2ManyTags = instance.web.form.AbstractField.extend(in
$("textarea", self.$element).css("padding-left", "3px");
self.tags.addTags(_.map(data, function(el) {return {name: el[1], id:el[0]};}));
} else {
self.$element.html(QWeb.render("FieldMany2ManyTags.box", {elements: data}));
self.$element.html(QWeb.render("FieldMany2ManyTag", {elements: data}));
}
};
if (! self.get('values') || self.get('values').length > 0) {
@ -3692,7 +3704,7 @@ instance.web.form.FieldMany2ManyKanban = instance.web.form.AbstractField.extend(
this.dataset.on_unlink.add_last(function(ids) {
self.dataset_changed();
});
this.is_setted.then(function() {
self.load_view();
});
@ -3808,7 +3820,7 @@ instance.web.form.Many2ManyKanbanView = instance.web_kanban.KanbanView.extend({
});
instance.web.form.Many2ManyQuickCreate = instance.web.Widget.extend({
template: 'Many2ManyKanban.quick_create',
/**
* close_btn: If true, the widget will display a "Close" button able to trigger
* a "close" event.
@ -3924,8 +3936,8 @@ instance.web.form.AbstractFormPopup = instance.web.OldWidget.extend({
var self = this;
this.renderElement();
new instance.web.Dialog(this, {
width: '90%',
min_width: '800px',
dialogClass: 'oe_act_window',
close: function() {
self.check_exit(true);
},
@ -4501,7 +4513,7 @@ instance.web.form.FieldStatus = instance.web.form.AbstractField.extend({
this.selection = [];
// get fold information from widget
var fold = ((this.node.attrs || {}).statusbar_fold || true);
// build final domain: if fold option required, add the
// build final domain: if fold option required, add the
if (fold == true) {
var domain = new instance.web.CompoundDomain(['|'], ['&'], self.build_domain(), [['fold', '=', false]], [['id', '=', self.selected_value]]);
} else {
@ -4533,7 +4545,7 @@ instance.web.form.FieldStatus = instance.web.form.AbstractField.extend({
var shown = _.map(((this.node.attrs || {}).statusbar_visible || "").split(","),
function(x) { return _.str.trim(x); });
shown = _.select(shown, function(x) { return x.length > 0; });
if (shown.length == 0) {
this.to_show = this.selection;
} else {

View File

@ -1045,7 +1045,7 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web.
render_cell: function () {
return self.render_cell.apply(self, arguments); }
}, this)));
this.pad_table_to(5);
this.pad_table_to(4);
},
pad_table_to: function (count) {
if (this.records.length >= count ||

View File

@ -10,28 +10,111 @@ instance.web.ActionManager = instance.web.Widget.extend({
init: function(parent) {
this._super(parent);
this.inner_action = null;
this.inner_viewmanager = null;
this.inner_widget = null;
this.dialog = null;
this.dialog_viewmanager = null;
this.client_widget = null;
this.dialog_widget = null;
this.breadcrumbs = [];
},
start: function() {
this._super.apply(this, arguments);
this.$element.on('click', '.oe_breadcrumb_item', this.on_breadcrumb_clicked);
},
dialog_stop: function () {
if (this.dialog) {
this.dialog_viewmanager.destroy();
this.dialog_viewmanager = null;
this.dialog_widget.destroy();
this.dialog_widget = null;
this.dialog.destroy();
this.dialog = null;
}
},
content_stop: function () {
if (this.inner_viewmanager) {
this.inner_viewmanager.destroy();
this.inner_viewmanager = null;
/**
* Add a new item to the breadcrumb
*
* If the title of an item is an array, the multiple title mode is in use.
* (eg: a widget with multiple views might need to display a title for each view)
* In multiple title mode, the show() callback can check the index it receives
* in order to detect which of its titles has been clicked on by the user.
*
* @param {Object} item breadcrumb item
* @param {Object} item.widget widget containing the view(s) to be added to the breadcrumb added
* @param {Function} [item.show] triggered whenever the widget should be shown back
* @param {Function} [item.hide] triggered whenever the widget should be shown hidden
* @param {Function} [item.destroy] triggered whenever the widget should be destroyed
* @param {String|Array} [item.title] title(s) of the view(s) to be displayed in the breadcrumb
* @param {Function} [item.get_title] should return the title(s) of the view(s) to be displayed in the breadcrumb
*/
push_breadcrumb: function(item) {
var last = this.breadcrumbs.slice(-1)[0];
if (last) {
last.hide();
}
if (this.client_widget) {
this.client_widget.destroy();
this.client_widget = null;
var item = _.extend({
show: function(index) {
this.widget.$element.show();
},
hide: function() {
this.widget.$element.hide();
},
destroy: function() {
this.widget.destroy();
},
get_title: function() {
return this.title || this.widget.get('title');
}
}, item);
item.id = _.uniqueId('breadcrumb_');
this.breadcrumbs.push(item);
},
on_breadcrumb_clicked: function(ev) {
var $e = $(ev.target);
var id = $e.data('id');
var item;
for (var i = this.breadcrumbs.length - 1; i >= 0; i--) {
var it = this.breadcrumbs[i];
if (it.id == id) {
item = it;
break;
}
this.remove_breadcrumb(i);
}
var index = $e.parent().find('.oe_breadcrumb_item[data-id=' + $e.data('id') + ']').index($e);
item.show(index, $e);
this.inner_widget = item.widget;
},
clear_breadcrumbs: function() {
while (this.breadcrumbs.length) {
this.remove_breadcrumb(0);
}
},
remove_breadcrumb: function(index) {
var item = this.breadcrumbs.splice(index, 1)[0];
if (item) {
var dups = _.filter(this.breadcrumbs, function(it) {
return item.widget === it.widget;
});
if (!dups.length) {
item.destroy();
}
}
},
get_title: function() {
var titles = [];
for (var i = 0; i < this.breadcrumbs.length; i += 1) {
var item = this.breadcrumbs[i];
var tit = item.get_title();
if (!_.isArray(tit)) {
tit = [tit];
}
for (var j = 0; j < tit.length; j += 1) {
var label = _.escape(tit[j]);
if (i === this.breadcrumbs.length - 1 && j === tit.length - 1) {
titles.push(label);
} else {
titles.push(_.str.sprintf('<a href="#" class="oe_breadcrumb_item" data-id="%s">%s</a>', item.id, label));
}
}
}
return titles.join(' <span class="oe_fade">/</span> ');
},
do_push_state: function(state) {
if (this.getParent() && this.getParent().do_push_state) {
@ -49,7 +132,7 @@ instance.web.ActionManager = instance.web.Widget.extend({
var self = this,
action_loaded;
if (state.action_id) {
var run_action = (!this.inner_viewmanager) || this.inner_viewmanager.action.id !== state.action_id;
var run_action = (!this.inner_widget || !this.inner_widget.action) || this.inner_widget.action.id !== state.action_id;
if (run_action) {
this.null_action();
action_loaded = this.do_action(state.action_id);
@ -89,13 +172,13 @@ instance.web.ActionManager = instance.web.Widget.extend({
}
$.when(action_loaded || null).then(function() {
if (self.inner_viewmanager) {
self.inner_viewmanager.do_load_state(state, warm);
if (self.inner_widget && self.inner_widget.do_load_state) {
self.inner_widget.do_load_state(state, warm);
}
});
},
do_action: function(action, on_close) {
if (_.isNumber(action)) {
if (_.isNumber(action) || _.isString(action)) {
var self = this;
return self.rpc("/web/action/load", { action_id: action }, function(result) {
self.do_action(result.result, on_close);
@ -124,7 +207,7 @@ instance.web.ActionManager = instance.web.Widget.extend({
},
null_action: function() {
this.dialog_stop();
this.content_stop();
this.clear_breadcrumbs();
},
ir_actions_act_window: function (action, on_close) {
var self = this;
@ -137,29 +220,31 @@ instance.web.ActionManager = instance.web.Widget.extend({
}
if (action.target === 'new') {
if (this.dialog === null) {
this.dialog = new instance.web.Dialog(this, { width: '80%' });
// These buttons will be overwrited by <footer> if any
this.dialog = new instance.web.Dialog(this, {
buttons: { "Close": function() { $(this).dialog("close"); }},
dialogClass: 'oe_act_window'
});
if(on_close)
this.dialog.on_close.add(on_close);
} else {
this.dialog_viewmanager.destroy();
this.dialog_widget.destroy();
}
this.dialog.dialog_title = action.name;
this.dialog_viewmanager = new instance.web.ViewManagerAction(this.dialog, action);
this.dialog_viewmanager.appendTo(this.dialog.$element);
this.dialog_viewmanager.$element.addClass("oe_view_manager_" + (action.target || 'current'));
this.dialog_widget = new instance.web.ViewManagerAction(this, action);
this.dialog_widget.appendTo(this.dialog.$element);
this.dialog.open();
} else {
this.dialog_stop();
this.content_stop();
if(action.menu_id) {
return this.getParent().do_action(action, function () {
instance.webclient.menu.open_menu(action.menu_id);
});
}
this.inner_action = action;
this.inner_viewmanager = new instance.web.ViewManagerAction(this, action);
this.inner_viewmanager.appendTo(this.$element);
this.inner_viewmanager.$element.addClass("oe_view_manager_" + (action.target || 'current'));
var inner_widget = this.inner_widget = new instance.web.ViewManagerAction(this, action);
inner_widget.add_breadcrumb();
this.inner_widget.appendTo(this.$element);
}
},
ir_actions_act_window_close: function (action, on_closed) {
@ -178,10 +263,14 @@ instance.web.ActionManager = instance.web.Widget.extend({
});
},
ir_actions_client: function (action) {
this.content_stop();
this.dialog_stop();
var ClientWidget = instance.web.client_actions.get_object(action.tag);
(this.client_widget = new ClientWidget(this, action.params)).appendTo(this.$element);
this.inner_widget = new ClientWidget(this, action.params);
this.push_breadcrumb({
widget: this.inner_widget,
title: action.name
});
this.inner_widget.appendTo(this.$element);
},
ir_actions_report_xml: function(action, on_closed) {
var self = this;
@ -290,35 +379,7 @@ instance.web.ViewManager = instance.web.Widget.extend({
this.active_view = view_type;
if (!view.controller) {
// Lazy loading of views
var controllerclass = this.registry.get_object(view_type);
var options = _.clone(view.options);
if (view_type === "form" && this.action) {
switch (this.action.target) {
case 'new':
case 'inline':
options.initial_mode = 'edit';
break;
}
}
var controller = new controllerclass(this, this.dataset, view.view_id, options);
if (view.embedded_view) {
controller.set_embedded_view(view.embedded_view);
}
controller.do_switch_view.add_last(_.bind(this.switch_view, this));
controller.do_prev_view.add_last(this.on_prev_view);
var container = this.$element.find(".oe_view_manager_view_" + view_type);
view_promise = controller.appendTo(container);
this.views[view_type].controller = controller;
this.views[view_type].deferred.resolve(view_type);
$.when(view_promise).then(function() {
self.on_controller_inited(view_type, controller);
if (self.searchview
&& self.flags.auto_search
&& view.controller.searchable !== false) {
self.searchview.ready.then(self.searchview.do_search);
}
});
view_promise = this.do_create_view(view_type);
} else if (this.searchview
&& self.flags.auto_search
&& view.controller.searchable !== false) {
@ -347,14 +408,90 @@ instance.web.ViewManager = instance.web.Widget.extend({
container.hide();
controller.do_hide();
}
// put the <footer> in the dialog's buttonpane
if (self.$element.parent('.ui-dialog-content') && self.$element.find('footer')) {
self.$element.parent('.ui-dialog-content').parent().find('div.ui-dialog-buttonset').hide()
self.$element.find('footer').appendTo(
self.$element.parent('.ui-dialog-content').parent().find('div.ui-dialog-buttonpane')
);
}
}
});
self.$element.find('.oe_view_title_text:first').text(
self.display_title());
});
return view_promise;
},
do_create_view: function(view_type) {
// Lazy loading of views
var self = this;
var view = this.views[view_type];
var controllerclass = this.registry.get_object(view_type);
var options = _.clone(view.options);
if (view_type === "form" && this.action) {
switch (this.action.target) {
case 'new':
case 'inline':
options.initial_mode = 'edit';
break;
}
}
var controller = new controllerclass(this, this.dataset, view.view_id, options);
controller.on("change:title", this, function() {
if (self.active_view === view_type) {
self.set_title(controller.get('title'));
}
});
if (view.embedded_view) {
controller.set_embedded_view(view.embedded_view);
}
controller.do_switch_view.add_last(_.bind(this.switch_view, this));
controller.do_prev_view.add_last(this.on_prev_view);
var container = this.$element.find(".oe_view_manager_view_" + view_type);
var view_promise = controller.appendTo(container);
this.views[view_type].controller = controller;
this.views[view_type].deferred.resolve(view_type);
return $.when(view_promise).then(function() {
self.on_controller_inited(view_type, controller);
if (self.searchview
&& self.flags.auto_search
&& view.controller.searchable !== false) {
self.searchview.ready.then(self.searchview.do_search);
}
});
},
set_title: function(title) {
this.$element.find('.oe_view_title_text:first').text(title);
},
add_breadcrumb: function() {
var self = this;
var views = [this.active_view || this.views_src[0].view_type];
this.on_mode_switch.add(function(mode) {
var last = views.slice(-1)[0];
if (mode !== last) {
if (mode !== 'form') {
views.length = 0;
}
views.push(mode);
}
});
this.getParent().push_breadcrumb({
widget: this,
show: function(index, $e) {
var view_to_select = views[index];
self.$element.show();
if (self.active_view !== view_to_select) {
self.on_mode_switch(view_to_select);
}
},
get_title: function() {
return _.map(views, function(v) {
return self.views[v].controller.get('title');
});
}
});
},
/**
* Method used internally when a view asks to switch view. This method is meant
* to be extended by child classes to change the default behavior, which simply
@ -447,14 +584,6 @@ instance.web.ViewManager = instance.web.Widget.extend({
*/
on_action_executed: function () {
},
display_title: function () {
var view = this.views[this.active_view];
if (view) {
// ick
return view.controller.fields_view.arch.attrs.string;
}
return '';
}
});
instance.web.ViewManagerAction = instance.web.ViewManager.extend({
@ -499,7 +628,7 @@ instance.web.ViewManagerAction = instance.web.ViewManager.extend({
if (this.session.hidden_menutips) {
return;
}
this.session.hidden_menutips = {}
this.session.hidden_menutips = {};
},
/**
* Initializes the ViewManagerAction: sets up the searchview (if the
@ -527,32 +656,7 @@ instance.web.ViewManagerAction = instance.web.ViewManager.extend({
var manager_ready = $.when(searchview_loaded, main_view_loaded);
this.$element.find('.oe_debug_view').change(this.on_debug_changed);
if (this.action.help && !this.flags.low_profile) {
var Users = new instance.web.DataSet(self, 'res.users'),
$tips = this.$element.find('.oe_view_manager_menu_tips');
$tips.delegate('blockquote button', 'click', function() {
var $this = $(this);
//noinspection FallthroughInSwitchStatementJS
switch ($this.attr('name')) {
case 'disable':
Users.write(self.session.uid, {menu_tips:false});
case 'hide':
$this.closest('blockquote').hide();
self.session.hidden_menutips[self.action.id] = true;
}
});
if (!(self.action.id in self.session.hidden_menutips)) {
Users.read_ids([this.session.uid], ['menu_tips']).then(function(users) {
var user = users[0];
if (!(user && user.id === self.session.uid)) {
return;
}
$tips.find('blockquote').toggle(user.menu_tips);
});
}
}
this.$element.addClass("oe_view_manager_" + (this.action.target || 'current'));
return manager_ready;
},
on_debug_changed: function (evt) {
@ -675,12 +779,18 @@ instance.web.ViewManagerAction = instance.web.ViewManager.extend({
view: controller,
view_manager: self
}));
if (!self.action.name && fvg) {
self.$element.find('.oe_view_title_text').text(fvg.arch.attrs.string || fvg.name);
}
self.set_title();
});
},
do_create_view: function(view_type) {
var r = this._super.apply(this, arguments);
var view = this.views[view_type].controller;
view.set({ 'title': this.action.name });
return r;
},
set_title: function(title) {
this.$element.find('.oe_breadcrumb_title:first').html(this.getParent().get_title());
},
do_push_state: function(state) {
if (this.getParent() && this.getParent().do_push_state) {
state["view_type"] = this.active_view;
@ -702,9 +812,6 @@ instance.web.ViewManagerAction = instance.web.ViewManager.extend({
self.views[self.active_view].controller.do_load_state(state, warm);
});
},
display_title: function () {
return this.action.name;
}
});
instance.web.Sidebar = instance.web.Widget.extend({
@ -1130,7 +1237,7 @@ instance.web.View = instance.web.Widget.extend({
args.push(context);
return dataset.call_button(action_data.name, args, handler);
} else if (action_data.type=="action") {
return this.rpc('/web/action/load', { action_id: parseInt(action_data.name, 10), context: context, do_not_eval: true}, handler);
return this.rpc('/web/action/load', { action_id: action_data.name, context: context, do_not_eval: true}, handler);
} else {
return dataset.exec_workflow(record_id, action_data.name, handler);
}

View File

@ -399,16 +399,17 @@
<t t-name="ViewManager">
<div class="oe_view_manager">
<table class="oe_view_manager_header">
<col width="33%"/>
<col width="33%"/>
<col width="34%"/>
<col width="20%"/>
<col width="25%"/>
<col width="20%"/>
<col width="35%"/>
<tr class="oe_header_row oe_header_row_top">
<td colspan="2">
<h2 class="oe_view_title" t-if="widget.flags.display_title !== false">
<span class="oe_view_title_text"><t t-esc="widget.display_title()"/></span>
<span class="oe_view_title_text oe_breadcrumb_title"/>
</h2>
</td>
<td>
<td colspan="2">
<div class="oe_view_manager_view_search" t-opentag="true"/>
</td>
</tr>
@ -416,7 +417,7 @@
<td>
<div class="oe_view_manager_buttons"/>
</td>
<td>
<td colspan="2">
<div class="oe_view_manager_sidebar"/>
</td>
<td>
@ -771,7 +772,7 @@
<table border="0" cellpadding="0" cellspacing="0" t-attf-class="oe_form_group #{classnames}"/>
</t>
<t t-name="FormRenderingNotebook">
<div>
<div class="oe_clear">
<ul t-attf-class="oe_notebook #{classnames}">
<li t-foreach="pages" t-as="page" t-att-modifiers="page.modifiers">
<a t-attf-href="##{page.id}">
@ -786,7 +787,7 @@
</div>
</t>
<t t-name="FormRenderingSeparator">
<div t-attf-class="oe_horizontal_separator #{classnames}">
<div t-attf-class="oe_horizontal_separator oe_clear #{classnames}">
<t t-esc="string"/>
</div>
</t>
@ -942,11 +943,12 @@
</t>
<t t-name="FieldMany2One">
<span class="oe_form_field oe_form_field_many2one oe_form_field_with_button" t-att-style="widget.node.attrs.style">
<a t-if="widget.get('effective_readonly')" href="#" class="oe_form_uri"/>
<t t-if="widget.get('effective_readonly')">
<a href="#" class="oe_form_uri"/>
<span class="oe_form_m2o_follow"/>
</t>
<t t-if="!widget.get('effective_readonly')">
<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>
<a href="#" class="oe_m2o_cm_button oe_e oe_right">/</a>
<div>
<input type="text"
t-att-id="widget.id_for_label"
@ -961,18 +963,20 @@
</t>
</span>
</t>
<!-- Collection of m2m tags -->
<t t-name="FieldMany2ManyTags">
<div class="oe_form_field oe_form_field_many2manytags" t-att-style="widget.node.attrs.style">
<div class="oe_form_field oe_tags" t-att-style="widget.node.attrs.style">
<t t-if="! widget.get('effective_readonly')">
<textarea rows="1" style="width: 100%"
t-att-placeholder="widget.node.attrs.placeholder"></textarea>
</t>
</div>
</t>
<t t-name="FieldMany2ManyTags.box">
<!-- Individual m2m tag element -->
<t t-name="FieldMany2ManyTag">
<t t-set="i" t-value="0"/>
<t t-foreach="elements" t-as="el">
<span class="oe_form_field_many2manytags_box" t-att-data-index="i">
<span class="oe_tag" t-att-data-index="i">
<t t-esc="el[1]"/>
</span>
<t t-set="i" t-value="i + 1"/>

View File

@ -1,9 +1,9 @@
{
"name": "web calendar",
"name": "Web Calendar",
"category": "Hidden",
"description":
"""
OpenERP Web calendar view.
OpenERP Web Calendar view.
""",
"version": "2.0",
"depends": ['web'],

View File

@ -8,135 +8,135 @@ msgstr ""
"Project-Id-Version: openerp-web\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-07-02 09:06+0200\n"
"PO-Revision-Date: 2012-02-22 02:18+0000\n"
"Last-Translator: Masaki Yamaya <Unknown>\n"
"PO-Revision-Date: 2012-07-19 01:27+0000\n"
"Last-Translator: Akira Hiyama <Unknown>\n"
"Language-Team: Japanese <ja@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-07-03 05:55+0000\n"
"X-Generator: Launchpad (build 15531)\n"
"X-Launchpad-Export-Date: 2012-07-19 04:53+0000\n"
"X-Generator: Launchpad (build 15637)\n"
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:12
#: addons/web_calendar/static/src/js/calendar.js:11
msgid "Calendar"
msgstr "カレンダー"
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:73
#: addons/web_calendar/static/src/js/calendar.js:70
msgid "Filter"
msgstr ""
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:139
msgid "Today"
msgstr ""
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:140
msgid "Day"
msgstr ""
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:141
msgid "Week"
msgstr ""
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:142
msgid "Month"
msgstr ""
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:143
msgid "New event"
msgstr ""
msgstr "フィルタ"
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:144
msgid "Save"
msgstr ""
msgid "Today"
msgstr "本日"
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:145
msgid "Cancel"
msgstr ""
msgid "Day"
msgstr "日"
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:146
msgid "Details"
msgstr ""
msgid "Week"
msgstr "週"
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:147
msgid "Edit"
msgstr ""
msgid "Month"
msgstr "月"
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:148
msgid "Delete"
msgstr ""
msgid "New event"
msgstr "新規イベント"
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:149
msgid "Save"
msgstr "保存"
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:150
msgid "Event will be deleted permanently, are you sure?"
msgstr ""
msgid "Cancel"
msgstr "キャンセル"
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:151
#: addons/web_calendar/static/src/js/calendar.js:164
msgid "Description"
msgstr ""
msgid "Details"
msgstr "詳細"
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:152
msgid "Time period"
msgstr ""
msgid "Edit"
msgstr "編集"
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:153
msgid "Full day"
msgstr ""
msgid "Delete"
msgstr "削除"
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:155
msgid "Event will be deleted permanently, are you sure?"
msgstr "イベントは完全に削除されます。よろしいですか?"
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:156
msgid "Do you want to edit the whole set of repeated events?"
msgstr ""
#: addons/web_calendar/static/src/js/calendar.js:169
msgid "Description"
msgstr "詳細"
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:157
msgid "Repeat event"
msgstr ""
msgid "Time period"
msgstr "期間"
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:158
msgid "Disabled"
msgstr ""
msgid "Full day"
msgstr "終日"
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:159
msgid "Enabled"
msgstr ""
#: addons/web_calendar/static/src/js/calendar.js:161
msgid "Do you want to edit the whole set of repeated events?"
msgstr "繰り返しイベントのセット全体を編集しますか?"
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:162
#: addons/web_calendar/static/src/js/calendar.js:170
msgid "Agenda"
msgstr ""
msgid "Repeat event"
msgstr "繰り返しイベント"
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:163
msgid "Date"
msgstr ""
msgid "Disabled"
msgstr "無効"
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:164
msgid "Enabled"
msgstr "有効"
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:167
msgid "Year"
msgstr ""
#: addons/web_calendar/static/src/js/calendar.js:175
msgid "Agenda"
msgstr "議事"
#. openerp-web
#: addons/web_calendar/static/src/xml/web_calendar.xml:8
#: addons/web_calendar/static/src/xml/web_calendar.xml:9
#: addons/web_calendar/static/src/js/calendar.js:168
msgid "Date"
msgstr "日付"
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:172
msgid "Year"
msgstr "年"
#. openerp-web
#: addons/web_calendar/static/src/xml/web_calendar.xml:5
#: addons/web_calendar/static/src/xml/web_calendar.xml:6
msgid "&nbsp;"
msgstr "&nbsp;"

View File

@ -1,9 +1,9 @@
{
"name": "web Dashboard",
"name": "Web Dashboard",
"category": "Hidden",
"description":
"""
OpenERP Web dashboard view.
OpenERP Web Dashboard view.
""",
"version": "2.0",
"depends": ['web'],

View File

@ -8,29 +8,29 @@ msgstr ""
"Project-Id-Version: openerp-web\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-07-02 09:06+0200\n"
"PO-Revision-Date: 2012-03-26 22:14+0000\n"
"Last-Translator: Masaki Yamaya <Unknown>\n"
"PO-Revision-Date: 2012-07-19 01:29+0000\n"
"Last-Translator: Akira Hiyama <Unknown>\n"
"Language-Team: Japanese <ja@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-07-03 05:55+0000\n"
"X-Generator: Launchpad (build 15531)\n"
"X-Launchpad-Export-Date: 2012-07-19 04:53+0000\n"
"X-Generator: Launchpad (build 15637)\n"
#. openerp-web
#: addons/web_dashboard/static/src/js/dashboard.js:61
#: addons/web_dashboard/static/src/js/dashboard.js:60
msgid "Edit Layout"
msgstr "レイアウト編集"
msgstr "レイアウト編集"
#. openerp-web
#: addons/web_dashboard/static/src/js/dashboard.js:107
#: addons/web_dashboard/static/src/js/dashboard.js:106
msgid "Are you sure you want to remove this item ?"
msgstr "この項目を取り除きますか?"
msgstr "この項目を削除しますか?"
#. openerp-web
#: addons/web_dashboard/static/src/xml/web_dashboard.xml:4
msgid "Reset Layout.."
msgstr "レイアウトリセット"
msgstr "レイアウトリセット"
#. openerp-web
#: addons/web_dashboard/static/src/xml/web_dashboard.xml:6
@ -40,12 +40,12 @@ msgstr "リセット"
#. openerp-web
#: addons/web_dashboard/static/src/xml/web_dashboard.xml:8
msgid "Change Layout.."
msgstr "レイアウト変更…"
msgstr "レイアウト変更…"
#. openerp-web
#: addons/web_dashboard/static/src/xml/web_dashboard.xml:10
msgid "Change Layout"
msgstr "レイアウト変更"
msgstr "レイアウト変更"
#. openerp-web
#: addons/web_dashboard/static/src/xml/web_dashboard.xml:27
@ -60,7 +60,7 @@ msgstr "作成"
#. openerp-web
#: addons/web_dashboard/static/src/xml/web_dashboard.xml:39
msgid "Choose dashboard layout"
msgstr "ダッシュボードのレイアウトを選択"
msgstr "ダッシュボードレイアウトの選択"
#, python-format
#~ msgid "Execute task \"%s\""

View File

@ -37,11 +37,12 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
delete(action.attrs.width);
delete(action.attrs.height);
delete(action.attrs.colspan);
self.rpc('/web/action/load', {
action_id: parseInt(action.attrs.name, 10)
}, function(result) {
self.on_load_action(result, column_index + '_' + action_index, action.attrs);
});
var action_id = _.str.toNumber(action.attrs.name);
if (!_.isNaN(action_id)) {
self.rpc('/web/action/load', {action_id: action_id}, function(result) {
self.on_load_action(result, column_index + '_' + action_index, action.attrs);
});
}
});
});
},
@ -209,8 +210,8 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
}
});
}
if (am.inner_viewmanager) {
am.inner_viewmanager.on_mode_switch.add(function(mode) {
if (am.inner_widget) {
am.inner_widget.on_mode_switch.add(function(mode) {
var new_views = [];
_.each(action_orig.views, function(view) {
new_views[view[1] === mode ? 'unshift' : 'push'](view);
@ -219,7 +220,7 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
new_views.unshift([false, mode]);
}
action_orig.views = new_views;
action_orig.res_id = am.inner_viewmanager.dataset.ids[am.inner_viewmanager.dataset.index];
action_orig.res_id = am.inner_widget.dataset.ids[am.inner_widget.dataset.index];
self.do_action(action_orig);
});
}

View File

@ -48,7 +48,7 @@
</div>
</t>
<t t-name="DashBoard.xml">
<form t-att-string="form_title">
<form t-att-string="form_title" version="7.0">
<board t-att-style="style">
<column t-foreach="columns" t-as="column">
<action t-foreach="column" t-as="action" t-att="action"/>

View File

@ -1,7 +1,7 @@
{
"name" : "OpenERP Web Diagram",
"category" : "Hidden",
"description":'Openerp web Diagram view',
"description":'Openerp Web Diagram view',
"version" : "2.0",
"depends" : ["web"],
"js": [

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openerp-web\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-07-02 09:06+0200\n"
"PO-Revision-Date: 2012-03-26 22:02+0000\n"
"Last-Translator: Masaki Yamaya <Unknown>\n"
"PO-Revision-Date: 2012-07-19 01:37+0000\n"
"Last-Translator: Akira Hiyama <Unknown>\n"
"Language-Team: Japanese <ja@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-07-03 05:55+0000\n"
"X-Generator: Launchpad (build 15531)\n"
"X-Launchpad-Export-Date: 2012-07-19 04:53+0000\n"
"X-Generator: Launchpad (build 15637)\n"
#. openerp-web
#: addons/web_diagram/static/src/js/diagram.js:11
@ -25,7 +25,7 @@ msgstr "ダイアグラム"
#. openerp-web
#: addons/web_diagram/static/src/js/diagram.js:165
msgid "Are you sure?"
msgstr ""
msgstr "本当によろしいですか?"
#. openerp-web
#: addons/web_diagram/static/src/js/diagram.js:195
@ -35,6 +35,10 @@ msgid ""
"\n"
"Are you sure ?"
msgstr ""
"このノードの削除は元に戻すことができません。\n"
"また、接続している全ての取引を削除します。\n"
"\n"
"本当によろしいですか?"
#. openerp-web
#: addons/web_diagram/static/src/js/diagram.js:213
@ -43,18 +47,21 @@ msgid ""
"\n"
"Are you sure ?"
msgstr ""
"この取引の削除は元に戻すことができません。\n"
"\n"
"本当によろしいですか?"
#. openerp-web
#: addons/web_diagram/static/src/js/diagram.js:224
#: addons/web_diagram/static/src/js/diagram.js:257
msgid "Activity"
msgstr "アクティビティ"
msgstr "活動"
#. openerp-web
#: addons/web_diagram/static/src/js/diagram.js:232
#: addons/web_diagram/static/src/js/diagram.js:296
msgid "Open: "
msgstr "開く: "
msgstr "開く "
#. openerp-web
#: addons/web_diagram/static/src/js/diagram.js:262
@ -66,9 +73,9 @@ msgstr "作成:"
#: addons/web_diagram/static/src/js/diagram.js:289
#: addons/web_diagram/static/src/js/diagram.js:308
msgid "Transition"
msgstr "遷"
msgstr "遷"
#. openerp-web
#: addons/web_diagram/static/src/xml/base_diagram.xml:6
msgid "New Node"
msgstr "新しいノード"
msgstr "新ノード"

View File

@ -1,9 +1,9 @@
{
"name": "web Gantt",
"name": "Web Gantt",
"category": "Hidden",
"description":
"""
OpenERP Web gantt chart view.
OpenERP Web Gantt chart view.
""",
"version": "2.0",
"depends": ['web'],

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openerp-web\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-07-02 09:06+0200\n"
"PO-Revision-Date: 2012-03-26 21:57+0000\n"
"Last-Translator: Masaki Yamaya <Unknown>\n"
"PO-Revision-Date: 2012-07-19 01:37+0000\n"
"Last-Translator: Akira Hiyama <Unknown>\n"
"Language-Team: Japanese <ja@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-07-03 05:55+0000\n"
"X-Generator: Launchpad (build 15531)\n"
"X-Launchpad-Export-Date: 2012-07-19 04:53+0000\n"
"X-Generator: Launchpad (build 15637)\n"
#. openerp-web
#: addons/web_gantt/static/src/js/gantt.js:11
@ -25,4 +25,4 @@ msgstr "ガント"
#. openerp-web
#: addons/web_gantt/static/src/xml/web_gantt.xml:10
msgid "Create"
msgstr "作成する"
msgstr "作成"

View File

@ -5,7 +5,7 @@
* Parse a <graph> view but allows changing dynamically the presentation
* Graph Types: pie, lines, areas, bars, radar
* Stacked / Not Stacked for areas and bars
* Stacked/Not Stacked for areas and bars
* Legends: top, inside (top/left), hidden
* Features: download as PNG or CSV, browse data grid, switch orientation
* Unlimited "Group By" levels (not stacked), two cross level analysis (stacked)

View File

@ -8,91 +8,91 @@ msgstr ""
"Project-Id-Version: openerp-web\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-07-02 09:06+0200\n"
"PO-Revision-Date: 2012-02-22 02:21+0000\n"
"Last-Translator: Masaki Yamaya <Unknown>\n"
"PO-Revision-Date: 2012-07-19 03:25+0000\n"
"Last-Translator: Akira Hiyama <Unknown>\n"
"Language-Team: Japanese <ja@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-07-03 05:55+0000\n"
"X-Generator: Launchpad (build 15531)\n"
"X-Launchpad-Export-Date: 2012-07-19 04:53+0000\n"
"X-Generator: Launchpad (build 15637)\n"
#. openerp-web
#: addons/web_graph/static/src/js/graph.js:22
#: addons/web_graph/static/src/js/graph.js:19
msgid "Graph"
msgstr "グラフ"
#. openerp-web
#: addons/web_graph/static/src/xml/web_graph.xml:5
msgid "Graph Options"
msgstr ""
msgstr "グラフオプション"
#. openerp-web
#: addons/web_graph/static/src/xml/web_graph.xml:7
msgid "Graph Mode"
msgstr ""
msgstr "グラフモード"
#. openerp-web
#: addons/web_graph/static/src/xml/web_graph.xml:11
msgid "Pie"
msgstr ""
msgstr "パイ"
#. openerp-web
#: addons/web_graph/static/src/xml/web_graph.xml:12
msgid "Bars"
msgstr ""
msgstr "バー"
#. openerp-web
#: addons/web_graph/static/src/xml/web_graph.xml:14
msgid "Lines"
msgstr ""
msgstr "ライン"
#. openerp-web
#: addons/web_graph/static/src/xml/web_graph.xml:15
msgid "Areas"
msgstr ""
msgstr "エリア"
#. openerp-web
#: addons/web_graph/static/src/xml/web_graph.xml:18
msgid "Radar"
msgstr ""
msgstr "レーダー"
#. openerp-web
#: addons/web_graph/static/src/xml/web_graph.xml:20
msgid "Legend"
msgstr ""
msgstr "凡例"
#. openerp-web
#: addons/web_graph/static/src/xml/web_graph.xml:24
msgid "Hidden"
msgstr ""
msgstr "非表示"
#. openerp-web
#: addons/web_graph/static/src/xml/web_graph.xml:25
msgid "Inside"
msgstr ""
msgstr "内側"
#. openerp-web
#: addons/web_graph/static/src/xml/web_graph.xml:26
msgid "Top"
msgstr ""
msgstr ""
#. openerp-web
#: addons/web_graph/static/src/xml/web_graph.xml:28
msgid "Actions"
msgstr ""
msgstr "アクション"
#. openerp-web
#: addons/web_graph/static/src/xml/web_graph.xml:32
msgid "Switch Axis"
msgstr ""
msgstr "Axisに切替"
#. openerp-web
#: addons/web_graph/static/src/xml/web_graph.xml:33
msgid "Show Data"
msgstr ""
msgstr "データの表示"
#. openerp-web
#: addons/web_graph/static/src/xml/web_graph.xml:34
msgid "Download as PNG"
msgstr ""
msgstr "PNGとしてダウンロード"

View File

@ -8,59 +8,59 @@ msgstr ""
"Project-Id-Version: openerp-web\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-07-02 09:06+0200\n"
"PO-Revision-Date: 2012-03-06 06:35+0000\n"
"Last-Translator: Masaki Yamaya <Unknown>\n"
"PO-Revision-Date: 2012-07-19 03:34+0000\n"
"Last-Translator: Akira Hiyama <Unknown>\n"
"Language-Team: Japanese <ja@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-07-03 05:55+0000\n"
"X-Generator: Launchpad (build 15531)\n"
"X-Launchpad-Export-Date: 2012-07-19 04:53+0000\n"
"X-Generator: Launchpad (build 15637)\n"
#. openerp-web
#: addons/web_kanban/static/src/js/kanban.js:10
msgid "Kanban"
msgstr "看板"
msgstr "かんばん"
#. openerp-web
#: addons/web_kanban/static/src/js/kanban.js:372
#: addons/web_kanban/static/src/js/kanban.js:293
msgid "Undefined"
msgstr "未定義"
#. openerp-web
#: addons/web_kanban/static/src/js/kanban.js:684
#: addons/web_kanban/static/src/js/kanban.js:468
msgid "Are you sure you want to delete this record ?"
msgstr "このレコードを削除しますか?"
#. openerp-web
#: addons/web_kanban/static/src/js/kanban.js:839
msgid "Create: "
msgstr ""
msgstr "作成: "
#. openerp-web
#: addons/web_kanban/static/src/xml/web_kanban.xml:53
#: addons/web_kanban/static/src/xml/web_kanban.xml:41
msgid "Show more... ("
msgstr "もっと表示する…("
msgstr "さらに表示…("
#. openerp-web
#: addons/web_kanban/static/src/xml/web_kanban.xml:53
#: addons/web_kanban/static/src/xml/web_kanban.xml:41
msgid "remaining)"
msgstr "残り)"
#. openerp-web
#: addons/web_kanban/static/src/xml/web_kanban.xml:71
msgid "Add"
msgstr ""
msgstr "追加"
#. openerp-web
#: addons/web_kanban/static/src/xml/web_kanban.xml:71
msgid "or"
msgstr ""
msgstr "または"
#. openerp-web
#: addons/web_kanban/static/src/xml/web_kanban.xml:72
msgid "Cancel"
msgstr ""
msgstr "キャンセル"
#~ msgid "</tr><tr>"
#~ msgstr "</tr><tr>"

View File

@ -1,5 +1,5 @@
@charset "utf-8";
.openerp .oe_kanban_view {
background: url(/web/static/src/img/form_sheetbg.png);
height: inherit;
}
.openerp .oe_kanban_view .ui-sortable-placeholder {
@ -38,7 +38,6 @@
}
.openerp .oe_kanban_view .oe_kanban_groups {
height: inherit;
width: 100%;
}
.openerp .oe_kanban_view .oe_kanban_header:hover .oe_dropdown_kanban {
display: inline-block;
@ -62,12 +61,15 @@
vertical-align: top;
padding: 6px 6px 6px 5px;
}
.openerp .oe_kanban_view .oe_kanban_column.oe_kanban_grouped, .openerp .oe_kanban_view .oe_kanban_group_header {
background: #f0eeee;
.openerp .oe_kanban_view .oe_kanban_group_header.oe_kanban_no_group {
padding: 0px;
}
.openerp .oe_kanban_view .oe_kanban_column.oe_kanban_grouped, .openerp .oe_kanban_view .oe_kanban_group_header {
background: #f0eeee;
border-left: 1px solid #f0f8f8;
border-right: 1px solid #b9b9b9;
min-width: 170px;
max-width: 250px;
}
.openerp .oe_kanban_view .oe_form .oe_kanban_column {
padding: 0px;
@ -79,9 +81,6 @@
.openerp .oe_kanban_view .oe_kanban_aggregates {
padding: 0;
}
.openerp .oe_kanban_view .oe_kanban_group_header {
position: relative;
}
.openerp .oe_kanban_view .oe_kanban_group_folded .oe_kanban_group_title, .openerp .oe_kanban_view .oe_kanban_group_folded.oe_kanban_column > *, .openerp .oe_kanban_view .oe_kanban_group_folded .oe_kanban_aggregates, .openerp .oe_kanban_view .oe_kanban_group_folded .oe_kanban_add {
display: none;
}
@ -165,7 +164,6 @@
font-size: 13px;
padding: 0 5px;
color: #4c4c4c;
min-height: 120px;
}
.openerp .oe_kanban_view .oe_kanban_details h4 {
margin: 0 0 4px 0;
@ -175,7 +173,6 @@
display: block;
min-height: 50px;
margin: 0;
display: block;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
@ -241,6 +238,9 @@
.openerp .oe_kanban_view .oe_kanban_grouped .oe_kanban_show_more .oe_button {
width: 100%;
}
.openerp .oe_kanban_view .oe_kanban_ungrouped {
background: white;
}
.openerp .oe_kanban_view .oe_kanban_ungrouped .oe_kanban_record {
float: left;
padding: 2px;
@ -401,17 +401,23 @@
position: relative;
top: 2px;
}
.openerp .oe_kanban_view .oe_kanban_project_times li {
float: left;
}
.openerp .oe_kanban_view .oe_kanban_status {
position: relative;
top: 4px;
display: inline-block;
height: 12px;
width: 12px;
margin: 4px auto;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
border-radius: 6px;
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
background-position: center center;
background-image: -webkit-radial-gradient(circle, #eeeeee 0%, #cccccc 40%, #bbbbbb 100%);
background-image: -moz-radial-gradient(#eeeeee 0%, #cccccc 40%, #bbbbbb 100%);
background-image: -ms-radial-gradient(#eeeeee 0%, #cccccc 40%, #bbbbbb 100%);
background-image: radial-gradient(#eeeeee 0%, #cccccc 40%, #bbbbbb 100%);
}
.openerp .oe_kanban_view .oe_kanban_status_green {
background: green;

View File

@ -21,6 +21,8 @@
.openerp .oe_kanban_view
// KanbanView {{{
//background: url(data:image/pngbase64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAKElEQVQIHWP8DwTv379nAAFBQUEGhnfv3oHEwADEZgJLIRGMIClkLQCr3x2Htp/lLwAAAABJRU5ErkJggg==)
background: url(/web/static/src/img/form_sheetbg.png)
height: inherit
.ui-sortable-placeholder
border: 1px dotted black
@ -52,7 +54,6 @@
// KanbanGroups {{{
.oe_kanban_groups
height: inherit
width: 100%
.oe_kanban_header
&:hover
.oe_dropdown_kanban
@ -73,13 +74,15 @@
.oe_kanban_column, .oe_kanban_group_header
vertical-align: top
padding: 6px 6px 6px 5px
.oe_kanban_group_header.oe_kanban_no_group
padding: 0px
.oe_kanban_column.oe_kanban_grouped, .oe_kanban_group_header
background: #f0eeee
.oe_kanban_column.oe_kanban_grouped, .oe_kanban_group_header
border-left: 1px solid #f0f8f8
border-right: 1px solid #b9b9b9
min-width: 170px
max-width: 250px
.oe_form
.oe_kanban_column
@ -90,8 +93,6 @@
height: 100%
.oe_kanban_aggregates
padding: 0
.oe_kanban_group_header
position: relative
.oe_kanban_group_folded
.oe_kanban_group_title, &.oe_kanban_column > *, .oe_kanban_aggregates, .oe_kanban_add
display: none
@ -164,7 +165,6 @@
font-size: 13px
padding: 0 5px
color: #4c4c4c
min-height: 120px
h4
margin: 0 0 4px 0
.oe_kanban_record
@ -172,7 +172,6 @@
display: block
min-height: 50px
margin: 0
display: block
@include radius(4px)
&:last-child
margin-bottom: 0
@ -216,12 +215,14 @@
text-align: center
.oe_kanban_grouped .oe_kanban_show_more .oe_button
width: 100%
.oe_kanban_ungrouped .oe_kanban_record
float: left
padding: 2px
box-sizing: border-box
-moz-box-sizing: border-box
-webkit-box-sizing: border-box
.oe_kanban_ungrouped
background: white
.oe_kanban_record
float: left
padding: 2px
box-sizing: border-box
-moz-box-sizing: border-box
-webkit-box-sizing: border-box
.oe_kanban_action_button
height: 22px
margin: 0
@ -335,14 +336,18 @@
float: right
position: relative
top: 2px
.oe_kanban_project_times li
float: left
.oe_kanban_status
position: relative
top: 4px
display: inline-block
height: 12px
width: 12px
margin: 4px auto
@include radius(6px)
@include box-shadow(0 1px 3px rgba(0,0,0,0.6))
@include radial-gradient((#eee 0%, #ccc 40%, #bbb 100%))
.oe_kanban_status_green
background: green
@include radial-gradient((#55dd55 0%, #44aa44 40%, #339933 100%))

View File

@ -286,13 +286,20 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
},
compute_groups_width: function() {
var unfolded = 0;
var self = this;
_.each(this.groups, function(group) {
unfolded += group.state.folded ? 0 : 1;
group.$element.css('width', '');
});
_.each(this.groups, function(group) {
if (!group.state.folded) {
group.$element.css('width', Math.round(100/unfolded) + '%');
if (182*unfolded>=self.$element.width()) {
group.$element.css('width', "170px");
} else if (262*unfolded>self.$element.width()) {
group.$element.css('width', Math.round(100/unfolded) + '%');
} else {
group.$element.css('width', "250px");
}
}
});
},

View File

@ -1,9 +1,9 @@
{
"name" : "OpenERP Web mobile",
"name" : "OpenERP Web Mobile",
"category": "Hidden",
"description":
"""
OpenERP Web mobile.
OpenERP Web Mobile.
""",
"version" : "2.0",
"depends" : [],

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openerp-web\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-07-02 09:06+0200\n"
"PO-Revision-Date: 2012-03-31 18:42+0000\n"
"Last-Translator: Masaki Yamaya <Unknown>\n"
"PO-Revision-Date: 2012-07-19 04:00+0000\n"
"Last-Translator: Akira Hiyama <Unknown>\n"
"Language-Team: Japanese <ja@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-07-03 05:55+0000\n"
"X-Generator: Launchpad (build 15531)\n"
"X-Launchpad-Export-Date: 2012-07-19 04:53+0000\n"
"X-Generator: Launchpad (build 15637)\n"
#. openerp-web
#: addons/web_mobile/static/src/xml/web_mobile.xml:17
@ -25,7 +25,7 @@ msgstr "OpenERP"
#. openerp-web
#: addons/web_mobile/static/src/xml/web_mobile.xml:22
msgid "Database:"
msgstr "データベース:"
msgstr "データベース"
#. openerp-web
#: addons/web_mobile/static/src/xml/web_mobile.xml:30
@ -65,7 +65,7 @@ msgstr "お気に入り"
#. openerp-web
#: addons/web_mobile/static/src/xml/web_mobile.xml:58
msgid "Preference"
msgstr "優先"
msgstr "プリファレンス"
#. openerp-web
#: addons/web_mobile/static/src/xml/web_mobile.xml:123
@ -75,7 +75,7 @@ msgstr "ログアウト"
#. openerp-web
#: addons/web_mobile/static/src/xml/web_mobile.xml:132
msgid "There are no records to show."
msgstr "表示するレコードはありません"
msgstr "表示するレコードはありません"
#. openerp-web
#: addons/web_mobile/static/src/xml/web_mobile.xml:183

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openerp-web\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-07-02 09:06+0200\n"
"PO-Revision-Date: 2012-03-26 22:04+0000\n"
"Last-Translator: Masaki Yamaya <Unknown>\n"
"PO-Revision-Date: 2012-07-19 04:29+0000\n"
"Last-Translator: Akira Hiyama <Unknown>\n"
"Language-Team: Japanese <ja@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-07-03 05:55+0000\n"
"X-Generator: Launchpad (build 15531)\n"
"X-Launchpad-Export-Date: 2012-07-19 04:53+0000\n"
"X-Generator: Launchpad (build 15637)\n"
#. openerp-web
#: addons/web_process/static/src/js/process.js:261
@ -30,7 +30,7 @@ msgstr "保存"
#. openerp-web
#: addons/web_process/static/src/xml/web_process.xml:6
msgid "Process View"
msgstr "プロセス一覧"
msgstr "プロセスビュー"
#. openerp-web
#: addons/web_process/static/src/xml/web_process.xml:19
@ -40,7 +40,7 @@ msgstr "ドキュメンテーション"
#. openerp-web
#: addons/web_process/static/src/xml/web_process.xml:19
msgid "Read Documentation Online"
msgstr "オンラインのドキュメンテーションを読んでください。"
msgstr "オンラインのドキュメントを読んで下さい"
#. openerp-web
#: addons/web_process/static/src/xml/web_process.xml:25
@ -55,12 +55,12 @@ msgstr "コミュニティの議論"
#. openerp-web
#: addons/web_process/static/src/xml/web_process.xml:31
msgid "Books"
msgstr "帳簿"
msgstr ""
#. openerp-web
#: addons/web_process/static/src/xml/web_process.xml:31
msgid "Get the books"
msgstr "帳簿を取る"
msgstr "本を手に入れる"
#. openerp-web
#: addons/web_process/static/src/xml/web_process.xml:37
@ -85,7 +85,7 @@ msgstr "注記"
#. openerp-web
#: addons/web_process/static/src/xml/web_process.xml:59
msgid "Last modified by:"
msgstr "最後に変更"
msgstr "最終更新者"
#. openerp-web
#: addons/web_process/static/src/xml/web_process.xml:59
@ -105,14 +105,14 @@ msgstr "関係:"
#. openerp-web
#: addons/web_process/static/src/xml/web_process.xml:88
msgid "Select Process"
msgstr "プロセスを選んでください"
msgstr "プロセスの選択"
#. openerp-web
#: addons/web_process/static/src/xml/web_process.xml:98
msgid "Select"
msgstr "選択する"
msgstr "選択"
#. openerp-web
#: addons/web_process/static/src/xml/web_process.xml:109
msgid "Edit Process"
msgstr "プロセス編集"
msgstr "プロセス編集"

View File

@ -260,7 +260,7 @@ openerp.web_process = function (instance) {
buttons : [
{text: _t("Cancel"), click: function() { $(this).dialog('destroy'); }},
{text: _t("Save"), click: function() {
var form_view = action_manager.inner_viewmanager.views.form.controller;
var form_view = action_manager.inner_widget.views.form.controller;
form_view.do_save(function() {
self.initialize_process_view();

View File

@ -1,7 +1,7 @@
{
"name" : "OpenERP Web web",
"name" : "OpenERP Web Web",
"category" : "Hidden",
"description":'Openerp web web',
"description":'Openerp Web Web',
"version" : "2.0",
"depends" : [],
"installable" : False,