This discussion is archived
10 Replies Latest reply: Feb 13, 2013 12:08 PM by TexasApexDeveloper RSS

Skillbuilder Modal 2.0 Plugin Issue with Closing Modal Page

TexasApexDeveloper Guru
Currently Being Moderated
Using APEX 4.2.1, Database 10g... I am trying to use the Skillbuilder 2.0 Modal form plugin with Theme 2 of APEX.. Everything works until I try to close the modal form either by a save or Apply Changes.. The modal form clears but does NOT close..

Sample of issue is posted on Oracle's Hosted APEX site:

http://apex.oracle.com/pls/apex/f?p=4550:1:0:::::
Workspace: homeworld
Username: demo
Password: demo

Application number/name: 59156     Dan Modal Page

Very strange since I literally copied settings from a working app using a newer theme.. Maybe it is the fact that the theme I am working is is one of the older APEX themes..

Any help would be appreciated!!

Thank you,

Tony Miller
Ruckersville, VA
  • 1. Re: Skillbuilder Modal 2.0 Plugin Issue with Closing Modal Page
    Kofi Journeyer
    Currently Being Moderated
    Hmm, I do notice this in the Firebug console
    TypeError: this.data is undefined
    [Break On This Error]      
    
    .append(this.data.$modalPageCloseObject)
    I wonder if you need a DOCTYPE in your template.
    Kofi
  • 2. Re: Skillbuilder Modal 2.0 Plugin Issue with Closing Modal Page
    Tom Petrus Expert
    Currently Being Moderated
    <ol>
    <li>I set "execute on page load' for the 'execute javascript code' true actions on the modal page manual and auto close to 'No'. These were the cause of the javascript errors when the page loaded.
    <li>The modal page did not auto-close. The auto-close selector was wrong ("div#success-message") and i changed it to "div.t2success" to match with the theme's popup page template on both the create and edit dynamic actions.
    <li>I changed the After Processing branch on the popup page to redirect to page 3 instead of 102. Page 102 has a custom template which does not include a success message template and thus does not work for the auto-close selector.
    <li>Success messages from closed modal pages did not show up on the parent page because the selector used for the "messages region" did not match the theme's page template for page 2 (two level tabs). I changed the Auto Close dynamic action's javascript code to target "div.t2messages" instead of "#messages".
    <li>The demo report region did not refresh because the region's template was set to "No Template". Since that prevents refresh from working, i changed the template to "Borderless Region".
  • 3. Re: Skillbuilder Modal 2.0 Plugin Issue with Closing Modal Page
    TexasApexDeveloper Guru
    Currently Being Moderated
    Tom,
    Thank you for your help.. However, are you sure we are talking the same app? I just tested it and am seeing the same issues as before.. When clicking to edit a item and clicking save changes, the modal form is STILL not closing and returning to the calling form...

    Can I confirm that it works for you?

    Thank you,

    Tony Miller
    Ruckersville, VA
  • 4. Re: Skillbuilder Modal 2.0 Plugin Issue with Closing Modal Page
    Tom Petrus Expert
    Currently Being Moderated
    Hi Tony,

    Yes, it does work for me. I changed application 59156, pages 2 and 3. I just tried again in firefox and it works as i'd expect, and even though the popup looks horrible in IE8, everything still works.
    I'm editing Eugene, changing his name to Eugene1, hit Apply Changes. The modal closes, the message appears up top and the region refreshes.
    Is there an action in peculiar that I'm perhaps not doing? Are you getting javascript errors (that'd be odd but you never know)?
  • 5. Re: Skillbuilder Modal 2.0 Plugin Issue with Closing Modal Page
    TexasApexDeveloper Guru
    Currently Being Moderated
    I just tried editing eugene with the latest version of Firefox and the same issue that I have documented is occurring.. Very strange that it works for you.. Under IE 8, that is a VERY scary situation.. I will try logging in using IE 9 and see if that does anything..


    Edited: Just tried it under Chrome and the Modal Page still does not close when clicking the Save Changes Button..
    Under IE 9.. Lets just say it does not display the closing X in lower right corner and let it go there..

    Can you explain the process YOU are running when editing a record? DO you see the modal window closing when you click the save changes button?

    Thank you,

    Tony Miller
    Ruckersville, VA
  • 6. Re: Skillbuilder Modal 2.0 Plugin Issue with Closing Modal Page
    Tom Petrus Expert
    Currently Being Moderated
    I do! :o My firefox version (here at the company, so don't shoot me for that nor for IE8 ;-)) here is 6.0.1.
    Strange it will not work at your side. The issues i fixed and stated above were some common ones i encounter when folks implement the modal popup, but i can't spot any other weird things.
    So the application url i'm doing this at is obviously http://apex.oracle.com/pls/apex/f?p=59156:2

    <ol>
    <li>I click the edit icon on Eugene's row
    <li>The modal opens
    <li>I make some trivial change to the first or last name
    <li>I hit Apply Changes
    <li>The page in the modal shows a loading icon for just a short flash
    <li>The modal closes
    <li>"Action Processed" is added to the messages on the top of the page
    <li>The report is refreshed and i see my changes
    </ol>
    The modal does not close when no changes are made however. Just hitting Apply Changes without making any changes will submit the page but generates no success message, and thus the auto-close can not work.
  • 7. Re: Skillbuilder Modal 2.0 Plugin Issue with Closing Modal Page
    TexasApexDeveloper Guru
    Currently Being Moderated
    Okay, My mistake.. However, when I try to mimic this in-house I am getting no refresh of the report page... Will look further, but I am REALLY not happy with this theme being used...
  • 8. Re: Skillbuilder Modal 2.0 Plugin Issue with Closing Modal Page
    TexasApexDeveloper Guru
    Currently Being Moderated
    Tom,
    Did you dig through with Firebug to find the messages region in the form page or how exactly did you find that, if I may ask.? I am looking at an updated theme to try the plugin with and it is more jquery UI themed than the older APEX them from this question..

    Thank you,

    Tony Miller
    Ruckersville, VA
  • 9. Re: Skillbuilder Modal 2.0 Plugin Issue with Closing Modal Page
    Tom Petrus Expert
    Currently Being Moderated
    Tony
    Actually, you only need to look at the template of the page(s) use. In the Body region you need to look for the #SUCCESS_MESSAGE# substitution string and what container this is used in, so that you can append to this container correctly. For the success message identifier you have to look at the Subtemplate > Success Message region, and see how it is constructed. You can then easily determine what selector you need!
  • 10. Re: Skillbuilder Modal 2.0 Plugin Issue with Closing Modal Page
    TexasApexDeveloper Guru
    Currently Being Moderated
    Very helpful.. Just developing brain-farts looking between the two themes.. The old them is so frail looking, compared to the echo theme I am looking at from apexthemes.com..

    Thank you,

    Tony Miller
    Ruckersville, VA

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points