Genera cuadros de diálogos.
Modal({
size: 'small',
title: 'Modal test',
content: 'Hello world!',
buttons:[{type:'close',caption:'Close'}]
});
| Nombre | Tipo | Predeterminado | Descripción |
|---|---|---|---|
| type | string | 'default' | Cambia la vista. |
| size | string | 'small' | Cambia el tamaño. Valores: 'x-large', 'large', 'medium', 'small' |
| title | string | ||
| content | string | ||
| footer_html | string | Agrega html al pié del modal. | |
| form | array | undefined | Crea un formulario e incluye sólo elementos ocultos. |
| buttons | array | undefined | Agrega botones. |
| target | object | document.dody | Elemento donde se inserta el modal. |
| overlay | boolean | true | El modal se crea sobre una capa que cubre la página principal. |
| draggagle | boolean | false | El modal puede arrastrarse. |
| destroy | boolean | true | Al cerrar el modal se destruye. |
| onLoad | function | null | Ejecuta la función al cargar el modal. |
| onClose | function | null | Ejecuta la función al cerrar el modal. |
JsRequest.modal({
url: 'media/docs/modal.json',
modalOptions: {
'size': 'large'
}
});