├── .quicklisp-version
├── test-data
└── test-file
├── weblocks-selenium-tests-app
├── pub
│ ├── upload
│ │ └── .gitkeep
│ ├── test-data
│ ├── mod-record
│ │ ├── scripts
│ │ │ ├── datagrid.js.mod
│ │ │ ├── dialog.js.mod
│ │ │ ├── shortcut.js.mod
│ │ │ ├── sound.js.mod
│ │ │ ├── weblocks.js.mod
│ │ │ ├── prototype.js.mod
│ │ │ ├── scriptaculous.js.mod
│ │ │ └── weblocks-debug.js.mod
│ │ ├── stylesheets
│ │ │ ├── datagrid.css.mod
│ │ │ ├── dataseq.css.mod
│ │ │ ├── dialog.css.mod
│ │ │ ├── flash.css.mod
│ │ │ ├── form.css.mod
│ │ │ ├── isearch.css.mod
│ │ │ ├── layout.css.mod
│ │ │ ├── main.css.mod
│ │ │ ├── menu.css.mod
│ │ │ ├── suggest.css.mod
│ │ │ ├── table.css.mod
│ │ │ ├── navigation.css.mod
│ │ │ ├── pagination.css.mod
│ │ │ ├── dataform-import.css.mod
│ │ │ └── datagrid-import.css.mod
│ │ └── test
│ │ │ └── temp-vzn
│ │ │ └── temp.test.mod
│ ├── scripts
│ │ ├── jquery-seq.js
│ │ ├── jquery.ba-bbq.js
│ │ ├── dialog-jquery.js
│ │ ├── jquery.ba-bbq.min.js
│ │ ├── weblocks-jquery.js
│ │ ├── vzn
│ │ │ ├── sound.0.js.gz
│ │ │ ├── datagrid.0.js.gz
│ │ │ ├── dialog.0.js.gz
│ │ │ ├── shortcut.0.js.gz
│ │ │ ├── weblocks.0.js.gz
│ │ │ ├── prototype.0.js.gz
│ │ │ ├── scriptaculous.0.js.gz
│ │ │ ├── weblocks-debug.0.js
│ │ │ ├── sound.0.js
│ │ │ ├── datagrid.0.js
│ │ │ ├── dialog.0.js
│ │ │ ├── shortcut.0.js
│ │ │ └── weblocks.0.js
│ │ ├── weblocks-debug.js
│ │ ├── sound.js
│ │ ├── datagrid.js
│ │ ├── dialog.js
│ │ ├── builder.js
│ │ ├── shortcut.js
│ │ ├── weblocks.js
│ │ └── slider.js
│ ├── stylesheets
│ │ ├── dataform-import.css
│ │ ├── vzn
│ │ │ ├── dataform-import.0.css
│ │ │ ├── datagrid-import.0.css
│ │ │ ├── isearch.0.css
│ │ │ ├── flash.0.css.gz
│ │ │ ├── form.0.css.gz
│ │ │ ├── main.0.css.gz
│ │ │ ├── menu.0.css.gz
│ │ │ ├── table.0.css.gz
│ │ │ ├── datagrid.0.css.gz
│ │ │ ├── dataseq.0.css.gz
│ │ │ ├── dialog.0.css.gz
│ │ │ ├── layout.0.css.gz
│ │ │ ├── navigation.0.css.gz
│ │ │ ├── pagination.0.css.gz
│ │ │ ├── suggest.0.css
│ │ │ ├── table.0.css
│ │ │ ├── flash.0.css
│ │ │ ├── datagrid.0.css
│ │ │ ├── pagination.0.css
│ │ │ ├── menu.0.css
│ │ │ ├── navigation.0.css
│ │ │ ├── dialog.0.css
│ │ │ ├── dataseq.0.css
│ │ │ ├── layout.0.css
│ │ │ ├── form.0.css
│ │ │ └── main.0.css
│ │ ├── datagrid-import.css
│ │ ├── isearch.css
│ │ ├── suggest.css
│ │ ├── debug-toolbar.css
│ │ ├── error-page.css
│ │ ├── table.css
│ │ ├── flash.css
│ │ ├── datagrid.css
│ │ ├── pagination.css
│ │ ├── menu.css
│ │ ├── navigation.css
│ │ ├── dialog.css
│ │ ├── dataseq.css
│ │ ├── layout.css
│ │ ├── form.css
│ │ ├── datalist.css
│ │ └── main.css
│ ├── images
│ │ ├── reset.png
│ │ ├── progress.gif
│ │ ├── dialog
│ │ │ ├── close.gif
│ │ │ ├── question.png
│ │ │ └── information.png
│ │ ├── header
│ │ │ ├── logo.png
│ │ │ ├── background.png
│ │ │ ├── top_left.png
│ │ │ ├── top_right.png
│ │ │ ├── bottom_left.png
│ │ │ └── bottom_right.png
│ │ ├── menu
│ │ │ ├── arrow.png
│ │ │ ├── top_left.png
│ │ │ ├── top_right.png
│ │ │ ├── bottom_left.png
│ │ │ ├── bottom_right.png
│ │ │ ├── selected_arrow.png
│ │ │ ├── top_background.png
│ │ │ └── bottom_background.png
│ │ ├── widget
│ │ │ ├── arrow.png
│ │ │ ├── flash
│ │ │ │ ├── flag.png
│ │ │ │ ├── top_left.png
│ │ │ │ ├── top_right.png
│ │ │ │ ├── bottom_left.png
│ │ │ │ ├── bottom_right.png
│ │ │ │ ├── top_background.png
│ │ │ │ └── bottom_background.png
│ │ │ ├── top_left.png
│ │ │ ├── top_right.png
│ │ │ ├── bottom_left.png
│ │ │ ├── bottom_right.png
│ │ │ ├── top_background.png
│ │ │ ├── bottom_background.png
│ │ │ ├── datagrid
│ │ │ │ ├── up_arrow.png
│ │ │ │ ├── down_arrow.png
│ │ │ │ ├── sort_bg_asc.png
│ │ │ │ └── sort_bg_desc.png
│ │ │ ├── datalist
│ │ │ │ ├── up_arrow.png
│ │ │ │ ├── down_arrow.png
│ │ │ │ ├── up_arrow_link.png
│ │ │ │ └── down_arrow_link.png
│ │ │ ├── table_border_top.png
│ │ │ └── dataseq
│ │ │ │ └── flash
│ │ │ │ ├── bottom_left.png
│ │ │ │ └── bottom_right.png
│ │ ├── page
│ │ │ ├── top_left.png
│ │ │ ├── top_right.png
│ │ │ ├── background.png
│ │ │ ├── bottom_left.png
│ │ │ ├── bottom_right.png
│ │ │ ├── hor_border.png
│ │ │ └── hor_border_bottom.png
│ │ ├── footer
│ │ │ ├── valid-css.png
│ │ │ └── valid-xhtml11.png
│ │ ├── horizontal_line.png
│ │ └── weblocks-alien-small.png
│ └── test
│ │ └── temp-vzn
│ │ ├── temp.test.gz
│ │ └── temp.test
├── data
│ └── .gitignore
├── version.lisp-expr
├── conf
│ └── stores.lisp
├── weblocks-selenium-tests-app.asd
├── weblocks-selenium-tests-app.lisp
└── src
│ └── init-session.lisp
├── start-tests-server
├── .gitmodules
├── package.lisp
├── weblocks-selenium-tests.asd
├── parameters.lisp
├── selenium-server
├── tests-server.sbclrc
├── utils.lisp
├── README.txt
├── weblocks-selenium-tests.lisp
└── license.txt
/.quicklisp-version:
--------------------------------------------------------------------------------
1 | 2013-01-28
2 |
--------------------------------------------------------------------------------
/test-data/test-file:
--------------------------------------------------------------------------------
1 | test-file
2 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/upload/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/data/.gitignore:
--------------------------------------------------------------------------------
1 | *.xml
2 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/test-data:
--------------------------------------------------------------------------------
1 | ../../test-data
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/version.lisp-expr:
--------------------------------------------------------------------------------
1 | "0.0.3"
2 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/mod-record/scripts/datagrid.js.mod:
--------------------------------------------------------------------------------
1 | '(3552480818 . 0)
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/mod-record/scripts/dialog.js.mod:
--------------------------------------------------------------------------------
1 | '(3552480818 . 0)
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/mod-record/scripts/shortcut.js.mod:
--------------------------------------------------------------------------------
1 | '(3552480818 . 0)
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/mod-record/scripts/sound.js.mod:
--------------------------------------------------------------------------------
1 | '(3552480818 . 0)
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/mod-record/scripts/weblocks.js.mod:
--------------------------------------------------------------------------------
1 | '(3552480818 . 0)
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/mod-record/scripts/prototype.js.mod:
--------------------------------------------------------------------------------
1 | '(3552480818 . 0)
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/mod-record/scripts/scriptaculous.js.mod:
--------------------------------------------------------------------------------
1 | '(3552480818 . 0)
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/mod-record/stylesheets/datagrid.css.mod:
--------------------------------------------------------------------------------
1 | '(3552480818 . 0)
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/mod-record/stylesheets/dataseq.css.mod:
--------------------------------------------------------------------------------
1 | '(3552480818 . 0)
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/mod-record/stylesheets/dialog.css.mod:
--------------------------------------------------------------------------------
1 | '(3552480818 . 0)
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/mod-record/stylesheets/flash.css.mod:
--------------------------------------------------------------------------------
1 | '(3552480818 . 0)
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/mod-record/stylesheets/form.css.mod:
--------------------------------------------------------------------------------
1 | '(3552480818 . 0)
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/mod-record/stylesheets/isearch.css.mod:
--------------------------------------------------------------------------------
1 | '(3552480818 . 0)
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/mod-record/stylesheets/layout.css.mod:
--------------------------------------------------------------------------------
1 | '(3552480818 . 0)
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/mod-record/stylesheets/main.css.mod:
--------------------------------------------------------------------------------
1 | '(3552480818 . 0)
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/mod-record/stylesheets/menu.css.mod:
--------------------------------------------------------------------------------
1 | '(3552480818 . 0)
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/mod-record/stylesheets/suggest.css.mod:
--------------------------------------------------------------------------------
1 | '(3552480818 . 0)
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/mod-record/stylesheets/table.css.mod:
--------------------------------------------------------------------------------
1 | '(3552480818 . 0)
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/mod-record/test/temp-vzn/temp.test.mod:
--------------------------------------------------------------------------------
1 | '(3560679831 . 1)
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/scripts/jquery-seq.js:
--------------------------------------------------------------------------------
1 | ../../../jquery-seq/jquery-seq.js
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/mod-record/scripts/weblocks-debug.js.mod:
--------------------------------------------------------------------------------
1 | '(3552480818 . 0)
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/mod-record/stylesheets/navigation.css.mod:
--------------------------------------------------------------------------------
1 | '(3552480818 . 0)
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/mod-record/stylesheets/pagination.css.mod:
--------------------------------------------------------------------------------
1 | '(3552480818 . 0)
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/scripts/jquery.ba-bbq.js:
--------------------------------------------------------------------------------
1 | ../../../jquery-bbq/jquery.ba-bbq.js
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/mod-record/stylesheets/dataform-import.css.mod:
--------------------------------------------------------------------------------
1 | '(3552480818 . 0)
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/mod-record/stylesheets/datagrid-import.css.mod:
--------------------------------------------------------------------------------
1 | '(3552480818 . 0)
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/scripts/dialog-jquery.js:
--------------------------------------------------------------------------------
1 | ../../../weblocks-jquery/dialog-jquery.js
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/scripts/jquery.ba-bbq.min.js:
--------------------------------------------------------------------------------
1 | ../../../jquery-bbq/jquery.ba-bbq.min.js
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/scripts/weblocks-jquery.js:
--------------------------------------------------------------------------------
1 | ../../../weblocks-jquery/weblocks-jquery.js
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/dataform-import.css:
--------------------------------------------------------------------------------
1 |
2 | @import url(/weblocks-common/pub/stylesheets/form.css);
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/vzn/dataform-import.0.css:
--------------------------------------------------------------------------------
1 |
2 | @import url(/pub/stylesheets/vzn/form.0.css);
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/vzn/datagrid-import.0.css:
--------------------------------------------------------------------------------
1 |
2 | @import url(/pub/stylesheets/vzn/table.0.css);
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/datagrid-import.css:
--------------------------------------------------------------------------------
1 |
2 | @import url(/weblocks-common/pub/stylesheets/table.css);
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/isearch.css:
--------------------------------------------------------------------------------
1 |
2 | .isearch input.submit
3 | {
4 | margin-right: 0;
5 | margin-left: 0.5em;
6 | }
7 |
--------------------------------------------------------------------------------
/start-tests-server:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | SWANK_PORT=4005
4 | WEBLOCKS_PORT=5555
5 | sbcl --userinit tests-server.sbclrc $WEBLOCKS_PORT $SWANK_PORT "$*"
6 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/vzn/isearch.0.css:
--------------------------------------------------------------------------------
1 |
2 | .isearch input.submit
3 | {
4 | margin-right: 0;
5 | margin-left: 0.5em;
6 | }
7 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/reset.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/reset.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/progress.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/progress.gif
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/dialog/close.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/dialog/close.gif
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/header/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/header/logo.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/menu/arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/menu/arrow.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/widget/arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/widget/arrow.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/menu/top_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/menu/top_left.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/menu/top_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/menu/top_right.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/page/top_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/page/top_left.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/page/top_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/page/top_right.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/scripts/vzn/sound.0.js.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/scripts/vzn/sound.0.js.gz
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/dialog/question.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/dialog/question.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/footer/valid-css.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/footer/valid-css.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/header/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/header/background.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/header/top_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/header/top_left.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/header/top_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/header/top_right.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/horizontal_line.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/horizontal_line.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/menu/bottom_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/menu/bottom_left.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/menu/bottom_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/menu/bottom_right.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/page/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/page/background.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/page/bottom_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/page/bottom_left.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/page/bottom_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/page/bottom_right.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/page/hor_border.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/page/hor_border.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/widget/flash/flag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/widget/flash/flag.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/widget/top_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/widget/top_left.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/widget/top_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/widget/top_right.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/scripts/vzn/datagrid.0.js.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/scripts/vzn/datagrid.0.js.gz
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/scripts/vzn/dialog.0.js.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/scripts/vzn/dialog.0.js.gz
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/scripts/vzn/shortcut.0.js.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/scripts/vzn/shortcut.0.js.gz
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/scripts/vzn/weblocks.0.js.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/scripts/vzn/weblocks.0.js.gz
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/test/temp-vzn/temp.test.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/test/temp-vzn/temp.test.gz
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/dialog/information.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/dialog/information.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/header/bottom_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/header/bottom_left.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/header/bottom_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/header/bottom_right.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/menu/selected_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/menu/selected_arrow.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/menu/top_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/menu/top_background.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/widget/bottom_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/widget/bottom_left.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/widget/bottom_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/widget/bottom_right.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/scripts/vzn/prototype.0.js.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/scripts/vzn/prototype.0.js.gz
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/vzn/flash.0.css.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/stylesheets/vzn/flash.0.css.gz
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/vzn/form.0.css.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/stylesheets/vzn/form.0.css.gz
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/vzn/main.0.css.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/stylesheets/vzn/main.0.css.gz
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/vzn/menu.0.css.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/stylesheets/vzn/menu.0.css.gz
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/vzn/table.0.css.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/stylesheets/vzn/table.0.css.gz
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/footer/valid-xhtml11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/footer/valid-xhtml11.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/menu/bottom_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/menu/bottom_background.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/page/hor_border_bottom.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/page/hor_border_bottom.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/weblocks-alien-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/weblocks-alien-small.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/widget/flash/top_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/widget/flash/top_left.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/widget/flash/top_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/widget/flash/top_right.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/widget/top_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/widget/top_background.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/scripts/vzn/scriptaculous.0.js.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/scripts/vzn/scriptaculous.0.js.gz
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/vzn/datagrid.0.css.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/stylesheets/vzn/datagrid.0.css.gz
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/vzn/dataseq.0.css.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/stylesheets/vzn/dataseq.0.css.gz
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/vzn/dialog.0.css.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/stylesheets/vzn/dialog.0.css.gz
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/vzn/layout.0.css.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/stylesheets/vzn/layout.0.css.gz
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/widget/bottom_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/widget/bottom_background.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/widget/datagrid/up_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/widget/datagrid/up_arrow.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/widget/datalist/up_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/widget/datalist/up_arrow.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/widget/flash/bottom_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/widget/flash/bottom_left.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/widget/table_border_top.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/widget/table_border_top.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/vzn/navigation.0.css.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/stylesheets/vzn/navigation.0.css.gz
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/vzn/pagination.0.css.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/stylesheets/vzn/pagination.0.css.gz
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/widget/datagrid/down_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/widget/datagrid/down_arrow.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/widget/datagrid/sort_bg_asc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/widget/datagrid/sort_bg_asc.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/widget/datalist/down_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/widget/datalist/down_arrow.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/widget/flash/bottom_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/widget/flash/bottom_right.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/widget/flash/top_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/widget/flash/top_background.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/widget/datagrid/sort_bg_desc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/widget/datagrid/sort_bg_desc.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/widget/datalist/up_arrow_link.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/widget/datalist/up_arrow_link.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/widget/datalist/down_arrow_link.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/widget/datalist/down_arrow_link.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/widget/dataseq/flash/bottom_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/widget/dataseq/flash/bottom_left.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/widget/flash/bottom_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/widget/flash/bottom_background.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/images/widget/dataseq/flash/bottom_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/html/weblocks-selenium-tests-backup/master/weblocks-selenium-tests-app/pub/images/widget/dataseq/flash/bottom_right.png
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/scripts/weblocks-debug.js:
--------------------------------------------------------------------------------
1 |
2 | function onActionFailure(transport) {
3 | document.body.innerHTML=
4 | '
' +
5 | transport.responseText
6 | + '
';
7 | }
8 |
9 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/scripts/vzn/weblocks-debug.0.js:
--------------------------------------------------------------------------------
1 |
2 | function onActionFailure(transport) {
3 | document.body.innerHTML=
4 | '' +
5 | transport.responseText
6 | + '
';
7 | }
8 |
9 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/conf/stores.lisp:
--------------------------------------------------------------------------------
1 |
2 | (in-package :weblocks-selenium-tests-app)
3 |
4 | ;;; Multiple stores may be defined. The last defined store will be the
5 | ;;; default.
6 | (defstore *weblocks-selenium-tests-app-store* :prevalence
7 | (merge-pathnames (make-pathname :directory '(:relative "data"))
8 | (asdf-system-directory :weblocks-selenium-tests-app)))
9 |
10 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/suggest.css:
--------------------------------------------------------------------------------
1 |
2 | div.suggest
3 | {
4 | border: solid 1px;
5 | background-color: #F6FBFD;
6 | }
7 |
8 | div.suggest ul
9 | {
10 | margin: 0;
11 | padding: 0;
12 | }
13 |
14 | div.suggest ul li
15 | {
16 | list-style-type: none;
17 | margin: 0;
18 | padding: 2px;
19 | display: block;
20 | }
21 |
22 | div.suggest ul li.selected
23 | {
24 | background-color: #D8EAF8;
25 | }
26 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/vzn/suggest.0.css:
--------------------------------------------------------------------------------
1 |
2 | div.suggest
3 | {
4 | border: solid 1px;
5 | background-color: #F6FBFD;
6 | }
7 |
8 | div.suggest ul
9 | {
10 | margin: 0;
11 | padding: 0;
12 | }
13 |
14 | div.suggest ul li
15 | {
16 | list-style-type: none;
17 | margin: 0;
18 | padding: 2px;
19 | display: block;
20 | }
21 |
22 | div.suggest ul li.selected
23 | {
24 | background-color: #D8EAF8;
25 | }
26 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "weblocks-jquery"]
2 | path = weblocks-jquery
3 | url = git://github.com/html/weblocks-jquery.git
4 | [submodule "jquery-seq"]
5 | path = jquery-seq
6 | url = git://github.com/html/jquery-seq.git
7 | [submodule "jquery-bbq"]
8 | path = jquery-bbq
9 | url = git://github.com/cowboy/jquery-bbq.git
10 | [submodule ".quicklisp-install"]
11 | path = .quicklisp-install
12 | url = git://github.com/html/quicklisp-app-skeleton.git
13 |
--------------------------------------------------------------------------------
/package.lisp:
--------------------------------------------------------------------------------
1 | ;;;; package.lisp
2 |
3 | (defpackage #:weblocks-selenium-tests
4 | (:use #:cl #:stefil #:selenium)
5 | (:export
6 | :all-tests :deftest :defsuite :in-root-suite :defsuite* :is :in-suite :def-test-suite
7 | :do-click-and-wait
8 | :*site-url* :*site-root-url* :*jquery-site-url*
9 | :*in-selenium-session* :*selenium-browser*
10 | :with-new-or-existing-selenium-session
11 | :with-new-or-existing-selenium-session-on-jquery-site
12 | :require-firefox
13 | :require-google-chrome))
14 |
15 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests.asd:
--------------------------------------------------------------------------------
1 | ;;;; weblocks-selenium-tests.asd
2 |
3 | (asdf:defsystem #:weblocks-selenium-tests
4 | :serial t
5 | :description "Selenium tests suite for weblocks"
6 | :author "Olexiy Zamkoviy "
7 | :version "0.2.1"
8 | :license "LLGPL"
9 | :depends-on (#:stefil #:selenium #:weblocks-selenium-tests-app)
10 | :components
11 | ((:file "package")
12 | (:file "parameters" :depends-on ("package"))
13 | (:file "utils" :depends-on ("parameters"))
14 | (:file "weblocks-selenium-tests" :depends-on ("parameters" "package" "utils"))))
15 |
16 |
--------------------------------------------------------------------------------
/parameters.lisp:
--------------------------------------------------------------------------------
1 | (in-package :weblocks-selenium-tests)
2 |
3 | (setf drakma:*drakma-default-external-format* :utf-8)
4 |
5 | (defparameter *selenium-firefox-browser* "*chrome /usr/local/bin/firefox")
6 | (defparameter *selenium-google-chrome-browser* "*googlechrome /usr/bin/google-chrome")
7 | (defparameter *selenium-browser* *selenium-firefox-browser*)
8 | (defparameter *in-selenium-session* nil)
9 |
10 | (defparameter *site-root-url* "http://localhost:5555/"
11 | ;"http://me:5555/"
12 | )
13 | (defparameter *jquery-site-url* "http://localhost:5555/jquery")
14 | (defparameter *site-url* *site-root-url*)
15 |
16 | (selenium::define-iedoc
17 | #.(merge-pathnames "misc/iedoc.xml" *compile-file-pathname*))
18 |
--------------------------------------------------------------------------------
/selenium-server:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | SELENIUM_DIR="misc"
3 | if [ \! -f "$SELENIUM_DIR/selenium-server-standalone-2.26.0.jar" ]; then
4 | (cd "$SELENIUM_DIR" && wget "http://selenium.googlecode.com/files/selenium-server-standalone-2.26.0.jar")
5 | fi
6 |
7 | if [ -f "$SELENIUM_DIR/chromedriver" ]; then
8 | java -jar "$SELENIUM_DIR/selenium-server-standalone-2.26.0.jar" -Dwebdriver.chrome.driver="$SELENIUM_DIR/chromedriver" -Dwebdriver.chrome.switches="--disable-web-security"
9 | else
10 | echo -e "\033[31m!!! Starting without chromedriver support,
11 | !!! for google-chrome browser support go to http://code.google.com/p/chromedriver/,
12 | !!! download release and put chromedriver into misc/ directory.
13 | !!! After that restart $0 \e[00m"
14 | echo ""
15 | java -jar "$SELENIUM_DIR/selenium-server-standalone-2.26.0.jar"
16 | fi
17 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/weblocks-selenium-tests-app.asd:
--------------------------------------------------------------------------------
1 | ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
2 | (defpackage #:weblocks-selenium-tests-app-asd
3 | (:use :cl :asdf))
4 |
5 | (in-package :weblocks-selenium-tests-app-asd)
6 |
7 | (defsystem weblocks-selenium-tests-app
8 | :name "weblocks-selenium-tests-app"
9 | :version (:read-file-from "version.lisp-expr")
10 | :maintainer "Olexiy Zamkoviy"
11 | :author "Olexiy Zamkoviy"
12 | :licence "LLGPL"
13 | :description "App which demonstrates weblocks components and is used for weblocks selenium tests"
14 | :depends-on (:weblocks)
15 | :components ((:file "weblocks-selenium-tests-app")
16 | (:module conf
17 | :components ((:file "stores"))
18 | :depends-on ("weblocks-selenium-tests-app"))
19 | (:module src
20 | :components ((:file "init-session"))
21 | :depends-on ("weblocks-selenium-tests-app" conf))))
22 |
23 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/debug-toolbar.css:
--------------------------------------------------------------------------------
1 |
2 | .debug-toolbar
3 | {
4 | background-color: #d0d0d0;
5 | border-top: #f5f5f5 1px solid;
6 |
7 | width: 100%;
8 | text-align: left;
9 | }
10 |
11 | /* 'position: fixed' for all modern browsers */
12 | body > .debug-toolbar
13 | {
14 | position: fixed;
15 | left: 0;
16 | bottom: 0;
17 | }
18 |
19 | /* IE 6 specific fix for lack of 'position: fixed' implementation */
20 | * html .debug-toolbar
21 | {
22 | position: absolute;
23 | /* in case JS is turned off */
24 | left: 0;
25 | /* in case JS is on */
26 | left: expression((documentElement.scrollLeft) + 'px');
27 | top: expression((documentElement.scrollTop
28 | + (documentElement.clientHeight - this.clientHeight - 1))
29 | + 'px');
30 | width: expression((document.documentElement.clientWidth) + 'px');
31 | }
32 |
33 | .debug-toolbar img
34 | {
35 | border: none;
36 | }
37 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/test/temp-vzn/temp.test:
--------------------------------------------------------------------------------
1 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
--------------------------------------------------------------------------------
/tests-server.sbclrc:
--------------------------------------------------------------------------------
1 | (load ".quicklisp-install/require-quicklisp.lisp")
2 | (push (make-pathname :directory '(:relative "weblocks-selenium-tests-app")) asdf:*central-registry*)
3 | (require :sb-posix)
4 | (setf sb-impl::*default-external-format* :utf-8)
5 | (defvar *port* (parse-integer (nth 1 *posix-argv*)))
6 | (defvar *swank-port* (parse-integer (nth 2 *posix-argv*)))
7 | (load ".quicklisp/setup.lisp")
8 | (ql:quickload :cl-ppcre)
9 | (ql:quickload :weblocks-selenium-tests-app)
10 | (ql:quickload :weblocks-selenium-tests)
11 | (loop for i in (cl-ppcre:split " " (string-trim " " (nth 3 *posix-argv*))) do
12 | (ql:quickload (intern (string-upcase i) "KEYWORD")))
13 |
14 | (weblocks-selenium-tests-app:start-weblocks-selenium-tests-app :port *port*)
15 |
16 | (when (interactive-stream-p *terminal-io*)
17 | (require :sb-aclrepl)
18 | (ql:quickload :linedit)
19 | (funcall (intern "INSTALL-REPL" :linedit) :wrap-current t))
20 |
21 | (swank:create-server :dont-close t)
22 |
23 | (format t "~C[2J~%" #\Esc)
24 |
25 | (format t "Welcome to weblocks~%")
26 | (format t "Weblocks is running on port ~S, and can be access by browsing http://me:~S~%" *port* *port*)
27 | (format t "Please update your hosts file apropriately (add alias \"me\" for 127.0.0.1)~%")
28 | (format t "Swank is running on port ~S~%" *swank-port*)
29 | (format t "Use (quit) to exit REPL")
30 |
31 | (in-package :weblocks-selenium-tests)
32 | (defun quit () (sb-ext:quit))
33 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/error-page.css:
--------------------------------------------------------------------------------
1 | a {
2 | color:#c37;
3 | text-decoration:none;
4 | }
5 |
6 | body {
7 | background-color:#ecf8d7;
8 | width:80%;
9 | max-width:800pt;
10 | margin:auto;
11 | margin-top:4em;
12 | margin-bottom:1em;
13 | font-size:120%;
14 | }
15 |
16 | h1,h2,h3,h4,h5,h6 {
17 | color:#435781;
18 | font-family:sans-serif;
19 | padding-bottom:2mm;
20 | border-bottom:1px solid gray;
21 | }
22 |
23 | h1 img {
24 | vertical-align:text-bottom;
25 | margin-right:0.4ex;
26 | float:right;
27 | }
28 |
29 | h1 {
30 | border-bottom:5px solid #ac2415;
31 | }
32 |
33 | h2 {
34 | margin-top:10mm;
35 | padding:0;
36 | padding-top:1.5mm;
37 | padding-bottom:1mm;
38 | border-bottom:2px solid #ac2415;
39 | }
40 |
41 | tr {
42 | padding-top:10px;
43 | }
44 |
45 | th, td {
46 | padding:5px;
47 | text-align:left;
48 | }
49 |
50 | td {
51 | vertical-align:top;
52 | }
53 |
54 | tr.odd td {
55 | background-color:#eaebc7;
56 | }
57 |
58 | tr.even td {
59 | background-color:#f2ecc5;
60 | }
61 |
62 |
63 | td.frame-number {
64 | text-align:right;
65 |
66 | font-size:1.5em;
67 | font-family:serif;
68 |
69 | color:#555;
70 | }
71 |
72 | td.frame-call {
73 | font-family:monospace;
74 | }
75 |
76 | td.frame-args {
77 | font-family:monospace;
78 | max-width:500px;
79 | }
80 |
81 | .footer {
82 | font-style:italic;
83 | }
84 |
85 | .footer address {
86 | display:inline;
87 | font-style:inherit;
88 | }
89 |
90 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/table.css:
--------------------------------------------------------------------------------
1 |
2 | .table
3 | {
4 | min-width: 42em;
5 | }
6 |
7 | .table table
8 | {
9 | width: 100%;
10 | }
11 |
12 | .table table thead tr th
13 | {
14 | text-align: left;
15 | }
16 |
17 | .table table thead tr th, .table table tbody tr td
18 | {
19 | padding-left: 0.5em;
20 | }
21 |
22 | .table table tbody tr td strong
23 | {
24 | background: #fe4631;
25 | color: white;
26 | font-weight: normal;
27 | }
28 |
29 | .view table tbody tr td
30 | {
31 | border-bottom: 1px solid #dbeac1;
32 | padding-top: 1px;
33 | /* background-image: url(/weblocks-common/pub/images/widget/table_border_top.png);*/
34 | background-repeat: repeat-x;
35 | background-position: top;
36 | }
37 |
38 | /* Hover on table */
39 | .table table tbody tr:hover,
40 | .datagrid table tbody tr.drilled-down,
41 | .table table tr.hover
42 | {
43 | background: #dbeac1;
44 | }
45 |
46 | /* IE specific border behavior (no support for border-spacing) */
47 | .table table
48 | {
49 | border-collapse: collapse;
50 | }
51 |
52 | /* Border behavior for other browsers (can't use border-collapse
53 | because of incosistent behavior between Opera, Mozilla, IE, and
54 | Safari). Note, comment is necessary to hide from IE7. */
55 | .table >/**/table
56 | {
57 | border-spacing: 0;
58 | border-collapse: separate;
59 | }
60 |
61 | /* Safari and WebKit specific caption fix */
62 | html[xmlns*=""] body:last-child .table table caption
63 | {
64 | width: 100%;
65 | }
66 |
67 | @media all and (min-width: 0px)
68 | {
69 | body:not(:root:root) .table table caption
70 | {
71 | width: 100%;
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/vzn/table.0.css:
--------------------------------------------------------------------------------
1 |
2 | .table
3 | {
4 | min-width: 42em;
5 | }
6 |
7 | .table table
8 | {
9 | width: 100%;
10 | }
11 |
12 | .table table thead tr th
13 | {
14 | text-align: left;
15 | }
16 |
17 | .table table thead tr th, .table table tbody tr td
18 | {
19 | padding-left: 0.5em;
20 | }
21 |
22 | .table table tbody tr td strong
23 | {
24 | background: #fe4631;
25 | color: white;
26 | font-weight: normal;
27 | }
28 |
29 | .view table tbody tr td
30 | {
31 | border-bottom: 1px solid #dbeac1;
32 | padding-top: 1px;
33 | /* background-image: url(/weblocks-common/pub/images/widget/table_border_top.png);*/
34 | background-repeat: repeat-x;
35 | background-position: top;
36 | }
37 |
38 | /* Hover on table */
39 | .table table tbody tr:hover,
40 | .datagrid table tbody tr.drilled-down,
41 | .table table tr.hover
42 | {
43 | background: #dbeac1;
44 | }
45 |
46 | /* IE specific border behavior (no support for border-spacing) */
47 | .table table
48 | {
49 | border-collapse: collapse;
50 | }
51 |
52 | /* Border behavior for other browsers (can't use border-collapse
53 | because of incosistent behavior between Opera, Mozilla, IE, and
54 | Safari). Note, comment is necessary to hide from IE7. */
55 | .table >/**/table
56 | {
57 | border-spacing: 0;
58 | border-collapse: separate;
59 | }
60 |
61 | /* Safari and WebKit specific caption fix */
62 | html[xmlns*=""] body:last-child .table table caption
63 | {
64 | width: 100%;
65 | }
66 |
67 | @media all and (min-width: 0px)
68 | {
69 | body:not(:root:root) .table table caption
70 | {
71 | width: 100%;
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/flash.css:
--------------------------------------------------------------------------------
1 |
2 | .flash .view
3 | {
4 | width: 100%;
5 | /* background: #f8e9d8 url(/weblocks-common/pub/images/widget/flash/top_background.png) repeat-x;*/
6 | }
7 |
8 | .flash .view .extra-top-1
9 | {
10 | /* background: url(/weblocks-common/pub/images/widget/flash/top_left.png) no-repeat top left;*/
11 | }
12 |
13 | .flash .view .extra-top-2
14 | {
15 | /* background: url(/weblocks-common/pub/images/widget/flash/top_right.png) no-repeat top right;*/
16 | border-bottom-color: #ead8c2;
17 | }
18 |
19 | .flash .view ul.messages p
20 | {
21 | padding: 0;
22 | margin: 0;
23 | }
24 |
25 | .flash .view ul.messages
26 | {
27 | border-left-color: #ead8c2;
28 | border-right-color: #ead8c2;
29 | }
30 |
31 | .flash .view ul.messages li
32 | {
33 | padding-left: 32px;
34 | min-height: 16px;
35 | border-top-color: #fef9f6;
36 | border-bottom-color: #ead8c2;
37 | list-style-image: none;
38 | /* background: url(/weblocks-common/pub/images/widget/flash/flag.png) no-repeat top left;*/
39 | }
40 |
41 | /* Fake min-height for IE 6 */
42 | * html .flash .view ul.messages li
43 | {
44 | height: 16px;
45 | }
46 |
47 | .flash .view .extra-bottom-1
48 | {
49 | /* background: url(/weblocks-common/pub/images/widget/flash/bottom_background.png) repeat-x top;*/
50 | border-top-color: #fef9f6;
51 | }
52 |
53 | .flash .view .extra-bottom-2
54 | {
55 | /* background: url(/weblocks-common/pub/images/widget/flash/bottom_left.png) no-repeat top left;*/
56 | }
57 |
58 | .flash .view .extra-bottom-3
59 | {
60 | /* background: url(/weblocks-common/pub/images/widget/flash/bottom_right.png) no-repeat top right;*/
61 | }
62 |
63 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/vzn/flash.0.css:
--------------------------------------------------------------------------------
1 |
2 | .flash .view
3 | {
4 | width: 100%;
5 | /* background: #f8e9d8 url(/weblocks-common/pub/images/widget/flash/top_background.png) repeat-x;*/
6 | }
7 |
8 | .flash .view .extra-top-1
9 | {
10 | /* background: url(/weblocks-common/pub/images/widget/flash/top_left.png) no-repeat top left;*/
11 | }
12 |
13 | .flash .view .extra-top-2
14 | {
15 | /* background: url(/weblocks-common/pub/images/widget/flash/top_right.png) no-repeat top right;*/
16 | border-bottom-color: #ead8c2;
17 | }
18 |
19 | .flash .view ul.messages p
20 | {
21 | padding: 0;
22 | margin: 0;
23 | }
24 |
25 | .flash .view ul.messages
26 | {
27 | border-left-color: #ead8c2;
28 | border-right-color: #ead8c2;
29 | }
30 |
31 | .flash .view ul.messages li
32 | {
33 | padding-left: 32px;
34 | min-height: 16px;
35 | border-top-color: #fef9f6;
36 | border-bottom-color: #ead8c2;
37 | list-style-image: none;
38 | /* background: url(/weblocks-common/pub/images/widget/flash/flag.png) no-repeat top left;*/
39 | }
40 |
41 | /* Fake min-height for IE 6 */
42 | * html .flash .view ul.messages li
43 | {
44 | height: 16px;
45 | }
46 |
47 | .flash .view .extra-bottom-1
48 | {
49 | /* background: url(/weblocks-common/pub/images/widget/flash/bottom_background.png) repeat-x top;*/
50 | border-top-color: #fef9f6;
51 | }
52 |
53 | .flash .view .extra-bottom-2
54 | {
55 | /* background: url(/weblocks-common/pub/images/widget/flash/bottom_left.png) no-repeat top left;*/
56 | }
57 |
58 | .flash .view .extra-bottom-3
59 | {
60 | /* background: url(/weblocks-common/pub/images/widget/flash/bottom_right.png) no-repeat top right;*/
61 | }
62 |
63 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/datagrid.css:
--------------------------------------------------------------------------------
1 | /* Body */
2 | .datagrid
3 | {
4 | margin-bottom: 1em;
5 | position: relative;
6 | _height: 1%; /* IE 6 fix */
7 | }
8 |
9 | /* Sorting */
10 | .sort-asc span
11 | {
12 | /* background: url(/weblocks-common/pub/images/widget/datagrid/sort_bg_asc.png) repeat-x bottom;*/
13 | }
14 |
15 | .sort-asc span a
16 | {
17 | /* background: url(/weblocks-common/pub/images/widget/datagrid/up_arrow.png) no-repeat right center;*/
18 | }
19 |
20 | .sort-desc span
21 | {
22 | /* background: url(/weblocks-common/pub/images/widget/datagrid/sort_bg_desc.png) repeat-x top;*/
23 | }
24 |
25 | .sort-desc span a
26 | {
27 | /* background: url(/weblocks-common/pub/images/widget/datagrid/down_arrow.png) no-repeat right center;*/
28 | }
29 |
30 | .sort-asc span a, .sort-desc span a,
31 | .sort-asc span, .sort-desc span
32 | {
33 | display: block;
34 | text-decoration: underline;
35 | }
36 |
37 | /* Selecting */
38 | p.datagrid-select-bar
39 | {
40 | padding: 0;
41 | margin: 0;
42 | font-size: x-small;
43 | position: absolute;
44 | bottom: 0;
45 | left: 0;
46 | }
47 |
48 | p.datagrid-select-bar strong
49 | {
50 | color: gray;
51 | font-family: Garamond, New York, serif;
52 | font-weight: normal;
53 | }
54 |
55 | .datagrid form .select
56 | {
57 | text-align: right;
58 | width: 1em;
59 | }
60 |
61 | .datagrid table tbody tr.drilled-down td.select input
62 | {
63 | visibility: hidden;
64 | }
65 |
66 | .datagrid table tbody tr.drilled-down td.select div
67 | {
68 | /* background: url(/weblocks-common/pub/images/widget/arrow.png) no-repeat center center;*/
69 | }
70 |
71 |
72 | /* We need to adjust margins to properly style pagination and item
73 | operations */
74 | .datagrid .datagrid-body .view.table
75 | {
76 | margin-bottom: 0;
77 | }
78 |
79 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/vzn/datagrid.0.css:
--------------------------------------------------------------------------------
1 | /* Body */
2 | .datagrid
3 | {
4 | margin-bottom: 1em;
5 | position: relative;
6 | _height: 1%; /* IE 6 fix */
7 | }
8 |
9 | /* Sorting */
10 | .sort-asc span
11 | {
12 | /* background: url(/weblocks-common/pub/images/widget/datagrid/sort_bg_asc.png) repeat-x bottom;*/
13 | }
14 |
15 | .sort-asc span a
16 | {
17 | /* background: url(/weblocks-common/pub/images/widget/datagrid/up_arrow.png) no-repeat right center;*/
18 | }
19 |
20 | .sort-desc span
21 | {
22 | /* background: url(/weblocks-common/pub/images/widget/datagrid/sort_bg_desc.png) repeat-x top;*/
23 | }
24 |
25 | .sort-desc span a
26 | {
27 | /* background: url(/weblocks-common/pub/images/widget/datagrid/down_arrow.png) no-repeat right center;*/
28 | }
29 |
30 | .sort-asc span a, .sort-desc span a,
31 | .sort-asc span, .sort-desc span
32 | {
33 | display: block;
34 | text-decoration: underline;
35 | }
36 |
37 | /* Selecting */
38 | p.datagrid-select-bar
39 | {
40 | padding: 0;
41 | margin: 0;
42 | font-size: x-small;
43 | position: absolute;
44 | bottom: 0;
45 | left: 0;
46 | }
47 |
48 | p.datagrid-select-bar strong
49 | {
50 | color: gray;
51 | font-family: Garamond, New York, serif;
52 | font-weight: normal;
53 | }
54 |
55 | .datagrid form .select
56 | {
57 | text-align: right;
58 | width: 1em;
59 | }
60 |
61 | .datagrid table tbody tr.drilled-down td.select input
62 | {
63 | visibility: hidden;
64 | }
65 |
66 | .datagrid table tbody tr.drilled-down td.select div
67 | {
68 | /* background: url(/weblocks-common/pub/images/widget/arrow.png) no-repeat center center;*/
69 | }
70 |
71 |
72 | /* We need to adjust margins to properly style pagination and item
73 | operations */
74 | .datagrid .datagrid-body .view.table
75 | {
76 | margin-bottom: 0;
77 | }
78 |
79 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/pagination.css:
--------------------------------------------------------------------------------
1 |
2 | .pagination .current-page,
3 | .pagination .total-pages
4 | {
5 | font-weight: bolder;
6 | font-size: small;
7 | }
8 |
9 | .pagination .page-info
10 | {
11 | margin-top: 4px;
12 | }
13 |
14 | .pagination .viewing-label
15 | {
16 | display: none;
17 | }
18 |
19 | .pagination form fieldset
20 | {
21 | vertical-align: middle;
22 | }
23 |
24 | .pagination form,
25 | .pagination fieldset
26 | {
27 | display: inline;
28 | border: none;
29 | margin: 0;
30 | padding: 0;
31 | }
32 |
33 | .pagination fieldset
34 | {
35 | margin-left: 0.75em;
36 | }
37 |
38 | .pagination form fieldset input.page-number
39 | {
40 | width: 2em;
41 | margin-right: 0.5em;
42 | }
43 |
44 | /* We need to increate input width on Safari */
45 | html[xmlns*=""] body:last-child .pagination form fieldset input.page-number
46 | {
47 | width: 2.5em;
48 | }
49 |
50 | .pagination form fieldset input.item-not-validated
51 | {
52 | border: solid 1px red;
53 | }
54 |
55 | .pagination div.extra-top-1,
56 | .pagination div.extra-top-2,
57 | .pagination div.extra-top-3,
58 | .pagination div.extra-bottom-1,
59 | .pagination div.extra-bottom-2,
60 | .pagination div.extra-bottom-3
61 | {
62 | display: none;
63 | }
64 |
65 | .pagination form label span
66 | {
67 | color: gray;
68 | }
69 |
70 | /* Fix the vertical alignment issue for IE 6 */
71 | * html .pagination form label span
72 | {
73 | display: inline-block;
74 | padding-bottom: 3px;
75 | }
76 |
77 | /* Fix the vertical alignment issue for IE 7 */
78 | *:first-child+html .pagination form label span
79 | {
80 | display: inline-block;
81 | padding-bottom: 3px;
82 | }
83 |
84 | /* Normalize alignment for all modern browsers (without IE 7) */
85 | html>/**/body .pagination .page-info,
86 | html>/**/body .pagination a
87 | {
88 | vertical-align: middle;
89 | }
90 |
91 | .pagination .total-items
92 | {
93 | display: block;
94 | }
95 |
96 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/vzn/pagination.0.css:
--------------------------------------------------------------------------------
1 |
2 | .pagination .current-page,
3 | .pagination .total-pages
4 | {
5 | font-weight: bolder;
6 | font-size: small;
7 | }
8 |
9 | .pagination .page-info
10 | {
11 | margin-top: 4px;
12 | }
13 |
14 | .pagination .viewing-label
15 | {
16 | display: none;
17 | }
18 |
19 | .pagination form fieldset
20 | {
21 | vertical-align: middle;
22 | }
23 |
24 | .pagination form,
25 | .pagination fieldset
26 | {
27 | display: inline;
28 | border: none;
29 | margin: 0;
30 | padding: 0;
31 | }
32 |
33 | .pagination fieldset
34 | {
35 | margin-left: 0.75em;
36 | }
37 |
38 | .pagination form fieldset input.page-number
39 | {
40 | width: 2em;
41 | margin-right: 0.5em;
42 | }
43 |
44 | /* We need to increate input width on Safari */
45 | html[xmlns*=""] body:last-child .pagination form fieldset input.page-number
46 | {
47 | width: 2.5em;
48 | }
49 |
50 | .pagination form fieldset input.item-not-validated
51 | {
52 | border: solid 1px red;
53 | }
54 |
55 | .pagination div.extra-top-1,
56 | .pagination div.extra-top-2,
57 | .pagination div.extra-top-3,
58 | .pagination div.extra-bottom-1,
59 | .pagination div.extra-bottom-2,
60 | .pagination div.extra-bottom-3
61 | {
62 | display: none;
63 | }
64 |
65 | .pagination form label span
66 | {
67 | color: gray;
68 | }
69 |
70 | /* Fix the vertical alignment issue for IE 6 */
71 | * html .pagination form label span
72 | {
73 | display: inline-block;
74 | padding-bottom: 3px;
75 | }
76 |
77 | /* Fix the vertical alignment issue for IE 7 */
78 | *:first-child+html .pagination form label span
79 | {
80 | display: inline-block;
81 | padding-bottom: 3px;
82 | }
83 |
84 | /* Normalize alignment for all modern browsers (without IE 7) */
85 | html>/**/body .pagination .page-info,
86 | html>/**/body .pagination a
87 | {
88 | vertical-align: middle;
89 | }
90 |
91 | .pagination .total-items
92 | {
93 | display: block;
94 | }
95 |
96 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/menu.css:
--------------------------------------------------------------------------------
1 |
2 | .menu
3 | {
4 | width: 15em;
5 | /* background: #d8eaf8 url(/weblocks-common/pub/images/menu/top_background.png) repeat-x;*/
6 | }
7 |
8 | .menu h1
9 | {
10 | background: #d8eaf8;
11 | }
12 |
13 | .menu .extra-top-1
14 | {
15 | /* background: url(/weblocks-common/pub/images/menu/top_left.png) no-repeat top left;*/
16 | }
17 |
18 | .menu .extra-top-2
19 | {
20 | /* background: url(/weblocks-common/pub/images/menu/top_right.png) no-repeat top right;*/
21 | border-bottom-color: #bfd9ec;
22 | }
23 |
24 | .empty-menu
25 | {
26 | padding-left: 0.5em;
27 | }
28 |
29 | .selected-item
30 | {
31 | color: #606060;
32 | background-color: #bfd9ec;
33 | }
34 |
35 | .menu ul li
36 | {
37 | padding-left: 0;
38 | }
39 |
40 | .menu ul li.selected-item
41 | {
42 | padding-left: 0.5em;
43 | }
44 |
45 | .menu ul li.selected-item span.label
46 | {
47 | /* background: url(/weblocks-common/pub/images/menu/arrow.png) no-repeat center left;*/
48 | padding-left: 1em;
49 | }
50 |
51 | .menu h1, .view .empty-menu, .menu ul li
52 | {
53 | border-top-color: #f6fbfd;
54 | border-bottom-color: #bfd9ec;
55 | }
56 |
57 | .menu h1, .menu .empty-menu, .menu ul
58 | {
59 | border-left-color: #bfd9ec;
60 | border-right-color: #bfd9ec;
61 | }
62 |
63 | .menu .extra-bottom-1
64 | {
65 | /* background: url(/weblocks-common/pub/images/menu/bottom_background.png) repeat-x top;*/
66 | border-top-color: #f6fbfd;
67 | }
68 |
69 | .menu .extra-bottom-2
70 | {
71 | /* background: url(/weblocks-common/pub/images/menu/bottom_left.png) no-repeat top left;*/
72 | }
73 |
74 | .menu .extra-bottom-3
75 | {
76 | /* background: url(/weblocks-common/pub/images/menu/bottom_right.png) no-repeat top right;*/
77 | }
78 |
79 | .menu a
80 | {
81 | display: block;
82 | }
83 |
84 | /* IE 6 and 7 hover hack */
85 | *:first-child+html {} * html {} .menu a
86 | {
87 | height: 1%;
88 | }
89 |
90 | .menu a:hover
91 | {
92 | background-color: #bfd9ec;
93 | }
94 |
95 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/vzn/menu.0.css:
--------------------------------------------------------------------------------
1 |
2 | .menu
3 | {
4 | width: 15em;
5 | /* background: #d8eaf8 url(/weblocks-common/pub/images/menu/top_background.png) repeat-x;*/
6 | }
7 |
8 | .menu h1
9 | {
10 | background: #d8eaf8;
11 | }
12 |
13 | .menu .extra-top-1
14 | {
15 | /* background: url(/weblocks-common/pub/images/menu/top_left.png) no-repeat top left;*/
16 | }
17 |
18 | .menu .extra-top-2
19 | {
20 | /* background: url(/weblocks-common/pub/images/menu/top_right.png) no-repeat top right;*/
21 | border-bottom-color: #bfd9ec;
22 | }
23 |
24 | .empty-menu
25 | {
26 | padding-left: 0.5em;
27 | }
28 |
29 | .selected-item
30 | {
31 | color: #606060;
32 | background-color: #bfd9ec;
33 | }
34 |
35 | .menu ul li
36 | {
37 | padding-left: 0;
38 | }
39 |
40 | .menu ul li.selected-item
41 | {
42 | padding-left: 0.5em;
43 | }
44 |
45 | .menu ul li.selected-item span.label
46 | {
47 | /* background: url(/weblocks-common/pub/images/menu/arrow.png) no-repeat center left;*/
48 | padding-left: 1em;
49 | }
50 |
51 | .menu h1, .view .empty-menu, .menu ul li
52 | {
53 | border-top-color: #f6fbfd;
54 | border-bottom-color: #bfd9ec;
55 | }
56 |
57 | .menu h1, .menu .empty-menu, .menu ul
58 | {
59 | border-left-color: #bfd9ec;
60 | border-right-color: #bfd9ec;
61 | }
62 |
63 | .menu .extra-bottom-1
64 | {
65 | /* background: url(/weblocks-common/pub/images/menu/bottom_background.png) repeat-x top;*/
66 | border-top-color: #f6fbfd;
67 | }
68 |
69 | .menu .extra-bottom-2
70 | {
71 | /* background: url(/weblocks-common/pub/images/menu/bottom_left.png) no-repeat top left;*/
72 | }
73 |
74 | .menu .extra-bottom-3
75 | {
76 | /* background: url(/weblocks-common/pub/images/menu/bottom_right.png) no-repeat top right;*/
77 | }
78 |
79 | .menu a
80 | {
81 | display: block;
82 | }
83 |
84 | /* IE 6 and 7 hover hack */
85 | *:first-child+html {} * html {} .menu a
86 | {
87 | height: 1%;
88 | }
89 |
90 | .menu a:hover
91 | {
92 | background-color: #bfd9ec;
93 | }
94 |
95 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/navigation.css:
--------------------------------------------------------------------------------
1 |
2 | .menu
3 | {
4 | width: 15em;
5 | /* background: #d8eaf8 url(/weblocks-common/pub/images/widget/menu/top_background.png) repeat-x;*/
6 | }
7 |
8 | .menu h1
9 | {
10 | background: #d8eaf8;
11 | }
12 |
13 | .menu .extra-top-1
14 | {
15 | /* background: url(/weblocks-common/pub/images/widget/menu/top_left.png) no-repeat top left;*/
16 | }
17 |
18 | .menu .extra-top-2
19 | {
20 | /* background: url(/weblocks-common/pub/images/widget/menu/top_right.png) no-repeat top right;*/
21 | border-bottom-color: #bfd9ec;
22 | }
23 |
24 | .empty-navigation
25 | {
26 | padding-left: 0.5em;
27 | }
28 |
29 | .selected-item
30 | {
31 | color: #606060;
32 | background-color: #bfd9ec;
33 | }
34 |
35 | .menu ul li
36 | {
37 | padding-left: 0;
38 | }
39 |
40 | .menu ul li.selected-item
41 | {
42 | padding-left: 0.5em;
43 | }
44 |
45 | .menu ul li.selected-item span
46 | {
47 | /* background: url(/weblocks-common/pub/images/widget/menu/arrow.png) no-repeat center left;*/
48 | padding-left: 1em;
49 | }
50 |
51 | .menu h1, .view .empty-navigation, .menu ul li
52 | {
53 | border-top-color: #f6fbfd;
54 | border-bottom-color: #bfd9ec;
55 | }
56 |
57 | .menu h1, .menu .empty-navigation, .menu ul
58 | {
59 | border-left-color: #bfd9ec;
60 | border-right-color: #bfd9ec;
61 | }
62 |
63 | .menu .extra-bottom-1
64 | {
65 | /* background: url(/weblocks-common/pub/images/widget/menu/bottom_background.png) repeat-x top;*/
66 | border-top-color: #f6fbfd;
67 | }
68 |
69 | .menu .extra-bottom-2
70 | {
71 | /* background: url(/weblocks-common/pub/images/widget/menu/bottom_left.png) no-repeat top left;*/
72 | }
73 |
74 | .menu .extra-bottom-3
75 | {
76 | /* background: url(/weblocks-common/pub/images/widget/menu/bottom_right.png) no-repeat top right;*/
77 | }
78 |
79 | .menu a
80 | {
81 | display: block;
82 | }
83 |
84 | /* IE 6 and 7 hover hack */
85 | *:first-child+html {} * html {} .menu a
86 | {
87 | height: 1%;
88 | }
89 |
90 | .menu a:hover
91 | {
92 | background-color: #bfd9ec;
93 | }
94 |
95 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/vzn/navigation.0.css:
--------------------------------------------------------------------------------
1 |
2 | .menu
3 | {
4 | width: 15em;
5 | /* background: #d8eaf8 url(/weblocks-common/pub/images/widget/menu/top_background.png) repeat-x;*/
6 | }
7 |
8 | .menu h1
9 | {
10 | background: #d8eaf8;
11 | }
12 |
13 | .menu .extra-top-1
14 | {
15 | /* background: url(/weblocks-common/pub/images/widget/menu/top_left.png) no-repeat top left;*/
16 | }
17 |
18 | .menu .extra-top-2
19 | {
20 | /* background: url(/weblocks-common/pub/images/widget/menu/top_right.png) no-repeat top right;*/
21 | border-bottom-color: #bfd9ec;
22 | }
23 |
24 | .empty-navigation
25 | {
26 | padding-left: 0.5em;
27 | }
28 |
29 | .selected-item
30 | {
31 | color: #606060;
32 | background-color: #bfd9ec;
33 | }
34 |
35 | .menu ul li
36 | {
37 | padding-left: 0;
38 | }
39 |
40 | .menu ul li.selected-item
41 | {
42 | padding-left: 0.5em;
43 | }
44 |
45 | .menu ul li.selected-item span
46 | {
47 | /* background: url(/weblocks-common/pub/images/widget/menu/arrow.png) no-repeat center left;*/
48 | padding-left: 1em;
49 | }
50 |
51 | .menu h1, .view .empty-navigation, .menu ul li
52 | {
53 | border-top-color: #f6fbfd;
54 | border-bottom-color: #bfd9ec;
55 | }
56 |
57 | .menu h1, .menu .empty-navigation, .menu ul
58 | {
59 | border-left-color: #bfd9ec;
60 | border-right-color: #bfd9ec;
61 | }
62 |
63 | .menu .extra-bottom-1
64 | {
65 | /* background: url(/weblocks-common/pub/images/widget/menu/bottom_background.png) repeat-x top;*/
66 | border-top-color: #f6fbfd;
67 | }
68 |
69 | .menu .extra-bottom-2
70 | {
71 | /* background: url(/weblocks-common/pub/images/widget/menu/bottom_left.png) no-repeat top left;*/
72 | }
73 |
74 | .menu .extra-bottom-3
75 | {
76 | /* background: url(/weblocks-common/pub/images/widget/menu/bottom_right.png) no-repeat top right;*/
77 | }
78 |
79 | .menu a
80 | {
81 | display: block;
82 | }
83 |
84 | /* IE 6 and 7 hover hack */
85 | *:first-child+html {} * html {} .menu a
86 | {
87 | height: 1%;
88 | }
89 |
90 | .menu a:hover
91 | {
92 | background-color: #bfd9ec;
93 | }
94 |
95 |
--------------------------------------------------------------------------------
/utils.lisp:
--------------------------------------------------------------------------------
1 | (in-package :weblocks-selenium-tests)
2 |
3 | (defmacro with-new-or-existing-selenium-session (&body body)
4 | `(progn
5 | (if *in-selenium-session*
6 | (progn
7 | ,@body)
8 | (with-selenium-session
9 | (*selenium-session* *selenium-browser* *site-url*)
10 | (do-open-and-wait *site-url*)
11 | (let ((*in-selenium-session* t))
12 | (do-set-timeout 1000)
13 | ,@body)
14 | (do-test-complete)))))
15 |
16 | (defmacro with-new-or-existing-selenium-session-on-jquery-site (&body body)
17 | `(let ((*site-url* *jquery-site-url*))
18 | (with-new-or-existing-selenium-session ,@body)))
19 |
20 | (defun browser-is-firefox-p ()
21 | (string= *selenium-browser* *selenium-firefox-browser*))
22 |
23 | (defun browser-is-google-chrome-p ()
24 | (string= *selenium-browser* *selenium-google-chrome-browser*))
25 |
26 | (defmacro require-firefox (&body body)
27 | `(if (browser-is-firefox-p)
28 | (progn ,@body)
29 | (warn "Skipping test, browser is not firefox")))
30 |
31 | (defmacro require-google-chrome (&body body)
32 | `(if (browser-is-google-chrome-p)
33 | (progn ,@body)
34 | (warn "Skipping test, browser is not google-chrome")))
35 |
36 | (defun ensure-jquery-loaded-into-document ()
37 | (do-get-eval
38 | (remove #\Newline (format nil "
39 | function addJavascript(jsname,pos, callback){
40 | var th = window.document.getElementsByTagName(pos)[0];
41 | var s = window.document.createElement('script');
42 | s.setAttribute('type','text/javascript');
43 | s.setAttribute('src',jsname);
44 | s.onload = callback;
45 | th.appendChild(s);
46 | }
47 |
48 | addJavascript('~Apub/scripts/jquery-1.8.2.js', 'body', function(){
49 | window.jQuery.noConflict();
50 | }); " *site-root-url*)))
51 | (sleep 1))
52 |
--------------------------------------------------------------------------------
/README.txt:
--------------------------------------------------------------------------------
1 | Tests for different weblocks components and environment for testing external
2 | components/widgets.
3 |
4 | To execute tests do 3 things
5 |
6 | 1. execute selenium-server This will start selenium-server-standalone which will
7 | control browser.
8 | 2. execute start-tests-server This will start weblocks test app and swank. No
9 | packages required to install, all packages must load from .quicklisp directory
10 | 3. execute (all-tests) or (weblocks-selenium-tests:all-tests) either in slime or in
11 | console.
12 |
13 | This package contains environment for tests, selenium tests and two weblocks
14 | applications. Applications are used for rendering widgets needed to be tested with
15 | selenium. They are similar, their main difference is javascript layer, one
16 | application is used for prototype widgets, other is for jquery widgets. You can use
17 | both applications for rendering and testing your own weblocks widgets.
18 |
19 | To add your own tests for your widgets using weblocks-selenium-tests environment you
20 | need 4 things.
21 |
22 | * define page(s) containing demo of widget.
23 | * start tests server with your test package included.
24 | * define test suite(s) for your package
25 | * define tests inside your test suite(s)
26 |
27 | To define new page in demo list use weblocks-selenium-tests-app:define-demo-action
28 | (see function documentation for details).
29 |
30 | To make sure it was defined and to run tests on it, you should tell
31 | weblocks-selenium-tests about it. This is done by running start-tests-server with
32 | test packages as parameters. You should care about loading corresponding .asd files
33 | automatically before starting server (you can use .sbclrc for example or quicklisp
34 | with .quicklisp/local-projects directory).
35 |
36 | To define your own test suite use weblocks-selenium-tests:def-test-suite, it is
37 | similar to stefil:defsuite*. Tests will be defined inside of all-tests suite which is
38 | root for weblocks-selenium-tests.
39 |
40 | You'll need also stefil:deftest and maybe some other stefil functions.
41 |
42 | Other test helpers provided by weblocks-selenium-tests are
43 | with-new-or-existing-selenium-session,
44 | with-new-or-existing-selenium-session-on-jquery-site, require-firefox
45 |
46 | Please refer to stefil or selenium documentation for more information.
47 |
48 |
49 | Package is tested only with sbcl.
50 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/scripts/sound.js:
--------------------------------------------------------------------------------
1 | // script.aculo.us sound.js v1.7.1_beta3, Fri May 25 17:19:41 +0200 2007
2 |
3 | // Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
4 | //
5 | // Based on code created by Jules Gravinese (http://www.webveteran.com/)
6 | //
7 | // script.aculo.us is freely distributable under the terms of an MIT-style license.
8 | // For details, see the script.aculo.us web site: http://script.aculo.us/
9 |
10 | Sound = {
11 | tracks: {},
12 | _enabled: true,
13 | template:
14 | new Template(' '),
15 | enable: function(){
16 | Sound._enabled = true;
17 | },
18 | disable: function(){
19 | Sound._enabled = false;
20 | },
21 | play: function(url){
22 | if(!Sound._enabled) return;
23 | var options = Object.extend({
24 | track: 'global', url: url, replace: false
25 | }, arguments[1] || {});
26 |
27 | if(options.replace && this.tracks[options.track]) {
28 | $R(0, this.tracks[options.track].id).each(function(id){
29 | var sound = $('sound_'+options.track+'_'+id);
30 | sound.Stop && sound.Stop();
31 | sound.remove();
32 | })
33 | this.tracks[options.track] = null;
34 | }
35 |
36 | if(!this.tracks[options.track])
37 | this.tracks[options.track] = { id: 0 }
38 | else
39 | this.tracks[options.track].id++;
40 |
41 | options.id = this.tracks[options.track].id;
42 | if (Prototype.Browser.IE) {
43 | var sound = document.createElement('bgsound');
44 | sound.setAttribute('id','sound_'+options.track+'_'+options.id);
45 | sound.setAttribute('src',options.url);
46 | sound.setAttribute('loop','1');
47 | sound.setAttribute('autostart','true');
48 | $$('body')[0].appendChild(sound);
49 | }
50 | else
51 | new Insertion.Bottom($$('body')[0], Sound.template.evaluate(options));
52 | }
53 | };
54 |
55 | if(Prototype.Browser.Gecko && navigator.userAgent.indexOf("Win") > 0){
56 | if(navigator.plugins && $A(navigator.plugins).detect(function(p){ return p.name.indexOf('QuickTime') != -1 }))
57 | Sound.template = new Template(' ')
58 | else
59 | Sound.play = function(){}
60 | }
61 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/scripts/vzn/sound.0.js:
--------------------------------------------------------------------------------
1 | // script.aculo.us sound.js v1.7.1_beta3, Fri May 25 17:19:41 +0200 2007
2 |
3 | // Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
4 | //
5 | // Based on code created by Jules Gravinese (http://www.webveteran.com/)
6 | //
7 | // script.aculo.us is freely distributable under the terms of an MIT-style license.
8 | // For details, see the script.aculo.us web site: http://script.aculo.us/
9 |
10 | Sound = {
11 | tracks: {},
12 | _enabled: true,
13 | template:
14 | new Template(' '),
15 | enable: function(){
16 | Sound._enabled = true;
17 | },
18 | disable: function(){
19 | Sound._enabled = false;
20 | },
21 | play: function(url){
22 | if(!Sound._enabled) return;
23 | var options = Object.extend({
24 | track: 'global', url: url, replace: false
25 | }, arguments[1] || {});
26 |
27 | if(options.replace && this.tracks[options.track]) {
28 | $R(0, this.tracks[options.track].id).each(function(id){
29 | var sound = $('sound_'+options.track+'_'+id);
30 | sound.Stop && sound.Stop();
31 | sound.remove();
32 | })
33 | this.tracks[options.track] = null;
34 | }
35 |
36 | if(!this.tracks[options.track])
37 | this.tracks[options.track] = { id: 0 }
38 | else
39 | this.tracks[options.track].id++;
40 |
41 | options.id = this.tracks[options.track].id;
42 | if (Prototype.Browser.IE) {
43 | var sound = document.createElement('bgsound');
44 | sound.setAttribute('id','sound_'+options.track+'_'+options.id);
45 | sound.setAttribute('src',options.url);
46 | sound.setAttribute('loop','1');
47 | sound.setAttribute('autostart','true');
48 | $$('body')[0].appendChild(sound);
49 | }
50 | else
51 | new Insertion.Bottom($$('body')[0], Sound.template.evaluate(options));
52 | }
53 | };
54 |
55 | if(Prototype.Browser.Gecko && navigator.userAgent.indexOf("Win") > 0){
56 | if(navigator.plugins && $A(navigator.plugins).detect(function(p){ return p.name.indexOf('QuickTime') != -1 }))
57 | Sound.template = new Template(' ')
58 | else
59 | Sound.play = function(){}
60 | }
61 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/weblocks-selenium-tests-app.lisp:
--------------------------------------------------------------------------------
1 |
2 | (defpackage #:weblocks-selenium-tests-app
3 | (:use :cl :weblocks
4 | :f-underscore :anaphora)
5 | (:import-from :hunchentoot #:header-in
6 | #:set-cookie #:set-cookie* #:cookie-in
7 | #:user-agent #:referer)
8 | (:export :define-demo-action)
9 | (:documentation
10 | "A web app based on Weblocks with weblocks components demonstrations."))
11 |
12 | (in-package :weblocks-selenium-tests-app)
13 |
14 | (export '(start-weblocks-selenium-tests-app stop-weblocks-selenium-tests-app))
15 |
16 | ;; A macro that generates a class or this webapp
17 |
18 | (defwebapp weblocks-selenium-tests-app
19 | :prefix "/"
20 | :description "Weblocks with prototype demo"
21 | :init-user-session 'weblocks-selenium-tests-app::init-user-session-prototype
22 | :autostart nil ;; have to start the app manually
23 | :ignore-default-dependencies nil ;; accept the defaults
24 | :debug t)
25 |
26 | (defwebapp weblocks-with-jquery-selenium-tests-app
27 | :prefix "/jquery"
28 | :description "Weblocks with jquery demo"
29 | :init-user-session 'weblocks-selenium-tests-app::init-user-session-jquery
30 | :autostart nil ;; have to start the app manually
31 | :ignore-default-dependencies t ;; accept the defaults
32 | :debug t
33 | :dependencies (list
34 | (make-instance 'script-dependency :url "/pub/scripts/jquery-1.8.2.js")
35 | (make-instance 'stylesheet-dependency :url "/pub/stylesheets/main.css")
36 | (make-instance 'stylesheet-dependency :url "/pub/stylesheets/layout.css")
37 | (make-instance 'script-dependency :url "/pub/scripts/weblocks-jquery.js")
38 | (make-instance 'script-dependency :url "/pub/scripts/dialog-jquery.js")
39 | (make-instance 'script-dependency :url "/pub/scripts/jquery-seq.js")))
40 |
41 | ;; Top level start & stop scripts
42 |
43 | (defun start-weblocks-selenium-tests-app (&rest args)
44 | "Starts the application by calling 'start-weblocks' with appropriate
45 | arguments."
46 | (apply #'start-weblocks args)
47 | (start-webapp 'weblocks-selenium-tests-app)
48 | (start-webapp 'weblocks-with-jquery-selenium-tests-app))
49 |
50 | (defun stop-weblocks-selenium-tests-app ()
51 | "Stops the application by calling 'stop-weblocks'."
52 | (stop-webapp 'weblocks-selenium-tests-app)
53 | (stop-weblocks))
54 |
55 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests.lisp:
--------------------------------------------------------------------------------
1 | ;;;; weblocks-selenium-tests.lisp
2 |
3 | (in-package #:weblocks-selenium-tests)
4 |
5 | ;;; "weblocks-selenium-tests" goes here. Hacks and glory await!
6 |
7 | (in-root-suite)
8 |
9 | (defsuite* all-tests)
10 |
11 | (defmacro def-test-suite (name-or-name-with-args &optional args &body body)
12 | "Defines test suite inside of all-tests suite"
13 | `(progn
14 | (in-suite all-tests)
15 | (stefil:defsuite* ,name-or-name-with-args ,args ,@body)))
16 |
17 | (deftest uploads-file ()
18 | (require-firefox
19 | (let ((old-files-list (cl-fad:list-directory (weblocks-selenium-tests-app::get-upload-directory)))
20 | (new-files-list))
21 | (with-new-or-existing-selenium-session
22 | (do-click-and-wait "link=File field form presentation")
23 | (do-attach-file "name=file" (format nil "~A/pub/test-data/test-file" (string-right-trim "/" *site-url*)))
24 | (do-click-and-wait "name=submit")
25 | (setf new-files-list (cl-fad:list-directory (weblocks-selenium-tests-app::get-upload-directory)))
26 | (is (= (length new-files-list)
27 | (1+ (length old-files-list))))
28 | (mapcar #'delete-file new-files-list)))))
29 |
30 | (defun sample-dialog-assertions ()
31 | (is (string= "Dialog title" (do-get-text "css=h2.title-text")))
32 | (is (string= "Some dialog content" (do-get-text "css=div.dialog-body p")))
33 | (is (string= "Close dialog" (do-get-text "css=div.dialog-body a"))))
34 |
35 | (deftest shows-dialog ()
36 | (with-new-or-existing-selenium-session
37 | (do-click-and-wait "link=Dialog sample")
38 | (sample-dialog-assertions)
39 | (do-click-and-wait "link=Close dialog")))
40 |
41 | (deftest shows-dialog-after-page-reloading ()
42 | (with-new-or-existing-selenium-session
43 | (do-click-and-wait "link=Dialog sample")
44 | (sample-dialog-assertions)
45 | (do-refresh)
46 | (do-open-and-wait *site-url*)
47 | (sample-dialog-assertions)
48 | (do-click-and-wait "link=Close dialog")))
49 |
50 | (deftest selects-child-navigation-properly ()
51 | (with-new-or-existing-selenium-session
52 | (do-click-and-wait "link=Navigation sample")
53 | (do-click-and-wait "link=Fourth pane (second nested pane)")
54 | (do-click-and-wait "link=First pane")
55 | (do-click-and-wait "link=Fourth pane (second nested pane)")
56 | (ensure-jquery-loaded-into-document)
57 | (is (string=
58 | "true"
59 | (do-get-eval
60 | (ps:ps
61 | (ps:chain
62 | (window.j-query "#second-level-nav-2 li:first")
63 | (has-class "selected-item"))))))))
64 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/dialog.css:
--------------------------------------------------------------------------------
1 |
2 | .graybox
3 | {
4 | position: fixed;
5 | top: 0;
6 | left: 0;
7 | bottom: 0;
8 | right: 0;
9 | background-color: black;
10 | z-index: 500;
11 |
12 | filter: alpha(opacity=30);
13 | -moz-opacity: 0.3;
14 | opacity: 0.3;
15 | }
16 |
17 | /* IE 6 specific fix for lack of 'position: fixed' implementation */
18 | * html .graybox
19 | {
20 | position: absolute;
21 | left: expression(documentElement.scrollLeft + 'px');
22 | top: expression(documentElement.scrollTop + 'px');
23 | width: expression(document.documentElement.clientWidth + 'px');
24 | height: expression(document.documentElement.clientHeight + 'px');
25 | }
26 |
27 | .dialog
28 | {
29 | position: fixed;
30 | _position: absolute; /* Degrade to this in IE for now */
31 | z-index: 725;
32 | min-width:200px;
33 | max-width: 50%;
34 | }
35 |
36 | .dialog-body
37 | {
38 | padding: 1em;
39 | _height: 1%; /* hasLayout */
40 | background-color: white;
41 | }
42 |
43 | /* Style choice dialog */
44 | .choice .dialog-body, .modal .choice
45 | {
46 | /* background: white url(/weblocks-common/pub/images/dialog/question.png) no-repeat 0.5em center;*/
47 | }
48 |
49 | .dialog h2, .modal h2
50 | {
51 | padding: 0;
52 | margin: 0;
53 | text-align: left;
54 | }
55 |
56 | .dialog h1 span, .modal h1 span
57 | {
58 | /* background: url(/weblocks-common/pub/images/horizontal_line.png) repeat-x bottom;*/
59 | display: block;
60 | }
61 |
62 | .dialog h1 span
63 | {
64 | margin-left: 0.5em;
65 | margin-right: 0.5em;
66 | }
67 |
68 | .choice
69 | {
70 | text-align: center;
71 | }
72 |
73 | .choice form, .choice form fieldset, .choice p
74 | {
75 | border: none;
76 | margin: 0;
77 | padding: 0;
78 | }
79 |
80 | .choice p
81 | {
82 | margin-bottom: 1em;
83 | }
84 |
85 | .choice input
86 | {
87 | margin-left: 0.25em;
88 | margin-right: 0.25em;
89 | }
90 |
91 | /* Style information dialog */
92 | .information .dialog-body, .modal .information
93 | {
94 | /* background-image: url(/weblocks-common/pub/images/dialog/information.png);*/
95 | }
96 |
97 | /* Modal interaction */
98 | .modal
99 | {
100 | /* background: url(/weblocks-common/pub/images/horizontal_line.png) repeat-x bottom;*/
101 | padding-bottom: 2px;
102 | }
103 |
104 | .modal h1
105 | {
106 | border: none;
107 | margin: 0;
108 | }
109 |
110 | .modal .choice
111 | {
112 | min-height: 48px;
113 | _height: 48px;
114 | background-position: left center;
115 | padding-top: 1em;
116 | padding-bottom: 1em;
117 | }
118 |
119 | .title-text-cell {
120 | background:white;
121 | border-top:1px solid black;
122 | border-left:1px solid black;
123 | padding:0 5px;
124 | padding-top:3px;
125 | }
126 |
127 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/vzn/dialog.0.css:
--------------------------------------------------------------------------------
1 |
2 | .graybox
3 | {
4 | position: fixed;
5 | top: 0;
6 | left: 0;
7 | bottom: 0;
8 | right: 0;
9 | background-color: black;
10 | z-index: 500;
11 |
12 | filter: alpha(opacity=30);
13 | -moz-opacity: 0.3;
14 | opacity: 0.3;
15 | }
16 |
17 | /* IE 6 specific fix for lack of 'position: fixed' implementation */
18 | * html .graybox
19 | {
20 | position: absolute;
21 | left: expression(documentElement.scrollLeft + 'px');
22 | top: expression(documentElement.scrollTop + 'px');
23 | width: expression(document.documentElement.clientWidth + 'px');
24 | height: expression(document.documentElement.clientHeight + 'px');
25 | }
26 |
27 | .dialog
28 | {
29 | position: fixed;
30 | _position: absolute; /* Degrade to this in IE for now */
31 | z-index: 725;
32 | min-width:200px;
33 | max-width: 50%;
34 | }
35 |
36 | .dialog-body
37 | {
38 | padding: 1em;
39 | _height: 1%; /* hasLayout */
40 | background-color: white;
41 | }
42 |
43 | /* Style choice dialog */
44 | .choice .dialog-body, .modal .choice
45 | {
46 | /* background: white url(/weblocks-common/pub/images/dialog/question.png) no-repeat 0.5em center;*/
47 | }
48 |
49 | .dialog h2, .modal h2
50 | {
51 | padding: 0;
52 | margin: 0;
53 | text-align: left;
54 | }
55 |
56 | .dialog h1 span, .modal h1 span
57 | {
58 | /* background: url(/weblocks-common/pub/images/horizontal_line.png) repeat-x bottom;*/
59 | display: block;
60 | }
61 |
62 | .dialog h1 span
63 | {
64 | margin-left: 0.5em;
65 | margin-right: 0.5em;
66 | }
67 |
68 | .choice
69 | {
70 | text-align: center;
71 | }
72 |
73 | .choice form, .choice form fieldset, .choice p
74 | {
75 | border: none;
76 | margin: 0;
77 | padding: 0;
78 | }
79 |
80 | .choice p
81 | {
82 | margin-bottom: 1em;
83 | }
84 |
85 | .choice input
86 | {
87 | margin-left: 0.25em;
88 | margin-right: 0.25em;
89 | }
90 |
91 | /* Style information dialog */
92 | .information .dialog-body, .modal .information
93 | {
94 | /* background-image: url(/weblocks-common/pub/images/dialog/information.png);*/
95 | }
96 |
97 | /* Modal interaction */
98 | .modal
99 | {
100 | /* background: url(/weblocks-common/pub/images/horizontal_line.png) repeat-x bottom;*/
101 | padding-bottom: 2px;
102 | }
103 |
104 | .modal h1
105 | {
106 | border: none;
107 | margin: 0;
108 | }
109 |
110 | .modal .choice
111 | {
112 | min-height: 48px;
113 | _height: 48px;
114 | background-position: left center;
115 | padding-top: 1em;
116 | padding-bottom: 1em;
117 | }
118 |
119 | .title-text-cell {
120 | background:white;
121 | border-top:1px solid black;
122 | border-left:1px solid black;
123 | padding:0 5px;
124 | padding-top:3px;
125 | }
126 |
127 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/scripts/datagrid.js:
--------------------------------------------------------------------------------
1 |
2 | // These styles need to be added dynamically because we only want them
3 | // when JS is turned on
4 | addCss(".datagrid td.drilldown, .datagrid th.drilldown { display: none; }");
5 |
6 | // We should only invoke datagrid actions when selection is empty
7 | function initiateActionOnEmptySelection(actionCode, sessionString) {
8 | if(selectionEmpty()) {
9 | initiateAction(actionCode, sessionString);
10 | return false;
11 | }
12 | }
13 |
14 | // Keyboard
15 | function clearNavigatableHighlight() {
16 | if(selectedNavigatableRowIndex != undefined) {
17 | var row = navigatableTableRows[selectedNavigatableRowIndex];
18 | if(row) {
19 | if(!row.hasClassName('drilled-down')) {
20 | row.removeClassName('hover');
21 | }
22 | } else {
23 | selectedNavigatableRowIndex = undefined;
24 | }
25 | }
26 | }
27 |
28 | function setNavigatableHighlight() {
29 | if(selectedNavigatableRowIndex != undefined) {
30 | var row = navigatableTableRows[selectedNavigatableRowIndex];
31 | if(row) {
32 | row.addClassName('hover');
33 | }
34 | }
35 | }
36 |
37 | function initializeNavigatableRows() {
38 | navigatableTableRows = $$('tr').select(function(e) { return e.readAttribute('onclick'); });
39 | selectedNavigatableRowIndex = undefined;
40 | for(var i = 0; i < navigatableTableRows.length; i++) {
41 | if(navigatableTableRows[i].hasClassName('drilled-down')) {
42 | selectedNavigatableRowIndex = i;
43 | break;
44 | }
45 | }
46 | navigatableTableRows.each(function(row) {
47 | Event.observe(row, 'mouseover', function(event) {
48 | clearNavigatableHighlight();
49 | selectedNavigatableRowIndex = undefined;
50 | });
51 | });
52 | }
53 |
54 | Event.observe(window, 'load', initializeNavigatableRows);
55 |
56 | Ajax.Responders.register({
57 | onComplete: function() {
58 | clearNavigatableHighlight();
59 | initializeNavigatableRows();
60 | }
61 | });
62 |
63 | shortcut.add("j", function() {
64 | if(selectedNavigatableRowIndex == undefined) {
65 | selectedNavigatableRowIndex = 0;
66 | } else {
67 | clearNavigatableHighlight();
68 | selectedNavigatableRowIndex++;
69 | if(selectedNavigatableRowIndex == navigatableTableRows.length) {
70 | selectedNavigatableRowIndex = undefined;
71 | }
72 | }
73 | setNavigatableHighlight();
74 | },
75 | { 'disable_in_input' : true });
76 |
77 | shortcut.add("k", function() {
78 | if(selectedNavigatableRowIndex == undefined) {
79 | selectedNavigatableRowIndex = navigatableTableRows.length - 1;
80 | } else {
81 | clearNavigatableHighlight();
82 | selectedNavigatableRowIndex--;
83 | if(selectedNavigatableRowIndex == -1) {
84 | selectedNavigatableRowIndex = undefined;
85 | }
86 | }
87 | setNavigatableHighlight();
88 | },
89 | { 'disable_in_input' : true })
90 |
91 | shortcut.add("Return", function() {
92 | if(selectedNavigatableRowIndex != undefined) {
93 | navigatableTableRows[selectedNavigatableRowIndex].onclick();
94 | }
95 | },
96 | { 'disable_in_input' : true })
97 |
98 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/scripts/vzn/datagrid.0.js:
--------------------------------------------------------------------------------
1 |
2 | // These styles need to be added dynamically because we only want them
3 | // when JS is turned on
4 | addCss(".datagrid td.drilldown, .datagrid th.drilldown { display: none; }");
5 |
6 | // We should only invoke datagrid actions when selection is empty
7 | function initiateActionOnEmptySelection(actionCode, sessionString) {
8 | if(selectionEmpty()) {
9 | initiateAction(actionCode, sessionString);
10 | return false;
11 | }
12 | }
13 |
14 | // Keyboard
15 | function clearNavigatableHighlight() {
16 | if(selectedNavigatableRowIndex != undefined) {
17 | var row = navigatableTableRows[selectedNavigatableRowIndex];
18 | if(row) {
19 | if(!row.hasClassName('drilled-down')) {
20 | row.removeClassName('hover');
21 | }
22 | } else {
23 | selectedNavigatableRowIndex = undefined;
24 | }
25 | }
26 | }
27 |
28 | function setNavigatableHighlight() {
29 | if(selectedNavigatableRowIndex != undefined) {
30 | var row = navigatableTableRows[selectedNavigatableRowIndex];
31 | if(row) {
32 | row.addClassName('hover');
33 | }
34 | }
35 | }
36 |
37 | function initializeNavigatableRows() {
38 | navigatableTableRows = $$('tr').select(function(e) { return e.readAttribute('onclick'); });
39 | selectedNavigatableRowIndex = undefined;
40 | for(var i = 0; i < navigatableTableRows.length; i++) {
41 | if(navigatableTableRows[i].hasClassName('drilled-down')) {
42 | selectedNavigatableRowIndex = i;
43 | break;
44 | }
45 | }
46 | navigatableTableRows.each(function(row) {
47 | Event.observe(row, 'mouseover', function(event) {
48 | clearNavigatableHighlight();
49 | selectedNavigatableRowIndex = undefined;
50 | });
51 | });
52 | }
53 |
54 | Event.observe(window, 'load', initializeNavigatableRows);
55 |
56 | Ajax.Responders.register({
57 | onComplete: function() {
58 | clearNavigatableHighlight();
59 | initializeNavigatableRows();
60 | }
61 | });
62 |
63 | shortcut.add("j", function() {
64 | if(selectedNavigatableRowIndex == undefined) {
65 | selectedNavigatableRowIndex = 0;
66 | } else {
67 | clearNavigatableHighlight();
68 | selectedNavigatableRowIndex++;
69 | if(selectedNavigatableRowIndex == navigatableTableRows.length) {
70 | selectedNavigatableRowIndex = undefined;
71 | }
72 | }
73 | setNavigatableHighlight();
74 | },
75 | { 'disable_in_input' : true });
76 |
77 | shortcut.add("k", function() {
78 | if(selectedNavigatableRowIndex == undefined) {
79 | selectedNavigatableRowIndex = navigatableTableRows.length - 1;
80 | } else {
81 | clearNavigatableHighlight();
82 | selectedNavigatableRowIndex--;
83 | if(selectedNavigatableRowIndex == -1) {
84 | selectedNavigatableRowIndex = undefined;
85 | }
86 | }
87 | setNavigatableHighlight();
88 | },
89 | { 'disable_in_input' : true })
90 |
91 | shortcut.add("Return", function() {
92 | if(selectedNavigatableRowIndex != undefined) {
93 | navigatableTableRows[selectedNavigatableRowIndex].onclick();
94 | }
95 | },
96 | { 'disable_in_input' : true })
97 |
98 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/dataseq.css:
--------------------------------------------------------------------------------
1 |
2 | /* Body */
3 | .dataseq form.dataseq-form fieldset
4 | {
5 | border: none;
6 | margin: 0;
7 | padding: 0;
8 | }
9 |
10 | .dataseq form.dataseq-form
11 | {
12 | margin: 0;
13 | padding: 0;
14 | }
15 |
16 | .dataseq form.dataseq-form
17 | {
18 | margin-bottom: 1em;
19 | }
20 |
21 | /* Mining Bar */
22 | .dataseq .data-mining-bar
23 | {
24 | position: relative;
25 | margin-bottom: 0.25em;
26 | height: 1em;
27 | }
28 |
29 | .dataseq > .data-mining-bar
30 | {
31 | height: auto;
32 | min-height: 1em;
33 | }
34 |
35 | .dataseq .data-mining-bar .total-items
36 | {
37 | position: absolute;
38 | right: 0;
39 | bottom: 0;
40 | }
41 |
42 | /* Operations */
43 | .dataseq form .operations
44 | {
45 | position: absolute;
46 | right: 0;
47 | margin-top: 0.25em;
48 | }
49 |
50 | .dataseq form.operations-form .operations input.submit,
51 | .dataseq form.dataseq-form .operations input.submit
52 | {
53 | margin-left: 0.5em;
54 | }
55 |
56 | .dataseq form.operations-form,
57 | .dataseq form.operations-form fieldset
58 | {
59 | border: none;
60 | margin: 0;
61 | padding: 0;
62 | }
63 |
64 | /* Datagrid specific pagination styles */
65 | .dataseq div.pagination
66 | {
67 | margin-top: -1em;
68 | }
69 |
70 | .dataseq div.pagination,
71 | .dataseq div.pagination form fieldset input
72 | {
73 | font-size: x-small;
74 | }
75 |
76 | /* Flash */
77 | div.dataseq .flash
78 | {
79 | position: relative;
80 | _height: 1%; /* hasLayout IE 6 fix */
81 | }
82 |
83 | div.dataseq .flash .view .extra-top-1
84 | {
85 | position: absolute;
86 | z-index: 10;
87 | left: 0;
88 | width: 5px;
89 | overflow: hidden;
90 | }
91 |
92 | div.dataseq .flash .view .extra-top-2
93 | {
94 | right: 0;
95 | width: 5px;
96 | border: none;
97 | position: absolute;
98 | margin-top: 0;
99 | z-index: 10;
100 | overflow: hidden;
101 | }
102 |
103 | div.dataseq .flash .view .extra-top-3
104 | {
105 | height: 2px;
106 | /* background: url(/weblocks-common/pub/images/widget/flash/top_background.png) repeat-x;*/
107 | display: block;
108 | overflow: hidden;
109 | }
110 |
111 | div.dataseq .flash .view
112 | {
113 | margin-bottom: 0.25em;
114 | /* background-image: url(/weblocks-common/pub/images/widget/dataseq/flash/vertical_border.png);*/
115 | background-repeat: repeat-y;
116 | background-position: left;
117 | }
118 |
119 | div.dataseq .flash .view ul.messages
120 | {
121 | /* background: url(/weblocks-common/pub/images/widget/dataseq/flash/vertical_border.png) repeat-y right;*/
122 | border: none;
123 | margin-bottom: 5px;
124 | }
125 |
126 | div.dataseq .flash .view ul.messages li
127 | {
128 | background-image: none;
129 | border: none;
130 | padding-left: 0;
131 | }
132 |
133 | div.dataseq .flash .view ul.messages p
134 | {
135 | text-align: center;
136 | font-size: x-small;
137 | padding-top: 1px;
138 | }
139 |
140 | div.dataseq .flash .view .extra-bottom-1
141 | {
142 | background-image: none;
143 | border-bottom: solid 2px #ead8c2;
144 | margin-top: -14px;
145 | }
146 |
147 | div.dataseq .flash .view .extra-bottom-2
148 | {
149 | /* background: url(/weblocks-common/pub/images/widget/dataseq/flash/bottom_left.png) no-repeat top left;*/
150 | margin-top: -7px;
151 | }
152 |
153 | div.dataseq .flash .view .extra-bottom-3
154 | {
155 | /* background: url(/weblocks-common/pub/images/widget/dataseq/flash/bottom_right.png) no-repeat top right;*/
156 | margin-top: -7px;
157 | }
158 |
159 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/vzn/dataseq.0.css:
--------------------------------------------------------------------------------
1 |
2 | /* Body */
3 | .dataseq form.dataseq-form fieldset
4 | {
5 | border: none;
6 | margin: 0;
7 | padding: 0;
8 | }
9 |
10 | .dataseq form.dataseq-form
11 | {
12 | margin: 0;
13 | padding: 0;
14 | }
15 |
16 | .dataseq form.dataseq-form
17 | {
18 | margin-bottom: 1em;
19 | }
20 |
21 | /* Mining Bar */
22 | .dataseq .data-mining-bar
23 | {
24 | position: relative;
25 | margin-bottom: 0.25em;
26 | height: 1em;
27 | }
28 |
29 | .dataseq > .data-mining-bar
30 | {
31 | height: auto;
32 | min-height: 1em;
33 | }
34 |
35 | .dataseq .data-mining-bar .total-items
36 | {
37 | position: absolute;
38 | right: 0;
39 | bottom: 0;
40 | }
41 |
42 | /* Operations */
43 | .dataseq form .operations
44 | {
45 | position: absolute;
46 | right: 0;
47 | margin-top: 0.25em;
48 | }
49 |
50 | .dataseq form.operations-form .operations input.submit,
51 | .dataseq form.dataseq-form .operations input.submit
52 | {
53 | margin-left: 0.5em;
54 | }
55 |
56 | .dataseq form.operations-form,
57 | .dataseq form.operations-form fieldset
58 | {
59 | border: none;
60 | margin: 0;
61 | padding: 0;
62 | }
63 |
64 | /* Datagrid specific pagination styles */
65 | .dataseq div.pagination
66 | {
67 | margin-top: -1em;
68 | }
69 |
70 | .dataseq div.pagination,
71 | .dataseq div.pagination form fieldset input
72 | {
73 | font-size: x-small;
74 | }
75 |
76 | /* Flash */
77 | div.dataseq .flash
78 | {
79 | position: relative;
80 | _height: 1%; /* hasLayout IE 6 fix */
81 | }
82 |
83 | div.dataseq .flash .view .extra-top-1
84 | {
85 | position: absolute;
86 | z-index: 10;
87 | left: 0;
88 | width: 5px;
89 | overflow: hidden;
90 | }
91 |
92 | div.dataseq .flash .view .extra-top-2
93 | {
94 | right: 0;
95 | width: 5px;
96 | border: none;
97 | position: absolute;
98 | margin-top: 0;
99 | z-index: 10;
100 | overflow: hidden;
101 | }
102 |
103 | div.dataseq .flash .view .extra-top-3
104 | {
105 | height: 2px;
106 | /* background: url(/weblocks-common/pub/images/widget/flash/top_background.png) repeat-x;*/
107 | display: block;
108 | overflow: hidden;
109 | }
110 |
111 | div.dataseq .flash .view
112 | {
113 | margin-bottom: 0.25em;
114 | /* background-image: url(/weblocks-common/pub/images/widget/dataseq/flash/vertical_border.png);*/
115 | background-repeat: repeat-y;
116 | background-position: left;
117 | }
118 |
119 | div.dataseq .flash .view ul.messages
120 | {
121 | /* background: url(/weblocks-common/pub/images/widget/dataseq/flash/vertical_border.png) repeat-y right;*/
122 | border: none;
123 | margin-bottom: 5px;
124 | }
125 |
126 | div.dataseq .flash .view ul.messages li
127 | {
128 | background-image: none;
129 | border: none;
130 | padding-left: 0;
131 | }
132 |
133 | div.dataseq .flash .view ul.messages p
134 | {
135 | text-align: center;
136 | font-size: x-small;
137 | padding-top: 1px;
138 | }
139 |
140 | div.dataseq .flash .view .extra-bottom-1
141 | {
142 | background-image: none;
143 | border-bottom: solid 2px #ead8c2;
144 | margin-top: -14px;
145 | }
146 |
147 | div.dataseq .flash .view .extra-bottom-2
148 | {
149 | /* background: url(/weblocks-common/pub/images/widget/dataseq/flash/bottom_left.png) no-repeat top left;*/
150 | margin-top: -7px;
151 | }
152 |
153 | div.dataseq .flash .view .extra-bottom-3
154 | {
155 | /* background: url(/weblocks-common/pub/images/widget/dataseq/flash/bottom_right.png) no-repeat top right;*/
156 | margin-top: -7px;
157 | }
158 |
159 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/scripts/dialog.js:
--------------------------------------------------------------------------------
1 |
2 | Position.GetViewportSize = function() {
3 | var w = window;
4 | var width = w.innerWidth || (w.document.documentElement.clientWidth || w.document.body.clientWidth);
5 | var height = w.innerHeight || (w.document.documentElement.clientHeight || w.document.body.clientHeight);
6 | return [width, height]
7 | }
8 | Position.EyeLevel = function(element, parent) {
9 | var w, h, pw, ph;
10 | var d = Element.getDimensions(element);
11 | w = d.width;
12 | h = d.height;
13 | Position.prepare();
14 | if (!parent) {
15 | var ws = Position.GetViewportSize();
16 | pw = ws[0];
17 | ph = ws[1];
18 | } else {
19 | pw = parent.offsetWidth;
20 | ph = parent.offsetHeight;
21 | }
22 | var eyeLevel = ph - (ph/4*3) - (h/2);
23 | var screenCenter = (ph/2) - (h/2);
24 | var scrollX = 0, scrollY = 0;
25 | if(!window.XMLHttpRequest) {
26 | // IE 6 only, as we can't use position: fixed
27 | scrollX = Position.deltaX;
28 | scrollY = Position.deltaY;
29 | }
30 | element.style.top = (eyeLevel < (ph / 10) ? screenCenter : eyeLevel) + scrollY + "px";
31 | element.style.left = (pw/2) - (w/2) + scrollX + "px";
32 | }
33 |
34 | function showDialog(title, body, cssClass) {
35 | showDialog(title, body, cssClass, null);
36 | }
37 |
38 |
39 | function showDialog(title, body, cssClass, close) {
40 | // Find or create a graybox
41 | var graybox = $$('.graybox')[0];
42 | if(!graybox) {
43 | graybox = Builder.node('div', { className : 'graybox' });
44 | } else {
45 | Element.show(graybox);
46 | }
47 | $$('body')[0].appendChild(graybox);
48 | // Create a dialog
49 | var dialogBody = Builder.node('div', { className : 'dialog-body' });
50 | dialogBody.innerHTML = body;
51 |
52 | var titleTextCell = Builder.node('td', {className : 'title-text-cell'},
53 | [ Builder.node('h2', {className : 'title-text'}, [title])]);
54 |
55 | var titleButtonCell = null;
56 | var titleRow = null;
57 | if (close != null) {
58 | var buttonDiv = Builder.node('div', { className : 'title-button' });
59 | buttonDiv.innerHTML = close;
60 | titleButtonCell = Builder.node('td', {className : 'title-button-cell'}, [ buttonDiv ]);
61 |
62 | titleRow = Builder.node('tr', [ titleTextCell, titleButtonCell ]);
63 | }
64 | else {
65 | titleRow = Builder.node('tr', [ titleTextCell ]);
66 | }
67 |
68 | var titleBar = Builder.node('table', {className : 'title-bar', cellpadding: '0', cellspacing: '0'}, [titleRow]);
69 |
70 | var dialog = Builder.node('div', { className : ('dialog ' + cssClass) },
71 | [ Builder.node('div', { className : 'dialog-extra-top-1' }),
72 | Builder.node('div', { className : 'dialog-extra-top-2' }),
73 | Builder.node('div', { className : 'dialog-extra-top-3' }),
74 | titleBar,
75 | dialogBody,
76 | Builder.node('div', { className : 'dialog-extra-bottom-1' }),
77 | Builder.node('div', { className : 'dialog-extra-bottom-2' }),
78 | Builder.node('div', { className : 'dialog-extra-bottom-3' }) ]);
79 | if(!Prototype.Browser.IE) {
80 | // Everything but IE, due to z-index issues
81 | // Necessary to avoid flicker if rendering is slow
82 | $(dialog).hide();
83 | }
84 | $$('div.page-wrapper')[0].appendChild(dialog);
85 | Position.EyeLevel(dialog);
86 | if(!Prototype.Browser.IE) {
87 | // Everything but IE, due to z-index issues
88 | // Necessary to avoid flicker if rendering is slow
89 | $(dialog).show();
90 | }
91 | }
92 |
93 | function removeDialog() {
94 | Element.remove($$('.dialog')[0]);
95 | Element.hide($$('.graybox')[0]);
96 | }
97 |
98 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/scripts/vzn/dialog.0.js:
--------------------------------------------------------------------------------
1 |
2 | Position.GetViewportSize = function() {
3 | var w = window;
4 | var width = w.innerWidth || (w.document.documentElement.clientWidth || w.document.body.clientWidth);
5 | var height = w.innerHeight || (w.document.documentElement.clientHeight || w.document.body.clientHeight);
6 | return [width, height]
7 | }
8 | Position.EyeLevel = function(element, parent) {
9 | var w, h, pw, ph;
10 | var d = Element.getDimensions(element);
11 | w = d.width;
12 | h = d.height;
13 | Position.prepare();
14 | if (!parent) {
15 | var ws = Position.GetViewportSize();
16 | pw = ws[0];
17 | ph = ws[1];
18 | } else {
19 | pw = parent.offsetWidth;
20 | ph = parent.offsetHeight;
21 | }
22 | var eyeLevel = ph - (ph/4*3) - (h/2);
23 | var screenCenter = (ph/2) - (h/2);
24 | var scrollX = 0, scrollY = 0;
25 | if(!window.XMLHttpRequest) {
26 | // IE 6 only, as we can't use position: fixed
27 | scrollX = Position.deltaX;
28 | scrollY = Position.deltaY;
29 | }
30 | element.style.top = (eyeLevel < (ph / 10) ? screenCenter : eyeLevel) + scrollY + "px";
31 | element.style.left = (pw/2) - (w/2) + scrollX + "px";
32 | }
33 |
34 | function showDialog(title, body, cssClass) {
35 | showDialog(title, body, cssClass, null);
36 | }
37 |
38 |
39 | function showDialog(title, body, cssClass, close) {
40 | // Find or create a graybox
41 | var graybox = $$('.graybox')[0];
42 | if(!graybox) {
43 | graybox = Builder.node('div', { className : 'graybox' });
44 | } else {
45 | Element.show(graybox);
46 | }
47 | $$('body')[0].appendChild(graybox);
48 | // Create a dialog
49 | var dialogBody = Builder.node('div', { className : 'dialog-body' });
50 | dialogBody.innerHTML = body;
51 |
52 | var titleTextCell = Builder.node('td', {className : 'title-text-cell'},
53 | [ Builder.node('h2', {className : 'title-text'}, [title])]);
54 |
55 | var titleButtonCell = null;
56 | var titleRow = null;
57 | if (close != null) {
58 | var buttonDiv = Builder.node('div', { className : 'title-button' });
59 | buttonDiv.innerHTML = close;
60 | titleButtonCell = Builder.node('td', {className : 'title-button-cell'}, [ buttonDiv ]);
61 |
62 | titleRow = Builder.node('tr', [ titleTextCell, titleButtonCell ]);
63 | }
64 | else {
65 | titleRow = Builder.node('tr', [ titleTextCell ]);
66 | }
67 |
68 | var titleBar = Builder.node('table', {className : 'title-bar', cellpadding: '0', cellspacing: '0'}, [titleRow]);
69 |
70 | var dialog = Builder.node('div', { className : ('dialog ' + cssClass) },
71 | [ Builder.node('div', { className : 'dialog-extra-top-1' }),
72 | Builder.node('div', { className : 'dialog-extra-top-2' }),
73 | Builder.node('div', { className : 'dialog-extra-top-3' }),
74 | titleBar,
75 | dialogBody,
76 | Builder.node('div', { className : 'dialog-extra-bottom-1' }),
77 | Builder.node('div', { className : 'dialog-extra-bottom-2' }),
78 | Builder.node('div', { className : 'dialog-extra-bottom-3' }) ]);
79 | if(!Prototype.Browser.IE) {
80 | // Everything but IE, due to z-index issues
81 | // Necessary to avoid flicker if rendering is slow
82 | $(dialog).hide();
83 | }
84 | $$('div.page-wrapper')[0].appendChild(dialog);
85 | Position.EyeLevel(dialog);
86 | if(!Prototype.Browser.IE) {
87 | // Everything but IE, due to z-index issues
88 | // Necessary to avoid flicker if rendering is slow
89 | $(dialog).show();
90 | }
91 | }
92 |
93 | function removeDialog() {
94 | Element.remove($$('.dialog')[0]);
95 | Element.hide($$('.graybox')[0]);
96 | }
97 |
98 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/layout.css:
--------------------------------------------------------------------------------
1 | body
2 | {
3 | /* background: url(/weblocks-common/pub/images/page/background.png);*/
4 | text-align: center;
5 | background: #001D23;
6 | }
7 |
8 | div.page-wrapper
9 | {
10 | max-width: 90%;
11 | min-width: 60em;
12 |
13 | margin: 0 auto;
14 | text-align: left;
15 | }
16 |
17 | /* IE 6 specific hacks (has layout and min-width)*/
18 | * html div.page-wrapper
19 | {
20 | width: 70em;
21 | }
22 |
23 | .page-wrapper .page-extra-top-1,
24 | .dialog .dialog-extra-top-1
25 | {
26 | height: 5px;
27 | /* background: url(/weblocks-common/pub/images/page/top_left.png) no-repeat top left;*/
28 | overflow: hidden;
29 | }
30 |
31 | .page-wrapper .page-extra-top-2,
32 | .dialog .dialog-extra-top-2
33 | {
34 | height: 5px;
35 | margin-top: -5px;
36 | /* background: url(/weblocks-common/pub/images/page/top_right.png) no-repeat top right;*/
37 | overflow: hidden;
38 | }
39 |
40 | .page-wrapper .page-extra-top-3,
41 | .dialog .dialog-extra-top-3
42 | {
43 | height: 5px;
44 | margin-top: -5px;
45 | margin-left: 5px;
46 | margin-right: 5px;
47 | /* background: url(/weblocks-common/pub/images/page/hor_border.png) repeat-x top;*/
48 | overflow: hidden;
49 | }
50 |
51 | div#root, .dialog-body, .dialog h1
52 | {
53 | border-left: 1px solid black;
54 | border-right: 1px solid black;
55 | }
56 |
57 | div#root
58 | {
59 | padding: 3em;
60 | min-height: 60em;
61 | background-color: white;
62 | }
63 |
64 | /* IE 6 specific hacks (has layout and min-height)*/
65 | * html div#root
66 | {
67 | height: 60em;
68 | }
69 |
70 | div#main-menu
71 | {
72 | position: relative;
73 | }
74 |
75 | div#main-menu div.navigation-body
76 | {
77 | margin-left: 16em;
78 | }
79 |
80 | div#main-menu div.menu
81 | {
82 | position: absolute;
83 | top: 0;
84 | }
85 |
86 | .page-wrapper .page-extra-bottom-1,
87 | .dialog .dialog-extra-bottom-1
88 | {
89 | height: 5px;
90 | /* background: url(/weblocks-common/pub/images/page/bottom_left.png) no-repeat top left;*/
91 | overflow: hidden;
92 | }
93 |
94 | .page-wrapper .page-extra-bottom-2,
95 | .dialog .dialog-extra-bottom-2
96 | {
97 | height: 5px;
98 | margin-top: -5px;
99 | /* background: url(/weblocks-common/pub/images/page/bottom_right.png) no-repeat top right;*/
100 | overflow: hidden;
101 | }
102 |
103 | .page-wrapper .page-extra-bottom-3,
104 | .dialog .dialog-extra-bottom-3
105 | {
106 | height: 5px;
107 | margin-top: -5px;
108 | margin-left: 5px;
109 | margin-right: 5px;
110 | /* background: url(/weblocks-common/pub/images/page/hor_border_bottom.png) repeat-x top;*/
111 | overflow: hidden;
112 | }
113 |
114 | .header
115 | {
116 | height: 52px;
117 | /* background: url(/weblocks-common/pub/images/header/background.png) repeat-x;*/
118 | margin-top: -5px;
119 | margin-bottom: 1em;
120 | }
121 |
122 | .header .extra-top-1
123 | {
124 | height: 5px;
125 | /* background: url(/weblocks-common/pub/images/header/top_left.png) no-repeat top left;*/
126 | overflow: hidden;
127 | }
128 |
129 | .header .extra-top-2
130 | {
131 | height: 5px;
132 | margin-top: -5px;
133 | /* background: url(/weblocks-common/pub/images/header/top_right.png) no-repeat top right;*/
134 | overflow: hidden;
135 | }
136 |
137 | .header .extra-top-3
138 | {
139 | height: 42px;
140 | margin-left: 5px;
141 | /* background: url(/weblocks-common/pub/images/header/logo.png) no-repeat center left;*/
142 | }
143 |
144 | .header .extra-bottom-1
145 | {
146 | height: 5px;
147 | /* background: url(/weblocks-common/pub/images/header/bottom_left.png) no-repeat top left;*/
148 | overflow: hidden;
149 | }
150 |
151 | .header .extra-bottom-2
152 | {
153 | height: 5px;
154 | margin-top: -5px;
155 | /* background: url(/weblocks-common/pub/images/header/bottom_right.png) no-repeat top right;*/
156 | overflow: hidden;
157 | }
158 |
159 | .footer
160 | {
161 | margin-top: 1em;
162 | }
163 |
164 | .footer p#system-info
165 | {
166 | margin-bottom: 0;
167 | }
168 |
169 | .footer p#contact-info
170 | {
171 | margin-top: 0;
172 | }
173 |
174 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/vzn/layout.0.css:
--------------------------------------------------------------------------------
1 | body
2 | {
3 | /* background: url(/weblocks-common/pub/images/page/background.png);*/
4 | text-align: center;
5 | background: #001D23;
6 | }
7 |
8 | div.page-wrapper
9 | {
10 | max-width: 90%;
11 | min-width: 60em;
12 |
13 | margin: 0 auto;
14 | text-align: left;
15 | }
16 |
17 | /* IE 6 specific hacks (has layout and min-width)*/
18 | * html div.page-wrapper
19 | {
20 | width: 70em;
21 | }
22 |
23 | .page-wrapper .page-extra-top-1,
24 | .dialog .dialog-extra-top-1
25 | {
26 | height: 5px;
27 | /* background: url(/weblocks-common/pub/images/page/top_left.png) no-repeat top left;*/
28 | overflow: hidden;
29 | }
30 |
31 | .page-wrapper .page-extra-top-2,
32 | .dialog .dialog-extra-top-2
33 | {
34 | height: 5px;
35 | margin-top: -5px;
36 | /* background: url(/weblocks-common/pub/images/page/top_right.png) no-repeat top right;*/
37 | overflow: hidden;
38 | }
39 |
40 | .page-wrapper .page-extra-top-3,
41 | .dialog .dialog-extra-top-3
42 | {
43 | height: 5px;
44 | margin-top: -5px;
45 | margin-left: 5px;
46 | margin-right: 5px;
47 | /* background: url(/weblocks-common/pub/images/page/hor_border.png) repeat-x top;*/
48 | overflow: hidden;
49 | }
50 |
51 | div#root, .dialog-body, .dialog h1
52 | {
53 | border-left: 1px solid black;
54 | border-right: 1px solid black;
55 | }
56 |
57 | div#root
58 | {
59 | padding: 3em;
60 | min-height: 60em;
61 | background-color: white;
62 | }
63 |
64 | /* IE 6 specific hacks (has layout and min-height)*/
65 | * html div#root
66 | {
67 | height: 60em;
68 | }
69 |
70 | div#main-menu
71 | {
72 | position: relative;
73 | }
74 |
75 | div#main-menu div.navigation-body
76 | {
77 | margin-left: 16em;
78 | }
79 |
80 | div#main-menu div.menu
81 | {
82 | position: absolute;
83 | top: 0;
84 | }
85 |
86 | .page-wrapper .page-extra-bottom-1,
87 | .dialog .dialog-extra-bottom-1
88 | {
89 | height: 5px;
90 | /* background: url(/weblocks-common/pub/images/page/bottom_left.png) no-repeat top left;*/
91 | overflow: hidden;
92 | }
93 |
94 | .page-wrapper .page-extra-bottom-2,
95 | .dialog .dialog-extra-bottom-2
96 | {
97 | height: 5px;
98 | margin-top: -5px;
99 | /* background: url(/weblocks-common/pub/images/page/bottom_right.png) no-repeat top right;*/
100 | overflow: hidden;
101 | }
102 |
103 | .page-wrapper .page-extra-bottom-3,
104 | .dialog .dialog-extra-bottom-3
105 | {
106 | height: 5px;
107 | margin-top: -5px;
108 | margin-left: 5px;
109 | margin-right: 5px;
110 | /* background: url(/weblocks-common/pub/images/page/hor_border_bottom.png) repeat-x top;*/
111 | overflow: hidden;
112 | }
113 |
114 | .header
115 | {
116 | height: 52px;
117 | /* background: url(/weblocks-common/pub/images/header/background.png) repeat-x;*/
118 | margin-top: -5px;
119 | margin-bottom: 1em;
120 | }
121 |
122 | .header .extra-top-1
123 | {
124 | height: 5px;
125 | /* background: url(/weblocks-common/pub/images/header/top_left.png) no-repeat top left;*/
126 | overflow: hidden;
127 | }
128 |
129 | .header .extra-top-2
130 | {
131 | height: 5px;
132 | margin-top: -5px;
133 | /* background: url(/weblocks-common/pub/images/header/top_right.png) no-repeat top right;*/
134 | overflow: hidden;
135 | }
136 |
137 | .header .extra-top-3
138 | {
139 | height: 42px;
140 | margin-left: 5px;
141 | /* background: url(/weblocks-common/pub/images/header/logo.png) no-repeat center left;*/
142 | }
143 |
144 | .header .extra-bottom-1
145 | {
146 | height: 5px;
147 | /* background: url(/weblocks-common/pub/images/header/bottom_left.png) no-repeat top left;*/
148 | overflow: hidden;
149 | }
150 |
151 | .header .extra-bottom-2
152 | {
153 | height: 5px;
154 | margin-top: -5px;
155 | /* background: url(/weblocks-common/pub/images/header/bottom_right.png) no-repeat top right;*/
156 | overflow: hidden;
157 | }
158 |
159 | .footer
160 | {
161 | margin-top: 1em;
162 | }
163 |
164 | .footer p#system-info
165 | {
166 | margin-bottom: 0;
167 | }
168 |
169 | .footer p#contact-info
170 | {
171 | margin-top: 0;
172 | }
173 |
174 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/form.css:
--------------------------------------------------------------------------------
1 |
2 | .form
3 | {
4 | margin-top: 0;
5 | }
6 |
7 | form fieldset
8 | {
9 | border: none;
10 | padding: 0;
11 | margin: 0;
12 | background:#ecf8d7;
13 | }
14 |
15 | .form fieldset .validation-errors-summary .error-count,
16 | .form fieldset .validation-errors-summary .field-validation-errors
17 | {
18 | display: none;
19 | }
20 |
21 | /* For long forms, change display of validation summary back */
22 | .long-form fieldset .validation-errors-summary .error-count,
23 | .long-form fieldset .validation-errors-summary .field-validation-errors
24 | {
25 | display: block;
26 | }
27 |
28 | .form fieldset .validation-errors-summary h2.error-count,
29 | .form fieldset .validation-errors-summary ul li
30 | {
31 | color: red;
32 | }
33 |
34 | .form fieldset .validation-errors-summary ul li,
35 | .long-form fieldset .validation-errors-summary .non-field-validation-errors
36 | {
37 | font-style: italic;
38 | border-top: none;
39 | border-bottom: none;
40 | }
41 |
42 | .form fieldset .form-fields-title
43 | {
44 | display: none;
45 | }
46 |
47 | form.view fieldset ul li label em.required-slot,
48 | form.view fieldset ul li span.label em.required-slot
49 | {
50 | font-weight: normal;
51 | display: inline;
52 | font-size: x-small;
53 | font-style: normal;
54 | color: red;
55 | }
56 |
57 | form.view fieldset ul li label input,
58 | form.view fieldset ul li label select,
59 | form.view fieldset ul li label textarea
60 | {
61 | margin-top: 2px;
62 | margin-bottom: 2px;
63 | width: 12em;
64 | }
65 |
66 | /* Target firefox */
67 | html>/**/body form.view fieldset ul li label textarea, x:-moz-any-link
68 | {
69 | width: auto;
70 | }
71 |
72 | /* IE6 font size hacks */
73 | * html form.view fieldset ul li label input,
74 | * html form.view fieldset ul li label textarea
75 | {
76 | font-size: 1em;
77 | }
78 | * html form.view fieldset ul li label select
79 | {
80 | font-size: small;
81 | }
82 |
83 | /* Target Safari */
84 | /* Safari and WebKit specific caption fix */
85 | html[xmlns*=""] form.view fieldset ul li label input,
86 | html[xmlns*=""] form.view fieldset ul li label select,
87 | html[xmlns*=""] form.view fieldset ul li label textarea
88 | {
89 | font-size: 1em;
90 | }
91 |
92 | form.view fieldset ul li label input
93 | {
94 | padding: 0;
95 | }
96 |
97 | form.view fieldset ul li label input.checkbox,
98 | form.view fieldset ul li label.radio input.radio
99 | {
100 | width: auto;
101 | /* A hack for IE to line up the checkbox and radio button */
102 | margin-left: -4px;
103 | }
104 |
105 | /* Set normal margin for other browsers (comment is necessary to hide
106 | from IE7) */
107 | form.view >/**/fieldset ul li label input.checkbox,
108 | form.view >/**/fieldset ul li label.radio input.radio
109 |
110 | {
111 | margin-left: 0;
112 | }
113 |
114 | form.view fieldset div.submit input.submit
115 | {
116 | margin-top: 2px;
117 | margin-bottom: 2px;
118 | margin-right: 0.5em;
119 | }
120 |
121 | p.validation-error
122 | {
123 | color: red;
124 | font-weight: normal;
125 | font-style: italic;
126 | margin-top: 0;
127 | margin-bottom: 0;
128 | }
129 |
130 | p.validation-error span.validation-error-heading
131 | {
132 | display: none;
133 | }
134 |
135 | /* Radio buttons */
136 | form.view fieldset ul li label.radio
137 | {
138 | display: block;
139 | margin-left: 12em;
140 | }
141 |
142 | form.view >/**/fieldset ul li label.radio
143 | {
144 | /* We only need this for non-IE browsers */
145 | margin-top: 0.25em;
146 | }
147 |
148 | form.view fieldset ul li label.radio.first
149 | {
150 | display: inline;
151 | margin-left: 0;
152 | margin-top: 0;
153 | }
154 |
155 | form.view fieldset ul li label.radio input.radio
156 | {
157 | width: auto;
158 | vertical-align: middle;
159 | margin-top: 0;
160 | margin-bottom: 0;
161 | }
162 |
163 | form.view fieldset ul li label.radio span
164 | {
165 | vertical-align: middle;
166 | }
167 |
168 | /* Text area label alignment */
169 | form fieldset ul li label.textarea span.slot-name
170 | {
171 | vertical-align: top;
172 | }
173 |
174 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/vzn/form.0.css:
--------------------------------------------------------------------------------
1 |
2 | .form
3 | {
4 | margin-top: 0;
5 | }
6 |
7 | form fieldset
8 | {
9 | border: none;
10 | padding: 0;
11 | margin: 0;
12 | background:#ecf8d7;
13 | }
14 |
15 | .form fieldset .validation-errors-summary .error-count,
16 | .form fieldset .validation-errors-summary .field-validation-errors
17 | {
18 | display: none;
19 | }
20 |
21 | /* For long forms, change display of validation summary back */
22 | .long-form fieldset .validation-errors-summary .error-count,
23 | .long-form fieldset .validation-errors-summary .field-validation-errors
24 | {
25 | display: block;
26 | }
27 |
28 | .form fieldset .validation-errors-summary h2.error-count,
29 | .form fieldset .validation-errors-summary ul li
30 | {
31 | color: red;
32 | }
33 |
34 | .form fieldset .validation-errors-summary ul li,
35 | .long-form fieldset .validation-errors-summary .non-field-validation-errors
36 | {
37 | font-style: italic;
38 | border-top: none;
39 | border-bottom: none;
40 | }
41 |
42 | .form fieldset .form-fields-title
43 | {
44 | display: none;
45 | }
46 |
47 | form.view fieldset ul li label em.required-slot,
48 | form.view fieldset ul li span.label em.required-slot
49 | {
50 | font-weight: normal;
51 | display: inline;
52 | font-size: x-small;
53 | font-style: normal;
54 | color: red;
55 | }
56 |
57 | form.view fieldset ul li label input,
58 | form.view fieldset ul li label select,
59 | form.view fieldset ul li label textarea
60 | {
61 | margin-top: 2px;
62 | margin-bottom: 2px;
63 | width: 12em;
64 | }
65 |
66 | /* Target firefox */
67 | html>/**/body form.view fieldset ul li label textarea, x:-moz-any-link
68 | {
69 | width: auto;
70 | }
71 |
72 | /* IE6 font size hacks */
73 | * html form.view fieldset ul li label input,
74 | * html form.view fieldset ul li label textarea
75 | {
76 | font-size: 1em;
77 | }
78 | * html form.view fieldset ul li label select
79 | {
80 | font-size: small;
81 | }
82 |
83 | /* Target Safari */
84 | /* Safari and WebKit specific caption fix */
85 | html[xmlns*=""] form.view fieldset ul li label input,
86 | html[xmlns*=""] form.view fieldset ul li label select,
87 | html[xmlns*=""] form.view fieldset ul li label textarea
88 | {
89 | font-size: 1em;
90 | }
91 |
92 | form.view fieldset ul li label input
93 | {
94 | padding: 0;
95 | }
96 |
97 | form.view fieldset ul li label input.checkbox,
98 | form.view fieldset ul li label.radio input.radio
99 | {
100 | width: auto;
101 | /* A hack for IE to line up the checkbox and radio button */
102 | margin-left: -4px;
103 | }
104 |
105 | /* Set normal margin for other browsers (comment is necessary to hide
106 | from IE7) */
107 | form.view >/**/fieldset ul li label input.checkbox,
108 | form.view >/**/fieldset ul li label.radio input.radio
109 |
110 | {
111 | margin-left: 0;
112 | }
113 |
114 | form.view fieldset div.submit input.submit
115 | {
116 | margin-top: 2px;
117 | margin-bottom: 2px;
118 | margin-right: 0.5em;
119 | }
120 |
121 | p.validation-error
122 | {
123 | color: red;
124 | font-weight: normal;
125 | font-style: italic;
126 | margin-top: 0;
127 | margin-bottom: 0;
128 | }
129 |
130 | p.validation-error span.validation-error-heading
131 | {
132 | display: none;
133 | }
134 |
135 | /* Radio buttons */
136 | form.view fieldset ul li label.radio
137 | {
138 | display: block;
139 | margin-left: 12em;
140 | }
141 |
142 | form.view >/**/fieldset ul li label.radio
143 | {
144 | /* We only need this for non-IE browsers */
145 | margin-top: 0.25em;
146 | }
147 |
148 | form.view fieldset ul li label.radio.first
149 | {
150 | display: inline;
151 | margin-left: 0;
152 | margin-top: 0;
153 | }
154 |
155 | form.view fieldset ul li label.radio input.radio
156 | {
157 | width: auto;
158 | vertical-align: middle;
159 | margin-top: 0;
160 | margin-bottom: 0;
161 | }
162 |
163 | form.view fieldset ul li label.radio span
164 | {
165 | vertical-align: middle;
166 | }
167 |
168 | /* Text area label alignment */
169 | form fieldset ul li label.textarea span.slot-name
170 | {
171 | vertical-align: top;
172 | }
173 |
174 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/datalist.css:
--------------------------------------------------------------------------------
1 |
2 | .datalist .data-mining-bar form,
3 | .datalist .data-mining-bar form fieldset
4 | {
5 | border: none;
6 | margin: 0;
7 | padding: 0;
8 | }
9 |
10 | .datalist form.datalist-sort-bar,
11 | .datalist form.datalist-sort-bar fieldset select,
12 | .datalist form.datalist-sort-bar fieldset input
13 | {
14 | font-size: x-small;
15 | margin-right: 0.5em;
16 | }
17 |
18 | .datalist form.datalist-sort-bar span,
19 | .datalist form.datalist-sort-bar input,
20 | .datalist form.datalist-sort-bar select
21 | {
22 | vertical-align: middle;
23 | }
24 |
25 | /* Replacing sort direction with an arrow */
26 | .datalist form.datalist-sort-bar a
27 | {
28 | text-decoration: none;
29 | cursor: pointer;
30 | }
31 |
32 | .datalist form.datalist-sort-bar a span.direction,
33 | .datalist form.datalist-sort-bar span span.direction
34 | {
35 | display: none;
36 | }
37 |
38 | .datalist form.datalist-sort-bar a.sort-asc:before
39 | {
40 | /* content: url(/weblocks-common/pub/images/widget/datalist/up_arrow_link.png);*/
41 | }
42 |
43 | .datalist form.datalist-sort-bar a.sort-desc:before
44 | {
45 | /* content: url(/weblocks-common/pub/images/widget/datalist/down_arrow_link.png);*/
46 | }
47 |
48 | /* Replacing sort direction with an arrow on IE browsers */
49 | *:first-child+html .datalist form.datalist-sort-bar a span.direction
50 | {
51 | display: inline;
52 | }
53 |
54 | * html .datalist form.datalist-sort-bar a span.direction
55 | {
56 | display: inline;
57 | }
58 |
59 | *:first-child+html form.datalist-sort-bar a.sort-asc,
60 | *:first-child+html .datalist form.datalist-sort-bar a.sort-desc
61 | {
62 | display: inline-block;
63 | text-indent: -1000em;
64 | cursor: pointer;
65 | width: 11px;
66 | }
67 |
68 | * html .datalist form.datalist-sort-bar a.sort-asc,
69 | * html .datalist form.datalist-sort-bar a.sort-desc,
70 | .datalist form.datalist-sort-bar span.sort-asc,
71 | .datalist form.datalist-sort-bar span.sort-desc
72 | {
73 | display: -moz-inline-box;
74 | display: inline-block;
75 | text-indent: -1000em;
76 | cursor: pointer;
77 | width: 11px;
78 | height: 6px;
79 | }
80 |
81 | * html .datalist form.datalist-sort-bar a.sort-asc,
82 | * html .datalist form.datalist-sort-bar a.sort-desc
83 | {
84 | cursor: pointer;
85 | }
86 |
87 | *:first-child+html .datalist form.datalist-sort-bar a.sort-asc
88 | {
89 | /* background: url(/weblocks-common/pub/images/widget/datalist/up_arrow_link.png) no-repeat right center;*/
90 | }
91 |
92 | * html .datalist form.datalist-sort-bar a.sort-asc
93 | {
94 | /* background: url(/weblocks-common/pub/images/widget/datalist/up_arrow_link.png) no-repeat right center;*/
95 | }
96 |
97 | *:first-child+html .datalist form.datalist-sort-bar a.sort-desc
98 | {
99 | /* background: url(/weblocks-common/pub/images/widget/datalist/down_arrow_link.png) no-repeat right center;*/
100 | }
101 |
102 | * html .datalist form.datalist-sort-bar a.sort-desc
103 | {
104 | /* background: url(/weblocks-common/pub/images/widget/datalist/down_arrow_link.png) no-repeat right center;*/
105 | }
106 |
107 | .datalist form.datalist-sort-bar span.sort-asc,
108 | .datalist form.datalist-sort-bar span.sort-desc
109 | {
110 | cursor: default;
111 | }
112 |
113 | /* No Script Arrow */
114 | .datalist form.datalist-sort-bar span.sort-desc
115 | {
116 | /* background: url(/weblocks-common/pub/images/widget/datalist/down_arrow.png) no-repeat right center;*/
117 | }
118 |
119 | .datalist form.datalist-sort-bar span.sort-asc
120 | {
121 | /* background: url(/weblocks-common/pub/images/widget/datalist/up_arrow.png) no-repeat right center;*/
122 | }
123 |
124 | /* Some colors */
125 | .datalist form.datalist-sort-bar span
126 | {
127 | color: gray;
128 | }
129 |
130 | /* Lists */
131 | .datalist ol, .datalist ul
132 | {
133 | margin: 0;
134 | padding: 0;
135 | list-style-type: none;
136 | }
137 |
138 | .datalist .datalist-body .view
139 | {
140 | width: 100%;
141 | }
142 |
143 | .datalist form.operations-form fieldset .operations
144 | {
145 | margin-top: -0.75em;
146 | }
147 |
148 | /* IE6 and IE7 fix for gaps between list items Note, once we set
149 | element to inline, we need to reset inner elements to block */
150 | .datalist .datalist-body ol li,
151 | .datalist .datalist-body ul li
152 | {
153 | display: inline;
154 | }
155 |
156 | .datalist .datalist-body ol li li,
157 | .datalist .datalist-body ul li li
158 | {
159 | display: block;
160 | }
161 |
162 | /* Remove view headers in the body */
163 | .datalist .datalist-body .view h1
164 | {
165 | display: none;
166 | }
167 |
168 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/scripts/builder.js:
--------------------------------------------------------------------------------
1 | // script.aculo.us builder.js v1.7.1_beta3, Fri May 25 17:19:41 +0200 2007
2 |
3 | // Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
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 | var Builder = {
9 | NODEMAP: {
10 | AREA: 'map',
11 | CAPTION: 'table',
12 | COL: 'table',
13 | COLGROUP: 'table',
14 | LEGEND: 'fieldset',
15 | OPTGROUP: 'select',
16 | OPTION: 'select',
17 | PARAM: 'object',
18 | TBODY: 'table',
19 | TD: 'table',
20 | TFOOT: 'table',
21 | TH: 'table',
22 | THEAD: 'table',
23 | TR: 'table'
24 | },
25 | // note: For Firefox < 1.5, OPTION and OPTGROUP tags are currently broken,
26 | // due to a Firefox bug
27 | node: function(elementName) {
28 | elementName = elementName.toUpperCase();
29 |
30 | // try innerHTML approach
31 | var parentTag = this.NODEMAP[elementName] || 'div';
32 | var parentElement = document.createElement(parentTag);
33 | try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707
34 | parentElement.innerHTML = "<" + elementName + ">" + elementName + ">";
35 | } catch(e) {}
36 | var element = parentElement.firstChild || null;
37 |
38 | // see if browser added wrapping tags
39 | if(element && (element.tagName.toUpperCase() != elementName))
40 | element = element.getElementsByTagName(elementName)[0];
41 |
42 | // fallback to createElement approach
43 | if(!element) element = document.createElement(elementName);
44 |
45 | // abort if nothing could be created
46 | if(!element) return;
47 |
48 | // attributes (or text)
49 | if(arguments[1])
50 | if(this._isStringOrNumber(arguments[1]) ||
51 | (arguments[1] instanceof Array) ||
52 | arguments[1].tagName) {
53 | this._children(element, arguments[1]);
54 | } else {
55 | var attrs = this._attributes(arguments[1]);
56 | if(attrs.length) {
57 | try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707
58 | parentElement.innerHTML = "<" +elementName + " " +
59 | attrs + ">" + elementName + ">";
60 | } catch(e) {}
61 | element = parentElement.firstChild || null;
62 | // workaround firefox 1.0.X bug
63 | if(!element) {
64 | element = document.createElement(elementName);
65 | for(attr in arguments[1])
66 | element[attr == 'class' ? 'className' : attr] = arguments[1][attr];
67 | }
68 | if(element.tagName.toUpperCase() != elementName)
69 | element = parentElement.getElementsByTagName(elementName)[0];
70 | }
71 | }
72 |
73 | // text, or array of children
74 | if(arguments[2])
75 | this._children(element, arguments[2]);
76 |
77 | return element;
78 | },
79 | _text: function(text) {
80 | return document.createTextNode(text);
81 | },
82 |
83 | ATTR_MAP: {
84 | 'className': 'class',
85 | 'htmlFor': 'for'
86 | },
87 |
88 | _attributes: function(attributes) {
89 | var attrs = [];
90 | for(attribute in attributes)
91 | attrs.push((attribute in this.ATTR_MAP ? this.ATTR_MAP[attribute] : attribute) +
92 | '="' + attributes[attribute].toString().escapeHTML().gsub(/"/,'"') + '"');
93 | return attrs.join(" ");
94 | },
95 | _children: function(element, children) {
96 | if(children.tagName) {
97 | element.appendChild(children);
98 | return;
99 | }
100 | if(typeof children=='object') { // array can hold nodes and text
101 | children.flatten().each( function(e) {
102 | if(typeof e=='object')
103 | element.appendChild(e)
104 | else
105 | if(Builder._isStringOrNumber(e))
106 | element.appendChild(Builder._text(e));
107 | });
108 | } else
109 | if(Builder._isStringOrNumber(children))
110 | element.appendChild(Builder._text(children));
111 | },
112 | _isStringOrNumber: function(param) {
113 | return(typeof param=='string' || typeof param=='number');
114 | },
115 | build: function(html) {
116 | var element = this.node('div');
117 | $(element).update(html.strip());
118 | return element.down();
119 | },
120 | dump: function(scope) {
121 | if(typeof scope != 'object' && typeof scope != 'function') scope = window; //global scope
122 |
123 | var tags = ("A ABBR ACRONYM ADDRESS APPLET AREA B BASE BASEFONT BDO BIG BLOCKQUOTE BODY " +
124 | "BR BUTTON CAPTION CENTER CITE CODE COL COLGROUP DD DEL DFN DIR DIV DL DT EM FIELDSET " +
125 | "FONT FORM FRAME FRAMESET H1 H2 H3 H4 H5 H6 HEAD HR HTML I IFRAME IMG INPUT INS ISINDEX "+
126 | "KBD LABEL LEGEND LI LINK MAP MENU META NOFRAMES NOSCRIPT OBJECT OL OPTGROUP OPTION P "+
127 | "PARAM PRE Q S SAMP SCRIPT SELECT SMALL SPAN STRIKE STRONG STYLE SUB SUP TABLE TBODY TD "+
128 | "TEXTAREA TFOOT TH THEAD TITLE TR TT U UL VAR").split(/\s+/);
129 |
130 | tags.each( function(tag){
131 | scope[tag] = function() {
132 | return Builder.node.apply(Builder, [tag].concat($A(arguments)));
133 | }
134 | });
135 | }
136 | }
137 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/vzn/main.0.css:
--------------------------------------------------------------------------------
1 |
2 | body
3 | {
4 | font-size: small;
5 | font-family: arial, helvetica, sans-serif;
6 | }
7 |
8 | a
9 | {
10 | color: #A61E2E;
11 | }
12 |
13 | .view
14 | {
15 | /* background: #ecf8d7 url(/weblocks-common/pub/images/widget/top_background.png) repeat-x;*/
16 | margin-bottom: 1em;
17 | _height: 0; /* IE specific hasLayout fix */
18 | }
19 |
20 | .view h1, .view fieldset h1
21 | {
22 | background-color: #ecf8d7;
23 | }
24 |
25 | .view .extra-top-1
26 | {
27 | height: 7px;
28 | /* background: url(/weblocks-common/pub/images/widget/top_left.png) no-repeat top left;*/
29 | overflow: hidden;
30 | }
31 |
32 | .view .extra-top-2
33 | {
34 | height: 7px;
35 | margin-top: -7px;
36 | /* background: url(/weblocks-common/pub/images/widget/top_right.png) no-repeat top right;*/
37 | border-bottom: 1px solid #dbeac1;
38 | overflow: hidden;
39 | }
40 |
41 | .view h1, .view fieldset h1,
42 | .long-form fieldset .validation-errors-summary h2.error-count
43 | {
44 | margin: 0;
45 | padding: 0;
46 | padding-left: 0.4em;
47 | }
48 |
49 | .view h1, .view fieldset h1, .table table caption, div.empty p,
50 | .view .empty-navigation, .view ul li, .view fieldset ul li,
51 | .view table thead tr th,
52 | .view fieldset div.submit, .view div.submit,
53 | .long-form fieldset .validation-errors-summary h2.error-count,
54 | .form fieldset .validation-errors-summary .non-field-validation-errors
55 | {
56 | border-top: 1px solid #fcfef6;
57 | }
58 |
59 | .view h1, .view fieldset h1, .table table caption, div.empty p,
60 | .view .empty-navigation, .view ul li, .view fieldset ul li,
61 | .view table thead tr th,
62 | .view fieldset div.submit, .view div.submit,
63 | .long-form fieldset .validation-errors-summary,
64 | .form fieldset .validation-errors-summary .non-field-validation-errors
65 | {
66 | border-bottom: 1px solid #dbeac1;
67 | }
68 |
69 | .view h1, .view fieldset h1, .table table caption, div.empty p,
70 | .view .empty-navigation, .view ul, .view fieldset ul, .table table,
71 | .view fieldset div.submit, .view div.submit,
72 | .long-form fieldset .validation-errors-summary h2.error-count
73 | {
74 | background:#ecf8d7;
75 | }
76 |
77 | h1, h2
78 | {
79 | font-size: large;
80 | color: #29364F;
81 | font-weight: bold;
82 | font-family: Garamond, New York, serif;
83 | }
84 |
85 | .view h1 .action, .view fieldset h1 .action
86 | {
87 | display: none;
88 | }
89 |
90 | .view ul, .view fieldset ul, .table table, .view fieldset div.submit,
91 | .view div.submit
92 | {
93 | padding-left: 0;
94 | margin: 0;
95 | }
96 |
97 | .view ul li, .view fieldset ul li, .menu ul li a
98 | {
99 | list-style: none;
100 | padding-left: 1.5em;
101 | }
102 |
103 | .view div.submit, .form fieldset div.submit
104 | {
105 | padding-left: 13.5em;
106 | }
107 |
108 | .view ul li .label, .view fieldset ul li label span.slot-name,
109 | .table table thead
110 | {
111 | color: #808080;
112 | font-weight: bold;
113 | }
114 |
115 | .view ul li .label, .view fieldset ul li label span.slot-name
116 | {
117 | display: -moz-inline-box;
118 | display: inline-block;
119 | width: 12em;
120 | }
121 |
122 | .view .extra-bottom-1
123 | {
124 | height: 7px;
125 | /* background: url(/weblocks-common/pub/images/widget/bottom_background.png) repeat-x top;*/
126 | overflow: hidden;
127 | }
128 |
129 | .view .extra-bottom-2
130 | {
131 | height: 7px;
132 | margin-top: -7px;
133 | /* background: url(/weblocks-common/pub/images/widget/bottom_left.png) no-repeat top left;*/
134 | overflow: hidden;
135 | }
136 |
137 | .view .extra-bottom-3
138 | {
139 | height: 7px;
140 | margin-top: -7px;
141 | /* background: url(/weblocks-common/pub/images/widget/bottom_right.png) no-repeat top right;*/
142 | overflow: hidden;
143 | }
144 |
145 | .missing
146 | {
147 | font-style: italic;
148 | color: #808080;
149 | }
150 |
151 | input[type=hidden]
152 | {
153 | visibility: hidden;
154 | }
155 |
156 | #ajax-progress
157 | {
158 | position: fixed;
159 | right: 0;
160 | top: 0;
161 | z-index: 1000;
162 | }
163 |
164 | /* IE 6 specific progress bar fix */
165 | * html #ajax-progress
166 | {
167 | position: absolute;
168 | left: expression((documentElement.scrollLeft
169 | + (documentElement.clientWidth - this.clientWidth))
170 | + 'px')
171 | top: expression(documentElement.scrollTop + 'px');
172 | }
173 |
174 | /* Common styles for form, and data */
175 | .data, .form
176 | {
177 | width: 27em;
178 | }
179 |
180 | /* Align text that spans in multiple lines in data and form views */
181 | .form ul li span.value, .data ul li span.value {
182 | display: inline-block;
183 | width: 70%;
184 | }
185 |
186 | .form ul li span.slot-name, .data ul li span.label {
187 | vertical-align: top;
188 | }
189 |
190 | /* Close button */
191 | span.close-button
192 | {
193 | display: block;
194 | width: 15px;
195 | height: 15px;
196 | overflow: hidden;
197 | }
198 |
199 | span.close-button a
200 | {
201 | /* background: url(/weblocks-common/pub/images/close.png) no-repeat top left; */
202 | padding-left: 1000em;
203 | }
204 |
205 | span.close-button a:hover
206 | {
207 | /* background: url(/weblocks-common/pub/images/close_hl.png) no-repeat top left; */
208 | }
209 |
210 | /* Total Items */
211 | span.total-items
212 | {
213 | color: gray;
214 | font-size: x-small;
215 | }
216 |
217 | /* Text */
218 | .ellipsis
219 | {
220 | color: gray;
221 | font-weight: bold;
222 | }
223 |
224 | p.text
225 | {
226 | margin: 0;
227 | }
228 |
229 | .view ul li p.text
230 | {
231 | margin-left: 0.5em;
232 | }
233 |
234 | /* No elements */
235 | div.empty p
236 | {
237 | padding-left: 0.5em;
238 | margin: 0;
239 | }
240 |
241 | div.empty p span.caption
242 | {
243 | color: #29364F;
244 | font-weight: bold;
245 | font-family: Garamond, New York, serif;
246 | }
247 |
248 | .collapsible-heading {
249 | cursor:default;
250 | }
251 |
252 | .collapsible-container.expanded {
253 | display:block;
254 | }
255 |
256 | .collapsible-heading.expanded:after {
257 | content:" (click to collapse)";
258 | font-size:small;
259 | color:gray;
260 |
261 | }
262 |
263 | .collapsible-container.collapsed {
264 | display:none;
265 | }
266 |
267 | .collapsible-heading.collapsed:after {
268 | content:" (click to expand)";
269 | font-size:small;
270 | color:gray;
271 | }
272 |
273 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/stylesheets/main.css:
--------------------------------------------------------------------------------
1 |
2 | body
3 | {
4 | font-size: small;
5 | font-family: arial, helvetica, sans-serif;
6 | }
7 |
8 | a
9 | {
10 | color: #A61E2E;
11 | }
12 |
13 | .view
14 | {
15 | /* background: #ecf8d7 url(/weblocks-common/pub/images/widget/top_background.png) repeat-x;*/
16 | margin-bottom: 1em;
17 | _height: 0; /* IE specific hasLayout fix */
18 | }
19 |
20 | .view h1, .view fieldset h1
21 | {
22 | background-color: #ecf8d7;
23 | }
24 |
25 | .view .extra-top-1
26 | {
27 | height: 7px;
28 | /* background: url(/weblocks-common/pub/images/widget/top_left.png) no-repeat top left;*/
29 | overflow: hidden;
30 | }
31 |
32 | .view .extra-top-2
33 | {
34 | height: 7px;
35 | margin-top: -7px;
36 | /* background: url(/weblocks-common/pub/images/widget/top_right.png) no-repeat top right;*/
37 | border-bottom: 1px solid #dbeac1;
38 | overflow: hidden;
39 | }
40 |
41 | .view h1, .view fieldset h1,
42 | .long-form fieldset .validation-errors-summary h2.error-count
43 | {
44 | margin: 0;
45 | padding: 0;
46 | padding-left: 0.4em;
47 | }
48 |
49 | .view h1, .view fieldset h1, .table table caption, div.empty p,
50 | .view .empty-navigation, .view ul li, .view fieldset ul li,
51 | .view table thead tr th,
52 | .view fieldset div.submit, .view div.submit,
53 | .long-form fieldset .validation-errors-summary h2.error-count,
54 | .form fieldset .validation-errors-summary .non-field-validation-errors
55 | {
56 | border-top: 1px solid #fcfef6;
57 | }
58 |
59 | .view h1, .view fieldset h1, .table table caption, div.empty p,
60 | .view .empty-navigation, .view ul li, .view fieldset ul li,
61 | .view table thead tr th,
62 | .view fieldset div.submit, .view div.submit,
63 | .long-form fieldset .validation-errors-summary,
64 | .form fieldset .validation-errors-summary .non-field-validation-errors
65 | {
66 | border-bottom: 1px solid #dbeac1;
67 | }
68 |
69 | .view h1, .view fieldset h1, .table table caption, div.empty p,
70 | .view .empty-navigation, .view ul, .view fieldset ul, .table table,
71 | .view fieldset div.submit, .view div.submit,
72 | .long-form fieldset .validation-errors-summary h2.error-count
73 | {
74 | background:#ecf8d7;
75 | }
76 |
77 | h1, h2
78 | {
79 | font-size: large;
80 | color: #29364F;
81 | font-weight: bold;
82 | font-family: Garamond, New York, serif;
83 | }
84 |
85 | .view h1 .action, .view fieldset h1 .action
86 | {
87 | display: none;
88 | }
89 |
90 | .view ul, .view fieldset ul, .table table, .view fieldset div.submit,
91 | .view div.submit
92 | {
93 | padding-left: 0;
94 | margin: 0;
95 | }
96 |
97 | .view ul li, .view fieldset ul li, .menu ul li a
98 | {
99 | list-style: none;
100 | padding-left: 1.5em;
101 | }
102 |
103 | .view div.submit, .form fieldset div.submit
104 | {
105 | padding-left: 13.5em;
106 | }
107 |
108 | .view ul li .label, .view fieldset ul li label span.slot-name,
109 | .table table thead
110 | {
111 | color: #808080;
112 | font-weight: bold;
113 | }
114 |
115 | .view ul li .label, .view fieldset ul li label span.slot-name
116 | {
117 | display: -moz-inline-box;
118 | display: inline-block;
119 | width: 12em;
120 | }
121 |
122 | .view .extra-bottom-1
123 | {
124 | height: 7px;
125 | /* background: url(/weblocks-common/pub/images/widget/bottom_background.png) repeat-x top;*/
126 | overflow: hidden;
127 | }
128 |
129 | .view .extra-bottom-2
130 | {
131 | height: 7px;
132 | margin-top: -7px;
133 | /* background: url(/weblocks-common/pub/images/widget/bottom_left.png) no-repeat top left;*/
134 | overflow: hidden;
135 | }
136 |
137 | .view .extra-bottom-3
138 | {
139 | height: 7px;
140 | margin-top: -7px;
141 | /* background: url(/weblocks-common/pub/images/widget/bottom_right.png) no-repeat top right;*/
142 | overflow: hidden;
143 | }
144 |
145 | .missing
146 | {
147 | font-style: italic;
148 | color: #808080;
149 | }
150 |
151 | input[type=hidden]
152 | {
153 | visibility: hidden;
154 | }
155 |
156 | #ajax-progress
157 | {
158 | position: fixed;
159 | right: 0;
160 | top: 0;
161 | z-index: 1000;
162 | }
163 |
164 | /* IE 6 specific progress bar fix */
165 | * html #ajax-progress
166 | {
167 | position: absolute;
168 | left: expression((documentElement.scrollLeft
169 | + (documentElement.clientWidth - this.clientWidth))
170 | + 'px')
171 | top: expression(documentElement.scrollTop + 'px');
172 | }
173 |
174 | /* Common styles for form, and data */
175 | .data, .form
176 | {
177 | width: 27em;
178 | }
179 |
180 | /* Align text that spans in multiple lines in data and form views */
181 | .form ul li span.value, .data ul li span.value {
182 | display: inline-block;
183 | width: 70%;
184 | }
185 |
186 | .form ul li span.slot-name, .data ul li span.label {
187 | vertical-align: top;
188 | }
189 |
190 | /* Close button */
191 | span.close-button
192 | {
193 | display: block;
194 | width: 15px;
195 | height: 15px;
196 | overflow: hidden;
197 | }
198 |
199 | span.close-button a
200 | {
201 | /* background: url(/weblocks-common/pub/images/close.png) no-repeat top left; */
202 | padding-left: 1000em;
203 | }
204 |
205 | span.close-button a:hover
206 | {
207 | /* background: url(/weblocks-common/pub/images/close_hl.png) no-repeat top left; */
208 | }
209 |
210 | /* Total Items */
211 | span.total-items
212 | {
213 | color: gray;
214 | font-size: x-small;
215 | }
216 |
217 | /* Text */
218 | .ellipsis
219 | {
220 | color: gray;
221 | font-weight: bold;
222 | }
223 |
224 | p.text
225 | {
226 | margin: 0;
227 | }
228 |
229 | .view ul li p.text
230 | {
231 | margin-left: 0.5em;
232 | }
233 |
234 | /* No elements */
235 | div.empty p
236 | {
237 | padding-left: 0.5em;
238 | margin: 0;
239 | }
240 |
241 | div.empty p span.caption
242 | {
243 | color: #29364F;
244 | font-weight: bold;
245 | font-family: Garamond, New York, serif;
246 | }
247 |
248 | .collapsible-heading {
249 | cursor:default;
250 | }
251 |
252 | .collapsible-container.expanded {
253 | display:block;
254 | }
255 |
256 | .collapsible-heading.expanded:after {
257 | content:" (click to collapse)";
258 | font-size:small;
259 | color:gray;
260 |
261 | }
262 |
263 | .collapsible-container.collapsed {
264 | display:none;
265 | }
266 |
267 | .collapsible-heading.collapsed:after {
268 | content:" (click to expand)";
269 | font-size:small;
270 | color:gray;
271 | }
272 |
273 | #toplevel-nav .menu {
274 | float:left;
275 | }
276 |
277 | #toplevel-nav .navigation-body {
278 | float: left;
279 | padding-left: 10px;
280 | }
281 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/scripts/shortcut.js:
--------------------------------------------------------------------------------
1 | /**
2 | * http://www.openjs.com/scripts/events/keyboard_shortcuts/
3 | * Version : 2.01.A
4 | * By Binny V A
5 | * License : BSD
6 | */
7 | shortcut = {
8 | 'all_shortcuts':{},//All the shortcuts are stored in this array
9 | 'add': function(shortcut_combination,callback,opt) {
10 | //Provide a set of default options
11 | var default_options = {
12 | 'type':'keydown',
13 | 'propagate':false,
14 | 'disable_in_input':false,
15 | 'target':document,
16 | 'keycode':false
17 | }
18 | if(!opt) opt = default_options;
19 | else {
20 | for(var dfo in default_options) {
21 | if(typeof opt[dfo] == 'undefined') opt[dfo] = default_options[dfo];
22 | }
23 | }
24 |
25 | var ele = opt.target
26 | if(typeof opt.target == 'string') ele = document.getElementById(opt.target);
27 | var ths = this;
28 | shortcut_combination = shortcut_combination.toLowerCase();
29 |
30 | //The function to be called at keypress
31 | var func = function(e) {
32 | e = e || window.event;
33 |
34 | if(opt['disable_in_input']) { //Don't enable shortcut keys in Input, Textarea fields
35 | var element;
36 | if(e.target) element=e.target;
37 | else if(e.srcElement) element=e.srcElement;
38 | if(element.nodeType==3) element=element.parentNode;
39 |
40 | if(element.tagName == 'INPUT' || element.tagName == 'TEXTAREA'
41 | || element.tagName == 'SELECT') return;
42 | }
43 |
44 | //Find Which key is pressed
45 | if (e.keyCode) code = e.keyCode;
46 | else if (e.which) code = e.which;
47 | var character = String.fromCharCode(code).toLowerCase();
48 |
49 | if(code == 188) character=","; //If the user presses , when the type is onkeydown
50 | if(code == 190) character="."; //If the user presses , when the type is onkeydown
51 |
52 | var keys = shortcut_combination.split("+");
53 | //Key Pressed - counts the number of valid keypresses - if it is same as the number of keys, the shortcut function is invoked
54 | var kp = 0;
55 |
56 | //Work around for stupid Shift key bug created by using lowercase - as a result the shift+num combination was broken
57 | var shift_nums = {
58 | "`":"~",
59 | "1":"!",
60 | "2":"@",
61 | "3":"#",
62 | "4":"$",
63 | "5":"%",
64 | "6":"^",
65 | "7":"&",
66 | "8":"*",
67 | "9":"(",
68 | "0":")",
69 | "-":"_",
70 | "=":"+",
71 | ";":":",
72 | "'":"\"",
73 | ",":"<",
74 | ".":">",
75 | "/":"?",
76 | "\\":"|"
77 | }
78 | //Special Keys - and their codes
79 | var special_keys = {
80 | 'esc':27,
81 | 'escape':27,
82 | 'tab':9,
83 | 'space':32,
84 | 'return':13,
85 | 'enter':13,
86 | 'backspace':8,
87 |
88 | 'scrolllock':145,
89 | 'scroll_lock':145,
90 | 'scroll':145,
91 | 'capslock':20,
92 | 'caps_lock':20,
93 | 'caps':20,
94 | 'numlock':144,
95 | 'num_lock':144,
96 | 'num':144,
97 |
98 | 'pause':19,
99 | 'break':19,
100 |
101 | 'insert':45,
102 | 'home':36,
103 | 'delete':46,
104 | 'end':35,
105 |
106 | 'pageup':33,
107 | 'page_up':33,
108 | 'pu':33,
109 |
110 | 'pagedown':34,
111 | 'page_down':34,
112 | 'pd':34,
113 |
114 | 'left':37,
115 | 'up':38,
116 | 'right':39,
117 | 'down':40,
118 |
119 | 'f1':112,
120 | 'f2':113,
121 | 'f3':114,
122 | 'f4':115,
123 | 'f5':116,
124 | 'f6':117,
125 | 'f7':118,
126 | 'f8':119,
127 | 'f9':120,
128 | 'f10':121,
129 | 'f11':122,
130 | 'f12':123
131 | }
132 |
133 | var modifiers = {
134 | shift: { wanted:false, pressed:false},
135 | ctrl : { wanted:false, pressed:false},
136 | alt : { wanted:false, pressed:false},
137 | meta : { wanted:false, pressed:false} //Meta is Mac specific
138 | };
139 |
140 | if(e.ctrlKey) modifiers.ctrl.pressed = true;
141 | if(e.shiftKey) modifiers.shift.pressed = true;
142 | if(e.altKey) modifiers.alt.pressed = true;
143 | if(e.metaKey) modifiers.meta.pressed = true;
144 |
145 | for(var i=0; k=keys[i],i 1) { //If it is a special key
162 | if(special_keys[k] == code) kp++;
163 |
164 | } else if(opt['keycode']) {
165 | if(opt['keycode'] == code) kp++;
166 |
167 | } else { //The special keys did not match
168 | if(character == k) kp++;
169 | else {
170 | if(shift_nums[character] && e.shiftKey) { //Stupid Shift key bug created by using lowercase
171 | character = shift_nums[character];
172 | if(character == k) kp++;
173 | }
174 | }
175 | }
176 | }
177 |
178 | if(kp == keys.length &&
179 | modifiers.ctrl.pressed == modifiers.ctrl.wanted &&
180 | modifiers.shift.pressed == modifiers.shift.wanted &&
181 | modifiers.alt.pressed == modifiers.alt.wanted &&
182 | modifiers.meta.pressed == modifiers.meta.wanted) {
183 | callback(e);
184 |
185 | if(!opt['propagate']) { //Stop the event
186 | //e.cancelBubble is supported by IE - this will kill the bubbling process.
187 | e.cancelBubble = true;
188 | e.returnValue = false;
189 |
190 | //e.stopPropagation works in Firefox.
191 | if (e.stopPropagation) {
192 | e.stopPropagation();
193 | e.preventDefault();
194 | }
195 | return false;
196 | }
197 | }
198 | }
199 | this.all_shortcuts[shortcut_combination] = {
200 | 'callback':func,
201 | 'target':ele,
202 | 'event': opt['type']
203 | };
204 | //Attach the function with the event
205 | if(ele.addEventListener) ele.addEventListener(opt['type'], func, false);
206 | else if(ele.attachEvent) ele.attachEvent('on'+opt['type'], func);
207 | else ele['on'+opt['type']] = func;
208 | },
209 |
210 | //Remove the shortcut - just specify the shortcut and I will remove the binding
211 | 'remove':function(shortcut_combination) {
212 | shortcut_combination = shortcut_combination.toLowerCase();
213 | var binding = this.all_shortcuts[shortcut_combination];
214 | delete(this.all_shortcuts[shortcut_combination])
215 | if(!binding) return;
216 | var type = binding['event'];
217 | var ele = binding['target'];
218 | var callback = binding['callback'];
219 |
220 | if(ele.detachEvent) ele.detachEvent('on'+type, callback);
221 | else if(ele.removeEventListener) ele.removeEventListener(type, callback, false);
222 | else ele['on'+type] = false;
223 | }
224 | }
225 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/scripts/vzn/shortcut.0.js:
--------------------------------------------------------------------------------
1 | /**
2 | * http://www.openjs.com/scripts/events/keyboard_shortcuts/
3 | * Version : 2.01.A
4 | * By Binny V A
5 | * License : BSD
6 | */
7 | shortcut = {
8 | 'all_shortcuts':{},//All the shortcuts are stored in this array
9 | 'add': function(shortcut_combination,callback,opt) {
10 | //Provide a set of default options
11 | var default_options = {
12 | 'type':'keydown',
13 | 'propagate':false,
14 | 'disable_in_input':false,
15 | 'target':document,
16 | 'keycode':false
17 | }
18 | if(!opt) opt = default_options;
19 | else {
20 | for(var dfo in default_options) {
21 | if(typeof opt[dfo] == 'undefined') opt[dfo] = default_options[dfo];
22 | }
23 | }
24 |
25 | var ele = opt.target
26 | if(typeof opt.target == 'string') ele = document.getElementById(opt.target);
27 | var ths = this;
28 | shortcut_combination = shortcut_combination.toLowerCase();
29 |
30 | //The function to be called at keypress
31 | var func = function(e) {
32 | e = e || window.event;
33 |
34 | if(opt['disable_in_input']) { //Don't enable shortcut keys in Input, Textarea fields
35 | var element;
36 | if(e.target) element=e.target;
37 | else if(e.srcElement) element=e.srcElement;
38 | if(element.nodeType==3) element=element.parentNode;
39 |
40 | if(element.tagName == 'INPUT' || element.tagName == 'TEXTAREA'
41 | || element.tagName == 'SELECT') return;
42 | }
43 |
44 | //Find Which key is pressed
45 | if (e.keyCode) code = e.keyCode;
46 | else if (e.which) code = e.which;
47 | var character = String.fromCharCode(code).toLowerCase();
48 |
49 | if(code == 188) character=","; //If the user presses , when the type is onkeydown
50 | if(code == 190) character="."; //If the user presses , when the type is onkeydown
51 |
52 | var keys = shortcut_combination.split("+");
53 | //Key Pressed - counts the number of valid keypresses - if it is same as the number of keys, the shortcut function is invoked
54 | var kp = 0;
55 |
56 | //Work around for stupid Shift key bug created by using lowercase - as a result the shift+num combination was broken
57 | var shift_nums = {
58 | "`":"~",
59 | "1":"!",
60 | "2":"@",
61 | "3":"#",
62 | "4":"$",
63 | "5":"%",
64 | "6":"^",
65 | "7":"&",
66 | "8":"*",
67 | "9":"(",
68 | "0":")",
69 | "-":"_",
70 | "=":"+",
71 | ";":":",
72 | "'":"\"",
73 | ",":"<",
74 | ".":">",
75 | "/":"?",
76 | "\\":"|"
77 | }
78 | //Special Keys - and their codes
79 | var special_keys = {
80 | 'esc':27,
81 | 'escape':27,
82 | 'tab':9,
83 | 'space':32,
84 | 'return':13,
85 | 'enter':13,
86 | 'backspace':8,
87 |
88 | 'scrolllock':145,
89 | 'scroll_lock':145,
90 | 'scroll':145,
91 | 'capslock':20,
92 | 'caps_lock':20,
93 | 'caps':20,
94 | 'numlock':144,
95 | 'num_lock':144,
96 | 'num':144,
97 |
98 | 'pause':19,
99 | 'break':19,
100 |
101 | 'insert':45,
102 | 'home':36,
103 | 'delete':46,
104 | 'end':35,
105 |
106 | 'pageup':33,
107 | 'page_up':33,
108 | 'pu':33,
109 |
110 | 'pagedown':34,
111 | 'page_down':34,
112 | 'pd':34,
113 |
114 | 'left':37,
115 | 'up':38,
116 | 'right':39,
117 | 'down':40,
118 |
119 | 'f1':112,
120 | 'f2':113,
121 | 'f3':114,
122 | 'f4':115,
123 | 'f5':116,
124 | 'f6':117,
125 | 'f7':118,
126 | 'f8':119,
127 | 'f9':120,
128 | 'f10':121,
129 | 'f11':122,
130 | 'f12':123
131 | }
132 |
133 | var modifiers = {
134 | shift: { wanted:false, pressed:false},
135 | ctrl : { wanted:false, pressed:false},
136 | alt : { wanted:false, pressed:false},
137 | meta : { wanted:false, pressed:false} //Meta is Mac specific
138 | };
139 |
140 | if(e.ctrlKey) modifiers.ctrl.pressed = true;
141 | if(e.shiftKey) modifiers.shift.pressed = true;
142 | if(e.altKey) modifiers.alt.pressed = true;
143 | if(e.metaKey) modifiers.meta.pressed = true;
144 |
145 | for(var i=0; k=keys[i],i 1) { //If it is a special key
162 | if(special_keys[k] == code) kp++;
163 |
164 | } else if(opt['keycode']) {
165 | if(opt['keycode'] == code) kp++;
166 |
167 | } else { //The special keys did not match
168 | if(character == k) kp++;
169 | else {
170 | if(shift_nums[character] && e.shiftKey) { //Stupid Shift key bug created by using lowercase
171 | character = shift_nums[character];
172 | if(character == k) kp++;
173 | }
174 | }
175 | }
176 | }
177 |
178 | if(kp == keys.length &&
179 | modifiers.ctrl.pressed == modifiers.ctrl.wanted &&
180 | modifiers.shift.pressed == modifiers.shift.wanted &&
181 | modifiers.alt.pressed == modifiers.alt.wanted &&
182 | modifiers.meta.pressed == modifiers.meta.wanted) {
183 | callback(e);
184 |
185 | if(!opt['propagate']) { //Stop the event
186 | //e.cancelBubble is supported by IE - this will kill the bubbling process.
187 | e.cancelBubble = true;
188 | e.returnValue = false;
189 |
190 | //e.stopPropagation works in Firefox.
191 | if (e.stopPropagation) {
192 | e.stopPropagation();
193 | e.preventDefault();
194 | }
195 | return false;
196 | }
197 | }
198 | }
199 | this.all_shortcuts[shortcut_combination] = {
200 | 'callback':func,
201 | 'target':ele,
202 | 'event': opt['type']
203 | };
204 | //Attach the function with the event
205 | if(ele.addEventListener) ele.addEventListener(opt['type'], func, false);
206 | else if(ele.attachEvent) ele.attachEvent('on'+opt['type'], func);
207 | else ele['on'+opt['type']] = func;
208 | },
209 |
210 | //Remove the shortcut - just specify the shortcut and I will remove the binding
211 | 'remove':function(shortcut_combination) {
212 | shortcut_combination = shortcut_combination.toLowerCase();
213 | var binding = this.all_shortcuts[shortcut_combination];
214 | delete(this.all_shortcuts[shortcut_combination])
215 | if(!binding) return;
216 | var type = binding['event'];
217 | var ele = binding['target'];
218 | var callback = binding['callback'];
219 |
220 | if(ele.detachEvent) ele.detachEvent('on'+type, callback);
221 | else if(ele.removeEventListener) ele.removeEventListener(type, callback, false);
222 | else ele['on'+type] = false;
223 | }
224 | }
225 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/src/init-session.lisp:
--------------------------------------------------------------------------------
1 |
2 | (in-package :weblocks-selenium-tests-app)
3 | (defvar *demo-actions* nil)
4 |
5 | (defun get-upload-directory ()
6 | (merge-pathnames
7 | (make-pathname :directory '(:relative "upload"))
8 | (compute-webapp-public-files-path (weblocks:get-webapp 'weblocks-selenium-tests-app))))
9 |
10 | (defun file-field-demonstration-action (&rest args)
11 | (do-page
12 | (make-quickform
13 | (defview
14 | nil
15 | (:caption "File form field demo" :type form :persistp nil :enctype "multipart/form-data" :use-ajax-p nil)
16 | (file
17 | :present-as file-upload
18 | :parse-as (file-upload
19 | :upload-directory (get-upload-directory)
20 | :file-name :unique))))))
21 |
22 | (defun dialog-demonstration-action (&rest args)
23 | (let* ((widget))
24 | (setf widget (make-instance 'composite
25 | :widgets
26 | (list
27 | "Some dialog content"
28 | (lambda (&rest args)
29 | (render-link (lambda (&rest args)
30 | (answer widget t))
31 | "Close dialog")))))
32 | (do-dialog "Dialog title" widget)))
33 |
34 | (defun navigation-demonstration-action (&rest args)
35 | (let ((widget)
36 | (navigation))
37 | (setf navigation (make-navigation
38 | "toplevel-nav"
39 | (list "First pane" (make-widget "First pane value") nil)
40 | (list "Second pane" (make-widget "Second pane value") "second-pane")
41 | (list "Third pane (first nested pane)"
42 | (make-navigation
43 | "second-level-nav-1"
44 | (list "First nested pane" (make-widget "First nested pane") nil)
45 | (list "Second nested pane" (make-widget "Second nested pane") "second-nested-pane")
46 | (list "Third nested pane (with 2-level nesting)"
47 | (make-navigation
48 | "third-level-nav"
49 | (list "First nested pane" (make-widget "First nested pane") nil)
50 | (list "Second nested pane" (make-widget "Second nested pane") "second-nested-pane"))
51 | "third-nested-pane")) "third-pane")
52 | (list "Fourth pane (second nested pane)"
53 | (make-navigation
54 | "second-level-nav-2"
55 | (list "First nested pane" (make-widget "First nested pane"))
56 | (list "Second nested pane" (make-widget "Second nested pane") "second-nested-pane")) "fourth-pane")
57 | (list "Fifth pane" (make-widget "Fifth pane") "fifth-pane")
58 | (list "Sixth pane (third nested pane)"
59 | (make-navigation
60 | "second-level-nav-3"
61 | (list "First nested pane" (make-widget "First nested pane"))
62 | (list "Second nested pane" (make-widget "Second nested pane") "second-nested-pane")) "sixth-pane")))
63 | (setf widget
64 | (make-instance 'composite
65 | :widgets (list
66 | navigation
67 | (lambda (&rest args)
68 | (with-html
69 | (:div :style "clear:both"
70 | (render-link (lambda (&rest args)
71 | (answer widget t)) "back")))))))
72 | (do-page widget)))
73 |
74 | (defun define-demo-action (link-name action &key (prototype-engine-p t) (jquery-engine-p t))
75 | "Used to add action to demo list,
76 | :prototype-engine-p and :jquery-engine-p keys
77 | are responsive for displaying action in one or both demo applications"
78 | (push (list link-name action prototype-engine-p jquery-engine-p) *demo-actions*))
79 |
80 | (define-demo-action "File field form presentation" #'file-field-demonstration-action :jquery-engine-p nil)
81 | (define-demo-action "Dialog sample" #'dialog-demonstration-action :jquery-engine-p nil)
82 | (define-demo-action "Navigation sample" #'navigation-demonstration-action)
83 |
84 | ;; Define callback function to initialize new sessions
85 | (defun init-user-session-prototype (root)
86 | (setf (widget-children root)
87 | (list (lambda (&rest args)
88 | (with-html
89 | (:ul
90 | (loop for (link-title action display-for-prototype display-for-jquery) in (reverse *demo-actions*)
91 | if display-for-prototype
92 | do
93 | (cl-who:htm (:li (render-link action link-title))))))))))
94 |
95 | (defun init-user-session-jquery (root)
96 | (setf (widget-children root)
97 | (list (lambda (&rest args)
98 | (with-html
99 | (:ul
100 | (loop for (link-title action display-for-prototype display-for-jquery) in (reverse *demo-actions*)
101 | if display-for-jquery
102 | do
103 | (cl-who:htm (:li (render-link action link-title))))))))))
104 |
105 | (defun render-apps-list ()
106 | (let* ((uri-path (request-uri-path))
107 | (urls (mapcar #'weblocks::weblocks-webapp-prefix weblocks::*active-webapps*))
108 | (apps (copy-list weblocks::*active-webapps*)))
109 | (when (find uri-path urls :test #'string=)
110 | (flet ((current-webapp-p (i)
111 | (string=
112 | (string-right-trim "/" (weblocks::weblocks-webapp-prefix i))
113 | (string-right-trim "/" uri-path))))
114 | (with-html
115 | (:div :style "position:fixed;top:20px;right:20px;background:white;border:3px solid #001D23;text-align:left;"
116 | (:ul :style "padding:10px 30px;margin:0;"
117 | (loop for i in (sort apps #'string> :key #'weblocks::weblocks-webapp-description) do
118 | (cl-who:htm
119 | (:li (:a :style (format nil "font-size: 15px;text-decoration:none;~A" (if (current-webapp-p i) "font-weight:bold;" "")) :href (weblocks::weblocks-webapp-prefix i)
120 | (str (weblocks::weblocks-webapp-description i)))))))))))))
121 |
122 | (defmethod render-page-body :after ((app weblocks-selenium-tests-app) body-string)
123 | (render-apps-list))
124 |
125 | (defmethod render-page-body :after ((app weblocks-with-jquery-selenium-tests-app) body-string)
126 | (render-apps-list))
127 |
128 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/scripts/vzn/weblocks.0.js:
--------------------------------------------------------------------------------
1 |
2 | // Utilities
3 | function updateElementBody(element, newBody) {
4 | element.update(newBody);
5 | }
6 |
7 | function updateElement(element, newElement) {
8 | element.replace(newElement);
9 | }
10 |
11 | function selectionEmpty() {
12 | if(document.getSelection) {
13 | return document.getSelection() == "";
14 | } else if(document.selection && document.selection.createRange) {
15 | return document.selection.createRange().text == "";
16 | } else {
17 | return true;
18 | }
19 | }
20 |
21 | function addCss(cssCode) {
22 | var styleElement = document.createElement("style");
23 | styleElement.type = "text/css";
24 | if (styleElement.styleSheet) {
25 | styleElement.styleSheet.cssText = cssCode;
26 | } else {
27 | styleElement.appendChild(document.createTextNode(cssCode));
28 | }
29 | document.getElementsByTagName("head")[0].appendChild(styleElement);
30 | }
31 |
32 | function stopPropagation(event) {
33 | if(event.preventDefault) {
34 | event.stopPropagation();
35 | } else {
36 | event.cancelBubble = true;
37 | };
38 | }
39 |
40 | // Register global AJAX handlers to show progress
41 | Ajax.Responders.register({
42 | onCreate: function() {
43 | $('ajax-progress').innerHTML = " ";
44 | },
45 | onComplete: function() {
46 | $('ajax-progress').innerHTML = "";
47 | }
48 | });
49 |
50 | function onActionSuccess(transport) {
51 | // Grab json value
52 | var json;
53 |
54 | json = transport.responseText.evalJSON(false);
55 |
56 | // See if there are redirects
57 | var redirect = json['redirect'];
58 | if (redirect)
59 | {
60 | window.location.href = redirect;
61 | return;
62 | }
63 |
64 | execJsonCalls(json['before-load']);
65 |
66 | // Update dirty widgets
67 | var dirtyWidgets = json['widgets'];
68 | for(var i in dirtyWidgets) {
69 | var widget = $(i);
70 | if(widget) {
71 | //console.log("updating widget %s", i);
72 | updateElement(widget, dirtyWidgets[i]);
73 | }
74 | }
75 |
76 | execJsonCalls(json['on-load']);
77 | }
78 |
79 | function execJsonCalls (calls) {
80 | if(calls) {
81 | calls.each(function(item)
82 | {
83 | try {
84 | //console.log("evalScript: %o", item);
85 | item.evalScripts();
86 | } catch(e) {
87 | //console.log("Error evaluating AJAX script %o: %s", item, e);
88 | }
89 | });
90 | }
91 | }
92 |
93 | function onActionFailure() {
94 | alert('Oops, we could not complete your request because of an internal error.');
95 | }
96 |
97 | function getActionUrl(actionCode, sessionString, isPure) {
98 | if (!sessionString) sessionString = "";
99 | var scriptName = location.protocol + "//"
100 | + location.hostname
101 | + (location.port ? ":" + location.port : "")
102 | + location.pathname;
103 | var query = location.search;
104 | var url = scriptName + query + (query ? "&" : "?")
105 | + sessionString + (sessionString ? "&" : "") + "action=" + actionCode;
106 |
107 | if(isPure)
108 | url += '&pure=true';
109 |
110 | return url;
111 | }
112 |
113 | function initiateActionWithArgs(actionCode, sessionString, args, method, url) {
114 | if (!method) method = 'get';
115 | if (!url) url = getActionUrl(actionCode, sessionString);
116 | new Ajax.Request(url,
117 | {
118 | method: method,
119 | onSuccess: onActionSuccess,
120 | onFailure: onActionFailure,
121 | parameters: args
122 | });
123 |
124 | }
125 |
126 | /* convenience/compatibility function */
127 | function initiateAction(actionCode, sessionString) {
128 | initiateActionWithArgs(actionCode, sessionString);
129 | }
130 |
131 | function initiateFormAction(actionCode, form, sessionString) {
132 | // Hidden "action" field should not be serialized on AJAX
133 | var serializedForm = form.serialize(true);
134 | delete(serializedForm['action']);
135 |
136 | initiateActionWithArgs(actionCode, sessionString, serializedForm, form.method);
137 | }
138 |
139 | function disableIrrelevantButtons(currentButton) {
140 | $(currentButton.form).getInputs('submit').each(function(obj)
141 | {
142 | obj.disable();
143 | currentButton.enable();
144 | });
145 | }
146 |
147 | // Fix IE6 flickering issue
148 | if(Prototype.Browser.IE) {
149 | try {
150 | document.execCommand("BackgroundImageCache", false, true);
151 | } catch(err) {}
152 | }
153 |
154 | // Table hovering for IE (can't use CSS expressions because
155 | // Event.observe isn't available there and we can't overwrite events
156 | // using assignment
157 | if(!window.XMLHttpRequest) {
158 | // IE6 only
159 | Event.observe(window, 'load', function() {
160 | var tableRows = $$('.table table tbody tr');
161 | tableRows.each(function(row) {
162 | Event.observe(row, 'mouseover', function() {
163 | row.addClassName('hover');
164 | });
165 | Event.observe(row, 'mouseout', function() {
166 | row.removeClassName('hover');
167 | });
168 | });
169 | });
170 | }
171 |
172 | // Support suggest control
173 | function declareSuggest(inputId, choicesId, resultSet, sessionString) {
174 | if(resultSet instanceof Array) {
175 | new Autocompleter.Local(inputId, choicesId, resultSet, {});
176 | } else {
177 | new Ajax.Autocompleter(inputId, choicesId, getActionUrl(resultSet, sessionString, true), {});
178 | }
179 | }
180 |
181 | function replaceDropdownWithSuggest(ignoreWelcomeMsg, inputId, inputName, choicesId, value) {
182 | var dropdownOptions = $(inputId).childElements();
183 | var suggestOptions = [];
184 | dropdownOptions.each(function(i)
185 | {
186 | if(!(i == dropdownOptions[0] && ignoreWelcomeMsg)) {
187 | suggestOptions.push(i.innerHTML);
188 | }
189 | });
190 |
191 | var inputBox = ' ';
196 |
197 | var suggestHTML = inputBox + '
';
198 | $(inputId).replace(suggestHTML);
199 |
200 | declareSuggest(inputId, choicesId, suggestOptions);
201 | }
202 |
203 | function include_css(css_file) {
204 | var html_doc = document.getElementsByTagName('head').item(0);
205 | var css = document.createElement('link');
206 | css.setAttribute('rel', 'stylesheet');
207 | css.setAttribute('type', 'text/css');
208 | css.setAttribute('href', css_file);
209 | html_doc.appendChild(css);
210 | return false;
211 | }
212 |
213 | function include_dom(script_filename) {
214 | var html_doc = document.getElementsByTagName('head').item(0);
215 | var js = document.createElement('script');
216 | js.setAttribute('language', 'javascript');
217 | js.setAttribute('type', 'text/javascript');
218 | js.setAttribute('src', script_filename);
219 | html_doc.appendChild(js);
220 | return false;
221 | }
222 |
223 | /* working with CSS classes */
224 | function addClass(el,myClass){
225 | if ((hasClass(el,myClass)) || (typeof el == 'undefined'))
226 | return;
227 | el.className += " " + myClass;
228 | }
229 |
230 | function removeClass(el,myClass){
231 | if (typeof el=='undefined')
232 | return;
233 | if (el.getAttribute('class') === null)
234 | return;
235 |
236 | var classes = el.getAttribute('class').split(" ");
237 | var result=[];
238 |
239 | for (i=classes.length;i>=0;i--) {
240 | if (classes[i] != myClass)
241 | result.push(classes[i]);
242 | }
243 |
244 | el.setAttribute('class', result.join(" ")); /* FIXME: ie6/7 need className here */
245 | }
246 |
247 | function hasClass(el, myClass){
248 | if ((el.className === null) || (typeof el == 'undefined'))
249 | return false;
250 |
251 | var classes = el.className.split(" ");
252 |
253 | for (i=classes.length;i>=0;i--) {
254 | if (classes[i] == myClass)
255 | return true;
256 | }
257 |
258 | return false;
259 | }
260 |
261 | /* collapsible sections */
262 | function toggleExpandCollapse (heading,container) {
263 | if (hasClass(heading,"collapsed")) {
264 | removeClass(heading,"collapsed");
265 | removeClass(container,"collapsed");
266 | addClass(heading,"expanded");
267 | addClass(container,"expanded");
268 | } else {
269 | removeClass(heading,"expanded");
270 | removeClass(container,"expanded");
271 | addClass(heading,"collapsed");
272 | addClass(container,"collapsed");
273 | }
274 | }
275 |
276 | function updateWidgetStateFromHash() {
277 | // http://stackoverflow.com/questions/680785/on-window-location-hash-change
278 | // TODO need to detect if the hash has been changed but the page hasn't been reloaded
279 | // TODO only call this if the hash is actually different from the last recorded hash
280 | var hash = window.location.hash;
281 | if (hash)
282 | initiateActionWithArgs(null, null, {'weblocks-internal-location-hash':hash}, "GET", "/");
283 | }
284 |
285 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/scripts/weblocks.js:
--------------------------------------------------------------------------------
1 |
2 | // Utilities
3 | function updateElementBody(element, newBody) {
4 | element.update(newBody);
5 | }
6 |
7 | function updateElement(element, newElement) {
8 | element.replace(newElement);
9 | }
10 |
11 | function selectionEmpty() {
12 | if(document.getSelection) {
13 | return document.getSelection() == "";
14 | } else if(document.selection && document.selection.createRange) {
15 | return document.selection.createRange().text == "";
16 | } else {
17 | return true;
18 | }
19 | }
20 |
21 | function addCss(cssCode) {
22 | var styleElement = document.createElement("style");
23 | styleElement.type = "text/css";
24 | if (styleElement.styleSheet) {
25 | styleElement.styleSheet.cssText = cssCode;
26 | } else {
27 | styleElement.appendChild(document.createTextNode(cssCode));
28 | }
29 | document.getElementsByTagName("head")[0].appendChild(styleElement);
30 | }
31 |
32 | function stopPropagation(event) {
33 | if(event.preventDefault) {
34 | event.stopPropagation();
35 | } else {
36 | event.cancelBubble = true;
37 | };
38 | }
39 |
40 | // Register global AJAX handlers to show progress
41 | Ajax.Responders.register({
42 | onCreate: function() {
43 | $('ajax-progress').innerHTML = " ";
44 | },
45 | onComplete: function() {
46 | $('ajax-progress').innerHTML = "";
47 | }
48 | });
49 |
50 | function onActionSuccess(transport) {
51 | // Grab json value
52 | var json;
53 |
54 | json = transport.responseText.evalJSON(false);
55 |
56 | // See if there are redirects
57 | var redirect = json['redirect'];
58 | if (redirect)
59 | {
60 | window.location.href = redirect;
61 | return;
62 | }
63 |
64 | execJsonCalls(json['before-load']);
65 |
66 | // Update dirty widgets
67 | var dirtyWidgets = json['widgets'];
68 | for(var i in dirtyWidgets) {
69 | var widget = $(i);
70 | if(widget) {
71 | //console.log("updating widget %s", i);
72 | updateElement(widget, dirtyWidgets[i]);
73 | }
74 | }
75 |
76 | execJsonCalls(json['on-load']);
77 | }
78 |
79 | function execJsonCalls (calls) {
80 | if(calls) {
81 | calls.each(function(item)
82 | {
83 | try {
84 | //console.log("evalScript: %o", item);
85 | item.evalScripts();
86 | } catch(e) {
87 | //console.log("Error evaluating AJAX script %o: %s", item, e);
88 | }
89 | });
90 | }
91 | }
92 |
93 | function getActionUrl(actionCode, sessionString, isPure) {
94 | if (!sessionString) sessionString = "";
95 | var scriptName = location.protocol + "//"
96 | + location.hostname
97 | + (location.port ? ":" + location.port : "")
98 | + location.pathname;
99 | var query = location.search;
100 | var url = scriptName + query + (query ? "&" : "?")
101 | + sessionString + (sessionString ? "&" : "") + "action=" + actionCode;
102 |
103 | if(isPure)
104 | url += '&pure=true';
105 |
106 | return url;
107 | }
108 |
109 | function initiateActionWithArgs(actionCode, sessionString, args, method, url) {
110 | if (!method) method = 'get';
111 | if (!url) url = getActionUrl(actionCode, sessionString);
112 | new Ajax.Request(url,
113 | {
114 | method: method,
115 | onSuccess: onActionSuccess,
116 | onFailure: onActionFailure,
117 | parameters: args
118 | });
119 |
120 | }
121 |
122 | /* convenience/compatibility function */
123 | function initiateAction(actionCode, sessionString) {
124 | initiateActionWithArgs(actionCode, sessionString);
125 | }
126 |
127 | function initiateFormAction(actionCode, form, sessionString) {
128 | // Hidden "action" field should not be serialized on AJAX
129 | var serializedForm = form.serialize(true);
130 | delete(serializedForm['action']);
131 |
132 | initiateActionWithArgs(actionCode, sessionString, serializedForm, form.method);
133 | }
134 |
135 | function disableIrrelevantButtons(currentButton) {
136 | $(currentButton.form).getInputs('submit').each(function(obj)
137 | {
138 | obj.disable();
139 | currentButton.enable();
140 | });
141 | }
142 |
143 | // Fix IE6 flickering issue
144 | if(Prototype.Browser.IE) {
145 | try {
146 | document.execCommand("BackgroundImageCache", false, true);
147 | } catch(err) {}
148 | }
149 |
150 | // Table hovering for IE (can't use CSS expressions because
151 | // Event.observe isn't available there and we can't overwrite events
152 | // using assignment
153 | if(!window.XMLHttpRequest) {
154 | // IE6 only
155 | Event.observe(window, 'load', function() {
156 | var tableRows = $$('.table table tbody tr');
157 | tableRows.each(function(row) {
158 | Event.observe(row, 'mouseover', function() {
159 | row.addClassName('hover');
160 | });
161 | Event.observe(row, 'mouseout', function() {
162 | row.removeClassName('hover');
163 | });
164 | });
165 | });
166 | }
167 |
168 | // Support suggest control
169 | function declareSuggest(inputId, choicesId, resultSet, sessionString) {
170 | if(resultSet instanceof Array) {
171 | new Autocompleter.Local(inputId, choicesId, resultSet, {});
172 | } else {
173 | new Ajax.Autocompleter(inputId, choicesId, getActionUrl(resultSet, sessionString, true), {});
174 | }
175 | }
176 |
177 | function replaceDropdownWithSuggest(ignoreWelcomeMsg, inputId, inputName, choicesId, value) {
178 | var dropdownOptions = $(inputId).childElements();
179 | var suggestOptions = [];
180 | dropdownOptions.each(function(i)
181 | {
182 | if(!(i == dropdownOptions[0] && ignoreWelcomeMsg)) {
183 | suggestOptions.push(i.innerHTML);
184 | }
185 | });
186 |
187 | var inputBox = ' ';
192 |
193 | var suggestHTML = inputBox + '
';
194 | $(inputId).replace(suggestHTML);
195 |
196 | declareSuggest(inputId, choicesId, suggestOptions);
197 | }
198 |
199 | function include_css(css_file) {
200 | var html_doc = document.getElementsByTagName('head').item(0);
201 | var css = document.createElement('link');
202 | css.setAttribute('rel', 'stylesheet');
203 | css.setAttribute('type', 'text/css');
204 | css.setAttribute('href', css_file);
205 | html_doc.appendChild(css);
206 | return false;
207 | }
208 |
209 | function include_dom(script_filename) {
210 | var html_doc = document.getElementsByTagName('head').item(0);
211 | var js = document.createElement('script');
212 | js.setAttribute('language', 'javascript');
213 | js.setAttribute('type', 'text/javascript');
214 | js.setAttribute('src', script_filename);
215 | html_doc.appendChild(js);
216 | return false;
217 | }
218 |
219 | /* working with CSS classes */
220 | function addClass(el,myClass){
221 | if ((hasClass(el,myClass)) || (typeof el == 'undefined'))
222 | return;
223 | el.className += " " + myClass;
224 | }
225 |
226 | function removeClass(el,myClass){
227 | if (typeof el=='undefined')
228 | return;
229 | if (el.getAttribute('class') === null)
230 | return;
231 |
232 | var classes = el.getAttribute('class').split(" ");
233 | var result=[];
234 |
235 | for (i=classes.length;i>=0;i--) {
236 | if (classes[i] != myClass)
237 | result.push(classes[i]);
238 | }
239 |
240 | el.setAttribute('class', result.join(" ")); /* FIXME: ie6/7 need className here */
241 | }
242 |
243 | function hasClass(el, myClass){
244 | if ((el.className === null) || (typeof el == 'undefined'))
245 | return false;
246 |
247 | var classes = el.className.split(" ");
248 |
249 | for (i=classes.length;i>=0;i--) {
250 | if (classes[i] == myClass)
251 | return true;
252 | }
253 |
254 | return false;
255 | }
256 |
257 | /* collapsible sections */
258 | function toggleExpandCollapse (heading,container) {
259 | if (hasClass(heading,"collapsed")) {
260 | removeClass(heading,"collapsed");
261 | removeClass(container,"collapsed");
262 | addClass(heading,"expanded");
263 | addClass(container,"expanded");
264 | } else {
265 | removeClass(heading,"expanded");
266 | removeClass(container,"expanded");
267 | addClass(heading,"collapsed");
268 | addClass(container,"collapsed");
269 | }
270 | }
271 |
272 | function updateWidgetStateFromHash() {
273 | // http://stackoverflow.com/questions/680785/on-window-location-hash-change
274 | // TODO need to detect if the hash has been changed but the page hasn't been reloaded
275 | // TODO only call this if the hash is actually different from the last recorded hash
276 | var hash = window.location.hash;
277 | if (hash)
278 | initiateActionWithArgs(null, null, {'weblocks-internal-location-hash':hash}, "GET", "/");
279 | }
280 |
281 | function onActionFailure(transport) {
282 | document.body.innerHTML=
283 | '' +
284 | transport.responseText
285 | + '
';
286 | }
287 |
--------------------------------------------------------------------------------
/weblocks-selenium-tests-app/pub/scripts/slider.js:
--------------------------------------------------------------------------------
1 | // script.aculo.us slider.js v1.7.1_beta3, Fri May 25 17:19:41 +0200 2007
2 |
3 | // Copyright (c) 2005-2007 Marty Haught, Thomas Fuchs
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 | if(!Control) var Control = {};
9 | Control.Slider = Class.create();
10 |
11 | // options:
12 | // axis: 'vertical', or 'horizontal' (default)
13 | //
14 | // callbacks:
15 | // onChange(value)
16 | // onSlide(value)
17 | Control.Slider.prototype = {
18 | initialize: function(handle, track, options) {
19 | var slider = this;
20 |
21 | if(handle instanceof Array) {
22 | this.handles = handle.collect( function(e) { return $(e) });
23 | } else {
24 | this.handles = [$(handle)];
25 | }
26 |
27 | this.track = $(track);
28 | this.options = options || {};
29 |
30 | this.axis = this.options.axis || 'horizontal';
31 | this.increment = this.options.increment || 1;
32 | this.step = parseInt(this.options.step || '1');
33 | this.range = this.options.range || $R(0,1);
34 |
35 | this.value = 0; // assure backwards compat
36 | this.values = this.handles.map( function() { return 0 });
37 | this.spans = this.options.spans ? this.options.spans.map(function(s){ return $(s) }) : false;
38 | this.options.startSpan = $(this.options.startSpan || null);
39 | this.options.endSpan = $(this.options.endSpan || null);
40 |
41 | this.restricted = this.options.restricted || false;
42 |
43 | this.maximum = this.options.maximum || this.range.end;
44 | this.minimum = this.options.minimum || this.range.start;
45 |
46 | // Will be used to align the handle onto the track, if necessary
47 | this.alignX = parseInt(this.options.alignX || '0');
48 | this.alignY = parseInt(this.options.alignY || '0');
49 |
50 | this.trackLength = this.maximumOffset() - this.minimumOffset();
51 |
52 | this.handleLength = this.isVertical() ?
53 | (this.handles[0].offsetHeight != 0 ?
54 | this.handles[0].offsetHeight : this.handles[0].style.height.replace(/px$/,"")) :
55 | (this.handles[0].offsetWidth != 0 ? this.handles[0].offsetWidth :
56 | this.handles[0].style.width.replace(/px$/,""));
57 |
58 | this.active = false;
59 | this.dragging = false;
60 | this.disabled = false;
61 |
62 | if(this.options.disabled) this.setDisabled();
63 |
64 | // Allowed values array
65 | this.allowedValues = this.options.values ? this.options.values.sortBy(Prototype.K) : false;
66 | if(this.allowedValues) {
67 | this.minimum = this.allowedValues.min();
68 | this.maximum = this.allowedValues.max();
69 | }
70 |
71 | this.eventMouseDown = this.startDrag.bindAsEventListener(this);
72 | this.eventMouseUp = this.endDrag.bindAsEventListener(this);
73 | this.eventMouseMove = this.update.bindAsEventListener(this);
74 |
75 | // Initialize handles in reverse (make sure first handle is active)
76 | this.handles.each( function(h,i) {
77 | i = slider.handles.length-1-i;
78 | slider.setValue(parseFloat(
79 | (slider.options.sliderValue instanceof Array ?
80 | slider.options.sliderValue[i] : slider.options.sliderValue) ||
81 | slider.range.start), i);
82 | Element.makePositioned(h); // fix IE
83 | Event.observe(h, "mousedown", slider.eventMouseDown);
84 | });
85 |
86 | Event.observe(this.track, "mousedown", this.eventMouseDown);
87 | Event.observe(document, "mouseup", this.eventMouseUp);
88 | Event.observe(document, "mousemove", this.eventMouseMove);
89 |
90 | this.initialized = true;
91 | },
92 | dispose: function() {
93 | var slider = this;
94 | Event.stopObserving(this.track, "mousedown", this.eventMouseDown);
95 | Event.stopObserving(document, "mouseup", this.eventMouseUp);
96 | Event.stopObserving(document, "mousemove", this.eventMouseMove);
97 | this.handles.each( function(h) {
98 | Event.stopObserving(h, "mousedown", slider.eventMouseDown);
99 | });
100 | },
101 | setDisabled: function(){
102 | this.disabled = true;
103 | },
104 | setEnabled: function(){
105 | this.disabled = false;
106 | },
107 | getNearestValue: function(value){
108 | if(this.allowedValues){
109 | if(value >= this.allowedValues.max()) return(this.allowedValues.max());
110 | if(value <= this.allowedValues.min()) return(this.allowedValues.min());
111 |
112 | var offset = Math.abs(this.allowedValues[0] - value);
113 | var newValue = this.allowedValues[0];
114 | this.allowedValues.each( function(v) {
115 | var currentOffset = Math.abs(v - value);
116 | if(currentOffset <= offset){
117 | newValue = v;
118 | offset = currentOffset;
119 | }
120 | });
121 | return newValue;
122 | }
123 | if(value > this.range.end) return this.range.end;
124 | if(value < this.range.start) return this.range.start;
125 | return value;
126 | },
127 | setValue: function(sliderValue, handleIdx){
128 | if(!this.active) {
129 | this.activeHandleIdx = handleIdx || 0;
130 | this.activeHandle = this.handles[this.activeHandleIdx];
131 | this.updateStyles();
132 | }
133 | handleIdx = handleIdx || this.activeHandleIdx || 0;
134 | if(this.initialized && this.restricted) {
135 | if((handleIdx>0) && (sliderValuethis.values[handleIdx+1]))
138 | sliderValue = this.values[handleIdx+1];
139 | }
140 | sliderValue = this.getNearestValue(sliderValue);
141 | this.values[handleIdx] = sliderValue;
142 | this.value = this.values[0]; // assure backwards compat
143 |
144 | this.handles[handleIdx].style[this.isVertical() ? 'top' : 'left'] =
145 | this.translateToPx(sliderValue);
146 |
147 | this.drawSpans();
148 | if(!this.dragging || !this.event) this.updateFinished();
149 | },
150 | setValueBy: function(delta, handleIdx) {
151 | this.setValue(this.values[handleIdx || this.activeHandleIdx || 0] + delta,
152 | handleIdx || this.activeHandleIdx || 0);
153 | },
154 | translateToPx: function(value) {
155 | return Math.round(
156 | ((this.trackLength-this.handleLength)/(this.range.end-this.range.start)) *
157 | (value - this.range.start)) + "px";
158 | },
159 | translateToValue: function(offset) {
160 | return ((offset/(this.trackLength-this.handleLength) *
161 | (this.range.end-this.range.start)) + this.range.start);
162 | },
163 | getRange: function(range) {
164 | var v = this.values.sortBy(Prototype.K);
165 | range = range || 0;
166 | return $R(v[range],v[range+1]);
167 | },
168 | minimumOffset: function(){
169 | return(this.isVertical() ? this.alignY : this.alignX);
170 | },
171 | maximumOffset: function(){
172 | return(this.isVertical() ?
173 | (this.track.offsetHeight != 0 ? this.track.offsetHeight :
174 | this.track.style.height.replace(/px$/,"")) - this.alignY :
175 | (this.track.offsetWidth != 0 ? this.track.offsetWidth :
176 | this.track.style.width.replace(/px$/,"")) - this.alignY);
177 | },
178 | isVertical: function(){
179 | return (this.axis == 'vertical');
180 | },
181 | drawSpans: function() {
182 | var slider = this;
183 | if(this.spans)
184 | $R(0, this.spans.length-1).each(function(r) { slider.setSpan(slider.spans[r], slider.getRange(r)) });
185 | if(this.options.startSpan)
186 | this.setSpan(this.options.startSpan,
187 | $R(0, this.values.length>1 ? this.getRange(0).min() : this.value ));
188 | if(this.options.endSpan)
189 | this.setSpan(this.options.endSpan,
190 | $R(this.values.length>1 ? this.getRange(this.spans.length-1).max() : this.value, this.maximum));
191 | },
192 | setSpan: function(span, range) {
193 | if(this.isVertical()) {
194 | span.style.top = this.translateToPx(range.start);
195 | span.style.height = this.translateToPx(range.end - range.start + this.range.start);
196 | } else {
197 | span.style.left = this.translateToPx(range.start);
198 | span.style.width = this.translateToPx(range.end - range.start + this.range.start);
199 | }
200 | },
201 | updateStyles: function() {
202 | this.handles.each( function(h){ Element.removeClassName(h, 'selected') });
203 | Element.addClassName(this.activeHandle, 'selected');
204 | },
205 | startDrag: function(event) {
206 | if(Event.isLeftClick(event)) {
207 | if(!this.disabled){
208 | this.active = true;
209 |
210 | var handle = Event.element(event);
211 | var pointer = [Event.pointerX(event), Event.pointerY(event)];
212 | var track = handle;
213 | if(track==this.track) {
214 | var offsets = Position.cumulativeOffset(this.track);
215 | this.event = event;
216 | this.setValue(this.translateToValue(
217 | (this.isVertical() ? pointer[1]-offsets[1] : pointer[0]-offsets[0])-(this.handleLength/2)
218 | ));
219 | var offsets = Position.cumulativeOffset(this.activeHandle);
220 | this.offsetX = (pointer[0] - offsets[0]);
221 | this.offsetY = (pointer[1] - offsets[1]);
222 | } else {
223 | // find the handle (prevents issues with Safari)
224 | while((this.handles.indexOf(handle) == -1) && handle.parentNode)
225 | handle = handle.parentNode;
226 |
227 | if(this.handles.indexOf(handle)!=-1) {
228 | this.activeHandle = handle;
229 | this.activeHandleIdx = this.handles.indexOf(this.activeHandle);
230 | this.updateStyles();
231 |
232 | var offsets = Position.cumulativeOffset(this.activeHandle);
233 | this.offsetX = (pointer[0] - offsets[0]);
234 | this.offsetY = (pointer[1] - offsets[1]);
235 | }
236 | }
237 | }
238 | Event.stop(event);
239 | }
240 | },
241 | update: function(event) {
242 | if(this.active) {
243 | if(!this.dragging) this.dragging = true;
244 | this.draw(event);
245 | if(Prototype.Browser.WebKit) window.scrollBy(0,0);
246 | Event.stop(event);
247 | }
248 | },
249 | draw: function(event) {
250 | var pointer = [Event.pointerX(event), Event.pointerY(event)];
251 | var offsets = Position.cumulativeOffset(this.track);
252 | pointer[0] -= this.offsetX + offsets[0];
253 | pointer[1] -= this.offsetY + offsets[1];
254 | this.event = event;
255 | this.setValue(this.translateToValue( this.isVertical() ? pointer[1] : pointer[0] ));
256 | if(this.initialized && this.options.onSlide)
257 | this.options.onSlide(this.values.length>1 ? this.values : this.value, this);
258 | },
259 | endDrag: function(event) {
260 | if(this.active && this.dragging) {
261 | this.finishDrag(event, true);
262 | Event.stop(event);
263 | }
264 | this.active = false;
265 | this.dragging = false;
266 | },
267 | finishDrag: function(event, success) {
268 | this.active = false;
269 | this.dragging = false;
270 | this.updateFinished();
271 | },
272 | updateFinished: function() {
273 | if(this.initialized && this.options.onChange)
274 | this.options.onChange(this.values.length>1 ? this.values : this.value, this);
275 | this.event = null;
276 | }
277 | }
--------------------------------------------------------------------------------
/license.txt:
--------------------------------------------------------------------------------
1 | Preamble to the Gnu Lesser General Public License
2 |
3 | Copyright (c) 2000 Franz Incorporated, Berkeley, CA 94704
4 |
5 | The concept of the GNU Lesser General Public License version 2.1
6 | ("LGPL") has been adopted to govern the use and distribution of
7 | above-mentioned application. However, the LGPL uses terminology that
8 | is more appropriate for a program written in C than one written in
9 | Lisp. Nevertheless, the LGPL can still be applied to a Lisp program if
10 | certain clarifications are made. This document details those
11 | clarifications. Accordingly, the license for the open-source Lisp
12 | applications consists of this document plus the LGPL. Wherever there
13 | is a conflict between this document and the LGPL, this document takes
14 | precedence over the LGPL.
15 |
16 | A "Library" in Lisp is a collection of Lisp functions, data and
17 | foreign modules. The form of the Library can be Lisp source code (for
18 | processing by an interpreter) or object code (usually the result of
19 | compilation of source code or built with some other
20 | mechanisms). Foreign modules are object code in a form that can be
21 | linked into a Lisp executable. When we speak of functions we do so in
22 | the most general way to include, in addition, methods and unnamed
23 | functions. Lisp "data" is also a general term that includes the data
24 | structures resulting from defining Lisp classes. A Lisp application
25 | may include the same set of Lisp objects as does a Library, but this
26 | does not mean that the application is necessarily a "work based on the
27 | Library" it contains.
28 |
29 | The Library consists of everything in the distribution file set before
30 | any modifications are made to the files. If any of the functions or
31 | classes in the Library are redefined in other files, then those
32 | redefinitions ARE considered a work based on the Library. If
33 | additional methods are added to generic functions in the Library,
34 | those additional methods are NOT considered a work based on the
35 | Library. If Library classes are subclassed, these subclasses are NOT
36 | considered a work based on the Library. If the Library is modified to
37 | explicitly call other functions that are neither part of Lisp itself
38 | nor an available add-on module to Lisp, then the functions called by
39 | the modified Library ARE considered a work based on the Library. The
40 | goal is to ensure that the Library will compile and run without
41 | getting undefined function errors.
42 |
43 | It is permitted to add proprietary source code to the Library, but it
44 | must be done in a way such that the Library will still run without
45 | that proprietary code present. Section 5 of the LGPL distinguishes
46 | between the case of a library being dynamically linked at runtime and
47 | one being statically linked at build time. Section 5 of the LGPL
48 | states that the former results in an executable that is a "work that
49 | uses the Library." Section 5 of the LGPL states that the latter
50 | results in one that is a "derivative of the Library", which is
51 | therefore covered by the LGPL. Since Lisp only offers one choice,
52 | which is to link the Library into an executable at build time, we
53 | declare that, for the purpose applying the LGPL to the Library, an
54 | executable that results from linking a "work that uses the Library"
55 | with the Library is considered a "work that uses the Library" and is
56 | therefore NOT covered by the LGPL.
57 |
58 | Because of this declaration, section 6 of LGPL is not applicable to
59 | the Library. However, in connection with each distribution of this
60 | executable, you must also deliver, in accordance with the terms and
61 | conditions of the LGPL, the source code of Library (or your derivative
62 | thereof) that is incorporated into this executable.
63 |
64 | GNU LESSER GENERAL PUBLIC LICENSE
65 | Version 3, 29 June 2007
66 |
67 | Copyright (C) 2007 Free Software Foundation, Inc.
68 | Everyone is permitted to copy and distribute verbatim copies
69 | of this license document, but changing it is not allowed.
70 |
71 |
72 | This version of the GNU Lesser General Public License incorporates
73 | the terms and conditions of version 3 of the GNU General Public
74 | License, supplemented by the additional permissions listed below.
75 |
76 | 0. Additional Definitions.
77 |
78 | As used herein, "this License" refers to version 3 of the GNU Lesser
79 | General Public License, and the "GNU GPL" refers to version 3 of the GNU
80 | General Public License.
81 |
82 | "The Library" refers to a covered work governed by this License,
83 | other than an Application or a Combined Work as defined below.
84 |
85 | An "Application" is any work that makes use of an interface provided
86 | by the Library, but which is not otherwise based on the Library.
87 | Defining a subclass of a class defined by the Library is deemed a mode
88 | of using an interface provided by the Library.
89 |
90 | A "Combined Work" is a work produced by combining or linking an
91 | Application with the Library. The particular version of the Library
92 | with which the Combined Work was made is also called the "Linked
93 | Version".
94 |
95 | The "Minimal Corresponding Source" for a Combined Work means the
96 | Corresponding Source for the Combined Work, excluding any source code
97 | for portions of the Combined Work that, considered in isolation, are
98 | based on the Application, and not on the Linked Version.
99 |
100 | The "Corresponding Application Code" for a Combined Work means the
101 | object code and/or source code for the Application, including any data
102 | and utility programs needed for reproducing the Combined Work from the
103 | Application, but excluding the System Libraries of the Combined Work.
104 |
105 | 1. Exception to Section 3 of the GNU GPL.
106 |
107 | You may convey a covered work under sections 3 and 4 of this License
108 | without being bound by section 3 of the GNU GPL.
109 |
110 | 2. Conveying Modified Versions.
111 |
112 | If you modify a copy of the Library, and, in your modifications, a
113 | facility refers to a function or data to be supplied by an Application
114 | that uses the facility (other than as an argument passed when the
115 | facility is invoked), then you may convey a copy of the modified
116 | version:
117 |
118 | a) under this License, provided that you make a good faith effort to
119 | ensure that, in the event an Application does not supply the
120 | function or data, the facility still operates, and performs
121 | whatever part of its purpose remains meaningful, or
122 |
123 | b) under the GNU GPL, with none of the additional permissions of
124 | this License applicable to that copy.
125 |
126 | 3. Object Code Incorporating Material from Library Header Files.
127 |
128 | The object code form of an Application may incorporate material from
129 | a header file that is part of the Library. You may convey such object
130 | code under terms of your choice, provided that, if the incorporated
131 | material is not limited to numerical parameters, data structure
132 | layouts and accessors, or small macros, inline functions and templates
133 | (ten or fewer lines in length), you do both of the following:
134 |
135 | a) Give prominent notice with each copy of the object code that the
136 | Library is used in it and that the Library and its use are
137 | covered by this License.
138 |
139 | b) Accompany the object code with a copy of the GNU GPL and this license
140 | document.
141 |
142 | 4. Combined Works.
143 |
144 | You may convey a Combined Work under terms of your choice that,
145 | taken together, effectively do not restrict modification of the
146 | portions of the Library contained in the Combined Work and reverse
147 | engineering for debugging such modifications, if you also do each of
148 | the following:
149 |
150 | a) Give prominent notice with each copy of the Combined Work that
151 | the Library is used in it and that the Library and its use are
152 | covered by this License.
153 |
154 | b) Accompany the Combined Work with a copy of the GNU GPL and this license
155 | document.
156 |
157 | c) For a Combined Work that displays copyright notices during
158 | execution, include the copyright notice for the Library among
159 | these notices, as well as a reference directing the user to the
160 | copies of the GNU GPL and this license document.
161 |
162 | d) Do one of the following:
163 |
164 | 0) Convey the Minimal Corresponding Source under the terms of this
165 | License, and the Corresponding Application Code in a form
166 | suitable for, and under terms that permit, the user to
167 | recombine or relink the Application with a modified version of
168 | the Linked Version to produce a modified Combined Work, in the
169 | manner specified by section 6 of the GNU GPL for conveying
170 | Corresponding Source.
171 |
172 | 1) Use a suitable shared library mechanism for linking with the
173 | Library. A suitable mechanism is one that (a) uses at run time
174 | a copy of the Library already present on the user's computer
175 | system, and (b) will operate properly with a modified version
176 | of the Library that is interface-compatible with the Linked
177 | Version.
178 |
179 | e) Provide Installation Information, but only if you would otherwise
180 | be required to provide such information under section 6 of the
181 | GNU GPL, and only to the extent that such information is
182 | necessary to install and execute a modified version of the
183 | Combined Work produced by recombining or relinking the
184 | Application with a modified version of the Linked Version. (If
185 | you use option 4d0, the Installation Information must accompany
186 | the Minimal Corresponding Source and Corresponding Application
187 | Code. If you use option 4d1, you must provide the Installation
188 | Information in the manner specified by section 6 of the GNU GPL
189 | for conveying Corresponding Source.)
190 |
191 | 5. Combined Libraries.
192 |
193 | You may place library facilities that are a work based on the
194 | Library side by side in a single library together with other library
195 | facilities that are not Applications and are not covered by this
196 | License, and convey such a combined library under terms of your
197 | choice, if you do both of the following:
198 |
199 | a) Accompany the combined library with a copy of the same work based
200 | on the Library, uncombined with any other library facilities,
201 | conveyed under the terms of this License.
202 |
203 | b) Give prominent notice with the combined library that part of it
204 | is a work based on the Library, and explaining where to find the
205 | accompanying uncombined form of the same work.
206 |
207 | 6. Revised Versions of the GNU Lesser General Public License.
208 |
209 | The Free Software Foundation may publish revised and/or new versions
210 | of the GNU Lesser General Public License from time to time. Such new
211 | versions will be similar in spirit to the present version, but may
212 | differ in detail to address new problems or concerns.
213 |
214 | Each version is given a distinguishing version number. If the
215 | Library as you received it specifies that a certain numbered version
216 | of the GNU Lesser General Public License "or any later version"
217 | applies to it, you have the option of following the terms and
218 | conditions either of that published version or of any later version
219 | published by the Free Software Foundation. If the Library as you
220 | received it does not specify a version number of the GNU Lesser
221 | General Public License, you may choose any version of the GNU Lesser
222 | General Public License ever published by the Free Software Foundation.
223 |
224 | If the Library as you received it specifies that a proxy can decide
225 | whether future versions of the GNU Lesser General Public License shall
226 | apply, that proxy's public statement of acceptance of any version is
227 | permanent authorization for you to choose that version for the
228 | Library.
229 |
--------------------------------------------------------------------------------