Commit 1485e6e1 authored by Frank Bergmann's avatar Frank Bergmann

- Upgrade to OpenACS 5.9.1

parent f1082ad2
......@@ -11,13 +11,13 @@
<version name="0.87d" url="http://openacs.org/repository/download/apm/ajaxhelper-0.87d.apm">
<owner url="mailto:ham@solutiongrove.com">Hamilton Chua</owner>
<summary>Ajax Helper for various javascript libraries.</summary>
<release-date>2016-11-15</release-date>
<description format="text/plain">Provides helper procs to generate javascript used for Ajax and generating cinematic effects. Includes Scriptaculous 1.7.1 beta3 with Prototype 1.5.1, ExtJS 1.1.1 and the Yahoo UI Libraries (2.3.0). As of 0.87d, there is now an option to load YUI js source files direct from yahoo (http://developer.yahoo.com/yui/articles/hosting/). Lee Denison's template::head is now used to load javascript sources and css. The YUI loader is used to intelligently load YUI sources and css. As of 0.7d, all javascript libraries have been moved to ajaxhelper/www/resources to take advantage of caching. As of 0.8d, the wrappers will now be able to check a global variable to see if the required sources are loaded, this allows helper procs to automatically load the javascript sources you need.</description>
<vendor>Solution Grove</vendor>
<maturity>1</maturity>
<provides url="ajaxhelper" version="0.87d"/>
<requires url="acs-kernel" version="5.8.1"/>
<requires url="acs-kernel" version="5.9.1"/>
<requires url="acs-tcl" version="5.9.1"/>
<callbacks>
</callbacks>
......
......@@ -12,7 +12,7 @@ namespace eval ah::dojo { }
ad_proc -private ah::dojo::load_js_sources {
-source_list
} {
Accepts a tcl list of sources to load.
Accepts a Tcl list of sources to load.
This source_list will be the global ajax_helper_dojo_js_sources variable.
This script is called in the blank-master template.
......
......@@ -65,7 +65,7 @@ ad_proc -public ah::ext::ajax {
@creation-date 2007-09-07
@param url The url that the javascript will post to
@param params A tcl list of parameters to pass to the url
@param params A Tcl list of parameters to pass to the url
@param success A javascript function to be executed when the url is successfully accessed
@param failure A javascript function to execute if transaction failed.
......@@ -97,7 +97,7 @@ ad_proc -public ah::ext::msgbox {
@author Hamilton Chua (ham@solutiongrove.com)
@creation-date 2007-09-07
@param options A tcl list of options, see above for more info on how to structure and pass options to this proc.
@param options A Tcl list of options, see above for more info on how to structure and pass options to this proc.
} {
......
......@@ -170,7 +170,7 @@ ad_proc ah::lb::add_add_column_menu {
@param list_name template::list list name
@param allowed_elements List of element names that may appear in add
column dropdown
@parma add_url_var Name of URL variable to use to add the choosen column
@parma add_url_var Name of URL variable to use to add the chosen column
@param -hidden_elements List of hidden elements that should be passed in the
} {
if {$return_url eq ""} {
......
......@@ -12,7 +12,7 @@ namespace eval ah::yui { }
ad_proc -private ah::yui::load_js_sources {
-source_list
} {
Accepts a tcl list of sources to load.
Accepts a Tcl list of sources to load.
This source_list will be the global ajax_helper_yui_js_sources variable.
This script is called in the blank-master template.
As of 0.86d with YUI 2.3.0, this proc now uses the Yahoo Loader Utility to
......@@ -575,7 +575,7 @@ ad_proc -public ah::yui::menu_from_list {
{-options ""}
{-renderin "document.body"}
} {
Generates the javascript to create a YUI menu from a tcl list.
Generates the javascript to create a YUI menu from a Tcl list.
http://developer.yahoo.com/yui/menu/
......@@ -623,7 +623,7 @@ ad_proc -public ah::yui::contextmenu {
{-triggerel "document"}
{-renderin "document.body"}
} {
Generates the javascript to create a YUI context menu from a tcl list.
Generates the javascript to create a YUI context menu from a Tcl list.
http://developer.yahoo.com/yui/menu/
@author Hamilton Chua (ham@solutiongrove.com)
......@@ -673,7 +673,7 @@ ad_proc -public ah::yui::autocomplete {
{-forceselection "false"}
{-events {}}
} {
Generates the javascript to create a YUI autocomplete object from a tcl list
Generates the javascript to create a YUI autocomplete object from a Tcl list
http://developer.yahoo.com/yui/autocomplete/
@author Hamilton Chua (ham@solutiongrove.com)
......
......@@ -93,7 +93,7 @@ ad_proc -public get_server_root {} {
ad_proc adp_parse_ad_conn_file {} {
handle a request for an adp and/or tcl file in the template system.
handle a request for an adp and/or Tcl file in the template system.
} {
namespace eval template variable parse_level ""
#ns_log debug "adp_parse_ad_conn_file => file '[file rootname [ad_conn file]]'"
......@@ -110,15 +110,15 @@ ad_proc adp_parse_ad_conn_file {} {
if { "1" eq [lang::util::translator_mode_p] } {
# Attempt to move all message keys outside of tags
while { [regsub -all {(<[^>]*)(\x002\(\x001[^\x001]*\x001\)\x002)([^>]*>)} $parsed_template {\2\1\3} parsed_template] } {}
while { [regsub -all {(<[^>]*)(\x02\(\x01[^\x01]*\x01\)\x02)([^>]*>)} $parsed_template {\2\1\3} parsed_template] } {}
# Attempt to move all message keys outside of <select>...</select> statements
regsub -all -nocase {(<option\s[^>]*>[^<]*)(\x002\(\x001[^\x001]*\x001\)\x002)([^<]*</option[^>]*>)} $parsed_template {\2\1\3} parsed_template
regsub -all -nocase {(<option\s[^>]*>[^<]*)(\x02\(\x01[^\x01]*\x01\)\x02)([^<]*</option[^>]*>)} $parsed_template {\2\1\3} parsed_template
while { [regsub -all -nocase {(<select[^>]*>[^<]*)(\x002\(\x001[^\x001]*\x001\)\x002)} $parsed_template {\2\1} parsed_template] } {}
while { [regsub -all -nocase {(<select[^>]*>[^<]*)(\x02\(\x01[^\x01]*\x01\)\x02)} $parsed_template {\2\1} parsed_template] } {}
set start 0
while { [regexp -nocase -indices -start $start {(<select[^\x002]*)(\x002\(\x001[^\x001]*\x001\)\x002)} $parsed_template indices select_idx message_idx] } {
while { [regexp -nocase -indices -start $start {(<select[^\x02]*)(\x02\(\x01[^\x01]*\x01\)\x02)} $parsed_template indices select_idx message_idx] } {
set select [string range $parsed_template [lindex $select_idx 0] [lindex $select_idx 1]]
if { [string first "</select" [string tolower $select]] != -1 } {
......@@ -133,7 +133,7 @@ ad_proc adp_parse_ad_conn_file {} {
# TODO: We could also move message keys out of <head>...</head>
while { [regexp -indices {\x002\(\x001([^\x001]*)\x001\)\x002} $parsed_template indices key] } {
while { [regexp -indices {\x02\(\x01([^\x01]*)\x01\)\x02} $parsed_template indices key] } {
set before [string range $parsed_template 0 [lindex $indices 0]-1]
set after [string range $parsed_template [lindex $indices 1]+1 end]
......
......@@ -96,7 +96,7 @@
TODO: remove this and add a more systematic / package independent way
TODO of getting this content here
</comment>
<if @curriculum_bar_p@ true><include src="/packages/curriculum/lib/bar" /></if>
<if @curriculum_bar_p@ true><include src="/packages/curriculum/lib/bar" ></if>
<div id="footer">
<div class="block-marker">Begin footer</div>
......
......@@ -56,7 +56,7 @@ ad_proc -public template::head::add_script {
users client. A script library in an external file may only be included
once; subsequent calls to add_script will replace the existing entry.
Anonymous script blocks will be added without checking for duplicates; the
caller must ensure that anonymous script blocks are not inadvertantly added
caller must ensure that anonymous script blocks are not inadvertently added
multiple times. You <strong>must</strong> supply either src or script.
@param type the type attribute of the script tag, eg. 'text/javascript'
......
<property name="context">{/doc/ajaxhelper {Ajax Helper}} {Ajax Helper}</property>
<property name="doc(title)">Ajax Helper</property>
<master>
<h1>Ajax Helper</h1>
<p>Hamilton G. Chua (ham\@solutiongrove.com)<br>
September 2007<br>
v0.87d<br><br><span style="font-weight: bold;">Components :</span><br>
Prototype v1.5.1 (<a href="http://prototypejs.org/" target="_blank">http://prototypejs.org/</a>)<br>
Scriptaculous v1.7.3 Beta (<a href="http://script.aculo.us/" target="_blank">http://script.aculo.us/</a>)<br>
Overlibmws (<a href="http://www.macridesweb.com/oltest/" target="_blank">http://www.macridesweb.com/oltest/</a>)<br>
Curvey Corners (<a href="http://www.curvycorners.net/" target="_blank">http://www.curvycorners.net/</a>)<br>
Yahoo User Interface Library 2.3.0 (<a href="http://developer.yahoo.com/yui/" target="_blank">http://developer.yahoo.com/yui/</a>)<br>
Dojo Toolkit 0.4 (<a href="http://dojotoolkit.com" target="_blank">http://dojotoolkit.com</a>)<br>
ExtJs 1.1.1 (<a href="http://extjs.com" target="_blank">http://extjs.com</a>)</p>
<p><strong>What&#39;s New :</strong></p>
<p>0.87d</p>
<ul>
<li>Uses Lee Denison&#39;s template::head code to load javascript
sources and cascading style sheets</li><li>Removed Dojo javascript sources, users who would like to use
dojo should download it separately from http://dojotoolkit.org</li><li>Added ExtJs javascript sources</li><li>Added helpers for YUI menu, autocomplete and treeview.</li><li>Added ExtJs helpers for Ext.onReady, Ext.Ajax and
Ext.MessageBox</li><li>Additional tests in ajaxhelper/www/tests</li>
</ul>
<p>
<br><span style="font-weight: bold;">Introduction :<br><br>
</span> The Ajax Helper package provides helper Tcl API procs
to generate the javascript from the above listed components to
enable their various features for use in OpenACS applications. The
motivation for this package is to easily enable Web 2.0 like
features in OpenACS applications using the most popular javascript
libraries.<br><br><span style="font-weight: bold;">Prerequisites :<br><br>
</span> The ajax helper package must be installed and mounted
in /ajax . The installer should automatically mount the ajax helper
in /ajax/ upon installation of the package.</p>
<p>Lee Denison&#39;s template::head code must be available. This
code will soon be committed to CVS head after consulting the
community and some more testing.</p>
<p>In the mean time, you can find the files you need to implement
template head from packages/ajaxhlper/www/docs. You should copy the
files into the following locations</p>
<table width="715" border="1">
<tr>
<th width="286" scope="row"><div align="left"><strong>acs-integration-procs.tcl</strong></div></th><td width="413">openacs_root/packages/acs-templatng/tcl/</td>
</tr><tr>
<th scope="row"><div align="left">head-procs.tcl</div></th><td>openacs_root/packages/acs-templatng/tcl/</td>
</tr><tr>
<th scope="row"><div align="left">blank-master.adp</div></th><td>openacs_root/www/</td>
</tr><tr>
<th scope="row"><p align="left">blank-master.tcl</p></th><td>openacs_root/www/</td>
</tr><tr>
<th scope="row"><div align="left">site-master.adp</div></th><td>openacs_root/www/</td>
</tr><tr>
<th scope="row"><div align="left">site-master.tcl</div></th><td>openacs_root/www/</td>
</tr><tr>
<th scope="row"><div align="left">default-master.tcl</div></th><td>openacs_root/www/</td>
</tr><tr>
<th scope="row"><div align="left">default-master.adp</div></th><td>openacs_root/www/</td>
</tr>
</table>
<p>
<br><span style="font-weight: bold;">Javascript Sources :</span>
</p>
As of 0.87d, all required sources and stylesheets are loaded
automatically using Lee Denison&#39;s template::head code.<br>
<br>
<span style="font-weight: bold;">Ajax Procedures :<br><br>
Prototype</span>
has a pair of javascript functions that alllow
programmers to use XMLHTTP. The ajax.updater and ajax.request
functions. See <a href="http://api.prototypejs.org/ajax/Ajax/Updater/">http://api.prototypejs.org/ajax/Ajax/Updater/</a>
and <a href="http://api.prototypejs.org/ajax/Ajax/Request/">http://api.prototypejs.org/ajax/Ajax/Request/</a>
for more information about these javascript functions.<br>
<br>
The Tcl API is used like this<br>
<pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"><code>
set request [ah::ajaxrequest -url "/url/to/call" -pars "parameter1=parameter_value&amp;parameter1=parameter_value"]
</code></pre>
The above api will generate an ajax.request javascript function
that is best placed in an  event like "onClick".<br>
<pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"><code>
&lt;a href="#" onClick="\@request;noquote\@"&gt;Send Request&lt;/a&gt;
</code></pre>
Consult the api-doc for more information about other parameters you
can pass on to the ah::ajaxrequest proc.<br>
<br>
The ah::ajaxrequest will make an xmlhttp call but does not do
anything about the response. To update content based on the
response from an xmlhttp request, use ah::ajaxupdate. This
procedure will not only make an xmlhttp call but update the
contents of a div or layer with the response text of the xmlhttp
request.<br>
<br>
Here&#39;s an example :<br>
<pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"><code>
set js_update_connections [ah::ajaxupdate -container "connections" \
-url "/url/to/call \
-enclose \
-pars "'effects=$effects&amp;limit_n=$limit_n'" \
-effect "Fade" \
-effectopts "duration: 0.5"]
</code></pre>
On the adp side, you can just put<br>
<pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"><code>
&lt;a href="#" onClick="\@js_update_connections;noquote\@"&gt;Update&lt;/a&gt;
</code></pre>
<br>
The "-enclose" parameter tells the procedure to enclose
the resulting script in script tags &lt;script&gt;&lt;/script&gt;.
This is another option in addition to putting the scripts in html
event attributes like onClick, onMouseover or onChange.<br>
<br>
The "-pars" parameter is where you pass the querystring
that you want to send along with the xmlhttp request. Notice that
it takes the form of a querystring that you normally see in the
address bar of your browser. Use this to pass values to the URL you
are making an xmlhttp request to.<br>
<br>
The "-effect" parameter is an optional parameter that
allows you to specify the effect you want to execute after the
container&#39;s content has been updated.<br>
<br>
<span style="font-weight: bold;">Cinematic Effects :<br><br>
</span>
Use ah::effects to generate javascript that allows you
to implement transitional and cinematic effects to html elements.
You will need to consult the scriptaculous documentation <a href="http://madrobby.github.io/scriptaculous/core-effects/" target="_blank">http://madrobby.github.io/scriptaculous/core-effects/</a>
to know what kinds of effects and what kinds of options you can
pass to the effect script.<br>
<br>
The procedure is called in this manner in the tcl file:
<pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"><code>
set effect [ah::effect -element "container" -effect "Fade" -options "duration: 1.5"]
</code></pre>
<p>On the adp file you must put the javascript on a click event</p>
<pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"><code>
&lt;a href="#" onClick="\@effect;noquote\@"&gt;Show Effect&lt;/a&gt;<br>
</code></pre>
<p>NOTE :<br>
The Effect name and the options are case sensitive.<br><span style="font-weight: bold;"><br></span><span style="font-weight: bold;">
<br>
DHTML Callouts :<br><br>
</span> There is currently basic support for overlibmws. Right
now we are able to create bubble type call outs.<br><br>
In your tcl file ...</p>
<pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"><code>
set onmouseover [ah::bubblecallout -text " Contents of My Popup" ]
</code></pre>
The adp file should have something like this ....<br>
<pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"><code>
&lt;a href="#" \@onmouseover;noquote\@ &gt;Link with Popup&lt;/a&gt;<br>
</code></pre>
<br>
<span style="font-weight: bold;">Drag and Drop Sortables :<br><br>
</span>
Sortables are documented in the scriptaculous wiki
<a href="http://madrobby.github.io/scriptaculous/sortable/">http://madrobby.github.io/scriptaculous/sortable/</a>
.<br>
For sortables to work you will need to define a container which
will hold the elements you want to be sortable.<br>
<br>
Here is what the script looks like<br>
<pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"><code>
append scripts [ah::sortable -element "container" -options "tag:'div',only:'portlet',overlap:'horizontal',constraint:false,ghosting:false"]
</code></pre>
You adp page should contain a div with id attribute container. This
"container" should have subcontainers which the above
script will make sortable.
......@@ -13,7 +13,7 @@
v0.87d<br>
<br>
<span style="font-weight: bold;">Components :</span><br>
Prototype v1.5.1 (<a href="http://prototype.conio.net/" target="_blank">http://prototype.conio.net/</a>)<br>
Prototype v1.5.1 (<a href="http://prototypejs.org/" target="_blank">http://prototypejs.org/</a>)<br>
Scriptaculous v1.7.3 Beta (<a href="http://script.aculo.us/" target="_blank">http://script.aculo.us/</a>)<br>
Overlibmws (<a href="http://www.macridesweb.com/oltest/" target="_blank">http://www.macridesweb.com/oltest/</a>)<br>
......@@ -96,9 +96,9 @@ As of 0.87d, all required sources and stylesheets are loaded automatically using
Prototype</span> has a pair of javascript functions that alllow
programmers to use XMLHTTP. The ajax.updater and ajax.request
functions. See <a
href="http://wiki.script.aculo.us/scriptaculous/show/Ajax.Updater">http://wiki.script.aculo.us/scriptaculous/show/Ajax.Updater</a>
href="http://api.prototypejs.org/ajax/Ajax/Updater/">http://api.prototypejs.org/ajax/Ajax/Updater/</a>
and <a
href="http://wiki.script.aculo.us/scriptaculous/show/Ajax.Request">http://wiki.script.aculo.us/scriptaculous/show/Ajax.Request</a>
href="http://api.prototypejs.org/ajax/Ajax/Request/">http://api.prototypejs.org/ajax/Ajax/Request/</a>
for more information about these javascript functions.<br>
<br>
The Tcl API is used like this<br>
......@@ -153,7 +153,7 @@ has been updated.<br>
</span>Use ah::effects to generate javascript that allows you to
implement transitional and cinematic effects to html elements. You will
need to consult the scriptaculous documentation
<a href="http://wiki.script.aculo.us/scriptaculous/tags/effects" target="_blank">http://wiki.script.aculo.us/scriptaculous/tags/effects</a> to know what
<a href="http://madrobby.github.io/scriptaculous/core-effects/" target="_blank">http://madrobby.github.io/scriptaculous/core-effects/</a> to know what
kinds of
effects and what kinds of options you can pass to the effect script.<br>
<br>
......@@ -185,7 +185,7 @@ In your tcl file ...
<span style="font-weight: bold;">Drag and Drop Sortables :<br>
<br>
</span>Sortables are documented in the scriptaculous wiki <a
href="http://wiki.script.aculo.us/scriptaculous/show/Sortables">http://wiki.script.aculo.us/scriptaculous/show/Sortables.</a><br>
href="http://madrobby.github.io/scriptaculous/sortable/">http://madrobby.github.io/scriptaculous/sortable/</a>.<br>
For sortables to work you will need to define a container which will
hold the elements you want to be sortable.<br>
<br>
......
ad_page_contract {
Add a filter to saved filter view for a list builder list
} {
return_url
return_url:localurl
list_name
{filter_name ""}
{filter_names ""}
......
......@@ -3,7 +3,7 @@ ad_page_contract {
} {
list_name
view_name
return_url
return_url:localurl
parent_id:naturalnum,notnull
}
......
# demonstrates how to create YUI Menu using a properly formatted tcl list
# demonstrates how to create YUI Menu using a properly formatted Tcl list
# Menu 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment