incubator-heraldry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From quellho...@apache.org
Subject svn commit: r449142 [15/31] - in /incubator/heraldry: idp/ idp/pip/ idp/pip/branches/ idp/pip/tags/ idp/pip/trunk/ idp/pip/trunk/app/ idp/pip/trunk/app/controllers/ idp/pip/trunk/app/helpers/ idp/pip/trunk/app/models/ idp/pip/trunk/app/views/ idp/pip/t...
Date Sat, 23 Sep 2006 01:37:43 GMT
Added: incubator/heraldry/idp/pip/trunk/public/500.html
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/500.html?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/public/500.html (added)
+++ incubator/heraldry/idp/pip/trunk/public/500.html Fri Sep 22 18:37:26 2006
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+  <head>
+    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+    <title>Identity Provider</title>
+    <script src="/javascripts/prototype.js" type="text/javascript"></script>
+    <script src="/javascripts/effects.js" type="text/javascript"></script>
+    <script src="/javascripts/dragdrop.js" type="text/javascript"></script>
+    <script src="/javascripts/controls.js" type="text/javascript"></script>
+    <script src="/javascripts/help_popup.js" type="text/javascript"></script>
+    <script src="/javascripts/debug.js" type="text/javascript"></script>
+    <script src="/javascripts/application.js" type="text/javascript"></script>
+    
+    <link href="/stylesheets/application.css" media="screen" rel="Stylesheet" type="text/css" />
+
+  </head>
+  <body>
+    <div id="tophdr"></div>
+    <div id="left">
+      <div id="hdr">
+        <div id="header-loginlock">&nbsp;</div>
+        <div id="header-logo"><a href="/"><img alt="Personal Identity Provider" height="93" src="/images/pip_logo_beta.gif" width="201" /></a></div>
+        <div id="header-company">
+          <a href="http://www.yourcompany.com" target="_blank"><img alt="OPEN_SOURCE: Your company" height="38" src="/images/company_logo.gif?1154067499" width="88" /></a>
+        </div>
+        
+      <div id="main" style="min-height:250px;">
+        <h1>Application Error</h1>
+        <p>Sorry, it appears that you have found a bug. Our developers have been notified and are at work to correct the situation.</p>
+      </div>
+    </div>    
+  </body>
+</html>
\ No newline at end of file

Added: incubator/heraldry/idp/pip/trunk/public/dispatch.cgi
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/dispatch.cgi?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/public/dispatch.cgi (added)
+++ incubator/heraldry/idp/pip/trunk/public/dispatch.cgi Fri Sep 22 18:37:26 2006
@@ -0,0 +1,10 @@
+#!/usr/local/bin/ruby
+
+require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)
+
+# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like:
+# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired
+require "dispatcher"
+
+ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun)
+Dispatcher.dispatch
\ No newline at end of file

Propchange: incubator/heraldry/idp/pip/trunk/public/dispatch.cgi
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/heraldry/idp/pip/trunk/public/dispatch.fcgi
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/dispatch.fcgi?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/public/dispatch.fcgi (added)
+++ incubator/heraldry/idp/pip/trunk/public/dispatch.fcgi Fri Sep 22 18:37:26 2006
@@ -0,0 +1,24 @@
+#!/usr/local/bin/ruby
+#
+# You may specify the path to the FastCGI crash log (a log of unhandled
+# exceptions which forced the FastCGI instance to exit, great for debugging)
+# and the number of requests to process before running garbage collection.
+#
+# By default, the FastCGI crash log is RAILS_ROOT/log/fastcgi.crash.log
+# and the GC period is nil (turned off).  A reasonable number of requests
+# could range from 10-100 depending on the memory footprint of your app.
+#
+# Example:
+#   # Default log path, normal GC behavior.
+#   RailsFCGIHandler.process!
+#
+#   # Default log path, 50 requests between GC.
+#   RailsFCGIHandler.process! nil, 50
+#
+#   # Custom log path, normal GC behavior.
+#   RailsFCGIHandler.process! '/var/log/myapp_fcgi_crash.log'
+#
+require File.dirname(__FILE__) + "/../config/environment"
+require 'fcgi_handler'
+
+RailsFCGIHandler.process!

Propchange: incubator/heraldry/idp/pip/trunk/public/dispatch.fcgi
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/heraldry/idp/pip/trunk/public/dispatch.rb
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/dispatch.rb?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/public/dispatch.rb (added)
+++ incubator/heraldry/idp/pip/trunk/public/dispatch.rb Fri Sep 22 18:37:26 2006
@@ -0,0 +1,10 @@
+#!/usr/local/bin/ruby
+
+require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)
+
+# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like:
+# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired
+require "dispatcher"
+
+ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun)
+Dispatcher.dispatch
\ No newline at end of file

Propchange: incubator/heraldry/idp/pip/trunk/public/dispatch.rb
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/heraldry/idp/pip/trunk/public/favicon.ico
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/favicon.ico?view=auto&rev=449142
==============================================================================
    (empty)

Added: incubator/heraldry/idp/pip/trunk/public/images/background.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/background.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/background.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/buttons/add_category.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/buttons/add_category.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/buttons/add_category.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/buttons/add_new_field.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/buttons/add_new_field.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/buttons/add_new_field.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/buttons/add_subcategory.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/buttons/add_subcategory.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/buttons/add_subcategory.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/buttons/allow.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/buttons/allow.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/buttons/allow.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/buttons/cancel_changes.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/buttons/cancel_changes.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/buttons/cancel_changes.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/buttons/collapse_sm.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/buttons/collapse_sm.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/buttons/collapse_sm.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/buttons/contract_off.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/buttons/contract_off.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/buttons/contract_off.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/buttons/create_account.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/buttons/create_account.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/buttons/create_account.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/buttons/create_new.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/buttons/create_new.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/buttons/create_new.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/buttons/deny.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/buttons/deny.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/buttons/deny.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/buttons/edit_icon.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/buttons/edit_icon.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/buttons/edit_icon.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/buttons/expand_off.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/buttons/expand_off.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/buttons/expand_off.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/buttons/get_image.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/buttons/get_image.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/buttons/get_image.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/buttons/login.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/buttons/login.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/buttons/login.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/buttons/resend_account_info.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/buttons/resend_account_info.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/buttons/resend_account_info.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/buttons/save_changes.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/buttons/save_changes.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/buttons/save_changes.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/company_logo.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/company_logo.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/company_logo.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/create_button.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/create_button.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/create_button.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/gradient_arch.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/gradient_arch.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/gradient_arch.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/id_image.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/id_image.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/id_image.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/login.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/login.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/login.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/loginbox/botleft.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/loginbox/botleft.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/loginbox/botleft.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/loginbox/botright.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/loginbox/botright.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/loginbox/botright.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/loginbox/submit_background.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/loginbox/submit_background.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/loginbox/submit_background.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/loginbox/x.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/loginbox/x.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/loginbox/x.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/logo.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/logo.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/logo.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/logout.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/logout.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/logout.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/navigation/account.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/navigation/account.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/navigation/account.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/navigation/activity.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/navigation/activity.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/navigation/activity.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/navigation/profile.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/navigation/profile.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/navigation/profile.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/navigation/trust.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/navigation/trust.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/navigation/trust.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/navigation/trusted.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/navigation/trusted.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/navigation/trusted.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/rails.png
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/rails.png?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/rails.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/tooltip/background.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/tooltip/background.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/tooltip/background.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/tooltip/bl.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/tooltip/bl.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/tooltip/bl.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/tooltip/br.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/tooltip/br.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/tooltip/br.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/tooltip/tl.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/tooltip/tl.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/tooltip/tl.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/tooltip/tr.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/tooltip/tr.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/tooltip/tr.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/images/unchecked.gif
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/images/unchecked.gif?view=auto&rev=449142
==============================================================================
Binary file - no diff available.

