Adam van den Hoven wrote:
support for external libraries
I really just want 1 tag to use for all these assets
they can be always "as link"
If you really want to be cool, "know" ahead of time all the
important libraries and their versions (kinda like how the google
Ajax Libraries API works -- http://code.google.com/apis/ajaxlibs/)
so I can do <r:javascript library="jquery" version="2.6"
minimized='true' />
But also just <r:javascript url="http://scriptsite.com/somelibrary" />
Sounds neat -- though I'm *positive* you don't want me anywhere near
any project that requires constant maintenance to keep up-to-date
with the latest libraries.
Couple of questions, though:
* If you know the url, what's the benefit of using the <r:javascript
/> tag? I mean sure, it renders the link for you but that's not
so bad to type manually.
* How would it be helpful for SnS to have it's own list of libraries
when the Google api you offered already does this?
I'm really not trying to beat the "you can already do this" drum, but
why not just type:
<script src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("prototype", "1.6");
google.load("scriptaculous", "1.8.1");
</script>
Perhaps I'm over doing it. I generally like having on way to do
things, so using <r:javascript> and <script> together violates my
sense of aesthetics.
Ah. Makes sense. Actually I lean towards John and Sean's suggestions
that tags not render markup (that way you can use them safely with
filters or in pages that aren't html). That's why my tags just render
the content by default and offer an as="url" to render that property.
Whereas the as="inline" and as="link" are viewed more as "bonus" or
"convenience" tools.
But maintaining a list of libraries is probably bad.
How about importing from remote URL so we don't have to download then
up load?
Hmm. If you already have a URL why not point your browser there and
copy the contents from your browser window (not download into a file).
Then paste the body of a new javascript in the Radiant UI?
Or do you mean SnS keeping a catalog of URLs so you wouldn't have to
know that off-hand? But that's beginning to sound like maintaining a
list again.
Or, if you want to keep your list of google.load's in their own
javascript file (named, say, "google.loads"), you could just:
<script src="http://www.google.com/jsapi"></script>
<r:javascript name="google.loads" as="inline" />
I want to make sure I'm understanding your ideas. (Thanks for the
tip on google, BTW. I've never used that and think that it'd be a
nice addition -- looks like they even minify stuff for us).
I tend to toss ideas out to see what's good or not. This was probably not.
No worries. I'm the same actually. Sometimes things get clearer in the
communicating.
It's challenging on my end too because I can come across as beating down
all your ideas which can be discouraging. In my book if I throw out 200
dumb ideas and come up with one really usable one, that's a win.
So keep 'em coming.
What about interacting paperclipped? Not the bucket, per se, but the
tags for sure are useful.
Big on my list. Same with Page Attachments.
-Chris
_______________________________________________
Radiant mailing list
Post: Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant