diff options
author | Andreas Gohr <andi@splitbrain.org> | 2006-03-09 19:46:01 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2006-03-09 19:46:01 +0100 |
commit | 3bc006f4a7ca43a48f8b96d2de9b8a50dbbb216a (patch) | |
tree | 1f51a1ad8d8a111933fe3fd86bab00e05ec44e1a /lib/scripts | |
parent | da12a76063ad5cb4aea09e68d8f24b4cf0ce94d4 (diff) | |
download | rpg-3bc006f4a7ca43a48f8b96d2de9b8a50dbbb216a.tar.gz rpg-3bc006f4a7ca43a48f8b96d2de9b8a50dbbb216a.tar.bz2 |
fixed id suggestion in upload dialog
darcs-hash:20060309184601-7ad00-a1e8e9dfb0fe5cab69aa982809c712b77e2eccfd.gz
Diffstat (limited to 'lib/scripts')
-rw-r--r-- | lib/scripts/script.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/scripts/script.js b/lib/scripts/script.js index 24dc025bc..e05aeb0fe 100644 --- a/lib/scripts/script.js +++ b/lib/scripts/script.js @@ -163,12 +163,15 @@ function mediaSelect(file){ * For the upload Dialog. Prefills the wikiname. */ function suggestWikiname(){ - var file = document.upload.upload.value; + var form = $('dw__upload'); + if(!form) return; + + var file = form.elements.upload.value; file = file.substr(file.lastIndexOf('/')+1); file = file.substr(file.lastIndexOf('\\')+1); - document.upload.id.value = file; + form.elements.id.value = file; } /** |