⚠ 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

how to put fancy box in add action



DREON
  • profile picture
  • Member

Posted 09 March 2013 - 00:04 AM

i use jquery fancy on my add and edit button on my GC and its works perfect.

 

but my question is how can i implement fancy box on my add action button

 

this is my add action code:

 

    $crud->add_action('View', '', 'main/subject_faculty','ui-icon-plus');  

 

 

how to put this page on fancy box..

 

public function subject_faculty($primary_key)
 {
        
        $crud = new grocery_CRUD();
 
        $crud->set_theme('datatables');
        $crud->set_table('faculty_sched');
        $crud->set_subject('Scheduled');
        $crud->columns('faculty_clascode','subject','days','schoolcollege_id','time_from','time_to','room');
        $crud->set_relation('id1','faculty_cmt','{faculty_lname},{faculty_fname}');    
        $crud->set_relation('schoolcollege_id','faculty_cmt','schoolcollege');    
        $crud->display_as('id1','Faculty Name');
        $crud->display_as('subject','Subject');
        $crud->display_as('days','Days');
        $crud->display_as('schoolcollege_id','School/College');
        $crud->display_as('time_from','From');
        $crud->display_as('time_to','To');
        $crud->display_as('room','Room');
        
         $crud->required_fields('id1','schoolcollege_id');

                
    
        $crud-> where('id1',$primary_key);  // primary_key has the id from the faculty_cmt table
        

        $data = $this->db->get_where('faculty_cmt',array('id'=>$primary_key))->row_array();
        
        $output = $crud->render();
        $output->output = '<div align="center"> <b>'."Below List of Subject". '</b></div>'.$output->output;
        $output->output = '<h1><div align="center"> <b>'.$data['faculty_lname'] .", " .$data['faculty_fname'].'</b></div></h1>'.$output->output;
        
    
       $this->load->view('example',$output);  
 


victor
  • profile picture
  • Member

Posted 09 March 2013 - 08:38 AM

maybe this could help to you
/topic/1284-custom-action-control-without-going-to-another-page/#entry5321

DREON
  • profile picture
  • Member

Posted 09 March 2013 - 10:05 AM

thank you sir victor, ill try it later..