Commit c6fa8560 authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie
Browse files
parents 8f2dc04e f651b54a
<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>My Blogs</strong></h3>
<p>A web log or Blog is journal-like tool that allows you to record your thoughts and experiences.&nbsp; You can allow other users to post comments on your Blog allowing you to create a dialogue with your readers.</p>
<p>While a Blog itself is considered an Artefact, so are any individual Blog postings you create.&nbsp; This means both Blogs and Blog posts may be added to a View.</p>
Your Blogs area lists of all of your current Blogs.&nbsp; Click on the name of a Blog to add a new posting or edit the Blog settings.&nbsp; To create a new Blog select Add Blog.
</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>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>Delete</strong></h3>
<p>Delete Blog post will permanently delete a posting and remove it from a Blog.<strong></strong></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>Edit Blog allows<strong> </strong>you to modify the content of your Blog post and change any post settings.&nbsp; You can Edit a posting while in Draft or Published format.</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>Publish</strong></h3>
<p>By publishing a Draft posting you will make it available to users with access to it via a View.</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"}
......@@ -43,6 +43,11 @@ $enc_delete_confirm = json_encode(get_string('deleteblogpost?', 'artefact.blog')
$enc_postedon = json_encode(get_string('postedon', 'artefact.blog'));
$enc_cannotdeleteblogpost = json_encode(get_string('cannotdeleteblogpost', 'artefact.blog'));
$enc_publish_help = json_encode(get_help_icon('artefact', 'blog', null, null, null, 'publish'));
$enc_edit_help = json_encode(get_help_icon('artefact', 'blog', null, null, null, 'edit'));
$enc_delete_help = json_encode(get_help_icon('artefact', 'blog', null, null, null, 'delete'));
return <<<EOJAVASCRIPT
var postlist = new TableRenderer(
......@@ -56,15 +61,18 @@ postlist.rowfunction = function(d, n, gd) {
var status = TH({'id':'poststatus'+d.id});
var pub;
var pubhelp;
if (d.published == 1) {
status.innerHTML = {$enc_published};
pub = null;
pubhelp = null;
}
else {
status.innerHTML = {$enc_draft};
pub = INPUT(
{ 'type' : 'button' , 'class' : 'button', 'value' : {$enc_publish}}
);
pubhelp = SPAN(null); pubhelp.innerHTML = {$enc_publish_help};
connect(pub, 'onclick', function(e) {
if (!confirm({$enc_publish_confirm})) {
......@@ -75,6 +83,7 @@ postlist.rowfunction = function(d, n, gd) {
if (!response.error) {
$('poststatus'+d.id).innerHTML = {$enc_published};
hideElement(pub);
hideElement(pubhelp);
}
});
});
......@@ -99,10 +108,12 @@ postlist.rowfunction = function(d, n, gd) {
}
)
);
var edithelp = SPAN(null); edithelp.innerHTML = {$enc_edit_help};
var del = INPUT(
{ 'type' : 'button', 'class' : 'button', 'value': {$enc_delete} }
);
var delhelp = SPAN(null); delhelp.innerHTML = {$enc_delete_help};
var desctd = TD({'colSpan':3});
desctd.innerHTML = d.description;
......@@ -112,7 +123,7 @@ postlist.rowfunction = function(d, n, gd) {
null,
TH(null, d.title),
status,
TH(null, [pub, ' ', edit, ' ', del])
TH(null, [pub, pubhelp, ' ', edit, edithelp, ' ', del, delhelp])
),
TR(null, desctd)
];
......
......@@ -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);
......
<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>Quota</strong></h3>
<p>The number of files you may upload into your file repository area is dependant on your set file storage limit.&nbsp; The amount of space you have used and have remaining is displayed in the Quota box.&nbsp; </p>
</body>
</html>
......@@ -142,16 +142,23 @@ function sendjsonrequest(script, data, rtype, successcallback, errorcallback, qu
}
processingStart();
data.sesskey = config.sesskey;
var req = getXMLHttpRequest();
if (rtype = 'GET') {
req.open('GET', script + '?' + queryString(data));
var d = sendXMLHttpRequest(req);
}
else {
req.open('POST', script);
req.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
var d = sendXMLHttpRequest(req, queryString(data));
rtype = rtype.toLowerCase();
var xhrOptions = { 'method': rtype };
switch (rtype) {
case 'post':
xhrOptions.headers = { 'Content-type': 'application/x-www-form-urlencoded' };
xhrOptions.sendContent = MochiKit.Base.queryString(data);
break;
default:
xhrOptions.queryString = data;
break;
}
var d = doXHR(script, xhrOptions);
d.addCallbacks(function (result) {
var data = evalJSONRequest(result);
var errtype = false;
......@@ -502,6 +509,7 @@ function augment_tags_control(elem, returnContainer) {
function quotaUpdate(quotaused, quota) {
if (! $('quota_percentage') ) {
logWarning('quotaUpdate(', quotaused, quota, ') called but no id="quota_percentage" on page');
return;
}
......@@ -546,20 +554,8 @@ function quotaUpdate(quotaused, quota) {
update(data);
}
else {
var req = getXMLHttpRequest();
req.open('post', config.wwwroot + 'json/quota.php');
req.setRequestHeader('Content-type','application/x-www-form-urlencoded');
var d = sendXMLHttpRequest(req);
processingStart();
d.addCallbacks(
function (data) {
processingStop();
data = evalJSONRequest(data);
update(data);
},
function (error) {
processingStop();
}
);
sendjsonrequest(config.wwwroot + 'json/quota.php', {}, 'POST', function (data) {
update(data);
}, null, true);
}
}
......@@ -6,6 +6,7 @@
<h3>{str tag="quota"}</h3>
<p id="quota_message">
{$QUOTA_MESSAGE}
{contextualhelp plugintype='artefact' pluginname='file' section='quota_message'}
</p>
{if $QUOTA_PERCENTAGE < 100}
<div id="quota_fill" style="width: {$QUOTA_PERCENTAGE*2}px;">&nbsp;</div>
......
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