Skip to content

Commit

Permalink
Folder : Fix title for Root Folder
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterMis committed Jul 28, 2023
1 parent 4d948f9 commit a8285c5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 0 additions & 3 deletions lib/Controller/Folder.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,6 @@ public function grid(Request $request, Response $response, $folderId = null)
} else {
// Show a tree view of all folders.
$rootFolder = $this->folderFactory->getById(1);
$rootFolder->setUnmatchedProperty('a_attr', [
'title' => __('Right click a Folder for further Options')
]);

// homeFolderId,
// do we show tree for current user
Expand Down
4 changes: 4 additions & 0 deletions ui/src/core/xibo-cms.js
Original file line number Diff line number Diff line change
Expand Up @@ -3789,6 +3789,10 @@ function initJsTreeAjax(container, id, isForm, ttl, onReady = null, onSelected =
}
}

if (e?.original?.isRoot === 1) {
$(container).find('a#'+e.id+'_anchor').attr('title', translations.folderRootTitle)
}

// get the home folder
if (e.type !== undefined && e.type === 'home') {
homeNodeId = e.id;
Expand Down
1 change: 1 addition & 0 deletions views/base.twig
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
translations.folderWithContent = "{{ "Cannot remove Folder with content"|trans }}";
translations.folderNew = "{{ "New Folder"|trans }}";
translations.folderTreeMove = "{{ "Move Folder"|trans }}";
translations.folderRootTitle = "{{ "Right click a Folder for further Options"|trans }}";
translations.dayPartExceptionErrorMessage = "{{ "You already set an exception for this day."|trans }}";
translations.online = "{{ "Online"|trans }}";
translations.offline = "{{ "Offline"|trans }}";
Expand Down

0 comments on commit a8285c5

Please sign in to comment.