Tags sorted low to high alphanumeric

This commit is contained in:
dignajar 2016-02-24 22:50:27 -03:00
parent df65c9f295
commit 3728ea8a98
3 changed files with 6 additions and 2 deletions

View File

@ -25,6 +25,10 @@ class dbTags extends dbJSON
foreach($this->db['postsIndex'] as $tagSlug=>$tagInfo) {
$tmp[$tagSlug] = $tagInfo['name'];
}
// Sort low to high, by value.
natcasesort($tmp);
return $tmp;
}

View File

@ -4,7 +4,7 @@ class Log {
public static function set($text, $type=0)
{
error_log($text, $type);
error_log('('.BLUDIT_VERSION.')'.$text, $type);
}
}

View File

@ -9,7 +9,7 @@ function insertTag() {
}
var findTag = $("span[data-tag]").filter(function() {
return $(this).attr('data-tag').toLowerCase() == newTag;
return $(this).attr('data-tag').toLowerCase() == newTag.toLowerCase();
});
if( findTag.length > 0 ) {