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: d569497a337ad41584b964887b5685c72128e51e20f197444f646ca54e958328
4
- data.tar.gz: 496c85e904b87af77d78edf0ba9e6e24a86797dc9593657761691310d97e57cc
3
+ metadata.gz: eb151fa58d44e75d10580a87954b2e37185e5de3c55fed82a1889a40f0f8e19d
4
+ data.tar.gz: 546c81b9dc5d27f3ba091741edee375eb42619c237ed68c66f6bfbcd7594ca77
5
5
  SHA512:
6
- metadata.gz: 72d273962da241e92ae5d0a8a1b28035cd5d62211642cf6bef33a406e1bbd0138b2aabe04fce47d1f5f4ecfb268acbba15e1763c1e29040a7e58da4420f0f449
7
- data.tar.gz: a4325f140e4de501a18ed7406eae8855b2aac2d8279e436b1dd36b809651f2f762ed74569b636e80c9e593ec29c6a26ffa3b592bac0c3cf4d10e19b5eca7d0e7
6
+ metadata.gz: d3eb3ee99bcf704e5db18b3a78d125c01ab21a028b59088459838b435460318218af7b97ee1ad98345107f25f0637cf6c7a013a0e652a667953fefa5cea3eb52
7
+ data.tar.gz: d13ae82dae1f5ab6afcdcdf2196bed052550b33edc07ef30ddeef6ae7f91a36a8bcb1e36889b5ae617e0ce9f48e43f1f90d38c954697d2b50a143c628e707eeb
@@ -30,7 +30,7 @@ class Date
30
30
  end
31
31
 
32
32
  def short_display
33
- self.strftime('%d/%m/%Y')
33
+ self.strftime('%-d/%-m/%y')
34
34
  end
35
35
 
36
36
  def next_working_date
@@ -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
- $('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');
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
- $('#loading-modal').modal('hide');
41
- $('#loading-modal').remove();
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(data) {
49
- $('#loading-modal').modal('hide');
50
- $('#loading-modal').remove();
51
- $('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>');
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 (!$("#loader")[0]) {
551
- $("html").append('<div id="loader" style="position: fixed;z-index: 100000000;padding:5px;top: 0;"><div class="preloader pl-lg pls-white" style="left: 10px; top: 5px;"><svg class="pl-circular" viewBox="25 25 50 50"><circle class="plc-path" cx="50" cy="50" r="20"></circle></svg></div></div>');
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
- $("#loader").remove();
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,params,destination){
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: params
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 = () => {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-hexacta
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.1
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marco Zanger