Make ajaxEditable display a configurable ...loading... message instead o... #1246

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
2 participants

...f soon-to-be-replaced content and forms.

ajaxEditable is currently estranging users with wacky connections: They see a form, can start editing, only to see their work vanish and the form apparently resetting when the setAndSwap command comes through the slow connection.

I found references #259 to touch this and wondered if I was talking about the same issue?

Cheers Lift!

@georgkoester georgkoester commented on the diff Mar 26, 2012

web/webkit/src/main/scala/net/liftweb/http/SHtml.scala
@@ -510,7 +514,7 @@ trait SHtml {
{displayMarkup}
</div>
<div id={editName} style="display: none;">
- {editMarkup}
@georgkoester

georgkoester Mar 26, 2012

EditMarkup inserted the form which is shown right after a user clicks 'edit' - bad luck, this form will be replaced by the return from the server...

@georgkoester georgkoester commented on an outdated diff Mar 26, 2012

web/webkit/src/main/scala/net/liftweb/http/SHtml.scala
def editMarkup : NodeSeq = {
val formData : NodeSeq =
editForm ++
- <input type="submit" value={S.??("ok")} /> ++
- hidden(onSubmit) ++
- <input type="button" onclick={swapJsCmd(dispName,editName).toJsCmd + " return false;"} value={S.??("cancel")} />
-
+ <input type="submit" value={S.??("ok")} /> ++
+ hidden(onSubmit) ++
+ <input type="button" onclick={swapJsCmd(dispName,editName).toJsCmd + " return false;"} value={S.??("cancel")} />
@georgkoester

georgkoester Mar 26, 2012

Cancel is broken now - will only show ...loading...
Need to decide if swapping should be different here or if set should happen from server on cancel, too.

georgkoester added some commits Mar 27, 2012

@georgkoester georgkoester Fix the cancel flow, too. Working. b359f6d
@georgkoester georgkoester Fix method name.
All my contributions licensed under Apache 2.0 2004.
df0e37a
Owner

fmpwizard commented Mar 28, 2012

We are discussing this issue on the mailing list now, so I'll close the pull request as the OP now knows we don;t accept pull requests.

fmpwizard closed this Mar 28, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment