Fix header of shots/assets list

This commit is contained in:
2016-11-17 15:12:06 +01:00
parent 97f75a04e5
commit 2c8e20d0c0
4 changed files with 153 additions and 126 deletions

View File

@@ -143,3 +143,16 @@ $(window).on('load resize', function(){
$('.col-scrollable').css({'height': window_height}); $('.col-scrollable').css({'height': window_height});
}); });
/* Fix header of items list (like assets or shots */
function itemsListFixHeader(toClone, toAppend){
var target = $(toClone);
var target_children = target.children();
var clone = target.clone();
clone.children().width(function(i,val) {
return target_children.eq(i).width();
});
$(toAppend).append(clone);
}

View File

@@ -72,6 +72,12 @@ nav.sidebar
height: 100% height: 100%
border-bottom: none border-bottom: none
.table-head .table-head
&.is-fixed
position: fixed
top: 42px
z-index: 1
background-color: white
.table-cell .table-cell
text-align: center text-align: center

View File

@@ -8,8 +8,9 @@
| Assets ({{ assets | count }}) | Assets ({{ assets | count }})
a#item-add(href="javascript:asset_create('{{ project.url }}');") + Create Asset a#item-add(href="javascript:asset_create('{{ project.url }}');") + Create Asset
.item-list.task.col-scrollable .item-list.asset.col-scrollable
.table .table
.table-head.is-fixed
.table-head .table-head
.table-row .table-row
.table-cell.asset-status .table-cell.asset-status
@@ -143,4 +144,7 @@ script.
$('#shot-list').css({'height': window_height}); $('#shot-list').css({'height': window_height});
$('#item-details').css({'height': window_height}); $('#item-details').css({'height': window_height});
}); });
itemsListFixHeader('.item-list .table-head .table-row', '.item-list .table-head.is-fixed');
| {% endblock footer_scripts %} | {% endblock footer_scripts %}

View File

@@ -13,6 +13,7 @@
.item-list.shot.col-scrollable .item-list.shot.col-scrollable
.table .table
.table-head.is-fixed
.table-head .table-head
.table-row .table-row
.table-cell.item-status .table-cell.item-status
@@ -135,4 +136,7 @@ script.
handleSelector: ".col-splitter", handleSelector: ".col-splitter",
resizeHeight: false resizeHeight: false
}); });
itemsListFixHeader('.item-list .table-head .table-row', '.item-list .table-head.is-fixed');
| {% endblock footer_scripts %} | {% endblock footer_scripts %}