[MERGE] Merged with web/trunk.

bzr revid: tde@openerp.com-20120702170010-x07duh86vejoup9u
This commit is contained in:
Thibault Delavallée 2012-07-02 19:00:10 +02:00
commit 864d011200
58 changed files with 2721 additions and 11059 deletions

View File

@ -15,7 +15,7 @@
"static/lib/datejs/parser.js",
"static/lib/datejs/sugarpak.js",
"static/lib/datejs/extras.js",
"static/lib/jquery/jquery-1.7.2b1.js",
"static/lib/jquery/jquery-1.7.2.js",
"static/lib/jquery.MD5/jquery.md5.js",
"static/lib/jquery.form/jquery.form.js",
"static/lib/jquery.validate/jquery.validate.js",
@ -57,6 +57,7 @@
"static/lib/jquery.ui.timepicker/css/jquery-ui-timepicker-addon.css",
"static/lib/jquery.ui.notify/css/ui.notify.css",
"static/lib/jquery.tipsy/tipsy.css",
"static/lib/jquery.textext/jquery.textext.css",
"static/src/css/base.css",
"static/src/css/data_export.css",
"static/src/css/data_import.css",

View File

@ -437,18 +437,21 @@ class Database(openerpweb.Controller):
@openerpweb.httprequest
def backup(self, req, backup_db, backup_pwd, token):
db_dump = base64.b64decode(
req.session.proxy("db").dump(backup_pwd, backup_db))
filename = "%(db)s_%(timestamp)s.dump" % {
'db': backup_db,
'timestamp': datetime.datetime.utcnow().strftime(
"%Y-%m-%d_%H-%M-%SZ")
}
return req.make_response(db_dump,
[('Content-Type', 'application/octet-stream; charset=binary'),
('Content-Disposition', 'attachment; filename="' + filename + '"')],
{'fileToken': int(token)}
)
try:
db_dump = base64.b64decode(
req.session.proxy("db").dump(backup_pwd, backup_db))
filename = "%(db)s_%(timestamp)s.dump" % {
'db': backup_db,
'timestamp': datetime.datetime.utcnow().strftime(
"%Y-%m-%d_%H-%M-%SZ")
}
return req.make_response(db_dump,
[('Content-Type', 'application/octet-stream; charset=binary'),
('Content-Disposition', 'attachment; filename="' + filename + '"')],
{'fileToken': int(token)}
)
except xmlrpclib.Fault, e:
return simplejson.dumps([[],[{'error': e.faultCode, 'title': 'backup Database'}]])
@openerpweb.httprequest
def restore(self, req, db_file, restore_pwd, new_db):
@ -1286,7 +1289,8 @@ class SearchView(View):
del filter['context']
del filter['domain']
return filters
@openerpweb.jsonrequest
def add_to_dashboard(self, req, menu_id, action_id, context_to_save, domain, view_mode, name=''):
to_eval = common.nonliterals.CompoundContext(context_to_save)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -2465,7 +2465,7 @@
target = $(e.target)
;
if(target.is(CSS_DOT_SUGGESTION) || target.is(CSS_DOT_LABEL))
if($(CSS_DOT_SUGGESTION).has(target[0]) || $(CSS_DOT_LABEL).has(target[0]))
self.trigger('enterKeyPress');
if (self.core().hasPlugin('tags'))
@ -4774,157 +4774,3 @@
return node;
};
})(jQuery);
;
(function(a){var b=document,c="getElementsByTagName",d=b[c]("head")[0]||b[c]("body")[0],e=b.createElement("style");e.innerHTML=a,d.appendChild(e)})('\n.text-core {\
position: relative;\
}\
.text-core .text-wrap {\
background: #fff;\
position: absolute;\
}\
.text-core .text-wrap textarea, .text-core .text-wrap input {\
-webkit-box-sizing: border-box;\
-moz-box-sizing: border-box;\
box-sizing: border-box;\
-webkit-border-radius: 3px;\
-moz-border-radius: 3px;\
border-radius: 3px;\
outline: none;\
resize: none;\
position: absolute;\
z-index: 1;\
background: none;\
overflow: hidden;\
margin: 0;\
padding: 3px 5px 4px 5px;\
white-space: nowrap;\
font: 11px "lucida grande", tahoma, verdana, arial, sans-serif;\
line-height: 13px;\
height: auto;\
}\
\n.text-core .text-wrap .text-arrow {\
-webkit-box-sizing: border-box;\
-moz-box-sizing: border-box;\
box-sizing: border-box;\
position: absolute;\
top: 0;\
right: 0;\
width: 22px;\
height: 22px;\
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAOAQMAAADHWqTrAAAAA3NCSVQICAjb4U/gAAAABlBMVEX///8yXJnt8Ns4AAAACXBIWXMAAAsSAAALEgHS3X78AAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1MzmNZGAwAAABpJREFUCJljYEAF/xsY6hkY7BgYZBgYOFBkADkdAmFDagYFAAAAAElFTkSuQmCC") 50% 50% no-repeat;\
cursor: pointer;\
z-index: 2;\
}\
\n.text-core .text-wrap .text-dropdown {\
-webkit-box-sizing: border-box;\
-moz-box-sizing: border-box;\
box-sizing: border-box;\
padding: 0;\
position: absolute;\
z-index: 3;\
background: #fff;\
border: 1px solid #9daccc;\
width: 100%;\
max-height: 100px;\
padding: 1px;\
font: 11px "lucida grande", tahoma, verdana, arial, sans-serif;\
display: none;\
overflow-x: hidden;\
overflow-y: auto;\
}\
.text-core .text-wrap .text-dropdown.text-position-below {\
margin-top: 1px;\
}\
.text-core .text-wrap .text-dropdown.text-position-above {\
margin-bottom: 1px;\
}\
.text-core .text-wrap .text-dropdown .text-list .text-suggestion {\
padding: 3px 5px;\
cursor: pointer;\
}\
.text-core .text-wrap .text-dropdown .text-list .text-suggestion em {\
font-style: normal;\
text-decoration: underline;\
}\
.text-core .text-wrap .text-dropdown .text-list .text-suggestion.text-selected {\
color: #fff;\
background: #6d84b4;\
}\
\n.text-core .text-wrap .text-focus {\
-webkit-box-shadow: 0px 0px 6px #6d84b4;\
-moz-box-shadow: 0px 0px 6px #6d84b4;\
box-shadow: 0px 0px 6px #6d84b4;\
position: absolute;\
width: 100%;\
height: 100%;\
display: none;\
}\
.text-core .text-wrap .text-focus.text-show-focus {\
display: block;\
}\
\n.text-core .text-wrap .text-prompt {\
-webkit-box-sizing: border-box;\
-moz-box-sizing: border-box;\
box-sizing: border-box;\
position: absolute;\
width: 100%;\
height: 100%;\
margin: 1px 0 0 2px;\
font: 11px "lucida grande", tahoma, verdana, arial, sans-serif;\
color: #c0c0c0;\
overflow: hidden;\
white-space: pre;\
}\
.text-core .text-wrap .text-prompt.text-hide-prompt {\
display: none;\
}\
\n.text-core .text-wrap .text-tags {\
-webkit-box-sizing: border-box;\
-moz-box-sizing: border-box;\
box-sizing: border-box;\
position: absolute;\
width: 100%;\
height: 100%;\
padding: 3px 35px 3px 3px;\
cursor: text;\
}\
.text-core .text-wrap .text-tags.text-tags-on-top {\
z-index: 2;\
}\
.text-core .text-wrap .text-tags .text-tag {\
float: left;\
}\
.text-core .text-wrap .text-tags .text-tag .text-button {\
-webkit-border-radius: 2px;\
-moz-border-radius: 2px;\
border-radius: 2px;\
-webkit-box-sizing: border-box;\
-moz-box-sizing: border-box;\
box-sizing: border-box;\
position: relative;\
float: left;\
border: 1px solid #9daccc;\
background: #e2e6f0;\
color: #000;\
padding: 0px 17px 0px 3px;\
margin: 0 2px 2px 0;\
cursor: pointer;\
height: 16px;\
font: 11px "lucida grande", tahoma, verdana, arial, sans-serif;\
}\
.text-core .text-wrap .text-tags .text-tag .text-button a.text-remove {\
position: absolute;\
right: 3px;\
top: 2px;\
display: block;\
width: 11px;\
height: 11px;\
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAhCAYAAAAPm1F2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAB50RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNS4xqx9I6wAAAQ5JREFUOI2dlD0WwiAQhCc8L6HHgAPoASwtSYvX8BrQxtIyveYA8RppLO1jE+LwE8lzms2yH8MCj1QoaBzH+VuUYNYMS213UlvDRamtUbXb5ZyPHuDoxwGgip3ipfvGuGzPz+vZ/coDONdzFuYCO6ramQQG0DJIE1oPBBvM6e9LqaS2FwD7FWwnVoIAsOc2Xn1jDlyd8pfPBRVOBHA8cc/3yCmQqt0jcY4LuTyAF3pOYS6wI48LAm4MUrx5JthgSQJAt5LtNgAUgEMBBIC3AL2xgo58dEPfhE9wygef89FtCeC49UwltR1pQrK2qr9vNr7uRTCBF3pOYS6wI4/zdQ8MUpxPI9hgSQL0Xyio/QBt54DzsHQx6gAAAABJRU5ErkJggg==") 0 0 no-repeat;\
}\
.text-core .text-wrap .text-tags .text-tag .text-button a.text-remove:hover {\
background-position: 0 -11px;\
}\
.text-core .text-wrap .text-tags .text-tag .text-button a.text-remove:active {\
background-position: 0 -22px;\
}\
');

View File

