Backbone Webdav adapter MKCOL support#26842
Conversation
12bd1ca to
4dbf884
Compare
|
Please review @DeepDiver1975 @mjobst-necls @jvillafanez |
| var parts = url.split('/'); | ||
| return parts[parts.length - 1]; | ||
| var result; | ||
| while (!result && parts.length > 0) { |
There was a problem hiding this comment.
A "do-while" loop might be better, and also a comment for the special case that needs this.
| // use PUT instead of PROPPATCH | ||
| params.type = 'PUT'; | ||
| if (method === 'update') { | ||
| if (model.getInnerCollection) { |
There was a problem hiding this comment.
The naming is weird. If getInnerCollection is a function the normal check should be calling the function and verify the inner collection is there. If it's a property maybe we should change the name, or at least comment that this is a property and not a function.
There was a problem hiding this comment.
This line checks whether the method exists to find out whether this model has an inner collection. Maybe that looks too hacky. I'll try and think of a more obvious way.
There was a problem hiding this comment.
A comment might be enough as long as it makes clear this is intended and the reasons to do this way.
There was a problem hiding this comment.
Ok, understood. I'll add a comment and replace with _.isFunction(model.getInnerCollection) which is also much clearer about its intent.
4dbf884 to
e91086a
Compare
|
@jvillafanez all adjusted. Please re-review, thanks. |
e91086a to
5fd3ad2
Compare
|
👍 |
|
Do I get an achievement for "weirdest random failure output" on Jenkins ? |
Usually Backbone collections cannot be created and just simply exists. But in the Webdav world they need to be creatable. This enhancement makes it possible to use a Backbone Model to represent such collections and when creating it, it will use MKCOL instead of PUT.
5fd3ad2 to
1efd87f
Compare
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
Backbone Webdav Adapter MKCOL support
Usually Backbone collections cannot be created and just simply exists.
But in the Webdav world they need to be creatable.
This enhancement makes it possible to use a Backbone Model to represent such collections and when creating it, it will use MKCOL instead of PUT.
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: