I recently always use the Dialog Panel from YUI which uses the YUI Buttons in it. Each of them uses the separated CSS file. Unfortunately, PHPMaker only includes this YUI Button CSS file in the header of your generated web application, if and only if you are using the Send to Email feature. If you do not use it, then the YUI Button CSS file will never be included in your generated web application. This will cause the style of the Buttons in the YUI Dialog panel will look so ugly, just like the button standard style.
This following modification will overcome the issue, by always including the YUI Button CSS file in your PHPMaker project. This is very useful if you always use the YUI Button CSS file in your PHPMaker project without having to depends on Send to Email feature. We will customize the PHPMaker template for this, so we can use it in our future projects. Now it does make sense to always include this YUI Buttons CSS file if you always use YUI Dialog Panel which mostly also uses YUI Buttons inside.
Updated on February 10, 2013: This customization has been implemented in PHPMaker version 9.2.0, it matches to each other, and as a result, it works properly.
[hidepost]
-
Open your \Script\template.php file, and find this code:
bUseYuiButton = (bUseYuiAddOpt || bUseEmailExport); // Use Yui Button
then replace it with the following code:
bUseYuiButton = true; // Always use YUI Button!
Is that all? Yep!
- Finally, re-generate your script file using PHPMaker, as always.
[/hidepost]
Milver Silva says
I have the following code:
http://www.screencast.com/users/Milver_Silva/folders/Default/media/37f71cf6-ea19-4367-8797-504c04cbb28d
And would like to change only change the color of some custom buttons. To green e.g.
http://www.screencast.com/users/Milver_Silva/folders/Default/media/a780bfe2-54a7-4508-83cf-0c628e1a0fb1
Milver Silva says
Follow the button code:
//Receber Encomenda
if ($this->STATUSENCOMENDA->CurrentValue == 2)
{
$this->ListOptions->Items[“Receber_Encomenda”]->Body = “CODENCOMENDA->CurrentValue.”>Receber/Encomenda“;
}
Masino Sinaga says
What PHPMaker version are you using?
Milver Silva says
v10.0.5 with JUNO Extension
Masino Sinaga says
Please note that Masino Extensions should not be used along with Juno extension.
In addition, I cannot provide you support if you are using another extension. You should either contact the Juno extension author, or modify the extension itself.
Milver Silva says
Okay, but how would the syntax and where I put the code if I was not using the Juno Extension?
Masino Sinaga says
Please upgrade your PHPMaker to latest version, v12 since I cannot support the older version anymore.