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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4a9dc56be12a60357e82d8279807d2553afc0ad376e430bcfbdf18efc49b74ca
4
- data.tar.gz: 2bb9c311849b822ccbc6f36a92c3d989bf36a8a851df97793d01e91d7cafab67
3
+ metadata.gz: 67ece1e93fa8e42e82d62ebd4bcad15aef25ec59713d1b9cbbde415a0be80f5f
4
+ data.tar.gz: ed66036b2dc8631b661f8d8e635302b007379e3879d5b29e528bfee2727cfb69
5
5
  SHA512:
6
- metadata.gz: 2d2d8812917f8d26437c9b461b7fe59ae7685922075e2cb29be86d7f3b684c5894c563162a86d915898d97075e861956acc9af8b43a3d17c1a240f401789dec0
7
- data.tar.gz: c99a0226bf62c3b1408e4936197b3570e39ea5596a4b53b1fc3184fb519ce4a02397bc52c89eba104d1fabfc090158fe608ba46df5da479095a0e0dbecc05ee8
6
+ metadata.gz: 9934eae8636c78275b39eaaea8eb87757512464eddc0454011b6e0047e678bfeb3fd48a9fb04435c9b4d03689ae44ff971fa7267917f89212fe1dea908bfd3b6
7
+ data.tar.gz: 705a7593c2f566dd4b2318c5188add2b753aa47a7e19fff8ea5e979556136cb4940e6d83e08ab2bcfcf264ad5123bcc080ea42be9875e8a12a027b60a6c2c92b
@@ -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,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
- location.reload();
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(result) {
567
- location.reload();
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
  }
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.0
4
+ version: 1.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marco Zanger