Muliple Loadings of jQuery .. Corporate vs. SPEF … Order and Timing

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1867
    hzynst
    Participant

    Hello –

    I’m over my pay grade with this issue …

    I so want to / need to keep using SPEasyForms as EasyForms is the BEST tool I’ve found for SharePoint!!!!

    Some recent updates to our Corporate Master Page has created a possible order / timing / version issue between the Corporate loading and usage of jQuery 2.1.0 and SPEF jquery.bundle.min (1.11.3? bundled with Sizzle?) as I am told by the Corporate Support Team.

    I’m being told that the loading of SPEF jquery is causing an error ( .typeahead() doesn’t support property or method ) because the Corporate code is looking for jQuery 2.1.0 ??

    I remember from past discussion that SPEF utilized noconflict with jquery loading and reverts $ back to previous version of jQuery and uses it’s own spefjquery (?)

    I can see from the loading order that the Corporate .js scripts are sandwiched in between SPEF loads with the SPEF jquery.bundle.min.js loading just before Corporate code load/execute.

    ANY HELP WOULD BE GREATLY APPRECIATED !!!

    Questions …

    * Might there be a way to force SPEF to be the last to load with the Custom Action / ScriptLink?
    * If last, can there be a slight delay in loading SPEF
    * Might there be a way I can substitute jquery 2.1.0 for SPEF 1.11.3? But the Sizzle is minified bundled with jquery?

    Here is the loading order … I’ve shortened for readability and to take out company references
    —-
    …corpBranding/jquery.2.1.0.js

    …corpBranding/brandingloader.js
    …corpBranding/presavecheck.js

    ***spef/jquery.bundle.min.js …. this may be where conflict / timing beings ?
    ***spef/jquery.speasyforms.min.js

    …corpBranding/nav.css
    …corpBranding/nav.js
    …corpBranding/anylytics.js
    …corpBranding/typeahead.css
    …corpBranding/type-ahead1.xx.js
    …corpBranding/typeahead.js …. this is where .typeahead() method raises error
    …corpBranding/badgecheck.js

    ***spef/speasyforms_defaultsettings.js

    ———
    Thanx!
    hzynst

    #1868
    hzynst
    Participant

    … Couple more questions –

    ** Would it be possible to call / load SPEasyForms on demand … When entering into the NewForm / EditForm / DispForm? … I’m not sure how configuration would work … second bridge to cross…

    * Might it be possible for me to insert a check for jQuery present before loading jquery.bundle.min.js?
    —> Are there any dependencies in jquery.bundle.min.js ?

    #1883
    Joe McShea
    Keymaster

    Sorry, I dropped the ball on this, got busy and then went on vacation. jQuery, jQuery UI, and a small library called Session Storage Wrapper are all bundled in jquery.bunlde.min.js right now. So just not loading my bundle won’t work. Also, I have one script block custom action that runs on every page, to check to see if it’s a form, and that will crash if my dependencies aren’t loaded, so the on demand thing doesn’t really work either.

    It’s too error prone trying to talk you through this, I need to try and come up with a bundle that works and send it to you to try. To do that, I’ll need to load jQuery 2.X just like you have and try to come up with a bundle that will use it instead of loading my own jQuery. I’m still pretty busy, but I’ll try to find some time for this by this weekend sometime and let you know. If I can get it working, I can start thinking about how SPEasyForms can be configured to use existing dependencies instead of loading it’s own, but that will always be at your own risk because I’m never going to have the time/resources to test SPEasyForms with every version of jQuery/jQuery-UI etc.

    Joe

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Scroll to top