diff options
| author | niv-openerp <nicolas.vanhoren@openerp.com> | 2013-07-25 12:07:49 +0200 |
|---|---|---|
| committer | niv-openerp <nicolas.vanhoren@openerp.com> | 2013-07-25 12:07:49 +0200 |
| commit | 42e493e73efd603002feb92703a82f34c6bc6aea (patch) | |
| tree | 32a49385764688e013f12d849231996c9d8f0358 /addons/web/static/src/js/views.js | |
| parent | b105770bbc0f545a4dfd0482b5b310f534fc1033 (diff) | |
Added Gruntfile with jshint and corrected most js errors
bzr revid: nicolas.vanhoren@openerp.com-20130725100749-0i82gf3k3nvt4r44
Diffstat (limited to 'addons/web/static/src/js/views.js')
| -rw-r--r-- | addons/web/static/src/js/views.js | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js index 48a108b2f01..fc67c7da24d 100644 --- a/addons/web/static/src/js/views.js +++ b/addons/web/static/src/js/views.js @@ -49,7 +49,7 @@ instance.web.ActionManager = instance.web.Widget.extend({ if (last) { last.hide(); } - var item = _.extend({ + item = _.extend({ show: function(index) { this.widget.$el.show(); }, @@ -423,7 +423,7 @@ instance.web.ActionManager = instance.web.Widget.extend({ if (!(ClientWidget.prototype instanceof instance.web.Widget)) { var next; - if (next = ClientWidget(this, action)) { + if ((next = ClientWidget(this, action))) { return this.do_action(next, options); } return $.when(); @@ -677,7 +677,7 @@ instance.web.ViewManager = instance.web.Widget.extend({ this.$el.find('.oe_view_title_text:first').text(title); }, add_breadcrumb: function(options) { - var options = options || {}; + options = options || {}; var self = this; var views = [this.active_view || this.views_src[0].view_type]; this.on('switch_mode', self, function(mode) { @@ -958,7 +958,6 @@ instance.web.ViewManagerAction = instance.web.ViewManager.extend({ view_type : 'list', view_mode : 'list' }); - break; case 'edit': this.do_edit_resource($option.data('model'), $option.data('id'), { name : $option.text() }); break; @@ -1000,7 +999,7 @@ instance.web.ViewManagerAction = instance.web.ViewManager.extend({ evt.currentTarget.selectedIndex = 0; }, do_edit_resource: function(model, id, action) { - var action = _.extend({ + action = _.extend({ res_model : model, res_id : id, type : 'ir.actions.act_window', @@ -1038,7 +1037,7 @@ instance.web.ViewManagerAction = instance.web.ViewManager.extend({ }, get_action_manager: function() { var cur = this; - while (cur = cur.getParent()) { + while ((cur = cur.getParent())) { if (cur instanceof instance.web.ActionManager) { return cur; } @@ -1176,7 +1175,7 @@ instance.web.Sidebar = instance.web.Widget.extend({ var self = this; self.getParent().sidebar_eval_context().done(function (sidebar_eval_context) { var ids = self.getParent().get_selected_ids(); - if (ids.length == 0) { + if (ids.length === 0) { instance.web.dialog($("<div />").text(_t("You must choose at least one record.")), { title: _t("Warning"), modal: true }); return false; } |
