bhf 0.6.11 → 0.6.12
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 +4 -4
- data/app/controllers/bhf/entries_controller.rb +1 -3
- data/app/views/bhf/helper/_flash.haml +1 -1
- data/app/views/bhf/pages/_platform.haml +5 -5
- data/lib/bhf/platform.rb +4 -0
- data/vendor/assets/images/bhf/pictos_2x.png +0 -0
- data/vendor/assets/javascripts/bhf/application.js +13 -16
- data/vendor/assets/stylesheets/bhf/application.css.sass +34 -41
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c880f3b7fff3a7663c6ff37e0f6057989dc7ebd7
|
4
|
+
data.tar.gz: 51d2986c62a939d21d67a47c1302aee18049779f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7f1416447383a6571375412f7c0cdab3d73e72935851a93716d98603f9953491de8b8dcebbff50375cd9fe913fcc4b4ab67e95a0e0d8609ebb72825218cbe75
|
7
|
+
data.tar.gz: e9fac0457c3fc796fa996779b059f66c73b189af2873cda1599100fc3988c1951e4d292ccfc40d2ad55dee810a50848569175ea3a621c2ee01fbb501cf0ad20d
|
@@ -75,9 +75,7 @@ class Bhf::EntriesController < Bhf::ApplicationController
|
|
75
75
|
end
|
76
76
|
|
77
77
|
def sort
|
78
|
-
|
79
|
-
|
80
|
-
sort_attr = @platform.sortable.to_sym
|
78
|
+
sort_attr = (@platform.sortable_property || @platform.sortable).to_sym
|
81
79
|
|
82
80
|
params[:order].each do |order|
|
83
81
|
@model.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
- platform.pagination.template = self
|
2
2
|
- if platform.custom_partial
|
3
|
-
= render partial: "bhf/pages/#{platform.custom_partial}"
|
3
|
+
= render partial: "bhf/pages/#{platform.custom_partial}", locals: {platform: platform}
|
4
4
|
- else
|
5
5
|
%table.data_table{id: "#{platform.name}_platform", class: (platform.custom_columns? ? :custom_columns : :default_columns)}
|
6
6
|
%caption
|
@@ -36,7 +36,7 @@
|
|
36
36
|
%tr{id: "#{object.id}_#{platform.name}"}
|
37
37
|
- if platform.sortable
|
38
38
|
%td.drag
|
39
|
-
%span.handle
|
39
|
+
%span.handle.icon
|
40
40
|
-# TODO: external link partial from anpex
|
41
41
|
- platform.columns.each do |column|
|
42
42
|
%td{class: "#{column.field.macro} #{column.field.display_type}", :'data-column-name' => column.name}
|
@@ -49,11 +49,11 @@
|
|
49
49
|
%td.action{class: (:wider if platform.show_duplicate && !platform.hide_edit && !platform.hide_delete)}
|
50
50
|
- if platform.show_duplicate
|
51
51
|
- dt = duplicate_t(platform)
|
52
|
-
= link_to dt, duplicate_bhf_entry_path(platform.name, object), class: 'duplicate', method: :post, title: dt
|
52
|
+
= link_to dt, duplicate_bhf_entry_path(platform.name, object), class: 'icon duplicate', method: :post, title: dt
|
53
53
|
- unless platform.hide_edit
|
54
|
-
= link_to edit_t(platform), edit_link, class: 'edit'
|
54
|
+
= link_to edit_t(platform), edit_link, class: 'icon edit'
|
55
55
|
- unless platform.hide_delete
|
56
|
-
= link_to delete_t(platform), bhf_entry_path(platform.name, object), method: :delete, remote: true, class:
|
56
|
+
= link_to delete_t(platform), bhf_entry_path(platform.name, object), method: :delete, remote: true, class: 'icon delete', data: {confirm: t('bhf.helpers.promts.confirm')}
|
57
57
|
- else
|
58
58
|
%td.no_entries{colspan: platform.columns_count}
|
59
59
|
= t 'bhf.pagination.info', name_zero: platform.title, count: 0
|
data/lib/bhf/platform.rb
CHANGED
Binary file
|
@@ -99,6 +99,18 @@ var bhfInit = function(){
|
|
99
99
|
new Setlatlng(lat);
|
100
100
|
});
|
101
101
|
};
|
102
|
+
var windowHight = document.body.clientHeight;
|
103
|
+
window.onresize = function(e){
|
104
|
+
windowHight = document.body.clientHeight;
|
105
|
+
};
|
106
|
+
var scrollContent = function(){
|
107
|
+
var innerForm = quickEdit.holder.getElement('form');
|
108
|
+
if ( ! innerForm) { return; }
|
109
|
+
var scroll = document.body.scrollTop-83;
|
110
|
+
if (scroll + innerForm.getSize().y > windowHight) { return; }
|
111
|
+
quickEdit.holder.setStyle('padding-top', scroll);
|
112
|
+
};
|
113
|
+
// window.onscroll = scrollContent;
|
102
114
|
|
103
115
|
quickEdit.setup({
|
104
116
|
holderParent: $('content'),
|
@@ -307,25 +319,10 @@ var bhfInit = function(){
|
|
307
319
|
}
|
308
320
|
});
|
309
321
|
}
|
310
|
-
var windowHight = document.body.clientHeight;
|
311
|
-
window.onresize = function(e){
|
312
|
-
windowHight = document.body.clientHeight;
|
313
|
-
};
|
314
|
-
var scrollContent = function(){
|
315
|
-
var innerForm = quickEdit.holder.getElement('form');
|
316
|
-
if ( ! innerForm) { return; }
|
317
|
-
var scroll = document.body.scrollTop-70;
|
318
|
-
if (scroll < 10) {
|
319
|
-
scroll = 10;
|
320
|
-
}
|
321
|
-
if (scroll + innerForm.getSize().y > windowHight) { return; }
|
322
|
-
quickEdit.holder.setStyle('padding-top', scroll);
|
323
|
-
};
|
324
|
-
window.onscroll = scrollContent;
|
325
322
|
|
326
323
|
var fm = $('flash_massages');
|
327
324
|
if (fm) {
|
328
|
-
fm.removeClass.delay(
|
325
|
+
fm.removeClass.delay(10000, fm, 'show');
|
329
326
|
}
|
330
327
|
|
331
328
|
new BrowserUpdate({vs:{i:8,f:7,o:10.01,s:4,n:9}});
|
@@ -263,13 +263,13 @@ table.data_table
|
|
263
263
|
&.primary_key
|
264
264
|
text-transform: uppercase
|
265
265
|
&.sorted
|
266
|
-
|
266
|
+
background: #000
|
267
267
|
& a:after,
|
268
268
|
&.desc:hover a:after
|
269
|
-
content: '
|
269
|
+
content: ' ▲'
|
270
270
|
&:hover a:after,
|
271
271
|
&.desc a:after
|
272
|
-
content: '
|
272
|
+
content: ' ▼'
|
273
273
|
a
|
274
274
|
color: #FFFFFF
|
275
275
|
+text-shadow
|
@@ -299,7 +299,6 @@ table.data_table
|
|
299
299
|
a
|
300
300
|
font-weight: bold
|
301
301
|
display: inline
|
302
|
-
|
303
302
|
a
|
304
303
|
display: block
|
305
304
|
padding: 5px 3px
|
@@ -309,33 +308,12 @@ table.data_table
|
|
309
308
|
padding: 0
|
310
309
|
margin-right: 5px
|
311
310
|
display: inline-block
|
312
|
-
text-indent: -9999px
|
313
|
-
width: 20px
|
314
|
-
height: 20px
|
315
|
-
background: image-url('bhf/pictos.png') no-repeat
|
316
|
-
&.clicked
|
317
|
-
background: image-url('bhf/small_ajax_loader.gif') no-repeat center center
|
318
|
-
&.duplicate
|
319
|
-
width: 24px
|
320
|
-
&.duplicate
|
321
|
-
background-position: -348px 0
|
322
|
-
&:active
|
323
|
-
background-position: -348px -101px
|
324
|
-
&.edit
|
325
|
-
&:active
|
326
|
-
background-position: 0 -101px
|
327
|
-
&.delete
|
328
|
-
background-position: -50px 0
|
329
|
-
&:active
|
330
|
-
background-position: -50px -101px
|
331
311
|
|
332
312
|
.handle
|
333
|
-
background: image-url('bhf/pictos.png') no-repeat -94px 0
|
334
|
-
cursor: move
|
335
313
|
display: block
|
336
314
|
|
337
315
|
|
338
|
-
tr
|
316
|
+
tr
|
339
317
|
&:hover td,
|
340
318
|
&.live_edit td
|
341
319
|
+bg-gradient($b1, $b2)
|
@@ -354,9 +332,9 @@ table.data_table
|
|
354
332
|
&:hover
|
355
333
|
background-position: -50px -100px
|
356
334
|
.handle
|
357
|
-
background-position: -
|
335
|
+
background-position: -98px -50px
|
358
336
|
&:hover
|
359
|
-
background-position: -
|
337
|
+
background-position: -98px -100px
|
360
338
|
.duplicate,
|
361
339
|
.edit,
|
362
340
|
.delete
|
@@ -394,6 +372,25 @@ table.data_table
|
|
394
372
|
tbody
|
395
373
|
.primary_key
|
396
374
|
color: #999
|
375
|
+
.icon
|
376
|
+
text-indent: -9999px
|
377
|
+
display: inline-block
|
378
|
+
width: 20px
|
379
|
+
height: 20px
|
380
|
+
background: image-url('bhf/pictos.png') no-repeat
|
381
|
+
&.duplicate,
|
382
|
+
&.edit,
|
383
|
+
&.delete
|
384
|
+
&.clicked
|
385
|
+
background: image-url('bhf/small_ajax_loader.gif') no-repeat center center
|
386
|
+
&.duplicate
|
387
|
+
width: 24px
|
388
|
+
background-position: -348px 0
|
389
|
+
&.delete
|
390
|
+
background-position: -50px 0
|
391
|
+
&.handle
|
392
|
+
background-position: -98px 0
|
393
|
+
cursor: move
|
397
394
|
|
398
395
|
.default_input
|
399
396
|
border: 1px solid transparent
|
@@ -908,7 +905,12 @@ input[type="submit"].alt_button,
|
|
908
905
|
|
909
906
|
.hide
|
910
907
|
display: none !important
|
911
|
-
|
908
|
+
.float_left
|
909
|
+
float: left
|
910
|
+
.float_right
|
911
|
+
float: right
|
912
|
+
.clear
|
913
|
+
clear: both
|
912
914
|
|
913
915
|
#ajax_holder
|
914
916
|
text-indent: -9999px
|
@@ -1083,18 +1085,9 @@ input[type="submit"].alt_button,
|
|
1083
1085
|
|
1084
1086
|
|
1085
1087
|
@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)
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
1089
|
-
&.duplicate,
|
1090
|
-
&.edit,
|
1091
|
-
&.delete
|
1092
|
-
background-image: image-url('bhf/pictos_2x.png')
|
1093
|
-
background-size: 377px 152px
|
1094
|
-
.handle
|
1095
|
-
background-image: image-url('bhf/pictos_2x.png')
|
1096
|
-
background-size: 377px 152px
|
1097
|
-
|
1088
|
+
.icon
|
1089
|
+
background-image: image-url('bhf/pictos_2x.png')
|
1090
|
+
background-size: 377px 152px
|
1098
1091
|
#content
|
1099
1092
|
.quick_edit_holder
|
1100
1093
|
.group
|