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  db82284c507e8becc4fcf03f23f59f0f0b7bd48b (commit)
      from  506bd9c06bc41dfd1770d6f1d2cd3e9b80d2c83e (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=db82284c507e8becc4fcf03f23f59f0f0b7bd48b

commit db82284c507e8becc4fcf03f23f59f0f0b7bd48b
Author: Franck Villaume <[email protected]>
Date:   Mon Mar 6 20:49:10 2017 +0100

    artifact widget: add support for formula

diff --git a/src/common/widget/Widget_TrackerContent.class.php 
b/src/common/widget/Widget_TrackerContent.class.php
index 9fd5056..2021042 100644
--- a/src/common/widget/Widget_TrackerContent.class.php
+++ b/src/common/widget/Widget_TrackerContent.class.php
@@ -364,8 +364,12 @@ EOS;
                        $i = 0;
                        if (is_object($ah)) {
                                $selected = $ah->getExtraFieldData();
+                               $efInFormula = 
$ath->getExtraFieldsInFormula($selected, false, false);
+                               $efWithFormula = 
$ath->getExtraFieldsWithFormula($selected, false, false);
                        } elseif ($func = 'add') {
                                $selected = $ath->getExtraFieldsDefaultValue();
+                               $efInFormula = 
$ath->getExtraFieldsInFormula($selected);
+                               $efWithFormula = 
$ath->getExtraFieldsWithFormula($selected);
                        }
                        if (!forge_check_perm('tracker', $atid, 'submit')) {
                                $readonly = true;
@@ -404,6 +408,13 @@ EOS;
                                                        if 
(strlen($extrafieldObject->getDescription()) > 0) {
                                                                $attrs['title'] 
= $extrafieldObject->getDescription();
                                                        }
+                                                       if 
(in_array($extrafieldObject->getID(), $efInFormula)) {
+                                                               $attrs['class'] 
= (empty($attrs['class']) ? '' : $attrs['class'].' ').'in-formula';
+                                                       }
+                                                       if 
(in_array($extrafieldObject->getID(), $efWithFormula)) {
+                                                               $attrs['class'] 
= (empty($attrs['class']) ? '' : $attrs['class'].' ').'with-formula readonly';
+                                                               
$attrs['readonly'] = 'readonly';
+                                                       }
                                                        $cellContent .= 
html_e('strong', array(), 
$extrafieldObject->getName()._(':')).$mandatory.html_e('br');
                                                        switch 
($extrafieldObject->getType()) {
                                                                case 
ARTIFACT_EXTRAFIELDTYPE_SELECT:

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

Summary of changes:
 src/common/widget/Widget_TrackerContent.class.php | 11 +++++++++++
 1 file changed, 11 insertions(+)


hooks/post-receive
-- 
FusionForge

_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits

Reply via email to