Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

- Fix a bug where clicking on the magnifying glass icon for a power i…

…n the Spellbook would activate that power.
  • Loading branch information...
commit c487a41c80b5e10afb0d22477678b476c9797f31 1 parent 1751c0d
@duaiwe authored
Showing with 7 additions and 7 deletions.
  1. +5 −5 htdocs/javascript/playerProcess.js
  2. +2 −2 htdocs/player.html
View
10 htdocs/javascript/playerProcess.js
@@ -135,10 +135,10 @@ function setActivePower(pID, level) {
//var powerRow = '#b'+pID;
// Add click bindings for all the spells of this level
- $(spellBookLevelRows).click(function(){ playerProcessRequest('setActivePower', {
- p_id: this.id.substring(1) }); });
+ $(spellBookLevelRows+' td.powerName').click(function(){ playerProcessRequest('setActivePower', {
+ p_id: $(this).parent().attr('id').substring(1) }); });
// Remove the binding for our active power;
- $(spellBookPowerRow).unbind('click');
+ $(spellBookPowerRow+' td.powerName').unbind('click');
$(spellBookLevelRows).fadeTo('fast', .5, function() {
$(powerTableLevelRows).hide().addClass('InActive');
@@ -207,8 +207,8 @@ $(window).load(function() {
playerProcessRequest('togglePower', {p_id: this.id.substring(1)}) });
// Spellbook Power Activation
- $('.spellBookRow.InActive').click(function(){ playerProcessRequest('setActivePower', {
- p_id: this.id.substring(1) }); });
+ $('.spellBookRow.InActive td.powerName').click(function(){ playerProcessRequest('setActivePower', {
+ p_id: $(this).parent().attr('id').substring(1) }); });
// Tab Show/Hide
$('#powerTabLink').click(function() {
View
4 htdocs/player.html
@@ -251,7 +251,7 @@
<tr id="b<?=$p->id;?>" class="spellBookRow l<?=$l;?>
<?=$p->getUseTypeDisplay(true);?>-bg
<?=$p->isActive()?'':'InActive';?>">
- <td><?=$p->name;?></td>
+ <td class="powerName"><?=$p->name;?></td>
<td class="icon"><img id="d<?=$p->id;?>" class="power_view icon"
title="View <?=$p->name;?>" alt="[v]"
src="<?=MEDIA_URL;?>/images/icon_magnifying-glass.png"/></td>
@@ -273,7 +273,7 @@
<tr id="b<?=$p->id;?>" class="spellBookRow l<?=$l;?>
<?=$p->getUseTypeDisplay(true);?>-bg
<?=$p->isActive()?'':'InActive';?>">
- <td><?=$p->name;?></td>
+ <td class="powerName"><?=$p->name;?></td>
<td class="icon"><img id="u<?=$p->id;?>" class="power_view icon"
title="View <?=$p->name;?>" alt="[v]"
src="<?=MEDIA_URL;?>/images/icon_magnifying-glass.png"/></td>
Please sign in to comment.
Something went wrong with that request. Please try again.