[REM] Removed action rename code in dashboard

bzr revid: fme@openerp.com-20111123220317-8wc7kha3tqdvc2ve
This commit is contained in:
Fabien Meghazi 2011-11-23 23:03:17 +01:00
parent 66d11b95f4
commit e276386511
2 changed files with 0 additions and 27 deletions

View File

@ -45,8 +45,6 @@ openerp.web.form.DashBoard = openerp.web.form.Widget.extend({
}, self.on_load_action);
});
});
//this.$element.find('a.oe-dashboard-action-rename').live('click', this.on_rename);
},
on_undo: function() {
this.rpc('/web/view/undo_custom', {
@ -114,30 +112,6 @@ openerp.web.form.DashBoard = openerp.web.form.Widget.extend({
});
});
},
on_rename : function(e) {
var self = this,
id = parseInt($(e.currentTarget).parents('.oe-dashboard-action:first').attr('data-id'), 10),
$header = $(e.currentTarget).parents('.oe-dashboard-action-header:first'),
$rename = $header.find('a.oe-dashboard-action-rename').hide(),
$title = $header.find('span.oe-dashboard-action-title').hide(),
$input = $header.find('input[name=title]');
$input.val($title.text()).show().focus().bind('keydown', function(e) {
if (e.which == 13 || e.which == 27) {
if (e.which == 13) { //enter
var val = $input.val();
if (!val) {
return false;
}
$title.text(val);
self.actions_attrs[id].string = val;
self.do_save_dashboard();
}
$input.unbind('keydown').hide();
$rename.show();
$title.show();
}
});
},
on_change_layout: function() {
var self = this;
var qdict = {

View File

@ -31,7 +31,6 @@
<t t-name="DashBoard.action">
<div t-att-data-id="action.attrs.name" class="oe-dashboard-action">
<h2 t-attf-class="oe-dashboard-action-header #{action.attrs.string ? '' : 'oe-dashboard-action-header-empty'}">
<input class="oe-dashboard-action-input" type="text" name="title" value="" style="display: none"/>
<t t-esc="action.attrs.string"/>
<t t-if="!action.attrs.string">&amp;nbsp;</t>
<span class='ui-icon ui-icon-closethick'></span>