diff --git a/module/bug/model.php b/module/bug/model.php index 0d4c974499..5de3d31ee9 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -762,6 +762,7 @@ class bugModel extends model ->fetch(); $bugs = $this->dao->select('*')->from(TABLE_BUG) ->where('resolvedDate')->ge($project->begin) + ->andWhere('resolution')->ne('postponed') ->andWhere('product')->eq($productID) ->andWhere('deleted')->eq(0) ->orderBy('openedDate ASC') diff --git a/module/bug/view/view.html.php b/module/bug/view/view.html.php index 3a1818bb52..dd3279f8c6 100644 --- a/module/bug/view/view.html.php +++ b/module/bug/view/view.html.php @@ -33,8 +33,8 @@ common::printIcon('bug', 'confirmBug', $params, $bug, 'button', 'search', '', 'iframe', true); common::printIcon('bug', 'assignTo', $params, '', 'button', '', '', 'iframe', true); common::printIcon('bug', 'resolve', $params, $bug, 'button', '', '', 'iframe showinonlybody', true); - common::printIcon('bug', 'close', $params, $bug, 'button', '', '', 'text-danger iframe', true); - common::printIcon('bug', 'activate', $params, $bug, 'button', '', '', 'text-success iframe', true); + common::printIcon('bug', 'close', $params, $bug, 'button', '', '', 'text-danger iframe showinonlybody', true); + common::printIcon('bug', 'activate', $params, $bug, 'button', '', '', 'text-success iframe showinonlybody', true); common::printIcon('bug', 'toStory', "product=$bug->product&module=0&story=0&project=0&bugID=$bug->id", $bug, 'button', $lang->icons['story']); common::printIcon('bug', 'createCase', $convertParams, '', 'button', 'sitemap'); diff --git a/module/build/js/common.js b/module/build/js/common.js index e69de29bb2..1f3ddf85b3 100644 --- a/module/build/js/common.js +++ b/module/build/js/common.js @@ -0,0 +1,4 @@ +$(document).ready(function() +{ + $("a.preview").modalTrigger({width:1000, type:'iframe'}); +}) diff --git a/module/doc/control.php b/module/doc/control.php index d529830939..2d3516f830 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -359,7 +359,10 @@ class doc extends control $this->view->doc = $doc; $this->view->libID = $libID; + $this->view->libs = $this->libs; $this->view->moduleOptionMenu = $moduleOptionMenu; + $this->view->products = $doc->project == 0 ? $this->product->getPairs() : $this->project->getProducts($doc->project); + $this->view->projects = $this->loadModel('project')->getPairs('all'); $this->display(); } diff --git a/module/doc/js/edit.js b/module/doc/js/edit.js new file mode 100644 index 0000000000..76fd00eb7d --- /dev/null +++ b/module/doc/js/edit.js @@ -0,0 +1,49 @@ +function loadModule(lib) +{ + if(lib == 'product') + { + type = 'productdoc'; + root = 0; + } + else if(lib == 'project') + { + type = 'projectdoc'; + root = 0; + } + else + { + type = 'customdoc'; + root = lib; + } + + $.get(createLink('tree', 'ajaxGetOptionMenu', 'rootID=' + root + '&viewType=' + type), function(data) + { + $('#module').parents('td').html(data); + $("#module").removeAttr('onchange'); + $("#module").chosen(defaultChosenOptions); + }); +} + +function changeByLib(lib) +{ + if(lib == 'product') + { + $('#product').parents('tr').show(); + $('#project').parents('tr').hide(); + } + else if(lib == 'project') + { + $('#product').parents('tr').show(); + $('#project').parents('tr').show(); + } + else + { + $('#product').parents('tr').hide(); + $('#project').parents('tr').hide(); + } +} + +$(function() +{ + changeByLib($('#lib').val()); +}) diff --git a/module/doc/model.php b/module/doc/model.php index 1d6a08d354..232290e2e8 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -218,6 +218,9 @@ class docModel extends model $doc = fixer::input('post') ->cleanInt('module') ->setDefault('module', 0) + ->setIF($this->post->lib == 'product', 'project', 0) + ->setIF(($this->post->lib != 'product' and $this->post->lib != 'project'), 'project', 0) + ->setIF(($this->post->lib != 'product' and $this->post->lib != 'project'), 'product', 0) ->skipSpecial($this->config->doc->editor->edit['id']) ->encodeURL('url') ->add('editedBy', $this->app->user->account) diff --git a/module/doc/view/edit.html.php b/module/doc/view/edit.html.php index fa1282a893..300e58975c 100644 --- a/module/doc/view/edit.html.php +++ b/module/doc/view/edit.html.php @@ -29,6 +29,18 @@ $(document).ready(function()