task_title = obj.innerHTML;
task_oid = obj.parentNode.children[0].children[0].value;
- var input = document.createElement('input');
- input.value = obj.innerHTML
- input.style.fontSize = '100%';
- input.style.width = '100%';
- input.style.background = 'yellow';
-
+ var input = $('<input>');
+ input.val(obj.innerHTML.replace('>', '>').replace('<', '<').replace('&', '&'));
+ input.css('fontSize', '100%').css('width', '100%').css('background', 'yellow');
obj.innerHTML = '';
- obj.appendChild(input);
+ $(obj).append(input);
input.focus();
}
}
if (!task_parent) return;
if (task_parent.children[0].value != task_title)
- ajax_request('save','oid='+task_oid+'&task='+encodeURIComponent(task_parent.children[0].value));
+ $.invoke('Sales/Text', {id: task_oid, text: task_parent.children[0].value});
task_parent.innerHTML = task_parent.children[0].value;
task_parent = null;