2017-01-31 05:13:38 +00:00
|
|
|
var form_vars = {};
|
2017-06-10 07:58:15 +00:00
|
|
|
var alertList = [];
|
|
|
|
var alertCount = 0;
|
2017-06-12 09:03:14 +00:00
|
|
|
var conn;
|
2017-01-31 05:13:38 +00:00
|
|
|
|
2016-12-02 07:38:54 +00:00
|
|
|
function post_link(event)
|
|
|
|
{
|
|
|
|
event.preventDefault();
|
|
|
|
var form_action = $(event.target).closest('a').attr("href");
|
2017-02-16 06:47:55 +00:00
|
|
|
//console.log("Form Action: " + form_action);
|
2017-03-01 11:36:50 +00:00
|
|
|
$.ajax({ url: form_action, type: "POST", dataType: "json", data: {js: "1"} });
|
2016-12-02 07:38:54 +00:00
|
|
|
}
|
|
|
|
|
2017-03-03 16:28:49 +00:00
|
|
|
function load_alerts(menu_alerts)
|
|
|
|
{
|
|
|
|
menu_alerts.find(".alert_counter").text("");
|
|
|
|
$.ajax({
|
|
|
|
type: 'get',
|
|
|
|
dataType: 'json',
|
|
|
|
url:'/api/?action=get&module=alerts&format=json',
|
|
|
|
success: function(data) {
|
|
|
|
if("errmsg" in data) {
|
|
|
|
menu_alerts.find(".alertList").html("<div class='alertItem'>"+data.errmsg+"</div>");
|
|
|
|
return;
|
|
|
|
}
|
2017-05-29 14:52:37 +00:00
|
|
|
|
2017-03-03 16:28:49 +00:00
|
|
|
var alist = "";
|
2017-06-05 11:57:27 +00:00
|
|
|
var anyAvatar = false
|
2017-03-03 16:28:49 +00:00
|
|
|
for(var i in data.msgs) {
|
|
|
|
var msg = data.msgs[i];
|
|
|
|
var mmsg = msg.msg;
|
2017-05-29 14:52:37 +00:00
|
|
|
|
2017-03-03 16:28:49 +00:00
|
|
|
if("sub" in msg) {
|
|
|
|
for(var i = 0; i < msg.sub.length; i++) {
|
|
|
|
mmsg = mmsg.replace("\{"+i+"\}", msg.sub[i]);
|
2017-06-05 11:57:27 +00:00
|
|
|
//console.log("Sub #" + i);
|
|
|
|
//console.log(msg.sub[i]);
|
2017-03-03 16:28:49 +00:00
|
|
|
}
|
|
|
|
}
|
2017-05-29 14:52:37 +00:00
|
|
|
|
2017-06-10 07:58:15 +00:00
|
|
|
if("avatar" in msg) {
|
2017-06-06 08:47:33 +00:00
|
|
|
alist += "<div class='alertItem withAvatar' style='background-image:url(\""+msg.avatar+"\");'><a class='text' href=\""+msg.path+"\">"+mmsg+"</a></div>";
|
2017-06-10 07:58:15 +00:00
|
|
|
alertList.push("<div class='alertItem withAvatar' style='background-image:url(\""+msg.avatar+"\");'><a class='text' href=\""+msg.path+"\">"+mmsg+"</a></div>");
|
2017-06-05 11:57:27 +00:00
|
|
|
anyAvatar = true
|
2017-06-10 07:58:15 +00:00
|
|
|
} else {
|
|
|
|
alist += "<div class='alertItem'><a href=\""+msg.path+"\" class='text'>"+mmsg+"</a></div>";
|
|
|
|
alertList.push("<div class='alertItem'><a href=\""+msg.path+"\" class='text'>"+mmsg+"</a></div>");
|
2017-03-03 16:28:49 +00:00
|
|
|
}
|
2017-06-05 11:57:27 +00:00
|
|
|
//console.log(msg);
|
2017-03-03 16:28:49 +00:00
|
|
|
//console.log(mmsg);
|
|
|
|
}
|
2017-05-29 14:52:37 +00:00
|
|
|
|
|
|
|
if(alist == "") alist = "<div class='alertItem'>You don't have any alerts</div>";
|
2017-06-05 11:57:27 +00:00
|
|
|
else {
|
|
|
|
//menu_alerts.removeClass("hasAvatars");
|
|
|
|
//if(anyAvatar) menu_alerts.addClass("hasAvatars");
|
2017-03-03 16:28:49 +00:00
|
|
|
}
|
2017-06-05 11:57:27 +00:00
|
|
|
menu_alerts.find(".alertList").html(alist);
|
2017-06-10 07:58:15 +00:00
|
|
|
if(data.msgCount != 0) menu_alerts.find(".alert_counter").text(data.msgCount);
|
|
|
|
alertCount = data.msgCount;
|
2017-03-03 16:28:49 +00:00
|
|
|
},
|
|
|
|
error: function(magic,theStatus,error) {
|
|
|
|
try {
|
|
|
|
var data = JSON.parse(magic.responseText);
|
2017-06-05 11:57:27 +00:00
|
|
|
if("errmsg" in data) errtxt = data.errmsg;
|
2017-05-29 14:52:37 +00:00
|
|
|
else errtxt = "Unable to get the alerts";
|
2017-06-10 07:58:15 +00:00
|
|
|
} catch(err) {
|
|
|
|
errtxt = "Unable to get the alerts";
|
|
|
|
console.log(magic.responseText);
|
|
|
|
console.log(err);
|
|
|
|
}
|
2017-03-03 16:28:49 +00:00
|
|
|
menu_alerts.find(".alertList").html("<div class='alertItem'>"+errtxt+"</div>");
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2016-12-02 07:38:54 +00:00
|
|
|
$(document).ready(function(){
|
2017-05-11 13:04:43 +00:00
|
|
|
function SplitN(data,ch,n) {
|
2017-05-29 14:52:37 +00:00
|
|
|
var out = [];
|
|
|
|
if(data.length == 0) return out;
|
|
|
|
|
|
|
|
var lastIndex = 0;
|
|
|
|
var j = 0;
|
|
|
|
var lastN = 1;
|
2017-05-11 13:04:43 +00:00
|
|
|
for(var i = 0; i < data.length; i++) {
|
|
|
|
if(data[i] == ch) {
|
2017-05-29 14:52:37 +00:00
|
|
|
out[j++] = data.substring(lastIndex,i);
|
|
|
|
lastIndex = i;
|
|
|
|
if(lastN == n) break;
|
|
|
|
lastN++;
|
2017-05-11 13:04:43 +00:00
|
|
|
}
|
|
|
|
}
|
2017-06-10 07:58:15 +00:00
|
|
|
if(data.length > lastIndex) out[out.length - 1] += data.substring(lastIndex);
|
2017-05-29 14:52:37 +00:00
|
|
|
return out;
|
2017-05-11 13:04:43 +00:00
|
|
|
}
|
2017-05-29 14:52:37 +00:00
|
|
|
|
2017-05-11 13:04:43 +00:00
|
|
|
if(window["WebSocket"]) {
|
2017-05-29 14:52:37 +00:00
|
|
|
conn = new WebSocket("ws://" + document.location.host + "/ws/");
|
2017-05-11 13:04:43 +00:00
|
|
|
conn.onopen = function() {
|
2017-05-29 14:52:37 +00:00
|
|
|
conn.send("page " + document.location.pathname + '\r');
|
2017-05-11 13:04:43 +00:00
|
|
|
}
|
|
|
|
conn.onclose = function() {
|
2017-05-29 14:52:37 +00:00
|
|
|
conn = false;
|
2017-05-11 13:04:43 +00:00
|
|
|
}
|
|
|
|
conn.onmessage = function(event) {
|
2017-06-10 07:58:15 +00:00
|
|
|
//console.log("WS_Message: ",event.data);
|
|
|
|
if(event.data[0] == "{") {
|
|
|
|
try {
|
|
|
|
var data = JSON.parse(event.data);
|
|
|
|
} catch(err) { console.log(err); }
|
|
|
|
|
|
|
|
if ("msg" in data) {
|
|
|
|
var msg = data.msg
|
|
|
|
if("sub" in data) {
|
|
|
|
for(var i = 0; i < data.sub.length; i++) {
|
|
|
|
msg = msg.replace("\{"+i+"\}", data.sub[i]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if("avatar" in data) alertList.push("<div class='alertItem withAvatar' style='background-image:url(\""+data.avatar+"\");'><a class='text' href=\""+data.path+"\">"+msg+"</a></div>");
|
|
|
|
else alertList.push("<div class='alertItem'><a href=\""+data.path+"\" class='text'>"+msg+"</a></div>");
|
|
|
|
if(alertList.length > 8) alertList.shift();
|
|
|
|
//console.log("post alertList",alertList);
|
|
|
|
alertCount++;
|
|
|
|
|
|
|
|
var alist = ""
|
|
|
|
for (var i = 0; i < alertList.length; i++) {
|
|
|
|
alist += alertList[i];
|
|
|
|
}
|
|
|
|
|
|
|
|
//console.log(alist);
|
|
|
|
$("#general_alerts").find(".alertList").html(alist); // Add support for other alert feeds like PM Alerts
|
|
|
|
$("#general_alerts").find(".alert_counter").text(alertCount);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-05-29 14:52:37 +00:00
|
|
|
var messages = event.data.split('\r');
|
2017-05-11 13:04:43 +00:00
|
|
|
for(var i = 0; i < messages.length; i++) {
|
2017-05-29 14:52:37 +00:00
|
|
|
//console.log("Message:");
|
|
|
|
//console.log(messages[i]);
|
2017-05-11 13:04:43 +00:00
|
|
|
if(messages[i].startsWith("set ")) {
|
2017-05-29 14:52:37 +00:00
|
|
|
//msgblocks = messages[i].split(' ',3);
|
|
|
|
msgblocks = SplitN(messages[i]," ",3);
|
2017-06-05 11:57:27 +00:00
|
|
|
if(msgblocks.length < 3) continue;
|
2017-05-29 14:52:37 +00:00
|
|
|
document.querySelector(msgblocks[1]).innerHTML = msgblocks[2];
|
2017-05-11 13:04:43 +00:00
|
|
|
} else if(messages[i].startsWith("set-class ")) {
|
2017-05-29 14:52:37 +00:00
|
|
|
msgblocks = SplitN(messages[i]," ",3);
|
2017-06-05 11:57:27 +00:00
|
|
|
if(msgblocks.length < 3) continue;
|
2017-05-29 14:52:37 +00:00
|
|
|
document.querySelector(msgblocks[1]).className = msgblocks[2];
|
2017-05-11 13:04:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-06-05 11:57:27 +00:00
|
|
|
else conn = false;
|
2017-05-29 14:52:37 +00:00
|
|
|
|
2016-12-02 07:38:54 +00:00
|
|
|
$(".open_edit").click(function(event){
|
2017-02-16 06:47:55 +00:00
|
|
|
//console.log("Clicked on edit");
|
2016-12-02 07:38:54 +00:00
|
|
|
event.preventDefault();
|
|
|
|
$(".hide_on_edit").hide();
|
|
|
|
$(".show_on_edit").show();
|
|
|
|
});
|
2017-05-29 14:52:37 +00:00
|
|
|
|
2017-01-31 05:13:38 +00:00
|
|
|
$(".topic_item .submit_edit").click(function(event){
|
2016-12-02 07:38:54 +00:00
|
|
|
event.preventDefault();
|
|
|
|
$(".topic_name").html($(".topic_name_input").val());
|
|
|
|
$(".topic_content").html($(".topic_content_input").val());
|
|
|
|
$(".topic_status_e:not(.open_edit)").html($(".topic_status_input").val());
|
2017-05-29 14:52:37 +00:00
|
|
|
|
2016-12-02 07:38:54 +00:00
|
|
|
$(".hide_on_edit").show();
|
|
|
|
$(".show_on_edit").hide();
|
2017-05-29 14:52:37 +00:00
|
|
|
|
2016-12-02 07:38:54 +00:00
|
|
|
var topic_name_input = $('.topic_name_input').val();
|
|
|
|
var topic_status_input = $('.topic_status_input').val();
|
|
|
|
var topic_content_input = $('.topic_content_input').val();
|
|
|
|
var form_action = $(this).closest('form').attr("action");
|
2017-02-16 06:47:55 +00:00
|
|
|
//console.log("New Topic Name: " + topic_name_input);
|
|
|
|
//console.log("New Topic Status: " + topic_status_input);
|
|
|
|
//console.log("Form Action: " + form_action);
|
2016-12-02 07:38:54 +00:00
|
|
|
$.ajax({
|
|
|
|
url: form_action,
|
2017-05-29 14:52:37 +00:00
|
|
|
type: "POST",
|
|
|
|
dataType: "json",
|
2016-12-02 07:38:54 +00:00
|
|
|
data: {
|
|
|
|
topic_name: topic_name_input,
|
|
|
|
topic_status: topic_status_input,
|
|
|
|
topic_content: topic_content_input,
|
|
|
|
topic_js: 1
|
2017-05-29 14:52:37 +00:00
|
|
|
}
|
2016-12-02 07:38:54 +00:00
|
|
|
});
|
|
|
|
});
|
2017-05-29 14:52:37 +00:00
|
|
|
|
2016-12-02 07:38:54 +00:00
|
|
|
$(".delete_item").click(function(event)
|
|
|
|
{
|
|
|
|
post_link(event);
|
|
|
|
var block = $(this).closest('.deletable_block');
|
|
|
|
block.remove();
|
|
|
|
});
|
2017-05-29 14:52:37 +00:00
|
|
|
|
2016-12-02 07:38:54 +00:00
|
|
|
$(".edit_item").click(function(event)
|
|
|
|
{
|
|
|
|
event.preventDefault();
|
|
|
|
var block_parent = $(this).closest('.editable_parent');
|
|
|
|
var block = block_parent.find('.editable_block').eq(0);
|
2016-12-03 04:50:35 +00:00
|
|
|
block.html("<textarea style='width: 99%;' name='edit_item'>" + block.html() + "</textarea><br /><a href='" + $(this).closest('a').attr("href") + "'><button class='submit_edit' type='submit'>Update</button></a>");
|
2017-05-29 14:52:37 +00:00
|
|
|
|
2016-12-02 07:38:54 +00:00
|
|
|
$(".submit_edit").click(function(event)
|
|
|
|
{
|
|
|
|
event.preventDefault();
|
|
|
|
var block_parent = $(this).closest('.editable_parent');
|
|
|
|
var block = block_parent.find('.editable_block').eq(0);
|
|
|
|
var newContent = block.find('textarea').eq(0).val();
|
|
|
|
block.html(newContent);
|
2017-05-29 14:52:37 +00:00
|
|
|
|
2016-12-02 07:38:54 +00:00
|
|
|
var form_action = $(this).closest('a').attr("href");
|
2017-02-16 06:47:55 +00:00
|
|
|
//console.log("Form Action: " + form_action);
|
2017-01-31 05:13:38 +00:00
|
|
|
$.ajax({ url: form_action, type: "POST", dataType: "json", data: { is_js: "1", edit_item: newContent }
|
2016-12-02 07:38:54 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
2017-05-29 14:52:37 +00:00
|
|
|
|
2016-12-06 10:26:48 +00:00
|
|
|
$(".edit_field").click(function(event)
|
|
|
|
{
|
|
|
|
event.preventDefault();
|
|
|
|
var block_parent = $(this).closest('.editable_parent');
|
|
|
|
var block = block_parent.find('.editable_block').eq(0);
|
|
|
|
block.html("<input name='edit_field' value='" + block.text() + "' type='text'/><a href='" + $(this).closest('a').attr("href") + "'><button class='submit_edit' type='submit'>Update</button></a>");
|
2017-05-29 14:52:37 +00:00
|
|
|
|
2016-12-06 10:26:48 +00:00
|
|
|
$(".submit_edit").click(function(event)
|
|
|
|
{
|
|
|
|
event.preventDefault();
|
|
|
|
var block_parent = $(this).closest('.editable_parent');
|
|
|
|
var block = block_parent.find('.editable_block').eq(0);
|
|
|
|
var newContent = block.find('input').eq(0).val();
|
|
|
|
block.html(newContent);
|
2017-05-29 14:52:37 +00:00
|
|
|
|
2016-12-06 10:26:48 +00:00
|
|
|
var form_action = $(this).closest('a').attr("href");
|
2017-02-16 06:47:55 +00:00
|
|
|
//console.log("Form Action: " + form_action);
|
2016-12-06 10:26:48 +00:00
|
|
|
$.ajax({
|
|
|
|
url: form_action + "?session=" + session,
|
|
|
|
type: "POST",
|
|
|
|
dataType: "json",
|
|
|
|
data: {is_js: "1",edit_item: newContent}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
2017-05-29 14:52:37 +00:00
|
|
|
|
2017-01-31 05:13:38 +00:00
|
|
|
$(".edit_fields").click(function(event)
|
|
|
|
{
|
|
|
|
event.preventDefault();
|
2017-05-29 14:52:37 +00:00
|
|
|
//console.log("clicked .edit_fields");
|
2017-01-31 05:13:38 +00:00
|
|
|
var block_parent = $(this).closest('.editable_parent');
|
2017-05-29 14:52:37 +00:00
|
|
|
//console.log(block_parent);
|
2017-01-31 05:13:38 +00:00
|
|
|
block_parent.find('.hide_on_edit').hide();
|
2017-06-06 08:47:33 +00:00
|
|
|
block_parent.find('.show_on_edit').show();
|
2017-01-31 05:13:38 +00:00
|
|
|
block_parent.find('.editable_block').show();
|
|
|
|
block_parent.find('.editable_block').each(function(){
|
2017-02-16 06:47:55 +00:00
|
|
|
var field_name = this.getAttribute("data-field");
|
|
|
|
var field_type = this.getAttribute("data-type");
|
2017-05-29 14:52:37 +00:00
|
|
|
if(field_type=="list")
|
|
|
|
{
|
2017-02-16 06:47:55 +00:00
|
|
|
var field_value = this.getAttribute("data-value");
|
2017-01-31 05:13:38 +00:00
|
|
|
if(field_name in form_vars) var it = form_vars[field_name];
|
|
|
|
else var it = ['No','Yes'];
|
|
|
|
var itLen = it.length;
|
|
|
|
var out = "";
|
2017-05-29 14:52:37 +00:00
|
|
|
//console.log("Field Name '" + field_name + "'")
|
|
|
|
//console.log("Field Type",field_type)
|
|
|
|
//console.log("Field Value '" + field_value + "'")
|
2017-06-05 11:57:27 +00:00
|
|
|
for (var i = 0; i < itLen; i++) {
|
2017-05-29 14:52:37 +00:00
|
|
|
if(field_value == i || field_value == it[i]) {
|
|
|
|
sel = "selected ";
|
|
|
|
this.classList.remove(field_name + '_' + it[i]);
|
|
|
|
this.innerHTML = "";
|
|
|
|
} else sel = "";
|
2017-01-31 05:13:38 +00:00
|
|
|
out += "<option "+sel+"value='"+i+"'>"+it[i]+"</option>";
|
|
|
|
}
|
2017-06-05 11:57:27 +00:00
|
|
|
this.innerHTML = "<select data-field='"+field_name+"' name='"+field_name+"'>"+out+"</select>";
|
2017-01-31 05:13:38 +00:00
|
|
|
}
|
2017-06-05 11:57:27 +00:00
|
|
|
else if(field_type=="hidden") {}
|
|
|
|
else this.innerHTML = "<input name='"+field_name+"' value='"+this.textContent+"' type='text'/>";
|
2017-01-31 05:13:38 +00:00
|
|
|
});
|
2017-05-29 14:52:37 +00:00
|
|
|
|
|
|
|
// Remove any handlers already attached to the submitter
|
|
|
|
$(".submit_edit").unbind("click");
|
|
|
|
|
2017-01-31 05:13:38 +00:00
|
|
|
$(".submit_edit").click(function(event)
|
|
|
|
{
|
|
|
|
event.preventDefault();
|
2017-05-29 14:52:37 +00:00
|
|
|
//console.log("running .submit_edit event");
|
2017-01-31 05:13:38 +00:00
|
|
|
var out_data = {is_js: "1"}
|
|
|
|
var block_parent = $(this).closest('.editable_parent');
|
|
|
|
var block = block_parent.find('.editable_block').each(function(){
|
2017-02-16 06:47:55 +00:00
|
|
|
var field_name = this.getAttribute("data-field");
|
|
|
|
var field_type = this.getAttribute("data-type");
|
2017-06-05 11:57:27 +00:00
|
|
|
if(field_type=="list") {
|
2017-05-29 14:52:37 +00:00
|
|
|
var newContent = $(this).find('select :selected').text();
|
|
|
|
this.classList.add(field_name + '_' + newContent);
|
|
|
|
this.innerHTML = "";
|
2017-06-05 11:57:27 +00:00
|
|
|
} else if(field_type=="hidden") {
|
|
|
|
var newContent = $(this).val();
|
2017-05-29 14:52:37 +00:00
|
|
|
} else {
|
|
|
|
var newContent = $(this).find('input').eq(0).val();
|
|
|
|
this.innerHTML = newContent;
|
|
|
|
}
|
|
|
|
this.setAttribute("data-value",newContent);
|
|
|
|
out_data[field_name] = newContent;
|
2017-01-31 05:13:38 +00:00
|
|
|
});
|
2017-05-29 14:52:37 +00:00
|
|
|
|
2017-01-31 05:13:38 +00:00
|
|
|
var form_action = $(this).closest('a').attr("href");
|
2017-02-16 06:47:55 +00:00
|
|
|
//console.log("Form Action: " + form_action);
|
|
|
|
//console.log(out_data);
|
2017-01-31 05:13:38 +00:00
|
|
|
$.ajax({ url: form_action + "?session=" + session, type:"POST", dataType:"json", data: out_data });
|
|
|
|
block_parent.find('.hide_on_edit').show();
|
|
|
|
block_parent.find('.show_on_edit').hide();
|
|
|
|
});
|
|
|
|
});
|
2017-05-29 14:52:37 +00:00
|
|
|
|
2017-02-16 06:47:55 +00:00
|
|
|
$(".ip_item").each(function(){
|
|
|
|
var ip = this.textContent;
|
2017-01-17 07:55:46 +00:00
|
|
|
if(ip.length > 10){
|
2017-02-16 06:47:55 +00:00
|
|
|
this.innerHTML = "Show IP";
|
|
|
|
this.onclick = function(event){
|
2017-01-17 07:55:46 +00:00
|
|
|
event.preventDefault();
|
2017-02-16 06:47:55 +00:00
|
|
|
this.textContent = ip;
|
|
|
|
};
|
2017-01-17 07:55:46 +00:00
|
|
|
}
|
|
|
|
});
|
2017-05-29 14:52:37 +00:00
|
|
|
|
2017-03-05 07:53:41 +00:00
|
|
|
$(this).click(function() {
|
2017-03-03 16:28:49 +00:00
|
|
|
$(".selectedAlert").removeClass("selectedAlert");
|
2017-06-05 11:57:27 +00:00
|
|
|
$("#back").removeClass("alertActive");
|
|
|
|
});
|
|
|
|
$(".alert_bell").click(function(){
|
|
|
|
var menu_alerts = $(this).parent();
|
|
|
|
if(menu_alerts.hasClass("selectedAlert")) {
|
|
|
|
event.stopPropagation();
|
|
|
|
menu_alerts.removeClass("selectedAlert");
|
|
|
|
$("#back").removeClass("alertActive");
|
|
|
|
}
|
2017-03-03 16:28:49 +00:00
|
|
|
});
|
2017-05-29 14:52:37 +00:00
|
|
|
|
2017-03-03 16:28:49 +00:00
|
|
|
$(".menu_alerts").ready(function(){
|
|
|
|
load_alerts($(this));
|
|
|
|
});
|
2017-05-29 14:52:37 +00:00
|
|
|
|
2017-03-01 11:36:50 +00:00
|
|
|
$(".menu_alerts").click(function(event) {
|
2017-03-03 16:28:49 +00:00
|
|
|
event.stopPropagation();
|
2017-03-01 11:36:50 +00:00
|
|
|
if($(this).hasClass("selectedAlert")) return;
|
2017-06-12 09:03:14 +00:00
|
|
|
if(!conn) load_alerts($(this));
|
2017-06-05 11:57:27 +00:00
|
|
|
this.className += " selectedAlert";
|
|
|
|
document.getElementById("back").className += " alertActive"
|
2017-03-01 11:36:50 +00:00
|
|
|
});
|
2017-05-29 14:52:37 +00:00
|
|
|
|
2017-06-16 10:41:30 +00:00
|
|
|
$("input,textarea,select,option").keyup(function(event){
|
|
|
|
event.stopPropagation();
|
|
|
|
})
|
|
|
|
|
|
|
|
this.onkeyup = function(event) {
|
2017-02-16 06:47:55 +00:00
|
|
|
if(event.which == 37) this.querySelectorAll("#prevFloat a")[0].click();
|
|
|
|
if(event.which == 39) this.querySelectorAll("#nextFloat a")[0].click();
|
|
|
|
};
|
2017-05-29 14:52:37 +00:00
|
|
|
});
|