sinatra-hexacta 0.3.2 → 0.3.3

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: a6fb503a8966bb24d1526acd9e44a6b8f798967193f7b5c465c61b86c4eb4d76
4
- data.tar.gz: 1896cd47708d90de659d4e7d5253d3588331fd2372234c7c1bc152783bbd75ff
3
+ metadata.gz: 88ea51caa7a52f637935c32abc1f7afa106c04edaa2272883fbae5e893f97d63
4
+ data.tar.gz: fd772074d655d5a9d1e3c4b55f946e26ce48c7ba11c9d5e53595d33da1e795fd
5
5
  SHA512:
6
- metadata.gz: 2cbd2de133ebff3475d3d8f398d6588d264d6d310194b150e45a061a7d094f03dfe7288ef5b27bc1d9cecf663504fd793e0d0da9c9d47852ce327f04c5fc1e0b
7
- data.tar.gz: ff26fc925028c9a03ca3af480c9292ed8a6ba6f463180d39625fb5a6ed896d13570f41e786a9d4038235ddfd950234e0e1ef402ee8be17085e8a8eb3670319c4
6
+ metadata.gz: d74e7e326295bcaf359eb3dba3e9e1c272d29d49d3b1dda7996b43c7b72ebf23e4179afa37b4be7b8e468e7f4065bc3fef49c6a8529d263d1b737d4ca8dfca07
7
+ data.tar.gz: f7dc72f4b88e48dcebce5a626de936f291b5e0eaf9e6a8b1aa02ae443a588d4cfb7f873d53a1b80f3898737102a586a43d06eda17714c58444c7d5f5332d504d
@@ -14,7 +14,7 @@ module Sinatra
14
14
  end
15
15
 
16
16
  get '/reports/:report_name' do |report_name|
17
- date = Date.parse(params["date"]) unless params["date"].nil?
17
+ date = Date.parse(params[:date]) unless params[:date].nil?
18
18
  date ||= Date.today
19
19
  headers "Content-Disposition" => "attachment;filename=#{report_name}.#{date}.xls",
20
20
  "Content-Type" => "application/octet-stream"
@@ -39,6 +39,7 @@ $(document).ready(function(){
39
39
  $(this).find('#submit').attr('disabled','disabled');
40
40
  }
41
41
  });
