Tab check is now using id and hash instead of innerHtml

This commit is contained in:
Robert
2017-09-21 15:50:22 +02:00
parent dcdfb074af
commit 97868593f8
2 changed files with 5 additions and 3 deletions
@@ -34,7 +34,7 @@
// load audit trail on tab change
eventsService.on("tab change", function (event, args) {
if (args.context.innerHTML === "Properties" && args.context.hash === "#tab0") {
if (args.tabId === "0" || args.tabHash === "#tab0") {
loadAuditTrail();
}
});
@@ -20,8 +20,10 @@ angular.module("umbraco.directives")
var curr = $(event.target); // active tab
var prev = $(event.relatedTarget); // previous tab
//emit tab change event
eventsService.emit("tab change", curr);
var args = { tabId: curr.context.id, tabHash: curr.context.hash }
// emit tab change event
eventsService.emit("tab change", args);
$scope.$apply();