sinatra-hexacta 1.6.0 → 1.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sinatra/extensions/date.rb +1 -1
- data/lib/sinatra/public/js/app.js +33 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67ece1e93fa8e42e82d62ebd4bcad15aef25ec59713d1b9cbbde415a0be80f5f
|
4
|
+
data.tar.gz: ed66036b2dc8631b661f8d8e635302b007379e3879d5b29e528bfee2727cfb69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9934eae8636c78275b39eaaea8eb87757512464eddc0454011b6e0047e678bfeb3fd48a9fb04435c9b4d03689ae44ff971fa7267917f89212fe1dea908bfd3b6
|
7
|
+
data.tar.gz: 705a7593c2f566dd4b2318c5188add2b753aa47a7e19fff8ea5e979556136cb4940e6d83e08ab2bcfcf264ad5123bcc080ea42be9875e8a12a027b60a6c2c92b
|
@@ -25,7 +25,7 @@ $(document).ready(function(){
|
|
25
25
|
|
26
26
|
function update_html_elements() {
|
27
27
|
|
28
|
-
$("form.async").submit(function(e){
|
28
|
+
$("form.async").unbind("submit").submit(function(e){
|
29
29
|
e.preventDefault();
|
30
30
|
var datastring = $(this).serialize();
|
31
31
|
var url = $(this).attr('action');
|
@@ -33,15 +33,32 @@ function update_html_elements() {
|
|
33
33
|
$('body').append('<div aria-labelledby="loading" class="modal bounceIn animated" id="loading-modal" role="dialog" tabindex="-1" data-backdrop="static" data-keyboard="false"><div class="modal-dialog modal-sm" style="width:150px !Important;"><div class="modal-content"><div class="modal-body p-20 text-center"><div class="preloader pl-lg"><svg class="pl-circular" viewBox="25 25 50 50"><circle class="plc-path" cx="50" cy="50" r="20"></circle></svg></div></div><div class="modal-footer" style="text-align: center !Important;"><div class="btn btn-link waves-effect c-gray">Espere...</div></div></div></div></div>');
|
34
34
|
$('#loading-modal').modal('show');
|
35
35
|
$.ajax({
|
36
|
+
|
36
37
|
type: "POST",
|
37
38
|
url: url,
|
38
39
|
data: datastring,
|
39
40
|
success: function(data) {
|
40
|
-
|
41
|
+
$('#loading-modal').modal('hide');
|
42
|
+
$('#loading-modal').remove();
|
43
|
+
$('body').append('<div aria-labelledby="ok" class="modal bounceIn animated" id="ok-modal" role="dialog" tabindex="-1"><div class="modal-dialog modal-sm" style="width:150px !Important;"><div class="modal-content"><div class="modal-body p-20 text-center"><i class="zmdi zmdi-hc-3x zmdi-check-circle c-green"></i></div><div class="modal-footer" style="text-align: center !Important;"><div class="btn btn-link waves-effect c-gray">¡Listo!</div></div></div></div></div>');
|
44
|
+
$('#ok-modal').modal('show');
|
45
|
+
setTimeout(function () {
|
46
|
+
location.reload();
|
47
|
+
}, 1000)
|
48
|
+
},
|
49
|
+
error: function(error) {
|
50
|
+
$('#loading-modal').modal('hide');
|
51
|
+
$('#loading-modal').remove();
|
52
|
+
if ($('#error-modal')[0]) {
|
53
|
+
$('#error-modal').remove();
|
54
|
+
}
|
55
|
+
$('body').append('<div aria-labelledby="error" class="modal bounceIn animated" id="error-modal" role="dialog" tabindex="-1"><div class="modal-dialog modal-sm" style="min-width:150px !Important;"><div class="modal-content"><div class="modal-body p-20 text-center"><i class="zmdi zmdi-hc-3x zmdi-alert-polygon c-red"></i></div><div class="modal-footer" style="text-align: center !Important;"><div class="f-900 c-gray">' + error.responseText + '</div></div></div></div></div>');
|
56
|
+
$('#error-modal').modal('show');
|
41
57
|
}
|
42
58
|
});
|
43
59
|
});
|
44
60
|
|
61
|
+
|
45
62
|
// Fix modal inside other components
|
46
63
|
$('.modal').appendTo("body");
|
47
64
|
|
@@ -563,8 +580,20 @@ function rm_object(object,id) {
|
|
563
580
|
$.ajax({
|
564
581
|
url: '/' + object + '/' + id,
|
565
582
|
type: 'DELETE',
|
566
|
-
success: function(
|
567
|
-
|
583
|
+
success: function(data) {
|
584
|
+
$('#loading-modal').modal('hide');
|
585
|
+
$('#loading-modal').remove();
|
586
|
+
$('body').append('<div aria-labelledby="ok" class="modal bounceIn animated" id="ok-modal" role="dialog" tabindex="-1"><div class="modal-dialog modal-sm" style="width:150px !Important;"><div class="modal-content"><div class="modal-body p-20 text-center"><i class="zmdi zmdi-hc-3x zmdi-check-circle c-green"></i></div><div class="modal-footer" style="text-align: center !Important;"><div class="btn btn-link waves-effect c-gray">¡Listo!</div></div></div></div></div>');
|
587
|
+
$('#ok-modal').modal('show');
|
588
|
+
setTimeout(function () {
|
589
|
+
location.reload();
|
590
|
+
}, 1000)
|
591
|
+
},
|
592
|
+
error: function(data) {
|
593
|
+
$('#loading-modal').modal('hide');
|
594
|
+
$('#loading-modal').remove();
|
595
|
+
$('body').append('<div aria-labelledby="error" class="modal bounceIn animated" id="error-modal" role="dialog" tabindex="-1"><div class="modal-dialog modal-sm" style="width:150px !Important;"><div class="modal-content"><div class="modal-body p-20 text-center"><i class="zmdi zmdi-hc-3x zmdi-alert-polygon c-red"></i></div><div class="modal-footer" style="text-align: center !Important;"><div class="btn btn-link waves-effect c-gray">Oops...</div></div></div></div></div>');
|
596
|
+
$('#error-modal').modal('show');
|
568
597
|
}
|
569
598
|
});
|
570
599
|
}
|