Sha256: 4bcfb2ab58df6c04886b1bcec0faffd5c487797100359c4bb321274197503319
Contents?: true
Size: 1.99 KB
Versions: 2
Compression:
Stored size: 1.99 KB
Contents
class Skr.Screens.TimeTracking.EditEntry extends Lanes.React.Component dataObjects: entry: -> @props.event?.get('entry') setDataState: (change) -> if change.event @entry.fromCalEvent(change.event) change.event.set({content: @entry.content}, {silent: true}) @forceUpdate() getTarget: -> return null unless @props.wrapper.isMounted() _.dom(@props.wrapper).el onSave: -> event = @props.event @entry.save().then (te) => event.set(_.extend({editing: false}, te.toCalEvent())) @props.onCancel() unless te.errors componentDidMount: -> _.defer => _.dom(@).qs('input[name=hours]').focusAndSelect() render: -> props = {sm:12, editOnly: true, model: @entry} <div className="entry-body"> <LC.NetworkActivityOverlay model={@entry} roundedCorners /> <BS.Row> <LC.SelectField {...props} sm={8} choices={@props.entries.available_projects.models} name='customer_project' labelField="code" /> <LC.NumberInput {...props} sm={4} name='hours' step={0.25} onEnter={@onSave} /> </BS.Row><BS.Row> <LC.DateTime {...props} step={15} name="start_at"/> </BS.Row><BS.Row> <LC.DateTime {...props} step={15} name="end_at"/> </BS.Row><BS.Row> <LC.Input sm={12} model={@entry} ref='textarea' onEnter={@onSave} selectOnFocus editOnly name="description" type="textarea" label='Description' /> </BS.Row> <BS.Row className="controls"> <BS.Button tabIndex={-1} onClick={@props.onCancel}>Cancel</BS.Button> <BS.Button onClick={@onSave} bsStyle="primary">Save</BS.Button> </BS.Row> </div>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
stockor-0.3.0 | client/skr/screens/time-tracking/EditEntry.cjsx |
stockor-0.2 | client/skr/screens/time-tracking/EditEntry.cjsx |