// Fix Tagify javascript error
This commit is contained in:
1 parent
2c3a5c553d
commit
5af2ef38a1
3 files changed
+2
-13
No files matched your search
@@ -444,17 +444,6 @@
|
|||||||
<div class="translatable-field lang-{$language.id_lang}">
|
<div class="translatable-field lang-{$language.id_lang}">
|
||||||
<div class="col-lg-9">
|
<div class="col-lg-9">
|
||||||
{/if}
|
{/if}
|
||||||
{literal}
|
|
||||||
<script type="text/javascript">
|
|
||||||
$().ready(function () {
|
|
||||||
var input_id = '{/literal}tags_{$language.id_lang}{literal}';
|
|
||||||
$('#'+input_id).tagify({delimiters: [13,44], addTagPrompt: '{/literal}{l s='Add tag' js=1}{literal}'});
|
|
||||||
$({/literal}'#{$table}{literal}_form').submit( function() {
|
|
||||||
$(this).find('#'+input_id).val($('#'+input_id).tagify('serialize'));
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
{/literal}
|
|
||||||
<input type="text" id="tags_{$language.id_lang}" class="tagify updateCurrentText" name="tags_{$language.id_lang}" value="{$product->getTags($language.id_lang, true)|htmlentitiesUTF8}" />
|
<input type="text" id="tags_{$language.id_lang}" class="tagify updateCurrentText" name="tags_{$language.id_lang}" value="{$product->getTags($language.id_lang, true)|htmlentitiesUTF8}" />
|
||||||
{if $languages|count > 1}
|
{if $languages|count > 1}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -69,7 +69,7 @@
|
|||||||
btn_submit.hide();
|
btn_submit.hide();
|
||||||
//bind enter key press to validate form
|
//bind enter key press to validate form
|
||||||
$('#{$table}_form').find('input').keypress(function (e) {
|
$('#{$table}_form').find('input').keypress(function (e) {
|
||||||
if (e.which == 13 && e.target.localName != 'textarea' && !e.target.hasClass('tagify'))
|
if (e.which == 13 && e.target.localName != 'textarea' && !$(e.target).parent().hasClass('tagify-container'))
|
||||||
$('#desc-{$table}-save').click();
|
$('#desc-{$table}-save').click();
|
||||||
});
|
});
|
||||||
//submit the form
|
//submit the form
|
||||||
|
|||||||
@@ -89,7 +89,7 @@
|
|||||||
btn_submit.hide();
|
btn_submit.hide();
|
||||||
//bind enter key press to validate form
|
//bind enter key press to validate form
|
||||||
$('#{$table}_form').find('input').keypress(function (e) {
|
$('#{$table}_form').find('input').keypress(function (e) {
|
||||||
if (e.which == 13 && e.target.localName != 'textarea' && !e.target.hasClass('tagify'))
|
if (e.which == 13 && e.target.localName != 'textarea' && !$(e.target).parent().hasClass('tagify-container'))
|
||||||
$('#page-header-desc-{$table}-save').click();
|
$('#page-header-desc-{$table}-save').click();
|
||||||
});
|
});
|
||||||
//submit the form
|
//submit the form
|
||||||
|
|||||||
Reference in new issue
Block a user