mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 08:45:12 +02:00
Merge branch 'ent-6962-tags-largos-no-caben-en-configuracion-modulos' into 'develop'
Added tips to large tags in module config See merge request artica/pandorafms!3851
This commit is contained in:
commit
b244cd28b2
@ -1357,12 +1357,11 @@ $(document).ready (function () {
|
|||||||
jQuery.each($("select[name='id_tag_available[]'] option:selected"), function (key, value) {
|
jQuery.each($("select[name='id_tag_available[]'] option:selected"), function (key, value) {
|
||||||
tag_name = $(value).html();
|
tag_name = $(value).html();
|
||||||
if (tag_name != <?php echo "'".__('None')."'"; ?>) {
|
if (tag_name != <?php echo "'".__('None')."'"; ?>) {
|
||||||
id_tag = $(value).attr('value');
|
$("select[name='id_tag_selected[]']").append(value);
|
||||||
$("select[name='id_tag_selected[]']").append($("<option></option>").val(id_tag).html('<i>' + tag_name + '</i>'));
|
|
||||||
$("#id_tag_available").find("option[value='" + id_tag + "']").remove();
|
$("#id_tag_available").find("option[value='" + id_tag + "']").remove();
|
||||||
$("#id_tag_selected").find("option[value='']").remove();
|
$("#id_tag_selected").find("option[value='']").remove();
|
||||||
if($("#id_tag_available option").length == 0) {
|
if($("#id_tag_available option").length == 0) {
|
||||||
$("select[name='id_tag_available[]']").append($("<option></option>").val('').html('<i><?php echo __('None'); ?></i>'));
|
$("select[name='id_tag_available[]']").append(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -1373,11 +1372,11 @@ $(document).ready (function () {
|
|||||||
tag_name = $(value).html();
|
tag_name = $(value).html();
|
||||||
if (tag_name != <?php echo "'".__('None')."'"; ?>) {
|
if (tag_name != <?php echo "'".__('None')."'"; ?>) {
|
||||||
id_tag = $(value).attr('value');
|
id_tag = $(value).attr('value');
|
||||||
$("select[name='id_tag_available[]']").append($("<option>").val(id_tag).html('<i>' + tag_name + '</i>'));
|
$("select[name='id_tag_available[]']").append(value);
|
||||||
$("#id_tag_selected").find("option[value='" + id_tag + "']").remove();
|
$("#id_tag_selected").find("option[value='" + id_tag + "']").remove();
|
||||||
$("#id_tag_available").find("option[value='']").remove();
|
$("#id_tag_available").find("option[value='']").remove();
|
||||||
if($("#id_tag_selected option").length == 0) {
|
if($("#id_tag_selected option").length == 0) {
|
||||||
$("select[name='id_tag_selected[]']").append($("<option></option>").val('').html('<i><?php echo __('None'); ?></i>'));
|
$("select[name='id_tag_selected[]']").append(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -717,7 +717,8 @@ function html_print_select(
|
|||||||
$message='',
|
$message='',
|
||||||
$select_all=false,
|
$select_all=false,
|
||||||
$simple_multiple_options=false,
|
$simple_multiple_options=false,
|
||||||
$required=false
|
$required=false,
|
||||||
|
$truncate_size=false
|
||||||
) {
|
) {
|
||||||
$output = "\n";
|
$output = "\n";
|
||||||
|
|
||||||
@ -853,6 +854,18 @@ function html_print_select(
|
|||||||
$output .= ' style="'.$option_style[$value].'"';
|
$output .= ' style="'.$option_style[$value].'"';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($truncate_size !== false) {
|
||||||
|
$output .= ' Title="'.$optlabel.'"';
|
||||||
|
|
||||||
|
$optlabel = ui_print_truncate_text(
|
||||||
|
$optlabel,
|
||||||
|
$truncate_size,
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
false
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if ($optlabel === '') {
|
if ($optlabel === '') {
|
||||||
$output .= '>None</option>';
|
$output .= '>None</option>';
|
||||||
} else {
|
} else {
|
||||||
@ -1502,7 +1515,7 @@ function html_print_select_from_sql(
|
|||||||
$disabled=false,
|
$disabled=false,
|
||||||
$style=false,
|
$style=false,
|
||||||
$size=false,
|
$size=false,
|
||||||
$trucate_size=GENERIC_SIZE_TEXT,
|
$truncate_size=GENERIC_SIZE_TEXT,
|
||||||
$class='',
|
$class='',
|
||||||
$required=false
|
$required=false
|
||||||
) {
|
) {
|
||||||
@ -1517,13 +1530,7 @@ function html_print_select_from_sql(
|
|||||||
foreach ($result as $row) {
|
foreach ($result as $row) {
|
||||||
$id = array_shift($row);
|
$id = array_shift($row);
|
||||||
$value = array_shift($row);
|
$value = array_shift($row);
|
||||||
$fields[$id] = ui_print_truncate_text(
|
$fields[$id] = $value;
|
||||||
$value,
|
|
||||||
$trucate_size,
|
|
||||||
false,
|
|
||||||
true,
|
|
||||||
false
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return html_print_select(
|
return html_print_select(
|
||||||
@ -1550,7 +1557,8 @@ function html_print_select_from_sql(
|
|||||||
// Simple_multiple_options.
|
// Simple_multiple_options.
|
||||||
false,
|
false,
|
||||||
// Required.
|
// Required.
|
||||||
$required
|
$required,
|
||||||
|
$truncate_size
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user