From: Jens Ø. P. <oe...@gm...> - 2012-03-21 18:07:17
|
Hi Wolfgang, Thanks for your anwers. I got into this because I often fiddle around off-line - and Tamboti had started using a CDN, so this had become impossible. I will add code to page.html in Tamboti to make it easy to switch between CDN (for serving) and local files (for developing). I will try to upgrade jquery to 1.7.1 in admin and eXide. Tamboti works with 1.7.1., so I will upload jquery-1.7.1.min.js and jquery-ui.min.js to webapp/scripts/jquery/ tomorrow. jquery 1.6.2 is referenced in apps: doc, demo, fundocs, TEIXLingual (page.html) webapp: jquery.xql, admin.xql, login.xql, eXide, urlrewrite.xml jquery 1.5 is referenced in apps: TEIXLingual (browse.xql); here it is loaded from the app and I will not change this - I think you know why! jquery 1.4.4 is referenced in webapp: repo/packages/mobile-function-doc/index.xql. I won't touch jquery-mobile stuff. jquery 1.4.2 is referenced in apps: TEIXLingual (test.html), I take it this is not a used page and I will not change this. webapp: WEB-INF/classes/META-INF/resources/scripts/(dojo/)syntaxhighlighter_3.0.83/tests/. This is read in from betterFORM. jquery 1.4.1 is mentioned (not referenced) in webapp/administration/scripts/jquery/descriptor.xml jquery 1.2.6 is mentioned in webapp/WEB-INF/classes/META-INF/resources/scripts/simile/timeline/timeline_ajax/. This is read in from betterFORM. The docs app (index.html and james-hambley-page-design-template.html) is a little strange, since it only loads jquery for IE. I guess jquery is not really needed, but will not touch. As you know, jquery-1.6.2.min.js is stored in webapp/scripts/jquery/. betterFORM reads in jquery-1.4.2.js in webapp/WEB-INF/classes/META-INF/resources/scripts/dojo/syntaxhighlighter_3.0.83/tests/js/ and in webapp/WEB-INF/classes/META-INF/resources/scripts/syntaxhighlighter_3.0.83/tests/js/ jquery-1.4.1.min.js, jquery-1.4.1.js and jquery-1.3.2.js (all three!) are stored in webapp/administration/scripts/jquery/ - and they are not referenced anywhere, as far as I can see. I have no idea what http://localhost:8080/exist/administration/index.xql is supposed to do. There are more than 3 MB worth of files in this folder and it is two years since anyone committed anything. Can't code like this - which sounds awfully important, but which isn't - be moved to the attic? Best, Jens On Mar 21, 2012, at 3:49 PM, Wolfgang Meier wrote: > Hi Jens, > >> Is there a policy about how we link to js libraries (jQuery libraries)? > > I frequently work without network connection, so I prefer to have a > local copy of libraries, though the better practice is to use a CDN. > The core jquery libraries are mirrored in webapp/scripts/jquery/ > because they are required by tools which are essential parts of eXist > (eXide, admin interface). > > Other libraries should be provided by the corresponding apps though. > >> Should they be stored locally or downloaded from a CDN (making off-line development impossible)? If a CDN is to be used, is there a preference, say, for ajax.googleapis.com? Should one link to "1.7" in order to get 1.7.2 when it comes out - or is that risky? > > Updating a javascript library is sometimes a bit tricky because the > browser may not reload all scripts at the same time, thus leading to > hickups. I would thus rather link to a specific version. > >> If they are stored locally, is the preference to store them in the app using it or in webapp? > > In the app, unless it's jquery or jquery.ui. > >> Is there a policy that only minified libraries should be stored locally? jquery-utils.js in webapp is small and it would make little difference, but should the minified version be used? > > If possible, use a minified version. > >> The libraries I wish to use are jquery-1.7.1.min.js and jquery-ui.min.js. > > Well, I think you have two options: update the jquery version in eXist > and make sure eXide, tamboti and the admin web app continue to work. > Add your own jquery-1.7.1.min.js to your application. > > Wolfgang |