Skip to content

Commit a9974f2

Browse files
committed
HUE-1651 [doc] New user should have default tag selected
Added 'default' tag display if it's the first visit Fixed a bug on toggling and saving on totalStorage for history and trash
1 parent 6ed1960 commit a9974f2

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

desktop/core/src/desktop/templates/home.mako

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ $(document).ready(function () {
342342
function toggleSpecificSection(section, filter){
343343
section.siblings().removeClass("active");
344344
if (section.hasClass("active")) {
345-
populateTable();
345+
populateTable("");
346346
section.removeClass("active");
347347
section.find("a").blur();
348348
}
@@ -392,20 +392,26 @@ $(document).ready(function () {
392392
}
393393
});
394394
395-
if ($.totalStorage("hueHomeTags") != null && $.totalStorage("hueHomeTags") != "") {
396-
if ($.totalStorage("hueHomeTags") == "history") {
397-
$(".viewHistory").click();
398-
}
399-
else if ($.totalStorage("hueHomeTags") == "trash") {
400-
$(".view-trash").click();
395+
if ($.totalStorage("hueHomeTags") == null){
396+
$("li[data-tag='default']").click(); // for new users show default tag
397+
}
398+
else {
399+
if ($.totalStorage("hueHomeTags") != "") {
400+
if ($.totalStorage("hueHomeTags") == "history") {
401+
$(".viewHistory").click();
402+
}
403+
else if ($.totalStorage("hueHomeTags") == "trash") {
404+
$(".view-trash").click();
405+
}
406+
else {
407+
$("li[data-tag='" + $.totalStorage("hueHomeTags") + "']").click();
408+
}
401409
}
402410
else {
403-
$("li[data-tag='" + $.totalStorage("hueHomeTags") + "']").click();
411+
populateTable();
404412
}
405413
}
406-
else {
407-
populateTable();
408-
}
414+
409415
410416
$(document).on("click", ".documentTags", function () {
411417
$("#documentTagsModal").data("document-id", $(this).data("document-id"));

0 commit comments

Comments
 (0)