Changeset 228 for trunk/trax/vendor/trax
- Timestamp:
- 07/16/06 09:53:11 (6 years ago)
- Location:
- trunk/trax/vendor/trax
- Files:
-
- 8 modified
-
action_controller.php (modified) (1 diff)
-
action_view/helpers.php (modified) (1 diff)
-
action_view/helpers/active_record_helper.php (modified) (1 diff)
-
action_view/helpers/asset_tag_helper.php (modified) (1 diff)
-
action_view/helpers/form_helper.php (modified) (1 diff)
-
action_view/helpers/form_options_helper.php (modified) (4 diffs)
-
action_view/helpers/form_tag_helper.php (modified) (1 diff)
-
action_view/helpers/url_helper.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/trax/vendor/trax/action_controller.php
r210 r228 1171 1171 $path = substr($layout, 0, strripos($layout, "/")); 1172 1172 $layout = $layouts_base_path."/".$path."/".$file.".".Trax::$views_extension; 1173 } else {1173 } elseif(file_exists($this->layouts_path."/".$layout.".".Trax::$views_extension)) { 1174 1174 # Is there a layout for the current controller 1175 1175 $layout = $this->layouts_path."/".$layout.".".Trax::$views_extension; 1176 } 1177 1176 } else { 1177 $layout = $layouts_base_path."/".$layout.".".Trax::$views_extension; 1178 } 1178 1179 if(file_exists($layout)) { 1179 1180 $layout_file = $layout; -
trunk/trax/vendor/trax/action_view/helpers.php
r201 r228 303 303 function to_content_tag($tag_name, $options = array()) { 304 304 return $this->content_tag($tag_name, $this->value(), $options); 305 } 305 } 306 307 /** 308 * If this tag has an error, wrap it with a visual indicator 309 * 310 * @param string HTML to be wrapped 311 * @param boolean true=>error, false=>no error 312 * @return string 313 */ 314 function error_wrapping($html_tag, $has_error) { 315 return ($has_error ? '<span class="fieldWithErrors">' . $html_tag . '</span>' : $html_tag); 316 } 306 317 307 318 } -
trunk/trax/vendor/trax/action_view/helpers/active_record_helper.php
r218 r228 454 454 * @todo Document this method 455 455 * 456 * @param string $html_tag457 * @param boolean $has_error458 */459 function error_wrapping($html_tag, $has_error) {460 return ($has_error ? '<span class="fieldWithErrors">' . $html_tag . '</span>' : $html_tag);461 }462 463 /**464 * @todo Document this method465 *466 456 * @uses attribute_name 467 457 * @uses object() -
trunk/trax/vendor/trax/action_view/helpers/asset_tag_helper.php
r226 r228 49 49 array_key_exists('JAVASCRIPT_DEFAULT_SOURCES',$GLOBALS) 50 50 ? $GLOBALS['JAVASCRIPT_DEFAULT_SOURCES'] 51 : array('prototype', 'effects', ' dragdrop', 'controls', 'slider', 'builder');51 : array('prototype', 'effects', 'controls', 'dragdrop'); 52 52 } 53 53 -
trunk/trax/vendor/trax/action_view/helpers/form_helper.php
r201 r228 292 292 $tag_text .= ">True</option>\n"; 293 293 $tag_text .= "</select>\n"; 294 return $this->error_wrapping($tag_text,$this->object()->errors[$this->attribute_name]); ;294 return $this->error_wrapping($tag_text,$this->object()->errors[$this->attribute_name]); 295 295 } 296 296 297 /**298 * If this tag has an error, wrap it with a visual indicator299 *300 * @param string HTML to be wrapped301 * @param boolean true=>error, false=>no error302 * @return string303 */304 function error_wrapping($html_tag, $has_error) {305 return ($has_error306 ? '<span class="fieldWithErrors">' . $html_tag . '</span>'307 : $html_tag);308 }309 310 297 } 311 298 -
trunk/trax/vendor/trax/action_view/helpers/form_options_helper.php
r201 r228 202 202 function to_select_tag($choices, $options, $html_options) { 203 203 $html_options = $this->add_default_name_and_id($html_options); 204 return $this->content_tag( 205 "select", 206 $this->add_options( 207 $this->options_for_select($choices, $this->value()), 208 $options, 209 $this->value()), 210 $html_options); 204 return $this->error_wrapping( 205 $this->content_tag( 206 "select", 207 $this->add_options( 208 $this->options_for_select($choices, $this->value()), 209 $options, 210 $this->value()), 211 $html_options), 212 $this->object()->errors[$this->attribute_name]); 211 213 } 212 214 … … 224 226 $html_options) { 225 227 $html_options = $this->add_default_name_and_id($html_options); 226 return $this->content_tag( 227 "select", 228 $this->add_options( 229 $this->options_from_collection_for_select($collection, 230 $attribute_value, 231 $attribute_text, 232 $this->value()), 233 $options, 234 $this->value()), 235 $html_options); 228 return $this->error_wrapping( 229 $this->content_tag( 230 "select", 231 $this->add_options( 232 $this->options_from_collection_for_select( 233 $collection, 234 $attribute_value, 235 $attribute_text, 236 $this->value()), 237 $options, 238 $this->value()), 239 $html_options), 240 $this->object()->errors[$this->attribute_name]); 236 241 } 237 242 … … 247 252 $options, $html_options) { 248 253 $html_options = $this->add_default_name_and_id($html_options); 249 return $this->content_tag( 254 return $this->error_wrapping( 255 $this->content_tag( 250 256 "select", 251 257 $this->add_options( … … 254 260 $options, 255 261 $this->value), 256 $html_options); 262 $html_options), 263 $this->object()->errors[$this->attribute_name]); 257 264 } 258 265 -
trunk/trax/vendor/trax/action_view/helpers/form_tag_helper.php
r199 r228 64 64 */ 65 65 function select_tag($name, $option_tags = null, $options = array()) { 66 if(is_array($option_tags)) { 67 $option_tags = implode('', $option_tags); 68 } 66 69 return $this->content_tag("select", $option_tags, array_merge(array("name" => $name, "id" => $name), $this->convert_options($options))); 67 70 } -
trunk/trax/vendor/trax/action_view/helpers/url_helper.php
r223 r228 172 172 $image_options["border"] = $html_options["border"]; 173 173 unset($html_options["border"]); 174 } else { 175 $image_options["border"] = 0; 174 176 } 175 177
