Added lookup bugzilla bug number and auto-enable on bugzilla site
authorKristian Kræmmer Nielsen <jkkn@jkkn.dk>
Mon, 8 Dec 2008 16:11:36 +0000 (17:11 +0100)
committerKristian Kræmmer Nielsen <jkkn@jkkn.dk>
Mon, 8 Dec 2008 16:11:36 +0000 (17:11 +0100)
content/quickbox.js
content/quickbox.xul
locale/da-DK/tv2developer.dtd
locale/en-US/tv2developer.dtd
webroot/index.html

index 708eeb9e98efc9fd645507f8ab3f326c1090f58b..42bd941aae1f62cc45490d1249bd96ee2ddc25bd 100644 (file)
@@ -247,6 +247,7 @@ var TV2DeveloperQuickBox = {
                     case 'go-content-id':
                     case 'go-userid':
                     case 'go-username':
+                    case 'go-bugzilla':
                         auto_action = cur_action.id;
                         break;
                     default:
@@ -307,6 +308,7 @@ var TV2DeveloperQuickBox = {
             case 'go-content-id':
             case 'go-ttv-page':
             case 'go-userid':
+            case 'go-bugzilla':
                 // find longest id in entered url
                 var max_len = 0;
                 var cur_id;
@@ -320,8 +322,10 @@ var TV2DeveloperQuickBox = {
                     validState = false;
                     longest_id = '?';
                 }
-                action_uses_opdatering = true;
-                site = (action == 'go-userid' ? 'login' : 'i2');
+                if (action != 'go-bugzilla') {
+                    action_uses_opdatering = true;
+                    site = (action == 'go-userid' ? 'login' : 'i2');
+                }
                 break;
             case 'go-pdolog':
                 php4 = false; // not allowed
@@ -355,6 +359,14 @@ var TV2DeveloperQuickBox = {
                 // Just assume a username was entered
                 uri = '/opslag.php?username=' + go_username;
                 break;
+            case 'go-bugzilla':
+                // Use longest_id as bugzilla number
+                uri = '/show_bug.cgi?format=multiple&id=' + longest_id;
+                protocol='http';
+                sitetype='webroot';
+                site = 'bugzilla';
+                php4 = false;
+                break;
             case 'go-node':
                 uri = '/tool/node/?id=' + longest_id;
                 break;
@@ -481,6 +493,7 @@ var TV2DeveloperQuickBox = {
     _reg_viewcvsviewsource: /^\?(?:.*&)?view=markup(?:&|#|$)/,
     _reg_fromi2if: /^http:\/\/i2\.(?:[^.]+\.)?opdatering\.(?:(?:test|snapshot)\.)?tv2\.dk\/(tango\/(entry|requeue|dynamic)|tool\/pdo_log\/frameset)\.php.*?(?:\?|&)url=([^&]+)/,
     _reg_fromloginif: /^http:\/\/login\.(?:([^.]+)\.)?opdatering\.(?:(test|snapshot)\.)?tv2\.dk\/opslag\.php.*?(?:\?|&)(user_id|username)=([^&]+)/,
+    _reg_frombugzilla: /^http:\/\/bugzilla\.tv2\.dk\/(show_bug.cgi.*?(?:\?|&)id=([0-9]+))?/,
     _extractURL: function(url) {
         var action = 'go-site';
         
@@ -533,6 +546,17 @@ var TV2DeveloperQuickBox = {
             }
         }
         
+        /* Extract from bugzilla site */
+        var bugzillaif = this._reg_frombugzilla.exec(url);
+        if (bugzillaif) {
+            action = 'go-bugzilla';
+            if (bugzillaif[2]) {
+                url = bugzillaif[2];
+            } else {
+                url = '';
+            }
+        }
+        
         /* Extract link from ViewCVS site */
         var fromviewcvs = this._reg_fromviewcvs.exec(url);
         if (fromviewcvs) {
index 8e05e50475c0c5e0fa9a1c6387d1a7472ef029e0..f941b6fdac22ef921b007f5f7c35f338192dfec9 100644 (file)
@@ -80,6 +80,7 @@
           <radio id="go-ttv-page" label="&quickbox.ttvpage;" accesskey="&quickbox.ttvpage.accesskey;"/>
           <radio id="go-userid" label="&quickbox.userid;" accesskey="&quickbox.userid.accesskey;"/>
           <radio id="go-username" label="&quickbox.username;" accesskey="&quickbox.username.accesskey;"/>
+          <radio id="go-bugzilla" label="&quickbox.bugzilla;" accesskey="&quickbox.bugzilla.accesskey;"/>
       </groupbox>
      </hbox>
     </radiogroup>
index 1a59b2d7df1070d353e4fe4f852068bfcc858655..8fdecbdf853bd770e7a26d80c401b9481216fbe0 100644 (file)
 <!ENTITY quickbox.userid "Slå op som Bruger ID">
 <!ENTITY quickbox.userid.accesskey "j">
 
+<!ENTITY quickbox.bugzilla "Slå op i Bugzilla">
+<!ENTITY quickbox.bugzilla.accesskey "z">
+
 <!ENTITY quickbox.openin "Åbn i">
 <!ENTITY quickbox.openin.current "nuværende vindue">
-<!ENTITY quickbox.openin.current.accesskey "z">
+<!ENTITY quickbox.openin.current.accesskey "m">
 
 <!ENTITY quickbox.openin.newtab "ny tab">
 <!ENTITY quickbox.openin.newtab.accesskey "a">
index 97d9019ad820db07019ca483d26794d2c9ca4a71..589c74a100f3716a8b93d2173623624312a5a59c 100644 (file)
 <!ENTITY quickbox.userid "Lookup as User ID">
 <!ENTITY quickbox.userid.accesskey "j">
 
+<!ENTITY quickbox.bugzilla "Lookup as Bugzilla ID">
+<!ENTITY quickbox.bugzilla.accesskey "z">
+
 <!ENTITY quickbox.openin "Open in">
 <!ENTITY quickbox.openin.current "current window">
-<!ENTITY quickbox.openin.current.accesskey "z">
+<!ENTITY quickbox.openin.current.accesskey "k">
 
 <!ENTITY quickbox.openin.newtab "new tab">
 <!ENTITY quickbox.openin.newtab.accesskey "a">
index 8fe95497d0dda9c2f515ad70f1243d2704ab7ddf..016ac8955abf7eee83f3a22aeb90a2ab05f7395d 100644 (file)
@@ -97,6 +97,7 @@
                 <li>Genkender URL angivet som parameter i fleste i2-interfaces</li>
                 <li>Ved ViewCVS genkendes specielle sites så som <code>globals</code> og specielle mapper så som <code>inc</code>, brug dobbelt slash (<code>//</code>) efter projektnavn for at undgå dette.</li>
                 <li>Slå TV 2 Login brugere op pr. navn eller id</li>
+                <li>Slå Bugzilla opgave op</li>
             </ul>
             <div class="center">
                 <a href="https://jkkn.dk/tv2developer/tv2developer.xpi">Install now</a>