sc_btn_disabled("name_button", "status")
|
|
This macro is intended to dynamically enable or disable a toolbar button.
It has two required parameters:
| Parameters |
Value |
Description |
| name_button |
The value must be informed using variables or in string format, with double or single quotes.
In bold, the example of how the parameter should be reported follows:
sc_btn_disabled('update', 'off');
Note: The name of the buttons should be all in tiny.
|
This parameter sets the button that will have its display changed.
Button names are available in the table below, separated by application.
|
| status |
Like the field name, the parameter accepts only string, with single or double quotation marks.
In bold, the example of how the parameter should be reported follows:
sc_btn_disabled('update', 'off');
|
This parameter sets whether the button is enabled, when set to on, or disabled if set to off
Values accepted in the parameter:
- on - The button will be disabled;
- off - The button will be enabled;
|
Name of Grid buttons
Buttons Name
|
Description |
| first |
Goes to the first page of the grid. |
| back |
Goes to the previous page of the grid. |
| forward |
Goes to the next page of the grid. |
| last |
Goes to the last page of the grid. |
| filter |
Displays the "Filter" button. |
| pdf |
Generates colored PDF. |
| det_pdf |
Generates a detailed PDF. |
| pdfbw |
Generates black and white PDF. |
| xls |
Generates the XLS. |
| xml |
Generates the XML. |
| csv |
Generates the CVS. |
| rtf |
Generates the RTF. |
| word |
Generates the Word. |
| json |
Generates the JSON. |
| print |
Displays the "Print" button in the grid. |
| det_print |
Displays the "Print" button in detail. |
| summary |
Displays the "Summary" button in the grid. |
| new |
Displays the "New" button. (if the application has a link for it, or if the form is running in the grid iframe) |
| insert |
Displays the "Include" button of the form. (only for forms running in grid´s iframe) |
| update |
Displays the "Update" button of the form. (only for forms running in grid´s iframe) |
| delete |
Displays the "Delete" button of the form (only for forms running in grid´s iframe) |
| qsearch |
Displays the "Quick Search" button in the grid. |
| dynsearch |
Displays the "Dynamic Search" button in the grid. |
| gridsave |
Displays the "Save Grid" button in the grid. |
| sel_col |
Select columns button |
| sort_col |
Sort Button |
Name of Form buttons
Buttons Name
|
Description |
| first |
Goes to the first page of the form. |
| back |
Goes to the previous page of the form. |
| forward |
Goes to the next page of the form. |
| last |
Goes to the last page of the form. |
| new |
Displays the "New" button on the form, if it's off the form will starts in insertion mode. |
| insert |
Displays the "Include" button of the form. |
| update |
Displays the "Update" button of the form. |
| delete |
Displays the "Delete" button of the form. |
| copy |
Displays the "Copy" button of the form. |
| pdf |
Generates PDF file from a form. |
| print |
Open the form in print mode. |
| dynsearch |
Displays the "Dynamic Search" button in the grid. |
Name of Control Buttons
Buttons Name
|
Description |
| ok |
Displays the "Ok" button on the control. |
| exit |
Displays the "Exit" button on the control. |
| facebook |
Displays the "Facebook" button on the control. |
| twitter |
Displays the "Twitter" button on the control. |
| google |
Displays the "Google+" button on the control. |
| paypal |
Displays the "PayPal" button on the control. |
Example: Enabling delete button only for admin user
if ( [user_login] == 'admin' ) {
sc_btn_disabled('delete', 'on');
} else {
sc_btn_disabled('delete', 'off');
}
|
Macro Scope
|
calendar application
|
chart application
|
Grid application
|
Form application
|
Control Form
|
onAfterDelete onAfterInsert onAfterUpdate onInit onLoadAll onRefresh onValidate onValidateFailure onValidateSuccess
|
onInit
|
onInit
|
onAfterDelete onAfterDeleteAll onAfterInsert onAfterInsertAll onAfterUpdate onAfterUpdateAll onInit onLoadAll onNavigate onRecord onRefresh onValidate onValidateFailure onValidateSuccess
|
onInit onLoadAll onRefresh onValidate onValidateFailure onValidateSuccess
|
|