Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

How to add/replace default Jquery-UI file of vanilla?

Hello Forum,
I need resizable() feature of jquery-UI. There is a file jquery-ui.js in js\library\jquery-ui.js. I want to replace with new ui file (or if possible add resizable() features to it but dont think this is possible).
Where do I overwrite this file? As far as I know I cannot have two jquery-UI file both having same functions right?.
I also read in forum that we also can do this way:
$Sender->AddJsFile($this->GetResource('js/jquery-ui-1.12.0.custom.min.js', FALSE, FALSE));
But dont know where and how.
Can anyone suggest me .
Thank you in advance.

Comments

  • I would suggest you upgrade to vanilla 2.2.1

    why doesn't the resizable feature with the jquery that comes with vanilla 2.2.1

    Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.

  • edited September 2016

    @River said:
    I would suggest you upgrade to vanilla 2.2.1

    why doesn't the resizable feature with the jquery that comes with vanilla 2.2.1

    matter of fact, I have vanilla 2.2.1 and unfortunately resizable _features doesnt come with this version :(
    P.S. Sorry that I post this question on _Vanilla 2.1 & Earlier Help
    category.

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP

    Moved to correct category.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    @vanillawhisky
    If you want to add a jquery ui , look at my plugin called CustomTooltip, where I use the jquery ui for tooltip.

  • R_JR_J Ex-Fanboy Munich Admin

    @vanillawhisky said:
    I also read in forum that we also can do this way:
    $Sender->AddJsFile($this->GetResource('js/jquery-ui-1.12.0.custom.min.js', FALSE, FALSE));
    But dont know where and how.
    Can anyone suggest me .
    Thank you in advance.

    I don't know about "resizable", but here is the answer to your question: you need to do two things
    a) remove the already linked jquery-ui
    b) add your version

    Do you have a custom theme? If yes, put that in the themehook file to remove the old jquery-ui

        public function base_render_before($sender, $args) {
            $sender->removeJsFile('jquery-ui.js');
            $sender->addJsFile($this->getResource('js/jquery-ui-1.12.0.custom.min.js', false, false));
        }
    

    I simply added the line concerning the new jquery version and I do not know if that would work on the first try, but it is a very good start.
    You would have to have the correct file in a subfolder of your theme which is called js, but I guess that is obvious.

    You could also use a small plugin which consist of the plugin info, the class and the code above as its only method.

  •     public function base_render_before($sender) {
            $sender->removeJsFile('jquery-ui.js');
            $sender->AddJsFile('jquery-ui-1.12.0.custom.js', 'themes/themename/js');
        }
    

    This Worked.
    Thank you guys!!
    Cheers

Sign In or Register to comment.