Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed the file and folder on hover issues #5733

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions theme/static/js/hs_file_browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function getFolderTemplateInstance(folder) {

// Default
return "<li class='fb-folder droppable draggable' data-url='" + folder.url + "' title='" +
hint +" "+folder.name + "&#13;Type: File Folder'>" +
hint + folder.name + "&#13;Type: File Folder'>" +
"<span class='fb-file-icon fa fa-folder icon-blue'></span>" +
"<span class='fb-file-name'>" + folder.name + "</span>" +
"<span class='fb-file-type' data-folder-short-path='" + folder['folder_short_path'] + "'>File Folder</span>" +
Expand Down Expand Up @@ -127,12 +127,17 @@ function getFileTemplateInstance(file) {
iconTemplate = fileIcons.DEFAULT;
}

let fileTypeStr = '';
if(file.type){
fileTypeStr = "Type: " + file.type + "&#13;";
}

if (file.logical_type.length > 0){
var title = hint + file.name + "&#13;Type: " + file.type + "&#13;Size: " +
var title = hint + file.name + "&#13;" + fileTypeStr + "Size: " +
formatBytes(parseInt(file.size)) + "&#13;" + (file.aggregation_name || "");
}
else {
var title = hint + file.name + "&#13;Type: " + file.type + "&#13;Size: " +
var title = hint + file.name + "&#13;" + fileTypeStr + "Size: " +
formatBytes(parseInt(file.size));
}

Expand Down
4 changes: 4 additions & 0 deletions theme/templates/resource-landing-page/funding-agency.html
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,10 @@ <h4>Funding Agencies
position: absolute;
z-index: 999
}

#div_id_agency_name {
margin-bottom: 8px;
}
Comment on lines +244 to +246
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works, but might not be the ideal way.
We already have style rules handling these forms, take a look at:
https://github.com/hydroshare/hydroshare/blob/2.15.11/theme/static/css/hydroshare_core.css#L1026-L1028
Instead of adding one-off css rules in funding-agency.html, see if you can find a more general solution that ties in with the existing css.

</style>
{% endblock %}

Expand Down