Commit 2406199b authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie
Browse files

Changed the renderer to 'table' for evonne.

parent 3130d4c8
......@@ -76,6 +76,7 @@ $prefsform = array(
'name' => 'activityprefs',
'method' => 'post',
'ajaxpost' => true,
'renderer' => 'table',
'plugintype ' => 'core',
'pluginname' => 'account',
'elements' => $elements,
......
......@@ -40,6 +40,7 @@ $yesno = array(true => get_string('yes'),
$siteoptionform = pieform(array(
'name' => 'siteoptions',
'ajaxpost' => true,
'renderer' => 'table',
'elements' => array(
'sitename' => array(
'type' => 'text',
......
......@@ -138,8 +138,26 @@ function contentSaved () {
function onLoad() {
if (typeof(tinyMCE) != 'undefined') {
setEditorContent = function (c) {
tinyMCE.setContent(c);
//var i = tinyMCE.selectedInstance;
tinyMCE.removeMCEControl('mce_editor_0');
//tinyMCE.execCommand('mceRemoveControl', true, 'editsitepage_pagetext');
tinyMCE.idCounter = 0;
$('editsitepage_pagetext').value = c;
tinyMCE.execCommand('mceAddControl', true, 'editsitepage_pagetext');
tinyMCE.execCommand('mceFocus',false,'mce_editor_0');
//tinyMCE.updateContent('editsitepage_pagetext');
//tinyMCE.setContent(c);
//tinyMCE.execCommand('mceStartTyping');
//tinyMCE.execCommand('mceCleanup');
//window.setTimeout('tinyMCE.triggerNodeChange();', 1);
//tinyMCE.execCommand('mceReplaceContent',false,c);
//i.contentWindow.focus();
//tinyMCE.execCommand('mceFocus',false,'mce_editor_0');
//tinyMCE.execInstanceCommand('mce_editor_0', 'mceResetDesignMode', false);
//tinyMCE.triggerNodeChange();
//tinyMCE.repaint();
//tinyMCE.setContent(c);
//tinyMCE.execCommand('mceFocus',false,'mce_editor_0');
}
getEditorContent = tinyMCE.getContent;
}
......@@ -150,6 +168,14 @@ function onLoad() {
originalcontent = getEditorContent();
requestPageText();
connect('editsitepage_pagename', 'onchange', requestPageText);
connect('editsitepage_pagename', 'onkeydown', function(e) {
if (e.key().code == 9 && !e.modifier().shift) {
tinyMCE.execCommand('mceFocus',false,'mce_editor_0');
e.stop();
}
});
}
addLoadEvent(onLoad);
......
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