]> git.mjollnir.org Git - moodle.git/commitdiff
"REPOSITORY/MDL-13766, 1. support help option 2. make breadcrumb clickable"
authordongsheng <dongsheng>
Fri, 27 Feb 2009 04:29:21 +0000 (04:29 +0000)
committerdongsheng <dongsheng>
Fri, 27 Feb 2009 04:29:21 +0000 (04:29 +0000)
pix/a/help.png [new file with mode: 0644]
repository/javascript.php

diff --git a/pix/a/help.png b/pix/a/help.png
new file mode 100644 (file)
index 0000000..f25fc3f
Binary files /dev/null and b/pix/a/help.png differ
index ffff5b4b188af763578f92aaee018d5d2fd96e1a..3d40351c256acb4e62aacb7808d19fc187be492d 100644 (file)
@@ -65,6 +65,7 @@ function repository_get_client($context, $accepted_filetypes = '*', $returnvalue
     $strerror     = get_string('error', 'repository');
     $strfilenotnull = get_string('filenotnull', 'repository');
     $strfederatedsearch = get_string('federatedsearch', 'repository');
+    $strhelp      = get_string('help');
     $strrefresh   = get_string('refresh', 'repository');
     $strinvalidjson = get_string('invalidjson', 'repository');
     $strlistview  = get_string('listview', 'repository');
@@ -570,6 +571,13 @@ _client.print_footer = function() {
             repository_client_$suffix.logout(repository_client_$suffix.repositoryid, 1);
         }
     }
+    if(_client.ds.help) {
+        var help = document.createElement('A');
+        help.href = _client.ds.help;
+        help.target = "_blank";
+        help.innerHTML = '<img src="$CFG->pixpath/a/help.png" /> $strhelp';
+        oDiv.appendChild(help);
+    }
 }
 _client.viewthumb = function(ds) {
     _client.viewmode = 0;
@@ -922,9 +930,12 @@ _client.makepath = function() {
             el.id = _client.repositoryid;
             el.path = _client.ds.path[i].path;
             el.on('contentReady', function() {
-                this.on('click', function() {
+                var path_link = document.getElementById(link.id);
+                path_link.id = this.id;
+                path_link.path = this.path
+                path_link.onclick = function() {
                     repository_client_$suffix.req(this.id, this.path);
-                })
+                }
             });
         }
     }