Skip to content

Commit 9fcec0c

Browse files
Potusektomaski
authored andcommitted
fix(css): fixed broken battle reports
1 parent 0b0a564 commit 9fcec0c

File tree

2 files changed

+58
-45
lines changed

2 files changed

+58
-45
lines changed

common/RepConvAdds.js

+49-31
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function _RepConvAdds() {
9292
if ($('#grcrt_mnu_list').length == 0) {
9393
$('#ui_box div.bottom_ornament')
9494
.before(
95-
$('<div/>', {'id':'grcrt_mnu_list','class':"container_hidden", 'style':"position:relative;"})
95+
$('<div/>', {'id':'grcrt_mnu_list','class':"container_hidden", 'style':"position: absolute;right: -10px;bottom: 6px;"/*position:relative;"*/})
9696
.append(
9797
$('<div/>', {'class':"top"})
9898
)
@@ -108,7 +108,7 @@ function _RepConvAdds() {
108108
$('<div/>', {'class':"right",'style':'z-index:10;'})
109109
)
110110
.append(
111-
$('<div/>', {'class':"content", 'style':"display: none;"})
111+
$('<div/>', {'class':"content", 'style':"display:none; margin-top: 0; margin-bottom: 0;"})
112112
.append(
113113
$('<div/>', {'class':"units_wrapper clearfix"})
114114
.append(
@@ -131,15 +131,39 @@ function _RepConvAdds() {
131131
.append(
132132
$('<img/>', {'src':RepConv.grcrt_cdn+'img/octopus.png', 'style':'width: 20px; margin: 5px;'})
133133
)
134-
.mousePopup(new MousePopup(RepConv.Scripts_nameS + " " + RepConv.Scripts_version + " [" + RepConv.LangEnv + "]"))
134+
)
135+
.mousePopup(new MousePopup(RepConv.Scripts_nameS + " " + RepConv.Scripts_version + " [" + RepConv.LangEnv + "]"))
135136
.click(function(){
136-
$('#grcrt_mnu_list li.main_menu_item').remove(),
137-
$('#grcrt_mnu_list .content').slideToggle()
137+
$('#grcrt_mnu_list li.main_menu_item').remove()
138+
if ($('#grcrt_mnu>div.btn_settings').hasClass('active checked')){
139+
$('#grcrt_mnu_list .content').slideUp(500, function() {
140+
$('#grcrt_mnu_list').animate({
141+
right: -10
142+
}, 300
143+
)
144+
})
145+
} else {
146+
$('.btn_gods_spells').hasClass('active') && $('.btn_gods_spells').click()
147+
$('#grcrt_mnu_list').animate({
148+
right: 134
149+
}, 300, function() {
150+
$('#grcrt_mnu_list .content').slideDown(500)
151+
})
152+
}
153+
$('#grcrt_mnu>div.btn_settings').toggleClass('active checked')
154+
// $('#grcrt_mnu_list').slideToggle(),
138155
})
139-
)
156+
// )
140157
)
141158
),
142159
fillGRCRTmenu()
160+
$('#grcrt_mnu_list>.bottom').css({
161+
'background':$('.gods_spells_menu>.bottom').css('background'),
162+
'height':$('.gods_spells_menu>.bottom').css('height'),
163+
'position':$('.gods_spells_menu>.bottom').css('position'),
164+
'bottom':'-27px'
165+
});
166+
addBtnGodsSpellsClick();
143167
}
144168
$('#ui_box')
145169
.append(
@@ -234,31 +258,22 @@ function _RepConvAdds() {
234258
})
235259
}
236260
}
237-
// this.oceanNumbers = function(){
238-
// if ($('#map_move_container').length == 0) {
239-
// setTimeout(function(){RepConvAdds.oceanNumbers();}, 100);
240-
// } else {
241-
// if (!RepConv.active.oceanNumber) {
242-
// $('div#grcrt_oceanNumbers').remove()
243-
// //$('div.RepConvON').remove()
244-
// } else {
245-
// if ($('div#grcrt_oceanNumbers').length == 0) {
246-
// $('#map_move_container').append(
247-
// $('<div/>', {'id':'grcrt_oceanNumbers', 'style':'position:absolute; top:0; left:0;'})
248-
// );
249-
// var _mapSize = (require("map/helpers")||MapTiles).map2Pixel(100,100);//MapTiles.map2Pixel(100,100);
250-
// for(var _mapY=0; _mapY<10; _mapY++){
251-
// for(var _mapX=0; _mapX<10; _mapX++){
252-
// var _lt = (require("map/helpers")||MapTiles).map2Pixel(_mapX*100,_mapY*100);//MapTiles.map2Pixel(_mapX*100,_mapY*100);
253-
// $('div#grcrt_oceanNumbers').append(
254-
// $('<div/>', {'class':'RepConvON','style' : 'left:'+(_lt.x)+'px; top: '+(_lt.y)+'px; background-image: url('+RepConv.grcrt_cdn+'map/'+_mapX+_mapY+'.png);'})
255-
// );
256-
// }
257-
// }
258-
// }
259-
// }
260-
// }
261-
// },
261+
function addBtnGodsSpellsClick(){
262+
if($('.btn_gods_spells>.icon.js-caption').length==0 || $('#grcrt_mnu>div.btn_settings').length==0){
263+
setTimeout(function(){
264+
addBtnGodsSpellsClick()
265+
},100)
266+
} else {
267+
$('.btn_gods_spells').on("click",function(){
268+
if(
269+
!$('.btn_gods_spells').hasClass('active') &&
270+
$('#grcrt_mnu>div.btn_settings').hasClass('active')
271+
) {
272+
$('#grcrt_mnu>div.btn_settings').click()
273+
}
274+
})
275+
}
276+
}
262277
this.emots = {}
263278
this.emotsDef = [
264279
{'img': RepConv.grcrt_cdn+'emots/usmiech.gif', 'title': ':)'},
@@ -562,6 +577,9 @@ function _RepConvAdds() {
562577
.append(
563578
'#grcrt_mnu_list ul { height: auto !important;}'
564579
)
580+
.append(
581+
'#grcrt_mnu_list li { width: 125px !important;}'
582+
)
565583
),
566584
$.each(RepConv.menu, function(indM, eleM){
567585
$('#grcrt_mnu_list ul')

modules/GRCRTInnoFix.js

+9-14
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
11
function _GRCRTInnoFix() {
2-
// $('head')
3-
// .append(
4-
// $('<style/>')
5-
// // quest send unit
6-
// .append('.island_quests .details_window .collect_units .lbl_troops_rallied {\n'+
7-
// 'line-height: 14px;\n'+
8-
// '}'
9-
// )
10-
// // simulator
11-
// .append('.place_sim_wrap_mods {\n'+
12-
// 'min-width: 304px;\n'+
13-
// '}'
14-
// )
15-
// )
2+
$('head')
3+
.append(
4+
$('<style/>')
5+
// size images bbcode
6+
.append('.bbcodes.monospace img {\n'+
7+
'max-width: none;\n'+
8+
'}'
9+
)
10+
)
1611
$.Observer(GameEvents.window.reload).subscribe("grcrt_trade", function(a, b) {
1712
$.each($('div[class*=trade_tab_target]'), function(ii, trade){
1813
var c = $(trade).find($('#way_duration')).addClass('way_duration').removeAttr('id').tooltip(DM.getl10n("farm_town").way_duration).text().replace("~","").split(":"),

0 commit comments

Comments
 (0)