Changed to materlializeCSS beta-1, that doesn't use jQuery

This commit is contained in:
Kasper Rynning-Tønnesen
2018-04-06 15:51:04 +02:00
parent 9164541750
commit bd9b42fd9e
18 changed files with 186 additions and 143 deletions

View File

@@ -16,6 +16,13 @@ var Admin = {
if($(".suggested-badge").text() != "0" && $(".suggested-badge").text() != "") {
$(".suggested-badge").removeClass("hide");
}
if(!Helper.mobilecheck()) {
$('#chan_thumbnail').tooltip({
delay: 5,
position: "left",
html: "imgur link"
});
}
} else {
Admin.hideUserSuggested();
}
@@ -35,7 +42,7 @@ var Admin = {
$('#admin-lock').tooltip({
delay: 5,
position: "left",
tooltip: "Logout"
html: "Logout"
});
}
$("#password").val("");
@@ -53,7 +60,7 @@ var Admin = {
$('#admin-lock').tooltip({
delay: 5,
position: "left",
tooltip: "Logout"
html: "Logout"
});
}
}
@@ -98,10 +105,10 @@ var Admin = {
//Crypt.remove_pass(chan.toLowerCase());
if(Admin.logged_in) {
socket.emit("logout");
Materialize.toast("Logged out", 4000);
M.toast({html: "Logged out", displayLength: 4000});
Admin.display_logged_out();
} else {
Materialize.toast("Not logged in", 4000);
M.toast({html: "Not logged in", displayLength: 4000});
}
},
@@ -119,11 +126,12 @@ var Admin = {
}
if($("#admin-lock").html() != "lock") {
if(!Helper.mobilecheck()) {
$('#admin-lock').tooltip("destroy");
//$('#admin-lock').tooltip('destroy');
}
$("#admin-lock").removeClass("clickable");
$("#admin-lock").html("lock");
if(!Helper.mobilecheck()) {
$('#admin-lock').tooltip('remove');
}
}
if(!$(".user-password-li").hasClass("hide")) {
@@ -225,7 +233,7 @@ var Admin = {
},
hide_settings: function() {
$('#settings').sideNav('hide');
$('.sidenav').sidenav('close');
},
shuffle: function() {

View File

@@ -10,7 +10,7 @@ var Channel = {
$(".skip_next_client").tooltip({
delay: 5,
position: "bottom",
tooltip: "Skip"
html: "Skip"
});
}
$("#results").addClass("client-results-height");
@@ -48,11 +48,11 @@ var Channel = {
$('ul.playlist-tabs-loggedIn').tabs();
$('ul.chatTabs').tabs();
}
$("#settings").sideNav({
$(".sidenav").sidenav({
menuWidth: 310,
edge: side,
closeOnClick: false,
onOpen: function(el) {
onOpenStart: function(el) {
if(!$(".hamburger-sidenav").hasClass("open")) {
$(".hamburger-sidenav").addClass("open");
}
@@ -62,7 +62,7 @@ var Channel = {
}
});
},
onClose: function(el) {
onCloseStart: function(el) {
$(".hamburger-sidenav").removeClass("open");
$('*[id*=sidenav-overlay]:visible').each(function(i) {
if(i > 0) {
@@ -168,6 +168,7 @@ var Channel = {
}
if(((!localStorage.getItem("_jSeen") || localStorage.getItem("_jSeen") != "seen") && !Helper.mobilecheck()) && !client) {
$('.tap-target-join').tapTarget();
$('.tap-target-join').tapTarget('open');
tap_target_timeout = setTimeout(function() {
$('.tap-target-join').tapTarget('close');
@@ -179,38 +180,38 @@ var Channel = {
$("#chan").tooltip({
delay: 5,
position: "bottom",
tooltip: "Show join URL",
html: "Show join URL",
});
$("#viewers").tooltip({
delay: 5,
position: "top",
tooltip: "Viewers"
html: "Viewers"
});
$("#fullscreen").tooltip({
delay: 5,
position: "top",
tooltip: "Fullscreen"
html: "Fullscreen"
});
$("#search-btn").tooltip({
$(".search-btn-container").tooltip({
delay: 5,
position: "bottom",
tooltip: "Search"
html: "Search"
});
$("#shuffle").tooltip({
$(".shuffle-btn-container").tooltip({
delay: 5,
position: "bottom",
tooltip: "Shuffle",
html: "Shuffle",
});
$("#settings").tooltip({
delay: 5,
position: "bottom",
tooltip: "Settings",
html: "Settings",
});
}
@@ -253,7 +254,7 @@ var Channel = {
$('.castButton').tooltip({
delay: 5,
position: "top",
tooltip: "Cast Zoff to TV"
html: "Cast Zoff to TV"
});
$("#color_embed").spectrum({
@@ -487,6 +488,7 @@ var Channel = {
var host = window.location.hostname.split(".");
window.location.hostname = host[host.length -1];
}*/
//Admin.display_logged_out();
var channel_before_move = chan.toLowerCase();
clearTimeout(timed_remove_check);
changing_to_frontpage = true;
@@ -502,29 +504,36 @@ var Channel = {
window.scrollTo(0, 0);
Player.stopInterval = true;
Admin.display_logged_out();
Admin.beginning = true;
began = false;
durationBegun = false;
$("#embed-button").css("display", "none");
if(!Helper.mobilecheck()) {
$("#chan").tooltip("remove");
$('.castButton').tooltip("remove");
$("#viewers").tooltip("remove");
//$('.castButton-unactive').tooltip("remove");
$("#offline-mode").tooltip("remove");
$('#chan_thumbnail').tooltip("remove");
$('#fullscreen').tooltip("remove");
$('#admin-lock').tooltip("remove");
$("#search-btn").tooltip("remove");
$("#shuffle").tooltip("remove");
$("#settings").tooltip("remove");
$("#chan").tooltip("destroy");
$('.castButton').tooltip("destroy");
$("#viewers").tooltip("destroy");
//$('.castButton-unactive').tooltip("destroy");
$("#offline-mode").tooltip("destroy");
if(M.Tooltip.getInstance($("#chan_thumbnail")) != undefined) {
$('#chan_thumbnail').tooltip("destroy");
}
$('#fullscreen').tooltip("destroy");
if(M.Tooltip.getInstance($("#admin-lock")) != undefined) {
$('#admin-lock').tooltip("destroy");
}
$(".search-btn-container").tooltip("destroy");
$(".shuffle-btn-container").tooltip("destroy");
$("#settings").tooltip("destroy");
}
$("#seekToDuration").remove();
$("#settings").sideNav("destroy");
$('.tap-target').tapTarget('close');
$('.tap-target-join').tapTarget('close');
$(".sidenav").sidenav("destroy");
if(M.TapTarget.getInstance($(".tap-target"))) {
$('.tap-target').tapTarget('close');
}
if(M.TapTarget.getInstance($(".tap-target-join"))) {
$('.tap-target-join').tapTarget('close');
}
clearTimeout(tap_target_timeout);
before_toast();
if(Helper.mobilecheck() || user_auth_avoid || client) {

View File

@@ -201,7 +201,7 @@ function toast(msg) {
$("#thumbnail_form").css("display", "none");
$("#description_form").css("display", "none");
if(!Helper.mobilecheck()) {
$('#chan_thumbnail').tooltip("remove");
$('#chan_thumbnail').tooltip("destroy");
}
w_p = true;
break;
@@ -248,7 +248,7 @@ function toast(msg) {
$("#thumbnail_form").css("display", "none");
$("#description_form").css("display", "none");
if(!Helper.mobilecheck()) {
$('#chan_thumbnail').tooltip("remove");
$('#chan_thumbnail').tooltip("destroy");
}
w_p = true;
if(!$("#playlist_loader").hasClass("hide")) {
@@ -296,7 +296,7 @@ function toast(msg) {
$('#chan_thumbnail').tooltip({
delay: 5,
position: "left",
tooltip: "imgur link"
html: "imgur link"
});
}
break;
@@ -314,7 +314,7 @@ function toast(msg) {
break;
}
before_toast();
Materialize.toast(msg, 4000);
M.toast({html: msg, displayLength: 4000});
}
function emit() {
@@ -332,11 +332,12 @@ function emit() {
}
function before_toast(){
if($('.toast').length > 0) {
/*if($('.toast').length > 0) {
var toastElement = $('.toast').first()[0];
var toastInstance = toastElement.M_Toast;
toastInstance.remove();
}
}*/
M.Toast.dismissAll();
//Materialize.Toast.removeAll();
}

View File

@@ -1,5 +1,3 @@
//script for frontpage
var channel_list;
var frontpage = true;
var socket;
@@ -131,7 +129,7 @@ var Frontpage = {
$($(".pin").parent().parent().parent()).tooltip({
delay: 5,
position: "top",
tooltip: "Featured playlist"
html: "Featured playlist"
});
}
@@ -268,7 +266,7 @@ var Frontpage = {
Frontpage.frontpage_function(response.results);
},
error: function() {
Materialize.toast("Couldn't fetch lists, trying again in 3 seconds..", 3000, "red lighten connect_error");
M.toast({html: "Couldn't fetch lists, trying again in 3 seconds..", displayLength: 3000, classes: "red lighten connect_error"});
retry_frontpage = setTimeout(function(){
Frontpage.get_frontpage_lists();
}, 3000);
@@ -319,12 +317,12 @@ var Frontpage = {
}
$("#main-container").css("background-color", "#2d2d2d");
if(!Helper.mobilecheck()) {
$("#frontpage-viewer-counter").tooltip("remove");
$(".generate-channel-name").tooltip("remove");
$("#offline-mode").tooltip("remove");
$("#client-mode-button").tooltip("remove");
$("#frontpage-viewer-counter").tooltip("destroy");
$(".generate-channel-name").tooltip("destroy");
$("#offline-mode").tooltip("destroy");
$("#client-mode-button").tooltip("destroy");
if($(".pin").length == 1) {
$($(".pin").parent().parent().parent()).tooltip("remove");
$($(".pin").parent().parent().parent()).tooltip("destroy");
}
}
currently_showing_channels = 1;
@@ -355,7 +353,7 @@ var Frontpage = {
var response = $("<div>" + e + "</div>");
$('select').material_select('destroy');
$('select').formSelect('destroy');
$(".mega").remove();
$(".mobile-search").remove();
$("main").attr("class", "container center-align main");
@@ -439,7 +437,7 @@ var Frontpage = {
$("#about").modal();
$("#help").modal();
$("#contact").modal();
$('select').material_select();
$('select').formSelect();
Helper.log([
"Sending frontpage_lists",
@@ -454,7 +452,7 @@ var Frontpage = {
$("#offline-mode").tooltip({
delay: 5,
position: "bottom",
tooltip: "Enable local mode"
html: "Enable local mode"
});
}
}
@@ -462,17 +460,17 @@ var Frontpage = {
$("#frontpage-viewer-counter").tooltip({
delay: 5,
position: "bottom",
tooltip: "Total Viewers"
html: "Total Viewers"
});
$("#client-mode-button").tooltip({
delay: 5,
position: "bottom",
tooltip: "Client mode"
html: "Client mode"
});
$(".generate-channel-name").tooltip({
delay: 5,
position: "bottom",
tooltip: "Generate name"
html: "Generate name"
});
}
Frontpage.get_frontpage_lists();
@@ -487,7 +485,7 @@ var Frontpage = {
if(!localStorage.ok_cookie){
before_toast();
Materialize.toast("We're using cookies to enhance your experience! <a class='waves-effect waves-light btn light-green' href='#' id='cookieok' style='cursor:pointer;pointer-events:all;margin-left:10px;'> ok</a>", 10000);
M.toast({html: "We're using cookies to enhance your experience! <a class='waves-effect waves-light btn light-green' href='#' id='cookieok' style='cursor:pointer;pointer-events:all;margin-left:10px;'> ok</a>", displayLength: 10000});
}
var pad = 0;

View File

@@ -47,7 +47,7 @@ function hide_native(way) {
$('.castButton').tooltip({
delay: 5,
position: "top",
tooltip: "Stop casting"
html: "Stop casting"
});
}
$("#duration").toggleClass("hide");
@@ -93,7 +93,7 @@ function hide_native(way) {
$('.castButton').tooltip({
delay: 5,
position: "top",
tooltip: "Cast Zoff to TV"
html: "Cast Zoff to TV"
});
}
$('.castButton').removeClass('castButton-white-active');
@@ -161,7 +161,7 @@ function start_auth() {
$("#user-pass-input").focus();
//Crypt.remove_userpass(chan.toLowerCase());
before_toast();
Materialize.toast("That is not the correct password, try again..", 4000);
M.toast({html: "That is not the correct password, try again..", displayLength: 4000});
}
}
@@ -392,7 +392,7 @@ function setup_no_connection_listener(){
Helper.log(['Connection Failed']);
if(!connect_error){
connect_error = true;
Materialize.toast("Error connecting to server, please wait..", 100000000, "red lighten connect_error");
M.toast({html: "Error connecting to server, please wait..", displayLength: 100000000, classes: "red lighten connect_error"});
}
});
@@ -400,7 +400,7 @@ function setup_no_connection_listener(){
Helper.log(["Connection Failed."]);
if(!connect_error){
connect_error = true;
Materialize.toast("Error connecting to server, please wait..", 100000000, "red lighten connect_error");
M.toast({html: "Error connecting to server, please wait..", displayLength: 100000000, classes: "red lighten connect_error"});
}
});
}
@@ -535,7 +535,7 @@ function change_offline(enabled, already_offline){
$("#offline-mode").tooltip({
delay: 5,
position: "bottom",
tooltip: "Disable local mode"
html: "Disable local mode"
});
}
@@ -597,7 +597,7 @@ function change_offline(enabled, already_offline){
$("#offline-mode").tooltip({
delay: 5,
position: "bottom",
tooltip: "Enable local mode"
html: "Enable local mode"
});
}
@@ -658,7 +658,7 @@ function toast(msg) {
case "addedplaylist":
if(embed) return;
if(Search.submitYouTubeError) {
Materialize.toast("Added most of your playlist, but something was wrong. Check the playlist..", 4000, "red lighten connect_error");
M.toast({html: "Added most of your playlist, but something was wrong. Check the playlist..", displayLength: 4000, classes: "red lighten connect_error"});
Search.submitYouTubeError = false;
return;
}
@@ -679,7 +679,7 @@ function toast(msg) {
$("#thumbnail_form").css("display", "none");
$("#description_form").css("display", "none");
if(!Helper.mobilecheck()) {
$('#chan_thumbnail').tooltip("remove");
$('#chan_thumbnail').tooltip("destroy");
}
w_p = true;
break;
@@ -728,7 +728,7 @@ function toast(msg) {
$("#thumbnail_form").css("display", "none");
$("#description_form").css("display", "none");
if(!Helper.mobilecheck()) {
$('#chan_thumbnail').tooltip("remove");
$('#chan_thumbnail').tooltip("destroy");
}
w_p = true;
if(!$("#playlist_loader").hasClass("hide")) {
@@ -772,13 +772,6 @@ function toast(msg) {
msg="Correct password. You now have access to the sacred realm of The Admin.";
$("#thumbnail_form").css("display", "inline-block");
$("#description_form").css("display", "inline-block");
if(!Helper.mobilecheck()) {
$('#chan_thumbnail').tooltip({
delay: 5,
position: "left",
tooltip: "imgur link"
});
}
break;
case "changedpass":
if(embed) return;
@@ -794,7 +787,7 @@ function toast(msg) {
break;
}
before_toast();
Materialize.toast(msg, 4000);
M.toast({ html: msg, displayLength: 4000});
}
function emit() {
@@ -812,11 +805,12 @@ function emit() {
}
function before_toast(){
if($('.toast').length > 0) {
/*if($('.toast').length > 0) {
var toastElement = $('.toast').first()[0];
var toastInstance = toastElement.M_Toast;
toastInstance.remove();
}
}*/
M.Toast.dismissAll();
//Materialize.Toast.removeAll();
}

View File

@@ -148,7 +148,7 @@ window.zoff = {
disable_debug: disable_debug
}
if(!Helper.mobilecheck()) {
if(!Helper.mobilecheck() && window.location.host != "localhost") {
window.onerror = function(e, source, lineno, colno, error) {
if(e == "Script error.") return true;
Helper.logs.unshift({log: e.toString().replace(/(\r\n|\n|\r)/gm,""), date: new Date(), lineno: lineno, colno: colno, source:source});
@@ -202,7 +202,7 @@ $().ready(function(){
}*/
$(".connect_error").fadeOut(function(){
$(".connect_error").remove();
Materialize.toast("Connected!", 2000, "green lighten");
M.toast({ html: "Connected!", displayLength: 2000, classes: "green lighten"});
});
}
Chat.namechange("", true, true);
@@ -318,6 +318,7 @@ initializeCastApi = function() {
if((!localStorage.getItem("_chSeen") || localStorage.getItem("_chSeen") != "seen") && !client) {
$(".castButton").css("display", "block");
showDiscovery = true;
$('.tap-target').tapTarget();
$('.tap-target').tapTarget('open');
tap_target_timeout = setTimeout(function() {
$('.tap-target').tapTarget('close');
@@ -349,9 +350,9 @@ $(document).on("click", "#bitcoin-address", function(e) {
copyTextarea.select();
var successful = document.execCommand('copy');
if(successful) {
Materialize.toast("Copied!", 2000, "green lighten");
M.toast({html: "Copied!", displayLength: 2000, classes: "green lighten"});
} else {
Materialize.toast("Error copying..", 2000, "red lighten");
M.toast({html: "Error copying..", displayLength: 2000, classes: "red lighten"});
}
});
@@ -360,9 +361,9 @@ $(document).on("click", "#ethereum-address", function(e) {
copyTextarea.select();
var successful = document.execCommand('copy');
if(successful) {
Materialize.toast("Copied!", 2000, "green lighten");
M.toast({html: "Copied!", displayLength: 2000, classes: "green lighten"});
} else {
Materialize.toast("Error copying..", 2000, "red lighten");
M.toast({html: "Error copying..",displayLength: 2000, classes: "red lighten"});
}
});
@@ -375,6 +376,15 @@ $(document).on("click", ".pagination-results a", function(e) {
Search.search(searchInput, false, false, pageToken);
});
$(document).on("click", "#settings", function(e) {
e.preventDefault();
if(!M.Sidenav.getInstance($(".sidenav")).isOpen) {
$(".sidenav").sidenav("open");
} else {
$(".sidenav").sidenav("close");
}
});
$(document).on("click", ".accept-delete", function(e) {
e.preventDefault();
emit("delete_all", {channel: chan.toLowerCase()});
@@ -535,9 +545,9 @@ $(document).on("click", ".copy-context-menu", function(e) {
copyTextarea.select();
var successful = document.execCommand('copy');
if(successful) {
Materialize.toast("Copied!", 2000, "green lighten");
M.toast({html: "Copied!", displayLength: 2000, classes: "green lighten"});
} else {
Materialize.toast("Error copying..", 2000, "red lighten");
M.toast({html: "Error copying..", displayLength: 2000, classes: "red lighten"});
}
$(".copy_video_id").css("display", "none");
}
@@ -676,12 +686,12 @@ $(document).on("click", ".close-user-password", function() {
Player.stopInterval = true;
user_auth_avoid = true;
if(!Helper.mobilecheck()) {
$('.castButton').tooltip("remove");
$("#viewers").tooltip("remove");
//$('.castButton-unactive').tooltip("remove");
$("#offline-mode").tooltip("remove");
$('#chan_thumbnail').tooltip("remove");
$('#admin-lock').tooltip("remove");
$('.castButton').tooltip("destroy");
$("#viewers").tooltip("destroy");
//$('.castButton-unactive').tooltip("destroy");
$("#offline-mode").tooltip("destroy");
$('#chan_thumbnail').tooltip("destroy");
$('#admin-lock').tooltip("destroy");
}
window.history.pushState("to the frontpage!", "Title", "/");
Channel.onepage_load();
@@ -873,7 +883,7 @@ $(document).on("submit", "#listImport", function(e){
ga('send', 'event', "import", "youtube");
} else {
before_toast();
Materialize.toast("It seems you've entered a invalid url.", 4000);
M.toast({html: "It seems you've entered a invalid url.", displayLength: 4000});
}
document.getElementById("import").value = "";
});
@@ -882,7 +892,7 @@ $(document).on("submit", "#listImportZoff", function(e) {
e.preventDefault();
var new_channel = $("#import_zoff").val();
if(new_channel == "") {
Materialize.toast("It seems you've entered a invalid channel-name.", 4000);
M.toast({html: "It seems you've entered a invalid channel-name.", displayLength: 4000});
return;
}
socket.emit("import_zoff", {channel: chan.toLowerCase(), new_channel: new_channel.toLowerCase()});
@@ -913,7 +923,7 @@ $(document).on("submit", "#listImportSpotify", function(e){
Search.importSpotifyPlaylist('https://api.spotify.com/v1/users/' + user + '/playlists/' + playlist_id + '/tracks');
} else {
before_toast();
Materialize.toast("It seems you've entered a invalid url.", 4000);
M.toast({html: "It seems you've entered a invalid url.", displayLength: 4000});
}
}
document.getElementById("import_spotify").value = "";
@@ -1104,7 +1114,7 @@ $(document).on("click", "#shuffle", function(e)
$(document).on("click", "#search-btn", function(e)
{
e.preventDefault();
//e.preventDefault();
Search.showSearch();
});
@@ -1163,15 +1173,15 @@ $(document).on( "click", ".result-object", function(e){
end = original_length;
}
if(start > end) {
Materialize.toast("Start can't be before the end..", 3000, "red lighten");
M.toast({html: "Start can't be before the end..", displayLength: 3000, classes: "red lighten"});
} else if(start < 0) {
Materialize.toast("Start can't be less than 0..", 3000, "red lighten");
M.toast({html: "Start can't be less than 0..", displayLength: 3000, classes: "red lighten"});
} else {
try {
var length = parseInt(end) - parseInt(start);
Search.submitAndClose(id, title, length, start, end);
} catch(e) {
Materialize.toast("Only numbers are accepted as song start and end parameters..", 3000, "red lighten");
M.toast({html: "Only numbers are accepted as song start and end parameters..", displayLength: 3000, classes: "red lighten"});
}
}
}
@@ -1250,16 +1260,16 @@ $(document).on( "click", "#add-many", function(e){
end = original_length;
}
if(start > end) {
Materialize.toast("Start can't be before the end..", 3000, "red lighten");
M.toast({html: "Start can't be before the end..", displayLength: 3000, classes: "red lighten"});
} else if(start < 0) {
Materialize.toast("Start can't be less than 0..", 3000, "red lighten");
M.toast({html: "Start can't be less than 0..", displayLength: 3000, classes: "red lighten"});
} else {
try {
var length = parseInt(end) - parseInt(start);
$(this).parent().parent().parent().remove();
Search.submit(id, title, length, false, 0, 1, start, end);
} catch(e) {
Materialize.toast("Only numbers are accepted as song start and end parameters..", 3000, "red lighten");
M.toast({html: "Only numbers are accepted as song start and end parameters..", displayLength: 3000, classes: "red lighten"});
}
}

View File

@@ -60,6 +60,7 @@ var Remotecontroller = {
document.getElementById("remoteform").chan.value = "";
start = false;
$(".volume-elements").css("display", "flex");
$(".rc").css("display", "block");
//document.getElementById("base").setAttribute("onsubmit", "control(); return false;");

View File

@@ -363,7 +363,7 @@ var Search = {
$("#playlist_loader").addClass("hide");
$("#import").removeClass("hide");
before_toast();
Materialize.toast("It seems you've entered a invalid url.", 4000);
M.toast({html: "It seems you've entered a invalid url.", displayLength: 4000});
}
} else {
@@ -380,7 +380,6 @@ var Search = {
});
if(response.nextPageToken) {
console.log(Search.submitYouTubeExpected);
//Search.addVideos(ids, true, 0, false, this_length);
Search.importPlaylist(pId, response.nextPageToken);
} else {
@@ -416,7 +415,7 @@ var Search = {
$("#import_spotify").removeClass("hide");
$("#playlist_loader_spotify").addClass("hide");
before_toast();
Materialize.toast("It seems you've entered a invalid url.", 4000);
M.toast({html: "It seems you've entered a invalid url.", displayLength: 4000});
}
});
},

View File

@@ -33,13 +33,13 @@ $(document).ready(function() {
success: function(response) {
$(".full-form-token").addClass("hide");
if(response == "success") {
Materialize.toast("Email sent!", 3000, "green lighten");
M.toast({html: "Email sent!", displayLength: 3000, classes: "green lighten"});
} else {
$("#email_address").attr("readonly", false);
$(".submit").toggleClass("disabled");
$("#origin").attr("readonly", false);
grecaptcha.reset();
Materialize.toast("Something went wrong. Sure that email hasn't been used for another token?", 3000, "red lighten");
M.toast({html: "Something went wrong. Sure that email hasn't been used for another token?",displayLength: 3000, classes: "red lighten"});
}
},
error: function(response) {