mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-10 18:53:01 +02:00
related to #1465 removed useless translations + added icon on ip and username hover + labels
This commit is contained in:
committed by
plegall
parent
2db6c52f3d
commit
98c8269cdf
@@ -109,11 +109,11 @@ function fillHistoryResult(ajaxParam) {
|
||||
$(".loading").removeClass("hide");
|
||||
// console.log(ajaxParam.user);
|
||||
// console.log(raw_data);
|
||||
data = raw_data.result[0];
|
||||
imageDisplay = raw_data.result[1].display_thumbnail;
|
||||
console.log("RESULTS");
|
||||
maxPage = raw_data.result[2];
|
||||
|
||||
data = raw_data.result["lines"];
|
||||
imageDisplay = raw_data.result["params"].display_thumbnail;
|
||||
// console.log("RESULTS");
|
||||
maxPage = raw_data.result["maxPage"];
|
||||
console.log(data);
|
||||
//clear lines before refill
|
||||
$(".tab .search-line").remove();
|
||||
|
||||
@@ -172,7 +172,7 @@ function lineConstructor(line, id, imageDisplay) {
|
||||
newLine.find(".date-day").html(line.DATE);
|
||||
newLine.find(".date-hour").html(line.TIME);
|
||||
|
||||
newLine.find(".user-name").html(line.USERNAME);
|
||||
newLine.find(".user-name").html(line.USERNAME + '<i class="add-filter icon-plus-circled"></i>');
|
||||
|
||||
newLine.find(".user-name").attr("id", line.USERID);
|
||||
if (current_param.user == "-1") {
|
||||
@@ -184,10 +184,11 @@ function lineConstructor(line, id, imageDisplay) {
|
||||
})
|
||||
}
|
||||
|
||||
newLine.find(".user-ip").html(line.IP);
|
||||
newLine.find(".user-ip").html(line.IP + '<i class="add-filter icon-plus-circled"></i>');
|
||||
newLine.find(".user-ip").data("ip", line.IP);
|
||||
if (current_param.ip == "") {
|
||||
newLine.find(".user-ip").on("click", function () {
|
||||
current_param.ip = $(this).html();
|
||||
current_param.ip = $(this).data("ip");
|
||||
current_param.pageNumber = 0;
|
||||
addIpFilter($(this).html());
|
||||
fillHistoryResult(current_param);
|
||||
@@ -207,8 +208,17 @@ function lineConstructor(line, id, imageDisplay) {
|
||||
|
||||
switch (line.SECTION) {
|
||||
case "tags":
|
||||
newLine.find(".type-name").html(line.TAGS[0]);
|
||||
newLine.find(".type-id").html("#" + line.TAGIDS[0]);
|
||||
if (line.TAGS.length > 1 && line.TAGS.length <= 2 ) {
|
||||
newLine.find(".type-name").html(line.TAGS[0] +", "+ line.TAGS[1] + ", ...");
|
||||
newLine.find(".type-id").html("#" + line.TAGIDS[0] +", "+ line.TAGIDS[1] + ", ...");
|
||||
} else if (line.TAGS.length > 2) {
|
||||
newLine.find(".type-name").html(line.TAGS[0] +", "+ line.TAGS[1] +", "+ line.TAGS[2] + ", ...");
|
||||
newLine.find(".type-id").html("#" + line.TAGIDS[0] +", "+ line.TAGIDS[1] +", "+ line.TAGIDS[2] + ", ...");
|
||||
} else {
|
||||
newLine.find(".type-name").html(line.TAGS[0]);
|
||||
newLine.find(".type-id").html("#" + line.TAGIDS[0]);
|
||||
}
|
||||
|
||||
let detail_str = "";
|
||||
line.TAGS.forEach(tag => {
|
||||
detail_str += tag + ", ";
|
||||
@@ -234,6 +244,17 @@ function lineConstructor(line, id, imageDisplay) {
|
||||
newLine.find(".type-name").html(str_favorites);
|
||||
newLine.find(".type-id").remove();
|
||||
break;
|
||||
case "recent_cats":
|
||||
newLine.find(".type-name").html(str_recent_cats);
|
||||
newLine.find(".type-id").remove();
|
||||
break;
|
||||
case "recent_pics":
|
||||
newLine.find(".type-name").html(str_recent_pics);
|
||||
newLine.find(".type-id").remove();
|
||||
break;
|
||||
case "categories":
|
||||
newLine.find(".type-name").html(line.CATEGORY);
|
||||
newLine.find(".type-id").remove();
|
||||
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -36,8 +36,10 @@ const API_METHOD = "{$API_METHOD}";
|
||||
const str_dwld = "{'Downloaded'|translate}";
|
||||
const str_most_visited = "{'Most visited'|translate}";
|
||||
const str_best_rated = "{'Best rated'|translate}";
|
||||
const str_list = "{'Random'|translate}";
|
||||
const str_favorites = "{'Favorites'|translate}";
|
||||
const str_list = "{'Random photo'|translate}";
|
||||
const str_favorites = "{'Your favorites'|translate}";
|
||||
const str_recent_cats = "{'Recent albums'|translate}";
|
||||
const str_recent_pics = "{'Recent photos'|translate}";
|
||||
{/footer_script}
|
||||
|
||||
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
|
||||
@@ -82,7 +84,7 @@ const str_favorites = "{'Favorites'|translate}";
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter-tags">
|
||||
<label> Personnalized filters</label>
|
||||
<label>{'Personnalized filters'|translate}</label>
|
||||
<div class="filter-container">
|
||||
<div id="default-filter" class="filter-item hide">
|
||||
<i class="filter-icon"> </i>
|
||||
@@ -139,8 +141,8 @@ const str_favorites = "{'Favorites'|translate}";
|
||||
</div>
|
||||
|
||||
<div class="user-section">
|
||||
<span class="user-name bold" title="{'Add a filter'}"> Zac le boss </span>
|
||||
<span class="user-ip" title="{'Add a filter'}"> 192.168.0.0</span>
|
||||
<span class="user-name bold" title="{'Add a filter'|translate}"> Zac le boss <i class="add-filter icon-plus-circled"></i></span>
|
||||
<span class="user-ip" title="{'Add a filter'|translate}"> 192.168.0.0 <i class="add-filter icon-plus-circled"></i></span>
|
||||
</div>
|
||||
|
||||
<div class="type-section">
|
||||
@@ -428,6 +430,20 @@ jQuery(document).ready( function() {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.add-filter {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.user-name:hover .add-filter {
|
||||
display: inline;
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.user-ip:hover .add-filter {
|
||||
display: inline;
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.detail-item-1, .detail-item-2, .detail-item-3 {
|
||||
background: #f0f0f0f0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user