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 +4 -4
- data/lib/sinatra/handlers/errors.rb +9 -2
- data/lib/sinatra/public/css/app.min.1.css +8 -3
- data/lib/sinatra/views/alerts/empty.slim +1 -1
- data/lib/sinatra/views/alerts/error.slim +1 -1
- data/lib/sinatra/views/alerts/info.slim +1 -1
- data/lib/sinatra/views/alerts/warning.slim +1 -1
- data/lib/sinatra/views/errors/DatabaseConnectionError.slim +18 -0
- data/lib/sinatra/views/errors/DatabaseDisconnectError.slim +18 -0
- data/lib/sinatra/views/inputs/date.slim +10 -2
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ce9729468b924495d760e891e5011f6ec91a7a1d5867445043fb36cd8c7cced
|
4
|
+
data.tar.gz: 84206d7c18208e55794e01e00904c1c58f0781f7f7116045d560ae44ec6bb659
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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/#{
|
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:
|
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:
|
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;
|
@@ -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
|
-
|
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
|
-
|
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.
|
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
|