aboutsummaryrefslogtreecommitdiff
path: root/data/assets/js/admin/tabs/sites.js
diff options
context:
space:
mode:
Diffstat (limited to 'data/assets/js/admin/tabs/sites.js')
-rw-r--r--data/assets/js/admin/tabs/sites.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/data/assets/js/admin/tabs/sites.js b/data/assets/js/admin/tabs/sites.js
index 8644705..1ed7b48 100644
--- a/data/assets/js/admin/tabs/sites.js
+++ b/data/assets/js/admin/tabs/sites.js
@@ -81,11 +81,12 @@ jQuery(function($) {
}));
}).done(function(r) {
list.html($.map(r, function(row) {
- var active = (row.is_active == '1');
+ var is_default = !!+row.is_default;
return TEMPLATES.run('site', $.extend({}, row, {
q: [row.site_id, row.slug, row.name, row.body].join(' ').toLowerCase(),
- badge_css: +row.is_default ? '' : 'hidden',
+ badge_css: is_default ? '' : 'hidden',
+ css: is_default ? 'list-group-item-warning' : '',
}));
}).join(''));
@@ -108,9 +109,8 @@ jQuery(function($) {
$('#sites .active').removeClass('active');
$(this).addClass('active');
- // TODO
- // $('#site-edit-dialog').data('site_id', site_id).modal('show');
- alert('TODO: edit site ' + site_id);
+ // show dialog
+ $('#site-edit-dialog').data('site_id', site_id).modal('show');
// stop event
return false;