Return-Path: Delivered-To: apmail-incubator-chemistry-commits-archive@minotaur.apache.org Received: (qmail 69640 invoked from network); 10 May 2010 09:29:55 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 10 May 2010 09:29:55 -0000 Received: (qmail 73668 invoked by uid 500); 10 May 2010 09:29:55 -0000 Delivered-To: apmail-incubator-chemistry-commits-archive@incubator.apache.org Received: (qmail 73614 invoked by uid 500); 10 May 2010 09:29:54 -0000 Mailing-List: contact chemistry-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: chemistry-dev@incubator.apache.org Delivered-To: mailing list chemistry-commits@incubator.apache.org Delivered-To: moderator for chemistry-commits@incubator.apache.org Received: (qmail 64277 invoked by uid 99); 8 May 2010 20:02:55 -0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r942455 - /incubator/chemistry/website/resources/space.js Date: Sat, 08 May 2010 20:01:58 -0000 To: chemistry-commits@incubator.apache.org From: pgoetz@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100508200158.ADAE32388900@eris.apache.org> Author: pgoetz Date: Sat May 8 20:01:58 2010 New Revision: 942455 URL: http://svn.apache.org/viewvc?rev=942455&view=rev Log: script for Google site search Added: incubator/chemistry/website/resources/space.js Added: incubator/chemistry/website/resources/space.js URL: http://svn.apache.org/viewvc/incubator/chemistry/website/resources/space.js?rev=942455&view=auto ============================================================================== --- incubator/chemistry/website/resources/space.js (added) +++ incubator/chemistry/website/resources/space.js Sat May 8 20:01:58 2010 @@ -0,0 +1,36 @@ + +var hide = null; +var show = null; +var children = null; + +function init() { + /* Search form initialization */ + var form = document.forms['search']; + if (form != null) { + form.elements['domains'].value = location.hostname; + form.elements['sitesearch'].value = location.hostname; + } + /* Children initialization */ + hide = document.getElementById('hide'); + show = document.getElementById('show'); + children = document.all != null ? + document.all['children'] : + document.getElementById('children'); + if (children != null) { + children.style.display = 'none'; + show.style.display = 'inline'; + hide.style.display = 'none'; + } +} + +function showChildren() { + children.style.display = 'block'; + show.style.display = 'none'; + hide.style.display = 'inline'; +} + +function hideChildren() { + children.style.display = 'none'; + show.style.display = 'inline'; + hide.style.display = 'none'; +}