Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-6980

Add ability to specify if sidebar link should open in new window or same window

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • sidebar-link-plugin
    • None

      In the Hudson config section where you can create new sidebar links, add an additional option or checkbox to specify if the link should open in a new window. If checked/selected then the generated link in the sidebar should have the target attribute set to _blank to force it to open in new window.

          [JENKINS-6980] Add ability to specify if sidebar link should open in new window or same window

          Alan Harder added a comment -

          This came up in the comments on the plugin wiki page.. unfortunately I can't do this without some change in Hudson core. Actions provided to make these links do not accept other attributes like "target".

          http://wiki.jenkins-ci.org/display/JENKINS/Sidebar-Link+Plugin?focusedCommentId=42470772#comment-42470772

          Alan Harder added a comment - This came up in the comments on the plugin wiki page.. unfortunately I can't do this without some change in Hudson core. Actions provided to make these links do not accept other attributes like "target". http://wiki.jenkins-ci.org/display/JENKINS/Sidebar-Link+Plugin?focusedCommentId=42470772#comment-42470772

          LinkAction (source) in the Sidebar Link plugin implements the Action interface (javadoc), which does not support link target frames. It is currently rendered using actions.jelly, which would allow the plugin to take over by providing a LinkAction/action.jelly file. However, to be consistent with how actions.jelly renders actions, LinkAction/action.jelly file would presumably have to use a l:task element, i.e. task.jelly, and that one doesn't support link target frames either.

          So, implementing this would require either adding a target frame attribute to task.jelly in core, or duplicating the task.jelly DOM structure in the Sidebar Link plugin. The second option seems more risky because compatibility could break later if there are more changes like JENKINS-61973.

          Kalle Niemitalo added a comment - LinkAction ( source ) in the Sidebar Link plugin implements the Action interface ( javadoc ), which does not support link target frames. It is currently rendered using actions.jelly , which would allow the plugin to take over by providing a LinkAction/action.jelly file. However, to be consistent with how actions.jelly renders actions, LinkAction/action.jelly file would presumably have to use a l:task element, i.e. task.jelly , and that one doesn't support link target frames either. So, implementing this would require either adding a target frame attribute to task.jelly in core, or duplicating the task.jelly DOM structure in the Sidebar Link plugin. The second option seems more risky because compatibility could break later if there are more changes like JENKINS-61973 .

            Unassigned Unassigned
            adammyatt adammyatt
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: