sinatra-hexacta 1.6.1 → 1.7.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb151fa58d44e75d10580a87954b2e37185e5de3c55fed82a1889a40f0f8e19d
|
4
|
+
data.tar.gz: 546c81b9dc5d27f3ba091741edee375eb42619c237ed68c66f6bfbcd7594ca77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3eb3ee99bcf704e5db18b3a78d125c01ab21a028b59088459838b435460318218af7b97ee1ad98345107f25f0637cf6c7a013a0e652a667953fefa5cea3eb52
|
7
|
+
data.tar.gz: d13ae82dae1f5ab6afcdcdf2196bed052550b33edc07ef30ddeef6ae7f91a36a8bcb1e36889b5ae617e0ce9f48e43f1f90d38c954697d2b50a143c628e707eeb
|
@@ -25,35 +25,40 @@ $(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');
|
32
32
|
$(this).closest('.modal').modal('hide');
|
33
|
-
|
34
|
-
|
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
35
|
$.ajax({
|
36
|
+
|
36
37
|
type: "POST",
|
37
38
|
url: url,
|
38
39
|
data: datastring,
|
39
40
|
success: function(data) {
|
40
|
-
|
41
|
-
|
41
|
+
//$('#loading-modal').modal('hide');
|
42
|
+
//$('#loading-modal').remove();
|
42
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>');
|
43
44
|
$('#ok-modal').modal('show');
|
44
45
|
setTimeout(function () {
|
45
46
|
location.reload();
|
46
47
|
}, 1000)
|
47
48
|
},
|
48
|
-
error: function(
|
49
|
-
|
50
|
-
|
51
|
-
$('
|
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>');
|
52
56
|
$('#error-modal').modal('show');
|
53
57
|
}
|
54
58
|
});
|
55
59
|
});
|
56
60
|
|
61
|
+
|
57
62
|
// Fix modal inside other components
|
58
63
|
$('.modal').appendTo("body");
|
59
64
|
|
@@ -547,13 +552,15 @@ if (elementToObserve != null) {
|
|
547
552
|
|
548
553
|
|
549
554
|
function start_load() {
|
550
|
-
if (!$("#
|
551
|
-
$(
|
555
|
+
if (!$("#loading-modal")[0]) {
|
556
|
+
$('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>');
|
557
|
+
$('#loading-modal').modal('show');
|
552
558
|
}
|
553
559
|
}
|
554
560
|
|
555
561
|
function stop_load() {
|
556
|
-
$(
|
562
|
+
$('#loading-modal').modal('hide');
|
563
|
+
$('#loading-modal').remove();
|
557
564
|
}
|
558
565
|
|
559
566
|
|
@@ -1,15 +1,16 @@
|
|
1
1
|
class View {
|
2
2
|
|
3
|
-
static get(url,
|
4
|
-
$(destination).html('<div class="text-center" style="padding:100px;"><div class="preloader pls-teal bgm-none"><svg class="pl-circular" viewBox="25 25 50 50"><circle class="plc-path" cx="50" cy="50" r="20"></circle></svg></div><h5>Cargando...</h5></div>');
|
3
|
+
static get(url,data,destination){
|
5
4
|
$.ajax({
|
6
5
|
url: url,
|
7
6
|
type: 'GET',
|
8
|
-
data:
|
7
|
+
data: data,
|
9
8
|
}).done(function(result) {
|
10
9
|
$(destination).html(result);
|
10
|
+
$('.modal').appendTo("body");
|
11
11
|
}).error(function(result) {
|
12
12
|
$(destination).html('<div class="lv-item p-20 bgm-red m-b-5 animated fadeIn"><div class="media"><div class="pull-left"><i class="zmdi zmdi-hc-3x zmdi-alert-octagon c-white"></i></div><div class="media-body"><div class="lv-title c-white">Algo salió mal</div><small class="lv-small c-white">Los administradores acaban de ser informados de este error, ni bien tengan una solución se te notificará. Disculpá las molestias.</small></div></div></div>');
|
13
13
|
});
|
14
14
|
}
|
15
|
-
}
|
15
|
+
}
|
16
|
+
|
@@ -8,6 +8,7 @@ script src="/sinatra-hexacta/vendors/chartist/chartist-plugin-legend.js"
|
|
8
8
|
script src="/sinatra-hexacta/js/app.js?ver=#{settings.version}" type='text/javascript'
|
9
9
|
script src="/sinatra-hexacta/js/finder.js?ver=#{settings.version}" type='text/javascript'
|
10
10
|
script src="/sinatra-hexacta/js/process.js?ver=#{settings.version}" type='text/javascript'
|
11
|
+
script src="/sinatra-hexacta/js/view.js?ver=#{settings.version}" type='text/javascript'
|
11
12
|
|
12
13
|
javascript:
|
13
14
|
const storeScroll = () => {
|