Skip to content
Snippets Groups Projects
Commit c0ef356e authored by VangelisP's avatar VangelisP
Browse files

Added .first() in field & filter selectors so that it will always bring the first selector's values

parent e630a100
No related branches found
No related tags found
1 merge request!9Added .first() in field & filter selectors so that it will always bring the first selector's values
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
$(document).on('change','#type_configuration select.crm-form-select',function () { $(document).on('change','#type_configuration select.crm-form-select',function () {
{/literal}{if $action eq 1}{literal} {/literal}{if $action eq 1}{literal}
var titlepreset = $.trim($('#type_configuration select.crm-form-select option:selected').text().split("::").pop()); var titlepreset = $.trim($('#type_configuration select.crm-form-select option:selected').first().text().split("::").pop());
$('#title').val(titlepreset).trigger('blur'); $('#title').val(titlepreset).trigger('blur');
{/literal}{/if}{literal}; {/literal}{/if}{literal};
}); });
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
{if ($configuration_template)} {if ($configuration_template)}
{include file=$configuration_template} {include file=$configuration_template}
{/if} {/if}
</div> </div>
<div class="crm-section"> <div class="crm-section">
<div class="label">{$form.title.label}</div> <div class="label">{$form.title.label}</div>
<div class="content"> <div class="content">
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
$(document).on('change','#type_configuration select.crm-form-select',function () { $(document).on('change','#type_configuration select.crm-form-select',function () {
{/literal}{if $action eq 1}{literal} {/literal}{if $action eq 1}{literal}
var titlepreset = $.trim($('#type_configuration select.crm-form-select option:selected').text().split("::").pop()); var titlepreset = $.trim($('#type_configuration select.crm-form-select option:selected').first().text().split("::").pop());
$('#title').val(titlepreset).trigger('blur'); $('#title').val(titlepreset).trigger('blur');
{/literal}{/if}{literal}; {/literal}{/if}{literal};
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment