- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2020 03:28 AM
I have 1 more question
when a user opens VA it should open All topics and when user opens VA using Report an Incident button, it should open Report an Incident topic and stop existing topic if any. Can you help how can we modify the toggleWindow method to achieve this?
I have tried this and highlighted my changes in yellow, but it is not working.
$ctrl.createIncident = false;
$rootScope.$on('customEvent', function(event,obj) {
$ctrl.createIncident = true;
$ctrl.toggleWindow();
});
$ctrl.toggleWindow = function() {
if ($ctrl.isWindowVisible) {
$ctrl.isWindowVisible = false;
$timeout(function() {
if (!$ctrl.isWindowVisible) {
$element.find('.conversation-container').css("display", "none");
$element.find('.sn-connect-floating').css("display", "none");
$element.find('.sn-connect-floating-wrapper').css("display", "none");
// ios overlay hacky fix.
$document.find('.touch_scroll').css("-webkit-overflow-scrolling", "touch");
}
}, 300);
} else {
if (!$ctrl.firstPress) {
$ctrl.firstPress = true;
$ctrl.vaSource = '/$sn-va-web-client-app.do?sysparm_nostack=true&sysparm_stack=no';
if($ctrl.createIncident)
{
$ctrl.createIncident = false;
$ctrl.vaSource = '$sn-va-web-client-app.do?sysparm_skip_load_history=true&sysparm_topic=a91fe98b2f1710103e50a55df699b662';
}
if ($ctrl.options.va_url_params) {
$ctrl.vaSource = $ctrl.vaSource + '&' + $ctrl.options.va_url_params;
}
}
$ctrl.isWindowVisible = true;
$ctrl.hasUnreadMessages = false;
$element.find('.conversation-container').css("display", "block");
$element.find('.sn-connect-floating').css("display", "block");
$element.find('.sn-connect-floating-wrapper').css("display", "block");
// ios overlay hacky fix.
$document.find('.touch_scroll').css("-webkit-overflow-scrolling", "auto");
}
};