[IMP] : patch getDir function to serve files

[REM] : remove jscolor route and replace it with JS
This commit is contained in:
Adil Houmadi
2015-03-02 14:48:03 +01:00
committed by Enric Tobella
parent 8554dc9f93
commit 0fc48ded31
3 changed files with 9 additions and 62 deletions

View File

@@ -1,5 +1,14 @@
openerp.web_widget_color = function (instance) {
var _super_getDir = jscolor.getDir.prototype;
jscolor.getDir = function () {
var dir = _super_getDir.constructor();
if (dir.indexOf('web_widget_color') === -1) {
jscolor.dir = 'web_widget_color/static/lib/jscolor/';
}
return jscolor.dir;
};
instance.web.form.widgets.add('color', 'instance.web.form.FieldColor');
instance.web.search.fields.add('color', 'instance.web.search.CharField');