Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't disable labels in Magento #6

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions library/VF/SearchLevel.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function display($block, $level, $prevLevel = false, $displayBrTag = null, $year
protected function _display()
{
ob_start();
if ($this->helper()->showLabels()) {
if ($this->helper()->showLabels() === true || 'true' == strtolower($this->helper()->showLabels()) ) {
echo '<label>';
echo $this->__(ucfirst($this->level));
echo ':</label>';
Expand Down Expand Up @@ -139,4 +139,4 @@ protected function helper()
{
return VF_Singleton::getInstance();
}
}
}
3 changes: 2 additions & 1 deletion library/VF/Select.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ function joinAndSelectLevels($fromTable = null, $levels = array(), $schema = nul
$table = 'elite_level_' . $this->getSchema()->id() . '_' . $level;
$condition = "{$table}.id = {$fromTable}.{$level}_id";
$this->joinLeft($table, $condition, array($level => 'title', $level . '_id' => 'id'));
$this->order("$table.title");
}
return $this;
}
Expand All @@ -75,4 +76,4 @@ function inflect($identifier)
{
return str_replace(' ', '_', $identifier);
}
}
}
6 changes: 3 additions & 3 deletions library/VF/html/Js/loader_ajax.js.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function isLastLevel( $i, $c ) {
var loadingText = '<option value="0"><?=htmlentities( addslashes( $this->loadingText() ) )?></option>';

if(jQuery('.<?=str_replace(' ','_',$levels[ $i + 1 ])?>_startSelect').size()) {
var url = getUrl( jQuery(this).parent('form'), '<?=str_replace(' ','_',$levels[ $i + 1 ])?>' );
var url = getUrl( jQuery(jQuery(this).parents('form')[0]), '<?=str_replace(' ','_',$levels[ $i + 1 ])?>' );
jQuery(this).nextAll('.<?=str_replace(' ','_',$levels[ $i + 1 ])?>_startSelect').html( loadingText );
jQuery(this).nextAll('.<?=str_replace(' ','_',$levels[ $i + 1 ])?>_endSelect').html( loadingText );
jQuery(this).nextAll('.<?=str_replace(' ','_',$levels[ $i + 1 ])?>_startSelect').load( url, {}, function(responseText) {
Expand All @@ -101,7 +101,7 @@ function isLastLevel( $i, $c ) {
callbackFunc.apply( this );
});
} else {
var url = getUrl( jQuery(this).parent('form'), '<?=str_replace(' ','_',$levels[ $i + 1 ])?>' );
var url = getUrl( jQuery(jQuery(this).parents('form')[0]), '<?=str_replace(' ','_',$levels[ $i + 1 ])?>' );
jQuery(this).nextAll('.<?=str_replace(' ','_',$levels[ $i + 1 ])?>Select').html( loadingText );
jQuery(this).nextAll('.<?=str_replace(' ','_',$levels[ $i + 1 ])?>Select').load( url, {}, function(responseText) {
jQuery(this).html(responseText);
Expand All @@ -119,4 +119,4 @@ function isLastLevel( $i, $c ) {
?>
}
<?php
}
}