diff --git a/out/out.ObjectCheck.php b/out/out.ObjectCheck.php index 591873cee..47f345a0c 100644 --- a/out/out.ObjectCheck.php +++ b/out/out.ObjectCheck.php @@ -229,6 +229,11 @@ if(!isset($_GET['action']) || $_GET['action'] == 'listRepair') else $repairobjects = null; +if(isset($_GET['repairfolderid']) && is_numeric($_GET['repairfolderid'])) + $repairfolder = $dms->getFolder($_GET['repairfolderid']); +else + $repairfolder = null; + if($view) { $view->setParam('folder', $folder); $view->setParam('showtree', showtree()); @@ -250,6 +255,7 @@ if($view) { $view->setParam('setchecksum', $setchecksum); $view->setParam('setfiletype', $setfiletype); $view->setParam('repair', $repair); + $view->setParam('repairfolder', $repairfolder); $view->setParam('showtree', showtree()); $view->setParam('rootfolder', $rootfolder); $view->setParam('repairobjects', $repairobjects); diff --git a/views/bootstrap/class.ObjectCheck.php b/views/bootstrap/class.ObjectCheck.php index 293bc84b0..c6eb322ca 100644 --- a/views/bootstrap/class.ObjectCheck.php +++ b/views/bootstrap/class.ObjectCheck.php @@ -186,8 +186,8 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style { print "".getMLText("name")."\n"; print "".getMLText("id")."\n"; print "".getMLText("parent_folder")."\n"; - print "\n"; print "".getMLText("error")."\n"; +// print "\n"; print "\n\n\n"; foreach($unlinkedfolders as $error) { echo ""; @@ -195,7 +195,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style { echo "".$error['id'].""; echo "".$error['parent'].""; echo "".$error['msg'].""; - echo "getID()."\" formtoken=\"".createFormKey('movefolder')."\" title=\"".getMLText("move_into_rootfolder")."\">".getMLText('move')." "; +// echo "getID()."\" formtoken=\"".createFormKey('movefolder')."\" title=\"".getMLText("move_into_rootfolder")."\">".getMLText('move')." "; echo ""; } print "\n"; @@ -217,7 +217,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style { print "".getMLText("id")."\n"; print "".getMLText("parent_folder")."\n"; print "".getMLText("error")."\n"; - print "\n"; +// print "\n"; print "\n\n\n"; foreach($unlinkeddocuments as $error) { echo ""; @@ -225,7 +225,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style { echo "".$error['id'].""; echo "".$error['parent'].""; echo "".$error['msg'].""; - echo "getID()."\" formtoken=\"".createFormKey('movedocument')."\" title=\"".getMLText("move_into_rootfolder")."\">".getMLText('move')." "; +// echo "getID()."\" formtoken=\"".createFormKey('movedocument')."\" title=\"".getMLText("move_into_rootfolder")."\">".getMLText('move')." "; echo ""; } print "\n"; @@ -438,6 +438,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style { $dms = $this->params['dms']; $user = $this->params['user']; $folder = $this->params['folder']; + $repairfolder = $this->params['repairfolder']; $duplicatesequences = $this->params['duplicatesequences']; $this->contentHeading(getMLText("duplicate_sequences")); @@ -449,6 +450,7 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style { print "".getMLText("name")."\n"; print "".getMLText("owner")."\n"; print "".getMLText("actions")."\n"; + print "\n"; print "\n\n"; foreach($duplicatesequences as $fld) { echo $this->folderListRowStart($fld); @@ -458,6 +460,15 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Theme_Style { else { echo $this->folderListRow($fld, true); } + echo ""; + if($repairfolder && ($fld->getId() == $repairfolder->getId())) { + if($fld->reorderDocuments()) + echo "Ok"; + else + echo "Error"; + } else + echo "getId()."\" title=\"".getMLText("reorder_documents_in_folder")."\">".getMLText('reorder').""; + echo ""; echo $this->folderListRowEnd($fld); } print ""; @@ -642,6 +653,11 @@ $(document).ready( function() { $('#kkkk.ajax').data('action', $(this).data('action')); $('#kkkk.ajax').trigger('update', {repair: 1, required: $(this).data('required')}); }); + $('body').on('click', 'a.reorder', function(ev){ + ev.preventDefault(); + $('#kkkk.ajax').data('action', $(this).data('action')); + $('#kkkk.ajax').trigger('update', {repair: 1, repairfolderid: $(this).data('repairfolderid')}); + }); $('body').on('click', 'table th a', function(ev){ ev.preventDefault(); $('#kkkk.ajax').data('action', $(this).data('action'));