diff --git a/application/libraries/Grocery_CRUD.php b/application/libraries/Grocery_CRUD.php index d32f5cab..b38a41ac 100755 --- a/application/libraries/Grocery_CRUD.php +++ b/application/libraries/Grocery_CRUD.php @@ -16,7 +16,7 @@ * @package grocery CRUD * @copyright Copyright (c) 2010 through 2012, John Skoumbourdis * @license https://github.com/scoumbourdis/grocery-crud/blob/master/license-grocery-crud.txt - * @version 1.3 + * @version 1.4.1 * @author John Skoumbourdis */ @@ -157,7 +157,7 @@ public function get_field_types() 'display_as' => isset($this->display_as[$field_name]) ? $this->display_as[$field_name] : ucfirst(str_replace("_"," ",$field_name)), - 'required' => in_array($field_name,$this->required_fields) ? true : false, + 'required' => !empty($this->required_fields) && in_array($field_name,$this->required_fields) ? true : false, 'extras' => $extras ); @@ -468,7 +468,7 @@ protected function get_type($db_type) * * @package grocery CRUD * @author John Skoumbourdis - * @version 1.3 + * @version 1.4.1 * @link http://www.grocerycrud.com/documentation */ class grocery_CRUD_Model_Driver extends grocery_CRUD_Field_Types @@ -1479,7 +1479,7 @@ protected function ajax_relation($state_info) * * @package grocery CRUD * @author John Skoumbourdis - * @version 1.3 + * @version 1.4.1 */ class grocery_CRUD_Layout extends grocery_CRUD_Model_Driver { @@ -2571,7 +2571,7 @@ protected function get_upload_file_input($field_info, $value) $this->set_js_config($this->default_javascript_path.'/jquery_plugins/config/jquery.fancybox.config.js'); - $unique = uniqid(); + $unique = mt_rand(); $allowed_files = $this->config->file_upload_allow_file_types; $allowed_files_ui = '.'.str_replace('|',',.',$allowed_files); @@ -2926,7 +2926,7 @@ protected function get_views_as_string() * * @package grocery CRUD * @author John Skoumbourdis - * @version 1.3 + * @version 1.4.1 */ class grocery_CRUD_States extends grocery_CRUD_Layout { @@ -3328,7 +3328,7 @@ public function getStateInfo() * @package grocery CRUD * @copyright Copyright (c) 2010 through 2012, John Skoumbourdis * @license https://github.com/scoumbourdis/grocery-crud/blob/master/license-grocery-crud.txt - * @version 1.3.3 + * @version 1.4.1 * @author John Skoumbourdis */ @@ -3351,7 +3351,7 @@ class Grocery_CRUD extends grocery_CRUD_States * * @var string */ - const VERSION = "1.3.3"; + const VERSION = "1.4.1"; const JQUERY = "jquery-1.10.2.min.js"; const JQUERY_UI_JS = "jquery-ui-1.10.3.custom.min.js"; @@ -3664,6 +3664,16 @@ public function unset_read() return $this; } + + /** + * Just an alias to unset_read + * + * @return void + * */ + public function unset_view() + { + return unset_read(); + } /** * Unsets the export button and functionality from the list diff --git a/assets/grocery_crud/js/jquery_plugins/config/jquery.fileupload.config.js b/assets/grocery_crud/js/jquery_plugins/config/jquery.fileupload.config.js index 3f8985ba..b6b6b4cf 100644 --- a/assets/grocery_crud/js/jquery_plugins/config/jquery.fileupload.config.js +++ b/assets/grocery_crud/js/jquery_plugins/config/jquery.fileupload.config.js @@ -30,6 +30,7 @@ $(function(){ $(this).fileupload({ dataType: 'json', url: uploader_url, + dropZone: $(this).closest('.form-field-box'), cache: false, acceptFileTypes: file_upload_info.accepted_file_types, beforeSend: function(){ diff --git a/assets/grocery_crud/languages/arabic.php b/assets/grocery_crud/languages/arabic.php index daf7619b..25f099b8 100644 --- a/assets/grocery_crud/languages/arabic.php +++ b/assets/grocery_crud/languages/arabic.php @@ -1,81 +1,81 @@ -