[Bps-public-commit] rt-extension-ajaxpreviewscrips branch, master, updated. 0.10
Alex Vandiver
alexmv at bestpractical.com
Tue Apr 28 13:25:15 EDT 2015
The branch, master has been updated
via c74f9685821a9ebdb0a60a763c4d6e5982bebbfd (commit)
via 4a94bc90905527c537b2b374affbd1d9ced465c5 (commit)
via 21aa96782f9d9dc210edda6d5a2ae1b9139fb9ed (commit)
from 814aa7be1bfcdd8aff86b4c2415f4017791f6ea1 (commit)
Summary of changes:
Changes | 6 ++++++
META.yml | 2 +-
.../Callbacks/AjaxPreviewScrips/Ticket/Update.html/AfterForm | 12 ++++++++----
lib/RT/Extension/AjaxPreviewScrips.pm | 2 +-
4 files changed, 16 insertions(+), 6 deletions(-)
- Log -----------------------------------------------------------------
commit 21aa96782f9d9dc210edda6d5a2ae1b9139fb9ed
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Tue Apr 28 13:15:15 2015 -0400
Only attempt to synchronize "All recipients" box if it exists
setCheckbox takes a single element, not a jQuery collection; while it
aborted early if passed null, it did not do so if passed an empty
collection. This resulted in console errors after every request if
there were no recipients across all scrips.
diff --git a/html/Callbacks/AjaxPreviewScrips/Ticket/Update.html/AfterForm b/html/Callbacks/AjaxPreviewScrips/Ticket/Update.html/AfterForm
index 6e5ba96..2a48aea 100644
--- a/html/Callbacks/AjaxPreviewScrips/Ticket/Update.html/AfterForm
+++ b/html/Callbacks/AjaxPreviewScrips/Ticket/Update.html/AfterForm
@@ -22,7 +22,9 @@ jQuery( function() {
txn_send_field.change( syncCheckboxes );
txn_send_field.click( function () { setCheckbox(this) } );
jQuery("#recipients input[name=TxnSendMailToAll]").click( function() { setCheckbox(this, 'TxnSendMailTo'); } );
- setCheckbox(txn_send_field);
+ if (txn_send_field.length > 0) {
+ setCheckbox(txn_send_field[0]);
+ }
}
);
jQuery('#previewscrips div.titlebox-content').load( '<% RT->Config->Get('WebPath')%>/Helpers/PreviewScrips',
@@ -32,7 +34,9 @@ jQuery( function() {
txn_send_field.change( syncCheckboxes );
txn_send_field.click( function () { setCheckbox(this) } );
jQuery("#previewscrips input[name=TxnSendMailToAll]").click( function() { setCheckbox(this, 'TxnSendMailTo'); } );
- setCheckbox(txn_send_field);
+ if (txn_send_field.length > 0) {
+ setCheckbox(txn_send_field[0]);
+ }
}
);
};
commit 4a94bc90905527c537b2b374affbd1d9ced465c5
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Tue Apr 28 13:17:43 2015 -0400
Switch to making POST requests, not GET requests
If passed a string, the .load() function makes a GET request; if passed
an object, it makes a POST request. Since GET requests are limited in
query-string length by the webserver, use a POST rquest to ensure that
if the helper request is not dropped if the textarea contains a large
amount of text.
diff --git a/html/Callbacks/AjaxPreviewScrips/Ticket/Update.html/AfterForm b/html/Callbacks/AjaxPreviewScrips/Ticket/Update.html/AfterForm
index 2a48aea..6754334 100644
--- a/html/Callbacks/AjaxPreviewScrips/Ticket/Update.html/AfterForm
+++ b/html/Callbacks/AjaxPreviewScrips/Ticket/Update.html/AfterForm
@@ -16,7 +16,7 @@ jQuery( function() {
jQuery("input[name=TxnSendMailTo]").filter( function() { return this.value == target.value; } ).prop("checked",jQuery(target).prop('checked'));
};
jQuery('#recipients div.titlebox-content').load( '<% RT->Config->Get('WebPath')%>/Helpers/ShowSimplifiedRecipients',
- jQuery('form[name=TicketUpdate]').serialize(),
+ jQuery('form[name=TicketUpdate]').serializeArray(),
function() {
var txn_send_field = jQuery("#recipients input[name=TxnSendMailTo]");
txn_send_field.change( syncCheckboxes );
@@ -28,7 +28,7 @@ jQuery( function() {
}
);
jQuery('#previewscrips div.titlebox-content').load( '<% RT->Config->Get('WebPath')%>/Helpers/PreviewScrips',
- jQuery('form[name=TicketUpdate]').serialize(),
+ jQuery('form[name=TicketUpdate]').serializeArray(),
function() {
var txn_send_field = jQuery("#previewscrips input[name=TxnSendMailTo]");
txn_send_field.change( syncCheckboxes );
commit c74f9685821a9ebdb0a60a763c4d6e5982bebbfd
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Tue Apr 28 13:24:30 2015 -0400
Version 0.10 releng
diff --git a/Changes b/Changes
index db63957..910e4b8 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,11 @@
Revision history for RT-Extension-AjaxPreviewScrips
+0.10 2015-04-28
+ - Use POST instead of GET for helper requests, to allow the textarea to
+ contain large amounts of text.
+ - Resolve a console error if the preview contained no recipient
+ checkboxes.
+
0.09 2015-04-05
- Additional packaging fixes; don't index RT:: packages, use BPS author
diff --git a/META.yml b/META.yml
index fdb8de9..5e8f140 100644
--- a/META.yml
+++ b/META.yml
@@ -29,7 +29,7 @@ requires:
resources:
license: http://opensource.org/licenses/gpl-license.php
repository: https://github.com/bestpractical/rt-extension-ajaxpreviewscrips
-version: '0.09'
+version: '0.10'
x_module_install_rtx_version: '0.37'
x_requires_rt: 4.2.0
x_rt_too_new: 4.4.0
diff --git a/lib/RT/Extension/AjaxPreviewScrips.pm b/lib/RT/Extension/AjaxPreviewScrips.pm
index 5fa7fcc..814a084 100644
--- a/lib/RT/Extension/AjaxPreviewScrips.pm
+++ b/lib/RT/Extension/AjaxPreviewScrips.pm
@@ -2,7 +2,7 @@ use strict;
use warnings;
package RT::Extension::AjaxPreviewScrips;
-our $VERSION = '0.09';
+our $VERSION = '0.10';
RT->AddStyleSheets("ajaxpreviewscrips.css");
RT->AddJavaScript("checkboxes.js");
RT->Config->AddOption(
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list