zenJavascript in Testing theme needed?

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 `<?php zenJavascript(); ?>`

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

Comments

  • 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.
  • Geert Member
    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.
  • Yep. The list of editable objects have CSS div tags with the following ID's:
    • albumTitleEditable
    • albumDescEditable
    • imageDescEditable
    • imageTitleEditable
  • Geert Member
    That doesn't really work I think. The form is not inside the div tag.
  • 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
  • Geert Member
    That is what I was trying to do.
  • 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?
  • trisweb Administrator
    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.
  • Aha! I wasn't aware of this and was worried about keeping my code clean.
Sign In or Register to comment.