Member
Member
kevito   2006-06-21, 04:23
#1

What does all the javascript in the Testing theme do? It's called up in the header of album.php, index.php, and image.php with ``

I'm developing a theme using this one as a base and am wondering if I can do away with the javascript.

Member
Member
DarrellD   2006-06-21, 04:28
#2

It embeds the JavaScript needed to load SAJAX which is what handles the inline-editing of the album/image descriptions. If you don't plan on using AJAX to do the inline-editing, then yes, you can get rid of it.

Member
Member
Geert   2006-06-21, 09:05
#3

Btw, is it possible to add a bit of CSS to the fields of the inline editing?
Not that important, but I like to match those fields to the other fields (like the comments) used in my theme.

Member
Member
DarrellD   2006-06-21, 14:10
#4

Yep. The list of editable objects have CSS div tags with the following ID's:
• [b]albumTitleEditable[/b]
• [b]albumDescEditable[/b]
• [b]imageDescEditable[/b]
• [b]imageTitleEditable[/b]

Member
Member
Geert   2006-06-21, 17:46
#5

That doesn't really work I think. The form is not inside the div tag.

Member
Member
DarrellD   2006-06-21, 18:36
#6

You mean the comment form?

Yeah, it's not in the div tag. Those CSS id selectors are only for editing the the album and image titles and descriptions.

You should still be able to edit those with maybe a #albumDescEditable input selector

Member
Member
Geert   2006-06-21, 23:05
#7

That is what I was trying to do.

Member
Member
Stephane   2007-04-24, 23:44
#8

I hope I'm not committing necromancy but I was wondering if it was easily possible to hide all the javascript that crowds the code into an external javascript file?

Developer
Developer
trisweb   2007-04-25, 01:09
#9

That's a good idea, but I think it's dynamic, so that may not be possible.

Please remember that the Javascript you see is only visible to logged-in admins who have the AJAX update capability, no one else gets it.

Member
Member
Stephane   2007-04-25, 03:39
#10

Aha! I wasn't aware of this and was worried about keeping my code clean.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.