bhf 0.6.6 → 0.6.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/bhf/entries_helper.rb +7 -3
- data/app/views/bhf/_user.haml +1 -1
- data/app/views/bhf/entries/form/column/_static.haml +1 -0
- data/app/views/bhf/entries/show.haml +9 -5
- data/app/views/bhf/helper/_definition_item.haml +4 -0
- data/app/views/layouts/bhf/application.haml +3 -1
- data/lib/bhf/data.rb +26 -3
- data/lib/bhf/platform.rb +11 -4
- data/vendor/assets/images/bhf/pictos.png +0 -0
- data/vendor/assets/images/bhf/pictos_2x.png +0 -0
- data/vendor/assets/images/logo_bhf.svg +9 -0
- data/vendor/assets/javascripts/bhf/application.js +2 -2
- data/vendor/assets/stylesheets/bhf/application.css.sass +98 -88
- data/vendor/assets/stylesheets/bhf/functions.css.sass +3 -3
- metadata +5 -3
- data/vendor/assets/images/logo_bhf.png +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d548b4fa7dceb488f5237116409882daf24ddc2c
|
4
|
+
data.tar.gz: 30151e7d31631907e81e099fe9d47ef53297b9de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9d5bd340a10d4e43fd729fff2a002833fa5289ec85a487c3a2701effe70886c4bf1a9efdaddda04f9b3f053a8e5eebfdec52e360fc08d20800ad5aaeffe4b45
|
7
|
+
data.tar.gz: 5669e6ec13eb935aa5f17143469aff8f34fae25d99b14a5f1b68f33d8afc03bc847f7a5ee5cbb78948c42ad5508173146aedcf51415fb797700e78c9c61ac636
|
@@ -4,18 +4,22 @@ module Bhf
|
|
4
4
|
def node(f, field, &block)
|
5
5
|
render partial: 'bhf/helper/node', locals: {f: f, field: field, input: with_output_buffer(&block)}
|
6
6
|
end
|
7
|
-
|
7
|
+
|
8
|
+
def definition_item(object, column, &block)
|
9
|
+
render partial: 'bhf/helper/definition_item', locals: {object: object, column: column, content: with_output_buffer(&block)}
|
10
|
+
end
|
11
|
+
|
8
12
|
def reflection_node(f, field, &block)
|
9
13
|
return if field.form_type == :static && f.object.new_record? && f.object.send(field.reflection.name).blank?
|
10
14
|
render partial: 'bhf/helper/reflection_node', locals: {
|
11
15
|
f: f, field: field, input: with_output_buffer(&block)
|
12
16
|
}
|
13
17
|
end
|
14
|
-
|
18
|
+
|
15
19
|
def is_image?(file)
|
16
20
|
! file.match(/\.png|\.jpg|\.jpeg|\.gif|\.svg/i).nil?
|
17
21
|
end
|
18
|
-
|
22
|
+
|
19
23
|
def reflection_title(f, field)
|
20
24
|
title = f.object.class.human_attribute_name(field.reflection.name)
|
21
25
|
if field.link
|
data/app/views/bhf/_user.haml
CHANGED
@@ -2,4 +2,4 @@
|
|
2
2
|
%p.user
|
3
3
|
= t('bhf.helpers.user.login.as', user: current_account.to_bhf_s).html_safe
|
4
4
|
- if self.respond_to?(Bhf::Engine.config.logout_path)
|
5
|
-
= link_to t('bhf.helpers.user.logout.link'), self.send(Bhf::Engine.config.logout_path), method: :delete
|
5
|
+
= link_to t('bhf.helpers.user.logout.link'), self.send(Bhf::Engine.config.logout_path), method: :delete, class: :alt_button
|
@@ -1,7 +1,11 @@
|
|
1
1
|
%h3= show_t @platform
|
2
|
-
.dl
|
2
|
+
.dl.content_box
|
3
3
|
- @platform.definitions.each do |column|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
- tmp = column.field.show_type ? column.field.show_type : column.field.display_type
|
5
|
+
= definition_item @object, column do
|
6
|
+
= render(partial: "bhf/pages/macro/#{column.field.macro}/#{tmp}", locals: {column: column, object: @object})
|
7
|
+
|
8
|
+
.content_box
|
9
|
+
- @platform.show_extra_fields.each do |name|
|
10
|
+
= render(partial: "bhf/pages/show/#{name}", locals: {name: name, object: @object})
|
11
|
+
|
@@ -11,7 +11,9 @@
|
|
11
11
|
|
12
12
|
%body
|
13
13
|
%header
|
14
|
-
%h1
|
14
|
+
%h1
|
15
|
+
- logo = Rails.application.assets.find_asset('logo_bhf.png') ? 'logo_bhf.png' : 'logo_bhf.svg'
|
16
|
+
= link_to image_tag(asset_path(logo)), root_url, :'data-no-turbolink' => true
|
15
17
|
- if @config && @config.pages.any?
|
16
18
|
%nav
|
17
19
|
%ul
|
data/lib/bhf/data.rb
CHANGED
@@ -1,11 +1,13 @@
|
|
1
1
|
module Bhf
|
2
2
|
module Data
|
3
3
|
class AbstractField
|
4
|
-
attr_reader :name, :info, :macro, :display_type, :form_type, :overwrite_type, :overwrite_display_type
|
4
|
+
attr_reader :name, :info, :macro, :display_type, :form_type, :show_type, :overwrite_type, :overwrite_display_type, :overwrite_show_type
|
5
5
|
|
6
6
|
def initialize(props)
|
7
7
|
@name = props[:name]
|
8
8
|
@form_type = props[:form_type]
|
9
|
+
@show_type = props[:show_type]
|
10
|
+
@overwrite_show_type = props[:show_type]
|
9
11
|
@display_type = props[:display_type]
|
10
12
|
@overwrite_display_type = props[:display_type]
|
11
13
|
@info = props[:info]
|
@@ -15,7 +17,7 @@ module Bhf
|
|
15
17
|
|
16
18
|
class Field
|
17
19
|
|
18
|
-
attr_reader :info, :overwrite_display_type
|
20
|
+
attr_reader :info, :overwrite_display_type, :overwrite_show_type
|
19
21
|
|
20
22
|
def initialize(props, options = {}, pk = 'id')
|
21
23
|
@props = props
|
@@ -23,6 +25,7 @@ module Bhf
|
|
23
25
|
|
24
26
|
@overwrite_type = options[:overwrite_type].to_sym if options[:overwrite_type]
|
25
27
|
@overwrite_display_type = options[:overwrite_display_type].to_sym if options[:overwrite_display_type]
|
28
|
+
@overwrite_show_type = options[:overwrite_show_type].to_sym if options[:overwrite_show_type]
|
26
29
|
|
27
30
|
@primary_key = pk
|
28
31
|
end
|
@@ -36,6 +39,10 @@ module Bhf
|
|
36
39
|
|
37
40
|
@props.type
|
38
41
|
end
|
42
|
+
|
43
|
+
def show_type
|
44
|
+
return @overwrite_show_type if @overwrite_show_type
|
45
|
+
end
|
39
46
|
|
40
47
|
def form_type
|
41
48
|
return @overwrite_type if @overwrite_type
|
@@ -86,7 +93,7 @@ module Bhf
|
|
86
93
|
|
87
94
|
class Reflection
|
88
95
|
|
89
|
-
attr_reader :reflection, :info, :link, :overwrite_display_type
|
96
|
+
attr_reader :reflection, :info, :link, :overwrite_display_type, :overwrite_show_type
|
90
97
|
|
91
98
|
def initialize(reflection, options = {})
|
92
99
|
@reflection = reflection
|
@@ -95,6 +102,7 @@ module Bhf
|
|
95
102
|
|
96
103
|
@overwrite_type = options[:overwrite_type].to_sym if options[:overwrite_type]
|
97
104
|
@overwrite_display_type = options[:overwrite_display_type].to_sym if options[:overwrite_display_type]
|
105
|
+
@overwrite_show_type = options[:overwrite_show_type].to_sym if options[:overwrite_show_type]
|
98
106
|
end
|
99
107
|
|
100
108
|
def macro
|
@@ -122,6 +130,10 @@ module Bhf
|
|
122
130
|
:default
|
123
131
|
end
|
124
132
|
|
133
|
+
def show_type
|
134
|
+
return @overwrite_show_type if @overwrite_show_type
|
135
|
+
end
|
136
|
+
|
125
137
|
def name
|
126
138
|
@reflection.name.to_s
|
127
139
|
end
|
@@ -140,5 +152,16 @@ module Bhf
|
|
140
152
|
|
141
153
|
end
|
142
154
|
|
155
|
+
class Show
|
156
|
+
|
157
|
+
attr_reader :name, :field, :overwrite_show_type
|
158
|
+
|
159
|
+
def initialize(field)
|
160
|
+
@name = field.name
|
161
|
+
@field = field
|
162
|
+
end
|
163
|
+
|
164
|
+
end
|
165
|
+
|
143
166
|
end
|
144
167
|
end
|
data/lib/bhf/platform.rb
CHANGED
@@ -90,18 +90,22 @@ module Bhf
|
|
90
90
|
end
|
91
91
|
|
92
92
|
def columns
|
93
|
-
default_attrs(table_options(:columns), @collection[0..5]).
|
93
|
+
default_attrs(table_options(:display) || table_options(:columns), @collection[0..5]).
|
94
94
|
each_with_object([]) do |field, obj|
|
95
95
|
obj << Bhf::Data::Column.new(field)
|
96
96
|
end
|
97
97
|
end
|
98
98
|
|
99
99
|
def definitions
|
100
|
-
default_attrs(show_options(:definitions), @collection).
|
100
|
+
default_attrs(show_options(:display) || show_options(:definitions), @collection, false).
|
101
101
|
each_with_object([]) do |field, obj|
|
102
|
-
obj << Bhf::Data::
|
102
|
+
obj << Bhf::Data::Show.new(field)
|
103
103
|
end
|
104
104
|
end
|
105
|
+
|
106
|
+
def show_extra_fields
|
107
|
+
show_options(:extra_fields)
|
108
|
+
end
|
105
109
|
|
106
110
|
def entries_per_page
|
107
111
|
table_options(:per_page)
|
@@ -179,7 +183,7 @@ module Bhf
|
|
179
183
|
end
|
180
184
|
|
181
185
|
def data_source
|
182
|
-
table_options(:source)
|
186
|
+
table_options(:source) || table_options(:scope)
|
183
187
|
end
|
184
188
|
|
185
189
|
def default_attrs(attrs, d_attrs, warning = true)
|
@@ -193,6 +197,7 @@ module Bhf
|
|
193
197
|
name: attr_name,
|
194
198
|
form_type: form_options(:types, attr_name) || attr_name,
|
195
199
|
display_type: table_options(:types, attr_name) || attr_name,
|
200
|
+
show_type: show_options(:types, attr_name) || table_options(:types, attr_name) || attr_name,
|
196
201
|
info: I18n.t("bhf.platforms.#{@name}.infos.#{attr_name}", default: '')
|
197
202
|
})
|
198
203
|
)
|
@@ -207,6 +212,7 @@ module Bhf
|
|
207
212
|
all[name] = Bhf::Data::Field.new(props, {
|
208
213
|
overwrite_type: form_options(:types, name),
|
209
214
|
overwrite_display_type: table_options(:types, name),
|
215
|
+
overwrite_show_type: show_options(:types, name) || table_options(:types, name),
|
210
216
|
info: I18n.t("bhf.platforms.#{@name}.infos.#{name}", default: '')
|
211
217
|
}, model.bhf_primary_key)
|
212
218
|
end
|
@@ -216,6 +222,7 @@ module Bhf
|
|
216
222
|
all[name.to_s] = Bhf::Data::Reflection.new(props, {
|
217
223
|
overwrite_type: form_options(:types, name),
|
218
224
|
overwrite_display_type: table_options(:types, name),
|
225
|
+
overwrite_show_type: show_options(:types, name) || table_options(:types, name),
|
219
226
|
info: I18n.t("bhf.platforms.#{@name}.infos.#{name}", default: ''),
|
220
227
|
link: form_options(:links, name)
|
221
228
|
})
|
Binary file
|
Binary file
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<svg width="94px" height="59px" viewBox="0 0 94 59" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
|
3
|
+
<title>logo_bhf</title>
|
4
|
+
<description>Created with Sketch (http://www.bohemiancoding.com/sketch)</description>
|
5
|
+
<defs></defs>
|
6
|
+
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
|
7
|
+
<path d="M8.13040865,2.17367788 L8.13040865,29.5414663 C11.1051831,26.456515 14.4765437,24.9140625 18.2445913,24.9140625 C22.5855586,24.9140625 26.1993045,26.5336377 29.0859375,29.7728365 C31.9725705,32.9900001 33.4158654,37.0003766 33.4158654,41.8040865 C33.4158654,46.762044 31.961553,50.8605607 29.0528846,54.0997596 C26.1662516,57.3169231 22.5194531,58.9254808 18.1123798,58.9254808 C14.3884029,58.9254808 11.0611124,57.4932034 8.13040865,54.6286058 L8.13040865,58 L0.693509615,58 L0.693509615,2.17367788 L8.13040865,2.17367788 Z M25.8137019,42.1346154 C25.8137019,39.0496641 24.9763706,36.53767 23.3016827,34.5985577 C21.6049595,32.6153747 19.4785785,31.6237981 16.922476,31.6237981 C14.1900905,31.6237981 11.9645519,32.5823221 10.2457933,34.499399 C8.54907004,36.3944406 7.70072115,38.8623646 7.70072115,41.9032452 C7.70072115,45.0322672 8.53805252,47.5332438 10.2127404,49.40625 C11.8874282,51.3233269 14.0909319,52.281851 16.8233173,52.281851 C19.4014552,52.281851 21.5388537,51.3233269 23.2355769,49.40625 C24.9543355,47.4671377 25.8137019,45.0432838 25.8137019,42.1346154 Z M41.2824519,2.17367788 L48.719351,2.17367788 L48.719351,28.483774 C51.363595,26.1039544 54.2832372,24.9140625 57.4783654,24.9140625 C61.1142009,24.9140625 64.0228256,26.0929369 66.2043269,28.4507212 C68.0552977,30.5000102 68.9807692,33.7722131 68.9807692,38.2674279 L68.9807692,58 L61.5438702,58 L61.5438702,38.9615385 C61.5438702,36.3834006 61.0866432,34.5159313 60.1721755,33.3590745 C59.2577078,32.2022178 57.7868691,31.6237981 55.7596154,31.6237981 C53.1594421,31.6237981 51.3305341,32.4280769 50.2728365,34.0366587 C49.2371743,35.6672758 48.719351,38.4657254 48.719351,42.4320913 L48.719351,58 L41.2824519,58 L41.2824519,2.17367788 Z M86.1021635,32.7475962 L86.1021635,58 L78.6322115,58 L78.6322115,32.7475962 L75.9879808,32.7475962 L75.9879808,25.8064904 L78.6322115,25.8064904 L78.6322115,13.3786058 C78.6322115,9.32409832 79.3373327,6.45954363 80.7475962,4.78485577 C82.6867084,2.44910691 85.507193,1.28125 89.2091346,1.28125 C90.5312566,1.28125 92.1949018,1.66686313 94.2001202,2.43810096 L94.2001202,10.0402644 L93.4399038,9.64362981 C91.8313221,8.82832124 90.5092199,8.42067308 89.4735577,8.42067308 C88.1514357,8.42067308 87.2590167,8.89442635 86.796274,9.84194712 C86.3335313,10.7674325 86.1021635,12.5522704 86.1021635,15.1965144 L86.1021635,25.8064904 L94.2001202,25.8064904 L94.2001202,32.7475962 L86.1021635,32.7475962 Z" id="bhf" fill="#EAEAEA" sketch:type="MSShapeGroup"></path>
|
8
|
+
</g>
|
9
|
+
</svg>
|
@@ -5,8 +5,8 @@
|
|
5
5
|
//= require_tree ./classes/
|
6
6
|
|
7
7
|
var ajaxNote = new Ajaxify();
|
8
|
-
var quickEdit = new AjaxEdit();
|
9
8
|
var bhfInit = function(){
|
9
|
+
var quickEdit = new AjaxEdit();
|
10
10
|
ajaxNote.setup();
|
11
11
|
var lang = document.html.get('lang');
|
12
12
|
if (lang === 'en') {
|
@@ -182,6 +182,7 @@ var bhfInit = function(){
|
|
182
182
|
parent.innerHTML = html;
|
183
183
|
setupSortables(parent);
|
184
184
|
ajaxNote.success();
|
185
|
+
window.fireEvent('platformUpdate', [parent]);
|
185
186
|
}
|
186
187
|
}).send({data: this});
|
187
188
|
},
|
@@ -339,7 +340,6 @@ if (document.addEventListener) {
|
|
339
340
|
});
|
340
341
|
|
341
342
|
document.addEventListener('page:load', function(){
|
342
|
-
quickEdit.removeEvents();
|
343
343
|
bhfInit();
|
344
344
|
rails.applyEvents();
|
345
345
|
ajaxNote.success();
|
@@ -15,13 +15,16 @@ html
|
|
15
15
|
min-width: 700px
|
16
16
|
height: 100%
|
17
17
|
overflow-y: scroll
|
18
|
-
background: image-url('bhf/small_ajax_loader.gif') no-repeat -300px -300px, image-url('bhf/small_ajax_loader_h.gif') no-repeat -300px -300px, #303030
|
19
|
-
|
18
|
+
background: image-url('bhf/small_ajax_loader.gif') no-repeat -300px -300px, image-url('bhf/small_ajax_loader_h.gif') no-repeat -300px -300px, #303030
|
20
19
|
|
21
20
|
body
|
22
21
|
min-width: 960px
|
23
22
|
min-height: 100%
|
24
|
-
|
23
|
+
//+box-inner-shadow(0, 0, 8,#000)
|
24
|
+
-webkit-font-smoothing: antialiased
|
25
|
+
-moz-font-smoothing: antialiased
|
26
|
+
-o-font-smoothing: antialiased
|
27
|
+
-moz-osx-font-smoothing: grayscale
|
25
28
|
|
26
29
|
a
|
27
30
|
text-decoration: none
|
@@ -39,6 +42,12 @@ header
|
|
39
42
|
float: right
|
40
43
|
height: 83px
|
41
44
|
overflow: hidden
|
45
|
+
a
|
46
|
+
padding: 16px 24px 0 0
|
47
|
+
display: block
|
48
|
+
img
|
49
|
+
display: block
|
50
|
+
height: 50px
|
42
51
|
nav
|
43
52
|
padding-top: 25px
|
44
53
|
li
|
@@ -49,9 +58,8 @@ header
|
|
49
58
|
&.active
|
50
59
|
a
|
51
60
|
+text-shadow(#fff)
|
52
|
-
+bg-gradient(#
|
61
|
+
+bg-gradient(#eaeaea, #D5D5D5)
|
53
62
|
+box-shadow(0, 1, 4)
|
54
|
-
border-color: #FFFFFF
|
55
63
|
color: #414756
|
56
64
|
&:hover
|
57
65
|
+bg-gradient(#D5D5D5, #FFFFFF)
|
@@ -62,13 +70,11 @@ header
|
|
62
70
|
text-decoration: none
|
63
71
|
display: block
|
64
72
|
padding: 5px 23px
|
65
|
-
border: 1px solid transparent
|
66
73
|
color: #EAEAEA
|
67
74
|
+text-shadow(#000, -1)
|
68
75
|
&:hover
|
69
76
|
+bg-gradient($b1, $b2)
|
70
77
|
color: $w1
|
71
|
-
border-color: $b1
|
72
78
|
+box-shadow(0, 1, 4)
|
73
79
|
+text-shadow(#0068B3)
|
74
80
|
&:active
|
@@ -83,12 +89,30 @@ header
|
|
83
89
|
max-width: 400px
|
84
90
|
max-height: 200px
|
85
91
|
|
92
|
+
.content_box
|
93
|
+
margin: 10px 10px 20px 20px
|
86
94
|
.dl
|
87
95
|
+text-shadow(#fff)
|
88
96
|
.dt
|
89
97
|
display: inline-block
|
90
98
|
min-width: 200px
|
91
99
|
color: $g1
|
100
|
+
a
|
101
|
+
text-decoration: underline
|
102
|
+
.default_table
|
103
|
+
width: 100%
|
104
|
+
td, th
|
105
|
+
padding: 2px 5px
|
106
|
+
thead
|
107
|
+
th
|
108
|
+
background: #3E3E3E
|
109
|
+
color: #C2C2C2
|
110
|
+
text-align: left
|
111
|
+
tbody
|
112
|
+
td
|
113
|
+
border-bottom: 1px solid #E0E0E0
|
114
|
+
.font_size_bigger
|
115
|
+
font-size: 1.2em
|
92
116
|
|
93
117
|
|
94
118
|
.quick_edit_holder,
|
@@ -96,26 +120,25 @@ header
|
|
96
120
|
display: table-cell
|
97
121
|
overflow: hidden
|
98
122
|
background: #EAEAEA
|
99
|
-
border: 3px solid #FFFFFF
|
100
123
|
box-sizing: border-box
|
101
|
-
padding: 10px 20px
|
102
124
|
+box-shadow(0, 1, 4, rgba($k1, 0.5))
|
125
|
+
> h3
|
126
|
+
padding: 9px 20px
|
127
|
+
background: #dbdbdb
|
128
|
+
|
103
129
|
|
104
|
-
#main_form
|
105
|
-
// TODO: wtf css?
|
106
|
-
margin-left: -20px
|
107
|
-
|
108
130
|
|
109
131
|
|
110
132
|
#content
|
111
133
|
display: table
|
112
134
|
width: 100%
|
113
135
|
box-sizing: border-box
|
114
|
-
|
115
|
-
|
136
|
+
form
|
137
|
+
border-spacing: 20px
|
116
138
|
h2,
|
117
139
|
h3
|
118
140
|
+text-shadow(#fff)
|
141
|
+
color: #3e3e3e
|
119
142
|
h6
|
120
143
|
color: $g3
|
121
144
|
+text-shadow(#fff)
|
@@ -142,14 +165,15 @@ header
|
|
142
165
|
width: 300px
|
143
166
|
height: 100px
|
144
167
|
|
168
|
+
.quick_edit_holder
|
169
|
+
padding: 0
|
170
|
+
form
|
171
|
+
padding: 10px 20px
|
145
172
|
.group
|
173
|
+
margin-top: 0
|
174
|
+
margin-bottom: 10px
|
175
|
+
margin-left: 20px
|
146
176
|
padding: 0
|
147
|
-
&:active
|
148
|
-
.save
|
149
|
-
border-right: 1px solid rgba(#fff, 0.4)
|
150
|
-
.save_and_next
|
151
|
-
border-left: 1px solid $b2
|
152
|
-
|
153
177
|
button
|
154
178
|
border: none
|
155
179
|
background: none
|
@@ -164,13 +188,9 @@ header
|
|
164
188
|
outline: 0
|
165
189
|
&.save
|
166
190
|
border-right: 1px solid $b2
|
167
|
-
|
168
|
-
|
169
|
-
&:focus
|
170
|
-
color: $b2
|
171
|
-
text-shadow: 0 0px 3px #fff
|
191
|
+
&:hover
|
192
|
+
color: darken($b2, 15%)
|
172
193
|
&.save_and_next
|
173
|
-
border-left: 1px solid rgba(#fff, 0.3)
|
174
194
|
text-indent: -9999px
|
175
195
|
background: image-url('bhf/pictos.png') no-repeat -140px -40px
|
176
196
|
width: 40px
|
@@ -183,16 +203,12 @@ header
|
|
183
203
|
&.cancel,
|
184
204
|
&.open
|
185
205
|
float: right
|
186
|
-
margin-top:
|
187
|
-
&.cancel
|
188
|
-
margin-right: -10px
|
189
|
-
&.open
|
206
|
+
margin-top: 10px
|
190
207
|
margin-right: 10px
|
191
208
|
&.save
|
192
209
|
margin-right: 16px
|
193
210
|
|
194
211
|
table.data_table
|
195
|
-
margin-top: 20px
|
196
212
|
margin-bottom: 40px
|
197
213
|
width: 100%
|
198
214
|
caption
|
@@ -200,14 +216,7 @@ table.data_table
|
|
200
216
|
height: 28px
|
201
217
|
-moz-box-sizing: content-box
|
202
218
|
padding: 10px 10px 10px 20px
|
203
|
-
|
204
|
-
+box-shadow(0, 1, 4, #ccc)
|
205
|
-
background: #C9C9C9
|
206
|
-
background: -webkit-gradient(linear, left top, left bottom, from(#CCCCCC), color-stop(50%, #CCCCCC), color-stop(51%, #DCDCDC), to(#DCDCDC))
|
207
|
-
background-size: 100% 2px
|
208
|
-
border: 1px solid #C4C4C4
|
209
|
-
border-bottom: 0
|
210
|
-
border-top: 0
|
219
|
+
background: #DBDBDB
|
211
220
|
text-align: left
|
212
221
|
h4,
|
213
222
|
.info
|
@@ -223,6 +232,8 @@ table.data_table
|
|
223
232
|
font-size: 12px
|
224
233
|
color: $g1
|
225
234
|
white-space: nowrap
|
235
|
+
strong
|
236
|
+
color: #3E3E3E
|
226
237
|
form
|
227
238
|
display: inline-block
|
228
239
|
.create
|
@@ -233,26 +244,15 @@ table.data_table
|
|
233
244
|
th:first-child
|
234
245
|
padding-left: 20px
|
235
246
|
|
236
|
-
td
|
237
|
-
&:first-child
|
238
|
-
+border-left-radius(4)
|
239
|
-
&:last-child
|
240
|
-
+border-right-radius(4)
|
241
247
|
thead
|
242
248
|
th
|
243
249
|
padding: 4px 0
|
244
250
|
padding-left: 3px
|
245
251
|
text-align: left
|
246
|
-
border-top: 1px solid #C6C6C6
|
247
|
-
border-bottom: 1px solid #1B1B1B
|
248
252
|
white-space: nowrap
|
249
253
|
background: #3E3E3E
|
250
254
|
+text-shadow(#000, -1)
|
251
255
|
color: #C2C2C2
|
252
|
-
&:first-child
|
253
|
-
+border-bottom-left-radius(4)
|
254
|
-
&:last-child
|
255
|
-
+border-bottom-right-radius(4)
|
256
256
|
&.primary_key
|
257
257
|
text-transform: uppercase
|
258
258
|
&.sorted
|
@@ -274,8 +274,7 @@ table.data_table
|
|
274
274
|
|
275
275
|
tbody
|
276
276
|
td
|
277
|
-
border-
|
278
|
-
border-bottom: 1px solid #C6C6C6
|
277
|
+
border-bottom: 1px solid #E0E0E0
|
279
278
|
&.has_many,
|
280
279
|
&.has_and_belongs_to_many,
|
281
280
|
&.text
|
@@ -333,9 +332,8 @@ table.data_table
|
|
333
332
|
&:hover td,
|
334
333
|
&.live_edit td
|
335
334
|
+bg-gradient($b1, $b2)
|
335
|
+
border-bottom-color: $b1
|
336
336
|
color: $w1
|
337
|
-
box-shadow: inset 0 1px 0 $b2, inset 0 2px 0 rgba(#fff, 0.4)
|
338
|
-
border-color: #EAEAEA
|
339
337
|
.duplicate
|
340
338
|
background-position: -348px -50px
|
341
339
|
&:hover
|
@@ -359,7 +357,7 @@ table.data_table
|
|
359
357
|
background: image-url('bhf/small_ajax_loader_h.gif') no-repeat center center
|
360
358
|
&.live_edit td
|
361
359
|
+bg-gradient($b2, $b1)
|
362
|
-
|
360
|
+
border-bottom-color: $b2
|
363
361
|
&.dragged
|
364
362
|
td
|
365
363
|
opacity: 0.4
|
@@ -372,7 +370,6 @@ table.data_table
|
|
372
370
|
tfoot
|
373
371
|
td
|
374
372
|
padding-top: 10px
|
375
|
-
border-top: 1px solid #FFFFFF
|
376
373
|
|
377
374
|
thead,
|
378
375
|
tbody
|
@@ -387,13 +384,14 @@ table.data_table
|
|
387
384
|
width: 54px
|
388
385
|
&.wider
|
389
386
|
width: 88px
|
390
|
-
|
387
|
+
tbody
|
388
|
+
.primary_key
|
389
|
+
color: #999
|
391
390
|
|
392
391
|
.default_input
|
393
|
-
border: 1px solid
|
392
|
+
border: 1px solid transparent
|
394
393
|
background: #FFF
|
395
394
|
+border-radius(2)
|
396
|
-
+box-shadow(0, 1, 0, #FFFFFF)
|
397
395
|
padding: 2px 5px 2px 5px
|
398
396
|
width: 300px
|
399
397
|
+box-model
|
@@ -411,6 +409,9 @@ table.data_table
|
|
411
409
|
input[type="text"]
|
412
410
|
@extend .default_input
|
413
411
|
width: 200px
|
412
|
+
min-height: 20px
|
413
|
+
padding-top: 5px
|
414
|
+
padding-bottom: 3px
|
414
415
|
|
415
416
|
form
|
416
417
|
.node
|
@@ -551,6 +552,8 @@ form
|
|
551
552
|
font-size: 12px
|
552
553
|
color: $g3
|
553
554
|
+text-shadow(#fff)
|
555
|
+
a
|
556
|
+
text-decoration: underline
|
554
557
|
|
555
558
|
.error_explanation
|
556
559
|
margin-left: 20px
|
@@ -563,7 +566,7 @@ form
|
|
563
566
|
|
564
567
|
|
565
568
|
footer
|
566
|
-
padding
|
569
|
+
padding: 20px 0
|
567
570
|
+text-shadow(#000, -1)
|
568
571
|
text-align: center
|
569
572
|
color: gray
|
@@ -580,17 +583,14 @@ input[type="submit"],
|
|
580
583
|
cursor: pointer
|
581
584
|
display: inline-block
|
582
585
|
padding: 6px 20px
|
583
|
-
border: 1px solid $b2
|
584
586
|
margin: 20px 0 0
|
585
587
|
background: $b1
|
586
588
|
color: #fff
|
587
|
-
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4)
|
588
589
|
font-weight: bold
|
589
590
|
font-size: 18px
|
590
591
|
text-decoration: none
|
592
|
+
border: 0
|
591
593
|
+border-radius(5)
|
592
|
-
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), inset 0 1px rgba(255, 255, 255, 0.5), inset 0 12px rgba(255, 255, 255, 0.2), inset 0 10px 20px rgba(255, 255, 255, 0.25), inset 0 -12px 25px rgba(0, 0, 0, 0.3)
|
593
|
-
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), inset 0 1px rgba(255, 255, 255, 0.5), inset 0 18px 5px rgba(255, 255, 255, 0.2), inset 0 10px 10px rgba(255, 255, 255, 0.25), inset 0 -12px 25px rgba(0, 0, 0, 0.3)
|
594
594
|
+transition-duration(0.3)
|
595
595
|
+transition-property(background)
|
596
596
|
&:hover
|
@@ -599,9 +599,8 @@ input[type="submit"],
|
|
599
599
|
&:active
|
600
600
|
outline: 0
|
601
601
|
background: $b2
|
602
|
-
|
603
|
-
|
604
|
-
|
602
|
+
&:active
|
603
|
+
background: darken($b2, 5%)
|
605
604
|
|
606
605
|
|
607
606
|
input[type="submit"].alt_button,
|
@@ -610,26 +609,20 @@ input[type="submit"].alt_button,
|
|
610
609
|
padding: 12px 50px
|
611
610
|
+border-radius(4)
|
612
611
|
text-decoration: none
|
613
|
-
border: 1px solid gray
|
614
612
|
font-size: 13px
|
615
613
|
cursor: pointer
|
616
614
|
background: #666
|
617
615
|
padding: 5px 10px
|
618
|
-
box-shadow: inset 0 1px 0 rgba(#AAABAA, 0.7), inset 0 -10px 20px rgba(#333, 0.6)
|
619
616
|
color: $w1
|
617
|
+
border: 0
|
620
618
|
+text-shadow(#444, -1)
|
619
|
+
+transition-duration(0.3)
|
621
620
|
&:hover
|
622
|
-
border-color: $b2
|
623
|
-
box-shadow: inset 0 1px 0 rgba(#fff, 0.4), inset 0 -10px 20px rgba(#333, 0.4)
|
624
621
|
background: $b1
|
625
622
|
&:active
|
626
|
-
|
627
|
-
+text-shadow(#444)
|
623
|
+
background: darken($b2, 5%)
|
628
624
|
&:focus
|
629
625
|
outline: 0
|
630
|
-
+transition-duration(1)
|
631
|
-
+transition-property(box-shadow)
|
632
|
-
box-shadow: 0 1px 12px $b2
|
633
626
|
|
634
627
|
#flash_massages
|
635
628
|
display: block
|
@@ -667,7 +660,6 @@ input[type="submit"].alt_button,
|
|
667
660
|
color: #3E3E3E
|
668
661
|
border-color: #B7B7B7
|
669
662
|
+text-shadow(#fff)
|
670
|
-
box-shadow: inset 0 1px 0 rgba(#fff, 0.4), inset 0 -10px 10px rgba(#333, 0.1)
|
671
663
|
&:hover
|
672
664
|
color: #fff
|
673
665
|
+text-shadow(#999)
|
@@ -737,7 +729,6 @@ input[type="submit"].alt_button,
|
|
737
729
|
button
|
738
730
|
background: white !important
|
739
731
|
padding: 2px 4px 4px 4px !important
|
740
|
-
box-shadow: none
|
741
732
|
&:hover
|
742
733
|
background: $g2 !important
|
743
734
|
|
@@ -748,16 +739,15 @@ input[type="submit"].alt_button,
|
|
748
739
|
padding: 5px 10px
|
749
740
|
background: #E5E5E5
|
750
741
|
border: 1px solid #C1C2DC
|
751
|
-
+box-inner-shadow(0, 1, 0, #fff)
|
752
742
|
+border-radius(2)
|
753
743
|
+text-shadow(#fff)
|
754
744
|
color: #535b6f
|
745
|
+
margin-top: -2px
|
755
746
|
.header
|
756
747
|
position: relative
|
757
748
|
margin-bottom: 5px
|
758
749
|
padding-bottom: 5px
|
759
750
|
border-bottom: 1px solid #C1C2DC
|
760
|
-
+box-shadow(0, 1, 0, #fff)
|
761
751
|
.title
|
762
752
|
padding-top: 3px
|
763
753
|
text-align: center
|
@@ -924,9 +914,7 @@ input[type="submit"].alt_button,
|
|
924
914
|
left: 50%
|
925
915
|
z-index: 4000
|
926
916
|
+border-bottom-radius(4)
|
927
|
-
background: image-url('bhf/ajax_loader.gif') no-repeat center 16px
|
928
|
-
background: image-url('bhf/ajax_loader.gif') no-repeat center 16px, -moz-linear-gradient(top, $b1, $b2)
|
929
|
-
border: 1px solid $b1
|
917
|
+
background: $b1 image-url('bhf/ajax_loader.gif') no-repeat center 16px
|
930
918
|
+box-shadow(0, 1, 4)
|
931
919
|
+transition-duration(0.6)
|
932
920
|
&.loading
|
@@ -1070,18 +1058,40 @@ input[type="submit"].alt_button,
|
|
1070
1058
|
font-family: arial, helvetica, sans-serif
|
1071
1059
|
> form
|
1072
1060
|
input[type="text"]
|
1073
|
-
border:
|
1061
|
+
border: 0
|
1074
1062
|
color: black
|
1075
1063
|
> form
|
1076
1064
|
input[type="button"]
|
1077
|
-
border:
|
1065
|
+
border: 0
|
1078
1066
|
font-size: 0.8em
|
1079
1067
|
font-weight: bold
|
1080
1068
|
|
1081
1069
|
|
1082
|
-
// TODO: bigger
|
1070
|
+
// TODO: bigger radio buttons
|
1083
1071
|
|
1084
1072
|
|
1085
1073
|
// TODO: remove me
|
1086
1074
|
.translation_missing
|
1087
|
-
color: red !important
|
1075
|
+
color: red !important
|
1076
|
+
|
1077
|
+
|
1078
|
+
@media screen and (-webkit-min-device-pixel-ratio: 1.5), screen and (min--moz-device-pixel-ratio: 1.5), screen and (min-device-pixel-ratio: 1.5)
|
1079
|
+
table.data_table
|
1080
|
+
tbody
|
1081
|
+
a
|
1082
|
+
&.duplicate,
|
1083
|
+
&.edit,
|
1084
|
+
&.delete
|
1085
|
+
background-image: image-url('bhf/pictos_2x.png')
|
1086
|
+
background-size: 377px 152px
|
1087
|
+
.handle
|
1088
|
+
background-image: image-url('bhf/pictos_2x.png')
|
1089
|
+
background-size: 377px 152px
|
1090
|
+
|
1091
|
+
#content
|
1092
|
+
.quick_edit_holder
|
1093
|
+
.group
|
1094
|
+
button
|
1095
|
+
&.save_and_next
|
1096
|
+
background-image: image-url('bhf/pictos_2x.png')
|
1097
|
+
background-size: 377px 152px
|
@@ -111,13 +111,13 @@
|
|
111
111
|
|
112
112
|
=bg-gradient($c1, $c2)
|
113
113
|
background: $c1
|
114
|
-
background: -moz-linear-gradient(top, $c1, $c2)
|
115
|
-
background: -webkit-gradient(linear, left top, left bottom, from($c1), to($c2))
|
114
|
+
//background: -moz-linear-gradient(top, $c1, $c2)
|
115
|
+
//background: -webkit-gradient(linear, left top, left bottom, from($c1), to($c2))
|
116
116
|
|
117
117
|
// Text
|
118
118
|
|
119
119
|
=text-shadow($color: #000, $top: 1, $left: 0, $blur: 0)
|
120
|
-
text-shadow: $color $left + px $top + px $blur + px
|
120
|
+
//text-shadow: $color $left + px $top + px $blur + px
|
121
121
|
|
122
122
|
// Transitions
|
123
123
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bhf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anton Pawlik
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -129,6 +129,7 @@ files:
|
|
129
129
|
- app/views/bhf/entries/form/has_one/_static.haml
|
130
130
|
- app/views/bhf/entries/new.haml
|
131
131
|
- app/views/bhf/entries/show.haml
|
132
|
+
- app/views/bhf/helper/_definition_item.haml
|
132
133
|
- app/views/bhf/helper/_field_errors.haml
|
133
134
|
- app/views/bhf/helper/_flash.haml
|
134
135
|
- app/views/bhf/helper/_frontend_edit.haml
|
@@ -180,10 +181,11 @@ files:
|
|
180
181
|
- vendor/assets/images/bhf/bg.png
|
181
182
|
- vendor/assets/images/bhf/mooeditable-toolbarbuttons-tango.png
|
182
183
|
- vendor/assets/images/bhf/pictos.png
|
184
|
+
- vendor/assets/images/bhf/pictos_2x.png
|
183
185
|
- vendor/assets/images/bhf/small_ajax_loader.gif
|
184
186
|
- vendor/assets/images/bhf/small_ajax_loader_h.gif
|
185
187
|
- vendor/assets/images/bhf/wmd-buttons.png
|
186
|
-
- vendor/assets/images/logo_bhf.
|
188
|
+
- vendor/assets/images/logo_bhf.svg
|
187
189
|
- vendor/assets/javascripts/bhf/application.js
|
188
190
|
- vendor/assets/javascripts/bhf/classes/AjaxEdit.js
|
189
191
|
- vendor/assets/javascripts/bhf/classes/Ajaxify.js
|
Binary file
|