Commit 71f1e2b8 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

More blog contextual help

parent a77f2c41
<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>Browse My Files</strong></h3>
<p>If you wish to attach a file currently stored within your files area to your Blog posting, you can Browse your repository for the required file(s)</p>
<p>Navigate through your file folder structures and Attach the required file(s).&nbsp; The &lsquo;blogfiles&rsquo; folder contains those files already attached to Blog postings.</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>If you would like to discard your posting or changes to a draft posting you can Cancel and return to the previous page.&nbsp; Please note that your content <em>will not be saved</em>.</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>Remove</strong></h3>
<p>You may Remove any files currently attached to a Blog posting at any time.&nbsp; Note that if you delete a file from a saved Blog posting the file <em>will not</em> be removed from your Files 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>Save Post </strong></h3>
<p>When you have completed your posting and you are happy to make it available to those people with access, Save and Publish your posting.</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>You may attach any number of files to a Blog posting. Files added to a Blog posting are automatically stored within your file repository area in a folder called &lsquo;blogfiles&rsquo; and contribute to your file storage quota.</p>
<p>If you upload a file then Cancel the posting or close the Blogs area without saving, those files will also be removed from your file repository.</p>
<p>If you upload an image to a Blog posting, you can use the Image button within the HTML editor to embed it into your post.&nbsp; You will be able to select the size, alignment, border and space around the image using the fields provided.</p>
<p>You can also embed an image as a link from another website.&nbsp; You can either enter in the URL of the image or &lsquo;drag and drop&rsquo; the image from the website into the HTML editor.&nbsp; Please ensure you have appropriate copyright permission to use this image.</p>
<p>For best results images should be no more than 400x400 pixels and have less than 5 pixels of padding on each side.</p>
</body>
</html>
......@@ -170,6 +170,8 @@ $getstring = quotestrings(array(
// automatically when file.js is included.
$copyright = get_field('site_content', 'content', 'name', 'uploadcopyright');
$wwwroot = get_config('wwwroot');
$uploadfilehelp = json_encode(get_help_icon('artefact', 'blog', null, null, null, 'uploadfile'));
$removehelp = json_encode(get_help_icon('artefact', 'blog', null, null, null, 'remove'));
......@@ -191,12 +193,20 @@ uploader.createid = {$createid};
// Change the contextual help from the myfiles upload help to the
// blogpost upload help
addLoadEvent(function () {
var h = getElement('uploadfilehelp');
h.innerHTML = {$uploadfilehelp};
});
// File browser instance allows users to attach files from the my files area
var browser = null;
function browsemyfiles() {
hideElement('browsebutton');
hideElement('browsebuttonstuff');
showElement('browsemyfiles');
if (!elementDimensions('foldernav')) {
browser = new FileBrowser('filebrowser', '{$wwwroot}artefact/file/myfiles.json.php', null,
......@@ -206,7 +216,7 @@ function browsemyfiles() {
INPUT({'type':'button','class':'button','value':{$getstring['cancel']},
'onclick':function () {
hideElement('browsemyfiles');
showElement('browsebutton');
showElement('browsebuttonstuff');
}}));
}
}
......@@ -218,6 +228,11 @@ addLoadEvent(function () {connect('browsebutton', 'onclick', browsemyfiles);});
// List of attachments to the blog post
function removehelp () {
var h = SPAN(null);
h.innerHTML = {$removehelp};
return h;
}
var attached = new TableRenderer(
'attachedfiles',
'attachedfiles.json.php',
......@@ -230,7 +245,8 @@ var attached = new TableRenderer(
function (r) {
return TD(null, INPUT({'type':'button', 'class':'button',
'value':{$getstring['remove']},
'onclick':"removefrompost('artefact:"+r.id+"')"}));
'onclick':"removefrompost('artefact:"+r.id+"')"}),
removehelp());
}
]
);
......@@ -283,10 +299,11 @@ function attachtopost(data) {
data.title,
data.description,
data.tags,
INPUT(
[INPUT(
{'type':'button', 'class':'button', 'value':{$getstring['remove']},
'onclick':"removefrompost('"+rowid+"')"}
)
),
removehelp()]
]
)
)
......
......@@ -14,7 +14,10 @@
{$textinputform}
<div id='insertimage'></div>
<div id='uploader'></div>
<input id='browsebutton' type='button' class='button' value='{str tag=browsemyfiles section=artefact.blog}'>
<div id='browsebuttonstuff'>
<input id='browsebutton' type='button' class='button' value='{str tag=browsemyfiles section=artefact.blog}'>
{contextualhelp plugintype='artefact' pluginname='blog' section='browsemyfiles'}
</div>
<div id='browsemyfiles' style='display: none;'>
<h3>{str tag=myfiles section='artefact.file'}</h3>
<table id='filebrowser' class='tablerenderer'>
......@@ -43,7 +46,9 @@
{$draftform}
<div id='savecancel'>
<input type='button' class='button' value='{str tag=savepost section=artefact.blog}' onclick="saveblogpost()">
{contextualhelp plugintype='artefact' pluginname='blog' section='saveblogpost'}
<input type='button' class='button' value='{str tag=cancel}' onclick="canceledit()">
{contextualhelp plugintype='artefact' pluginname='blog' section='canceledit'}
</div>
{include file="columnleftend.tpl"}
{include file="footer.tpl"}
......@@ -354,7 +354,7 @@ function FileUploader(element, uploadscript, statevars, foldername, folderid, up
showElement(self.form);
keepElementInViewport(self.form);
}});
var uploadhelp = SPAN(null);
var uploadhelp = SPAN({'id':'uploadfilehelp'});
uploadhelp.innerHTML = get_string('uploadfile.help');
self.openbutton = SPAN(null, button, uploadhelp);
......
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