src/common/system_event/SystemEvent.class.php -text
src/common/system_event/SystemEventManager.class.php -text
src/common/tracker/ArtifactWorkflow.class.php -text
+src/common/tracker/actions/ajax.php -text
src/common/tracker/actions/csv.php -text
src/common/tracker/actions/format_csv.php -text
src/common/tracker/include/ArtifactTypeFactoryHtml.class.php -text
<?php
/**
- * Generic Tracker facility
+ * Tracker Facility
*
- * Copyright 1999-2001 (c) VA Linux Systems; 2005 GForge, LLC
+ * Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2010 (c) Franck Villaume - Capgemini
+ * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
* http://fusionforge.org/
*
* This file is part of FusionForge. FusionForge is free software;
--- /dev/null
+<?php
+
+$function = getStringFromRequest('function');
+
+switch ($function) {
+ case 'get_canned_response':
+ //$atid = getIntFromRequest('atid');
+ $canned_response_id = getIntFromRequest('canned_response_id');
+ echo get_canned_response($canned_response_id);
+ break;
+
+ default:
+ echo '';
+ break;
+}
+
+function get_canned_response($id) {
+ $result = db_query_params('SELECT body FROM artifact_canned_responses WHERE id=$1',
+ array ($id));
+ if (! $result || db_numrows($result) < 1) {
+ return '';
+ }
+ else {
+ return db_result($result, 0, 'body');
+ }
+}
+
+?>
\ No newline at end of file
<div class="tabbertab" title="<?php echo _('Followups');?>">
<table border="0" width="80%">
<tr><td colspan="2">
- <br /><strong><?php echo _('OR Attach A Comment') ?>: <?php echo notepad_button('document.forms.trackermodlimitedform.details') ?></strong><br />
+ <br /><strong><?php echo _('Add A Comment') ?>: <?php echo notepad_button('document.forms.trackermodlimitedform.details') ?></strong><br />
<textarea id="tracker-comment" name="details" rows="7" cols="60" title="<?php echo util_html_secure(html_get_tooltip_description('comment')) ?>"></textarea>
<p>
<h2><?php echo _('Followups: ') ;
echo $ath->cannedResponseBox('canned_response');
echo ' '.util_make_link ('/tracker/admin/?group_id='.$group_id.'&atid='. $ath->getID() .'&add_canned=1','('._('Admin').')');
?>
+ <script language="JavaScript" type="text/javascript">/* <![CDATA[ */
+ $('#tracker-canned_response').change(function() {
+ $.ajax({
+ type: 'POST',
+ url: 'index.php',
+ data: 'rtype=ajax&function=get_canned_response&group_id=<?php echo $group_id ?>&canned_response_id='+$('#tracker-canned_response').val(),
+ success: function(rep){
+ // the following line is not the best but works with IE6
+ $('#tracker-canned_response option').each(function() {$(this).attr("selected", "selected"); return false;});
+ if ($('#tracker-comment').val()) {
+ rep = "\n" + rep
+ }
+ $('#tracker-comment').val($('#tracker-comment').val() + rep);
+ }
+ });
+ });
+ /* ]]> */</script>
<p>
- <strong><?php echo _('OR Attach A Comment') ?>:<?php echo notepad_button('document.forms.trackermodform.details') ?></strong><br />
+ <strong><?php echo _('Add A Comment') ?>:<?php echo notepad_button('document.forms.trackermodform.details') ?></strong><br />
<textarea id="tracker-comment" name="details" rows="7" cols="60" title="<?php echo util_html_secure(html_get_tooltip_description('comment')) ?>"></textarea></p>
<h2><?php echo _('Followups: ') ;
if ($sort_comments_chronologically) {
}
}
+if (getStringFromRequest('rtype') == 'ajax') {
+ include $gfcommon.'tracker/actions/ajax.php';
+ exit;
+}
+
if ($group_id && $atid) {
include $gfcommon.'tracker/actions/tracker.php';