diff --git a/app/Http/Controllers/HighscoreController.php b/app/Http/Controllers/HighscoreController.php index feffc7fa..c00b5c5b 100644 --- a/app/Http/Controllers/HighscoreController.php +++ b/app/Http/Controllers/HighscoreController.php @@ -19,6 +19,8 @@ class HighscoreController extends OGameController */ public function index(Request $request, PlayerService $player) : View { + $this->setBodyId('highscore'); + return view('ingame.highscore.index')->with([ 'initialContent' => $this->ajax($request, $player), ]); diff --git a/app/Services/HighscoreService.php b/app/Services/HighscoreService.php index 8a81e9a5..57c7f28a 100644 --- a/app/Services/HighscoreService.php +++ b/app/Services/HighscoreService.php @@ -102,6 +102,7 @@ public function getPlayerScoreMilitary(PlayerService $player): int * * @param PlayerService $player * @return int + * @throws Exception */ public function getPlayerScoreEconomy(PlayerService $player): int { @@ -126,7 +127,9 @@ public function getPlayerScoreEconomy(PlayerService $player): int public function getHighscorePlayers(int $offset_start = 0, int $return_amount = 100): array { // Get all players - $players = User::all(); + // TODO: when cached highscore results are available, remove this max 110 players limit. + // This limit is added to prevent loading all players in memory at once which causes timeout issues. + $players = User::take(110)->get(); $highscore = []; $count = 0; foreach ($players as $player) { @@ -217,6 +220,12 @@ public function getHighscorePlayerRank(PlayerService $player): int */ public function getHighscorePlayerAmount() : int { - return User::count(); + // TODO: return actual player count again when caching is implemented. + $actualUserCount = User::count(); + if ($actualUserCount > 110) { + return 110; + } + + return $actualUserCount; } } diff --git a/public/css/ingame.css b/public/css/ingame.css index 91b493f9..1f78a942 100644 --- a/public/css/ingame.css +++ b/public/css/ingame.css @@ -45419,6 +45419,584 @@ ul.chat_bar_list .newMsgMarker { .sprite.buttons.large.delete { background-position-x: -512px; } .sprite.buttons.large.collectPrice { background-position-x: -640px; } .sprite.buttons.large.collectItem { background-position-x: -768px; } + +#highscoreContent { + color: #848484; + width: 670px +} + +#highscoreContent .leftcol { + width: 430px; + float: left +} + +#highscoreContent .rightcol { + width: 200px; + float: left; + overflow-x: hidden +} + +#highscoreContent div.header,#highscoreContent div.content,#highscoreContent div.footer { + background-image: url("/img/icons/e15f6af4946be6f9dbd999ccb0ec7b.gif") +} + +#highscoreContent div.header { + background-color: transparent; + background-position: 0 0; + background-repeat: no-repeat; + height: 29px +} + +#highscoreContent div.content { + background-position: 0 0; + background-repeat: repeat-y; + background-image: url("/img/icons/3e31441afc04a23fdea44f7255ad91.gif"); + margin: 0 0 0 6px; + padding: 10px 15px 10px 15px; + width: 630px; + position: relative +} + +#highscoreContent div.footer { + background-color: transparent; + background-position: 0 -654px; + background-repeat: no-repeat; + height: 46px +} + +#highscoreContent h3 { + font-weight: 700 +} + +#highscoreContent .teaser { + margin: 0 0 10px 10px +} + +#highscoreContent div.content table { + border-collapse: collapse; + color: #848484; + font-size: 11px; + width: 610px; + table-layout: fixed +} + +#highscoreContent #ranks .score { + font-size: 13px; + font-weight: bold; + text-align: right +} + +#highscoreContent #ranks td.score .small { + font-size: 11px; + font-weight: 100 +} + +#highscoreContent a:link,#highscoreContent a:visited { + color: #848484; + text-decoration: none +} + +.no-touch #highscoreContent a:hover { + color: #9b9b9b; + text-decoration: underline +} + +#highscoreContent a:active { + color: #848484; + text-decoration: none +} + +#highscoreContent div.content table#ranks th { + padding: 3px; + border-bottom: 1px solid #848484; + background-color: #23313c; + text-align: center; + text-transform: uppercase +} + +#highscoreContent div.content table#ranks .place { + padding: 2px 5px +} + +#highscoreContent div.content table#ranks tr.alt td { + background-color: #13181d +} + +#highscoreContent table.top10 { + margin-top: 0 +} + +#highscoreContent #ranks td,#highscoreContent table.top10 td { + padding: 4px; + border: 1px solid #000; + line-height: 15px; + overflow: hidden +} + +#highscoreContent .ally-name { + text-overflow: ellipsis; + overflow: hidden; + margin: 0 +} + +#highscoreContent div.content table#ranks.allyHighscore td.sendmsg { + text-align: center +} + +#highscoreContent #ranks .position { + width: 60px +} + +#highscoreContent #ranks .movement { + text-align: center; + padding-left: 0; + padding-right: 0; + width: 40px +} + +#highscoreContent #ranks .name { + width: 210px +} + +#highscoreContent #ranks .sendmsg { + padding: 4px 0; + width: 50px +} + +#highscoreContent #ranks .member_count { + width: 60px +} + +#highscoreContent #ranks .score { + width: 150px +} + +#highscoreContent #ranks .sendmsg_content { + width: 50px +} + +#highscoreContent #ranks .sendmsg a { + margin: 0 3px +} + +#highscoreContent div.content table#ranks td span.scoreAverage { + font-size: 8px +} + +#highscoreContent table.top10 td.alt { + background-color: #13181d +} + +#highscoreContent div.content table#ranks tr { + overflow: hidden +} + +#highscoreContent div.content table#ranks tr.hover td { + background-color: #212a33 +} + +#highscoreContent table.top10 td.namecol { + width: 170px +} + +#highscoreContent table.top10 td.namecol a { + height: 17px; + overflow: hidden +} + +#highscoreContent table.top10 td span.allytag { + color: #5e699e +} + +#highscoreContent div.content table#ranks td.col1 { + width: 50px; + text-align: center; + color: #fff +} + +#highscoreContent .top10 td.rankcol { + width: 25px; + text-align: center; + font-weight: 700 +} + +#highscoreContent div.claimsmall { + background: #23313c; + border-bottom: 2px solid #848484; + height: 44px; + color: #848484; + font-size: 10px; + text-transform: uppercase; + font-weight: 700 +} + +div.claimsmall p { + display: inline; + line-height: 40px; + margin: 0 +} + +#highscoreContent div.content select { + background-color: #10181f; + border: 1px solid #848484; + color: #6f9fc8; + cursor: pointer; + font-size: 12px; + line-height: 14px; + margin: 7px 7px 0 0; + text-transform: capitalize; + width: 150px +} + +.showOldDropdowns #highscoreContent div.content select { + background-color: #fff; + color: #000 +} + +.no-touch #highscoreContent div.content select:hover { + background-color: #000 +} + +.showOldDropdowns.no-touch #highscoreContent div.content select:hover { + background-color: #fff +} + +#highscoreContent #row a.send { + background: transparent url("/img/icons/e1b499e9d2ef42942416cadb54a770.gif") left top no-repeat; + float: left; + height: 54px; + width: 135px; + padding: 0; + text-decoration: none; + font-size: 11px; + color: #fff; + font-weight: 700; + text-transform: uppercase; + cursor: pointer +} + +#highscoreContent a.send:link,#highscoreContent a.send:visited,.no-touch #highscoreContent a.send:hover,#highscoreContent a.send:active { + text-decoration: none; + cursor: pointer +} + +#highscoreContent a.send span { + display: block; + height: 34px; + color: #fff; + text-align: center; + padding: 20px 0 0 +} + +#highscoreContent div.parameter { + float: right; + margin: 0 10px 0 0; + display: inline; + height: 20px; + font-size: 11px +} + +#highscoreContent div.senddiv { + float: left; + display: inline; + padding: 6px 0 0 0; + text-align: center; + margin-left: 0 +} + +#highscoreContent span.position { + font-weight: 700; + display: block; + padding-bottom: 8px +} + +#highscoreContent div.content div#parameter { + text-align: center; + font-weight: 700; + height: 25px; + margin-bottom: 15px +} + +#highscoreContent #row { + height: 78px +} + +#highscoreContent .buttons { + display: inline; + float: left; + height: 54px; + margin: 6px 0 0 7px; + padding: 0; + width: 160px +} + +#highscoreContent .buttons.rightCol { + width: 455px +} + +#highscoreContent .navButton { + background-image: url("/img/icons/1fd57fa51cdb81035382943e635348.gif"); + background-repeat: no-repeat; + float: left; + height: 54px; + margin-right: 10px; + overflow: visible; + position: relative; + width: 54px +} + +#highscoreContent #player { + background-position: 0 0 +} + +#highscoreContent #alliance { + background-position: -54px 0 +} + +#highscoreContent #points { + background-position: -108px 0 +} + +#highscoreContent #fleet { + background-position: -162px 0 +} + +#highscoreContent #research { + background-position: -216px 0 +} + +#highscoreContent #economy { + background-position: -270px 0 +} + +#highscoreContent #player.active { + background-position: 0 -54px +} + +#highscoreContent #alliance.active { + background-position: -54px -54px +} + +#highscoreContent #points.active { + background-position: -108px -54px +} + +#highscoreContent #fleet.active { + background-position: -162px -54px +} + +#highscoreContent #research.active { + background-position: -216px -54px +} + +#highscoreContent #economy.active { + background-position: -270px -54px +} + +#highscoreContent #subnav_fleet { + display: none; + height: 54px; + margin: 8px 10px 0 5px; + width: 180px +} + +#highscoreContent .subnavButton { + background: transparent url("/img/icons/6f6b7e29edf86992b7e7162f23789a.png") no-repeat center; + float: left; + height: 34px; + margin: 11px 5px 5px; + position: relative; + width: 34px +} + +#highscoreContent .subnavButton_lost { + background-position: -33px +} + +#highscoreContent .subnavButton_built { + background-position: 0 0 +} + +#highscoreContent .subnavButton_destroyed { + background-position: -66px +} + +#highscoreContent .subnavButton_honor { + background-position: -99px +} + +#highscoreContent .subnavButton_lost.active { + background-position: -166px +} + +#highscoreContent .subnavButton_built.active { + background-position: -133px +} + +#highscoreContent .subnavButton_destroyed.active { + background-position: -199px +} + +#highscoreContent .subnavButton_honor.active { + background-position: -232px +} + +#highscoreContent #claim { + background: #23313c; + border-bottom: 1px solid #848484; + color: #fff; + font-size: 10px; + font-weight: bold; + height: 19px; + padding: 5px 15px 0 13px; + text-transform: uppercase +} + +#highscoreContent #subnav { + background: #23313c +} + +#highscoreContent #paging a { + color: #fff; + text-decoration: none +} + +.no-touch #highscoreContent #paging a:hover { + text-decoration: underline +} + +#highscoreContent .marker { + background: transparent url("/img/icons/112960c1ace80c7dcb03ca88d4b6fc.png") no-repeat; + display: none; + height: 79px; + left: -7px; + position: absolute; + top: -7px; + width: 68px +} + +#highscoreContent .small-marker { + background: transparent url("/img/icons/112960c1ace80c7dcb03ca88d4b6fc.png") -68px -18px no-repeat; + display: none; + height: 60px; + left: -7px; + position: absolute; + top: -7px; + width: 48px +} + +#highscoreContent .active span.marker,#highscoreContent .active span.small-marker { + display: block +} + +#highscoreContent .textlabel { + top: 0; + width: 56px +} + +#highscoreContent .active .textlabel { + color: #fff +} + +#highscoreContent .leftbuttons { + float: left; + display: inline; + height: 54px; + padding: 6px 0 6px 0; + margin: 0 0 0 15px; + width: 128px +} + +#highscoreContent .rightbuttons { + float: left; + display: inline; + height: 54px; + padding: 6px 0 5px 0; + margin: 0 10px 0 10px; + width: 192px +} + +#highscoreContent .ally-tag a:link,#highscoreContent .ally-tag a:visited,.no-touch #highscoreContent .ally-tag a:hover,#highscoreContent .ally-tag a:active { + color: #6f9fc8 +} + +#highscoreContent tr.myrank td { + background-color: #1031a0 +} + +#highscoreContent tr.allyrank td { + background-color: #01270b +} + +#highscoreContent tr.coalitionrank td { + background-color: #41523b +} + +#highscoreContent tr.buddyrank td { + background-color: #032e5b +} + +#highscoreContent { + width: 670px +} + +#highscoreContent .errorcol { + height: 50px; + line-height: 50px; + margin-top: 10px +} + +#highscoreLoading { + background: transparent url("/img/icons/6e0f46d7504242302bc8055ad9c8c2.gif") no-repeat center; + height: 550px; + margin-left: 6px; + position: absolute; + top: 0; + width: 654px; + z-index: 111 +} + +#highscoreContent #paging { + font-size: 11px; + padding: 8px 0; + text-align: center +} + +#highscoreContent #stat_list_content { + width: 610px; + min-height: 300px; + border: 10px solid #22313b +} + +#highscoreHeadline { + font-size: 22px; + font-weight: bold; + margin: 5px; + width: 400px +} + +#highscoreContent .honorScore { + display: inline-block +} + +#highscoreContent #scrollToTop { + position: fixed; + top: 0; + left: 40%; + visibility: hidden; + z-index: 2 +} + +#highscoreContent #scrollToTop a { + display: block; + height: 32px; + width: 32px; + background: url("/img/icons/220ba93a2077a9f4338e313354ee19.png") -329px 0 +} + +.no-touch #highscoreContent #scrollToTop a:hover { + background-position: -329px 47px +} /*@import "ingame/base1.css";*/ /*@import "ingame/base2.css";*/ diff --git a/public/js/ingame.js b/public/js/ingame.js index c9ec19db..0d858ecf 100644 --- a/public/js/ingame.js +++ b/public/js/ingame.js @@ -64340,7 +64340,7 @@ function initHighscore() { $('#stat_list_content').html(LocalizationStrings['loading']); $(this).addClass('active'); var category = $("#categoryButtons > a.active").attr('rel'); - var url = highscoreContentUrl + '&category=' + category + '&type=' + type + searchRelString; + var url = highscoreContentUrl + '?category=' + category + '&type=' + type + searchRelString; if (($parent.attr('id') == 'typeButtons' || $(this).hasClass('subnavButton')) && searchSite != site) { url = url + "&site=" + site; @@ -64391,7 +64391,7 @@ function initHighscoreContent() { $(".changeSite").change(function () { var value = $(this).val(); $("#stat_list_content").html('
' + LocalizationStrings.loading + '
'); - ajaxCall(highscoreContentUrl + '&category=' + currentCategory + '&type=' + currentType + '&site=' + value, '#stat_list_content', initHighscoreContent); + ajaxCall(highscoreContentUrl + '?category=' + currentCategory + '&type=' + currentType + '&page=' + value, '#stat_list_content', initHighscoreContent); }); // scroll to top buttons var scrollToTopButton = $("#scrollToTop"); diff --git a/public/js/ingame.min.js b/public/js/ingame.min.js index c9ec19db..0d858ecf 100644 --- a/public/js/ingame.min.js +++ b/public/js/ingame.min.js @@ -64340,7 +64340,7 @@ function initHighscore() { $('#stat_list_content').html(LocalizationStrings['loading']); $(this).addClass('active'); var category = $("#categoryButtons > a.active").attr('rel'); - var url = highscoreContentUrl + '&category=' + category + '&type=' + type + searchRelString; + var url = highscoreContentUrl + '?category=' + category + '&type=' + type + searchRelString; if (($parent.attr('id') == 'typeButtons' || $(this).hasClass('subnavButton')) && searchSite != site) { url = url + "&site=" + site; @@ -64391,7 +64391,7 @@ function initHighscoreContent() { $(".changeSite").change(function () { var value = $(this).val(); $("#stat_list_content").html('
' + LocalizationStrings.loading + '
'); - ajaxCall(highscoreContentUrl + '&category=' + currentCategory + '&type=' + currentType + '&site=' + value, '#stat_list_content', initHighscoreContent); + ajaxCall(highscoreContentUrl + '?category=' + currentCategory + '&type=' + currentType + '&page=' + value, '#stat_list_content', initHighscoreContent); }); // scroll to top buttons var scrollToTopButton = $("#scrollToTop"); diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 1f95509e..5090aa26 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -1,8 +1,8 @@ { + "/css/ingame.css": "/css/ingame.css?id=cd2c6a17a3d53603f24aa7e7295e06a0", "/css/outgame.css": "/css/outgame.css?id=0edfd34484fc3ec74eca0604a470461f", - "/css/ingame.css": "/css/ingame.css?id=9d64f93aea214610643ec8e1c0f73143", - "/js/ingame.js": "/js/ingame.js?id=4bf773374b771c89a94980116dc1104d", - "/js/ingame.min.js": "/js/ingame.min.js?id=4bf773374b771c89a94980116dc1104d", + "/js/ingame.js": "/js/ingame.js?id=4fc16e6d0cdc83217c418010b77007c6", + "/js/ingame.min.js": "/js/ingame.min.js?id=4fc16e6d0cdc83217c418010b77007c6", "/js/outgame.js": "/js/outgame.js?id=5fa6ee5cdc34001db0bdccd06a7f676c", "/js/outgame.min.js": "/js/outgame.min.js?id=5fa6ee5cdc34001db0bdccd06a7f676c" } diff --git a/resources/css/ingame.css b/resources/css/ingame.css index b81052a5..49c9965d 100644 --- a/resources/css/ingame.css +++ b/resources/css/ingame.css @@ -6,6 +6,7 @@ @import "ingame/469500b3cd5158332fb20a56b14b2c.css"; @import "ingame/02base.css"; @import "ingame/modules/sprites.css"; +@import "ingame/modules/highscore.css"; /* New style overrides that conflict with some existing styles, implement later */ diff --git a/resources/css/ingame/base2.css b/resources/css/ingame/base2.css index 881caf95..a8691782 100644 --- a/resources/css/ingame/base2.css +++ b/resources/css/ingame/base2.css @@ -2388,584 +2388,6 @@ a.refreshPhalanxLink span { vertical-align: middle } -#highscoreContent { - color: #848484; - width: 670px -} - -#highscoreContent .leftcol { - width: 430px; - float: left -} - -#highscoreContent .rightcol { - width: 200px; - float: left; - overflow-x: hidden -} - -#highscoreContent div.header,#highscoreContent div.content,#highscoreContent div.footer { - background-image: url("/img/icons/e15f6af4946be6f9dbd999ccb0ec7b.gif") -} - -#highscoreContent div.header { - background-color: transparent; - background-position: 0 0; - background-repeat: no-repeat; - height: 29px -} - -#highscoreContent div.content { - background-position: 0 0; - background-repeat: repeat-y; - background-image: url("/img/icons/3e31441afc04a23fdea44f7255ad91.gif"); - margin: 0 0 0 6px; - padding: 10px 15px 10px 15px; - width: 630px; - position: relative -} - -#highscoreContent div.footer { - background-color: transparent; - background-position: 0 -654px; - background-repeat: no-repeat; - height: 46px -} - -#highscoreContent h3 { - font-weight: 700 -} - -#highscoreContent .teaser { - margin: 0 0 10px 10px -} - -#highscoreContent div.content table { - border-collapse: collapse; - color: #848484; - font-size: 11px; - width: 610px; - table-layout: fixed -} - -#highscoreContent #ranks .score { - font-size: 13px; - font-weight: bold; - text-align: right -} - -#highscoreContent #ranks td.score .small { - font-size: 11px; - font-weight: 100 -} - -#highscoreContent a:link,#highscoreContent a:visited { - color: #848484; - text-decoration: none -} - -.no-touch #highscoreContent a:hover { - color: #9b9b9b; - text-decoration: underline -} - -#highscoreContent a:active { - color: #848484; - text-decoration: none -} - -#highscoreContent div.content table#ranks th { - padding: 3px; - border-bottom: 1px solid #848484; - background-color: #23313c; - text-align: center; - text-transform: uppercase -} - -#highscoreContent div.content table#ranks .place { - padding: 2px 5px -} - -#highscoreContent div.content table#ranks tr.alt td { - background-color: #13181d -} - -#highscoreContent table.top10 { - margin-top: 0 -} - -#highscoreContent #ranks td,#highscoreContent table.top10 td { - padding: 4px; - border: 1px solid #000; - line-height: 15px; - overflow: hidden -} - -#highscoreContent .ally-name { - text-overflow: ellipsis; - overflow: hidden; - margin: 0 -} - -#highscoreContent div.content table#ranks.allyHighscore td.sendmsg { - text-align: center -} - -#highscoreContent #ranks .position { - width: 60px -} - -#highscoreContent #ranks .movement { - text-align: center; - padding-left: 0; - padding-right: 0; - width: 40px -} - -#highscoreContent #ranks .name { - width: 210px -} - -#highscoreContent #ranks .sendmsg { - padding: 4px 0; - width: 50px -} - -#highscoreContent #ranks .member_count { - width: 60px -} - -#highscoreContent #ranks .score { - width: 150px -} - -#highscoreContent #ranks .sendmsg_content { - width: 50px -} - -#highscoreContent #ranks .sendmsg a { - margin: 0 3px -} - -#highscoreContent div.content table#ranks td span.scoreAverage { - font-size: 8px -} - -#highscoreContent table.top10 td.alt { - background-color: #13181d -} - -#highscoreContent div.content table#ranks tr { - overflow: hidden -} - -#highscoreContent div.content table#ranks tr.hover td { - background-color: #212a33 -} - -#highscoreContent table.top10 td.namecol { - width: 170px -} - -#highscoreContent table.top10 td.namecol a { - height: 17px; - overflow: hidden -} - -#highscoreContent table.top10 td span.allytag { - color: #5e699e -} - -#highscoreContent div.content table#ranks td.col1 { - width: 50px; - text-align: center; - color: #fff -} - -#highscoreContent .top10 td.rankcol { - width: 25px; - text-align: center; - font-weight: 700 -} - -#highscoreContent div.claimsmall { - background: #23313c; - border-bottom: 2px solid #848484; - height: 44px; - color: #848484; - font-size: 10px; - text-transform: uppercase; - font-weight: 700 -} - -div.claimsmall p { - display: inline; - line-height: 40px; - margin: 0 -} - -#highscoreContent div.content select { - background-color: #10181f; - border: 1px solid #848484; - color: #6f9fc8; - cursor: pointer; - font-size: 12px; - line-height: 14px; - margin: 7px 7px 0 0; - text-transform: capitalize; - width: 150px -} - -.showOldDropdowns #highscoreContent div.content select { - background-color: #fff; - color: #000 -} - -.no-touch #highscoreContent div.content select:hover { - background-color: #000 -} - -.showOldDropdowns.no-touch #highscoreContent div.content select:hover { - background-color: #fff -} - -#highscoreContent #row a.send { - background: transparent url("/img/icons/e1b499e9d2ef42942416cadb54a770.gif") left top no-repeat; - float: left; - height: 54px; - width: 135px; - padding: 0; - text-decoration: none; - font-size: 11px; - color: #fff; - font-weight: 700; - text-transform: uppercase; - cursor: pointer -} - -#highscoreContent a.send:link,#highscoreContent a.send:visited,.no-touch #highscoreContent a.send:hover,#highscoreContent a.send:active { - text-decoration: none; - cursor: pointer -} - -#highscoreContent a.send span { - display: block; - height: 34px; - color: #fff; - text-align: center; - padding: 20px 0 0 -} - -#highscoreContent div.parameter { - float: right; - margin: 0 10px 0 0; - display: inline; - height: 20px; - font-size: 11px -} - -#highscoreContent div.senddiv { - float: left; - display: inline; - padding: 6px 0 0 0; - text-align: center; - margin-left: 0 -} - -#highscoreContent span.position { - font-weight: 700; - display: block; - padding-bottom: 8px -} - -#highscoreContent div.content div#parameter { - text-align: center; - font-weight: 700; - height: 25px; - margin-bottom: 15px -} - -#highscoreContent #row { - height: 78px -} - -#highscoreContent .buttons { - display: inline; - float: left; - height: 54px; - margin: 6px 0 0 7px; - padding: 0; - width: 160px -} - -#highscoreContent .buttons.rightCol { - width: 455px -} - -#highscoreContent .navButton { - background-image: url("/img/icons/1fd57fa51cdb81035382943e635348.gif"); - background-repeat: no-repeat; - float: left; - height: 54px; - margin-right: 10px; - overflow: visible; - position: relative; - width: 54px -} - -#highscoreContent #player { - background-position: 0 0 -} - -#highscoreContent #alliance { - background-position: -54px 0 -} - -#highscoreContent #points { - background-position: -108px 0 -} - -#highscoreContent #fleet { - background-position: -162px 0 -} - -#highscoreContent #research { - background-position: -216px 0 -} - -#highscoreContent #economy { - background-position: -270px 0 -} - -#highscoreContent #player.active { - background-position: 0 -54px -} - -#highscoreContent #alliance.active { - background-position: -54px -54px -} - -#highscoreContent #points.active { - background-position: -108px -54px -} - -#highscoreContent #fleet.active { - background-position: -162px -54px -} - -#highscoreContent #research.active { - background-position: -216px -54px -} - -#highscoreContent #economy.active { - background-position: -270px -54px -} - -#highscoreContent #subnav_fleet { - display: none; - height: 54px; - margin: 8px 10px 0 5px; - width: 180px -} - -#highscoreContent .subnavButton { - background: transparent url("/img/icons/6f6b7e29edf86992b7e7162f23789a.png") no-repeat center; - float: left; - height: 34px; - margin: 11px 5px 5px; - position: relative; - width: 34px -} - -#highscoreContent .subnavButton_lost { - background-position: -33px -} - -#highscoreContent .subnavButton_built { - background-position: 0 0 -} - -#highscoreContent .subnavButton_destroyed { - background-position: -66px -} - -#highscoreContent .subnavButton_honor { - background-position: -99px -} - -#highscoreContent .subnavButton_lost.active { - background-position: -166px -} - -#highscoreContent .subnavButton_built.active { - background-position: -133px -} - -#highscoreContent .subnavButton_destroyed.active { - background-position: -199px -} - -#highscoreContent .subnavButton_honor.active { - background-position: -232px -} - -#highscoreContent #claim { - background: #23313c; - border-bottom: 1px solid #848484; - color: #fff; - font-size: 10px; - font-weight: bold; - height: 19px; - padding: 5px 15px 0 13px; - text-transform: uppercase -} - -#highscoreContent #subnav { - background: #23313c -} - -#highscoreContent #paging a { - color: #fff; - text-decoration: none -} - -.no-touch #highscoreContent #paging a:hover { - text-decoration: underline -} - -#highscoreContent .marker { - background: transparent url("/img/icons/112960c1ace80c7dcb03ca88d4b6fc.png") no-repeat; - display: none; - height: 79px; - left: -7px; - position: absolute; - top: -7px; - width: 68px -} - -#highscoreContent .small-marker { - background: transparent url("/img/icons/112960c1ace80c7dcb03ca88d4b6fc.png") -68px -18px no-repeat; - display: none; - height: 60px; - left: -7px; - position: absolute; - top: -7px; - width: 48px -} - -#highscoreContent .active span.marker,#highscoreContent .active span.small-marker { - display: block -} - -#highscoreContent .textlabel { - top: 0; - width: 56px -} - -#highscoreContent .active .textlabel { - color: #fff -} - -#highscoreContent .leftbuttons { - float: left; - display: inline; - height: 54px; - padding: 6px 0 6px 0; - margin: 0 0 0 15px; - width: 128px -} - -#highscoreContent .rightbuttons { - float: left; - display: inline; - height: 54px; - padding: 6px 0 5px 0; - margin: 0 10px 0 10px; - width: 192px -} - -#highscoreContent .ally-tag a:link,#highscoreContent .ally-tag a:visited,.no-touch #highscoreContent .ally-tag a:hover,#highscoreContent .ally-tag a:active { - color: #6f9fc8 -} - -#highscoreContent tr.myrank td { - background-color: #1031a0 -} - -#highscoreContent tr.allyrank td { - background-color: #01270b -} - -#highscoreContent tr.coalitionrank td { - background-color: #41523b -} - -#highscoreContent tr.buddyrank td { - background-color: #032e5b -} - -#highscoreContent { - width: 670px -} - -#highscoreContent .errorcol { - height: 50px; - line-height: 50px; - margin-top: 10px -} - -#highscoreLoading { - background: transparent url("/img/icons/6e0f46d7504242302bc8055ad9c8c2.gif") no-repeat center; - height: 550px; - margin-left: 6px; - position: absolute; - top: 0; - width: 654px; - z-index: 111 -} - -#highscoreContent #paging { - font-size: 11px; - padding: 8px 0; - text-align: center -} - -#highscoreContent #stat_list_content { - width: 610px; - min-height: 300px; - border: 10px solid #22313b -} - -#highscoreHeadline { - font-size: 22px; - font-weight: bold; - margin: 5px; - width: 400px -} - -#highscoreContent .honorScore { - display: inline-block -} - -#highscoreContent #scrollToTop { - position: fixed; - top: 0; - left: 40%; - visibility: hidden; - z-index: 2 -} - -#highscoreContent #scrollToTop a { - display: block; - height: 32px; - width: 32px; - background: url("/img/icons/220ba93a2077a9f4338e313354ee19.png") -329px 0 -} - -.no-touch #highscoreContent #scrollToTop a:hover { - background-position: -329px 47px -} - .building_image img,.defense_image img,.research_image img,.techtree .item img { background-image: url("/img/icons/0adc600b59f15369f1c82ac6a35db7.png"); background-repeat: no-repeat diff --git a/resources/css/ingame/modules/highscore.css b/resources/css/ingame/modules/highscore.css new file mode 100644 index 00000000..88f05a0e --- /dev/null +++ b/resources/css/ingame/modules/highscore.css @@ -0,0 +1,578 @@ + +#highscoreContent { + color: #848484; + width: 670px +} + +#highscoreContent .leftcol { + width: 430px; + float: left +} + +#highscoreContent .rightcol { + width: 200px; + float: left; + overflow-x: hidden +} + +#highscoreContent div.header,#highscoreContent div.content,#highscoreContent div.footer { + background-image: url("/img/icons/e15f6af4946be6f9dbd999ccb0ec7b.gif") +} + +#highscoreContent div.header { + background-color: transparent; + background-position: 0 0; + background-repeat: no-repeat; + height: 29px +} + +#highscoreContent div.content { + background-position: 0 0; + background-repeat: repeat-y; + background-image: url("/img/icons/3e31441afc04a23fdea44f7255ad91.gif"); + margin: 0 0 0 6px; + padding: 10px 15px 10px 15px; + width: 630px; + position: relative +} + +#highscoreContent div.footer { + background-color: transparent; + background-position: 0 -654px; + background-repeat: no-repeat; + height: 46px +} + +#highscoreContent h3 { + font-weight: 700 +} + +#highscoreContent .teaser { + margin: 0 0 10px 10px +} + +#highscoreContent div.content table { + border-collapse: collapse; + color: #848484; + font-size: 11px; + width: 610px; + table-layout: fixed +} + +#highscoreContent #ranks .score { + font-size: 13px; + font-weight: bold; + text-align: right +} + +#highscoreContent #ranks td.score .small { + font-size: 11px; + font-weight: 100 +} + +#highscoreContent a:link,#highscoreContent a:visited { + color: #848484; + text-decoration: none +} + +.no-touch #highscoreContent a:hover { + color: #9b9b9b; + text-decoration: underline +} + +#highscoreContent a:active { + color: #848484; + text-decoration: none +} + +#highscoreContent div.content table#ranks th { + padding: 3px; + border-bottom: 1px solid #848484; + background-color: #23313c; + text-align: center; + text-transform: uppercase +} + +#highscoreContent div.content table#ranks .place { + padding: 2px 5px +} + +#highscoreContent div.content table#ranks tr.alt td { + background-color: #13181d +} + +#highscoreContent table.top10 { + margin-top: 0 +} + +#highscoreContent #ranks td,#highscoreContent table.top10 td { + padding: 4px; + border: 1px solid #000; + line-height: 15px; + overflow: hidden +} + +#highscoreContent .ally-name { + text-overflow: ellipsis; + overflow: hidden; + margin: 0 +} + +#highscoreContent div.content table#ranks.allyHighscore td.sendmsg { + text-align: center +} + +#highscoreContent #ranks .position { + width: 60px +} + +#highscoreContent #ranks .movement { + text-align: center; + padding-left: 0; + padding-right: 0; + width: 40px +} + +#highscoreContent #ranks .name { + width: 210px +} + +#highscoreContent #ranks .sendmsg { + padding: 4px 0; + width: 50px +} + +#highscoreContent #ranks .member_count { + width: 60px +} + +#highscoreContent #ranks .score { + width: 150px +} + +#highscoreContent #ranks .sendmsg_content { + width: 50px +} + +#highscoreContent #ranks .sendmsg a { + margin: 0 3px +} + +#highscoreContent div.content table#ranks td span.scoreAverage { + font-size: 8px +} + +#highscoreContent table.top10 td.alt { + background-color: #13181d +} + +#highscoreContent div.content table#ranks tr { + overflow: hidden +} + +#highscoreContent div.content table#ranks tr.hover td { + background-color: #212a33 +} + +#highscoreContent table.top10 td.namecol { + width: 170px +} + +#highscoreContent table.top10 td.namecol a { + height: 17px; + overflow: hidden +} + +#highscoreContent table.top10 td span.allytag { + color: #5e699e +} + +#highscoreContent div.content table#ranks td.col1 { + width: 50px; + text-align: center; + color: #fff +} + +#highscoreContent .top10 td.rankcol { + width: 25px; + text-align: center; + font-weight: 700 +} + +#highscoreContent div.claimsmall { + background: #23313c; + border-bottom: 2px solid #848484; + height: 44px; + color: #848484; + font-size: 10px; + text-transform: uppercase; + font-weight: 700 +} + +div.claimsmall p { + display: inline; + line-height: 40px; + margin: 0 +} + +#highscoreContent div.content select { + background-color: #10181f; + border: 1px solid #848484; + color: #6f9fc8; + cursor: pointer; + font-size: 12px; + line-height: 14px; + margin: 7px 7px 0 0; + text-transform: capitalize; + width: 150px +} + +.showOldDropdowns #highscoreContent div.content select { + background-color: #fff; + color: #000 +} + +.no-touch #highscoreContent div.content select:hover { + background-color: #000 +} + +.showOldDropdowns.no-touch #highscoreContent div.content select:hover { + background-color: #fff +} + +#highscoreContent #row a.send { + background: transparent url("/img/icons/e1b499e9d2ef42942416cadb54a770.gif") left top no-repeat; + float: left; + height: 54px; + width: 135px; + padding: 0; + text-decoration: none; + font-size: 11px; + color: #fff; + font-weight: 700; + text-transform: uppercase; + cursor: pointer +} + +#highscoreContent a.send:link,#highscoreContent a.send:visited,.no-touch #highscoreContent a.send:hover,#highscoreContent a.send:active { + text-decoration: none; + cursor: pointer +} + +#highscoreContent a.send span { + display: block; + height: 34px; + color: #fff; + text-align: center; + padding: 20px 0 0 +} + +#highscoreContent div.parameter { + float: right; + margin: 0 10px 0 0; + display: inline; + height: 20px; + font-size: 11px +} + +#highscoreContent div.senddiv { + float: left; + display: inline; + padding: 6px 0 0 0; + text-align: center; + margin-left: 0 +} + +#highscoreContent span.position { + font-weight: 700; + display: block; + padding-bottom: 8px +} + +#highscoreContent div.content div#parameter { + text-align: center; + font-weight: 700; + height: 25px; + margin-bottom: 15px +} + +#highscoreContent #row { + height: 78px +} + +#highscoreContent .buttons { + display: inline; + float: left; + height: 54px; + margin: 6px 0 0 7px; + padding: 0; + width: 160px +} + +#highscoreContent .buttons.rightCol { + width: 455px +} + +#highscoreContent .navButton { + background-image: url("/img/icons/1fd57fa51cdb81035382943e635348.gif"); + background-repeat: no-repeat; + float: left; + height: 54px; + margin-right: 10px; + overflow: visible; + position: relative; + width: 54px +} + +#highscoreContent #player { + background-position: 0 0 +} + +#highscoreContent #alliance { + background-position: -54px 0 +} + +#highscoreContent #points { + background-position: -108px 0 +} + +#highscoreContent #fleet { + background-position: -162px 0 +} + +#highscoreContent #research { + background-position: -216px 0 +} + +#highscoreContent #economy { + background-position: -270px 0 +} + +#highscoreContent #player.active { + background-position: 0 -54px +} + +#highscoreContent #alliance.active { + background-position: -54px -54px +} + +#highscoreContent #points.active { + background-position: -108px -54px +} + +#highscoreContent #fleet.active { + background-position: -162px -54px +} + +#highscoreContent #research.active { + background-position: -216px -54px +} + +#highscoreContent #economy.active { + background-position: -270px -54px +} + +#highscoreContent #subnav_fleet { + display: none; + height: 54px; + margin: 8px 10px 0 5px; + width: 180px +} + +#highscoreContent .subnavButton { + background: transparent url("/img/icons/6f6b7e29edf86992b7e7162f23789a.png") no-repeat center; + float: left; + height: 34px; + margin: 11px 5px 5px; + position: relative; + width: 34px +} + +#highscoreContent .subnavButton_lost { + background-position: -33px +} + +#highscoreContent .subnavButton_built { + background-position: 0 0 +} + +#highscoreContent .subnavButton_destroyed { + background-position: -66px +} + +#highscoreContent .subnavButton_honor { + background-position: -99px +} + +#highscoreContent .subnavButton_lost.active { + background-position: -166px +} + +#highscoreContent .subnavButton_built.active { + background-position: -133px +} + +#highscoreContent .subnavButton_destroyed.active { + background-position: -199px +} + +#highscoreContent .subnavButton_honor.active { + background-position: -232px +} + +#highscoreContent #claim { + background: #23313c; + border-bottom: 1px solid #848484; + color: #fff; + font-size: 10px; + font-weight: bold; + height: 19px; + padding: 5px 15px 0 13px; + text-transform: uppercase +} + +#highscoreContent #subnav { + background: #23313c +} + +#highscoreContent #paging a { + color: #fff; + text-decoration: none +} + +.no-touch #highscoreContent #paging a:hover { + text-decoration: underline +} + +#highscoreContent .marker { + background: transparent url("/img/icons/112960c1ace80c7dcb03ca88d4b6fc.png") no-repeat; + display: none; + height: 79px; + left: -7px; + position: absolute; + top: -7px; + width: 68px +} + +#highscoreContent .small-marker { + background: transparent url("/img/icons/112960c1ace80c7dcb03ca88d4b6fc.png") -68px -18px no-repeat; + display: none; + height: 60px; + left: -7px; + position: absolute; + top: -7px; + width: 48px +} + +#highscoreContent .active span.marker,#highscoreContent .active span.small-marker { + display: block +} + +#highscoreContent .textlabel { + top: 0; + width: 56px +} + +#highscoreContent .active .textlabel { + color: #fff +} + +#highscoreContent .leftbuttons { + float: left; + display: inline; + height: 54px; + padding: 6px 0 6px 0; + margin: 0 0 0 15px; + width: 128px +} + +#highscoreContent .rightbuttons { + float: left; + display: inline; + height: 54px; + padding: 6px 0 5px 0; + margin: 0 10px 0 10px; + width: 192px +} + +#highscoreContent .ally-tag a:link,#highscoreContent .ally-tag a:visited,.no-touch #highscoreContent .ally-tag a:hover,#highscoreContent .ally-tag a:active { + color: #6f9fc8 +} + +#highscoreContent tr.myrank td { + background-color: #1031a0 +} + +#highscoreContent tr.allyrank td { + background-color: #01270b +} + +#highscoreContent tr.coalitionrank td { + background-color: #41523b +} + +#highscoreContent tr.buddyrank td { + background-color: #032e5b +} + +#highscoreContent { + width: 670px +} + +#highscoreContent .errorcol { + height: 50px; + line-height: 50px; + margin-top: 10px +} + +#highscoreLoading { + background: transparent url("/img/icons/6e0f46d7504242302bc8055ad9c8c2.gif") no-repeat center; + height: 550px; + margin-left: 6px; + position: absolute; + top: 0; + width: 654px; + z-index: 111 +} + +#highscoreContent #paging { + font-size: 11px; + padding: 8px 0; + text-align: center +} + +#highscoreContent #stat_list_content { + width: 610px; + min-height: 300px; + border: 10px solid #22313b +} + +#highscoreHeadline { + font-size: 22px; + font-weight: bold; + margin: 5px; + width: 400px +} + +#highscoreContent .honorScore { + display: inline-block +} + +#highscoreContent #scrollToTop { + position: fixed; + top: 0; + left: 40%; + visibility: hidden; + z-index: 2 +} + +#highscoreContent #scrollToTop a { + display: block; + height: 32px; + width: 32px; + background: url("/img/icons/220ba93a2077a9f4338e313354ee19.png") -329px 0 +} + +.no-touch #highscoreContent #scrollToTop a:hover { + background-position: -329px 47px +} \ No newline at end of file diff --git a/resources/js/ingame/e7c74974620fa35b197315ebdbb8c2.js b/resources/js/ingame/e7c74974620fa35b197315ebdbb8c2.js index 28015233..b83033ae 100644 --- a/resources/js/ingame/e7c74974620fa35b197315ebdbb8c2.js +++ b/resources/js/ingame/e7c74974620fa35b197315ebdbb8c2.js @@ -34499,7 +34499,7 @@ function initHighscore() { $('#stat_list_content').html(LocalizationStrings['loading']); $(this).addClass('active'); var category = $("#categoryButtons > a.active").attr('rel'); - var url = highscoreContentUrl + '&category=' + category + '&type=' + type + searchRelString; + var url = highscoreContentUrl + '?category=' + category + '&type=' + type + searchRelString; if (($parent.attr('id') == 'typeButtons' || $(this).hasClass('subnavButton')) && searchSite != site) { url = url + "&site=" + site; @@ -34550,7 +34550,7 @@ function initHighscoreContent() { $(".changeSite").change(function () { var value = $(this).val(); $("#stat_list_content").html('
' + LocalizationStrings.loading + '
'); - ajaxCall(highscoreContentUrl + '&category=' + currentCategory + '&type=' + currentType + '&site=' + value, '#stat_list_content', initHighscoreContent); + ajaxCall(highscoreContentUrl + '?category=' + currentCategory + '&type=' + currentType + '&page=' + value, '#stat_list_content', initHighscoreContent); }); // scroll to top buttons var scrollToTopButton = $("#scrollToTop"); diff --git a/resources/views/ingame/ajax/object.blade.php b/resources/views/ingame/ajax/object.blade.php index 1f90b259..70431dd8 100644 --- a/resources/views/ingame/ajax/object.blade.php +++ b/resources/views/ingame/ajax/object.blade.php @@ -250,252 +250,6 @@ IPI.refreshHighlights() } - -