mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-25 12:34:47 -04:00
Update icon view and tree view.
This commit is contained in:
parent
7f1c17043e
commit
2a556e60d6
5 changed files with 25 additions and 26 deletions
|
@ -12,6 +12,9 @@
|
||||||
background: #eee;
|
background: #eee;
|
||||||
border-right: 1px solid @col-border;
|
border-right: 1px solid @col-border;
|
||||||
font-weight: lighter;
|
font-weight: lighter;
|
||||||
|
white-space: nowrap;
|
||||||
|
max-width: 250px;
|
||||||
|
overflow-x: hidden;
|
||||||
|
|
||||||
.sp-scrollbar {
|
.sp-scrollbar {
|
||||||
width: 6px;
|
width: 6px;
|
||||||
|
|
|
@ -7,12 +7,10 @@
|
||||||
|
|
||||||
a, a:active, a:visited {
|
a, a:active, a:visited {
|
||||||
width: @size * 4/3;
|
width: @size * 4/3;
|
||||||
height: @size + 28px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon.rational {
|
.icon.rational {
|
||||||
height: @size;
|
|
||||||
|
|
||||||
img {
|
img {
|
||||||
width: @size;
|
width: @size;
|
||||||
|
@ -36,27 +34,25 @@
|
||||||
margin: 8px;
|
margin: 8px;
|
||||||
|
|
||||||
li {
|
li {
|
||||||
text-align: center;
|
background: #fff;
|
||||||
|
box-shadow: 0 1px 1px 0 rgba(0,0,0,0.2);
|
||||||
|
|
||||||
|
&:hover, &.hover {
|
||||||
|
box-shadow: 0 1px 12px 0px rgba(0,0,0,0.5);
|
||||||
|
}
|
||||||
|
|
||||||
&.item {
|
&.item {
|
||||||
float: left;
|
float: left;
|
||||||
margin: 8px;
|
margin: 8px;
|
||||||
|
|
||||||
a, a:active, a:visited {
|
a, a:active, a:visited {
|
||||||
// padding: 8px;
|
|
||||||
border: 1px solid rgba(0,0,0,0);
|
|
||||||
min-width: @minsize * 4/3;
|
min-width: @minsize * 4/3;
|
||||||
min-height: @minsize + 28px;
|
|
||||||
|
|
||||||
&:hover, &.hover {
|
|
||||||
border-color: @item-border-col-hover;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon.rational {
|
.icon.rational {
|
||||||
display: block;
|
display: block;
|
||||||
margin-bottom: 6px;
|
background: #fafafa;
|
||||||
|
|
||||||
min-height: @minsize;
|
min-height: @minsize;
|
||||||
|
|
||||||
|
@ -70,7 +66,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
padding: 0 8px;
|
padding: 4px 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.date, .size {
|
.date, .size {
|
||||||
|
|
|
@ -126,8 +126,8 @@
|
||||||
|
|
||||||
img {
|
img {
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
max-width: 64px;
|
// max-width: 64px;
|
||||||
// max-width: 32px;
|
max-width: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.thumb {
|
.thumb {
|
||||||
|
@ -135,10 +135,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&.rational {
|
&.rational {
|
||||||
border-radius: 1px;
|
img {
|
||||||
background: #fff;
|
min-width: 32px;
|
||||||
overflow: hidden;
|
}
|
||||||
box-shadow: 0 1px 1px 0 rgba(0,0,0,.2);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -204,5 +204,5 @@ modulejs.define('ext/select', ['_', '$', 'core/settings', 'core/resource', 'core
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
init();
|
// init();
|
||||||
});
|
});
|
||||||
|
|
|
@ -109,10 +109,10 @@ modulejs.define('ext/tree', ['_', '$', 'core/settings', 'core/resource', 'core/e
|
||||||
|
|
||||||
item.isContentVisible = down;
|
item.isContentVisible = down;
|
||||||
$indicator.removeClass('open close').addClass(down ? 'open' : 'close');
|
$indicator.removeClass('open close').addClass(down ? 'open' : 'close');
|
||||||
$tree.scrollpanel('update', true);
|
// $tree.scrollpanel('update', true);
|
||||||
$content[down ? 'slideDown' : 'slideUp'](function () {
|
$content[down ? 'slideDown' : 'slideUp'](function () {
|
||||||
|
|
||||||
$tree.scrollpanel('update');
|
// $tree.scrollpanel('update');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -172,9 +172,10 @@ modulejs.define('ext/tree', ['_', '$', 'core/settings', 'core/resource', 'core/e
|
||||||
fetchTree(item, function (root) {
|
fetchTree(item, function (root) {
|
||||||
|
|
||||||
$('#tree')
|
$('#tree')
|
||||||
.find('.sp-container').append(update(root)).end()
|
// .find('.sp-container').append(update(root)).end()
|
||||||
|
.append(update(root))
|
||||||
.show();
|
.show();
|
||||||
updateScrollbar();
|
// updateScrollbar();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -186,13 +187,13 @@ modulejs.define('ext/tree', ['_', '$', 'core/settings', 'core/resource', 'core/e
|
||||||
|
|
||||||
$('<div id="tree"/>')
|
$('<div id="tree"/>')
|
||||||
.appendTo('#main-row')
|
.appendTo('#main-row')
|
||||||
.scrollpanel()
|
// .scrollpanel()
|
||||||
.on('click', '.indicator', createOnIndicatorClick());
|
.on('click', '.indicator', createOnIndicatorClick());
|
||||||
|
|
||||||
event.sub('ready', updateScrollbar);
|
// event.sub('ready', updateScrollbar);
|
||||||
event.sub('location.changed', onLocationChanged);
|
event.sub('location.changed', onLocationChanged);
|
||||||
|
|
||||||
$(window).on('resize', updateScrollbar);
|
// $(window).on('resize', updateScrollbar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue