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  7f4da065f3260ed998e1fb963f8f7074a752f5b8 (commit)
      from  99f32538bd43f4a5befd440db78bb165ca9a61b6 (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=7f4da065f3260ed998e1fb963f8f7074a752f5b8

commit 7f4da065f3260ed998e1fb963f8f7074a752f5b8
Author: Franck Villaume <[email protected]>
Date:   Wed Dec 28 20:04:29 2016 +0100

    artifact display widget: fix missing section title on new cells, fix delete 
cell containing customfield

diff --git a/src/common/widget/Widget_TrackerContent.class.php 
b/src/common/widget/Widget_TrackerContent.class.php
index d7616fc..1f26e68 100644
--- a/src/common/widget/Widget_TrackerContent.class.php
+++ b/src/common/widget/Widget_TrackerContent.class.php
@@ -136,6 +136,7 @@ class Widget_TrackerContent extends Widget {
                                        $content .= '</td><td 
class="layout-manager-column-add">+</td>';
                                }
                                $content .= '</tr></table>';
+                               $content .= html_e('div', array('class' => 
'layout-manager-row-add'), '+');
                        }
                } else {
                        $content .= '<table class="layout-manager-row" 
id="widget_layout_build">
@@ -162,11 +163,12 @@ class Widget_TrackerContent extends Widget {
                                </td>
                                <td class="layout-manager-column-add">+</td>
                                </tr></table>';
+                       $content .= html_e('div', array('class' => 
'layout-manager-row-add'), '+');
                }
-               $content .= html_e('div', array('class' => 
'layout-manager-row-add'), '+');
                $content .= '</td>
                        </tr>'.
                        $HTML->listTableBottom();
+               $jsvariable = "var sectiontitle = '"._("Section 
Title")._(":")."';";
                $javascript = <<<'EOS'
                                var controllerWidgetBuilder;
                                jQuery(document).ready(function() {
@@ -174,7 +176,8 @@ class Widget_TrackerContent extends Widget {
                                                buttonAddRow:           
jQuery('.layout-manager-row-add'),
                                                buttonAddColumn:        
jQuery('.layout-manager-column-add'),
                                                buttonRemoveColumn:     
jQuery('.layout-manager-column-remove'),
-                                               buttonRemoveEF:         
jQuery('.ef-widget-remove')
+                                               buttonRemoveEF:         
jQuery('.ef-widget-remove'),
+                                               labelTitle:             
sectiontitle
                                        });
                                        
jQuery('.layout-manager-column').droppable({
                                                                                
accept: '#extrafield_table .wb_extrafield',
@@ -233,7 +236,7 @@ class Widget_TrackerContent extends Widget {
                                        }
                                });
 EOS;
-               $content .= html_e('script', array( 'type'=>'text/javascript'), 
'//<![CDATA['."\n".'jQuery(function(){'.$javascript.'});'."\n".'//]]>');
+               $content .= html_e('script', array( 'type'=>'text/javascript'), 
'//<![CDATA['."\n".'jQuery(function(){'.$jsvariable."\n".$javascript.'});'."\n".'//]]>');
                return $content;
        }
 
diff --git a/src/www/widgets/scripts/WidgetController.js 
b/src/www/widgets/scripts/WidgetController.js
index edce42d..615535e 100644
--- a/src/www/widgets/scripts/WidgetController.js
+++ b/src/www/widgets/scripts/WidgetController.js
@@ -37,9 +37,28 @@ WidgetBuilderController.prototype =
                                if 
(jQuery('#layout-manager').find('.layout-manager-column').length == 1) {
                                        alert('You must keep at least one 
column in your layout.');
                                } else if 
(tr.find('.layout-manager-column').length == 1) {
+                                       console.log('ici');
+                                       if (tr.find('.wb_extrafield')) {
+                                               divef = 
tr.find('.wb_extrafield');
+                                               
divef.find('.ef-widget-remove').hide();
+                                               
divef.appendTo(jQuery('#td'+divef.attr('id')));
+                                               divef.draggable({
+                                                       cursor: "move",
+                                                       helper: "clone",
+                                               });
+                                       }
                                        
tr.parents('table').first().next().remove();
                                        tr.parents('table').first().remove();
                                } else {
+                                       if 
(jQuery(e).parent().find('.wb_extrafield')) {
+                                               divef = 
jQuery(e).parent().find('.wb_extrafield');
+                                               
divef.find('.ef-widget-remove').hide();
+                                               
divef.appendTo(jQuery('#td'+divef.attr('id')));
+                                               divef.draggable({
+                                                       cursor: "move",
+                                                       helper: "clone",
+                                               });
+                                       }
                                        jQuery(e).parent().next().remove();
                                        jQuery(e).parent().remove();
                                        
WidgetBuilderController.prototype.distributeWidth(tr);
@@ -50,7 +69,11 @@ WidgetBuilderController.prototype =
        loadAddColumn: function(i, e) {
                
jQuery(e).mouseenter(function(){jQuery(this).addClass('layout-manager-column-add_hover')})
                        
.mouseleave(function(){jQuery(this).removeClass('layout-manager-column-add_hover')});
-               jQuery(e).click(function(){
+               jQuery(e).bind('click', this.params, function(f){
+                               sectionTitle = 'Section Title:';
+                               if (typeof(f.data) != 'undefined') {
+                                       sectionTitle = f.data.labelTitle;
+                               }
                                var newCol = jQuery('<td></td>');
                                newCol.addClass('layout-manager-column');
                                newCol.append('<div>x</div>');
@@ -67,7 +90,7 @@ WidgetBuilderController.prototype =
                                        });
                                
newCol.children('div').addClass('layout-manager-column-remove');
                                
WidgetBuilderController.prototype.loadRemoveColumn(0, newCol.children('div'));
-                               newCol.append('<div 
class="layout-manager-column-width"><input type="number" value="" 
autocomplete="off" size="1" maxlength="3" />%</div>');
+                               newCol.append('<div 
class="layout-manager-column-width">'+sectionTitle+'<br /><input type="text" 
value="" size="20" maxsize="20" /><br /><input type="number" value="" 
autocomplete="off" size="1" maxlength="3" />%</div>');
                                newCol.append('<div id="fake" 
class="wb_extrafield" />');
                                jQuery(e).parent().append(newCol);
                                newCol = jQuery('<td>+</td>');

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

Summary of changes:
 src/common/widget/Widget_TrackerContent.class.php |  9 +++++---
 src/www/widgets/scripts/WidgetController.js       | 27 +++++++++++++++++++++--
 2 files changed, 31 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
FusionForge

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

Reply via email to