* @copyright Copyright (C) 2002-2005 Markus Westphal, * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ /** * Include parent class */ //require_once("class.Bootstrap.php"); /** * Class which outputs the html page for EditOnline view * * @category DMS * @package SeedDMS * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann * @copyright Copyright (C) 2002-2005 Markus Westphal, * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ class SeedDMS_View_EditMarkdown extends SeedDMS_Theme_Style { var $dms; var $folder_count; var $document_count; var $file_count; var $storage_size; function js() { /* {{{ */ $document = $this->params['document']; header('Content-Type: application/javascript; charset=UTF-8'); ?> var editor; $(function() { editor = editormd("editor", { // width: "100%", height: 560, // markdown: "xxxx", // dynamic set Markdown text path : "/views/bootstrap4/vendors/editor.md/lib/" // Autoload modules mode, codemirror, marked... dependents libs path }); }); $(document).ready(function() { $('#update').click(function(event) { event.preventDefault(); // alert(editor.getMarkdown()); $.post("../op/op.EditOnline.php", $('#form1').serialize(), function(response) { noty({ text: response.message, type: response.success === true ? 'success' : 'error', dismissQueue: true, layout: 'topRight', theme: 'defaultTheme', timeout: 1500, }); }, "json"); return false; }); }); params['dms']; $user = $this->params['user']; $document = $this->params['document']; $version = $this->params['version']; $cachedir = $this->params['cachedir']; $previewwidthlist = $this->params['previewWidthList']; $previewwidthdetail = $this->params['previewWidthDetail']; $set = 'markdown'; //default or markdown $skin = 'simple'; // simple or markitup $this->htmlAddHeader(''); $this->htmlAddHeader(''); $this->htmlAddHeader(''); $this->htmlStartPage(getMLText("edit_online")); $this->globalNavigation(); $this->contentStart(); $folder = $document->getFolder(); $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document); $this->rowStart(); $this->columnStart(12); ?>
getId() == $luser->getId()) { echo $this->warningMsg(getMLText('edit_online_warning')); $this->formSubmit(' '.getMLText('save'),'update','','primary'); } else { echo $this->errorMsg(getMLText('edit_online_not_allowed')); } ?>
columnEnd(); $this->rowEnd(); $this->contentContainerEnd(); $this->contentEnd(); $this->htmlEndPage(); } /* }}} */ }