diff --git a/out/out.AddFile.php b/out/out.AddFile.php index 4df8cb7f3..f54c1f9f5 100644 --- a/out/out.AddFile.php +++ b/out/out.AddFile.php @@ -51,7 +51,7 @@ $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'strictformcheck'=>$settings->_strictFormCheck, 'enablelargefileupload'=>$settings->_enableLargeFileUpload)); if($view) { $view->setParam('accessobject', $accessop); - $view->show(); + $view($_GET); exit; } diff --git a/out/out.DocumentAccess.php b/out/out.DocumentAccess.php index 8b6407533..8fe5d7931 100644 --- a/out/out.DocumentAccess.php +++ b/out/out.DocumentAccess.php @@ -53,7 +53,7 @@ $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'allusers'=>$allUsers, 'allgroups'=>$allGroups)); if($view) { $view->setParam('accessobject', $accessop); - $view->show(); + $view($_GET); exit; } diff --git a/out/out.DocumentNotify.php b/out/out.DocumentNotify.php index 6038af05b..637e55d88 100644 --- a/out/out.DocumentNotify.php +++ b/out/out.DocumentNotify.php @@ -51,7 +51,7 @@ $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'sortusersinlist'=>$settings->_sortUsersInList)); if($view) { $view->setParam('accessobject', $accessop); - $view->show(); + $view($_GET); exit; } diff --git a/out/out.DropFolderChooser.php b/out/out.DropFolderChooser.php index b83b8a90d..ca0a2b84e 100644 --- a/out/out.DropFolderChooser.php +++ b/out/out.DropFolderChooser.php @@ -43,7 +43,7 @@ $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'dropfold if($view) { $view->setParam('cachedir', $settings->_cacheDir); $view->setParam('previewWidthList', $settings->_previewWidthList); - $view->show(); + $view($_GET); exit; } diff --git a/out/out.EditDocument.php b/out/out.EditDocument.php index 3d0985e16..096a38674 100644 --- a/out/out.EditDocument.php +++ b/out/out.EditDocument.php @@ -57,7 +57,7 @@ $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'attrdefs'=>$attrdefs, 'strictformcheck'=>$settings->_strictFormCheck, 'orderby'=>$settings->_sortFoldersDefault)); if($view) { $view->setParam('accessobject', $accessop); - $view->show(); + $view($_GET); exit; } diff --git a/out/out.KeywordChooser.php b/out/out.KeywordChooser.php index 94e278545..ff3618399 100644 --- a/out/out.KeywordChooser.php +++ b/out/out.KeywordChooser.php @@ -44,7 +44,7 @@ if($_GET['target']) { $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'categories'=>$categories, 'form'=>$target)); if($view) { - $view->show(); + $view($_GET); exit; } diff --git a/out/out.MoveDocument.php b/out/out.MoveDocument.php index 65bec8a26..17508401c 100644 --- a/out/out.MoveDocument.php +++ b/out/out.MoveDocument.php @@ -70,7 +70,7 @@ $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'target'=>$target)); if($view) { $view->setParam('accessobject', $accessop); - $view->show(); + $view($_GET); exit; } diff --git a/out/out.Search.php b/out/out.Search.php index bdbc50190..cb9d59164 100644 --- a/out/out.Search.php +++ b/out/out.Search.php @@ -387,7 +387,7 @@ if(isset($_GET["fullsearch"]) && $_GET["fullsearch"]) { $totalPages = (int) (count($entries)/$limit); if(count($entries)%$limit) $totalPages++; - if (strcasecmp($_GET["pg"], "all")) + if (!isset($_GET["pg"]) || strcasecmp($_GET["pg"], "all")) $entries = array_slice($entries, ($pageNumber-1)*$limit, $limit); // }}} } diff --git a/out/out.UpdateDocument.php b/out/out.UpdateDocument.php index af3ee1384..e1ee91a71 100644 --- a/out/out.UpdateDocument.php +++ b/out/out.UpdateDocument.php @@ -64,7 +64,7 @@ $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'strictformcheck'=>$settings->_strictFormCheck, 'enablelargefileupload'=>$settings->_enableLargeFileUpload, 'enableadminrevapp'=>$settings->_enableAdminRevApp, 'enableownerrevapp'=>$settings->_enableOwnerRevApp, 'enableselfrevapp'=>$settings->_enableSelfRevApp, 'dropfolderdir'=>$settings->_dropFolderDir, 'workflowmode'=>$settings->_workflowMode, 'presetexpiration'=>$settings->_presetExpirationDate)); if($view) { $view->setParam('accessobject', $accessop); - $view->show(); + $view($_GET); exit; } diff --git a/views/bootstrap/class.AddFile.php b/views/bootstrap/class.AddFile.php index a94eaf552..924c66474 100644 --- a/views/bootstrap/class.AddFile.php +++ b/views/bootstrap/class.AddFile.php @@ -31,30 +31,17 @@ require_once("class.Bootstrap.php"); */ class SeedDMS_View_AddFile extends SeedDMS_Bootstrap_Style { - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $folder = $this->params['folder']; - $document = $this->params['document']; - $strictformcheck = $this->params['strictformcheck']; - $enablelargefileupload = $this->params['enablelargefileupload']; - - $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); - $this->globalNavigation($folder); - $this->contentStart(); - $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document); - + function js() { /* {{{ */ ?> - + +$(document).ready( function() { + $('body').on('submit', '#fileupload', function(ev){ + if(checkForm()) return; + event.preventDefault(); + }); +}); params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + $strictformcheck = $this->params['strictformcheck']; + $enablelargefileupload = $this->params['enablelargefileupload']; + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document); + $this->contentHeading(getMLText("linked_files")); ?>
@@ -89,7 +97,7 @@ function checkForm() $this->contentContainerStart(); ?> -
+ @@ -102,11 +110,11 @@ function checkForm() - + - + diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 8065b2fae..22940f14a 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -1063,7 +1063,7 @@ function folderSelected(id, name) {
@@ -1079,12 +1079,31 @@ function folderSelected(id, name) {
+$('#acceptkeywords').click(function(ev) { + acceptKeywords(); +}); +printKeywordChooserHtml($formName, $keywords, $fieldname); +?> + +getType()) { case SeedDMS_Core_AttributeDefinition::type_boolean: @@ -1135,10 +1154,10 @@ function folderSelected(id, name) { } } /* }}} */ - function printDropFolderChooser($formName, $dropfolderfile="") { /* {{{ */ + function printDropFolderChooserHtml($formName, $dropfolderfile="") { /* {{{ */ print "
\n"; print ""; - print ""; + print ""; print "".getMLText("choose_target_file")."…\n"; print "
\n"; ?> @@ -1155,7 +1174,11 @@ function folderSelected(id, name) { - +$('#clearfilename').click(function(ev) { + $('#dropfolderfile').val(''); +}); +printDropFolderChooserHtml($formName, $dropfolderfile); +?> + \n"; } /* }}} */ - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $document = $this->params['document']; - $folder = $this->params['folder']; - $allUsers = $this->params['allusers']; - $allGroups = $this->params['allgroups']; - - - $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); - $this->globalNavigation($folder); - $this->contentStart(); - $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document); - + function js() { /* {{{ */ + header('Content-Type: application/json'); ?> - - +$(document).ready( function() { + $('body').on('submit', '#form1', function(ev){ + if(checkForm()) return; + event.preventDefault(); + }); +}); params['dms']; + $user = $this->params['user']; + $document = $this->params['document']; + $folder = $this->params['folder']; + $allUsers = $this->params['allusers']; + $allGroups = $this->params['allgroups']; + + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document); $this->contentHeading(getMLText("edit_document_access")); $this->contentContainerStart(); @@ -233,7 +239,7 @@ function checkForm() print "
:
:

