Size values for Confluence Insert link Dialog

Hi

I cannot provide width,height parametr to make Confluence Insert link Dialog. So, the one that appears with default size is bigger one and it's not scrollable. Following is the code for the dialog:

(function($) {

    // The tab registers itself when the Link Browser is created.
    AJS.bind("dialog-created.link-browser", function (e, linkBrowser) {
    	

        var key = 'demo',    // This panel's key: must match the ID of the web-item link and panel template
            $linkField,      // The jQueryfied link input element.
            thisPanel,       // A reference to this panel, stored when the panel is created
            tab;             // A reference to the tab

        // Define the available Link Browser Advanced tab methods.
        tab = linkBrowser.tabs[key] = {
        	
            // called when the panel is created - register event handlers here
          createPanel: function (context) { thisPanel = context.baseElement;
                $linkField = thisPanel.find("input[name='destination']");               
                
                AJS.$.ajax({                   
                    url: AJS.contextPath() + "/rest/dreambroker-rest/1.0/dreambroker/videoList",                    
                    type: "GET",         
                    dataType: "xml",
                    success: function(data){
                    	//alert("in success");                   		
                    	
                    		//alert('form found');
                    		 var vdoSelect = AJS.$("#videos");   
                    		 vdoSelect.val('');    
                    		// vdoSelect.append("<option class='ddindent'>Select</option>"); 
                             AJS.$(data).find("video").each(function()
                             {                   
                              // alert("title=" + AJS.$(this).find("title").text() + "url=" + AJS.$(this).find("url").text());  
                               var vdoTitle = AJS.$(this).find("title").text();
                               var vdoUrl = AJS.$(this).find("url").text();
                               vdoSelect.append("<option class='ddindent' value='"+ vdoUrl +"'>"+vdoTitle+"</option>");
                             });                           
                    
                        return false;

            	      },
            	      error: function(response) {

            	    	alert("failed");

            	    	 }
            }); 

                thisPanel.find("form").keydown(function(e) {
                    if(e.keyCode == 13 && !linkBrowser.isSubmitButtonEnabled()) {
                        e.preventDefault();
                    }
                });
                $linkField.keyup(function (e) {
                    AJS.log("link field keyup");
                    var url = $linkField.val();
                    var linkObj = url ? Confluence.Link.makeExternalLink(url) : null;
                    if (linkObj) {
                        linkBrowser.setLink(linkObj); // will enable the Submit button when a URL is added
                    }
                });
            },
            
           


            // Called when the panel is selected
            onSelect: function () {            	
                // Defer focus to after dialog is shown, gets around AJS.Dialog tabindex issues
                setTimeout(function() {
                    $linkField.focus();
                });
            },

            // Called when this panel is no longer selected
            onDeselect: function () {
            },

            // Called when the submit button is clicked, before the location is retrieved
            preSubmit: function () {
            	
            },


            // Called before the dialog opens to determine which tab to highlight
            handlesLink: function (linkObj) {
                // return true if the link should be cause this panel to be selected when editing
            	
                return false;
            }
        };
    });
    
   // AJS.$.ajax({ 
    	
   // }); 



})(jQuery);

The dialog gets created at the bold lines in the code, now I need to provide width, height parameters or scroll parameter. Can someone help me?

Thanks

1 answer

Is this the problem that you're referring to? (See screen shot)  If so, I have the some complaint/frustration.  Would love to get some help to resolve it!  (PS I know this is an old post, but I still haven't found a way to resolve it and we're running Conf 5.5.6)

broken-insert-menu.JPG

 

 

 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 29, 2018 in New to Confluence

How to use Confluence Cloud for stakeholder management

Most of us don’t need much convincing that stakeholder management is important. It just makes sense that keeping everyone in-the-know on projects and assigning clearly defined roles is key to having ...

1,120 views 2 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you