Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Javascript cleanups

  • Loading branch information...
commit dad2182e9596a74c316fe1f6a04fd8ff589020e4 1 parent e7bc789
julmis authored
Showing with 11 additions and 10 deletions.
  1. +11 −10 lib/editor/coursefiles.php
View
21 lib/editor/coursefiles.php
@@ -93,16 +93,17 @@ function set_value(params) {
}
function set_dir(strdir) {
- // this function will be rewritten in near future - Janne -
- if(window.parent.document.uploader != null) {
- window.parent.document.uploader.wdir.value = strdir;
- }
- if(window.parent.document.cfolder != null) {
- window.parent.document.cfolder.wdir.value = strdir;
- window.parent.document.cfolder.name.value = "";
- }
- if(window.parent.document.irename != null) {
- window.parent.document.irename.wdir.value = strdir;
+ // sets wdir values
+ var upper = window.parent.document;
+ if(upper) {
+ for(var i = 0; i < upper.forms.length; i++) {
+ var f = upper.forms[i];
+ try {
+ f.wdir.value = strdir;
+ } catch (e) {
+
+ }
+ }
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.