42
+
42
43
  $('.chosen[required]').on('change', function(change, deselected) { //selected OR deselected
43
44
  if ($(this).val() == "" || $(this).val() == null) {
44
45
  $(this).parent().removeClass("success");
@@ -48,36 +49,6 @@ $(document).ready(function(){
48
49
  $(this).parent().addClass("success");
49
50
  }
50
51
  });
51
- /* --------------------------------------------------------
52
- Layout
53
- -----------------------------------------------------------*/
54
- (function () {
55
-
56
- //Get saved layout type from LocalStorage
57
- var layoutStatus = localStorage.getItem('ma-layout-status');
58
- $('#header').attr('data-current-skin', "pink");
59
- if(!$('#header-2')[0]) { //Make it work only on normal headers
60
- if (layoutStatus == 1) {
61
- $('body').addClass('sw-toggled');
62
- $('#tw-switch').prop('checked', true);
63
- }
64
- }
65
-
66
- $('body').on('change', '#toggle-width input:checkbox', function () {
67
- if ($(this).is(':checked')) {
68
- setTimeout(function () {
69
- $('body').addClass('toggled sw-toggled');
70
- localStorage.setItem('ma-layout-status', 1);
71
- }, 250);
72
- }
73
- else {
74
- setTimeout(function () {
75
- $('body').removeClass('toggled sw-toggled');
76
- localStorage.setItem('ma-layout-status', 0);
77
- }, 250);
78
- }
79
- });
80
- })();
81
52
 
82
53
  //Hack for modal to work on dropdown menu
83
54
  $('header .lv-item').click(function(e) {
@@ -110,30 +81,12 @@ $(document).ready(function(){
110
81
  }
111
82
  }
112
83
 
113
- /*
114
- * Top Search
115
- */
116
- (function(){
117
- $('body').on('click', '#top-search > a', function(e){
118
- e.preventDefault();
119
-
120
- $('#header').addClass('search-toggled');
121
- $('#top-search-wrap input').focus();
122
- });
123
-
124
- $('body').on('click', '#top-search-close', function(e){
125
- e.preventDefault();
126
-
127
- $('#header').removeClass('search-toggled');
128
- });
129
- })();
130
-
131
84
  /*
132
85
  * Sidebar
133
86
  */
134
87
  (function(){
135
88
  //Toggle
136
- $('body').on('click', '#menu-trigger, #chat-trigger', function(e){
89
+ $('body').on('click', '#menu-trigger', function(e){
137
90
  e.preventDefault();
138
91
  var x = $(this).data('trigger');
139
92
 
@@ -146,58 +99,42 @@ $(document).ready(function(){
146
99
  $(this).find('ul').hide();
147
100
  });
148
101
 
102
+ $('.profile-menu .main-menu').hide();
149
103
 
104
+ if (x == '#sidebar') {
150
105
 
151
- $('.profile-menu .main-menu').hide();
152
-
153
- if (x == '#sidebar') {
154
-
155
- $elem = '#sidebar';
156
- $elem2 = '#menu-trigger';
157
-
158
- $('#chat-trigger').removeClass('open');
159
-
160
- if (!$('#chat').hasClass('toggled')) {
161
- $('#header').toggleClass('sidebar-toggled');
162
- }
163
- else {
164
- $('#chat').removeClass('toggled');
165
- }
166
- }
106
+ $elem = '#sidebar';
107
+ $elem2 = '#menu-trigger';
167
108
 
168
- if (x == '#chat') {
169
- $elem = '#chat';
170
- $elem2 = '#chat-trigger';
109
+ $('#chat-trigger').removeClass('open');
171
110
 
172
- $('#menu-trigger').removeClass('open');
173
-
174
- if (!$('#sidebar').hasClass('toggled')) {
175
- $('#header').toggleClass('sidebar-toggled');
176
- }
177
- else {
178
- $('#sidebar').removeClass('toggled');
179
- }
180
- }
111
+ if (!$('#chat').hasClass('toggled')) {
112
+ $('#header').toggleClass('sidebar-toggled');
113
+ }
114
+ else {
115
+ $('#chat').removeClass('toggled');
116
+ }
117
+ }
181
118
 
182
- //When clicking outside
183
- if ($('#header').hasClass('sidebar-toggled')) {
184
- $(document).on('click', function (e) {
185
- if (($(e.target).closest($elem).length === 0) && ($(e.target).closest($elem2).length === 0)) {
186
- setTimeout(function(){
187
- $($elem).removeClass('toggled');
188
- $('#header').removeClass('sidebar-toggled');
189
- $($elem2).removeClass('open');
190
- });
191
- }
192
- });
193
- }
119
+ //When clicking outside
120
+ if ($('#header').hasClass('sidebar-toggled')) {
121
+ $(document).on('click', function (e) {
122
+ if (($(e.target).closest($elem).length === 0) && ($(e.target).closest($elem2).length === 0)) {
123
+ setTimeout(function(){
124
+ $($elem).removeClass('toggled');
125
+ $('#header').removeClass('sidebar-toggled');
126
+ $($elem2).removeClass('open');
127
+ });
128
+ }
129
+ });
130
+ }
194
131
  })
195
132
 
196
133
  //Submenu
197
134
  $('body').on('click', '.sub-menu > a', function(e){
198
- e.preventDefault();
199
- $(this).next().slideToggle(200);
200
- $(this).parent().toggleClass('toggled');
135
+ e.preventDefault();
136
+ $(this).next().slideToggle(200);
137
+ $(this).parent().toggleClass('toggled');
201
138
  });
202
139
  })();
203
140
 
@@ -229,7 +166,7 @@ $(document).ready(function(){
229
166
 
230
167
  //Popup empty message
231
168
  setTimeout(function(){
232
- $('#notifications').addClass('empty');
169
+ $('#notifications').addClass('empty');
233
170
  }, (z*150)+200);
234
171
  });
235
172
 
@@ -380,9 +317,9 @@ $(document).ready(function(){
380
317
  * Waves Animation
381
318
  */
382
319
  (function(){
383
- Waves.attach('.btn:not(.btn-icon):not(.btn-float)');
384
- Waves.attach('.btn-icon, .btn-float', ['waves-circle', 'waves-float']);
385
- Waves.init();
320
+ Waves.attach('.btn:not(.btn-icon):not(.btn-float)');
321
+ Waves.attach('.btn-icon, .btn-float', ['waves-circle', 'waves-float']);
322
+ Waves.init();
386
323
  })();
387
324
 
388
325
  /*
@@ -462,87 +399,6 @@ $(document).ready(function(){
462
399
  });
463
400
  }
464
401
 
465
- /*
466
- * Login
467
- */
468
- if ($('.login-content')[0]) {
469
- //Add class to HTML. This is used to center align the logn box
470
- $('html').addClass('login-content');
471
-
472
- $('body').on('click', '.login-navigation > li', function(){
473
- var z = $(this).data('block');
474
- var t = $(this).closest('.lc-block');
475
-
476
- t.removeClass('toggled');
477
-
478
- setTimeout(function(){
479
- $(z).addClass('toggled');
480
- });
481
-
482
- })
483
- }
484
-
485
- /*
486
- * Fullscreen Browsing
487
- */
488
- if ($('[data-action="fullscreen"]')[0]) {
489
- var fs = $("[data-action='fullscreen']");
490
- fs.on('click', function(e) {
491
- e.preventDefault();
492
-
493
- //Launch
494
- function launchIntoFullscreen(element) {
495
- if(element.requestFullscreen) {
496
- element.requestFullscreen();
497
- } else if(element.mozRequestFullScreen) {
498
- element.mozRequestFullScreen();
499
- } else if(element.webkitRequestFullscreen) {
500
- element.webkitRequestFullscreen();
501
- } else if(element.msRequestFullscreen) {
502
- element.msRequestFullscreen();
503
- }
504
- }
505
-
506
- //Exit
507
- function exitFullscreen() {
508
- if(document.exitFullscreen) {
509
- document.exitFullscreen();
510
- } else if(document.mozCancelFullScreen) {
511
- document.mozCancelFullScreen();
512
- } else if(document.webkitExitFullscreen) {
513
- document.webkitExitFullscreen();
514
- }
515
- }
516
-
517
- launchIntoFullscreen(document.documentElement);
518
- fs.closest('.dropdown').removeClass('open');
519
- });
520
- }
521
-
522
- /*
523
- * Clear Local Storage
524
- */
525
- if ($('[data-action="clear-localstorage"]')[0]) {
526
- var cls = $('[data-action="clear-localstorage"]');
527
-
528
- cls.on('click', function(e) {
529
- e.preventDefault();
530
-
531
- swal({
532
- title: "¿Estás seguro?",
533
- text: "Todos tus datos locales serán borrados.",
534
- type: "warning",
535
- showCancelButton: true,
536
- confirmButtonColor: "#DD6B55",
537
- confirmButtonText: "Borrar",
538
- cancelButtonText: "Cancelar",
539
- closeOnConfirm: false
540
- }, function(){
541
- localStorage.clear();
542
- swal("Hecho!", "Cache borrada", "success");
543
- });
544
- });
545
- }
546
402
 
547
403
  /*
548
404
  * Profile Edit Toggle
@@ -785,10 +641,6 @@ function advance_search(url,offset,format) {
785
641
  }
786
642
  };
787
643
 
788
- $(document).ready(function(){
789
- $( ".paginator" ).clone().appendTo( "#content" );
790
- });
791
-
792
644
  function read_notify(id,url) {
793
645
  $.ajax({
794
646
  url: '/notifications/' + id,
@@ -9,6 +9,8 @@
9
9
  == multiple_select_input({ :name => "user_id", :elements => notifications.collect { |notification| { :value => notification.creator.id, :text => notification.creator.full_name } }.uniq, :placeholder => "Empleados", :selected_elements => filters[:user_id] })
10
10
  .col-md-12
11
11
  == multiple_select_input({ :name => "label", :elements => Notification.labels.collect { |notification| { :value => notification.label, :text => notification.label.upcase } }, :placeholder => "Etiquetas", :selected_elements => filters[:label] })
12
+ .col-md-12
13
+ == multiple_select_input({ :name => "status", :elements => Notification.labels.collect { |notification| { :value => notification.label, :text => notification.label.upcase } }, :placeholder => "Etiquetas", :selected_elements => filters[:label] })
12
14
  .pm-body.clearfix
13
15
  ul.tab-nav.tn-justified role="tablist"
14
16
  li.waves-effect.active role="presentation"
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: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marco Zanger
@@ -9,7 +9,49 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2020-06-04 00:00:00.000000000 Z
12
- dependencies: []
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: sucker_punch
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: tzinfo-data
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.2019'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.2019'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rufus-scheduler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 3.6.0
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 3.6.0
13
55
  description: A gem to support general functionality accross all apps
14
56
  email: mzanger@hexacta.com
15
57
  executables: []