⚠ 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

Some Questions



Robert
  • profile picture
  • Member

Posted 03 June 2013 - 08:26 AM

i wanted to ask

 

1. how can i change the edit and delete icons to text like | Edit | Delete | .

 

2. Is this working with 1.3.3 or anyone know how to set it up ? im new to GC

 

 

Thanks for your time.

 

 


davidoster
  • profile picture
  • Member

Posted 03 June 2013 - 08:36 AM

Hello [member=robert] and welcome to the forums.

 

1. assets/grocery_crud/themes/your_theme/css/images

2. follow these instructions, /topic/355-answered-how-to-add-fancybox-in-grocery-crud/#entry1457


Robert
  • profile picture
  • Member

Posted 03 June 2013 - 08:43 AM

Thanks for the quick replay but i try to mod the icon to add text to it, but its only 16:16 even if i make it bigger. Any other way ?


davidoster
  • profile picture
  • Member

Posted 03 June 2013 - 08:53 AM

Change the css then!


davidoster
  • profile picture
  • Member

Posted 03 June 2013 - 08:56 AM

For example this is the css code for

.flexigrid .edit-icon
{
background:url(images/edit.png) no-repeat;
cursor: pointer;
width: 16px;
height:16px;
float:right;
border: none !important;
padding:0px !important;
padding-bottom:0px !important;
margin-left:5px;
display: block;
}

Robert
  • profile picture
  • Member

Posted 03 June 2013 - 09:00 AM

Damn didn't think of that :) thanks a loot and very nice work on the project .. can't wait for the new release :)


davidoster
  • profile picture
  • Member

Posted 03 June 2013 - 09:10 AM

Depending on the theme you use a label is displayed or not.

E.g. the flexigrid theme, http://eletter.gr/samples/gc_ic/index.php/gc_examples/customers_management doesn't show a label

where the datatables theme does, http://eletter.gr/samples/gc_ic/index.php/gc_examples/offices_management

If you go to assets/grocery_crud/themes/your_theme/views/list.php you can change/modify this appeareance.

And for multilingual modifications just go to assets/grocery_crud/languages!


Robert
  • profile picture
  • Member

Posted 03 June 2013 - 11:06 AM

thanks i fix my modification, i have one more question can the add be modified i want to add some radio buttons and so on .. can i modifie it or i need to create new ones. In the documentation i didn't see any info on this.


davidoster
  • profile picture
  • Member

Posted 03 June 2013 - 12:00 PM

Which add do you mean?

The add form and the controls it contains?

If yes, then in order for the form to be fully operational, we use the field_type function. If this is not enough for you then you need to create your own controls and update the appropriate values that save to the database.

 

You might need to inspect also the file add.php under, assets/grocery_crud/themes/your_theme/views


Robert
  • profile picture
  • Member

Posted 03 June 2013 - 12:16 PM

yes that is exactly what i needed, thanks for the help


Robert
  • profile picture
  • Member

Posted 03 June 2013 - 12:28 PM

need a bit more info if someone can help ..

 

 

$crud->field_type('status','dropdown',array('1' => x, '2' => y,'3' => z , '4' => s));

 

 

when making a dropdown field can i get the x,y,z,s from a tabel in the database is that possible ? lets say i need to add country's and i don't want to add them all in code i want to take them from a tabel in DB

 


Robert
  • profile picture
  • Member

Posted 03 June 2013 - 13:46 PM

ok i figure it out .. :)   it was 

$crud->set_relation(x,y,z);

 

 

x- column from the first tabel

y - second tabel 

z - column from the second tabel 

 


Robert
  • profile picture
  • Member

Posted 04 June 2013 - 05:37 AM

Hi all, i have a problem if someone can help me..

I want to make 2 dropmenus like this 1.ax - 2 bx and get info from 1-2 table in DB .. it was to work like this if i select from the dropmenu ax a option in the menu bx to get the options related to what i selected from the first dropmenu .... 

 

example from the first dropmenu i select lets say red in the next menu to have only light dark normal, if i select blue to have diffrent options .. how can i use GC for this and how do i need to modify the tables. thanks for any help.

 

 

Found it ...


Robert
  • profile picture
  • Member

Posted 04 June 2013 - 08:15 AM

Is there a library for advance search functions ? i want to make a search on a table to display all info from date x to date y and so on ....


davidoster
  • profile picture
  • Member

Posted 04 June 2013 - 09:57 AM

Is there a library for advance search functions ? i want to make a search on a table to display all info from date x to date y and so on ....

 

It depends on the theme you use.

Lets say you use the datatables theme.

Check this: http://www.datatables.net/plug-ins/filtering


Robert
  • profile picture
  • Member

Posted 04 June 2013 - 11:27 AM

k thanks, one more question GC can use checkboxes ? i used something like 

 

 

 

 

$crud->callback_field(XXXX,array($this,'add_field_callback_1'));

 

 

function add_field_callback_1()
{
return '  <input type="checkbox" name="xxxxx" value="a1" /> a1
             <input type="checkbox" name="xxxxx" value="a2" /> a2
             <input type="checkbox" name="xxxxx" value="a3" /> a3
             <input type="checkbox" name="xxxxx" value=" a4" /> a4            

            <input type="checkbox" name="xxxxx" value="a5" /> a5';
}

 

with no success .. is there a way to do it without using Multiselect field ?


davidoster
  • profile picture
  • Member

Posted 04 June 2013 - 22:02 PM

Search on the forums. There is a lot of information about it.


Robert
  • profile picture
  • Member

Posted 06 June 2013 - 12:18 PM

I have a new question how can i add info to a field ? lets say i have Name : and in the add box to have somthing like "Add your name here" is there a option for that ? 


davidoster
  • profile picture
  • Member

Posted 06 June 2013 - 13:23 PM

Yes, use the callback_field or callback_add_field or callback_edit_field.


Robert
  • profile picture
  • Member

Posted 06 June 2013 - 13:39 PM

and how will the function look like i'm using 

$crud->set_rules

and a loot more .. i will have to add them all to the new function ? can i have a example ?