rename originalIds to keepIds in HtmlHelpers API
This commit is contained in:
parent
c4e6b757f9
commit
935fd6d7eb
@ -7,7 +7,7 @@
|
|||||||
// Returns an object with `element` being an contextual fragment of the
|
// Returns an object with `element` being an contextual fragment of the
|
||||||
// HTML in the response and `ifPrefix` being the prefix that was used to
|
// HTML in the response and `ifPrefix` being the prefix that was used to
|
||||||
// "unique-ify" the ids of the received HTML.
|
// "unique-ify" the ids of the received HTML.
|
||||||
// Original Response IDs can optionally be kept by adding `originalIds: true`
|
// Original Response IDs can optionally be kept by adding `keepIds: true`
|
||||||
// to the `options` object.
|
// to the `options` object.
|
||||||
function parseResponse(response, options) {
|
function parseResponse(response, options) {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
@ -15,7 +15,7 @@
|
|||||||
return response.text().then(function (responseText) {
|
return response.text().then(function (responseText) {
|
||||||
var docFrag = document.createRange().createContextualFragment(responseText);
|
var docFrag = document.createRange().createContextualFragment(responseText);
|
||||||
var idPrefix;
|
var idPrefix;
|
||||||
if (!options.originalIds) {
|
if (!options.keepIds) {
|
||||||
idPrefix = _getIdPrefix();
|
idPrefix = _getIdPrefix();
|
||||||
_prefixIds(docFrag, idPrefix);
|
_prefixIds(docFrag, idPrefix);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -324,7 +324,7 @@
|
|||||||
headers: headers,
|
headers: headers,
|
||||||
accept: HttpClient.ACCEPT.TEXT_HTML,
|
accept: HttpClient.ACCEPT.TEXT_HTML,
|
||||||
}).then(function(response) {
|
}).then(function(response) {
|
||||||
return HtmlHelpers.parseResponse(response, { originalIds: true });
|
return HtmlHelpers.parseResponse(response);
|
||||||
}).then(function(response) {
|
}).then(function(response) {
|
||||||
setLocalStorageParameter('currentTableUrl', url.href);
|
setLocalStorageParameter('currentTableUrl', url.href);
|
||||||
// reset table
|
// reset table
|
||||||
|
|||||||
Reference in New Issue
Block a user