From f86e04590d7f5841f43866337b6896bb2b98d808 Mon Sep 17 00:00:00 2001 From: wangchunsheng Date: Sun, 2 Dec 2012 03:15:12 +0000 Subject: [PATCH] * add support of the table border. --- module/doc/control.php | 1 + module/doc/model.php | 37 +++++++++++++++++++++++++++++++++++ module/doc/view/view.html.php | 1 + 3 files changed, 39 insertions(+) diff --git a/module/doc/control.php b/module/doc/control.php index f205f4babb..7f4c3dcc2b 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -396,6 +396,7 @@ class doc extends control $this->view->actions = $this->loadModel('action')->getList('doc', $docID); $this->view->users = $this->user->getPairs('noclosed,nodeleted,noletter'); $this->view->preAndNext = $this->loadModel('common')->getPreAndNextObject('doc', $docID); + $this->view->keTableCSS = $this->doc->extractKETableCSS($doc->content); $this->display(); } diff --git a/module/doc/model.php b/module/doc/model.php index 780b43a2dd..8c8471d85f 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -279,4 +279,41 @@ class docModel extends model { return $this->dao->findByType('projectdoc')->from(TABLE_MODULE)->andWhere('type')->eq('projectdoc')->fetchPairs('id', 'name'); } + + /** + * Extract css styles for tables created in kindeditor. + * + * Like this: + * + * @param string $content + * @access public + * @return void + */ + public function extractKETableCSS($content) + { + $css = ''; + $rule = '/
+
deleted) echo "class='deleted'";?>>DOC #id . ' ' . $doc->title;?>