Propchange: incubator/heraldry/idp/pip/trunk/public/images/unchecked.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/heraldry/idp/pip/trunk/public/javascripts/application.js
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/javascripts/application.js?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/public/javascripts/application.js (added)
+++ incubator/heraldry/idp/pip/trunk/public/javascripts/application.js Fri Sep 22 18:37:26 2006
@@ -0,0 +1,327 @@
+/* Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+ 
+     http://www.apache.org/licenses/LICENSE-2.0
+ 
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License. */
+
+HelpPopup.Login = Class.create()
+HelpPopup.Login.prototype = Object.extend(Object.extend({}, HelpPopup.Base.prototype), {
+  createTooltip: function(help) {
+    help.innerHTML = "  <div id=\"login-title\">login</div>\n" +
+      "  <div id=\"login-close\"><a href=\"#\" onclick=\"toggleLoginForm(this); return false;\"><img src=\"/images/loginbox/x.gif\" alt=\"close\" width=\"18\" height=\"18\" /></a></div>\n" +
+      "  <div id=\"login-form\">\n" +
+      "    <form id=\"hovering-login\" method=\"post\" action=\"" + 
+      $('protocol').innerHTML + "://" + $('domain').innerHTML + "/account/login\">\n" +
+      "      <input type=\"hidden\" name=\"session_id_validation\" value=\"" + $('session-id-validation').innerHTML + "\" />\n" +
+      "      <label for=\"login_username\">User ID</label>\n" +
+      "      <input type=\"text\" id=\"login_username\" name=\"login\" value=\"\" class=\"input\" /><br />\n" +
+
+      "      <label for=\"login_password\">Password</label>\n" +
+      "      <input type=\"password\" id=\"login_password\" name=\"password\" value=\"\" class=\"input\" /><br />\n" +
+
+      "      <input type=\"image\" class=\"submit\" value=\"Login\" src=\"/images/buttons/login.gif\" alt=\"Login\" />\n" +
+      "    </form>\n" +
+      "  </div>\n" +
+      "  <a href=\"/account/forgot_password\" id=\"login-forgot\">Forgot your password? &gt;&gt;</a>\n" +
+      "  <div id=\"login-roundbottomleft\"><img src=\"/images/loginbox/botleft.gif\" width=\"22\" height=\"19\" alt=\"\" /></div>\n" +
+      "  <div id=\"login-roundbottomright\"><img src=\"/images/loginbox/botright.gif\" width=\"22\" height=\"19\" alt=\"\" /></div>\n";
+  },
+
+  initialize: function(anchor, help, options) {
+    this.anchor  = anchor
+    this.help    = help
+    this.options = Object.extend(Object.extend({}, this.defaultOptions), options);
+    ['offset', 'topOffset', 'leftOffset'].each(function(p) { this.options[p] = parseInt(this.options[p]); }.bind(this));
+    if(!$(this.help)) {
+      var help = $('header-loginlock');
+      this.createTooltip(help)
+      this.setHelpHandlers(help)
+    }
+    this.toggle();
+  },
+
+  setPosition: function(help) {
+    help.style.top     = '0px'; //=(offsets[1] + this.dimensions.top  + this.options.topOffset)  + 'px';
+    help.style.left    = '550px';//(offsets[0] + this.dimensions.left + this.options.leftOffset) + 'px';
+    help.style.zIndex  = '25';
+  }
+})
+
+HelpPopup.Tooltip = Class.create()
+HelpPopup.Tooltip.prototype = Object.extend(Object.extend({}, HelpPopup.Base.prototype), {
+  defaultOptions: Object.extend(Object.extend({}, HelpPopup.Base.prototype.defaultOptions), {
+    url:          '#',
+    more:         'more...'
+  }),
+  
+  createTooltip: function(help) {
+    help.innerHTML = "" +
+    "<div class=\"rbroundbox\">\n" +
+    "  <div class=\"rbtop\"><div></div></div>\n" +
+    "  <div class=\"rbcontent\">\n" +
+    this.options.text + "\n" +
+    "  </div>\n" +
+    "  <div class=\"rbbot\"><div></div></div>\n" +
+    "</div>\n";
+  }
+})
+
+HelpPopup.Tooltip.all = {};
+HelpPopup.Tooltip.show = function(anchor) {
+  if(!HelpPopup.Tooltip.all['rbox-' + anchor.id]) {
+    title = anchor.title;
+    anchor.title = '';
+    HelpPopup.Tooltip.all['rbox-' + anchor.id] = new HelpPopup.Tooltip(anchor, 'rbox-' + anchor.id, {position: 'bottom', topOffset: '10px;', text: title, duration: 0 });
+  } else {
+    HelpPopup.Tooltip.all['rbox-' + anchor.id].show();
+  }
+};
+
+HelpPopup.Tooltip.add = function(anchor) {
+  if(!HelpPopup.Tooltip.all['rbox-' + anchor.id]) {
+    title = anchor.title;
+    anchor.title = '';
+    HelpPopup.Tooltip.all['rbox-' + anchor.id] = new HelpPopup.Tooltip(anchor, 'rbox-' + anchor.id, {position: 'bottom', topOffset: '10px;', text: title, duration: 0 });
+  } else {
+    HelpPopup.Tooltip.all['rbox-' + anchor.id].show();
+  }
+  
+};
+
+HelpPopup.Tooltip.hide = function(anchor) {
+  HelpPopup.Tooltip.all['rbox-' + anchor.id].hide();
+};
+
+HelpPopup.Tooltip.init = function() {
+  document.getElementsByClassName('tooltip').each(function(tooltip) {
+    tooltip.onmouseover = function() {
+      HelpPopup.Tooltip.show(tooltip);
+      return false;
+    };
+    
+    tooltip.onmouseout = function() {
+      HelpPopup.Tooltip.hide(tooltip);
+      return false;
+    };
+  });
+};
+
+var toggleTooltip = HelpPopup.Tooltip.toggle;
+
+function toggleLoginForm(anchor) {
+  new HelpPopup.Login(anchor, 'login', {});
+}
+
+var CategoryForm = {
+  options: { duration: 0.6, activeClass: 'profile-enabled', inactiveClass: 'profile-disabled' },
+
+  set_ids: function(id) {
+    this.id = id;
+    this.category_id = 'category_content_' + id;
+    this.toggle_id = 'toggle_' + id;
+  },
+  
+  check_states: function() {
+    this.expanded =  Element.Methods.visible(this.category_id);
+    this.active =    $(this.category_id).hasClassName(this.options.activeClass);
+  },
+  
+  expand: function() {
+    $(this.category_id).visualEffect('blind_down', this.options);
+    $(this.toggle_id).src = '/images/buttons/contract_off.gif';
+  },
+  
+  collapse: function() {
+    $(this.category_id).visualEffect('blind_up', this.options);
+    $(this.toggle_id).src = '/images/buttons/expand_off.gif';
+  },
+  
+  update: function(id) {
+    this.set_ids(id);
+    this.check_states();
+    
+    this.deactivate(this.id);
+    $(this.category_id).visualEffect('highlight', { duration: 0.4, queue: 'front' });
+  },
+  
+  deactivate: function(id) {
+    this.set_ids(id);
+    this.check_states();
+
+    Element.childrenWithClassName(this.category_id,'edit-element').each(function(tr) {
+      $(tr).visualEffect('fade');      
+    });
+
+    $('edit_icon_'+this.id).visualEffect('fade');
+
+    if($('category_title_'+this.id)) {
+      $('category_title_'+this.id).removeClassName(this.options.activeClass);
+      $('delete_icon_'+this.id).visualEffect('fade');
+    }
+    $('category_save_'+this.id).hide();
+    $(this.category_id).removeClassName(this.options.activeClass);
+  },
+  
+  activate: function(id) {
+    this.set_ids(id);
+    this.check_states();
+    //alert('activate: '+ this.id);
+    Element.childrenWithClassName(this.category_id,'edit-element').each(function(tr) {
+      $(tr).visualEffect('appear');
+    });
+    $('edit_icon_'+this.id).visualEffect('appear');
+    // if the category is editable
+    if($('category_title_'+this.id)) {
+      $('category_title_'+this.id).addClassName(this.options.activeClass);
+      $('delete_icon_'+this.id).visualEffect('appear');
+    }
+    $('category_save_'+this.id).show();
+    $(this.category_id).removeClassName(this.options.inactiveClass);
+    $(this.category_id).addClassName(this.options.activeClass);
+  },
+  
+  toggle_collapse: function(id) {
+    this.set_ids(id);
+    this.check_states();
+    
+    if(this.expanded) {
+      this.collapse();
+    } else {
+      this.expand();
+      $(this.category_id).removeClassName('killjoy');
+    }
+  },
+  
+  toggle_collapse_and_activation: function(id) {
+    this.set_ids(id);
+    this.check_states();
+    
+    // collapsed or expanded?
+    if(this.expanded) {
+      if(this.active) {
+        // if(expanded and active), collapse and deactivate
+        this.deactivate(this.id);
+      }
+      this.collapse();
+      $(this.category_id).addClassName('killjoy');
+    } else {
+      if(!this.active) {
+        // if(collapsed and active), expand and activate
+        this.activate(this.id);
+      }
+      this.expand();
+    }
+  },
+  
+  toggle_activation: function(id) {
+    this.set_ids(id);
+    this.check_states();
+
+    if(!this.expanded) {
+      this.expand();
+    }
+
+    if(this.active) {
+      this.deactivate(this.id);
+    } else {
+      this.activate(this.id);
+    }
+  },
+  
+  activate_section: function(id) {
+    this.set_ids(id);
+    this.check_states();
+
+    if(this.expanded && !this.active && !$(this.category_id).hasClassName('killjoy')) {
+      this.activate(this.id);
+    }
+
+  },
+  
+  observe_fields: function(id) {
+    this.set_ids(id);
+    this.check_states();
+    var i = 0;
+    Element.childrenWithClassName(this.category_id,'profile-field').each(function(el) {
+      Event.observe(el, 'click', function(event) { CategoryForm.toggle_activation(id); } );
+    });
+  }
+};
+
+var TrustProfileForm = {
+  highlight_profile: function() {
+    var element = $('trust_profile');
+    var selected_profile = element.options[element.selectedIndex].value;
+    
+    // remove class names
+    $$('#requested_properties tr input').each(function(tr) {
+      if(selected_profile == '-1') {
+        $(tr).disabled = false;
+      } else {
+        $(tr).disabled = true;
+      }
+      $(tr).checked = false;
+    });
+    
+    if(selected_profile == '-1') {
+      $('trust-profile-name').disabled = false;
+    } else {
+      $('trust-profile-name').disabled = true;
+    }
+    
+    if($('profile_'+ selected_profile + '_properties')) {
+      var profile_properties = $('profile_'+ selected_profile + '_properties').value.split(',');
+
+      profile_properties.each(function(property) {
+        if($('property-'+ property)) {
+          $('property-'+ property).checked = true;
+        }
+      });
+    }
+  }
+};
+
+var DataTable = {
+  colorizeRow: function(id) {
+    var profile  = $(id);
+    var previous = profile.getPreviousSibling('tr');
+    if((previous) && (previous.className == 'even')) {
+      profile.removeClassName('even');
+      profile.addClassName('odd');
+    }
+  },
+
+  colorizeRows: function(table_id) {
+    var i = 0;
+    $$('#' + table_id + ' tbody tr').each(function(tr) {
+      if(Element.Methods.visible(tr)) {
+        tr.className = (i % 2 == 0) ? 'even' : 'odd';
+        i++;
+      }
+    });
+  }
+};
+
+Element.Methods.getPreviousSibling = function(element, element_name) {
+  var ps = element.previousSibling;
+  if(!ps) {
+    return null;
+  } else if((ps.nodeName) && (ps.nodeName.toLowerCase() == element_name.toLowerCase())) {
+    return ps;
+  } else {
+    return Element.Methods.getPreviousSibling(ps, element_name);
+  }
+}
+
+Event.observe(window, 'load', HelpPopup.Tooltip.init);

Added: incubator/heraldry/idp/pip/trunk/public/javascripts/builder.js
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/javascripts/builder.js?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/public/javascripts/builder.js (added)
+++ incubator/heraldry/idp/pip/trunk/public/javascripts/builder.js Fri Sep 22 18:37:26 2006
@@ -0,0 +1,101 @@
+// Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+//
+// See scriptaculous.js for full license.
+
+var Builder = {
+  NODEMAP: {
+    AREA: 'map',
+    CAPTION: 'table',
+    COL: 'table',
+    COLGROUP: 'table',
+    LEGEND: 'fieldset',
+    OPTGROUP: 'select',
+    OPTION: 'select',
+    PARAM: 'object',
+    TBODY: 'table',
+    TD: 'table',
+    TFOOT: 'table',
+    TH: 'table',
+    THEAD: 'table',
+    TR: 'table'
+  },
+  // note: For Firefox < 1.5, OPTION and OPTGROUP tags are currently broken,
+  //       due to a Firefox bug
+  node: function(elementName) {
+    elementName = elementName.toUpperCase();
+    
+    // try innerHTML approach
+    var parentTag = this.NODEMAP[elementName] || 'div';
+    var parentElement = document.createElement(parentTag);
+    try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707
+      parentElement.innerHTML = "<" + elementName + "></" + elementName + ">";
+    } catch(e) {}
+    var element = parentElement.firstChild || null;
+      
+    // see if browser added wrapping tags
+    if(element && (element.tagName != elementName))
+      element = element.getElementsByTagName(elementName)[0];
+    
+    // fallback to createElement approach
+    if(!element) element = document.createElement(elementName);
+    
+    // abort if nothing could be created
+    if(!element) return;
+
+    // attributes (or text)
+    if(arguments[1])
+      if(this._isStringOrNumber(arguments[1]) ||
+        (arguments[1] instanceof Array)) {
+          this._children(element, arguments[1]);
+        } else {
+          var attrs = this._attributes(arguments[1]);
+          if(attrs.length) {
+            try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707
+              parentElement.innerHTML = "<" +elementName + " " +
+                attrs + "></" + elementName + ">";
+            } catch(e) {}
+            element = parentElement.firstChild || null;
+            // workaround firefox 1.0.X bug
+            if(!element) {
+              element = document.createElement(elementName);
+              for(attr in arguments[1]) 
+                element[attr == 'class' ? 'className' : attr] = arguments[1][attr];
+            }
+            if(element.tagName != elementName)
+              element = parentElement.getElementsByTagName(elementName)[0];
+            }
+        } 
+
+    // text, or array of children
+    if(arguments[2])
+      this._children(element, arguments[2]);
+
+     return element;
+  },
+  _text: function(text) {
+     return document.createTextNode(text);
+  },
+  _attributes: function(attributes) {
+    var attrs = [];
+    for(attribute in attributes)
+      attrs.push((attribute=='className' ? 'class' : attribute) +
+          '="' + attributes[attribute].toString().escapeHTML() + '"');
+    return attrs.join(" ");
+  },
+  _children: function(element, children) {
+    if(typeof children=='object') { // array can hold nodes and text
+      children.flatten().each( function(e) {
+        if(typeof e=='object')
+          element.appendChild(e)
+        else
+          if(Builder._isStringOrNumber(e))
+            element.appendChild(Builder._text(e));
+      });
+    } else
+      if(Builder._isStringOrNumber(children)) 
+         element.appendChild(Builder._text(children));
+  },
+  _isStringOrNumber: function(param) {
+    return(typeof param=='string' || typeof param=='number');
+  }
+}
\ No newline at end of file

