mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-21 05:50:18 +08:00
Implemented Chevron Icon instead of "Click to Expand", Sessions tab, #325
This commit is contained in:
parent
f8f0603951
commit
fa7503cd57
@ -129,8 +129,7 @@ public class HtmlStructure {
|
||||
html.append("<div class=\"session column\">")
|
||||
.append("<div class=\"session-header\">")
|
||||
.append("<div class=\"session-col\" style=\"width: 200%;\">")
|
||||
.append("<h3>").append(dotSeparated).append("</h3>")
|
||||
.append("<p>Click to Expand</p>")
|
||||
.append("<h3><i style=\"color:#777\" class=\"fa fa-chevron-down\" aria-hidden=\"true\"></i> ").append(dotSeparated).append("</h3>")
|
||||
.append("</div>")
|
||||
.append("</div>");
|
||||
|
||||
|
@ -1,8 +1,17 @@
|
||||
$(".session-header").click(function () {
|
||||
var $header = $(this);
|
||||
var $content = $header.next();
|
||||
$header = $(this);
|
||||
$content = $header.next();
|
||||
$(this).parent().siblings().children().next().slideUp(500);
|
||||
$content.slideToggle(500, function () {
|
||||
//execute this after slideToggle is done
|
||||
});
|
||||
|
||||
$header.html(function(i, origText) {
|
||||
$(".session-header").html(function(i, origText) {
|
||||
return origText.replace("fa-chevron-up", "fa-chevron-down")
|
||||
});
|
||||
if (origText.includes("fa-chevron-down")) {
|
||||
return origText.replace("fa-chevron-down", "fa-chevron-up")
|
||||
} else {
|
||||
return origText.replace("fa-chevron-up", "fa-chevron-down")
|
||||
}
|
||||
});
|
||||
$content.slideToggle(500);
|
||||
});
|
Loading…
Reference in New Issue
Block a user