diff --git a/module/doc/js/tablecontents.js b/module/doc/js/tablecontents.js
index 15891830ea..d11c77d92a 100644
--- a/module/doc/js/tablecontents.js
+++ b/module/doc/js/tablecontents.js
@@ -22,7 +22,7 @@ $(function()
/* Make modules tree sortable. */
$('#modules').sortable(
{
- trigger: '.module-name>a.sort-module, .tree-actions>.sortModule>.icon-move, .module-name>a.sortDoc, .tree-actions>.sortDoc>.icon-move',
+ trigger: '.module-name>a.sort-module, .tree-actions>.sortModule>.icon-move, a.sortDoc, .tree-actions>.sortDoc>.icon-move',
dropToClass: 'sort-to',
stopPropagation: true,
nested: true,
diff --git a/module/doc/model.php b/module/doc/model.php
index 8c86a191c6..87f9a94b0c 100644
--- a/module/doc/model.php
+++ b/module/doc/model.php
@@ -2416,7 +2416,13 @@ EOT;
if($currentMethod == 'tablecontents')
{
- $treeMenu[0] .= '' . zget($users, $doc->editedBy) . ' ' . $doc->editedDate . '';
+ $treeMenu[0] .= '
' . zget($users, $doc->editedBy) . ' ' . $doc->editedDate . '';
+ if(common::hasPriv('doc', 'updateOrder'))
+ {
+ $treeMenu[0] .= "
";
+ $treeMenu[0] .= html::a('javascript:;', "", '', "title='{$this->lang->doc->updateOrder}' class='sortDoc'");
+ $treeMenu[0] .= '
';
+ }
}
if($currentMethod == 'objectlibs')
{
@@ -2432,7 +2438,9 @@ EOT;
}
else
{
- $treeMenu[0] .= html::a(inlink('objectLibs', "type=$type&objectID=$objectID&libID=$rootID&docID={$doc->id}"), "
" . $doc->title, '', "data-app='{$this->app->tab}' class='doc-title' title='{$doc->title}'");
+ $class = common::hasPriv('doc', 'updateOrder') ? 'sortDoc' : '';
+ $treeMenu[0] .= html::a(inlink('objectLibs', "type=$type&objectID=$objectID&libID=$rootID&docID={$doc->id}"), "
" . $doc->title, '', "data-app='{$this->app->tab}' class='doc-title $class' title='{$doc->title}'");
+ $treeMenu[0] .= '
';
}
$treeMenu[0] .= '';
@@ -2527,14 +2535,11 @@ EOT;
else
{
$li = "" . $module->name . '';
- if($currentMethod == 'tablecontents')
+ if($currentMethod == 'tablecontents' and common::hasPriv('tree', 'updateOrder'))
{
- if(common::hasPriv('tree', 'updateOrder'))
- {
- $li .= "
";
- $li .= html::a('javascript:;', "", '', "title='{$this->lang->doc->updateOrder}' class='sortModule'");
- $li .= '
';
- }
+ $li .= "
";
+ $li .= html::a('javascript:;', "", '', "title='{$this->lang->doc->updateOrder}' class='sortModule'");
+ $li .= '
';
}
else
{