mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-30 21:29:59 +03:00
related to #1465 removed useless translations + added icon on ip and username hover + labels
This commit is contained in:
parent
2db6c52f3d
commit
98c8269cdf
5 changed files with 65 additions and 34 deletions
|
@ -109,11 +109,11 @@ function fillHistoryResult(ajaxParam) {
|
||||||
$(".loading").removeClass("hide");
|
$(".loading").removeClass("hide");
|
||||||
// console.log(ajaxParam.user);
|
// console.log(ajaxParam.user);
|
||||||
// console.log(raw_data);
|
// console.log(raw_data);
|
||||||
data = raw_data.result[0];
|
data = raw_data.result["lines"];
|
||||||
imageDisplay = raw_data.result[1].display_thumbnail;
|
imageDisplay = raw_data.result["params"].display_thumbnail;
|
||||||
console.log("RESULTS");
|
// console.log("RESULTS");
|
||||||
maxPage = raw_data.result[2];
|
maxPage = raw_data.result["maxPage"];
|
||||||
|
console.log(data);
|
||||||
//clear lines before refill
|
//clear lines before refill
|
||||||
$(".tab .search-line").remove();
|
$(".tab .search-line").remove();
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ function lineConstructor(line, id, imageDisplay) {
|
||||||
newLine.find(".date-day").html(line.DATE);
|
newLine.find(".date-day").html(line.DATE);
|
||||||
newLine.find(".date-hour").html(line.TIME);
|
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);
|
newLine.find(".user-name").attr("id", line.USERID);
|
||||||
if (current_param.user == "-1") {
|
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 == "") {
|
if (current_param.ip == "") {
|
||||||
newLine.find(".user-ip").on("click", function () {
|
newLine.find(".user-ip").on("click", function () {
|
||||||
current_param.ip = $(this).html();
|
current_param.ip = $(this).data("ip");
|
||||||
current_param.pageNumber = 0;
|
current_param.pageNumber = 0;
|
||||||
addIpFilter($(this).html());
|
addIpFilter($(this).html());
|
||||||
fillHistoryResult(current_param);
|
fillHistoryResult(current_param);
|
||||||
|
@ -207,8 +208,17 @@ function lineConstructor(line, id, imageDisplay) {
|
||||||
|
|
||||||
switch (line.SECTION) {
|
switch (line.SECTION) {
|
||||||
case "tags":
|
case "tags":
|
||||||
newLine.find(".type-name").html(line.TAGS[0]);
|
if (line.TAGS.length > 1 && line.TAGS.length <= 2 ) {
|
||||||
newLine.find(".type-id").html("#" + line.TAGIDS[0]);
|
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 = "";
|
let detail_str = "";
|
||||||
line.TAGS.forEach(tag => {
|
line.TAGS.forEach(tag => {
|
||||||
detail_str += tag + ", ";
|
detail_str += tag + ", ";
|
||||||
|
@ -234,6 +244,17 @@ function lineConstructor(line, id, imageDisplay) {
|
||||||
newLine.find(".type-name").html(str_favorites);
|
newLine.find(".type-name").html(str_favorites);
|
||||||
newLine.find(".type-id").remove();
|
newLine.find(".type-id").remove();
|
||||||
break;
|
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:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -36,8 +36,10 @@ const API_METHOD = "{$API_METHOD}";
|
||||||
const str_dwld = "{'Downloaded'|translate}";
|
const str_dwld = "{'Downloaded'|translate}";
|
||||||
const str_most_visited = "{'Most visited'|translate}";
|
const str_most_visited = "{'Most visited'|translate}";
|
||||||
const str_best_rated = "{'Best rated'|translate}";
|
const str_best_rated = "{'Best rated'|translate}";
|
||||||
const str_list = "{'Random'|translate}";
|
const str_list = "{'Random photo'|translate}";
|
||||||
const str_favorites = "{'Favorites'|translate}";
|
const str_favorites = "{'Your favorites'|translate}";
|
||||||
|
const str_recent_cats = "{'Recent albums'|translate}";
|
||||||
|
const str_recent_pics = "{'Recent photos'|translate}";
|
||||||
{/footer_script}
|
{/footer_script}
|
||||||
|
|
||||||
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
|
{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>
|
</div>
|
||||||
<div class="filter-tags">
|
<div class="filter-tags">
|
||||||
<label> Personnalized filters</label>
|
<label>{'Personnalized filters'|translate}</label>
|
||||||
<div class="filter-container">
|
<div class="filter-container">
|
||||||
<div id="default-filter" class="filter-item hide">
|
<div id="default-filter" class="filter-item hide">
|
||||||
<i class="filter-icon"> </i>
|
<i class="filter-icon"> </i>
|
||||||
|
@ -139,8 +141,8 @@ const str_favorites = "{'Favorites'|translate}";
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="user-section">
|
<div class="user-section">
|
||||||
<span class="user-name bold" title="{'Add a filter'}"> Zac le boss </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'}"> 192.168.0.0</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>
|
||||||
|
|
||||||
<div class="type-section">
|
<div class="type-section">
|
||||||
|
@ -428,6 +430,20 @@ jQuery(document).ready( function() {
|
||||||
white-space: nowrap;
|
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 {
|
.detail-item-1, .detail-item-2, .detail-item-3 {
|
||||||
background: #f0f0f0f0;
|
background: #f0f0f0f0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -942,11 +942,10 @@ SELECT
|
||||||
$cat_name = isset($line['category_id'])
|
$cat_name = isset($line['category_id'])
|
||||||
? ( isset($name_of_category[$line['category_id']])
|
? ( isset($name_of_category[$line['category_id']])
|
||||||
? $name_of_category[$line['category_id']]
|
? $name_of_category[$line['category_id']]
|
||||||
: 'deleted '.$line['category_id'] )
|
: 'deleted'.$line['category_id'] )
|
||||||
: '';
|
: 'root';
|
||||||
}
|
}
|
||||||
/** */
|
|
||||||
|
|
||||||
array_push( $result,
|
array_push( $result,
|
||||||
array(
|
array(
|
||||||
'DATE' => format_date($line['date']),
|
'DATE' => format_date($line['date']),
|
||||||
|
@ -966,18 +965,19 @@ SELECT
|
||||||
'TAGIDS' => explode(",",$tag_ids),
|
'TAGIDS' => explode(",",$tag_ids),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
/** */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Pagination Time
|
|
||||||
*/
|
|
||||||
|
|
||||||
$max_page = ceil(count($result)/100);
|
$max_page = ceil(count($result)/100);
|
||||||
$result = array_reverse($result, true);
|
$result = array_reverse($result, true);
|
||||||
$result = array_slice($result, $param['pageNumber']*100, 100);
|
$result = array_slice($result, $param['pageNumber']*100, 100);
|
||||||
|
|
||||||
return [$result, $param, $max_page];
|
/* Tableau associatif here cf ws_images_search*/
|
||||||
|
return array(
|
||||||
|
'lines' => $result,
|
||||||
|
'params' => $param,
|
||||||
|
'maxPage' => $max_page
|
||||||
|
);
|
||||||
|
|
||||||
|
// [$result, $param, $max_page];
|
||||||
}
|
}
|
||||||
?>
|
?>
|
|
@ -1262,7 +1262,4 @@ $lang['Tag name'] = 'Tag name';
|
||||||
|
|
||||||
$lang['Visited'] = 'Visited';
|
$lang['Visited'] = 'Visited';
|
||||||
$lang['Downloaded'] = 'Downloaded';
|
$lang['Downloaded'] = 'Downloaded';
|
||||||
$lang['Most visited'] = 'Most visited';
|
$lang['Personnalized filters'] = 'Personnalized filters';
|
||||||
$lang['Best rated'] = 'Best rated';
|
|
||||||
$lang['Random'] = 'Random';
|
|
||||||
$lang['Favorites'] = 'Favorites';
|
|
|
@ -1264,7 +1264,4 @@ $lang['Tag name'] = 'Nom du tag';
|
||||||
|
|
||||||
$lang['Visited'] = 'Visité';
|
$lang['Visited'] = 'Visité';
|
||||||
$lang['Downloaded'] = 'Téléchargé';
|
$lang['Downloaded'] = 'Téléchargé';
|
||||||
$lang['Most visited'] = 'Les plus visitées';
|
$lang['Personnalized filters'] = 'Filtres personnalisés';
|
||||||
$lang['Best rated'] = 'Les mieux notées';
|
|
||||||
$lang['Random'] = 'Aléatoire';
|
|
||||||
$lang['Favorites'] = 'Favoris';
|
|
Loading…
Add table
Add a link
Reference in a new issue