[Fusionforge-commits] FusionForge branch master updated. v6.0.5-1898-gf66503c

Franck Villaume nerville at libremir.placard.fr.eu.org
Sat Jun 3 17:00:42 CEST 2017


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  f66503ce34fc3eb191d460347fc399657036d882 (commit)
      from  8cacb7acc6eab4acb3308d844f8f9e44f2744b8d (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=f66503ce34fc3eb191d460347fc399657036d882

commit f66503ce34fc3eb191d460347fc399657036d882
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sat Jun 3 17:00:24 2017 +0200

    minor JS fix in parent artifact

diff --git a/src/common/tracker/actions/ajax.php b/src/common/tracker/actions/ajax.php
index da37fe1..f3c2b31 100644
--- a/src/common/tracker/actions/ajax.php
+++ b/src/common/tracker/actions/ajax.php
@@ -228,13 +228,13 @@ function get_formulas_results($group, $atid, $extra_fields=array(), $status='',
 	return json_encode($ret);
 }
 
-function add_parent($child_id, $parent_id){
+function add_parent($child_id, $parent_id) {
 	$ret = array('message' => '');
 	$artifact = artifact_get_object($child_id);
 	$at = $artifact->getArtifactType();
 	$child = new ArtifactHtml($at, $child_id);
 	if (!$child->setParent($parent_id)) {
-		$ret['message']=$child->getErrorMessage();
+		$ret['message'] = $child->getErrorMessage();
 		return json_encode($ret);
 		exit();
 	}
@@ -248,13 +248,13 @@ function add_parent($child_id, $parent_id){
 	exit();
 }
 
-function add_child($parent_id, $child_id){
+function add_child($parent_id, $child_id) {
 	$ret = array('message' => '');
 	$artifact = artifact_get_object($child_id);
 	$at = $artifact->getArtifactType();
 	$child = new ArtifactHtml($at, $child_id);
 	if (!$child->setParent($parent_id)) {
-		$ret['message']=$child->getErrorMessage();
+		$ret['message'] = $child->getErrorMessage();
 		return json_encode($ret);
 		exit();
 	}
@@ -266,13 +266,13 @@ function add_child($parent_id, $child_id){
 	exit();
 }
 
-function remove_parent($child_id, $parent_id){
+function remove_parent($child_id, $parent_id) {
 	$ret = array('message' => '');
 	$artifact = artifact_get_object($child_id);
 	$at = $artifact->getArtifactType();
 	$child = new ArtifactHtml($at, $child_id);
 	if (!$child->resetParent()) {
-		$ret['message']=$child->getErrorMessage();
+		$ret['message'] = $child->getErrorMessage();
 		return json_encode($ret);
 		exit();
 	}
diff --git a/src/common/tracker/include/ArtifactHtml.class.php b/src/common/tracker/include/ArtifactHtml.class.php
index 98fd6e0..36d3b0a 100644
--- a/src/common/tracker/include/ArtifactHtml.class.php
+++ b/src/common/tracker/include/ArtifactHtml.class.php
@@ -281,7 +281,7 @@ function hide_edit_button(id) {
 		$return = '';
 		if ($parentId){
 			$parent = artifact_get_object($parentId);
-			$return = '	<table class="parent fullwidth">
+			$return = $HTML->listTableTop(array(), array(), 'parent fullwidth', 'parent'.$parent->getID()).'
 							<tr>
 								<td colspan="2">';
 			$parentAt = $parent->getArtifactType();
@@ -295,7 +295,7 @@ function hide_edit_button(id) {
 				if ($parent->getStatusID() == 2) {
 					$arg['class'] = 'artifact_closed';
 				}
-				$return .= html_ao('span',array('id'=>'parent'.$parent->getID()));
+				$return .= html_ao('span');
 				$return .= '<br/>   ';
 				$return .= util_make_link($url, $text, $arg).' '.util_make_link($url, $parent->getSummary());
 				if (!$readonly) {
@@ -304,8 +304,7 @@ function hide_edit_button(id) {
 				$return .= html_ac(html_ap()-1);
 			}
 			$return .= '</td>
-				</tr>
-				</table>';
+				</tr>'.$HTML->listTableBottom();
 		} else {
 			$return = '	<table class="parent fullwidth"></table>';
 		}
diff --git a/src/common/tracker/include/ArtifactTypeHtml.class.php b/src/common/tracker/include/ArtifactTypeHtml.class.php
index d4ea019..174f625 100644
--- a/src/common/tracker/include/ArtifactTypeHtml.class.php
+++ b/src/common/tracker/include/ArtifactTypeHtml.class.php
@@ -1715,7 +1715,7 @@ EOS;
 				if(answer['message']) {
 					showMessage(answer['message'], 'error');
 				} else {
-					$("span#parent"+id).remove();
+					$("table#parent"+id).remove();
 					$("div.addparent").removeClass('hide');
 				}
 				return true;
diff --git a/src/common/widget/Widget_TrackerComment.class.php b/src/common/widget/Widget_TrackerComment.class.php
index 447f657..7dca9d4 100644
--- a/src/common/widget/Widget_TrackerComment.class.php
+++ b/src/common/widget/Widget_TrackerComment.class.php
@@ -97,8 +97,8 @@ class Widget_TrackerComment extends Widget {
 			}
 			if (forge_get_config('use_artefacts_dependencies')) {
 				$tabTitle = _('Dependencies');
-				$nbChildren = $ah->hasChildren()?$ah->hasChildren():0;
-				$nbParent = $ah->hasParent()?1:0;
+				$nbChildren = $ah->hasChildren() ? $ah->hasChildren() : 0;
+				$nbParent = $ah->hasParent() ? 1 : 0;
 				if ($nbChildren+$nbParent) {
 					$tabTitle .= ' ('.$nbParent.'/'.$nbChildren.')';
 				}

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

Summary of changes:
 src/common/tracker/actions/ajax.php                   | 12 ++++++------
 src/common/tracker/include/ArtifactHtml.class.php     |  7 +++----
 src/common/tracker/include/ArtifactTypeHtml.class.php |  2 +-
 src/common/widget/Widget_TrackerComment.class.php     |  4 ++--
 4 files changed, 12 insertions(+), 13 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list