mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
themes lib MDL-24895 Multiple fixes to better handle overflow.
Major tasks undertaken in this patch: * New format_text argument, overflowdiv. * New page layout Report. * Review of all format_text calls. * Added support for the report layout to all themes. * Changed forum post display from tables to divs.
This commit is contained in:
parent
2412f8b882
commit
367a75fae4
125 changed files with 3366 additions and 2062 deletions
|
@ -45,6 +45,10 @@ $version = optional_param('version', -1, PARAM_INT);
|
|||
$attachments = optional_param('attachments', 0, PARAM_INT);
|
||||
$deleteuploads = optional_param('deleteuploads', 0, PARAM_RAW);
|
||||
|
||||
if (is_array($newcontent)) {
|
||||
$newcontent = $newcontent['text'];
|
||||
}
|
||||
|
||||
if (!$page = wiki_get_page($pageid)) {
|
||||
print_error('incorrectpageid', 'wiki');
|
||||
}
|
||||
|
|
|
@ -1190,7 +1190,7 @@ function wiki_print_page_content($page, $context, $subwikiid) {
|
|||
}
|
||||
}
|
||||
$html = file_rewrite_pluginfile_urls($page->cachedcontent, 'pluginfile.php', $context->id, 'mod_wiki', 'attachments', $subwikiid);
|
||||
$html = format_text($html);
|
||||
$html = format_text($html, FORMAT_MOODLE, array('overflowdiv'=>true));
|
||||
echo $OUTPUT->box($html);
|
||||
|
||||
if (!empty($CFG->usetags)) {
|
||||
|
|
|
@ -589,7 +589,7 @@ class page_wiki_edit extends page_wiki {
|
|||
file_save_draft_area_files($this->attachments, $context->id, 'mod_wiki', 'attachments', $this->subwiki->id);
|
||||
return null;
|
||||
//return wiki_process_attachments($this->attachments, $this->deleteuploads, $context->id, 'mod_wiki', 'attachments', $this->subwiki->id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -694,7 +694,7 @@ class page_wiki_comments extends page_wiki {
|
|||
$t->data[] = $row3;
|
||||
}
|
||||
|
||||
echo html_writer::table($t);
|
||||
echo html_writer::tag('div', html_writer::table($t), array('class'=>'no-overflow'));
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1035,7 +1035,7 @@ class page_wiki_preview extends page_wiki_edit {
|
|||
$parseroutput = wiki_parse_content($data->contentformat, $data->newcontent_editor['text'], $options);
|
||||
$this->set_newcontent($data->newcontent_editor['text']);
|
||||
echo $OUTPUT->notification(get_string('previewwarning', 'wiki'), 'notifyproblem wiki_info');
|
||||
$content = format_text($parseroutput['parsed_text'], FORMAT_HTML);
|
||||
$content = format_text($parseroutput['parsed_text'], FORMAT_HTML, array('overflowdiv'=>true));
|
||||
echo $OUTPUT->box($content, 'generalbox wiki_previewbox');
|
||||
$content = $this->newcontent;
|
||||
}
|
||||
|
@ -2080,7 +2080,7 @@ class page_wiki_viewversion extends page_wiki {
|
|||
print_container($heading, false, 'mdl-align wiki_modifieduser wiki_headingtime');
|
||||
$options = array('swid' => $this->subwiki->id, 'pretty_print' => true, 'pageid' => $this->page->id);
|
||||
$parseroutput = wiki_parse_content($pageversion->contentformat, $pageversion->content, $options);
|
||||
$content = print_container(format_text($parseroutput['parsed_text'], FORMAT_HTML), false, '', '', true);
|
||||
$content = print_container(format_text($parseroutput['parsed_text'], FORMAT_HTML, array('overflowdiv'=>true)), false, '', '', true);
|
||||
echo $OUTPUT->box($content, 'generalbox wiki_contentbox');
|
||||
|
||||
} else {
|
||||
|
|
|
@ -67,6 +67,7 @@ class mod_wiki_renderer extends plugin_renderer_base {
|
|||
$table->colclasses = array('wikisearchresults');
|
||||
$html .= html_writer::table($table);
|
||||
}
|
||||
$html = html_writer::tag('div', $html, array('class'=>'no-overflow'));
|
||||
return $this->output->container($html);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue