diff options
| author | Zach DeCook <zachdecook@gmail.com> | 2018-03-12 22:04:39 -0400 |
|---|---|---|
| committer | Zach DeCook <zachdecook@gmail.com> | 2018-03-12 22:04:39 -0400 |
| commit | 31e0f3007da1460275beea9703912856531b975a (patch) | |
| tree | 20252cde18ea9fe086082e922c5d6030026e3242 /page.php | |
| parent | 7a9d59c4b9c5ff3fbe11453c6dbed03fc6f5c240 (diff) | |
| download | prosongsa-31e0f3007da1460275beea9703912856531b975a.tar.gz | |
* Easy Transp buttons: Fix JS
Diffstat (limited to 'page.php')
| -rw-r--r-- | page.php | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/page.php b/page.php index 60728d2..4f04e95 100644 --- a/page.php +++ b/page.php @@ -157,7 +157,6 @@ function renderEasyTransp( $transp, $num, $songKeys = array() ) //up two semitones $classT = 'btn col-xs-12'; $nsongKey = 'Z'; - $data = ''; $words = "Transposed up 2 semitones"; if (isset ( $songKeys[0] ) ) { @@ -167,11 +166,8 @@ function renderEasyTransp( $transp, $num, $songKeys = array() ) $presentKey = transpadd( $origKey, $transp ); $s .= getKeyButton( "Transpose down to", $transp - 2, $pastKey, $num, $classT ); $s .= getKeyButton( "Current Key: ", $transp, $presentKey, $num, $classT ); - $data = "data-key='$presentKey' data-words='Current Key: '"; - $nsongKey = transpadd( $presentKey, 2) ?: 'Z'; $words = "Transpose up to "; - $data = "data-key='$nsongKey' data-words='$words'"; } $s .= getKeyButton( $words, $transp + 2, $nsongKey, $num, $classT ); @@ -182,7 +178,7 @@ function getKeyButton( $text, $value, $key, $num, $classT ) { $zkey = $key ?: 'Z'; $key = ($key == 'Z') ? '' : $key; - return "<a href='?song=$num&transp=$value' class='$classT btn-$zkey' $data>" + return "<a href='?song=$num&transp=$value' class='$classT btn-$zkey' data-key='$key' data-words='$text '>" . "$text $key</a>"; } |
