MINOR Changed paths to moved thirdparty dependencies (mostly from /jsparty to /sapphire/thirdparty, /cms/javascript and /sapphire/javascript)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92502 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2009-11-21 02:29:59 +00:00
parent 9acde4e9ac
commit a11db29672
25 changed files with 557 additions and 103 deletions

View File

@ -54,7 +54,7 @@ Object::useCustomClass('Datetime', 'SS_Datetime', true);
/** /**
* The root directory of TinyMCE * The root directory of TinyMCE
*/ */
define('MCE_ROOT', 'jsparty/tiny_mce/'); define('MCE_ROOT', 'sapphire/thirdparty/tinymce/');
/** /**
* The secret key that needs to be sent along with pings to /Email_BounceHandler * The secret key that needs to be sent along with pings to /Email_BounceHandler

View File

@ -100,7 +100,7 @@ define('BASE_PATH', rtrim(dirname(dirname($_SERVER['SCRIPT_FILENAME'])), DIRECTO
define('BASE_URL', rtrim(dirname(dirname($_SERVER['SCRIPT_NAME'])), DIRECTORY_SEPARATOR)); define('BASE_URL', rtrim(dirname(dirname($_SERVER['SCRIPT_NAME'])), DIRECTORY_SEPARATOR));
define('MODULES_DIR', 'modules'); define('MODULES_DIR', 'modules');
define('MODULES_PATH', BASE_PATH . '/' . MODULES_DIR); define('MODULES_PATH', BASE_PATH . '/' . MODULES_DIR);
define('THIRDPARTY_DIR', 'jsparty'); define('THIRDPARTY_DIR', 'sapphire/thirdparty');
define('THIRDPARTY_PATH', BASE_PATH . '/' . THIRDPARTY_DIR); define('THIRDPARTY_PATH', BASE_PATH . '/' . THIRDPARTY_DIR);
define('THEMES_DIR', 'themes'); define('THEMES_DIR', 'themes');
define('THEMES_PATH', BASE_PATH . '/' . THEMES_DIR); define('THEMES_PATH', BASE_PATH . '/' . THEMES_DIR);

View File

@ -137,7 +137,7 @@ class Requirements {
* Register the given stylesheet file as required. * Register the given stylesheet file as required.
* See {@link Requirements_Backend::css()} * See {@link Requirements_Backend::css()}
* *
* @param $file String Filenames should be relative to the base, eg, 'jsparty/tree/tree.css' * @param $file String Filenames should be relative to the base, eg, 'sapphire/javascript/tree/tree.css'
* @param $media String Comma-separated list of media-types (e.g. "screen,projector") * @param $media String Comma-separated list of media-types (e.g. "screen,projector")
* @see http://www.w3.org/TR/REC-CSS2/media.html * @see http://www.w3.org/TR/REC-CSS2/media.html
*/ */
@ -476,7 +476,7 @@ class Requirements_Backend {
/** /**
* Register the given stylesheet file as required. * Register the given stylesheet file as required.
* *
* @param $file String Filenames should be relative to the base, eg, 'jsparty/tree/tree.css' * @param $file String Filenames should be relative to the base, eg, 'sapphire/javascript/tree/tree.css'
* @param $media String Comma-separated list of media-types (e.g. "screen,projector") * @param $media String Comma-separated list of media-types (e.g. "screen,projector")
* @see http://www.w3.org/TR/REC-CSS2/media.html * @see http://www.w3.org/TR/REC-CSS2/media.html
*/ */

View File

@ -290,8 +290,8 @@ class ContentController extends Controller {
if(Director::isDev() || Permission::check('CMS_ACCESS_CMSMain')) { if(Director::isDev() || Permission::check('CMS_ACCESS_CMSMain')) {
Requirements::css(SAPPHIRE_DIR . '/css/SilverStripeNavigator.css'); Requirements::css(SAPPHIRE_DIR . '/css/SilverStripeNavigator.css');
Requirements::javascript(THIRDPARTY_DIR . '/behaviour.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/behaviour/behaviour.js');
// Requirements::javascript(THIRDPARTY_DIR . '/prototype.js'); // Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/prototype/prototype.js');
Requirements::customScript(<<<JS Requirements::customScript(<<<JS
Behaviour.register({ Behaviour.register({
'#switchView a' : { '#switchView a' : {

View File

@ -167,13 +167,13 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
* -openfolder.gif and -closedfolder.gif will be appended to the base name * -openfolder.gif and -closedfolder.gif will be appended to the base name
* that you provide there. * that you provide there.
* If you prefer, you can pass an array: * If you prefer, you can pass an array:
* array("jsparty\tree\images\page", $option). * array("sapphire\javascript\tree\images\page", $option).
* $option can be either "file" or "folder" to force the icon to always * $option can be either "file" or "folder" to force the icon to always
* be a file or folder, regardless of whether the page has children or not * be a file or folder, regardless of whether the page has children or not
* *
* @var string|array * @var string|array
*/ */
static $icon = array("jsparty/tree/images/page", "file"); static $icon = array("sapphire/javascript/tree/images/page", "file");
static $extensions = array( static $extensions = array(
@ -1496,9 +1496,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
*/ */
function getCMSFields() { function getCMSFields() {
require_once("forms/Form.php"); require_once("forms/Form.php");
Requirements::javascript(THIRDPARTY_DIR . "/prototype.js"); Requirements::javascript(SAPPHIRE_DIR . "/thirdparty/prototype/prototype.js");
Requirements::javascript(THIRDPARTY_DIR . "/behaviour.js"); Requirements::javascript(SAPPHIRE_DIR . "/thirdparty/behaviour/behaviour.js");
Requirements::javascript(THIRDPARTY_DIR . "/behaviour_improvements.js");
Requirements::javascript(CMS_DIR . "/javascript/SitetreeAccess.js"); Requirements::javascript(CMS_DIR . "/javascript/SitetreeAccess.js");
Requirements::add_i18n_javascript(SAPPHIRE_DIR . '/javascript/lang'); Requirements::add_i18n_javascript(SAPPHIRE_DIR . '/javascript/lang');
Requirements::javascript(SAPPHIRE_DIR . '/javascript/UpdateURL.js'); Requirements::javascript(SAPPHIRE_DIR . '/javascript/UpdateURL.js');

View File

@ -1,6 +1,6 @@
<?php <?php
require_once 'thirdparty/spyc/Spyc.php'; require_once 'thirdparty/spyc/spyc.php';
/** /**
* Uses the Spyc library to parse a YAML document (see http://yaml.org). * Uses the Spyc library to parse a YAML document (see http://yaml.org).

View File

@ -16,8 +16,8 @@ HTML;
} }
function Field() { function Field() {
Requirements::javascript(THIRDPARTY_DIR . '/prototype.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/prototype/prototype.js');
Requirements::javascript(THIRDPARTY_DIR . "/behaviour.js"); Requirements::javascript(SAPPHIRE_DIR . "/thirdparty/behaviour/behaviour.js");
Requirements::javascript(THIRDPARTY_DIR . "/calendar/calendar.js"); Requirements::javascript(THIRDPARTY_DIR . "/calendar/calendar.js");
Requirements::javascript(THIRDPARTY_DIR . "/calendar/lang/calendar-en.js"); Requirements::javascript(THIRDPARTY_DIR . "/calendar/lang/calendar-en.js");
Requirements::javascript(THIRDPARTY_DIR . "/calendar/calendar-setup.js"); Requirements::javascript(THIRDPARTY_DIR . "/calendar/calendar-setup.js");

View File

@ -1072,11 +1072,11 @@ class ComplexTableField_Popup extends Form {
Requirements::css(SAPPHIRE_DIR . '/css/ComplexTableField_popup.css'); Requirements::css(SAPPHIRE_DIR . '/css/ComplexTableField_popup.css');
Requirements::css(CMS_DIR . '/css/typography.css'); Requirements::css(CMS_DIR . '/css/typography.css');
Requirements::css(CMS_DIR . '/css/cms_right.css'); Requirements::css(CMS_DIR . '/css/cms_right.css');
Requirements::javascript(THIRDPARTY_DIR . "/prototype.js"); Requirements::javascript(SAPPHIRE_DIR . "/thirdparty/prototype/prototype.js");
Requirements::javascript(THIRDPARTY_DIR . "/behaviour.js"); Requirements::javascript(SAPPHIRE_dir . "/thirdparty/behaviour/behaviour.js");
Requirements::javascript(THIRDPARTY_DIR . "/prototype_improvements.js"); Requirements::javascript(SAPPHIRE_DIR . "/javascript/prototype_improvements.js");
Requirements::javascript(THIRDPARTY_DIR . "/scriptaculous/scriptaculous.js"); Requirements::javascript(SAPPHIRE_DIR . "/thirdparty/scriptaculous/scriptaculous.js");
Requirements::javascript(THIRDPARTY_DIR . "/scriptaculous/controls.js"); Requirements::javascript(SAPPHIRE_DIR . "/thirdparty/scriptaculous/scriptaculous/controls.js");
Requirements::javascript(THIRDPARTY_DIR . "/layout_helpers.js"); Requirements::javascript(THIRDPARTY_DIR . "/layout_helpers.js");
Requirements::add_i18n_javascript(SAPPHIRE_DIR . '/javascript/lang'); Requirements::add_i18n_javascript(SAPPHIRE_DIR . '/javascript/lang');
Requirements::javascript(SAPPHIRE_DIR . "/javascript/ComplexTableField_popup.js"); Requirements::javascript(SAPPHIRE_DIR . "/javascript/ComplexTableField_popup.js");

View File

@ -93,9 +93,9 @@ class ConfirmedPasswordField extends FormField {
} }
function Field() { function Field() {
Requirements::javascript(THIRDPARTY_DIR . '/prototype.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/prototype/prototype.js');
Requirements::javascript(THIRDPARTY_DIR . '/behaviour.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/behaviour/behaviour.js');
Requirements::javascript(THIRDPARTY_DIR . '/prototype_improvements.js'); Requirements::javascript(SAPPHIRE_DIR . '/javascript/prototype_improvements.js');
Requirements::javascript(SAPPHIRE_DIR . '/javascript/ConfirmedPasswordField.js'); Requirements::javascript(SAPPHIRE_DIR . '/javascript/ConfirmedPasswordField.js');
$content = ''; $content = '';

View File

@ -49,11 +49,11 @@ class FileIFrameField extends FileField {
* @return string * @return string
*/ */
public function Field() { public function Field() {
Requirements::css(THIRDPARTY_DIR . '/jquery/themes/default/ui.all.css'); Requirements::css(SAPPHIRE_DIR . '/thirdparty/jquery-ui-themes/smoothness/ui.all.css');
Requirements::add_i18n_javascript(SAPPHIRE_DIR . '/javascript/lang'); Requirements::add_i18n_javascript(SAPPHIRE_DIR . '/javascript/lang');
Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery-latest.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery/jquery.js');
Requirements::javascript(THIRDPARTY_DIR . '/jquery/ui/ui.core.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-ui/ui.core.js');
Requirements::javascript(THIRDPARTY_DIR . '/jquery/ui/ui.dialog.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-ui/ui.dialog.js');
if($this->form->getRecord() && $this->form->getRecord()->exists()) { if($this->form->getRecord() && $this->form->getRecord()->exists()) {
return $this->createTag ( return $this->createTag (
@ -97,7 +97,7 @@ class FileIFrameField extends FileField {
// clear the requirements added by any parent controllers // clear the requirements added by any parent controllers
Requirements::clear(); Requirements::clear();
Requirements::add_i18n_javascript('sapphire/javascript/lang'); Requirements::add_i18n_javascript('sapphire/javascript/lang');
Requirements::javascript('jsparty/jquery/jquery-latest.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery/jquery.js');
Requirements::javascript('sapphire/javascript/FileIFrameField.js'); Requirements::javascript('sapphire/javascript/FileIFrameField.js');
Requirements::css('cms/css/typography.css'); Requirements::css('cms/css/typography.css');

View File

@ -78,14 +78,15 @@ class HtmlEditorConfig {
'safari_warning' => false, 'safari_warning' => false,
'relative_urls' => true, 'relative_urls' => true,
'verify_html' => true 'verify_html' => true,
); );
/** /**
* Holder list of enabled plugins * Holder list of enabled plugins
*/ */
protected $plugins = array( protected $plugins = array(
'contextmenu', 'table', 'emotions', 'paste', '../../tinymce_advcode', 'spellchecker' 'contextmenu', 'table', 'emotions', 'paste', '../../tinymce-advcode', 'spellchecker'
); );
/** /**

View File

@ -200,7 +200,7 @@ class HtmlEditorField_Toolbar extends RequestHandler {
* @return Form * @return Form
*/ */
function LinkForm() { function LinkForm() {
Requirements::javascript(THIRDPARTY_DIR . "/behaviour.js"); Requirements::javascript(SAPPHIRE_DIR . "/thirdparty/behaviour/behaviour.js");
Requirements::javascript(THIRDPARTY_DIR . "/tiny_mce_improvements.js"); Requirements::javascript(THIRDPARTY_DIR . "/tiny_mce_improvements.js");
$form = new Form( $form = new Form(
@ -253,12 +253,12 @@ class HtmlEditorField_Toolbar extends RequestHandler {
* @return Form * @return Form
*/ */
function ImageForm() { function ImageForm() {
Requirements::javascript(THIRDPARTY_DIR . "/behaviour.js"); Requirements::javascript(SAPPHIRE_DIR . "/thirdparty/behaviour/behaviour.js");
Requirements::javascript(THIRDPARTY_DIR . "/tiny_mce_improvements.js"); Requirements::javascript(THIRDPARTY_DIR . "/tiny_mce_improvements.js");
Requirements::css('cms/css/TinyMCEImageEnhancement.css'); Requirements::css('cms/css/TinyMCEImageEnhancement.css');
Requirements::javascript('cms/javascript/TinyMCEImageEnhancement.js'); Requirements::javascript('cms/javascript/TinyMCEImageEnhancement.js');
Requirements::javascript(CMS_DIR . '/javascript/Upload.js'); Requirements::javascript(CMS_DIR . '/javascript/Upload.js');
Requirements::javascript(THIRDPARTY_DIR . '/SWFUpload/SWFUpload.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/swfupload/swfupload.js');
/** /**
* @todo Adding folders via this screen is not enabled just yet as it is still * @todo Adding folders via this screen is not enabled just yet as it is still
@ -322,10 +322,10 @@ class HtmlEditorField_Toolbar extends RequestHandler {
} }
function FlashForm() { function FlashForm() {
Requirements::javascript(THIRDPARTY_DIR . "/behaviour.js"); Requirements::javascript(SAPPHIRE_DIR . "/thirdparty/behaviour/behaviour.js");
Requirements::javascript(THIRDPARTY_DIR . "/tiny_mce_improvements.js"); Requirements::javascript(THIRDPARTY_DIR . "/tiny_mce_improvements.js");
Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/swfupload/swfupload.js');
Requirements::javascript(CMS_DIR . '/javascript/Upload.js'); Requirements::javascript(CMS_DIR . '/javascript/Upload.js');
Requirements::javascript(THIRDPARTY_DIR . '/SWFUpload/SWFUpload.js');
$form = new Form( $form = new Form(
$this->controller, $this->controller,

View File

@ -22,8 +22,8 @@ class ImageFormAction extends FormAction {
parent::__construct($action, $title, $form); parent::__construct($action, $title, $form);
} }
function Field() { function Field() {
Requirements::javascript(THIRDPARTY_DIR . '/prototype.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/prototype/prototype.js');
Requirements::javascript(THIRDPARTY_DIR . '/behaviour.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/behaviour/behaviour.js');
Requirements::javascript(SAPPHIRE_DIR . '/javascript/ImageFormAction.js'); Requirements::javascript(SAPPHIRE_DIR . '/javascript/ImageFormAction.js');
$classClause = ''; $classClause = '';

View File

@ -79,8 +79,9 @@ class SelectionGroup extends CompositeField {
} }
function FieldHolder() { function FieldHolder() {
Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/prototype/prototype.js');
Requirements::javascript(THIRDPARTY_DIR . '/jquery/plugins/livequery/jquery.livequery.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/behaviour/behaviour.js');
Requirements::javascript(SAPPHIRE_DIR . '/javascript/prototype_improvements.js');
Requirements::javascript(SAPPHIRE_DIR . '/javascript/SelectionGroup.js'); Requirements::javascript(SAPPHIRE_DIR . '/javascript/SelectionGroup.js');
Requirements::css(SAPPHIRE_DIR . '/css/SelectionGroup.css'); Requirements::css(SAPPHIRE_DIR . '/css/SelectionGroup.css');

View File

@ -49,23 +49,23 @@ class TabSet extends CompositeField {
* The HTML is a standardised format, containing a &lt;ul; * The HTML is a standardised format, containing a &lt;ul;
*/ */
public function FieldHolder() { public function FieldHolder() {
Requirements::javascript(THIRDPARTY_DIR . "/jquery/jquery-latest.js"); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery/jquery.js');
Requirements::javascript(THIRDPARTY_DIR . "/jquery/jquery_improvements.js"); Requirements::javascript(SAPPHIRE_DIR . "/javascript/jquery_improvements.js");
Requirements::javascript(THIRDPARTY_DIR . '/jquery/ui/jquery-ui.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-ui/jquery-ui.js');
Requirements::javascript(THIRDPARTY_DIR . '/jquery/ui/ui.core.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-ui/ui.core.js');
Requirements::javascript(THIRDPARTY_DIR . '/jquery/ui/ui.tabs.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-ui/ui.tabs.js');
Requirements::javascript(THIRDPARTY_DIR . '/jquery/plugins/fitheighttoparent/jquery.fitheighttoparent.js'); Requirements::javascript(THIRDPARTY_DIR . '/jquery/plugins/fitheighttoparent/jquery.fitheighttoparent.js');
Requirements::css(THIRDPARTY_DIR . '/jquery/themes/smoothness/ui.all.css'); Requirements::css(SAPPHIRE_DIR . '/thirdparty/jquery-ui-themes/smoothness/ui.all.css');
Requirements::css(THIRDPARTY_DIR . '/jquery/themes/smoothness/ui.tabs.css'); Requirements::css(SAPPHIRE_DIR . '/thirdparty/jquery-ui-themes/smoothness/ui.tabs.css');
// concrete // concrete
Requirements::javascript(THIRDPARTY_DIR . '/jquery/plugins/concrete/jquery.class.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-concrete/jquery.class.js');
Requirements::javascript(THIRDPARTY_DIR . '/jquery/plugins/concrete/jquery.selector.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-concrete/jquery.selector.js');
Requirements::javascript(THIRDPARTY_DIR . '/jquery/plugins/concrete/jquery.selector.specifity.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-concrete/jquery.selector.specifity.js');
Requirements::javascript(THIRDPARTY_DIR . '/jquery/plugins/concrete/jquery.selector.matches.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-concrete/jquery.selector.matches.js');
Requirements::javascript(THIRDPARTY_DIR . '/jquery/plugins/concrete/jquery.dat.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-concrete/jquery.dat.js');
Requirements::javascript(THIRDPARTY_DIR . '/jquery/plugins/concrete/jquery.concrete.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-concrete/jquery.concrete.js');
Requirements::javascript(SAPPHIRE_DIR . '/javascript/TabSet.js'); Requirements::javascript(SAPPHIRE_DIR . '/javascript/TabSet.js');

View File

@ -500,10 +500,10 @@ class TableField extends TableListField {
* Sets the template to be rendered with * Sets the template to be rendered with
*/ */
function FieldHolder() { function FieldHolder() {
Requirements::javascript(THIRDPARTY_DIR . '/prototype.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/prototype/prototype.js');
Requirements::javascript(THIRDPARTY_DIR . '/behaviour.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/behaviour/behaviour.js');
Requirements::javascript(THIRDPARTY_DIR . '/prototype_improvements.js'); Requirements::javascript(SAPPHIRE_DIR . '/javascript/prototype_improvements.js');
Requirements::javascript(THIRDPARTY_DIR . '/scriptaculous/effects.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/scriptaculous/effects.js');
Requirements::add_i18n_javascript(SAPPHIRE_DIR . '/javascript/lang'); Requirements::add_i18n_javascript(SAPPHIRE_DIR . '/javascript/lang');
Requirements::javascript(SAPPHIRE_DIR . '/javascript/TableListField.js'); Requirements::javascript(SAPPHIRE_DIR . '/javascript/TableListField.js');
Requirements::javascript(SAPPHIRE_DIR . '/javascript/TableField.js'); Requirements::javascript(SAPPHIRE_DIR . '/javascript/TableField.js');

View File

@ -284,10 +284,10 @@ class TableListField extends FormField {
} }
function FieldHolder() { function FieldHolder() {
Requirements::javascript(THIRDPARTY_DIR . '/prototype.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/prototype/prototype.js');
Requirements::javascript(THIRDPARTY_DIR . '/behaviour.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/behaviour/behaviour.js');
Requirements::javascript(THIRDPARTY_DIR . '/prototype_improvements.js'); Requirements::javascript(SAPPHIRE_DIR . '/javascript/prototype_improvements.js');
Requirements::javascript(THIRDPARTY_DIR . '/scriptaculous/effects.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/scriptaculous/effects.js');
Requirements::add_i18n_javascript(SAPPHIRE_DIR . '/javascript/lang'); Requirements::add_i18n_javascript(SAPPHIRE_DIR . '/javascript/lang');
Requirements::javascript(SAPPHIRE_DIR . '/javascript/TableListField.js'); Requirements::javascript(SAPPHIRE_DIR . '/javascript/TableListField.js');
Requirements::css(SAPPHIRE_DIR . '/css/TableListField.css'); Requirements::css(SAPPHIRE_DIR . '/css/TableListField.css');

View File

@ -21,9 +21,9 @@ class ToggleCompositeField extends CompositeField {
} }
public function FieldHolder() { public function FieldHolder() {
Requirements::javascript(THIRDPARTY_DIR . "/prototype.js"); Requirements::javascript(SAPPHIRE_DIR . "/thirdparty/prototype/prototype.js");
Requirements::javascript(THIRDPARTY_DIR . "/behaviour.js"); Requirements::javascript(SAPPHIRE_DIR . "/thirdparty/behaviour/behaviour.js");
Requirements::javascript(THIRDPARTY_DIR . "/prototype_improvements.js"); Requirements::javascript(SAPPHIRE_DIR . "/javascript/prototype_improvements.js");
Requirements::javascript(SAPPHIRE_DIR . "/javascript/ToggleCompositeField.js"); Requirements::javascript(SAPPHIRE_DIR . "/javascript/ToggleCompositeField.js");
return $this->renderWith("ToggleCompositeField"); return $this->renderWith("ToggleCompositeField");

View File

@ -49,9 +49,9 @@ class ToggleField extends ReadonlyField {
function Field() { function Field() {
$content = ''; $content = '';
Requirements::javascript(THIRDPARTY_DIR . "/prototype.js"); Requirements::javascript(SAPPHIRE_DIR . "/thirdparty/prototype/prototype.js");
Requirements::javascript(THIRDPARTY_DIR . "/behaviour.js"); Requirements::javascript(SAPPHIRE_DIR . "/thirdparty/behaviour/behaviour.js");
Requirements::javascript(THIRDPARTY_DIR . "/prototype_improvements.js"); Requirements::javascript(SAPPHIRE_DIR . "/javascript/prototype_improvements.js");
Requirements::javascript(SAPPHIRE_DIR . "/javascript/ToggleField.js"); Requirements::javascript(SAPPHIRE_DIR . "/javascript/ToggleField.js");
if($this->startClosed) $this->addExtraClass('startClosed'); if($this->startClosed) $this->addExtraClass('startClosed');

View File

@ -38,16 +38,6 @@ class TreeDropdownField extends FormField {
); );
} }
Requirements::add_i18n_javascript(SAPPHIRE_DIR . '/javascript/lang');
Requirements::javascript(THIRDPARTY_DIR . '/prototype.js');
Requirements::javascript(THIRDPARTY_DIR . '/behaviour.js');
Requirements::javascript(THIRDPARTY_DIR . '/tree/tree.js');
Requirements::javascript(SAPPHIRE_DIR . '/javascript/TreeSelectorField.js');
Requirements::css(THIRDPARTY_DIR . '/tree/tree.css');
Requirements::css(SAPPHIRE_DIR . '/css/TreeDropdownField.css');
parent::__construct($name, $title); parent::__construct($name, $title);
} }
@ -77,6 +67,14 @@ class TreeDropdownField extends FormField {
* @return string * @return string
*/ */
public function Field() { public function Field() {
Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/prototype.js');
Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/behaviour.js');
Requirements::css(SAPPHIRE_DIR . '/css/TreeDropdownField.css');
Requirements::javascript(SAPPHIRE_DIR . "/javascript/tree/tree.js");
Requirements::css(SAPPHIRE_DIR . "/javascript/tree/tree.css");
Requirements::add_i18n_javascript(SAPPHIRE_DIR . '/javascript/lang');
Requirements::javascript(SAPPHIRE_DIR . "/javascript/TreeSelectorField.js");
if($this->Value() && $record = $this->objectForKey($this->Value())) { if($this->Value() && $record = $this->objectForKey($this->Value())) {
$title = $record->{$this->labelField}; $title = $record->{$this->labelField};
} else { } else {

View File

@ -172,9 +172,9 @@ abstract class Validator extends Object {
function includeJavascriptValidation() { function includeJavascriptValidation() {
if($this->getJavascriptValidationHandler() == 'prototype') { if($this->getJavascriptValidationHandler() == 'prototype') {
Requirements::javascript(THIRDPARTY_DIR . "/prototype.js"); Requirements::javascript(SAPPHIRE_DIR . "/thirdparty/prototype/prototype.js");
Requirements::javascript(THIRDPARTY_DIR . "/behaviour.js"); Requirements::javascript(SAPPHIRE_DIR . "/thirdparty/behaviour/behaviour.js");
Requirements::javascript(THIRDPARTY_DIR . "/prototype_improvements.js"); Requirements::javascript(SAPPHIRE_DIR . "/javascript/prototype_improvements.js");
Requirements::add_i18n_javascript(SAPPHIRE_DIR . '/javascript/lang'); Requirements::add_i18n_javascript(SAPPHIRE_DIR . '/javascript/lang');
Requirements::javascript(SAPPHIRE_DIR . "/javascript/Validator.js"); Requirements::javascript(SAPPHIRE_DIR . "/javascript/Validator.js");

View File

@ -1320,11 +1320,11 @@ class Member_ProfileForm extends Form {
Requirements::clear(); Requirements::clear();
Requirements::css(CMS_DIR . '/css/typography.css'); Requirements::css(CMS_DIR . '/css/typography.css');
Requirements::css(CMS_DIR . '/css/cms_right.css'); Requirements::css(CMS_DIR . '/css/cms_right.css');
Requirements::javascript(THIRDPARTY_DIR . "/prototype.js"); Requirements::javascript(SAPPHIRE_DIR . "/thirdparty/prototype/prototype.js");
Requirements::javascript(THIRDPARTY_DIR . "/behaviour.js"); Requirements::javascript(SAPPHIRE_DIR . "/thirdparty/behaviour/behaviour.js");
Requirements::javascript(THIRDPARTY_DIR . "/prototype_improvements.js"); Requirements::javascript(SAPPHIRE_DIR . "/javascript/prototype_improvements.js");
Requirements::javascript(THIRDPARTY_DIR . "/scriptaculous/scriptaculous.js"); Requirements::javascript(SAPPHIRE_DIR . "/thirdparty/scriptaculous/scriptaculous.js");
Requirements::javascript(THIRDPARTY_DIR . "/scriptaculous/controls.js"); Requirements::javascript(SAPPHIRE_DIR . "/thirdparty/scriptaculous/controls.js");
Requirements::javascript(THIRDPARTY_DIR . "/layout_helpers.js"); Requirements::javascript(THIRDPARTY_DIR . "/layout_helpers.js");
Requirements::css(SAPPHIRE_DIR . "/css/Form.css"); Requirements::css(SAPPHIRE_DIR . "/css/Form.css");

View File

@ -338,19 +338,19 @@ class Security extends Controller {
// with the tabstrip library otherwise // with the tabstrip library otherwise
$link_base = Director::absoluteURL($this->Link("login")); $link_base = Director::absoluteURL($this->Link("login"));
Requirements::javascript(THIRDPARTY_DIR . "/jquery/jquery-latest.js"); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery/jquery.js');
Requirements::javascript(THIRDPARTY_DIR . "/jquery/jquery_improvements.js"); Requirements::javascript(SAPPHIRE_DIR . "/javascript/jquery_improvements.js");
Requirements::javascript(THIRDPARTY_DIR . '/jquery/ui/jquery-ui.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-ui/jquery-ui.js');
Requirements::javascript(THIRDPARTY_DIR . '/jquery/ui/ui.core.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-ui/ui.core.js');
Requirements::javascript(THIRDPARTY_DIR . '/jquery/ui/ui.tabs.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-ui/ui.tabs.js');
// concrete // concrete
Requirements::javascript(THIRDPARTY_DIR . '/jquery/plugins/concrete/jquery.class.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-concrete/jquery.class.js');
Requirements::javascript(THIRDPARTY_DIR . '/jquery/plugins/concrete/jquery.selector.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-concrete/jquery.selector.js');
Requirements::javascript(THIRDPARTY_DIR . '/jquery/plugins/concrete/jquery.selector.specifity.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-concrete/jquery.selector.specifity.js');
Requirements::javascript(THIRDPARTY_DIR . '/jquery/plugins/concrete/jquery.selector.matches.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-concrete/jquery.selector.matches.js');
Requirements::javascript(THIRDPARTY_DIR . '/jquery/plugins/concrete/jquery.dat.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-concrete/jquery.dat.js');
Requirements::javascript(THIRDPARTY_DIR . '/jquery/plugins/concrete/jquery.concrete.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-concrete/jquery.concrete.js');
Requirements::css(THIRDPARTY_DIR . '/jquery/themes/smoothness/ui.all.css'); Requirements::css(THIRDPARTY_DIR . '/jquery/themes/smoothness/ui.all.css');
Requirements::css(THIRDPARTY_DIR . '/jquery/themes/smoothness/ui.tabs.css'); Requirements::css(THIRDPARTY_DIR . '/jquery/themes/smoothness/ui.tabs.css');
@ -407,11 +407,11 @@ class Security extends Controller {
* @return string Returns the "lost password" page as HTML code. * @return string Returns the "lost password" page as HTML code.
*/ */
public function lostpassword() { public function lostpassword() {
Requirements::javascript(THIRDPARTY_DIR . '/prototype.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/prototype/prototype.js');
Requirements::javascript(THIRDPARTY_DIR . '/behaviour.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/behaviour/behaviour.js');
Requirements::javascript(THIRDPARTY_DIR . '/loader.js'); Requirements::javascript(THIRDPARTY_DIR . '/loader.js');
Requirements::javascript(THIRDPARTY_DIR . '/prototype_improvements.js'); Requirements::javascript(SAPPHIRE_DIR . '/javascript/prototype_improvements.js');
Requirements::javascript(THIRDPARTY_DIR . '/scriptaculous/effects.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/scriptaculous/effects.js');
$tmpPage = new Page(); $tmpPage = new Page();
$tmpPage->Title = _t('Security.LOSTPASSWORDHEADER', 'Lost Password'); $tmpPage->Title = _t('Security.LOSTPASSWORDHEADER', 'Lost Password');
@ -466,11 +466,11 @@ class Security extends Controller {
* @return string Returns the "password sent" page as HTML code. * @return string Returns the "password sent" page as HTML code.
*/ */
public function passwordsent($request) { public function passwordsent($request) {
Requirements::javascript(THIRDPARTY_DIR . '/behaviour.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/behaviour/behaviour.js');
Requirements::javascript(THIRDPARTY_DIR . '/loader.js'); Requirements::javascript(THIRDPARTY_DIR . '/loader.js');
Requirements::javascript(THIRDPARTY_DIR . '/prototype.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/prototype/prototype.js');
Requirements::javascript(THIRDPARTY_DIR . '/prototype_improvements.js'); Requirements::javascript(SAPPHIRE_DIR . '/javascript/prototype_improvements.js');
Requirements::javascript(THIRDPARTY_DIR . '/scriptaculous/effects.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/scriptaculous/effects.js');
$tmpPage = new Page(); $tmpPage = new Page();
$tmpPage->Title = _t('Security.LOSTPASSWORDHEADER'); $tmpPage->Title = _t('Security.LOSTPASSWORDHEADER');

View File

@ -61,7 +61,7 @@ in the other stage:<br />
} }
function index() { function index() {
Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery-latest.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery/jquery.js');
Requirements::customCSS('#OrphanIDs .middleColumn {width: auto;}'); Requirements::customCSS('#OrphanIDs .middleColumn {width: auto;}');
Requirements::customCSS('#OrphanIDs label {display: inline;}'); Requirements::customCSS('#OrphanIDs label {display: inline;}');

455
thirdparty/greybox/greybox.js vendored Executable file
View File

@ -0,0 +1,455 @@
/****
Last Modified: 25/08/06 20:52:59
CAUTION: Modified Version to suit Silverstripe CMS (www.silverstripe.com).
Original at http://orangoo.com/labs/uploads/GreyBox_v3_46.zip
GreyBox - Smart pop-up window
Copyright Amir Salihefendic 2006
AUTHOR
4mir Salihefendic (http://amix.dk) - amix@amix.dk
VERSION
3.46
LICENSE
GPL (read more in GPL.txt)
SITE
http://orangoo.com/labs/GreyBox/
****/
var GB_CURRENT = null;
var GB_ONLY_ONE = null;
// modified 2006-01-06 by Silverstripe Ltd.
try {
var theBaseHref = document.getElementsByTagName("base")[0].href;
var GB_IMG_DIR = theBaseHref + "sapphire/thirdparty/greybox/";
} catch(err) {
var GB_IMG_DIR = "sapphire/thirdparty/greybox/";
}
function GreyBox() {
//Use mutator functions (since the internal stuff may change in the future)
this.type = "page";
this.overlay_click_close = true;
if(GB_IMG_DIR)
this.img_dir = GB_IMG_DIR;
else
this.img_dir = "greybox/";
this.overlay_color = "dark";
this.center_window = false;
this.g_window = null;
this.g_container = null;
this.iframe = null;
this.overlay = null;
this.timeout = null;
this.defaultSize();
this.showCloseImage(true);
this.url = "";
this.caption = "";
this.callback_fn = [];
this.reload_on_close = false;
}
////
// Configuration functions (the functions you can call)
//
/**
Set the width and height of the GreyBox window.
Images and notifications are auto-set.
**/
GreyBox.prototype.setDimension = function(width, height) {
this.height = height;
this.width = width;
}
GreyBox.prototype.setFullScreen = function(bool) {
this.full_screen = bool;
}
/**
Type can be: page, image
**/
GreyBox.prototype.setType = function(type) {
this.type = type;
}
/**
If bool is true the window will be centered vertically also
**/
GreyBox.prototype.setCenterWindow = function(bool) {
this.center_window = bool;
}
/**
Set the path where images can be found.
Can be relative: greybox/
Or absolute: http://yoursite.com/greybox/
**/
GreyBox.prototype.setImageDir = function(dir) {
this.img_dir = dir;
}
GreyBox.prototype.showCloseImage = function(bool) {
this.show_close_img = bool;
}
/**
If bool is true the grey overlay click will close greybox.
**/
GreyBox.prototype.setOverlayCloseClick = function(bool) {
this.overlay_click_close = bool;
}
/**
Overlay can either be "light" or "dark".
**/
GreyBox.prototype.setOverlayColor = function(color) {
this.overlay_color = color;
}
/**
Set a function that will be called when GreyBox closes
**/
GreyBox.prototype.setCallback = function(fn) {
if(fn)
this.callback_fn.push(fn);
}
////
// Show hide functions
//
/**
Show the GreyBox with a caption and an url
**/
GreyBox.prototype.show = function(caption, url) {
GB_CURRENT = this;
this.url = url;
this.caption = caption;
//Be sure that the old loader and dummy_holder are removed
AJS.map(AJS.$bytc("div", "GB_dummy"), function(elm) { AJS.removeElement(elm) });
AJS.map(AJS.$bytc("div", "GB_loader"), function(elm) { AJS.removeElement(elm) });
//If ie, hide select, in others hide flash
if(AJS.isIe())
AJS.map(AJS.$bytc("select"), function(elm) {elm.style.visibility = "hidden"});
AJS.map(AJS.$bytc("object"), function(elm) {elm.style.visibility = "hidden"});
this.initOverlayIfNeeded();
this.setOverlayDimension();
AJS.showElement(this.overlay);
this.setFullScreenOption();
this.initIfNeeded();
AJS.hideElement(this.g_window);
AJS.ACN(this.g_container, this.iframe);
if(caption == "")
caption = "&nbsp;";
this.div_caption.innerHTML = caption;
AJS.showElement(this.g_window)
this.setVerticalPosition();
this.setWidthNHeight();
this.setTopNLeft();
GB_CURRENT.startLoading();
return false;
}
GreyBox.prototype.hide = function() {
AJS.hideElement(this.g_window, this.overlay);
try{ AJS.removeElement(this.iframe); }
catch(e) {}
this.iframe = null;
if(this.type == "image") {
this.width = 200;
this.height = 200;
}
if(AJS.isIe())
AJS.map(AJS.$bytc("select"), function(elm) {elm.style.visibility = "visible"});
AJS.map(AJS.$bytc("object"), function(elm) {elm.style.visibility = "visible"});
var c_bs = GB_CURRENT.callback_fn;
if(c_bs != []) {
AJS.map(c_bs, function(fn) {
fn();
});
}
GB_CURRENT = null;
if(this.reload_on_close)
window.location.reload();
}
/**
If you only use one instance of GreyBox
**/
GB_initOneIfNeeded = function() {
if(!GB_ONLY_ONE) {
GB_ONLY_ONE = new GreyBox();
}
}
GB_show = function(caption, url, /* optional */ height, width, callback_fn) {
GB_initOneIfNeeded();
GB_ONLY_ONE.defaultSize();
GB_ONLY_ONE.setFullScreen(false);
GB_ONLY_ONE.setType("page");
GB_ONLY_ONE.setCallback(callback_fn);
GB_ONLY_ONE.setDimension(width, height);
GB_ONLY_ONE.show(caption, url);
return false;
}
GB_showFullScreen = function(caption, url, /* optional */ callback_fn) {
GB_initOneIfNeeded();
GB_ONLY_ONE.defaultSize();
GB_ONLY_ONE.setType("page");
GB_ONLY_ONE.setCallback(callback_fn);
GB_ONLY_ONE.setFullScreen(true);
GB_ONLY_ONE.show(caption, url);
return false;
}
GB_showImage = function(caption, url) {
GB_initOneIfNeeded();
GB_ONLY_ONE.defaultSize();
GB_ONLY_ONE.setFullScreen(false);
GB_ONLY_ONE.setType("image");
GB_ONLY_ONE.show(caption, url);
return false;
}
GB_hide = function() {
GB_CURRENT.hide();
}
/**
Preload all the images used by GreyBox. Static function
**/
GreyBox.preloadGreyBoxImages = function(img_dir) {
var pics = [];
if(!img_dir)
img_dir = GB_IMG_DIR;
var fn = function(path) {
var pic = new Image();
pic.src = GB_IMG_DIR + path;
pics.push(pic);
};
AJS.map(['indicator.gif', 'blank.gif', 'close.gif', 'header_bg.gif', 'overlay_light.png', 'overlay_dark.png'], AJS.$b(fn, this));
}
////
// Internal functions
//
GreyBox.prototype.getOverlayImage = function() {
return "overlay_" + this.overlay_color + ".png";
};
/**
Init functions
**/
GreyBox.prototype.initOverlayIfNeeded = function() {
//Create the overlay
this.overlay = AJS.DIV({'id': 'GB_overlay'});
if(AJS.isIe()) {
this.overlay.style.backgroundColor = "#000000";
this.overlay.style.backgroundColor = "transparent";
this.overlay.style.backgroundImage = "url("+ this.img_dir +"blank.gif)";
this.overlay.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.img_dir + this.getOverlayImage() + "',sizingMethod='scale')";
}
else
this.overlay.style.backgroundImage = "url("+ this.img_dir + this.getOverlayImage() +")";
if(this.overlay_click_close)
AJS.AEV(this.overlay, "click", GB_hide);
AJS.getBody().insertBefore(this.overlay, AJS.getBody().firstChild);
};
GreyBox.prototype.initIfNeeded = function() {
this.init();
this.setWidthNHeight = AJS.$b(this.setWidthNHeight, this);
this.setTopNLeft = AJS.$b(this.setTopNLeft, this);
this.setFullScreenOption = AJS.$b(this.setFullScreenOption, this);
this.setOverlayDimension = AJS.$b(this.setOverlayDimension, this);
GreyBox.addOnWinResize(this.setWidthNHeight, this.setTopNLeft, this.setFullScreenOption, this.setOverlayDimension);
this.g_container.style.marginBottom = "-3px";
var fn = function() {
this.setOverlayDimension();
this.setVerticalPosition();
this.setTopNLeft();
this.setWidthNHeight();
};
AJS.AEV(window, "scroll", AJS.$b(fn, this));
if(!this.iframe) {
var new_frame;
var d = {'name': 'GB_frame', 'class': 'GB_frame', 'frameBorder': 0};
new_frame = AJS.IFRAME(d);
this.iframe = new_frame;
AJS.hideElement(this.iframe);
}
}
GreyBox.prototype.init = function() {
//Create the window
this.g_window = AJS.DIV({'id': 'GB_window'});
//Create the table structure
var table = AJS.TABLE({'class': 'GB_t_frame', 'frameborder': 0});
var tbody = AJS.TBODY();
AJS.ACN(table, tbody);
//Midlle
var td_middle_m = AJS.TD({'class': 'GB_content'});
this.td_middle_m = td_middle_m;
AJS.ACN(tbody, AJS.TR(td_middle_m));
//Append caption and close
var header = AJS.TABLE({'class': 'GB_header'});
this.header = header;
var caption = AJS.TD({'class': 'GB_caption'});
this.div_caption = caption;
/*header.style.backgroundImage = "url("+ this.img_dir +"header_bg.gif)";*/
tbody_header = AJS.TBODY();
var close = AJS.TD({'class': 'GB_close'});
if(this.show_close_img) {
var img_close = AJS.IMG({'src': this.img_dir + 'close.gif'});
AJS.ACN(close, img_close, "Close");
AJS.AEV(close, "click", GB_hide);
}
AJS.ACN(tbody_header, AJS.TR(caption, close));
AJS.ACN(header, tbody_header);
AJS.ACN(td_middle_m, header);
//Container
this.g_container = AJS.DIV({'class': 'GB_container'});
AJS.ACN(td_middle_m, this.g_container);
AJS.ACN(this.g_window, table);
AJS.getBody().insertBefore(this.g_window, this.overlay.nextSibling);
}
GreyBox.prototype.startLoading = function() {
//Start preloading the object
this.iframe.src = this.img_dir + 'loader_frame.html';
AJS.showElement(this.iframe);
}
/**
Set dimension functions
**/
GreyBox.prototype.setIframeWidthNHeight = function() {
try{
AJS.setWidth(this.iframe, this.width);
AJS.setHeight(this.iframe, this.height);
}
catch(e) {
}
}
GreyBox.prototype.setOverlayDimension = function() {
var page_size = AJS.getWindowSize();
if((navigator.userAgent.toLowerCase().indexOf("firefox") != -1))
AJS.setWidth(this.overlay, "100%");
else
AJS.setWidth(this.overlay, page_size.w);
var max_height = Math.max(AJS.getScrollTop()+page_size.h, AJS.getScrollTop()+this.height);
if(max_height < AJS.getScrollTop())
AJS.setHeight(this.overlay, max_height);
else
AJS.setHeight(this.overlay, AJS.getScrollTop()+page_size.h);
}
GreyBox.prototype.setWidthNHeight = function() {
//Set size
AJS.setWidth(this.g_window, this.width);
AJS.setHeight(this.g_window, this.height);
AJS.setWidth(this.g_container, this.width);
AJS.setHeight(this.g_container, this.height);
this.setIframeWidthNHeight();
//Set size on components
AJS.setWidth(this.td_middle_m, this.width+10);
}
/**
* Modified 2006-10-08 by Silverstripe
*/
GreyBox.prototype.setTopNLeft = function() {
var page_size = AJS.getWindowSize();
AJS.setLeft(this.g_window, ((page_size.w - this.width)/2)-13);
var fl = ((page_size.h - this.height) /2) - 15 + AJS.getScrollTop();
AJS.setTop(this.g_window, fl);
}
GreyBox.prototype.setVerticalPosition = function() {
var page_size = AJS.getWindowSize();
var st = AJS.getScrollTop();
if(this.g_window.offsetWidth <= page_size.h || st <= this.g_window.offsetTop) {
AJS.setTop(this.g_window, st);
}
}
GreyBox.prototype.setFullScreenOption = function() {
if(this.full_screen) {
var page_size = AJS.getWindowSize();
overlay_h = page_size.h;
this.width = Math.round(this.overlay.offsetWidth - (this.overlay.offsetWidth/100)*10);
this.height = Math.round(overlay_h - (overlay_h/100)*10);
}
}
GreyBox.prototype.defaultSize = function() {
this.width = 300;
this.height = 300;
}
////
// Misc.
//
GreyBox.addOnWinResize = function(funcs) {
funcs = AJS.$A(funcs);
AJS.map(funcs, function(fn) { AJS.AEV(window, "resize", fn); });
}