add rename of an item. caveat, does not rename dependent leafs yet

This commit is contained in:
Klaus Leithoff 2013-04-29 14:58:29 +00:00
parent 035e4b32b6
commit efd4d85143
2 changed files with 14 additions and 1 deletions

View File

@ -182,10 +182,10 @@ var et2_dataview_selectionManager = Class.extend(
false));
this._focusedEntry = null;
}
// Mark the new given uid as focused
if (_focused)
{
console.log('et2_dataview_controller_selection::setFocused -> UID:'+_uid+' is focused by:'+this._actionObjectManager.name);
var entry = this._focusedEntry = this._getRegisteredRowsEntry(_uid);
this._updateEntryState(entry,
egwSetBit(entry.state, EGW_AO_STATE_FOCUSED, true));

View File

@ -391,6 +391,19 @@ var et2_tree = et2_inputWidget.extend(
}
},
/**
* renameItem, renames an item by id
* @param _id ID of the node
* @param _newid ID of the node
* @param _label label to set
* @return void
*/
renameItem: function(_id, _newItemId, _label) {
if(this.input == null) return null;
this.input.changeItemId(_id,_newItemId);
if (typeof _label != 'undefined') this.input.setItemText(_newItemId,_label);
},
/**
* setLabel, sets the Label of of an item by id
* @param _id ID of the node