CC-2232:Automatically fill in show name

Notes:
1. Not sure if "Untitled Show 1" would be the best name.
 What if "Untilted Show 1" already exist? There is no easy way
of keeping track of the numbers. So wouldn't it be better to just use
"Untitled Show"?
2. There is no easy way to figure out if the current form is
opened for "update" or "add".( We can check the text on the button
if it says "add" or "update" button, but it's always bad to rely on
 any UI text. So the new code will focus and higlight name text on both
update and create new case for now.
This commit is contained in:
James Moon 2011-05-04 15:44:10 -07:00 committed by mkonecny
parent 95613f40f1
commit e5969ab4be
2 changed files with 7 additions and 2 deletions

View File

@ -17,7 +17,8 @@ class Application_Form_AddShowWhat extends Zend_Form_SubForm
'class' => 'input_text',
'required' => true,
'filters' => array('StringTrim'),
'validators' => array('NotEmpty')
'validators' => array('NotEmpty'),
'value' => 'Untitled Show 1'
));
// Add URL element

View File

@ -18,7 +18,11 @@ function openAddShowForm() {
$("#schedule_calendar").width(y-z-50);
$("#schedule_calendar").fullCalendar('render');
}
$("#schedule-show-what").show();
$("#schedule-show-what").show(0, function(){
$add_show_name = $("#add_show_name");
$add_show_name.focus();
$add_show_name.select();
});
}
}