]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 452734: Remove the keyword chooser, because it's a usability regression
authormkanat%bugzilla.org <>
Thu, 18 Sep 2008 04:55:41 +0000 (04:55 +0000)
committermkanat%bugzilla.org <>
Thu, 18 Sep 2008 04:55:41 +0000 (04:55 +0000)
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=mkanat

18 files changed:
attachment.cgi
buglist.cgi
enter_bug.cgi
js/util.js
post_bug.cgi
process_bug.cgi
show_bug.cgi
skins/standard/global.css
template/en/default/attachment/created.html.tmpl
template/en/default/attachment/updated.html.tmpl
template/en/default/bug/create/create.html.tmpl
template/en/default/bug/create/created.html.tmpl
template/en/default/bug/edit.html.tmpl
template/en/default/bug/process/header.html.tmpl
template/en/default/bug/show.html.tmpl
template/en/default/filterexceptions.pl
template/en/default/list/edit-multiple.html.tmpl
template/en/default/list/list.html.tmpl

index 2520c0032047344f25f3d0f8757d3dacf77c2aa9..b2a5b616379b521275fa32c22fa312a2f98c1e86 100755 (executable)
@@ -421,7 +421,6 @@ sub insert {
   $vars->{'bugs'} = [new Bugzilla::Bug($bugid)];
   $vars->{'header_done'} = 1;
   $vars->{'contenttypemethod'} = $cgi->param('contenttypemethod');
-  $vars->{'valid_keywords'} = [map($_->name, Bugzilla::Keyword->get_all)];
   $vars->{'use_keywords'} = 1 if Bugzilla::Keyword::keyword_count();
 
   print $cgi->header();
@@ -627,7 +626,6 @@ sub update {
   # since the object was created.
   $vars->{'bugs'} = [new Bugzilla::Bug($bug->id)];
   $vars->{'header_done'} = 1;
-  $vars->{'valid_keywords'} = [map($_->name, Bugzilla::Keyword->get_all)];
   $vars->{'use_keywords'} = 1 if Bugzilla::Keyword::keyword_count();
 
   print $cgi->header();
@@ -700,7 +698,6 @@ sub delete_attachment {
         # Required to display the bug the deleted attachment belongs to.
         $vars->{'bugs'} = [$bug];
         $vars->{'header_done'} = 1;
-        $vars->{'valid_keywords'} = [map($_->name, Bugzilla::Keyword->get_all)];
         $vars->{'use_keywords'} = 1 if Bugzilla::Keyword::keyword_count();
 
         $template->process("attachment/updated.html.tmpl", $vars)
index 358e16d100861cf43eed30ae57edea835ae3a537..d40cbaa7aeea543fe21ad668a4cfc495cba2057e 100755 (executable)
@@ -1184,7 +1184,6 @@ if ($dotweak && scalar @bugs) {
                                         object => 'multiple_bugs'});
     }
     $vars->{'dotweak'} = 1;
-    $vars->{'valid_keywords'} = [map($_->name, Bugzilla::Keyword->get_all)];
     $vars->{'use_keywords'} = 1 if Bugzilla::Keyword::keyword_count();
 
     $vars->{'products'} = Bugzilla->user->get_enterable_products;
index 54b11823ccdb048a20c05f51cb75c0414f637727..08f3280354dafd8f90801e1617c341eec46312c5 100755 (executable)
@@ -368,7 +368,6 @@ $vars->{'bug_severity'}          = get_legal_field_values('bug_severity');
 $vars->{'rep_platform'}          = get_legal_field_values('rep_platform');
 $vars->{'op_sys'}                = get_legal_field_values('op_sys');
 
-$vars->{'valid_keywords'}        = [map($_->name, Bugzilla::Keyword->get_all)];
 $vars->{'use_keywords'}          = 1 if Bugzilla::Keyword::keyword_count();
 
 $vars->{'assigned_to'}           = formvalue('assigned_to');
index 98bafb664b958e3585f5b49fde14243b319485ed..ce7ea4caeb04497f75453f74bf2a345985ea5b3b 100644 (file)
@@ -134,82 +134,6 @@ function bz_overlayBelow(item, parent) {
     item.style.top = elemY + elemH + 1 + "px";
 }
 
-/**
- * Create wanted options in a select form control.
- *
- * @param  aSelect        Select form control to manipulate.
- * @param  aValue         Value attribute of the new option element.
- * @param  aTextValue     Value of a text node appended to the new option
- *                        element.
- * @param  aOwnerDocument Owner document of the new option element. If not
- *                        specified then "document" will be used.
- * @return                Created option element.
- */
-function bz_createOptionInSelect(aSelect, aValue, aTextValue, aOwnerDocument)
-{
-  if (!aOwnerDocument) {
-    aOwnerDocument = document;
-  }
-
-  var myOption = aOwnerDocument.createElement("option");
-  myOption.setAttribute("value", aValue);
-
-  var myTextNode = aOwnerDocument.createTextNode(aTextValue)
-  myOption.appendChild(myTextNode);
-
-  aSelect.appendChild(myOption);
-
-  return myOption;
-}
-
-/**
- * Clears all options from a select form control.
- *
- * @param  aElm       Select form control of which options to clear.
- * @param  aSkipFirst Boolean; true to skip (not clear) first option in the
- *                    select and false to remove all options.
- */
-function bz_clearOptions(aElm, aSkipFirst)
-{
-  var start = 0;
-
-  // Skip the first element? (for 'Choose One' type foo)
-  if (aSkipFirst) {
-    start = 1;
-  }
-
-  var length = aElm.options.length;
-
-  for (var run = start; run < length; run++) {
-    aElm.removeChild(aElm.options[start]);
-  }
-}
-
-/**
- * Takes an array and moves all the values to an select.
- *
- * @param aSelect         Select form control to populate. Will be cleared
- *                        before array values are created in it.
- * @param aArray          Array with values to populate select with.
- * @param aSkipFirst      Boolean; true to skip (not touch) first option in the
- *                        select and false to remove all options.
- * @param aUseNameAsValue Boolean; true if name is used as value and false if
- *                        not.
- */
-function bz_populateSelectFromArray(aSelect, aArray, aSkipFirst, aUseNameAsValue)
-{
-  // Clear the field
-  bz_clearOptions(aSelect, aSkipFirst);
-
-  for (var run = 0; run < aArray.length; run++) {
-    if (aUseNameAsValue) {
-      bz_createOptionInSelect(aSelect, aArray[run], aArray[run]);
-    } else {
-      bz_createOptionInSelect(aSelect, aArray[run][0], aArray[run][0]);
-    }
-  }
-}
-
 /**
  * Checks if a specified value is in the specified array.
  *
index 957e7b75f0527f65b95f738b048bece0d7e89f31..a9910e83a8fa48364f51c58fbd60c12b65a3b248 100755 (executable)
@@ -264,7 +264,6 @@ if ($cgi->cookie("BUGLIST")) {
     @bug_list = split(/:/, $cgi->cookie("BUGLIST"));
 }
 $vars->{'bug_list'} = \@bug_list;
-$vars->{'valid_keywords'} = [map($_->name, Bugzilla::Keyword->get_all)];
 $vars->{'use_keywords'} = 1 if Bugzilla::Keyword::keyword_count();
 
 if ($token) {
index cf24c96c919aa3cb7444c6f4a73a7c6e88585c1b..7e484d2b04cc8cc9e6543ef5e2dc731e2c8afc2f 100755 (executable)
@@ -68,7 +68,6 @@ my $cgi = Bugzilla->cgi;
 my $dbh = Bugzilla->dbh;
 my $template = Bugzilla->template;
 my $vars = {};
-$vars->{'valid_keywords'} = [map($_->name, Bugzilla::Keyword->get_all)];
 $vars->{'use_keywords'} = 1 if Bugzilla::Keyword::keyword_count();
 
 ######################################################################
index 782293af5ac0d8f2524528f2f6ee47dd05c81ded..59e2286c34676a249a6cdc5b9202440aec34670c 100755 (executable)
@@ -97,7 +97,6 @@ eval {
 
 $vars->{'bugs'} = \@bugs;
 $vars->{'marks'} = \%marks;
-$vars->{'valid_keywords'} = [map($_->name, Bugzilla::Keyword->get_all)];
 $vars->{'use_keywords'} = 1 if Bugzilla::Keyword::keyword_count();
 
 my @bugids = map {$_->bug_id} grep {!$_->error} @bugs;
index 938575eb57b574cd8f4fe7451cb7952e211e0aec..8b24069dadd553f44147a9f262b95ac963dd57db 100644 (file)
@@ -427,16 +427,3 @@ form#Create .comment {
     padding: 0.3em;
     height: 4ex;
 }
-
-#keyword-chooser {
-    padding: 10px;
-    position: absolute;
-    z-index: 25;
-    top: 50px;
-    left: 50px;
-    border: 2px solid #404D6C;
-    -moz-border-radius: 5px;
-    background: white;
-}
-
-
index 1f5bdb6ac56411871344e05c500b748421057e0b..faf1b87c09b3f66cb3f1ffddcf538910341f8f23 100644 (file)
@@ -39,7 +39,7 @@
 [% PROCESS global/header.html.tmpl
   title = "Attachment $attachment.id added to $terms.Bug $attachment.bug_id"
   bodyclasses = bodyclasses
-  javascript_urls = [ "js/util.js", "js/keyword-chooser.js", "js/field.js",
+  javascript_urls = [ "js/util.js", "js/field.js",
                       "js/yui/yahoo-dom-event.js", "js/yui/calendar.js" ]
   style_urls = [ "skins/standard/yui/calendar.css", "skins/standard/show_bug.css" ]
   doc_section = "bug_page.html"
index f7252e5c8df47a4ceec7facf9a51aab085309d29..bc22b466671dcfc73c27308e955685e31b8886f2 100644 (file)
@@ -43,7 +43,7 @@
   subheader = filtered_desc
   header_addl_info = "Last modified: $filtered_timestamp"
   bodyclasses = bodyclasses
-  javascript_urls = [ "js/util.js", "js/keyword-chooser.js", "js/field.js",
+  javascript_urls = [ "js/util.js", "js/field.js",
                       "js/yui/yahoo-dom-event.js", "js/yui/calendar.js" ]
   style_urls = [ "skins/standard/yui/calendar.css", "skins/standard/show_bug.css" ]
   doc_section = "bug_page.html"
index 9b522f2a7a3af6b263bb0b040627e76d826917d0..d9eab0e04ac958869945cf8bc47d674fed451563 100644 (file)
@@ -32,7 +32,7 @@
   title = title
   style_urls = [ 'skins/standard/create_attachment.css',
                  'skins/standard/yui/calendar.css' ]
-  javascript_urls = [ "js/attachment.js", "js/util.js", "js/keyword-chooser.js",
+  javascript_urls = [ "js/attachment.js", "js/util.js",
                       "js/yui/yahoo-dom-event.js", "js/yui/calendar.js",
                       "js/field.js" ]
 %]
@@ -531,7 +531,8 @@ function handleWantsAttachment(wants_attachment) {
       <tr>
         <th><a href="describekeywords.cgi">Keywords</a>:</th>
         <td colspan="3">
-          <input id="keywords" name="keywords" size="60" value="[% keywords FILTER html %]" onfocus="this.chooser.open();"> (optional)
+          <input id="keywords" name="keywords" size="60" 
+                 value="[% keywords FILTER html %]"> (optional)
         </td>
       </tr>
     [% END %]
@@ -600,12 +601,6 @@ function handleWantsAttachment(wants_attachment) {
   <input type="hidden" name="form_name" value="enter_bug">
 </form>
 
-[% IF use_keywords %]
-  [% PROCESS "bug/keyword-chooser.html.tmpl"
-    sel_keywords = keywords.split(', ')
-  %]
-[% END %]
-
 [%# Links or content with more information about the bug being created. %]
 [% Hook.process("end") %]
 
index 1cf2a14f7e8c13c7a8f4676a76968791f328c00d..6226fdc6430cdcaae5bf12a464236086bdf7e178 100644 (file)
@@ -36,7 +36,7 @@
 
 [% PROCESS global/header.html.tmpl
   title = "$terms.Bug $id Submitted"
-  javascript_urls = [ "js/util.js", "js/keyword-chooser.js", "js/field.js",
+  javascript_urls = [ "js/util.js", "js/field.js",
                         "js/yui/yahoo-dom-event.js", "js/yui/calendar.js" ]
   style_urls = [ "skins/standard/yui/calendar.css", "skins/standard/show_bug.css" ]
   
index 89d5319faca2c9bc1e9c1e3fe0e0296e3f7c1acc..6d60d8eb93c1c78d66232acfa9d5c209f71de4ed 100644 (file)
   </table>
 </form>
 
-[% IF use_keywords %]
-  [% PROCESS "bug/keyword-chooser.html.tmpl"
-    sel_keywords = bug.keywords.split(', ')
-  %]
-[% END %]
-
 [%############################################################################%]
 [%# Block for the Title (alias and short desc)                               #%]
 [%############################################################################%]
           <b><a href="describekeywords.cgi"><u>K</u>eywords</a></b></label>:
       </td>
       [% PROCESS input inputname => "keywords" size => 40 colspan => 2
-                       value => bug.keywords.join(', ')
-                       onfocus => "this.chooser.open()" %]
+                       value => bug.keywords.join(', ') %]
     </tr>
   [% END %]
 [% END %]
        <input id="[% inputname %]" name="[% inputname %]"
               value="[% val FILTER html %]"[% " size=\"$size\"" IF size %]
               [% " maxlength=\"$maxlength\"" IF maxlength %]
-              [% " onfocus=\"$onfocus\"" IF onfocus %]
               [% " spellcheck=\"$spellcheck\"" IF spellcheck %]>
     [% ELSE %]
       [% IF size && val.length > size %]
   [% colspan = 0 %]
   [% size = 0 %]
   [% value = undef %]
-  [% onfocus = undef %]
   [% spellcheck = undef %]
 [% END %]
 
index 5472aa7ddf101d65097b16ff68f3953780559a5c..4aecfc1b812d0647b74861a54a115826056efb77 100644 (file)
@@ -42,7 +42,7 @@
 [% END %]
 
 [% PROCESS global/header.html.tmpl
-  javascript_urls = [ "js/util.js", "js/keyword-chooser.js", "js/field.js",
+  javascript_urls = [ "js/util.js", "js/field.js",
                       "js/yui/yahoo-dom-event.js", "js/yui/calendar.js" ]
   style_urls = [ "skins/standard/yui/calendar.css", "skins/standard/show_bug.css" ]
   doc_section = "bug_page.html"
index 373cfa327b68c24d2951f2f065bde3b7c5330d1d..cf6127413a284c4b3969e9913400ab546fd4c583 100644 (file)
@@ -44,7 +44,7 @@
     subheader = filtered_desc
     header_addl_info = "Last modified: $filtered_timestamp"
     bodyclasses = bodyclasses
-    javascript_urls = [ "js/util.js", "js/keyword-chooser.js", "js/field.js",
+    javascript_urls = [ "js/util.js", "js/field.js",
                         "js/yui/yahoo-dom-event.js", "js/yui/calendar.js" ]
     style_urls = [ "skins/standard/yui/calendar.css", "skins/standard/show_bug.css" ]
     doc_section = "bug_page.html"
index 200f7d4625fda2f5ee86b951d3a7775d5bd014ae..058836602731c18d681f2525a71bd7c0986c2a81 100644 (file)
   '" colspan=\"$colspan\"" IF colspan',
   '" size=\"$size\"" IF size',
   '" maxlength=\"$maxlength\"" IF maxlength',
-  '" onfocus=\"$onfocus\"" IF onfocus',
   'flag.status',
   '" spellcheck=\"$spellcheck\"" IF spellcheck',
 ],
index 238763e067b5063448db30b5214e9f33e90379c7..190628fa9d950186d0f1be1dc25d4d028291124d 100644 (file)
         </label>
       </th>
       <td colspan="3">
-        <input id="keywords" name="keywords" size="32" 
-               onfocus = "this.chooser.open();">
+        <input id="keywords" name="keywords" size="32">
         <select name="keywordaction">
           <option value="add">Add these keywords</option>
           <option value="delete">Delete these keywords</option>
 
 </table>
 
-[% IF use_keywords %]
-  [% PROCESS "bug/keyword-chooser.html.tmpl"
-    sel_keywords = keywords.split(', ')
-  %]
-[% END %]
-
 <b><label for="comment">Additional Comments:</label></b><br>
 [% INCLUDE global/textarea.html.tmpl
   name    = 'comment'
index 0a8eb402cd59860a037e283078aae41a35e8afd0..a0c2338038ec5caf37534dea2e5c2f10ac2b4d0a 100644 (file)
@@ -46,7 +46,7 @@
   title = title
   style = style
   atomlink = "buglist.cgi?$urlquerypart&title=$title&ctype=atom" 
-  javascript_urls = [ "js/util.js", "js/keyword-chooser.js", "js/field.js",
+  javascript_urls = [ "js/util.js", "js/field.js",
                       "js/yui/yahoo-dom-event.js", "js/yui/calendar.js" ]
   style_urls = [ "skins/standard/buglist.css", "skins/standard/yui/calendar.css" ]
   doc_section = "query.html#list"