lib/carte/client/views/card.cjsx in carte-server-1.0.9 vs lib/carte/client/views/card.cjsx in carte-server-1.0.10
- old
+ new
@@ -1,9 +1,10 @@
# @cjsx React.DOM
React = require('react')
Edit = require('./edit')
ModalTrigger = require('react-bootstrap/lib/ModalTrigger')
+Glyphicon = require('react-bootstrap/lib/Glyphicon')
markdownIt = require('markdown-it')(linkify: true)
helpers = require('../helpers')
classnames = require('classnames')
module.exports = React.createClass
@@ -44,27 +45,27 @@
>
<div className={classnames('list-group-item', 'carte-card-height': context != 'none')}>
<div className="carte-card-header">
{
if @props.card.get('focused') || @props.card.query.context == 'none'
- <i className='glyphicon glyphicon-star' />
+ <Glyphicon glyph='star' />
}
<strong>
{@props.card.get('title')}
</strong>
{
if @props.card.modelName == 'Card'
<span className={classnames('pull-right': true, 'tools': true, 'carte-hidden': !@showTools())}>
<ModalTrigger modal={<Edit card={@props.card} />}>
<a href="javascript:void(0)">
- <i className='glyphicon glyphicon-edit' />
+ <Glyphicon glyph='edit' />
</a>
</ModalTrigger>
<a href={'#/' + encodeURIComponent(@props.card.get('title'))}>
- <i className='glyphicon glyphicon-link' />
+ <Glyphicon glyph='link' />
</a>
</span>
else
<span className={classnames('pull-right': true)}>
<i className="fa fa-clock-o" />
@@ -74,22 +75,22 @@
}
</div>
<div className="carte-card-content">
{
if @props.card.fetching
- <i className='glyphicon glyphicon-refresh glyphicon-refresh-animate' />
+ <Glyphicon glyph='refresh' className='glyphicon-refresh-animate' />
else
- <div dangerouslySetInnerHTML={__html: markdownIt.render @props.card.get('content') || ''} />
+ <div dangerouslySetInnerHTML={__html: helpers.parseCardLink markdownIt.render @props.card.get('content') || ''} />
}
</div>
<div className={classnames('carte-hidden': !@showTools())}>
{
if @props.card.get("tags")
@props.card.get("tags").map (tag)->
<span className="pull-right tools">
<a href={"#/?tags=" + tag}>
- <i className="glyphicon glyphicon-tag" />
+ <Glyphicon glyph='tag' />
{tag}
</a>
</span>
}
</div>