How to call one widget data fromn another widget.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2024 02:17 AM
we have two widgets. in one widget we have a buton called Action. Basically by using this button the end user can perform action oin their incidents like Resove, Reopen, Close.
so now we are implementing a functionality which supports Escation from the incident from.
so we have created a widget called "Escalation' and defined funcitons to work accordingly.
now the requiremnt is we have to embed that Escalation button in the exisiting Action menu.
Please sinf the screenshot below
Please find the widget Scripts we wrote and kindly alter / update to work
Escalation widget Scripts:
Body HTML Template:
<div class="action_button panel b" ng-if="data.showWidget" >
<!--<div class="panel b" ng-if="data.showWidget" ng-if = "!data.first_escalation" > -->
<button type="button" class="btn btn-danger btn-block" ng-click = "c.uiAction('cancel')" ng-disabled = "data.first_escalation"> <font size = "+1" face="Arial" color="white" data-toggle="tooltip" title="Click to escalate this issue to the Support Team Manager." > ${Escalation} </font> </button>
</div>
<script>
$(document).ready(function(){
$('[data-toggle="tooltip"]').tooltip();
});
</script>
SERVER Script:
<div class="dropdown" id="child-case-tabs" ng-if="data.showActions">
<button type="button" id="actions-button" class="btn btn-default dropdown-toggle action-btn" data-toggle="dropdown" style="width : 100%" aria-haspopup="true" ng-init="setFocusOnActionButtons()">
${Actions}
<span class="fa fa-caret-down"></span>
</button>
<ul class="dropdown-menu pull-right" id="actionList">
<li ng-if="data.canResolve">
<a href="javascript:void(0)" ng-click="$event.stopPropagation();resolveIncident()">${Resolve}</a>
</li>
<li ng-if="data.canReopen">
<a href="javascript:void(0)" ng-click="$event.stopPropagation();reopenIncident()">${Reopen}</a>
</li>
<li ng-if="data.canClose">
<a href="javascript:void(0)" ng-click="$event.stopPropagation();closeIncident()">${Close}</a>
</li>
</ul>
</div>
</div>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2024 07:05 PM
Hi @thaduri sai ,
HTML
<div>
<div>
<sp-widget widget="data.example"></sp-widget>
</div>
</div>
Server
data.example = $sp.getWidget('anotherwidgetid', {});
Also, watch this video : https://www.youtube.com/watch?v=uEK0SWiiZ3E