mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Dialplan XML: Integrate editor.
This commit is contained in:
@@ -113,14 +113,6 @@
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the default visibility of line numbers for Editor.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "62cfc1ac-6566-45ba-8c7d-f4234ab1b31e";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "editor";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "live_previews";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_name'] = "boolean";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Enable or disable live previewing of syntax, text size and theme changes.";
|
||||
$y++;
|
||||
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "7b403afd-e4d6-4e96-8c8f-2cf5d6187191";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_category'] = "editor";
|
||||
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "theme";
|
||||
|
||||
@@ -75,7 +75,6 @@
|
||||
$setting_invisibles = ($_SESSION["editor"]["invisibles"]["boolean"] != '') ? $_SESSION["editor"]["invisibles"]["boolean"] : 'false';
|
||||
$setting_indenting = ($_SESSION["editor"]["indent_guides"]["boolean"] != '') ? $_SESSION["editor"]["indent_guides"]["boolean"] : 'false';
|
||||
$setting_numbering = ($_SESSION["editor"]["line_numbers"]["boolean"] != '') ? $_SESSION["editor"]["line_numbers"]["boolean"] : 'true';
|
||||
$setting_preview = ($_SESSION["editor"]["live_preview"]["boolean"] != '') ? $_SESSION["editor"]["live_preview"]["boolean"] : 'true';
|
||||
|
||||
//get and then set the favicon
|
||||
if (isset($_SESSION['theme']['favicon']['text'])){
|
||||
@@ -238,10 +237,9 @@
|
||||
$modes['c_cpp'] = 'C';
|
||||
$modes['c_cpp'] = 'CPP';
|
||||
$modes['pgsql'] = 'PGSQL';
|
||||
$preview = ($setting_preview == 'true') ? "onmouseover=\"editor.getSession().setMode('ace/mode/' + this.value);\"" : null;
|
||||
foreach ($modes as $value => $label) {
|
||||
$selected = ($value == $mode) ? 'selected' : null;
|
||||
echo "<option value='".$value."' ".$selected." ".$preview.">".$label."</option>\n";
|
||||
echo "<option value='".$value."' ".$selected.">".$label."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
@@ -250,14 +248,13 @@
|
||||
<select id='size' style='height: 23px;' onchange="document.getElementById('editor').style.fontSize = this.options[this.selectedIndex].value; focus_editor();">
|
||||
<?php
|
||||
$sizes = explode(',','9px,10px,11px,12px,14px,16px,18px,20px');
|
||||
$preview = ($setting_preview == 'true') ? "onmouseover=\"document.getElementById('editor').style.fontSize = this.value;\"" : null;
|
||||
if (!in_array($setting_size, $sizes)) {
|
||||
echo "<option value='".$setting_size."' ".$preview.">".$setting_size."</option>\n";
|
||||
echo "<option value='".$setting_size."'>".$setting_size."</option>\n";
|
||||
echo "<option value='' disabled='disabled'></option>\n";
|
||||
}
|
||||
foreach ($sizes as $size) {
|
||||
$selected = ($size == $setting_size) ? 'selected' : null;
|
||||
echo "<option value='".$size."' ".$selected." ".$preview.">".$size."</option>\n";
|
||||
echo "<option value='".$size."' ".$selected.">".$size."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
@@ -299,12 +296,11 @@
|
||||
$themes['Dark']['tomorrow_night_eighties']= 'Tomorrow Night 80s';
|
||||
$themes['Dark']['twilight']= 'Twilight';
|
||||
$themes['Dark']['vibrant_ink']= 'Vibrant Ink';
|
||||
$preview = ($setting_preview == 'true') ? "onmouseover=\"editor.setTheme('ace/theme/' + this.value);\"" : null;
|
||||
foreach ($themes as $optgroup => $theme) {
|
||||
echo "<optgroup label='".$optgroup."'>\n";
|
||||
foreach ($theme as $value => $label) {
|
||||
$selected = (strtolower($label) == strtolower($setting_theme)) ? 'selected' : null;
|
||||
echo "<option value='".$value."' ".$selected." ".$preview.">".$label."</option>\n";
|
||||
echo "<option value='".$value."' ".$selected.">".$label."</option>\n";
|
||||
}
|
||||
echo "</optgroup>\n";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user