Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions amp_conf/htdocs/admin/assets/js/text-editor-1.2.1.js
Original file line number Diff line number Diff line change
Expand Up @@ -740,8 +740,9 @@ You should have received a copy of the GNU General Public License along with thi
var _idSuffix = "_" + this.attr("id");
$('#inputText' + _idSuffix);
$('#inputUrl' + _idSuffix);
//$(".alert").alert("close");
bootstrap.Alert.getOrCreateInstance($(".alert")[0]).close();
if ($(".alert").length) {
bootstrap.Alert.getOrCreateInstance($(".alert")[0]).close();
}
if ($(editorObj).data('currentRange') != '') {
$('#inputText_' + _idSuffix).val($(editorObj).data('currentRange'));
}
Expand Down Expand Up @@ -772,7 +773,9 @@ You should have received a copy of the GNU General Public License along with thi
document.execCommand('createLink', false, targetURL);
}
$(editorObj).data("editor").find('a[href="' + targetURL + '"]').each(function () { $(this).attr("target", "_blank"); });
$(".alert").alert("close");
if ($(".alert").length) {
bootstrap.Alert.getOrCreateInstance($(".alert")[0]).close();
}
// $("#InsertLink" + _idSuffix).modal("hide");
bootstrap.Modal.getOrCreateInstance($("#InsertLink"+_idSuffix)[0]).hide();
$(editorObj).data("editor").focus();
Expand Down Expand Up @@ -1149,16 +1152,16 @@ You should have received a copy of the GNU General Public License along with thi
//For contextmenu
$(document.body).mousedown(function (event) {
var target = $(event.target);
if (!target.parents().andSelf().is('#context-menu')) { // Clicked outside
if (!target.parents().addBack().is('#context-menu')) { // Clicked outside
$('#context-menu').remove();
}
if (!target.parents().andSelf().is('#specialchar') && (target.closest('a').html() != '<i class="fa fa-asterisk"></i>')) { //Clicked outside
if (!target.parents().addBack().is('#specialchar') && (target.closest('a').html() != '<i class="fa fa-asterisk"></i>')) { //Clicked outside
if ($("#specialchar").is(':visible')) {
$(editor_Content).data("editor").data("splcharsBtn", null);
$('#specialchar').remove();
}
}
if (!target.parents().andSelf().is('#paletteCntr') && (target.closest('a').html() != '<i class="fa fa-font"></i>')) { //Clicked outside
if (!target.parents().addBack().is('#paletteCntr') && (target.closest('a').html() != '<i class="fa fa-font"></i>')) { //Clicked outside
if ($("#paletteCntr").is(':visible')) {
$(editor_Content).data("editor").data("colorBtn", null);
$('#paletteCntr').remove();
Expand Down Expand Up @@ -1673,8 +1676,9 @@ You should have received a copy of the GNU General Public License along with thi
})).append($('<span/>').html(message));
errorDiv.appendTo($('#' + target));
setTimeout(function () {
// $('.alert').alert('close');
bootstrap.Alert.getOrCreateInstance($(".alert")[0]).close();
if ($(".alert").length) {
bootstrap.Alert.getOrCreateInstance($(".alert")[0]).close();
}
}, 3000);
},

Expand Down
49 changes: 49 additions & 0 deletions amp_conf/htdocs/admin/assets/less/freepbx/form.less
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,55 @@ a.badge:focus {
font-size: 14px;
}

@fpbx-select-arrow: var(--bs-form-select-bg-img, url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%230F5A59' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"));

/* Bootstrap 5 form-control hides native select arrows; restore the chevron */
select:not([multiple]):not(.bsmultiselect):not(.chosenmultiselect) {
appearance: none;
-webkit-appearance: none;
background-image: @fpbx-select-arrow;
background-repeat: no-repeat;
background-position: right 0.75rem center;
background-size: 16px 12px;
padding-right: 2.25rem;
}

/* Remove Bootstrap 5 blue focus ring on selects and checkboxes */
select:focus,
select:focus-visible,
.form-select:focus,
.form-select:focus-visible,
.form-control:focus,
.form-check-input:focus,
.form-check-input:focus-visible,
input[type="checkbox"]:focus,
input[type="checkbox"]:focus-visible,
.bootstrap-table input[type="checkbox"]:focus {
outline: none !important;
box-shadow: none !important;
--bs-focus-ring-color: transparent;
--bs-form-check-input-focus-box-shadow: none;
}

select:focus,
.form-select:focus,
.form-control:focus {
border-color: #ced4da !important;
}

.form-check-input,
input[type="checkbox"] {
--bs-form-check-input-focus-border: #ced4da;
--bs-form-check-input-focus-box-shadow: none;
}

.form-check-input:focus,
.form-check-input:focus-visible,
input[type="checkbox"]:focus,
input[type="checkbox"]:focus-visible {
border-color: #ced4da !important;
}

.form-group.clearfix {
display: -ms-flexbox;
display: flex;
Expand Down
39 changes: 1 addition & 38 deletions amp_conf/htdocs/admin/assets/less/freepbx/page.less
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ textarea.form-control{
padding-left: 9px;
display: unset;
line-height: unset;
color: @input-text-color;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This variable is created globally and i m using it in global css and also some perticular modules

}
input[type=text]:hover:not([disabled]) {
border-color: #666 #CCC #CCC #CCC;
Expand Down Expand Up @@ -776,6 +775,7 @@ div.attention {
overflow: auto;
max-height: 270px;
min-height: 102px;
padding-left: 12px;
.btn-block {
width: 98%; //http://issues.freepbx.org/browse/FREEPBX-12478
}
Expand Down Expand Up @@ -1455,43 +1455,6 @@ pre{
margin-top: 3px;
}

.form-select,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changes are needed , and this are for the from and login page and also some drop down css aligment

select.form-control {
color: @input-text-color;
}

.form-group {
margin-bottom: 1rem;
}

.dropdown-menu {
.dropdown-item,
.dropdown-item:visited,
li > a,
li > a:visited {
color: @input-text-color;
}

.dropdown-item:hover,
.dropdown-item:focus,
li:hover > a,
li:focus > a,
li > a:hover,
li > a:focus {
color: @button-hover-text-color;
background-color: @button-hover-background-color;
}

.dropdown-item.active,
.dropdown-item.active:visited,
li.active > a,
li.active > a:visited {
color: @button-active-text-color;
background-color: @button-active-background-color;
}
}


@media (min-width: 768px) {
.modal-content {
-webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
Expand Down
4 changes: 2 additions & 2 deletions amp_conf/htdocs/admin/libraries/BMO/View.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ public function destinationDrawSelect($goto, $i, $restrict_modules=false, $table
}
//draw "parent" select box
$style=' style="'.(($destmod=='Error')?'background-color:red;':'').'"';
$cat_html='<select data-last="'.$data_last_cat.'" name="goto' . $i . '" id="goto' . $i . '" class="form-control destdropdown ' . $class . '" ' . $style
$cat_html='<select data-last="'.$data_last_cat.'" name="goto' . $i . '" id="goto' . $i . '" class="form-select destdropdown ' . $class . '" ' . $style
. ($required ? ' required ' : '') //html5 validation
. ' data-id="' . $i . '" '
. $disabled .'>';
Expand All @@ -781,7 +781,7 @@ public function destinationDrawSelect($goto, $i, $restrict_modules=false, $table
foreach($cat_options as $name => $data) {
$cat_html.='<option value="'.str_replace(' ','_',(string) $data['raw']).'"'.($data['selected'] ? ' SELECTED ':'').$data['style'].'>'.$name.'</option>';

$data_class = 'form-control destdropdown2 '.($data['mod'] === $data['cat'] ? $data['mod'] : $data['mod'].' '.$data['cat']).' '.(!$data['selected'] ? 'd-none':'');
$data_class = 'form-select destdropdown2 '.($data['mod'] === $data['cat'] ? $data['mod'] : $data['mod'].' '.$data['cat']).' '.(!$data['selected'] ? 'd-none':'');
$dest_html.='<select data-class="'.$data['mod'].'" class="'.$data_class.'" ' . ($data['data_url'] ?? '') . ' data-mod="'.$data['mod'].'" data-last="'.(!empty($goto) ? $goto : '').'" name="' . $data['name_tag']
. '" id="' . $data['name_tag'] . '" '. $style . ' data-id="' . $i . '" ' . $disabled . '>';
foreach($data['destinations'] as $dest) {
Expand Down