Advertisement
Guest User

PROBA

a guest
Dec 5th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.43 KB | None | 0 0
  1. UI.InfoMessage("A faluidat tudod áttekintei",3000,false);
  2.  
  3. function replace(){
  4. $("#co_table").find("tr").each(function(){
  5. var villageID = $("#villages_list").find("tr").find(":checked + span").find("a:eq(0)").attr("href").match(/\d+/g)[1];
  6. var villagID = $("#co_table").find("tr:last").find("td:eq(0)").find("a:eq(0)").attr("href").match(/\d+/g)[1];
  7. var $this = $(this);
  8. var t = $this.html();
  9. $this.html(t.replace(""+villagID+"",""+villageID+""));
  10. });
  11. }
  12. function SPopupOpen(){
  13. $(".overlay").removeClass("hidden");
  14. setTimeout(function(){$(".overlay").addClass("show");},300);
  15. $("#tpop").hide();
  16. }
  17. function HPopupClose(){
  18. $(".overlay").removeClass("show");
  19. setTimeout(function(){$(".overlay").addClass("hidden");},300);
  20. $("#tpop").show();
  21. }
  22. function PopupMinimize(){
  23. var a = $(".overlay").width();
  24. $(".overlay").find("#inline_popup_main").slideToggle();
  25. $(".overlay").width(a);
  26. }
  27. function clk(e){
  28. $(e).next("a")[0].click();
  29. }
  30.  
  31. <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&amp;screen=groups&amp;ajax=load_villages_from_group&amp;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">
  32. <tbody>
  33. <tr>
  34. <th class="group_label" colspan="2">Falu</th>
  35. </tr>
  36. </tbody>
  37. </table>
  38.  
  39. <div id="group_popup_content_container">
  40. <table id="group_table" class="vis" width="100%" cellpadding="5" cellspacing="0">
  41. <tbody>
  42. <tr>
  43. <td id="selected_popup_village" class="selected">
  44. <a href="javascript:selectVillage(8508, 0)">Zion City</a>
  45. </td>
  46. <td style="font-weight:bold; width:100px; text-align:right" class="selected">
  47. 421|478
  48. </td>
  49. </tr>
  50. </tbody>
  51. </table>
  52. </div>
  53. </div></div></div>
  54. </div>\
  55. </div></div></div></div></div>');
  56. UI.Draggable($(".overlay"));
  57. $(".overlay").find("#inline_popup_main").css("padding","0px");
  58. $.ajax({
  59. url:"/game.php?screen=overview_villages",
  60. datatype:"html",
  61. cache:true,
  62. success:function(data){
  63. $("#co_table tbody").append($(data).find("#production_table").find("td:nth-child(1)"));
  64. $("#co_table tbody").find("td").wrap("<tr></tr>");
  65. $("#co_table tbody").find("tr").each(function(){
  66. var $this = $(this);
  67. var t = $this.html();
  68. $this.html(t.replace(/screen=overview/g,"target=012345&screen=overview"));
  69. });
  70. $("#co_table tbody").find("a").attr("target","_blank");
  71. $("#co_table tbody").find("tr").find("td:eq(0)").prepend('<input name="clk" type="radio" onclick="clk()">');
  72. $("#co_table").after('<br><br><table class="vis bbcodetable" align="center"><tbody><tr>\</td>\
  73. </tr></tbody></table>');
  74. $("#co_table").find("tr").css({"width":"952px","height":"20px"});
  75. }
  76. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement