Remembers which editor tab was last open

@stephensanchez , @wedaly 
Oh, that's even better.


On Mon, Jul 14, 2014 at 3:31 PM, Will Daly <notifications@github.com> wrote:

> In openassessment/xblock/static/js/src/studio/oa_edit.js:
>
> > +        }
> > +        var tabElement = $(".openassessment_editor_content_and_tabs", this.element);
> > +
> > +        // Initialize JQuery UI Tabs, and activates the appropriate tab.
> > +        tabElement.tabs();
> > +        tabElement.tabs('option', 'active', OpenAssessment.lastOpenEditingTab);
> > +    },
> > +
> > +    /**
> > +     Saves the state of the editing tabs in a variable outside of the scope of the editor.
> > +     When the user reopens the editing view, they will be greeted by the same tab that they left.
> > +     This code is called by the two paths that we could exit the modal through: Saving and canceling.
> > +     **/
> > +    saveTabState: function() {
> > +        OpenAssessment.lastOpenEditingTab =
> > +            $(".openassessment_editor_content_and_tabs", this.element).tabs('option', 'active');
>
> I'm pretty sure it's just tagging the currently selected element in the
> DOM with a CSS class to keep track of the current tab.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/edx/edx-ora2/pull/496/files#r14898311>.
>