cancel
Showing results for 
Search instead for 
Did you mean: 

Aikua Widget Question?

mwallach
Champ in-the-making
Champ in-the-making
Hi,

I have a custom widget (myWidget.js) that has alfresco/renderers/MoreInfo has an included widget. Can I call functions defined within MoreInfo widget from myWidget? For example, in myWidget.js I focus function:

      focus: function my_renderers_MyGalleryThumbnail__focus() {
         this.domNode.focus();
         domClass.remove(this.titleNode, "share-hidden");
      }

I want to call the onMoreInfo from focus. How would I do this?

Mike
1 REPLY 1

gravitonian
Star Collaborator
Star Collaborator
Hi,

If I look at the source code for Aikau I can see an example like this:


define(["dojo/_base/declare",
        …
        "alfresco/renderers/MoreInfo"],
        function(declare, …, MoreInfo) {

   return declare([Row], {

      postCreate: function alfresco_search_AlfSearchResult__postCreate() {

         …

         var moreInfoConfig = {
            currentItem: this.currentItem,
            pubSubScope: this.pubSubScope,
            xhrRequired: true,
            filterActions: true,
            darkIcon: true
         };

         …

         new MoreInfo(moreInfoConfig, this.moreInfoNode);

         …
      }


So as long as the myWidget module requires the MoreInfo module you should be able to use it.

For more info on the internals see: https://docs.google.com/document/d/1q25jA5EQ5PRYekr8tpM3ELlwOQ8Ht3Ng6D4VWsKoZtY/pub