sinatra-hexacta 0.3.13 → 0.3.18

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: 3e5dcb9cef01c9a77b03a009a9b1a5451fb27889692879645801474efa41fd40
4
- data.tar.gz: 8e1e59f37a699d6c4e91e36feec49ec8422e6619662e00815b61a9276e4389ad
3
+ metadata.gz: ca5a4df9634f94ceab5602a5b00d4e68e335d5da664c31700c189b53e64ccb69
4
+ data.tar.gz: 44cdfef7065cf7d9f3e576bf799fbaad3cb3df386e8a5bc06bf566d6b1d03246
5
5
  SHA512:
6
- metadata.gz: bb94d132e2bc6baa03bc1b9321abc8de50df247ea04767a47cc1d530719a4fc13e4445648b3dc46e1d46b1cf1165d6df26fc247c985a264a05dbfcb92ca5a7c5
7
- data.tar.gz: 5f7ad7194685207a41c3ae66327e212dfe199dc898ebb062937274250bfb7c6fe6cd99a96045de14e0805160762eb0eb3a2f6a3d323d055eca674ba3b51fa3df
6
+ metadata.gz: d3a50875a57cd0be59b9e7cf019d5565f9dc6a52f924338a28451845ff662d84a131c61f021fd3f7cc381c511db708cedb187efd17fe6535a302fb053e892c39
7
+ data.tar.gz: 325a7785ad00eedad92e6a5466cfc1af10ef636265dd02a822f7d0d62138cc87d7aca0e6de1d8d0c30b58dbf5b21cee950773e111120764dfd602637d057a7db
@@ -10,17 +10,24 @@ module Sinatra
10
10
  error_template(404)
11
11
  error_template(403)
12
12
  error_template(500)
13
+ error_template(Sequel::DatabaseDisconnectError)
14
+ error_template(Sequel::DatabaseConnectionError)
13
15
  end
14
16
 
15
17
  def error_template(code)
16
- ErrorHandler.copy_file("/lib/sinatra/views/errors/#{code}.slim","/app/views/#{Hexacta::GEM_FILE_DIR}/errors/#{code}.slim")
18
+ if code.is_a? Numeric
19
+ template_code = code
20
+ else
21
+ template_code = code.to_s.split('::').last
22
+ end
23
+ ErrorHandler.copy_file("/lib/sinatra/views/errors/#{template_code}.slim","/app/views/#{Hexacta::GEM_FILE_DIR}/errors/#{template_code}.slim")
17
24
  error code do
18
25
  if code == 500
19
26
  title = env['sinatra.error'].message.split(':')[0].gsub('#<','');
20
27
  message = (["in #{request.url}"] + env['sinatra.error'].backtrace).join(',');
21
28
  NotificationSender.instance.send_error(authenticated(User),title,message)
22
29
  end
23
- slim "#{Hexacta::GEM_FILE_DIR}/errors/#{code}".to_sym, locals: { :params => params }
30
+ slim "#{Hexacta::GEM_FILE_DIR}/errors/#{template_code}".to_sym, locals: { :params => params }
24
31
  end
25
32
  end
26
33
 
@@ -14195,12 +14195,17 @@ html:not(.ie9) .select.fg-line:before {
14195
14195
  position: relative;
14196
14196
  }
14197
14197
 
