Se a Eliminado de Head los script js para evitar su carga inecesaria cuando no hace falta
This commit is contained in:
@@ -4,7 +4,7 @@ if (window.history.replaceState) {
|
||||
|
||||
function doRefresh() {
|
||||
$("#nw-change-race-form").load(document.URL + " #nw-change-race-form>*", function () {
|
||||
$.getScript('nw-js-handlers/change_race_response.js');
|
||||
$.getScript('/static/nw-themes/nw-ryu/nw-js-handlers/change_race_response.js');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
if (window.history.replaceState) {
|
||||
window.history.replaceState(null, null, window.location.href);
|
||||
};
|
||||
|
||||
$(function(){
|
||||
$('.promo-code').on("cut copy paste",function(e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
});
|
||||
|
||||
$(function(){
|
||||
$('.promo-code-button').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
$("#promo-code-response").empty();
|
||||
|
||||
var button = $(this);
|
||||
var buttonoriginal = button.html();
|
||||
var bValue = button.data('id');
|
||||
var data = {promocode: bValue};
|
||||
data = $("#uw-promo-code-form").serialize() + '&' + $.param(data);
|
||||
|
||||
changeButton(button, 'Canjeando código');
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '',
|
||||
data: data,
|
||||
dataType: 'json',
|
||||
success: function(data) {
|
||||
$("#promo-code-response").append(data.message).hide().slideDown();
|
||||
|
||||
if (data.success === true) {
|
||||
button.html("Código aceptado");
|
||||
button.css("color","#d79602");
|
||||
setTimeout(function() {
|
||||
$("#uw-promo-code-form")[0].reset();
|
||||
restoreButton(button, buttonoriginal);
|
||||
}, 5000);
|
||||
}
|
||||
else {
|
||||
setTimeout(function() {
|
||||
$("#promo-code-response").slideUp( function() {
|
||||
$("#promo-code-response").empty();
|
||||
restoreButton(button, buttonoriginal);
|
||||
grecaptcha.reset();
|
||||
});
|
||||
}, 5000);
|
||||
}
|
||||
},
|
||||
error: function() {
|
||||
setTimeout(function() {
|
||||
alert("Algo ha salido mal. Por favor intente más tarde");
|
||||
window.location.reload();
|
||||
}, 2000);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -12,7 +12,7 @@ $(function(){
|
||||
|
||||
function doRefresh() {
|
||||
$("#nw-rename-guild-form").load(document.URL + " #nw-rename-guild-form>*", function(){
|
||||
$.getScript('nw-js-handlers/rename_guild_response.js');
|
||||
$.getScript('/static/nw-themes/nw-ryu/nw-js-handlers/rename_guild_response.js');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
function doRefresh() {
|
||||
$("#vote-panel").load(document.URL + " #vote-panel>*", function(){
|
||||
$.getScript('/static/nw-themes/nw-ryu/nw-js-handlers/vote_points_response.js');
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$('.vote-button').each(function() {
|
||||
var button = $(this);
|
||||
@@ -59,6 +65,8 @@ $(document).ready(function() {
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
function startCooldownTimer(button, remainingTime) {
|
||||
var interval = setInterval(function() {
|
||||
if (remainingTime <= 0) {
|
||||
|
||||
@@ -15,6 +15,6 @@
|
||||
],
|
||||
"theme_color": "#ffffff",
|
||||
"background_color": "#ffffff",
|
||||
"start_url": "https://novawow.com/es/",
|
||||
"start_url": "https://www.novawow.com/es/",
|
||||
"display": "standalone"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user