Fix mispositioned 'no cats/tags' msg, fix missing 'no tags' msg

Also rewrote the JS that checks if freetags plugin is even in use.

References #275
This commit is contained in:
Matthias Mees 2015-01-24 14:31:15 +01:00
parent aa9f280240
commit ff5d1a3d5b
2 changed files with 11 additions and 9 deletions

View File

@ -646,17 +646,18 @@
serendipity.tagsList = function() {
var $source = $('#properties_freetag_tagList').val();
var $target = $('#tags_list > ul');
if (!$source) return;
var tagged = $source.split(',');
$target.empty();
if (typeof $source !== 'undefined') {
var tagged = $source.split(',');
$target.empty();
if (tagged == '') {
$('<li>{$CONST.EDITOR_NO_TAGS}</li>').appendTo($target);
} else {
$.each(tagged, function(key, tag) {
$('<li class="selected">'+ tag +'</li>').appendTo($target);
});
if (tagged == '') {
$('<li>{$CONST.EDITOR_NO_TAGS}</li>').appendTo($target);
} else {
$.each(tagged, function(key, tag) {
$('<li class="selected">'+ tag +'</li>').appendTo($target);
});
}
}
}

View File

@ -1812,6 +1812,7 @@ form > .button_link:first-of-type,
.taxonomy li {
display: inline-block;
margin: 0 .5714em .3571em 0;
padding: .1875em 0 0;
position: relative;
top: -2px;
}