Skip to content

Instantly share code, notes, and snippets.

@marcohamersma
Created May 17, 2013 14:14
Show Gist options
  • Save marcohamersma/5599296 to your computer and use it in GitHub Desktop.
Save marcohamersma/5599296 to your computer and use it in GitHub Desktop.
diff --git a/app/lib/views/sidebar-module.js b/app/lib/views/sidebar-module.js
index 64b92e9..8615822 100644
--- a/app/lib/views/sidebar-module.js
+++ b/app/lib/views/sidebar-module.js
@@ -132,6 +132,7 @@ SidebarModule = module.exports = View.extend({
no_items : this.getCount() === 0,
iconClassName : this.iconClassName,
more : !!(this.moreText && this.moreLink),
+ externalMore : this.moreLink && this.moreLink.indexOf('/') !== 0,
moreText : this.moreText,
moreLink : this.moreLink,
moreClassName : this.moreClassName,
diff --git a/app/lib/views/sidebar-module.tmpl b/app/lib/views/sidebar-module.tmpl
index b91983a..ef252e7 100644
--- a/app/lib/views/sidebar-module.tmpl
+++ b/app/lib/views/sidebar-module.tmpl
@@ -1,6 +1,6 @@
{{#unless no_items}}
{{#if more}}
- <a class="sidebarHeader sc-clearfix sc-link-{{titleVariation}} {{moreClassName}}" href="{{moreLink}}">
+ <a class="sidebarHeader sc-clearfix sc-link-{{titleVariation}} {{moreClassName}}" href="{{moreLink}}"{{#if externalMore}} target="_blank"{{/if}}>
{{else}}
<div class="sidebarHeader sc-clearfix sc-type-{{titleVariation}}">
{{/if}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment