[Fusionforge-commits] FusionForge branch master updated. v6.0.3-308-g57b2763

Franck Villaume nerville at libremir.placard.fr.eu.org
Tue Jan 12 00:56:08 CET 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  57b2763f756e15a363c6ad34651244376e6a9fcc (commit)
       via  37168004d360a6e30ee6a6619e15a4e809c7c43d (commit)
       via  e31f98e19c07b59319d159bcbf93cb802af0cab7 (commit)
      from  9311891b7ec6973b8b8ac017e24f374c38a07687 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=57b2763f756e15a363c6ad34651244376e6a9fcc

commit 57b2763f756e15a363c6ad34651244376e6a9fcc
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Mon Jan 11 21:53:06 2016 +0100

    use HTML helpers

diff --git a/src/www/search/include/renderers/HtmlSearchRenderer.class.php b/src/www/search/include/renderers/HtmlSearchRenderer.class.php
index 7e70487..eaeee87 100644
--- a/src/www/search/include/renderers/HtmlSearchRenderer.class.php
+++ b/src/www/search/include/renderers/HtmlSearchRenderer.class.php
@@ -101,7 +101,7 @@ class HtmlSearchRenderer extends SearchRenderer {
 		$query =& $this->query;
 
 		if(!$searchQuery->getResult() || $searchQuery->getRowsCount() < 1) {
-			$html = '<p><strong>'.sprintf(_('No matches found for ā€œ%sā€'), $query['words']).'</strong></p>';
+			$html = $HTML->information(sprintf(_('No matches found for ā€œ%sā€'), $query['words']));
 			$html .= db_error();
 		} else {
 			$html = $HTML->listTableTop($this->tableHeaders);

https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=37168004d360a6e30ee6a6619e15a4e809c7c43d

commit 37168004d360a6e30ee6a6619e15a4e809c7c43d
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Mon Jan 11 21:42:54 2016 +0100

    docman: missing dot & trim

diff --git a/src/common/docman/actions/notifyusers.php b/src/common/docman/actions/notifyusers.php
index 02403d6..98efaac 100644
--- a/src/common/docman/actions/notifyusers.php
+++ b/src/common/docman/actions/notifyusers.php
@@ -76,13 +76,13 @@ $body .= $details;
 $sendEmails = 0;
 foreach ($emailsArr as $key => $toEmail) {
 	if (!in_array(trim($toEmail), $emailsErrArr)) {
-		util_send_message($toEmail, $subject, $body);
+		util_send_message(trim($toEmail), $subject, $body);
 		$sendEmails++;
 	}
 }
 
 $feedback = sprintf(ngettext('%s user notified.', '%s users notified.', $sendEmails), $sendEmails);
 if (count($emailsErrArr)) {
-	$warning_msg = sprintf(ngettext('%s email rejected due to wrong syntax', '%s emails rejected due to wrong syntax', count($emailsErrArr)), count($emailsErrArr));
+	$warning_msg = sprintf(ngettext('%s email rejected due to wrong syntax.', '%s emails rejected due to wrong syntax.', count($emailsErrArr)), count($emailsErrArr));
 }
 session_redirect($urlparam);

https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=e31f98e19c07b59319d159bcbf93cb802af0cab7

commit e31f98e19c07b59319d159bcbf93cb802af0cab7
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Mon Jan 11 21:39:55 2016 +0100

    docman: new feature: notify users on specific document

diff --git a/src/CHANGES b/src/CHANGES
index 2d25112..f2fdfd3 100644
--- a/src/CHANGES
+++ b/src/CHANGES
@@ -7,6 +7,7 @@ FusionForge 6.X:
 * Docman: use standard search engine: unify results between 'search in project' & search in the docs tab (TrivialDev)
 * Docman: searchengine: DocsAll & Docs unified. (TrivialDev)
 * Docman: searchengine: add edit file action on result. (TrivialDev)
+* Docman: notify users on document. (TrivialDev)
 * Plugin AuthBuiltin: add captcha after 3 attempts with the same login [#795] (TrivialDev)
 
 FusionForge 6.0.4:
diff --git a/src/common/docman/actions/notifyusers.php b/src/common/docman/actions/notifyusers.php
new file mode 100644
index 0000000..02403d6
--- /dev/null
+++ b/src/common/docman/actions/notifyusers.php
@@ -0,0 +1,88 @@
+<?php
+/**
+ * FusionForge Documentation Manager
+ *
+ * Copyright 2015, Franck Villaume - TrivialDev
+ * http://fusionforge.org
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* please do not add require here : use www/docman/index.php to add require */
+/* global variables used */
+global $g; // Group object
+global $dirid; // id of doc_group
+global $group_id; // id of group
+global $childgroup_id; // id of child group if any
+global $feedback;
+global $error_msg;
+global $warning_msg;
+
+$urlparam = '/docman/?group_id='.$group_id.'&dirid='.$dirid;
+
+if ($childgroup_id) {
+	$g = group_get_object($childgroup_id);
+	$urlparam .= '&childgroup_id='.$childgroup_id;
+}
+
+if (!forge_check_perm('docman', $g->getID(), 'approve')) {
+	$warning_msg = _('Document Manager Action Denied.');
+	session_redirect($urlparam);
+}
+
+$docid = getIntFromRequest('notifydocid');
+
+if (!$docid) {
+	$warning_msg = _('No document found to notify.');
+	session_redirect($urlparam);
+}
+
+$d = document_get_object($docid, $g->getID());
+if ($d->isError()) {
+	$error_msg = $d->getErrorMessage();
+	session_redirect($urlparam);
+}
+
+$emails = getStringFromRequest('emails', null);
+if (!$emails) {
+	$warning_msg = _('No email address found.');
+	session_redirect($urlparam);
+}
+$details = getStringFromRequest('details');
+$sanitizer = new TextSanitizer();
+$details = $sanitizer->SanitizeHtml($details);
+$emailsErrArr = validate_emails($emails, ',');
+$emailsArr = explode(',', $emails);
+$subject = '['.$d->Group->getPublicName().'] '._('Notification on document').' - '.$d->getName();
+$body = _('Project')._(': ').$d->Group->getPublicName()."\n";
+$body .= _('Document Folder')._(': ').$d->getDocGroupName()."\n";
+$body = _('Document Title')._(': ').$d->getName()."\n";
+$body .= _('Document Filename')._(': ').$d->getFileName()."\n";
+$body .= _('Direct Link')._(': ').util_make_url('/docman/?group_id='.$d->Group->getID().'&view=listfile&dirid='.$d->getDocGroupID().'&filedetailid='.$d->getID());
+$body .= $details;
+$sendEmails = 0;
+foreach ($emailsArr as $key => $toEmail) {
+	if (!in_array(trim($toEmail), $emailsErrArr)) {
+		util_send_message($toEmail, $subject, $body);
+		$sendEmails++;
+	}
+}
+
+$feedback = sprintf(ngettext('%s user notified.', '%s users notified.', $sendEmails), $sendEmails);
+if (count($emailsErrArr)) {
+	$warning_msg = sprintf(ngettext('%s email rejected due to wrong syntax', '%s emails rejected due to wrong syntax', count($emailsErrArr)), count($emailsErrArr));
+}
+session_redirect($urlparam);
diff --git a/src/common/docman/views/listfile.php b/src/common/docman/views/listfile.php
index 25782cb..26f4a05 100644
--- a/src/common/docman/views/listfile.php
+++ b/src/common/docman/views/listfile.php
@@ -159,6 +159,9 @@ jQuery(document).ready(function() {
 		childGroupId:		<?php echo util_ifsetor($childgroup_id, 0) ?>,
 		divEditFile:		jQuery('#editFile'),
 		divEditTitle:		'<?php echo _('Edit document dialog box') ?>',
+		divNotifyUsers:		jQuery('#notifyUsers'),
+		divNotifyTitle:		'<?php echo _('Notify selected users dialog box') ?>',
+		divNotifySaveButtonTxt:	'<?php echo _('Send') ?>',
 		enableResize:		true,
 		page:			'listfile',
 		docgroupId:		<?php echo $dirid ?>,
@@ -317,10 +320,13 @@ if (isset($nested_docs[$dirid]) && is_array($nested_docs[$dirid])) {
 		if (forge_check_perm('docman', $group_id, 'approve')) {
 			$nextcell = '';
 			$editfileaction = '/docman/?action=editfile&fromview=listfile&dirid='.$d->getDocGroupID();
+			$notifyaction = '/docman/?action=notifyusers&fromview=listfile&dirid='.$d->getDocGroupID();
 			if (isset($GLOBALS['childgroup_id']) && $GLOBALS['childgroup_id']) {
 				$editfileaction .= '&childgroup_id='.$GLOBALS['childgroup_id'];
+				$notifyaction .= '&childgroup_id='.$GLOBALS['childgroup_id'];
 			}
 			$editfileaction .= '&group_id='.$GLOBALS['group_id'];
+			$notifyaction .= '&group_id='.$GLOBALS['group_id'];
 			if (!$d->getLocked() && !$d->getReserved()) {
 				$nextcell .= util_make_link($redirecturl.'&action=trashfile&fileid='.$d->getID(), $HTML->getDeletePic(_('Move this document to trash'), 'delfile'));
 				$nextcell .= util_make_link('#', html_image('docman/edit-file.png', 22, 22, array('alt' => _('Edit this document'))), array('onclick' => 'javascript:controllerListFile.toggleEditFileView({action:\''.util_make_uri($editfileaction).'\', lockIntervalDelay: 60000, childGroupId: '.util_ifsetor($childgroup_id, 0).' ,id:'.$d->getID().', groupId:'.$d->Group->getID().', docgroupId:'.$d->getDocGroupID().', statusId:'.$d->getStateID().', statusDict:'.$dm->getStatusNameList('json').', docgroupDict:'.$dm->getDocGroupList($nested_groups, 'json').', title:\''.addslashes($d->getName()).'\', filename:\''.addslashes($d->getFilename()).'\', description:\''.addslashes($d->getDescription()).'\', isURL:\''.$d->isURL().'\', isText:\''.$d->isText().'\', isHtml:\''.$d->isHtml().'\', useCreateOnline:'.$d->Group->useCreateOnline().', docManURL:\''.util_make_uri('/docman').'\'})', 'title' => _('Edit this document')), true);
@@ -350,6 +356,7 @@ if (isset($nested_docs[$dirid]) && is_array($nested_docs[$dirid])) {
 				}
 				$nextcell .= util_make_link($redirecturl.'&action=monitorfile&option='.$option.'&fileid='.$d->getID(), $image, array('title' => $titleMonitor));
 			}
+			$nextcell .= util_make_link('#', html_image('ic/mail-send.png', 22, 22, array('alt' => _('Notify'))), array('onclick' => 'javascript:controllerListFile.toggleNotifyUserView({action:\''.util_make_uri($notifyaction).'\', lockIntervalDelay: 60000, childGroupId: '.util_ifsetor($childgroup_id, 0).' ,id:'.$d->getID().', groupId:'.$d->Group->getID().', docgroupId:'.$d->getDocGroupID().', title:\''.addslashes($d->getName()).'\', filename:\''.addslashes($d->getFilename()).'\', description:\''.addslashes($d->getDescription()).'\', isURL:\''.$d->isURL().'\', isText:\''.$d->isText().'\', isHtml:\''.$d->isHtml().'\', docManURL:\''.util_make_uri('/docman').'\'})', 'title' => _('Notify users')), true);
 			$cells[][] = $nextcell;
 		}
 		echo $HTML->multiTableRow(array(), $cells);
@@ -374,7 +381,7 @@ if (isset($nested_docs[$dirid]) && is_array($nested_docs[$dirid])) {
 		echo html_ao('div', array('class' => 'docman_div_include hide', 'id' => 'movefile'));
 		include ($gfcommon.'docman/views/movefile.php');
 		echo html_ac(html_ap() - 1);
-	}
+		}
 } else {
 	if ($dirid) {
 		echo $HTML->information(_('No documents.'));
@@ -393,6 +400,7 @@ if ($DocGroupName) {
 	}
 	if (forge_check_perm('docman', $g->getID(), 'approve') && $foundFiles) {
 		include ($gfcommon.'docman/views/editfile.php');
+		include ($gfcommon.'docman/views/notifyusers.php');
 		$directViewFileRequestedID = getIntFromRequest('filedetailid', null);
 		if ($directViewFileRequestedID) {
 			$localDocumentObject = document_get_object($directViewFileRequestedID, $group_id);
diff --git a/src/common/docman/views/notifyusers.php b/src/common/docman/views/notifyusers.php
new file mode 100644
index 0000000..38d25ec
--- /dev/null
+++ b/src/common/docman/views/notifyusers.php
@@ -0,0 +1,64 @@
+<?php
+/**
+ * FusionForge Documentation Manager
+ *
+ * Copyright 2015, Franck Villaume - TrivialDev
+ * http://fusionforge.org
+ *
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/* please do not add require here : use www/docman/index.php to add require */
+/* global variables used */
+global $g; // Group object
+global $group_id; // id of the group
+global $HTML;
+global $warning_msg;
+
+if (!forge_check_perm('docman', $group_id, 'approve')) {
+	$warning_msg = _('Document Manager Access Denied');
+	session_redirect('/docman/?group_id='.$group_id);
+}
+
+echo html_ao('div', array('id' => 'notifyUsers'));
+echo $HTML->openForm(array('id' => 'notifyusersdoc', 'name' => 'notifyusersdoc', 'method' => 'post', 'enctype' => 'multipart/form-data'));
+echo $HTML->listTableTop(array());
+$cells = array();
+$cells[] = array(_('Document Title')._(':'));
+$cells[][] = html_e('span', array('id' => 'notifytitle', 'type' => 'text', 'name' => 'title'));
+echo $HTML->multiTableRow(array(), $cells);
+$cells = array();
+$cells[] = array(_('Description')._(':'));
+$cells[][] = html_e('span', array('id' => 'notifydescription', 'type' => 'text', 'name' => 'description'));
+echo $HTML->multiTableRow(array(), $cells);
+$cells = array();
+$cells[] = array(_('File')._(':'));
+$cells[][] = html_e('a', array('id' => 'notifyfilelink'), '', false);
+echo $HTML->multiTableRow(array(), $cells);
+$cells = array();
+$cells[] = array(_('Users Email to notify')._(':'));
+$cells[][] = html_e('input', array('title' => _('Add email addresses, comma separated'), 'id' => 'emails', 'type' => 'text', 'name' => 'emails', 'size' => '40'));
+echo $HTML->multiTableRow(array(), $cells);
+$cells = array();
+$cells[] = array(_('Specific content to be added to the email body'), 'colspan' => 2, 'title' => _('Project, Folder, Title, Filename and direct link to the document will be added automatically.'));
+echo $HTML->multiTableRow(array(), $cells);
+$cells = array();
+$cells[] = array(html_e('textarea', array('id' => 'defaulteditzone', 'name' => 'details', 'rows' => '5', 'cols' => '60'), '', false), 'colspan' => 2);
+echo $HTML->multiTableRow(array(), $cells);
+echo $HTML->listTableBottom();
+echo html_e('input', array('type' => 'hidden', 'id' => 'notifydocid', 'name' => 'notifydocid'));
+echo $HTML->closeForm();
+echo html_ac(html_ap() -1);
diff --git a/src/www/docman/scripts/DocManController.js b/src/www/docman/scripts/DocManController.js
index 8921714..1e07661 100644
--- a/src/www/docman/scripts/DocManController.js
+++ b/src/www/docman/scripts/DocManController.js
@@ -35,6 +35,7 @@ DocManListFileController = function(params)
 		this.resizableDiv();
 	}
 	this.initModalEditWindow();
+	this.initModelNotifyWindow();
 };
 
 DocManAddItemController = function(params)
@@ -67,23 +68,24 @@ DocManListFileController.prototype =
 
 	resizableDiv: function() {
 		var splitterPosition = '30%';
-		var mainwidth = jQuery('#maindiv').width();
+		var mainwidth = jQuery('#maindiv').innerWidth();
 		if (jQuery.Storage.get('splitterStyle') !== undefined) {
 			var storedSplitterPosition = jQuery.Storage.get('splitterStyle').replace(/px;?/g, '').replace(/left: /g, '');
 			splitterPosition = Math.round(storedSplitterPosition * 100 / mainwidth )+'%';
 		}
 		if (this.params.page == 'trashfile') {
-			(this.params.divLeft.height() > this.params.divRight.height()) ? mainheight = this.params.divLeft.height() : mainheight = this.params.divRight.height();
+			(this.params.divLeft.outerHeight() > this.params.divRight.outerHeight()) ? mainheight = this.params.divLeft.outerHeight() : mainheight = this.params.divRight.outerHeight();
 		} else {
-			var fixwidth = 0;
-			if (jQuery('#editFile').length) {
-				fixwidth = jQuery('#editFile').height() - jQuery('#resourcePopupContainer').height();
-				if ( fixwidth < 0) {
-					fixwidth = 0;
-				}
+			var fixwidth = -40;
+			if (jQuery('#editFile').length >= 1) {
+				console.log(jQuery('#editFile').outerHeight());
+				fixwidth += jQuery('#editFile').outerHeight() - jQuery('[aria-describedby="editFile"]').outerHeight();
+				console.log(fixwidth);
 			}
-			if (fixwidth == 0) {
-				fixwidth = -40;
+			if (jQuery('#notifyUsers').length >= 1) {
+				console.log(jQuery('#editFile').outerHeight());
+				fixwidth += jQuery('#notifyUsers').outerHeight() - jQuery('[aria-describedby="notifyUsers"]').outerHeight();
+				console.log(fixwidth);
 			}
 			var totalRightHeight = 0;
 			this.params.divRight.children().each(function() {
@@ -91,10 +93,10 @@ DocManListFileController.prototype =
 						totalRightHeight = totalRightHeight + jQuery(this).outerHeight();
 					}
 				});
-			totalRightHeight = totalRightHeight - fixwidth;
-			(this.params.divRight.height() - fixwidth < 0) ? useRightHeight = this.params.divRight.height() : useRightHeight = this.params.divRight.height() - fixwidth;
+			totalRightHeight -= fixwidth;
+			(this.params.divRight.outerHeight() - fixwidth < 0) ? useRightHeight = this.params.divRight.outerHeight() : useRightHeight = this.params.divRight.outerHeight() - fixwidth;
 			(useRightHeight < totalRightHeight) ? useRightHeight = totalRightHeight : useRightHeight ;
-			(this.params.divLeft.height() > this.params.divRight.height()) ? mainheight = this.params.divLeft.height() : mainheight = useRightHeight;
+			(this.params.divLeft.outerHeight() > this.params.divRight.outerHeight()) ? mainheight = this.params.divLeft.outerHeight() : mainheight = useRightHeight;
 		}
 		jQuery('#views').height(mainheight)
 				.split({orientation:'vertical', limit:100, position: splitterPosition});
@@ -181,6 +183,85 @@ DocManListFileController.prototype =
 		}, this));
 	},
 
+	initModelNotifyWindow: function() {
+		var modalId = this.params.divNotifyUsers;
+		jQuery(modalId).dialog({
+			autoOpen: false,
+			width: 475,
+			modal: true,
+			title: this.params.divNotifyTitle,
+			buttons: {
+				Save: { text: this.params.divNotifySaveButtonTxt,
+					click: jQuery.proxy(function() {
+					jQuery('#notifyusersdoc').submit();
+					var id = jQuery('#notifydocid').attr('value');
+					jQuery.get(this.params.docManURL+'/', {
+						group_id:	this.params.groupId,
+						action:		'lock',
+						lock:		0,
+						itemid:		id,
+						type:		'file',
+						childgroup_id:	this.params.childGroupId
+					});
+					jQuery.get(this.params.docManURL+'/', {
+						group_id:	this.params.groupId,
+						action:		'lock',
+						lock:		0,
+						itemid:		this.params.docgroupId,
+						type:		'dir',
+						childgroup_id:	this.params.childGroupId
+					});
+					clearInterval(this.lockInterval[id]);
+					clearInterval(this.lockInterval[this.params.docgroupId]);
+					jQuery(modalId).dialog( "close" );
+				}, this)},
+				Cancel: jQuery.proxy(function() {
+					var id = jQuery('#notifydocid').attr('value');
+					jQuery.get(this.params.docManURL+'/', {
+						group_id:	this.params.groupId,
+						action:		'lock',
+						lock:		0,
+						itemid:		id,
+						type:		'file',
+						childgroup_id:	this.params.childGroupId
+					});
+					jQuery.get(this.params.docManURL+'/', {
+						group_id:	this.params.groupId,
+						action:		'lock',
+						lock:		0,
+						itemid:		this.params.docgroupId,
+						type:		'dir',
+						childgroup_id:	this.params.childGroupId
+					});
+					clearInterval(this.lockInterval[id]);
+					clearInterval(this.lockInterval[this.params.docgroupId]);
+					jQuery(modalId).dialog('close');
+				}, this)
+			}
+		});
+		jQuery(modalId).bind('dialogclose', jQuery.proxy(function() {
+			var id = jQuery('#notifydocid').attr('value');
+			jQuery.get(this.params.docManURL+'/', {
+				group_id:	this.params.groupId,
+				action:		'lock',
+				lock:		0,
+				itemid:		id,
+				type:		'file',
+				childgroup_id:	this.params.childGroupId
+			});
+			jQuery.get(this.params.docManURL+'/', {
+				group_id:	this.params.groupId,
+				action:		'lock',
+				lock:		0,
+				itemid:		this.params.docgroupId,
+				type:		'dir',
+				childgroup_id:	this.params.childGroupId
+			});
+			clearInterval(this.lockInterval[id]);
+			clearInterval(this.lockInterval[this.params.docgroupId]);
+		}, this));
+	},
+
 	/*! toggle edit group view div visibility
 	 */
 	toggleEditDirectoryView: function() {
@@ -196,9 +277,9 @@ DocManListFileController.prototype =
 					if (typeof(this.params.divAddItem) != 'undefined') {
 						this.params.divAddItem.hide();
 					}
-					computeHeight = this.params.divRight.height() + this.params.divEditDirectory.height();
-					currentLeftHeight = this.params.divLeft.height();
-					this.params.divLeft.height(currentLeftHeight + this.params.divEditDirectory.height());
+					computeHeight = this.params.divRight.outerHeight() + this.params.divEditDirectory.outerHeight();
+					currentLeftHeight = this.params.divLeft.outerHeight();
+					this.params.divLeft.height(currentLeftHeight + this.params.divEditDirectory.outerHeight());
 					jQuery.get(this.params.docManURL+'/', {
 						group_id:	this.params.groupId,
 						action:		'lock',
@@ -209,8 +290,8 @@ DocManListFileController.prototype =
 					});
 					this.lockInterval[this.params.docgroupId] = setInterval("jQuery.get('" + this.params.docManURL + "/', {group_id:"+this.params.groupId+",action:'lock',lock:1,type:'dir',itemid:"+this.params.docgroupId+",childgroup_id:"+this.params.childGroupId+"})", this.params.lockIntervalDelay);
 					if (typeof(this.params.divLeft) != 'undefined' && typeof(this.params.divRight) != 'undefined') {
-						if (this.params.divLeft.height() > computeHeight) {
-							jQuery('#views').height(this.params.divLeft.height());
+						if (this.params.divLeft.outerHeight() > computeHeight) {
+							jQuery('#views').height(this.params.divLeft.outerHeight());
 						} else {
 							jQuery('#views').height(computeHeight);
 						}
@@ -219,9 +300,9 @@ DocManListFileController.prototype =
 			}, this));
 		} else {
 			this.params.divEditDirectory.hide();
-			computeHeight = this.params.divRight.height() - this.params.divEditDirectory.height();
-			currentLeftHeight = this.params.divLeft.height();
-			this.params.divLeft.height(currentLeftHeight - this.params.divEditDirectory.height());
+			computeHeight = this.params.divRight.outerHeight() - this.params.divEditDirectory.outerHeight();
+			currentLeftHeight = this.params.divLeft.outerHeight();
+			this.params.divLeft.height(currentLeftHeight - this.params.divEditDirectory.outerHeight());
 			jQuery.get(this.params.docManURL+'/', {
 				group_id:	this.params.groupId,
 				action:		'lock',
@@ -232,8 +313,8 @@ DocManListFileController.prototype =
 			});
 			clearInterval(this.lockInterval[this.params.docgroupId]);
 			if (typeof(this.params.divLeft) != 'undefined' && typeof(this.params.divRight) != 'undefined') {
-				if (this.params.divLeft.height() > computeHeight) {
-					jQuery('#views').height(this.params.divLeft.height());
+				if (this.params.divLeft.outerHeight() > computeHeight) {
+					jQuery('#views').height(this.params.divLeft.outerHeight());
 				} else {
 					jQuery('#views').height(computeHeight);
 				}
@@ -264,12 +345,12 @@ DocManListFileController.prototype =
 					this.lockInterval[this.params.docgroupId] = setInterval("jQuery.get('" + this.params.docManURL + "/', {group_id:"+this.params.groupId+",action:'lock',lock:1,type:'dir',itemid:"+this.params.docgroupId+",childgroup_id:"+this.params.childGroupId+"})",this.params.lockIntervalDelay);
 					this.params.divAddItem.show();
 					this.params.divEditDirectory.hide();
-					computeHeight = this.params.divRight.height() + jQuery(this.params.divAddItem).height();
-					currentLeftHeight = this.params.divLeft.height();
-					this.params.divLeft.height(currentLeftHeight + jQuery(this.params.divAddItem).height());
+					computeHeight = this.params.divRight.outerHeight() + jQuery(this.params.divAddItem).outerHeight();
+					currentLeftHeight = this.params.divLeft.outerHeight();
+					this.params.divLeft.height(currentLeftHeight + jQuery(this.params.divAddItem).outerHeight());
 					if (typeof(this.params.divLeft) != 'undefined' && typeof(this.params.divRight) != 'undefined') {
-						if (this.params.divLeft.height() > computeHeight) {
-							jQuery('#views').height(this.params.divLeft.height());
+						if (this.params.divLeft.outerHeight() > computeHeight) {
+							jQuery('#views').height(this.params.divLeft.outerHeight());
 						} else {
 							jQuery('#views').height(computeHeight);
 						}
@@ -287,12 +368,12 @@ DocManListFileController.prototype =
 			});
 			clearInterval(this.lockInterval[this.params.docgroupId]);
 			this.params.divAddItem.hide();
-			computeHeight = this.params.divRight.height() - jQuery(this.params.divAddItem).height();
-			currentLeftHeight = this.params.divLeft.height();
-			this.params.divLeft.height(currentLeftHeight - jQuery(this.params.divAddItem).height());
+			computeHeight = this.params.divRight.outerHeight() - jQuery(this.params.divAddItem).outerHeight();
+			currentLeftHeight = this.params.divLeft.outerHeight();
+			this.params.divLeft.height(currentLeftHeight - jQuery(this.params.divAddItem).outerHeight());
 			if (typeof(this.params.divLeft) != 'undefined' && typeof(this.params.divRight) != 'undefined') {
-				if (this.params.divLeft.height() > computeHeight) {
-					jQuery('#views').height(this.params.divLeft.height());
+				if (this.params.divLeft.outerHeight() > computeHeight) {
+					jQuery('#views').height(this.params.divLeft.outerHeight());
 				} else {
 					jQuery('#views').height(computeHeight);
 				}
@@ -388,6 +469,37 @@ DocManListFileController.prototype =
 		}
 	},
 
+	toggleNotifyUserView: function(docparams) {
+		this.docparams = docparams;
+		jQuery('#notifytitle').text(this.docparams.title);
+		jQuery('#notifydescription').text(this.docparams.description);
+		jQuery('#notifydocid').val(this.docparams.id);
+		jQuery('#notifyfilelink').text(this.docparams.filename);
+		if (this.docparams.statusId != 2) {
+			if (this.docparams.isURL) {
+				jQuery('#notifyfilelink').attr('href', this.docparams.filename);
+			} else {
+				jQuery('#notifyfilelink').attr('href', this.docparams.docManURL + '/view.php/' + this.docparams.groupId + '/' + this.docparams.id + '/' + this.docparams.filename);
+			}
+		}
+
+		jQuery('#notifyusersdoc').attr('action', this.docparams.action);
+		jQuery.get(this.docparams.docManURL+'/', {
+				group_id:	this.docparams.groupId,
+				action:		'lock',
+				lock:		1,
+				type:		'dir',
+				itemid:		this.docparams.docgroupId,
+				childgroup_id:	this.docparams.childGroupId
+			});
+		this.lockInterval[this.docparams.id] = setInterval("jQuery.get('" + this.docparams.docManURL + "/', {group_id:"+this.docparams.groupId+",action:'lock',lock:1,type:'file',itemid:"+this.docparams.id+",childgroup_id:"+this.docparams.childGroupId+"})",this.docparams.lockIntervalDelay);
+		this.lockInterval[this.docparams.docgroupId] = setInterval("jQuery.get('" + this.docparams.docManURL + "/', {group_id:"+this.docparams.groupId+",action:'lock',lock:1,type:'dir',itemid:"+this.docparams.docgroupId+",childgroup_id:"+this.docparams.childGroupId+"})",this.docparams.lockIntervalDelay);
+		jQuery(this.params.divNotifyUsers).dialog('open');
+
+		return false;
+
+	},
+
 	/*! build list of id, comma separated
 	 */
 	buildUrlByCheckbox: function(id) {
diff --git a/src/www/themes/funky-wOw/images/ic/mail-send.png b/src/www/themes/funky-wOw/images/ic/mail-send.png
new file mode 100644
index 0000000..0eec6db
Binary files /dev/null and b/src/www/themes/funky-wOw/images/ic/mail-send.png differ
diff --git a/src/www/themes/funky/images/ic/mail-send.png b/src/www/themes/funky/images/ic/mail-send.png
new file mode 100644
index 0000000..0eec6db
Binary files /dev/null and b/src/www/themes/funky/images/ic/mail-send.png differ

-----------------------------------------------------------------------

Summary of changes:
 src/CHANGES                                        |   1 +
 src/common/docman/actions/notifyusers.php          |  88 ++++++++++
 src/common/docman/views/listfile.php               |  10 +-
 src/common/docman/views/notifyusers.php            |  64 ++++++++
 src/www/docman/scripts/DocManController.js         | 178 +++++++++++++++++----
 .../include/renderers/HtmlSearchRenderer.class.php |   2 +-
 src/www/themes/funky-wOw/images/ic/mail-send.png   | Bin 0 -> 1929 bytes
 src/www/themes/funky/images/ic/mail-send.png       | Bin 0 -> 1929 bytes
 8 files changed, 308 insertions(+), 35 deletions(-)
 create mode 100644 src/common/docman/actions/notifyusers.php
 create mode 100644 src/common/docman/views/notifyusers.php
 create mode 100644 src/www/themes/funky-wOw/images/ic/mail-send.png
 create mode 100644 src/www/themes/funky/images/ic/mail-send.png


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list