Welcome Guest, Not a member yet? Register   Sign In
GoPHP RAD lib for Codeigniter
#11

[eluser]usmc[/eluser]
[quote author="cikabiber" date="1251822862"]GoPHP is a set of libraries for Codeigniter that greatly simplifies development of administrative interfaces.
It uses ExtJS javascript library for creating user interface.
With GoPHP you can create a complex fully functional administration for you web applications in a very short time, without a unnecessary hassle.

This is experimental project, in early stage and everybody is welcome to help developing the library :-)

You can download it from here:

http://sourceforge.net/projects/gophp/

Cheers![/quote]

I tested it and it works perfectly. This just made me even lazier (and I thought CI made me lazy).
Good Job. Totally RAD!
#12

[eluser]usmc[/eluser]
You need to add this to your Ext form element JS

Code:
close: (function() {editorWindow.hide();})

Otherwise when you click on the close button (the little x in the right hand corner) the form is destroyed and does not appear again. The behavior should be the same as the cancel button.

Or you could set closable to false on line 536 of extjs_renderer.php.
#13

[eluser]cikabiber[/eluser]
[quote author="usmc" date="1252456386"]You need to add this to your Ext form element JS

Code:
close: (function() {editorWindow.hide();})

Otherwise when you click on the close button (the little x in the right hand corner) the form is destroyed and does not appear again. The behavior should be the same as the cancel button.

Or you could set closable to false on line 536 of extjs_renderer.php.[/quote]

Hi usmc,

i've added
Code:
closeAction: 'hide'
to all window objects. Thank you for posting this bug Smile

New version (0.1.2) has been uploaded.
#14

[eluser]Kirkjoserey[/eluser]
[quote author="cikabiber" date="1252422300"]Hi Kirkjoserey,

i've fixed the textarea functionality, and added label styles (align, padding).

Example:

Code:
$field->type = 'textarea';
$field->width = 230;
$field->height = 70;

From what I know of ExtJS you can't set alignment for single field, you can set those properties on the FormPanel.

In GoPHP you can now define those properties when defining EditorWindow in presentation class.

For example:

Code:
$this->presentation->defineEditorWindow(400, 370, 'Edit employee', array('labelAlign'=>'right','labelPad'=>5) );

I've updated the source (v.0.1.1), help and example.

Thanks for testing Smile

Cheers![/quote]

Questions:

1)
THIS: array('labelAlign'=>'right','labelPad'=>5)

labelAlign is my control name?
In example:
"Price U$S 254.56", where 'labelPrice'=>'right' (ah...labelPrice values is 254.56)


2)When I use Decimal point in numbers: 264.65, what type I use in model ???

a)FLOAT
b)DECIMAL


Thanks in advance.


ah...... http://www.latormenta.net/homes/ (my college curse example)
Is in spanish...sorry ;-) but the idea has NO language. je je

best regards and thanks for GoPHP RAD!
#15

[eluser]cikabiber[/eluser]
[quote author="Kirkjoserey" date="1252521388"]
Questions:

1)
THIS: array('labelAlign'=>'right','labelPad'=>5)

labelAlign is my control name?
In example:
"Price U$S 254.56", where 'labelPrice'=>'right' (ah...labelPrice values is 254.56)


2)When I use Decimal point in numbers: 264.65, what type I use in model ???

a)FLOAT
b)DECIMAL


Thanks in advance.


ah...... http://www.latormenta.net/homes/ (my college curse example)
Is in spanish...sorry ;-) but the idea has NO language. je je

best regards and thanks for GoPHP RAD![/quote]

1. If I understood your question, you need to use the exact array definition as I wrote in my example. Array is a parameter in defineEditorWindow function. I defined this parameter as an array because ExtJS has more label formatting fetaures that I may implement in the future.

Code:
array = (
‘labelAlign’=>(string), // ['left','top','right']
‘labelPad’=>(integer)
)

2. I've used float in my projects, but I plan to better implement numeric fields soon (client validations, etc) :cheese:

Oh, and btw, nice project, thanx for trying the library. I sold a few projects by now, and it is very confortable to maintain them :coolsmile:
#16

[eluser]Kirkjoserey[/eluser]
Quote:1. If I understood your question, you need to use the exact array definition as I wrote in my example. Array is a parameter in defineEditorWindow function. I defined this parameter as an array because ExtJS has more label formatting fetaures that I may implement in the future.

Code:
array = (
‘labelAlign’=>(string), // ['left','top','right']
‘labelPad’=>(integer)
)

2. I've used float in my projects, but I plan to better implement numeric fields soon (client validations, etc) :cheese:

Oh, and btw, nice project, thanx for trying the library. I sold a few projects by now, and it is very confortable to maintain them :coolsmile:

AJAM!!!

1-Ok.

2-Using Float, is like this in Model ???

$this->addField("price", "float", 0); WITH Zero Length ????

thanks!!!

Yeah..it is very very confortable to code with your GoPHP.
#17

[eluser]cikabiber[/eluser]
I used

$this->addField(“price”, “float”, 8);

But I'll improve numeric fields very soon, and document it. I'll notify you.

GoPHP uses very little or no validation for most of settings. So you stick to your database knowledge. If you would set this field size to something else in some db admin tool, you can set the same value in GoPHP.
#18

[eluser]usmc[/eluser]
[quote author="cikabiber" date="1252503565"][quote author="usmc" date="1252456386"]You need to add this to your Ext form element JS

Code:
close: (function() {editorWindow.hide();})

Otherwise when you click on the close button (the little x in the right hand corner) the form is destroyed and does not appear again. The behavior should be the same as the cancel button.

Or you could set closable to false on line 536 of extjs_renderer.php.[/quote]

Hi usmc,

i've added
Code:
closeAction: 'hide'
to all window objects. Thank you for posting this bug Smile

New version (0.1.2) has been uploaded.[/quote]

Thanks for the prompt response. Looking Good.
#19

[eluser]Kirkjoserey[/eluser]
hi...everybody

Now I try to add a new button to the toolbar (actually I have: New,Delete & Search)
I need a "back" button, the help says this:

------------------
function addToolButton($toolButton)
Adds a custom tool button to main list view.
Params:
$toolButton - array(string $icon, string $function)
$icon - url of an icon
$function - javascript function or a command to be triggered
----------------------------------------

I think the code for a new button goes to; my controller file (in this case "Monedas" [Currency]) but when I used the code:

--------------Monedas.php in Controller-------------
$toolButton= array("http://latormenta.net/homes/images/edit.php","Volver");
$this->addToolButton($toolButton);

-Volver is a Javascript function, in my scripts directory in web.


Can you have an example more complete????

Tnks in Advance.

kirkjoserey
#20

[eluser]cikabiber[/eluser]
hi,

you can add custom button with javascript function like this:

Code:
$customToolButton = new CustomToolButton();
$customToolButton->icon = $this->config->item('base_url').'images/back.png';
$customToolButton->text = 'Back';
$customToolButton->handler = "history.go(-1)";
$this->addToolButton($customToolButton);

Also if you need ID value of selected item on grid you can use {!Itemid} keyword:

Code:
$customToolButton = new CustomToolButton();
$customToolButton->icon = $this->config->item('base_url').'images/some_image.png';
$customToolButton->text = 'Click me!';
$customToolButton->handler = "alert('Selected ID: ' + {!Itemid} );";
$this->addToolButton($customToolButton);




Theme © iAndrew 2016 - Forum software by © MyBB