diff --git a/ChangeLog b/ChangeLog index 0bc2a43..e72532c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,11 +3,13 @@ Improvements: * unit test updates * code cleanup -* Add Wiki entry to views switcher, fixes issue #61. +* Add Wiki entry to views switcher +* only load nested vendor on detail page Bug fixes: -* Fix https://github.com/funktechno/kanboard-plugin-wiki/issues/ +* Fix https://github.com/funktechno/kanboard-plugin-wiki/issues/61 +* Fix https://github.com/funktechno/kanboard-plugin-wiki/issues/11 Version 0.3.6 Improvements: diff --git a/Helper/WikiHelper.php b/Helper/WikiHelper.php index 3c9990c..675321e 100644 --- a/Helper/WikiHelper.php +++ b/Helper/WikiHelper.php @@ -28,6 +28,19 @@ public function getWikipages($project_id) // return $this->wikiModel->getWikipages($project['id']); // return $this->db->table(self::WIKITABLE)->eq('project_id', $project_id)->desc('order')->findAll(); } + /** + * Add a Javascript asset + * + * @param string $filename Filename + * @param bool $async + * @return string + */ + public function js($filename, $async = false) + { + $dir = dirname(__DIR__,2); + $filepath = $dir.'/'.$filename; + return ''; + } /** * render wiki page html children recursively * @param mixed $children diff --git a/Makefile b/Makefile index 0d5c879..a038108 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ plugin=Wiki -version=0.3.6 +version=0.3.7 all: @ echo "Build archive for plugin ${plugin} version=${version}" @ git archive HEAD --prefix=${plugin}/ --format=zip -o ${plugin}-${version}.zip diff --git a/Plugin.php b/Plugin.php index 9abba34..e3cdd97 100755 --- a/Plugin.php +++ b/Plugin.php @@ -49,8 +49,8 @@ public function initialize() $this->template->setTemplateOverride('file_viewer/show', 'wiki:file_viewer/show'); $this->hook->on('template:layout:css', array('template' => 'plugins/Wiki/Asset/css/wiki.css')); - $this->hook->on('template:layout:js', array('template' => 'plugins/Wiki/Asset/vendor/jquery-sortable/jquery-sortable.js')); - $this->hook->on('template:layout:js', array('template' => 'plugins/Wiki/Asset/Javascript/wiki.js')); + // $this->hook->on('template:layout:js', array('template' => 'plugins/Wiki/Asset/vendor/jquery-sortable/jquery-sortable.js')); + // $this->hook->on('template:layout:js', array('template' => 'plugins/Wiki/Asset/Javascript/wiki.js')); // $this->template->setTemplateOverride('wiki', 'wiki:wiki/layout'); @@ -98,7 +98,7 @@ public function getPluginAuthor() public function getPluginVersion() { - return '0.3.6'; + return '0.3.7'; } public function getPluginHomepage() diff --git a/Template/wiki/detail.php b/Template/wiki/detail.php index 6f8e68e..92c97ed 100755 --- a/Template/wiki/detail.php +++ b/Template/wiki/detail.php @@ -1,7 +1,9 @@ -projectHeader->render($project, 'TaskListController', 'show') ?> + wikiHelper->js("/Wiki/Asset/vendor/jquery-sortable/jquery-sortable.js")?> + wikiHelper->js("/Wiki/Asset/Javascript/wiki.js")?> + projectHeader->render($project, 'TaskListController', 'show') ?>