├── .gitignore
├── test
├── unit
│ ├── _ajax_inplaceeditor_ipce_alt_text.html
│ ├── _ajax_inplaceeditor_text.html
│ ├── _ajax_inplaceeditor_result.html
│ ├── _ajax_inplaceeditor_result2.html
│ ├── _ajax_inplaceeditor_tagged.html
│ ├── icon.png
│ ├── _ajax_inplaceeditor_ipce_collection.js
│ ├── _autocomplete_result_nobr.html
│ ├── _autocomplete_result.html
│ ├── _ajax_updater_result.html
│ ├── loading_test.html
│ ├── index.html
│ ├── string_test.html
│ ├── bdd_test.html
│ ├── dragdrop_test.html
│ ├── element_test.html
│ ├── unittest_test.html
│ └── sortable_test.html
├── functional
│ ├── _ajax_inplaceeditor_text.html
│ ├── _ajax_inplaceeditor_result.html
│ ├── icon.png
│ ├── sword.mp3
│ ├── dropmarker.png
│ ├── _autocomplete_result_single.html
│ ├── _autocomplete_result.html
│ ├── sound_test.html
│ ├── effects_grow_strink_test.html
│ ├── effects5b_test.html
│ ├── sortable_nested_test.html
│ ├── dragdrop5_test.html
│ ├── effects_queue_limit_test.html
│ ├── dragdrop9_test.html
│ ├── sortable5_test.html
│ ├── sortable3_test.html
│ ├── dragdrop4_test.html
│ ├── effects_blind_test.html
│ ├── effects_highlight_bg_image.html
│ ├── effects_float_appear_test.html
│ ├── effect_scale_test.html
│ ├── effects2_test.html
│ ├── effects4_test.html
│ ├── ajax_inplacecollectioneditor_test.html
│ ├── effect_shake.html
│ ├── effects3_test.html
│ ├── dragdrop3_test.html
│ ├── dragdrop_delay_test.html
│ ├── effects_random_demo.html
│ ├── effects_queue_test.html
│ ├── effects_toggle_test.html
│ ├── dragdrop6_test.html
│ ├── effect_puff_test.html
│ ├── ajax_autocompleter_test.html
│ ├── effects6_test.html
│ ├── effects_test.html
│ ├── sortable4_test.html
│ ├── effect_direct_test.html
│ ├── dragdrop2_test.html
│ ├── texteffects_test.html
│ ├── sortable6_test.html
│ ├── ajax_autocompleter2_test.html
│ ├── dragdrop_test.html
│ ├── dragdrop8_test.html
│ ├── ajax_inplaceeditor_test.html
│ ├── index.html
│ ├── position_clone_test.html
│ ├── dragdrop7_test.html
│ ├── sortable2_test.html
│ ├── slider_test.html
│ ├── sortable_tree_test.html
│ ├── effects5_test.html
│ └── sortable_test.html
├── run_unit_tests.html
├── run_functional_tests.html
└── test.css
├── CHANGELOG
├── MIT-LICENSE
├── src
├── sound.js
├── scriptaculous.js
├── javascripttest.rb
└── builder.js
├── README.rdoc
└── Rakefile
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
--------------------------------------------------------------------------------
/test/unit/_ajax_inplaceeditor_ipce_alt_text.html:
--------------------------------------------------------------------------------
1 | ntbe
2 |
--------------------------------------------------------------------------------
/test/unit/_ajax_inplaceeditor_text.html:
--------------------------------------------------------------------------------
1 | Text from server
--------------------------------------------------------------------------------
/test/functional/_ajax_inplaceeditor_text.html:
--------------------------------------------------------------------------------
1 | Text from server
--------------------------------------------------------------------------------
/CHANGELOG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qq/scriptaculous/master/CHANGELOG
--------------------------------------------------------------------------------
/test/unit/_ajax_inplaceeditor_result.html:
--------------------------------------------------------------------------------
1 | Server received: To be edited
--------------------------------------------------------------------------------
/test/unit/_ajax_inplaceeditor_result2.html:
--------------------------------------------------------------------------------
1 | New to be edited - edited
2 |
--------------------------------------------------------------------------------
/test/functional/_ajax_inplaceeditor_result.html:
--------------------------------------------------------------------------------
1 | Server received: To be edited
--------------------------------------------------------------------------------
/test/unit/_ajax_inplaceeditor_tagged.html:
--------------------------------------------------------------------------------
1 | New to be edited - edited
2 |
--------------------------------------------------------------------------------
/test/unit/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qq/scriptaculous/master/test/unit/icon.png
--------------------------------------------------------------------------------
/test/functional/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qq/scriptaculous/master/test/functional/icon.png
--------------------------------------------------------------------------------
/test/functional/sword.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qq/scriptaculous/master/test/functional/sword.mp3
--------------------------------------------------------------------------------
/test/functional/dropmarker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qq/scriptaculous/master/test/functional/dropmarker.png
--------------------------------------------------------------------------------
/test/functional/_autocomplete_result_single.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/unit/_ajax_inplaceeditor_ipce_collection.js:
--------------------------------------------------------------------------------
1 | [['foo', 'Foo'], ['bar', 'Bar'], ['ntbe', 'New to be edited'], ['ntbe2', 'New to be edited #2'], ['ntbe3', 'New to be edited #3']]
2 |
--------------------------------------------------------------------------------
/test/unit/_autocomplete_result_nobr.html:
--------------------------------------------------------------------------------
1 | test1 test2 test3 BOLD (GET ME NOT) (GET <ME> INSTEAD)Here we have a link which should work Here we have some international ©∏Á®Äç†∑rß
--------------------------------------------------------------------------------
/test/unit/_autocomplete_result.html:
--------------------------------------------------------------------------------
1 |
2 | test1 test2
3 | test3
4 | BOLD
5 |
6 | (GET ME NOT) (GET <ME> INSTEAD)
7 |
8 | Here we have a link which should work
9 |
10 | Here we have some international ©∏Á®Äç†∑rß
11 |
--------------------------------------------------------------------------------
/test/unit/_ajax_updater_result.html:
--------------------------------------------------------------------------------
1 | Test text
2 |
3 |
8 |
9 | more test text
10 |
11 |
12 |
13 |
14 |
15 | even more test text
16 |
17 | some other test text
20 |
21 |
--------------------------------------------------------------------------------
/test/functional/_autocomplete_result.html:
--------------------------------------------------------------------------------
1 |
2 | test1selectme1 selectme2 test2
3 | test3selectme3
4 | BOLD selectme4boldinselectme
5 |
6 | (GET ME NOT) (GET <ME> INSTEAD)(forselectme!)
7 |
8 | Here we have a link which should work
9 |
--------------------------------------------------------------------------------
/test/run_unit_tests.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 | script.aculo.us Unit Test Runner
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | Heya, 1995!
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/test/run_functional_tests.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 | script.aculo.us functional tests
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | Heya, 1995!
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/test/functional/sound_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us Sound functional test file
6 |
7 |
8 |
9 |
10 |
11 | script.aculo.us Sound test file
12 |
13 | play sound (parallel)
14 |
15 | play sound (overwrite)
16 |
17 | Mute
18 | Enable sounds
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/MIT-LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining
4 | a copy of this software and associated documentation files (the
5 | "Software"), to deal in the Software without restriction, including
6 | without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to
8 | permit persons to whom the Software is furnished to do so, subject to
9 | the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be
12 | included in all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/test/functional/effects_grow_strink_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us Effects functional test file
6 |
7 |
8 |
9 |
10 |
15 |
16 |
17 |
18 | script.aculo.us Effects functional test file
19 |
20 | Effect.Grow/Effect.Shrink
21 |
22 |
23 |
Lorem ipsum dolor sit amet
24 |
25 |
26 |
27 | Grow:
28 | Grow()
29 |
30 |
31 |
32 | Shrink:
33 | Shrink()
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/test/functional/effects5b_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us Effects functional test file
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | script.aculo.us ScrollTo effect (with floats) functional test
16 |
17 | (this test only applies to Firefox)
18 |
19 |
20 |
21 |
top of float
22 |
23 |
scroll to bottom!
24 |
25 |
26 |
27 |
Bottom of Float
28 |
29 | w00t
30 |
31 |
32 |
33 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/test/unit/loading_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us Unit test file
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | script.aculo.us Unit test file
14 |
15 | Test dynamic loading in scriptaculous.js
16 |
17 |
18 |
19 |
20 |
21 |
22 |
40 |
41 |
--------------------------------------------------------------------------------
/test/functional/sortable_nested_test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Nested Sortable element bug
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | COLLEGE AVE
13 |
14 | 625
15 | 617
16 | 601
17 |
18 |
19 |
20 |
21 | Right COLLEGE CT
22 |
23 | 14
24 | 27
25 | 30
26 |
27 |
28 |
29 |
30 |
56 |
57 |
--------------------------------------------------------------------------------
/test/functional/dragdrop5_test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | script.aculo.us Drag and drop functional test file
4 |
5 |
6 |
7 |
8 |
13 |
14 |
15 | script.aculo.us Drag and drop functional test file
16 |
17 | w/o hoverclass
18 |
19 |
20 | ### DROP HERE ###
21 |
22 |
23 |
24 |
25 |
26 |
27 | <-- drag this!
28 |
29 |
30 |
31 | w/ hoverclass
32 |
33 |
34 |
35 | ### DROP HERE ###
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/test/functional/effects_queue_limit_test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | script.aculo.us Effects functional test file
5 |
6 |
7 |
8 |
9 |
16 |
17 |
18 |
19 | script.aculo.us Effects functional test file
20 |
21 | Effect.Queue limit
22 |
23 | up
24 | down
25 |
26 | Do a bit sliding in parallel, with a scoped queue, but I am limited to one : ) so don't try over and over again...
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/test/functional/dragdrop9_test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | Draggable
12 |
13 |
29 |
30 |
31 |
32 |
33 | Good Target
34 |
35 |
36 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/test/functional/sortable5_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us sortable functional test file
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/test/test.css:
--------------------------------------------------------------------------------
1 | body, div, p, h1, h2, h3, ul, ol, span, a, table, td, form, img, li {
2 | font-family: sans-serif;
3 | }
4 |
5 | body {
6 | font-size:0.8em;
7 | }
8 |
9 | .navigation {
10 | background: #9DC569;
11 | color: #fff;
12 | }
13 |
14 | .navigation h1 {
15 | font-size: 20px;
16 | }
17 |
18 | .navigation h2 {
19 | font-size: 16px;
20 | font-weight: normal;
21 | margin: 0;
22 | border: 1px solid #e8a400;
23 | border-bottom: 0;
24 | background: #ffc;
25 | color: #E8A400;
26 | padding: 8px;
27 | padding-bottom: 0;
28 | }
29 |
30 | .navigation ul {
31 | margin-top: 0;
32 | border: 1px solid #E8A400;
33 | border-top: none;
34 | background: #ffc;
35 | padding: 8px;
36 | margin-left: 0;
37 | }
38 |
39 | .navigation ul li {
40 | font-size: 12px;
41 | list-style-type: none;
42 | margin-top: 1px;
43 | margin-bottom: 1px;
44 | color: #555;
45 | }
46 |
47 | .navigation a {
48 | color: #ffc;
49 | }
50 |
51 | .navigation ul li a {
52 | color: #000;
53 | }
54 |
55 | #log {
56 | padding-bottom: 1em;
57 | border-bottom: 2px solid #000;
58 | margin-bottom: 2em;
59 | }
60 |
61 | #logsummary {
62 | margin-bottom: 1em;
63 | padding: 1ex;
64 | border: 1px solid #000;
65 | font-weight: bold;
66 | }
67 |
68 | #logtable {
69 | width:100%;
70 | border-collapse: collapse;
71 | border: 1px dotted #666;
72 | }
73 |
74 | #logtable td, #logtable th {
75 | text-align: left;
76 | padding: 3px 8px;
77 | border: 1px dotted #666;
78 | }
79 |
80 | #logtable .passed {
81 | background-color: #cfc;
82 | }
83 |
84 | #logtable .failed, #logtable .error {
85 | background-color: #fcc;
86 | }
87 |
88 | #logtable .nameCell {
89 | cursor: pointer;
90 | }
--------------------------------------------------------------------------------
/test/functional/sortable3_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us sortable functional test file
6 |
7 |
8 |
9 |
10 |
11 |
14 |
15 |
16 | script.aculo.us Sortable two-lists w/ dropOnEmpty functional test file
17 |
18 |
19 | Hey there! I'm item#1/1
20 | Hey there! I'm item#1/2
21 | Hey there! I'm item#1/3
22 |
23 |
24 |
26 |
27 |
33 |
34 | Serialize sortable1
35 | Serialize sortable2
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/test/functional/dragdrop4_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us Drag and drop functional test file
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | (inside position:relative container)
14 |
script.aculo.us Drag and drop functional test file
15 |
16 |
Draggables/Droppables
17 |
18 |
19 |
Ghosting effect
20 |
21 |
test!
22 |
23 |
24 |
25 |
alert contents of test div
26 |
27 |
28 | Ghost effect
29 |
30 |
31 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/test/functional/effects_blind_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us Effects functional test file
6 |
7 |
8 |
9 |
10 |
15 |
16 |
17 |
18 | script.aculo.us Effects functional test file
19 |
20 | Effect.BlindUp/Effect.BlindDown
21 |
22 |
23 | Lorem ipsum dolor sit amet
24 |
25 | test!
26 | test!
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 | Lorem ipsum dolor sit amet
39 |
40 | test!
41 | test!
42 |
43 | Lorem ipsum dolor sit amet
44 |
45 | test!
46 | test!
47 |
48 | Lorem ipsum dolor sit amet
49 |
50 | test!
51 | test!
52 |
53 |
54 |
55 |
56 | BlindDown()
57 |
58 |
59 |
60 | BlindUp()
61 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/test/functional/effects_highlight_bg_image.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
32 |
40 |
41 |
42 | Test of keepBackgroundImage parameter for Effect.Highlight. Click items to show effect.
43 | With the keepBackgroundImage parameter.
44 |
45 | One
46 | Two
47 | Three
48 |
49 |
50 | Without the parameter.
51 |
52 | One
53 | Two
54 | Three
55 |
56 |
57 |
--------------------------------------------------------------------------------
/test/functional/effects_float_appear_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us Effects functional test file
6 |
7 |
8 |
9 |
10 |
11 |
12 | script.aculo.us functional test file
13 |
14 | See if workaround for Safari and floating elements with Effect.Appear works.
15 |
16 |
17 | float:left |
18 | float:right |
19 | float:right (setOpacity 1) |
20 | image (non-floating) |
21 | image (floating) |
22 | image (setOpacity 1)
23 |
24 |
25 |
26 |
27 | Lorem ipsum dolor sit amet,
28 | consectetur adipisicing elit,
29 | sed do eiusmod tempor incididunt
30 | ut labore et dolore magna aliqua.
31 |
32 |
33 |
34 | Lorem ipsum dolor sit amet,
35 | consectetur adipisicing elit,
36 | sed do eiusmod tempor incididunt
37 | ut labore et dolore magna aliqua.
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/src/sound.js:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
2 | //
3 | // Based on code created by Jules Gravinese (http://www.webveteran.com/)
4 | //
5 | // script.aculo.us is freely distributable under the terms of an MIT-style license.
6 | // For details, see the script.aculo.us web site: http://script.aculo.us/
7 |
8 | Sound = {
9 | tracks: {},
10 | _enabled: true,
11 | template:
12 | new Template(' '),
13 | enable: function(){
14 | Sound._enabled = true;
15 | },
16 | disable: function(){
17 | Sound._enabled = false;
18 | },
19 | play: function(url){
20 | if(!Sound._enabled) return;
21 | var options = Object.extend({
22 | track: 'global', url: url, replace: false
23 | }, arguments[1] || {});
24 |
25 | if(options.replace && this.tracks[options.track]) {
26 | $R(0, this.tracks[options.track].id).each(function(id){
27 | var sound = $('sound_'+options.track+'_'+id);
28 | sound.Stop && sound.Stop();
29 | sound.remove();
30 | });
31 | this.tracks[options.track] = null;
32 | }
33 |
34 | if(!this.tracks[options.track])
35 | this.tracks[options.track] = { id: 0 };
36 | else
37 | this.tracks[options.track].id++;
38 |
39 | options.id = this.tracks[options.track].id;
40 | $$('body')[0].insert(
41 | Prototype.Browser.IE ? new Element('bgsound',{
42 | id: 'sound_'+options.track+'_'+options.id,
43 | src: options.url, loop: 1, autostart: true
44 | }) : Sound.template.evaluate(options));
45 | }
46 | };
47 |
48 | if(Prototype.Browser.Gecko && navigator.userAgent.indexOf("Win") > 0){
49 | if(navigator.plugins && $A(navigator.plugins).detect(function(p){ return p.name.indexOf('QuickTime') != -1 }))
50 | Sound.template = new Template(' ');
51 | else
52 | Sound.play = function(){};
53 | }
--------------------------------------------------------------------------------
/test/functional/effect_scale_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us Effects functional test file
6 |
7 |
8 |
9 |
10 |
15 |
16 |
17 |
18 | script.aculo.us Effects functional test file
19 |
20 | Scale X only |
21 | Scale Y only |
22 | Scale X and Y
23 |
24 |
25 | Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas enim. Nulla facilisi. Vestibulum accumsan augue vulputate justo. Fusce faucibus. Sed blandit, neque sed lacinia nonummy, diam quam imperdiet justo, at dictum augue nunc a neque. Sed urna lacus, tincidunt at, aliquam id, fringilla id, felis. Vivamus feugiat molestie quam. Sed id dolor. Sed ac purus id sapien sollicitudin ultricies. Aliquam hendrerit orci et odio. Suspendisse volutpat wisi at sem. Integer eget nulla. Duis eu diam a nunc condimentum tempus. Praesent gravida metus vitae massa. Aliquam neque magna, fringilla eu, porta id, interdum sit amet, dui. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin lorem est, ultrices sit amet, condimentum vitae, vehicula a, massa.
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/test/functional/effects2_test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Untitled Document
6 |
31 |
32 |
33 |
34 |
35 |
36 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/test/functional/effects4_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us Effects functional test file
6 |
7 |
8 |
9 |
10 |
15 |
16 |
17 |
18 | script.aculo.us Effects functional test file
19 |
20 | Highlight |
21 | BlindUp |
22 | BlindDown |
23 | SlideUp |
24 | SlideDown
25 |
26 |
27 | Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas enim. Nulla facilisi. Vestibulum accumsan augue vulputate justo. Fusce faucibus. Sed blandit, neque sed lacinia nonummy, diam quam imperdiet justo, at dictum augue nunc a neque. Sed urna lacus, tincidunt at, aliquam id, fringilla id, felis. Vivamus feugiat molestie quam. Sed id dolor. Sed ac purus id sapien sollicitudin ultricies. Aliquam hendrerit orci et odio. Suspendisse volutpat wisi at sem. Integer eget nulla. Duis eu diam a nunc condimentum tempus. Praesent gravida metus vitae massa. Aliquam neque magna, fringilla eu, porta id, interdum sit amet, dui. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin lorem est, ultrices sit amet, condimentum vitae, vehicula a, massa.
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/test/functional/ajax_inplacecollectioneditor_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us Demo
6 |
7 |
8 |
9 |
10 |
13 |
14 |
15 | script.aculo.us Demo
16 |
17 | Demo of the Ajax.InPlaceCollectionEditor.
18 |
19 |
20 | three
(should autoselect "three")
21 |
28 |
29 |
30 | two
(should autoselect "two")
31 |
38 |
39 | three
(should manually select "one")
40 |
48 |
49 | one
(should manually select "two")
50 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/test/functional/effect_shake.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us Effects functional test file
6 |
7 |
8 |
9 |
10 |
11 | script.aculo.us Effect.shake functional test file
12 |
13 | Effect.Shake
14 |
15 |
16 |
17 |
18 | shake
19 | shake 2
20 | shake 30
21 | shake 60
22 |
23 |
28 |
29 | shake these
30 |
31 |
32 |
41 |
42 |
43 | shake 10
44 | shake 20
45 | shake 30
46 |
47 | shake slow
48 | shake fast
49 |
50 | shake 2 slow
51 | shake 60 fast
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/README.rdoc:
--------------------------------------------------------------------------------
1 | == script.aculo.us web 2.0 javascript
2 |
3 | The Web is changing. The 30-year-old terminal-like technology it was originally
4 | is gradually giving way to new ways of doing things. The power of AJAX allows
5 | for rich user interaction without the trouble that has bugged traditional
6 | web applications.
7 |
8 | Building upon the wonderful Prototype JavaScript library, script.aculo.us
9 | provides you with some great additional ingredients to mix in.
10 |
11 | For more information, see http://script.aculo.us/
12 |
13 | == What's new in this release?
14 |
15 | See the CHANGELOG file for information on what's new.
16 |
17 | You can follow http://twitter.com/scriptaculous if you want
18 | to be updated as we fix bugs and add new features.
19 |
20 | == Installation/Usage
21 |
22 | script.aculo.us includes the Prototype JavaScript Framework
23 | V1.6.0. You can use later versions, as they become available
24 | (see http://prototypejs.org/).
25 |
26 | Put prototype.js, and the six files scriptaculous.js,
27 | builder.js, effects.js, dragdrop.js, controls.js and slider.js
28 | in a directory of your website, e.g. /javascripts.
29 |
30 | (The sound.js and unittest.js files are optional)
31 |
32 | Now, you can include the scripts by adding the following
33 | tags to the HEAD section of your HTML pages:
34 |
35 |
36 |
37 |
38 | scriptaculous.js will automatically load the other files of the
39 | script.aculo.us distribution in, provided they are accessible
40 | via the same path.
41 |
42 | See http://wiki.script.aculo.us/scriptaculous/show/Usage for detailed
43 | usage instructions.
44 |
45 | == The distribution
46 |
47 | Besides the script.aculo.us files in src, there's a complete
48 | test tree included which holds functional and unit tests for
49 | script.aculo.us.
50 |
51 | If you need examples on how to implement things, the best place to
52 | start is by opening test/run_functional_tests.html or
53 | test/run_unit_tests.html in your browser, and looking at
54 | the sources of the examples provided.
55 |
56 | == License
57 |
58 | script.aculo.us is licensed under the terms of the MIT License,
59 | see the included MIT-LICENSE file.
--------------------------------------------------------------------------------
/test/functional/effects3_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us Effects functional test file
6 |
7 |
8 |
9 |
10 |
11 |
12 | script.aculo.us Effects functional test file
13 |
14 | Effect.SlideDown/Effect.SlideUp
15 |
16 |
21 |
22 | Start slide down |
23 | Start slide up |
24 | cancel() |
25 | inspect() |
26 | add content
27 |
28 |
29 |
30 | Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas enim. Nulla facilisi. Vestibulum accumsan augue vulputate justo. Fusce faucibus. Sed blandit, neque sed lacinia nonummy, diam quam imperdiet justo, at dictum augue nunc a neque. Sed urna lacus, tincidunt at, aliquam id, fringilla id, felis. Vivamus feugiat molestie quam. Sed id dolor. Sed ac purus id sapien sollicitudin ultricies. Aliquam hendrerit orci et odio. Suspendisse volutpat wisi at sem. Integer eget nulla. Duis eu diam a nunc condimentum tempus. Praesent gravida metus vitae massa. Aliquam neque magna, fringilla eu, porta id, interdum sit amet, dui. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin lorem est, ultrices sit amet, condimentum vitae, vehicula a, massa.
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/test/functional/dragdrop3_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us Drag and drop functional test file
6 |
7 |
8 |
9 |
10 |
14 |
15 |
16 | script.aculo.us Drag and drop functional test file
17 |
18 | Draggables/Droppables
19 |
20 |
77 |
78 |
79 |
80 |
88 |
89 |
90 |
--------------------------------------------------------------------------------
/test/functional/dragdrop_delay_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 | script.aculo.us functional test
8 |
9 |
10 |
11 |
20 |
42 |
43 |
44 |
45 | No delay sortable
46 |
47 |
48 | one
49 |
50 | two
51 |
52 | three
53 |
54 |
55 | Delayed sortable (500 ms)
56 |
57 |
58 | one
59 |
60 | two
61 |
62 | three
63 |
64 |
65 | No delay draggable
66 |
67 |
68 | Lorem ipsum
69 |
70 |
71 | Delayed draggable (1000 ms)
72 |
73 |
74 | Lorem ipsum
75 |
76 |
77 |
83 |
84 |
85 |
--------------------------------------------------------------------------------
/test/functional/effects_random_demo.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us Effects functional test file
6 |
7 |
8 |
9 |
15 |
31 |
32 |
33 | Random effects demo
34 | Start... |
35 | Show/hide log
36 |
37 |
40 |
41 |
44 |
45 |
48 |
49 |
52 |
53 |
56 |
57 |
60 |
61 |
64 |
65 |
68 |
69 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/test/functional/effects_queue_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us Effects functional test file
6 |
7 |
8 |
9 |
10 |
17 |
18 |
19 |
20 | script.aculo.us Effects functional test file
21 |
22 | Effect.Queue
23 |
24 |
25 |
Lorem ipsum dolor sit amet
26 |
27 |
28 |
29 |
Lorem ipsum dolor sit amet
30 |
31 |
32 |
33 |
Lorem ipsum dolor sit amet
34 |
35 |
36 |
39 |
40 |
45 |
46 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/test/functional/effects_toggle_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us Effects functional test file
6 |
7 |
8 |
9 |
10 |
11 |
12 | script.aculo.us Effect.toggle functional test file
13 |
14 | Toggle slide
15 |
16 |
17 | Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas enim. Nulla facilisi. Vestibulum accumsan augue vulputate justo. Fusce faucibus. Sed blandit, neque sed lacinia nonummy, diam quam imperdiet justo, at dictum augue nunc a neque. Sed urna lacus, tincidunt at, aliquam id, fringilla id, felis. Vivamus feugiat molestie quam. Sed id dolor. Sed ac purus id sapien
18 |
19 |
20 | Toggle blind
21 |
22 |
23 | Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas enim. Nulla facilisi. Vestibulum accumsan augue vulputate justo. Fusce faucibus. Sed blandit, neque sed lacinia nonummy, diam quam imperdiet justo, at dictum augue nunc a neque. Sed urna lacus, tincidunt at, aliquam id, fringilla id, felis. Vivamus feugiat molestie quam. Sed id dolor. Sed ac purus id sapien
24 |
25 |
26 |
27 | Toggle appear
28 |
29 |
30 | Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas enim. Nulla facilisi. Vestibulum accumsan augue vulputate justo. Fusce faucibus. Sed blandit, neque sed lacinia nonummy, diam quam imperdiet justo, at dictum augue nunc a neque. Sed urna lacus, tincidunt at, aliquam id, fringilla id, felis. Vivamus feugiat molestie quam. Sed id dolor. Sed ac purus id sapien
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/test/functional/dragdrop6_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us Drag and drop functional test file
6 |
7 |
8 |
9 |
10 |
14 |
15 |
16 | script.aculo.us Drag and drop functional test file
17 |
18 | Draggables/Droppables
19 |
20 |
21 | Normal box
22 |
23 |
24 |
25 | snap: 25
26 |
27 |
28 |
29 | snap: [5,25]
30 |
31 |
32 |
33 | snap: procedural (e.g. constrain to box)
34 |
35 |
36 |
37 |
38 | snap: procedural (e.g. constrain to parent element)
39 |
40 |
41 |
42 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/test/unit/index.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us Unit test file
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | script.aculo.us Unit Tests
15 |
16 |
17 |
18 |
23 |
24 | Documentation
25 |
26 | scriptaculous.js
27 |
30 |
31 | effects.js
32 |
38 |
39 | dragdrop.js
40 |
44 |
45 | builder.js
46 |
49 |
50 | controls.js
51 |
56 |
57 | slider.js
58 |
61 |
62 |
63 | unittest.js
64 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/src/scriptaculous.js:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
2 | //
3 | // Permission is hereby granted, free of charge, to any person obtaining
4 | // a copy of this software and associated documentation files (the
5 | // "Software"), to deal in the Software without restriction, including
6 | // without limitation the rights to use, copy, modify, merge, publish,
7 | // distribute, sublicense, and/or sell copies of the Software, and to
8 | // permit persons to whom the Software is furnished to do so, subject to
9 | // the following conditions:
10 | //
11 | // The above copyright notice and this permission notice shall be
12 | // included in all copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 | //
22 | // For details, see the script.aculo.us web site: http://script.aculo.us/
23 |
24 | var Scriptaculous = {
25 | Version: '1.8.1',
26 | require: function(libraryName) {
27 | // inserting via DOM fails in Safari 2.0, so brute force approach
28 | document.write('
8 |
9 |
10 |
13 |
14 | script.aculo.us Effects functional test file
15 |
16 | Effect.Puff
17 |
18 |
19 | click to test puff, no position set
20 |
21 |
22 |
23 | click to test puff, floats
24 |
25 |
26 |
27 | click to test puff, absolute position set
28 |
29 |
30 | Floating inside a container
31 |
32 |
33 |
34 | click to puff
35 |
36 |
37 | click to puff
38 |
39 |
40 | click to puff
41 |
42 |
43 | click to puff
44 |
45 |
46 | click to puff
47 |
48 |
49 | click to puff
50 |
51 |
52 | click to puff
53 |
54 |
55 | click to puff
56 |
57 |
58 | click to puff
59 |
60 |
61 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/test/functional/ajax_autocompleter_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us Autocompleter functional test file
6 |
7 |
8 |
9 |
10 |
13 |
14 |
15 | script.aculo.us Autocompleter functional test file
16 |
17 |
18 | Autocompleter ac1 (updated panel is relative, so no overlapping should occur):
19 |
20 |
21 |
26 |
27 |
28 |
29 | Autocompleter ac2 w/ parameters:
30 |
31 |
32 |
33 |
38 |
39 |
40 |
41 | Autocompleter ac3 (nested in postion:relative div, selects "selectme" class):
42 |
43 |
47 |
48 |
53 |
54 | First Item Second Item Third Item
55 |
56 |
57 | Autocompleter ac4 (autoselects option if single single option is returned):
58 |
59 |
60 |
61 |
62 |
67 |
68 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/test/functional/effects6_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us Effects functional test file
6 |
7 |
8 |
9 |
10 |
11 |
12 | script.aculo.us Fade/Appear effect functional test
13 | Note: these tests use the browser default CSS style rules.
14 |
15 | DIV
16 | TEST
17 | Effect.Fade |
18 | Effect.Appear
19 |
20 | SPAN
21 | TEST
22 | Effect.Fade |
23 | Effect.Appear
24 |
25 | P
26 | TEST
27 | Effect.Fade |
28 | Effect.Appear
29 |
30 | IMG
31 |
32 | Effect.Fade |
33 | Effect.Appear
34 |
35 |
36 |
37 |
38 | The following elements are not supported with Fade/Appear on all browsers!
39 |
40 | TABLE
41 |
42 | Effect.Fade |
43 | Effect.Appear
44 |
45 | TBODY
46 |
47 | Effect.Fade |
48 | Effect.Appear
49 |
50 | TR
51 |
52 | Effect.Fade |
53 | Effect.Appear
54 |
55 | TD
56 |
57 | Effect.Fade |
58 | Effect.Appear
59 |
60 |
61 |
--------------------------------------------------------------------------------
/test/functional/effects_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us Effects functional test file
6 |
7 |
8 |
9 |
10 |
11 | script.aculo.us Effects functional test file
12 |
13 | Effect.Highlight
14 |
15 |
16 |
17 | asdasd
18 |
19 |
20 |
21 | (highlight to red)
22 |
23 |
24 |
25 |
26 | (highlight to greenish)
27 |
28 |
29 |
30 | (bottom-right-grow)
31 |
32 |
33 |
34 | click to test shake
35 |
36 |
37 |
38 | click to test puff
39 |
40 |
41 | update callbacks: (waiting) -- (waiting)
42 |
43 | show puff div again
44 |
45 | test appear
46 |
47 | appear
48 |
49 |
50 | test grow
51 |
52 | grow
53 |
54 |
55 | test pulsate default times (5)
56 | test pulsate 2 times
57 |
58 | pulsate
59 |
60 |
61 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/test/unit/string_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us Unit test file
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | script.aculo.us Unit test file
14 |
15 | Tests for String.prototype extensions in effects.js
16 |
17 |
18 |
19 |
20 |
21 |
22 |
70 |
71 |
--------------------------------------------------------------------------------
/test/functional/sortable4_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us sortable functional test file
6 |
7 |
8 |
9 |
10 |
11 |
42 |
43 |
44 | script.aculo.us: Two floating sortables with containment and dropOnEmpty
45 |
46 |
47 |
48 |
This is the first list
49 |
50 | Item 1 from first list.
51 | Item 2 from first list.
52 | Item 3 from first list.
53 |
54 |
55 |
56 |
And now the second list
57 |
58 |
59 | DRAG HERE Item 1 from second list.
60 |
61 |
62 | DRAG HERE Item 2 from second list.
63 |
64 |
65 | DRAG HERE Item 3 from second list.
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/test/functional/effect_direct_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us Effects functional test file
6 |
7 |
8 |
9 |
10 |
15 |
16 |
17 |
18 | script.aculo.us Effects functional test file
19 |
20 | Highlight |
21 | BlindUp |
22 | BlindDown |
23 | SlideUp |
24 | SlideDown
25 |
26 |
27 | Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas enim. Nulla facilisi. Vestibulum accumsan augue vulputate justo. Fusce faucibus. Sed blandit, neque sed lacinia nonummy, diam quam imperdiet justo, at dictum augue nunc a neque. Sed urna lacus, tincidunt at, aliquam id, fringilla id, felis. Vivamus feugiat molestie quam. Sed id dolor. Sed ac purus id sapien sollicitudin ultricies. Aliquam hendrerit orci et odio. Suspendisse volutpat wisi at sem. Integer eget nulla. Duis eu diam a nunc condimentum tempus. Praesent gravida metus vitae massa. Aliquam neque magna, fringilla eu, porta id, interdum sit amet, dui. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin lorem est, ultrices sit amet, condimentum vitae, vehicula a, massa.
28 |
29 |
30 |
31 | Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas enim. Nulla facilisi. Vestibulum accumsan augue vulputate justo. Fusce faucibus. Sed blandit, neque sed lacinia nonummy, diam quam imperdiet justo, at dictum augue nunc a neque. Sed urna lacus, tincidunt at, aliquam id, fringilla id, felis. Vivamus feugiat molestie quam. Sed id dolor. Sed ac purus id sapien sollicitudin ultricies. Aliquam hendrerit orci et odio. Suspendisse volutpat wisi at sem. Integer eget nulla. Duis eu diam a nunc condimentum tempus. Praesent gravida metus vitae massa. Aliquam neque magna, fringilla eu, porta id, interdum sit amet, dui. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin lorem est, ultrices sit amet, condimentum vitae, vehicula a, massa.
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/test/functional/dragdrop2_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us Drag and drop functional test file
6 |
7 |
8 |
9 |
10 |
14 |
15 |
16 | script.aculo.us Drag and drop functional test file
17 |
18 | Draggables/Droppables
19 |
20 |
21 | drag here
22 | Revert?
23 |
24 |
25 |
26 | drag here
27 | Revert?
28 | I've onStart, onDrag and onEnd events!
29 |
30 |
31 |
32 |
33 | This box overrides the default endeffect
34 |
35 |
36 |
37 | This box overrides the default starteffect
38 |
39 |
40 |
41 | This box overrides the default end- and starteffects
42 |
43 |
44 | accepts first box
45 | accepts second box
46 |
47 |
82 |
83 |
84 |
85 |
--------------------------------------------------------------------------------
/test/functional/texteffects_test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Text effects tests
5 |
6 |
7 |
10 |
11 |
12 |
13 | Maybe this is useful? Dunno...
14 |
15 | Appear |
16 | Fade |
17 | DropOut |
18 | show H1 innerHTML
19 |
20 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
21 |
22 | THIS IS A WARNING!
23 |
24 | Appear |
25 | Fade |
26 | DropOut
27 |
28 |
29 | 1234567890ABCDEFG
30 |
31 |
32 | Appear |
33 | Fade |
34 | DropOut |
35 | Highlight |
36 | BlindDown
37 |
38 |
45 |
46 |
47 |
48 | Fade all spans on page
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/Rakefile:
--------------------------------------------------------------------------------
1 | #mostly borrowed from the rails Rakefile
2 |
3 | require 'rake'
4 |
5 | PKG_NAME = 'scriptaculous-js'
6 | PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
7 | PKG_TIMESTAMP = Time.new.to_s
8 | PKG_VERSION = '1.8.1' + PKG_BUILD
9 | PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
10 | PKG_DESTINATION = ENV["PKG_DESTINATION"] || "dist"
11 |
12 | RAILS_RAILTIES = (ENV["RAILS_ROOT"] || '../rails-trunk') + '/railties/html/javascripts'
13 | RAILS_ACTIONVIEW = (ENV["RAILS_ROOT"] || '../rails-trunk') + '/actionpack/lib/action_view/helpers/javascripts'
14 |
15 | desc "Default Task"
16 | task :default => [ :clean, :fresh_scriptaculous, :package ]
17 |
18 | task :clean do
19 | rm_rf PKG_DESTINATION
20 | end
21 |
22 | PKG_FILES = FileList[
23 | 'CHANGELOG',
24 | 'README',
25 | 'MIT-LICENSE',
26 | 'lib/prototype.js',
27 | 'test/**/*.html',
28 | 'test/**/*.css',
29 | 'test/**/*.png',
30 | 'test/**/*.mp3'
31 | ]
32 |
33 | SRC_FILES = FileList[
34 | 'src/scriptaculous.js',
35 | 'src/dragdrop.js',
36 | 'src/effects.js',
37 | 'src/controls.js',
38 | 'src/unittest.js',
39 | 'src/builder.js',
40 | 'src/slider.js',
41 | 'src/sound.js',
42 | 'src/unittest.js'
43 | ]
44 |
45 | RAILS_FILES = FileList[
46 | 'src/effects.js',
47 | 'src/dragdrop.js',
48 | 'src/controls.js'
49 | ]
50 |
51 | DIRS = %w( src lib test test/functional test/unit )
52 |
53 | desc "Make a ready-for-packaging distribution dir"
54 | task :fresh_scriptaculous do
55 | mkdir PKG_DESTINATION
56 | mkdir File.join(PKG_DESTINATION, PKG_FILE_NAME)
57 | mkdir_p DIRS.map { |dir| File.join(PKG_DESTINATION, PKG_FILE_NAME, dir) }
58 | PKG_FILES.each { |file| cp file, File.join(PKG_DESTINATION, PKG_FILE_NAME, file) }
59 | SRC_FILES.each do |file|
60 | File.open(File.join(PKG_DESTINATION, PKG_FILE_NAME, file), 'w+') do |dist|
61 | dist << ('// script.aculo.us '+File.basename(file)+' v'+PKG_VERSION+", "+PKG_TIMESTAMP+"\n\n")
62 | dist << File.read(file)
63 | end
64 | end
65 | end
66 |
67 | desc "Packages the fresh script.aculo.us scripts"
68 | task :package do
69 | system %{cd #{PKG_DESTINATION}; tar -czvf #{PKG_FILE_NAME}.tar.gz #{PKG_FILE_NAME}}
70 | system %{cd #{PKG_DESTINATION}; zip -r #{PKG_FILE_NAME}.zip #{PKG_FILE_NAME}}
71 | system %{cd #{PKG_DESTINATION}; tar -c #{PKG_FILE_NAME} | bzip2 --best > #{PKG_FILE_NAME}.tar.bz2 }
72 | end
73 |
74 | desc "Update rails trunk to latest script.aculo.us"
75 | task :update_rails do
76 | RAILS_FILES.each do |file|
77 | cp file, File.join(RAILS_RAILTIES, File.basename(file))
78 | cp file, File.join(RAILS_ACTIONVIEW, File.basename(file))
79 | end
80 | end
81 |
82 | require 'src/javascripttest'
83 | desc "Runs all the JavaScript unit tests and collects the results"
84 | JavaScriptTestTask.new(:unittest) do |t|
85 | t.mount("/lib")
86 | t.mount("/src")
87 | t.mount("/test")
88 |
89 | t.run("/test/unit/loading_test.html")
90 | t.run("/test/unit/unittest_test.html")
91 | t.run("/test/unit/bdd_test.html")
92 | t.run("/test/unit/effects_test.html")
93 | t.run("/test/unit/ajax_autocompleter_test.html")
94 | t.run("/test/unit/ajax_inplaceeditor_test.html")
95 | t.run("/test/unit/slider_test.html")
96 | t.run("/test/unit/string_test.html")
97 | t.run("/test/unit/builder_test.html")
98 | t.run("/test/unit/element_test.html")
99 | t.run("/test/unit/dragdrop_test.html")
100 | t.run("/test/unit/sortable_test.html")
101 | t.run("/test/unit/position_clone_test.html")
102 |
103 | t.browser(:safari)
104 | t.browser(:firefox)
105 | t.browser(:ie)
106 | t.browser(:konqueror)
107 | end
--------------------------------------------------------------------------------
/test/functional/sortable6_test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | script.aculo.us Drag and drop functional test file
4 |
5 |
6 |
7 |
11 |
12 |
13 | script.aculo.us Drag and drop functional test file
14 |
15 | Scroll window down to test autoscrolling inside scrollable elements when window is scrolled
16 |
17 | Draggables/Droppables
18 |
19 |
76 | Some space in between
77 |
134 |
135 |
136 |
137 |
147 |
148 |
--------------------------------------------------------------------------------
/test/functional/ajax_autocompleter2_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us Autocompleter functional test file
6 |
7 |
8 |
9 |
10 |
13 |
14 |
15 | script.aculo.us Autocompleter functional test file
16 |
17 |
18 |
19 | This is an incremental Ajax autocompleter. Type something, then type a comma, than type more. This autocompleter features an indicator.
20 | NOW FETCHING RESULTS
21 | Autocompleter ac1:
22 |
23 |
24 |
25 |
32 |
33 |
34 | Non-incremental Ajax autocompleter.
35 | Autocompleter ac2:
36 |
37 |
38 |
39 |
44 |
45 |
46 | Non-incremental Ajax autocompleter.
47 | Autocompleter ac3:
48 |
49 |
50 |
51 |
56 |
57 |
58 |
59 | Local incremental array autocompleter ac4 with full-search. Type 'Jac', hit enter a few times, type 'gne'.
60 |
61 |
62 |
68 |
69 |
70 | Local incremental array autocompleter ac5 with fixed height and scrollbar. Type 'Jac', hit enter a few times, type 'gne'.
71 |
72 |
73 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/test/functional/dragdrop_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us Drag and drop functional test file
6 |
7 |
8 |
9 |
10 |
15 |
16 |
17 | script.aculo.us Drag and drop functional test file
18 |
19 | Draggables/Droppables
20 |
21 | inspect sortables
22 |
23 |
24 | drag here
25 | (but not here)
26 | Revert?
27 |
28 |
29 |
30 | drag here
31 | Revert?
32 |
33 |
34 | testtest
35 |
36 |
43 |
44 |
45 |
46 |
47 |
48 | Hey there! I'm absolutely positioned
49 | one
50 | two
51 | three
52 |
53 |
54 |
107 |
108 |
109 |
110 |
118 |
119 |
120 |
--------------------------------------------------------------------------------
/test/unit/bdd_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us Unit test file
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | script.aculo.us Unit test file
14 |
15 |
16 |
17 |
18 | initial
19 |
20 |
21 |
149 |
150 |
--------------------------------------------------------------------------------
/test/functional/dragdrop8_test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Drag & Drop
4 |
5 |
45 |
46 |
47 |
48 |
96 |
97 |
98 |
99 | Drag from this table:
100 |
101 |
104 |
105 | one 1 uno
106 | two 2 dos
107 | three 3 tres
108 | four 4 quatro
109 | five 5 cinco
110 | six 6 seis
111 | seven 7 siete
112 | eight 8 ocho
113 | nine 9 nueve
114 | ten 10 diez
115 |
116 |
117 |
118 |
119 |
Drop on this table:
120 |
121 |
124 |
125 | eleven 11 once
126 | twelve 12 doce
127 | thirteen 13 trece
128 | fourteen 14 catorce
129 | fifteen 15 quince
130 | sixteen 16 dieciseis
131 | seventeen 17 diecisiete
132 | eightteen 18 dieciocho
133 | nineteen 19 diecinueve
134 | twenty 20 veinte
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
--------------------------------------------------------------------------------
/test/functional/ajax_inplaceeditor_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us Demo
6 |
7 |
8 |
9 |
10 |
13 |
14 |
15 | script.aculo.us Demo
16 |
17 | Demo of the Ajax.InPlaceEditor.
18 |
19 |
20 | To be edited
21 |
26 |
27 | To be edited w/ blur
28 |
34 |
35 | To be edited w/ okLink and cancelButton
36 |
49 |
50 | To be edited w/ okLink only
51 |
64 |
65 |
66 | With external edit control and custom parameter name edit
67 |
74 |
75 |
76 |
77 |
78 | test
79 | edit
80 |
81 |
82 |
83 |
84 |
89 |
90 | Multi row editor: Lorum ipsum lorum ipsum lorum ipsum lorum ipsum lorum ipsum lorum ipsum lorum ipsum lorum ipsum lorum ipsum lorum ipsum lorum ipsum lorum ipsum lorum ipsum lorum ipsum lorum ipsum lorum ipsum lorum ipsum
91 |
97 |
98 | Loads text from server
99 |
105 |
106 |
107 |
108 |
109 |
110 | Editor very far down to test scrolling bug
111 |
114 |
115 |
116 |
--------------------------------------------------------------------------------
/src/javascripttest.rb:
--------------------------------------------------------------------------------
1 | require 'rake/tasklib'
2 | require 'thread'
3 | require 'webrick'
4 |
5 | class Browser
6 | def supported?; true; end
7 | def setup ; end
8 | def open(url) ; end
9 | def teardown ; end
10 |
11 | def host
12 | require 'rbconfig'
13 | Config::CONFIG['host']
14 | end
15 |
16 | def macos?
17 | host.include?('darwin')
18 | end
19 |
20 | def windows?
21 | host.include?('mswin')
22 | end
23 |
24 | def linux?
25 | host.include?('linux')
26 | end
27 |
28 | def applescript(script)
29 | raise "Can't run AppleScript on #{host}" unless macos?
30 | system "osascript -e '#{script}' 2>&1 >/dev/null"
31 | end
32 | end
33 |
34 | class FirefoxBrowser < Browser
35 | def initialize(path='c:\Program Files\Mozilla Firefox\firefox.exe')
36 | @path = path
37 | end
38 |
39 | def visit(url)
40 | applescript('tell application "Firefox" to Get URL "' + url + '"') if macos?
41 | system("#{@path} #{url}") if windows?
42 | system("firefox #{url}") if linux?
43 | end
44 |
45 | def to_s
46 | "Firefox"
47 | end
48 | end
49 |
50 | class SafariBrowser < Browser
51 | def supported?
52 | macos?
53 | end
54 |
55 | def setup
56 | applescript('tell application "Safari" to make new document')
57 | end
58 |
59 | def visit(url)
60 | applescript('tell application "Safari" to set URL of front document to "' + url + '"')
61 | end
62 |
63 | def teardown
64 | #applescript('tell application "Safari" to close front document')
65 | end
66 |
67 | def to_s
68 | "Safari"
69 | end
70 | end
71 |
72 | class IEBrowser < Browser
73 | def initialize(path='C:\Program Files\Internet Explorer\IEXPLORE.EXE')
74 | @path = path
75 | end
76 |
77 | def setup
78 | if windows?
79 | puts %{
80 | MAJOR ANNOYANCE on Windows.
81 | You have to shut down the Internet Explorer manually after each test
82 | for the script to proceed.
83 | Any suggestions on fixing this is GREATLY appreaciated!
84 | Thank you for your understanding.
85 | }
86 | end
87 | end
88 |
89 | def supported?
90 | windows?
91 | end
92 |
93 | def visit(url)
94 | system("#{@path} #{url}") if windows?
95 | end
96 |
97 | def to_s
98 | "Internet Explorer"
99 | end
100 | end
101 |
102 | class KonquerorBrowser < Browser
103 | def supported?
104 | linux?
105 | end
106 |
107 | def visit(url)
108 | system("kfmclient openURL #{url}")
109 | end
110 |
111 | def to_s
112 | "Konqueror"
113 | end
114 | end
115 |
116 | # shut up, webrick :-)
117 | class ::WEBrick::HTTPServer
118 | def access_log(config, req, res)
119 | # nop
120 | end
121 | end
122 | class ::WEBrick::BasicLog
123 | def log(level, data)
124 | # nop
125 | end
126 | end
127 |
128 | class JavaScriptTestTask < ::Rake::TaskLib
129 |
130 | def initialize(name=:test)
131 | @name = name
132 | @tests = []
133 | @browsers = []
134 |
135 | @queue = Queue.new
136 |
137 | result = []
138 |
139 | @server = WEBrick::HTTPServer.new(:Port => 4711) # TODO: make port configurable
140 | @server.mount_proc("/results") do |req, res|
141 | @queue.push(req.query['result'])
142 | res.body = "OK"
143 | end
144 | yield self if block_given?
145 | define
146 | end
147 |
148 | def define
149 | task @name do
150 | trap("INT") { @server.shutdown }
151 | t = Thread.new { @server.start }
152 |
153 | # run all combinations of browsers and tests
154 | @browsers.each do |browser|
155 | if browser.supported?
156 | browser.setup
157 | @tests.each do |test|
158 | browser.visit("http://localhost:4711#{test}?resultsURL=http://localhost:4711/results&t=" + ("%.6f" % Time.now.to_f))
159 | result = @queue.pop
160 | puts "#{test} on #{browser}: #{result}"
161 | end
162 | browser.teardown
163 | else
164 | puts "Skipping #{browser}, not supported on this OS"
165 | end
166 | browser.teardown
167 | end
168 |
169 | @server.shutdown
170 | t.join
171 | end
172 | end
173 |
174 | def mount(path, dir=nil)
175 | dir = Dir.pwd + path unless dir
176 |
177 | @server.mount(path, WEBrick::HTTPServlet::FileHandler, dir)
178 | end
179 |
180 | # test should be specified as a url
181 | def run(test)
182 | @tests<
3 |
4 |
5 | script.aculo.us functional tests
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | script.aculo.us Functional Tests
15 |
16 |
17 |
18 |
23 |
24 | Documentation
25 |
26 | Effects
27 |
49 |
50 | Controls
51 |
58 |
59 | Drag & Drop
60 |
79 |
80 | Sound (experimental)
81 |
84 |
85 | Miscellaneous
86 |
89 |
90 |
91 |
--------------------------------------------------------------------------------
/src/builder.js:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
2 | //
3 | // script.aculo.us is freely distributable under the terms of an MIT-style license.
4 | // For details, see the script.aculo.us web site: http://script.aculo.us/
5 |
6 | var Builder = {
7 | NODEMAP: {
8 | AREA: 'map',
9 | CAPTION: 'table',
10 | COL: 'table',
11 | COLGROUP: 'table',
12 | LEGEND: 'fieldset',
13 | OPTGROUP: 'select',
14 | OPTION: 'select',
15 | PARAM: 'object',
16 | TBODY: 'table',
17 | TD: 'table',
18 | TFOOT: 'table',
19 | TH: 'table',
20 | THEAD: 'table',
21 | TR: 'table'
22 | },
23 | // note: For Firefox < 1.5, OPTION and OPTGROUP tags are currently broken,
24 | // due to a Firefox bug
25 | node: function(elementName) {
26 | elementName = elementName.toUpperCase();
27 |
28 | // try innerHTML approach
29 | var parentTag = this.NODEMAP[elementName] || 'div';
30 | var parentElement = document.createElement(parentTag);
31 | try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707
32 | parentElement.innerHTML = "<" + elementName + ">" + elementName + ">";
33 | } catch(e) {}
34 | var element = parentElement.firstChild || null;
35 |
36 | // see if browser added wrapping tags
37 | if(element && (element.tagName.toUpperCase() != elementName))
38 | element = element.getElementsByTagName(elementName)[0];
39 |
40 | // fallback to createElement approach
41 | if(!element) element = document.createElement(elementName);
42 |
43 | // abort if nothing could be created
44 | if(!element) return;
45 |
46 | // attributes (or text)
47 | if(arguments[1])
48 | if(this._isStringOrNumber(arguments[1]) ||
49 | (arguments[1] instanceof Array) ||
50 | arguments[1].tagName) {
51 | this._children(element, arguments[1]);
52 | } else {
53 | var attrs = this._attributes(arguments[1]);
54 | if(attrs.length) {
55 | try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707
56 | parentElement.innerHTML = "<" +elementName + " " +
57 | attrs + ">" + elementName + ">";
58 | } catch(e) {}
59 | element = parentElement.firstChild || null;
60 | // workaround firefox 1.0.X bug
61 | if(!element) {
62 | element = document.createElement(elementName);
63 | for(attr in arguments[1])
64 | element[attr == 'class' ? 'className' : attr] = arguments[1][attr];
65 | }
66 | if(element.tagName.toUpperCase() != elementName)
67 | element = parentElement.getElementsByTagName(elementName)[0];
68 | }
69 | }
70 |
71 | // text, or array of children
72 | if(arguments[2])
73 | this._children(element, arguments[2]);
74 |
75 | return $(element);
76 | },
77 | _text: function(text) {
78 | return document.createTextNode(text);
79 | },
80 |
81 | ATTR_MAP: {
82 | 'className': 'class',
83 | 'htmlFor': 'for'
84 | },
85 |
86 | _attributes: function(attributes) {
87 | var attrs = [];
88 | for(attribute in attributes)
89 | attrs.push((attribute in this.ATTR_MAP ? this.ATTR_MAP[attribute] : attribute) +
90 | '="' + attributes[attribute].toString().escapeHTML().gsub(/"/,'"') + '"');
91 | return attrs.join(" ");
92 | },
93 | _children: function(element, children) {
94 | if(children.tagName) {
95 | element.appendChild(children);
96 | return;
97 | }
98 | if(typeof children=='object') { // array can hold nodes and text
99 | children.flatten().each( function(e) {
100 | if(typeof e=='object')
101 | element.appendChild(e);
102 | else
103 | if(Builder._isStringOrNumber(e))
104 | element.appendChild(Builder._text(e));
105 | });
106 | } else
107 | if(Builder._isStringOrNumber(children))
108 | element.appendChild(Builder._text(children));
109 | },
110 | _isStringOrNumber: function(param) {
111 | return(typeof param=='string' || typeof param=='number');
112 | },
113 | build: function(html) {
114 | var element = this.node('div');
115 | $(element).update(html.strip());
116 | return element.down();
117 | },
118 | dump: function(scope) {
119 | if(typeof scope != 'object' && typeof scope != 'function') scope = window; //global scope
120 |
121 | var tags = ("A ABBR ACRONYM ADDRESS APPLET AREA B BASE BASEFONT BDO BIG BLOCKQUOTE BODY " +
122 | "BR BUTTON CAPTION CENTER CITE CODE COL COLGROUP DD DEL DFN DIR DIV DL DT EM FIELDSET " +
123 | "FONT FORM FRAME FRAMESET H1 H2 H3 H4 H5 H6 HEAD HR HTML I IFRAME IMG INPUT INS ISINDEX "+
124 | "KBD LABEL LEGEND LI LINK MAP MENU META NOFRAMES NOSCRIPT OBJECT OL OPTGROUP OPTION P "+
125 | "PARAM PRE Q S SAMP SCRIPT SELECT SMALL SPAN STRIKE STRONG STYLE SUB SUP TABLE TBODY TD "+
126 | "TEXTAREA TFOOT TH THEAD TITLE TR TT U UL VAR").split(/\s+/);
127 |
128 | tags.each( function(tag){
129 | scope[tag] = function() {
130 | return Builder.node.apply(Builder, [tag].concat($A(arguments)));
131 | };
132 | });
133 | }
134 | };
--------------------------------------------------------------------------------
/test/functional/position_clone_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | prototype.js Position.clone functional test
6 |
7 |
8 |
9 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | abs
23 |
24 |
25 |
26 | rel
27 |
28 |
29 |
30 | static
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 | abs-body child
39 |
40 |
41 |
42 | unpositioned p
43 |
44 |
45 |
72 |
73 |
107 |
108 |
114 |
115 |
116 |
117 | !
118 |
119 | !
120 |
121 |
122 |
123 |
124 |
125 |
--------------------------------------------------------------------------------
/test/unit/dragdrop_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us Unit test file
6 |
7 |
8 |
9 |
10 |
11 |
16 |
17 |
18 |
19 | script.aculo.us Unit test file
20 |
21 | Test of drag & drop functions in dragdrop.js
22 |
23 |
24 |
25 |
26 |
27 | p_test
28 | p_test2
29 | p_test3
30 |
31 | droppable_test
32 |
33 | div_test
34 | div_absolute_test
35 | div_absolute_inline_test
36 |
37 |
38 |
droppable_test
39 |
droppable_test
40 |
41 |
42 |
45 |
46 |
47 |
130 |
131 |
132 |
--------------------------------------------------------------------------------
/test/unit/element_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us Unit test file
6 |
7 |
8 |
9 |
10 |
11 |
19 |
20 |
21 | script.aculo.us Unit test file
22 |
23 | Tests for Element extensions in effects.js
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | blah
38 |
39 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
First class
55 |
Second class
56 |
First and Second class
57 |
Third class Nested First class
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
115 |
116 |
--------------------------------------------------------------------------------
/test/unit/unittest_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us Unit test file
6 |
7 |
8 |
9 |
10 |
11 |
17 |
18 |
19 | script.aculo.us Unit test file
20 |
21 | This is a preliminary version mostly for testing the unittest library.
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
36 |
37 |
38 |
39 |
40 | XXXX
41 |
42 | testcss1blah
testcss1
43 |
44 |
45 |
153 |
154 |
--------------------------------------------------------------------------------
/test/functional/dragdrop7_test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
56 |
133 |
151 |
152 |
153 |
154 |
159 |
160 | One
161 | Two
162 | Three
163 | Four
164 | Five
165 | Six
166 | Seven
167 | Eight
168 |
169 |
170 |
171 |
172 |
173 |
174 |
Group 1
175 |
176 |
177 |
178 |
Group 2
179 |
180 |
181 |
182 |
Group 3
183 |
184 |
185 |
186 |
Group 4
187 |
188 |
189 |
190 |
Group 5
191 |
192 |
193 |
194 |
Group 6
195 |
196 |
197 |
198 |
Group 7
199 |
200 |
201 |
202 |
Group 8
203 |
204 |
205 |
206 |
Group 9
207 |
208 |
209 |
210 |
211 |
--------------------------------------------------------------------------------
/test/functional/sortable2_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us Sortable ghosting functional test file
6 |
7 |
8 |
9 |
10 |
11 |
43 |
44 |
45 | script.aculo.us Sortable ghosting functional test file
46 |
47 | Ghosting
48 |
49 |
50 | Lorem ipsum dolor
51 | sit amet
52 | consectetur adipisicing
53 | elit
54 | sed do eiusmod
55 | tempor incididunt
56 | ut labore et dolore
57 | magna aliqua
58 |
59 |
60 | (waiting for onChange)
61 |
62 |
70 |
71 | No ghosting
72 |
73 |
74 | Lorem ipsum dolor
75 | sit amet
76 | consectetur adipisicing
77 | elit
78 | sed do eiusmod
79 | tempor incididunt
80 | ut labore et dolore
81 | magna aliqua
82 |
83 |
84 | (waiting for onChange)
85 |
86 |
94 |
95 | Ghosting (inside position:relative container)
96 |
108 | (waiting for onChange)
109 |
110 |
118 |
119 |
120 | Ghosting (inside position:relative container)
121 |
133 | (waiting for onChange)
134 |
135 |
143 |
144 |
145 |
146 |
147 |
148 |
--------------------------------------------------------------------------------
/test/functional/slider_test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Text effects tests
6 |
7 |
8 |
9 |
10 |
11 | Sliders
12 |
13 | Standard horizontal slider
14 |
15 |
18 |
19 |
20 |
21 | Vertical slider
22 |
23 |
26 |
27 |
28 |
29 | Slider with predefined values [2,4,6,8] and a non-default range [2,15]
30 |
31 |
34 |
35 |
36 |
37 | Slider with multiple handles
38 |
39 |
44 |
45 |
46 |
47 | Slider with multiple handles and predefined values
48 |
49 |
54 |
55 |
56 |
57 | Slider with multiple handles, external controls, handles are restricted (can't be moved prior/after adjacent handles)
58 |
59 |
63 |
64 |
65 | <--
66 | -->
67 |
68 |
69 |
70 | Fun with spans
71 |
72 |
88 |
89 |
90 |
1
91 |
2
92 |
3
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 | Slider with span and [1,10] range (test for #3731)
104 |
105 |
106 |
!
107 |
!
108 |
109 |
110 |
111 |
112 |
113 |
114 |
150 |
151 |
152 |
--------------------------------------------------------------------------------
/test/functional/sortable_tree_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 | Sortable tree test
7 |
8 |
9 |
13 |
14 |
15 |
16 | serialize 1
17 |
18 |
94 |
95 |
100 |
101 |
177 |
178 |
183 |
184 |
185 |
186 |
--------------------------------------------------------------------------------
/test/unit/sortable_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us Unit test file
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | script.aculo.us Unit test file
14 |
15 | Test of sortable functions in dragdrop.js
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | item 1
24 | item 1
25 | item 1
26 | item 1
27 |
28 |
29 |
30 |
31 |
item 4
item 5
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
47 |
48 | item 1
49 | item 1
50 |
53 |
54 | item 1
55 | item 1
56 |
57 |
58 |
59 |
60 |
61 | item 1
62 | item 1
63 |
64 |
65 |
69 |
70 |
71 |
204 |
205 |
206 |
--------------------------------------------------------------------------------
/test/functional/effects5_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us Effects functional test file
6 |
7 |
8 |
9 |
10 |
11 |
12 | script.aculo.us ScrollTo effect functional test
13 |
14 | scroll (slow-mo) down-below... ,
15 | scroll last-heading
16 |
17 | first-heading Heading 2
18 |
19 | item
20 | item
21 | item
22 | item
23 | item
24 | item
25 | item
26 | item
27 | item
28 | item
29 |
30 |
31 | Heading 2
32 |
33 | item
34 | item
35 | item
36 | item
37 | item
38 | item
39 | item
40 | item
41 | item
42 | item
43 |
44 |
45 | Heading 2
46 |
47 | item
48 | item
49 | item
50 | item
51 | item
52 | item
53 | item
54 | item
55 | item
56 | item
57 |
58 |
59 | Heading 2
60 |
61 | item
62 | item
63 | item
64 | item
65 | item
66 | item
67 | item
68 | item
69 | item
70 | item
71 |
72 |
73 | Heading 2
74 |
75 | item
76 | item
77 | item
78 | item
79 | item
80 | item
81 | item
82 | item
83 | item
84 | item
85 |
86 |
87 | Heading 2
88 |
89 | item
90 | item
91 | item
92 | item
93 | item
94 | item
95 | item
96 | item
97 | item
98 | item
99 |
100 |
101 | Heading 2
102 |
103 | item
104 | item
105 | item
106 | item
107 | item
108 | item
109 | item
110 | item
111 | item
112 | item
113 |
114 |
115 | Heading 2
116 |
117 | item
118 | item
119 | item
120 | item
121 | item
122 | item
123 | item
124 | item
125 | item
126 | item
127 |
128 |
129 | Heading 2
130 |
131 | item
132 | item
133 | item
134 | item
135 | item
136 | item
137 | item
138 | item
139 | item
140 | item
141 |
142 |
143 | Heading 2
144 |
145 | item
146 | item
147 | item
148 | item
149 | item
150 | item
151 | item
152 | item
153 | item
154 | item
155 |
156 |
157 | Heading 2
158 |
159 | item
160 | item
161 | item
162 | item
163 | item
164 | item
165 | item
166 | item
167 | item
168 | item
169 |
170 |
171 | Heading 2
172 |
173 | item
174 | item
175 | item
176 | item
177 | item
178 | item
179 | item
180 | item
181 | item
182 | item
183 |
184 |
185 | DOWN BELOW Heading 2
186 |
187 | item
188 | item
189 | item
190 | item
191 | item
192 | item
193 | item
194 | item
195 | item
196 | item
197 |
198 |
199 | scroll...
200 |
201 | Heading 2
202 |
203 | item
204 | item
205 | item
206 | item
207 | item
208 | item
209 | item
210 | item
211 | item
212 | item
213 |
214 |
215 | Heading 2
216 |
217 | item
218 | item
219 | item
220 | item
221 | item
222 | item
223 | item
224 | item
225 | item
226 | item
227 |
228 |
229 | Heading 2
230 |
231 | item
232 | item
233 | item
234 | item
235 | item
236 | item
237 | item
238 | item
239 | item
240 | item
241 |
242 |
243 | Heading 2
244 |
245 | item
246 | item
247 | item
248 | item
249 | item
250 | item
251 | item
252 | item
253 | item
254 | item
255 |
256 |
257 | Heading 2
258 |
259 | item
260 | item
261 | item
262 | item
263 | item
264 | item
265 | item
266 | item
267 | item
268 | item
269 |
270 |
271 | Heading 2
272 |
273 | item
274 | item
275 | item
276 | item
277 | item
278 | item
279 | item
280 | item
281 | item
282 | item
283 |
284 |
285 | Heading 2
286 |
287 | item
288 | item
289 | item
290 | item
291 | item
292 | item
293 | item
294 | item
295 | item
296 | item
297 |
298 |
299 | Heading 2
300 |
301 | item
302 | item
303 | item
304 | item
305 | item
306 | item
307 | item
308 | item
309 | item
310 | item
311 |
312 |
313 | Heading 2
314 |
315 | item
316 | item
317 | item
318 | item
319 | item
320 | item
321 | item
322 | item
323 | item
324 | item
325 |
326 |
327 | Heading 2
328 |
329 | item
330 | item
331 | item
332 | item
333 | item
334 | item
335 | item
336 | item
337 | item
338 | item
339 |
340 |
341 | Heading 2
342 |
343 | item
344 | item
345 | item
346 | item
347 | item
348 | item
349 | item
350 | item
351 | item
352 | item
353 |
354 |
355 | Heading 2
356 |
357 | item
358 | item
359 | item
360 | item
361 | item
362 | item
363 | item
364 | item
365 | item
366 | item
367 |
368 |
369 | Heading 2
370 |
371 | item
372 | item
373 | item
374 | item
375 | item
376 | item
377 | item
378 | item
379 | item
380 | item
381 |
382 |
383 | Heading 2
384 |
385 | item
386 | item
387 | item
388 | item
389 | item
390 | item
391 | item
392 | item
393 | item
394 | item
395 |
396 |
397 | Heading 2
398 |
399 | item
400 | item
401 | item
402 | item
403 | item
404 | item
405 | item
406 | item
407 | item
408 | item
409 |
410 |
411 | Heading 2
412 |
413 | item
414 | item
415 | item
416 | item
417 | item
418 | item
419 | item
420 | item
421 | item
422 | item
423 |
424 |
425 | Heading 2
426 |
427 | item
428 | item
429 | item
430 | item
431 | item
432 | item
433 | item
434 | item
435 | item
436 | item
437 |
438 |
439 | Heading 2
440 |
441 | item
442 | item
443 | item
444 | item
445 | item
446 | item
447 | item
448 | item
449 | item
450 | item
451 |
452 |
453 | Heading 2
454 |
455 | item
456 | item
457 | item
458 | item
459 | item
460 | item
461 | item
462 | item
463 | item
464 | item
465 |
466 |
467 | Heading 2
468 |
469 | item
470 | item
471 | item
472 | item
473 | item
474 | item
475 | item
476 | item
477 | item
478 | item
479 |
480 |
481 |
482 |
483 |
--------------------------------------------------------------------------------
/test/functional/sortable_test.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | script.aculo.us sortable functional test file
6 |
7 |
8 |
9 |
10 |
11 |
23 |
26 |
27 |
28 |
29 | Hey there! I'm item#1
30 | Hey there! I'm item#2
31 | Hey there! I'm item#3
32 |
33 |
34 | Create sortable |
35 | Destroy sortable |
36 | Serialize sortable
37 |
38 |
39 | Hey there! I'm item#1HANDLE
40 | S S S S S S S S
41 | S S S S S S S S
42 | S S S S S S S S
43 | S S S S S S S S
44 | S S S S S S S S
45 | S S S S S S S S
46 | S S S S S S S S
47 | S S S S S S S S
48 | S S S S S S S S
49 | S S S S S S S S
50 | S S S S S S S S
51 | S S S S S S S S
52 | S S S S S S S S
53 | S S S S S S S S
54 | S S S S S S S S
55 | S S S S S S S S
56 | S S S S S S S S
57 |
58 | Hey there! I'm item#2HANDLE
59 | S S S S S S S S
60 | S S S S S S S S
61 | S S S S S S S S
62 | S S S S S S S S
63 | S S S S S S S S
64 | S S S S S S S S
65 | S S S S S S S S
66 | S S S S S S S S
67 | S S S S S S S S
68 | S S S S S S S S
69 | S S S S S S S S
70 | S S S S S S S S
71 | S S S S S S S S
72 | S S S S S S S S
73 | S S S S S S S S
74 | S S S S S S S S
75 | S S S S S S S S
76 |
77 | Hey there! I'm item#3HANDLE
78 | S S S S S S S S
79 | S S S S S S S S
80 | S S S S S S S S
81 | S S S S S S S S
82 | S S S S S S S S
83 | S S S S S S S S
84 | S S S S S S S S
85 | S S S S S S S S
86 | S S S S S S S S
87 | S S S S S S S S
88 | S S S S S S S S
89 | S S S S S S S S
90 | S S S S S S S S
91 | S S S S S S S S
92 | S S S S S S S S
93 | S S S S S S S S
94 | S S S S S S S S
95 |
96 |
97 |
98 | Create sortable |
99 | Destroy sortable |
100 | Serialize sortable
101 |
102 | no calls to onUpdate
103 |
104 |
105 | s1 handle
106 | s2 handle
107 | s3 handle
108 | s4 handle
109 | s5 handle
110 | s6 handle
111 | s7 handle
112 | s8 handle
113 | s9 handle
114 | s10 handle
115 |
116 |
117 |
136 |
137 | 20 times: Init with Preselection |
138 | Init normally
139 |
140 |
141 |
--------------------------------------------------------------------------------