Skip to content

Commit

Permalink
Updated Grocery CRUD to v1.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
waifung0207 committed Apr 17, 2015
1 parent 7ea6c0a commit e5bda56
Show file tree
Hide file tree
Showing 635 changed files with 10,191 additions and 10,014 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- Updated CodeIgniter to v2.2.2
- Updated AdminLTE to v2.0.5
- Updated Bootstrap to v3.3.4
- Updated Grocery CRUD to v1.5.1

#### v 0.7.0 (Date: 2015-03-18)
- **Frontend**
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ This repository will be slowly depreciated and updated only when CodeIgniter 2 r
A starter template that supports multi-tenant (frontend / backend) website in a single application.

This repository is developed upon the following tools:
* [CodeIgniter](http://www.codeigniter.com/) (v2.2.1) - PHP framework
* [Bootstrap](http://getbootstrap.com/) (v3.3.2) - popular frontend framework
* [Bootswatch](http://bootswatch.com/) (v3.3.2) - theme options capatible to Bootstrap framework
* [Grocery CRUD](http://www.grocerycrud.com/) (v1.5.0) - feature-rich library to build CRUD tables
* [CodeIgniter](http://www.codeigniter.com/) (v2.2.2) - PHP framework
* [Bootstrap](http://getbootstrap.com/) (v3.3.4) - popular frontend framework
* [Bootswatch](http://bootswatch.com/) (v3.3.4) - theme options capatible to Bootstrap framework
* [Grocery CRUD](http://www.grocerycrud.com/) (v1.5.1) - feature-rich library to build CRUD tables
* [Image CRUD](http://www.grocerycrud.com/image-crud) (v0.6) - CRUD library for image management
* [AdminLTE](https://github.com/almasaeed2010/AdminLTE) (v2.0.4) - bootstrap theme for backend system
* [AdminLTE](https://github.com/almasaeed2010/AdminLTE) (v2.0.5) - bootstrap theme for backend system
* [codeigniter-base-model](https://github.com/jamierumbelow/codeigniter-base-model) - MY_Model implementation for easier database handling

Please note this project will change from time to time (breaking changes is unavoidable among commits by now), but should works fine at production (at least in my personal jobs).
Expand Down
2 changes: 1 addition & 1 deletion applications/backend/config/grocery_crud.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
//Make sure that the number of grocery_crud_default_per_page variable is included to this array.
$config['grocery_crud_paging_options'] = array('10','25','50','100');

//The environment is important so we can have specific configurations for specific environments
//Default theme for grocery CRUD
$config['grocery_crud_default_theme'] = 'flexigrid';

//The environment is important so we can have specific configurations for specific environments
Expand Down
24 changes: 16 additions & 8 deletions applications/backend/libraries/Grocery_CRUD.php
Original file line number Diff line number Diff line change
Expand Up @@ -1383,7 +1383,13 @@ protected function upload_file($state_info)
header('Access-Control-Allow-Headers: X-File-Name, X-File-Type, X-File-Size');

$allowed_files = $this->config->file_upload_allow_file_types;
$reg_exp = '/(\\.|\\/)('.$allowed_files.')$/i';

$reg_exp = '';
if(!empty($upload_info->allowed_file_types)){
$reg_exp = '/(\\.|\\/)('.$upload_info->allowed_file_types.')$/i';
}else{
$reg_exp = '/(\\.|\\/)('.$allowed_files.')$/i';
}

$max_file_size_ui = $this->config->file_upload_max_file_size;
$max_file_size_bytes = $this->_convert_bytes_ui_to_bytes($max_file_size_ui);
Expand Down Expand Up @@ -2111,10 +2117,12 @@ protected function get_layout()
}

if ($this->unset_bootstrap) {
unset($js_files[sha1($this->default_theme_path.'/twitter-bootstrap/js/libs/bootstrap/bootstrap.min.js')]);
unset($js_files[sha1($this->default_theme_path.'/twitter-bootstrap/js/libs/bootstrap/application.js')]);
unset($css_files[sha1($this->default_theme_path.'/twitter-bootstrap/css/bootstrap-responsive.min.css')]);
unset($css_files[sha1($this->default_theme_path.'/twitter-bootstrap/css/bootstrap.min.css')]);
unset($js_files[sha1($this->default_theme_path.'/bootstrap/js/bootstrap/dropdown.js')]);
unset($js_files[sha1($this->default_theme_path.'/bootstrap/js/bootstrap/modal.js')]);
unset($js_files[sha1($this->default_theme_path.'/bootstrap/js/bootstrap/dropdown.min.js')]);
unset($js_files[sha1($this->default_theme_path.'/bootstrap/js/bootstrap/modal.min.js')]);
unset($css_files[sha1($this->default_theme_path.'/bootstrap/css/bootstrap/bootstrap.css')]);
unset($css_files[sha1($this->default_theme_path.'/bootstrap/css/bootstrap/bootstrap.min.css')]);
}

if($this->echo_and_die === false)
Expand Down Expand Up @@ -3995,8 +4003,7 @@ protected function _load_date_format()
{
list($php_day, $php_month, $php_year) = array('d','m','Y');
list($js_day, $js_month, $js_year) = array('dd','mm','yy');
list($ui_day, $ui_month, $ui_year) = array('dd','mm','yyyy');
//@todo ui_day, ui_month, ui_year has to be lang strings
list($ui_day, $ui_month, $ui_year) = array($this->l('ui_day'), $this->l('ui_month'), $this->l('ui_year'));

$date_format = $this->config->date_format;
switch ($date_format) {
Expand Down Expand Up @@ -5137,7 +5144,7 @@ public function set_relation_n_n($field_name, $relation_table, $selection_table,
* @param string $upload_path
* @return Grocery_CRUD
*/
public function set_field_upload($field_name, $upload_dir = '')
public function set_field_upload($field_name, $upload_dir = '', $allowed_file_types = '')
{
$upload_dir = !empty($upload_dir) && substr($upload_dir,-1,1) == '/'
? substr($upload_dir,0,-1)
Expand All @@ -5153,6 +5160,7 @@ public function set_field_upload($field_name, $upload_dir = '')
$this->upload_fields[$field_name] = (object) array(
'field_name' => $field_name,
'upload_path' => $upload_dir,
'allowed_file_types' => $allowed_file_types,
'encrypted_field_name' => $this->_unique_field_name($field_name));
return $this;
}
Expand Down
Empty file modified applications/backend/libraries/image_moo.php
100755 → 100644
Empty file.
Empty file modified assets/grocery_crud/config/index.html
100755 → 100644
Empty file.
Empty file modified assets/grocery_crud/config/language_alias.php
100755 → 100644
Empty file.
Empty file modified assets/grocery_crud/config/translit_chars.php
100755 → 100644
Empty file.
Empty file modified assets/grocery_crud/css/index.html
100755 → 100644
Empty file.
Empty file modified assets/grocery_crud/css/jquery_plugins/chosen/chosen-sprite.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/grocery_crud/css/jquery_plugins/chosen/chosen.css
100755 → 100644
Empty file.
Empty file modified assets/grocery_crud/css/jquery_plugins/chosen/index.html
100755 → 100644
Empty file.
Empty file modified assets/grocery_crud/css/jquery_plugins/fancybox/blank.gif
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/grocery_crud/css/jquery_plugins/fancybox/fancy_close.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/grocery_crud/css/jquery_plugins/fancybox/fancybox-x.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/grocery_crud/css/jquery_plugins/fancybox/fancybox-y.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/grocery_crud/css/jquery_plugins/fancybox/fancybox.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified assets/grocery_crud/css/jquery_plugins/file_upload/loading.gif
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/grocery_crud/css/jquery_plugins/index.html
100755 → 100644
Empty file.
Empty file.
Empty file modified assets/grocery_crud/css/jquery_plugins/jquery.ui.datetime.css
100755 → 100644
Empty file.
Empty file modified assets/grocery_crud/css/jquery_plugins/ui.multiselect.css
100755 → 100644
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Empty file modified assets/grocery_crud/css/ui/index.html
100755 → 100644
Empty file.
Empty file modified assets/grocery_crud/css/ui/simple/images/animated-overlay.gif
100755 → 100644
Empty file modified assets/grocery_crud/css/ui/simple/index.html
100755 → 100644
Empty file.
Empty file.
Empty file modified assets/grocery_crud/index.html
100755 → 100644
Empty file.
Empty file modified assets/grocery_crud/js/common/lazyload-min.js
100755 → 100644
Empty file.
Empty file modified assets/grocery_crud/js/common/list.js
100755 → 100644
Empty file.
Empty file modified assets/grocery_crud/js/index.html
100755 → 100644
Empty file.
Empty file modified assets/grocery_crud/js/jquery-1.11.1.js
100755 → 100644
Empty file.
Empty file modified assets/grocery_crud/js/jquery-1.11.1.min.js
100755 → 100644
Empty file.
Empty file modified assets/grocery_crud/js/jquery-1.11.1.min.map
100755 → 100644
Empty file.
Empty file modified assets/grocery_crud/js/jquery_plugins/ajax-chosen.js
100755 → 100644
Empty file.
Empty file modified assets/grocery_crud/js/jquery_plugins/config/index.html
100755 → 100644
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified assets/grocery_crud/js/jquery_plugins/index.html
100755 → 100644
Empty file.
Empty file.
Loading

0 comments on commit e5bda56

Please sign in to comment.