diff --git a/www/admin/inner.js b/www/admin/inner.js index 63c516614..83143a546 100644 --- a/www/admin/inner.js +++ b/www/admin/inner.js @@ -1965,12 +1965,17 @@ define([ if (!categories[active]) { active = 'general'; } common.setHash(active); Object.keys(categories).forEach(function (key) { - var $category = $('
', {'class': 'cp-sidebarlayout-category'}).appendTo($categories); var iconClass = SIDEBAR_ICONS[key]; + var icon; if (iconClass) { - $category.append($('', {'class': iconClass})); + icon = h('span', { class: iconClass }); } - + var $category = $(h('div', { + 'class': 'cp-sidebarlayout-category' + }, [ + icon, + Messages['admin_cat_'+key] || key, + ])).appendTo($categories); if (key === active) { $category.addClass('cp-leftside-active'); } @@ -1987,7 +1992,6 @@ define([ showCategories(categories[key]); }); - $category.append(Messages['admin_cat_'+key] || key); }); showCategories(categories[active]); }; diff --git a/www/common/common-language.js b/www/common/common-language.js index 8b27a64bf..02e0e68c2 100644 --- a/www/common/common-language.js +++ b/www/common/common-language.js @@ -50,11 +50,6 @@ define([ var key = $el.data('localization'); $el.html(Messages[key]); }; - var translateAppend = function (i, e) { - var $el = $(e); - var key = $el.data('localization-append'); - $el.append(Messages[key]); - }; var translateTitle = function () { var $el = $(this); var key = $el.data('localization-title'); @@ -66,11 +61,9 @@ define([ $el.attr('placeholder', Messages[key]); }; $('[data-localization]').each(translateText); - $('[data-localization-append]').each(translateAppend); $('[data-localization-title]').each(translateTitle); $('[data-localization-placeholder]').each(translatePlaceholder); $('#pad-iframe').contents().find('[data-localization]').each(translateText); - $('#pad-iframe').contents().find('[data-localization-append]').each(translateAppend); $('#pad-iframe').contents().find('[data-localization-title]').each(translateTitle); $('#pad-iframe').contents().find('[data-localization-placeholder]').each(translatePlaceholder); }; diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index 5e05e23f4..4b39b6aa2 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -1420,9 +1420,20 @@ define([ } // Button - var $button = $('