[Rt-commit] rt branch, 4.0/autocomplete-email-input, created. rt-4.0.13-62-gb5a2ba92
? sunnavy
sunnavy at bestpractical.com
Tue Jun 11 08:24:02 EDT 2013
The branch, 4.0/autocomplete-email-input has been created
at b5a2ba929b3122c8d367dfb8dadaa69c9dee5c6a (commit)
- Log -----------------------------------------------------------------
commit 4c60c83c0414555f3421c00b3affcb8e01e9f615
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu May 30 23:32:10 2013 +0800
REST fix: show updated message as long as the object is updated.
previously, we only check if the last update succeeded or not, which is not
that right.
diff --git a/share/html/REST/1.0/Forms/group/default b/share/html/REST/1.0/Forms/group/default
index 8867bf9..8a7a524 100644
--- a/share/html/REST/1.0/Forms/group/default
+++ b/share/html/REST/1.0/Forms/group/default
@@ -156,7 +156,7 @@ if (%data == 0) {
}
else {
my ($get, $set, $key, $val, $n, $s);
-
+ my $updated;
foreach $key (keys %data) {
$val = $data{$key};
$key = lc $key;
@@ -192,9 +192,12 @@ else {
$k = $changes;
}
}
+ else {
+ $updated ||= 1;
+ }
}
- push(@comments, "# Group $id updated.") unless $n == 0;
+ push(@comments, "# Group $id updated.") if $updated;
}
DONE:
diff --git a/share/html/REST/1.0/Forms/queue/default b/share/html/REST/1.0/Forms/queue/default
index 58bb899..9aa42f8 100644
--- a/share/html/REST/1.0/Forms/queue/default
+++ b/share/html/REST/1.0/Forms/queue/default
@@ -146,7 +146,7 @@ if ( keys %data == 0) {
}
else {
my ($get, $set, $key, $val, $n, $s);
-
+ my $updated;
foreach $key (keys %data) {
$val = $data{$key};
$key = lc $key;
@@ -175,9 +175,12 @@ else {
$k = $changes;
}
}
+ else {
+ $updated ||= 1;
+ }
}
- push(@comments, "# Queue $id updated.") unless $n == 0;
+ push(@comments, "# Queue $id updated.") if $updated;
}
DONE:
diff --git a/share/html/REST/1.0/Forms/ticket/default b/share/html/REST/1.0/Forms/ticket/default
index a48876b..9b34248 100644
--- a/share/html/REST/1.0/Forms/ticket/default
+++ b/share/html/REST/1.0/Forms/ticket/default
@@ -279,6 +279,7 @@ if (!keys(%data)) {
}
else {
my ($get, $set, $key, $val, $n, $s);
+ my $updated;
foreach $key (keys %data) {
$val = $data{$key};
@@ -469,8 +470,11 @@ else {
$k = $changes;
}
}
+ else {
+ $updated ||= 1;
+ }
}
- push(@comments, "# Ticket ".$ticket->id." updated.") unless $n == 0;
+ push(@comments, "# Ticket ".$ticket->id." updated.") if $updated;
}
DONE:
diff --git a/share/html/REST/1.0/Forms/user/default b/share/html/REST/1.0/Forms/user/default
index c112636..f12dd0c 100644
--- a/share/html/REST/1.0/Forms/user/default
+++ b/share/html/REST/1.0/Forms/user/default
@@ -136,7 +136,7 @@ if (keys %data == 0) {
}
else {
my ($get, $set, $key, $val, $n, $s);
-
+ my $updated;
foreach $key (keys %data) {
$val = $data{$key};
$key = lc $key;
@@ -177,9 +177,12 @@ else {
$k = $changes;
}
}
+ else {
+ $updated ||= 1;
+ }
}
- push(@comments, "# User $id updated.") unless $n == 0;
+ push(@comments, "# User $id updated.") if $updated;
}
DONE:
commit b5a2ba929b3122c8d367dfb8dadaa69c9dee5c6a
Author: sunnavy <sunnavy at bestpractical.com>
Date: Tue Jun 11 20:16:38 2013 +0800
Autocomplete support for /Elements/EmailInput
diff --git a/share/html/Elements/EmailInput b/share/html/Elements/EmailInput
index 2830a72..3d0834d 100644
--- a/share/html/Elements/EmailInput
+++ b/share/html/Elements/EmailInput
@@ -45,9 +45,10 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<input type="text" id="<% $Name %>" name="<% $Name %>" <% defined $Size ? qq{size="$Size"} : '' |n %> value="<% $Default || '' %>" />
+<input type="text" id="<% $Name %>" name="<% $Name %>" <% defined $Size ? qq{size="$Size"} : '' |n %> value="<% $Default || '' %>" <% $Autocomplete ? q{data-autocomplete="Users" data-autocomplete-return="Email"} : '' |n%> />
<%ARGS>
$Name
$Size => 40
$Default => ''
+$Autocomplete => undef
</%ARGS>
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list