Shortcuts

Implement shortcuts mentioned in #55 
Amended last commit 

----- Original Message -----

> From: "David Mason" <notifications@github.com>
> To: "zanata/zanata-spa" <zanata-spa@noreply.github.com>
> Cc: "Patrick Huang" <pahuang@redhat.com>
> Sent: Tuesday, November 11, 2014 2:01:00 PM
> Subject: Re: [zanata-spa] Shortcuts (#85)

> In app/components/transUnit/TransUnitService.js:
> > +      if (transUnitService.isTranslationModified(phrase)) {
> > +        EventService.emitEvent(EventService.EVENT.SAVE_TRANSLATION,
> > +          {
> > +            'phrase': phrase,
> > +            'status': TransStatusService.getStatusInfo('TRANSLATED'),
> > +            'locale': data.localeId,
> > +            'docId': data.docId
> > +          });
> > +      }
> > +      EventService.emitEvent(EventService.EVENT.CANCEL_EDIT, phrase);
> > +    }
> > +
> > +    function goToNextRow(event, data) {
> > +      PhraseService.findNextId(
> > +        $stateParams.projectSlug, $stateParams.versionSlug,
> > +        $stateParams.docId, $stateParams.localeId, data.currentId)

> Does PhraseService have access to $stateParams ? If so we can remove the
> first 4 parameters from findNextId() . If not, could we just make it
> PhraseService.findNextId($stateParams, data.currentId) ?

> —
> Reply to this email directly or view it on GitHub .