/*************************
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/de/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 += '
\n';
doc_toc += 'Bewege Deine Maus über dieses Feld\n';
doc_toc += '
\n';
doc_toc += '
\n';
doc_toc += '\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: Dokumentation und Handbuch');
$('#docheader').after('
\n');
$('#docheader').before(' \n');
$('#docheader').before('
\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';
doc_search += ' \n';
doc_search += ' \n';
doc_search += '
\n';
$('#toc').append(doc_search);
}
function cpgDocFooter() {
var overall_doc_footer = '';
overall_doc_footer += '';
overall_doc_footer += '';
overall_doc_footer += '
Seitenanfang';
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('Über dieses Dokument: ' + 'zuletzt geändert am ' + 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() {
if (getUrlParameters('hide_nav') == 1) {
return;
}
$('#doc_en_only').replaceWith('Noch nicht übersetzt
Diese Seite wurde noch nicht übersetzt und erscheint daher nur auf Englisch.
Übersetzer gesucht: schau Dir die Seite in Ruhe an - so kompliziert ist sie doch nicht, oder? Wenn Du Dir zutraust, diese Seite auf Deutsch zu übersetzen, dann schau doch mal auf der offiziellen Coppermine-Seite vorbei. Wir freuen uns auf Deinen Beitrag.
');
$('#doc_en_partial').replaceWith('Teilweise Übersetzung
Diese Seite wurde noch nicht vollständig übersetzt und erscheint daher nur zum Teil auf Deutsch. Teile der Seite erscheinen auf Englisch.
Übersetzer gesucht: schau Dir die Seite in Ruhe an - so kompliziert ist sie doch nicht, oder? Wenn Du Dir zutraust, diese Seite vollständig auf Deutsch zu übersetzen, dann schau doch mal auf der offiziellen Coppermine-Seite vorbei. Wir freuen uns auf Deinen Beitrag.
');
}
$(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();
});
});