|
@@ -32,7 +32,7 @@ if (!class_exists('modal')) {
|
|
|
|
|
|
$modal = "<div id='".($array['id'] ? $array['id'] : 'modal')."' class='modal-window'>\n";
|
|
|
$modal .= " <div>\n";
|
|
|
- $modal .= " <span title=\"".$text['button-close']."\" class='modal-close' onclick=\"modal_close();\">".($array['close'] ? $array['close'] : '×')."</span>\n";
|
|
|
+ $modal .= " <span title=\"".$text['button-close']."\" class='modal-close' onclick=\"modal_close(); ".$array['onclose']."\">×</span>\n";
|
|
|
if ($array['type'] != '') {
|
|
|
//add multi-lingual support
|
|
|
$language = new text;
|
|
@@ -51,11 +51,11 @@ if (!class_exists('modal')) {
|
|
|
$array['title'] = $text['modal_title-confirmation'];
|
|
|
$array['message'] = $text['confirm-delete'];
|
|
|
break;
|
|
|
- default:
|
|
|
- $array['title'] = $array['title'] != '' ? $array['title'] : $text['modal_title-confirmation'];
|
|
|
+ default: //general
|
|
|
+ $array['title'] = $array['title'] ? $array['title'] : $text['modal_title-confirmation'];
|
|
|
}
|
|
|
//prefix cancel button to action
|
|
|
- $array['actions'] = button::create(['type'=>'button','label'=>$text['button-cancel'],'icon'=>$_SESSION['theme']['button_icon_cancel'],'collapse'=>'never','onclick'=>'modal_close();']).$array['actions'];
|
|
|
+ $array['actions'] = button::create(['type'=>'button','label'=>$text['button-cancel'],'icon'=>$_SESSION['theme']['button_icon_cancel'],'collapse'=>'never','onclick'=>'modal_close(); '.$array['onclose']]).$array['actions'];
|
|
|
}
|
|
|
$modal .= $array['title'] ? "<span class='modal-title'>".$array['title']."</span>\n" : null;
|
|
|
$modal .= $array['message'] ? "<span class='modal-message'>".$array['message']."</span>\n" : null;
|