Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #10984 (new defect)

Opened 10 months ago

Last modified 10 months ago

[PATCH] Fix default onFailure callback and failure handling from InPlaceEditor

Reported by: ZenCocoon Assigned to: madrobby
Priority: high Milestone: 2.x
Component: script.aculo.us Version: edge
Severity: major Keywords: tiny ready
Cc:

Description

At revision 8786 the default onFailure callback from in place editor is broken. It's just a switch between the 2 arguments, line 916.

Result: it breaks the rest of the failure handling

Attachments

fix_default_onFailure_callback.diff (0.5 kB) - added by ZenCocoon on 02/02/08 17:29:11.
fix_default_onFailure_callback_and_handleAJAXFailure.diff (0.7 kB) - added by ZenCocoon on 02/02/08 19:28:57.

Change History

02/02/08 17:29:11 changed by ZenCocoon

  • attachment fix_default_onFailure_callback.diff added.

02/02/08 17:34:25 changed by ZenCocoon

To understand why arguments need to be switch, check the method triggerCallback starting line 729:

  triggerCallback: function(cbName, arg) {
    if ('function' == typeof this.options[cbName]) {
      this.options[cbName](this, arg);
    }
  },

02/02/08 17:37:15 changed by ZenCocoon

  • keywords changed from control inplaceeditor onFailure to tiny patch control inplaceeditor onFailure.

02/02/08 19:28:13 changed by ZenCocoon

  • summary changed from [PATCH] Fix default onFailure callback from InPlaceEditor to [PATCH] Fix default onFailure callback and failure handling from InPlaceEditor.

02/02/08 19:28:57 changed by ZenCocoon

  • attachment fix_default_onFailure_callback_and_handleAJAXFailure.diff added.

02/02/08 19:33:52 changed by ZenCocoon

Second attachment "fix_default_onFailure_callback_and_handleAJAXFailure.diff" also fix the method handleAJAXFailure

At the revision 8786, the failure handling also breaks the editing has it doesn't leave properly the editing mode.

This new patch is still really tiny and fix this issue as well.

It as been tested by simulating a failure, using the onComplete handler from form submission.

02/03/08 00:02:09 changed by ZenCocoon

  • keywords changed from tiny patch control inplaceeditor onFailure to tiny ready.

Tested on :

OS X 0.5.1 :

  • Firefox 2.0.0.11
  • Safari Version 3.0.4 (5523.10.6)
  • Opera 9.25 (build 3721)

Win XP Pro SP2 :

  • Firefox 2.0.0.11
  • Safari 3.0.4 (523.15)
  • Opera 9.25 (build 8827)

02/03/08 00:41:24 changed by ZenCocoon

As user if you are seeking for a quick way to use this patch I made up a small extension fixing this issues