Jump to content


Setting Alignment to RTL as well as input direction

CSS ALIGNMENT

  • Please log in to reply
2 replies to this topic

#1 ci-expert

ci-expert

    Newbie

  • Members
  • Pip
  • 9 posts
  • LocationThe Silicon Vally of Israel

Posted 24 April 2012 - 08:28 PM

Hi all,

I love more and more using grocery CRUD (did about 30 tables editing with various callbacks - the $row parameter if fantastic!
for index to value dispaly, selection lists for edit/add fields and varios operayion mode of view only partiall edit and full operation all GREAT! )
Also just upgraded to the new version and its indeed better CHEERS :-)

HOWEVER..,

Currently there is ONE thing that is still an issue for me.
I need a crud method to set the table and edit/add css alignment mode to RTL and well as HTML DIR to RTL for some usage scenarios.
If there is another way to make it fine but I wish not doing dirty code on the CSS part and having a clean service function.

Any chance I will find such ?


PLEASE HELP!

Thanks

#2 ci-expert

ci-expert

    Newbie

  • Members
  • Pip
  • 9 posts
  • LocationThe Silicon Vally of Israel

Posted 24 April 2012 - 10:06 PM

Hi ,

I did some progress BUT it is i the diry fashion till Grocery Guys will enable it clean :

/assets/grocery_crud/themes\datatables/views
I did edit the edit.php and add.php to replace the label with the field value so that it looks ok for a right to left languages BUT
still the label and the input field are aligned on the left side and not the right side due to various CSS defs...

e.g. line 37 on the edit,php changed to be:

<div class='form-field-box <?php echo $even_odd?>' id="<?php echo $field->field_name; ?>_field_box">
<div class='form-input-box' id="<?php echo $field->field_name; ?>_input_box">
<?php echo $input_fields[$field->field_name]->input?>
</div>
<div class='form-display-as-box' id="<?php echo $field->field_name; ?>_display_as_box">
<?php echo $input_fields[$field->field_name]->display_as?><?php echo ($input_fields[$field->field_name]->required)? "<span class='required'>*</span> " : ""?> :
</div>
<div class='clear'></div>
</div>


#3 web-johnny

web-johnny

    grocery CRUD Author

  • Administrators
  • 1,043 posts
  • LocationLondon

Posted 25 April 2012 - 06:10 AM

Hello ci-expert and thank you again for your good words. Well there were a little contribution for RTL languages for the css files but I didn't have time to include it to a release.Imagine that I had a plan to do it at version 1.2 . Now it will not be again to the next version in a proper way. Though you can take a look of the contribution code at: http://www.grocerycr...-rtl-languages/ I think it will help you a lot.

Thanks to reminding me this.
Posted Image




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users