@ -1,6 +1,8 @@
/**
* Timeago is a jQuery plugin that makes it easy to support automatically
* updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago").
*
* Please note that the library has been slightly modified for i18n's sake.
*
* @name timeago
* @version 0.11.3
@ -49,7 +51,8 @@
years: "%d years",
wordSeparator: " ",
numbers: []
}
},
translator: null
},
inWords: function(distanceMillis) {
var $l = this.settings.strings;
@ -68,26 +71,36 @@
var days = hours / 24;
var years = days / 365;
function substitute(stringOrFunction, number) {
function convert(stringOrFunction, number) {
var string = $.isFunction(stringOrFunction) ? stringOrFunction(number, distanceMillis) : stringOrFunction;
var value = ($l.numbers && $l.numbers[number]) || number;
return string.replace(/%d/i, value);
// return the proper string and the numeric value that goes in it
return {'string': string, 'value': ($l.numbers && $l.numbers[number]) || number};
}
var words = seconds < 45 && substitute($l.seconds, Math.round(seconds)) ||
seconds < 90 && substitute($l.minute, 1) ||
minutes < 45 && substitute($l.minutes, Math.round(minutes)) ||
minutes < 90 && substitute($l.hour, 1) ||
hours < 24 && substitute($l.hours, Math.round(hours)) ||
hours < 42 && substitute($l.day, 1) ||
days < 30 && substitute($l.days, Math.round(days)) ||
days < 45 && substitute($l.month, 1) ||
days < 365 && substitute($l.months, Math.round(days / 30)) ||
years < 1.5 && substitute($l.year, 1) ||
substitute($l.years, Math.round(years));
var stringAndNumber = seconds < 45 && convert($l.seconds, Math.round(seconds)) ||
seconds < 90 && convert($l.minute, 1) ||
minutes < 45 && convert($l.minutes, Math.round(minutes)) ||
minutes < 90 && convert($l.hour, 1) ||
hours < 24 && convert($l.hours, Math.round(hours)) ||
hours < 42 && convert($l.day, 1) ||
days < 30 && convert($l.days, Math.round(days)) ||
days < 45 && convert($l.month, 1) ||
days < 365 && convert($l.months, Math.round(days / 30)) ||
years < 1.5 && convert($l.year, 1) ||
convert($l.years, Math.round(years));
var string = stringAndNumber.string;
var value = stringAndNumber.value;
var separator = $l.wordSeparator === undefined ? " " : $l.wordSeparator;
return $.trim([prefix, words, suffix].join(separator));
// compose and translate the final string
var fullString = $.trim([prefix, string, suffix].join(separator));
var translatedString = $t.settings.translator ?
$t.settings.translator(fullString) :
fullString;
return translatedString.replace(/%d/i, value);
},
parse: function(iso8601) {
var s = $.trim(iso8601);

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
/*!
* jQuery JavaScript Library v1.7.2b1
* jQuery JavaScript Library v1.7.2
* http://jquery.com/
*
* Copyright 2011, John Resig
@ -11,7 +11,7 @@
* Copyright 2011, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
*
* Date: Tue Jan 31 20:11:27 2012 -0500
* Date: Wed Mar 21 12:46:34 2012 -0700
*/
(function( window, undefined ) {
@ -210,7 +210,7 @@ jQuery.fn = jQuery.prototype = {
selector: "",
// The current version of jQuery being used
jquery: "1.7.2b1",
jquery: "1.7.2",
// The default length of a jQuery object is 0
length: 0,
@ -578,6 +578,9 @@ jQuery.extend({
// Cross-browser xml parsing
parseXML: function( data ) {
if ( typeof data !== "string" || !data ) {
return null;
}
var xml, tmp;
try {
if ( window.DOMParser ) { // Standard
@ -1362,7 +1365,6 @@ jQuery.support = (function() {
select,
opt,
input,
marginDiv,
fragment,
tds,
events,
@ -1449,6 +1451,9 @@ jQuery.support = (function() {
pixelMargin: true
};
// jQuery.boxModel DEPRECATED in 1.3, use jQuery.support.boxModel instead
jQuery.boxModel = support.boxModel = (document.compatMode === "CSS1Compat");
// Make sure checked status is properly cloned
input.checked = true;
support.noCloneChecked = input.cloneNode( true ).checked;
@ -1483,6 +1488,10 @@ jQuery.support = (function() {
support.radioValue = input.value === "t";
input.setAttribute("checked", "checked");
// #11217 - WebKit loses check when the name is after the checked attribute
input.setAttribute( "name", "t" );
div.appendChild( input );
fragment = document.createDocumentFragment();
fragment.appendChild( div.lastChild );
@ -1497,23 +1506,6 @@ jQuery.support = (function() {
fragment.removeChild( input );
fragment.appendChild( div );
div.innerHTML = "";
// Check if div with explicit width and no margin-right incorrectly
// gets computed margin-right based on width of container. For more
// info see bug #3333
// Fails in WebKit before Feb 2011 nightlies
// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
if ( window.getComputedStyle ) {
marginDiv = document.createElement( "div" );
marginDiv.style.width = "0";
marginDiv.style.marginRight = "0";
div.style.width = "2px";
div.appendChild( marginDiv );
support.reliableMarginRight =
( parseInt( ( window.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0;
}
// Technique from Juriy Zaytsev
// http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
// We only care about the case where non-standard event systems
@ -1539,12 +1531,13 @@ jQuery.support = (function() {
fragment.removeChild( div );
// Null elements to avoid leaks in IE
fragment = select = opt = marginDiv = div = input = null;
fragment = select = opt = div = input = null;
// Run tests that need a body at doc ready
jQuery(function() {
var container, outer, inner, table, td, offsetSupport,
conMarginTop, ptlm, vb, style, html,
marginDiv, conMarginTop, style, html, positionTopLeftWidthHeight,
paddingMarginBorderVisibility, paddingMarginBorder,
body = document.getElementsByTagName("body")[0];
if ( !body ) {
@ -1553,15 +1546,16 @@ jQuery.support = (function() {
}
conMarginTop = 1;
ptlm = "position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";
vb = "visibility:hidden;border:0;";
style = "style='" + ptlm + "border:5px solid #000;padding:0;'";
html = "<div " + style + "><div></div></div>" +
"<table " + style + " cellpadding='0' cellspacing='0'>" +
paddingMarginBorder = "padding:0;margin:0;border:";
positionTopLeftWidthHeight = "position:absolute;top:0;left:0;width:1px;height:1px;";
paddingMarginBorderVisibility = paddingMarginBorder + "0;visibility:hidden;";
style = "style='" + positionTopLeftWidthHeight + paddingMarginBorder + "5px solid #000;";
html = "<div " + style + "display:block;'><div style='" + paddingMarginBorder + "0;display:block;overflow:hidden;'></div></div>" +
"<table " + style + "' cellpadding='0' cellspacing='0'>" +
"<tr><td></td></tr></table>";
container = document.createElement("div");
container.style.cssText = vb + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px";
container.style.cssText = paddingMarginBorderVisibility + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px";
body.insertBefore( container, body.firstChild );
// Construct the test element
@ -1575,8 +1569,7 @@ jQuery.support = (function() {
// display:none (it is still safe to use offsets if a parent element is
// hidden; don safety goggles and see bug #4512 for more information).
// (only IE 8 fails this test)
div.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";
div.innerHTML = "<table><tr><td style='" + paddingMarginBorder + "0;display:none'></td><td>t</td></tr></table>";
tds = div.getElementsByTagName( "td" );
isSupported = ( tds[ 0 ].offsetHeight === 0 );
@ -1587,28 +1580,44 @@ jQuery.support = (function() {
// (IE <= 8 fail this test)
support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
// Figure out if the W3C box model works as expected
div.innerHTML = "";
div.style.width = div.style.paddingLeft = "1px";
jQuery.boxModel = support.boxModel = div.offsetWidth === 2;
// Check if div with explicit width and no margin-right incorrectly
// gets computed margin-right based on width of container. For more
// info see bug #3333
// Fails in WebKit before Feb 2011 nightlies
// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
if ( window.getComputedStyle ) {
div.innerHTML = "";
marginDiv = document.createElement( "div" );
marginDiv.style.width = "0";
marginDiv.style.marginRight = "0";
div.style.width = "2px";
div.appendChild( marginDiv );
support.reliableMarginRight =
( parseInt( ( window.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0;
}
if ( typeof div.style.zoom !== "undefined" ) {
// Check if natively block-level elements act like inline-block
// elements when setting their display to 'inline' and giving
// them layout
// (IE < 8 does this)
div.innerHTML = "";
div.style.width = div.style.padding = "1px";
div.style.border = 0;
div.style.overflow = "hidden";
div.style.display = "inline";
div.style.zoom = 1;
support.inlineBlockNeedsLayout = ( div.offsetWidth === 2 );
support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
// Check if elements with layout shrink-wrap their children
// (IE 6 does this)
div.style.display = "";
div.innerHTML = "<div style='width:4px;'></div>";
support.shrinkWrapBlocks = ( div.offsetWidth !== 2 );
div.style.display = "block";
div.style.overflow = "visible";
div.innerHTML = "<div style='width:5px;'></div>";
support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
}
div.style.cssText = ptlm + vb;
div.style.cssText = positionTopLeftWidthHeight + paddingMarginBorderVisibility;
div.innerHTML = html;
outer = div.firstChild;
@ -1643,7 +1652,7 @@ jQuery.support = (function() {
}
body.removeChild( container );
div = container = null;
marginDiv = div = container = null;
jQuery.extend( support, offsetSupport );
});
@ -1987,7 +1996,7 @@ function dataAttr( elem, key, data ) {
data = data === "true" ? true :
data === "false" ? false :
data === "null" ? null :
jQuery.isNumeric( data ) ? parseFloat( data ) :
jQuery.isNumeric( data ) ? +data :
rbrace.test( data ) ? jQuery.parseJSON( data ) :
data;
} catch( e ) {}
@ -2196,7 +2205,7 @@ jQuery.fn.extend({
}
}
resolve();
return defer.promise();
return defer.promise( object );
}
});
@ -2365,7 +2374,7 @@ jQuery.fn.extend({
if ( !arguments.length ) {
if ( elem ) {
hooks = jQuery.valHooks[ elem.nodeName.toLowerCase() ] || jQuery.valHooks[ elem.type ];
hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
return ret;
@ -2409,7 +2418,7 @@ jQuery.fn.extend({
});
}
hooks = jQuery.valHooks[ this.nodeName.toLowerCase() ] || jQuery.valHooks[ this.type ];
hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
// If set returns undefined, fall back to normal setting
if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
@ -2555,7 +2564,7 @@ jQuery.extend({
},
removeAttr: function( elem, value ) {
var propName, attrNames, name, l,
var propName, attrNames, name, l, isBool,
i = 0;
if ( value && elem.nodeType === 1 ) {
@ -2567,13 +2576,17 @@ jQuery.extend({
if ( name ) {
propName = jQuery.propFix[ name ] || name;
isBool = rboolean.test( name );
// See #9699 for explanation of this approach (setting first, then removal)
jQuery.attr( elem, name, "" );
// Do not do this for boolean attributes (see #10870)
if ( !isBool ) {
jQuery.attr( elem, name, "" );
}
elem.removeAttribute( getSetAttribute ? name : propName );
// Set corresponding property to false for boolean attributes
if ( rboolean.test( name ) && propName in elem ) {
if ( isBool && propName in elem ) {
elem[ propName ] = false;
}
}
@ -2727,7 +2740,8 @@ if ( !getSetAttribute ) {
fixSpecified = {
name: true,
id: true
id: true,
coords: true
};
// Use this for any attribute in IE6/7
@ -3246,6 +3260,7 @@ jQuery.event = {
delegateCount = handlers.delegateCount,
args = [].slice.call( arguments, 0 ),
run_all = !event.exclusive && !event.namespace,
special = jQuery.event.special[ event.type ] || {},
handlerQueue = [],
i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related;
@ -3253,6 +3268,11 @@ jQuery.event = {
args[0] = event;
event.delegateTarget = this;
// Call the preDispatch hook for the mapped type, and let it bail if desired
if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
return;
}
// Determine handlers that should run if there are delegated events
// Avoid non-left-click bubbling in Firefox (#3861)
if ( delegateCount && !(event.button && event.type === "click") ) {
@ -3262,7 +3282,7 @@ jQuery.event = {
jqcur.context = this.ownerDocument || this;
for ( cur = event.target; cur != this; cur = cur.parentNode || this ) {
// Don't process events on disabled elements (#6911, #8165)
if ( cur.disabled !== true ) {
selMatch = {};
@ -3322,6 +3342,11 @@ jQuery.event = {
}
}
// Call the postDispatch hook for the mapped type
if ( special.postDispatch ) {
special.postDispatch.call( this, event );
}
return event.result;
},
@ -3613,16 +3638,23 @@ if ( !jQuery.support.submitBubbles ) {
form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
if ( form && !form._submit_attached ) {
jQuery.event.add( form, "submit._submit", function( event ) {
// If form was submitted by the user, bubble the event up the tree
if ( this.parentNode && !event.isTrigger ) {
jQuery.event.simulate( "submit", this.parentNode, event, true );
}
event._submit_bubble = true;
});
form._submit_attached = true;
}
});
// return undefined since we don't need an event listener
},
postDispatch: function( event ) {
// If form was submitted by the user, bubble the event up the tree
if ( event._submit_bubble ) {
delete event._submit_bubble;
if ( this.parentNode && !event.isTrigger ) {
jQuery.event.simulate( "submit", this.parentNode, event, true );
}
}
},
teardown: function() {
// Only need this for delegated form submit events
@ -5565,7 +5597,7 @@ jQuery.each({
return jQuery.dir( elem, "previousSibling", until );
},
siblings: function( elem ) {
return jQuery.sibling( elem.parentNode.firstChild, elem );
return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
},
children: function( elem ) {
return jQuery.sibling( elem.firstChild );
@ -5709,7 +5741,7 @@ var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figca
rhtml = /<|&#?\w+;/,
rnoInnerhtml = /<(?:script|style)/i,
rnocache = /<(?:script|object|embed|option|style)/i,
rnoshimcache = new RegExp("<(?:" + nodeNames + ")", "i"),
rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
// checked="checked" or checked
rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
rscriptType = /\/(java|ecma)script/i,
@ -6036,6 +6068,8 @@ jQuery.fn.extend({
jQuery.each( scripts, function( i, elem ) {
if ( elem.src ) {
jQuery.ajax({
type: "GET",
global: false,
url: elem.src,
async: false,
dataType: "script"
@ -6141,12 +6175,16 @@ function cloneFixAttributes( src, dest ) {
// cloning other types of input fields
} else if ( nodeName === "input" || nodeName === "textarea" ) {
dest.defaultValue = src.defaultValue;
// IE blanks contents when cloning scripts
} else if ( nodeName === "script" && dest.text !== src.text ) {
dest.text = src.text;
}
// Event data gets referenced instead of copied if the expando
// gets copied too
dest.removeAttribute( jQuery.expando );
// Clear flags for bubbling special change/submit events, they must
// be reattached when the newly cloned events are first activated
dest.removeAttribute( "_submit_attached" );
@ -6275,7 +6313,7 @@ jQuery.extend({
destElements,
i,
// IE<=8 does not properly clone detached, unknown element nodes
clone = jQuery.support.html5Clone || !rnoshimcache.test( "<" + elem.nodeName ) ?
clone = jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ?
elem.cloneNode( true ) :
shimCloneNode( elem );
@ -6325,7 +6363,8 @@ jQuery.extend({
},
clean: function( elems, context, fragment, scripts ) {
var checkScriptType;
var checkScriptType, script, j,
ret = [];
context = context || document;
@ -6334,8 +6373,6 @@ jQuery.extend({
context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
}
var ret = [], j;
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
if ( typeof elem === "number" ) {
elem += "";
@ -6357,7 +6394,9 @@ jQuery.extend({
var tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(),
wrap = wrapMap[ tag ] || wrapMap._default,
depth = wrap[0],
div = context.createElement("div");
div = context.createElement("div"),
safeChildNodes = safeFragment.childNodes,
remove;
// Append wrapper element to unknown element safe doc fragment
if ( context === document ) {
@ -6402,6 +6441,21 @@ jQuery.extend({
}
elem = div.childNodes;
// Clear elements from DocumentFragment (safeFragment or otherwise)
// to avoid hoarding elements. Fixes #11356
if ( div ) {
div.parentNode.removeChild( div );
// Guard against -1 index exceptions in FF3.6
if ( safeChildNodes.length > 0 ) {
remove = safeChildNodes[ safeChildNodes.length - 1 ];
if ( remove && remove.parentNode ) {
remove.parentNode.removeChild( remove );
}
}
}
}
}
@ -6430,16 +6484,17 @@ jQuery.extend({
return !elem.type || rscriptType.test( elem.type );
};
for ( i = 0; ret[i]; i++ ) {
if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
script = ret[i];
if ( scripts && jQuery.nodeName( script, "script" ) && (!script.type || rscriptType.test( script.type )) ) {
scripts.push( script.parentNode ? script.parentNode.removeChild( script ) : script );
} else {
if ( ret[i].nodeType === 1 ) {
var jsTags = jQuery.grep( ret[i].getElementsByTagName( "script" ), checkScriptType );
if ( script.nodeType === 1 ) {
var jsTags = jQuery.grep( script.getElementsByTagName( "script" ), checkScriptType );
ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
}
fragment.appendChild( ret[i] );
fragment.appendChild( script );
}
}
}
@ -6659,7 +6714,7 @@ jQuery.extend({
}
});
// DEPRECATED, Use jQuery.css() instead
// DEPRECATED in 1.3, Use jQuery.css() instead
jQuery.curCSS = jQuery.css;
if ( document.defaultView && document.defaultView.getComputedStyle ) {
@ -7228,7 +7283,7 @@ jQuery.extend({
isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
global: true,
type: "GET",
contentType: "application/x-www-form-urlencoded",
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
processData: true,
async: true,
/*
@ -7927,8 +7982,7 @@ jQuery.ajaxSetup({
// Detect, normalize options and install callbacks for jsonp requests
jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
var inspectData = s.contentType === "application/x-www-form-urlencoded" &&
( typeof s.data === "string" );
var inspectData = ( typeof s.data === "string" ) && /^application\/x\-www\-form\-urlencoded/.test( s.contentType );
if ( s.dataTypes[ 0 ] === "jsonp" ||
s.jsonp !== false && ( jsre.test( s.url ) ||
@ -8229,7 +8283,13 @@ if ( jQuery.support.ajax ) {
if ( xml && xml.documentElement /* #4958 */ ) {
responses.xml = xml;
}
responses.text = xhr.responseText;
// When requesting binary data, IE6-9 will throw an exception
// on any attempt to access responseText (#11426)
try {
responses.text = xhr.responseText;
} catch( _ ) {
}
// Firefox throws an exception when accessing
// statusText for faulty cross-domain requests
@ -8456,7 +8516,7 @@ jQuery.fn.extend({
prop[ name ] = prop[ p ];
delete prop[ p ];
}
if ( ( hooks = jQuery.cssHooks[ name ] ) && "expand" in hooks ) {
replace = hooks.expand( prop[ name ] );
delete prop[ name ];
@ -8699,11 +8759,11 @@ jQuery.extend({
},
easing: {
linear: function( p, n, firstNum, diff ) {
return firstNum + diff * p;
linear: function( p ) {
return p;
},
swing: function( p, n, firstNum, diff ) {
return ( ( -Math.cos( p*Math.PI ) / 2 ) + 0.5 ) * diff + firstNum;
swing: function( p ) {
return ( -Math.cos( p*Math.PI ) / 2 ) + 0.5;
}
},
@ -8933,12 +8993,14 @@ jQuery.extend( jQuery.fx, {
}
});
// Adds width/height step functions
// Do not set anything below 0
jQuery.each([ "width", "height" ], function( i, prop ) {
jQuery.fx.step[ prop ] = function( fx ) {
jQuery.style( fx.elem, prop, Math.max(0, fx.now) + fx.unit );
};
// Ensure props that can't be negative don't go there on undershoot easing
jQuery.each( fxAttrs.concat.apply( [], fxAttrs ), function( i, prop ) {
// exclude marginTop, marginLeft, marginBottom and marginRight from this list
if ( prop.indexOf( "margin" ) ) {
jQuery.fx.step[ prop ] = function( fx ) {
jQuery.style( fx.elem, prop, Math.max(0, fx.now) + fx.unit );
};
}
});
if ( jQuery.expr && jQuery.expr.filters ) {
@ -8975,7 +9037,7 @@ function defaultDisplay( nodeName ) {
// document to it; WebKit & Firefox won't allow reusing the iframe document.
if ( !iframeDoc || !iframe.createElement ) {
iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document;
iframeDoc.write( ( document.compatMode === "CSS1Compat" ? "<!doctype html>" : "" ) + "<html><body>" );
iframeDoc.write( ( jQuery.support.boxModel ? "<!doctype html>" : "" ) + "<html><body>" );
iframeDoc.close();
}
@ -9279,7 +9341,7 @@ jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
// 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat
doc = elem.document;
docElemProp = doc.documentElement[ clientProp ];
return doc.compatMode === "CSS1Compat" && docElemProp ||
return jQuery.support.boxModel && docElemProp ||
doc.body && doc.body[ clientProp ] || docElemProp;
}
@ -9287,8 +9349,16 @@ jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
if ( elem.nodeType === 9 ) {
// Either scroll[Width/Height] or offset[Width/Height], whichever is greater
doc = elem.documentElement;
// when a window > document, IE6 reports a offset[Width/Height] > client[Width/Height]
// so we can't use max, as it'll choose the incorrect offset[Width/Height]
// instead we use the correct client[Width/Height]
// support:IE6
if ( doc[ clientProp ] >= doc[ scrollProp ] ) {
return doc[ clientProp ];
}
return Math.max(
doc[ clientProp ],
elem.body[ scrollProp ], doc[ scrollProp ],
elem.body[ offsetProp ], doc[ offsetProp ]
);

View File

@ -20,7 +20,7 @@
font-style: normal;
}
.openerp.openerp-web-client-container {
.openerp.openerp_webclient_container {
height: 100%;
position: relative;
}
@ -91,11 +91,12 @@
list-style-type: none;
}
.openerp input, .openerp textarea, .openerp select {
padding: 4px;
padding: 1px 4px;
border: 1px solid #cccccc;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
background: white;
}
.openerp img {
vertical-align: middle;
@ -185,6 +186,17 @@
.openerp .ui-menu .ui-menu-item a.ui-state-active {
background: #f0f0fa;
}
.openerp.ui-dialog {
border: 13px solid rgba(0, 0, 0, 0.3);
-moz-border-radius: 16px;
-webkit-border-radius: 16px;
border-radius: 16px;
-moz-background-clip: padding-box;
-webkit-background-clip: padding;
background-clip: padding-box;
box-shadow: 0px 0px 1px 1px rgba(0, 0, 0, 0.6);
-webkit-box-shadow: 0px 0px 1px 0px rgba(0, 0, 0, 0.2);
}
.openerp .oe_i {
font-family: "mnmliconsRegular" !important;
font-size: 21px;
@ -308,6 +320,38 @@
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
border: none;
}
.openerp .oe_button.oe_link {
border: none;
padding: 0;
margin: 0;
background: none;
-moz-border-radius: none;
-webkit-border-radius: none;
border-radius: none;
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
}
.openerp .oe_button.oe_link img {
display: none;
}
.openerp .oe_button.oe_link span {
border: none;
padding: 0;
margin: 0;
background: none;
-moz-border-radius: none;
-webkit-border-radius: none;
border-radius: none;
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
color: #8a89ba;
font-weight: bold;
}
.openerp .oe_button.oe_link span:hover {
text-decoration: underline;
}
.openerp.oe_tooltip {
font-size: 12px;
}
@ -746,6 +790,7 @@
border-top: 4px solid white;
}
.openerp .oe_topbar .oe_dropdown_menu {
top: 32px;
background: #333333;
background: rgba(37, 37, 37, 0.9);
border-color: #999999;
@ -1128,10 +1173,10 @@
.openerp .oe_view_manager .oe_view_manager_switch .oe_vm_switch_diagram:after {
content: "f";
}
.openerp .oe_view_manager_global {
.openerp .oe_view_manager_current, .openerp .oe_view_manager_inline {
height: 100%;
}
.openerp .oe_view_manager_global > .oe_view_manager_header {
.openerp .oe_view_manager_current > .oe_view_manager_header, .openerp .oe_view_manager_inline > .oe_view_manager_header {
border-top: 1px solid #cacaca;
border-bottom: 1px solid #cacaca;
background-color: #fcfcfc;
@ -1145,13 +1190,13 @@
-webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 9px rgba(0, 0, 0, 0.1);
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 9px rgba(0, 0, 0, 0.1);
}
.openerp .oe_view_manager_global > .oe_view_manager_header .oe_header_row td {
.openerp .oe_view_manager_current > .oe_view_manager_header .oe_header_row td, .openerp .oe_view_manager_inline > .oe_view_manager_header .oe_header_row td {
padding: 8px;
}
.openerp .oe_view_manager_global > .oe_view_manager_header .oe_header_row:first-child td {
.openerp .oe_view_manager_current > .oe_view_manager_header .oe_header_row:first-child td, .openerp .oe_view_manager_inline > .oe_view_manager_header .oe_header_row:first-child td {
padding-top: 8px;
}
.openerp .oe-select-create-popup-view-form > .oe_formview > .oe_form_pager {
.openerp .oe_popup_form > .oe_formview > .oe_form_pager {
display: none !important;
}
.openerp .oe_searchview {
@ -1440,6 +1485,10 @@
top: 0;
right: 5px;
}
.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_dashboard form {
display: none;
margin-top: 2px;
}
.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_advanced form {
display: none;
margin-top: 8px;
@ -1528,11 +1577,11 @@
background-color: #ff6666 !important;
border: 1px solid #dd0000 !important;
}
.openerp .oe_form_editable .oe_highlight {
.openerp .oe_view_manager_current .oe_form_editable .oe_highlight {
color: #404040;
background: none;
}
.openerp .oe_form_editable button.oe_highlight {
.openerp .oe_view_manager_current .oe_form_editable button.oe_highlight {
background-color: #efefef;
background-image: -webkit-gradient(linear, left top, left bottom, from(#efefef), to(#d8d8d8));
background-image: -webkit-linear-gradient(top, #efefef, #d8d8d8);
@ -1544,7 +1593,7 @@
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset;
}
.openerp .oe_form_editable button.oe_highlight:active {
.openerp .oe_view_manager_current .oe_form_editable button.oe_highlight:active {
background-color: #e3e3e3;
background-image: -webkit-gradient(linear, left top, left bottom, from(#e3e3e3), to(#f6f6f6));
background-image: -webkit-linear-gradient(top, #e3e3e3, #f6f6f6);
@ -1556,7 +1605,7 @@
-webkit-box-shadow: none;
box-shadow: none;
}
.openerp .oe_form_editable button.oe_highlight:hover {
.openerp .oe_view_manager_current .oe_form_editable button.oe_highlight:hover {
background-color: #f6f6f6;
background-image: -webkit-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3));
background-image: -webkit-linear-gradient(top, #f6f6f6, #e3e3e3);
@ -1926,7 +1975,7 @@
width: 45px;
height: 30px;
}
.openerp .oe_hidden_input_file input.oe-binary-file {
.openerp .oe_hidden_input_file input.oe_form_binary_file {
z-index: 0;
line-height: 0;
font-size: 12px;
@ -1967,7 +2016,7 @@
.openerp .oe_form_field_many2one td:first-child {
position: relative;
}
.openerp .oe_form_field_many2one span.oe-m2o-drop-down-button {
.openerp .oe_form_field_many2one span.oe_m2o_drop_down_button {
position: absolute;
top: 3px;
right: 2px;
@ -1975,8 +2024,11 @@
.openerp .oe_form .oe_form_field_one2many > .oe_view_manager .oe_list_pager_single_page {
display: none;
}
.openerp .oe_form_field_one2many .oe-listview .oe-edit-row-save {
background-image: url(/web/static/src/img/iconset-b-remove.png);
.openerp .oe_form_field_one2many .oe_list .oe_list_edit_row_save {
background: url(/web/static/src/img/iconset-b-remove.png) 50% 50% no-repeat;
}
.openerp .oe_form_field_one2many .oe_list .oe_list_edit_row_save:before {
visibility: hidden;
}
.openerp .oe_form_field_one2many > .oe_view_manager .oe_header_row_top {
display: none;
@ -1996,28 +2048,28 @@
height: auto;
line-height: 16px;
}
.openerp .oe_form .oe_form_field_many2many > .oe-listview .oe_list_pager_single_page {
.openerp .oe_form .oe_form_field_many2many > .oe_list .oe_list_pager_single_page {
display: none;
}
.openerp .oe-listview-content {
.openerp .oe_list_content {
width: 100%;
}
.openerp .oe-listview-content td:first-child:after, .openerp .oe-listview-content th:first-child:after {
.openerp .oe_list_content td:first-child:after, .openerp .oe_list_content th:first-child:after {
border-width: 0;
}
.openerp .oe-listview-content > thead {
.openerp .oe_list_content > thead {
border-bottom: 2px solid #cacaca;
background: #eeeeee;
vertical-align: top;
}
.openerp .oe-listview-content > thead th {
.openerp .oe_list_content > thead th {
position: relative;
}
.openerp .oe-listview-content td, .openerp .oe-listview-content th {
.openerp .oe_list_content td, .openerp .oe_list_content th {
padding: 3px 6px;
line-height: 18px;
}
.openerp .oe-listview-content th:after {
.openerp .oe_list_content th:after {
position: absolute;
right: 6px;
content: "";
@ -2027,12 +2079,12 @@
border-color: black transparent;
visibility: hidden;
}
.openerp .oe-listview-content th.sortup:after {
.openerp .oe_list_content th.sortup:after {
visibility: visible;
filter: alpha(opacity=60);
opacity: 0.6;
}
.openerp .oe-listview-content th.sortdown:after {
.openerp .oe_list_content th.sortdown:after {
border-bottom: none;
border-left: 4px solid transparent;
border-right: 4px solid transparent;
@ -2044,20 +2096,20 @@
filter: alpha(opacity=60);
opacity: 0.6;
}
.openerp .oe-listview-content > tbody {
.openerp .oe_list_content > tbody {
cursor: pointer;
background: white;
}
.openerp .oe-listview-content > tbody > tr {
.openerp .oe_list_content > tbody > tr {
border-top: 1px solid #dddddd;
}
.openerp .oe-listview-content > tbody > tr > td.oe-field-cell {
.openerp .oe_list_content > tbody > tr > td.oe_list_field_cell {
padding: 3px 6px;
}
.openerp .oe-listview-content > tbody > tr > td, .openerp .oe-listview-content > tbody > tr > th {
.openerp .oe_list_content > tbody > tr > td, .openerp .oe_list_content > tbody > tr > th {
line-height: 18px;
}
.openerp .oe-listview-content > tbody > tr > td > button, .openerp .oe-listview-content > tbody > tr > th > button {
.openerp .oe_list_content > tbody > tr > td > button, .openerp .oe_list_content > tbody > tr > th > button {
border: none;
background: transparent;
padding: 0;
@ -2065,16 +2117,16 @@
-webkit-box-shadow: none;
box-shadow: none;
}
.openerp .oe-listview-content > tbody > tr > td.oe_list_checkbox:first-child, .openerp .oe-listview-content > tbody > tr th.oe_list_checkbox:first-child {
.openerp .oe_list_content > tbody > tr > td.oe_list_checkbox:first-child, .openerp .oe_list_content > tbody > tr th.oe_list_checkbox:first-child {
width: 17px;
}
.openerp .oe-listview-content > tbody > tr > td.oe_list_checkbox:first-child:after, .openerp .oe-listview-content > tbody > tr th.oe_list_checkbox:first-child:after {
.openerp .oe_list_content > tbody > tr > td.oe_list_checkbox:first-child:after, .openerp .oe_list_content > tbody > tr th.oe_list_checkbox:first-child:after {
border-width: 0;
}
.openerp .oe-listview-content > tbody > tr > td.oe_number {
.openerp .oe_list_content > tbody > tr > td.oe_number {
text-align: right !important;
}
.openerp .oe-listview-content > tbody > tr:nth-child(odd) {
.openerp .oe_list_content > tbody > tr:nth-child(odd) {
background-color: #f0f0fa;
background-color: #f0f0fa;
background-image: -webkit-gradient(linear, left top, left bottom, from(#f0f0fa), to(#eeeef6));
@ -2084,13 +2136,13 @@
background-image: -o-linear-gradient(top, #f0f0fa, #eeeef6);
background-image: linear-gradient(to bottom, #f0f0fa, #eeeef6);
}
.openerp .oe-listview-content > tfoot {
.openerp .oe_list_content > tfoot {
border-top: 2px solid #cacaca;
border-bottom: 1px solid #cacaca;
background: #eeeeee;
font-weight: bold;
}
.openerp .oe-listview-content > tbody tr:hover td, .openerp .oe-listview-content tbody tr:hover th {
.openerp .oe_list_content > tbody tr:hover td, .openerp .oe_list_content tbody tr:hover th {
background-color: #eeeeee;
background-image: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), to(#dedede));
background-image: -webkit-linear-gradient(top, #eeeeee, #dedede);
@ -2099,13 +2151,16 @@
background-image: -o-linear-gradient(top, #eeeeee, #dedede);
background-image: linear-gradient(to bottom, #eeeeee, #dedede);
}
.openerp .oe-listview-content .numeric {
.openerp .oe_list_content .numeric {
text-align: right;
width: 82px;
}
.openerp .oe-listview-content .numeric input {
.openerp .oe_list_content .numeric input {
text-align: right;
}
.openerp .oe_list_content .oe_list_edit_row_save:before {
content: "S";
}
.openerp .oe_trad_field.touched {
border: 1px solid green !important;
}

View File

@ -27,6 +27,14 @@ $colour4: #8a89ba
font-weight: normal
font-style: normal
@mixin reset()
border: none
padding: 0
margin: 0
background: none
@include radius(none)
@include box-shadow(none)
@mixin vertical-gradient($startColor: #555, $endColor: #333)
background-color: $startColor
background-image: -webkit-gradient(linear, left top, left bottom, from($startColor), to($endColor)) /* Saf4+, Chrome */
@ -90,7 +98,7 @@ $colour4: #8a89ba
// }}}
.openerp.openerp-web-client-container
.openerp.openerp_webclient_container
height: 100%
position: relative
@ -135,9 +143,10 @@ $colour4: #8a89ba
li
list-style-type: none
input, textarea, select
padding: 4px
padding: 1px 4px
border: 1px solid #ccc
@include radius(3px)
background: white
img
vertical-align: middle
h4
@ -191,6 +200,14 @@ $colour4: #8a89ba
width: auto
a.ui-state-active
background: #f0f0fa
&.ui-dialog
border: 13px solid rgba(0, 0, 0, 0.3)
@include radius(16px)
-moz-background-clip: padding-box
-webkit-background-clip: padding
background-clip: padding-box
box-shadow: 0px 0px 1px 1px rgba(0, 0, 0, 0.6)
-webkit-box-shadow: 0px 0px 1px 0px rgba(0, 0, 0, 0.2)
// }}}
// Generic classes {{{
.oe_i
@ -260,6 +277,17 @@ $colour4: #8a89ba
@include radius(3px)
@include box-shadow(0 1px 3px rgba(0, 0, 0, 0.3))
border: none
.oe_button.oe_link
@include reset()
img
display: none
span
@include reset()
color: #8A89BA
font-weight: bold
&:hover
text-decoration: underline
//.oe_edit_only 
// }}}
// Tooltips {{{
@ -592,6 +620,7 @@ $colour4: #8a89ba
.oe_dropdown_arrow:after
border-top: 4px solid white
.oe_dropdown_menu
top: 32px
background: #333
background: rgba(37,37,37,0.9)
border-color: #999
@ -892,7 +921,7 @@ $colour4: #8a89ba
content: "f"
// }}}
// ViewManager application {{{
.oe_view_manager_global
.oe_view_manager_current, .oe_view_manager_inline
height: 100%
> .oe_view_manager_header
border-top: 1px solid #cacaca
@ -907,7 +936,7 @@ $colour4: #8a89ba
padding-top: 8px
// }}}
// Viewmanager popup {{{
.oe-select-create-popup-view-form > .oe_formview > .oe_form_pager
.oe_popup_form > .oe_formview > .oe_form_pager
display: none !important
// }}}
// SearchView {{{
@ -1130,6 +1159,11 @@ $colour4: #8a89ba
position: absolute
top: 0
right: 5px
.oe_searchview_dashboard
form
display: none
margin-top: 2px
.oe_searchview_advanced
form
display: none
@ -1215,7 +1249,7 @@ $colour4: #8a89ba
input, select, textarea
background-color: #F66 !important
border: 1px solid #D00 !important
.oe_form_editable
.oe_view_manager_current .oe_form_editable
.oe_highlight
color: #404040
background: none
@ -1514,7 +1548,7 @@ $colour4: #8a89ba
display: inline-block
width: 45px
height: 30px
input.oe-binary-file
input.oe_form_binary_file
z-index: 0
line-height: 0
font-size: 12px
@ -1552,7 +1586,7 @@ $colour4: #8a89ba
.oe_form_field_many2one
td:first-child
position: relative
span.oe-m2o-drop-down-button
span.oe_m2o_drop_down_button
position: absolute
top: 3px
right: 2px
@ -1563,8 +1597,10 @@ $colour4: #8a89ba
display: none
.oe_form_field_one2many
// TODO: oe_form_field_one2many_list?
.oe-listview .oe-edit-row-save
background-image: url(/web/static/src/img/iconset-b-remove.png)
.oe_list .oe_list_edit_row_save
background: url(/web/static/src/img/iconset-b-remove.png) 50% 50% no-repeat
&:before
visibility: hidden
&> .oe_view_manager
.oe_header_row_top
@ -1583,12 +1619,12 @@ $colour4: #8a89ba
line-height: 16px
// }}}
// FormView.many2many {{{
.oe_form .oe_form_field_many2many > .oe-listview
.oe_form .oe_form_field_many2many > .oe_list
.oe_list_pager_single_page
display: none
// }}}
// ListView {{{
.oe-listview-content
.oe_list_content
width: 100%
td:first-child, th:first-child
&:after
@ -1627,7 +1663,7 @@ $colour4: #8a89ba
background: white
> tr
border-top: 1px solid #ddd
> td.oe-field-cell
> td.oe_list_field_cell
padding: 3px 6px
> td, > th
line-height: 18px
@ -1659,6 +1695,8 @@ $colour4: #8a89ba
width: 82px
input
text-align: right
.oe_list_edit_row_save:before
content: "S"
// }}}
// Translation {{{
.oe_trad_field.touched

View File

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

View File

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

View File

@ -401,7 +401,14 @@ instance.web.DatabaseManager = instance.web.Widget.extend({
success: function () {
self.do_notify(_t("Backed"), _t("Database backed up successfully"));
},
error: instance.webclient.crashmanager.on_rpc_error,
error: function(error){
if(error){
self.display_error({
title: 'Backup Database',
error: 'AccessDenied'
});
}
},
complete: function() {
self.unblockUI();
}
@ -538,6 +545,7 @@ instance.web.Login = instance.web.Widget.extend({
do_login: function (db, login, password) {
var self = this;
this.$element.removeClass('oe_login_invalid');
self.$(".oe_login_pane").fadeOut("slow");
return this.session.session_authenticate(db, login, password).pipe(function() {
if (self.has_local_storage) {
if(self.remember_credentials) {
@ -552,9 +560,9 @@ instance.web.Login = instance.web.Widget.extend({
localStorage.setItem('last_password_login_success', '');
}
}
self.$(".oe_login_pane").fadeOut("slow");
self.trigger("login");
},function () {
self.$(".oe_login_pane").fadeIn("fast");
self.$element.addClass("oe_login_invalid");
});
}
@ -571,6 +579,7 @@ instance.web.Menu = instance.web.Widget.extend({
start: function() {
this._super.apply(this, arguments);
this.$secondary_menus = this.getParent().$element.find('.oe_secondary_menus_container');
this.$secondary_menus.on('click', 'a[data-menu]', this.on_menu_click);
return this.do_reload();
},
do_reload: function() {
@ -583,7 +592,6 @@ instance.web.Menu = instance.web.Widget.extend({
this.limit_entries();
this.$secondary_menus.html(QWeb.render("Menu.secondary", { widget : this }));
this.$element.on('click', 'a[data-menu]', this.on_menu_click);
this.$secondary_menus.on('click', 'a[data-menu]', this.on_menu_click);
// Hide second level submenus
this.$secondary_menus.find('.oe_menu_toggler').siblings('.oe_secondary_submenu').hide();
if (self.current_menu) {
@ -665,6 +673,7 @@ instance.web.Menu = instance.web.Widget.extend({
* Process a click on a menu item
*
* @param {Number} id the menu_id
* @param {Boolean} [needaction=false] whether the triggered action should execute in a `needs action` context
*/
menu_click: function(id, needaction) {
if (!id) { return; }
@ -703,8 +712,8 @@ instance.web.Menu = instance.web.Widget.extend({
* @param {Event} ev the jquery event
*/
on_menu_click: function(ev) {
var needaction = !!$(ev.target).filter('div.oe_menu_counter').length;
ev.preventDefault();
var needaction = $(ev.target).is('div.oe_menu_counter');
this.menu_click($(ev.currentTarget).data('menu'), needaction);
},
});
@ -860,12 +869,12 @@ instance.web.WebClient = instance.web.Widget.extend({
},
start: function() {
var self = this;
this.$element.addClass("openerp openerp-web-client-container");
this.$element.addClass("openerp openerp_webclient_container");
if (jQuery.param !== undefined && jQuery.deparam(jQuery.param.querystring()).kitten !== undefined) {
$("body").addClass("kitten-mode-activated");
self.$element.delegate('img.oe-record-edit-link-img', 'hover', function(e) {
self.$element.toggleClass('clark-gable');
});
if ($.blockUI) {
$.blockUI.defaults.message = '<img src="http://www.amigrave.com/kitten.gif">';
}
}
this.session.session_bind().then(function() {
self.destroy_content();

View File

@ -334,11 +334,14 @@ instance.web.Session = instance.web.JsonRPC.extend( /** @lends instance.web.Sess
.appendTo(document.body)
.load(function () {
try {
if (options.error) {
options.error(JSON.parse(
this.contentDocument.body.childNodes[1].textContent
));
}
if (options.error) {
if (!this.contentDocument.body.childNodes[1]) {
options.error(this.contentDocument.body.childNodes);
}
else {
options.error(JSON.parse(this.contentDocument.body.childNodes[1].textContent));
}
}
} finally {
complete();
}
@ -595,7 +598,7 @@ instance.web.qweb.preprocess_node = function() {
break;
case 1:
// Element
var attr, attrs = ['label', 'title', 'alt'];
var attr, attrs = ['label', 'title', 'alt', 'placeholder'];
while (attr = attrs.pop()) {
if (this.attributes[attr]) {
this.attributes[attr] = instance.web._t(this.attributes[attr]);
@ -605,15 +608,31 @@ instance.web.qweb.preprocess_node = function() {
};
/** Setup jQuery timeago */
var timeago_setup = function () {
var s = $.timeago.settings.strings;
_.each(s, function(v,k) {
if(_.isString(v)) {
s[k] = instance.web._t(v);
}
});
var _t = instance.web._t;
/*
* Strings in timeago are "composed" with prefixes, words and suffixes. This
* makes their detection by our translating system impossible. Use all literal
* strings we're using with a translation mark here so the extractor can do its
* job.
*/
{
_t('less than a minute ago');
_t('about a minute ago');
_t('%d minutes ago');
_t('about an hour ago');
_t('%d hours ago');
_t('a day ago');
_t('%d days ago');
_t('about a month ago');
_t('%d months ago');
_t('about a year ago');
_t('%d years ago');
}
instance.connection.on('module_loaded', this, timeago_setup);
instance.connection.on('module_loaded', this, function () {
// provide timeago.js with our own translator method
$.timeago.settings.translator = instance.web._t;
});
/**
* Registry for all the client actions key: tag value: widget

View File

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

View File

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

View File

@ -352,6 +352,11 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea
e.stopImmediatePropagation();
self.$element.toggleClass('oe_searchview_open_drawer');
});
instance.web.bus.on('click', this, function(ev) {
if ($(ev.target).parents('.oe_searchview').length === 0) {
self.$element.removeClass('oe_searchview_open_drawer');
}
});
// Focus last input if the view itself is clicked (empty section of
// facets element)
this.$element.on('click', function (e) {
@ -640,6 +645,8 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea
var drawer_started = $.when.apply(
null, _(this.select_for_drawer()).invoke(
'appendTo', this.$element.find('.oe_searchview_drawer')));
new instance.web.search.AddToDashboard(this).appendTo($('.oe_searchview_drawer', this.$element));
// load defaults
var defaults_fetched = $.when.apply(null, _(this.inputs).invoke(
@ -692,53 +699,6 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea
select.val('');
}
},
on_add_to_dashboard: function() {
this.$element.find(".oe_search-view-filters-management")[0].selectedIndex = 0;
var self = this,
menu = instance.webclient.menu,
$dialog = $(QWeb.render("SearchView.add_to_dashboard", {
dashboards : menu.data.data.children,
selected_menu_id : menu.$element.find('a.active').data('menu')
}));
$dialog.find('input').val(this.fields_view.name);
instance.web.dialog($dialog, {
modal: true,
title: _t("Add to Dashboard"),
buttons: [
{text: _t("Cancel"), click: function() {
$(this).dialog("close");
}},
{text: _t("OK"), click: function() {
$(this).dialog("close");
var menu_id = $(this).find("select").val(),
title = $(this).find("input").val(),
data = self.build_search_data(),
context = new instance.web.CompoundContext(),
domain = new instance.web.CompoundDomain();
_.each(data.contexts, function(x) {
context.add(x);
});
_.each(data.domains, function(x) {
domain.add(x);
});
self.rpc('/web/searchview/add_to_dashboard', {
menu_id: menu_id,
action_id: self.getParent().action.id,
context_to_save: context,
domain: domain,
view_mode: self.getParent().active_view,
name: title
}, function(r) {
if (r === false) {
self.do_warn("Could not add filter to dashboard");
} else {
self.do_notify("Filter added to dashboard", '');
}
});
}}
]
});
},
/**
* Extract search data from the view's facets.
*
@ -1234,7 +1194,7 @@ instance.web.search.Field = instance.web.search.Input.extend( /** @lends instanc
var self = this;
// A field needs a context to send when active
var context = this.attrs.context;
if (!context || !facet.values.length) {
if (_.isEmpty(context) || !facet.values.length) {
return;
}
var contexts = facet.values.map(function (facetValue) {
@ -1530,6 +1490,15 @@ instance.web.search.ManyToOneField = instance.web.search.CharField.extend({
return [[name, '=', facetValue.get('value')]];
}
return this._super(name, operator, facetValue);
},
get_context: function (facet) {
var values = facet.values;
if (_.isEmpty(this.attrs.context) && values.length === 1) {
var c = {};
c['default_' + this.attrs.name] = values.at(0).get('value');
return c;
}
return this._super(facet);
}
});
@ -1540,6 +1509,14 @@ instance.web.search.CustomFilters = instance.web.search.Input.extend({
var self = this;
this.model = new instance.web.Model('ir.filters');
this.filters = {};
this.view.query
.on('remove', function (facet) {
if (!facet.get('is_custom_filter')) {
return;
}
self.clear_selection();
})
.on('reset', this.proxy('clear_selection'));
this.$element.on('submit', 'form', this.proxy('save_current'));
this.$element.on('click', 'h4', function () {
self.$element.toggleClass('oe_opened');
@ -1549,6 +1526,9 @@ instance.web.search.CustomFilters = instance.web.search.Input.extend({
model: this.view.model
}).pipe(this.proxy('set_filters'));
},
clear_selection: function () {
this.$element.find('li.oe_selected').removeClass('oe_selected');
},
append_filter: function (filter) {
var self = this;
var key = _.str.sprintf('(%s)%s', filter.user_id, filter.name);
@ -1583,8 +1563,10 @@ instance.web.search.CustomFilters = instance.web.search.Input.extend({
get_groupby: function () { return [filter.context]; },
get_domain: function () { return filter.domain; }
},
is_custom_filter: true,
values: [{label: filter.name, value: null}]
}]);
$filter.addClass('oe_selected');
});
},
set_filters: function (filters) {
@ -1671,6 +1653,77 @@ instance.web.search.Filters = instance.web.search.Input.extend({
}));
}
});
instance.web.search.AddToDashboard = instance.web.Widget.extend({
template: 'SearchView.addtodashboard',
_in_drawer: true,
start: function () {
var self = this;
this.data_loaded = $.Deferred();
this.dashboard_data =[];
this.$element
.on('click', 'h4', this.proxy('show_option'))
.on('submit', 'form', function (e) {
e.preventDefault();
self.add_dashboard();
});
return $.when(this.load_data(),this.data_loaded).pipe(this.proxy("render_data"));
},
load_data:function(){
var self = this,dashboard_menu = instance.webclient.menu.data.data.children;
var ir_model_data = new instance.web.Model('ir.model.data',{},[['name','=','menu_reporting_dashboard']]).query(['res_id']);
var map_data = function(result){
_.detect(dashboard_menu, function(dash){
var id = _.pluck(dash.children, "id"),indexof = _.indexOf(id, result.res_id);
if(indexof !== -1){
self.dashboard_data = dash.children[indexof].children
self.data_loaded.resolve();
return;
}
});
};
return ir_model_data._execute().done(function(result){map_data(result[0])});
},
render_data: function(){
var self = this;
var selection = instance.web.qweb.render("SearchView.addtodashboard.selection",{selections:this.dashboard_data});
this.$element.find("input").before(selection)
},
add_dashboard:function(){
var self = this;
var getParent = this.getParent();
var view_parent = this.getParent().getParent();
if (! view_parent.action || ! this.$element.find("select").val())
return this.do_warn("Can't find dashboard action");
data = getParent.build_search_data(),
context = new instance.web.CompoundContext(getParent.dataset.get_context() || []),
domain = new instance.web.CompoundDomain(getParent.dataset.get_domain() || []);
_.each(data.contexts, function(x) {context.add(x);});
_.each(data.domains, function(x) {domain.add(x);});
this.rpc('/web/searchview/add_to_dashboard', {
menu_id: this.$element.find("select").val(),
action_id: view_parent.action.id,
context_to_save: context,
domain: domain,
view_mode: view_parent.active_view,
name: this.$element.find("input").val()
}, function(r) {
if (r === false) {
self.do_warn("Could not add filter to dashboard");
} else {
self.$element.toggleClass('oe_opened');
self.do_notify("Filter added to dashboard", '');
}
});
},
show_option:function(){
this.$element.toggleClass('oe_opened');
if (! this.$element.hasClass('oe_opened'))
return;
this.$element.find("input").val(this.getParent().fields_view.name || "" );
}
});
instance.web.search.Advanced = instance.web.search.Input.extend({
template: 'SearchView.advanced',
_in_drawer: true,

View File

@ -515,21 +515,18 @@ instance.web.ViewEditor = instance.web.OldWidget.extend({
}
},
do_node_add: function(side){
var self = this;
var self = this,property_to_check = [];
var tr = self.get_object_by_id(this.one_object.clicked_tr_id, this.one_object['main_object'], [])[0].att_list[0];
var parent_tr = ($(side).prevAll("tr[level=" + String(this.one_object.clicked_tr_level - 1) + "]"))[0];
var field_dataset = new instance.web.DataSetSearch(this, this.model, null, null);
parent_tr = $(parent_tr).find('a').text();
parent_tr = self.get_object_by_id(parseInt($(parent_tr).attr('id').replace(/[^0-9]+/g, '')), this.one_object['main_object'], [])[0].att_list[0];
_.each([tr, parent_tr],function(element) {
var value = _.has(_CHILDREN, element) ? element : _.str.include(html_tag, element)?"html_tag":false;
property_to_check.push(value);
});
field_dataset.call( 'fields_get', [], function(result) {
var fields = _.keys(result);
fields.push(" "),fields.sort();
var property_to_check = [];
_.each([tr, parent_tr],function(element) {
property_to_check.push(
_.detect(_.keys(_CHILDREN),function(res){
return _.str.include(element, res);
}));
});
self.on_add_node(property_to_check, fields);
});
},
@ -990,7 +987,7 @@ instance.web.ViewEditor = instance.web.OldWidget.extend({
render_new_field :function( result ) {
var self = this;
var action = {
context: {'default_model_id': result.id, 'manual': true, 'module' : result.modules},
context: {'default_model_id': result.id, 'manual': true, 'module' : result.model},
res_model: "ir.model.fields",
views: [[false, 'form']],
type: 'ir.actions.act_window',
@ -1168,8 +1165,16 @@ var _CHILDREN = {
'label': [],
'button' : [],
'newline': [],
'separator': []
'separator': [],
'sheet' :['group','field','notebook','label','separator','div','page'],
'kanban' : ['field'],
'html_tag':['notebook', 'group', 'field', 'label', 'button','board', 'newline', 'separator']
//e.g.:xyz 'td' : ['field']
};
// Generic html_tag list and can be added html tag in future. It's support above _CHILDREN dict's *html_tag* by default.
// For specific child node one has to define tag above and specify children tag in list. Like above xyz example.
var html_tag = ['div','h1','h2','h3','h4','h5','h6','td','tr'];
var _ICONS = ['','STOCK_ABOUT', 'STOCK_ADD', 'STOCK_APPLY', 'STOCK_BOLD',
'STOCK_CANCEL', 'STOCK_CDROM', 'STOCK_CLEAR', 'STOCK_CLOSE', 'STOCK_COLOR_PICKER',
'STOCK_CONNECT', 'STOCK_CONVERT', 'STOCK_COPY', 'STOCK_CUT', 'STOCK_DELETE',

View File

@ -322,9 +322,6 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
if (self.sidebar) {
self.sidebar.do_attachement_update(self.dataset, self.datarecord.id);
}
if (self.default_focus_field) {
self.default_focus_field.focus();
}
if (record.id) {
self.do_push_state({id:record.id});
}
@ -573,6 +570,16 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
_.each(this.fields,function(field){
field.set({"force_readonly": false});
});
var fields_order = self.fields_order.slice(0);
if (self.default_focus_field) {
fields_order.unshift(self.default_focus_field);
}
for (var i = 0; i < fields_order.length; i += 1) {
var field = self.fields[fields_order[i]];
if (!field.get('effective_invisible') && !field.get('effective_readonly') && field.focus() !== false) {
break;
}
}
}
},
on_button_save: function() {
@ -716,7 +723,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
var msg = "<ul>";
_.each(this.fields, function(f) {
if (!f.is_valid()) {
msg += "<li>" + (f.node.attrs.string || f.field.string) + "</li>";
msg += "<li>" + f.string + "</li>";
}
});
msg += "</ul>";
@ -860,7 +867,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
return {
name: name,
string: field.node.attrs.string || field.field.string,
string: field.string,
value: value,
displayed: displayed,
// convert undefined to false
@ -909,6 +916,9 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
register_field: function(field, name) {
this.fields[name] = field;
this.fields_order.push(name);
if (field.node.attrs.default_focus == '1') {
this.default_focus_field = field;
}
field.on('focused', null, this.proxy('widgetFocused'))
.on('blurred', null, this.proxy('widgetBlurred'));
@ -1513,7 +1523,9 @@ instance.web.form.FormWidget = instance.web.Widget.extend(instance.web.form.Invi
this._super.apply(this, arguments);
},
/**
* Sets up blur/focus forwarding from DOM elements to a widget (`this`)
* Sets up blur/focus forwarding from DOM elements to a widget (`this`).
*
* This method is an utility method that is meant to be called by child classes.
*
* @param {jQuery} $e jQuery object of elements to bind focus/blur on
*/
@ -1621,12 +1633,11 @@ instance.web.form.WidgetButton = instance.web.form.FormWidget.extend({
},
start: function() {
this._super.apply(this, arguments);
var $button = this.$element.find('button');
$button.click(this.on_click);
this.$element.click(this.on_click);
if (this.node.attrs.help || instance.connection.debug) {
this.do_attach_tooltip();
}
this.setupFocus($button);
this.setupFocus(this.$element);
},
on_click: function() {
var self = this;
@ -1763,7 +1774,7 @@ instance.web.form.FieldInterface = {
*/
is_syntax_valid: function() {},
/**
* Must set the focus on the field.
* Must set the focus on the field. Return false if field is not focusable.
*/
focus: function() {},
};
@ -1791,8 +1802,10 @@ instance.web.form.AbstractField = instance.web.form.FormWidget.extend(instance.w
this._super(field_manager, node);
this.field_manager = field_manager;
this.name = this.node.attrs.name;
this.set({'value': false});
this.field = this.field_manager.get_field(this.name);
this.widget = this.node.attrs.widget;
this.string = this.node.attrs.string || this.field.string || this.name;
this.set({'value': false});
this.set({required: this.modifiers['required'] === true});
// some events to make the property "effective_readonly" sync automatically with "readonly" and
@ -1864,7 +1877,7 @@ instance.web.form.AbstractField = instance.web.form.FormWidget.extend(instance.w
is_false: function() {
return this.get('value') === false;
},
_check_css_flags: function(show_invalid) {
_check_css_flags: function() {
if (this.field.translate) {
this.$element.find('.oe_field_translate').toggle(!this.field_manager.is_create_mode());
}
@ -2003,7 +2016,7 @@ instance.web.form.FieldEmail = instance.web.form.FieldChar.extend({
} else {
this.$element.find('a')
.attr('href', 'mailto:' + this.get('value'))
.text(this.get('value'));
.text(this.get('value') || '');
}
},
on_button_clicked: function() {
@ -2032,7 +2045,7 @@ instance.web.form.FieldUrl = instance.web.form.FieldChar.extend({
if (!s) {
tmp = "http://" + this.get('value');
}
this.$element.find('a').attr('href', tmp).text(tmp);
this.$element.find('a').attr('href', tmp).text(this.get('value') ? tmp : '');
}
},
on_button_clicked: function() {
@ -2475,15 +2488,16 @@ instance.web.form.CompletionFieldMixin = {
return this.orderer.add(dataset.name_search(
search_val, new instance.web.CompoundDomain(self.build_domain(), [["id", "not in", blacklist]]),
'ilike', this.limit + 1)).pipe(function(data) {
'ilike', this.limit + 1, self.build_context())).pipe(function(data) {
self.last_search = data;
// possible selections for the m2o
var values = _.map(data, function(x) {
x[1] = x[1].split("\n")[0];
return {
label: _.str.escapeHTML(x[1]),
value:x[1],
name:x[1],
id:x[0]
value: x[1],
name: x[1],
id: x[0],
};
});
@ -2539,7 +2553,7 @@ instance.web.form.CompletionFieldMixin = {
pop.select_element(
self.field.relation,
{
title: (view === 'search' ? _t("Search: ") : _t("Create: ")) + (this.string || this.name),
title: (view === 'search' ? _t("Search: ") : _t("Create: ")) + this.string,
initial_ids: ids ? _.map(ids, function(x) {return x[0]}) : undefined,
initial_view: view,
disable_multiple_selection: true
@ -2594,8 +2608,8 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
fade: true,
});
this.$drop_down = this.$element.find(".oe-m2o-drop-down-button");
this.$follow_button = $(".oe-m2o-cm-button", this.$element);
this.$drop_down = this.$element.find(".oe_m2o_drop_down_button");
this.$follow_button = $(".oe_m2o_cm_button", this.$element);
this.$follow_button.click(function() {
if (!self.get('value')) {
@ -2608,7 +2622,7 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
self.get("value"),
self.build_context(),
{
title: _t("Open: ") + (self.string || self.name)
title: _t("Open: ") + self.string
}
);
pop.on_write_completed.add_last(function() {
@ -2737,7 +2751,7 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
return;
}
if (! no_recurse) {
var dataset = new instance.web.DataSetStatic(this, this.field.relation, self.view.dataset.get_context());
var dataset = new instance.web.DataSetStatic(this, this.field.relation, self.build_context());
dataset.name_get([self.get("value")], function(data) {
self.display_value["" + self.get("value")] = data[0][1];
self.render_value(true);
@ -2747,11 +2761,12 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
display_string: function(str) {
var self = this;
if (!this.get("effective_readonly")) {
this.$input.val(str);
this.$input.val(str.split("\n")[0]);
} else {
str = _.escape(str).split("\n").join("<br />");
this.$element.find('a')
.unbind('click')
.text(str)
.html(str)
.click(function () {
self.do_action({
type: 'ir.actions.act_window',
@ -2769,7 +2784,9 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
var self = this;
if (value_ instanceof Array) {
this.display_value = {};
this.display_value["" + value_[0]] = value_[1];
if (! this.get_definition_options().always_reload) {
this.display_value["" + value_[0]] = value_[1];
}
value_ = value_[0];
}
value_ = value_ || false;
@ -2903,25 +2920,36 @@ instance.web.form.FieldOne2Many = instance.web.form.AbstractField.extend({
view.embedded_view = self.field.views[mode];
}
if(view.view_type === "list") {
view.options.selectable = self.multi_selection;
view.options.sortable = false;
_.extend(view.options, {
selectable: self.multi_selection,
sortable: false,
import_enabled: false,
});
if (self.get("effective_readonly")) {
view.options.addable = null;
view.options.deletable = null;
view.options.reorderable = false;
_.extend(view.options, {
addable: null,
deletable: null,
reorderable: false,
});
}
} else if (view.view_type === "form") {
if (self.get("effective_readonly")) {
view.view_type = 'form';
}
view.options.not_interactible_on_create = true;
_.extend(view.options, {
not_interactible_on_create: true,
});
} else if (view.view_type === "kanban") {
view.options.confirm_on_delete = false;
_.extend(view.options, {
confirm_on_delete: false,
});
if (self.get("effective_readonly")) {
view.options.action_buttons = false;
view.options.quick_creatable = false;
view.options.creatable = false;
view.options.read_only_mode = true;
_.extend(view.options, {
action_buttons: false,
quick_creatable: false,
creatable: false,
read_only_mode: true,
});
}
}
views.push(view);
@ -3134,7 +3162,7 @@ instance.web.form.One2ManyViewManager = instance.web.ViewManager.extend({
var id = self.o2m.dataset.index !== null ? self.o2m.dataset.ids[self.o2m.dataset.index] : null;
var pop = new instance.web.form.FormOpenPopup(self.o2m.view);
pop.show_element(self.o2m.field.relation, id, self.o2m.build_context(), {
title: _t("Open: ") + self.name,
title: _t("Open: ") + self.o2m.string,
create_function: function(data) {
return self.o2m.dataset.create(data).then(function(r) {
self.o2m.dataset.set_ids(self.o2m.dataset.ids.concat([r.result]));
@ -3191,7 +3219,7 @@ instance.web.form.One2ManyListView = instance.web.ListView.extend({
// Otherwise validate internal form
return _(form.fields).chain()
.invoke(function () {
this._check_css_flag();
this._check_css_flags();
return this.is_valid();
})
.all(_.identity)
@ -3219,7 +3247,7 @@ instance.web.form.One2ManyListView = instance.web.ListView.extend({
pop.select_element(
self.o2m.field.relation,
{
title: _t("Create: ") + self.name,
title: _t("Create: ") + self.o2m.string,
initial_view: "form",
alternative_form_view: self.o2m.field.views ? self.o2m.field.views["form"] : undefined,
create_function: function(data, callback, error_callback) {
@ -3247,7 +3275,7 @@ instance.web.form.One2ManyListView = instance.web.ListView.extend({
var self = this;
var pop = new instance.web.form.FormOpenPopup(self.o2m.view);
pop.show_element(self.o2m.field.relation, id, self.o2m.build_context(), {
title: _t("Open: ") + self.name,
title: _t("Open: ") + self.o2m.string,
write_function: function(id, data) {
return self.o2m.dataset.write(id, data, {}, function(r) {
self.o2m.reload_current_view();
@ -3281,8 +3309,8 @@ instance.web.form.One2ManyList = instance.web.ListView.List.extend({
return this._super.apply(this, arguments).then(function () {
// Replace the "Save Row" button with "Cancel Edition"
self.edition_form.$element
.undelegate('button.oe-edit-row-save', 'click')
.delegate('button.oe-edit-row-save', 'click', function () {
.undelegate('button.oe_list_edit_row_save', 'click')
.delegate('button.oe_list_edit_row_save', 'click', function () {
self.cancel_pending_edition();
});
@ -3531,6 +3559,7 @@ instance.web.form.FieldMany2Many = instance.web.form.AbstractField.extend({
'selectable': self.multi_selection,
'sortable': false,
'reorderable': false,
'import_enabled': false,
});
var embedded = (this.field.views || {}).tree;
if (embedded) {
@ -3575,7 +3604,7 @@ instance.web.form.Many2ManyListView = instance.web.ListView.extend(/** @lends in
pop.select_element(
this.model,
{
title: _t("Add: ") + this.name
title: _t("Add: ") + this.m2m_field.string
},
new instance.web.CompoundDomain(this.m2m_field.build_domain(), ["!", ["id", "in", this.m2m_field.dataset.ids]]),
this.m2m_field.build_context()
@ -3595,7 +3624,7 @@ instance.web.form.Many2ManyListView = instance.web.ListView.extend(/** @lends in
var self = this;
var pop = new instance.web.form.FormOpenPopup(this);
pop.show_element(this.dataset.model, id, this.m2m_field.build_context(), {
title: _t("Open: ") + this.name,
title: _t("Open: ") + this.m2m_field.string,
readonly: this.getParent().get("effective_readonly")
});
pop.on_write_completed.add_last(function() {
@ -3693,7 +3722,7 @@ instance.web.form.FieldMany2ManyKanban = instance.web.form.AbstractField.extend(
pop.select_element(
this.field.relation,
{
title: _t("Add: ") + this.name
title: _t("Add: ") + this.string
},
new instance.web.CompoundDomain(this.build_domain(), ["!", ["id", "in", this.dataset.ids]]),
this.build_context()
@ -3711,7 +3740,7 @@ instance.web.form.FieldMany2ManyKanban = instance.web.form.AbstractField.extend(
var id = self.dataset.ids[self.dataset.index];
var pop = new instance.web.form.FormOpenPopup(self.view);
pop.show_element(self.field.relation, id, self.build_context(), {
title: _t("Open: ") + self.name,
title: _t("Open: ") + self.string,
write_function: function(id, data, options) {
return self.dataset.write(id, data, {}).then(function() {
self.reload_content();
@ -3882,7 +3911,7 @@ instance.web.form.AbstractFormPopup = instance.web.OldWidget.extend({
if (this.options.alternative_form_view) {
this.view_form.set_embedded_view(this.options.alternative_form_view);
}
this.view_form.appendTo(this.$element.find(".oe-form-view-popup-form-placeholder"));
this.view_form.appendTo(this.$element.find(".oe_popup_form"));
this.view_form.on_loaded.add_last(function() {
var $buttons = self.view_form.$element.find(".oe_form_buttons");
var multi_select = self.row_id === null && ! self.options.disable_multiple_selection;
@ -4011,9 +4040,10 @@ instance.web.form.SelectCreatePopup = instance.web.form.AbstractFormPopup.extend
_.extend({'deletable': false,
'selectable': !self.options.disable_multiple_selection,
'read_only': true,
'import_enabled': false,
}, self.options.list_view_options || {}));
self.view_list.popup = self;
self.view_list.appendTo($(".oe-select-create-popup-view-list", self.$element)).pipe(function() {
self.view_list.appendTo($(".oe_popup_list", self.$element)).pipe(function() {
self.view_list.do_show();
}).pipe(function() {
self.searchview.do_search();
@ -4035,7 +4065,7 @@ instance.web.form.SelectCreatePopup = instance.web.form.AbstractFormPopup.extend
});
});
});
this.searchview.appendTo($(".oe-select-create-popup-view-list", self.$element));
this.searchview.appendTo($(".oe_popup_list", self.$element));
},
do_search: function(domains, contexts, groupbys) {
var self = this;
@ -4197,9 +4227,9 @@ instance.web.form.FieldBinary = instance.web.form.AbstractField.extend(instance.
this._super.apply(this, arguments);
},
initialize_content: function() {
this.$element.find('input.oe-binary-file').change(this.on_file_change);
this.$element.find('button.oe_binary_file_save').click(this.on_save_as);
this.$element.find('.oe-binary-file-clear').click(this.on_clear);
this.$element.find('input.oe_form_binary_file').change(this.on_file_change);
this.$element.find('button.oe_form_binary_file_save').click(this.on_save_as);
this.$element.find('.oe_form_binary_file_clear').click(this.on_clear);
},
human_filesize : function(size) {
var units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
@ -4216,10 +4246,10 @@ instance.web.form.FieldBinary = instance.web.form.AbstractField.extend(instance.
// http://deepliquid.com/projects/Jcrop/demos.php?demo=handler
if ($(e.target).val() !== '') {
this.$element.find('form.oe-binary-form input[name=session_id]').val(this.session.session_id);
this.$element.find('form.oe-binary-form').submit();
this.$element.find('.oe-binary-progress').show();
this.$element.find('.oe-binary').hide();
this.$element.find('form.oe_form_binary_form input[name=session_id]').val(this.session.session_id);
this.$element.find('form.oe_form_binary_form').submit();
this.$element.find('.oe_form_binary_progress').show();
this.$element.find('.oe_form_binary').hide();
}
},
on_file_uploaded: function(size, name, content_type, file_base64) {
@ -4231,8 +4261,8 @@ instance.web.form.FieldBinary = instance.web.form.AbstractField.extend(instance.
this.filename = name;
this.on_file_uploaded_and_valid.apply(this, arguments);
}
this.$element.find('.oe-binary-progress').hide();
this.$element.find('.oe-binary').show();
this.$element.find('.oe_form_binary_progress').hide();
this.$element.find('.oe_form_binary').show();
},
on_file_uploaded_and_valid: function(size, name, content_type, file_base64) {
},
@ -4242,7 +4272,7 @@ instance.web.form.FieldBinary = instance.web.form.AbstractField.extend(instance.
this.do_warn(_t("Save As..."), _t("The field is empty, there's nothing to save !"));
ev.stopPropagation();
} else if (this._dirty_flag) {
var link = this.$('.oe_binary_file_save_data')[0];
var link = this.$('.oe_form_binary_file_save_data')[0];
link.download = this.filename || "download.bin"; // Works on only on Google Chrome
//link.target = '_blank';
link.href = "data:application/octet-stream;base64," + value;
@ -4371,10 +4401,13 @@ instance.web.form.FieldBinaryImage = instance.web.form.FieldBinary.extend({
});
instance.web.form.FieldStatus = instance.web.form.AbstractField.extend({
tagName: "span",
template: "FieldStatus",
start: function() {
this._super();
this.selected_value = null;
if (this.$element.parent().is('header')) {
this.$element.after('<div class="oe_clear"/>');
}
// preview in start only for selection fields, because of the dynamic behavior of many2one fields.
if (this.field.type in ['selection']) {
this.render_list();
@ -4486,6 +4519,9 @@ instance.web.form.FieldStatus = instance.web.form.AbstractField.extend({
elem.css("color", color);
}
},
focus: function() {
return false;
},
});
/**

View File

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

View File

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

View File

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

View File

@ -136,7 +136,7 @@ instance.web.ActionManager = instance.web.Widget.extend({
};
}
if (action.target === 'new') {
if (this.dialog == null) {
if (this.dialog === null) {
this.dialog = new instance.web.Dialog(this, { width: '80%' });
if(on_close)
this.dialog.on_close.add(on_close);
@ -146,6 +146,7 @@ instance.web.ActionManager = instance.web.Widget.extend({
this.dialog.dialog_title = action.name;
this.dialog_viewmanager = new instance.web.ViewManagerAction(this, action);
this.dialog_viewmanager.appendTo(this.dialog.$element);
this.dialog_viewmanager.$element.addClass("oe_view_manager_" + action.target);
this.dialog.open();
} else {
this.dialog_stop();
@ -158,7 +159,7 @@ instance.web.ActionManager = instance.web.Widget.extend({
this.inner_action = action;
this.inner_viewmanager = new instance.web.ViewManagerAction(this, action);
this.inner_viewmanager.appendTo(this.$element);
this.inner_viewmanager.$element.addClass("oe_view_manager_global");
this.inner_viewmanager.$element.addClass("oe_view_manager_" + action.target);
}
},
ir_actions_act_window_close: function (action, on_closed) {
@ -862,13 +863,13 @@ instance.web.Sidebar = instance.web.Widget.extend({
});
self.items['files'] = attachments;
self.redraw();
this.$('.oe_sidebar_add_attachment .oe-binary-file').change(this.on_attachment_changed);
this.$('.oe_sidebar_add_attachment .oe_form_binary_file').change(this.on_attachment_changed);
this.$element.find('.oe_sidebar_delete_item').click(this.on_attachment_delete);
},
on_attachment_changed: function(e) {
var $e = $(e.target);
if ($e.val() !== '') {
this.$element.find('form.oe-binary-form').submit();
this.$element.find('form.oe_form_binary_form').submit();
$e.parent().find('input[type=file]').prop('disabled', true);
$e.parent().find('button').prop('disabled', true).find('img, span').toggle();
this.$('.oe_sidebar_add_attachment span').text(_t('Uploading...'));

View File

@ -27,9 +27,9 @@
</t>
<t t-name="CrashManager.warning">
<table cellspacing="0" cellpadding="0" border="0" class="oe-dialog-warning">
<table cellspacing="0" cellpadding="0" border="0" class="oe_dialog_warning">
<tr>
<td><img t-att-src='_s + "/web/static/src/img/warning.png"' class="oe-dialog-icon"/></td>
<td><img t-att-src='_s + "/web/static/src/img/warning.png"' class="oe_dialog_icon"/></td>
<td>
<p>
<t t-js="d">
@ -537,7 +537,7 @@
<t t-name="TreeView">
<select t-if="toolbar" style="width: 30%">
</select>
<table class="oe-treeview-table">
<table class="oe_tree_table">
<thead>
<tr>
<th t-foreach="fields_view" t-as="field"
@ -557,7 +557,7 @@
t-att-data-id="record.id" t-att-data-level="level + 1">
<t t-set="children" t-value="record[children_field]"/>
<t t-set="class" t-value="children and children.length ? 'treeview-tr' : 'treeview-td'"/>
<t t-set="rank" t-value="'oe-treeview-first'"/>
<t t-set="rank" t-value="'oe_tree_first'"/>
<t t-set="style" t-value="'background-position: ' + 19*level + 'px; padding-left: ' + 19*level + 'px;'"/>
<td t-foreach="fields_view" t-as="field"
@ -576,7 +576,7 @@
</td>
</tr>
<table t-name="ListView" class="oe-listview-content">
<table t-name="ListView" class="oe_list_content">
<t t-set="columns_count" t-value="visible_columns.length + (options.selectable ? 1 : 0) + (options.deletable ? 1 : 0)"/>
<thead>
<tr t-if="(!!options.action_buttons and !options.$buttons) or (!!options.pager and !options.$pager)">
@ -586,18 +586,18 @@
<div class="oe_list_pager"/>
</th>
</tr>
<tr t-if="options.header" class="oe-listview-header-columns">
<tr t-if="options.header" class="oe_list_header_columns">
<t t-foreach="columns" t-as="column">
<th t-if="column.meta">
<t t-esc="column.string"/>
</th>
</t>
<th t-if="options.selectable" width="1" >
<input type="checkbox" class="all-record-selector"/>
<input type="checkbox" class="oe_list_record_selector"/>
</th>
<t t-foreach="columns" t-as="column">
<th t-if="!column.meta and column.invisible !== '1'" t-att-data-id="column.id"
t-att-class="((options.sortable and column.tag !== 'button') ? 'oe-sortable' : null)">
t-att-class="((options.sortable and column.tag !== 'button') ? 'oe_sortable' : null)">
<t t-if="column.tag !== 'button'"><t t-esc="column.string"/></t>
</th>
</t>
@ -607,7 +607,7 @@
<tfoot>
<tr>
<td t-if="options.selectable"/>
<td t-foreach="aggregate_columns" t-as="column" class="oe-list-footer oe_number"
<td t-foreach="aggregate_columns" t-as="column" class="oe_list_footer oe_number"
t-att-data-field="column.id" t-att-title="column.label">
</td>
<td t-if="options.deletable"/>
@ -619,13 +619,15 @@
<button type="button" class="oe_button oe_list_add oe_highlight">
<t t-esc="widget.options.addable"/>
</button>
<span class="oe_fade">or</span> <a href="#" class="oe_bold oe_list_button_import">Import</a>
<t t-if="widget.options.import_enabled">
<span class="oe_fade">or</span> <a href="#" class="oe_bold oe_list_button_import">Import</a>
</t>
</t>
</div>
<t t-name="ListView.pager">
<div class="oe_list_pager" t-att-colspan="widget.columns_count">
<t t-if="!widget.no_leaf and widget.options.pager !== false" t-call="ViewPager">
<span class="oe-pager-state">
<span class="oe_list_pager_state">
</span>
</t>
</div>
@ -644,7 +646,7 @@
</td>
</t>
<th t-if="options.selectable" class="oe-record-selector" width="1">
<th t-if="options.selectable" class="oe_list_record_selector" width="1">
<t t-set="checked" t-value="options.select_view_id == record.get('id') ? 'checked' : null"/>
<input t-if="options.radio" type="radio" name="radiogroup" t-att-checked="checked"/>
<input t-if="!options.radio" type="checkbox" name="radiogroup" t-att-checked="checked"/>
@ -652,20 +654,20 @@
<t t-foreach="columns" t-as="column">
<t t-set="align" t-value="column.type === 'integer' or column.type == 'float'"/>
<td t-if="!column.meta and column.invisible !== '1'" t-att-title="column.help"
t-att-class="'oe-field-cell' + (align ? ' oe_number' : '')
+ (column.tag === 'button' ? ' oe-button' : '')"
t-att-class="'oe_list_field_cell' + (align ? ' oe_number' : '')
+ (column.tag === 'button' ? ' oe_button' : '')"
t-att-data-field="column.id">
<t t-raw="render_cell(record, column)"/>
</td>
</t>
<td t-if="options.deletable" class='oe-record-delete' width="1">
<td t-if="options.deletable" class='oe_list_record_delete' width="1">
<button type="button" name="delete" class="oe_i">d</button>
</td>
</tr>
<t t-name="ListView.row.save">
<td>
<button class='oe_i oe-edit-row-save' type='button' name='save'>S</button>
<button class='oe_i oe_list_edit_row_save' type='button' name='save'/>
</td>
</t>
@ -684,7 +686,7 @@
<button type="button" class="oe_button oe_form_button_create">Create</button>
</span>
<span class="oe_form_buttons_edit">
<button type="button" class="oe_button oe_form_button_save oe_highlight_on_dirty">Save</button> <span class="oe_fade">or</span> <a href="#" class="oe_bold oe_form_button_cancel">Discard</a>
<button type="button" class="oe_button oe_form_button_save oe_highlight">Save</button> <span class="oe_fade">or</span> <a href="#" class="oe_bold oe_form_button_cancel">Discard</a>
</span>
</t>
</div>
@ -874,7 +876,7 @@
</t>
<t t-name="FieldEmail">
<span class="oe_form_field oe_form_field_email oe_form_field_with_button">
<a t-if="widget.get('effective_readonly')" href="#" class="oe_form_uri"/>
<a t-if="widget.get('effective_readonly')" href="#" class="oe_form_uri" target="_blank"/>
<t t-if="!widget.get('effective_readonly')">
<div>
<input type="text"
@ -904,7 +906,7 @@
class="field_text"
t-att-tabindex="widget.node.attrs.tabindex"
t-att-autofocus="widget.node.attrs.autofocus"
t-att-placeholder="widget.node.attrs.placeholder"
t-att-placeholder="! widget.get('effective_readonly') ? widget.node.attrs.placeholder : ''"
></textarea>
<img class="oe_field_translate oe_input_icon" t-if="widget.field.translate"
t-att-src='_s + "/web/static/src/img/icons/terp-translate.png"' width="16" height="16" border="0"/>
@ -945,7 +947,7 @@
<span class="oe_form_field oe_form_field_many2one oe_form_field_with_button">
<a t-if="widget.get('effective_readonly')" href="#" class="oe_form_uri"/>
<t t-if="!widget.get('effective_readonly')">
<button class="oe_button oe-m2o-cm-button" title="Open Resource">
<button class="oe_button oe_m2o_cm_button" title="Open Resource">
<img t-att-src='_s + "/web/static/src/img/icons/terp-folder-yellow.png"'/>
</button>
<div>
@ -955,7 +957,7 @@
t-att-autofocus="widget.node.attrs.autofocus"
t-att-placeholder="widget.node.attrs.placeholder"
/>
<span class="oe-m2o-drop-down-button">
<span class="oe_m2o_drop_down_button">
<img t-att-src='_s + "/web/static/src/img/down-arrow.png"'/>
</span>
</div>
@ -965,7 +967,8 @@
<t t-name="FieldMany2ManyTags">
<div class="oe_form_field oe_form_field_many2manytags">
<t t-if="! widget.get('effective_readonly')">
<textarea rows="1" style="width: 100%"></textarea>
<textarea rows="1" style="width: 100%"
t-att-placeholder="widget.node.attrs.placeholder"></textarea>
</t>
</div>
</t>
@ -1005,17 +1008,17 @@
<span></span>
</span>
</t>
<t t-name="FieldStatus">
<ul class="oe_form_steps"/>
</t>
<t t-name="FieldStatus.content">
<ul class="oe_form_steps">
<t t-set="size" t-value="widget.to_show.length"/>
<t t-foreach="_.range(size)" t-as="i">
<li t-att-class="widget.to_show[i][0] === widget.selected_value ? 'oe_form_steps_active' : ''">
<span><t t-esc="widget.to_show[i][1]"/></span>
<img t-att-src='_s + "/web/static/src/img/form_steps.png"' class="oe_form_steps_arrow" t-if="i &lt; size - 1"/>
</li>
</t>
</ul>
<div class="oe_clear"/>
<t t-set="size" t-value="widget.to_show.length"/>
<t t-foreach="_.range(size)" t-as="i">
<li t-att-class="widget.to_show[i][0] === widget.selected_value ? 'oe_form_steps_active' : ''">
<span><t t-esc="widget.to_show[i][1]"/></span>
<img t-att-src='_s + "/web/static/src/img/form_steps.png"' class="oe_form_steps_arrow" t-if="i &lt; size - 1"/>
</li>
</t>
</t>
<t t-name="FieldBinaryImage">
<span class="oe_form_field oe_form_field_image">
@ -1026,10 +1029,10 @@
<img t-att-src='_s + "/web/static/src/img/icons/STOCK_DIRECTORY.png"'/>
</button>
</t>
<button class="oe_button oe-binary-file-clear" type="button" title="Clear">
<button class="oe_button oe_form_binary_file_clear" type="button" title="Clear">
<img t-att-src='_s + "/web/static/src/img/icons/STOCK_MISSING_IMAGE.png"'/>
</button>
<div class="oe-binary-progress" style="display: none">
<div class="oe_form_binary_progress" style="display: none">
<img t-att-src='_s + "/web/static/src/img/throbber.gif"' width="16" height="16"/>
<b>Uploading ...</b>
</div>
@ -1056,7 +1059,7 @@
class="field_binary"
/>
</td>
<td class="oe-binary" nowrap="true">
<td class="oe_form_binary" nowrap="true">
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td>
@ -1070,15 +1073,15 @@
</t>
</td>
<td>
<a class="oe_binary_file_save_data">
<button class="oe_button oe_binary_file_save" type="button" title="Save As">
<a class="oe_form_binary_file_save_data">
<button class="oe_button oe_form_binary_file_save" type="button" title="Save As">
<img t-att-src='_s + "/web/static/src/img/icons/gtk-save.png"'/>
<span>Save As</span>
</button>
</a>
</td>
<td>
<button class="oe_button oe-binary-file-clear" type="button" title="Clear">
<button class="oe_button oe_form_binary_file_clear" type="button" title="Clear">
<img t-att-src='_s + "/web/static/src/img/icons/STOCK_MISSING_IMAGE.png"'/>
<span>Clear</span>
</button>
@ -1086,7 +1089,7 @@
</tr>
</table>
</td>
<td class="oe-binary-progress" style="display: none" nowrap="true">
<td class="oe_form_binary_progress" style="display: none" nowrap="true">
<img t-att-src='_s + "/web/static/src/img/throbber.gif"' width="16" height="16"/>
<b>Uploading ...</b>
</td>
@ -1101,12 +1104,12 @@
</t>
<t t-name="HiddenInputFile">
<div t-attf-class="oe_hidden_input_file #{fileupload_class or ''}" t-att-style="fileupload_style">
<form class="oe-binary-form" t-att-target="fileupload_id"
<form class="oe_form_binary_form" t-att-target="fileupload_id"
method="post" enctype="multipart/form-data" t-att-action="fileupload_action || '/web/binary/upload'">
<input type="hidden" name="session_id" value=""/>
<input type="hidden" name="callback" t-att-value="fileupload_id"/>
<t t-raw="__content__"/>
<input type="file" class="oe-binary-file" name="ufile"/>
<input type="file" class="oe_form_binary_file" name="ufile"/>
</form>
<iframe t-att-id="fileupload_id" t-att-name="fileupload_id" style="display: none"/>
</div>
@ -1201,7 +1204,7 @@
<div t-name="SearchView" class="oe_searchview">
<div class="oe_searchview_facets"/>
<div class="oe_searchview_clear"/>
<div class="oe_searchview_unfold_drawer"/>
<div class="oe_searchview_unfold_drawer" title="Advanced Search..."/>
<div class="oe_searchview_drawer"/>
</div>
@ -1225,7 +1228,7 @@
</span>
<t t-name="SearchView.managed-filters">
<option class="oe-filters-title" value="">Filters</option>
<option class="oe_search_filters_title" value="">Filters</option>
<optgroup label="-- Filters --">
<t t-foreach="filters" t-as="filter">
<option t-attf-value="get:#{filter_index}"
@ -1238,7 +1241,6 @@
<optgroup label="-- Actions --">
<option value="advanced_filter">Add Advanced Filter</option>
<option value="save_filter">Save Filter</option>
<option value="add_to_dashboard">Add to Dashboard</option>
<option value="manage_filters">Manage Filters</option>
</optgroup>
</t>
@ -1249,18 +1251,9 @@
<p>(Any existing filter with the same name will be replaced)</p>
</div>
</t>
<t t-name="SearchView.add_to_dashboard">
<div>
<p><b>Select Dashboard to add this filter to:</b></p>
<select style="width: 100%; margin-right: 1em;">
<option t-foreach="dashboards" t-as="menu" t-att-value="menu.id" t-att-selected="(menu.id == selected_menu_id) || undefined"><t t-esc="menu.name"/></option>
</select>
<p><b>Title of new Dashboard item:</b></p>
<input type="text" style="width: 100%; margin-right: 1em;"/>
</div>
</t>
<t t-name="SearchView.render_lines">
<table class="oe-searchview-render-line" border="0" cellspacing="0" cellpadding="0"
<table class="oe_search_render_line" border="0" cellspacing="0" cellpadding="0"
t-foreach="lines" t-as="line">
<tr>
<td t-foreach="line" t-as="widget" class="oe_searchview_field">
@ -1397,6 +1390,20 @@
<div>
</div>
</div>
<div t-name="SearchView.addtodashboard" class="oe_searchview_dashboard">
<h4>Add to Dashboard</h4>
<form>
<input placeholder ="Title of new Dashboard item" title = "Title of new Dashboard item" type="text"/>
<button class="oe_apply" type="submit">save</button>
</form>
</div>
<t t-name="SearchView.addtodashboard.selection">
<select title = "Select Dashboard to add this filter to">
<t t-foreach="selections" t-as="element">
<option t-att-value="element.id || element.res_id "><t t-esc="element.name"/></option>
</t>
</select>
</t>
<div t-name="SearchView.advanced" class="oe_searchview_advanced">
<h4>Advanced Search</h4>
<form>
@ -1446,16 +1453,16 @@
<table style="width:100%">
<tr style="width:100%">
<td style="width:100%">
<div class="oe-select-create-popup-view-search" style="width:100%"></div>
<div class="oe_popup_search" style="width:100%"></div>
</td>
</tr>
<tr style="width:100%">
<td style="width:100%">
<div class="oe-select-create-popup-view-list" style="width:100%"></div>
<div class="oe_popup_list" style="width:100%"></div>
</td>
</tr>
</table>
<div class="oe-form-view-popup-form-placeholder oe-select-create-popup-view-form" style="width:100%"></div>
<div class="oe_popup_form" style="width:100%"></div>
</div>
</t>
<t t-name="SelectCreatePopup.search.buttons">
@ -1478,7 +1485,7 @@
missing columns
-->
<t t-jquery="&gt; :last" t-operation="after">
<td t-if="edited and !options.deletable" class="oe-listview-padding"/>
<td t-if="edited and !options.deletable" class="oe_list_padding"/>
</t>
</t>
@ -1548,7 +1555,7 @@
<t t-name="ExportView">
<a id="exportview" href="javascript: void(0)" style="text-decoration: none;color: #3D3D3D;">Export</a>
</t>
<table t-name="ExportTreeView" class="oe-export"
<table t-name="ExportTreeView" class="oe_export"
style="background-color: #F3F3F3;">
<tr>
<td colspan="3">
@ -1653,7 +1660,7 @@
</t>
<t t-name="ImportDataView">
<form name="import_data" id="import_data" action="" method="post" enctype="multipart/form-data"
class="oe-import oe-import-no-result">
class="oe_import oe_import_no_result">
<input type="hidden" name="session_id" t-att-value="widget.session.session_id"/>
<h2 class="separator horizontal">1. Import a .CSV file</h2>
<p>Select a .CSV file to import. If you need a sample of file to import,
@ -1663,9 +1670,9 @@
<label for="csvfile">CSV File:</label>
<input type="file" id="csvfile" size="50" name="csvfile"/>
</p>
<h2 class="separator horizontal oe-import-result">2. Check your file format</h2>
<div id="result" class="oe-import-result"></div>
<fieldset class="oe-closed oe-import-result">
<h2 class="separator horizontal oe_import_result">2. Check your file format</h2>
<div id="result" class="oe_import_result"></div>
<fieldset class="oe_closed oe_import_result">
<legend>Import Options</legend>
<table>
<tr>
@ -1705,7 +1712,7 @@
</tr>
<tr>
<td t-foreach="records[0]" t-as="column">
<input class="sel_fields" placeholder="--- Don't Import ---"/><span class="oe-m2o-drop-down-button">
<input class="sel_fields" placeholder="--- Don't Import ---"/><span class="oe_m2o_drop_down_button">
<img t-att-src='_s + "/web/static/src/img/down-arrow.png"' /></span>
</td>
</tr>

View File

@ -843,6 +843,25 @@ $(document).ready(function () {
deepEqual(f.get_domain(facet), [['foo', '=', 42]],
"m2o should use identity if default domain");
deepEqual(f.get_context(facet), {default_foo: 42},
"m2o should use value as context default");
});
test("M2O default multiple values", function () {
var f = new instance.web.search.ManyToOneField(
{}, {name: 'foo'}, {inputs: []});
var facet = new instance.web.search.Facet({
field: f,
values: [
{label: "Foo", value: 42},
{label: "Bar", value: 36}
]
});
deepEqual(f.get_domain(facet).__domains,
[['|'], [['foo', '=', 42]], [['foo', '=', 36]]],
"m2o should or multiple values");
equal(f.get_context(facet), null,
"m2o should not have default context in case of multiple values");
});
test("M2O custom operator", function () {
var f = new instance.web.search.ManyToOneField(
@ -854,6 +873,8 @@ $(document).ready(function () {
deepEqual(f.get_domain(facet), [['foo', 'boos', 'Foo']],
"m2o should use label with custom operators");
deepEqual(f.get_context(facet), {default_foo: 42},
"m2o should use value as context default");
});
test("M2O custom domain & context", function () {
var f = new instance.web.search.ManyToOneField({attrs: {
@ -1094,6 +1115,72 @@ $(document).ready(function () {
});
});
module('saved_filters', {
setup: function () {
instance = window.openerp.init([]);
window.openerp.web.corelib(instance);
window.openerp.web.coresetup(instance);
window.openerp.web.chrome(instance);
window.openerp.web.data(instance);
window.openerp.web.formats(instance);
window.openerp.web.search(instance);
instance.web.qweb.add_template(doc);
mockifyRPC(instance.connection);
}
});
asyncTest('checkboxing', 6, function () {
var view = makeSearchView();
instance.connection.responses['/web/searchview/get_filters'] = function () {
return {result: [{
name: "filter name",
user_id: 42
}]};
};
var $fix = $('#qunit-fixture');
view.appendTo($fix)
.always(start)
.fail(function (error) { ok(false, error.message); })
.done(function () {
var $row = $fix.find('.oe_searchview_custom li:first').click();
ok($row.hasClass('oe_selected'), "should check/select the filter's row");
ok($row.hasClass("oe_searchview_custom_private"),
"should have private filter note/class");
equal(view.query.length, 1, "should have only one facet");
var values = view.query.at(0).values;
equal(values.length, 1,
"should have only one value in the facet");
equal(values.at(0).get('label'), 'filter name',
"displayed label should be the name of the filter");
equal(values.at(0).get('value'), null,
"should have no value set");
})
});
asyncTest('removal', 1, function () {
var view = makeSearchView();
instance.connection.responses['/web/searchview/get_filters'] = function () {
return {result: [{
name: "filter name",
user_id: 42
}]};
};
var $fix = $('#qunit-fixture');
view.appendTo($fix)
.always(start)
.fail(function (error) { ok(false, error.message); })
.done(function () {
var $row = $fix.find('.oe_searchview_custom li:first').click();
view.query.remove(view.query.at(0));
ok(!$row.hasClass('oe_selected'),
"should not be checked anymore");
})
});
module('advanced', {
setup: function () {
instance = window.openerp.init([]);

View File

@ -8,31 +8,30 @@ msgstr ""
"Project-Id-Version: openerp-web\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-06 17:33+0100\n"
"PO-Revision-Date: 2011-10-11 13:57+0000\n"
"Last-Translator: Jonas Mortensen <Unknown>\n"
"PO-Revision-Date: 2012-07-01 09:05+0000\n"
"Last-Translator: Aputsiaq Niels Janussen <aj@isit.gl>\n"
"Language-Team: Danish <da@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-06-26 05:35+0000\n"
"X-Generator: Launchpad (build 15482)\n"
"X-Launchpad-Export-Date: 2012-07-02 04:42+0000\n"
"X-Generator: Launchpad (build 15520)\n"
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:11
msgid "Calendar"
msgstr ""
msgstr "Kalender"
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:466
#: addons/web_calendar/static/src/js/calendar.js:467
msgid "Responsible"
msgstr ""
msgstr "Ansvarlig"
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:504
#: addons/web_calendar/static/src/js/calendar.js:505
#: addons/web_calendar/static/src/js/calendar.js:543
msgid "Navigator"
msgstr ""
msgstr "Navigator"
#. openerp-web
#: addons/web_calendar/static/src/xml/web_calendar.xml:5

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2012-02-06 17:33+0100\n"
"POT-Creation-Date: 2012-07-02 09:06+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -18,23 +18,125 @@ msgstr ""
"Generated-By: Babel 0.9.6\n"
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:11
#: addons/web_calendar/static/src/js/calendar.js:12
msgid "Calendar"
msgstr ""
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:466
msgid "Responsible"
#: addons/web_calendar/static/src/js/calendar.js:73
msgid "Filter"
msgstr ""
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:504
msgid "Navigator"
#: addons/web_calendar/static/src/js/calendar.js:139
msgid "Today"
msgstr ""
#. openerp-web
#: addons/web_calendar/static/src/xml/web_calendar.xml:5
#: addons/web_calendar/static/src/xml/web_calendar.xml:6
#: addons/web_calendar/static/src/js/calendar.js:140
msgid "Day"
msgstr ""
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:141
msgid "Week"
msgstr ""
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:142
msgid "Month"
msgstr ""
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:143
msgid "New event"
msgstr ""
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:144
msgid "Save"
msgstr ""
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:145
msgid "Cancel"
msgstr ""
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:146
msgid "Details"
msgstr ""
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:147
msgid "Edit"
msgstr ""
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:148
msgid "Delete"
msgstr ""
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:150
msgid "Event will be deleted permanently, are you sure?"
msgstr ""
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:151
#: addons/web_calendar/static/src/js/calendar.js:164
msgid "Description"
msgstr ""
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:152
msgid "Time period"
msgstr ""
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:153
msgid "Full day"
msgstr ""
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:156
msgid "Do you want to edit the whole set of repeated events?"
msgstr ""
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:157
msgid "Repeat event"
msgstr ""
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:158
msgid "Disabled"
msgstr ""
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:159
msgid "Enabled"
msgstr ""
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:162
#: addons/web_calendar/static/src/js/calendar.js:170
msgid "Agenda"
msgstr ""
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:163
msgid "Date"
msgstr ""
#. openerp-web
#: addons/web_calendar/static/src/js/calendar.js:167
msgid "Year"
msgstr ""
#. openerp-web
#: addons/web_calendar/static/src/xml/web_calendar.xml:8
#: addons/web_calendar/static/src/xml/web_calendar.xml:9
msgid "&nbsp;"
msgstr ""

View File

@ -50,6 +50,7 @@ instance.web_calendar.CalendarView = instance.web.View.extend({
},
on_loaded: function(data) {
this.fields_view = data;
this.$element.addClass(this.fields_view.arch.attrs['class']);
this.calendar_fields = {};
this.ids = this.dataset.ids;
this.color_values = [];
@ -246,6 +247,8 @@ instance.web_calendar.CalendarView = instance.web.View.extend({
}
evt.color = filter_item.color;
evt.textColor = '#ffffff';
} else {
evt.textColor = '#000000';
}
}

View File

@ -8,40 +8,40 @@ msgstr ""
"Project-Id-Version: openerp-web\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-14 15:27+0100\n"
"PO-Revision-Date: 2011-10-11 13:59+0000\n"
"Last-Translator: Jonas Mortensen <Unknown>\n"
"PO-Revision-Date: 2012-07-01 09:05+0000\n"
"Last-Translator: Aputsiaq Niels Janussen <aj@isit.gl>\n"
"Language-Team: Danish <da@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-06-26 05:35+0000\n"
"X-Generator: Launchpad (build 15482)\n"
"X-Launchpad-Export-Date: 2012-07-02 04:42+0000\n"
"X-Generator: Launchpad (build 15520)\n"
#. openerp-web
#: addons/web_dashboard/static/src/js/dashboard.js:63
#: addons/web_dashboard/static/src/js/dashboard.js:60
msgid "Edit Layout"
msgstr ""
msgstr "Redigér layout"
#. openerp-web
#: addons/web_dashboard/static/src/js/dashboard.js:109
#: addons/web_dashboard/static/src/js/dashboard.js:106
msgid "Are you sure you want to remove this item ?"
msgstr ""
msgstr "Er du sikker på at du vil fjerne dette element?"
#. openerp-web
#: addons/web_dashboard/static/src/js/dashboard.js:316
#: addons/web_dashboard/static/src/js/dashboard.js:314
msgid "Uncategorized"
msgstr ""
msgstr "Uden kategori"
#. openerp-web
#: addons/web_dashboard/static/src/js/dashboard.js:324
#: addons/web_dashboard/static/src/js/dashboard.js:322
#, python-format
msgid "Execute task \"%s\""
msgstr ""
#. openerp-web
#: addons/web_dashboard/static/src/js/dashboard.js:325
#: addons/web_dashboard/static/src/js/dashboard.js:323
msgid "Mark this task as done"
msgstr ""
msgstr "Markér denne opgave som løst"
#. openerp-web
#: addons/web_dashboard/static/src/xml/web_dashboard.xml:4
@ -61,17 +61,17 @@ msgstr ""
#. openerp-web
#: addons/web_dashboard/static/src/xml/web_dashboard.xml:10
msgid "Change Layout"
msgstr ""
msgstr "Skift layout"
#. openerp-web
#: addons/web_dashboard/static/src/xml/web_dashboard.xml:27
msgid "&nbsp;"
msgstr ""
msgstr "&nbsp;"
#. openerp-web
#: addons/web_dashboard/static/src/xml/web_dashboard.xml:28
msgid "Create"
msgstr ""
msgstr "Opret"
#. openerp-web
#: addons/web_dashboard/static/src/xml/web_dashboard.xml:39
@ -93,19 +93,19 @@ msgstr ""
#. openerp-web
#: addons/web_dashboard/static/src/xml/web_dashboard.xml:110
msgid "Welcome to OpenERP"
msgstr ""
msgstr "Velkommen til OpenERP"
#. openerp-web
#: addons/web_dashboard/static/src/xml/web_dashboard.xml:118
msgid "Remember to bookmark"
msgstr ""
msgstr "Husk at sætte bogmærke"
#. openerp-web
#: addons/web_dashboard/static/src/xml/web_dashboard.xml:119
msgid "This url"
msgstr ""
msgstr "Denne url"
#. openerp-web
#: addons/web_dashboard/static/src/xml/web_dashboard.xml:121
msgid "Your login:"
msgstr ""
msgstr "Dit logind:"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2012-02-14 15:27+0100\n"
"POT-Creation-Date: 2012-07-02 09:06+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -18,31 +18,15 @@ msgstr ""
"Generated-By: Babel 0.9.6\n"
#. openerp-web
#: addons/web_dashboard/static/src/js/dashboard.js:63
#: addons/web_dashboard/static/src/js/dashboard.js:61
msgid "Edit Layout"
msgstr ""
#. openerp-web
#: addons/web_dashboard/static/src/js/dashboard.js:109
#: addons/web_dashboard/static/src/js/dashboard.js:107
msgid "Are you sure you want to remove this item ?"
msgstr ""
#. openerp-web
#: addons/web_dashboard/static/src/js/dashboard.js:316
msgid "Uncategorized"
msgstr ""
#. openerp-web
#: addons/web_dashboard/static/src/js/dashboard.js:324
#, python-format
msgid "Execute task \"%s\""
msgstr ""
#. openerp-web
#: addons/web_dashboard/static/src/js/dashboard.js:325
msgid "Mark this task as done"
msgstr ""
#. openerp-web
#: addons/web_dashboard/static/src/xml/web_dashboard.xml:4
msgid "Reset Layout.."
@ -78,35 +62,3 @@ msgstr ""
msgid "Choose dashboard layout"
msgstr ""
#. openerp-web
#: addons/web_dashboard/static/src/xml/web_dashboard.xml:62
msgid "progress:"
msgstr ""
#. openerp-web
#: addons/web_dashboard/static/src/xml/web_dashboard.xml:67
msgid ""
"Click on the functionalites listed below to launch them and configure "
"your system"
msgstr ""
#. openerp-web
#: addons/web_dashboard/static/src/xml/web_dashboard.xml:110
msgid "Welcome to OpenERP"
msgstr ""
#. openerp-web
#: addons/web_dashboard/static/src/xml/web_dashboard.xml:118
msgid "Remember to bookmark"
msgstr ""
#. openerp-web
#: addons/web_dashboard/static/src/xml/web_dashboard.xml:119
msgid "This url"
msgstr ""
#. openerp-web
#: addons/web_dashboard/static/src/xml/web_dashboard.xml:121
msgid "Your login:"
msgstr ""

View File

@ -1,11 +1,11 @@
.openerp table.oe-dashboard {
.openerp table.oe_dashboard {
width: 100%;
}
.openerp .oe-dashboard-links {
.openerp .oe_dashboard_links {
text-align: right;
margin: 0 4px 6px 0;
}
.openerp .oe-dashboard-action {
.openerp .oe_dashboard_action {
margin: 0 0.5em 0.5em 0;
padding: 0px;
background-color: white;
@ -14,7 +14,7 @@
-webkit-border-radius: 3px;
}
.openerp .oe-dashboard-action .oe-dashboard-action-header {
.openerp .oe_dashboard_action .oe_dashboard_action_header {
font-size: 85%;
font-weight: bold;
text-transform: uppercase;
@ -24,7 +24,7 @@
background: white url("/web/static/src/img/box-a-header-a.gif") 0% 0% repeat-x;
}
.openerp h2.oe-dashboard-action-header {
.openerp h2.oe_dashboard_action_header {
margin: 0;
padding:4px 4px;
-moz-border-radius-topleft: 3px;
@ -34,7 +34,7 @@
-webkit-border-top-right-radius: 3px;
border-top-right-radius: 3px;
}
.openerp h2.oe-dashboard-action-header-empty {
.openerp h2.oe_dashboard_action_header_empty {
padding-top: 0;
padding-bottom: 2px;
}
@ -45,103 +45,103 @@
height: 16px !important;
}
.openerp a.oe-dashboard-action-rename {
.openerp a.oe_dashboard_action_rename {
float: left;
padding-right: 4px;
position: relative;
top: 1px;
}
.openerp .oe-dashboard-action-input {
.openerp .oe_dashboard_action_input {
height: 16px;
position: relative;
top: 2px;
}
.openerp .oe-dashboard-action .oe-dashboard-action-header:hover {
.openerp .oe_dashboard_action .oe_dashboard_action_header:hover {
cursor: move;
}
.openerp .oe-dashboard-action .ui-icon {
.openerp .oe_dashboard_action .ui-icon {
cursor: pointer;
}
.openerp .oe-dashboard-action .ui-icon:hover {
.openerp .oe_dashboard_action .ui-icon:hover {
background-color: #ccc;
border-radius: 4px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
}
.openerp .oe-dashboard-action .oe-dashboard-action-header .ui-icon {
.openerp .oe_dashboard_action .oe_dashboard_action_header .ui-icon {
float: right;
}
.openerp .oe-dashboard .ui-sortable-placeholder {
.openerp .oe_dashboard .ui-sortable-placeholder {
border: 1px dotted black;
visibility: visible !important;
height: 50px !important;
}
.openerp .oe-dashboard .ui-sortable-placeholder * {
.openerp .oe_dashboard .ui-sortable-placeholder * {
visibility: hidden;
}
/* Base overwriting */
.openerp .oe-dashboard .oe-listview-content, .openerp .oe-dashboard .ui-widget-header {
.openerp .oe_dashboard .oe_list_content, .openerp .oe_dashboard .ui-widget-header {
border-right:none !important;
padding:0 3px;
}
/* Layouts */
.openerp .oe-dashboard-layout_1 .oe-dashboard-column.index_0 {
.openerp .oe_dashboard_layout_1 .oe_dashboard_column.index_0 {
width: 100%;
}
.openerp .oe-dashboard-layout_1 .oe-dashboard-column.index_1,
.openerp .oe-dashboard-layout_1 .oe-dashboard-column.index_2 {
.openerp .oe_dashboard_layout_1 .oe_dashboard_column.index_1,
.openerp .oe_dashboard_layout_1 .oe_dashboard_column.index_2 {
display: none;
}
.openerp .oe-dashboard-layout_1-1 .oe-dashboard-column {
.openerp .oe_dashboard_layout_1-1 .oe_dashboard_column {
width: 50%;
}
.openerp .oe-dashboard-layout_1-1 .oe-dashboard-column.index_2 {
.openerp .oe_dashboard_layout_1-1 .oe_dashboard_column.index_2 {
display: none;
}
.openerp .oe-dashboard-layout_1-1-1 .oe-dashboard-column {
.openerp .oe_dashboard_layout_1-1-1 .oe_dashboard_column {
width: 33%;
}
.openerp .oe-dashboard-layout_2-1 .oe-dashboard-column.index_0 {
.openerp .oe_dashboard_layout_2-1 .oe_dashboard_column.index_0 {
width: 70%;
}
.openerp .oe-dashboard-layout_2-1 .oe-dashboard-column.index_1 {
.openerp .oe_dashboard_layout_2-1 .oe_dashboard_column.index_1 {
width: 30%;
}
.openerp .oe-dashboard-layout_2-1 .oe-dashboard-column.index_2 {
.openerp .oe_dashboard_layout_2-1 .oe_dashboard_column.index_2 {
display: none;
}
.openerp .oe-dashboard-layout_1-2 .oe-dashboard-column.index_0 {
.openerp .oe_dashboard_layout_1-2 .oe_dashboard_column.index_0 {
width: 30%;
}
.openerp .oe-dashboard-layout_1-2 .oe-dashboard-column.index_1 {
.openerp .oe_dashboard_layout_1-2 .oe_dashboard_column.index_1 {
width: 70%;
}
.openerp .oe-dashboard-layout_1-2 .oe-dashboard-column.index_2 {
.openerp .oe_dashboard_layout_1-2 .oe_dashboard_column.index_2 {
display: none;
}
.openerp .oe-dashboard-layout-selector {
.openerp .oe_dashboard_layout_selector {
overflow: auto;
padding: 10px;
}
.openerp .oe-dashboard-layout-selector ul {
.openerp .oe_dashboard_layout_selector ul {
margin: 0;
padding: 0;
}
.openerp .oe-dashboard-layout-selector ul li {
.openerp .oe_dashboard_layout_selector ul li {
position: relative;
float: left;
height: 51px;
@ -152,16 +152,16 @@
cursor: pointer;
border: 1px solid white;
}
.openerp .oe-dashboard-layout-selector ul li:hover {
.openerp .oe_dashboard_layout_selector ul li:hover {
border: 1px solid #090;
}
.openerp .oe-dashboard-layout-selector ul li img.oe-selected-layout {
.openerp .oe_dashboard_layout_selector ul li img.oe_dashboard_selected_layout {
position: absolute;
top: 0px;
right: 0px;
}
.openerp .oe-dashboard-home-tile {
.openerp .oe_dashboard_home_tile {
text-align: center;
margin: 10px;
-webkit-border-radius: 10px;
@ -171,7 +171,7 @@
-moz-box-shadow: 3px 3px 5px 3px #DADDDD;
box-shadow: 3px 3px 5px 3px #DADDDD;
}
.openerp .oe-dashboard-home-tile span {
.openerp .oe_dashboard_home_tile span {
display: block;
padding: 0 0 15px;
font-weight: bold;
@ -179,79 +179,36 @@
color: #555;
white-space: nowrap;
}
.openerp .oe-dashboard-home-tile-icon {
.openerp .oe_dashboard_home_tile_icon {
height: 100px;
}
.openerp .oe-dashboard-home-tile-icon img {
.openerp .oe_dashboard_home_tile_icon img {
display: block;
margin: 0 auto;
}
.openerp .oe-dashboard-home-tile-icon img.hover {
.openerp .oe_dashboard_home_tile_icon img.hover {
display: none;
}
.openerp .oe-dashboard-home-tile:hover {
.openerp .oe_dashboard_home_tile:hover {
background-color: #fafafa;
-webkit-box-shadow: 3px 3px 5px 3px #979797;
-moz-box-shadow: 3px 3px 5px 3px #979797;
box-shadow: 3px 3px 5px 3px #979797;
}
.openerp .oe-dashboard-home-tile:hover img {
.openerp .oe_dashboard_home_tile:hover img {
display: none;
}
.openerp .oe-dashboard-home-tile:hover img.hover {
.openerp .oe_dashboard_home_tile:hover img.hover {
display: block;
}
.openerp .oe-dashboard-home-tile:hover span {
.openerp .oe_dashboard_home_tile:hover span {
color: black;
}
.openerp .oe-dashboard-action .view-manager-main-content {
.openerp .oe_dashboard_action .view-manager-main-content {
padding: 2px;
}
.oe-static-home {
padding: 0.5em 0.5em;
text-align: center;
}
.oe-static-home h1 {
margin: 0 0 0.3em;
}
.oe-static-home-banner {
display: inline-block;
margin: auto 0;
padding: 0.5em 5em;
text-align: left;
}
.oe-static-home-banner li {
font-size: 150%;
font-weight: bold;
}
.oe-static-home address {
font-style: normal;
padding-left: 2em;
}
.oe-static-home-tiles {
text-align: left;
}
.oe-static-home-tiles td {
vertical-align: top;
}
.oe-static-home-tile {
margin: 0.5em;
padding: 0 1em;
}
.oe-static-home-tile-logo {
margin-right: 0.5em;
}
.oe-static-home-tile-text h2 {
margin-top: 0;
margin-bottom: 0.2em;
}
.oe-static-home-tile-text p {
margin: 0.5em 0;
}
.openerp .oe_app_tiles h1, .openerp .oe_app_tiles h3 {
margin: 16px 24px;
}
@ -306,11 +263,11 @@
}
/* changing icon for the change layout button */
.openerp .oe-dashboard-link-change_layout, .openerp .oe-dashboard-link-reset {
.openerp .oe_dashboard_link_change_layout, .openerp .oe_dashboard_link_reset {
padding-top: 1px;
height: 22px;
}
.openerp .oe-dashboard-link-change_layout > *, .openerp .oe-dashboard-link-reset > *{
.openerp .oe_dashboard_link_change_layout > *, .openerp .oe_dashboard_link_reset > *{
vertical-align: middle;
}

View File

@ -18,18 +18,18 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
var self = this;
this._super.apply(this, arguments);
this.$element.find('.oe-dashboard-column').sortable({
connectWith: '.oe-dashboard-column',
handle: '.oe-dashboard-action-header',
this.$element.find('.oe_dashboard_column').sortable({
connectWith: '.oe_dashboard_column',
handle: '.oe_dashboard_action_header',
scroll: false
}).disableSelection().bind('sortstop', self.do_save_dashboard);
// Events
this.$element.find('.oe-dashboard-link-reset').click(this.on_reset);
this.$element.find('.oe-dashboard-link-change_layout').click(this.on_change_layout);
this.$element.find('.oe_dashboard_link_reset').click(this.on_reset);
this.$element.find('.oe_dashboard_link_change_layout').click(this.on_change_layout);
this.$element.delegate('.oe-dashboard-column .oe-dashboard-fold', 'click', this.on_fold_action);
this.$element.delegate('.oe-dashboard-column .ui-icon-closethick', 'click', this.on_close_action);
this.$element.delegate('.oe_dashboard_column .oe_dashboard_fold', 'click', this.on_fold_action);
this.$element.delegate('.oe_dashboard_column .ui-icon-closethick', 'click', this.on_close_action);
// Init actions
_.each(this.node.children, function(column, column_index) {
@ -54,7 +54,7 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
on_change_layout: function() {
var self = this;
var qdict = {
current_layout : this.$element.find('.oe-dashboard').attr('data-layout')
current_layout : this.$element.find('.oe_dashboard').attr('data-layout')
};
var $dialog = instance.web.dialog($('<div>'), {
modal: true,
@ -69,7 +69,7 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
});
},
do_change_layout: function(new_layout) {
var $dashboard = this.$element.find('.oe-dashboard');
var $dashboard = this.$element.find('.oe_dashboard');
var current_layout = $dashboard.attr('data-layout');
if (current_layout != new_layout) {
var clayout = current_layout.split('-').length,
@ -77,22 +77,22 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
column_diff = clayout - nlayout;
if (column_diff > 0) {
var $last_column = $();
$dashboard.find('.oe-dashboard-column').each(function(k, v) {
$dashboard.find('.oe_dashboard_column').each(function(k, v) {
if (k >= nlayout) {
$(v).find('.oe-dashboard-action').appendTo($last_column);
$(v).find('.oe_dashboard_action').appendTo($last_column);
} else {
$last_column = $(v);
}
});
}
$dashboard.toggleClass('oe-dashboard-layout_' + current_layout + ' oe-dashboard-layout_' + new_layout);
$dashboard.toggleClass('oe_dashboard_layout_' + current_layout + ' oe_dashboard_layout_' + new_layout);
$dashboard.attr('data-layout', new_layout);
this.do_save_dashboard();
}
},
on_fold_action: function(e) {
var $e = $(e.currentTarget),
$action = $e.parents('.oe-dashboard-action:first'),
$action = $e.parents('.oe_dashboard_action:first'),
id = parseInt($action.attr('data-id'), 10);
if ($e.is('.ui-icon-minusthick')) {
$action.data('action_attrs').fold = '1';
@ -100,12 +100,12 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
delete($action.data('action_attrs').fold);
}
$e.toggleClass('ui-icon-minusthick ui-icon-plusthick');
$action.find('.oe-dashboard-action-content').toggle();
$action.find('.oe_dashboard_action_content').toggle();
this.do_save_dashboard();
},
on_close_action: function(e) {
if (confirm(_t("Are you sure you want to remove this item ?"))) {
$(e.currentTarget).parents('.oe-dashboard-action:first').remove();
$(e.currentTarget).parents('.oe_dashboard_action:first').remove();
this.do_save_dashboard();
}
},
@ -113,12 +113,12 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
var self = this;
var board = {
form_title : this.view.fields_view.arch.attrs.string,
style : this.$element.find('.oe-dashboard').attr('data-layout'),
style : this.$element.find('.oe_dashboard').attr('data-layout'),
columns : []
};
this.$element.find('.oe-dashboard-column').each(function() {
this.$element.find('.oe_dashboard_column').each(function() {
var actions = [];
$(this).find('.oe-dashboard-action').each(function() {
$(this).find('.oe_dashboard_action').each(function() {
var action_id = $(this).attr('data-id'),
new_attrs = _.clone($(this).data('action_attrs'));
if (new_attrs.domain) {
@ -138,7 +138,7 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
view_id: this.view.fields_view.view_id,
arch: arch
}, function() {
self.$element.find('.oe-dashboard-link-reset').show();
self.$element.find('.oe_dashboard_link_reset').show();
});
},
on_load_action: function(result, index, action_attrs) {

View File

@ -1,19 +1,19 @@
<template>
<t t-name="DashBoard">
<div class="oe-dashboard-links">
<button type="button" class="button oe-dashboard-link-reset" title="Reset Layout.." t-att-style="view.fields_view.custom_view_id ? null : 'display: none'">
<div class="oe_dashboard_links">
<button type="button" class="button oe_dashboard_link_reset" title="Reset Layout.." t-att-style="view.fields_view.custom_view_id ? null : 'display: none'">
<img src="/web_dashboard/static/src/img/layout_2-1.png" width="16" height="16"/>
<span> Reset </span>
</button>
<button type="button" class="button oe-dashboard-link-change_layout" title="Change Layout..">
<button type="button" class="button oe_dashboard_link_change_layout" title="Change Layout..">
<img src="/web_dashboard/static/src/img/layout_1-1-1.png" width="16" height="16"/>
<span> Change Layout </span>
</button>
</div>
<table t-att-data-layout="node.attrs.style" t-attf-class="oe-dashboard oe-dashboard-layout_#{node.attrs.style}" cellspacing="0" cellpadding="0" border="0">
<table t-att-data-layout="node.attrs.style" t-attf-class="oe_dashboard oe_dashboard_layout_#{node.attrs.style}" cellspacing="0" cellpadding="0" border="0">
<tr>
<td t-foreach="node.children" t-as="column" t-if="column.tag == 'column'"
t-att-id="view.element_id + '_column_' + column_index" t-attf-class="oe-dashboard-column index_#{column_index}">
t-att-id="view.element_id + '_column_' + column_index" t-attf-class="oe_dashboard_column index_#{column_index}">
<t t-foreach="column.children" t-as="action" t-if="action.tag == 'action'" t-call="DashBoard.action"/>
</td>
@ -21,20 +21,20 @@
</table>
</t>
<t t-name="DashBoard.action">
<div t-att-data-id="action.attrs.name" class="oe-dashboard-action">
<h2 t-attf-class="oe-dashboard-action-header #{action.attrs.string ? '' : 'oe-dashboard-action-header-empty'}">
<div t-att-data-id="action.attrs.name" class="oe_dashboard_action">
<h2 t-attf-class="oe_dashboard_action_header #{action.attrs.string ? '' : 'oe_dashboard_action_header_empty'}">
<t t-esc="action.attrs.string"/>
<t t-if="!action.attrs.string">&amp;nbsp;</t>
<button t-if="action.attrs.creatable and action.attrs.creatable !== 'false'" class="oe_button oe_dashboard_button_create">Create</button>
<span class='ui-icon ui-icon-closethick'></span>
<span class='ui-icon ui-icon-minusthick oe-dashboard-fold' t-if="!action.attrs.fold"></span>
<span class='ui-icon ui-icon-plusthick oe-dashboard-fold' t-if="action.attrs.fold"></span>
<span class='ui-icon ui-icon-minusthick oe_dashboard_fold' t-if="!action.attrs.fold"></span>
<span class='ui-icon ui-icon-plusthick oe_dashboard_fold' t-if="action.attrs.fold"></span>
</h2>
<div t-attf-id="#{view.element_id}_action_#{column_index}_#{action_index}" class="oe-dashboard-action-content" t-att-style="action.attrs.fold ? 'display: none' : null"></div>
<div t-attf-id="#{view.element_id}_action_#{column_index}_#{action_index}" class="oe_dashboard_action_content" t-att-style="action.attrs.fold ? 'display: none' : null"></div>
</div>
</t>
<t t-name="DashBoard.layouts">
<div class="oe-dashboard-layout-selector">
<div class="oe_dashboard_layout_selector">
<p>
<strong>Choose dashboard layout</strong>
</p>
@ -42,7 +42,7 @@
<li t-foreach="'1 1-1 1-1-1 1-2 2-1'.split(' ')" t-as="layout" t-att-data-layout="layout">
<img t-attf-src="/web_dashboard/static/src/img/layout_#{layout}.png"/>
<img t-if="layout == current_layout"
src="/web/static/src/img/icons/gtk-apply.png" width="16" height="16" class="oe-selected-layout"/>
src="/web/static/src/img/icons/gtk-apply.png" width="16" height="16" class="oe_dashboard_selected_layout"/>
</li>
</ul>
</div>
@ -56,7 +56,7 @@
</board>
</form>
</t>
<div t-name="HomeWidget" class="oe-dashboard-home-widget"/>
<div t-name="HomeWidget" class="oe_dashboard_home_widget"/>
<t t-name="HomeWidget.content">
<h3><t t-esc="widget.title"/></h3>
<iframe width="100%" frameborder="0" t-att-src="url"/>

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2012-02-06 17:33+0100\n"
"POT-Creation-Date: 2012-07-02 09:06+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -23,27 +23,53 @@ msgid "Diagram"
msgstr ""
#. openerp-web
#: addons/web_diagram/static/src/js/diagram.js:208
#: 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 ""
#. openerp-web
#: addons/web_diagram/static/src/js/diagram.js:213
msgid ""
"Deleting this transition cannot be undone.\n"
"\n"
"Are you sure ?"
msgstr ""
#. 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:208
msgid "Transition"
msgstr ""
#. openerp-web
#: addons/web_diagram/static/src/js/diagram.js:214
msgid "Create:"
msgstr ""
#. openerp-web
#: addons/web_diagram/static/src/js/diagram.js:231
#: 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/xml/base_diagram.xml:5
#: 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 ""

View File

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

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2012-02-06 17:33+0100\n"
"POT-Creation-Date: 2012-07-02 09:06+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

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

View File

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

View File

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

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2012-02-06 17:33+0100\n"
"POT-Creation-Date: 2012-07-02 09:06+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -18,7 +18,82 @@ msgstr ""
"Generated-By: Babel 0.9.6\n"
#. openerp-web
#: addons/web_graph/static/src/js/graph.js:19
#: addons/web_graph/static/src/js/graph.js:22
msgid "Graph"
msgstr ""
#. openerp-web
#: addons/web_graph/static/src/xml/web_graph.xml:5
msgid "Graph Options"
msgstr ""
#. openerp-web
#: addons/web_graph/static/src/xml/web_graph.xml:7
msgid "Graph Mode"
msgstr ""
#. openerp-web
#: addons/web_graph/static/src/xml/web_graph.xml:11
msgid "Pie"
msgstr ""
#. openerp-web
#: addons/web_graph/static/src/xml/web_graph.xml:12
msgid "Bars"
msgstr ""
#. openerp-web
#: addons/web_graph/static/src/xml/web_graph.xml:14
msgid "Lines"
msgstr ""
#. openerp-web
#: addons/web_graph/static/src/xml/web_graph.xml:15
msgid "Areas"
msgstr ""
#. openerp-web
#: addons/web_graph/static/src/xml/web_graph.xml:18
msgid "Radar"
msgstr ""
#. openerp-web
#: addons/web_graph/static/src/xml/web_graph.xml:20
msgid "Legend"
msgstr ""
#. openerp-web
#: addons/web_graph/static/src/xml/web_graph.xml:24
msgid "Hidden"
msgstr ""
#. openerp-web
#: addons/web_graph/static/src/xml/web_graph.xml:25
msgid "Inside"
msgstr ""
#. openerp-web
#: addons/web_graph/static/src/xml/web_graph.xml:26
msgid "Top"
msgstr ""
#. openerp-web
#: addons/web_graph/static/src/xml/web_graph.xml:28
msgid "Actions"
msgstr ""
#. openerp-web
#: addons/web_graph/static/src/xml/web_graph.xml:32
msgid "Switch Axis"
msgstr ""
#. openerp-web
#: addons/web_graph/static/src/xml/web_graph.xml:33
msgid "Show Data"
msgstr ""
#. openerp-web
#: addons/web_graph/static/src/xml/web_graph.xml:34
msgid "Download as PNG"
msgstr ""

View File

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

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2012-02-06 17:33+0100\n"
"POT-Creation-Date: 2012-07-02 09:06+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -0,0 +1,53 @@
# Danish 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-02-14 15:27+0100\n"
"PO-Revision-Date: 2012-07-01 08:56+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Danish <da@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-02 04:42+0000\n"
"X-Generator: Launchpad (build 15520)\n"
#. openerp-web
#: addons/web_kanban/static/src/js/kanban.js:10
msgid "Kanban"
msgstr "Kanban"
#. openerp-web
#: addons/web_kanban/static/src/js/kanban.js:293
msgid "Undefined"
msgstr "Ikke defineret"
#. openerp-web
#: addons/web_kanban/static/src/js/kanban.js:468
msgid "Are you sure you want to delete this record ?"
msgstr ""
#. openerp-web
#: addons/web_kanban/static/src/xml/web_kanban.xml:5
msgid "Create"
msgstr "Opret"
#. openerp-web
#: addons/web_kanban/static/src/xml/web_kanban.xml:41
msgid "Show more... ("
msgstr ""
#. openerp-web
#: addons/web_kanban/static/src/xml/web_kanban.xml:41
msgid "remaining)"
msgstr ""
#. openerp-web
#: addons/web_kanban/static/src/xml/web_kanban.xml:59
msgid "</tr><tr>"
msgstr "</tr><tr>"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2012-02-14 15:27+0100\n"
"POT-Creation-Date: 2012-07-02 09:06+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -23,32 +23,42 @@ msgid "Kanban"
msgstr ""
#. openerp-web
#: addons/web_kanban/static/src/js/kanban.js:294
#: addons/web_kanban/static/src/js/kanban.js:372
msgid "Undefined"
msgstr ""
#. openerp-web
#: addons/web_kanban/static/src/js/kanban.js:469
#: 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/xml/web_kanban.xml:5
msgid "Create"
#: addons/web_kanban/static/src/js/kanban.js:839
msgid "Create: "
msgstr ""
#. openerp-web
#: addons/web_kanban/static/src/xml/web_kanban.xml:41
#: 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:41
#: addons/web_kanban/static/src/xml/web_kanban.xml:53
msgid "remaining)"
msgstr ""
#. openerp-web
#: addons/web_kanban/static/src/xml/web_kanban.xml:59
msgid "</tr><tr>"
#: 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 ""

View File

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

View File

@ -13,7 +13,7 @@
<div t-name="KanbanView.buttons" class="oe_kanban_buttons">
<t t-if="widget.options.action_buttons !== false">
<t t-if="widget._is_create_enabled()">
<button type="button" class="oe_button oe_kanban_button_new oe_form_button_hi">
<button type="button" class="oe_button oe_kanban_button_new oe_highlight">
<t t-esc="widget.options.create_text || _t('Create')"/>
</button>
</t>
@ -25,7 +25,7 @@
<div class="oe_kanban_header">
<div class="oe_kanban_fold_icon"></div>
<t t-if="widget.view._is_quick_create_enabled()">
<div class="oe_kanban_add"></div>
<div class="oe_kanban_add" t-att-title="_t('Quick Create')"></div>
</t>
<div class="oe_fold_column">
<div t-attf-class="oe_kanban_group_title #{widget.undefined_title ? 'oe_kanban_group_title_undefined' : ''}">
@ -68,8 +68,8 @@
<input t-att-placeholder="_t('Create a new record')"/>
<t t-if="widget._buttons">
<div class="oe_kanban_quick_create_buttons">
<button class="oe-kanban-quick_create_add">Add</button>
or <a class="oe-kanban-quick_create_close">Cancel</a>
<button class="oe_kanban_quick_create_add">Add</button>
or <a class="oe_kanban_quick_create_close">Cancel</a>
</div>
</t>
</div>

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2012-02-07 10:13+0100\n"
"POT-Creation-Date: 2012-07-02 09:06+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -0,0 +1,118 @@
# Danish 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-02-07 19:19+0100\n"
"PO-Revision-Date: 2012-07-01 09:08+0000\n"
"Last-Translator: Aputsiaq Niels Janussen <aj@isit.gl>\n"
"Language-Team: Danish <da@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-02 04:42+0000\n"
"X-Generator: Launchpad (build 15520)\n"
#. openerp-web
#: addons/web_process/static/src/js/process.js:261
msgid "Cancel"
msgstr "Annullér"
#. openerp-web
#: addons/web_process/static/src/js/process.js:262
msgid "Save"
msgstr "Gem"
#. openerp-web
#: addons/web_process/static/src/xml/web_process.xml:6
msgid "Process View"
msgstr ""
#. openerp-web
#: addons/web_process/static/src/xml/web_process.xml:19
msgid "Documentation"
msgstr "Dokumentation"
#. openerp-web
#: addons/web_process/static/src/xml/web_process.xml:19
msgid "Read Documentation Online"
msgstr "Læs dokumentation online"
#. openerp-web
#: addons/web_process/static/src/xml/web_process.xml:25
msgid "Forum"
msgstr "Forum"
#. openerp-web
#: addons/web_process/static/src/xml/web_process.xml:25
msgid "Community Discussion"
msgstr ""
#. openerp-web
#: addons/web_process/static/src/xml/web_process.xml:31
msgid "Books"
msgstr "Bøger"
#. openerp-web
#: addons/web_process/static/src/xml/web_process.xml:31
msgid "Get the books"
msgstr ""
#. openerp-web
#: addons/web_process/static/src/xml/web_process.xml:37
msgid "OpenERP Enterprise"
msgstr "OpenERP Enterprise"
#. openerp-web
#: addons/web_process/static/src/xml/web_process.xml:37
msgid "Purchase OpenERP Enterprise"
msgstr ""
#. openerp-web
#: addons/web_process/static/src/xml/web_process.xml:52
msgid "Process"
msgstr ""
#. openerp-web
#: addons/web_process/static/src/xml/web_process.xml:56
msgid "Notes:"
msgstr "Noter:"
#. openerp-web
#: addons/web_process/static/src/xml/web_process.xml:59
msgid "Last modified by:"
msgstr "Senest ændret af:"
#. openerp-web
#: addons/web_process/static/src/xml/web_process.xml:59
msgid "N/A"
msgstr "Ikke tilgængelig"
#. openerp-web
#: addons/web_process/static/src/xml/web_process.xml:62
msgid "Subflows:"
msgstr ""
#. openerp-web
#: addons/web_process/static/src/xml/web_process.xml:75
msgid "Related:"
msgstr "Relateret:"
#. openerp-web
#: addons/web_process/static/src/xml/web_process.xml:88
msgid "Select Process"
msgstr ""
#. openerp-web
#: addons/web_process/static/src/xml/web_process.xml:98
msgid "Select"
msgstr "Markér"
#. openerp-web
#: addons/web_process/static/src/xml/web_process.xml:109
msgid "Edit Process"
msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2012-02-07 19:19+0100\n"
"POT-Creation-Date: 2012-07-02 09:06+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

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

View File

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

View File

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

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2012-02-06 17:33+0100\n"
"POT-Creation-Date: 2012-07-02 09:06+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2012-02-06 17:33+0100\n"
"POT-Creation-Date: 2012-07-02 09:06+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

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

View File

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

View File

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