"; } ?> - + diff --git a/views/bootstrap/class.DocumentNotify.php b/views/bootstrap/class.DocumentNotify.php index e6c752fbe..b2191a18e 100644 --- a/views/bootstrap/class.DocumentNotify.php +++ b/views/bootstrap/class.DocumentNotify.php @@ -31,22 +31,9 @@ require_once("class.Bootstrap.php"); */ class SeedDMS_View_DocumentNotify extends SeedDMS_Bootstrap_Style { - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $folder = $this->params['folder']; - $document = $this->params['document']; - $sortusersinlist = $this->params['sortusersinlist']; - - $notifyList = $document->getNotifyList(); - - $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); - $this->globalNavigation($folder); - $this->contentStart(); - $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document); - + function js() { /* {{{ */ + header('Content-Type: application/json'); ?> - +$(document).ready( function() { + $('body').on('submit', '#form1', function(ev){ + if(checkForm()) return; + event.preventDefault(); + }); +}); params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + $sortusersinlist = $this->params['sortusersinlist']; + + $notifyList = $document->getNotifyList(); + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document); + $this->contentHeading(getMLText("edit_existing_notify")); $this->contentContainerStart(); @@ -107,7 +115,7 @@ function checkForm() ?>
- + diff --git a/views/bootstrap/class.DropFolderChooser.php b/views/bootstrap/class.DropFolderChooser.php index c344342ad..96e7016b3 100644 --- a/views/bootstrap/class.DropFolderChooser.php +++ b/views/bootstrap/class.DropFolderChooser.php @@ -31,6 +31,15 @@ require_once("class.Bootstrap.php"); */ class SeedDMS_View_DropFolderChooser extends SeedDMS_Bootstrap_Style { + function js() { /* {{{ */ +?> +$('#fileselect').click(function(ev) { + attr_filename = $(ev.currentTarget).attr('filename'); + fileSelected(attr_filename); +}); +params['dms']; $user = $this->params['user']; @@ -75,12 +84,13 @@ var targetName = document..dropfolderfile; if($previewer->hasRawPreview($dir.'/'.$entry, 'dropfolder/')) { echo ""; } - echo "\n"; + echo "\n"; } } } echo "\n"; echo "
".$entry."".SeedDMS_Core_File::format_filesize(filesize($dir.'/'.$entry))."".date('Y-m-d H:i:s', filectime($dir.'/'.$entry))."
".$entry."".SeedDMS_Core_File::format_filesize(filesize($dir.'/'.$entry))."".date('Y-m-d H:i:s', filectime($dir.'/'.$entry))."
\n"; + echo ''."\n"; } } diff --git a/views/bootstrap/class.EditDocument.php b/views/bootstrap/class.EditDocument.php index fde7f9b86..0938b7115 100644 --- a/views/bootstrap/class.EditDocument.php +++ b/views/bootstrap/class.EditDocument.php @@ -31,31 +31,19 @@ require_once("class.Bootstrap.php"); */ class SeedDMS_View_EditDocument extends SeedDMS_Bootstrap_Style { - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $folder = $this->params['folder']; - $document = $this->params['document']; - $attrdefs = $this->params['attrdefs']; + function js() { /* {{{ */ $strictformcheck = $this->params['strictformcheck']; - $orderby = $this->params['orderby']; - - $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); - $this->globalNavigation($folder); - $this->contentStart(); - $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document); - + $this->printKeywordChooserJs(); ?> - +$(document).ready( function() { + $('body').on('submit', '#form1', function(ev){ + if(checkForm()) return; + event.preventDefault(); + }); +}); params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + $attrdefs = $this->params['attrdefs']; + $strictformcheck = $this->params['strictformcheck']; + $orderby = $this->params['orderby']; + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document); + $this->contentHeading(getMLText("edit_document_props")); $this->contentContainerStart(); @@ -85,22 +94,22 @@ function checkForm() else $expdate = ''; ?> - + - + - + diff --git a/views/bootstrap/class.KeywordChooser.php b/views/bootstrap/class.KeywordChooser.php index b6c5d94ad..c7d586d37 100644 --- a/views/bootstrap/class.KeywordChooser.php +++ b/views/bootstrap/class.KeywordChooser.php @@ -31,15 +31,10 @@ require_once("class.Bootstrap.php"); */ class SeedDMS_View_KeywordChooser extends SeedDMS_Bootstrap_Style { - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $categories = $this->params['categories']; + function js() { /* {{{ */ $form = $this->params['form']; - -// $this->htmlStartPage(getMLText("use_default_keywords")); + header('Content-Type: application/json'); ?> - + +$('#categories0').change(function(ev) { + showKeywords(0); +}); + +$('#categories1').change(function(ev) { + showKeywords(1); +}); + +$('.insertkeyword').click(function(ev) { + attr_keyword = $(ev.currentTarget).attr('keyword'); + insertKeywords(attr_keyword); +}); + +myTA = document.getElementById("keywordta"); +myTA.value = targetObj.value; +myTA.focus(); +params['dms']; + $user = $this->params['user']; + $categories = $this->params['categories']; + $form = $this->params['form']; + +// $this->htmlStartPage(getMLText("use_default_keywords")); +?>
:
:
: printKeywordChooser('form1', $document->getKeywords()); + $this->printKeywordChooserHtml('form1', $document->getKeywords()); ?>
: -
: -