Add a little JS sugar to set the album directory name to the same as

the album title.
This commit is contained in:
Bharat Mediratta
2009-05-13 23:23:08 +00:00
parent daebdab0c6
commit d3103f6c5d
2 changed files with 8 additions and 2 deletions
+3 -2
View File
@@ -112,7 +112,7 @@ class Albums_Controller extends Items_Controller {
} else {
print json_encode(
array("result" => "error",
"form" => $form->__toString()));
"form" => $form->__toString() . html::script("core/js/albums_form_add.js")));
}
}
@@ -189,7 +189,8 @@ class Albums_Controller extends Items_Controller {
switch ($this->input->get("type")) {
case "album":
print album::get_add_form($album);
print album::get_add_form($album) .
html::script("core/js/albums_form_add.js");
break;
case "photo":
+5
View File
@@ -0,0 +1,5 @@
$("#gAddAlbumForm input[name=title]").keyup(
function() {
$("#gAddAlbumForm input[name=name]").attr(
"value", $("#gAddAlbumForm input[name=title]").attr("value"));
});