Template, Core Apps: Update to new modal.
This commit is contained in:
parent
52f4626452
commit
97eec1da04
|
|
@ -233,13 +233,17 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
echo " <div class='actions'>\n";
|
||||
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','style'=>'margin-right: 15px;','link'=>'databases.php']);
|
||||
if ($action == 'update' && permission_exists('database_delete')) {
|
||||
echo button::create(['type'=>'submit','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','name'=>'action','value'=>'delete','onclick'=>"if (confirm('".$text['confirm-delete']."')) { document.getElementById('frm').submit(); } else { this.blur(); return false; }",'style'=>'margin-right: 15px;']);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'name'=>'btn_delete','style'=>'margin-right: 15px;','onclick'=>"modal_open('modal-delete','btn_delete');"]);
|
||||
}
|
||||
echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','name'=>'action','value'=>'save']);
|
||||
echo " </div>\n";
|
||||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
if ($action == 'update' && permission_exists('database_delete')) {
|
||||
echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'submit','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','name'=>'action','value'=>'delete','onclick'=>"modal_close();"])]);
|
||||
}
|
||||
|
||||
if ($action == "add") {
|
||||
echo $text['description-database-add']."\n";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,15 +110,24 @@
|
|||
echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'id'=>'btn_add','link'=>'database_edit.php']);
|
||||
}
|
||||
if (permission_exists('database_add') && $databases) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'id'=>'btn_copy','onclick'=>"if (confirm('".$text['confirm-copy']."')) { list_action_set('copy'); list_form_submit('form_list'); } else { this.blur(); return false; }"]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'name'=>'btn_copy','onclick'=>"modal_open('modal-copy','btn_copy');"]);
|
||||
echo modal::create(['id'=>'modal-copy','type'=>'copy','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_copy','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('copy'); list_form_submit('form_list');"])]);
|
||||
}
|
||||
if (permission_exists('database_delete') && $databases) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','onclick'=>"if (confirm('".$text['confirm-delete']."')) { list_action_set('delete'); list_form_submit('form_list'); } else { this.blur(); return false; }"]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'name'=>'btn_delete','onclick'=>"modal_open('modal-delete','btn_delete');"]);
|
||||
echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('delete'); list_form_submit('form_list');"])]);
|
||||
}
|
||||
echo " </div>\n";
|
||||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
if (permission_exists('database_add') && $databases) {
|
||||
echo modal::create(['id'=>'modal-copy','type'=>'copy','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_copy','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('copy'); list_form_submit('form_list');"])]);
|
||||
}
|
||||
if (permission_exists('database_delete') && $databases) {
|
||||
echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('delete'); list_form_submit('form_list');"])]);
|
||||
}
|
||||
|
||||
echo $text['description-databases']."\n";
|
||||
echo "<br /><br />\n";
|
||||
|
||||
|
|
|
|||
|
|
@ -183,10 +183,10 @@
|
|||
}
|
||||
}
|
||||
if (permission_exists('default_setting_edit') && $default_settings) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-toggle'],'icon'=>$_SESSION['theme']['button_icon_toggle'],'id'=>'btn_toggle','onclick'=>"if (confirm('".$text['confirm-toggle']."')) { list_action_set('toggle'); list_form_submit('form_list'); } else { this.blur(); return false; }"]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-toggle'],'icon'=>$_SESSION['theme']['button_icon_toggle'],'name'=>'btn_toggle','onclick'=>"modal_open('modal-toggle','btn_toggle');"]);
|
||||
}
|
||||
if (permission_exists('default_setting_delete') && $default_settings) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','onclick'=>"if (confirm('".$text['confirm-delete']."')) { list_action_set('delete'); list_form_submit('form_list'); } else { this.blur(); return false; }"]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'name'=>'btn_delete','onclick'=>"modal_open('modal-delete','btn_delete');"]);
|
||||
}
|
||||
echo "<form id='form_search' class='inline' method='get'>\n";
|
||||
if (is_array($categories) && @sizeof($categories) != 0) {
|
||||
|
|
@ -211,6 +211,13 @@
|
|||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
if (permission_exists('default_setting_edit') && $default_settings) {
|
||||
echo modal::create(['id'=>'modal-toggle','type'=>'toggle','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_toggle','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('toggle'); list_form_submit('form_list');"])]);
|
||||
}
|
||||
if (permission_exists('default_setting_delete') && $default_settings) {
|
||||
echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('delete'); list_form_submit('form_list');"])]);
|
||||
}
|
||||
|
||||
echo $text['description-default_settings']."\n";
|
||||
echo "<br /><br />\n";
|
||||
|
||||
|
|
|
|||
|
|
@ -162,15 +162,23 @@
|
|||
echo button::create(['type'=>'button','label'=>$text['button-paste'],'icon'=>$_SESSION['theme']['button_icon_paste'],'id'=>'btn_paste','style'=>'display: none;','onclick'=>"if (confirm('".$text['confirm-copy']."')) { list_action_set('copy'); list_form_submit('form_list'); } else { this.blur(); return false; }"]);
|
||||
}
|
||||
if (permission_exists('domain_setting_edit') && $num_rows) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-toggle'],'icon'=>$_SESSION['theme']['button_icon_toggle'],'id'=>'btn_toggle','onclick'=>"if (confirm('".$text['confirm-toggle']."')) { list_action_set('toggle'); list_form_submit('form_list'); } else { this.blur(); return false; }"]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-toggle'],'icon'=>$_SESSION['theme']['button_icon_toggle'],'name'=>'btn_toggle','onclick'=>"modal_open('modal-toggle','btn_toggle');"]);
|
||||
}
|
||||
if (permission_exists('domain_setting_delete') && $num_rows) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','onclick'=>"if (confirm('".$text['confirm-delete']."')) { list_action_set('delete'); list_form_submit('form_list'); } else { this.blur(); return false; }"]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'name'=>'btn_delete','onclick'=>"modal_open('modal-delete-settings','btn_delete_settings');"]);
|
||||
echo modal::create(['id'=>'modal-delete-settings','type'=>'delete','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete_settings','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('delete'); list_form_submit('form_list');"])]);
|
||||
}
|
||||
echo " </div>\n";
|
||||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
if (permission_exists('domain_setting_edit') && $num_rows) {
|
||||
echo modal::create(['id'=>'modal-toggle','type'=>'toggle','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_toggle','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('toggle'); list_form_submit('form_list');"])]);
|
||||
}
|
||||
if (permission_exists('domain_setting_delete') && $num_rows) {
|
||||
echo modal::create(['id'=>'modal-delete-settings','type'=>'delete','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete_settings','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('delete'); list_form_submit('form_list');"])]);
|
||||
}
|
||||
|
||||
echo $text['header_description-domain_settings']."\n";
|
||||
echo "<br /><br />\n";
|
||||
|
||||
|
|
|
|||
|
|
@ -605,7 +605,7 @@
|
|||
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','style'=>'margin-right: 15px;','link'=>'domains.php']);
|
||||
}
|
||||
if (permission_exists('domain_delete') && is_array($_SESSION['domains']) && @sizeof($_SESSION['domains']) > 1 && $domain_uuid != $_SESSION['domain_uuid']) {
|
||||
echo button::create(['type'=>'submit','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'name'=>'action','value'=>'delete','onclick'=>"if (confirm('".$text['confirm-delete']."')) { document.getElementById('frm').submit(); } else { this.blur(); return false; }"]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'onclick'=>"modal_open('modal-delete-domain','btn_delete_domain');"]);
|
||||
}
|
||||
if (permission_exists("domain_select") && is_array($_SESSION['domains']) && @sizeof($_SESSION['domains']) > 1) {
|
||||
echo "<select id='domains' class='formfld' style='width: auto;' onchange=\"window.location.href='?id=' + document.getElementById('domains').options[document.getElementById('domains').selectedIndex].value;\">\n";
|
||||
|
|
@ -623,6 +623,10 @@
|
|||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
if (permission_exists('domain_delete') && is_array($_SESSION['domains']) && @sizeof($_SESSION['domains']) > 1 && $domain_uuid != $_SESSION['domain_uuid']) {
|
||||
echo modal::create(['id'=>'modal-delete-domain','type'=>'delete','actions'=>button::create(['type'=>'submit','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete_domain','style'=>'float: right; margin-left: 15px;','collapse'=>'never','name'=>'action','value'=>'delete','onclick'=>"modal_close();"])]);
|
||||
}
|
||||
|
||||
if ($action == "update") {
|
||||
echo $text['description-domain-edit']."\n";
|
||||
}
|
||||
|
|
@ -687,4 +691,4 @@
|
|||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
@ -187,10 +187,10 @@
|
|||
echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'id'=>'btn_add','link'=>'domain_edit.php']);
|
||||
}
|
||||
if (permission_exists('domain_edit') && $domains) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-toggle'],'icon'=>$_SESSION['theme']['button_icon_toggle'],'id'=>'btn_toggle','onclick'=>"if (confirm('".$text['confirm-toggle']."')) { list_action_set('toggle'); list_form_submit('form_list'); } else { this.blur(); return false; }"]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-toggle'],'icon'=>$_SESSION['theme']['button_icon_toggle'],'name'=>'btn_toggle','onclick'=>"modal_open('modal-toggle','btn_toggle');"]);
|
||||
}
|
||||
if (permission_exists('domain_delete') && $domains) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','onclick'=>"if (confirm('".$text['confirm-delete']."')) { list_action_set('delete'); list_form_submit('form_list'); } else { this.blur(); return false; }"]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'name'=>'btn_delete_domain','onclick'=>"modal_open('modal-delete','btn_delete_domain');"]);
|
||||
}
|
||||
echo "<form id='form_search' class='inline' method='get'>\n";
|
||||
echo "<input type='text' class='txt list-search' name='search' id='search' value=\"".escape($search)."\" placeholder=\"".$text['label-search']."\" onkeydown='list_search_reset();'>";
|
||||
|
|
@ -204,6 +204,13 @@
|
|||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
if (permission_exists('domain_edit') && $domains) {
|
||||
echo modal::create(['id'=>'modal-toggle','type'=>'toggle','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_toggle','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('toggle'); list_form_submit('form_list');"])]);
|
||||
}
|
||||
if (permission_exists('domain_delete') && $domains) {
|
||||
echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete_domain','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('delete'); list_form_submit('form_list');"])]);
|
||||
}
|
||||
|
||||
echo $text['description-domains']."\n";
|
||||
echo "<br /><br />\n";
|
||||
|
||||
|
|
|
|||
|
|
@ -197,11 +197,11 @@
|
|||
}
|
||||
$button_margin = 'margin-left: 15px;';
|
||||
if ($action == 'update' && permission_exists('group_add')) {
|
||||
echo button::create(['type'=>'submit','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'id'=>'btn_copy','name'=>'action','value'=>'copy','style'=>$button_margin,'onclick'=>"if (confirm('".$text['confirm-copy']."')) { document.getElementById('frm').submit(); } else { this.blur(); return false; }"]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'name'=>'btn_copy','style'=>$button_margin,'onclick'=>"modal_open('modal-copy','btn_copy');"]);
|
||||
unset($button_margin);
|
||||
}
|
||||
if ($action == 'update' && permission_exists('group_delete')) {
|
||||
echo button::create(['type'=>'submit','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','name'=>'action','value'=>'delete','style'=>$button_margin,'onclick'=>"if (confirm('".$text['confirm-delete']."')) { document.getElementById('frm').submit(); } else { this.blur(); return false; }"]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'name'=>'btn_delete','style'=>$button_margin,'onclick'=>"modal_open('modal-delete','btn_delete');"]);
|
||||
unset($button_margin);
|
||||
}
|
||||
echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','style'=>'margin-left: 15px;']);
|
||||
|
|
@ -209,6 +209,13 @@
|
|||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
if ($action == 'update' && permission_exists('group_add')) {
|
||||
echo modal::create(['id'=>'modal-copy','type'=>'copy','actions'=>button::create(['type'=>'submit','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_copy','style'=>'float: right; margin-left: 15px;','collapse'=>'never','name'=>'action','value'=>'copy','onclick'=>"modal_close();"])]);
|
||||
}
|
||||
if ($action == 'update' && permission_exists('group_delete')) {
|
||||
echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'submit','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','name'=>'action','value'=>'delete','onclick'=>"modal_close();"])]);
|
||||
}
|
||||
|
||||
echo $text['description-groups']."\n";
|
||||
echo "<br /><br />\n";
|
||||
|
||||
|
|
|
|||
|
|
@ -168,12 +168,16 @@
|
|||
echo " </form>";
|
||||
}
|
||||
if (permission_exists('group_member_delete') && $result) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','collapse'=>'hide-xs','onclick'=>"if (confirm('".$text['confirm-delete']."')) { list_action_set('delete'); list_form_submit('form_list'); } else { this.blur(); return false; }"]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'name'=>'btn_delete','collapse'=>'hide-xs','onclick'=>"modal_open('modal-delete','btn_delete');"]);
|
||||
}
|
||||
echo " </div>\n";
|
||||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
if (permission_exists('group_member_delete') && $result) {
|
||||
echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('delete'); list_form_submit('form_list');"])]);
|
||||
}
|
||||
|
||||
echo "<form id='form_list' method='post'>\n";
|
||||
echo "<input type='hidden' id='action' name='action' value=''>\n";
|
||||
echo "<input type='hidden' name='group_uuid' value='".escape($group_uuid)."'>\n";
|
||||
|
|
|
|||
|
|
@ -156,13 +156,13 @@
|
|||
echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'id'=>'btn_add','link'=>'group_edit.php']);
|
||||
}
|
||||
if (permission_exists('group_add') && $groups) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'id'=>'btn_copy','onclick'=>"if (confirm('".$text['confirm-copy']."')) { list_action_set('copy'); list_form_submit('form_list'); } else { this.blur(); return false; }"]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'name'=>'btn_copy','onclick'=>"modal_open('modal-copy','btn_copy');"]);
|
||||
}
|
||||
if (permission_exists('group_edit') && $groups) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-toggle'],'icon'=>$_SESSION['theme']['button_icon_toggle'],'id'=>'btn_toggle','onclick'=>"if (confirm('".$text['confirm-toggle']."')) { list_action_set('toggle'); list_form_submit('form_list'); } else { this.blur(); return false; }"]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-toggle'],'icon'=>$_SESSION['theme']['button_icon_toggle'],'name'=>'btn_toggle','onclick'=>"modal_open('modal-toggle','btn_toggle');"]);
|
||||
}
|
||||
if (permission_exists('group_delete') && $groups) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','onclick'=>"if (confirm('".$text['confirm-delete']."')) { list_action_set('delete'); list_form_submit('form_list'); } else { this.blur(); return false; }"]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'name'=>'btn_delete','onclick'=>"modal_open('modal-delete','btn_delete');"]);
|
||||
}
|
||||
echo "<form id='form_search' class='inline' method='get'>\n";
|
||||
if (permission_exists('group_all')) {
|
||||
|
|
@ -184,6 +184,16 @@
|
|||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
if (permission_exists('group_add') && $groups) {
|
||||
echo modal::create(['id'=>'modal-copy','type'=>'copy','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_copy','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('copy'); list_form_submit('form_list');"])]);
|
||||
}
|
||||
if (permission_exists('group_edit') && $groups) {
|
||||
echo modal::create(['id'=>'modal-toggle','type'=>'toggle','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_toggle','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('toggle'); list_form_submit('form_list');"])]);
|
||||
}
|
||||
if (permission_exists('group_delete') && $groups) {
|
||||
echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('delete'); list_form_submit('form_list');"])]);
|
||||
}
|
||||
|
||||
echo $text['description-groups']."\n";
|
||||
echo "<br /><br />\n";
|
||||
|
||||
|
|
|
|||
|
|
@ -110,12 +110,6 @@
|
|||
if (permission_exists('menu_add')) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'id'=>'btn_add','link'=>'menu_edit.php']);
|
||||
}
|
||||
//if (permission_exists('menu_add') && $menus) {
|
||||
// echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'id'=>'btn_copy','onclick'=>"if (confirm('".$text['confirm-copy']."')) { list_action_set('copy'); list_form_submit('form_list'); } else { this.blur(); return false; }"]);
|
||||
//}
|
||||
//if (permission_exists('menu_edit') && $menus) {
|
||||
// echo button::create(['type'=>'button','label'=>$text['button-toggle'],'icon'=>$_SESSION['theme']['button_icon_toggle'],'id'=>'btn_toggle','onclick'=>"if (confirm('".$text['confirm-toggle']."')) { list_action_set('toggle'); list_form_submit('form_list'); } else { this.blur(); return false; }"]);
|
||||
//}
|
||||
if (permission_exists('menu_delete') && $menus) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','onclick'=>"if (confirm('".$text['confirm-delete']."')) { list_action_set('delete'); list_form_submit('form_list'); } else { this.blur(); return false; }"]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -239,15 +239,22 @@ function build_db_child_menu_list ($db, $menu_item_level, $menu_item_uuid) {
|
|||
echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'id'=>'btn_add','collapse'=>'hide-xs','link'=>'menu_item_edit.php?id='.urlencode($menu_uuid)]);
|
||||
}
|
||||
if (permission_exists('menu_item_edit') && $result) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-toggle'],'icon'=>$_SESSION['theme']['button_icon_toggle'],'id'=>'btn_toggle','onclick'=>"if (confirm('".$text['confirm-toggle']."')) { list_action_set('toggle'); list_form_submit('form_list'); } else { this.blur(); return false; }"]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-toggle'],'icon'=>$_SESSION['theme']['button_icon_toggle'],'name'=>'btn_toggle','onclick'=>"modal_open('modal-toggle','btn_toggle');"]);
|
||||
}
|
||||
if (permission_exists('menu_item_delete') && $result) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','collapse'=>'hide-xs','onclick'=>"if (confirm('".$text['confirm-delete']."')) { list_action_set('delete'); list_form_submit('form_list'); } else { this.blur(); return false; }"]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'name'=>'btn_delete','collapse'=>'hide-xs','onclick'=>"modal_open('modal-delete','btn_delete');"]);
|
||||
}
|
||||
echo " </div>\n";
|
||||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
if (permission_exists('menu_item_edit') && $result) {
|
||||
echo modal::create(['id'=>'modal-toggle','type'=>'toggle','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_toggle','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('toggle'); list_form_submit('form_list');"])]);
|
||||
}
|
||||
if (permission_exists('menu_item_delete') && $result) {
|
||||
echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('delete'); list_form_submit('form_list');"])]);
|
||||
}
|
||||
|
||||
echo "<table class='list'>\n";
|
||||
echo " <tr class='list-header'>";
|
||||
if (permission_exists('menu_item_edit') || permission_exists('menu_item_delete')) {
|
||||
|
|
|
|||
|
|
@ -365,7 +365,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
echo "</div>\n";
|
||||
echo " <div class='actions'>\n";
|
||||
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'style'=>'margin-right: 15px;','link'=>'/core/users/user_edit.php?id='.urlencode($user_uuid)]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'onclick'=>'submit_form();']);
|
||||
echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save']);
|
||||
echo " </div>\n";
|
||||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
|
|
|
|||
|
|
@ -155,15 +155,22 @@
|
|||
echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'id'=>'btn_add','link'=>PROJECT_PATH.'/core/user_settings/user_setting_edit.php?user_uuid='.urlencode($_GET['id'])]);
|
||||
}
|
||||
if (permission_exists('user_setting_edit') && $user_settings) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-toggle'],'icon'=>$_SESSION['theme']['button_icon_toggle'],'id'=>'btn_toggle','onclick'=>"if (confirm('".$text['confirm-toggle']."')) { list_action_set('toggle'); list_form_submit('form_list'); } else { this.blur(); return false; }"]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-toggle'],'icon'=>$_SESSION['theme']['button_icon_toggle'],'name'=>'btn_toggle','onclick'=>"modal_open('modal-toggle','btn_toggle');"]);
|
||||
}
|
||||
if (permission_exists('user_setting_delete') && $user_settings) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','onclick'=>"if (confirm('".$text['confirm-delete']."')) { list_action_set('delete'); list_form_submit('form_list'); } else { this.blur(); return false; }"]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'name'=>'btn_delete','onclick'=>"modal_open('modal-delete','btn_delete');"]);
|
||||
}
|
||||
echo " </div>\n";
|
||||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
if (permission_exists('user_setting_edit') && $user_settings) {
|
||||
echo modal::create(['id'=>'modal-toggle','type'=>'toggle','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_toggle','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('toggle'); list_form_submit('form_list');"])]);
|
||||
}
|
||||
if (permission_exists('user_setting_delete') && $user_settings) {
|
||||
echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('delete'); list_form_submit('form_list');"])]);
|
||||
}
|
||||
|
||||
echo $text['header_description-user_settings']."\n";
|
||||
echo "<br /><br />\n";
|
||||
|
||||
|
|
|
|||
|
|
@ -175,13 +175,13 @@
|
|||
echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'id'=>'btn_add','link'=>'user_edit.php']);
|
||||
}
|
||||
if (permission_exists('user_add') && $users) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'id'=>'btn_copy','onclick'=>"if (confirm('".$text['confirm-copy']."')) { list_action_set('copy'); list_form_submit('form_list'); } else { this.blur(); return false; }"]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'name'=>'btn_copy','onclick'=>"modal_open('modal-copy','btn_copy');"]);
|
||||
}
|
||||
if (permission_exists('user_edit') && $users) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-toggle'],'icon'=>$_SESSION['theme']['button_icon_toggle'],'id'=>'btn_toggle','onclick'=>"if (confirm('".$text['confirm-toggle']."')) { list_action_set('toggle'); list_form_submit('form_list'); } else { this.blur(); return false; }"]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-toggle'],'icon'=>$_SESSION['theme']['button_icon_toggle'],'name'=>'btn_toggle','onclick'=>"modal_open('modal-toggle','btn_toggle');"]);
|
||||
}
|
||||
if (permission_exists('user_delete') && $users) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','onclick'=>"if (confirm('".$text['confirm-delete']."')) { list_action_set('delete'); list_form_submit('form_list'); } else { this.blur(); return false; }"]);
|
||||
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'name'=>'btn_delete','onclick'=>"modal_open('modal-delete','btn_delete');"]);
|
||||
}
|
||||
echo "<form id='form_search' class='inline' method='get'>\n";
|
||||
if (permission_exists('user_all')) {
|
||||
|
|
@ -203,6 +203,16 @@
|
|||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
if (permission_exists('user_add') && $users) {
|
||||
echo modal::create(['id'=>'modal-copy','type'=>'copy','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_copy','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('copy'); list_form_submit('form_list');"])]);
|
||||
}
|
||||
if (permission_exists('user_edit') && $users) {
|
||||
echo modal::create(['id'=>'modal-toggle','type'=>'toggle','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_toggle','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('toggle'); list_form_submit('form_list');"])]);
|
||||
}
|
||||
if (permission_exists('user_delete') && $users) {
|
||||
echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('delete'); list_form_submit('form_list');"])]);
|
||||
}
|
||||
|
||||
echo $text['description-users']."\n";
|
||||
echo "<br /><br />\n";
|
||||
|
||||
|
|
|
|||
|
|
@ -409,8 +409,8 @@ $text['message-unsupported_file_type']['ru-ru'] = "Тип файла не под
|
|||
$text['message-unsupported_file_type']['sv-se'] = "Inte stöds filtyp";
|
||||
$text['message-unsupported_file_type']['uk-ua'] = "Тип файлу не підтримується";
|
||||
|
||||
$text['confirm-delete']['en-us'] = "Do you really want to delete this?";
|
||||
$text['confirm-delete']['en-gb'] = "Do you really want to delete this?";
|
||||
$text['confirm-delete']['en-us'] = "Do you really want to DELETE this?";
|
||||
$text['confirm-delete']['en-gb'] = "Do you really want to DELETE this?";
|
||||
$text['confirm-delete']['ar-eg'] = "هل تريد حقا أن تحذف هذا؟";
|
||||
$text['confirm-delete']['de-at'] = "Wollen Sie das wirklich löschen?"; //copied from de-de
|
||||
$text['confirm-delete']['de-ch'] = "Wollen Sie das wirklich löschen?"; //copied from de-de
|
||||
|
|
@ -432,8 +432,8 @@ $text['confirm-delete']['sv-se'] = "Vill du verkligen ta bort detta?";
|
|||
$text['confirm-delete']['uk-ua'] = "Ви дійсно бажаєте це видалити?";
|
||||
$text['confirm-delete']['tr-tr'] = "Bunu gerçekten silmek istiyor musunuz?";
|
||||
|
||||
$text['confirm-copy']['en-us'] = "Do you really want to copy this?";
|
||||
$text['confirm-copy']['en-gb'] = "Do you really want to copy this?";
|
||||
$text['confirm-copy']['en-us'] = "Do you really want to COPY this?";
|
||||
$text['confirm-copy']['en-gb'] = "Do you really want to COPY this?";
|
||||
$text['confirm-copy']['ar-eg'] = "";
|
||||
$text['confirm-copy']['de-at'] = "Wollen Sie das wirklich kopieren?"; //copied from de-de
|
||||
$text['confirm-copy']['de-ch'] = "Wollen Sie das wirklich kopieren?"; //copied from de-de
|
||||
|
|
@ -455,28 +455,28 @@ $text['confirm-copy']['sv-se'] = "Vill du verkligen kopiera detta?";
|
|||
$text['confirm-copy']['uk-ua'] = "";
|
||||
$text['confirm-copy']['tr-tr'] = "Bunu gerçekten kopyalamak istiyor musunuz?";
|
||||
|
||||
$text['confirm-toggle']['en-us'] = "Do you really want to toggle this?";
|
||||
$text['confirm-toggle']['en-gb'] = "Do you really want to toggle this?";
|
||||
$text['confirm-toggle']['ar-eg'] = "Do you really want to toggle this?";
|
||||
$text['confirm-toggle']['de-at'] = "Do you really want to toggle this?";
|
||||
$text['confirm-toggle']['de-ch'] = "Do you really want to toggle this?";
|
||||
$text['confirm-toggle']['de-de'] = "Do you really want to toggle this?";
|
||||
$text['confirm-toggle']['el-gr'] = "Do you really want to toggle this?";
|
||||
$text['confirm-toggle']['es-cl'] = "Do you really want to toggle this?";
|
||||
$text['confirm-toggle']['es-mx'] = "Do you really want to toggle this?";
|
||||
$text['confirm-toggle']['fr-ca'] = "Do you really want to toggle this?";
|
||||
$text['confirm-toggle']['fr-fr'] = "Do you really want to toggle this?";
|
||||
$text['confirm-toggle']['he-il'] = "Do you really want to toggle this?";
|
||||
$text['confirm-toggle']['it-it'] = "Do you really want to toggle this?";
|
||||
$text['confirm-toggle']['nl-nl'] = "Do you really want to toggle this?";
|
||||
$text['confirm-toggle']['pl-pl'] = "Do you really want to toggle this?";
|
||||
$text['confirm-toggle']['en-us'] = "Do you really want to TOGGLE this?";
|
||||
$text['confirm-toggle']['en-gb'] = "Do you really want to TOGGLE this?";
|
||||
$text['confirm-toggle']['ar-eg'] = "Do you really want to TOGGLE this?";
|
||||
$text['confirm-toggle']['de-at'] = "Do you really want to TOGGLE this?";
|
||||
$text['confirm-toggle']['de-ch'] = "Do you really want to TOGGLE this?";
|
||||
$text['confirm-toggle']['de-de'] = "Do you really want to TOGGLE this?";
|
||||
$text['confirm-toggle']['el-gr'] = "Do you really want to TOGGLE this?";
|
||||
$text['confirm-toggle']['es-cl'] = "Do you really want to TOGGLE this?";
|
||||
$text['confirm-toggle']['es-mx'] = "Do you really want to TOGGLE this?";
|
||||
$text['confirm-toggle']['fr-ca'] = "Do you really want to TOGGLE this?";
|
||||
$text['confirm-toggle']['fr-fr'] = "Do you really want to TOGGLE this?";
|
||||
$text['confirm-toggle']['he-il'] = "Do you really want to TOGGLE this?";
|
||||
$text['confirm-toggle']['it-it'] = "Do you really want to TOGGLE this?";
|
||||
$text['confirm-toggle']['nl-nl'] = "Do you really want to TOGGLE this?";
|
||||
$text['confirm-toggle']['pl-pl'] = "Do you really want to TOGGLE this?";
|
||||
$text['confirm-toggle']['pt-br'] = "Deseja realmente alterar?";
|
||||
$text['confirm-toggle']['pt-pt'] = "Do you really want to toggle this?";
|
||||
$text['confirm-toggle']['ro-ro'] = "Do you really want to toggle this?";
|
||||
$text['confirm-toggle']['ru-ru'] = "Do you really want to toggle this?";
|
||||
$text['confirm-toggle']['sv-se'] = "Do you really want to toggle this?";
|
||||
$text['confirm-toggle']['uk-ua'] = "Do you really want to toggle this?";
|
||||
$text['confirm-toggle']['tr-tr'] = "Do you really want to toggle this?";
|
||||
$text['confirm-toggle']['pt-pt'] = "Do you really want to TOGGLE this?";
|
||||
$text['confirm-toggle']['ro-ro'] = "Do you really want to TOGGLE this?";
|
||||
$text['confirm-toggle']['ru-ru'] = "Do you really want to TOGGLE this?";
|
||||
$text['confirm-toggle']['sv-se'] = "Do you really want to TOGGLE this?";
|
||||
$text['confirm-toggle']['uk-ua'] = "Do you really want to TOGGLE this?";
|
||||
$text['confirm-toggle']['tr-tr'] = "Do you really want to TOGGLE this?";
|
||||
|
||||
$text['button-apply']['en-us'] = "Apply";
|
||||
$text['button-apply']['en-gb'] = "Apply";
|
||||
|
|
|
|||
|
|
@ -1051,7 +1051,7 @@ if (!class_exists('menu')) {
|
|||
if (isset($_SESSION['username']) && $_SESSION['username'] != '' && $_SESSION['theme']['logout_icon_visible']['text'] == "true") {
|
||||
$username_full = $_SESSION['username'].((count($_SESSION['domains']) > 1) ? "@".$_SESSION["user_context"] : null);
|
||||
$html .= " <li class='nav-item'>\n";
|
||||
$html .= " <a class='nav-link logout_icon' href='".PROJECT_PATH."/logout.php' title=\"".$text['theme-label-logout']."\" onclick=\"return confirm('".$this->text['theme-confirm-logout']."')\"><span class='fas fa-sign-out-alt'></span></a>";
|
||||
$html .= " <a class='nav-link logout_icon' href='#' title=\"".$this->text['theme-label-logout']."\" onclick=\"modal_open('modal-logout','btn_logout');\"><span class='fas fa-sign-out-alt'></span></a>";
|
||||
$html .= " </li>\n";
|
||||
unset($username_full);
|
||||
}
|
||||
|
|
@ -1061,6 +1061,11 @@ if (!class_exists('menu')) {
|
|||
$html .= " </div>\n";
|
||||
$html .= "</nav>\n";
|
||||
|
||||
//modal for logout icon (above)
|
||||
if (isset($_SESSION['username']) && $_SESSION['username'] != '' && $_SESSION['theme']['logout_icon_visible']['text'] == "true") {
|
||||
$html .= modal::create(['id'=>'modal-logout','type'=>'general','message'=>$this->text['theme-confirm-logout'],'actions'=>button::create(['type'=>'button','label'=>$this->text['theme-label-logout'],'icon'=>'sign-out-alt','id'=>'btn_logout','style'=>'float: right; margin-left: 15px;','collapse'=>'never','link'=>PROJECT_PATH.'/logout.php','onclick'=>"modal_close();"])]);
|
||||
}
|
||||
|
||||
return $html;
|
||||
unset($html);
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Copyright (C) 2010 - 2019
|
||||
Copyright (C) 2010 - 2020
|
||||
All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
|
@ -32,7 +32,7 @@ if (!class_exists('modal')) {
|
|||
|
||||
$modal = "<div id='".($array['id'] ? $array['id'] : 'modal')."' class='modal-window'>\n";
|
||||
$modal .= " <div>\n";
|
||||
$modal .= " <a href='#' title=\"".$text['button-close']."\" class='modal-close'>".($array['close'] ? $array['close'] : '×')."</a>\n";
|
||||
$modal .= " <span title=\"".$text['button-close']."\" class='modal-close' onclick=\"modal_close();\">".($array['close'] ? $array['close'] : '×')."</span>\n";
|
||||
if ($array['type'] != '') {
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
|
|
@ -51,6 +51,8 @@ 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'];
|
||||
}
|
||||
//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'];
|
||||
|
|
@ -69,4 +71,4 @@ if (!class_exists('modal')) {
|
|||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
@ -78,7 +78,7 @@
|
|||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text_default = $language->get();
|
||||
$text_application = $language->get(null,'themes/default');
|
||||
$text_application = $language->get(null,'themes/'.$_SESSION['domain']['template']['name']);
|
||||
$text = array_merge($text_default, $text_application);
|
||||
|
||||
//set template variables
|
||||
|
|
|
|||
|
|
@ -2609,11 +2609,6 @@ header('Expires: '.gmdate('D, d M Y H:i:s',time()+3600).' GMT');
|
|||
background-color: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.modal-window:target {
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.modal-window > div {
|
||||
position: relative;
|
||||
padding: 15px 20px 20px 20px;
|
||||
|
|
@ -2657,6 +2652,7 @@ header('Expires: '.gmdate('D, d M Y H:i:s',time()+3600).' GMT');
|
|||
width: 50px;
|
||||
text-align: center;
|
||||
text-decoration: none !important;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.modal-close:hover {
|
||||
|
|
|
|||
|
|
@ -57,8 +57,8 @@
|
|||
//message bar display
|
||||
{literal}
|
||||
function display_message(msg, mood, delay) {
|
||||
mood = typeof mood !== 'undefined' ? mood : 'default';
|
||||
delay = typeof delay !== 'undefined' ? delay : {/literal}{$settings.theme.message_delay}{literal};
|
||||
mood = mood !== undefined ? mood : 'default';
|
||||
delay = delay !== undefined ? delay : {/literal}{$settings.theme.message_delay}{literal};
|
||||
if (msg !== '') {
|
||||
var message_text = $(document.createElement('div'));
|
||||
message_text.addClass('message_text message_mood_'+mood);
|
||||
|
|
@ -287,12 +287,12 @@
|
|||
{literal}
|
||||
if (e.which == 45 && !(e.target.tagName == 'INPUT' && e.target.type == 'text') && e.target.tagName != 'TEXTAREA') {
|
||||
e.preventDefault();
|
||||
var list_add_button;
|
||||
list_add_button = document.getElementById('btn_add');
|
||||
if (list_add_button === null || list_add_button === 'undefined') {
|
||||
list_add_button = document.querySelector('button[name=btn_add]');
|
||||
var add_button;
|
||||
add_button = document.getElementById('btn_add');
|
||||
if (add_button === null || add_button === undefined) {
|
||||
add_button = document.querySelector('button[name=btn_add]');
|
||||
}
|
||||
if (list_add_button !== null) { list_add_button.click(); }
|
||||
if (add_button !== null) { add_button.click(); }
|
||||
}
|
||||
{/literal}
|
||||
{/if}
|
||||
|
|
@ -302,22 +302,21 @@
|
|||
{literal}
|
||||
if (e.which == 46 && !(e.target.tagName == 'INPUT' && e.target.type == 'text') && e.target.tagName != 'TEXTAREA') {
|
||||
e.preventDefault();
|
||||
if (list_checkboxes.length !== 0) {
|
||||
var list_delete_button;
|
||||
list_delete_button = document.querySelector('button[name=btn_delete]');
|
||||
if (list_delete_button === null || list_delete_button === 'undefined') {
|
||||
list_delete_button = document.getElementById('btn_delete');
|
||||
}
|
||||
if (list_delete_button !== null) { list_delete_button.click(); }
|
||||
}
|
||||
else {
|
||||
var edit_delete_button;
|
||||
edit_delete_button = document.querySelector('button[name=btn_delete]');
|
||||
if (edit_delete_button === null || edit_delete_button === 'undefined') {
|
||||
edit_delete_button = document.getElementById('btn_delete');
|
||||
}
|
||||
if (edit_delete_button !== null) { edit_delete_button.click(); }
|
||||
var delete_button;
|
||||
delete_button = document.querySelector('button[name=btn_delete]');
|
||||
if (delete_button === null || delete_button === undefined) {
|
||||
delete_button = document.getElementById('btn_delete');
|
||||
}
|
||||
if (delete_button !== null) { delete_button.click(); }
|
||||
}
|
||||
{/literal}
|
||||
{/if}
|
||||
|
||||
//key: [space], list,edit:prevent default space key behavior when opening toggle confirmation (which would automatically *click* the focused continue button on key-up)
|
||||
{if $settings.theme.keyboard_shortcut_toggle_enabled}
|
||||
{literal}
|
||||
if (e.which == 32 && e.target.id == 'btn_toggle') {
|
||||
e.preventDefault();
|
||||
}
|
||||
{/literal}
|
||||
{/if}
|
||||
|
|
@ -335,14 +334,14 @@
|
|||
//key: [space], list: to toggle checked - note: for default [space] checkbox behavior (ie. toggle focused checkbox) include in the if statement: && !(e.target.tagName == 'INPUT' && e.target.type == 'checkbox')
|
||||
{if $settings.theme.keyboard_shortcut_toggle_enabled}
|
||||
{literal}
|
||||
if (e.which == 32 && !(e.target.tagName == 'INPUT' && e.target.type == 'text') && e.target.tagName != 'TEXTAREA' && list_checkboxes.length !== 0) {
|
||||
if (e.which == 32 && !(e.target.tagName == 'INPUT' && e.target.type == 'text') && e.target.tagName != 'BUTTON' && !(e.target.tagName == 'INPUT' && e.target.type == 'button') && !(e.target.tagName == 'INPUT' && e.target.type == 'submit') && e.target.tagName != 'TEXTAREA' && list_checkboxes.length !== 0) {
|
||||
e.preventDefault();
|
||||
var list_toggle_button;
|
||||
list_toggle_button = document.querySelector('button[name=btn_toggle]');
|
||||
if (list_toggle_button === null || list_toggle_button === 'undefined') {
|
||||
list_toggle_button = document.getElementById('btn_toggle');
|
||||
var toggle_button;
|
||||
toggle_button = document.querySelector('button[name=btn_toggle]');
|
||||
if (toggle_button === null || toggle_button === undefined) {
|
||||
toggle_button = document.getElementById('btn_toggle');
|
||||
}
|
||||
if (list_toggle_button !== null) { list_toggle_button.click(); }
|
||||
if (toggle_button !== null) { toggle_button.click(); }
|
||||
}
|
||||
{/literal}
|
||||
{/if}
|
||||
|
|
@ -351,20 +350,15 @@
|
|||
{if $settings.theme.keyboard_shortcut_check_all_enabled}
|
||||
{literal}
|
||||
if ((((e.which == 97 || e.which == 65) && (e.ctrlKey || e.metaKey) && !e.shiftKey) || e.which == 19) && !(e.target.tagName == 'INPUT' && e.target.type == 'text') && e.target.tagName != 'TEXTAREA') {
|
||||
var list_checkbox_all;
|
||||
list_checkbox_all = document.querySelectorAll('table.list tr.list-header th.checkbox input[name=checkbox_all]');
|
||||
if (list_checkbox_all !== null && list_checkbox_all.length > 0) {
|
||||
e.preventDefault();
|
||||
for (var x = 0, max = list_checkbox_all.length; x < max; x++) {
|
||||
list_checkbox_all[x].click();
|
||||
}
|
||||
var all_checkboxes;
|
||||
all_checkboxes = document.querySelectorAll('table.list tr.list-header th.checkbox input[name=checkbox_all]');
|
||||
if (all_checkboxes === null || all_checkboxes === undefined) {
|
||||
all_checkboxes = document.querySelectorAll('td.edit_delete_checkbox_all > span > input[name=checkbox_all]');
|
||||
}
|
||||
var edit_checkbox_all;
|
||||
edit_checkbox_all = document.querySelectorAll('td.edit_delete_checkbox_all > span > input[name=checkbox_all]');
|
||||
if (edit_checkbox_all !== null && edit_checkbox_all.length > 0) {
|
||||
if (all_checkboxes !== null && all_checkboxes.length > 0) {
|
||||
e.preventDefault();
|
||||
for (var x = 0, max = edit_checkbox_all.length; x < max; x++) {
|
||||
edit_checkbox_all[x].click();
|
||||
for (var x = 0, max = all_checkboxes.length; x < max; x++) {
|
||||
all_checkboxes[x].click();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -376,12 +370,12 @@
|
|||
{literal}
|
||||
if (((e.which == 115 || e.which == 83) && (e.ctrlKey || e.metaKey) && !e.shiftKey) || (e.which == 19)) {
|
||||
e.preventDefault();
|
||||
var edit_save_button;
|
||||
edit_save_button = document.getElementById('btn_save');
|
||||
if (edit_save_button === null || edit_save_button === 'undefined') {
|
||||
edit_save_button = document.querySelector('button[name=btn_save]');
|
||||
var save_button;
|
||||
save_button = document.getElementById('btn_save');
|
||||
if (save_button === null || save_button === undefined) {
|
||||
save_button = document.querySelector('button[name=btn_save]');
|
||||
}
|
||||
if (edit_save_button !== null) { edit_save_button.click(); }
|
||||
if (save_button !== null) { save_button.click(); }
|
||||
}
|
||||
{/literal}
|
||||
{/if}
|
||||
|
|
@ -400,11 +394,11 @@
|
|||
{literal}
|
||||
var current_selection, copy_button;
|
||||
current_selection = window.getSelection();
|
||||
if (current_selection === null || current_selection == 'undefined' || current_selection.toString() == '') {
|
||||
if (current_selection === null || current_selection === undefined || current_selection.toString() == '') {
|
||||
e.preventDefault();
|
||||
copy_button = document.getElementById('btn_copy');
|
||||
if (copy_button === null || copy_button === 'undefined') {
|
||||
copy_button = document.querySelector('button[name=btn_copy]');
|
||||
copy_button = document.querySelector('button[name=btn_copy]');
|
||||
if (copy_button === null || copy_button === undefined) {
|
||||
copy_button = document.getElementById('btn_copy');
|
||||
}
|
||||
if (copy_button !== null) { copy_button.click(); }
|
||||
}
|
||||
|
|
@ -747,6 +741,29 @@
|
|||
}
|
||||
{/literal}
|
||||
|
||||
//modal functions
|
||||
{literal}
|
||||
function modal_open(modal_id, focus_id) {
|
||||
var modal = document.getElementById(modal_id);
|
||||
modal.style.opacity = '1';
|
||||
modal.style.pointerEvents = 'auto';
|
||||
if (focus_id !== undefined) {
|
||||
document.getElementById(focus_id).focus();
|
||||
}
|
||||
}
|
||||
|
||||
function modal_close() {
|
||||
var modals = document.getElementsByClassName('modal-window');
|
||||
if (modals.length > 0) {
|
||||
for (var m = 0; m < modals.length; ++m) {
|
||||
modals[m].style.opacity = '0';
|
||||
modals[m].style.pointerEvents = 'none';
|
||||
}
|
||||
}
|
||||
document.activeElement.blur();
|
||||
}
|
||||
{/literal}
|
||||
|
||||
//misc functions
|
||||
{literal}
|
||||
function swap_display(a_id, b_id, display_value) {
|
||||
|
|
@ -763,11 +780,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
function modal_close() {
|
||||
document.location.href='#';
|
||||
document.activeElement.blur();
|
||||
}
|
||||
|
||||
function hide_password_fields() {
|
||||
var password_fields = document.querySelectorAll("input[type='password']");
|
||||
for (var p = 0, max = password_fields.length; p < max; p++) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue