HESK v3.2.4
This commit is contained in:
@@ -11,26 +11,24 @@
|
||||
*/
|
||||
|
||||
function hesk_insertTag(tag) {
|
||||
var text_to_insert = '%%'+tag+'%%';
|
||||
hesk_insertAtCursor(document.form1.msg, text_to_insert);
|
||||
document.form1.message.focus();
|
||||
var text_to_insert = '%%'+tag+'%%';
|
||||
hesk_insertAtCursor(document.form1.msg, text_to_insert);
|
||||
document.form1.msg.focus();
|
||||
}
|
||||
|
||||
function hesk_insertAtCursor(myField, myValue) {
|
||||
if (document.selection) {
|
||||
myField.focus();
|
||||
sel = document.selection.createRange();
|
||||
sel.text = myValue;
|
||||
}
|
||||
else if (myField.selectionStart || myField.selectionStart == '0') {
|
||||
var startPos = myField.selectionStart;
|
||||
var endPos = myField.selectionEnd;
|
||||
myField.value = myField.value.substring(0, startPos)
|
||||
+ myValue
|
||||
+ myField.value.substring(endPos, myField.value.length);
|
||||
} else {
|
||||
myField.value += myValue;
|
||||
}
|
||||
if (document.selection) {
|
||||
myField.focus();
|
||||
sel = document.selection.createRange();
|
||||
sel.text = myValue;
|
||||
} else if (myField.selectionStart || myField.selectionStart == '0') {
|
||||
var startPos = myField.selectionStart;
|
||||
var endPos = myField.selectionEnd;
|
||||
myField.value = myField.value.substring(0, startPos) + myValue + myField.value.substring(endPos, myField.value.length);
|
||||
myField.selectionStart = startPos + myValue.length; myField.selectionEnd = startPos + myValue.length;
|
||||
} else {
|
||||
myField.value += myValue;
|
||||
}
|
||||
}
|
||||
|
||||
function hesk_changeAll(myID) {
|
||||
|
||||
Reference in New Issue
Block a user