Created
April 1, 2022 17:16
-
-
Save NickersF/82f0449e8134d48646c5c8a95b992b77 to your computer and use it in GitHub Desktop.
Tile layout builder AJAX call without .when() wrapper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax({ | |
type: "GET", | |
url: "/" + controllerName + "/" + actionName | |
}).then((data) => { | |
console.log(performance.now()); | |
self.configurationObject = JSON.parse(data); | |
self.tileLayoutRootElement = tileLayoutRootEl; | |
self.buildTileLayoutConfiguration(); | |
if (data != undefined || null || "Error Message") { | |
$("#" + self.tileLayoutRootElement).kendoTileLayout(self.tileLayoutConfiguration); | |
let tileLayoutInstance = $("#" + self.tileLayoutRootElement).data("kendoTileLayout"); | |
for (let key in self.configurationObject.Tiles) { | |
self.getTileLayoutHTML(self.configurationObject.Tiles[key].TemplateID, key, tileLayoutInstance); | |
} | |
} else { | |
console.log("Error"); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment