sinatra-hexacta 1.5.3 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/sinatra/public/js/app.js +20 -59
- 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: 4a9dc56be12a60357e82d8279807d2553afc0ad376e430bcfbdf18efc49b74ca
|
4
|
+
data.tar.gz: 2bb9c311849b822ccbc6f36a92c3d989bf36a8a851df97793d01e91d7cafab67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d2d8812917f8d26437c9b461b7fe59ae7685922075e2cb29be86d7f3b684c5894c563162a86d915898d97075e861956acc9af8b43a3d17c1a240f401789dec0
|
7
|
+
data.tar.gz: c99a0226bf62c3b1408e4936197b3570e39ea5596a4b53b1fc3184fb519ce4a02397bc52c89eba104d1fabfc090158fe608ba46df5da479095a0e0dbecc05ee8
|
@@ -25,6 +25,23 @@ $(document).ready(function(){
|
|
25
25
|
|
26
26
|
function update_html_elements() {
|
27
27
|
|
28
|
+
$("form.async").submit(function(e){
|
29
|
+
e.preventDefault();
|
30
|
+
var datastring = $(this).serialize();
|
31
|
+
var url = $(this).attr('action');
|
32
|
+
$(this).closest('.modal').modal('hide');
|
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
|
+
$('#loading-modal').modal('show');
|
35
|
+
$.ajax({
|
36
|
+
type: "POST",
|
37
|
+
url: url,
|
38
|
+
data: datastring,
|
39
|
+
success: function(data) {
|
40
|
+
location.reload();
|
41
|
+
}
|
42
|
+
});
|
43
|
+
});
|
44
|
+
|
28
45
|
// Fix modal inside other components
|
29
46
|
$('.modal').appendTo("body");
|
30
47
|
|
@@ -538,76 +555,20 @@ $( document ).ajaxStop(function() {
|
|
538
555
|
stop_load();
|
539
556
|
});
|
540
557
|
|
541
|
-
function rm(url) {
|
542
|
-
disableButtons();
|
543
|
-
if (confirm('¿Estás seguro que deseas realizar esta operación?')) {
|
544
|
-
$.ajax({
|
545
|
-
url: url,
|
546
|
-
type: 'DELETE',
|
547
|
-
done: function(result) {
|
548
|
-
location.reload();
|
549
|
-
},
|
550
|
-
success: function(result) {
|
551
|
-
location.reload();
|
552
|
-
},
|
553
|
-
error: function(error) {
|
554
|
-
alert("Ha ocurrido un error, intentalo nuevamente!");
|
555
|
-
enableButtons();
|
556
|
-
}
|
557
|
-
});
|
558
|
-
} else {
|
559
|
-
enableButtons();
|
560
|
-
}
|
561
|
-
}
|
562
|
-
|
563
558
|
|
564
559
|
function rm_object(object,id) {
|
565
|
-
|
560
|
+
$(".modal").modal('hide');
|
561
|
+
$('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>');
|
562
|
+
$('#loading-modal').modal('show');
|
566
563
|
$.ajax({
|
567
564
|
url: '/' + object + '/' + id,
|
568
565
|
type: 'DELETE',
|
569
|
-
data: {},
|
570
566
|
success: function(result) {
|
571
567
|
location.reload();
|
572
568
|
}
|
573
569
|
});
|
574
570
|
}
|
575
571
|
|
576
|
-
function post(url) {
|
577
|
-
disableButtons();
|
578
|
-
if (confirm('¿Estás seguro que deseas realizar esta operación?')) {
|
579
|
-
$.ajax({
|
580
|
-
url: url,
|
581
|
-
type: 'POST',
|
582
|
-
done: function(result) {
|
583
|
-
location.reload();
|
584
|
-
},
|
585
|
-
success: function(result) {
|
586
|
-
location.reload();
|
587
|
-
},
|
588
|
-
error: function(error) {
|
589
|
-
alert("Ha ocurrido un error, intentalo nuevamente!");
|
590
|
-
enableButtons();
|
591
|
-
}
|
592
|
-
});
|
593
|
-
} else {
|
594
|
-
enableButtons();
|
595
|
-
}
|
596
|
-
}
|
597
|
-
|
598
|
-
function disableButtons() {
|
599
|
-
$(".btn").each(function() {
|
600
|
-
$(this).data("temp",$(this).val());
|
601
|
-
$(this).attr("disabled",true);
|
602
|
-
});
|
603
|
-
return true
|
604
|
-
}
|
605
|
-
function enableButtons() {
|
606
|
-
$(".btn").each(function() {
|
607
|
-
$(this).attr("disabled",false);
|
608
|
-
});
|
609
|
-
return true
|
610
|
-
}
|
611
572
|
(function( $ ){
|
612
573
|
$.fn.disableSelect = function() {
|
613
574
|
$(this).prop("disabled", true);
|