ok

On Wed, Feb 6, 2013 at 3:35 PM, Jason Bau <notifications@github.com> wrote:

> In main/templates/exams/view_exam.html:
>
> >
> > -                $(dialogDiv).dialog({ modal: true,
> > -                                   buttons: {'Close':function(){$(this).dialog("close");}}
> > -                                 });
> > +            saveXHR.success(function(status, msg, xhr) {
> > +                    var dialogDiv = window.getDialog(msg.toUpperCase());
> > +                    $(dialogDiv).find('p').text("Your answers have been saved, but not submitted!");
> > +
> > +                    $(dialogDiv).dialog({ modal: true,
> > +                                          buttons: {'Close': function() {
> > +                                                                         $(this).dialog("close");
> > +                                                                         /* allow saving again on dialog close */
> > +                                                                         $(saveWorkBtn).removeAttr('disabled');
>
> @jrbl <https://github.com/jrbl> actually, since there are other ways to
> close the dialog than pushing the close button (escape-key, for example),
> this isn't the right place to remove disabled, since it won't get called in
> those circumstances.
>
> We should just call it, as you do for saveXHR.error, in the first line of
> the success handler.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/Stanford-Online/class2go/pull/2118/files#r2919577>.
>
>