14198
- .fg-float .form-control {
14198
+ .fg-float .form-control::read-write {
14199
14199
  position: relative;
14200
14200
  background: transparent;
14201
14201
  z-index: 1;
14202
14202
  }
14203
14203
 
14204
+ .fg-float .form-control::read-only {
14205
+ position: relative;
14206
+ z-index: 1;
14207
+ }
14208
+
14204
14209
  .fg-float .form-control::-moz-placeholder {
14205
14210
  color: #ffffff;
14206
14211
  opacity: 1;
@@ -1,4 +1,4 @@
1
- .lv-item.p-20.bgm-lightgray.m-b-5
1
+ .lv-item.p-20.bgm-lightgray
2
2
  .media
3
3
  .pull-left
4
4
  i.zmdi.zmdi-hc-3x.zmdi-alert-circle-o.c-gray
@@ -1,4 +1,4 @@
1
- .lv-item.p-20.bgm-red.m-b-5
1
+ .lv-item.p-20.bgm-red
2
2
  .media
3
3
  .pull-left
4
4
  i.zmdi.zmdi-hc-3x.zmdi-alert-octagon.c-white
@@ -1,4 +1,4 @@
1
- .lv-item.p-20.bgm-blue.m-b-5
1
+ .lv-item.p-20.bgm-blue
2
2
  .media
3
3
  .pull-left
4
4
  i.zmdi.zmdi-hc-3x.zmdi-info.c-white
@@ -1,4 +1,4 @@
1
- .lv-item.p-20.bgm-orange.m-b-5
1
+ .lv-item.p-20.bgm-orange
2
2
  .media
3
3
  .pull-left
4
4
  i.zmdi.zmdi-hc-3x.zmdi-alert-triangle.c-white
@@ -0,0 +1,27 @@
1
+ .row
2
+ .col-xs-12
3
+ .progress.progress-striped.active.bgm-red style="height:80px;"
4
+ .progress-bar.progress-bar-danger aria-valuemax="100" aria-valuemin="0" aria-valuenow="0" role="progressbar" style="width: 0%;text-align:left;"
5
+ .lv-item.p-20.p-fixed
6
+ .media
7
+ .pull-left
8
+ i.zmdi.zmdi-hc-3x.zmdi-cloud-off.c-white
9
+ .media-body
10
+ .lv-title.c-white Error de conexión con la base de datos
11
+ small.lv-small.c-white Espera unos segundos mientras se reestablece la conexión.
12
+
13
+
14
+ javascript:
15
+ $(document).ready(function() {
16
+ setTimeout(function(){
17
+ window.location.reload(1);
18
+ }, 5000);
19
+
20
+ update_progress();
21
+
22
+ function update_progress() {
23
+ var current = $(".progress-bar").width() / $('.progress-bar').parent().width() * 100;
24
+ $(".progress-bar").width( current + 10 + "%");
25
+ setTimeout(update_progress, 100);
26
+ }
27
+ });
@@ -0,0 +1,29 @@
1
+ .row
2
+ .col-xs-12
3
+ .progress.progress-striped.active.bgm-orange style="height:80px;"
4
+ .progress-bar.progress-bar-warning aria-valuemax="100" aria-valuemin="0" aria-valuenow="0" role="progressbar" style="width: 0%;text-align:left;"
5
+ .lv-item.p-20.p-fixed
6
+ .media
7
+ .pull-left
8
+ i.zmdi.zmdi-hc-3x.zmdi-cloud-off.c-white
9
+ .media-body
10
+ .lv-title.c-white Conexión con la base de datos
11
+ small.lv-small.c-white Espera unos segundos mientras se reestablece la conexión.
12
+
13
+
14
+
15
+ javascript:
16
+ $(document).ready(function() {
17
+ setTimeout(function(){
18
+ window.location.reload(1);
19
+ }, 5000);
20
+
21
+ update_progress();
22
+
23
+ function update_progress() {
24
+ var current = $(".progress-bar").width() / $('.progress-bar').parent().width() * 100;
25
+ $(".progress-bar").width( current + 10 + "%");
26
+ setTimeout(update_progress, 100);
27
+ }
28
+ });
29
+
@@ -4,11 +4,19 @@
4
4
  - id = "#{name}_#{rand(1000)}"
5
5
  - unless defined? clazz
6
6
  - clazz = nil
7
+ -unless defined? readonly
8
+ -readonly = false
7
9
 
8
10
  .form-group.fg-float
9
11
  label #{title}
10
12
  .fg-line
11
13
  -if required
12
- input.form-control.date-picker.fg-input id="#{id}" type="text" name="#{name}" required="" class="#{clazz}" value="#{value}"
14
+ -if readonly
15
+ input.form-control.date-picker.fg-input id="#{id}" type="text" name="#{name}" required="" class="#{clazz}" value="#{value}" readonly=''
16
+ -else
17
+ input.form-control.date-picker.fg-input id="#{id}" type="text" name="#{name}" required="" class="#{clazz}" value="#{value}"
13
18
  -else
14
- input.form-control.date-picker.fg-input id="#{id}" type="text" name="#{name}" class="#{clazz}" value="#{value}"
19
+ -if readonly
20
+ input.form-control.date-picker.fg-input id="#{id}" type="text" name="#{name}" class="#{clazz}" value="#{value}" readonly=''
21
+ -else
22
+ input.form-control.date-picker.fg-input id="#{id}" type="text" name="#{name}" class="#{clazz}" value="#{value}"
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.13
4
+ version: 0.3.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marco Zanger
@@ -157,6 +157,8 @@ files:
157
157
  - lib/sinatra/views/errors/403.slim
158
158
  - lib/sinatra/views/errors/404.slim
159
159
  - lib/sinatra/views/errors/500.slim
160
+ - lib/sinatra/views/errors/DatabaseConnectionError.slim
161
+ - lib/sinatra/views/errors/DatabaseDisconnectError.slim
160
162
  - lib/sinatra/views/inputs/date.slim
161
163
  - lib/sinatra/views/inputs/input.slim
162
164
  - lib/sinatra/views/inputs/month.slim