cwrc / DEPRECATED--CWRC-Dialogs

0 stars 0 forks source link

Editing entities: doesn't load existing entity #81

Open jefferya opened 9 years ago

jefferya commented 9 years ago

Edit doesn’t work with the new entity API

SusanBrown commented 9 years ago

Grrr.

On May 3, 2015, at 9:23 PM, Jeffery Antoniuk notifications@github.com wrote:

Edit doesn’t work with the new entity API

response has a different mime type than what the dialogs expect — Reply to this email directly or view it on GitHub https://github.com/cwrc/CWRC-Dialogs/issues/81.

jefferya commented 9 years ago

Given that the new Entities API response is "text/xml" as opposed to "application/json", the "parseXML" function appears redundant here:

https://github.com/cwrc/CWRC-Dialogs/blob/master/js/cD.js#L1781

Use "typeof" to determine if "string" or "xml".

Also, try the following:

dataType : 'xml',

https://github.com/cwrc/CWRC-Dialogs/blob/master/js/cwrc-api.js#L141

jefferya commented 9 years ago

Partial fix in-place. Needs testing when integrated with Islandora