de_epages.presentation.ui.tray()
Categories: UI
de_epages.presentation.ui.tray( options )
Plugin: de_epages.presentation.ui.tray
Description: Display the object tray input and button.
-
de_epages.presentation.ui.tray( options )
version added: 6.15.0options A map of additional options pass to the method.
The de_epages.presentation.ui.tray()
method displays an input and a button which enables the user to search for elements
(for example Customer, Products, etc). After the search a dialog is displayed with all results.
In the dialog the user can select elements he wants to insert to the current page or change his search.
The content of the current tray is although displayed and the user can choose if he want to use the content of the tray
or not.
As paremeters for the tray a callback can be defined which gets the selected data from the tray after close. Via the parameter 'additionalContent' it is although possible to add content inside the dialog, this content is although returned to the callback.
additional information for the parameter searchActionsCurrent available actions:
- 'Products': 'JSONSearchProductsToInsert',
- 'Categories': 'JSONSearchCategoriesToInsert'
- 'Customers': 'JSONSearchCustomersToInsert',
- 'Users': 'JSONSearchUsersToInsert'
- 'ShippingMethods': 'JSONSearchShippingMethodsToInsert',
- 'PaymentMethods' : 'JSONSearchPaymentMethodsToInsert'
-
add tray to search for Products and Categories
HTML:
<div class="ep-tay"></div>
Code:
de_epages.presentation.ui.tray({ 'node': $('.ep-tray'), 'inputName': 'NewProduct', 'searchActions': { 'Products': 'JSONSearchProductsToInsert', 'Categories': 'JSONSearchCategoriesToInsert' }, 'useTray': true, callback:function(data){ console.debug('data',data); }, additionalContent: '<input type="checkbox">' });