Last Comment Bug 849905 - bug filing links in my dashboard should be able to be opened in new tabs/windows
: bug filing links in my dashboard should be able to be opened in new tabs/windows
Status: RESOLVED FIXED
:
Product: bugzilla.mozilla.org
Classification: Other
Component: Extensions: MyDashboard (show other bugs)
: Production
: All All
: -- normal (vote)
: ---
Assigned To: David Lawrence [:dkl]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-11 10:59 PDT by Ben Hearsum (:bhearsum)
Modified: 2013-03-21 14:27 PDT (History)
1 user (show)
See Also:
Due Date:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Patch to open new tab when selecting prod/comp from search (v1) (5.12 KB, patch)
2013-03-11 15:43 PDT, David Lawrence [:dkl]
glob: review+
Details | Diff | Review

Description Ben Hearsum (:bhearsum) 2013-03-11 10:59:26 PDT
Eg, middle click or ctrl-click or maybe ctrl-enter. Right now there's no way that I can find to open them in any window except the current window. It's a little weird since the dashboard seems to be intended to stay open for long periods of time.
Comment 1 David Lawrence [:dkl] 2013-03-11 15:43:33 PDT
Created attachment 723671 [details] [diff] [review]
Patch to open new tab when selecting prod/comp from search (v1)

Had to quite a bit of refactoring to add a new 'new_tab' config option to ProdCompSearch. But this makes the extension more configurable than before. Dashboard will open a new tab whereas guidedbugentry, product chooser, etc. will not.

dkl
Comment 2 Byron Jones ‹:glob› 2013-03-21 00:58:14 PDT
Comment on attachment 723671 [details] [diff] [review]
Patch to open new tab when selecting prod/comp from search (v1)

Review of attachment 723671 [details] [diff] [review]:
-----------------------------------------------------------------

r=glob

::: extensions/BMO/template/en/default/global/choose-product.html.tmpl
@@ +62,5 @@
>    [% PROCESS prodcompsearch/form.html.tmpl 
> +     input_label   = "Find product:"
> +     format        = format
> +     cloned_bug_id = cloned_bug_id
> +     script_name   = target

please indent the parameters

::: extensions/GuidedBugEntry/template/en/default/guided/guided.html.tmpl
@@ +119,5 @@
>  <div id="prod_comp_search_main">
>    [% PROCESS prodcompsearch/form.html.tmpl
>        input_label = "Find product:"
> +      format      = "guided"
> +      script_name = "enter_bug.cgi"

please indent the parameters

::: extensions/MyDashboard/template/en/default/pages/mydashboard.html.tmpl
@@ +105,5 @@
>        <div id="prod_comp_search_main">
>          [% PROCESS prodcompsearch/form.html.tmpl
> +           input_label = "File a $terms.Bug:"
> +           script_name = "enter_bug.cgi"
> +           new_tab     = 1

please indent the parameters

::: extensions/ProdCompSearch/web/js/prod_comp_search.js
@@ +98,5 @@
>                      if (ProdCompSearch.cloned_bug_id)
>                          url += "&cloned_bug_id=" + encodeURIComponent(ProdCompSearch.cloned_bug_id);
>                  }
> +                if (ProdCompSearch.new_tab) {
> +                    window.open(url, '_blank');

you should probably clear the search field at this point.
Comment 3 David Lawrence [:dkl] 2013-03-21 14:27:03 PDT
Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bmo/4.2         
modified extensions/BMO/template/en/default/global/choose-product.html.tmpl
modified extensions/ProdCompSearch/template/en/default/prodcompsearch/form.html.tmpl
modified extensions/MyDashboard/web/js/query.js
modified extensions/ProdCompSearch/template/en/default/pages/prodcompsearch.html.tmpl
modified extensions/ProdCompSearch/web/js/prod_comp_search.js                                
modified extensions/MyDashboard/template/en/default/pages/mydashboard.html.tmpl
modified extensions/GuidedBugEntry/template/en/default/guided/guided.html.tmpl
Committed revision 8682.

Note You need to log in before you can comment on or make changes to this bug.