Added: incubator/heraldry/idp/pip/trunk/public/javascripts/controls.js
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/javascripts/controls.js?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/public/javascripts/controls.js (added)
+++ incubator/heraldry/idp/pip/trunk/public/javascripts/controls.js Fri Sep 22 18:37:26 2006
@@ -0,0 +1,815 @@
+// Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+//           (c) 2005 Ivan Krstic (http://blogs.law.harvard.edu/ivan)
+//           (c) 2005 Jon Tirsen (http://www.tirsen.com)
+// Contributors:
+//  Richard Livsey
+//  Rahul Bhargava
+//  Rob Wills
+// 
+// See scriptaculous.js for full license.
+
+// Autocompleter.Base handles all the autocompletion functionality 
+// that's independent of the data source for autocompletion. This
+// includes drawing the autocompletion menu, observing keyboard
+// and mouse events, and similar.
+//
+// Specific autocompleters need to provide, at the very least, 
+// a getUpdatedChoices function that will be invoked every time
+// the text inside the monitored textbox changes. This method 
+// should get the text for which to provide autocompletion by
+// invoking this.getToken(), NOT by directly accessing
+// this.element.value. This is to allow incremental tokenized
+// autocompletion. Specific auto-completion logic (AJAX, etc)
+// belongs in getUpdatedChoices.
+//
+// Tokenized incremental autocompletion is enabled automatically
+// when an autocompleter is instantiated with the 'tokens' option
+// in the options parameter, e.g.:
+// new Ajax.Autocompleter('id','upd', '/url/', { tokens: ',' });
+// will incrementally autocomplete with a comma as the token.
+// Additionally, ',' in the above example can be replaced with
+// a token array, e.g. { tokens: [',', '\n'] } which
+// enables autocompletion on multiple tokens. This is most 
+// useful when one of the tokens is \n (a newline), as it 
+// allows smart autocompletion after linebreaks.
+
+var Autocompleter = {}
+Autocompleter.Base = function() {};
+Autocompleter.Base.prototype = {
+  baseInitialize: function(element, update, options) {
+    this.element     = $(element); 
+    this.update      = $(update);  
+    this.hasFocus    = false; 
+    this.changed     = false; 
+    this.active      = false; 
+    this.index       = 0;     
+    this.entryCount  = 0;
+
+    if (this.setOptions)
+      this.setOptions(options);
+    else
+      this.options = options || {};
+
+    this.options.paramName    = this.options.paramName || this.element.name;
+    this.options.tokens       = this.options.tokens || [];
+    this.options.frequency    = this.options.frequency || 0.4;
+    this.options.minChars     = this.options.minChars || 1;
+    this.options.onShow       = this.options.onShow || 
+    function(element, update){ 
+      if(!update.style.position || update.style.position=='absolute') {
+        update.style.position = 'absolute';
+        Position.clone(element, update, {setHeight: false, offsetTop: element.offsetHeight});
+      }
+      Effect.Appear(update,{duration:0.15});
+    };
+    this.options.onHide = this.options.onHide || 
+    function(element, update){ new Effect.Fade(update,{duration:0.15}) };
+
+    if (typeof(this.options.tokens) == 'string') 
+      this.options.tokens = new Array(this.options.tokens);
+
+    this.observer = null;
+    
+    this.element.setAttribute('autocomplete','off');
+
+    Element.hide(this.update);
+
+    Event.observe(this.element, "blur", this.onBlur.bindAsEventListener(this));
+    Event.observe(this.element, "keypress", this.onKeyPress.bindAsEventListener(this));
+  },
+
+  show: function() {
+    if(Element.getStyle(this.update, 'display')=='none') this.options.onShow(this.element, this.update);
+    if(!this.iefix && 
+      (navigator.appVersion.indexOf('MSIE')>0) &&
+      (navigator.userAgent.indexOf('Opera')<0) &&
+      (Element.getStyle(this.update, 'position')=='absolute')) {
+      new Insertion.After(this.update, 
+       '<iframe id="' + this.update.id + '_iefix" '+
+       'style="display:none;position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);" ' +
+       'src="javascript:false;" frameborder="0" scrolling="no"></iframe>');
+      this.iefix = $(this.update.id+'_iefix');
+    }
+    if(this.iefix) setTimeout(this.fixIEOverlapping.bind(this), 50);
+  },
+  
+  fixIEOverlapping: function() {
+    Position.clone(this.update, this.iefix);
+    this.iefix.style.zIndex = 1;
+    this.update.style.zIndex = 2;
+    Element.show(this.iefix);
+  },
+
+  hide: function() {
+    this.stopIndicator();
+    if(Element.getStyle(this.update, 'display')!='none') this.options.onHide(this.element, this.update);
+    if(this.iefix) Element.hide(this.iefix);
+  },
+
+  startIndicator: function() {
+    if(this.options.indicator) Element.show(this.options.indicator);
+  },
+
+  stopIndicator: function() {
+    if(this.options.indicator) Element.hide(this.options.indicator);
+  },
+
+  onKeyPress: function(event) {
+    if(this.active)
+      switch(event.keyCode) {
+       case Event.KEY_TAB:
+       case Event.KEY_RETURN:
+         this.selectEntry();
+         Event.stop(event);
+       case Event.KEY_ESC:
+         this.hide();
+         this.active = false;
+         Event.stop(event);
+         return;
+       case Event.KEY_LEFT:
+       case Event.KEY_RIGHT:
+         return;
+       case Event.KEY_UP:
+         this.markPrevious();
+         this.render();
+         if(navigator.appVersion.indexOf('AppleWebKit')>0) Event.stop(event);
+         return;
+       case Event.KEY_DOWN:
+         this.markNext();
+         this.render();
+         if(navigator.appVersion.indexOf('AppleWebKit')>0) Event.stop(event);
+         return;
+      }
+     else 
+       if(event.keyCode==Event.KEY_TAB || event.keyCode==Event.KEY_RETURN || 
+         (navigator.appVersion.indexOf('AppleWebKit') > 0 && event.keyCode == 0)) return;
+
+    this.changed = true;
+    this.hasFocus = true;
+
+    if(this.observer) clearTimeout(this.observer);
+      this.observer = 
+        setTimeout(this.onObserverEvent.bind(this), this.options.frequency*1000);
+  },
+
+  activate: function() {
+    this.changed = false;
+    this.hasFocus = true;
+    this.getUpdatedChoices();
+  },
+
+  onHover: function(event) {
+    var element = Event.findElement(event, 'LI');
+    if(this.index != element.autocompleteIndex) 
+    {
+        this.index = element.autocompleteIndex;
+        this.render();
+    }
+    Event.stop(event);
+  },
+  
+  onClick: function(event) {
+    var element = Event.findElement(event, 'LI');
+    this.index = element.autocompleteIndex;
+    this.selectEntry();
+    this.hide();
+  },
+  
+  onBlur: function(event) {
+    // needed to make click events working
+    setTimeout(this.hide.bind(this), 250);
+    this.hasFocus = false;
+    this.active = false;     
+  }, 
+  
+  render: function() {
+    if(this.entryCount > 0) {
+      for (var i = 0; i < this.entryCount; i++)
+        this.index==i ? 
+          Element.addClassName(this.getEntry(i),"selected") : 
+          Element.removeClassName(this.getEntry(i),"selected");
+        
+      if(this.hasFocus) { 
+        this.show();
+        this.active = true;
+      }
+    } else {
+      this.active = false;
+      this.hide();
+    }
+  },
+  
+  markPrevious: function() {
+    if(this.index > 0) this.index--
+      else this.index = this.entryCount-1;
+  },
+  
+  markNext: function() {
+    if(this.index < this.entryCount-1) this.index++
+      else this.index = 0;
+  },
+  
+  getEntry: function(index) {
+    return this.update.firstChild.childNodes[index];
+  },
+  
+  getCurrentEntry: function() {
+    return this.getEntry(this.index);
+  },
+  
+  selectEntry: function() {
+    this.active = false;
+    this.updateElement(this.getCurrentEntry());
+  },
+
+  updateElement: function(selectedElement) {
+    if (this.options.updateElement) {
+      this.options.updateElement(selectedElement);
+      return;
+    }
+    var value = '';
+    if (this.options.select) {
+      var nodes = document.getElementsByClassName(this.options.select, selectedElement) || [];
+      if(nodes.length>0) value = Element.collectTextNodes(nodes[0], this.options.select);
+    } else
+      value = Element.collectTextNodesIgnoreClass(selectedElement, 'informal');
+    
+    var lastTokenPos = this.findLastToken();
+    if (lastTokenPos != -1) {
+      var newValue = this.element.value.substr(0, lastTokenPos + 1);
+      var whitespace = this.element.value.substr(lastTokenPos + 1).match(/^\s+/);
+      if (whitespace)
+        newValue += whitespace[0];
+      this.element.value = newValue + value;
+    } else {
+      this.element.value = value;
+    }
+    this.element.focus();
+    
+    if (this.options.afterUpdateElement)
+      this.options.afterUpdateElement(this.element, selectedElement);
+  },
+
+  updateChoices: function(choices) {
+    if(!this.changed && this.hasFocus) {
+      this.update.innerHTML = choices;
+      Element.cleanWhitespace(this.update);
+      Element.cleanWhitespace(this.update.firstChild);
+
+      if(this.update.firstChild && this.update.firstChild.childNodes) {
+        this.entryCount = 
+          this.update.firstChild.childNodes.length;
+        for (var i = 0; i < this.entryCount; i++) {
+          var entry = this.getEntry(i);
+          entry.autocompleteIndex = i;
+          this.addObservers(entry);
+        }
+      } else { 
+        this.entryCount = 0;
+      }
+
+      this.stopIndicator();
+
+      this.index = 0;
+      this.render();
+    }
+  },
+
+  addObservers: function(element) {
+    Event.observe(element, "mouseover", this.onHover.bindAsEventListener(this));
+    Event.observe(element, "click", this.onClick.bindAsEventListener(this));
+  },
+
+  onObserverEvent: function() {
+    this.changed = false;   
+    if(this.getToken().length>=this.options.minChars) {
+      this.startIndicator();
+      this.getUpdatedChoices();
+    } else {
+      this.active = false;
+      this.hide();
+    }
+  },
+
+  getToken: function() {
+    var tokenPos = this.findLastToken();
+    if (tokenPos != -1)
+      var ret = this.element.value.substr(tokenPos + 1).replace(/^\s+/,'').replace(/\s+$/,'');
+    else
+      var ret = this.element.value;
+
+    return /\n/.test(ret) ? '' : ret;
+  },
+
+  findLastToken: function() {
+    var lastTokenPos = -1;
+
+    for (var i=0; i<this.options.tokens.length; i++) {
+      var thisTokenPos = this.element.value.lastIndexOf(this.options.tokens[i]);
+      if (thisTokenPos > lastTokenPos)
+        lastTokenPos = thisTokenPos;
+    }
+    return lastTokenPos;
+  }
+}
+
+Ajax.Autocompleter = Class.create();
+Object.extend(Object.extend(Ajax.Autocompleter.prototype, Autocompleter.Base.prototype), {
+  initialize: function(element, update, url, options) {
+    this.baseInitialize(element, update, options);
+    this.options.asynchronous  = true;
+    this.options.onComplete    = this.onComplete.bind(this);
+    this.options.defaultParams = this.options.parameters || null;
+    this.url                   = url;
+  },
+
+  getUpdatedChoices: function() {
+    entry = encodeURIComponent(this.options.paramName) + '=' + 
+      encodeURIComponent(this.getToken());
+
+    this.options.parameters = this.options.callback ?
+      this.options.callback(this.element, entry) : entry;
+
+    if(this.options.defaultParams) 
+      this.options.parameters += '&' + this.options.defaultParams;
+
+    new Ajax.Request(this.url, this.options);
+  },
+
+  onComplete: function(request) {
+    this.updateChoices(request.responseText);
+  }
+
+});
+
+// The local array autocompleter. Used when you'd prefer to
+// inject an array of autocompletion options into the page, rather
+// than sending out Ajax queries, which can be quite slow sometimes.
+//
+// The constructor takes four parameters. The first two are, as usual,
+// the id of the monitored textbox, and id of the autocompletion menu.
+// The third is the array you want to autocomplete from, and the fourth
+// is the options block.
+//
+// Extra local autocompletion options:
+// - choices - How many autocompletion choices to offer
+//
+// - partialSearch - If false, the autocompleter will match entered
+//                    text only at the beginning of strings in the 
+//                    autocomplete array. Defaults to true, which will
+//                    match text at the beginning of any *word* in the
+//                    strings in the autocomplete array. If you want to
+//                    search anywhere in the string, additionally set
+//                    the option fullSearch to true (default: off).
+//
+// - fullSsearch - Search anywhere in autocomplete array strings.
+//
+// - partialChars - How many characters to enter before triggering
+//                   a partial match (unlike minChars, which defines
+//                   how many characters are required to do any match
+//                   at all). Defaults to 2.
+//
+// - ignoreCase - Whether to ignore case when autocompleting.
+//                 Defaults to true.
+//
+// It's possible to pass in a custom function as the 'selector' 
+// option, if you prefer to write your own autocompletion logic.
+// In that case, the other options above will not apply unless
+// you support them.
+
+Autocompleter.Local = Class.create();
+Autocompleter.Local.prototype = Object.extend(new Autocompleter.Base(), {
+  initialize: function(element, update, array, options) {
+    this.baseInitialize(element, update, options);
+    this.options.array = array;
+  },
+
+  getUpdatedChoices: function() {
+    this.updateChoices(this.options.selector(this));
+  },
+
+  setOptions: function(options) {
+    this.options = Object.extend({
+      choices: 10,
+      partialSearch: true,
+      partialChars: 2,
+      ignoreCase: true,
+      fullSearch: false,
+      selector: function(instance) {
+        var ret       = []; // Beginning matches
+        var partial   = []; // Inside matches
+        var entry     = instance.getToken();
+        var count     = 0;
+
+        for (var i = 0; i < instance.options.array.length &&  
+          ret.length < instance.options.choices ; i++) { 
+
+          var elem = instance.options.array[i];
+          var foundPos = instance.options.ignoreCase ? 
+            elem.toLowerCase().indexOf(entry.toLowerCase()) : 
+            elem.indexOf(entry);
+
+          while (foundPos != -1) {
+            if (foundPos == 0 && elem.length != entry.length) { 
+              ret.push("<li><strong>" + elem.substr(0, entry.length) + "</strong>" + 
+                elem.substr(entry.length) + "</li>");
+              break;
+            } else if (entry.length >= instance.options.partialChars && 
+              instance.options.partialSearch && foundPos != -1) {
+              if (instance.options.fullSearch || /\s/.test(elem.substr(foundPos-1,1))) {
+                partial.push("<li>" + elem.substr(0, foundPos) + "<strong>" +
+                  elem.substr(foundPos, entry.length) + "</strong>" + elem.substr(
+                  foundPos + entry.length) + "</li>");
+                break;
+              }
+            }
+
+            foundPos = instance.options.ignoreCase ? 
+              elem.toLowerCase().indexOf(entry.toLowerCase(), foundPos + 1) : 
+              elem.indexOf(entry, foundPos + 1);
+
+          }
+        }
+        if (partial.length)
+          ret = ret.concat(partial.slice(0, instance.options.choices - ret.length))
+        return "<ul>" + ret.join('') + "</ul>";
+      }
+    }, options || {});
+  }
+});
+
+// AJAX in-place editor
+//
+// see documentation on http://wiki.script.aculo.us/scriptaculous/show/Ajax.InPlaceEditor
+
+// Use this if you notice weird scrolling problems on some browsers,
+// the DOM might be a bit confused when this gets called so do this
+// waits 1 ms (with setTimeout) until it does the activation
+Field.scrollFreeActivate = function(field) {
+  setTimeout(function() {
+    Field.activate(field);
+  }, 1);
+}
+
+Ajax.InPlaceEditor = Class.create();
+Ajax.InPlaceEditor.defaultHighlightColor = "#FFFF99";
+Ajax.InPlaceEditor.prototype = {
+  initialize: function(element, url, options) {
+    this.url = url;
+    this.element = $(element);
+
+    this.options = Object.extend({
+      okButton: true,
+      okText: "ok",
+      cancelLink: true,
+      cancelText: "cancel",
+      savingText: "Saving...",
+      clickToEditText: "Click to edit",
+      okText: "ok",
+      rows: 1,
+      onComplete: function(transport, element) {
+        new Effect.Highlight(element, {startcolor: this.options.highlightcolor});
+      },
+      onFailure: function(transport) {
+        alert("Error communicating with the server: " + transport.responseText.stripTags());
+      },
+      callback: function(form) {
+        return Form.serialize(form);
+      },
+      handleLineBreaks: true,
+      loadingText: 'Loading...',
+      savingClassName: 'inplaceeditor-saving',
+      loadingClassName: 'inplaceeditor-loading',
+      formClassName: 'inplaceeditor-form',
+      highlightcolor: Ajax.InPlaceEditor.defaultHighlightColor,
+      highlightendcolor: "#FFFFFF",
+      externalControl: null,
+      submitOnBlur: false,
+      ajaxOptions: {},
+      evalScripts: false
+    }, options || {});
+
+    if(!this.options.formId && this.element.id) {
+      this.options.formId = this.element.id + "-inplaceeditor";
+      if ($(this.options.formId)) {
+        // there's already a form with that name, don't specify an id
+        this.options.formId = null;
+      }
+    }
+    
+    if (this.options.externalControl) {
+      this.options.externalControl = $(this.options.externalControl);
+    }
+    
+    this.originalBackground = Element.getStyle(this.element, 'background-color');
+    if (!this.originalBackground) {
+      this.originalBackground = "transparent";
+    }
+    
+    this.element.title = this.options.clickToEditText;
+    
+    this.onclickListener = this.enterEditMode.bindAsEventListener(this);
+    this.mouseoverListener = this.enterHover.bindAsEventListener(this);
+    this.mouseoutListener = this.leaveHover.bindAsEventListener(this);
+    Event.observe(this.element, 'click', this.onclickListener);
+    Event.observe(this.element, 'mouseover', this.mouseoverListener);
+    Event.observe(this.element, 'mouseout', this.mouseoutListener);
+    if (this.options.externalControl) {
+      Event.observe(this.options.externalControl, 'click', this.onclickListener);
+      Event.observe(this.options.externalControl, 'mouseover', this.mouseoverListener);
+      Event.observe(this.options.externalControl, 'mouseout', this.mouseoutListener);
+    }
+  },
+  enterEditMode: function(evt) {
+    if (this.saving) return;
+    if (this.editing) return;
+    this.editing = true;
+    this.onEnterEditMode();
+    if (this.options.externalControl) {
+      Element.hide(this.options.externalControl);
+    }
+    Element.hide(this.element);
+    this.createForm();
+    this.element.parentNode.insertBefore(this.form, this.element);
+    Field.scrollFreeActivate(this.editField);
+    // stop the event to avoid a page refresh in Safari
+    if (evt) {
+      Event.stop(evt);
+    }
+    return false;
+  },
+  createForm: function() {
+    this.form = document.createElement("form");
+    this.form.id = this.options.formId;
+    Element.addClassName(this.form, this.options.formClassName)
+    this.form.onsubmit = this.onSubmit.bind(this);
+
+    this.createEditField();
+
+    if (this.options.textarea) {
+      var br = document.createElement("br");
+      this.form.appendChild(br);
+    }
+
+    if (this.options.okButton) {
+      okButton = document.createElement("input");
+      okButton.type = "submit";
+      okButton.value = this.options.okText;
+      okButton.className = 'editor_ok_button';
+      this.form.appendChild(okButton);
+    }
+
+    if (this.options.cancelLink) {
+      cancelLink = document.createElement("a");
+      cancelLink.href = "#";
+      cancelLink.appendChild(document.createTextNode(this.options.cancelText));
+      cancelLink.onclick = this.onclickCancel.bind(this);
+      cancelLink.className = 'editor_cancel';      
+      this.form.appendChild(cancelLink);
+    }
+  },
+  hasHTMLLineBreaks: function(string) {
+    if (!this.options.handleLineBreaks) return false;
+    return string.match(/<br/i) || string.match(/<p>/i);
+  },
+  convertHTMLLineBreaks: function(string) {
+    return string.replace(/<br>/gi, "\n").replace(/<br\/>/gi, "\n").replace(/<\/p>/gi, "\n").replace(/<p>/gi, "");
+  },
+  createEditField: function() {
+    var text;
+    if(this.options.loadTextURL) {
+      text = this.options.loadingText;
+    } else {
+      text = this.getText();
+    }
+
+    var obj = this;
+    
+    if (this.options.rows == 1 && !this.hasHTMLLineBreaks(text)) {
+      this.options.textarea = false;
+      var textField = document.createElement("input");
+      textField.obj = this;
+      textField.type = "text";
+      textField.name = "value";
+      textField.value = text;
+      textField.style.backgroundColor = this.options.highlightcolor;
+      textField.className = 'editor_field';
+      var size = this.options.size || this.options.cols || 0;
+      if (size != 0) textField.size = size;
+      if (this.options.submitOnBlur)
+        textField.onblur = this.onSubmit.bind(this);
+      this.editField = textField;
+    } else {
+      this.options.textarea = true;
+      var textArea = document.createElement("textarea");
+      textArea.obj = this;
+      textArea.name = "value";
+      textArea.value = this.convertHTMLLineBreaks(text);
+      textArea.rows = this.options.rows;
+      textArea.cols = this.options.cols || 40;
+      textArea.className = 'editor_field';      
+      if (this.options.submitOnBlur)
+        textArea.onblur = this.onSubmit.bind(this);
+      this.editField = textArea;
+    }
+    
+    if(this.options.loadTextURL) {
+      this.loadExternalText();
+    }
+    this.form.appendChild(this.editField);
+  },
+  getText: function() {
+    return this.element.innerHTML;
+  },
+  loadExternalText: function() {
+    Element.addClassName(this.form, this.options.loadingClassName);
+    this.editField.disabled = true;
+    new Ajax.Request(
+      this.options.loadTextURL,
+      Object.extend({
+        asynchronous: true,
+        onComplete: this.onLoadedExternalText.bind(this)
+      }, this.options.ajaxOptions)
+    );
+  },
+  onLoadedExternalText: function(transport) {
+    Element.removeClassName(this.form, this.options.loadingClassName);
+    this.editField.disabled = false;
+    this.editField.value = transport.responseText.stripTags();
+  },
+  onclickCancel: function() {
+    this.onComplete();
+    this.leaveEditMode();
+    return false;
+  },
+  onFailure: function(transport) {
+    this.options.onFailure(transport);
+    if (this.oldInnerHTML) {
+      this.element.innerHTML = this.oldInnerHTML;
+      this.oldInnerHTML = null;
+    }
+    return false;
+  },
+  onSubmit: function() {
+    // onLoading resets these so we need to save them away for the Ajax call
+    var form = this.form;
+    var value = this.editField.value;
+    
+    // do this first, sometimes the ajax call returns before we get a chance to switch on Saving...
+    // which means this will actually switch on Saving... *after* we've left edit mode causing Saving...
+    // to be displayed indefinitely
+    this.onLoading();
+    
+    if (this.options.evalScripts) {
+      new Ajax.Request(
+        this.url, Object.extend({
+          parameters: this.options.callback(form, value),
+          onComplete: this.onComplete.bind(this),
+          onFailure: this.onFailure.bind(this),
+          asynchronous:true, 
+          evalScripts:true
+        }, this.options.ajaxOptions));
+    } else  {
+      new Ajax.Updater(
+        { success: this.element,
+          // don't update on failure (this could be an option)
+          failure: null }, 
+        this.url, Object.extend({
+          parameters: this.options.callback(form, value),
+          onComplete: this.onComplete.bind(this),
+          onFailure: this.onFailure.bind(this)
+        }, this.options.ajaxOptions));
+    }
+    // stop the event to avoid a page refresh in Safari
+    if (arguments.length > 1) {
+      Event.stop(arguments[0]);
+    }
+    return false;
+  },
+  onLoading: function() {
+    this.saving = true;
+    this.removeForm();
+    this.leaveHover();
+    this.showSaving();
+  },
+  showSaving: function() {
+    this.oldInnerHTML = this.element.innerHTML;
+    this.element.innerHTML = this.options.savingText;
+    Element.addClassName(this.element, this.options.savingClassName);
+    this.element.style.backgroundColor = this.originalBackground;
+    Element.show(this.element);
+  },
+  removeForm: function() {
+    if(this.form) {
+      if (this.form.parentNode) Element.remove(this.form);
+      this.form = null;
+    }
+  },
+  enterHover: function() {
+    if (this.saving) return;
+    this.element.style.backgroundColor = this.options.highlightcolor;
+    if (this.effect) {
+      this.effect.cancel();
+    }
+    Element.addClassName(this.element, this.options.hoverClassName)
+  },
+  leaveHover: function() {
+    if (this.options.backgroundColor) {
+      this.element.style.backgroundColor = this.oldBackground;
+    }
+    Element.removeClassName(this.element, this.options.hoverClassName)
+    if (this.saving) return;
+    this.effect = new Effect.Highlight(this.element, {
+      startcolor: this.options.highlightcolor,
+      endcolor: this.options.highlightendcolor,
+      restorecolor: this.originalBackground
+    });
+  },
+  leaveEditMode: function() {
+    Element.removeClassName(this.element, this.options.savingClassName);
+    this.removeForm();
+    this.leaveHover();
+    this.element.style.backgroundColor = this.originalBackground;
+    Element.show(this.element);
+    if (this.options.externalControl) {
+      Element.show(this.options.externalControl);
+    }
+    this.editing = false;
+    this.saving = false;
+    this.oldInnerHTML = null;
+    this.onLeaveEditMode();
+  },
+  onComplete: function(transport) {
+    this.leaveEditMode();
+    this.options.onComplete.bind(this)(transport, this.element);
+  },
+  onEnterEditMode: function() {},
+  onLeaveEditMode: function() {},
+  dispose: function() {
+    if (this.oldInnerHTML) {
+      this.element.innerHTML = this.oldInnerHTML;
+    }
+    this.leaveEditMode();
+    Event.stopObserving(this.element, 'click', this.onclickListener);
+    Event.stopObserving(this.element, 'mouseover', this.mouseoverListener);
+    Event.stopObserving(this.element, 'mouseout', this.mouseoutListener);
+    if (this.options.externalControl) {
+      Event.stopObserving(this.options.externalControl, 'click', this.onclickListener);
+      Event.stopObserving(this.options.externalControl, 'mouseover', this.mouseoverListener);
+      Event.stopObserving(this.options.externalControl, 'mouseout', this.mouseoutListener);
+    }
+  }
+};
+
+Ajax.InPlaceCollectionEditor = Class.create();
+Object.extend(Ajax.InPlaceCollectionEditor.prototype, Ajax.InPlaceEditor.prototype);
+Object.extend(Ajax.InPlaceCollectionEditor.prototype, {
+  createEditField: function() {
+    if (!this.cached_selectTag) {
+      var selectTag = document.createElement("select");
+      var collection = this.options.collection || [];
+      var optionTag;
+      collection.each(function(e,i) {
+        optionTag = document.createElement("option");
+        optionTag.value = (e instanceof Array) ? e[0] : e;
+        if(this.options.value==optionTag.value) optionTag.selected = true;
+        optionTag.appendChild(document.createTextNode((e instanceof Array) ? e[1] : e));
+        selectTag.appendChild(optionTag);
+      }.bind(this));
+      this.cached_selectTag = selectTag;
+    }
+
+    this.editField = this.cached_selectTag;
+    if(this.options.loadTextURL) this.loadExternalText();
+    this.form.appendChild(this.editField);
+    this.options.callback = function(form, value) {
+      return "value=" + encodeURIComponent(value);
+    }
+  }
+});
+
+// Delayed observer, like Form.Element.Observer, 
+// but waits for delay after last key input
+// Ideal for live-search fields
+
+Form.Element.DelayedObserver = Class.create();
+Form.Element.DelayedObserver.prototype = {
+  initialize: function(element, delay, callback) {
+    this.delay     = delay || 0.5;
+    this.element   = $(element);
+    this.callback  = callback;
+    this.timer     = null;
+    this.lastValue = $F(this.element); 
+    Event.observe(this.element,'keyup',this.delayedListener.bindAsEventListener(this));
+  },
+  delayedListener: function(event) {
+    if(this.lastValue == $F(this.element)) return;
+    if(this.timer) clearTimeout(this.timer);
+    this.timer = setTimeout(this.onTimerEvent.bind(this), this.delay * 1000);
+    this.lastValue = $F(this.element);
+  },
+  onTimerEvent: function() {
+    this.timer = null;
+    this.callback(this.element, $F(this.element));
+  }
+};

Added: incubator/heraldry/idp/pip/trunk/public/javascripts/debug.js
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/javascripts/debug.js?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/public/javascripts/debug.js (added)
+++ incubator/heraldry/idp/pip/trunk/public/javascripts/debug.js Fri Sep 22 18:37:26 2006
@@ -0,0 +1,18 @@
+Ajax.Responders.register({
+// log the beginning of the requests
+onCreate: function(request, transport) {
+  new Insertion.Bottom('debug', '<p><strong>[' + new Date().toString() + '] accessing ' + request.url + '</strong></p>')
+},
+
+// log the completion of the requests
+onComplete: function(request, transport) {
+  new Insertion.Bottom('debug', 
+    '<p><strong>http status: ' + transport.status + '</strong></p>' +
+    '<pre>' + transport.responseText.escapeHTML() + '</pre>')
+  }
+});
+
+Ajax.Responders.register({onException: function(request, exception) { 
+  //alert(exception);
+  //alert(request.transport.responseText);
+}})
\ No newline at end of file



Mime
View raw message