Jump to:

4970 Posts in 13728 Topics by 1491 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » What are the Essential JavaScript files?

Getting SilverStripe up and running on your computer and on your web server.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1397 Views
  • denbear
    Avatar
    Community Member
    7 Posts

    What are the Essential JavaScript files? Link to this post

    I'm in the process of building my third website with SilverStripe. Love the product, but I'm wondering how I can reduce the total number of files from the whole package. The JSParty directory contains over 1800 files. I can see that I could go into jsparty/tiny_mce2/langs and remove 50 of the language files. I need only English. There's lots of other files, but there's no way I'm aware of to determine what is and what is not essential to the operation of the CMS. Which JavaScript files does the CMS require?

    Hmm...think that Firebug might be helpful in answering this question.

    I'm using JQuery, but I'm using the latest version that's stored on Google's CDN -- http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js. If other libraries like Prototype are essential, where would I find references to the library in the CMS code, so I could point to the CDN?

    Hmm...more thoughts about Firebug and an HTTP analyzer.

    But, before I dig into Firebug and HTTPFox and start tracing and noting JavaScript calls or selectively removing files and seeing if something breaks, maybe there's some documentation or a previous forum post I could use as a starting point? I did do some searching on the forum, but I did not find any helpful results from my keyword searches. "Essential files, Minimal Install, JSParty file reduction"

  • Willr
    Avatar
    Forum Moderator
    5482 Posts

    Re: What are the Essential JavaScript files? Link to this post

    Well JS in SilverStripe is broken down into 2 parts. On the front end side prototype / behavior are both required by default for form validation. You can disable automatic JS validation and opt for your own solution (as like userforms which uses the jquery validate plugin) so then there is nothing loading from jsparty/

    In the CMS it gets a bit tricky as it is in the process of being rewritten it uses various things from various libraries. Lots of the jquery plugins in jsparty/ are actually currently not used.

    All the lang js files are there for translation purposes you could remove this if you wish, but it would be at your own risk.

    where would I find references to the library in the CMS code,

    Do a search for Requirements::javascript( or <% require javascript( as these are the 2 calls which will likely see files being included

    1397 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.