+28
-31
@@ -18,7 +18,7 @@ function bodyLoaded() {
|
||||
|
||||
while (i !== -1) {
|
||||
if (sml[i] !== undefined) {
|
||||
j += `<img style="cursor:pointer" onclick="chat.addSmile(\'${sml[i]}\')" src="https://${c.img}/i/smile/${sml[i]}.gif" width="${sml[i + 1]}" height="${sml[i + 2]}" title=":${sml[i]}:"/> `;
|
||||
j += `<img style="cursor:pointer" onclick="chat.addSmile(\'${sml[i]}\')" src="${c.img2}/i/smile/${sml[i]}.gif" width="${sml[i + 1]}" height="${sml[i + 2]}" title=":${sml[i]}:"/> `;
|
||||
} else i = -4;
|
||||
i += 3;
|
||||
}
|
||||
@@ -53,7 +53,7 @@ function startEngine() {
|
||||
});
|
||||
resizeFinish();
|
||||
//Добавляем действия
|
||||
var i = 0;
|
||||
let i = 0;
|
||||
while (i !== -1) {
|
||||
if ($(`#chcf${i}`).attr('id') != undefined) {
|
||||
$(`#chcf${i}`).change(function () {
|
||||
@@ -471,7 +471,7 @@ var win = {
|
||||
wsdr: null,
|
||||
scor: {}, //начальные координаты
|
||||
openw: function (id, title, text, date, type, style) {
|
||||
if ($(`#win_${id}`).attr('id') == undefined) {
|
||||
if (!$(`#win_${id}`).attr('id')) {
|
||||
//Создаем новое окно
|
||||
this.add(id, title, text, date, type, 1, '');
|
||||
}
|
||||
@@ -485,8 +485,8 @@ var win = {
|
||||
},
|
||||
WmoveDrag: function (e) {
|
||||
//Сохраняем начальные координаты
|
||||
var x = mousePageXY(e)['x'], y = mousePageXY(e)['y'];
|
||||
if (this.scor.x == undefined) {
|
||||
let x = mousePageXY(e)['x'], y = mousePageXY(e)['y'];
|
||||
if (!this.scor.x) {
|
||||
this.scor.x = x;
|
||||
this.scor.y = y;
|
||||
this.scor.x2 = unpx($(`#win_${this.wsdr}`).css('left'));
|
||||
@@ -516,27 +516,27 @@ var win = {
|
||||
this.scor = {};
|
||||
},
|
||||
add: function (id, title, text, date, type, style, css) {
|
||||
var nw = '';
|
||||
if ($(`#win_${id}`).attr('id') == undefined) {
|
||||
var acts = {};
|
||||
let nw = '';
|
||||
if (!$(`#win_${id}`).attr('id')) {
|
||||
const acts = {};
|
||||
|
||||
if (date.usewin != undefined) {
|
||||
if (date.usewin) {
|
||||
acts[0] = `onmouseup="${date.usewin}"`;
|
||||
} else {
|
||||
date.usewin = '';
|
||||
}
|
||||
|
||||
if (date.closewin != undefined) {
|
||||
if (date.closewin) {
|
||||
acts[9] = date.closewin;
|
||||
} else {
|
||||
date.closewin = '';
|
||||
}
|
||||
|
||||
//нижняя часть
|
||||
if (date.n != undefined) {
|
||||
if (date.n) {
|
||||
text += `<div style="margin-left:11px;">${date.n}</div>`;
|
||||
}
|
||||
var kyps = ['', ''];
|
||||
const kyps = ['', ''];
|
||||
//Вывод главных данных
|
||||
if (type == 0) {
|
||||
nw = text;
|
||||
@@ -549,11 +549,11 @@ var win = {
|
||||
kyps[0] = `${date.a1};top.win.closew(\\\'${id}\\\');${acts[9]}top.win.addaction(0,\\\'\\\');`;
|
||||
} else if (type == 3) {
|
||||
//Да \ Нет , изображения
|
||||
var stylebtn = '';
|
||||
let stylebtn = '';
|
||||
if (style > 1) {
|
||||
stylebtn = style;
|
||||
}
|
||||
nw = `<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td>${text}</td><td width="40" align="center" valign="middle"><img class="prmimgyn" style="margin-top:5px;cursor:pointer" onClick="${date.a1};win.closew(\'${id}\');" src="https://${c.img}/i/b__ok${stylebtn}.gif" width="25" height="18"><br><img onClick="win.closew(\'${id}\')" class="prmimgyn" style="cursor:pointer;margin-top:2px;" src="https://${c.img}/i/b__cancel${stylebtn}.jpg" width="25" height="18"></td></tr></table>`;
|
||||
nw = `<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td>${text}</td><td width="40" align="center" valign="middle"><img class="prmimgyn" style="margin-top:5px;cursor:pointer" onClick="${date.a1};win.closew(\'${id}\');" src="${c.img2}/i/b__ok${stylebtn}.gif" width="25" height="18"><br><img onClick="win.closew(\'${id}\')" class="prmimgyn" style="cursor:pointer;margin-top:2px;" src="${c.img2}/i/b__cancel${stylebtn}.jpg" width="25" height="18"></td></tr></table>`;
|
||||
kyps[0] = `${date.a1};top.win.closew(\\\'${id}\\\');${acts[9]}top.win.addaction(0,\\\'\\\');`;
|
||||
} else if (type == 4) {
|
||||
//Тройной блок
|
||||
@@ -561,46 +561,46 @@ var win = {
|
||||
}
|
||||
|
||||
//Если есть вторая информация
|
||||
if (date.d != undefined) {
|
||||
if (date.d) {
|
||||
nw = nw + date.d;
|
||||
}
|
||||
|
||||
nw = `<div style="margin:2px;${css}">${nw}</div>`;
|
||||
|
||||
//Заголовок окна
|
||||
if (title != '') {
|
||||
if (date.a3 == undefined) {
|
||||
if (title) {
|
||||
if (date.a3 === undefined) {
|
||||
date.a3 = '';
|
||||
}
|
||||
if (acts[9] == undefined) {
|
||||
if (acts[9] === undefined) {
|
||||
acts[9] = '';
|
||||
}
|
||||
nw = `<div class="wi${style}s10" onselectstart="return false">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td rowspan="2" style="cursor:move" onmousedown="win.WstartDrag(\'${id}\')" ${acts[0]}><b>${title}</b></td>
|
||||
<td width="15" align="right"><img style="display:block" onClick="win.closew(\'${id}\');${acts[9]}${date.a3}" src="https://${c.img}/i/clear.gif" width="13" height="13"></td>
|
||||
<td width="15" align="right"><img style="display:block" onClick="win.closew(\'${id}\');${acts[9]}${date.a3}" src="${c.img2}/i/clear.gif" width="13" height="13"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>${nw}`;
|
||||
}
|
||||
|
||||
//Собираем каркас
|
||||
nw = `<table onclick="top.win.addaction(0,\'${kyps[0]}\')" border="0" cellspacing="0" cellpadding="0">
|
||||
nw = `<table onclick="top.win.addaction(0,'${kyps[0]}')" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td class="wi${style}s0"><div><img src="//img.new-combats.tech/1x1.gif" width="1" height="1"></div></td>
|
||||
<td class="wi${style}s0"><div><img src="${c.img2}/1x1.gif" width="1" height="1"></div></td>
|
||||
<td class="wi${style}s1"></td>
|
||||
<td class="wi${style}s2"><div><img src="//img.new-combats.tech/1x1.gif" width="1" height="1"></div></td>
|
||||
<td class="wi${style}s2"><div><img src="${c.img2}/1x1.gif" width="1" height="1"></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="wi${style}s3"><img src="https://${c.img}/1x1.gif" width="5" height="1"></td>
|
||||
<td class="wi${style}s3"><img src="${c.img2}/1x1.gif" width="5" height="1"></td>
|
||||
<td class="wi${style}s7" id="win_main_${id}">${nw}</td>
|
||||
<td class="wi${style}s4"><img src="https://${c.img}/1x1.gif" width="5" height="1"></td>
|
||||
<td class="wi${style}s4"><img src="${c.img2}/1x1.gif" width="5" height="1"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="wi${style}s5"><div><img src="//img.new-combats.tech/1x1.gif" width="1" height="1"></div></td>
|
||||
<td class="wi${style}s5"><div><img src="${c.img2}/1x1.gif" width="1" height="1"></div></td>
|
||||
<td class="wi${style}s6"></td>
|
||||
<td class="wi${style}s8"><div><img src="//img.new-combats.tech/1x1.gif" width="1" height="1"></div><div id="win_a_${id}" class="wi${style}s9"></div></td>
|
||||
<td class="wi${style}s8"><div><img src="${c.img2}/1x1.gif" width="1" height="1"></div><div id="win_a_${id}" class="wi${style}s9"></div></td>
|
||||
</tr>
|
||||
</table>`;
|
||||
|
||||
@@ -609,13 +609,10 @@ var win = {
|
||||
|
||||
$('#windows').html($('#windows').html() + nw);
|
||||
$(`#win_${id}`).center();
|
||||
if (type == 2 || type == 3) {
|
||||
if (type == 2) {
|
||||
$(`#winyesbtnfox${id}`).focus();
|
||||
}
|
||||
if (type == 2) {
|
||||
$(`#winyesbtnfox${id}`).focus();
|
||||
}
|
||||
}
|
||||
delete nw;
|
||||
},
|
||||
addaction: function (nm, vl) {
|
||||
key_actions[nm] = vl;
|
||||
|
||||
Reference in New Issue
Block a user