[IMP] add mouseover event for be able to drag and drop field within a export list.

bzr revid: ysa@tinyerp.com-20110712131221-wcxsfq0u5fovv088
This commit is contained in:
Yogesh (OpenERP) 2011-07-12 18:42:21 +05:30
parent 5ad4baccf6
commit 2c1473cdad
2 changed files with 11 additions and 1 deletions

View File

@ -101,6 +101,16 @@ openerp.base_export.Export = openerp.base.Controller.extend({
self.selected_field_id = this.id;
self.selected_field_str = this.text;
});
jQuery($.find('#fields_list')).mouseover(function(event){
if(event.relatedTarget){
if ('id' in event.relatedTarget.attributes && 'string' in event.relatedTarget.attributes){
field_id = event.relatedTarget.attributes["id"]["value"]
if (field_id && field_id.split("-")[0] == 'export'){
self.add_field(event.relatedTarget.attributes['id']["value"], event.relatedTarget.attributes["string"]["value"]);
}
}
}
});
},
// show & hide the contents

View File

@ -95,7 +95,7 @@
</t>
</td>
<td valign="top" align="left" style="cursor: pointer;">
<a t-att-id="'export-' + field.id" href="javascript: void(0)" style="text-decoration: none;" class="row">
<a t-att-id="'export-' + field.id" t-att-string="field.string" href="javascript: void(0)" style="text-decoration: none;" class="row">
<t t-esc="field.string"/>
</a>
</td>