onepiecejs / nodejs-cantas

Cantas is a real-time collaborative web application. Official repository
Other
202 stars 134 forks source link

Markdown link should open a new tab #58

Closed thescouser89 closed 9 years ago

thescouser89 commented 9 years ago

While editing a 'card', there is a nice link to the Markdown syntax.

When clicking the link, it should open a new tab (and redirect the user to the new tab) instead of loading the link in the same tab.

thescouser89 commented 9 years ago

I'll try to find some time to do a PR for the issues I opened.

Hopefully I'll learn some node js along the way! :)

xiaods commented 9 years ago

confirmed and plan to implemented in v1.1

dmison commented 9 years ago

Hi I just had a quick look at this because it looked like a good issue to get started with.

Only one of the two markdown links doesn't open in a new tab, because the click event for it isn't bound to openNewTab(). So the easy fix is to add that.

Alternatively, openNewTab() seems like overkill for the task. It would reduce complexity a little bit to remove those functions (it repeats in cards.js and comment.js) and just specify target="_new" in the links themselves. Unless the link to daringfireball.com is temporary and you actually want to put a menu there like trello.com does in the future.

Additionally it seems a little silly to have both links there. I'd also suggest removing both of them and putting a single link left aligned in the "footer" of the card view opposite the "close" button.

Let me know how you would like me to do this. :-)

Also the font-awesome icons aren't showing on these links too, wrong class names for the included version of font-awesome, and they probably should be in the rather than next to it.

xiaods commented 9 years ago

@dmison welcome for your PR.

dmison commented 9 years ago

PR: https://github.com/onepiecejs/nodejs-cantas/pull/71/

xiaods commented 9 years ago

merged!