Skip to main content

BookmarkOrganizer Customization - Remove Gear icons, add functionality to Folder icons

Comments

4 comments

  • Johnny Stevens

    Since the goal is to clean up the Bookmark Organizer and remove the hover > show gear option, I was able to work with the TMF to move the colActions elements so that they fall between the Folder icon and the Folder Name. However, after the action (Add New Folder, Rename, Delete), the new BMO elements appear but nothing happens when I click on the options until I refresh the entire report.

    Here is the workflow:

    1. I enter the report (Default) containing the Bookmark Organizer (aka BMO).
    2. I click the icon next to a Folder and I see the options (Add New Folder, Rename Folder, Delete).
    3. I select one of the options (Add New Folder, for example) and it works as expected, updating the BMO with the New Folder.
    4. I click any icon that should show the options (Add New, Rename, Delete) but nothing happens. No console errors, the HTML under the hood has been rendered correctly, etc.
    5. To get the options showing again, I have to refresh the report.

    Any thoughts?

    Here is my TMF pertaining to this change, literally taking the existing Template's colActions content an moving it between the Folder icon and the Folder name:

    <!-- Move colAction Divisions between Folder and Name to the left -->
        <InsertAfterElement XPath="//Image[@ID='rdFolderShortcutImage']" >
            <NewElement>
                <Division ID="divShowBookmarkSharing" Condition="'@Data.FolderOwner~' == '' &amp;&amp; (@Data.Depth~ &gt; 0 || 'globalMenu'.indexOf('@Data.ID~') &gt; -1) " IdeDisplayStatus="Collapsed">
                       
                    <Image Caption="../rdTemplate/rdBookmarkOrganizer/rdBookmarkSharingOn.png" Condition="@Data.IsShared~ &amp;&amp; '@Data.ID~' != ''" Tooltip="Sharing" ID="imgFolderSharing" Height="24px" Width="24px">
                           <Action Type="ShowBookmarkSharing" ElementID="popupShareFolder" PopupCaption="Share Folder @Data.Name~" ID="showFolderSharing" BookmarkCollection="@Data.BookmarkCollection~" FolderID="@Data.ID~">
                           <Note Note="This is where the SharingList is put." />
                           </Action>
                       </Image>
                       <Image Caption="../rdTemplate/rdBookmarkOrganizer/rdBookmarkSharingOff.png" Condition="!@Data.IsShared~ &amp;&amp; '@Data.ID~' != ''" Tooltip="Share" ID="imgFolderSharing" Height="24px" Width="24px">
                           <Action Type="ShowBookmarkSharing" ElementID="popupShareFolder" PopupCaption="Share Folder @Data.Name~" ID="showFolderSharing" BookmarkCollection="@Data.BookmarkCollection~" FolderID="@Data.ID~">
                           <Note Note="This is where the SharingList is put." />
                           </Action>
                       </Image>
                </Division>
            </NewElement>
        </InsertAfterElement>
      <InsertAfterElement XPath="(//Division[@ID='divShowBookmarkSharing'])[1]" >
            <NewElement>
                <Division ID="divShowBookmarkSharing" Condition="'@Data.FolderOwner~' &lt;&gt; ''" IdeDisplayStatus="Collapsed">
                    
                       <Image Caption="../rdTemplate/rdBlank.gif" Condition="@Data.IsShortcut~" ID="imgFolderSharing" Height="24px" Width="24px" />
                </Division>            
            </NewElement>    
        </InsertAfterElement>
      <InsertAfterElement XPath="(//Division[@ID='divShowBookmarkSharing'])[2]" >
            <NewElement>
                <Division IdeDisplayStatus="Collapsed">
                    <Spaces Size="4" />
                      <Image Condition="'@Data.FolderOwner~' == '' &amp;&amp; '@Data.ID~' == ''" Caption=".\_SupportFiles\rdEditWrench21.png" AltText="Folder Management" Tooltip="Actions" ID="rdFolderManagement" Width="14" Height="14">
                        <Action Type="Popup" ID="ppMenu" Class="rdThemePopupMenu">
                              <PopupOption Caption="Add New Folder" ID="ppoAddFolder">
                                <Action Type="Javascript" ID="actAddFolder" Javascript="LogiXML.BookmarkOrganizer.rdBookmarkOrganizer.rdAddNewFolderSetup('@Data.ID~'); ShowElement(this.id, 'ppAddFolder', 'Show');" />
                              </PopupOption>
                        </Action>
                      </Image>
                      <Image Condition="'@Data.FolderOwner~' == '' &amp;&amp; '@Data.ID~' &lt;&gt; ''" Caption=".\_SupportFiles\rdEditWrench21.png" AltText="Folder Management" Tooltip="Actions" ID="rdFolderManagement" Width="14" Height="14">
                        <Action Type="Popup" ID="ppMenu" Class="rdThemePopupMenu">
                              <PopupOption Caption="Add New Folder" ID="ppoAddFolder">
                                <Action Type="Javascript" ID="actAddFolder" Javascript="LogiXML.BookmarkOrganizer.rdBookmarkOrganizer.rdAddNewFolderSetup('@Data.ID~'); ShowElement(this.id, 'ppAddFolder', 'Show');" />
                              </PopupOption>
                              <PopupOption Caption="Rename Folder" ID="ppoRenameFolder">
                                <Action Type="Javascript" ID="actRenameFolder" Javascript="LogiXML.BookmarkOrganizer.rdBookmarkOrganizer.rdRenameFolderSetup('@Data.ID~','@Data.Name~'); ShowElement(this.id, 'ppRenameFolder', 'Show'); " />
                              </PopupOption>
                              <PopupOption Caption="Delete" ID="ppoRemoveFolder">
                                <Action Type="Javascript" ID="actRemoveFolderSetup" Javascript="document.getElementById('rdDeleteFolderId').value = '@Data.ID~';rdAjaxRequestWithFormVars('rdAjaxCommand=RefreshElement&amp;rdRefreshElementID=divDeleteFolderIRIS&amp;rdFeedbackHideElementID=ppDeleteFolder&amp;DeleteFolderName=@Data.Name~','false','',null,null,null,null)&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" />
                              </PopupOption>
                        </Action>
                      </Image>
                      <Image Condition="'@Data.ShortcutChild~' &lt;&gt; 'True' &amp;&amp; '@Data.FolderOwner~' &lt;&gt; ''" Caption=".\_SupportFiles\rdEditWrench21.png" AltText="Folder Management" Tooltip="Actions" ID="rdFolderManagement" Width="14" Height="14">
                        <Action Type="Popup" ID="ppMenu" Class="rdThemePopupMenu">
                              <PopupOption Caption="Rename Folder Shortcut" ID="ppoRenameFolderShortcut">
                                <Action Type="Javascript" ID="actRenameFolderShortcut" Javascript="LogiXML.BookmarkOrganizer.rdBookmarkOrganizer.rdRenameFolderSetup('@Data.ID~','@Data.Name~'); ShowElement(this.id, 'ppRenameFolder', 'Show'); " />
                              </PopupOption>
                              <PopupOption Caption="Remove Folder Shortcut" ID="ppoRemoveFolderShortcut">
                                <Action Type="Javascript" ID="actionRemoveFolderShortcut" ConfirmMessage="Delete Shortcut?  Are you sure?" Javascript="LogiXML.BookmarkOrganizer.rdBookmarkOrganizer.rdRemoveFolder('@Data.ID~');" />
                              </PopupOption>
                        </Action>
                      </Image>
                </Division>
            </NewElement>    
        </InsertAfterElement>
        

        <InsertAfterElement XPath="//Image[@ID='rdFolderSharedShortcutImage']" >
            <NewElement>
                <Division ID="divShowBookmarkSharing3" Condition="'@Data.FolderOwner~' == '' &amp;&amp; (@Data.Depth~ &gt; 0 || 'globalMenu'.indexOf('@Data.ID~') &gt; -1) " IdeDisplayStatus="Collapsed">
                      
                    <Image Caption="../rdTemplate/rdBookmarkOrganizer/rdBookmarkSharingOn.png" Condition="@Data.IsShared~ &amp;&amp; '@Data.ID~' != ''" Tooltip="Sharing" ID="imgFolderSharing" Height="24px" Width="24px">
                        <Action Type="ShowBookmarkSharing" ElementID="popupShareFolder" PopupCaption="Share Folder @Data.Name~" ID="showFolderSharing" BookmarkCollection="@Data.BookmarkCollection~" FolderID="@Data.ID~">
                          <Note Note="This is where the SharingList is put." />
                        </Action>
                      </Image>
                      <Image Caption="../rdTemplate/rdBookmarkOrganizer/rdBookmarkSharingOff.png" Condition="!@Data.IsShared~ &amp;&amp; '@Data.ID~' != ''" Tooltip="Share" ID="imgFolderSharing" Height="24px" Width="24px">
                        <Action Type="ShowBookmarkSharing" ElementID="popupShareFolder" PopupCaption="Share Folder @Data.Name~" ID="showFolderSharing" BookmarkCollection="@Data.BookmarkCollection~" FolderID="@Data.ID~">
                          <Note Note="This is where the SharingList is put." />
                        </Action>
                      </Image>
                </Division>
            </NewElement>
        </InsertAfterElement>
      <InsertAfterElement XPath="(//Division[@ID='divShowBookmarkSharing'])[3]" >
            <NewElement>
                <Division ID="divShowBookmarkSharing4" Condition="'@Data.FolderOwner~' &lt;&gt; ''" IdeDisplayStatus="Collapsed">
                      
                    <Image Caption="../rdTemplate/rdBlank.gif" Condition="@Data.IsShortcut~" ID="imgFolderSharing" Height="24px" Width="24px" />
                </Division>            
            </NewElement>    
        </InsertAfterElement>
      <InsertAfterElement XPath="(//Division[@ID='divShowBookmarkSharing'])[4]" >
            <NewElement>
                <Division IdeDisplayStatus="Collapsed">
                      <Spaces Size="4" />
                    <Image Condition="'@Data.FolderOwner~' == '' &amp;&amp; '@Data.ID~' == ''" Caption=".\_SupportFiles\rdEditWrench21.png" AltText="Folder Management" Tooltip="Actions" ID="rdFolderManagement" Width="14" Height="14">
                        <Action Type="Popup" ID="ppMenu" Class="rdThemePopupMenu">
                            <PopupOption Caption="Add New Folder" ID="ppoAddFolder">
                                <Action Type="Javascript" ID="actAddFolder" Javascript="LogiXML.BookmarkOrganizer.rdBookmarkOrganizer.rdAddNewFolderSetup('@Data.ID~'); ShowElement(this.id, 'ppAddFolder', 'Show');" />
                              </PopupOption>
                        </Action>
                      </Image>
                      <Image Condition="'@Data.FolderOwner~' == '' &amp;&amp; '@Data.ID~' &lt;&gt; ''" Caption=".\_SupportFiles\rdEditWrench21.png" AltText="Folder Management" Tooltip="Actions" ID="rdFolderManagement" Width="14" Height="14">
                        <Action Type="Popup" ID="ppMenu" Class="rdThemePopupMenu">
                              <PopupOption Caption="Add New Folder" ID="ppoAddFolder">
                                <Action Type="Javascript" ID="actAddFolder" Javascript="LogiXML.BookmarkOrganizer.rdBookmarkOrganizer.rdAddNewFolderSetup('@Data.ID~'); ShowElement(this.id, 'ppAddFolder', 'Show');" />
                              </PopupOption>
                              <PopupOption Caption="Rename Folder" ID="ppoRenameFolder">
                                <Action Type="Javascript" ID="actRenameFolder" Javascript="LogiXML.BookmarkOrganizer.rdBookmarkOrganizer.rdRenameFolderSetup('@Data.ID~','@Data.Name~'); ShowElement(this.id, 'ppRenameFolder', 'Show'); " />
                              </PopupOption>
                              <PopupOption Caption="Delete" ID="ppoRemoveFolder">
                                <Action Type="Javascript" ID="actionRemoveFolder" ConfirmMessage="Delete Folder and all its contents?  Are you sure?" Javascript="LogiXML.BookmarkOrganizer.rdBookmarkOrganizer.rdRemoveFolder('@Data.ID~');" />
                              </PopupOption>
                        </Action>
                      </Image>
                      <Image Condition="'@Data.ShortcutChild~' &lt;&gt; 'True' &amp;&amp; '@Data.FolderOwner~' &lt;&gt; ''" Caption=".\_SupportFiles\rdEditWrench21.png" AltText="Folder Management" Tooltip="Actions" ID="rdFolderManagement" Width="14" Height="14">
                        <Action Type="Popup" ID="ppMenu" Class="rdThemePopupMenu">
                              <PopupOption Caption="Rename Folder Shortcut" ID="ppoRenameFolderShortcut">
                                <Action Type="Javascript" ID="actRenameFolderShortcut" Javascript="LogiXML.BookmarkOrganizer.rdBookmarkOrganizer.rdRenameFolderSetup('@Data.ID~','@Data.Name~'); ShowElement(this.id, 'ppRenameFolder', 'Show'); " />
                              </PopupOption>
                              <PopupOption Caption="Remove Folder Shortcut" ID="ppoRemoveFolderShortcut">
                                <Action Type="Javascript" ID="actionRemoveFolderShortcut" ConfirmMessage="Delete Shortcut?  Are you sure?" Javascript="LogiXML.BookmarkOrganizer.rdBookmarkOrganizer.rdRemoveFolder('@Data.ID~');" />
                              </PopupOption>
                        </Action>
                      </Image>
                </Division>
            </NewElement>    
        </InsertAfterElement>
    0
  • VISUI

    There seems to be invalid XML within your TMF as listed above.  This line has too many double quotes.  Surprised this didn't throw an error for you.  Doubt it resolves you issue though.

        <InsertAfterElement XPath="(//Division[@ID='divShowBookmarkSharing'])[1]"" >

    0
  • Johnny Stevens

    Sorry about that, @VISUI. I had edited my post to adjust with the upgrades I had made to the XPaths and missed an extra quotation mark. I have a feeling I'll need to update the entire page instead of just some of the elements after making the edits. Still hoping somebody has done this before and has a working model.

    0
  • Johnny Stevens

    My team approved moving the icons between the Folders and Folder Names. The above TMF works, but we had to add in a full Action.Report into the javascript/report definition for Add New Folder, Rename Folder, and Delete. The performance isn't ideal but that was an acceptable trade-off for removing the hover-gear icons and making the same features always available. Thanks!

    0

Please sign in to leave a comment.