diff --git a/Gruntfile.js b/Gruntfile.js index bd277c831..1d6e62490 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -206,6 +206,14 @@ module.exports = function (grunt) { ], dest: bootstrapDir + '/spectrum-colorpicker2', flatten: true + },{ + expand: true, + src: [ + nodeDir + '/jquery-lazy/jquery.lazy.min.js', + nodeDir + '/jquery-lazy/jquery.lazy.plugins.js' + ], + dest: bootstrapDir + '/jquery-lazy', + flatten: true },{ expand: true, src: [ diff --git a/out/out.CategoryChooser.php b/out/out.CategoryChooser.php index b690ffa78..9e77d3dd1 100644 --- a/out/out.CategoryChooser.php +++ b/out/out.CategoryChooser.php @@ -18,7 +18,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -if(!isset($settings)) +if (!isset($settings)) require_once("../inc/inc.Settings.php"); require_once("inc/inc.Utils.php"); require_once("inc/inc.LogInit.php"); @@ -35,7 +35,7 @@ $categories = $dms->getDocumentCategories(); $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); -if($view) { +if ($view) { $view->setParam('categories', $categories); $view->setParam('form', $form); $view->setParam('selcats', $selcats); diff --git a/out/out.Charts.php b/out/out.Charts.php index 1b3645df4..d6d5c93fd 100644 --- a/out/out.Charts.php +++ b/out/out.Charts.php @@ -17,7 +17,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -if(!isset($settings)) +if (!isset($settings)) require_once("../inc/inc.Settings.php"); require_once("inc/inc.Utils.php"); require_once("inc/inc.LogInit.php"); @@ -32,24 +32,24 @@ $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); $accessop = new SeedDMS_AccessOperation($dms, $user, $settings); if (!$accessop->check_view_access($view, $_GET)) { - UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); + UI::exitError(getMLText("admin_tools"), getMLText("access_denied")); } $type = 'docsperuser'; -if(!empty($_GET['type'])) { +if (!empty($_GET['type'])) { $type = $_GET['type']; } -if($data = $dms->getStatisticalData($type)) { - switch($type) { - case 'docsperstatus': - foreach($data as &$rec) { - $rec['key'] = getOverallStatusText((int) $rec['key']); - } - break; +if ($data = $dms->getStatisticalData($type)) { + switch ($type) { + case 'docsperstatus': + foreach ($data as &$rec) { + $rec['key'] = getOverallStatusText((int) $rec['key']); + } + break; } } -if($view) { +if ($view) { $view->setParam('type', $type); $view->setParam('data', $data); $view->setParam('accessobject', $accessop); diff --git a/out/out.ErrorDlg.php b/out/out.ErrorDlg.php index 4f2744e20..ea744fbc5 100644 --- a/out/out.ErrorDlg.php +++ b/out/out.ErrorDlg.php @@ -22,7 +22,7 @@ // This file is needed because SeedDMS_View_Bootstrap::htmlEndPage() includes // a file out/out.ErrorDlg.php?action=webrootjs and out/out.ErrorDlg.php?action=footerjs -if(!isset($settings)) +if (!isset($settings)) require_once("../inc/inc.Settings.php"); require_once("inc/inc.Utils.php"); require_once("inc/inc.LogInit.php"); @@ -35,7 +35,7 @@ require_once("inc/inc.ClassUI.php"); $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms)); -if($view) { +if ($view) { $view($_GET); exit; } diff --git a/out/out.FolderChooser.php b/out/out.FolderChooser.php index 1cf5b27e2..0837eff4e 100644 --- a/out/out.FolderChooser.php +++ b/out/out.FolderChooser.php @@ -18,7 +18,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -if(!isset($settings)) +if (!isset($settings)) require_once("../inc/inc.Settings.php"); require_once("inc/inc.Utils.php"); require_once("inc/inc.LogInit.php"); @@ -29,8 +29,8 @@ require_once("inc/inc.DBInit.php"); require_once("inc/inc.ClassUI.php"); require_once("inc/inc.Authentication.php"); -if(isset($_GET['action']) && $_GET['action'] == 'subtree') { - if (!isset($_GET["node"]) || !is_numeric($_GET["node"]) || intval($_GET["node"])<1) { +if (isset($_GET['action']) && $_GET['action'] == 'subtree') { + if (!isset($_GET["node"]) || !is_numeric($_GET["node"]) || intval($_GET["node"]) < 1) { $node = $dms->getRootFolder(); } else { $node = $dms->getFolder(intval($_GET["node"])); @@ -47,9 +47,9 @@ if(isset($_GET['action']) && $_GET['action'] == 'subtree') { $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'rootfolderid'=>$settings->_rootFolderID)); -if($view) { +if ($view) { $view->setParam('orderby', $settings->_sortFoldersDefault); - if(isset($_GET['action']) && $_GET['action'] == 'subtree') { + if (isset($_GET['action']) && $_GET['action'] == 'subtree') { $view->setParam('node', $node); } else { $view->setParam('form', $form); diff --git a/out/out.GroupMgr.php b/out/out.GroupMgr.php index 0a73d8d70..4574fe5d7 100644 --- a/out/out.GroupMgr.php +++ b/out/out.GroupMgr.php @@ -19,7 +19,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -if(!isset($settings)) +if (!isset($settings)) require_once("../inc/inc.Settings.php"); require_once("inc/inc.Utils.php"); require_once("inc/inc.LogInit.php"); @@ -35,26 +35,26 @@ $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); $accessop = new SeedDMS_AccessOperation($dms, $user, $settings); if (!$accessop->check_view_access($view, $_GET)) { - UI::exitError(getMLText("admin_tools"),getMLText("access_denied"), false, $isajax); + UI::exitError(getMLText("admin_tools"), getMLText("access_denied"), false, $isajax); } $allUsers = $dms->getAllUsers($settings->_sortUsersInList); if (is_bool($allUsers)) { - UI::exitError(getMLText("admin_tools"),getMLText("internal_error"), false, $isajax); + UI::exitError(getMLText("admin_tools"), getMLText("internal_error"), false, $isajax); } $allGroups = $dms->getAllGroups(); if (is_bool($allGroups)) { - UI::exitError(getMLText("admin_tools"),getMLText("internal_error"), false, $isajax); + UI::exitError(getMLText("admin_tools"), getMLText("internal_error"), false, $isajax); } -if(isset($_GET['groupid']) && $_GET['groupid']) { +if (isset($_GET['groupid']) && $_GET['groupid']) { $selgroup = $dms->getGroup($_GET['groupid']); } else { $selgroup = null; } -if($view) { +if ($view) { $view->setParam('selgroup', $selgroup); $view->setParam('allgroups', $allGroups); $view->setParam('allusers', $allUsers); diff --git a/out/out.Help.php b/out/out.Help.php index f49f69e17..9ab24b5f1 100644 --- a/out/out.Help.php +++ b/out/out.Help.php @@ -17,7 +17,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -if(!isset($settings)) +if (!isset($settings)) require_once("../inc/inc.Settings.php"); require_once("inc/inc.Utils.php"); require_once("inc/inc.LogInit.php"); @@ -32,11 +32,12 @@ $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1]); $accessop = new SeedDMS_AccessOperation($dms, $user, $settings); -if(isset($_GET['context'])) +if (isset($_GET['context'])) $context = $_GET['context']; else $context = ''; -if($view) { + +if ($view) { $view->setParam('dms', $dms); $view->setParam('user', $user); $view->setParam('context', $context); diff --git a/out/out.LogManagement.php b/out/out.LogManagement.php index 0e01eed3f..97492297f 100644 --- a/out/out.LogManagement.php +++ b/out/out.LogManagement.php @@ -17,7 +17,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -if(!isset($settings)) +if (!isset($settings)) require_once("../inc/inc.Settings.php"); require_once("inc/inc.Utils.php"); require_once("inc/inc.LogInit.php"); @@ -32,16 +32,16 @@ $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); $accessop = new SeedDMS_AccessOperation($dms, $user, $settings); if (!$accessop->check_view_access($view, $_GET)) { - UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); + UI::exitError(getMLText("admin_tools"), getMLText("access_denied")); } if (isset($_GET["logname"])) $logname=basename($_GET["logname"], '.log').'.log'; -else $logname=NULL; +else $logname=null; if (isset($_GET["mode"])) $mode=$_GET["mode"]; else $mode='default'; -if($view) { +if ($view) { $view->setParam('logname', $logname); $view->setParam('mode', $mode); $view->setParam('logdir', $settings->_contentDir.'log/'); diff --git a/out/out.ReviewSummary.php b/out/out.ReviewSummary.php index f566bc692..9d2950c50 100644 --- a/out/out.ReviewSummary.php +++ b/out/out.ReviewSummary.php @@ -30,7 +30,7 @@ * @link https://www.seeddms.org Main Site */ -if(!isset($settings)) { +if (!isset($settings)) { require_once "../inc/inc.Settings.php"); } require_once "inc/inc.Utils.php"; diff --git a/out/out.Search.php b/out/out.Search.php index a99790d5b..0cd77d167 100644 --- a/out/out.Search.php +++ b/out/out.Search.php @@ -18,7 +18,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -if(!isset($settings)) +if (!isset($settings)) require_once("../inc/inc.Settings.php"); require_once("inc/inc.Utils.php"); require_once("inc/inc.LogInit.php"); diff --git a/out/out.WorkflowActionsMgr.php b/out/out.WorkflowActionsMgr.php index f20f2b7e3..502ee47f4 100644 --- a/out/out.WorkflowActionsMgr.php +++ b/out/out.WorkflowActionsMgr.php @@ -19,7 +19,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -if(!isset($settings)) +if (!isset($settings)) require_once("../inc/inc.Settings.php"); require_once("inc/inc.Utils.php"); require_once("inc/inc.LogInit.php"); @@ -34,10 +34,10 @@ $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); $accessop = new SeedDMS_AccessOperation($dms, $user, $settings); if (!$accessop->check_view_access($view, $_GET)) { - UI::exitError(getMLText("admin_tools"),getMLText("access_denied")); + UI::exitError(getMLText("admin_tools"), getMLText("access_denied")); } -if(isset($_GET['workflowactionid']) && $_GET['workflowactionid']) { +if (isset($_GET['workflowactionid']) && $_GET['workflowactionid']) { $selworkflowaction = $dms->getWorkflowAction($_GET['workflowactionid']); } else { $selworkflowaction = null; @@ -45,10 +45,10 @@ if(isset($_GET['workflowactionid']) && $_GET['workflowactionid']) { $workflowactions = $dms->getAllWorkflowActions(); if (is_bool($workflowactions)) { - UI::exitError(getMLText("admin_tools"),getMLText("internal_error")); + UI::exitError(getMLText("admin_tools"), getMLText("internal_error")); } -if($view) { +if ($view) { $view->setParam('allworkflowactions', $workflowactions); $view->setParam('selworkflowaction', $selworkflowaction); $view->setParam('accessobject', $accessop); diff --git a/package.json b/package.json index 5c880bffb..45a1aeba3 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "grunt-contrib-copy": "^1.0.0", "jqtree": "^1.5.1", "jquery": "^3.7.1", + "jquery-lazy": "^1.7.11", "jquery-typeahead": "^2.11.1", "jquery-validation": "^1.19.2", "moment": "^2.29.1",