diff --git a/views/bootstrap/class.GroupMgr.php b/views/bootstrap/class.GroupMgr.php index 514a086f9..505e66e07 100644 --- a/views/bootstrap/class.GroupMgr.php +++ b/views/bootstrap/class.GroupMgr.php @@ -31,13 +31,117 @@ require_once("class.Bootstrap.php"); */ class SeedDMS_View_GroupMgr extends SeedDMS_Bootstrap_Style { + function css() { /* {{{ */ + $selgroup = $this->params['selgroup']; + $strictformcheck = $this->params['strictformcheck']; + + header("Content-type: text/javascript"); +?> +function checkForm1() { + msg = new Array(); + + if($("#name").val() == "") msg.push(""); + + if($("#comment").val() == "") msg.push(""); + + if (msg != "") { + noty({ + text: msg.join('
'), + type: 'error', + dismissQueue: true, + layout: 'topRight', + theme: 'defaultTheme', + _timeout: 1500, + }); + return false; + } else + return true; +} + +function checkForm2() { + msg = ""; + + if($("#userid").val() == -1) msg += "\n"; + + if (msg != "") { + noty({ + text: msg, + type: 'error', + dismissQueue: true, + layout: 'topRight', + theme: 'defaultTheme', + _timeout: 1500, + }); + return false; + } else + return true; + } + +$(document).ready( function() { + $('body').on('submit', '#form_1', function(ev){ + if(checkForm1()) + return; + event.preventDefault(); + }); + + $('body').on('submit', '#form_2', function(ev){ + if(checkForm2()) + return; + event.preventDefault(); + }); + + $( "#selector" ).change(function() { + $('div.ajax').trigger('update', {groupid: $(this).val()}); + }); +}); +params['dms']; $selgroup = $this->params['selgroup']; + $cachedir = $this->params['cachedir']; + $previewwidth = $this->params['previewWidthList']; if($selgroup) { + $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth); $this->contentHeading(getMLText("group_info")); echo "\n"; + $reviewstatus = $selgroup->getReviewStatus(); + $i = 0; + foreach($reviewstatus as $rv) { + if($rv['status'] == 0) { + $i++; + /* + $document = $dms->getDocument($rv['documentID']); + $latestContent = $document->getLatestContent(); + $previewer->createPreview($latestContent); + echo ""; + print ""; + print ""; + echo ""; + */ + } + } + echo ""; + $approvalstatus = $selgroup->getApprovalStatus(); + $i = 0; + foreach($approvalstatus as $rv) { + if($rv['status'] == 0) { + $i++; + } + } + echo ""; echo "
"; + if($previewer->hasPreview($latestContent)) { + print "getID()."&version=".$latestContent->getVersion()."&width=".$previewwidth."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + } else { + print "getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">"; + } + print "getID()."¤ttab=revapp\">".htmlspecialchars($document->getName())."
".getMLText('pending_reviews')."".$i."
".getMLText('pending_approvals')."".$i."
"; } } /* }}} */ @@ -48,7 +152,7 @@ class SeedDMS_View_GroupMgr extends SeedDMS_Bootstrap_Style { $allUsers = $this->params['allusers']; $groups = $this->params['allgroups']; ?> -
+ : - + : - + @@ -119,14 +223,14 @@ class SeedDMS_View_GroupMgr extends SeedDMS_Bootstrap_Style { $this->contentSubHeading(getMLText("add_member")); ?> - + - + - + 0) { @@ -124,7 +171,7 @@ class SeedDMS_View_UsrMgr extends SeedDMS_Bootstrap_Style { ?> - + 0) { @@ -138,15 +185,15 @@ class SeedDMS_View_UsrMgr extends SeedDMS_Bootstrap_Style { ?> - + - + - + @@ -372,55 +419,18 @@ class SeedDMS_View_UsrMgr extends SeedDMS_Bootstrap_Style { $this->contentStart(); $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); -?> - -contentHeading(getMLText("user_management")); ?> -
: -
- - - htmlEndPage(); } /* }}} */
-
:">">
:" name="pwd">" name="pwd" id="pwd">
:
:">">
:">">
:
: