[Cosmo-dev] Re: [commits-cosmo] (travis) [5424] Fix for bug 10486:
MDE: Please
review this commit to make sure I'm not doing something foolish!
Matthew Eernisse
mde at osafoundation.org
Wed Aug 15 23:16:40 PDT 2007
Travis,
Wow, this is a pretty big hole to have gone unnoticed.
Your fix would indeed work perfectly well for all successful edits.
However we have code that restores the lozenge to its original state in
the case of server-side edit failures. Your code was removing the
lozenge before any response actually came back from the server, so that
fallback would not have worked for these types of edits.
I'm committing a more complete fix that allows the fallback to work, and
has the added benefit of just putting the lozenge into 'processing'
until the server-side operation actually finishes, and then makes the
lozenge go poof -- which gives the user an accurate picture of when the
edit is really done.
Thanks for flagging me on this.
Matthew
svncheckin at osafoundation.org wrote:
> Revision
> 5424 <http://cvs.osafoundation.org/viewcvs.cgi?rev=5424&view=rev>
> Author
> travis
> Date
> 2007-08-15 20:12:33 -0700 (Wed, 15 Aug 2007)
>
>
> Log Message
>
> Fix for bug 10486
> <http://bugzilla.osafoundation.org/show_bug.cgi?id=10486>: MDE: Please
> review this commit to make sure I'm not doing something foolish!
>
>
> Modified Paths
>
> * cosmo/trunk/cosmo/src/main/webapp/js/cosmo/view/cal/canvas.js
> <#cosmotrunkcosmosrcmainwebappjscosmoviewcalcanvasjs>
>
>
> Diff
>
>
> Modified:
> cosmo/trunk/cosmo/src/main/webapp/js/cosmo/view/cal/canvas.js
> (5423 => 5424)
>
> --- cosmo/trunk/cosmo/src/main/webapp/js/cosmo/view/cal/canvas.js 2007-08-15 22:05:48 UTC (rev 5423)
> +++ cosmo/trunk/cosmo/src/main/webapp/js/cosmo/view/cal/canvas.js 2007-08-16 03:12:33 UTC (rev 5424)
> @@ -690,7 +690,11 @@
> self.setSelectedCalItem(ev);
> break;
> case 'save':
> - setLozengeProcessing(cmd);
> + if (cmd.data.data.getEventStamp()){
> + setLozengeProcessing(cmd);
> + } else {
> + removeEvent(cmd.data);
> + }
> // Do nothing
> break;
> case 'saveFailed':
> @@ -725,7 +729,9 @@
> }
> break;
> case 'saveSuccess':
> - saveSuccess(cmd);
> + if (cmd.data.data.getEventStamp()){
> + saveSuccess(cmd);
> + }
> break;
> case 'remove':
> // Show 'processing' state here
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Commits-Cosmo mailing list
> Commits-Cosmo at osafoundation.org
> http://lists.osafoundation.org/cgi-bin/mailman/listinfo/commits-cosmo
More information about the cosmo-dev
mailing list