}
},
+ /* Updates action selection (handles drop down if needed) */
+ _setCurAction: function(action) {
+ if (action.tagName != 'menuitem') {
+ document.getElementById('action').selectedItem = action;
+ } else {
+ document.getElementById('action').selectedItem =
+ document.getElementById('go-other');
+ document.getElementById('action-other').selectedItem = action;
+ }
+ },
+
+ /* Returns selected action (hanlding drop down of actions) */
+ _getCurAction: function() {
+ var action = document.getElementById('action').selectedItem;
+ if (action.id == 'go-other') {
+ action = document.getElementById('action-other').selectedItem;
+ }
+ return action;
+ },
+
/* Change action manually */
setManuel: function(target, doReturnFocus) {
- if (typeof doReturnFocus == 'undefined') doReturnFocus = true;
+ if (typeof doReturnFocus == 'undefined') doReturnFocus = true;
var action = document.getElementById('action').selectedItem.id;
var makeSiteURL = this._shouldMakeURL(action);
var environment = document.getElementById('environment').selectedItem;
document.getElementById('php4branch').disabled = (action != 'go-gitweb');
document.getElementById('viewcontent').disabled = (action != 'go-gitweb');
document.getElementById('environment').disabled = (action == 'go-gitweb' || action == 'go-bugzilla');
+ document.getElementById('action-other').disabled = (action != 'go-other');
+ if (action == 'go-other' && !this._autoChange) {
+ document.getElementById('action-other').focus();
+ doReturnFocus = false;
+ }
}
document.getElementById('php4site').disabled = (!makeSiteURL || action == 'go-pdolog' || action == 'go-gitweb')
|| (environment && environment.id == 'live');
// read options
env = document.getElementById('environment').selectedItem.id;
sitetype = document.getElementById('sitetype').selectedItem.id;
- action = document.getElementById('action').selectedItem.id;
+ action = this._getCurAction().id;
php4 = document.getElementById('php4site').checked;
if (env == 'othertest') {
env = 'test';
}
} else {
// determind action
- var cur_action = document.getElementById('action').selectedItem;
+ var cur_action = this._getCurAction();
// lock action and environment for these actions
switch (cur_action.id) {
case 'go-content-id':
case 'go-userid':
case 'go-username':
+ case 'go-r7program':
case 'go-bugzilla':
case 'go-registry':
auto_action = cur_action.id;
branch = auto_branch;
document.getElementById('subdomain').value=branch;
document.getElementById('sitetype').selectedItem=document.getElementById(sitetype);
- document.getElementById('action').selectedItem=document.getElementById(action);
+ this._setCurAction(document.getElementById(action));
document.getElementById('php4site').checked = php4;
this._autoChange = false;
}
case 'go-content-id':
case 'go-ttv-page':
case 'go-userid':
+ case 'go-r7program':
case 'go-bugzilla':
// find longest id in entered url
var max_len = 0;
// Just assume a username was entered
uri = '/opslag.php?username=' + escape(shorturl);
break;
+ case 'go-r7program':
+ // Lookup R7 using longest id entered
+ uri = '/tool/r7/?1=' + longest_id;
+ break;
case 'go-bugzilla':
// Use longest_id as bugzilla number
uri = '/show_bug.cgi?format=multiple&id=' + longest_id;
}
this._autoChange = true;
- document.getElementById('action').selectedItem = document.getElementById(action);
+ this._setCurAction(document.getElementById(action));
document.getElementById('shorturl').value = url;
this._autoChange = false;
<radio id="go-node" label="&quickbox.nodeid;" accesskey="&quickbox.nodeid.accesskey;"/>
<radio id="go-content-id" label="&quickbox.contentid;" accesskey="&quickbox.contentid.accesskey;"/>
<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;"/>
<radio id="go-registry" label="&quickbox.registry;" accesskey="&quickbox.registry.accesskey;"/>
+ <radio id="go-other" label="&quickbox.other;" accesskey="&quickbox.other.accesskey;"/>
+ <menulist id="action-other" disabled="true">
+ <menupopup>
+ <menuitem id="go-userid" label="&quickbox.userid;" accesskey="&quickbox.userid.accesskey;"/>
+ <menuitem id="go-username" label="&quickbox.username;" accesskey="&quickbox.username.accesskey;"/>
+ <menuitem id="go-r7program" label="&quickbox.r7program;" accesskey="&quickbox.r7program.accesskey;"/>
+ </menupopup>
+ </menulist>
</groupbox>
</hbox>
</radiogroup>
// Keyboard shortcuts
// . = Prompttest
// 2 = Back from i2
+// 7 = Lookup R7 video clip
// A = Template
// B = Robot
// C = Gitweb
_reg_php: /^(.*\.php)/,
_reg_nodeid: /([0-9]{2,})/g,
_reg_i2files: /\/([0-9]+)-/,
+ _reg_r7program: /-([0-9]+)\//,
_reg_fromgitweb: /^https?:\/\/flimmer\.tv2\.dk\/git\/\?p=([^/]+)\.tv2\.dk\.git.*(?:f=(webroot|robot|opdatering|template)([^;&]*))/,
_reg_fromi2if: /^\/(tango\/(entry|requeue|dynamic)|tool\/pdo_log\/frameset)\.php.*?(\?|&)url=([^&]+)/,
_reg_cutdomain: /^(.*)\.tv2\.dk$/,
}
}
+ // Sputnik R7 program links
+ if (tv2_sitename == 'sputnik') {
+ var programId = this._reg_r7program.exec(tv2_uriOnly);
+ if (programId) {
+ skip_treenodes = true;
+ links.push(new this.TV2LinkSplit());
+ links.push(new this.TV2LinkWithLabel('r7program', TV2Util.getStr('lookupR7Program') + ' ' + programId[1],
+ i2link +
+ '/tool/r7/?1='+programId[1],
+ TV2Util.getStr('lookupR7Program.accesskey')
+ ));
+ }
+ }
+
// Try to extract node id and add links to the node tool
if (!skip_treenodes) {
var i2node = i2link + '/tool/node/?id=';
<!ENTITY quickbox.ttvpage "Slå op som TTV side i I2">
<!ENTITY quickbox.ttvpage.accesskey "v">
-<!ENTITY quickbox.username "Slå op som Brugernavn">
-<!ENTITY quickbox.username.accesskey "f">
-
-<!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.registry "Slå op som Registry namespace">
<!ENTITY quickbox.registry.accesskey "1">
+<!ENTITY quickbox.other "Flere muligheder:">
+<!ENTITY quickbox.other.accesskey "f">
+
+<!-- free key: j -->
+
+<!ENTITY quickbox.username "Slå op som Brugernavn">
+<!ENTITY quickbox.username.accesskey "b">
+
+<!ENTITY quickbox.userid "Slå op som Bruger ID">
+<!ENTITY quickbox.userid.accesskey "i">
+
+<!ENTITY quickbox.r7program "Slå op som R7 Program">
+<!ENTITY quickbox.r7program.accesskey "r">
+
<!ENTITY quickbox.openin "Åbn i">
<!ENTITY quickbox.openin.current "nuværende vindue">
<!ENTITY quickbox.openin.current.accesskey "m">
lookupContent.type=type
lookupContent.accesskey=k
+lookupR7Program=Åbn R7 Program ID
+lookupR7Program.accesskey=7
+
lookupTreeNode=Åbn I2 node med ID
lookupTreeNode.accesskey=n
notTV2Site=Ikke på et tv2.dk site
<!ENTITY quickbox.ttvpage "Lookup as TTV Page">
<!ENTITY quickbox.ttvpage.accesskey "v">
-<!ENTITY quickbox.username "Lookup as Username">
-<!ENTITY quickbox.username.accesskey "f">
-
-<!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.registry "Lookup as Registry namespace">
<!ENTITY quickbox.registry.accesskey "1">
+<!ENTITY quickbox.other "Other action:">
+<!ENTITY quickbox.other.accesskey "f">
+
+<!-- free key: j -->
+
+<!ENTITY quickbox.username "Lookup as Username">
+<!ENTITY quickbox.username.accesskey "u">
+
+<!ENTITY quickbox.userid "Lookup as User ID">
+<!ENTITY quickbox.userid.accesskey "i">
+
+<!ENTITY quickbox.r7program "Lookup as R7 Program">
+<!ENTITY quickbox.r7program.accesskey "r">
+
<!ENTITY quickbox.openin "Open in">
<!ENTITY quickbox.openin.current "current window">
<!ENTITY quickbox.openin.current.accesskey "k">
lookupContent.type=type
lookupContent.accesskey=k
+lookupR7Program=Lookup R7 Program ID
+lookupR7Program.accesskey=7
+
lookupTreeNode=Lookup tree node with ID
lookupTreeNode.accesskey=n
notTV2Site=Not a tv2.dk site
-0.13.7
+0.13.8
\ No newline at end of file
<li>Returnér til tilhørende url fra følgende interfaces:<br/>
PDO_Log, Tango Query, Tango Requeue og Dynamic Version.</li>
</ul>
+ <h3>Feature liste på sputnik:</h3>
+ <ul>
+ <li>R7_Program Id'er genkendes og det tilbydes at slå disse op i I2.</li>
+ </ul>
<h3>Generelle links</h3>
<ul>
<li>tv2.dk (hvis ikke allerede på en tv2.dk side).</li>
<li>Genkender URL angivet som parameter i fleste i2-interfaces</li>
<li>Ved GitWeb 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å R7 programmer op i I2 via deres R7 Program id</li>
<li>Slå Bugzilla opgave op</li>
<li>Slå et I2 Regsitry namespace op i node-værktøjet</li>
<li>Eksempler på GIT opslags tricks:</li>
</head>
<body>
<h1>What's new:</h1>
+ <li>0.13.8</li>
+ <ul>
+ <li>Genkender nu R7 id'er på Sputnik og kan slå disse op.</li>
+ </ul>
<li>0.13.6</li>
<ul>
<li>Tilføjede support for branches/subdomains, e.x. vmhf2010.query.php5.stage.tv2.dk</li>