⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Setting Alignment to RTL as well as input direction



ci-expert

ci-expert
  • profile picture
  • Member

Posted 24 April 2012 - 20:28 PM

[color=#000080][b]Hi all, [/b][/color]

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

[b][color=#ff0000]HOWEVER..,[/color][/b]

[b][color=#ff0000]Currently there is ONE thing that is still an issue for me.[/color][/b]
[b][color=#ff0000]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.[/color][/b]
[color=#ff0000][b]Any chance I will find such ?[/b][/color]


[color=#006400][b]PLEASE HELP! [/b][/color]

[color=#006400][b]Thanks[/b][/color]

ci-expert

ci-expert
  • profile picture
  • Member

Posted 24 April 2012 - 22:06 PM

[color=#008000]Hi , [/color]

[color=#008000]I did some progress BUT it is i the diry fashion till Grocery Guys will enable it clean : [/color]

[color=#008000]/assets/grocery_crud/themes\datatables/views [/color]
[color=#008000]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 [/color]
[color=#008000]still the label and the input field are aligned on the left side and not the right side due to various CSS defs... [/color]

[color=#008000]e.g. line 37 on the edit,php changed to be: [/color]

[b][color=#0000cd]<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>[/color][/b]

web-johnny

web-johnny
  • profile picture
  • Administrator
  • 1,166 posts

Posted 25 April 2012 - 06:10 AM

Hello [member='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.