- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
function BBCalign(value) {
var txtarea = document.post.message;
if ((clientVer >= 4) && is_ie && is_win) {
theSelection = document.selection.createRange().text;
if (theSelection != '') {
document.selection.createRange().text = "[align="+value+"]" + theSelection + "[/align]";
document.post.message.focus();
return;
}
}
else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0))
{
mozWrap(txtarea, "[align="+value+"]", "[/align]");
return;
}
if (value == 'justify')
{
if (justify == 0) {
ToAdd = "[align=justify]";
$(document.post.justify).addClass('bold');
justify = 1;
} else {
ToAdd = "[/align]";
$(document.post.justify).removeClass('bold');
justify = 0;
}
}
else if (value == 'right')
{
if (right == 0) {
ToAdd = "[align=right]";
$(document.post.right).addClass('bold');
right = 1;
} else {
ToAdd = "[/align]";
$(document.post.right).removeClass('bold');
right = 0;
}
}
else if (value == 'center')
{
if (center == 0) {
ToAdd = "[align=center]";
$(document.post.center).addClass('bold');
center = 1;
} else {
ToAdd = "[/align]";
$(document.post.center).removeClass('bold');
center = 0;
}
}
else if (value == 'left')
{
if (left == 0) {
ToAdd = "[align=left]";
$(document.post.left).addClass('bold');
left = 1;
} else {
ToAdd = "[/align]";
$(document.post.left).removeClass('bold');
left = 0;
}
}
mozWrap2(txtarea, ToAdd);
}
Комментарии (0) RSS
Добавить комментарий