mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Domains - Edit: Sticky Domain Settings action bar.
This commit is contained in:
@@ -135,9 +135,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
//show the content
|
//show the content
|
||||||
echo "<div class='action_bar sub'>\n";
|
echo "<div class='action_bar' id='action_bar_sub'>\n";
|
||||||
echo " <div class='heading'><b>".$text['header-domain_settings']." (".$num_rows.")</b></div>\n";
|
echo " <div class='heading'><b id='heading_sub'>".$text['header-domain_settings']." (".$num_rows.")</b></div>\n";
|
||||||
echo " <div class='actions'>\n";
|
echo " <div class='actions'>\n";
|
||||||
|
echo button::create(['type'=>'button','id'=>'action_bar_sub_button_back','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'style'=>'margin-right: 15px; display: none;','link'=>'domains.php']);
|
||||||
if (permission_exists('domain_setting_add')) {
|
if (permission_exists('domain_setting_add')) {
|
||||||
echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'link'=>PROJECT_PATH."/core/domain_settings/domain_setting_edit.php?domain_uuid=".urlencode($domain_uuid)]);
|
echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'link'=>PROJECT_PATH."/core/domain_settings/domain_setting_edit.php?domain_uuid=".urlencode($domain_uuid)]);
|
||||||
}
|
}
|
||||||
@@ -325,4 +326,21 @@
|
|||||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||||
echo "</form>\n";
|
echo "</form>\n";
|
||||||
|
|
||||||
|
//make sub action bar sticky
|
||||||
|
echo "<script>\n";
|
||||||
|
|
||||||
|
echo " window.addEventListener('scroll', function(){\n";
|
||||||
|
echo " action_bar_scroll('action_bar_sub', 300, heading_modify, heading_restore);\n";
|
||||||
|
echo " }, false);\n";
|
||||||
|
|
||||||
|
echo " function heading_modify() {\n";
|
||||||
|
echo " document.getElementById('action_bar_sub_button_back').style.display = 'inline-block';\n";
|
||||||
|
echo " }\n";
|
||||||
|
|
||||||
|
echo " function heading_restore() {\n";
|
||||||
|
echo " document.getElementById('action_bar_sub_button_back').style.display = 'none';\n";
|
||||||
|
echo " }\n";
|
||||||
|
|
||||||
|
echo "</script>\n";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2019
|
Portions created by the Initial Developer are Copyright (C) 2008-2020
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
@@ -669,25 +669,22 @@
|
|||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo " <tr>\n";
|
|
||||||
echo " <td colspan='2' align='right'>\n";
|
|
||||||
if ($action == "update") {
|
|
||||||
echo " <input type='hidden' name='domain_uuid' value='".escape($domain_uuid)."'>\n";
|
|
||||||
}
|
|
||||||
echo " <input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
|
||||||
echo " </td>\n";
|
|
||||||
echo " </tr>";
|
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
echo "<br /><br />";
|
echo "<br /><br />";
|
||||||
|
|
||||||
|
if ($action == "update") {
|
||||||
|
echo "<input type='hidden' name='domain_uuid' value='".escape($domain_uuid)."'>\n";
|
||||||
|
}
|
||||||
|
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||||
|
|
||||||
echo "</form>";
|
echo "</form>";
|
||||||
|
|
||||||
if ($action == "update" && permission_exists('domain_setting_view')) {
|
if ($action == "update" && permission_exists('domain_setting_view')) {
|
||||||
echo "<br />\n";
|
require $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/core/domain_settings/domain_settings.php";
|
||||||
require "core/domain_settings/domain_settings.php";
|
echo "<br /><br />\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
//include the footer
|
//include the footer
|
||||||
require_once "resources/footer.php";
|
require_once "resources/footer.php";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
Reference in New Issue
Block a user