/************************* Coppermine Photo Gallery ************************ Copyright (c) 2003-2012 Coppermine Dev Team v1.0 originally written by Gregory Demar This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation. ******************************************** Coppermine version: 1.5.18 $HeadURL: https://coppermine.svn.sourceforge.net/svnroot/coppermine/tags/cpg1.5.18/docs/en/script.js $ $Revision: 8304 $ **********************************************/ var linebreak = '\n'; $(function() { $("#toc_overall").treeview({ collapsed: true, animated: "medium", control:"#sidetreecontrol" }); $(".cpg_zebra tr:even").addClass("tableb"); $(".cpg_zebra tr:odd").addClass("tableb_alternate"); }); function cpgDocToc() { if (getUrlParameters('hide_nav') == 1) { $('#toc').replaceWith(''); return; } var doc_toc = ''; doc_toc += '
\n'; doc_toc += '
Table of contents
\n'; doc_toc += 'Move your mouse here to expand\n'; doc_toc += '
\n'; doc_toc += '
\n'; doc_toc += '\n'; $('#toc').replaceWith('
' + doc_toc + '
'); } function cpgDocHeader() { // Only display the header if the docs are not included if (getUrlParameters('hide_nav') == 1) { return; } $('#docheader').text('Coppermine Photo Gallery v1.5.18: Documentation and Manual'); $('#docheader').after('
\n'); $('#docheader').before('
\n'); $('#docheader').before('Coppermine Photo Gallery - Your Online Photo Gallery\n'); } function cpgDocSearch() { // Only display the header if the docs are not included if (getUrlParameters('hide_nav') == 1) { return; } var doc_search = ''; doc_search += ' \n'; $('#toc').append(doc_search); } function cpgDocFooter() { var overall_doc_footer = ''; overall_doc_footer += ''; overall_doc_footer += '
'; overall_doc_footer += 'Back to Top'; overall_doc_footer += '
'; $('#doc_footer').append(overall_doc_footer); } function dateRevision() { // strip the unneeded data from last_changed and revision fields var lastChangeDate = $('#doc_last_changed').text(); var lastChangeDate = lastChangeDate.replace('$', ''); var lastChangeDate = lastChangeDate.replace('$', ''); var lastChangeDate = lastChangeDate.replace('LastChangedDate: ', ''); var lastChangeDate = lastChangeDate.replace(/Date: /g, ''); $('#doc_last_changed').text('About this document: ' + 'last changed on ' + lastChangeDate); var revisionNumber = $('#doc_revision').text(); var revisionNumber = revisionNumber.replace('$', ''); var revisionNumber = revisionNumber.replace('$', ''); var revisionNumber = revisionNumber.replace(/Revision: /g, ''); $('#doc_revision').text(', SVN revision ' + revisionNumber); } function getUrlParameters(name) { // Taken from http://www.netlobo.com/url_query_string_javascript.html name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); var regexS = "[\\?&]"+name+"=([^&#]*)"; var regex = new RegExp(regexS); var results = regex.exec(window.location.href); if(results == null) { return ''; } else { return results[1]; } } function cpgDocTranslationWarning() { $('#doc_en_only').replaceWith('

Not translated yet

This page has not been translated yet and therefore appears in English.

Translators wanted: take a look at this page - doesn\'t look too complicated, does it? If you\'re convinced that you could translate this page, please check the official Coppermine site; we\'re looking forward to your contribution.

'); $('#doc_en_partial').replaceWith('

Partial translation

This page hasn\'t been fully translated so far and therefore partially shows in your language and partially in English.

Translators wanted: take a look at this page - doesn\'t look too complicated, does it? If you\'re convinced that you could translate this page, please check the official Coppermine site; we\'re looking forward to your contribution.

'); } $(document).ready(function() { var $_GET = {}; document.location.search.replace(/\??(?:([^=]+)=([^&]*)&?)/g, function () { function decode(s) { return decodeURIComponent(s).replace(/\+/g, " "); } $_GET[decode(arguments[1])] = decode(arguments[2]); }); //hide all elements with class detail_body $(".detail_body").hide(); if ($_GET["expand_all"] == 1) { // Show all details and get rid of the details toggle if the GET parameter expand_all is set $('.detail_body').show(); //$('.detail_head_collapsed').replaceWith(''); } //toggle the component with class detail_body $(".detail_head_collapsed").click(function() { $(this).toggleClass("detail_head_expanded").next(".detail_body").slideToggle(600); }); $(".detail_expand_all").click(function() { $(".detail_body").slideDown(1200); $(".detail_head_collapsed").toggleClass("detail_head_expanded"); $(".detail_expand_all").hide(); $(".detail_collapse_all").show(); }); $(".detail_collapse_all").click(function() { $(".detail_body").slideUp(1200); $(".detail_head_collapsed").toggleClass("detail_head_expanded"); $(".detail_expand_all").show(); $(".detail_collapse_all").hide(); }); $(".detail_toggle_all").click(function() { $(".detail_body").slideToggle(600); $(".detail_head_collapsed").toggleClass("detail_head_expanded"); }); cpgDocHeader(); cpgDocTranslationWarning(); cpgDocToc(); $("#tree").treeview({ collapsed: true, unique: true, animated: "slow", persist: "location" }); cpgDocSearch(); cpgDocFooter(); dateRevision(); $("a.nolink").click(function(){ return false; }); // Fade the toc in if it is needed $("#toc").bind("mouseenter",function(){ $("#toc_collapsed").hide(); $("#toc_expanded").fadeIn('slow'); $("#doc_search").show(); }); // Fade the toc out if it isn't used $("#toc").bind("mouseleave",function(){ $("#toc_expanded").fadeOut('slow'); $("#toc_collapsed").show(); $("#doc_search").hide(); }); });