diff options
| author | Antony Lesuisse <al@openerp.com> | 2013-12-03 20:21:51 +0100 |
|---|---|---|
| committer | Antony Lesuisse <al@openerp.com> | 2013-12-03 20:21:51 +0100 |
| commit | d699b9253a9e321458bf6eccc9bb9f4de923dfba (patch) | |
| tree | dacc5f73d86672eb457ccf8878a28241ffae8628 /addons/web/static/src | |
| parent | bab3b3b8d4a2731e74bcd2b2f28301455d563534 (diff) | |
| parent | 4c45774b6d87eafa7b5c1b006894b5f3339d64b2 (diff) | |
[MERGE] trunk
bzr revid: al@openerp.com-20131203192151-szbvhmanml37a9si
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/core.js | 2 | ||||
| -rw-r--r-- | addons/web/static/src/js/search.js | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/addons/web/static/src/js/core.js b/addons/web/static/src/js/core.js index d62c04b0ecb..81e029f5f87 100644 --- a/addons/web/static/src/js/core.js +++ b/addons/web/static/src/js/core.js @@ -561,8 +561,8 @@ instance.web.TranslationDataBase.include({ }); /** Custom jQuery plugins */ +$.browser = $.browser || {}; if(navigator.appVersion.indexOf("MSIE") !== -1) { - $.browser = $.browser || {}; $.browser.msie = 1; } $.fn.getAttributes = function() { diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js index fcfcfb08f8e..c3ef682bfcc 100644 --- a/addons/web/static/src/js/search.js +++ b/addons/web/static/src/js/search.js @@ -71,7 +71,10 @@ my.SearchQuery = B.Collection.extend({ }, add: function (values, options) { options = options || {}; - if (!(values instanceof Array)) { + + if (!values) { + values = []; + } else if (!(values instanceof Array)) { values = [values]; } @@ -87,6 +90,10 @@ my.SearchQuery = B.Collection.extend({ } B.Collection.prototype.add.call(this, model, options); }, this); + // warning: in backbone 1.0+ add is supposed to return the added models, + // but here toggle may delegate to add and return its value directly. + // return value of neither seems actually used but should be tested + // before change, probably return this; }, toggle: function (value, options) { |
