function example3(){ $image_crud = new image_CRUD(); $image_crud->set_primary_key_field('id'); $image_crud->set_url_field('url'); $image_crud->set_table('propertyimages') ->set_relation_field('propertyID') ->set_ordering_field('priority') ->set_image_path('assets/uploads'); $output = $image_crud->render(); $this->_example_output($output);}Now what I want to do is to be able to add an "Images" button next to "Add" and "Delete" under the "Actions" columnand when that button is clicked a popup will appear showing the images related to that propertyID.Anyway I can do that?
[SOLVED] image_crud: showing images in a popup
- Single Page
Posted 28 September 2012 - 12:11 PM
Posted 28 September 2012 - 13:15 PM
I kept Image_Crud functions in a separate file and I just added this line to the main grid page.
$crud->add_action('Photos', '../../assets/images/photos.png', 'photos/photoID','ui-icon-plus');
It works. Now all I have to do is make it popup instead of opening in a new page.
Posted 02 October 2012 - 01:21 AM
[php]$crud->set_css('assets/image_crud/css/jquery.fancybox-1.3.4.css');
$crud->set_js('assets/grocery_crud/js/jquery-1.8.1.min.js');
$crud->set_js('assets/image_crud/js/jquery.fancybox-1.3.4.pack.js');
$output = $crud->render();[/php]
and add the classes or your fancybox selectors into the view header or external file..
Seems to work. but I need to debug some failed uploads..