- Скрипты
- Добавил: dodge
- Дата: 19.07.2011
- Просмотров: 329
- Загрузок: 0
Скрипт, наконец, осуществляет оправку
предупреждения в
ЛС. Надо сказать то, что это сообщение будет так
сказать выделено красноватым. Необходимо подчеркнуть то, что
подробности и установка в полной анонсы.
Установка:
Дизайн - Личные сообщения - После
$BODY$ ставим
Code
<style>.predup{border:2px solid
#cc6a6a;padding:6px;background:#f7f7f7;color:black;margin:5px;}.predup
b{color:red;}</style>
<script>
$('td[colspan="2"]').each(function(){$(this).html($(this).html().split('[predup]').join('<div
class="predup"><b>Предупреждение:</b>
').split('[/predup]').join('</div>'));});
$("a:contains('Предупреждение')").css('color','red');
</script>
Дизайн - Форум - Вид материалов,
где хотим видеть кнопку
ставим: Code
<span
style="float:left"><a href="javascript://"
onclick="send_uwnd()"> <img
src="http://multi-rip.ru/new_shablon/other/warning.png"
style="width:13px;height:13px;"> </a></span>
<style>#send_img,#send_ok{display:none}#send_img{margin-top:4px;}#send_ok{margin-top:3px;color:green}#send_img_er{display:none;margin-top:1px;}</style>
<script>
var
send_but = _uButton('', 'b', {style: 3,text:
'<b>Отправить</b>',content: 'onclick="send_ban()"'});
function
send_uwnd(){new _uWnd('send_ban_ls', 'Отправка предупреждения', 320,
250, {close:1,autosize:1,maxh:400,minh:100},
'<fieldset><legend><small>Текст
сообщения</small></legend><textarea maxlength="200"
id="text_send"
style="height:80px;width:280px;"></textarea></fieldset><fieldset><span
style="float:left;" id="send_ok">Успешно
отправлено!</span><span style="float:left;"><img
id="send_img_er" src="/.s/img/icon/er.png"><img id="send_img"
src="http://multi-rip.ru/new_shablon/other/loading.gif"></span><span
style="float:right;">' +send_but+
'</span></fieldset>')}
function
send_ban(){if($('#text_send').val().length<5){$('#send_img_er').show();setTimeout(function(){$('#send_img_er').fadeOut('slow');},
800);}else{$('#send_img').show();$.get('/index/14-0-0-1',
function(data){$.post('/index/14-0-0-1', {a: '18', s: '$USERNAME$',
subject: 'Предупреждение', message: '[predup]' + $('#text_send').val() +
'[/predup]', ssid: $('input[name="ssid"]', data).val()},
function(){$('#send_img').hide();$('#send_ok').show();setTimeout(function(){_uWnd.close('send_ban_ls')},
1000);})})}}
</script>