[Fusionforge-commits] FusionForge branch master updated. v6.0.5-1329-g102c437

Franck Villaume nerville at libremir.placard.fr.eu.org
Sun Jan 8 18:53:27 CET 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  102c4375bc37c17a74b601894767ff1613ccedb0 (commit)
      from  7ae563eba2d0996e16e6d8bc2accea3eccb05242 (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=102c4375bc37c17a74b601894767ff1613ccedb0

commit 102c4375bc37c17a74b601894767ff1613ccedb0
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sun Jan 8 18:52:52 2017 +0100

    artifact display widget: workaround to support IE11 or above

diff --git a/src/common/tracker/actions/widget_artifact_display.php b/src/common/tracker/actions/widget_artifact_display.php
index 864261c..2bfa8f7 100644
--- a/src/common/tracker/actions/widget_artifact_display.php
+++ b/src/common/tracker/actions/widget_artifact_display.php
@@ -50,6 +50,7 @@ $id = db_result($res, 0 , 'id');
 html_use_jqueryui();
 html_use_jquerydatetimepicker();
 use_javascript('/widgets/scripts/WidgetController.js');
+use_javascript('/tracker/scripts/js-ie-fix.js');
 if ($func == 'add') {
 	$ath->header(array('title' => _('Submit New'), 'modal' => 1));
 } elseif ($func == 'detail') {
diff --git a/src/common/widget/Widget_TrackerComment.class.php b/src/common/widget/Widget_TrackerComment.class.php
index 9378020..42ee999 100644
--- a/src/common/widget/Widget_TrackerComment.class.php
+++ b/src/common/widget/Widget_TrackerComment.class.php
@@ -165,7 +165,7 @@ class Widget_TrackerComment extends Widget {
 		$return .= html_e('div', array('id' => 'tabber'), $HTML->html_list($elementsLi).$tabberContent);
 
 		if (forge_check_perm('tracker', $atid, 'submit')) {
-			$return .= html_e('p', array('class' => 'middleRight'), html_e('input', array('form' => 'trackerform', 'type' => 'submit', 'name' => 'submit', 'value' => _('Save Changes'))));
+			$return .= html_e('p', array('class' => 'middleRight'), html_e('input', array('form' => 'trackerform', 'type' => 'submit', 'name' => 'submit', 'value' => _('Save Changes'), 'title' => _('Save is validating the complete form'), 'onClick' => 'iefixform()')));
 		}
 		return $return;
 	}
diff --git a/src/common/widget/Widget_TrackerContent.class.php b/src/common/widget/Widget_TrackerContent.class.php
index 1f26e68..0369408 100644
--- a/src/common/widget/Widget_TrackerContent.class.php
+++ b/src/common/widget/Widget_TrackerContent.class.php
@@ -606,7 +606,7 @@ EOS;
 			}
 		}
 		if (!$readonly) {
-			$return .= html_e('p', array('class' => 'middleRight'), html_e('input', array('form' => 'trackerform', 'type' => 'submit', 'name' => 'submit', 'value' => _('Save Changes'), 'title' => _('Save is validating the complete form'))));
+			$return .= html_e('p', array('class' => 'middleRight'), html_e('input', array('form' => 'trackerform', 'type' => 'submit', 'name' => 'submit', 'value' => _('Save Changes'), 'title' => _('Save is validating the complete form'), 'onClick' => 'iefixform()')));
 		}
 		return $return;
 	}
diff --git a/src/common/widget/Widget_TrackerMain.class.php b/src/common/widget/Widget_TrackerMain.class.php
index 178e074..26ac07d 100644
--- a/src/common/widget/Widget_TrackerMain.class.php
+++ b/src/common/widget/Widget_TrackerMain.class.php
@@ -124,7 +124,7 @@ class Widget_TrackerMain extends Widget {
 		$return .= $HTML->multiTableRow(array('class' => $HTML->boxGetAltRowStyle($i++, true)), $cells);
 		$return .= $HTML->listTableBottom();
 		if (forge_check_perm('tracker', $atid, 'tech')) {
-			$return .= html_e('p', array('class' => 'middleRight'), html_e('input', array('form' => 'trackerform', 'type' => 'submit', 'name' => 'submit', 'value' => _('Save Changes'), 'title' => _('Save is validating the complete form'))));
+			$return .= html_e('p', array('class' => 'middleRight'), html_e('input', array('form' => 'trackerform', 'type' => 'submit', 'name' => 'submit', 'value' => _('Save Changes'), 'title' => _('Save is validating the complete form'), 'onClick' => 'iefixform()')));
 		}
 		return $return;
 	}
diff --git a/src/common/widget/Widget_TrackerSummary.class.php b/src/common/widget/Widget_TrackerSummary.class.php
index bd1249f..4667e8f 100644
--- a/src/common/widget/Widget_TrackerSummary.class.php
+++ b/src/common/widget/Widget_TrackerSummary.class.php
@@ -100,7 +100,7 @@ class Widget_TrackerSummary extends Widget {
 		}
 		if (forge_check_perm('tracker', $atid, 'submit')) {
 			$return .= $HTML->addRequiredFieldsInfoBox();
-			$return .= html_e('p', array('class' => 'middleRight'), html_e('input', array('form' => 'trackerform', 'type' => 'submit', 'name' => 'submit', 'value' => _('Save Changes'), 'title' => _('Save is validating the complete form'))));
+			$return .= html_e('p', array('class' => 'middleRight'), html_e('input', array('form' => 'trackerform', 'type' => 'submit', 'name' => 'submit', 'value' => _('Save Changes'), 'title' => _('Save is validating the complete form'), 'onClick' => 'iefixform()')));
 		}
 		return $return;
 	}
diff --git a/src/www/tracker/scripts/js-ie-fix.js b/src/www/tracker/scripts/js-ie-fix.js
new file mode 100644
index 0000000..45fb9b8
--- /dev/null
+++ b/src/www/tracker/scripts/js-ie-fix.js
@@ -0,0 +1,38 @@
+/**
+ * FusionForge Tracker
+ *
+ * Copyright 2016, 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.
+ */
+
+/* based on http://jsfiddle.net/hbxk4e61/ */
+
+function iefixform() {
+	var isIE11 = !(window.ActiveXObject) && "ActiveXObject" in window;
+	var sampleElement = $('[form]').get(0);
+	if (sampleElement && window.HTMLFormElement && sampleElement.form instanceof HTMLFormElement && !isIE11) {
+		// browser supports it, no need to fix
+		return;
+	}
+	jQuery('[form*="trackerform"]').each(function(index){
+		if (this.name != 'submit' && !jQuery(this).parent().is('form')) {
+			jQuery(this).clone(true).css('display', 'none').appendTo(jQuery('#trackerform'));
+			jQuery('#trackerform').submit();
+		}
+	});
+}

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

Summary of changes:
 .../tracker/actions/widget_artifact_display.php    |  1 +
 src/common/widget/Widget_TrackerComment.class.php  |  2 +-
 src/common/widget/Widget_TrackerContent.class.php  |  2 +-
 src/common/widget/Widget_TrackerMain.class.php     |  2 +-
 src/common/widget/Widget_TrackerSummary.class.php  |  2 +-
 .../tracker/scripts/js-ie-fix.js}                  | 30 +++++++++++++---------
 6 files changed, 23 insertions(+), 16 deletions(-)
 copy src/{common/docman/include/constants.php => www/tracker/scripts/js-ie-fix.js} (55%)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list