From 41d5d16bac32d27756ed9cccbf61f4685f087b85 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Thu, 3 Apr 2014 13:03:40 -0400 Subject: [PATCH] show widget title next to type, closes #1313 --- public/src/forum/admin/themes.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/public/src/forum/admin/themes.js b/public/src/forum/admin/themes.js index 4dc81d6660..95ed41e2bc 100644 --- a/public/src/forum/admin/themes.js +++ b/public/src/forum/admin/themes.js @@ -26,7 +26,7 @@ define(['forum/admin/settings'], function(Settings) { themeType = parentEl.attr('data-type'), cssSrc = parentEl.attr('data-css'), themeId = parentEl.attr('data-theme'); - + socket.emit('admin.themes.set', { type: themeType, id: themeId, @@ -228,7 +228,7 @@ define(['forum/admin/settings'], function(Settings) { data: widgetData }); }); - + socket.emit('admin.widgets.set', { template: template, location: location, @@ -246,6 +246,11 @@ define(['forum/admin/settings'], function(Settings) { } function populateWidget(widget, data) { + if (data.title) { + var title = widget.find('.panel-heading strong'); + title.text(title.text() + ' - ' + data.title); + } + widget.find('input, textarea').each(function() { var input = $(this), value = data[input.attr('name')]; @@ -277,8 +282,6 @@ define(['forum/admin/settings'], function(Settings) { appendToggle(widgetEl); } } - - } } });