[MERGE] Merge with main web
bzr revid: psi@tinyerp.com-20120718055907-6k33i2t34r38q4ec
This commit is contained in:
commit
cdec9e9f15
|
@ -452,8 +452,8 @@ class Root(object):
|
||||||
|
|
||||||
static_dirs = self._load_addons(openerp_addons_namespace)
|
static_dirs = self._load_addons(openerp_addons_namespace)
|
||||||
if options.serve_static:
|
if options.serve_static:
|
||||||
self.dispatch = werkzeug.wsgi.SharedDataMiddleware(
|
self.dispatch = SuperSharedDataMiddleware(
|
||||||
self.dispatch, static_dirs)
|
self.dispatch, static_dirs, cache=False)
|
||||||
|
|
||||||
if options.session_storage:
|
if options.session_storage:
|
||||||
if not os.path.exists(options.session_storage):
|
if not os.path.exists(options.session_storage):
|
||||||
|
@ -556,6 +556,75 @@ class Root(object):
|
||||||
ps, _slash, meth = ps.rpartition('/')
|
ps, _slash, meth = ps.rpartition('/')
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
class SuperSharedDataMiddleware(werkzeug.wsgi.SharedDataMiddleware):
|
||||||
|
"""Redefine SharedDataMiddleware to better handle the cache = False directive.
|
||||||
|
Also desactivate 304 Not Modified headers only when the referer has 'debug' in its
|
||||||
|
arguments.
|
||||||
|
"""
|
||||||
|
def __call__(self, environ, start_response):
|
||||||
|
import os
|
||||||
|
import mimetypes
|
||||||
|
import werkzeug.http
|
||||||
|
import urlparse
|
||||||
|
# sanitize the path for non unix systems
|
||||||
|
cleaned_path = environ.get('PATH_INFO', '').strip('/')
|
||||||
|
for sep in os.sep, os.altsep:
|
||||||
|
if sep and sep != '/':
|
||||||
|
cleaned_path = cleaned_path.replace(sep, '/')
|
||||||
|
path = '/'.join([''] + [x for x in cleaned_path.split('/')
|
||||||
|
if x and x != '..'])
|
||||||
|
file_loader = None
|
||||||
|
for search_path, loader in self.exports.iteritems():
|
||||||
|
if search_path == path:
|
||||||
|
real_filename, file_loader = loader(None)
|
||||||
|
if file_loader is not None:
|
||||||
|
break
|
||||||
|
if not search_path.endswith('/'):
|
||||||
|
search_path += '/'
|
||||||
|
if path.startswith(search_path):
|
||||||
|
real_filename, file_loader = loader(path[len(search_path):])
|
||||||
|
if file_loader is not None:
|
||||||
|
break
|
||||||
|
if file_loader is None or not self.is_allowed(real_filename):
|
||||||
|
return self.app(environ, start_response)
|
||||||
|
|
||||||
|
guessed_type = mimetypes.guess_type(real_filename)
|
||||||
|
mime_type = guessed_type[0] or self.fallback_mimetype
|
||||||
|
f, mtime, file_size = file_loader()
|
||||||
|
|
||||||
|
etag = self.generate_etag(mtime, file_size, real_filename)
|
||||||
|
modified = werkzeug.http.is_resource_modified(environ, etag, last_modified=mtime)
|
||||||
|
|
||||||
|
headers = [('Date', werkzeug.http.http_date())]
|
||||||
|
if self.cache:
|
||||||
|
timeout = self.cache_timeout
|
||||||
|
headers += [
|
||||||
|
('Etag', '"%s"' % etag),
|
||||||
|
('Cache-Control', 'max-age=%d, public' % timeout)
|
||||||
|
]
|
||||||
|
if modified:
|
||||||
|
headers.append(('Expires', werkzeug.http.http_date(time() + timeout)))
|
||||||
|
else:
|
||||||
|
headers.append(('Cache-Control', 'no-cache'))
|
||||||
|
|
||||||
|
referer = environ.get('HTTP_REFERER', '')
|
||||||
|
parsed = urlparse.urlparse(referer)
|
||||||
|
debug = not urlparse.parse_qs(parsed.query).has_key('debug')
|
||||||
|
# it's important to put it at the end
|
||||||
|
if not debug and not modified:
|
||||||
|
f.close()
|
||||||
|
start_response('304 Not Modified', headers)
|
||||||
|
return []
|
||||||
|
|
||||||
|
headers.extend((
|
||||||
|
('Content-Type', mime_type),
|
||||||
|
('Content-Length', str(file_size)),
|
||||||
|
('Last-Modified', werkzeug.http.http_date(mtime))
|
||||||
|
))
|
||||||
|
start_response('200 OK', headers)
|
||||||
|
return werkzeug.wsgi.wrap_file(environ, f)
|
||||||
|
|
||||||
|
|
||||||
class LibException(Exception):
|
class LibException(Exception):
|
||||||
""" Base of all client lib exceptions """
|
""" Base of all client lib exceptions """
|
||||||
def __init__(self,code=None,message=None):
|
def __init__(self,code=None,message=None):
|
||||||
|
|
|
@ -258,8 +258,7 @@ class WebClient(openerpweb.Controller):
|
||||||
file_map = dict(files)
|
file_map = dict(files)
|
||||||
|
|
||||||
rx_import = re.compile(r"""@import\s+('|")(?!'|"|/|https?://)""", re.U)
|
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):
|
def reader(f):
|
||||||
"""read the a css file and absolutify all relative uris"""
|
"""read the a css file and absolutify all relative uris"""
|
||||||
|
@ -1495,10 +1494,6 @@ class Binary(openerpweb.Controller):
|
||||||
class Action(openerpweb.Controller):
|
class Action(openerpweb.Controller):
|
||||||
_cp_path = "/web/action"
|
_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
|
# 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
|
# there are exceptions. This dict is used to remap action type attributes
|
||||||
# to the "real" model name when they differ.
|
# to the "real" model name when they differ.
|
||||||
|
@ -1511,6 +1506,17 @@ class Action(openerpweb.Controller):
|
||||||
Actions = req.session.model('ir.actions.actions')
|
Actions = req.session.model('ir.actions.actions')
|
||||||
value = False
|
value = False
|
||||||
context = req.session.eval_context(req.context)
|
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)
|
base_action = Actions.read([action_id], ['type'], context)
|
||||||
if base_action:
|
if base_action:
|
||||||
ctx = {}
|
ctx = {}
|
||||||
|
|
|
@ -65,10 +65,6 @@
|
||||||
padding: 3px 5px;
|
padding: 3px 5px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.text-core .text-wrap .text-dropdown .text-list .text-suggestion em {
|
|
||||||
font-style: normal;
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
.text-core .text-wrap .text-dropdown .text-list .text-suggestion.text-selected {
|
.text-core .text-wrap .text-dropdown .text-list .text-suggestion.text-selected {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background: #6d84b4;
|
background: #6d84b4;
|
||||||
|
|
|
@ -188,13 +188,7 @@
|
||||||
}
|
}
|
||||||
.openerp.ui-dialog {
|
.openerp.ui-dialog {
|
||||||
display: none;
|
display: none;
|
||||||
position: fixed;
|
|
||||||
padding: 6px;
|
padding: 6px;
|
||||||
top: 50%;
|
|
||||||
left: 50%;
|
|
||||||
z-index: 1050;
|
|
||||||
width: 560px;
|
|
||||||
margin: -150px 0 0 -280px;
|
|
||||||
background-color: rgba(60, 60, 60, 0.7);
|
background-color: rgba(60, 60, 60, 0.7);
|
||||||
border: 1px solid;
|
border: 1px solid;
|
||||||
border-color: #888888 #555555 #444444;
|
border-color: #888888 #555555 #444444;
|
||||||
|
@ -208,6 +202,9 @@
|
||||||
-moz-background-clip: padding-box;
|
-moz-background-clip: padding-box;
|
||||||
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 {
|
.openerp.ui-dialog .ui-dialog-titlebar, .openerp.ui-dialog .ui-dialog-content, .openerp.ui-dialog .ui-dialog-buttonpane {
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
}
|
}
|
||||||
|
@ -246,6 +243,9 @@
|
||||||
.openerp.ui-dialog .ui-dialog-buttonpane button {
|
.openerp.ui-dialog .ui-dialog-buttonpane button {
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
}
|
}
|
||||||
|
.openerp.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
.openerp.ui-dialog .ui-dialog-titlebar-close {
|
.openerp.ui-dialog .ui-dialog-titlebar-close {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
@ -268,6 +268,9 @@
|
||||||
color: black;
|
color: black;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
.openerp.ui-dialog.oe_act_window .ui-dialog-content {
|
||||||
|
padding: 0px;
|
||||||
|
}
|
||||||
.openerp .modal-backdrop {
|
.openerp .modal-backdrop {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
@ -308,6 +311,7 @@
|
||||||
}
|
}
|
||||||
.openerp .oe_fade {
|
.openerp .oe_fade {
|
||||||
color: #888888;
|
color: #888888;
|
||||||
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
.openerp .oe_bold {
|
.openerp .oe_bold {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
@ -376,7 +380,8 @@
|
||||||
background: #ed6f6a;
|
background: #ed6f6a;
|
||||||
}
|
}
|
||||||
.openerp .oe_title {
|
.openerp .oe_title {
|
||||||
width: 60%;
|
width: 50%;
|
||||||
|
float: left;
|
||||||
}
|
}
|
||||||
.openerp .oe_title:after {
|
.openerp .oe_title:after {
|
||||||
content: ".";
|
content: ".";
|
||||||
|
@ -386,17 +391,18 @@
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
.openerp .oe_button_box {
|
.openerp .oe_button_box {
|
||||||
width: 38%;
|
width: 270px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
.openerp .oe_button_box button {
|
.openerp .oe_button_box button {
|
||||||
margin: 4px;
|
margin: 4px;
|
||||||
}
|
}
|
||||||
.openerp .oe_avatar {
|
.openerp .oe_avatar {
|
||||||
margin: 0 16px 0 0;
|
margin: 0 6px 15px 0;
|
||||||
}
|
}
|
||||||
.openerp .oe_avatar img {
|
.openerp .oe_avatar > img {
|
||||||
height: 50px;
|
height: 90px;
|
||||||
|
max-width: 100px;
|
||||||
-moz-border-radius: 3px;
|
-moz-border-radius: 3px;
|
||||||
-webkit-border-radius: 3px;
|
-webkit-border-radius: 3px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
|
@ -405,6 +411,9 @@
|
||||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
.openerp .oe_avatar + div {
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
.openerp .oe_button.oe_link {
|
.openerp .oe_button.oe_link {
|
||||||
border: none;
|
border: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
@ -450,6 +459,29 @@
|
||||||
.openerp .oe_webclient .oe_star_on {
|
.openerp .oe_webclient .oe_star_on {
|
||||||
color: gold;
|
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 {
|
.openerp.oe_tooltip {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
@ -1136,63 +1168,63 @@
|
||||||
.openerp .oe_view_manager .oe_view_manager_view_kanban {
|
.openerp .oe_view_manager .oe_view_manager_view_kanban {
|
||||||
height: inherit;
|
height: inherit;
|
||||||
}
|
}
|
||||||
.openerp .oe_view_manager .oe_view_manager_header {
|
.openerp .oe_view_manager table.oe_view_manager_header {
|
||||||
width: 100%;
|
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;
|
clear: both;
|
||||||
text-shadow: 0 1px 1px white;
|
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;
|
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;
|
margin: 0px auto;
|
||||||
width: 400px;
|
|
||||||
text-align: center;
|
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;
|
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;
|
font-size: 18px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
float: left;
|
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;
|
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;
|
display: inline-block;
|
||||||
border: 1px solid #ababab;
|
border: 1px solid #ababab;
|
||||||
-moz-border-radius: 5px;
|
-moz-border-radius: 5px;
|
||||||
-webkit-border-radius: 5px;
|
-webkit-border-radius: 5px;
|
||||||
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;
|
float: left;
|
||||||
border-right: 1px solid #ababab;
|
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;
|
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;
|
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;
|
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;
|
background: #999999;
|
||||||
-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) inset;
|
-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;
|
-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;
|
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;
|
color: white;
|
||||||
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
|
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;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.openerp .oe_view_manager .oe_view_manager_pager {
|
.openerp .oe_view_manager .oe_view_manager_pager {
|
||||||
|
@ -1319,7 +1351,7 @@
|
||||||
float: right;
|
float: right;
|
||||||
padding: 1px 0;
|
padding: 1px 0;
|
||||||
line-height: 18px;
|
line-height: 18px;
|
||||||
width: 480px;
|
width: 400px;
|
||||||
border: 1px solid #ababab;
|
border: 1px solid #ababab;
|
||||||
background: white;
|
background: white;
|
||||||
-moz-border-radius: 13px;
|
-moz-border-radius: 13px;
|
||||||
|
@ -1741,12 +1773,12 @@
|
||||||
width: auto;
|
width: auto;
|
||||||
}
|
}
|
||||||
.openerp .oe_form_nosheet {
|
.openerp .oe_form_nosheet {
|
||||||
margin-left: 10px;
|
margin: 20px;
|
||||||
margin-right: 10px;
|
|
||||||
}
|
}
|
||||||
.openerp .oe_form_nosheet > header {
|
.openerp .oe_form_nosheet > header {
|
||||||
margin-left: -10px;
|
margin-top: -20px;
|
||||||
margin-right: -10px;
|
margin-left: -20px;
|
||||||
|
margin-right: -20px;
|
||||||
}
|
}
|
||||||
.openerp .oe_form header {
|
.openerp .oe_form header {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -1765,7 +1797,7 @@
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
.openerp .oe_form footer {
|
.openerp .oe_form div.oe_chatter {
|
||||||
min-width: 650px;
|
min-width: 650px;
|
||||||
max-width: 860px;
|
max-width: 860px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
@ -1817,18 +1849,19 @@
|
||||||
.openerp .oe_form .oe_subtotal_footer td.oe_form_group_cell_label {
|
.openerp .oe_form .oe_subtotal_footer td.oe_form_group_cell_label {
|
||||||
border-right: none;
|
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 {
|
.openerp .oe_form .oe_subtotal_footer .oe_subtotal_footer_separator {
|
||||||
|
width: 108px;
|
||||||
border-top: 1px solid #cacaca;
|
border-top: 1px solid #cacaca;
|
||||||
font-sie: 120%;
|
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
.openerp .oe_form .oe_subtotal_footer label.oe_subtotal_footer_separator {
|
.openerp .oe_form .oe_subtotal_footer label.oe_subtotal_footer_separator {
|
||||||
font-weight: bold !important;
|
font-weight: bold !important;
|
||||||
padding: 2px 8px 2px 0px !important;
|
padding: 2px 8px 2px 0px !important;
|
||||||
}
|
}
|
||||||
|
.openerp .oe_form .oe_subtotal_footer label.oe_form_label_help {
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
.openerp .oe_application .oe_form_sheetbg {
|
.openerp .oe_application .oe_form_sheetbg {
|
||||||
background: url(/web/static/src/img/form_sheetbg.png);
|
background: url(/web/static/src/img/form_sheetbg.png);
|
||||||
padding: 8px 0;
|
padding: 8px 0;
|
||||||
|
@ -1854,6 +1887,9 @@
|
||||||
.openerp .oe_application .oe_form_sheet .oe_notebook_page {
|
.openerp .oe_application .oe_form_sheet .oe_notebook_page {
|
||||||
padding: 0 16px;
|
padding: 0 16px;
|
||||||
}
|
}
|
||||||
|
.openerp .oe_form .oe_form_button {
|
||||||
|
margin: 2px;
|
||||||
|
}
|
||||||
.openerp .oe_form td.oe_form_group_cell_label {
|
.openerp .oe_form td.oe_form_group_cell_label {
|
||||||
border-right: 1px solid #dddddd;
|
border-right: 1px solid #dddddd;
|
||||||
padding: 2px 0px 2px 0px;
|
padding: 2px 0px 2px 0px;
|
||||||
|
@ -1861,17 +1897,17 @@
|
||||||
.openerp .oe_form td.oe_form_group_cell_label label {
|
.openerp .oe_form td.oe_form_group_cell_label label {
|
||||||
line-height: 18px;
|
line-height: 18px;
|
||||||
display: block;
|
display: block;
|
||||||
min-width: 110px;
|
min-width: 120px;
|
||||||
}
|
}
|
||||||
.openerp .oe_form td.oe_form_group_cell + .oe_form_group_cell {
|
.openerp .oe_form td.oe_form_group_cell + .oe_form_group_cell {
|
||||||
padding-left: 6px;
|
padding-left: 6px;
|
||||||
}
|
}
|
||||||
.openerp .oe_form .oe_form_group {
|
.openerp .oe_form .oe_form_group {
|
||||||
width: 100%;
|
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 {
|
.openerp .oe_form .oe_form_group .oe_form_group_cell.oe_group_right {
|
||||||
padding-left: 18px;
|
padding-left: 20px;
|
||||||
}
|
}
|
||||||
.openerp .oe_form .oe_form_label_help[for], .openerp .oe_form .oe_form_label[for] {
|
.openerp .oe_form .oe_form_label_help[for], .openerp .oe_form .oe_form_label[for] {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
@ -1941,15 +1977,6 @@
|
||||||
.openerp .oe_form .oe_form_field_text.oe_inline, .openerp .oe_form .oe_form_field_text.oe_inline > textarea {
|
.openerp .oe_form .oe_form_field_text.oe_inline, .openerp .oe_form .oe_form_field_text.oe_inline > textarea {
|
||||||
width: 500px;
|
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 {
|
.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;
|
margin: 0 0 4px 0;
|
||||||
}
|
}
|
||||||
|
@ -1966,18 +1993,6 @@
|
||||||
.openerp .oe_form .oe_form_field input {
|
.openerp .oe_form .oe_form_field input {
|
||||||
margin: 0px;
|
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 {
|
.openerp .oe_form input[type="text"], .openerp .oe_form input[type="password"], .openerp .oe_form input[type="file"], .openerp .oe_form select {
|
||||||
height: 22px;
|
height: 22px;
|
||||||
padding-top: 2px;
|
padding-top: 2px;
|
||||||
|
@ -2017,32 +2032,6 @@
|
||||||
padding-top: 4px;
|
padding-top: 4px;
|
||||||
width: auto;
|
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 {
|
.openerp .oe_form .oe_datepicker_container {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
@ -2096,6 +2085,18 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
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 {
|
.openerp .oe_hidden_input_file {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -2125,6 +2126,7 @@
|
||||||
}
|
}
|
||||||
.openerp .oe_form .oe_form_field_image .oe_form_field_image_controls {
|
.openerp .oe_form .oe_form_field_image .oe_form_field_image_controls {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
white-space: nowrap;
|
||||||
top: 1px;
|
top: 1px;
|
||||||
padding: 3px 0 0 0;
|
padding: 3px 0 0 0;
|
||||||
margin: 0 1px;
|
margin: 0 1px;
|
||||||
|
@ -2152,27 +2154,33 @@
|
||||||
.openerp .oe_form .oe_form_field_one2many > .oe_view_manager .oe_list_pager_single_page {
|
.openerp .oe_form .oe_form_field_one2many > .oe_view_manager .oe_list_pager_single_page {
|
||||||
display: none;
|
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;
|
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;
|
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;
|
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;
|
padding: 0px 8px;
|
||||||
line-height: 16px;
|
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;
|
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;
|
height: auto;
|
||||||
line-height: 16px;
|
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;
|
height: auto;
|
||||||
line-height: 16px;
|
line-height: 16px;
|
||||||
}
|
}
|
||||||
|
@ -2185,6 +2193,10 @@
|
||||||
.openerp .oe_list_content td:first-child:after, .openerp .oe_list_content th:first-child:after {
|
.openerp .oe_list_content td:first-child:after, .openerp .oe_list_content th:first-child:after {
|
||||||
border-width: 0;
|
border-width: 0;
|
||||||
}
|
}
|
||||||
|
.openerp .oe_list_content td.oe_number {
|
||||||
|
text-align: right !important;
|
||||||
|
max-width: 100px;
|
||||||
|
}
|
||||||
.openerp .oe_list_content > thead {
|
.openerp .oe_list_content > thead {
|
||||||
border-bottom: 2px solid #cacaca;
|
border-bottom: 2px solid #cacaca;
|
||||||
background: #eeeeee;
|
background: #eeeeee;
|
||||||
|
@ -2233,8 +2245,8 @@
|
||||||
.openerp .oe_list_content > tbody > tr > td.oe_list_field_cell {
|
.openerp .oe_list_content > tbody > tr > td.oe_list_field_cell {
|
||||||
padding: 3px 6px;
|
padding: 3px 6px;
|
||||||
}
|
}
|
||||||
.openerp .oe_list_content > tbody > tr > td, .openerp .oe_list_content > tbody > tr > th {
|
.openerp .oe_list_content > tbody > tr > td.oe_list_field_cell progress {
|
||||||
line-height: 18px;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.openerp .oe_list_content > tbody > tr > td > button, .openerp .oe_list_content > tbody > tr > th > button {
|
.openerp .oe_list_content > tbody > tr > td > button, .openerp .oe_list_content > tbody > tr > th > button {
|
||||||
border: none;
|
border: none;
|
||||||
|
@ -2250,9 +2262,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 {
|
.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;
|
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) {
|
.openerp .oe_list_content > tbody > tr:nth-child(odd) {
|
||||||
background-color: #f0f0fa;
|
background-color: #f0f0fa;
|
||||||
background-color: #f0f0fa;
|
background-color: #f0f0fa;
|
||||||
|
@ -2353,6 +2362,59 @@
|
||||||
color: #333333;
|
color: #333333;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.openerp .tree_header {
|
||||||
|
background-color: #f0f0f0;
|
||||||
|
border-bottom: 1px solid #cacaca;
|
||||||
|
color: #4c4c4c;
|
||||||
|
padding: 5px;
|
||||||
|
height: 25px;
|
||||||
|
}
|
||||||
|
.openerp .tree_header button {
|
||||||
|
float: right;
|
||||||
|
height: 27px;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
.openerp .oe-treeview-table {
|
||||||
|
width: 100%;
|
||||||
|
background-color: white;
|
||||||
|
border-spacing: 0;
|
||||||
|
}
|
||||||
|
.openerp .oe-treeview-table th {
|
||||||
|
padding: 10px;
|
||||||
|
color: #4c4c4c;
|
||||||
|
font-weight: bold;
|
||||||
|
background-color: #f0f0f0;
|
||||||
|
border-bottom: 2px solid #cacaca;
|
||||||
|
}
|
||||||
|
.openerp .oe-treeview-table .treeview-tr, .openerp .oe-treeview-table .treeview-td {
|
||||||
|
cursor: pointer;
|
||||||
|
border-right: 1px dotted #afafb6;
|
||||||
|
vertical-align: top;
|
||||||
|
text-align: left;
|
||||||
|
border-bottom: 1px solid #cfcccc;
|
||||||
|
}
|
||||||
|
.openerp .oe-treeview-table tr:hover {
|
||||||
|
background-color: #e0e0f8;
|
||||||
|
}
|
||||||
|
.openerp .oe-treeview-table .oe-number {
|
||||||
|
text-align: right !important;
|
||||||
|
}
|
||||||
|
.openerp .oe-treeview-table span {
|
||||||
|
font-size: 90%;
|
||||||
|
font-weight: normal;
|
||||||
|
white-space: nowrap;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.openerp .oe-treeview-table .treeview-tr.oe-treeview-first {
|
||||||
|
background: transparent url(/web/static/src/img/expand.gif) 0 50% no-repeat;
|
||||||
|
}
|
||||||
|
.openerp .oe-treeview-table .oe_open .treeview-tr.oe-treeview-first {
|
||||||
|
background-image: url(/web/static/src/img/collapse.gif);
|
||||||
|
}
|
||||||
|
.openerp .oe-treeview-table .treeview-tr.oe-treeview-first span, .openerp .oe-treeview-table .treeview-td.oe-treeview-first span {
|
||||||
|
margin-left: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
.kitten-mode-activated {
|
.kitten-mode-activated {
|
||||||
background-image: url(http://placekitten.com/g/1365/769);
|
background-image: url(http://placekitten.com/g/1365/769);
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
|
|
|
@ -205,13 +205,7 @@ $sheet-max-width: 860px
|
||||||
// Modal box
|
// Modal box
|
||||||
&.ui-dialog
|
&.ui-dialog
|
||||||
display: none
|
display: none
|
||||||
position: fixed
|
|
||||||
padding: 6px
|
padding: 6px
|
||||||
top: 50%
|
|
||||||
left: 50%
|
|
||||||
z-index: 1050
|
|
||||||
width: 560px
|
|
||||||
margin: -150px 0 0 -280px
|
|
||||||
//overflow: hidden
|
//overflow: hidden
|
||||||
background-color: rgba(60,60,60,0.7)
|
background-color: rgba(60,60,60,0.7)
|
||||||
border: 1px solid
|
border: 1px solid
|
||||||
|
@ -220,6 +214,8 @@ $sheet-max-width: 860px
|
||||||
@include radius(8px)
|
@include radius(8px)
|
||||||
@include box-shadow(0 1px 12px rgba(0, 0, 0, 0.6))
|
@include box-shadow(0 1px 12px rgba(0, 0, 0, 0.6))
|
||||||
@include background-clip()
|
@include background-clip()
|
||||||
|
.ui-dialog-content
|
||||||
|
padding: 0px
|
||||||
.ui-dialog-titlebar, .ui-dialog-content, .ui-dialog-buttonpane
|
.ui-dialog-titlebar, .ui-dialog-content, .ui-dialog-buttonpane
|
||||||
padding: 16px
|
padding: 16px
|
||||||
.ui-dialog-titlebar
|
.ui-dialog-titlebar
|
||||||
|
@ -241,6 +237,8 @@ $sheet-max-width: 860px
|
||||||
@include radius(0 0 2px 2px)
|
@include radius(0 0 2px 2px)
|
||||||
button
|
button
|
||||||
margin-left: 8px
|
margin-left: 8px
|
||||||
|
.ui-dialog-buttonset
|
||||||
|
float: left
|
||||||
.ui-dialog-titlebar-close
|
.ui-dialog-titlebar-close
|
||||||
padding: 0
|
padding: 0
|
||||||
.ui-icon-closethick
|
.ui-icon-closethick
|
||||||
|
@ -260,6 +258,10 @@ $sheet-max-width: 860px
|
||||||
color: black
|
color: black
|
||||||
text-decoration: none
|
text-decoration: none
|
||||||
|
|
||||||
|
&.ui-dialog.oe_act_window
|
||||||
|
.ui-dialog-content
|
||||||
|
padding: 0px
|
||||||
|
|
||||||
.modal-backdrop
|
.modal-backdrop
|
||||||
position: fixed
|
position: fixed
|
||||||
top: 0
|
top: 0
|
||||||
|
@ -294,6 +296,7 @@ $sheet-max-width: 860px
|
||||||
cursor: wait
|
cursor: wait
|
||||||
.oe_fade
|
.oe_fade
|
||||||
color: #888
|
color: #888
|
||||||
|
font-weight: normal
|
||||||
.oe_bold
|
.oe_bold
|
||||||
font-weight: bold
|
font-weight: bold
|
||||||
.oe_inline
|
.oe_inline
|
||||||
|
@ -322,7 +325,8 @@ $sheet-max-width: 860px
|
||||||
&:hover
|
&:hover
|
||||||
background: #ED6F6A
|
background: #ED6F6A
|
||||||
.oe_title
|
.oe_title
|
||||||
width: 60%
|
width: 50%
|
||||||
|
float: left
|
||||||
.oe_title:after
|
.oe_title:after
|
||||||
content: "."
|
content: "."
|
||||||
display: block
|
display: block
|
||||||
|
@ -330,17 +334,20 @@ $sheet-max-width: 860px
|
||||||
clear: both
|
clear: both
|
||||||
visibility: hidden
|
visibility: hidden
|
||||||
.oe_button_box
|
.oe_button_box
|
||||||
width: 38%
|
width: 270px
|
||||||
text-align: right
|
text-align: right
|
||||||
button
|
button
|
||||||
margin: 4px
|
margin: 4px
|
||||||
.oe_avatar
|
.oe_avatar
|
||||||
margin: 0 16px 0 0
|
margin: 0 6px 15px 0
|
||||||
img
|
> img
|
||||||
height: 50px
|
height: 90px
|
||||||
|
max-width: 100px
|
||||||
@include radius(3px)
|
@include radius(3px)
|
||||||
@include box-shadow(0 1px 3px rgba(0, 0, 0, 0.3))
|
@include box-shadow(0 1px 3px rgba(0, 0, 0, 0.3))
|
||||||
border: none
|
border: none
|
||||||
|
.oe_avatar + div
|
||||||
|
margin-left: 5px
|
||||||
.oe_button.oe_link
|
.oe_button.oe_link
|
||||||
@include reset()
|
@include reset()
|
||||||
img
|
img
|
||||||
|
@ -362,8 +369,26 @@ $sheet-max-width: 860px
|
||||||
text-decoration: none
|
text-decoration: none
|
||||||
.oe_star_on
|
.oe_star_on
|
||||||
color: gold
|
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 {{{
|
// Tooltips {{{
|
||||||
&.oe_tooltip
|
&.oe_tooltip
|
||||||
|
@ -888,8 +913,9 @@ $sheet-max-width: 860px
|
||||||
.oe_view_manager_view_kanban
|
.oe_view_manager_view_kanban
|
||||||
height: inherit
|
height: inherit
|
||||||
|
|
||||||
.oe_view_manager_header
|
table.oe_view_manager_header
|
||||||
width: 100%
|
width: 100%
|
||||||
|
table-layout: fixed
|
||||||
.oe_header_row
|
.oe_header_row
|
||||||
//min-height: 26px
|
//min-height: 26px
|
||||||
//line-height: 26px
|
//line-height: 26px
|
||||||
|
@ -900,7 +926,6 @@ $sheet-max-width: 860px
|
||||||
padding-top: 0
|
padding-top: 0
|
||||||
.oe_view_manager_sidebar
|
.oe_view_manager_sidebar
|
||||||
margin: 0px auto
|
margin: 0px auto
|
||||||
width: 400px
|
|
||||||
text-align: center
|
text-align: center
|
||||||
td
|
td
|
||||||
line-height: 26px
|
line-height: 26px
|
||||||
|
@ -1033,7 +1058,7 @@ $sheet-max-width: 860px
|
||||||
float: right
|
float: right
|
||||||
padding: 1px 0
|
padding: 1px 0
|
||||||
line-height: 18px
|
line-height: 18px
|
||||||
width: 480px
|
width: 400px
|
||||||
border: 1px solid #ababab
|
border: 1px solid #ababab
|
||||||
background: white
|
background: white
|
||||||
@include radius(13px)
|
@include radius(13px)
|
||||||
|
@ -1357,11 +1382,11 @@ $sheet-max-width: 860px
|
||||||
.oe_form .oe_form_field_date
|
.oe_form .oe_form_field_date
|
||||||
width: auto
|
width: auto
|
||||||
.oe_form_nosheet
|
.oe_form_nosheet
|
||||||
margin-left: 10px
|
margin: 20px
|
||||||
margin-right: 10px
|
|
||||||
.oe_form_nosheet > header
|
.oe_form_nosheet > header
|
||||||
margin-left: -10px
|
margin-top: -20px
|
||||||
margin-right: -10px
|
margin-left: -20px
|
||||||
|
margin-right: -20px
|
||||||
// }}}
|
// }}}
|
||||||
// FormView.custom tags and classes {{{
|
// FormView.custom tags and classes {{{
|
||||||
.oe_form
|
.oe_form
|
||||||
|
@ -1374,7 +1399,7 @@ $sheet-max-width: 860px
|
||||||
ul
|
ul
|
||||||
display: inline-block
|
display: inline-block
|
||||||
float: right
|
float: right
|
||||||
footer
|
div.oe_chatter
|
||||||
min-width: 650px
|
min-width: 650px
|
||||||
max-width: $sheet-max-width
|
max-width: $sheet-max-width
|
||||||
margin: 0 auto
|
margin: 0 auto
|
||||||
|
@ -1414,15 +1439,16 @@ $sheet-max-width: 860px
|
||||||
padding: 0 !important
|
padding: 0 !important
|
||||||
td.oe_form_group_cell_label
|
td.oe_form_group_cell_label
|
||||||
border-right: none
|
border-right: none
|
||||||
.oe_form_field
|
|
||||||
width: auto !important
|
|
||||||
.oe_subtotal_footer_separator
|
.oe_subtotal_footer_separator
|
||||||
|
width: 108px
|
||||||
border-top: 1px solid #cacaca
|
border-top: 1px solid #cacaca
|
||||||
font-sie: 120%
|
|
||||||
font-weight: bold
|
font-weight: bold
|
||||||
|
font-size: 18px
|
||||||
label.oe_subtotal_footer_separator
|
label.oe_subtotal_footer_separator
|
||||||
font-weight: bold !important
|
font-weight: bold !important
|
||||||
padding: 2px 8px 2px 0px !important
|
padding: 2px 8px 2px 0px !important
|
||||||
|
label.oe_form_label_help
|
||||||
|
font-weight: normal
|
||||||
// no sheet in popups
|
// no sheet in popups
|
||||||
.oe_application
|
.oe_application
|
||||||
.oe_form_sheetbg
|
.oe_form_sheetbg
|
||||||
|
@ -1446,21 +1472,22 @@ $sheet-max-width: 860px
|
||||||
// }}}
|
// }}}
|
||||||
// FormView.group {{{
|
// FormView.group {{{
|
||||||
.oe_form
|
.oe_form
|
||||||
|
.oe_form_button
|
||||||
|
margin: 2px
|
||||||
td.oe_form_group_cell_label
|
td.oe_form_group_cell_label
|
||||||
border-right: 1px solid #ddd
|
border-right: 1px solid #ddd
|
||||||
padding: 2px 0px 2px 0px
|
padding: 2px 0px 2px 0px
|
||||||
label
|
label
|
||||||
line-height: 18px
|
line-height: 18px
|
||||||
display: block
|
display: block
|
||||||
min-width: 110px
|
min-width: 120px
|
||||||
td.oe_form_group_cell + .oe_form_group_cell
|
td.oe_form_group_cell + .oe_form_group_cell
|
||||||
padding-left: 6px
|
padding-left: 6px
|
||||||
.oe_form_group
|
.oe_form_group
|
||||||
width: 100%
|
width: 100%
|
||||||
margin: 4px 0 4px 0
|
margin: 6px 0 6px 0
|
||||||
.oe_group_right
|
.oe_form_group_cell.oe_group_right
|
||||||
> tbody > tr > td:first-child
|
padding-left: 20px
|
||||||
padding-left: 18px
|
|
||||||
// }}}
|
// }}}
|
||||||
// FormView.label {{{
|
// FormView.label {{{
|
||||||
.oe_form
|
.oe_form
|
||||||
|
@ -1521,12 +1548,6 @@ $sheet-max-width: 860px
|
||||||
width: 100%
|
width: 100%
|
||||||
.oe_form_field_text.oe_inline, .oe_form_field_text.oe_inline > textarea
|
.oe_form_field_text.oe_inline, .oe_form_field_text.oe_inline > textarea
|
||||||
width: 500px
|
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
|
h1, h2, h3, h4, h5, h6
|
||||||
margin: 0 0 4px 0
|
margin: 0 0 4px 0
|
||||||
input
|
input
|
||||||
|
@ -1539,14 +1560,6 @@ $sheet-max-width: 860px
|
||||||
line-height: 18px
|
line-height: 18px
|
||||||
input
|
input
|
||||||
margin: 0px
|
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
|
input[type="text"], input[type="password"], input[type="file"], select
|
||||||
height: 22px
|
height: 22px
|
||||||
padding-top: 2px
|
padding-top: 2px
|
||||||
|
@ -1572,26 +1585,6 @@ $sheet-max-width: 860px
|
||||||
.oe_form_field_boolean
|
.oe_form_field_boolean
|
||||||
padding-top: 4px
|
padding-top: 4px
|
||||||
width: auto
|
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
|
.oe_datepicker_container
|
||||||
display: none
|
display: none
|
||||||
.oe_datepicker_root
|
.oe_datepicker_root
|
||||||
|
@ -1636,6 +1629,16 @@ $sheet-max-width: 860px
|
||||||
> div
|
> div
|
||||||
position: relative
|
position: relative
|
||||||
overflow: hidden
|
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 {{{
|
// FormView.fields_binary {{{
|
||||||
/* http://www.quirksmode.org/dom/inputfile.html
|
/* http://www.quirksmode.org/dom/inputfile.html
|
||||||
|
@ -1669,6 +1672,7 @@ $sheet-max-width: 860px
|
||||||
vertical-align: top
|
vertical-align: top
|
||||||
.oe_form_field_image_controls
|
.oe_form_field_image_controls
|
||||||
position: absolute
|
position: absolute
|
||||||
|
white-space: nowrap
|
||||||
top: 1px
|
top: 1px
|
||||||
padding: 3px 0 0 0
|
padding: 3px 0 0 0
|
||||||
margin: 0 1px
|
margin: 0 1px
|
||||||
|
@ -1694,8 +1698,14 @@ $sheet-max-width: 860px
|
||||||
.oe_form .oe_form_field_one2many > .oe_view_manager
|
.oe_form .oe_form_field_one2many > .oe_view_manager
|
||||||
.oe_list_pager_single_page
|
.oe_list_pager_single_page
|
||||||
display: none
|
display: none
|
||||||
.oe_form_field_one2many
|
.oe_form_field_one2many,.oe_form_field_many2many
|
||||||
// TODO: oe_form_field_one2many_list?
|
// 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
|
.oe_list .oe_list_edit_row_save
|
||||||
background: url(/web/static/src/img/iconset-b-remove.png) 50% 50% no-repeat
|
background: url(/web/static/src/img/iconset-b-remove.png) 50% 50% no-repeat
|
||||||
&:before
|
&:before
|
||||||
|
@ -1728,6 +1738,9 @@ $sheet-max-width: 860px
|
||||||
td:first-child, th:first-child
|
td:first-child, th:first-child
|
||||||
&:after
|
&:after
|
||||||
border-width: 0
|
border-width: 0
|
||||||
|
td.oe_number
|
||||||
|
text-align: right !important
|
||||||
|
max-width: 100px
|
||||||
> thead
|
> thead
|
||||||
border-bottom: 2px solid #cacaca
|
border-bottom: 2px solid #cacaca
|
||||||
background: #eee
|
background: #eee
|
||||||
|
@ -1763,8 +1776,9 @@ $sheet-max-width: 860px
|
||||||
border-top: 1px solid #ddd
|
border-top: 1px solid #ddd
|
||||||
> td.oe_list_field_cell
|
> td.oe_list_field_cell
|
||||||
padding: 3px 6px
|
padding: 3px 6px
|
||||||
|
progress
|
||||||
|
width: 100%
|
||||||
> td, > th
|
> td, > th
|
||||||
line-height: 18px
|
|
||||||
> button
|
> button
|
||||||
border: none
|
border: none
|
||||||
background: transparent
|
background: transparent
|
||||||
|
@ -1774,8 +1788,6 @@ $sheet-max-width: 860px
|
||||||
width: 17px
|
width: 17px
|
||||||
&:after
|
&:after
|
||||||
border-width: 0
|
border-width: 0
|
||||||
> td.oe_number
|
|
||||||
text-align: right !important
|
|
||||||
> tr:nth-child(odd)
|
> tr:nth-child(odd)
|
||||||
background-color: #f0f0fa
|
background-color: #f0f0fa
|
||||||
@include vertical-gradient(#f0f0fa, #eeeef6)
|
@include vertical-gradient(#f0f0fa, #eeeef6)
|
||||||
|
@ -1853,6 +1865,49 @@ $sheet-max-width: 860px
|
||||||
float: right
|
float: right
|
||||||
color: #333
|
color: #333
|
||||||
// }}}
|
// }}}
|
||||||
|
//Tree view
|
||||||
|
.openerp
|
||||||
|
.tree_header
|
||||||
|
background-color: #f0f0f0
|
||||||
|
border-bottom: 1px solid #cacaca
|
||||||
|
color: #4c4c4c
|
||||||
|
padding: 5px
|
||||||
|
height: 25px
|
||||||
|
button
|
||||||
|
float: right
|
||||||
|
height: 27px
|
||||||
|
margin-right: 5px
|
||||||
|
.oe-treeview-table
|
||||||
|
width: 100%
|
||||||
|
background-color: white
|
||||||
|
border-spacing: 0
|
||||||
|
th
|
||||||
|
padding: 10px
|
||||||
|
color: #4c4c4c
|
||||||
|
font-weight: bold
|
||||||
|
background-color: #f0f0f0
|
||||||
|
border-bottom: 2px solid #cacaca
|
||||||
|
.treeview-tr, .treeview-td
|
||||||
|
cursor: pointer
|
||||||
|
border-right: 1px dotted #afafb6
|
||||||
|
vertical-align: top
|
||||||
|
text-align: left
|
||||||
|
border-bottom: 1px solid #cfcccc
|
||||||
|
tr:hover
|
||||||
|
background-color: #e0e0f8
|
||||||
|
.oe-number
|
||||||
|
text-align: right !important
|
||||||
|
span
|
||||||
|
font-size: 90%
|
||||||
|
font-weight: normal
|
||||||
|
white-space: nowrap
|
||||||
|
display: block
|
||||||
|
.treeview-tr.oe-treeview-first
|
||||||
|
background: transparent url(/web/static/src/img/expand.gif) 0 50% no-repeat
|
||||||
|
.oe_open .treeview-tr.oe-treeview-first
|
||||||
|
background-image: url(/web/static/src/img/collapse.gif)
|
||||||
|
.treeview-tr.oe-treeview-first span, .treeview-td.oe-treeview-first span
|
||||||
|
margin-left: 16px
|
||||||
// Kitten Mode {{{
|
// Kitten Mode {{{
|
||||||
.kitten-mode-activated
|
.kitten-mode-activated
|
||||||
background-image: url(http://placekitten.com/g/1365/769)
|
background-image: url(http://placekitten.com/g/1365/769)
|
||||||
|
|
|
@ -63,7 +63,7 @@ instance.web.Dialog = instance.web.Widget.extend({
|
||||||
this.dialog_options = {
|
this.dialog_options = {
|
||||||
modal: true,
|
modal: true,
|
||||||
destroy_on_close: true,
|
destroy_on_close: true,
|
||||||
width: $(window).width() * (($(window).width() > 1024) ? 0.5 : 0.75),
|
width: 900,
|
||||||
min_width: 0,
|
min_width: 0,
|
||||||
max_width: '95%',
|
max_width: '95%',
|
||||||
height: 'auto',
|
height: 'auto',
|
||||||
|
@ -145,9 +145,9 @@ instance.web.Dialog = instance.web.Widget.extend({
|
||||||
_.each(this.getChildren(), function(el) {
|
_.each(this.getChildren(), function(el) {
|
||||||
el.destroy();
|
el.destroy();
|
||||||
});
|
});
|
||||||
if (! this.isDestroyed()) {
|
if (! this.isDestroyed()) {
|
||||||
this.$element.dialog('destroy');
|
this.$element.dialog('destroy');
|
||||||
}
|
}
|
||||||
this._super();
|
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}));
|
dialog.$element.html(QWeb.render('CrashManager.error', {session: instance.connection, error: error}));
|
||||||
},
|
},
|
||||||
on_javascript_exception: function(exception) {
|
on_javascript_exception: function(exception) {
|
||||||
this.on_traceback({
|
this.on_traceback({
|
||||||
type: _t("Client Error"),
|
type: _t("Client Error"),
|
||||||
message: exception,
|
message: exception,
|
||||||
data: {debug: ""}
|
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() {
|
start: function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
self.$element.find("form").submit(self.on_submit);
|
self.$element.find("form").submit(self.on_submit);
|
||||||
|
|
||||||
self.$element.find('.oe_login_manage_db').click(function() {
|
self.$element.find('.oe_login_manage_db').click(function() {
|
||||||
self.$element.find('.oe_login_bottom').hide();
|
self.open_db_manager();
|
||||||
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'));
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
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) {
|
load_db_list: function (force) {
|
||||||
var d = $.when(), self = this;
|
var d = $.when(), self = this;
|
||||||
|
@ -514,11 +516,14 @@ instance.web.Login = instance.web.Widget.extend({
|
||||||
}
|
}
|
||||||
return d;
|
return d;
|
||||||
},
|
},
|
||||||
_db_list_loaded: function () {
|
on_db_list_loaded: function () {
|
||||||
var list = this._db_list,
|
var self = this;
|
||||||
dbdiv = this.$element.find('div.oe_login_dbpane');
|
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}));
|
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();
|
dbdiv.hide();
|
||||||
} else {
|
} else {
|
||||||
dbdiv.show();
|
dbdiv.show();
|
||||||
|
@ -667,7 +672,7 @@ instance.web.Menu = instance.web.Widget.extend({
|
||||||
* @param {Number} id the action_id to match
|
* @param {Number} id the action_id to match
|
||||||
*/
|
*/
|
||||||
open_action: function (id) {
|
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');
|
var menu_id = $menu.data('menu');
|
||||||
if (menu_id) {
|
if (menu_id) {
|
||||||
this.open_menu(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("Change password"), click: function(){ self.change_password(); }},
|
||||||
{text: _t("Cancel"), click: function(){ $(this).dialog('destroy'); }},
|
{text: _t("Cancel"), click: function(){ $(this).dialog('destroy'); }},
|
||||||
{text: _t("Save"), click: function(){
|
{text: _t("Save"), click: function(){
|
||||||
var inner_viewmanager = action_manager.inner_viewmanager;
|
var inner_widget = action_manager.inner_widget;
|
||||||
inner_viewmanager.views[inner_viewmanager.active_view].controller.do_save()
|
inner_widget.views[inner_widget.active_view].controller.do_save()
|
||||||
.then(function() {
|
.then(function() {
|
||||||
self.dialog.destroy();
|
self.dialog.destroy();
|
||||||
// needs to refresh interface in case language changed
|
// needs to refresh interface in case language changed
|
||||||
|
@ -894,11 +899,12 @@ instance.web.WebClient = instance.web.Widget.extend({
|
||||||
});
|
});
|
||||||
this.$element.on('click', '.oe_dropdown_toggle', function(ev) {
|
this.$element.on('click', '.oe_dropdown_toggle', function(ev) {
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
var $menu = $(this).find('.oe_dropdown_menu');
|
var $toggle = $(this);
|
||||||
|
var $menu = $toggle.find('.oe_dropdown_menu');
|
||||||
var state = $menu.is('.oe_opened');
|
var state = $menu.is('.oe_opened');
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
// Do not alter propagation
|
// Do not alter propagation
|
||||||
$menu.toggleClass('oe_opened', !state);
|
$toggle.add($menu).toggleClass('oe_opened', !state);
|
||||||
if (!state) {
|
if (!state) {
|
||||||
// Move $menu if outside window's edge
|
// Move $menu if outside window's edge
|
||||||
var doc_width = $(document).width();
|
var doc_width = $(document).width();
|
||||||
|
@ -1036,6 +1042,7 @@ instance.web.WebClient = instance.web.Widget.extend({
|
||||||
if (options.needaction) {
|
if (options.needaction) {
|
||||||
action.context.search_default_needaction_pending = true;
|
action.context.search_default_needaction_pending = true;
|
||||||
}
|
}
|
||||||
|
self.action_manager.clear_breadcrumbs();
|
||||||
self.action_manager.do_action(action);
|
self.action_manager.do_action(action);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -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
|
* 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() {
|
init: function() {
|
||||||
instance.web.EventDispatcherMixin.init.call(this, parent);
|
instance.web.EventDispatcherMixin.init.call(this, parent);
|
||||||
var self = this;
|
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 */
|
/** OpenERP Translations */
|
||||||
instance.web.TranslationDataBase = instance.web.Class.extend(/** @lends instance.web.TranslationDataBase# */{
|
instance.web.TranslationDataBase = instance.web.Class.extend(/** @lends instance.web.TranslationDataBase# */{
|
||||||
|
|
|
@ -53,7 +53,7 @@ instance.web.ViewEditor = instance.web.OldWidget.extend({
|
||||||
this.main_view_id = this.parent.fields_view.view_id;
|
this.main_view_id = this.parent.fields_view.view_id;
|
||||||
this.action_manager = new instance.web.ActionManager(this);
|
this.action_manager = new instance.web.ActionManager(this);
|
||||||
$.when(this.action_manager.do_action(action)).then(function() {
|
$.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;
|
controller = viewmanager.views[viewmanager.active_view].controller;
|
||||||
self.action_manager.appendTo(self.view_edit_dialog.$element);
|
self.action_manager.appendTo(self.view_edit_dialog.$element);
|
||||||
self.action_manager.renderElement(self.view_edit_dialog);
|
self.action_manager.renderElement(self.view_edit_dialog);
|
||||||
|
@ -88,7 +88,7 @@ instance.web.ViewEditor = instance.web.OldWidget.extend({
|
||||||
} else {
|
} else {
|
||||||
$.when(self.do_save_view(view_values)).then(function() {
|
$.when(self.do_save_view(view_values)).then(function() {
|
||||||
self.create_view_dialog.close();
|
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();
|
controller.reload_content();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -167,7 +167,7 @@ instance.web.ViewEditor = instance.web.OldWidget.extend({
|
||||||
do_delete_view: function() {
|
do_delete_view: function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
if (confirm(_t("Do you really want to remove this view?"))) {
|
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() {
|
this.dataset.unlink([this.main_view_id]).then(function() {
|
||||||
controller.reload_content();
|
controller.reload_content();
|
||||||
self.main_view_id = self.parent.fields_view.view_id;
|
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);
|
action_manager.do_action(action);
|
||||||
}},
|
}},
|
||||||
{text: _t("Close"), click: function(){
|
{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();
|
self.edit_xml_dialog.close();
|
||||||
}}
|
}}
|
||||||
]
|
]
|
||||||
|
@ -998,7 +998,7 @@ instance.web.ViewEditor = instance.web.OldWidget.extend({
|
||||||
};
|
};
|
||||||
var action_manager = new instance.web.ActionManager(self);
|
var action_manager = new instance.web.ActionManager(self);
|
||||||
$.when(action_manager.do_action(action)).then(function() {
|
$.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(){
|
controller.on_button_cancel.add_last(function(){
|
||||||
action_manager.destroy()
|
action_manager.destroy()
|
||||||
});
|
});
|
||||||
|
|
|
@ -287,10 +287,12 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
|
||||||
on_record_loaded: function(record) {
|
on_record_loaded: function(record) {
|
||||||
var self = this, set_values = [];
|
var self = this, set_values = [];
|
||||||
if (!record) {
|
if (!record) {
|
||||||
|
this.set({ 'title' : undefined });
|
||||||
this.do_warn("Form", "The record could not be found in the database.", true);
|
this.do_warn("Form", "The record could not be found in the database.", true);
|
||||||
return $.Deferred().reject();
|
return $.Deferred().reject();
|
||||||
}
|
}
|
||||||
this.datarecord = record;
|
this.datarecord = record;
|
||||||
|
this.set({ 'title' : record.id ? record.name : "New record" });
|
||||||
|
|
||||||
if (this.qweb) {
|
if (this.qweb) {
|
||||||
this.kill_current_form();
|
this.kill_current_form();
|
||||||
|
@ -524,7 +526,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
|
||||||
this.on_form_changed();
|
this.on_form_changed();
|
||||||
}
|
}
|
||||||
if (!_.isEmpty(result.warning)) {
|
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,
|
title:result.warning.title,
|
||||||
modal: true,
|
modal: true,
|
||||||
buttons: [
|
buttons: [
|
||||||
|
@ -800,13 +802,13 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
get_fields_values: function(blacklist) {
|
get_fields_values: function(blacklist) {
|
||||||
blacklist = blacklist || [];
|
blacklist = blacklist || [];
|
||||||
var values = {};
|
var values = {};
|
||||||
var ids = this.get_selected_ids();
|
var ids = this.get_selected_ids();
|
||||||
values["id"] = ids.length > 0 ? ids[0] : false;
|
values["id"] = ids.length > 0 ? ids[0] : false;
|
||||||
_.each(this.fields, function(value_, key) {
|
_.each(this.fields, function(value_, key) {
|
||||||
if (_.include(blacklist, key))
|
if (_.include(blacklist, key))
|
||||||
return;
|
return;
|
||||||
var val = value_.get_value();
|
var val = value_.get_value();
|
||||||
values[key] = val;
|
values[key] = val;
|
||||||
});
|
});
|
||||||
|
@ -1184,8 +1186,7 @@ instance.web.form.FormRenderingEngine = instance.web.form.FormRenderingEngineInt
|
||||||
row_cols = cols;
|
row_cols = cols;
|
||||||
} else if (tagName==='group') {
|
} else if (tagName==='group') {
|
||||||
// When <group> <group/><group/> </group>, we need a spacing between the two groups
|
// 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;
|
row_cols -= colspan;
|
||||||
|
|
||||||
|
@ -1211,12 +1212,6 @@ instance.web.form.FormRenderingEngine = instance.web.form.FormRenderingEngineInt
|
||||||
$child = $td.children(':first');
|
$child = $td.children(':first');
|
||||||
switch ($child[0].tagName.toLowerCase()) {
|
switch ($child[0].tagName.toLowerCase()) {
|
||||||
case 'separator':
|
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;
|
break;
|
||||||
case 'label':
|
case 'label':
|
||||||
if ($child.attr('for')) {
|
if ($child.attr('for')) {
|
||||||
|
@ -1585,7 +1580,7 @@ instance.web.form.FormWidget = instance.web.Widget.extend(instance.web.form.Invi
|
||||||
parent: {}
|
parent: {}
|
||||||
});
|
});
|
||||||
if (a_dataset.parent_view) {
|
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;
|
return fields_values;
|
||||||
},
|
},
|
||||||
|
@ -3082,30 +3077,30 @@ instance.web.form.FieldOne2Many = instance.web.form.AbstractField.extend({
|
||||||
save_any_view: function() {
|
save_any_view: function() {
|
||||||
if (this.doing_on_change)
|
if (this.doing_on_change)
|
||||||
return false;
|
return false;
|
||||||
return this.session.synchronized_mode(_.bind(function() {
|
return this.session.synchronized_mode(_.bind(function() {
|
||||||
if (this.viewmanager && this.viewmanager.views && this.viewmanager.active_view &&
|
if (this.viewmanager && this.viewmanager.views && this.viewmanager.active_view &&
|
||||||
this.viewmanager.views[this.viewmanager.active_view] &&
|
this.viewmanager.views[this.viewmanager.active_view] &&
|
||||||
this.viewmanager.views[this.viewmanager.active_view].controller) {
|
this.viewmanager.views[this.viewmanager.active_view].controller) {
|
||||||
var 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 (this.viewmanager.active_view === "form") {
|
||||||
if (!view.is_initialized.isResolved()) {
|
if (!view.is_initialized.isResolved()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
var res = $.when(view.do_save());
|
var res = $.when(view.do_save());
|
||||||
if (!res.isResolved() && !res.isRejected()) {
|
if (!res.isResolved() && !res.isRejected()) {
|
||||||
console.warn("Asynchronous get_value() is not supported in form view.");
|
console.warn("Asynchronous get_value() is not supported in form view.");
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
} else if (this.viewmanager.active_view === "list") {
|
} else if (this.viewmanager.active_view === "list") {
|
||||||
var res = $.when(view.ensure_saved());
|
var res = $.when(view.ensure_saved());
|
||||||
if (!res.isResolved() && !res.isRejected()) {
|
if (!res.isResolved() && !res.isRejected()) {
|
||||||
console.warn("Asynchronous get_value() is not supported in list view.");
|
console.warn("Asynchronous get_value() is not supported in list view.");
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}, this));
|
}, this));
|
||||||
},
|
},
|
||||||
is_syntax_valid: function() {
|
is_syntax_valid: function() {
|
||||||
if (!this.viewmanager.views[this.viewmanager.active_view])
|
if (!this.viewmanager.views[this.viewmanager.active_view])
|
||||||
|
@ -3462,7 +3457,7 @@ instance.web.form.FieldMany2ManyTags = instance.web.form.AbstractField.extend(in
|
||||||
$("textarea", self.$element).css("padding-left", "3px");
|
$("textarea", self.$element).css("padding-left", "3px");
|
||||||
self.tags.addTags(_.map(data, function(el) {return {name: el[1], id:el[0]};}));
|
self.tags.addTags(_.map(data, function(el) {return {name: el[1], id:el[0]};}));
|
||||||
} else {
|
} 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) {
|
if (! self.get('values') || self.get('values').length > 0) {
|
||||||
|
@ -3866,8 +3861,8 @@ instance.web.form.AbstractFormPopup = instance.web.OldWidget.extend({
|
||||||
var self = this;
|
var self = this;
|
||||||
this.renderElement();
|
this.renderElement();
|
||||||
new instance.web.Dialog(this, {
|
new instance.web.Dialog(this, {
|
||||||
width: '90%',
|
|
||||||
min_width: '800px',
|
min_width: '800px',
|
||||||
|
dialogClass: 'oe_act_window',
|
||||||
close: function() {
|
close: function() {
|
||||||
self.check_exit(true);
|
self.check_exit(true);
|
||||||
},
|
},
|
||||||
|
|
|
@ -1045,7 +1045,7 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web.
|
||||||
render_cell: function () {
|
render_cell: function () {
|
||||||
return self.render_cell.apply(self, arguments); }
|
return self.render_cell.apply(self, arguments); }
|
||||||
}, this)));
|
}, this)));
|
||||||
this.pad_table_to(5);
|
this.pad_table_to(4);
|
||||||
},
|
},
|
||||||
pad_table_to: function (count) {
|
pad_table_to: function (count) {
|
||||||
if (this.records.length >= count ||
|
if (this.records.length >= count ||
|
||||||
|
|
|
@ -63,6 +63,12 @@ instance.web.TreeView = instance.web.View.extend(/** @lends instance.web.TreeVie
|
||||||
}
|
}
|
||||||
return fields;
|
return fields;
|
||||||
},
|
},
|
||||||
|
store_record:function(records){
|
||||||
|
var self = this;
|
||||||
|
_(records).each(function (record) {
|
||||||
|
self.records[record.id] = record;
|
||||||
|
});
|
||||||
|
},
|
||||||
on_loaded: function (fields_view) {
|
on_loaded: function (fields_view) {
|
||||||
var self = this;
|
var self = this;
|
||||||
var has_toolbar = !!fields_view.arch.attrs.toolbar;
|
var has_toolbar = !!fields_view.arch.attrs.toolbar;
|
||||||
|
@ -87,17 +93,19 @@ instance.web.TreeView = instance.web.View.extend(/** @lends instance.web.TreeVie
|
||||||
this.$element.addClass(this.fields_view.arch.attrs['class']);
|
this.$element.addClass(this.fields_view.arch.attrs['class']);
|
||||||
|
|
||||||
this.dataset.read_slice(this.fields_list()).then(function(records) {
|
this.dataset.read_slice(this.fields_list()).then(function(records) {
|
||||||
|
self.store_record(records);
|
||||||
if (!has_toolbar) {
|
if (!has_toolbar) {
|
||||||
// WARNING: will do a second read on the same ids, but only on
|
// WARNING: will do a second read on the same ids, but only on
|
||||||
// first load so not very important
|
// first load so not very important
|
||||||
self.getdata(null, _(records).pluck('id'));
|
self.render_data({'null':records})
|
||||||
|
self.getdata(_.pluck(records,"id"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var $select = self.$element.find('select')
|
var $select = self.$element.find('select')
|
||||||
.change(function () {
|
.change(function () {
|
||||||
var $option = $(this).find(':selected');
|
var $option = $(this).find(':selected');
|
||||||
self.getdata($option.val(), $option.data('children'));
|
self.getdata($option.val());
|
||||||
});
|
});
|
||||||
_(records).each(function (record) {
|
_(records).each(function (record) {
|
||||||
self.records[record.id] = record;
|
self.records[record.id] = record;
|
||||||
|
@ -112,7 +120,12 @@ instance.web.TreeView = instance.web.View.extend(/** @lends instance.web.TreeVie
|
||||||
$select.change();
|
$select.change();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
this.$element.find("#tree_view_expand").click(function(){
|
||||||
|
self.expand_all();
|
||||||
|
});
|
||||||
|
this.$element.find("#tree_view_collapse").click(function(){
|
||||||
|
self.collpase_all();
|
||||||
|
});
|
||||||
// TODO store open nodes in url ?...
|
// TODO store open nodes in url ?...
|
||||||
this.do_push_state({});
|
this.do_push_state({});
|
||||||
|
|
||||||
|
@ -128,6 +141,22 @@ instance.web.TreeView = instance.web.View.extend(/** @lends instance.web.TreeVie
|
||||||
return [color, py.parse(py.tokenize(expr)), expr];
|
return [color, py.parse(py.tokenize(expr)), expr];
|
||||||
}).value();
|
}).value();
|
||||||
},
|
},
|
||||||
|
expand_all: function(){
|
||||||
|
var self = this;
|
||||||
|
var tr = this.$element.find(".oe-treeview-table tbody tr[id^='treerow_']");
|
||||||
|
_.each(tr,function(rec){
|
||||||
|
self.showcontent($(rec).attr('data-id'),true);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
collpase_all: function(){
|
||||||
|
var self = this;
|
||||||
|
var root_tr = this.$element.find(".oe-treeview-table tbody tr[data-level='"+1+"']");
|
||||||
|
_.each(root_tr,function(rec){
|
||||||
|
if($(rec).hasClass('oe_open')){
|
||||||
|
self.showcontent($(rec).attr('data-id'),false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* Returns the color for the provided record in the current view (from the
|
* Returns the color for the provided record in the current view (from the
|
||||||
* ``@colors`` attribute)
|
* ``@colors`` attribute)
|
||||||
|
@ -164,50 +193,44 @@ instance.web.TreeView = instance.web.View.extend(/** @lends instance.web.TreeVie
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$element.delegate('.treeview-tr', 'click', function () {
|
this.$element.delegate('.treeview-tr', 'click', function () {
|
||||||
var is_loaded = 0,
|
var $this = $(this),
|
||||||
$this = $(this),
|
|
||||||
record_id = $this.data('id'),
|
record_id = $this.data('id'),
|
||||||
record = self.records[record_id],
|
bool = $this.parent().hasClass('oe_open');
|
||||||
children_ids = record[self.children_field];
|
self.showcontent(record_id, !bool);
|
||||||
|
|
||||||
_(children_ids).each(function(childid) {
|
|
||||||
if (self.$element.find('#treerow_' + childid).length) {
|
|
||||||
if (self.$element.find('#treerow_' + childid).is(':hidden')) {
|
|
||||||
is_loaded = -1;
|
|
||||||
} else {
|
|
||||||
is_loaded++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
if (is_loaded === 0) {
|
|
||||||
if (!$this.parent().hasClass('oe_open')) {
|
|
||||||
self.getdata(record_id, children_ids);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
self.showcontent(record_id, is_loaded < 0);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// get child data of selected value
|
// get child data of selected value
|
||||||
getdata: function (id, children_ids) {
|
getdata: function (id) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
var parent_child ={};
|
||||||
self.dataset.read_ids(children_ids, this.fields_list()).then(function(records) {
|
id = _.isArray(id)?id:parseInt(id);
|
||||||
_(records).each(function (record) {
|
var ir_model_data = new instance.web.Model(this.model,self.dataset.get_context() || {},[['id','child_of',id]]).query();
|
||||||
self.records[record.id] = record;
|
ir_model_data._execute().then(function(records){
|
||||||
});
|
self.store_record(records);
|
||||||
|
_.each(records,function(rec){
|
||||||
var $curr_node = self.$element.find('#treerow_' + id);
|
if(rec[self.children_field].length === 0)return;
|
||||||
|
parent_child[rec.id] = [];
|
||||||
|
_.each(rec[self.children_field],function(key){
|
||||||
|
parent_child[rec.id].push(self.records[key]);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
self.render_data(parent_child);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
render_data: function(groupby){
|
||||||
|
var self = this;
|
||||||
|
_.each(_.keys(groupby),function(key){
|
||||||
|
var $curr_node = self.$element.find('#treerow_' + key);
|
||||||
|
var record = groupby[key];
|
||||||
var children_rows = QWeb.render('TreeView.rows', {
|
var children_rows = QWeb.render('TreeView.rows', {
|
||||||
'records': records,
|
'records': record,
|
||||||
'children_field': self.children_field,
|
'children_field': self.children_field,
|
||||||
'fields_view': self.fields_view.arch.children,
|
'fields_view': self.fields_view.arch.children,
|
||||||
'fields': self.fields,
|
'fields': self.fields,
|
||||||
'level': $curr_node.data('level') || 0,
|
'level': ($curr_node.data('level') || 0) + 1,
|
||||||
'render': instance.web.format_value,
|
'render': instance.web.format_value,
|
||||||
'color_for': self.color_for
|
'color_for': self.color_for
|
||||||
});
|
});
|
||||||
|
|
||||||
if ($curr_node.length) {
|
if ($curr_node.length) {
|
||||||
$curr_node.addClass('oe_open');
|
$curr_node.addClass('oe_open');
|
||||||
$curr_node.after(children_rows);
|
$curr_node.after(children_rows);
|
||||||
|
@ -215,8 +238,10 @@ instance.web.TreeView = instance.web.View.extend(/** @lends instance.web.TreeVie
|
||||||
self.$element.find('tbody').html(children_rows);
|
self.$element.find('tbody').html(children_rows);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
self.collpase_all();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
// Get details in listview
|
// Get details in listview
|
||||||
activate: function(id) {
|
activate: function(id) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
@ -259,13 +284,5 @@ instance.web.TreeView = instance.web.View.extend(/** @lends instance.web.TreeVie
|
||||||
}, this);
|
}, this);
|
||||||
},
|
},
|
||||||
|
|
||||||
do_show: function () {
|
|
||||||
this.$element.show();
|
|
||||||
},
|
|
||||||
|
|
||||||
do_hide: function () {
|
|
||||||
this.$element.hide();
|
|
||||||
this.hidden = true;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,28 +10,111 @@ instance.web.ActionManager = instance.web.Widget.extend({
|
||||||
init: function(parent) {
|
init: function(parent) {
|
||||||
this._super(parent);
|
this._super(parent);
|
||||||
this.inner_action = null;
|
this.inner_action = null;
|
||||||
this.inner_viewmanager = null;
|
this.inner_widget = null;
|
||||||
this.dialog = null;
|
this.dialog = null;
|
||||||
this.dialog_viewmanager = null;
|
this.dialog_widget = null;
|
||||||
this.client_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 () {
|
dialog_stop: function () {
|
||||||
if (this.dialog) {
|
if (this.dialog) {
|
||||||
this.dialog_viewmanager.destroy();
|
this.dialog_widget.destroy();
|
||||||
this.dialog_viewmanager = null;
|
this.dialog_widget = null;
|
||||||
this.dialog.destroy();
|
this.dialog.destroy();
|
||||||
this.dialog = null;
|
this.dialog = null;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
content_stop: function () {
|
/**
|
||||||
if (this.inner_viewmanager) {
|
* Add a new item to the breadcrumb
|
||||||
this.inner_viewmanager.destroy();
|
*
|
||||||
this.inner_viewmanager = null;
|
* 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) {
|
var item = _.extend({
|
||||||
this.client_widget.destroy();
|
show: function(index) {
|
||||||
this.client_widget = null;
|
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) {
|
do_push_state: function(state) {
|
||||||
if (this.getParent() && this.getParent().do_push_state) {
|
if (this.getParent() && this.getParent().do_push_state) {
|
||||||
|
@ -49,7 +132,7 @@ instance.web.ActionManager = instance.web.Widget.extend({
|
||||||
var self = this,
|
var self = this,
|
||||||
action_loaded;
|
action_loaded;
|
||||||
if (state.action_id) {
|
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) {
|
if (run_action) {
|
||||||
this.null_action();
|
this.null_action();
|
||||||
action_loaded = this.do_action(state.action_id);
|
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() {
|
$.when(action_loaded || null).then(function() {
|
||||||
if (self.inner_viewmanager) {
|
if (self.inner_widget && self.inner_widget.do_load_state) {
|
||||||
self.inner_viewmanager.do_load_state(state, warm);
|
self.inner_widget.do_load_state(state, warm);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
do_action: function(action, on_close) {
|
do_action: function(action, on_close) {
|
||||||
if (_.isNumber(action)) {
|
if (_.isNumber(action) || _.isString(action)) {
|
||||||
var self = this;
|
var self = this;
|
||||||
return self.rpc("/web/action/load", { action_id: action }, function(result) {
|
return self.rpc("/web/action/load", { action_id: action }, function(result) {
|
||||||
self.do_action(result.result, on_close);
|
self.do_action(result.result, on_close);
|
||||||
|
@ -124,7 +207,7 @@ instance.web.ActionManager = instance.web.Widget.extend({
|
||||||
},
|
},
|
||||||
null_action: function() {
|
null_action: function() {
|
||||||
this.dialog_stop();
|
this.dialog_stop();
|
||||||
this.content_stop();
|
this.clear_breadcrumbs();
|
||||||
},
|
},
|
||||||
ir_actions_act_window: function (action, on_close) {
|
ir_actions_act_window: function (action, on_close) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
@ -137,29 +220,31 @@ instance.web.ActionManager = instance.web.Widget.extend({
|
||||||
}
|
}
|
||||||
if (action.target === 'new') {
|
if (action.target === 'new') {
|
||||||
if (this.dialog === null) {
|
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)
|
if(on_close)
|
||||||
this.dialog.on_close.add(on_close);
|
this.dialog.on_close.add(on_close);
|
||||||
} else {
|
} else {
|
||||||
this.dialog_viewmanager.destroy();
|
this.dialog_widget.destroy();
|
||||||
}
|
}
|
||||||
this.dialog.dialog_title = action.name;
|
this.dialog.dialog_title = action.name;
|
||||||
this.dialog_viewmanager = new instance.web.ViewManagerAction(this.dialog, action);
|
this.dialog_widget = new instance.web.ViewManagerAction(this, action);
|
||||||
this.dialog_viewmanager.appendTo(this.dialog.$element);
|
this.dialog_widget.appendTo(this.dialog.$element);
|
||||||
this.dialog_viewmanager.$element.addClass("oe_view_manager_" + (action.target || 'current'));
|
|
||||||
this.dialog.open();
|
this.dialog.open();
|
||||||
} else {
|
} else {
|
||||||
this.dialog_stop();
|
this.dialog_stop();
|
||||||
this.content_stop();
|
|
||||||
if(action.menu_id) {
|
if(action.menu_id) {
|
||||||
return this.getParent().do_action(action, function () {
|
return this.getParent().do_action(action, function () {
|
||||||
instance.webclient.menu.open_menu(action.menu_id);
|
instance.webclient.menu.open_menu(action.menu_id);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.inner_action = action;
|
this.inner_action = action;
|
||||||
this.inner_viewmanager = new instance.web.ViewManagerAction(this, action);
|
var inner_widget = this.inner_widget = new instance.web.ViewManagerAction(this, action);
|
||||||
this.inner_viewmanager.appendTo(this.$element);
|
inner_widget.add_breadcrumb();
|
||||||
this.inner_viewmanager.$element.addClass("oe_view_manager_" + (action.target || 'current'));
|
this.inner_widget.appendTo(this.$element);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ir_actions_act_window_close: function (action, on_closed) {
|
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) {
|
ir_actions_client: function (action) {
|
||||||
this.content_stop();
|
|
||||||
this.dialog_stop();
|
this.dialog_stop();
|
||||||
var ClientWidget = instance.web.client_actions.get_object(action.tag);
|
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) {
|
ir_actions_report_xml: function(action, on_closed) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
@ -290,35 +379,7 @@ instance.web.ViewManager = instance.web.Widget.extend({
|
||||||
this.active_view = view_type;
|
this.active_view = view_type;
|
||||||
|
|
||||||
if (!view.controller) {
|
if (!view.controller) {
|
||||||
// Lazy loading of views
|
view_promise = this.do_create_view(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);
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else if (this.searchview
|
} else if (this.searchview
|
||||||
&& self.flags.auto_search
|
&& self.flags.auto_search
|
||||||
&& view.controller.searchable !== false) {
|
&& view.controller.searchable !== false) {
|
||||||
|
@ -347,14 +408,90 @@ instance.web.ViewManager = instance.web.Widget.extend({
|
||||||
container.hide();
|
container.hide();
|
||||||
controller.do_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;
|
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
|
* 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
|
* 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 () {
|
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({
|
instance.web.ViewManagerAction = instance.web.ViewManager.extend({
|
||||||
|
@ -499,7 +628,7 @@ instance.web.ViewManagerAction = instance.web.ViewManager.extend({
|
||||||
if (this.session.hidden_menutips) {
|
if (this.session.hidden_menutips) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.session.hidden_menutips = {}
|
this.session.hidden_menutips = {};
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Initializes the ViewManagerAction: sets up the searchview (if the
|
* 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);
|
var manager_ready = $.when(searchview_loaded, main_view_loaded);
|
||||||
|
|
||||||
this.$element.find('.oe_debug_view').change(this.on_debug_changed);
|
this.$element.find('.oe_debug_view').change(this.on_debug_changed);
|
||||||
|
this.$element.addClass("oe_view_manager_" + (this.action.target || 'current'));
|
||||||
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);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return manager_ready;
|
return manager_ready;
|
||||||
},
|
},
|
||||||
on_debug_changed: function (evt) {
|
on_debug_changed: function (evt) {
|
||||||
|
@ -675,12 +779,18 @@ instance.web.ViewManagerAction = instance.web.ViewManager.extend({
|
||||||
view: controller,
|
view: controller,
|
||||||
view_manager: self
|
view_manager: self
|
||||||
}));
|
}));
|
||||||
if (!self.action.name && fvg) {
|
self.set_title();
|
||||||
self.$element.find('.oe_view_title_text').text(fvg.arch.attrs.string || fvg.name);
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
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) {
|
do_push_state: function(state) {
|
||||||
if (this.getParent() && this.getParent().do_push_state) {
|
if (this.getParent() && this.getParent().do_push_state) {
|
||||||
state["view_type"] = this.active_view;
|
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);
|
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({
|
instance.web.Sidebar = instance.web.Widget.extend({
|
||||||
|
@ -1130,7 +1237,7 @@ instance.web.View = instance.web.Widget.extend({
|
||||||
args.push(context);
|
args.push(context);
|
||||||
return dataset.call_button(action_data.name, args, handler);
|
return dataset.call_button(action_data.name, args, handler);
|
||||||
} else if (action_data.type=="action") {
|
} 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 {
|
} else {
|
||||||
return dataset.exec_workflow(record_id, action_data.name, handler);
|
return dataset.exec_workflow(record_id, action_data.name, handler);
|
||||||
}
|
}
|
||||||
|
|
|
@ -399,16 +399,17 @@
|
||||||
<t t-name="ViewManager">
|
<t t-name="ViewManager">
|
||||||
<div class="oe_view_manager">
|
<div class="oe_view_manager">
|
||||||
<table class="oe_view_manager_header">
|
<table class="oe_view_manager_header">
|
||||||
<col width="33%"/>
|
<col width="20%"/>
|
||||||
<col width="33%"/>
|
<col width="25%"/>
|
||||||
<col width="34%"/>
|
<col width="20%"/>
|
||||||
|
<col width="35%"/>
|
||||||
<tr class="oe_header_row oe_header_row_top">
|
<tr class="oe_header_row oe_header_row_top">
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<h2 class="oe_view_title" t-if="widget.flags.display_title !== false">
|
<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>
|
</h2>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td colspan="2">
|
||||||
<div class="oe_view_manager_view_search" t-opentag="true"/>
|
<div class="oe_view_manager_view_search" t-opentag="true"/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -416,7 +417,7 @@
|
||||||
<td>
|
<td>
|
||||||
<div class="oe_view_manager_buttons"/>
|
<div class="oe_view_manager_buttons"/>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td colspan="2">
|
||||||
<div class="oe_view_manager_sidebar"/>
|
<div class="oe_view_manager_sidebar"/>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -535,14 +536,16 @@
|
||||||
</t>
|
</t>
|
||||||
|
|
||||||
<t t-name="TreeView">
|
<t t-name="TreeView">
|
||||||
<select t-if="toolbar" style="width: 30%">
|
<div class = "tree_header">
|
||||||
</select>
|
<select t-if="toolbar" ></select>
|
||||||
<table class="oe_tree_table">
|
<button id = "tree_view_collapse">Collapse All</button>
|
||||||
|
<button id = "tree_view_expand">Expand All</button>
|
||||||
|
</div>
|
||||||
|
<table class="oe-treeview-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th t-foreach="fields_view" t-as="field"
|
<th t-foreach="fields_view" t-as="field"
|
||||||
t-if="!field.attrs.modifiers.tree_invisible"
|
t-if="!field.attrs.modifiers.tree_invisible">
|
||||||
class="treeview-header">
|
|
||||||
<t t-esc="fields[field.attrs.name].string" />
|
<t t-esc="fields[field.attrs.name].string" />
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -554,11 +557,11 @@
|
||||||
<tr t-name="TreeView.rows"
|
<tr t-name="TreeView.rows"
|
||||||
t-foreach="records" t-as="record"
|
t-foreach="records" t-as="record"
|
||||||
t-att-id="'treerow_' + record.id"
|
t-att-id="'treerow_' + record.id"
|
||||||
t-att-data-id="record.id" t-att-data-level="level + 1">
|
t-att-data-id="record.id" t-att-data-level="level">
|
||||||
<t t-set="children" t-value="record[children_field]"/>
|
<t t-set="children" t-value="record[children_field]"/>
|
||||||
<t t-set="class" t-value="children and children.length ? 'treeview-tr' : 'treeview-td'"/>
|
<t t-set="class" t-value="children and children.length ? 'treeview-tr' : 'treeview-td'"/>
|
||||||
<t t-set="rank" t-value="'oe_tree_first'"/>
|
<t t-set="rank" t-value="'oe-treeview-first'"/>
|
||||||
<t t-set="style" t-value="'background-position: ' + 19*level + 'px; padding-left: ' + 19*level + 'px;'"/>
|
<t t-set="style" t-value="'background-position: ' + 19*(level-1) + 'px; padding-left: ' + 19*(level-1) + 'px;'"/>
|
||||||
|
|
||||||
<td t-foreach="fields_view" t-as="field"
|
<td t-foreach="fields_view" t-as="field"
|
||||||
t-if="!field.attrs.modifiers.tree_invisible"
|
t-if="!field.attrs.modifiers.tree_invisible"
|
||||||
|
@ -769,7 +772,7 @@
|
||||||
<table border="0" cellpadding="0" cellspacing="0" t-attf-class="oe_form_group #{classnames}"/>
|
<table border="0" cellpadding="0" cellspacing="0" t-attf-class="oe_form_group #{classnames}"/>
|
||||||
</t>
|
</t>
|
||||||
<t t-name="FormRenderingNotebook">
|
<t t-name="FormRenderingNotebook">
|
||||||
<div>
|
<div class="oe_clear">
|
||||||
<ul t-attf-class="oe_notebook #{classnames}">
|
<ul t-attf-class="oe_notebook #{classnames}">
|
||||||
<li t-foreach="pages" t-as="page" t-att-modifiers="page.modifiers">
|
<li t-foreach="pages" t-as="page" t-att-modifiers="page.modifiers">
|
||||||
<a t-attf-href="##{page.id}">
|
<a t-attf-href="##{page.id}">
|
||||||
|
@ -784,7 +787,7 @@
|
||||||
</div>
|
</div>
|
||||||
</t>
|
</t>
|
||||||
<t t-name="FormRenderingSeparator">
|
<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"/>
|
<t t-esc="string"/>
|
||||||
</div>
|
</div>
|
||||||
</t>
|
</t>
|
||||||
|
@ -959,18 +962,20 @@
|
||||||
</t>
|
</t>
|
||||||
</span>
|
</span>
|
||||||
</t>
|
</t>
|
||||||
|
<!-- Collection of m2m tags -->
|
||||||
<t t-name="FieldMany2ManyTags">
|
<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')">
|
<t t-if="! widget.get('effective_readonly')">
|
||||||
<textarea rows="1" style="width: 100%"
|
<textarea rows="1" style="width: 100%"
|
||||||
t-att-placeholder="widget.node.attrs.placeholder"></textarea>
|
t-att-placeholder="widget.node.attrs.placeholder"></textarea>
|
||||||
</t>
|
</t>
|
||||||
</div>
|
</div>
|
||||||
</t>
|
</t>
|
||||||
<t t-name="FieldMany2ManyTags.box">
|
<!-- Individual m2m tag element -->
|
||||||
|
<t t-name="FieldMany2ManyTag">
|
||||||
<t t-set="i" t-value="0"/>
|
<t t-set="i" t-value="0"/>
|
||||||
<t t-foreach="elements" t-as="el">
|
<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]"/>
|
<t t-esc="el[1]"/>
|
||||||
</span>
|
</span>
|
||||||
<t t-set="i" t-value="i + 1"/>
|
<t t-set="i" t-value="i + 1"/>
|
||||||
|
@ -1467,11 +1472,11 @@
|
||||||
</t>
|
</t>
|
||||||
<t t-name="AbstractFormPopup.buttons">
|
<t t-name="AbstractFormPopup.buttons">
|
||||||
<t t-if="! multi_select">
|
<t t-if="! multi_select">
|
||||||
<button type="button" class="oe_button oe_abstractformpopup-form-save">Save</button>
|
<button type="button" class="oe_button oe_abstractformpopup-form-save oe_highlight">Save</button>
|
||||||
</t>
|
</t>
|
||||||
<t t-if="multi_select">
|
<t t-if="multi_select">
|
||||||
<button type="button" class="oe_button oe_abstractformpopup-form-save-new">Save & New</button>
|
<button type="button" class="oe_button oe_abstractformpopup-form-save-new oe_highlight">Save & New</button>
|
||||||
<button type="button" class="oe_button oe_abstractformpopup-form-save">Save & Close</button>
|
<button type="button" class="oe_button oe_abstractformpopup-form-save oe_highlight">Save & Close</button>
|
||||||
</t>
|
</t>
|
||||||
<button type="button" class="oe_button oe_abstractformpopup-form-close">Cancel</button>
|
<button type="button" class="oe_button oe_abstractformpopup-form-close">Cancel</button>
|
||||||
</t>
|
</t>
|
||||||
|
|
|
@ -37,11 +37,12 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
|
||||||
delete(action.attrs.width);
|
delete(action.attrs.width);
|
||||||
delete(action.attrs.height);
|
delete(action.attrs.height);
|
||||||
delete(action.attrs.colspan);
|
delete(action.attrs.colspan);
|
||||||
self.rpc('/web/action/load', {
|
var action_id = _.str.toNumber(action.attrs.name);
|
||||||
action_id: parseInt(action.attrs.name, 10)
|
if (!_.isNaN(action_id)) {
|
||||||
}, function(result) {
|
self.rpc('/web/action/load', {action_id: action_id}, function(result) {
|
||||||
self.on_load_action(result, column_index + '_' + action_index, action.attrs);
|
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) {
|
if (am.inner_widget) {
|
||||||
am.inner_viewmanager.on_mode_switch.add(function(mode) {
|
am.inner_widget.on_mode_switch.add(function(mode) {
|
||||||
var new_views = [];
|
var new_views = [];
|
||||||
_.each(action_orig.views, function(view) {
|
_.each(action_orig.views, function(view) {
|
||||||
new_views[view[1] === mode ? 'unshift' : 'push'](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]);
|
new_views.unshift([false, mode]);
|
||||||
}
|
}
|
||||||
action_orig.views = new_views;
|
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);
|
self.do_action(action_orig);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
</div>
|
</div>
|
||||||
</t>
|
</t>
|
||||||
<t t-name="DashBoard.xml">
|
<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">
|
<board t-att-style="style">
|
||||||
<column t-foreach="columns" t-as="column">
|
<column t-foreach="columns" t-as="column">
|
||||||
<action t-foreach="column" t-as="action" t-att="action"/>
|
<action t-foreach="column" t-as="action" t-att="action"/>
|
||||||
|
|
|
@ -0,0 +1,81 @@
|
||||||
|
# Bulgarian translation for openerp-web
|
||||||
|
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
|
||||||
|
# This file is distributed under the same license as the openerp-web package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
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-07-11 13:48+0000\n"
|
||||||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"Language-Team: Bulgarian <bg@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-12 04:58+0000\n"
|
||||||
|
"X-Generator: Launchpad (build 15593)\n"
|
||||||
|
|
||||||
|
#. openerp-web
|
||||||
|
#: addons/web_diagram/static/src/js/diagram.js:11
|
||||||
|
msgid "Diagram"
|
||||||
|
msgstr "Диаграма"
|
||||||
|
|
||||||
|
#. openerp-web
|
||||||
|
#: addons/web_diagram/static/src/js/diagram.js:165
|
||||||
|
msgid "Are you sure?"
|
||||||
|
msgstr "Сигурни ли сте?"
|
||||||
|
|
||||||
|
#. openerp-web
|
||||||
|
#: addons/web_diagram/static/src/js/diagram.js:195
|
||||||
|
msgid ""
|
||||||
|
"Deleting this node cannot be undone.\n"
|
||||||
|
"It will also delete all connected transitions.\n"
|
||||||
|
"\n"
|
||||||
|
"Are you sure ?"
|
||||||
|
msgstr ""
|
||||||
|
"Изтриването на този възел не може да бъде отменено.\n"
|
||||||
|
"То също така ще изтрие и всички свързани преходи.\n"
|
||||||
|
"\n"
|
||||||
|
"Сигурни ли сте?"
|
||||||
|
|
||||||
|
#. openerp-web
|
||||||
|
#: addons/web_diagram/static/src/js/diagram.js:213
|
||||||
|
msgid ""
|
||||||
|
"Deleting this transition cannot be undone.\n"
|
||||||
|
"\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 "Дейност"
|
||||||
|
|
||||||
|
#. openerp-web
|
||||||
|
#: addons/web_diagram/static/src/js/diagram.js:232
|
||||||
|
#: addons/web_diagram/static/src/js/diagram.js:296
|
||||||
|
msgid "Open: "
|
||||||
|
msgstr "Отвори: "
|
||||||
|
|
||||||
|
#. openerp-web
|
||||||
|
#: addons/web_diagram/static/src/js/diagram.js:262
|
||||||
|
#: addons/web_diagram/static/src/js/diagram.js:314
|
||||||
|
msgid "Create:"
|
||||||
|
msgstr "Създай:"
|
||||||
|
|
||||||
|
#. openerp-web
|
||||||
|
#: addons/web_diagram/static/src/js/diagram.js:289
|
||||||
|
#: addons/web_diagram/static/src/js/diagram.js:308
|
||||||
|
msgid "Transition"
|
||||||
|
msgstr "Преход"
|
||||||
|
|
||||||
|
#. openerp-web
|
||||||
|
#: addons/web_diagram/static/src/xml/base_diagram.xml:6
|
||||||
|
msgid "New Node"
|
||||||
|
msgstr "Нов възел"
|
|
@ -0,0 +1,28 @@
|
||||||
|
# Bulgarian translation for openerp-web
|
||||||
|
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
|
||||||
|
# This file is distributed under the same license as the openerp-web package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
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-07-11 13:51+0000\n"
|
||||||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"Language-Team: Bulgarian <bg@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-12 04:58+0000\n"
|
||||||
|
"X-Generator: Launchpad (build 15593)\n"
|
||||||
|
|
||||||
|
#. openerp-web
|
||||||
|
#: addons/web_gantt/static/src/js/gantt.js:11
|
||||||
|
msgid "Gantt"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. openerp-web
|
||||||
|
#: addons/web_gantt/static/src/xml/web_gantt.xml:10
|
||||||
|
msgid "Create"
|
||||||
|
msgstr "Създай"
|
|
@ -0,0 +1,69 @@
|
||||||
|
# Bulgarian translation for openerp-web
|
||||||
|
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
|
||||||
|
# This file is distributed under the same license as the openerp-web package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
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-07-11 14:02+0000\n"
|
||||||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"Language-Team: Bulgarian <bg@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-12 04:58+0000\n"
|
||||||
|
"X-Generator: Launchpad (build 15593)\n"
|
||||||
|
|
||||||
|
#. openerp-web
|
||||||
|
#: addons/web_kanban/static/src/js/kanban.js:10
|
||||||
|
msgid "Kanban"
|
||||||
|
msgstr "Канбан"
|
||||||
|
|
||||||
|
#. openerp-web
|
||||||
|
#: addons/web_kanban/static/src/js/kanban.js:372
|
||||||
|
msgid "Undefined"
|
||||||
|
msgstr "Неопределен"
|
||||||
|
|
||||||
|
#. openerp-web
|
||||||
|
#: addons/web_kanban/static/src/js/kanban.js:684
|
||||||
|
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 ""
|
||||||
|
|
||||||
|
#. openerp-web
|
||||||
|
#: addons/web_kanban/static/src/xml/web_kanban.xml:53
|
||||||
|
msgid "Show more... ("
|
||||||
|
msgstr "Покажи повече... ("
|
||||||
|
|
||||||
|
#. openerp-web
|
||||||
|
#: addons/web_kanban/static/src/xml/web_kanban.xml:53
|
||||||
|
msgid "remaining)"
|
||||||
|
msgstr "оставащ)"
|
||||||
|
|
||||||
|
#. openerp-web
|
||||||
|
#: addons/web_kanban/static/src/xml/web_kanban.xml:71
|
||||||
|
msgid "Add"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. openerp-web
|
||||||
|
#: addons/web_kanban/static/src/xml/web_kanban.xml:71
|
||||||
|
msgid "or"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. openerp-web
|
||||||
|
#: addons/web_kanban/static/src/xml/web_kanban.xml:72
|
||||||
|
msgid "Cancel"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#~ msgid "Create"
|
||||||
|
#~ msgstr "Създаване"
|
||||||
|
|
||||||
|
#~ msgid "</tr><tr>"
|
||||||
|
#~ msgstr "</tr><tr>"
|
|
@ -0,0 +1,3 @@
|
||||||
|
kanban.css: kanban.sass
|
||||||
|
sass -t expanded kanban.sass kanban.css
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
|
@charset "utf-8";
|
||||||
.openerp .oe_kanban_view {
|
.openerp .oe_kanban_view {
|
||||||
|
background: url(data:image/pngbase64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAKElEQVQIHWP8DwTv379nAAFBQUEGhnfv3oHEwADEZgJLIRGMIClkLQCr3x2Htp/lLwAAAABJRU5ErkJggg==);
|
||||||
height: inherit;
|
height: inherit;
|
||||||
}
|
}
|
||||||
.openerp .oe_kanban_view .ui-sortable-placeholder {
|
.openerp .oe_kanban_view .ui-sortable-placeholder {
|
||||||
|
@ -37,7 +39,6 @@
|
||||||
}
|
}
|
||||||
.openerp .oe_kanban_view .oe_kanban_groups {
|
.openerp .oe_kanban_view .oe_kanban_groups {
|
||||||
height: inherit;
|
height: inherit;
|
||||||
width: 100%;
|
|
||||||
}
|
}
|
||||||
.openerp .oe_kanban_view .oe_kanban_header:hover .oe_dropdown_kanban {
|
.openerp .oe_kanban_view .oe_kanban_header:hover .oe_dropdown_kanban {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
@ -61,15 +62,15 @@
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
padding: 6px 6px 6px 5px;
|
padding: 6px 6px 6px 5px;
|
||||||
}
|
}
|
||||||
|
.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 {
|
.openerp .oe_kanban_view .oe_kanban_column.oe_kanban_grouped, .openerp .oe_kanban_view .oe_kanban_group_header {
|
||||||
background: #f0eeee;
|
background: #f0eeee;
|
||||||
}
|
|
||||||
.openerp .oe_kanban_view .oe_kanban_group_header.oe_kanban_no_group {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.openerp .oe_kanban_view .oe_kanban_column.oe_kanban_grouped, .openerp .oe_kanban_view .oe_kanban_group_header {
|
|
||||||
border-left: 1px solid #f0f8f8;
|
border-left: 1px solid #f0f8f8;
|
||||||
border-right: 1px solid #b9b9b9;
|
border-right: 1px solid #b9b9b9;
|
||||||
|
min-width: 170px;
|
||||||
|
max-width: 250px;
|
||||||
}
|
}
|
||||||
.openerp .oe_kanban_view .oe_form .oe_kanban_column {
|
.openerp .oe_kanban_view .oe_form .oe_kanban_column {
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
|
@ -81,9 +82,6 @@
|
||||||
.openerp .oe_kanban_view .oe_kanban_aggregates {
|
.openerp .oe_kanban_view .oe_kanban_aggregates {
|
||||||
padding: 0;
|
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 {
|
.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;
|
display: none;
|
||||||
}
|
}
|
||||||
|
@ -126,7 +124,6 @@
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
.openerp .oe_kanban_view .oe_kanban_quick_create {
|
.openerp .oe_kanban_view .oe_kanban_quick_create {
|
||||||
overflow: hidden;
|
|
||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
}
|
}
|
||||||
.openerp .oe_kanban_view .oe_kanban_quick_create_buttons {
|
.openerp .oe_kanban_view .oe_kanban_quick_create_buttons {
|
||||||
|
@ -168,7 +165,6 @@
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
padding: 0 5px;
|
padding: 0 5px;
|
||||||
color: #4c4c4c;
|
color: #4c4c4c;
|
||||||
min-height: 120px;
|
|
||||||
}
|
}
|
||||||
.openerp .oe_kanban_view .oe_kanban_details h4 {
|
.openerp .oe_kanban_view .oe_kanban_details h4 {
|
||||||
margin: 0 0 4px 0;
|
margin: 0 0 4px 0;
|
||||||
|
@ -178,7 +174,6 @@
|
||||||
display: block;
|
display: block;
|
||||||
min-height: 50px;
|
min-height: 50px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
display: block;
|
|
||||||
-moz-border-radius: 4px;
|
-moz-border-radius: 4px;
|
||||||
-webkit-border-radius: 4px;
|
-webkit-border-radius: 4px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
@ -348,8 +343,8 @@
|
||||||
-webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
|
-webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
|
||||||
-box-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
|
-box-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
|
||||||
}
|
}
|
||||||
.openerp .oe_kanban_view .oe_kanban_card:hover .oe_dropdown_kanban {
|
.openerp .oe_kanban_view .oe_kanban_card:hover .oe_dropdown_kanban > span {
|
||||||
display: block;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
.openerp .oe_kanban_view .oe_kanban_card h3 {
|
.openerp .oe_kanban_view .oe_kanban_card h3 {
|
||||||
margin: 0 16px 0 0;
|
margin: 0 16px 0 0;
|
||||||
|
@ -448,7 +443,6 @@
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -8px;
|
top: -8px;
|
||||||
right: 3px;
|
right: 3px;
|
||||||
display: none;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.openerp .oe_kanban_view .oe_dropdown_kanban:hover {
|
.openerp .oe_kanban_view .oe_dropdown_kanban:hover {
|
||||||
|
@ -459,6 +453,15 @@
|
||||||
top: 28px;
|
top: 28px;
|
||||||
min-width: 160px;
|
min-width: 160px;
|
||||||
}
|
}
|
||||||
|
.openerp .oe_kanban_view .oe_kanban_header .oe_dropdown_kanban {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.openerp .oe_kanban_view .oe_kanban_column .oe_dropdown_kanban.oe_opened > span {
|
||||||
|
visibility: visible;
|
||||||
|
}
|
||||||
|
.openerp .oe_kanban_view .oe_kanban_column .oe_dropdown_kanban > span {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
.openerp .oe_kanban_view .oe_kanban_colorpicker {
|
.openerp .oe_kanban_view .oe_kanban_colorpicker {
|
||||||
padding: 3px 6px;
|
padding: 3px 6px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
|
|
||||||
.openerp .oe_kanban_view
|
.openerp .oe_kanban_view
|
||||||
// KanbanView {{{
|
// KanbanView {{{
|
||||||
|
background: url(data:image/pngbase64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAKElEQVQIHWP8DwTv379nAAFBQUEGhnfv3oHEwADEZgJLIRGMIClkLQCr3x2Htp/lLwAAAABJRU5ErkJggg==)
|
||||||
height: inherit
|
height: inherit
|
||||||
.ui-sortable-placeholder
|
.ui-sortable-placeholder
|
||||||
border: 1px dotted black
|
border: 1px dotted black
|
||||||
|
@ -52,7 +53,6 @@
|
||||||
// KanbanGroups {{{
|
// KanbanGroups {{{
|
||||||
.oe_kanban_groups
|
.oe_kanban_groups
|
||||||
height: inherit
|
height: inherit
|
||||||
width: 100%
|
|
||||||
.oe_kanban_header
|
.oe_kanban_header
|
||||||
&:hover
|
&:hover
|
||||||
.oe_dropdown_kanban
|
.oe_dropdown_kanban
|
||||||
|
@ -73,16 +73,15 @@
|
||||||
.oe_kanban_column, .oe_kanban_group_header
|
.oe_kanban_column, .oe_kanban_group_header
|
||||||
vertical-align: top
|
vertical-align: top
|
||||||
padding: 6px 6px 6px 5px
|
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
|
.oe_kanban_column.oe_kanban_grouped, .oe_kanban_group_header
|
||||||
background: #f0eeee
|
background: #f0eeee
|
||||||
|
|
||||||
.oe_kanban_group_header.oe_kanban_no_group
|
|
||||||
display: none
|
|
||||||
|
|
||||||
.oe_kanban_column.oe_kanban_grouped, .oe_kanban_group_header
|
|
||||||
border-left: 1px solid #f0f8f8
|
border-left: 1px solid #f0f8f8
|
||||||
border-right: 1px solid #b9b9b9
|
border-right: 1px solid #b9b9b9
|
||||||
|
min-width: 170px
|
||||||
|
max-width: 250px
|
||||||
|
|
||||||
.oe_form
|
.oe_form
|
||||||
.oe_kanban_column
|
.oe_kanban_column
|
||||||
|
@ -93,8 +92,6 @@
|
||||||
height: 100%
|
height: 100%
|
||||||
.oe_kanban_aggregates
|
.oe_kanban_aggregates
|
||||||
padding: 0
|
padding: 0
|
||||||
.oe_kanban_group_header
|
|
||||||
position: relative
|
|
||||||
.oe_kanban_group_folded
|
.oe_kanban_group_folded
|
||||||
.oe_kanban_group_title, &.oe_kanban_column > *, .oe_kanban_aggregates, .oe_kanban_add
|
.oe_kanban_group_title, &.oe_kanban_column > *, .oe_kanban_aggregates, .oe_kanban_add
|
||||||
display: none
|
display: none
|
||||||
|
@ -123,7 +120,6 @@
|
||||||
width: 16px
|
width: 16px
|
||||||
height: 16px
|
height: 16px
|
||||||
background: url(/web_kanban/static/src/img/minus-icon.png) no-repeat
|
background: url(/web_kanban/static/src/img/minus-icon.png) no-repeat
|
||||||
.oe_kanban_group_folded .oe_kanban_fold_icon
|
|
||||||
// }}}
|
// }}}
|
||||||
// KanbanQuickCreate {{{
|
// KanbanQuickCreate {{{
|
||||||
.oe_kanban_add, .oe_kanban_header .oe_dropdown_toggle
|
.oe_kanban_add, .oe_kanban_header .oe_dropdown_toggle
|
||||||
|
@ -135,7 +131,6 @@
|
||||||
float: right
|
float: right
|
||||||
|
|
||||||
.oe_kanban_quick_create
|
.oe_kanban_quick_create
|
||||||
overflow: hidden
|
|
||||||
margin-bottom: 4px
|
margin-bottom: 4px
|
||||||
.oe_kanban_quick_create_buttons
|
.oe_kanban_quick_create_buttons
|
||||||
margin: 4px 0
|
margin: 4px 0
|
||||||
|
@ -169,7 +164,6 @@
|
||||||
font-size: 13px
|
font-size: 13px
|
||||||
padding: 0 5px
|
padding: 0 5px
|
||||||
color: #4c4c4c
|
color: #4c4c4c
|
||||||
min-height: 120px
|
|
||||||
h4
|
h4
|
||||||
margin: 0 0 4px 0
|
margin: 0 0 4px 0
|
||||||
.oe_kanban_record
|
.oe_kanban_record
|
||||||
|
@ -177,7 +171,6 @@
|
||||||
display: block
|
display: block
|
||||||
min-height: 50px
|
min-height: 50px
|
||||||
margin: 0
|
margin: 0
|
||||||
display: block
|
|
||||||
@include radius(4px)
|
@include radius(4px)
|
||||||
&:last-child
|
&:last-child
|
||||||
margin-bottom: 0
|
margin-bottom: 0
|
||||||
|
@ -301,8 +294,8 @@
|
||||||
margin-bottom: 0
|
margin-bottom: 0
|
||||||
&:hover
|
&:hover
|
||||||
@include box-shadow(0 0 3px rgba(0,0,0,0.6))
|
@include box-shadow(0 0 3px rgba(0,0,0,0.6))
|
||||||
.oe_dropdown_kanban
|
.oe_dropdown_kanban > span
|
||||||
display: block
|
visibility: visible
|
||||||
h3
|
h3
|
||||||
margin: 0 16px 0 0
|
margin: 0 16px 0 0
|
||||||
color: #4c4c4c
|
color: #4c4c4c
|
||||||
|
@ -368,7 +361,6 @@
|
||||||
position: absolute
|
position: absolute
|
||||||
top: -8px
|
top: -8px
|
||||||
right: 3px
|
right: 3px
|
||||||
display: none
|
|
||||||
cursor: pointer
|
cursor: pointer
|
||||||
&:hover
|
&:hover
|
||||||
text-decoration: none
|
text-decoration: none
|
||||||
|
@ -376,6 +368,15 @@
|
||||||
left: 0
|
left: 0
|
||||||
top: 28px
|
top: 28px
|
||||||
min-width: 160px
|
min-width: 160px
|
||||||
|
.oe_kanban_header
|
||||||
|
.oe_dropdown_kanban
|
||||||
|
display: none
|
||||||
|
.oe_kanban_column
|
||||||
|
.oe_dropdown_kanban
|
||||||
|
&.oe_opened > span
|
||||||
|
visibility: visible
|
||||||
|
> span
|
||||||
|
visibility: hidden
|
||||||
// }}}
|
// }}}
|
||||||
// KanbanColorPicker {{{
|
// KanbanColorPicker {{{
|
||||||
.oe_kanban_colorpicker
|
.oe_kanban_colorpicker
|
||||||
|
|
|
@ -198,15 +198,13 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
|
||||||
var def = $.Deferred();
|
var def = $.Deferred();
|
||||||
self.do_clear_groups();
|
self.do_clear_groups();
|
||||||
self.dataset.read_slice(self.fields_keys.concat(['__last_update']), { 'limit': self.limit }).then(function(records) {
|
self.dataset.read_slice(self.fields_keys.concat(['__last_update']), { 'limit': self.limit }).then(function(records) {
|
||||||
if (_.isEmpty(records)) {
|
var kgroup = new instance.web_kanban.KanbanGroup(self, records, null, self.dataset);
|
||||||
self.no_result();
|
self.do_add_groups([kgroup]).then(function() {
|
||||||
def.reject();
|
if (_.isEmpty(records)) {
|
||||||
} else {
|
self.no_result();
|
||||||
var kgroup = new instance.web_kanban.KanbanGroup(self, records, null, self.dataset);
|
}
|
||||||
self.do_add_groups([kgroup]).then(function() {
|
def.resolve();
|
||||||
def.resolve();
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
}).then(null, function() {
|
}).then(null, function() {
|
||||||
def.reject();
|
def.reject();
|
||||||
});
|
});
|
||||||
|
@ -288,13 +286,20 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
|
||||||
},
|
},
|
||||||
compute_groups_width: function() {
|
compute_groups_width: function() {
|
||||||
var unfolded = 0;
|
var unfolded = 0;
|
||||||
|
var self = this;
|
||||||
_.each(this.groups, function(group) {
|
_.each(this.groups, function(group) {
|
||||||
unfolded += group.state.folded ? 0 : 1;
|
unfolded += group.state.folded ? 0 : 1;
|
||||||
group.$element.css('width', '');
|
group.$element.css('width', '');
|
||||||
});
|
});
|
||||||
_.each(this.groups, function(group) {
|
_.each(this.groups, function(group) {
|
||||||
if (!group.state.folded) {
|
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");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -752,6 +757,9 @@ instance.web_kanban.KanbanRecord = instance.web.OldWidget.extend({
|
||||||
// Set the cache duration in seconds.
|
// Set the cache duration in seconds.
|
||||||
url += '&cache=' + parseInt(cache, 10);
|
url += '&cache=' + parseInt(cache, 10);
|
||||||
}
|
}
|
||||||
|
if (this.record[field] && this.record[field].value && ! /^\d+(\.\d*)? \w+$/.test(this.record[field].value)) {
|
||||||
|
url = 'data:image/png;base64,' + this.record[field].value;
|
||||||
|
}
|
||||||
return url;
|
return url;
|
||||||
},
|
},
|
||||||
kanban_text_ellipsis: function(s, size) {
|
kanban_text_ellipsis: function(s, size) {
|
||||||
|
|
|
@ -0,0 +1,106 @@
|
||||||
|
# Bulgarian translation for openerp-web
|
||||||
|
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
|
||||||
|
# This file is distributed under the same license as the openerp-web package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
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-07-11 14:08+0000\n"
|
||||||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"Language-Team: Bulgarian <bg@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-12 04:58+0000\n"
|
||||||
|
"X-Generator: Launchpad (build 15593)\n"
|
||||||
|
|
||||||
|
#. openerp-web
|
||||||
|
#: addons/web_mobile/static/src/xml/web_mobile.xml:17
|
||||||
|
msgid "OpenERP"
|
||||||
|
msgstr "OpenERP"
|
||||||
|
|
||||||
|
#. openerp-web
|
||||||
|
#: addons/web_mobile/static/src/xml/web_mobile.xml:22
|
||||||
|
msgid "Database:"
|
||||||
|
msgstr "База данни:"
|
||||||
|
|
||||||
|
#. openerp-web
|
||||||
|
#: addons/web_mobile/static/src/xml/web_mobile.xml:30
|
||||||
|
msgid "Login:"
|
||||||
|
msgstr "Вход:"
|
||||||
|
|
||||||
|
#. openerp-web
|
||||||
|
#: addons/web_mobile/static/src/xml/web_mobile.xml:32
|
||||||
|
msgid "Password:"
|
||||||
|
msgstr "Парола:"
|
||||||
|
|
||||||
|
#. openerp-web
|
||||||
|
#: addons/web_mobile/static/src/xml/web_mobile.xml:34
|
||||||
|
msgid "Login"
|
||||||
|
msgstr "Вход"
|
||||||
|
|
||||||
|
#. openerp-web
|
||||||
|
#: addons/web_mobile/static/src/xml/web_mobile.xml:36
|
||||||
|
msgid "Bad username or password"
|
||||||
|
msgstr "Грешно потребителско име или парола"
|
||||||
|
|
||||||
|
#. openerp-web
|
||||||
|
#: addons/web_mobile/static/src/xml/web_mobile.xml:42
|
||||||
|
msgid "Powered by openerp.com"
|
||||||
|
msgstr "Powered by openerp.com"
|
||||||
|
|
||||||
|
#. openerp-web
|
||||||
|
#: addons/web_mobile/static/src/xml/web_mobile.xml:49
|
||||||
|
msgid "Home"
|
||||||
|
msgstr "Начало"
|
||||||
|
|
||||||
|
#. openerp-web
|
||||||
|
#: addons/web_mobile/static/src/xml/web_mobile.xml:57
|
||||||
|
msgid "Favourite"
|
||||||
|
msgstr "Любими"
|
||||||
|
|
||||||
|
#. openerp-web
|
||||||
|
#: addons/web_mobile/static/src/xml/web_mobile.xml:58
|
||||||
|
msgid "Preference"
|
||||||
|
msgstr "Предпочитания"
|
||||||
|
|
||||||
|
#. openerp-web
|
||||||
|
#: addons/web_mobile/static/src/xml/web_mobile.xml:123
|
||||||
|
msgid "Logout"
|
||||||
|
msgstr "Изход"
|
||||||
|
|
||||||
|
#. openerp-web
|
||||||
|
#: addons/web_mobile/static/src/xml/web_mobile.xml:132
|
||||||
|
msgid "There are no records to show."
|
||||||
|
msgstr "Няма записи за показване."
|
||||||
|
|
||||||
|
#. openerp-web
|
||||||
|
#: addons/web_mobile/static/src/xml/web_mobile.xml:183
|
||||||
|
msgid "Open this resource"
|
||||||
|
msgstr "Отвори този ресурс"
|
||||||
|
|
||||||
|
#. openerp-web
|
||||||
|
#: addons/web_mobile/static/src/xml/web_mobile.xml:223
|
||||||
|
#: addons/web_mobile/static/src/xml/web_mobile.xml:226
|
||||||
|
msgid "Percent of tasks closed according to total of tasks to do..."
|
||||||
|
msgstr "Процент на приключените задачи съпоставен с общия брой задачи..."
|
||||||
|
|
||||||
|
#. openerp-web
|
||||||
|
#: addons/web_mobile/static/src/xml/web_mobile.xml:264
|
||||||
|
#: addons/web_mobile/static/src/xml/web_mobile.xml:268
|
||||||
|
msgid "On"
|
||||||
|
msgstr "Включено"
|
||||||
|
|
||||||
|
#. openerp-web
|
||||||
|
#: addons/web_mobile/static/src/xml/web_mobile.xml:265
|
||||||
|
#: addons/web_mobile/static/src/xml/web_mobile.xml:269
|
||||||
|
msgid "Off"
|
||||||
|
msgstr "Изключено"
|
||||||
|
|
||||||
|
#. openerp-web
|
||||||
|
#: addons/web_mobile/static/src/xml/web_mobile.xml:294
|
||||||
|
msgid "Form View"
|
||||||
|
msgstr ""
|
|
@ -260,7 +260,7 @@ openerp.web_process = function (instance) {
|
||||||
buttons : [
|
buttons : [
|
||||||
{text: _t("Cancel"), click: function() { $(this).dialog('destroy'); }},
|
{text: _t("Cancel"), click: function() { $(this).dialog('destroy'); }},
|
||||||
{text: _t("Save"), click: function() {
|
{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() {
|
form_view.do_save(function() {
|
||||||
self.initialize_process_view();
|
self.initialize_process_view();
|
||||||
|
|
Loading…
Reference in New Issue