Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UI.InfoMessage("A faluidat tudod áttekintei",3000,false);
- function replace(){
- $("#co_table").find("tr").each(function(){
- var villageID = $("#villages_list").find("tr").find(":checked + span").find("a:eq(0)").attr("href").match(/\d+/g)[1];
- var villagID = $("#co_table").find("tr:last").find("td:eq(0)").find("a:eq(0)").attr("href").match(/\d+/g)[1];
- var $this = $(this);
- var t = $this.html();
- $this.html(t.replace(""+villagID+"",""+villageID+""));
- });
- }
- function SPopupOpen(){
- $(".overlay").removeClass("hidden");
- setTimeout(function(){$(".overlay").addClass("show");},300);
- $("#tpop").hide();
- }
- function HPopupClose(){
- $(".overlay").removeClass("show");
- setTimeout(function(){$(".overlay").addClass("hidden");},300);
- $("#tpop").show();
- }
- function PopupMinimize(){
- var a = $(".overlay").width();
- $(".overlay").find("#inline_popup_main").slideToggle();
- $(".overlay").width(a);
- }
- function clk(e){
- $(e).next("a")[0].click();
- }
- <div id="group_popup" class="popup_style ui-draggable" style="width: 320px; position: fixed; top: 158px; left: 29px; display: block;"><div id="group_popup_menu" class="popup_menu">Falu csoportok<a id="closelink_group_popup" href="#">X</a></div><div id="group_popup_content" class="popup_content" style="height: 380px; overflow-y: auto;"><form id="select_group_box" action="/game.php?village=8508&screen=groups&ajax=load_villages_from_group&mode=overview" method="POST"><input type="hidden" name="mode" value="overview"><p style="margin: 0 0 10px 0; font-weight: bold;">Csoport:<select id="group_id" name="group_id" style="margin-left: 3px;"><option value="12388">Nuke</option><option value="12389">Bejövő támadás</option><option value="12390">Nemest tartalmaz</option><option value="0" selected="selected">összes</option></select></p></form><div id="group_list_content" style="overflow: auto; height: 340px;"> <table id="group_table" class="vis" width="100%" cellpadding="5" cellspacing="0">
- <tbody>
- <tr>
- <th class="group_label" colspan="2">Falu</th>
- </tr>
- </tbody>
- </table>
- <div id="group_popup_content_container">
- <table id="group_table" class="vis" width="100%" cellpadding="5" cellspacing="0">
- <tbody>
- <tr>
- <td id="selected_popup_village" class="selected">
- <a href="javascript:selectVillage(8508, 0)">Zion City</a>
- </td>
- <td style="font-weight:bold; width:100px; text-align:right" class="selected">
- 421|478
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div></div></div>
- </div>\
- </div></div></div></div></div>');
- UI.Draggable($(".overlay"));
- $(".overlay").find("#inline_popup_main").css("padding","0px");
- $.ajax({
- url:"/game.php?screen=overview_villages",
- datatype:"html",
- cache:true,
- success:function(data){
- $("#co_table tbody").append($(data).find("#production_table").find("td:nth-child(1)"));
- $("#co_table tbody").find("td").wrap("<tr></tr>");
- $("#co_table tbody").find("tr").each(function(){
- var $this = $(this);
- var t = $this.html();
- $this.html(t.replace(/screen=overview/g,"target=012345&screen=overview"));
- });
- $("#co_table tbody").find("a").attr("target","_blank");
- $("#co_table tbody").find("tr").find("td:eq(0)").prepend('<input name="clk" type="radio" onclick="clk()">');
- $("#co_table").after('<br><br><table class="vis bbcodetable" align="center"><tbody><tr>\</td>\
- </tr></tbody></table>');
- $("#co_table").find("tr").css({"width":"952px","height":"20px"});
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement