Added functionalitet for .stage.tv2.dk environment
authorunknown <JKKN@.(none)>
Fri, 5 Feb 2010 10:28:46 +0000 (11:28 +0100)
committerunknown <JKKN@.(none)>
Fri, 5 Feb 2010 10:28:46 +0000 (11:28 +0100)
content/quickbox.js
content/quickbox.xul
content/tv2developer.js
locale/da-DK/tv2developer.properties
locale/en-US/tv2developer.properties

index f6b1dacc3536f4fe6c2e114ea740e20fa6efcd26..34a53f0f7b0696473268a04ab33abbe56d1c5b90 100644 (file)
@@ -133,7 +133,7 @@ var TV2DeveloperQuickBox = {
     _reg_git_indexphpfolders: /^\/(((opdatering|webroot)(\/|$)|\/))/,
        _reg_git_dnsdomains: /^\/(tv2|tv2news|tv2film|sputnik|charlie|zulu)(\.|\.d|\.dk)?$/,
     _sitetypes: ['opdatering', 'robot', 'template'],
-    _envs:      ['test', 'snapshot'],
+    _envs:      ['test', 'snapshot', 'stage'],
     updateQuickbox: function(manual) {
         if (!manual) manual = false;
         var current_user = TV2Util.getPref('developer-initials');
@@ -592,8 +592,8 @@ var TV2DeveloperQuickBox = {
     _reg_viewgitbranch1: /[?;&]hb=php4[&;#]?/,
     _reg_viewgitbranch2: /[?;&]h=refs\/heads\/php4[&;#]?/,
     _reg_viewgitviewtype: /[?;&]a=(blob|tree|history)[&;#]?/,
-    _reg_fromi2if: /^http:\/\/i2\.(?:[^.]+\.)?opdatering\.(?:php5\.(?:test|snapshot)\.)?tv2\.dk\/(tango\/(entry|requeue|dynamic)|tool\/pdo_log\/frameset)\.php.*?(?:\?|&)url=([^&]+)/,
-    _reg_fromloginif: /^http:\/\/login\.(?:([^.]+)\.)?opdatering\.(?:php5\.(test|snapshot)\.)?tv2\.dk\/opslag\.php.*?(?:\?|&)(user_id|username)=([^&]+)/,
+    _reg_fromi2if: /^http:\/\/i2\.(?:[^.]+\.)?opdatering\.(?:php5\.(?:test|snapshot|stage)\.)?tv2\.dk\/(tango\/(entry|requeue|dynamic)|tool\/pdo_log\/frameset)\.php.*?(?:\?|&)url=([^&]+)/,
+    _reg_fromloginif: /^http:\/\/login\.(?:([^.]+)\.)?opdatering\.(?:php5\.(test|snapshot|stage)\.)?tv2\.dk\/opslag\.php.*?(?:\?|&)(user_id|username)=([^&]+)/,
     _reg_frombugzilla: /^http:\/\/bugzilla\.tv2\.dk\/(show_bug.cgi.*?(?:\?|&)id=([0-9]+))?/,
     _extractURL: function(paramUrl) {
         var action = 'go-site';
@@ -641,6 +641,8 @@ var TV2DeveloperQuickBox = {
                     } else {
                         url += '.t';  // test
                     }
+                } else if (env == 'stage') {
+                    url += '.st'; // stage
                 } else {
                     url += '.s'; // snapshot
                 }
index 8ec02d228f74aa68a2e82eb9b4b2c8ff085a39aa..189d77f0e149f52685615e72731ab72c3c869339 100644 (file)
@@ -39,6 +39,7 @@
           <radio id="live"      label="Live site"       accesskey="l" selected="true"/>
           <radio id="test"      label="Test site"       accesskey="t"/>
           <radio id="snapshot"  label="Snapshot site"   accesskey="s"/>
+          <radio id="stage"     label="Stage site"      accesskey="e"/>
           <hbox>
             <radio id="othertest" label="&quickbox.othertestsite;" accesskey="&quickbox.othertestsite.accesskey;"/>
             <textbox id="testname" size="10" maxlength="20" disabled="true"
index 7c0f5eb5a7004d1e2513b3a2d72753884d3a884c..b70f9332b04855ed8a602fa3d424bcdcd9495a73 100644 (file)
@@ -200,7 +200,7 @@ var TV2Developer = {
     },
  
     /* Main function for adding all the links for the menu popup */   
-    _reg_tv2: /^https?:\/\/([^/.]*)?([^/]*?)(\.(robot|opdatering|template)\.?)?(\.(php4|php5)\.?)?(\.((test|snapshot)3?)\.)?tv2\.dk((\/[^#\?]*).*)?$/,
+    _reg_tv2: /^https?:\/\/([^/.]*)?([^/]*?)(\.(robot|opdatering|template)\.?)?(\.(php4|php5)\.?)?(\.((test3?|snapshot3?|stage))\.)?tv2\.dk((\/[^#\?]*).*)?$/,
     _reg_php: /^(.*\.php)/,
     _reg_nodeid: /([0-9]{2,})/g,
     _reg_i2files: /\/([0-9]+)-/,
@@ -270,7 +270,7 @@ var TV2Developer = {
                 }
             }
             
-            // Find live, test and snapshot url for current site
+            // Find live, test, stage and snapshot url for current site
             var liveurl;
             var live_sitename_complete = ((live_sitename=='www') ? '' : live_sitename+'.') + 'tv2.dk';
             if (!git_sitename) {
@@ -278,7 +278,7 @@ var TV2Developer = {
             }
 
             // Construct corresponding live URL
-            if (tv2_testsite) { // test or snapshot
+            if (tv2_testsite) { // test, snapshot or stage
                 if (tv2_sitetype) { /* opdatering, ... */
                     liveurl = tv2_sitename+'.'+tv2_sitetype+'.tv2.dk';
                 } else {
@@ -289,19 +289,28 @@ var TV2Developer = {
             var testprompturl = git_sitename+'.'+'?'+(tv2_sitetype?'.'+tv2_sitetype:'')+'.'+tv2_apptype+'.test'+'.tv2.dk';
             var testurl       = git_sitename+'.'+initials+(tv2_sitetype?'.'+tv2_sitetype:'')+'.'+tv2_apptype+'.test'+'.tv2.dk';
             var snapshoturl   = git_sitename+(tv2_sitetype?'.'+tv2_sitetype:'')+'.'+tv2_apptype+'.snapshot'+'.tv2.dk';
+            var stageurl      = git_sitename+(tv2_sitetype?'.'+tv2_sitetype:'')+'.'+tv2_apptype+'.stage'+'.tv2.dk';
             
             // Add the two urls we are not at
-            if (!tv2_testsite) { // always add swaps to snapshot and the test site
+            if (!tv2_testsite) { // always add swaps to stage, snapshot and the test site
                 links.push(new this.TV2Link('test_live_swap', testurl, tv2_uri, TV2Util.getStr('test.accesskey')));
                 links.push(new this.TV2Link('snapshot_live_swap', snapshoturl, tv2_uri, TV2Util.getStr('snapshot.accesskey')));
+                links.push(new this.TV2Link('stage_live_swap', stageurl, tv2_uri, TV2Util.getStr('stage.accesskey')));
                 links.push(new this.TV2Link('testprompt_swap', testprompturl, tv2_uri, TV2Util.getStr('testprompt.accesskey'), 'promptInitials'));
             } else if (tv2_testtype == 'snapshot') {
                 links.push(new this.TV2Link('snapshot_live_swap', liveurl, tv2_uri, TV2Util.getStr('live.accesskey')));
+                links.push(new this.TV2Link('snapshot_stage_swap', stageurl, tv2_uri, TV2Util.getStr('stage.accesskey')));
                 links.push(new this.TV2Link('test_snapshot_swap', testurl, tv2_uri, TV2Util.getStr('test.accesskey')));
                 links.push(new this.TV2Link('testprompt_swap', testprompturl, tv2_uri, TV2Util.getStr('testprompt.accesskey'), 'promptInitials'));
+            } else if (tv2_testtype == 'stage') {
+                links.push(new this.TV2Link('stage_live_swap', liveurl, tv2_uri, TV2Util.getStr('live.accesskey')));
+                links.push(new this.TV2Link('snapshot_stage_swap', snapshoturl, tv2_uri, TV2Util.getStr('stage.accesskey')));
+                links.push(new this.TV2Link('test_stage_swap', testurl, tv2_uri, TV2Util.getStr('test.accesskey')));
+                links.push(new this.TV2Link('testprompt_swap', testprompturl, tv2_uri, TV2Util.getStr('testprompt.accesskey'), 'promptInitials'));
             } else { // must be test
                 links.push(new this.TV2Link('test_live_swap', liveurl, tv2_uri, TV2Util.getStr('live.accesskey')));
                 links.push(new this.TV2Link('test_snapshot_swap', snapshoturl, tv2_uri, TV2Util.getStr('snapshot.accesskey')));
+                links.push(new this.TV2Link('test_stage_swap', stageurl, tv2_uri, TV2Util.getStr('stage.accesskey')));
                 if (tv2_user != initials) {
                     links.push(new this.TV2Link('test_swap', testurl, tv2_uri, TV2Util.getStr('test.accesskey')));
                 }
@@ -347,6 +356,8 @@ var TV2Developer = {
                 gitweb_type = 'gitweb_live';
             } else if (tv2_testtype == 'snapshot') {
                 gitweb_type = 'gitweb_snapshot';
+            } else if (tv2_testtype == 'stage') {
+                gitweb_type = 'gitweb_stage';
             } else {
                 gitweb_type = 'gitweb_test';
             }
@@ -492,6 +503,7 @@ var TV2Developer = {
                 links.push(new this.TV2Link('gitweb_live', live_sitename + type + 'tv2.dk', tv2_uri, TV2Util.getStr('live.accesskey')));
                 links.push(new this.TV2Link('gitweb_test', tv2_sitename + '.' + initials + '.' + type + appType + 'test' + '.tv2.dk', tv2_uri, TV2Util.getStr('test.accesskey')));
                 links.push(new this.TV2Link('gitweb_snapshot', tv2_sitename + '.' + type + appType + 'snapshot' + '.tv2.dk', tv2_uri, TV2Util.getStr('snapshot.accesskey')));
+                links.push(new this.TV2Link('gitweb_stage', tv2_sitename + '.' + type + appType + 'stage' + '.tv2.dk', tv2_uri, TV2Util.getStr('stage.accesskey')));
                 links.push(new this.TV2Link('gitweb_testprompt', tv2_sitename + '.?.' + type + appType + 'test' + '.tv2.dk', tv2_uri, TV2Util.getStr('testprompt.accesskey'), 'promptInitials'));
                 
             } else {
index 4fb849f3a84510226d279c618466a73856190b34..5d658b847e4653bcab8b3b1f89b239456cb3d771 100644 (file)
@@ -31,7 +31,7 @@ i2Tree=I2 Tree
 i2Tree.accesskey=i
 
 nodeInformationTool=Node Informations Værktøj
-nodeInformationTool.accesskey=e
+nodeInformationTool.accesskey=j
 
 nodeQueryTool=Node Forespørgsels Værktøj
 nodeQueryTool.accesskey=u
@@ -48,6 +48,7 @@ flushCache.accesskey=y
 live.accesskey=l
 test.accesskey=t
 snapshot.accesskey=s
+stage.accesskey=e
 testprompt.accesskey=.
 
 webroot.accesskey=w
index b1ad7797252191c3f4f15dd993e6ffd5ddade3ab..d7ba40520f0446c81fcbee2fcce01e6610c0ddce 100644 (file)
@@ -31,7 +31,7 @@ i2Tree=I2 Tree
 i2Tree.accesskey=i
 
 nodeInformationTool=Node Information Tool
-nodeInformationTool.accesskey=e
+nodeInformationTool.accesskey=j
 
 nodeQueryTool=Node Query Tool
 nodeQueryTool.accesskey=u
@@ -48,6 +48,7 @@ flushCache.accesskey=y
 live.accesskey=l
 test.accesskey=t
 snapshot.accesskey=s
+stage.accesskey=e
 testprompt.accesskey=.
 
 webroot.accesskey=w