[Rt-commit] rt branch, owner-autocomplete, updated. rt-3.8.8-483-gf24b585

Thomas Sibley trs at bestpractical.com
Thu Aug 19 14:49:10 EDT 2010


The branch, owner-autocomplete has been updated
       via  f24b585dcb3092e381084ab4078c5fcb2bb4a671 (commit)
      from  6439a2bb3b13071a38da5d03502904209e3a2be6 (commit)

Summary of changes:
 .../Elements/{Refresh => SelectOwnerAutocomplete}  |   42 ++++++++++---------
 1 files changed, 22 insertions(+), 20 deletions(-)
 copy share/html/Elements/{Refresh => SelectOwnerAutocomplete} (80%)
 mode change 100755 => 100644

- Log -----------------------------------------------------------------
commit f24b585dcb3092e381084ab4078c5fcb2bb4a671
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Thu Aug 19 14:48:20 2010 -0400

    Outline of the owner autocomplete widget
    
    Currently it just displays the default value (which is an ID in most
    cases!) as appropriate.  Hooking in autocomplete comes next, then making
    it usable without seeing ugly IDs.

diff --git a/share/html/Elements/SelectOwnerAutocomplete b/share/html/Elements/SelectOwnerAutocomplete
new file mode 100644
index 0000000..d624cd9
--- /dev/null
+++ b/share/html/Elements/SelectOwnerAutocomplete
@@ -0,0 +1,71 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%# 
+%# COPYRIGHT:
+%# 
+%# This software is Copyright (c) 1996-2010 Best Practical Solutions, LLC
+%#                                          <jesse at bestpractical.com>
+%# 
+%# (Except where explicitly superseded by other copyright notices)
+%# 
+%# 
+%# LICENSE:
+%# 
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%# 
+%# This work 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 this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
+%# 
+%# 
+%# CONTRIBUTION SUBMISSION POLICY:
+%# 
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%# 
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%# 
+%# END BPS TAGGED BLOCK }}}
+<%ARGS>
+$Name           => undef
+$User           => undef
+$TicketObj      => undef
+$QueueObj       => undef
+$cfqueues       => undef
+$Default        => 0
+$ValueAttribute => 'id'
+</%ARGS>
+<%INIT>
+$ValueAttribute = 'id' unless $ValueAttribute =~ /^(?:id|Name)$/;
+
+my $value = '';
+
+if ( $Default and not $Default =~ /\D/ ) {
+    my $user = RT::User->new( $session{'CurrentUser'} );
+    $user->Load($Default);
+    $value = $user->$ValueAttribute;
+}
+</%INIT>
+
+<input type="text" name="<%$Name%>" id="<%$Name%>" value="<% $value %>" />
+<script type="text/javascript">
+</script>

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


More information about the Rt-commit mailing list