Skip to content

Commit

Permalink
Fixed custom properties' attributes removing the property namespace (…
Browse files Browse the repository at this point in the history
…xmlns)
  • Loading branch information
AdrienCastex committed Aug 20, 2017
1 parent 0caed21 commit 70c5341
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
7 changes: 6 additions & 1 deletion lib/server/v2/commands/Propfind.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,14 @@ var default_1 = (function () {
for (var name_1 in properties) {
if (reqBody.mustDisplay(name_1)) {
var tag = prop.ele(name_1);
console.log(name_1, tag);
if (reqBody.mustDisplayValue(name_1)) {
var property = properties[name_1];
tag.attributes = property.attributes;
if (tag.attributes)
for (var attName in property.attributes)
tag.attributes[attName] = property.attributes[attName];
else
tag.attributes = property.attributes;
tag.add(property.value);
}
}
Expand Down
8 changes: 7 additions & 1 deletion src/server/v2/commands/Propfind.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,10 +472,16 @@ export default class implements HTTPMethod
if(reqBody.mustDisplay(name))
{
const tag = prop.ele(name);
console.log(name, tag);
if(reqBody.mustDisplayValue(name))
{
const property = properties[name];
tag.attributes = property.attributes;
if(tag.attributes)
for(const attName in property.attributes)
tag.attributes[attName] = property.attributes[attName];
else
tag.attributes = property.attributes;

tag.add(property.value);
}
}
Expand Down

0 comments on commit 70c5341

Please sign in to comment.