OS Property support center

[SOLVED]Style mod_ospropertysearch version mobile

  • Fabio
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
10 years 7 months ago - 10 years 7 months ago #49908 by Fabio
Hi,
I ask you to help

I have to fix the slideprice for when I look at the iPhone, currently this is the result, can you help me? I saw that I should modify the helper.php file but was not able to improve it.

At least have the two prices on the same line

I accept tips

Fabio
Attachments:
Last edit: 10 years 7 months ago by Fabio.

Please Log in or Create an account to join the conversation.

More
10 years 7 months ago #49909 by Mr. Dam
Replied by Mr. Dam on topic Style mod_ospropertysearch version mobile
Hi Fabio,
It seems the problem come from css of your template. Please send me the link for checking it
Thanks
Dam

Please Log in or Create an account to join the conversation.

  • Fabio
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
10 years 7 months ago - 10 years 7 months ago #49910 by Fabio
Replied by Fabio on topic Style mod_ospropertysearch version mobile
thanks
mysite
Last edit: 10 years 7 months ago by Fabio.

Please Log in or Create an account to join the conversation.

More
10 years 7 months ago #49911 by Mr. Dam
Replied by Mr. Dam on topic Style mod_ospropertysearch version mobile
???

Please Log in or Create an account to join the conversation.

  • Fabio
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
10 years 7 months ago - 10 years 7 months ago #49912 by Fabio
Replied by Fabio on topic Style mod_ospropertysearch version mobile
sorry
Last edit: 10 years 7 months ago by Fabio.

Please Log in or Create an account to join the conversation.

More
10 years 7 months ago #49933 by Mr. Dam
Replied by Mr. Dam on topic Style mod_ospropertysearch version mobile
Hi Fabio,
Please open file: components > com_osproperty > helpers > helper.php
find php function: showPriceFilter

and replace all that function by this code:

public static function showPriceFilter($option_id,$min_price,$max_price,$property_type,$style,$prefix){
global $configClass;
$configClass = self::loadConfig();
$document = JFactory::getDocument();
$db = JFactory::getDbo();
$db->setQuery("Select price from #__osrs_properties order by price desc limit 1");
$max_price_value = $db->loadResult();
$db->setQuery("Select price from #__osrs_properties order by price limit 1");
$min_price_value = $db->loadResult();

if(intval($max_price) == 0){
$max_price = $max_price_value;
}
if($min_price_value == $max_price_value){
$min_price_value = 0;
}
if($configClass == 1){
?>

<?php

$document->addStyleSheet("//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css");
//$document->addScript(" code.jquery.com/ui/1.10.4/jquery-ui.js ");
?>
<script src="//code.jquery.com/ui/1.10.4/jquery-ui.js" type="text/javascript"></script>
<?php
$document->addScript(JURI::root()."components/com_osproperty/js/autoNumeric.js");
?>
<script>
jQuery.ui.slider.prototype.widgetEventPrefix = 'slider';
jQuery(function() {
jQuery( "#<?php echo $prefix;?>sliderange" ).slider({
range: true,
min: <?php echo intval($min_price_value);?>,
max: <?php echo intval($max_price_value);?>,
values: [ <?php echo intval($min_price);?>, <?php echo intval($max_price);?> ],
slide: function( event, ui ) {
var price_from = ui.values[ 0 ];
var price_to = ui.values[ 1 ];
jQuery( "#<?php echo $prefix;?>price_from_input1" ).val( price_from );
jQuery( "#<?php echo $prefix;?>price_to_input1" ).val( price_to );

price_from = price_from.formatMoney(0,',','.');
price_to = price_to.formatMoney(0,',','.');

jQuery( "#<?php echo $prefix;?>price_from_input" ).text( price_from );
jQuery( "#<?php echo $prefix;?>price_to_input" ).text( price_to );
}
});
});
Number.prototype.formatMoney = function(decPlaces, thouSeparator, decSeparator) {
var n = this,
decPlaces = isNaN(decPlaces = Math.abs(decPlaces)) ? 2 : decPlaces,
decSeparator = decSeparator == undefined ? "." : decSeparator,
thouSeparator = thouSeparator == undefined ? "," : thouSeparator,
sign = n < 0 ? "-" : "",
i = parseInt(n = Math.abs(+n || 0).toFixed(decPlaces)) + "",
j = (j = i.length) > 3 ? j % 3 : 0;
return sign + (j ? i.substr(0, j) + thouSeparator : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + thouSeparator) + (decPlaces ? decSeparator + Math.abs(n - i).toFixed(decPlaces).slice(2) : "");
};
</script>
<div id="<?php echo $prefix;?>sliderange"></div>
<div class="clearfix"></div>
<?php
if(strpos($prefix,"adv") === FALSE)
{
$span = "span5";
$style = "margin-top:10px;margin-left:0px;";
$style1 = "text-align:right; width: 40.42553191489362%;*width: 40.37234042553192%;float:left;";
$style2 = "text-align:left; width: 40.42553191489362%;*width: 40.37234042553192%;float:left;";
$input_class_name = "input-mini";
}else
{
$span = "span6";
$style = "";
$style1 = "margin-top:10px;margin-left:0px;text-align:left;width: 48.93617021276595%; *width: 48.88297872340425%;float:left;";
$style2 = "margin-top:10px;margin-left:0px;text-align:right;width: 48.93617021276595%; *width: 48.88297872340425%;float:left;";
$input_class_name = "input-small";
}
?>
<div class="row-fluid">
<div class="<?php echo $span?>" style="<?php echo $style;?><?php echo $style1?>">
<?php if(strpos($prefix,"adv") !== FALSE){?>
<?php echo JText::_('OS_MIN')?>(<?php echo HelperOspropertyCommon::loadCurrency();?>).
<?php } ?>
<!-- <input type="text" name="min_price_show" id="<?php echo $prefix;?>price_from_input" value="<?php echo number_format($min_price,0,'',',');?>" class="<?php echo $input_class_name;?>" disabled/> -->
<span id="<?php echo $prefix;?>price_from_input"><?php echo number_format($min_price,0,'',',');?></span>
<input type="hidden" name="min_price" id="<?php echo $prefix;?>price_from_input1" value="<?php echo $min_price;?>"/>
</div>
<?php
if(strpos($prefix,"adv") === FALSE)
{
?>
<div class="span2" style="margin-left:0px;margin-top:10px;text-align:center;width: 14.893617021276595%;*width: 14.840425531914894%;float:left;">
-
</div>
<?php }?>
<div class="<?php echo $span?>" style="<?php echo $style;?><?php echo $style2?>">
<?php if(strpos($prefix,"adv") !== FALSE){?>
<?php echo JText::_('OS_MAX')?>(<?php echo HelperOspropertyCommon::loadCurrency();?>).
<?php } ?>
<!-- <input type="text" name="max_price_show" id="<?php echo $prefix;?>price_to_input" value="<?php echo number_format($max_price,0,'',',');?>" class="<?php echo $input_class_name;?>" disabled/>-->
<span id="<?php echo $prefix;?>price_to_input"><?php echo number_format($max_price,0,'',',');?></span>
<input type="hidden" name="max_price" id="<?php echo $prefix;?>price_to_input1" value="<?php echo $max_price;?>"/>
</div>
</div>
<?php
}else{
echo HelperOspropertyCommon::generatePriceList($property_type,$price,$style);
}
}

Good luck
Dam

Please Log in or Create an account to join the conversation.

  • Fabio
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
10 years 7 months ago #49943 by Fabio
Replied by Fabio on topic Style mod_ospropertysearch version mobile
Hello Dang

then, by copying all of the code, the sliderprice disappears and the dropprice

so I decided to just copy the change to the style and in fact it works:

I only took this piece of code:

find:
Code:
{ $span = "span5"; $style = "margin-top:10px;margin-left:0px;"; $style1 = "text-align:left;"; $style2 = "text-align:right;"; $input_class_name = "input-mini"; }else { $span = "span6"; $style = ""; $style1 = "margin-top:10px;margin-left:0px;text-align:left;"; $style2 = "margin-top:10px;margin-left:0px;text-align:right;"; $input_class_name = "input-small"; }

change with
Code:
{ $span = "span5"; $style = "margin-top:10px;margin-left:0px;"; $style1 = "text-align:right; width: 40.42553191489362%;*width: 40.37234042553192%;float:left;"; $style2 = "text-align:left; width: 40.42553191489362%;*width: 40.37234042553192%;float:left;"; $input_class_name = "input-mini"; }else { $span = "span6"; $style = ""; $style1 = "margin-top:10px;margin-left:0px;text-align:left;width: 48.93617021276595%; *width: 48.88297872340425%;float:left;"; $style2 = "margin-top:10px;margin-left:0px;text-align:right;width: 48.93617021276595%; *width: 48.88297872340425%;float:left;"; $input_class_name = "input-small"; }

and

find:
Code:
<div class="span2" style="margin-left:0px;margin-top:10px;text-align:center;">
change with:
Code:
<div class="span2" style="margin-left:0px;margin-top:10px;text-align:center;width: 14.893617021276595%;*width: 14.840425531914894%;float:left;">



Perfect ;)

SOLVED
Attachments:

Please Log in or Create an account to join the conversation.

More
10 years 7 months ago #49944 by Mr. Dam
Replied by Mr. Dam on topic Style mod_ospropertysearch version mobile
Congratulation, Fabio !

Please Log in or Create an account to join the conversation.

Moderators: Mr. DamNguyen Phu Quan