Nota: Gtop100 puede demorar unos minutos en acreditar el voto.
diff --git a/static/nw-themes/nw-ryu/nw-js-handlers/change_race_response.js b/static/nw-themes/nw-ryu/nw-js-handlers/change_race_response.js
index d23a799..28993bb 100644
--- a/static/nw-themes/nw-ryu/nw-js-handlers/change_race_response.js
+++ b/static/nw-themes/nw-ryu/nw-js-handlers/change_race_response.js
@@ -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');
});
}
diff --git a/static/nw-themes/nw-ryu/nw-js-handlers/promo_code_response.js b/static/nw-themes/nw-ryu/nw-js-handlers/promo_code_response.js
new file mode 100644
index 0000000..1e934e0
--- /dev/null
+++ b/static/nw-themes/nw-ryu/nw-js-handlers/promo_code_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);
+ }
+ });
+ });
+});
diff --git a/static/nw-themes/nw-ryu/nw-js-handlers/rename_guild_response.js b/static/nw-themes/nw-ryu/nw-js-handlers/rename_guild_response.js
index 84392ca..8dc9aa7 100644
--- a/static/nw-themes/nw-ryu/nw-js-handlers/rename_guild_response.js
+++ b/static/nw-themes/nw-ryu/nw-js-handlers/rename_guild_response.js
@@ -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');
});
}
diff --git a/static/nw-themes/nw-ryu/nw-js-handlers/vote_points_response.js b/static/nw-themes/nw-ryu/nw-js-handlers/vote_points_response.js
index 2f54003..29072f2 100644
--- a/static/nw-themes/nw-ryu/nw-js-handlers/vote_points_response.js
+++ b/static/nw-themes/nw-ryu/nw-js-handlers/vote_points_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) {
diff --git a/static/site.webmanifest b/static/site.webmanifest
index d8d1993..db21e60 100644
--- a/static/site.webmanifest
+++ b/static/site.webmanifest
@@ -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"
}