Knowledge Article Popup message
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2020 01:44 PM
On Knowledge Article Page when ever we click on Helpful Yes/No it should Popup a message box to provide the Feedback and Feedback needs to be captured on KB_feedback Table.
Need a client script for a Widget.
Helpful ? is set on Widget
Popup should be like below
My Client script
function ($timeout,spModal) {
var c = this;
c.hide = false;
c.submitted = false;
c.action = function(state) {
c.submitted = true;
c.data.state = state;
c.data.response = c.data.submittingMsg;
c.server.update().then(c.hideIt);
}
c.hideIt = function() {
$timeout(function() {
c.hide = true;
}, 2000);
}
c.showPercentHelpful = function() {
if (c.submitted)
return false;
if (c.data.percent < 0)
return false;
return c.options.hide_percent_helpful != true && c.options.hide_percent_helpful != "true";
}
}
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2020 03:30 PM
Chk the below example
Mark my ANSWER as CORRECT and HELPFUL if it helps