Modal Windows in Service Portal Drag and Move
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2023 02:55 AM - edited 09-28-2023 02:55 AM
I created the popup widget using the below code but i want the popup window should be drag and move feature
https://serviceportal.io/modal-windows-service-portal/
Please guide me what code i need to use
function($uibModal, $scope) {
var c = this;
c.openModal = function() {
c.modalInstance = $uibModal.open({
templateUrl: 'modalTemplate',
scope: $scope
});
}
c.closeModal = function() {
c.modalInstance.close();
}
}
<div>
<button class="btn btn-primary" ng-click="c.openModal()">${Open Modal}</button>
</div>
<script type="text/ng-template" id="modalTemplate">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">Modal Window</h4>
</div>
<div class="panel-body wrapper-xl">
Hello
</div>
<div class="panel-footer text-right">
<button class="btn btn-primary" ng-click="c.closeModal()">${Close Modal}</button>
</div>
</div>
</script>
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2023 03:03 AM
Hi @ramesh_r,
I'm not completely sure this will work, but try adding this script in your link script:
$timeout(function () {
$(".modal-content").draggable();
}, 10);
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.