1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 13:47:31 +02:00

Issue #4783 Added new field for meta-news-title. New prefs added for SEO Title and Description character limits.

This commit is contained in:
Cameron
2022-06-06 17:28:23 -07:00
parent fb529a536d
commit 94bf1efda2
13 changed files with 150 additions and 40 deletions

View File

@@ -183,28 +183,36 @@ $(document).ready(function()
$(this).html(orig + spin);
});
$('textarea').on("input", function(){
if($(this).attr("maxlength") === undefined)
$('.e-count').on("input focus", function(){
if($(this).attr("data-char-count") === undefined)
{
return;
}
var maxlength = $(this).attr("maxlength");
var maxlength = $(this).attr("data-char-count");
var currentLength = $(this).val().length;
var countID = $(this).attr('id') + '-char-count';
if( currentLength >= maxlength )
/* if( currentLength >= maxlength )
{
$('#'+ countID + ' span').text('0');
}
else
else*/
{
$('#'+ countID).show();
$('#'+ countID + ' span').text(maxlength - currentLength);
}
});
$('.e-count').focusout(function() {
var countID = $(this).attr('id') + '-char-count';
$('#'+ countID).hide();
})
$('#e-modal-submit').click(function () {