sinatra-hexacta 0.3.12 → 0.3.17

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: b05ab9d7ae4bf96f2f47c7ebde837a7d113e2c1469d1facfc73251668c8e9804
4
- data.tar.gz: '0728b357d1e61f664b1ca0ab0b2d5deca30f3281a142e72a02efdfda8c499960'
3
+ metadata.gz: 7ce9729468b924495d760e891e5011f6ec91a7a1d5867445043fb36cd8c7cced
4
+ data.tar.gz: 84206d7c18208e55794e01e00904c1c58f0781f7f7116045d560ae44ec6bb659
5
5
  SHA512:
6
- metadata.gz: b246a36b3d31a267253134b4adfa1bd9f4a9ab0774424eb0888877b2838dabfcb4e041a9b9352f1776a4f2fb875f96dc1624e2ca644162e21cfa030a2c536716
7
- data.tar.gz: ae78d283fd4d59b8577e734e818eb48f3182082a52509fb950f9566fb1771f60d8a183e7c1171bd614adcb227541a674eb79482bf2a2515f68ac5ca1f63494a0
6
+ metadata.gz: 407744e4cf104e64dd731aaca8b3c302b888b6045065cba2f35789c99700c9459d8806879fc76cb6adb7216285805472849cd9e832f0ae13c31ffb35ee2e6372
7
+ data.tar.gz: 2523b68e3033e60b18f4dd0b6efeafd16f68b8a5ba1f1b2baaf38e5622fe26f3bb72deea41338bc250a1fa1da9c709f339c939b44d0b8cb2623cd1955d4a123e
@@ -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
 
@@ -13860,7 +13860,7 @@ fieldset[disabled] .btn-inverse:active {
13860
13860
  */
13861
13861
 
13862
13862
  .m-btn {
13863
- z-index: 10;
13863
+ z-index: 9;
13864
13864
  right: 40px;
13865
13865
  bottom: 40px;
13866
13866
  position: fixed !important;
@@ -13905,7 +13905,7 @@ fieldset[disabled] .btn-inverse:active {
13905
13905
  border-radius: 20px;
13906
13906
  opacity: 0.6;
13907
13907
  font-size: 8pt;
13908
- z-index: 10;
13908
+ z-index: 9;
13909
13909
  }
13910
13910
 
13911
13911
  .left-footer .text {
@@ -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,18 @@
1
+ .row
2
+ .col-xs-12
3
+ .lv-item.p-20.bgm-orange.m-b-5
4
+ .media
5
+ .pull-left
6
+ i.zmdi.zmdi-hc-3x.zmdi-cloud-off.c-white
7
+ .media-body
8
+ .lv-title.c-white Error de conexión con la base de datos
9
+ small.lv-small.c-white Espera unos segundos mientras se reestablece la conexión.
10
+
11
+
12
+
13
+ javascript:
14
+ $(document).ready(function() {
15
+ setTimeout(function(){
16
+ window.location.reload(1);
17
+ }, 5000);
18
+ });
@@ -0,0 +1,18 @@
1
+ .row
2
+ .col-xs-12
3
+ .lv-item.p-20.bgm-orange.m-b-5
4
+ .media
5
+ .pull-left
6
+ i.zmdi.zmdi-hc-3x.zmdi-cloud-off.c-white
7
+ .media-body
8
+ .lv-title.c-white Conexión con la base de datos
9
+ small.lv-small.c-white Espera unos segundos mientras se reestablece la conexión.
10
+
11
+
12
+
13
+ javascript:
14
+ $(document).ready(function() {
15
+ setTimeout(function(){
16
+ window.location.reload(1);
17
+ }, 5000);
18
+ });
@@ -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.12
4
+ version: 0.3.17
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