Arf je nage avec le js voici mon code changer: {block name="title" prepend}{$LNG.lm_fleet}{/block} {block name="content"} <div id="page"> <div id="content"> <div id="ally_content" class="conteiner">
<div class="gray_stripe"> <a href="game.php?page=reduceresources" class="fleet_reduce ico_reduceresources tooltip" data-tooltip-content="Récupérer Ressources{*{$LNG.HarRes}*}"></a> <a href="game.php?page=reducefleet" class="fleet_reduce ico_reducefleet tooltip" data-tooltip-content="Récupérer Flotte"></a> <span style="float:right;color:#6ccdce;"><span class="totalFleetPoints">0</span> Points Flottes Séléctionner</span> </div> {if !empty($acsData)} {include file="shared.fleetTable.acsTable.tpl"} {/if} <form action="?page=fleetStep1" method="post"> <input type="hidden" name="galaxy" value="{$targetGalaxy}"> <input type="hidden" name="system" value="{$targetSystem}"> <input type="hidden" name="planet" value="{$targetPlanet}"> <input type="hidden" name="type" value="{$targetType}"> <input type="hidden" name="target_mission" value="{$targetMission}"> <table class="tablesorter ally_ranks"> <tr> <th colspan="3" class="gray_stripe">Vaisseaux de Combats</th> <th style="padding:0;" class="gray_stripe"> <a href="javascript:noShipsBatle();" class="fl_min_ships">Min</a> <a href="javascript:maxShipsBatle();" class="fl_max_ships">Max</a> </th> </tr> {foreach $FleetsOnPlanet as $FleetRow} <tr class="fl_fllets_rows"> <td class="fl_fllets_rows_img_td"><a href="#" onclick="return Dialog.info({$FleetRow.id})"><img src="./styles/theme/gow/gebaeude/{$FleetRow.id}.gif" alt="{$LNG.tech.{$FleetRow.id}}" /></a></td> <td> <span class="tooltip" {if $FleetRow.speed != 0}data-tooltip-content="Vitesse: {pretty_number($FleetRow.speed)}"{/if} style="cursor:help;">{$LNG.tech.{$FleetRow.id}}</span></td> <td id="ship{$FleetRow.id}_value">{$FleetRow.count|number}</td> <td class="fl_fllets_rows_input_td"> <div class="fl_fllets_rows_input_div"> <div onclick="minShip('ship{$FleetRow.id}');" class="fl_fllets_rows_input_min">Min</div> <div onclick="maxShip('ship{$FleetRow.id}');" class="fl_fllets_rows_input_max">Max</div> <input class="countdots fl_fllets_rows_input_countdots" name="ship{$FleetRow.id}" id="ship{$FleetRow.id}_input" value="0"> </div> </td> </tr> {/foreach} <tr> <th colspan="3" class="gray_stripe">Transporteurs</th> <th style="padding:0;" class="gray_stripe"> <a href="javascript:noShipsTransports();" class="fl_min_ships">Min</a> <a href="javascript:maxShipsTransports();" class="fl_max_ships">Max</a> </th> </tr> {foreach $FleetsOnPlanetTransport as $FleetRow} <tr class="fl_fllets_rows"> <td class="fl_fllets_rows_img_td"><a href="#" onclick="return Dialog.info({$FleetRow.id})"><img src="./styles/theme/gow/gebaeude/{$FleetRow.id}.gif" alt="{$LNG.tech.{$FleetRow.id}}" /></a></td> <td> <span class="tooltip" {if $FleetRow.speed != 0}data-tooltip-content="Vitesse: {pretty_number($FleetRow.speed)}"{/if} style="cursor:help;">{$LNG.tech.{$FleetRow.id}}</span></td> <td id="ship{$FleetRow.id}_value">{$FleetRow.count|number}</td> <td class="fl_fllets_rows_input_td"> <div class="fl_fllets_rows_input_div"> <div onclick="minShip('ship{$FleetRow.id}');" class="fl_fllets_rows_input_min">Min</div> <div onclick="maxShip('ship{$FleetRow.id}');" class="fl_fllets_rows_input_max">Max</div> <input class="countdots fl_fllets_rows_input_countdots" name="ship{$FleetRow.id}" id="ship{$FleetRow.id}_input" value="0"> </div> </td> </tr> {/foreach} <tr> <th colspan="3" class="gray_stripe">Recycleurs</th> <th style="padding:0;" class="gray_stripe"> <a href="javascript:noShipsProcessors();" class="fl_min_ships">Min</a> <a href="javascript:maxShipsProcessors();" class="fl_max_ships">Max</a> </th> </tr> {foreach $FleetsOnPlanetProccesors as $FleetRow} <tr class="fl_fllets_rows"> <td class="fl_fllets_rows_img_td"><a href="#" onclick="return Dialog.info({$FleetRow.id})"><img src="./styles/theme/gow/gebaeude/{$FleetRow.id}.gif" alt="{$LNG.tech.{$FleetRow.id}}" /></a></td> <td> <span class="tooltip" {if $FleetRow.speed != 0}data-tooltip-content="Vitesse: {pretty_number($FleetRow.speed)}"{/if} style="cursor:help;">{$LNG.tech.{$FleetRow.id}}</span></td> <td id="ship{$FleetRow.id}_value">{$FleetRow.count|number}</td> <td class="fl_fllets_rows_input_td"> <div class="fl_fllets_rows_input_div"> <div onclick="minShip('ship{$FleetRow.id}');" class="fl_fllets_rows_input_min">Min</div> <div onclick="maxShip('ship{$FleetRow.id}');" class="fl_fllets_rows_input_max">Max</div> <input class="countdots fl_fllets_rows_input_countdots" name="ship{$FleetRow.id}" id="ship{$FleetRow.id}_input" value="0"> </div> </td> </tr> {/foreach} <tr> <th colspan="3" class="gray_stripe">Spécial</th> <th style="padding:0;" class="gray_stripe"> <a href="javascript:noShipsSpecial();" class="fl_min_ships">Min</a> <a href="javascript:maxShipsSpecial();" class="fl_max_ships">Max</a> </th> </tr> {foreach $FleetsOnPlanetSpecial as $FleetRow} <tr class="fl_fllets_rows"> <td class="fl_fllets_rows_img_td"><a href="#" onclick="return Dialog.info({$FleetRow.id})"><img src="./styles/theme/gow/gebaeude/{$FleetRow.id}.gif" alt="{$LNG.tech.{$FleetRow.id}}" /></a></td> <td> <span class="tooltip" {if $FleetRow.speed != 0}data-tooltip-content="Vitesse: {pretty_number($FleetRow.speed)}"{/if} style="cursor:help;">{$LNG.tech.{$FleetRow.id}}</span></td> <td id="ship{$FleetRow.id}_value">{$FleetRow.count|number}</td> <td class="fl_fllets_rows_input_td"> <div class="fl_fllets_rows_input_div"> <div onclick="minShip('ship{$FleetRow.id}');" class="fl_fllets_rows_input_min">Min</div> <div onclick="maxShip('ship{$FleetRow.id}');" class="fl_fllets_rows_input_max">Max</div> <input class="countdots fl_fllets_rows_input_countdots" name="ship{$FleetRow.id}" id="ship{$FleetRow.id}_input" value="0"> </div> </td> </tr> {/foreach} <tr> <th colspan="2" style="text-align:center;" class="gray_stripe"><a href="javascript:onSave();" style="color:#666;"></a></td> <th colspan="1" style="text-align:center;" class="gray_stripe"><a href="javascript:maxShips();" style="color:#666;">Tous les Vaisseaux</a></td> <th colspan="1" style="text-align:center;" class="gray_stripe"><a href="javascript:noShips();" style="color:#666;">Remise a Zero</a></td> </tr> <tr style="display:none;" id="save"> <td colspan="3" style="text-align:right; color:#CCC;">Indiquez le nom du Groupe</td> <td colspan="1"><input name="save_groop" size="15" maxlength="13" style="width:96%;"></td> </tr> {if $maxFleetSlots != $activeFleetSlots} <tr> <td colspan="4" style="padding:0;"> <input class="fl_bigbtn_go" type="submit" value="{$LNG.fl_continue}"> </td> </tr> {/if} </table> </form> <div class="gray_stripe" style="margin-top:1px;"> {*<div class="transparent" style="text-align:left;float:left;">{$LNG.fl_fleets} {$activeFleetSlots} / {$maxFleetSlots}<font color=blue>|||||</font>{$activeFortSlots} / {$maxFortSlots} Capture<font color=blue>|||||</font>{$activeColoSlots} / {$maxColoSlots} Colonie<font color=blue>|||||</font>{$activeDMSlots} / {$maxDMSlots} Recherche MN<font color=blue>|||||</font>{$activeASSlots} / {$maxASSlots} Astéroide<font color=blue>|||||</font>{$activeExpedition} / {$maxExpedition} {$LNG.fl_expeditions}</div>*} <div class="transparent" style="text-align:center;float:center;">{$activeFleetSlots} / {$maxFleetSlots} {$LNG.fl_fleets}<font color=blue>|||</font>{$activeFortSlots} / {$maxFortSlots} Fort<font color=blue>|||</font>{$activeColoSlots} / {$maxColoSlots} Colo<font color=blue>|||</font>{$activeDMSlots} / {$maxDMSlots} Rech MN<font color=blue>|||</font>{$activeASSlots} / {$maxASSlots} Astéro<font color=blue>|||</font>{$activeExtraSlots} / {$maxExtraSlots} Extraction<font color=blue>|||</font>{$activeExpedition} / {$maxExpedition} {$LNG.fl_expeditions}</div> </div> {* <div class="gray_stripe" style="margin-top:1px;"> <div class="left_part"> <div class="transparent" style="text-align:left;float:left;">{$LNG.fl_fleets} {$activeFleetSlots} / {$maxFleetSlots}<font color=blue>|||||||</font>{$activeFortSlots} / {$maxFortSlots} Capture<font color=blue>|||||||</font>{$activeColoSlots} / {$maxColoSlots} Colonie</div> </div> <div class="right_part"> <div class="transparent" style="text-align:right;float:right;">{$activeExpedition} / {$maxExpedition} {$LNG.fl_expeditions}</div> <th colspan="2" style="text-align:left;" class="gray_stripe">{$activeDMSlots} / {$maxDMSlots} Rech. MN<font color=blue>||</font>{$activeASSlots} / {$maxASSlots} Astéroide<font color=blue>|</font></td> </div> </div>*} <table class="tablesorter ally_ranks"> <tr> <td>№</td> <td>{$LNG.j}</td> <td>{$LNG.st}</td> <td>{$LNG.wh}</td> <td>{$LNG.ar}</td> <td>{$LNG.whe}</td> <td>{$LNG.re}</td> <td>{$LNG.Re}</td> <td>{$LNG.Or}</td> </tr> {foreach name=FlyingFleets item=FlyingFleetRow from=$FlyingFleetList} <tr> <td>{$smarty.foreach.FlyingFleets.iteration}</td> <td>{$LNG.type_mission.{$FlyingFleetRow.mission}} {if $FlyingFleetRow.state == 1} <br><a title="{$LNG.fl_returning}">{$LNG.fl_r}</a> {else} <br><a title="{$LNG.fl_onway}">{$LNG.fl_a}</a> {/if} </td> <td><a class="tooltip_sticky" data-tooltip-content="<table width='100%'><tr><th colspan='2' style='text-align:center;'>{$LNG.fl_info_detail}</th></tr>{foreach $FlyingFleetRow.FleetList as $shipID => $shipCount}<tr><td class='transparent'>{$LNG.tech.{$shipID}}:</td><td class='transparent'>{$shipCount}</td></tr>{/foreach}</table>">{$FlyingFleetRow.amount}</a></td> <td><a href="game.php?page=galaxy&galaxy={$FlyingFleetRow.startGalaxy}&system={$FlyingFleetRow.startSystem}">[{$FlyingFleetRow.startGalaxy}:{$FlyingFleetRow.startSystem}:{$FlyingFleetRow.startPlanet}]</a></td> <td{if $FlyingFleetRow.state == 0} style="color:lime"{/if}>{$FlyingFleetRow.startTime}</td> <td><a href="game.php?page=galaxy&galaxy={$FlyingFleetRow.endGalaxy}&system={$FlyingFleetRow.endSystem}">[{$FlyingFleetRow.endGalaxy}:{$FlyingFleetRow.endSystem}:{$FlyingFleetRow.endPlanet}]</a></td> {if $FlyingFleetRow.mission == 4 && $FlyingFleetRow.state == 0} <td>-</td> {else} <td{if $FlyingFleetRow.state != 0} style="color:lime"{/if}>{$FlyingFleetRow.endTime}</td> {/if} <td id="fleettime_{$smarty.foreach.FlyingFleets.iteration}" class="fleets" data-fleet-end-time="{$FlyingFleetRow.returntime}" data-fleet-time="{$FlyingFleetRow.resttime}">{pretty_fly_time({$FlyingFleetRow.resttime})}</td> <td> {if !$isVacation && $FlyingFleetRow.state != 1} <form action="game.php?page=fleetTable&action=sendfleetback" method="post"> <input name="fleetID" value="{$FlyingFleetRow.id}" type="hidden"> <input class="fl_btn_table_fleets_order" value="{$LNG.fl_send_back}" type="submit"> </form> {if $FlyingFleetRow.mission == 1} <form action="game.php?page=fleetTable&action=acs" method="post"> <input name="fleetID" value="{$FlyingFleetRow.id}" type="hidden"> <input class="fl_btn_table_fleets_order" value="{$LNG.fl_acs}" type="submit"> </form> {/if} {else} - {/if} </td> </tr> {foreachelse} <tr> <td>-</td> <td>-</td> <td>-</td> <td>-</td> <td>-</td> <td>-</td> <td>-</td> <td>-</td> <td>-</td> </tr> {/foreach} </table> <div class="gray_stripe" style="border-bottom:0;"> {*<div class="gray_stripe" style="border-style: solid;">*} <span style="cursor:help; color:#6ccdce" class="tooltip" data-tooltip-content=" <table> <tr> <th style='text-align:right; padding-right:12px;'>{$LNG.fl_bonus_attack}</th> {*<th style='border-style: solid;border-color: #6ccdce;text-align:right; padding-right:12px;'>{$LNG.fl_bonus_attack}</th>*} <td>+{$bonusAttack} %</td> </tr> <tr> <th style='text-align:right; padding-right:12px;'>{$LNG.fl_bonus_shield}</th> <td>+{$bonusShield} %</td> </tr> <tr> <th style='text-align:right; padding-right:12px;'>{$LNG.fl_bonus_defensive}</th> <td>+{$bonusDefensive} %</td> </tr> <tr> <th style='text-align:right; padding-right:12px;'>{$LNG.tech.115}</th> <td>+{$bonusCombustion} %</td> </tr> <tr> <th style='text-align:right; padding-right:12px;'>{$LNG.tech.117}</th> <td>+{$bonusImpulse} %</td> </tr> <tr> <th style='text-align:right; padding-right:12px;'>{$LNG.tech.118}</th> <td>+{$bonusHyperspace} %</td> </tr> <tr> <th style='text-align:right; padding-right:12px;'>Vitesse de Flotte</th> <td>+{$bonusFleetSpeed} %</td> </tr> </table> ">{$LNG.ReTe}</span> <span style="float:right;color:#6ccdce;"><span class="totalFleetPoints">0</span> Points Flotte Séléctionner</span> </div> </div> {**} {foreach name=FlyingFleets item=FlyingFleetRow from=$FlyingFleetList} <style type="text/css"> #progressbar_{$FlyingFleetRow.id} { position:relative; width:420px; padding:0 0 0 0; background-image:url("styles/images/pggray.png"); height:26px; border:1px solid #CCC; -moz-border-radius:5px; border-radius:5px; } #indicator_{$FlyingFleetRow.id} { position:absolute; right:0; background-image:url("styles/images/pggreen.gif"); background-repeat: no-repeat; height:20px; width:20px; top:5px; margin:0 0 0 0; } #indicatorretour_{$FlyingFleetRow.id} { position:absolute; right:0; background-image:url("styles/images/pggreenr.gif"); background-repeat: no-repeat; height:20px; width:20px; top:5px; margin:0 0 0 0; }
</style> <div id="pwidget_{$FlyingFleetRow.id}"> <div id="progressbar_{$FlyingFleetRow.id}"> <div id="indicator_{$FlyingFleetRow.id}"></div> <div id="indicatorretour_{$FlyingFleetRow.id}"></div> {* <div id="pwidget"> <div id="progressbar"> <div id="indicator"></div> <div id="indicatorretour"></div> *} </div> </div> <div id="progressnum">{$FlyingFleetRow.id}-{$FlyingFleetRow.volTimeA} Temps reel {$FlyingFleetRow.TimeReel} Tr {$FlyingFleetRow.volstartTime} {$FlyingFleetRow.volTimeR} temps statio: {$FlyingFleetRow.volstatioTime} mission: {$FlyingFleetRow.mission} {$FlyingFleetRow.Annuler}</div>
<input hidden type="text" value="5" id="Ttraj" /> <input hidden type="text" value="5" id="TtrajR" /> <input hidden type="text" value="5" id="TtrajA" /> <input hidden type="text" value="1000" id="tempo" /> <input hidden type="text" value="3" id="Testatio" />
<script type="text/javascript"> //caractéristiques var maxprogress = 420; var imgwidth = 20; var distparcourue = maxprogress - imgwidth; //taille du fond - taille img en mouvement var distparcourue2 = maxprogress*2 - imgwidth; //taille du fond - taille img en mouvement
//variables fonctionnelles //var tempo = 1000; // variable du temps total du trajet aller //var Ttraj = 10; var Ttraj = {$FlyingFleetRow.volstartTime}; var TtrajR = {$FlyingFleetRow.volTimeR}; var TtrajA = {$FlyingFleetRow.volTimeAnnuler}; // variable du temps de stationnement var Testatio = {$FlyingFleetRow.volstatioTime}; var progressnum = document.getElementById("progressnum_{$FlyingFleetRow.id}"); var indicator = document.getElementById("indicator_{$FlyingFleetRow.id}"); var indicatorretour = document.getElementById("indicatorretour_{$FlyingFleetRow.id}"); //var temporisation = document.getElementById('tempo').value; var temporisation = 1000; var volTimeA = {$FlyingFleetRow.volTimeA}; var TimeReel = {$FlyingFleetRow.TimeReel}; var Annuler = {$FlyingFleetRow.Annuler};
//initialisations
var HandleA = 0; var HandleR = 0; var HandleS = 0; var tstatio = 0; // variable du temps(heure temps réels) var actualprogress = {$FlyingFleetRow.volTime} +1; var actualprogressR = {$FlyingFleetRow.volTimeR}; indicatorretour.style.visibility="hidden"; indicator.style.visibility="hidden"; {* //HandleA = setInterval(aller, temporisation); //HandleA = fleetAnimation(); //HandleS = setInterval(statio, temporisation); //HandleR = setInterval(retour, temporisation); //HandleA = setInterval(aller_retour, temporisation); *}
if ((volTimeA + Testatio) < TimeReel) { window.onload= function() {
retourbis();
HandleR = setInterval( retourbis, temporisation); }; } else { if (Testatio > 0) { window.onload= function() {
statio();
HandleS = setInterval( statio, temporisation); }; } else { if ({$FlyingFleetRow.mission} == 4) { window.onload= function() {
aller();
HandleA = setInterval( aller, temporisation); }; } else { window.onload= function() {
aller_retour();
HandleA = setInterval( aller_retour, temporisation); }; } } }
function statio() { tempsfinal = document.getElementById('Ttraj').value = Ttraj; tempsstatio = document.getElementById('Testatio').value = Testatio; indicator.style.visibility="visible"; if(actualprogress > tempsfinal) { tstatio = 1; actualprogress = 0; } if(tstatio){ if (tstatio > tempsstatio){ indicator.style.visibility="hidden"; clearInterval(HandleS); HandleR = setInterval(retour, temporisation); return; } tstatio += 1; }else{ indicator_left = actualprogress * distparcourue / tempsfinal; indicator.style.left = indicator_left + "px"; actualprogress += 1; } }
function aller() { tempsfinal = document.getElementById('Ttraj').value = Ttraj; indicator.style.visibility="visible"; if(actualprogress > tempsfinal) { actualprogress = 0; indicator.style.visibility="hidden"; clearInterval(HandleA); return; } indicator_left = actualprogress * distparcourue / tempsfinal; indicator.style.left = indicator_left + "px"; actualprogress += 1; } function aller_retour() { tempsfinal = document.getElementById('Ttraj').value = Ttraj; if(actualprogress > tempsfinal) { actualprogress = 0; clearInterval(HandleA); HandleR = setInterval(retour, temporisation); return; } indicator.style.visibility="visible"; indicator_left = actualprogress * distparcourue / tempsfinal; indicator.style.left = indicator_left + "px"; actualprogress += 1; }
function retour() { tempsfinal = document.getElementById('Ttraj').value = Ttraj; indicator.style.visibility="hidden"; indicatorretour.style.visibility="visible"; if(actualprogress > tempsfinal){ actualprogress = 0; indicatorretour.style.visibility="hidden"; clearInterval(HandleR); return; } indicatorretour_left = distparcourue-(actualprogress*distparcourue/tempsfinal); indicatorretour.style.left= indicatorretour_left + "px"; actualprogress += 1; }
function retourbis() { tempsfinal = document.getElementById('TtrajR').value = TtrajR; indicator.style.visibility="hidden"; indicatorretour.style.visibility="visible"; if(actualprogress > tempsfinal){ actualprogress = 0; indicatorretour.style.visibility="hidden"; clearInterval(HandleR); return; } indicatorretour_left = (distparcourue2) - (actualprogress * distparcourue2 / tempsfinal); indicatorretour.style.left= indicatorretour_left + "px"; actualprogress += 1; }
function retourannuler() { tempsfinal = document.getElementById('TtrajA').value = TtrajA; indicator.style.visibility="hidden"; indicatorretour.style.visibility="visible"; if(actualprogress > tempsfinal){ actualprogress = 0; indicatorretour.style.visibility="hidden"; clearInterval(HandleR); return; } indicatorretour_left = (distparcourue2) - (actualprogress * distparcourue2 / tempsfinal); indicatorretour.style.left= indicatorretour_left + "px"; actualprogress += 1; }
function maFonction() { window.location.reload(true); } time = {$FlyingFleetRow.volstartTime}*1000; setTimeout('maFonction();', time);
</script> {/foreach} {*<script src="scripts/game/fleetVol.js"></script>*} {**} <script type="text/javascript"> fleetGroopShip = []; var pointsPrice = { "ship202":0.4,"ship203":1.2,"ship204":0.4,"ship205":1,"ship206":2.6,"ship207":6.5,"ship208":3,"ship209":1.8,"ship210":0.1,"ship211":10,"ship212":0.25,"ship213":12.1,"ship214":920,"ship215":8,"ship216":220,"ship217":6,"ship218":24000,"ship219":102,"ship220":1600,"ship221":92000,"ship222":45800,"ship223":562.5,"ship224":15,"ship225":60.5,"ship226":540,"ship227":5300,"ship228":10700,"ship229":1.05,"ship230":2775,"ship231":3000 }; </script> </div> </div> <div class="clear"></div> </div>
{/block} {block name="script" append}<script src="scripts/game/fleetTable.js"></script>{/block} peut tu me dire ce qu'il faut que je rajoute dans le js pour que ça soit prit en compte pour chaque flotte stp |