Skip to content
Snippets Groups Projects
Unverified Commit 6f2fe8c6 authored by Joas Schilling's avatar Joas Schilling
Browse files

Show the path, when the filename conflicts

parent 5e48ce98
No related branches found
No related tags found
No related merge requests found
...@@ -148,10 +148,10 @@ table tr.mouseOver td { ...@@ -148,10 +148,10 @@ table tr.mouseOver td {
} }
tbody a { color:#000; } tbody a { color:#000; }
span.extension, span.uploading, td.date { span.conflict-path, span.extension, span.uploading, td.date {
color: #999; color: #999;
} }
span.extension { span.conflict-path, span.extension {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=70)"; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";
filter: alpha(opacity=70); filter: alpha(opacity=70);
opacity: .7; opacity: .7;
...@@ -161,6 +161,8 @@ span.extension { ...@@ -161,6 +161,8 @@ span.extension {
transition: opacity 300ms; transition: opacity 300ms;
vertical-align: top; vertical-align: top;
} }
tr:hover span.conflict-path,
tr:focus span.conflict-path,
tr:hover span.extension, tr:hover span.extension,
tr:focus span.extension { tr:focus span.extension {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
......
...@@ -1148,6 +1148,28 @@ ...@@ -1148,6 +1148,28 @@
} }
var nameSpan=$('<span></span>').addClass('nametext'); var nameSpan=$('<span></span>').addClass('nametext');
var innernameSpan = $('<span></span>').addClass('innernametext').text(basename); var innernameSpan = $('<span></span>').addClass('innernametext').text(basename);
if (path && path !== '/') {
var conflictingItems = this.$fileList.find('tr[data-file="' + name.replace( /(:|\.|\[|\]|,|=)/g, "\\$1") + '"]');
if (conflictingItems.length !== 0) {
if (conflictingItems.length === 1) {
// Update the path on the first conflicting item
var $firstConflict = $(conflictingItems[0]),
firstConflictPath = $firstConflict.attr('data-path') + '/';
if (firstConflictPath.charAt(0) === '/') {
firstConflictPath = firstConflictPath.substr(1);
}
$firstConflict.find('td.filename span.innernametext').prepend($('<span></span>').addClass('conflict-path').text(firstConflictPath));
}
var conflictPath = path + '/';
if (conflictPath.charAt(0) === '/') {
conflictPath = conflictPath.substr(1);
}
nameSpan.append($('<span></span>').addClass('conflict-path').text(conflictPath));
}
}
nameSpan.append(innernameSpan); nameSpan.append(innernameSpan);
linkElem.append(nameSpan); linkElem.append(nameSpan);
if (extension) { if (extension) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment