<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to add my own &amp;quot;delete site&amp;quot; dialog confirm on the site configuration options of alfresco share in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/how-to-add-my-own-quot-delete-site-quot-dialog-confirm-on-the/m-p/134430#M36178</link>
    <description>&lt;P&gt;I don't understand why alfresco choose aikau instead of going ahead with spring.... any small modification you try to make is a nightmare....&lt;/P&gt;&lt;P&gt;I just want to add my own entry/action in the dropdown Toolbar of site-wide operations....&lt;/P&gt;&lt;P&gt;To simplify the example let's leave out all the alfresco server-side stuff and focus on the Share interface-side stuff&lt;/P&gt;&lt;P&gt;Here a image to understand where i put my action:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="bKOHDzV" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://connect.hyland.com/t5/image/serverpage/image-id/1632i46B2CCD1D7376CBD/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Here the code is use:&lt;/P&gt;&lt;P&gt;1) A spring surf extension (project-share/src/main/resources/alfresco/web-extension/site-data/extensions/service-site-extension.xml)&lt;/P&gt;&lt;PRE&gt;&amp;lt;extension&amp;gt;
    &amp;lt;modules&amp;gt;
     	&amp;lt;module&amp;gt;
            &amp;lt;id&amp;gt;service-site-extension&amp;lt;/id&amp;gt;
            &amp;lt;version&amp;gt;1.0&amp;lt;/version&amp;gt;
            &amp;lt;auto-deploy&amp;gt;false&amp;lt;/auto-deploy&amp;gt;
            &amp;lt;evaluator type="default.extensibility.evaluator"/&amp;gt;
            &amp;lt;customizations&amp;gt;
                &amp;lt;customization&amp;gt;
                    &amp;lt;targetPackageRoot&amp;gt;org.alfresco.share.header&amp;lt;/targetPackageRoot&amp;gt;
                    &amp;lt;sourcePackageRoot&amp;gt;XXX.YYY.ZZZ.share.header&amp;lt;/sourcePackageRoot&amp;gt;
                &amp;lt;/customization&amp;gt;
            &amp;lt;/customizations&amp;gt;
            
            &amp;lt;configurations&amp;gt;
	            &amp;lt;config evaluator="string-compare" condition="DocLibCustom"&amp;gt;
				    &amp;lt;dependencies&amp;gt;
				      &amp;lt;js src="/XXX/modules/close-acdat.js"/&amp;gt;
				      &amp;lt;css src="/XXX/modules/close-acdat.css"/&amp;gt;
				    &amp;lt;/dependencies&amp;gt;
				 &amp;lt;/config&amp;gt;
            &amp;lt;/configurations&amp;gt;
      	&amp;lt;/module&amp;gt;
    &amp;lt;/modules&amp;gt;
&amp;lt;/extension&amp;gt;&lt;/PRE&gt;&lt;P&gt;2) The customization of the "share-header.get.js" (/project-share/src/main/resources/alfresco/web-extension/site-webscripts/XXX/YYY/ZZZ/share/header/share-header.get.js)&lt;/P&gt;&lt;PRE&gt;&amp;lt;import resource="classpath:/alfresco/site-webscripts/org/alfresco/share/imports/share-header.lib.js"&amp;gt;

// CLOSE SITE CONFIGURATION OPTION

if(page.url.templateArgs.site) {
	var siteData = getSiteData();
	if(siteData) {
		var isInAdminGroup = user.isAdmin; /
		var isInManagerGroup = siteData != null &amp;amp;&amp;amp; siteData.userIsSiteManager;
		var sitePreset = siteData.profile.sitePreset;
		if((isInAdminGroup || isInManagerGroup)) { 
		    var siteConfig = widgetUtils.findObject(model.jsonModel, "id", "HEADER_SITE_CONFIGURATION_DROPDOWN");
			if (siteConfig != null) {
			   var widgets = siteConfig.config.widgets;
			   // Add Close Site options only if is adimn or manager member of the site
			   widgets.push({
			      id: "HEADER_SERVICE_ACDAT_CLOSE_SITE",
			      name: "alfresco/menus/AlfMenuItem",
			      config: {
			         id: "HEADER_SERVICE_ACDAT_CLOSE_SITE",
			         label: "service-acdat-close_site.label",	            
		             title: "service-acdat-close_site.label",
		             iconAltText: "service-acdat-close_site.label",
			         iconClass: "alf-delete-20-icon",
                     
			         publishTopic: "&lt;SPAN&gt;ALF_CLOSE_ACDAT&lt;/SPAN&gt;", // HOW THE HELL I CALL MY JAVASCRIPT FROM THIS ????
 				     //publishTopic: "ALF_DELETE_SITE", /// THIS IS WORK....
			         publishPayload: {
			            shortName: page.url.templateArgs.site,
			            redirect: {
			               url: "user/" + encodeURIComponent(user.name) + "/dashboard",
			               type: "PAGE_RELATIVE",
			               target: "CURRENT"
			            }
			         }
			      }
			   }); 
		  }
		}
	}
}&lt;/PRE&gt;&lt;P&gt;3) The javascript i want to call.... with the &lt;SPAN&gt;ALF_CLOSE_ACDAT&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;/**
 * CloseSite module.
 *
 * Displays a dialog with cofirmation to close a site.
 * 
 * @namespace Alfresco.module
 * @class Alfresco.module.ServiceAcdatCloseSite
 */
(function()
{
   /**
    * CloseSite constructor.
    *
    * CloseSite is considered a singleton so constructor should be treated as private,
    * please use Alfresco.module.getServiceAcdatCloseSiteInstance() instead.
    *
    * @param {string} htmlId The HTML id of the parent element
    * @return {Alfresco.module.CloseSite} The new CloseSite instance
    * @constructor
    * @private
    */
   Alfresco.module.ServiceAcdatCloseSite = function(containerId)
   {
      var instance = Alfresco.util.ComponentManager.get(containerId);
      if (instance !== null)
      {
         throw new Error("An instance of Alfresco.module.ServiceAcdatCloseSite already exists.");
      }

      Alfresco.module.ServiceAcdatCloseSite.superclass.constructor.call(this, "Alfresco.module.ServiceAcdatCloseSite", containerId, ["button", "container", "connection", "selector", "json"]);

      // Set prototype properties
      this.closePromptActive = false;

      return this;
   };

   YAHOO.extend(Alfresco.module.ServiceAcdatCloseSite, Alfresco.component.Base,
   {
      /**
       * Will become true when the template (that sets the i18n messages)
       * to this module has been loaded.
       */
      localized: false,

      /**
       * Makes sure the dialog isn't displayed twice at the same time
       */
      closePromptActive: false,

      /**
       * Shows the dialog
       * in different ways depending on the config parameter.
       *
       * @method show
       * @param config {object} describes how the upload dialog should be displayed
       * The config object is in the form of:
       * {
       *    site:
       *    {
       *       shortName: {string},    // shortName of site to close
       *       title: {string}      // Name of site to close
       *    }
       * }
       */
      show: function CloseSite_show(config)
      {
         var c = config;
         if (this.localized)
         {
             this._showDialog(c);
         }
         else
         {
            Alfresco.util.Ajax.request(
            {
               url: Alfresco.constants.URL_SERVICECONTEXT + "modules/service-acdat/close-site",
               dataObj:{ htmlid: this.id },
               successCallback:
               {
                  fn: function()
                  {
                     this.onMessagesLoaded(c);
                  },
                  scope: this
               },
               execScripts: true,
               failureMessage: "Could not load close site messages"
            });
         }
      },

      /**
       * Called when the CloseSite messages has been returned from the server.
       * Shows the dialog.
       *
       * @method onMessagesLoaded
       * @param config {object} The config for the dialog
       */
      onMessagesLoaded: function CloseSite_onMessagesLoaded(config)
      {
         this.localized = true;
         this._showDialog(config);
      },

      /**
       * Shows the dialog.
       *
       * @method _showDialog
       * @param config {object} The config for the dialog
       * @private
       */
      _showDialog: function CloseSite__showDialog(config)
      {
         if (!this.closePromptActive)
         {
            this.closePromptActive = true;
            var me = this,
               c = config;
            Alfresco.util.PopupManager.displayPrompt(
            {
               title: Alfresco.util.message("title.closeSite", this.name),
               text: Alfresco.util.message("label.closeSite", this.name,
               {
                  "0": Alfresco.util.encodeHTML(c.site.title)
               }),
               noEscape: true,
               buttons: [
               {
                  text: Alfresco.util.message("button.close", this.name),
                  handler: function CloseSite__sD_close()
                  {                        
                     this.destroy();
                     me._onCloseClick.call(me, c);
                  }
               },
               {
                  text: Alfresco.util.message("button.cancel", this.name),
                  handler: function CloseSite__sD_cancel()
                  {
                     me.closePromptActive = false;
                     this.destroy();
                  },
                  isDefault: true
               }]
            });
            
            var Dom = YAHOO.util.Dom;
            var elements = Dom.getElementsByClassName('yui-button', 'span', 'prompt');
            Dom.addClass(elements[0], 'alf-primary-button');
         }
      },
      
      /**
       * Handles close click event.
       *
       * @method _onCloseClick
       * @param config {object} The config for the dialog
       * @private
       */
      _onCloseClick: function CloseSite__onCloseClick(config)
      {
         var me = this,
            c = config;
         Alfresco.util.PopupManager.displayPrompt(
         {
            title: Alfresco.util.message("title.closeSite", this.name),
            text: Alfresco.util.message("label.confirmCloseSite", this.name),
            noEscape: true,            
            buttons: [
               {
                  text: Alfresco.util.message("button.yes", this.name),
                  handler: function CloseSite__oDC_close()
                  {
                     this.destroy();
                     me._onConfirmedCloseClick.call(me, c);
                  }
               },
               {
                  text: Alfresco.util.message("button.no", this.name),
                  handler: function CloseSite__oDC_cancel()
                  {
                     me.closePromptActive = false;
                     this.destroy();
                  },
                  isDefault: true
               }]
         });
      },

      /**
       * Handles confirmed close click event.
       *
       * @method _onConfirmedCloseClick
       * @param config {object} The config for the dialog
       * @private
       */
      _onConfirmedCloseClick: function CloseSite__onConfirmedCloseClick(config)
      {
         var me = this,
            c = config;
         var feedbackMessage = Alfresco.util.PopupManager.displayMessage(
         {
            text: Alfresco.util.message("message.closingSite", this.name),
            spanClass: "wait",
            displayTime: 0
         });
         
         // user has confirmed, perform the actual close
         Alfresco.util.Ajax.jsonPost(
         {
            url: Alfresco.constants.URL_SERVICECONTEXT + "modules/service-acdat/close-site",
            dataObj:
            {
               shortName: config.site.shortName
            },
            successCallback:
            {
               fn: function(response)
               {
                  me.closePromptActive = false;
                  feedbackMessage.destroy();
                  if (response.json &amp;amp;&amp;amp; response.json.success)
                  {
                     Alfresco.util.PopupManager.displayMessage(
                     {
                        text: Alfresco.util.message("message.siteClosed", this.name)
                     });
                     
                     // Tell other components that the site has been closed
                     YAHOO.Bubbling.fire("siteClosed",
                     {
                        site: c.site
                     });
                  }
                  else
                  {
                     Alfresco.util.PopupManager.displayMessage(
                     {
                        text: Alfresco.util.message("message.closeFailed", this.name)
                     });
                  }
               },
               scope: this
            },
            failureCallback:
            {
               fn: function(response)
               {
                  me.closePromptActive = false;
                  feedbackMessage.destroy();
                  Alfresco.util.PopupManager.displayMessage(
                  {
                     text: Alfresco.util.message("message.closeFailed", this.name)
                  });
               },
               scope: this
            }
         });
      }
   });
})();

Alfresco.module.getServiceAcdatCloseSiteInstance = function()
{
   var instanceId = "alfresco-service-acdat-closesite-instance";
   return Alfresco.util.ComponentManager.get(instanceId) || new Alfresco.module.ServiceAcdatCloseSite(instanceId);
};&lt;/PRE&gt;&lt;P&gt;now I don't understand how I have to add my ALF_CLOSE_ACDAT to make a simple confirmation dialog appear and then launch an action on Alfresco, but clearly I can't make the confirmation dialog appear...&lt;/P&gt;&lt;P&gt;If I enter ALF_DELETE_SITE the button works and brings up the confirmation dialog as it should....&lt;BR /&gt;At the github source code level I cannot see where the string ALF_DELETE_SITE is used to invoke the javascript code "delete-site.js"&lt;/P&gt;&lt;P&gt;SO IN BRIEF MY QUESTION IS HOW THE HELL DO I CONNECT "ALF_CLOSE_ACDAT " TO THE JAVASCRIPT FILE "close-acdat.js" to make the confirmation dialog appear exactly as ALD_DELETE_SITE does ?&lt;/P&gt;</description>
    <pubDate>Fri, 03 Feb 2023 08:36:20 GMT</pubDate>
    <dc:creator>AlfrescoZZZ</dc:creator>
    <dc:date>2023-02-03T08:36:20Z</dc:date>
    <item>
      <title>How to add my own "delete site" dialog confirm on the site configuration options of alfresco share</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-add-my-own-quot-delete-site-quot-dialog-confirm-on-the/m-p/134430#M36178</link>
      <description>&lt;P&gt;I don't understand why alfresco choose aikau instead of going ahead with spring.... any small modification you try to make is a nightmare....&lt;/P&gt;&lt;P&gt;I just want to add my own entry/action in the dropdown Toolbar of site-wide operations....&lt;/P&gt;&lt;P&gt;To simplify the example let's leave out all the alfresco server-side stuff and focus on the Share interface-side stuff&lt;/P&gt;&lt;P&gt;Here a image to understand where i put my action:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="bKOHDzV" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://connect.hyland.com/t5/image/serverpage/image-id/1632i46B2CCD1D7376CBD/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Here the code is use:&lt;/P&gt;&lt;P&gt;1) A spring surf extension (project-share/src/main/resources/alfresco/web-extension/site-data/extensions/service-site-extension.xml)&lt;/P&gt;&lt;PRE&gt;&amp;lt;extension&amp;gt;
    &amp;lt;modules&amp;gt;
     	&amp;lt;module&amp;gt;
            &amp;lt;id&amp;gt;service-site-extension&amp;lt;/id&amp;gt;
            &amp;lt;version&amp;gt;1.0&amp;lt;/version&amp;gt;
            &amp;lt;auto-deploy&amp;gt;false&amp;lt;/auto-deploy&amp;gt;
            &amp;lt;evaluator type="default.extensibility.evaluator"/&amp;gt;
            &amp;lt;customizations&amp;gt;
                &amp;lt;customization&amp;gt;
                    &amp;lt;targetPackageRoot&amp;gt;org.alfresco.share.header&amp;lt;/targetPackageRoot&amp;gt;
                    &amp;lt;sourcePackageRoot&amp;gt;XXX.YYY.ZZZ.share.header&amp;lt;/sourcePackageRoot&amp;gt;
                &amp;lt;/customization&amp;gt;
            &amp;lt;/customizations&amp;gt;
            
            &amp;lt;configurations&amp;gt;
	            &amp;lt;config evaluator="string-compare" condition="DocLibCustom"&amp;gt;
				    &amp;lt;dependencies&amp;gt;
				      &amp;lt;js src="/XXX/modules/close-acdat.js"/&amp;gt;
				      &amp;lt;css src="/XXX/modules/close-acdat.css"/&amp;gt;
				    &amp;lt;/dependencies&amp;gt;
				 &amp;lt;/config&amp;gt;
            &amp;lt;/configurations&amp;gt;
      	&amp;lt;/module&amp;gt;
    &amp;lt;/modules&amp;gt;
&amp;lt;/extension&amp;gt;&lt;/PRE&gt;&lt;P&gt;2) The customization of the "share-header.get.js" (/project-share/src/main/resources/alfresco/web-extension/site-webscripts/XXX/YYY/ZZZ/share/header/share-header.get.js)&lt;/P&gt;&lt;PRE&gt;&amp;lt;import resource="classpath:/alfresco/site-webscripts/org/alfresco/share/imports/share-header.lib.js"&amp;gt;

// CLOSE SITE CONFIGURATION OPTION

if(page.url.templateArgs.site) {
	var siteData = getSiteData();
	if(siteData) {
		var isInAdminGroup = user.isAdmin; /
		var isInManagerGroup = siteData != null &amp;amp;&amp;amp; siteData.userIsSiteManager;
		var sitePreset = siteData.profile.sitePreset;
		if((isInAdminGroup || isInManagerGroup)) { 
		    var siteConfig = widgetUtils.findObject(model.jsonModel, "id", "HEADER_SITE_CONFIGURATION_DROPDOWN");
			if (siteConfig != null) {
			   var widgets = siteConfig.config.widgets;
			   // Add Close Site options only if is adimn or manager member of the site
			   widgets.push({
			      id: "HEADER_SERVICE_ACDAT_CLOSE_SITE",
			      name: "alfresco/menus/AlfMenuItem",
			      config: {
			         id: "HEADER_SERVICE_ACDAT_CLOSE_SITE",
			         label: "service-acdat-close_site.label",	            
		             title: "service-acdat-close_site.label",
		             iconAltText: "service-acdat-close_site.label",
			         iconClass: "alf-delete-20-icon",
                     
			         publishTopic: "&lt;SPAN&gt;ALF_CLOSE_ACDAT&lt;/SPAN&gt;", // HOW THE HELL I CALL MY JAVASCRIPT FROM THIS ????
 				     //publishTopic: "ALF_DELETE_SITE", /// THIS IS WORK....
			         publishPayload: {
			            shortName: page.url.templateArgs.site,
			            redirect: {
			               url: "user/" + encodeURIComponent(user.name) + "/dashboard",
			               type: "PAGE_RELATIVE",
			               target: "CURRENT"
			            }
			         }
			      }
			   }); 
		  }
		}
	}
}&lt;/PRE&gt;&lt;P&gt;3) The javascript i want to call.... with the &lt;SPAN&gt;ALF_CLOSE_ACDAT&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;/**
 * CloseSite module.
 *
 * Displays a dialog with cofirmation to close a site.
 * 
 * @namespace Alfresco.module
 * @class Alfresco.module.ServiceAcdatCloseSite
 */
(function()
{
   /**
    * CloseSite constructor.
    *
    * CloseSite is considered a singleton so constructor should be treated as private,
    * please use Alfresco.module.getServiceAcdatCloseSiteInstance() instead.
    *
    * @param {string} htmlId The HTML id of the parent element
    * @return {Alfresco.module.CloseSite} The new CloseSite instance
    * @constructor
    * @private
    */
   Alfresco.module.ServiceAcdatCloseSite = function(containerId)
   {
      var instance = Alfresco.util.ComponentManager.get(containerId);
      if (instance !== null)
      {
         throw new Error("An instance of Alfresco.module.ServiceAcdatCloseSite already exists.");
      }

      Alfresco.module.ServiceAcdatCloseSite.superclass.constructor.call(this, "Alfresco.module.ServiceAcdatCloseSite", containerId, ["button", "container", "connection", "selector", "json"]);

      // Set prototype properties
      this.closePromptActive = false;

      return this;
   };

   YAHOO.extend(Alfresco.module.ServiceAcdatCloseSite, Alfresco.component.Base,
   {
      /**
       * Will become true when the template (that sets the i18n messages)
       * to this module has been loaded.
       */
      localized: false,

      /**
       * Makes sure the dialog isn't displayed twice at the same time
       */
      closePromptActive: false,

      /**
       * Shows the dialog
       * in different ways depending on the config parameter.
       *
       * @method show
       * @param config {object} describes how the upload dialog should be displayed
       * The config object is in the form of:
       * {
       *    site:
       *    {
       *       shortName: {string},    // shortName of site to close
       *       title: {string}      // Name of site to close
       *    }
       * }
       */
      show: function CloseSite_show(config)
      {
         var c = config;
         if (this.localized)
         {
             this._showDialog(c);
         }
         else
         {
            Alfresco.util.Ajax.request(
            {
               url: Alfresco.constants.URL_SERVICECONTEXT + "modules/service-acdat/close-site",
               dataObj:{ htmlid: this.id },
               successCallback:
               {
                  fn: function()
                  {
                     this.onMessagesLoaded(c);
                  },
                  scope: this
               },
               execScripts: true,
               failureMessage: "Could not load close site messages"
            });
         }
      },

      /**
       * Called when the CloseSite messages has been returned from the server.
       * Shows the dialog.
       *
       * @method onMessagesLoaded
       * @param config {object} The config for the dialog
       */
      onMessagesLoaded: function CloseSite_onMessagesLoaded(config)
      {
         this.localized = true;
         this._showDialog(config);
      },

      /**
       * Shows the dialog.
       *
       * @method _showDialog
       * @param config {object} The config for the dialog
       * @private
       */
      _showDialog: function CloseSite__showDialog(config)
      {
         if (!this.closePromptActive)
         {
            this.closePromptActive = true;
            var me = this,
               c = config;
            Alfresco.util.PopupManager.displayPrompt(
            {
               title: Alfresco.util.message("title.closeSite", this.name),
               text: Alfresco.util.message("label.closeSite", this.name,
               {
                  "0": Alfresco.util.encodeHTML(c.site.title)
               }),
               noEscape: true,
               buttons: [
               {
                  text: Alfresco.util.message("button.close", this.name),
                  handler: function CloseSite__sD_close()
                  {                        
                     this.destroy();
                     me._onCloseClick.call(me, c);
                  }
               },
               {
                  text: Alfresco.util.message("button.cancel", this.name),
                  handler: function CloseSite__sD_cancel()
                  {
                     me.closePromptActive = false;
                     this.destroy();
                  },
                  isDefault: true
               }]
            });
            
            var Dom = YAHOO.util.Dom;
            var elements = Dom.getElementsByClassName('yui-button', 'span', 'prompt');
            Dom.addClass(elements[0], 'alf-primary-button');
         }
      },
      
      /**
       * Handles close click event.
       *
       * @method _onCloseClick
       * @param config {object} The config for the dialog
       * @private
       */
      _onCloseClick: function CloseSite__onCloseClick(config)
      {
         var me = this,
            c = config;
         Alfresco.util.PopupManager.displayPrompt(
         {
            title: Alfresco.util.message("title.closeSite", this.name),
            text: Alfresco.util.message("label.confirmCloseSite", this.name),
            noEscape: true,            
            buttons: [
               {
                  text: Alfresco.util.message("button.yes", this.name),
                  handler: function CloseSite__oDC_close()
                  {
                     this.destroy();
                     me._onConfirmedCloseClick.call(me, c);
                  }
               },
               {
                  text: Alfresco.util.message("button.no", this.name),
                  handler: function CloseSite__oDC_cancel()
                  {
                     me.closePromptActive = false;
                     this.destroy();
                  },
                  isDefault: true
               }]
         });
      },

      /**
       * Handles confirmed close click event.
       *
       * @method _onConfirmedCloseClick
       * @param config {object} The config for the dialog
       * @private
       */
      _onConfirmedCloseClick: function CloseSite__onConfirmedCloseClick(config)
      {
         var me = this,
            c = config;
         var feedbackMessage = Alfresco.util.PopupManager.displayMessage(
         {
            text: Alfresco.util.message("message.closingSite", this.name),
            spanClass: "wait",
            displayTime: 0
         });
         
         // user has confirmed, perform the actual close
         Alfresco.util.Ajax.jsonPost(
         {
            url: Alfresco.constants.URL_SERVICECONTEXT + "modules/service-acdat/close-site",
            dataObj:
            {
               shortName: config.site.shortName
            },
            successCallback:
            {
               fn: function(response)
               {
                  me.closePromptActive = false;
                  feedbackMessage.destroy();
                  if (response.json &amp;amp;&amp;amp; response.json.success)
                  {
                     Alfresco.util.PopupManager.displayMessage(
                     {
                        text: Alfresco.util.message("message.siteClosed", this.name)
                     });
                     
                     // Tell other components that the site has been closed
                     YAHOO.Bubbling.fire("siteClosed",
                     {
                        site: c.site
                     });
                  }
                  else
                  {
                     Alfresco.util.PopupManager.displayMessage(
                     {
                        text: Alfresco.util.message("message.closeFailed", this.name)
                     });
                  }
               },
               scope: this
            },
            failureCallback:
            {
               fn: function(response)
               {
                  me.closePromptActive = false;
                  feedbackMessage.destroy();
                  Alfresco.util.PopupManager.displayMessage(
                  {
                     text: Alfresco.util.message("message.closeFailed", this.name)
                  });
               },
               scope: this
            }
         });
      }
   });
})();

Alfresco.module.getServiceAcdatCloseSiteInstance = function()
{
   var instanceId = "alfresco-service-acdat-closesite-instance";
   return Alfresco.util.ComponentManager.get(instanceId) || new Alfresco.module.ServiceAcdatCloseSite(instanceId);
};&lt;/PRE&gt;&lt;P&gt;now I don't understand how I have to add my ALF_CLOSE_ACDAT to make a simple confirmation dialog appear and then launch an action on Alfresco, but clearly I can't make the confirmation dialog appear...&lt;/P&gt;&lt;P&gt;If I enter ALF_DELETE_SITE the button works and brings up the confirmation dialog as it should....&lt;BR /&gt;At the github source code level I cannot see where the string ALF_DELETE_SITE is used to invoke the javascript code "delete-site.js"&lt;/P&gt;&lt;P&gt;SO IN BRIEF MY QUESTION IS HOW THE HELL DO I CONNECT "ALF_CLOSE_ACDAT " TO THE JAVASCRIPT FILE "close-acdat.js" to make the confirmation dialog appear exactly as ALD_DELETE_SITE does ?&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 08:36:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-add-my-own-quot-delete-site-quot-dialog-confirm-on-the/m-p/134430#M36178</guid>
      <dc:creator>AlfrescoZZZ</dc:creator>
      <dc:date>2023-02-03T08:36:20Z</dc:date>
    </item>
  </channel>
</rss>

