diff --git a/app/webroot/css.php b/app/webroot/css.php index 4d7551659..55b2c9a42 100644 --- a/app/webroot/css.php +++ b/app/webroot/css.php @@ -34,8 +34,9 @@ /** * Enter description here... */ -require(ROOT.'config'.DS.'paths.php'); -require(LIBS.'basics.php'); +require_once(CONFIGS.'paths.php'); +require_once(CAKE.'basics.php'); +require_once(LIBS.'folder.php'); require(LIBS.'file.php'); require(LIBS.'legacy.php'); diff --git a/app/webroot/css/cake.default.css b/app/webroot/css/cake.default.css index dd91cbe85..680a98387 100644 --- a/app/webroot/css/cake.default.css +++ b/app/webroot/css/cake.default.css @@ -77,47 +77,44 @@ p #header { padding: 0px; - height: 112px; + height: 114px; background: #fff url("../img/cake.bg.header.gif") repeat-x; border-bottom: 1px solid #D2D7D8; - vertical-align: bottom; - white-space: normal; + margin-bottom: 30px; + text-align: right; } - -#headerLogo +#header img { float: left; + vertical-align: middle; border: 0; } -#headerLogo img -{ - border: 0; -} -#headerNav +.headerNav { float: right; - margin-top: 56px; - margin-right: 30px; - margin-bottom: 12px; - font-size: 15px; + margin-top: 3px; + padding-right: 30px; + font-size: 13px; font-weight: bold; color: #71300F; } -#headerNav a { +.headerNav a { padding: 4px 10px; } -#headerNav a:hover { +.headerNav a:hover { padding: 4px 10px; - background-color: #D2D7D8; + background-color: #fff; } -#headerNav .active { +.headerNav .active { padding: 4px 10px; - background-color: #D2D7D8; + background-color: #fff; } #pageNav { - margin-top: 20px; + clear: both; + margin-top: 0px; margin-right: 30px; + margin-left: 30px; text-align: right; font-size: 15px; font-weight: bold; @@ -148,7 +145,7 @@ p { clear: both; margin: 2px 20px 20px 20px; - padding: 6px 28px 40px 22px; + padding: 20px 28px 40px 22px; background-color: #fff; border-top: 1px solid #D2D7D8; border-left: 1px solid #D2D7D8; diff --git a/app/webroot/css/cake.forms.css b/app/webroot/css/cake.forms.css index 08abaab44..bde160adc 100644 --- a/app/webroot/css/cake.forms.css +++ b/app/webroot/css/cake.forms.css @@ -1,10 +1,11 @@ /* form.css */ form { - font-size: 100%; - min-width: 560px; - max-width: 620px; - width: 590px; + margin: 0 4px; + font-size: 120%; + border-width: 0px 0px 0px 0px; + border-style: solid; + border-color: #71300F; } form fieldset { @@ -23,7 +24,7 @@ form fieldset legend { } label { - font-size: 100%; + font-size: 150%; } label u { @@ -44,7 +45,6 @@ textarea { form div { clear: left; display: block; - width: 354px; height: expression('1%'); margin: 5px 0px 0px 0px; padding: 1px 3px; @@ -85,12 +85,11 @@ form fieldset div.notes p.last { form div fieldset { clear: none; - border-width: 1px; + border-width: 0px 1px 0px 1px; border-style: solid; border-color: #666; margin: 0px 0px 0px 142px; padding: 0px 5px 5px 5px; - width: 197px; } form div fieldset legend { @@ -105,7 +104,9 @@ form div.required fieldset legend { form div label { display: block; float: left; - width: 130px; + width: 200px; + background-color: #f4f4f4; + font-size: 16px; padding: 3px 5px; margin: 0px 0px 5px 0px; text-align: right; @@ -122,7 +123,6 @@ form div.required label, label.required { form div label.labelCheckbox, form div label.labelRadio { float: none; display: block; - width: 200px; height: expression('1%'); margin: 0px 0px 5px 142px; text-align: left; @@ -130,43 +130,14 @@ form div label.labelCheckbox, form div label.labelRadio { form div fieldset label.labelCheckbox, form div fieldset label.labelRadio { margin: 0px 0px 5px 0px; - width: 170px; } - p.error { - background-color: #f00; - background-image: url(/images/icon_error.gif); - background-repeat: no-repeat; - background-position: 3px 3px; - color: #ffffff; - padding: 3px 3px 5px 27px; - border: 1px solid #000; - margin: auto 100px; -} - -form div.error { - background-color: #ffffe1; - background-image: url(/images/required_bg.gif); - background-repeat: no-repeat; - background-position: top left; - color: #666; - border: 1px solid #f00; -} - -form div.error p.error { - background-image: url(/images/icon_error.gif); - background-position: top left; - background-color: transparent; - border-style: none; - font-size: 88%; - font-weight: bold; - margin: 0px 0px 0px 118px; - width: 200px; - color: #f00; + color: #71300F; + background-color: #DBA941; } form div input, form div select, form div textarea { - width: 200px; + background-color: #f4f4f4; padding: 1px 3px; margin: 0px 0px 0px 0px; } @@ -189,38 +160,34 @@ form div input.inputCheckbox, form div input.inputRadio, input.inputCheckbox, in } form div.submit { - width: 214px; padding: 0px 0px 0px 140px; clear:both; display:block; } div.submit input { - text-align:center; - font-weight: bold; - color: #fff; - background-color:#3297FC; - display:block; - float:left; - text-decoration: none; - border: 1px; - width: 215px; - padding:6px; - margin: 5px; - -} -form div.submit div { - display: inline; - float: left; - text-align: left; + padding: 2px 12px; + color: #71300F; + background-color:#ccc; + text-decoration: none; + border: 1px solid #666; + font-size: 14px; + font-weight: bold; + text-align:center; + text-decoration: none; width: auto; } - -form div input.inputSubmit, form div input.inputButton, input.inputSubmit, input.inputButton { - background-color: #cccccc; - color: #000000; +div.submit input:hover { + padding: 2px 12px; + color: #fff; + background-color:#71300F; + text-decoration: none; + border: 1px solid #666; + font-size: 14px; + font-weight: bold; + text-align:center; + text-decoration: none; width: auto; - padding: 0px 6px; } form div.submit div input.inputSubmit, form div.submit div input.inputButton { diff --git a/app/webroot/css/cake.scaffold.css b/app/webroot/css/cake.scaffold.css index 38b404c54..2da21bd3f 100644 --- a/app/webroot/css/cake.scaffold.css +++ b/app/webroot/css/cake.scaffold.css @@ -1,4 +1,18 @@ /* CSS Document */ +h1 +{ + padding: 2px 6px; + color: #fff; + background-color: #71300F; + font-size: 30px; +} +h2 +{ + padding: 1px 6px; + color: #fff; + background-color: #71300F; + font-size: 24px; +} code, pre { color:#44a; font-family:monospace; @@ -26,65 +40,79 @@ li { } .notice { - background: #71300F; - border: solid 2px #eeb; - display: block; + color: #71300F; + background-color: #DBA941; font-family: Verdana; padding: 1em; } .tip { - background: #71300F; - border: solid 2px #333; - padding: 1em; -} -.error { - color: #DBA941 - background: #f4f4f4; - border: solid 2px #333; + color: #71300F; + background-color: #DBA941; padding: 1em; } + ul.actions { list-style: none; - text-align:right; + text-align:left; margin:2em 0; + padding: 0 0em; } ul.actions li { - border: 1px solid #333; margin-left:1em; - width:10em; list-style: none; + display: inline; } ul.actions li a, ul.actions li input { - background-color:#71300F; - border:1px solid #71300F; - clear: both; - color: #fff; - display:block; + padding: 2px 12px; + color: #71300F; + background-color:#ccc; + text-decoration: none; + border: 1px solid #666; + line-height: 24px; + font-size: 14px; font-weight: bold; text-align:center; text-decoration: none; } +ul.actions li a:hover { + color: #71300F; + background-color:#fff; + text-decoration: none; +} td.listactions { - width:17em; + width: 14em; + text-align: center; + white-space: nowrap; } td.listactions a { -float: left; + + padding: 0px 8px; text-align:center; + font-size: 14px; + font-weight: bold; + color: #71300F; + background-color:#ccc; + text-decoration: none; + border: 1px solid #666; + +} +td.listactions a:hover { + padding: 0px 8px; + text-align:center; + font-size: 14px; font-weight: bold; color: #fff; background-color:#71300F; - display:block; text-decoration: none; - margin-bottom:3px; - margin-right: 3px; - border: 1px; - width:5em; + border: 1px solid #666; + white-space: nowrap; } table { + width: 100%; background-color: #fff; border: 1px solid #333; clear:both; - margin: 1em 0 2em 0; + margin: 0em 0 2em 0; white-space: normal; } th { @@ -92,13 +120,15 @@ th { border-top: 1px solid #fff; border-right: 1px solid #666; border-bottom: 1px solid #666; - text-align: left; + text-align: center; padding:3px; } table tr td { border-right: 1px solid #ccc; - padding:2px 4px; + padding:4px 4px; + font-size: 12px; vertical-align:top; + text-align: center; } table tr.altRow td { background: #f4f4f4; diff --git a/app/webroot/index.php b/app/webroot/index.php index ce23f7dd1..e72d08fd8 100644 --- a/app/webroot/index.php +++ b/app/webroot/index.php @@ -109,8 +109,8 @@ require_once LIBS.'inflector.php'; if (strpos($url, 'ccss/') === 0) { - include ROOT.'public'.DS.'css.php'; - die; + include WWW_ROOT.DS.'css.php'; + die(); } diff --git a/cake/basics.php b/cake/basics.php index 60eb45bc6..def65e78c 100644 --- a/cake/basics.php +++ b/cake/basics.php @@ -399,23 +399,23 @@ function params($p) * * @return string */ -function setUri() { - if (isset($_SERVER['REQUEST_URI'])) + function setUri() { - $uri = $_SERVER['REQUEST_URI']; - } - else - { - if (isset($_SERVER['argv'])) + if (isset($_SERVER['REQUEST_URI'])) { - $uri = $_SERVER['PHP_SELF'] .'/'. $_SERVER['argv'][0]; + $uri = $_SERVER['REQUEST_URI']; } else { - $uri = $_SERVER['PHP_SELF'] .'/'. $_SERVER['QUERY_STRING']; + if (isset($_SERVER['argv'])) + { + $uri = $_SERVER['PHP_SELF'] .'/'. $_SERVER['argv'][0]; + } + else + { + $uri = $_SERVER['PHP_SELF'] .'/'. $_SERVER['QUERY_STRING']; + } } - } - return $uri; -} - + return $uri; + } ?> \ No newline at end of file diff --git a/cake/libs/controller/controller.php b/cake/libs/controller/controller.php index ae38e4806..fdb7dd113 100644 --- a/cake/libs/controller/controller.php +++ b/cake/libs/controller/controller.php @@ -649,6 +649,7 @@ class Controller extends Object } switch( $type ) { + case "text": { $fieldNames[ $tabl['name']]['type'] = 'area'; @@ -664,9 +665,8 @@ class Controller extends Object $fieldNames[ $tabl['name']]['options'] = array(); // get the list of options from the other model. - $registry =& ClassRegistry::getInstance(); - $otherModel =& $registry->getObject($fieldNames[ $tabl['name']]['model']); - + $registry = ClassRegistry::getInstance(); + $otherModel = $registry->getObject($fieldNames[$tabl['name']]['model']); if( is_object($otherModel) ) { if( $doCreateOptions ) @@ -726,8 +726,9 @@ class Controller extends Object $fieldNames[ $tabl['name']]['options'] = array(); // get the list of options from the other model. - $registry =& ClassRegistry::getInstance(); - $otherModel =& $registry->getObject($fieldNames[ $tabl['name']]['model']); + $registry = ClassRegistry::getInstance(); + + $otherModel = $registry->getObject($fieldNames[$tabl['name']]['model']); if( is_object($otherModel) ) { @@ -789,34 +790,34 @@ class Controller extends Object // loop through the many to many relations to make a list box. foreach( $objRegistryModel->_manyToMany as $relation ) { - list($tableName) = $relation; + list($modelName) = $relation; - $otherModelName = Inflector::underscore($tableName); - $otherModel = new $otherModelName(); + $modelKey = Inflector::underscore($modelName); + $modelObject = new $modelName(); if( $doCreateOptions ) { - $otherDisplayField = $otherModel->getDisplayField(); - $fieldNames[$tableName]['model'] = $tableName; - $fieldNames[$tableName]['prompt'] = "Related ".Inflector::humanize($tableName); - $fieldNames[$tableName]['type'] = "selectMultiple"; - $fieldNames[$tableName]['tagName'] = $otherModelName.'/'.Inflector::underscore($tableName); + $otherDisplayField = $modelObject->getDisplayField(); + $fieldNames[$modelKey]['model'] = $modelName; + $fieldNames[$modelKey]['prompt'] = "Related ".Inflector::humanize(Inflector::pluralize($modelName)); + $fieldNames[$modelKey]['type'] = "selectMultiple"; + $fieldNames[$modelKey]['tagName'] = $modelKey.'/'.$modelKey; - foreach( $otherModel->findAll() as $pass ) + foreach( $modelObject->findAll() as $pass ) { foreach( $pass as $key=>$value ) { - if( $key == $otherModelName && isset( $value['id'] ) && isset( $value[$otherDisplayField] ) ) + if( $key == $modelKey && isset( $value['id'] ) && isset( $value[$otherDisplayField] ) ) { - $fieldNames[$tableName]['options'][$value['id']] = $value[$otherDisplayField]; + $fieldNames[$modelKey]['options'][$value['id']] = $value[$otherDisplayField]; } } } - if( isset( $data[$tableName] ) ) + if( isset( $data[$modelKey] ) ) { - foreach( $data[$tableName] as $row ) + foreach( $data[$modelKey] as $row ) { - $fieldNames[$tableName]['selected'][$row['id']] = $row['id']; + $fieldNames[$modelKey]['selected'][$row['id']] = $row['id']; } } } diff --git a/cake/libs/controller/templates/scaffolds/edit.thtml b/cake/libs/controller/templates/scaffolds/edit.thtml index 70ca74a46..12f904372 100644 --- a/cake/libs/controller/templates/scaffolds/edit.thtml +++ b/cake/libs/controller/templates/scaffolds/edit.thtml @@ -28,9 +28,13 @@ * @lastmodified $Date$ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ -?> -name); + $modelKey = Inflector::underscore($modelName); +?> +