Menü aufrufen
Toggle preferences menu
Persönliches Menü aufrufen
Nicht angemeldet
Ihre IP-Adresse wird öffentlich sichtbar sein, wenn Sie Änderungen vornehmen.

Benutzer:Col. o'neill/DHD.js: Unterschied zwischen den Versionen

aus Stargate Wiki, dem deutschsprachigen Stargate-Lexikon
KKeine Bearbeitungszusammenfassung
K gewählte Symbole hintereinander in gleicher Größe anzeigen, SGU-DHD-Koordinaten erst ermitteln wenn das DHD sichtbar ist
Zeile 4: Zeile 4:
  * if(mw.config.get('wgPageName')==="Benutzer:Col._o'neill/Testseite2"){$('head').append($('<script>').attr('src','http://stargate-wiki.de/w/index.php?title=Benutzer:Col._o%27neill/DHD.js&action=raw&ctype=text/javascript').attr('type','text/javascript'));}
  * if(mw.config.get('wgPageName')==="Benutzer:Col._o'neill/Testseite2"){$('head').append($('<script>').attr('src','http://stargate-wiki.de/w/index.php?title=Benutzer:Col._o%27neill/DHD.js&action=raw&ctype=text/javascript').attr('type','text/javascript'));}
**/
**/
//TODO: ausgewählte Symbole als tatsächliche Symbole statt Nummern, 8. und 9. Auswahlpunkt erst bei Bedarf sichtbar machen, ausgewählte Symbole bei SGU in Fernbedienungsfeld
//TODO: ausgewählte Symbole bei SGU in Fernbedienungsfeld?
function iLink(l,t){
function iLink(l,t){
return $('<a>').attr('href','http://stargate-wiki.de/wiki/'+encodeURI(l)).attr('title',l).text(t||l);
return $('<a>').attr('href','http://stargate-wiki.de/wiki/'+encodeURI(l)).attr('title',l).text(t||l);
Zeile 76: Zeile 76:
stock: this.stockSG1,
stock: this.stockSG1,
init: function(){
init: function(){
DHD.w=$('#DHDSGU-wheel');
DHD.w.css('cursor','grab');
DHD.cX = DHD.w.offset().left + 220;
DHD.cY = DHD.w.offset().top + 220;
$('.DHDGlyph,.DHDConfirm').css('cursor','pointer');
$('.DHDGlyph,.DHDConfirm').css('cursor','pointer');
$('#DHDResult').text('Du hast noch kein Symbol angewählt.');
$('#DHDResult').text('Du hast noch kein Symbol angewählt.');
Zeile 91: Zeile 87:
$('#DHDSGA,#DHDSGU').css('display','none');
$('#DHDSGA,#DHDSGU').css('display','none');
$('#DHDSG1').css('display','block');
$('#DHDSG1').css('display','block');
DHD.w.off();
if(DHD.w) DHD.w.off();
$('#DHDSGU').off('mouseup').off('mousemove');
$('#DHDSGU').off('mouseup').off('mousemove');
DHD.address=0;
DHD.address=0;
DHD.address=[];
DHD.address=[];
DHD.dialing=false;
DHD.dialing=false;
$('#DHDResList li').text('');
$('#DHDResList').empty();
$('#DHDResList').css('display','none');
$('#DHDResult').text('Du hast noch kein Symbol angewählt.');
$('#DHDResult').text('Du hast noch kein Symbol angewählt.');
$('#DHDReset').css('display','none');
$('#DHDReset').css('display','none');
Zeile 106: Zeile 101:
$('#DHDSG1,#DHDSGU').css('display','none');
$('#DHDSG1,#DHDSGU').css('display','none');
$('#DHDSGA').css('display','block');
$('#DHDSGA').css('display','block');
DHD.w.off();
if(DHD.w) DHD.w.off();
$('#DHDSGU').off('mouseup').off('mousemove');
$('#DHDSGU').off('mouseup').off('mousemove');
DHD.counter=0;
DHD.counter=0;
DHD.address=[];
DHD.address=[];
DHD.dialing=false;
DHD.dialing=false;
$('#DHDResList li').text('');
$('#DHDResList').empty();
$('#DHDResList').css('display','none');
$('#DHDResult').text('Du hast noch kein Symbol angewählt.');
$('#DHDResult').text('Du hast noch kein Symbol angewählt.');
$('#DHDReset').css('display','none');
$('#DHDReset').css('display','none');
Zeile 121: Zeile 115:
$('#DHDSG1,#DHDSGA').css('display','none');
$('#DHDSG1,#DHDSGA').css('display','none');
$('#DHDSGU').css('display','block');
$('#DHDSGU').css('display','block');
if(!DHD.w){
DHD.w=$('#DHDSGU-wheel');
DHD.w.css('cursor','grab');
DHD.cX = DHD.w.offset().left + 220;
DHD.cY = DHD.w.offset().top + 220;
}
DHD.w.on('mousedown', function(e){
DHD.w.on('mousedown', function(e){
    DHD.dragging = true;
    DHD.dragging = true;
Zeile 149: Zeile 149:
DHD.address=[];
DHD.address=[];
DHD.dialing=false;
DHD.dialing=false;
$('#DHDResList li').text('');
$('#DHDResList').empty();
$('#DHDResList').css('display','none');
$('#DHDResult').text('Du hast noch kein Symbol angewählt.');
$('#DHDResult').text('Du hast noch kein Symbol angewählt.');
$('#DHDReset').css('display','none');
$('#DHDReset').css('display','none');
Zeile 165: Zeile 164:
if(!DHD.dialing){
if(!DHD.dialing){
$('#DHDResult').text('Du musst sieben bis neun Symbole anwählen und dann mit der Mittelscheibe bestätigen. Ausgewählte Symbole:');
$('#DHDResult').text('Du musst sieben bis neun Symbole anwählen und dann mit der Mittelscheibe bestätigen. Ausgewählte Symbole:');
$('#DHDResList').css('display','block');
$('#DHDReset').css('display','inline');
$('#DHDReset').css('display','inline');
$('#DHDResList li').text('');
DHD.dialing=true;
DHD.dialing=true;
}
}
$(this).children("img").clone().appendTo('#DHDResList li:nth-child('+DHD.counter+')');
$(this).children("img").clone().removeAttr('width').attr('height', '35px').css({'width': '', 'height': '35px'}).appendTo('#DHDResList');
//$('#DHDResList li:nth-child('+DHD.counter+')').text(gNum+' ');
DHD.address.push(gNum);
DHD.address.push(gNum);
}
}
Zeile 205: Zeile 201:
DHD.address=[];
DHD.address=[];
DHD.dialing=false;
DHD.dialing=false;
$('#DHDResList li').text('');
$('#DHDResList').empty();
$('#DHDResList').css('display','none');
$('#DHDResult').text('Du hast noch kein Symbol angewählt.');
$('#DHDResult').text('Du hast noch kein Symbol angewählt.');
$('#DHDReset').css('display','none');
$('#DHDReset').css('display','none');