Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/fedorovvl/tso_client
Browse files Browse the repository at this point in the history
  • Loading branch information
fedorovvl committed Jul 24, 2024
2 parents 53f4b12 + 58d26a6 commit 6654c79
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 5 deletions.
2 changes: 1 addition & 1 deletion client/files/content/bootstrap.min.css

Large diffs are not rendered by default.

32 changes: 28 additions & 4 deletions client/files/content/scripts/6-buffs.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,17 +144,41 @@ function getBuffHTML()
$.each(buffRecord['data'], function(index, data) {
status = getBuffStatus(data, isZoneRight);
// too dirty
if(data['buffName'].indexOf("RemoveBuff") >= 0) {
if(status == 'buff_buffed') { status = 'buff_ready'; }
else if(status == 'buff_ready') { status = 'buff_not_buffed'; }
if(data['buffName'].indexOf("RemoveBuff") >= 0) {
if(status == 'buff_buffed') { status = 'buff_ready'; }
else if(status == 'buff_ready') { status = 'buff_not_buffed'; }
}

var cssClass = '';

switch (status) {
case 'buff_ready':
cssClass = 'buffReady'
break;
case 'buff_buffed':
cssClass = 'buffed'
break;
case 'buff_notactive':
cssClass = 'notActive'
break;
case 'buff_wrong_name':
cssClass = 'wrongName'
break;
case 'buff_not_exist':
cssClass = 'buffNotReady'
break;
default:
cssClass = 'buffNotReady';
break;
}

if(status == 'buff_ready') { buffRecordFiltered.push(data); }
result += createTableRow([
[1, data['buiGrid']],
[4, loca.GetText("BUI", data['buiName'])],
[1, getBuiLevel(data)],
[4, loca.GetText("RES", data['buffName'])],
[2, getText(status) + '<button type="button" class="close" value="'+data['buiGrid']+'"><span>&times;</span></button>', (status == 'buff_ready') ? "buffReady" : "buffNotReady"]
[2, getText(status) + '<button type="button" class="close" value="'+data['buiGrid']+'"><span>&times;</span></button>', cssClass]
]);
});
return result;
Expand Down

0 comments on commit 6654c79

Please sign in to comment.