summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorJiten (OpenERP) <jra@tinyerp.com>2012-11-27 10:46:03 +0530
committerJiten (OpenERP) <jra@tinyerp.com>2012-11-27 10:46:03 +0530
commitcec3e542a65af5af89bef4aa75f97ae3d3a76507 (patch)
tree34e103bbbaeae6903dafd10bd65dcbf3fa401f7c /addons/web/static/src
parent6e922eabccfdc4cf745571c01bd06a7446969b0e (diff)
parent718b26d796ef8bf793184ff52502af61c3c7a812 (diff)
[MERGE] Merged trunk.
bzr revid: jra@tinyerp.com-20121126110752-8mmm2c7iciw6jhp1 bzr revid: jra@tinyerp.com-20121127051603-q6y1bardiezruu1m
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/css/base.css22
-rw-r--r--addons/web/static/src/css/base.sass13
-rw-r--r--addons/web/static/src/img/view_empty_arrow.pngbin4157 -> 2531 bytes
-rw-r--r--addons/web/static/src/js/chrome.js56
-rw-r--r--addons/web/static/src/js/search.js6
-rw-r--r--addons/web/static/src/js/view_form.js14
-rw-r--r--addons/web/static/src/xml/base.xml24
7 files changed, 80 insertions, 55 deletions
diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css
index a79bd414003..383e014d5ea 100644
--- a/addons/web/static/src/css/base.css
+++ b/addons/web/static/src/css/base.css
@@ -30,7 +30,7 @@
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
/* http://www.quirksmode.org/dom/inputfile.html
* http://stackoverflow.com/questions/2855589/replace-input-type-file-by-an-image
- */
+ */ */
}
.openerp.openerp_webclient_container {
height: 100%;
@@ -1180,7 +1180,7 @@
color: white;
padding: 2px 4px;
margin: 1px 6px 0 0;
- border: 1px solid lightgrey;
+ border: 1px solid lightGray;
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
@@ -1205,7 +1205,7 @@
transform: scale(1.1);
}
.openerp .oe_secondary_submenu .oe_active {
- border-top: 1px solid lightgrey;
+ border-top: 1px solid lightGray;
border-bottom: 1px solid #dedede;
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
-moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2), inset 0 -1px 3px rgba(40, 40, 40, 0.2);
@@ -1912,14 +1912,22 @@
max-width: 700px;
}
.openerp .oe_view_nocontent .oe_view_nocontent_create {
- background: transparent url(/web/static/src/img/view_empty_arrow.png) no-repeat 7px 0;
margin-top: 0;
padding-top: 35px;
- min-height: 28px;
color: #4c4c4c;
}
+.openerp .oe_view_nocontent .oe_view_nocontent_create:before {
+ content: "";
+ display: inline-block;
+ position: absolute;
+ width: 70px;
+ height: 80px;
+ margin-left: -70px;
+ margin-top: -50px;
+ background: transparent url(/web/static/src/img/view_empty_arrow.png) no-repeat 0px 0px;
+}
.openerp .oe_view_nocontent > p {
- padding-left: 95px;
+ padding-left: 78px;
}
.openerp .oe_view_nocontent .oe_empty_custom_dashboard {
background: transparent url(/web/static/src/img/graph_background.png) no-repeat 0 0;
@@ -2134,7 +2142,7 @@
}
.openerp .oe_form .oe_form_label_help[for] span, .openerp .oe_form .oe_form_label[for] span {
font-size: 80%;
- color: darkgreen;
+ color: darkGreen;
vertical-align: top;
position: relative;
top: -4px;
diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass
index 47adb2a8eca..2bc13dc26c9 100644
--- a/addons/web/static/src/css/base.sass
+++ b/addons/web/static/src/css/base.sass
@@ -1536,13 +1536,20 @@ $sheet-padding: 16px
font-size: 125%
max-width: 700px
.oe_view_nocontent_create
- background: transparent url(/web/static/src/img/view_empty_arrow.png) no-repeat 7px 0
margin-top: 0
padding-top: 35px
- min-height: 28px
color: #4c4c4c
+ &:before
+ content: ""
+ display: inline-block
+ position: absolute
+ width: 70px
+ height: 80px
+ margin-left: -70px
+ margin-top: -50px
+ background: transparent url(/web/static/src/img/view_empty_arrow.png) no-repeat 0px 0px
> p
- padding-left: 95px
+ padding-left: 78px
.oe_empty_custom_dashboard
background: transparent url(/web/static/src/img/graph_background.png) no-repeat 0 0
margin-top: -15px
diff --git a/addons/web/static/src/img/view_empty_arrow.png b/addons/web/static/src/img/view_empty_arrow.png
index ef8f3c820d7..99561e3abf3 100644
--- a/addons/web/static/src/img/view_empty_arrow.png
+++ b/addons/web/static/src/img/view_empty_arrow.png
Binary files differ
diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js
index f355322b489..e355f08bb7c 100644
--- a/addons/web/static/src/js/chrome.js
+++ b/addons/web/static/src/js/chrome.js
@@ -67,9 +67,11 @@ instance.web.Dialog = instance.web.Widget.extend({
@param {Widget} parent
@param {dictionary} options A dictionary that will be forwarded to jQueryUI Dialog. Additionaly, that
dictionary can contain the following keys:
- - buttons: The buttons key is not propagated to jQueryUI Dialog. It must be a dictionary (key = button label,
- value = click handler) or a list of dictionaries (each element in the dictionary is send to the corresponding
- method of a jQuery element targeting the <button> tag).
+ - buttons: Deprecated. The buttons key is not propagated to jQueryUI Dialog. It must be a dictionary (key = button
+ label, value = click handler) or a list of dictionaries (each element in the dictionary is send to the
+ corresponding method of a jQuery element targeting the <button> tag). It is deprecated because all dialogs
+ in OpenERP must be personalized in some way (button in red, link instead of button, ...) and this
+ feature does not allow that kind of personalization.
- destroy_on_close: Default true. If true and the dialog is closed, it is automatically destroyed.
@param {jQuery object} content Some content to replace this.$el .
*/
@@ -102,9 +104,9 @@ instance.web.Dialog = instance.web.Widget.extend({
this.on("closing", this, this._closing);
this.$buttons = $('<div class="ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"><span class="oe_dialog_custom_buttons"/></div>');
},
- _get_options: function(options) {
+ _get_options: function() {
var self = this;
- var o = _.extend({}, this.dialog_options, options || {});
+ var o = _.extend({}, this.dialog_options);
var sizes = {
width: $(window.top).width(),
height: $(window.top).height(),
@@ -143,12 +145,11 @@ instance.web.Dialog = instance.web.Widget.extend({
/**
Opens the popup. Inits the dialog if it is not already inited.
- @param {dictionary} options Additional options, see the options param in init().
@return this
*/
- open: function(options) {
+ open: function() {
if (!this.dialog_inited) {
- this.init_dialog(options);
+ this.init_dialog();
}
this.$el.dialog('open');
this.$el.dialog("widget").append(this.$buttons);
@@ -173,11 +174,10 @@ instance.web.Dialog = instance.web.Widget.extend({
/**
Initializes the popup.
- @param {dictionary} options Additional options, see the options param in init().
@return The result returned by start().
*/
- init_dialog: function(options) {
- var options = this._get_options(options);
+ init_dialog: function() {
+ var options = this._get_options();
if (options.buttons) {
this._add_buttons(options.buttons);
delete(options.buttons);
@@ -765,20 +765,24 @@ instance.web.ChangePassword = instance.web.Widget.extend({
template: "ChangePassword",
start: function() {
var self = this;
- self.$el.validate({
- submitHandler: function (form) {
- self.rpc("/web/session/change_password",{
- 'fields': $(form).serializeArray()
- }).done(function(result) {
- if (result.error) {
- self.display_error(result);
- return;
- } else {
- instance.webclient.on_logout();
- }
- });
- }
- });
+ this.getParent().dialog_title = "Change Password";
+ var $button = self.$el.find('.oe_form_button');
+ $button.appendTo(this.getParent().$buttons);
+ $button.eq(2).click(function(){
+ self.getParent().close();
+ })
+ $button.eq(0).click(function(){
+ self.rpc("/web/session/change_password",{
+ 'fields': $("form[name=change_password_form]").serializeArray()
+ }).done(function(result) {
+ if (result.error) {
+ self.display_error(result);
+ return;
+ } else {
+ instance.webclient.on_logout();
+ }
+ });
+ })
},
display_error: function (error) {
return instance.web.dialog($('<div>'), {
@@ -1094,7 +1098,7 @@ instance.web.WebClient = instance.web.Client.extend({
start: function() {
var self = this;
return $.when(this._super()).then(function() {
- self.$(".oe_logo").attr("href", $.param.fragment("" + window.location, "", 2));
+ self.$(".oe_logo").attr("href", $.param.fragment("" + window.location, "", 2).slice(0, -1));
if (jQuery.param !== undefined && jQuery.deparam(jQuery.param.querystring()).kitten !== undefined) {
$("body").addClass("kitten-mode-activated");
if ($.blockUI) {
diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js
index 67d5911ee3f..88d45793173 100644
--- a/addons/web/static/src/js/search.js
+++ b/addons/web/static/src/js/search.js
@@ -1924,7 +1924,8 @@ instance.web.search.ExtendedSearchProposition.Integer = instance.web.search.Exte
},
get_value: function() {
try {
- return instance.web.parse_value(this.$el.val(), {'widget': 'integer'});
+ var val =this.$el.val();
+ return instance.web.parse_value(val == "" ? 0 : val, {'widget': 'integer'});
} catch (e) {
return "";
}
@@ -1948,7 +1949,8 @@ instance.web.search.ExtendedSearchProposition.Float = instance.web.search.Extend
},
get_value: function() {
try {
- return instance.web.parse_value(this.$el.val(), {'widget': 'float'});
+ var val =this.$el.val();
+ return instance.web.parse_value(val == "" ? 0.0 : val, {'widget': 'float'});
} catch (e) {
return "";
}
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index 7170bdcec72..b0ad23d6854 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -4238,16 +4238,14 @@ instance.web.form.FieldMany2ManyKanban = instance.web.form.AbstractField.extend(
var self = this;
self.load_view();
- this.is_loaded.done(function() {
- self.on("change:effective_readonly", self, function() {
- self.is_loaded = self.is_loaded.then(function() {
- self.kanban_view.destroy();
- return $.when(self.load_view()).done(function() {
- self.render_value();
- });
+ self.on("change:effective_readonly", self, function() {
+ self.is_loaded = self.is_loaded.then(function() {
+ self.kanban_view.destroy();
+ return $.when(self.load_view()).done(function() {
+ self.render_value();
});
});
- })
+ });
},
set_value: function(value_) {
value_ = value_ || [];
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index d00d8d68b76..b1285684ae4 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -315,26 +315,32 @@
<t t-name="ChangePassword">
<form name="change_password_form" method="POST">
+ <div class="oe_form">
<table align="center">
<tr>
- <td><label for="old_pwd">Old Password:</label></td>
- <td><input type="password" name="old_pwd"
+ <td class="oe_form_group_cell oe_form_group_cell_label"><label for="old_pwd" class="oe_form_label">Old Password:</label></td>
+ <td class="oe_form_group_cell"><input type="password" name="old_pwd"
minlength="1" autofocus="autofocus"/></td>
</tr>
<tr>
- <td><label for="new_password">New Password:</label></td>
- <td><input type="password" name="new_password"
+ <td class="oe_form_group_cell oe_form_group_cell_label"><label for="new_password" class="oe_form_label">New Password:</label></td>
+ <td class="oe_form_group_cell"><input type="password" name="new_password"
minlength="1"/></td>
</tr>
<tr>
- <td><label for="confirm_pwd">Confirm Password:</label></td>
- <td><input type="password" name="confirm_pwd"
+ <td class="oe_form_group_cell oe_form_group_cell_label"><label for="confirm_pwd" class="oe_form_label">Confirm New Password:</label></td>
+ <td class="oe_form_group_cell"><input type="password" name="confirm_pwd"
minlength="1"/></td>
</tr>
<tr>
- <td colspan="2" align="right"><button class="oe_button">Change Password</button></td>
+ <td colspan="2" align="right">
+ <button class='oe_button oe_form_button'>Change Password</button>
+ <span class="oe_fade oe_form_button"> or </span>
+ <button type="button" class="oe_button oe_form_button_cancel oe_form_button oe_link" href="javascript:void(0)"><span>Cancel</span></button>
+ </td>
</tr>
</table>
+ </div>
</form>
</t>
@@ -1597,10 +1603,10 @@
<span/>
</t>
<t t-name="SearchView.extended_search.proposition.integer">
- <input type="number" class="field_integer" step="1"/>
+ <input type="number" class="field_integer" value = "0" step="1"/>
</t>
<t t-name="SearchView.extended_search.proposition.float">
- <input type="number" class="field_float" step="0.01"/>
+ <input type="number" class="field_float" value = "0.0" step="0.01"/>
</t>
<t t-name="SearchView.extended_search.proposition.selection">
<select>