diff --git a/module/api/view/createlib.html.php b/module/api/view/createlib.html.php
index c04317f65b..1f90647228 100644
--- a/module/api/view/createlib.html.php
+++ b/module/api/view/createlib.html.php
@@ -28,13 +28,13 @@
'>
| api->whiteList;?> |
diff --git a/module/doc/control.php b/module/doc/control.php
index f750ff202b..36d3026a6d 100755
--- a/module/doc/control.php
+++ b/module/doc/control.php
@@ -151,7 +151,7 @@ class doc extends control
if($type == 'product') $objects = $this->product->getPairs();
if($type == 'project')
{
- $objects = $this->project->getPairsByProgram();
+ $objects = $this->project->getPairsByProgram('', 'all', false, 'order_asc', 'kanban');
if($this->app->tab == 'doc')
{
$this->view->executionPairs = array(0 => '') + $this->execution->getPairs($objectID, 'all', 'multiple,leaf,noprefix');
@@ -391,13 +391,13 @@ class doc extends control
$objects = array();
if($objectType == 'project')
{
- $objects = $this->loadModel('project')->getPairs();
- $this->view->executions = array(0 => '') + $this->loadModel('execution')->getPairs($objectID, 'all', 'multiple,leaf,noprefix');
+ $objects = $this->project->getPairsByProgram('', 'all', false, 'order_asc', 'kanban');
+ $this->view->executions = array(0 => '') + $this->loadModel('execution')->getPairs($objectID, 'sprint,stage', 'multiple,leaf,noprefix');
}
elseif($objectType == 'execution')
{
$execution = $this->loadModel('execution')->getById($objectID);
- $objects = $this->execution->getPairs($execution->project, 'all', "multiple,leaf,noprefix");
+ $objects = $this->execution->getPairs($execution->project, 'sprint,stage', "multiple,leaf,noprefix");
}
elseif($objectType == 'product')
{
@@ -552,7 +552,7 @@ class doc extends control
$objects = array();
if($objectType == 'project')
{
- $objects = $this->loadModel('project')->getPairs();
+ $objects = $this->project->getPairsByProgram('', 'all', false, 'order_asc', 'kanban');
}
elseif($objectType == 'execution')
{
@@ -1494,7 +1494,7 @@ class doc extends control
public function ajaxGetExecution($projectID)
{
$executions = $this->execution->getList($projectID);
- $executionPairs = array(0 => '') + $this->execution->getPairs($projectID, 'all', 'multiple,leaf,noprefix');
+ $executionPairs = array(0 => '') + $this->execution->getPairs($projectID, 'sprint,stage', 'multiple,leaf,noprefix');
$project = $this->project->getById($projectID);
$disabled = $project->multiple ? '' : 'disabled';
diff --git a/module/doc/lang/de.php b/module/doc/lang/de.php
index 4469f75ff3..5fbf6b438d 100644
--- a/module/doc/lang/de.php
+++ b/module/doc/lang/de.php
@@ -11,7 +11,7 @@
*/
$lang->doclib = new stdclass();
$lang->doclib->name = 'Name';
-$lang->doclib->control = 'Zugriffskontrolle';
+$lang->doclib->control = 'Zugang';
$lang->doclib->group = 'Gruppe';
$lang->doclib->user = 'Benutzer';
$lang->doclib->files = 'Dateien';
diff --git a/module/doc/lang/fr.php b/module/doc/lang/fr.php
index c2896eb533..a4409ea990 100644
--- a/module/doc/lang/fr.php
+++ b/module/doc/lang/fr.php
@@ -11,7 +11,7 @@
*/
$lang->doclib = new stdclass();
$lang->doclib->name = 'Nom';
-$lang->doclib->control = "Contrôle d'Accès";
+$lang->doclib->control = 'Droit';
$lang->doclib->group = 'Groupe';
$lang->doclib->user = 'Utilisateur';
$lang->doclib->files = 'Pièces Jointes';
diff --git a/module/doc/model.php b/module/doc/model.php
index 1504433d4f..6948a52e0f 100644
--- a/module/doc/model.php
+++ b/module/doc/model.php
@@ -986,8 +986,8 @@ class docModel extends model
$this->config->doc->search['module'] = 'contributeDoc';
$products = $this->product->getPairs();
- $this->config->doc->search['params']['project']['values'] = array('' => '') + $this->loadModel('project')->getPairsByProgram() + array('all' => $this->lang->doc->allProjects);
- $this->config->doc->search['params']['execution']['values'] = array('' => '') + $this->loadModel('execution')->getPairs(0, 'all', 'multiple,leaf,noprefix') + array('all' => $this->lang->doc->allExecutions);
+ $this->config->doc->search['params']['project']['values'] = array('' => '') + $this->loadModel('project')->getPairsByProgram('', 'all', false, 'order_asc', 'kanban') + array('all' => $this->lang->doc->allProjects);
+ $this->config->doc->search['params']['execution']['values'] = array('' => '') + $this->loadModel('execution')->getPairs(0, 'sprint,stage', 'multiple,leaf,noprefix') + array('all' => $this->lang->doc->allExecutions);
$this->config->doc->search['params']['lib']['values'] = array('' => '') + $this->loadModel('doc')->getLibs('all', 'withObject') + array('all' => $this->lang->doclib->all);
$this->config->doc->search['params']['product']['values'] = array('' => '') + $products + array('all' => $this->lang->doc->allProduct);
@@ -1008,7 +1008,7 @@ class docModel extends model
if($type == 'project')
{
- $this->config->doc->search['params']['execution']['values'] = array('' => '') + $this->loadModel('execution')->getPairs($this->session->project, 'all', 'multiple,leaf,noprefix') + array('all' => $this->lang->doc->allExecutions);
+ $this->config->doc->search['params']['execution']['values'] = array('' => '') + $this->loadModel('execution')->getPairs($this->session->project, 'sprint,stage', 'multiple,leaf,noprefix') + array('all' => $this->lang->doc->allExecutions);
}
else
{
@@ -1024,7 +1024,7 @@ class docModel extends model
else
{
$products = $this->product->getPairs('nocode', $this->session->project);
- $this->config->doc->search['params']['execution']['values'] = array('' => '') + $this->loadModel('execution')->getPairs($this->session->project, 'all', 'multiple,leaf,noprefix') + array('all' => $this->lang->doc->allExecutions);
+ $this->config->doc->search['params']['execution']['values'] = array('' => '') + $this->loadModel('execution')->getPairs($this->session->project, 'sprint,stage', 'multiple,leaf,noprefix') + array('all' => $this->lang->doc->allExecutions);
$this->config->doc->search['params']['lib']['values'] = array('' => '', $libID => ($libID ? $libs[$libID] : 0), 'all' => $this->lang->doclib->all);
$this->config->doc->search['params']['product']['values'] = array('' => '') + $products + array('all' => $this->lang->doc->allProduct);
}
@@ -1587,6 +1587,7 @@ class docModel extends model
->leftjoin(TABLE_DOCLIB)->alias('t2')->on('t2.project=t1.id')
->where("CONCAT(',', t2.users, ',')")->like("%,{$this->app->user->account},%")
->andWhere('t1.vision')->eq($this->config->vision)
+ ->andWhere('t1.model')->ne('kanban')
->andWhere('t1.deleted')->eq(0)
->beginIF(!$this->app->user->admin)->andWhere('t1.id')->in($this->app->user->view->projects)->fi()
->fetchPairs();
@@ -1596,6 +1597,7 @@ class docModel extends model
->where('type')->eq('project')
->andWhere('vision')->eq($this->config->vision)
->andWhere('deleted')->eq(0)
+ ->andWhere('model')->ne('kanban')
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)->fi()
->orderBy('order_asc')
->fetchAll('id');
diff --git a/module/doc/view/createtexttype.html.php b/module/doc/view/createtexttype.html.php
index e68acbcb7a..2ed7f917fa 100644
--- a/module/doc/view/createtexttype.html.php
+++ b/module/doc/view/createtexttype.html.php
@@ -91,7 +91,7 @@
|
+ file->getImageSize($file);
+ $imageWidth = isset($imageSize[0]) ? $imageSize[0] : 0;
+ ?>
| id);?> |
extension, '', $file->title);?>'>
extension, $config->file->imageExtensions)):?>
-
+
id];?>
@@ -233,5 +238,33 @@ function downloadFile(fileID, extension, imageWidth)
}
return false;
}
+
+/**
+ * Set the max with of image.
+ *
+ * @access public
+ * @return void
+ */
+function setImageSize(image, maxWidth, maxHeight)
+{
+ var $image = $(image);
+ if($image.parent().prop('tagName').toLowerCase() == 'a') return;
+
+ /* If not set maxWidth, set it auto. */
+ if(!maxWidth)
+ {
+ bodyWidth = $('body').width();
+ maxWidth = bodyWidth - 470; // The side bar's width is 336, and add some margins.
+ }
+ if(!maxHeight) maxHeight = $(top.window).height();
+
+ setTimeout(function()
+ {
+ maxHeightStyle = $image.height() > 0 ? 'max-height:' + maxHeight + 'px' : '';
+ if(!document.getElementsByClassName('xxc-embed').length && $image.width() > 0 && $image.width() > maxWidth) $image.attr('width', maxWidth);
+ $image.wrap('');
+ if($image.height() > 0 && $image.height() > maxHeight) $image.closest('a').append("" + lang.expand + " ");
+ }, 50);
+}
diff --git a/module/doc/view/tablecontents.html.php b/module/doc/view/tablecontents.html.php
index 93d6e470f3..71985041e9 100644
--- a/module/doc/view/tablecontents.html.php
+++ b/module/doc/view/tablecontents.html.php
@@ -12,7 +12,7 @@
?>
-
+
doc);?>
diff --git a/module/execution/model.php b/module/execution/model.php
index 57e01c6c50..a343b46f3f 100755
--- a/module/execution/model.php
+++ b/module/execution/model.php
@@ -1638,7 +1638,7 @@ class executionModel extends model
->beginIF(strpos($mode, 'multiple') !== false)->andWhere('multiple')->eq('1')->fi()
->beginIF($type == 'all')->andWhere('type')->in('stage,sprint,kanban')->fi()
->beginIF($projectID)->andWhere('project')->eq($projectID)->fi()
- ->beginIF($type != 'all')->andWhere('type')->eq($type)->fi()
+ ->beginIF($type != 'all')->andWhere('type')->in($type)->fi()
->beginIF(strpos($mode, 'withdelete') === false)->andWhere('deleted')->eq(0)->fi()
->beginIF(!$this->app->user->admin and strpos($mode, 'all') === false)->andWhere('id')->in($this->app->user->view->sprints)->fi()
->orderBy($orderBy)
diff --git a/module/tree/model.php b/module/tree/model.php
index 597179bd7a..7906ce47a3 100644
--- a/module/tree/model.php
+++ b/module/tree/model.php
@@ -1837,6 +1837,13 @@ class treeModel extends model
$repeatName = $this->checkUnique($self, array("id{$self->id}" => $module->name), array("id{$self->id}" => $module->branch));
if($repeatName) helper::end(js::alert(sprintf($this->lang->tree->repeatName, $repeatName)));
+ if((empty($module->root) or empty($module->name)) and in_array($self->type, array('doc', 'api')))
+ {
+ $this->app->loadLang('doc');
+ if(empty($module->root)) helper::end(js::alert(sprintf($this->lang->error->notempty, $this->lang->doc->lib)));
+ if(empty($module->name)) helper::end(js::alert(sprintf($this->lang->error->notempty, $this->lang->doc->catalogName)));
+ }
+
$modules = $self->type == 'story' ? $this->getOptionMenu($self->root, 'story', 0, 'all') : '';
$parent = $this->getById($this->post->parent);
diff --git a/module/tree/view/edit.html.php b/module/tree/view/edit.html.php
index 9c20aa463d..5be8d6298d 100644
--- a/module/tree/view/edit.html.php
+++ b/module/tree/view/edit.html.php
@@ -23,7 +23,12 @@ if(isset($pageCSS)) css::internal($pageCSS);
tree->edit;
- if($type == 'doc' or $type == 'api') $lblEditTree = $lang->tree->editDir;
+ $required = '';
+ if($type == 'doc' or $type == 'api')
+ {
+ $lblEditTree = $lang->tree->editDir;
+ $required = 'root,name';
+ }
if($type == 'line') $lblEditTree = $lang->tree->manageLine;
echo $lblEditTree;
?>
@@ -52,7 +57,7 @@ if(isset($pageCSS)) css::internal($pageCSS);
| doc->lib;?> |
- root, "class='form-control chosen'");?> |
+ root, "class='form-control chosen'");?> |
type != 'line'):?>
@@ -74,7 +79,7 @@ if(isset($pageCSS)) css::internal($pageCSS);
echo $lblTreeName;
?>
- name, "class='form-control'");?> |
+ name, "class='form-control'");?> |
|