
jimrrchen got review request #3000!
confirmation for leaving the page now only appears when the text in inlineEditor is actually changed, also fixed a bug with esc key not registered with inlineEditor
Review Request #3000 — Created March 22, 2012 and submitted
Information | |
---|---|
jimrrchen | |
Djblets | |
Reviewers | |
djblets | |
Confirmation for leaving the page now only appears when the text in inlineEditor is actually changed Also fixed a bug with esc key not registered with inlineEditor Changed the behaviour of the editor so now whenever the dirty state is changed a "dirtyStateChanged" event is triggered
Done in Linux environment with Chrome 17 and Firefox 11
Description | From | Last Updated |
---|---|---|
We have a dirty() function already. It seems it could just be updated to not assume dirty if in edit … |
|
|
This will break things. There's distinct differences in how codes come in from keydown and keypress, and what will go … |
|
|
All comments must use sentence capitalization and trailing periods. For multi-line comments, use: /* * comment line * ... */ |
|
|
So, what does trigger this now? It feels like this will cause API breakage. |
|
|
I know the old code wasn't styled right, but all jquery stuff should be like: $(el) .keydown(function(e) { }) .keyup(function(e) … |
|
|
"resets" Period at the end. |
|
|
Period at the end. |
|
|
No space before ":" |
|
|
I'd prefer "curDirtyState" rather than using "curr". |
|
Description: |
|
---|
-
-
djblets/media/js/jquery.gravy.js (Diff revision 1) We have a dirty() function already. It seems it could just be updated to not assume dirty if in edit mode. In fact, I think the rest of the change in here could go away with that function being updated? iirc, our logic for determining whether to show the confirmation dialog on page leave is doing it based on a query using dirty(). I don't see where this ties in to that?
-
djblets/media/js/jquery.gravy.js (Diff revision 1) This will break things. There's distinct differences in how codes come in from keydown and keypress, and what will go to what. That's why we have the distinction between these events today. We can't change that.
-
djblets/media/js/jquery.gravy.js (Diff revision 1) All comments must use sentence capitalization and trailing periods. For multi-line comments, use: /* * comment line * ... */
-
djblets/media/js/jquery.gravy.js (Diff revision 1) So, what does trigger this now? It feels like this will cause API breakage.
Change Summary:
Changed the behaviour of the editor so now whenever the dirty state is changed a "dirtyStateChanged" event is triggered
Description: |
|
|||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+27 -24) |
-
Some minor nits. General stuff looks really good.
-
djblets/media/js/jquery.gravy.js (Diff revision 2) I know the old code wasn't styled right, but all jquery stuff should be like: $(el) .keydown(function(e) { }) .keyup(function(e) { });
-
-
-
-
djblets/media/js/jquery.gravy.js (Diff revision 2) I'd prefer "curDirtyState" rather than using "curr".