mirror of https://github.com/xwiki-labs/cryptpad
icons appended to thumbnail files only in grid view #1351
This commit is contained in:
parent
9bdcb7be67
commit
289cc1e1a4
|
@ -634,6 +634,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
div.cp-app-drive-content-grid {
|
div.cp-app-drive-content-grid {
|
||||||
|
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
ul {
|
ul {
|
||||||
margin: -(@drive_icon-margin);
|
margin: -(@drive_icon-margin);
|
||||||
|
@ -667,6 +668,19 @@
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.cp-app-drive-element-icon {
|
||||||
|
font-size: 12px !important;
|
||||||
|
float: left !important;
|
||||||
|
margin: 5px !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
.cp-app-drive-element-name-icon {
|
||||||
|
text-align: center !important;
|
||||||
|
float: center !important;
|
||||||
|
max-width: fit-content !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
.cp-app-drive-element-state {
|
.cp-app-drive-element-state {
|
||||||
left: 3px;
|
left: 3px;
|
||||||
}
|
}
|
||||||
|
@ -701,6 +715,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
div.cp-app-drive-content-list {
|
div.cp-app-drive-content-list {
|
||||||
|
|
||||||
|
.cp-app-drive-element-icon {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
.cp-app-drive-element-grid {
|
.cp-app-drive-element-grid {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
@ -1030,5 +1048,6 @@
|
||||||
margin: 0 1em;
|
margin: 0 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2220,6 +2220,7 @@ define([
|
||||||
$element.prepend(img);
|
$element.prepend(img);
|
||||||
$(img).addClass('cp-app-drive-element-grid cp-app-drive-element-thumbnail');
|
$(img).addClass('cp-app-drive-element-grid cp-app-drive-element-thumbnail');
|
||||||
$(img).attr("draggable", false);
|
$(img).attr("draggable", false);
|
||||||
|
addTitle(element, $element, $name)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
common.displayThumbnail(href || data.roHref, data.channel, data.password, $element, function ($thumb) {
|
common.displayThumbnail(href || data.roHref, data.channel, data.password, $element, function ($thumb) {
|
||||||
|
@ -2229,6 +2230,8 @@ define([
|
||||||
$thumb.addClass('cp-app-drive-element-grid cp-app-drive-element-thumbnail');
|
$thumb.addClass('cp-app-drive-element-grid cp-app-drive-element-thumbnail');
|
||||||
$thumb.attr("draggable", false);
|
$thumb.attr("draggable", false);
|
||||||
thumbsUrls[element] = $thumb[0].src;
|
thumbsUrls[element] = $thumb[0].src;
|
||||||
|
addTitle(element, $element, $name)
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2245,6 +2248,15 @@ define([
|
||||||
$element.append($type).append($adate).append($cdate);
|
$element.append($type).append($adate).append($cdate);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var addTitle = function (element, $element, $name) {
|
||||||
|
var icon = getFileIcon(element)
|
||||||
|
|
||||||
|
$(icon).addClass('cp-app-drive-element-icon')
|
||||||
|
$name.addClass('cp-app-drive-element-name-icon')
|
||||||
|
$name.prepend($(icon))
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
var addFolderData = function (element, key, $span) {
|
var addFolderData = function (element, key, $span) {
|
||||||
if (!element || !manager.isFolder(element)) { return; }
|
if (!element || !manager.isFolder(element)) { return; }
|
||||||
// The element with the class '.name' is underlined when the 'li' is hovered
|
// The element with the class '.name' is underlined when the 'li' is hovered
|
||||||
|
|
Loading…
Reference in New Issue