Perldoc-Server

 view release on metacpan or  search on metacpan

root/static/js/OpenThought.js  view on Meta::CPAN

//
// OpenThought
//
// Author: Eric Andreychek <eric@openthought.net>
//
// http://openthought.net
//
// The contents of this file are Copyright (c) 2000-2007 Eric Andreychek.  All
// rights reserved.  For distribution terms, please see the LICENSE file
// included with the OpenThought application.


/*
TODO
* Optimize for browsers
    - no need for channels with XMLHttpRequest browsers
    - limit channels for IE4/NS4
    - Better browser detection
* Add more caching, we're doing some work multiple times
* Add support for highlighting multiple items in a select-multiple
    - Possible via selectbox_highlight or selectbox_duplicate_value options


*/
function OpenThoughtConfig() {
//////////////////////////////////////////////////////////////////////////////
//
// Config section
//
// Change any of the following to your preference

/*
   Enable a log window so you can see what's going on behind the scenes.  If
   something in your app isn't working, try enabling this.  This can be very
   useful for debugging, but you probably want it disabled while your app is in
   production.  This, of course, won't work if your popup blocking software
   doesn't allow popups from the site you're running your application from.
*/
this.log_enabled = false;

/*
   What log level to run at.  You have the ability to enable lots of debugging
   output, only serious errors, and various levels in between.
     * options: debug, info, warn, error, fatal
*/
this.log_level = "debug";

/*
   Require what features in a browser.  If the feature is missing, go to the
   corresponding url.  OpenThought itself always requires a 4.0 browser DOM as
   a minimum, but your application may have more specific requirements.
    * options:  40dom -- Needs to have a basic 4.0 browser DOM (needed for OT)
                htmlrewrite -- Needs to support innerHTML
                xmlhttp -- Must support XmlHttpRequest or XMLHTTP
                iframe -- Must support iframes (all but NS4)
                layer -- Must support layers (only NS4)
*/
this.require = { "40dom" : "http://openthought.net?rm=unsupported_browser" };

/* EXPERIMENTAL
   The default request type for communications with the server.  This can be
   overridded at any time by passing in either GET or POST as the first
   parameter to CallUrl().  The default is GET.  POST is not well tested.
     * options: GET or POST
*/
this.http_request_type = "GET"

/*
   The type of channel to use for communicating with the this.browser.  Normally,
   OpenThought will attempt to use the XMLHttpRequest or XMLHTTP functions
   available in recent browsers, then fall back to iframes if the browser
   doesn't support those newer options.  However, XMLHttpRequest and XMLHTTP
   have a limitation -- for any given request, they can only parse data sent
   from the server once, doing so after the request is complete.  Iframes parse
   data as it's sent from the server, and can do so as many times as desired
   for any given request.  XMLHttpRequest/XMLHTTP are fine for most
   uses, but some applications may benefit from being able to have the browser
   receive data a number of times throughtout a single request (ie, irc and
   other realtime chat applications, or a log tailing app).
     * options: auto or iframe
*/
this.channel_type = "auto"

/*
   Normally, the channel used to communicate with the server is invisible.  The
   curious may wish to see whats going on inside it (or perhaps need it for
   debugging).  Enabling the following will make the channel visible.  This only
   works when the channel is an iframe.

   For now, the only way to see the JavaScript being inserted into the channel
   is to right-click the visible iframe and hit 'View Source'.
*/
this.channel_visible = false

/*
   When using iframes and layers, the typical way to send data to the server
   involves using a 'document.location.replace()'.  This means the requests



( run in 0.724 second using v1.01-cache-2.11-cpan-364913b4093 )