From 57d0bc13cf99cd3e0894eaa90b411a1ed4ddac41 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Fri, 23 Sep 2016 10:23:24 -0400 Subject: [PATCH] Fix lint warnings, comment out crashy service reset code (re: #3324) --- modules/core/context.js | 5 +++-- modules/ui/commit.js | 22 ++++++++++------------ 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/modules/core/context.js b/modules/core/context.js index 2d0dbf5ef..139819db2 100644 --- a/modules/core/context.js +++ b/modules/core/context.js @@ -146,8 +146,9 @@ export function Context(root) { features.reset(); history.reset(); _.each(services, function(service) { - var reset = service().reset; - if (reset) reset(context); + // TODO: fix access to services #3324 + // var reset = service().reset; + // if (reset) reset(context); }); return context; }; diff --git a/modules/ui/commit.js b/modules/ui/commit.js index ed30d1c43..c18db4c34 100644 --- a/modules/ui/commit.js +++ b/modules/ui/commit.js @@ -18,8 +18,7 @@ export function Commit(context) { var changes = context.history().changes(), summary = context.history().difference().summary(); - - var header = selection + selection .append('div') .attr('class', 'header fillL') .append('h3') @@ -105,7 +104,7 @@ export function Commit(context) { .attr('class', 'changeset-list'); var warningLi = warnings.select('ul').selectAll('li') - .data(function(d) { return d; }) + .data(function(d) { return d; }); warningLi = warningLi.enter() .append('li') @@ -145,19 +144,22 @@ export function Commit(context) { var userLink = d3.select(document.createElement('div')); if (user.image_url) { - userLink.append('img') + userLink + .append('img') .attr('src', user.image_url) .attr('class', 'icon pre-text user-icon'); } - userLink.append('a') + userLink + .append('a') .attr('class','user-info') .text(user.display_name) .attr('href', context.connection().userURL(user.display_name)) .attr('tabindex', -1) .attr('target', '_blank'); - prose.html(t('commit.upload_explanation_with_user', {user: userLink.html()})); + prose + .html(t('commit.upload_explanation_with_user', { user: userLink.html() })); }); @@ -223,15 +225,11 @@ export function Commit(context) { li.append('span') .attr('class', 'change-type') - .text(function(d) { - return t('commit.' + d.changeType) + ' '; - }); + .text(function(d) { return t('commit.' + d.changeType) + ' '; }); li.append('strong') .attr('class', 'entity-type') - .text(function(d) { - return context.presets().match(d.entity, d.graph).name(); - }); + .text(function(d) { return context.presets().match(d.entity, d.graph).name(); }); li.append('span') .attr('class', 'entity-name')