Commit 051eca1d authored by Martyn Smith's avatar Martyn Smith Committed by Martyn Smith
Browse files
parents 3a774f5e 9e0227ad
......@@ -39,8 +39,10 @@ function FileBrowser(element, source, statevars, changedircallback, actionname,
this.lastcolumnfunc = function (r) {
var editb = INPUT({'type':'button', 'class':'button', 'value':get_string('edit')});
editb.onclick = function () { self.openeditform(r); };
var edith = SPAN(null);
edith.innerHTML = get_string('edit.help');
if (r.childcount > 0) {
return TD(null, editb);
return TD(null, editb, edith);
}
var deleteb = INPUT({'type':'button', 'class':'button', 'value':get_string('delete')});
deleteb.onclick = function () {
......@@ -51,7 +53,9 @@ function FileBrowser(element, source, statevars, changedircallback, actionname,
}
}
};
return TD(null, editb, deleteb);
var deleteh = SPAN(null);
deleteh.innerHTML = get_string('delete.help');
return TD(null, editb, edith, deleteb, deleteh);
}
}
......@@ -64,7 +68,9 @@ function FileBrowser(element, source, statevars, changedircallback, actionname,
hideElement(self.createfolderbutton);
showElement(self.createfolderform);
}});
self.createfolderbutton = button;
var help = SPAN(null);
help.innerHTML = get_string('createfolder.help');
self.createfolderbutton = SPAN(null, button, help);
self.createfolderform = self.initcreatefolderform();
insertSiblingNodesBefore(self.element, self.createfolderbutton, self.createfolderform);
}
......@@ -203,6 +209,9 @@ function FileBrowser(element, source, statevars, changedircallback, actionname,
cancelcreateform();
}
}});
var namehelp = SPAN(null); namehelp.innerHTML = get_string('name.help');
var deschelp = SPAN(null); deschelp.innerHTML = get_string('folderdescription.help');
var cancelhelp = SPAN(null); cancelhelp.innerHTML = get_string('cancelfolder.help');
return FORM({'method':'post', 'id':formid, 'style':'display: none;'},
TABLE(null,
TBODY(null,
......@@ -211,14 +220,14 @@ function FileBrowser(element, source, statevars, changedircallback, actionname,
TD(null, SPAN({'id':'createdest'},self.generatePath(self.currentDirectory)))),
TR(null,TH(null,LABEL(get_string('name'))),
TD(null,INPUT({'type':'text','class':'text','name':'name','value':'',
'size':40}))),
'size':40}), namehelp)),
TR(null,TH(null,LABEL(get_string('description'))),
TD(null,INPUT({'type':'text','class':'text','name':'description',
'value':'','size':40}))),
'value':'','size':40}), deschelp)),
TR(null, TH(null, LABEL(null, get_string('tags'))),
TD(null, create_tags_control('tags'))),
TR(null,TD({'colspan':2},SPAN({'id':formid+'message'}))),
TR(null,TD({'colspan':2},createbutton,replacebutton,cancelbutton)))));
TR(null,TD({'colspan':2},createbutton,replacebutton,cancelbutton,cancelhelp)))));
};
this.showsize = function(bytes) {
......@@ -345,7 +354,9 @@ function FileUploader(element, uploadscript, statevars, foldername, folderid, up
showElement(self.form);
keepElementInViewport(self.form);
}});
self.openbutton = button;
var uploadhelp = SPAN(null);
uploadhelp.innerHTML = get_string('uploadfile.help');
self.openbutton = SPAN(null, button, uploadhelp);
appendChildNodes(self.element, self.form, self.openbutton);
}
......@@ -368,7 +379,10 @@ function FileUploader(element, uploadscript, statevars, foldername, folderid, up
showElement(self.openbutton);
};
var notice = SPAN(null);
notice.innerHTML = copyrightnotice;
notice.innerHTML = copyrightnotice + get_string('notice.help');
var titlehelp = SPAN(null); titlehelp.innerHTML = get_string('title.help');
var deschelp = SPAN(null); deschelp.innerHTML = get_string('description.help');
var cancelhelp = SPAN(null); cancelhelp.innerHTML = get_string('cancel.help');
var destinationattributes = (self.folderid === false) ? {'style':'display: none;'} : null;
appendChildNodes(form,
TABLE(null,
......@@ -383,9 +397,9 @@ function FileUploader(element, uploadscript, statevars, foldername, folderid, up
self.form.title.value = basename(self.form.userfile.value);
}}))),
TR(null, TH(null, LABEL(null, get_string('title'))),
TD(null, INPUT({'type':'text', 'class':'text', 'name':'title', 'size':40}))),
TD(null, INPUT({'type':'text', 'class':'text', 'name':'title', 'size':40}), titlehelp)),
TR(null, TH(null, LABEL(null, get_string('description'))),
TD(null, INPUT({'type':'text', 'class':'text', 'name':'description', 'size':40}))),
TD(null, INPUT({'type':'text', 'class':'text', 'name':'description', 'size':40}), deschelp)),
TR(null, TH(null, LABEL(null, get_string('tags'))),
TD(null, create_tags_control('tags'))),
TR(null,TD({'colspan':2, 'id':'uploadformmessage'})),
......@@ -397,7 +411,7 @@ function FileUploader(element, uploadscript, statevars, foldername, folderid, up
'value':get_string('overwrite'),
'onclick':function () { if (self.sendform(true)) { cancelform(); } }}),
INPUT({'type':'button','class':'button','value':get_string('cancel'),
'onclick':cancelform}))))));
'onclick':cancelform}), cancelhelp)))));
hideElement(form.replace);
......
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Login</title>
</head>
<body bgcolor="#FFFFFF">
<h3><strong>Cancel</strong></h3>
<p>Use Cancel to abort the File upload process.</p>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Login</title>
</head>
<body bgcolor="#FFFFFF">
<h3><strong>Cancel</strong></h3>
<p>Use Cancel to abort the Folder creation process.</p>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Login</title>
</head>
<body bgcolor="#FFFFFF">
<h3><strong>Create Folder</strong></h3>
<p> Use the<strong> </strong>Create Folder option to add new Folders and Sub-Folders to your file repository area. </p>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Login</title>
</head>
<body bgcolor="#FFFFFF">
<h3><strong>Delete</strong></h3>
<p>Use the Delete option to remove Folders that are empty of Files or Sub-Folders or to delete individual Files.</p>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Login</title>
</head>
<body bgcolor="#FFFFFF">
<h3><strong>Description</strong></h3>
<p>You may choose to give your uploaded File a Description for your reference.</p>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Login</title>
</head>
<body bgcolor="#FFFFFF">
<h3><strong>Edit</strong></h3>
<p>Use the Edit option to change the Folder or File Name or Description.</p>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Login</title>
</head>
<body bgcolor="#FFFFFF">
<h3><strong>Description</strong></h3>
<p>You may choose to give your uploaded File a Description for your reference. The Folder Description may be changed at any time using the Edit button.</p>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Login</title>
</head>
<body bgcolor="#FFFFFF">
<h3><strong>Name</strong></h3>
<p>The name you wish to use to identify your Folder or Sub-Folder.&nbsp; This may be changed at any time using the Edit button.</p>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Login</title>
</head>
<body bgcolor="#FFFFFF">
<h3><strong>Copyright notice</strong></h3>
<p>In order to upload any File to your repository, you must comply and agree to the Copyright notice.</p>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Login</title>
</head>
<body bgcolor="#FFFFFF">
<h3><strong>Name</strong></h3>
<p>If you wish to use a title other than the file name you can assign a File a Name of your choice.</p>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Login</title>
</head>
<body bgcolor="#FFFFFF">
<h3><strong>Upload File</strong></h3>
<p>Use the<strong> </strong>Upload File option to add an allowed file type to your repository. </p>
<p>If the File you attempt to upload is flagged as containing a virus it will not be accepted by the system.&nbsp; You will need to run your File through a recent anti-virus application before resubmitting.&nbsp; If your File continues to be virus flagged and rejected by the system for no reason that you can see, you can request the Site Administrator remove the virus flag from your File and approve it for upload.</p>
<p>If you repeatedly attempt to upload files that are flagged as containing virus content, the Site Administrator will be notified and your account may be suspended.</p>
<p>If you attempt to upload a File with the same name as a document or image already stored within your repository, you will be given the option of overwriting the existing file, renaming the new file or cancelling the file upload process.</p>
</body>
</html>
......@@ -138,6 +138,28 @@ class PluginArtefactFile extends PluginArtefact {
return $jsstrings[$type];
}
public static function jshelp($type) {
static $jshelp = array(
'file' => array(
'artefact.file' => array(
'cancelfolder',
'cancel',
'createfolder',
'delete',
'description',
'edit',
'folderdescription',
'name',
'notice',
'quota_message',
'title',
'uploadfile',
),
),
);
return $jshelp[$type];
}
/**
* Resyncs the allowed filetypes list with the XML configuration file.
......
......@@ -148,8 +148,8 @@ EOF;
if (count($bits) == 4) {
safe_require($bits[0], $bits[1]);
$pluginclass = generate_class_name($bits[0], $bits[1]);
$name = substr($bits[3], 0, strpos($bits[3], '.js'));
if (is_callable(array($pluginclass, 'jsstrings'))) {
$name = substr($bits[3], 0, strpos($bits[3], '.js'));
$tempstrings = call_static_method($pluginclass, 'jsstrings', $name);
foreach ($tempstrings as $section => $tags) {
foreach ($tags as $tag) {
......@@ -157,8 +157,16 @@ EOF;
}
}
}
if (is_callable(array($pluginclass, 'jshelp'))) {
$tempstrings = call_static_method($pluginclass, 'jshelp', $name);
foreach ($tempstrings as $section => $tags) {
foreach ($tags as $tag) {
$strings[$tag . '.help'] = get_help_icon($bits[0], $bits[1], null, null,
null, $tag);
}
}
}
if (is_callable(array($pluginclass, 'themepaths'))) {
$name = substr($bits[3], 0, strpos($bits[3], '.js'));
$tmpthemepaths = call_static_method($pluginclass, 'themepaths', $name);
foreach ($tmpthemepaths as $themepath) {
$theme_list[$themepath] = theme_get_url($themepath);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment