Skip to content

Commit

Permalink
Removing uniform.js
Browse files Browse the repository at this point in the history
Removing uniform JS as it is unnecessary and it is causing jQuery
errors
  • Loading branch information
scoumbourdis committed Feb 17, 2016
1 parent d6b4563 commit e1dae2d
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 1,618 deletions.
16 changes: 10 additions & 6 deletions application/libraries/Grocery_CRUD.php
Original file line number Diff line number Diff line change
Expand Up @@ -2191,21 +2191,25 @@ protected function get_integer_input($field_info,$value)

protected function get_true_false_input($field_info,$value)
{
$this->set_css($this->default_css_path.'/jquery_plugins/uniform/uniform.default.css');
$this->set_js_lib($this->default_javascript_path.'/jquery_plugins/jquery.uniform.min.js');
$this->set_js_config($this->default_javascript_path.'/jquery_plugins/config/jquery.uniform.config.js');

$value_is_null = empty($value) && $value !== '0' && $value !== 0 ? true : false;

$input = "<div class='pretty-radio-buttons'>";

$true_string = is_array($field_info->extras) && array_key_exists(1,$field_info->extras) ? $field_info->extras[1] : $this->default_true_false_text[1];
$checked = $value === '1' || ($value_is_null && $field_info->default === '1') ? "checked = 'checked'" : "";
$input .= "<label><input id='field-{$field_info->name}-true' class='radio-uniform' type='radio' name='{$field_info->name}' value='1' $checked /> ".$true_string."</label> ";
$input .=
"<div class=\"radio\"><label>
<input id='field-{$field_info->name}-true' type=\"radio\" name=\"{$field_info->name}\" value=\"1\" $checked />
$true_string
</label> </div>";

$false_string = is_array($field_info->extras) && array_key_exists(0,$field_info->extras) ? $field_info->extras[0] : $this->default_true_false_text[0];
$checked = $value === '0' || ($value_is_null && $field_info->default === '0') ? "checked = 'checked'" : "";
$input .= "<label><input id='field-{$field_info->name}-false' class='radio-uniform' type='radio' name='{$field_info->name}' value='0' $checked /> ".$false_string."</label>";
$input .=
"<div class=\"radio\"><label>
<input id='field-{$field_info->name}-false' type=\"radio\" name=\"{$field_info->name}\" value=\"0\" $checked />
$false_string
</label> </div>";

$input .= "</div>";

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit e1dae2d

Please sign in to comment.