public/js/views/time.js in conjur-asset-ui-1.3.0 vs public/js/views/time.js in conjur-asset-ui-1.3.1

- old
+ new

@@ -1,14 +1,27 @@ /** @jsx React.DOM */ - -// render a <time> tag. props.timestamp should be a timestamp -// that moment can parse, props.format should be one of the -// format strings accepted by moment (optional). -var Time = React.createClass({ - render: function(){ - var timestamp = this.props.timestamp; - var format = this.props.format || 'lll'; - var m = moment(timestamp); - - return <time dateTime={m.format()}>{m.format(format)}</time>; - } -}) \ No newline at end of file +/* global conjur, React, moment */ + +(function(conjur, React, moment) { + 'use strict'; + + // render a <time> tag. props.timestamp should be a timestamp + // that moment can parse, props.format should be one of the + // format strings accepted by moment (optional). + this.Time = React.createClass({ + render: function(){ + var timestamp = this.props.timestamp; + var format = this.props.format || 'lll'; + var m = moment(timestamp); + + return ( + <time dateTime={m.format()}>{m.format(format)}</time> + ); + } + }); + +}).bind(conjur.views) +( + conjur, + React, + moment +);