Kuali Rice Development
  1. Kuali Rice Development
  2. KULRICE-7599

Modify createLightBoxLink function to not set options['onCleanup'] = cleanupClosedLightboxForms by default

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.2.0-m3, 2.2
    • Component/s: Development
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Similar issues:
      KULRICE-7567Adding anchor option to createLightBoxLink()
      KULRICE-5852Modify the display of the contents of a note to preserve the whitespace by default.
      KULRICE-2123Modify widgets and/or edoclite1.js to support custom functions on buttonClick
      KULRICE-8748Set TableLayoutManager applyDefaultCellWidths to false by default
      KULRICE-5150Default control (if not set) to TextControl
      KULRICE-11689Modify label default configuration
      KULRICE-12593Set default actions for view types
      KULRICE-11780Parameter needed in AttributeReferenceDummy-activeIndicator to set default value
      KULRICE-2108Set the default value of the EDL.UseXSLTC Application Constant to false
      KULRICE-3744KimTypeServiceBase sets all Type attributes as unique by default
    • Rice Module:
      KRAD
    • Application Requirement:
      KS My Plan
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required

      Description

      When closing a light box that was created using the createLightBoxLink function on an external link, a function called cleanupClosedLightboxForms is executed on close that tries to grab a formKey value, which is not valid on an external link. JS errors are thrown as follows:

      IE9:
      Access is denied.
      https://uwksdev01.cac.washington.edu/student/krad/plugins/jquery/jquery-1.7.2.js
      5591

      Firefox:
      Permission denied to access property 'ownerDocument'
      https://uwksdev01.cac.washington.edu/student/krad/plugins/jquery/jquery-1.7.2.js
      5338

        Activity

        Hide
        Jerry Neal (Inactive) added a comment -

        Matt,

        Let's add a check in cleanupClosedLightboxForms to make sure we can get the formKey first. I believe you can do that with:

        if (jQuery('#formKey').length) {

        }

        Jerry

        Show
        Jerry Neal (Inactive) added a comment - Matt, Let's add a check in cleanupClosedLightboxForms to make sure we can get the formKey first. I believe you can do that with: if (jQuery('#formKey').length) { } Jerry
        Hide
        Jerry Neal (Inactive) added a comment -

        Hey Matt,

        I believe MyPlan needs this for m2 and Matt will be starting work on this.

        thanks,
        Jerry

        Show
        Jerry Neal (Inactive) added a comment - Hey Matt, I believe MyPlan needs this for m2 and Matt will be starting work on this. thanks, Jerry
        Hide
        Matthew Wuertz (Inactive) added a comment -

        To attempt to reproduce the issue, I created a link as follows:

        <bean id="ConfigurationTestView-ProgressiveRender-ExternalLink" parent="Uif-LinkField" p:linkText="Google" p:href="http://www.google.com" p:label="Google Link">
        <property name="onClickScript" value="createLightBoxLink();" />
        </bean>

        I set up some debugging in Firefox, and the createLightBoxLink() did not cause any issues. Is there another way that I can reproduce the issue? I suppose it is also possible that other recent coding changes fixed this issue.

        Show
        Matthew Wuertz (Inactive) added a comment - To attempt to reproduce the issue, I created a link as follows: <bean id="ConfigurationTestView-ProgressiveRender-ExternalLink" parent="Uif-LinkField" p:linkText="Google" p:href="http://www.google.com" p:label="Google Link"> <property name="onClickScript" value="createLightBoxLink();" /> </bean> I set up some debugging in Firefox, and the createLightBoxLink() did not cause any issues. Is there another way that I can reproduce the issue? I suppose it is also possible that other recent coding changes fixed this issue.
        Hide
        Garett Gowens added a comment -

        We are creating the lightbox link a little differently. Our links are coming in through a propertyEditor and executing a hidden script on the document ready which is the createLightBoxLink function. So this config would be more like what we are doing:

        <bean id="ConfigurationTestView-ProgressiveRender-ExternalLink" parent="Uif-LinkField" p:linkText="Google" p:href="http://www.google.com" p:label="Google Link">
        <property name="onDocumentReadyScript" value="createLightBoxLink('ConfigurationTestView-ProgressiveRender-ExternalLink',

        {autoScale:true,centerOnScroll:true,transitionIn:'fade',transitionOut:'fade',speedIn:200,speedOut:200,hideOnOverlayClick:true,type:'iframe',width:'90%',height:'95%'}

        );" />
        </bean>

        I tried your config and it did not load google in a lightbox, does it work for you? If it is working, is the cleanupClosedLightboxForms js function being executed when you close the lightbox with google loaded in the lightbox, because if there is no formKey input in the lightbox content, it should be throwing an exception.

        Show
        Garett Gowens added a comment - We are creating the lightbox link a little differently. Our links are coming in through a propertyEditor and executing a hidden script on the document ready which is the createLightBoxLink function. So this config would be more like what we are doing: <bean id="ConfigurationTestView-ProgressiveRender-ExternalLink" parent="Uif-LinkField" p:linkText="Google" p:href="http://www.google.com" p:label="Google Link"> <property name="onDocumentReadyScript" value="createLightBoxLink('ConfigurationTestView-ProgressiveRender-ExternalLink', {autoScale:true,centerOnScroll:true,transitionIn:'fade',transitionOut:'fade',speedIn:200,speedOut:200,hideOnOverlayClick:true,type:'iframe',width:'90%',height:'95%'} );" /> </bean> I tried your config and it did not load google in a lightbox, does it work for you? If it is working, is the cleanupClosedLightboxForms js function being executed when you close the lightbox with google loaded in the lightbox, because if there is no formKey input in the lightbox content, it should be throwing an exception.
        Hide
        Garett Gowens added a comment -

        OK, my config wont work either, the id is the div's id while it needs the link's id in the js function.

        Show
        Garett Gowens added a comment - OK, my config wont work either, the id is the div's id while it needs the link's id in the js function.
        Hide
        Matt Sargent added a comment -

        Matt,

        We need to go ahead and put in the if statement I purposed in the first comment above. Was talking with the MyPlan team and they use this method a little differently than we do in the framework which is why we can reproduce. Once we have this in they will verify the fix, so don't worry about try to reproduce.

        thanks,
        Jerry

        Show
        Matt Sargent added a comment - Matt, We need to go ahead and put in the if statement I purposed in the first comment above. Was talking with the MyPlan team and they use this method a little differently than we do in the framework which is why we can reproduce. Once we have this in they will verify the fix, so don't worry about try to reproduce. thanks, Jerry

          People

          • Assignee:
            Matthew Wuertz (Inactive)
            Reporter:
            Garett Gowens
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Structure Helper Panel