sinatra-hexacta 1.6.0 → 1.6.1

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sinatra/public/js/app.js +27 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4a9dc56be12a60357e82d8279807d2553afc0ad376e430bcfbdf18efc49b74ca
4
- data.tar.gz: 2bb9c311849b822ccbc6f36a92c3d989bf36a8a851df97793d01e91d7cafab67
3
+ metadata.gz: d569497a337ad41584b964887b5685c72128e51e20f197444f646ca54e958328
4
+ data.tar.gz: 496c85e904b87af77d78edf0ba9e6e24a86797dc9593657761691310d97e57cc
5
5
  SHA512:
6
- metadata.gz: 2d2d8812917f8d26437c9b461b7fe59ae7685922075e2cb29be86d7f3b684c5894c563162a86d915898d97075e861956acc9af8b43a3d17c1a240f401789dec0
7
- data.tar.gz: c99a0226bf62c3b1408e4936197b3570e39ea5596a4b53b1fc3184fb519ce4a02397bc52c89eba104d1fabfc090158fe608ba46df5da479095a0e0dbecc05ee8
6
+ metadata.gz: 72d273962da241e92ae5d0a8a1b28035cd5d62211642cf6bef33a406e1bbd0138b2aabe04fce47d1f5f4ecfb268acbba15e1763c1e29040a7e58da4420f0f449
7
+ data.tar.gz: a4325f140e4de501a18ed7406eae8855b2aac2d8279e436b1dd36b809651f2f762ed74569b636e80c9e593ec29c6a26ffa3b592bac0c3cf4d10e19b5eca7d0e7
@@ -37,7 +37,19 @@ function update_html_elements() {
37
37
  url: url,
38
38
  data: datastring,
39
39
  success: function(data) {
40
- location.reload();
40
+ $('#loading-modal').modal('hide');
41
+ $('#loading-modal').remove();
42
+ $('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
+ $('#ok-modal').modal('show');
44
+ setTimeout(function () {
45
+ location.reload();
46
+ }, 1000)
47
+ },
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>');
52
+ $('#error-modal').modal('show');
41
53
  }
42
54
  });
43
55
  });
@@ -563,8 +575,20 @@ function rm_object(object,id) {
563
575
  $.ajax({
564
576
  url: '/' + object + '/' + id,
565
577
  type: 'DELETE',
566
- success: function(result) {
567
- location.reload();
578
+ success: function(data) {
579
+ $('#loading-modal').modal('hide');
580
+ $('#loading-modal').remove();
581
+ $('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>');
582
+ $('#ok-modal').modal('show');
583
+ setTimeout(function () {
584
+ location.reload();
585
+ }, 1000)
586
+ },
587
+ error: function(data) {
588
+ $('#loading-modal').modal('hide');
589
+ $('#loading-modal').remove();
590
+ $('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>');
591
+ $('#error-modal').modal('show');
568
592
  }
569
593
  });
570
594
  }
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.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marco Zanger