[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[4519] trunk
- Subject: SF.net SVN: ledger-smb:[4519] trunk
- From: ..hidden..
- Date: Wed, 21 Mar 2012 14:22:42 +0000
Revision: 4519
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4519&view=rev
Author: einhverfr
Date: 2012-03-21 14:22:42 +0000 (Wed, 21 Mar 2012)
Log Message:
-----------
Merging from branches/1.3
Modified Paths:
--------------
trunk/UI/Contact/pricelist.html
trunk/UI/lib/dynatable.html
trunk/sql/modules/LOADORDER
trunk/sql/modules/Util.sql
Added Paths:
-----------
trunk/LedgerSMB/DBObject/Part.pm
trunk/LedgerSMB/ScriptLib/Common_Search/
trunk/LedgerSMB/ScriptLib/Common_Search/Part.pm
trunk/LedgerSMB/ScriptLib/Common_Search.pm
trunk/UI/search_results.html
trunk/sql/modules/Parts.sql
Removed Paths:
-------------
trunk/LedgerSMB/ScriptLib/Common_Search/Part.pm
Property Changed:
----------------
trunk/
trunk/LedgerSMB/Scripts/account.pm
trunk/LedgerSMB/Scripts/admin.pm
trunk/LedgerSMB/Scripts/customer.pm
trunk/LedgerSMB/Scripts/employee.pm
trunk/LedgerSMB/Scripts/file.pm
trunk/LedgerSMB/Scripts/journal.pm
trunk/LedgerSMB/Scripts/login.pm
trunk/LedgerSMB/Scripts/menu.pm
trunk/LedgerSMB/Scripts/payment.pm
trunk/LedgerSMB/Scripts/recon.pm
trunk/LedgerSMB/Scripts/setup.pm
trunk/LedgerSMB/Scripts/taxform.pm
trunk/LedgerSMB/Scripts/vendor.pm
trunk/sql/upgrade/1.2-1.3-manual.sql
Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3:3711-4507
+ /branches/1.3:3711-4518
Copied: trunk/LedgerSMB/DBObject/Part.pm (from rev 4518, branches/1.3/LedgerSMB/DBObject/Part.pm)
===================================================================
--- trunk/LedgerSMB/DBObject/Part.pm (rev 0)
+++ trunk/LedgerSMB/DBObject/Part.pm 2012-03-21 14:22:42 UTC (rev 4519)
@@ -0,0 +1,72 @@
+=head1 NAME
+
+LedgerSMB::DBObject::Part - Base parts functions to support new 1.3 stuff
+
+=head1 SYNOPSIS
+
+ my $psearch = LedgerSMB::DBObject::Part->new({base => $request});
+ my $results = $psearch->search_lite(
+ {partnumber => '124',
+ description => '200GB USB Drive' };
+
+
+=cut
+
+package LedgerSMB::DBObject::Part;
+use base qw(LedgerSMB::DBObject);
+use strict;
+use warnings;
+
+=head1 DESCRIPTION
+
+This package contains the basic parts search functions for 1.3. In future
+versions this may be heavily expanded.
+
+=head1 PROPERTIES
+
+None yet
+
+=head1 METHODS
+
+=over
+
+=item search_lite($args)
+
+This performs a light-weight search, suitable for parts lookups, not heavy parts
+searching. It takes a single hashref as an argument, which contains any of the
+following attributes
+
+=over
+
+=item partnumber
+
+This matches on the beginning of the string of the partnumber only.
+
+=item description
+
+This is a full text search of the description. So '200GB USB Drive' matches
+'USB Hard Drive, 200GB' as well as 'Thumb drive, USB, 200gb'. This is believed
+to currently be the most forgiving yet useful way of doing this part of the
+search.
+
+=back
+
+=cut
+
+sub search_lite {
+ my ($self, $args) = @_;
+ return $self->call_procedure(procname => 'parts__search_lite',
+ args => [$args->{partnumber},
+ $args->{description},]
+ );
+}
+
+=head1 COPYRIGHT
+
+Copyright (C) 2012 The LedgerSMB Core Team. This file may be re-used under the
+terms of the GNU General Public License version 2 or at your option any later
+version. Please see the included LICENSE.txt for more information.
+
+=cut
+
+return 1;
Deleted: trunk/LedgerSMB/ScriptLib/Common_Search/Part.pm
===================================================================
--- branches/1.3/LedgerSMB/ScriptLib/Common_Search/Part.pm 2012-03-21 12:40:21 UTC (rev 4518)
+++ trunk/LedgerSMB/ScriptLib/Common_Search/Part.pm 2012-03-21 14:22:42 UTC (rev 4519)
@@ -1,106 +0,0 @@
-=head1 NAME
-
-LedgerSMB::ScriptLib::Common_Search::Part - Part Search Routines
-
-=head1 SYNPOSIS
-
-This provides functionality to search for a part, for new 1.3-framework code.
-
-=cut
-
-package LedgerSMB::ScriptLib::Common_Search::Part;
-use strict;
-use warnings;
-use LedgerSMB::DBObject::Part;
-
-=head1 PROPERTIES/ACCESSORS
-
-=over
-
-=item columns (Global, static, read-only)
-
-Returns a list of columns for the embedded table engine as an arrayref.
-
-=cut
-
-my $COLUMNS = [
- {col_id => 'id',
- name => 'ID',
- type => 'mirrored', }
-
- {col_id => 'partnumber',
- name => 'Partnumber',
- type => 'mirrored', },
-
- {col_id => 'description',
- name => 'Description',
- type => 'mirrored', },
-
- {col_id => 'on_hand',
- name => 'On Hand',
- type => 'text', } ,
- # Can add more later
-];
-
-sub columns {
- return $COLUMNS;
-}
-
-=item results
-
-Returns a list of results as an array of hashrefs.
-
-=cut
-
-sub results {
- my ($self) = @_;
- return $self->{_results};
-}
-
-=back
-
-=head1 METHODS
-
-=over
-
-=item new ($request)
-
-Instantiates a new search object.
-
-=cut
-
-sub new {
- my ($request) = @_;
- my $self = {};
- bless $self, __PACKAGE__;
- $self->{_part} = LedgerSMB::DBObject::Part->new({base => $request});
- $self->{_results} = [];
- return $self;
-};
-
-
-=item search({partnumber => $string, description => $string})
-
-Performs a search and caches it. One object should be used per search unless
-results are no longer needed.
-
-=cut
-
-sub search {
- my ($self, $args) = @_;
- @results = $self->{_part}->search_lite($args);
- $self->{_results} = ..hidden..;
- return $self->{_results};
-}
-
-=back
-
-=head1 COPYRIGHT
-
-Copyright (C) 2012 The LedgerSMB Core Team. This file may be used in
-accordance with the GNU General Public License version 2 or at your option any
-later version. Please see attached LICENSE file for details.
-
-=cut
-
-return 1;
Copied: trunk/LedgerSMB/ScriptLib/Common_Search/Part.pm (from rev 4518, branches/1.3/LedgerSMB/ScriptLib/Common_Search/Part.pm)
===================================================================
--- trunk/LedgerSMB/ScriptLib/Common_Search/Part.pm (rev 0)
+++ trunk/LedgerSMB/ScriptLib/Common_Search/Part.pm 2012-03-21 14:22:42 UTC (rev 4519)
@@ -0,0 +1,106 @@
+=head1 NAME
+
+LedgerSMB::ScriptLib::Common_Search::Part - Part Search Routines
+
+=head1 SYNPOSIS
+
+This provides functionality to search for a part, for new 1.3-framework code.
+
+=cut
+
+package LedgerSMB::ScriptLib::Common_Search::Part;
+use strict;
+use warnings;
+use LedgerSMB::DBObject::Part;
+
+=head1 PROPERTIES/ACCESSORS
+
+=over
+
+=item columns (Global, static, read-only)
+
+Returns a list of columns for the embedded table engine as an arrayref.
+
+=cut
+
+my $COLUMNS = [
+ {col_id => 'id',
+ name => 'ID',
+ type => 'mirrored', }
+
+ {col_id => 'partnumber',
+ name => 'Partnumber',
+ type => 'mirrored', },
+
+ {col_id => 'description',
+ name => 'Description',
+ type => 'mirrored', },
+
+ {col_id => 'on_hand',
+ name => 'On Hand',
+ type => 'text', } ,
+ # Can add more later
+];
+
+sub columns {
+ return $COLUMNS;
+}
+
+=item results
+
+Returns a list of results as an array of hashrefs.
+
+=cut
+
+sub results {
+ my ($self) = @_;
+ return $self->{_results};
+}
+
+=back
+
+=head1 METHODS
+
+=over
+
+=item new ($request)
+
+Instantiates a new search object.
+
+=cut
+
+sub new {
+ my ($request) = @_;
+ my $self = {};
+ bless $self, __PACKAGE__;
+ $self->{_part} = LedgerSMB::DBObject::Part->new({base => $request});
+ $self->{_results} = [];
+ return $self;
+};
+
+
+=item search({partnumber => $string, description => $string})
+
+Performs a search and caches it. One object should be used per search unless
+results are no longer needed.
+
+=cut
+
+sub search {
+ my ($self, $args) = @_;
+ @results = $self->{_part}->search_lite($args);
+ $self->{_results} = ..hidden..;
+ return $self->{_results};
+}
+
+=back
+
+=head1 COPYRIGHT
+
+Copyright (C) 2012 The LedgerSMB Core Team. This file may be used in
+accordance with the GNU General Public License version 2 or at your option any
+later version. Please see attached LICENSE file for details.
+
+=cut
+
+return 1;
Copied: trunk/LedgerSMB/ScriptLib/Common_Search.pm (from rev 4518, branches/1.3/LedgerSMB/ScriptLib/Common_Search.pm)
===================================================================
--- trunk/LedgerSMB/ScriptLib/Common_Search.pm (rev 0)
+++ trunk/LedgerSMB/ScriptLib/Common_Search.pm 2012-03-21 14:22:42 UTC (rev 4519)
@@ -0,0 +1,118 @@
+=head1 NAME
+
+LedgerSMB::ScriptLib::Common_Search - Common Search Routines for LedgerSMB
+
+=head1 SYNOPSIS
+
+TODO
+
+=cut
+
+package LedgerSMB::ScriptLib::Common_Search;
+use strict;
+use warnings;
+use LedgerSMB::Template;
+
+=head1 RESERVED ATTRIBUTES
+
+These attributes will be overwritten in the process of using this module.
+Please plan for this before rendering the form.
+
+=over
+
+=item columns
+
+=item rows
+
+=back
+
+=head1 ROUTINES
+
+=over
+
+=item extract($request)
+
+This takes a $request object and checks to see if a search_select option is set.
+If one is, it returns a single hashref of the data submitted back with prefixes
+removed. If not, it runs through 1 .. $request->{search_rowcount} and checks
+for submitted items. It assembles these into a list and returns the list as a
+list of hashrefs.
+
+=cut
+
+sub extract {
+ my ($request) = @_;
+ if ($request->{search_select}){
+ my $id = $request->{search_select};
+ my $retval = {};
+ for my $key (keys %$request){
+ if ($key =~ /^search\_.*\_$id$/){
+ my $rkey = $key;
+ $rkey =~ s/^search\_//;
+ $rkey =~ s/\_$id$//;
+ $retval->{$rkey} = $request->{$key};
+ }
+ }
+ return $retval;
+ } else {
+ my @retval;
+ for $row (1 .. $form->{search_rowcount}){
+ next unless $form->{"search_select_$row"};
+ my $id = $form->{"search_select_$row"};
+ my $item = {};
+ for my $key (keys %$request){
+ if ($key =~ /^search\_.*\_$id$/){
+ my $rkey = $key;
+ $rkey =~ s/^search\_//;
+ $rkey =~ s/\_$id$//;
+ $item->{$rkey} = $request->{$key};
+ }
+ }
+ push @retval, $item;
+ }
+ return @retval;
+ }
+}
+
+=item render($request)
+
+This renders the search screen.
+
+=cut
+
+sub render {
+ my ($self, $request) = @_;
+ $request->{columns} = $self->columns;
+ $request->{rows} = $self->results;
+ my $template = LedgerSMB::Template->new(
+ user => $request->{_user},
+ locale => $request->{_locale},
+ path => 'UI',
+ template => 'search_results',
+ format => 'HTML',
+ );
+ $template->render($request);
+}
+
+
+=back
+
+=head2 Child Classes Must Implement the Following
+
+=item columns
+
+Returns a list of columns as expected for Dynatable.
+
+=item results
+
+Returns a list of results, becomes the rows for the table.
+
+=back
+
+=head1 COPYRIGHT
+
+Copyright (C) 2012 LedgerSMB Core Team. This file may be re-used under the terms of the GNU General Public License version 2 or at your option any later version.
+
+=cut
+
+return 1;
Property changes on: trunk/LedgerSMB/Scripts/account.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/account.pm:4369-4507
/branches/1.3/scripts/account.pl:3711-4368
+ /branches/1.3/LedgerSMB/Scripts/account.pm:4369-4518
/branches/1.3/scripts/account.pl:3711-4368
Property changes on: trunk/LedgerSMB/Scripts/admin.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/admin.pm:3901-4507
/branches/1.3/scripts/admin.pl:3711-3903,4273-4287
+ /branches/1.3/LedgerSMB/Scripts/admin.pm:3901-4518
/branches/1.3/scripts/admin.pl:3711-3903,4273-4287
Property changes on: trunk/LedgerSMB/Scripts/customer.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/customer.pm:4288-4507
/branches/1.3/scripts/customer.pl:4273-4287
+ /branches/1.3/LedgerSMB/Scripts/customer.pm:4288-4518
/branches/1.3/scripts/customer.pl:4273-4287
Property changes on: trunk/LedgerSMB/Scripts/employee.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/employee.pm:3712-4507
/branches/1.3/scripts/employee.pl:3842-3843,4273-4287,4289-4310
+ /branches/1.3/LedgerSMB/Scripts/employee.pm:3712-4518
/branches/1.3/scripts/employee.pl:3842-3843,4273-4287,4289-4310
Property changes on: trunk/LedgerSMB/Scripts/file.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/file.pm:3711-4507
/branches/1.3/scripts/file.pl:3711-4138
+ /branches/1.3/LedgerSMB/Scripts/file.pm:3711-4518
/branches/1.3/scripts/file.pl:3711-4138
Property changes on: trunk/LedgerSMB/Scripts/journal.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/journal.pm:4288-4507
/branches/1.3/scripts/journal.pl:3711-4328
+ /branches/1.3/LedgerSMB/Scripts/journal.pm:4288-4518
/branches/1.3/scripts/journal.pl:3711-4328
Property changes on: trunk/LedgerSMB/Scripts/login.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/login.pm:4193-4507
/branches/1.3/scripts/login.pl:3711-4192
+ /branches/1.3/LedgerSMB/Scripts/login.pm:4193-4518
/branches/1.3/scripts/login.pl:3711-4192
Property changes on: trunk/LedgerSMB/Scripts/menu.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/menu.pm:4155-4507
/branches/1.3/scripts/menu.pl:3711-4192,4273-4287
+ /branches/1.3/LedgerSMB/Scripts/menu.pm:4155-4518
/branches/1.3/scripts/menu.pl:3711-4192,4273-4287
Property changes on: trunk/LedgerSMB/Scripts/payment.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/payment.pm:4010-4507
/branches/1.3/scripts/payment.pl:3711-4310
+ /branches/1.3/LedgerSMB/Scripts/payment.pm:4010-4518
/branches/1.3/scripts/payment.pl:3711-4310
Property changes on: trunk/LedgerSMB/Scripts/recon.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/recon.pm:3711-4507
/branches/1.3/scripts/recon.pl:4194-4271,4273-4287,4393-4438
+ /branches/1.3/LedgerSMB/Scripts/recon.pm:3711-4518
/branches/1.3/scripts/recon.pl:4194-4271,4273-4287,4393-4438
Property changes on: trunk/LedgerSMB/Scripts/setup.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/setup.pm:3937-4507
/branches/1.3/scripts/setup.pl:3711-4474
+ /branches/1.3/LedgerSMB/Scripts/setup.pm:3937-4518
/branches/1.3/scripts/setup.pl:3711-4474
Property changes on: trunk/LedgerSMB/Scripts/taxform.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/taxform.pm:4193-4507
/branches/1.3/scripts/taxform.pl:3711-4192,4273-4287
+ /branches/1.3/LedgerSMB/Scripts/taxform.pm:4193-4518
/branches/1.3/scripts/taxform.pl:3711-4192,4273-4287
Property changes on: trunk/LedgerSMB/Scripts/vendor.pm
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/LedgerSMB/Scripts/vendor.pm:4288-4507
/branches/1.3/scripts/vendor.pl:4273-4287
+ /branches/1.3/LedgerSMB/Scripts/vendor.pm:4288-4518
/branches/1.3/scripts/vendor.pl:4273-4287
Modified: trunk/UI/Contact/pricelist.html
===================================================================
--- trunk/UI/Contact/pricelist.html 2012-03-21 12:40:21 UTC (rev 4518)
+++ trunk/UI/Contact/pricelist.html 2012-03-21 14:22:42 UTC (rev 4519)
@@ -68,7 +68,8 @@
PROCESS dynatable
attributes = { id = 'pricematrix' }
tbody = { rows = pricematrix }
- tfoot = { coltypes = { int_partnumber = 'input_text' }
+ tfoot = { coltypes = { int_partnumber = 'input_text',
+ description = 'input_text', }
rows = [{}]} ?>
<?lsmb PROCESS button element_data = {
type = "submit"
Modified: trunk/UI/lib/dynatable.html
===================================================================
--- trunk/UI/lib/dynatable.html 2012-03-21 12:40:21 UTC (rev 4518)
+++ trunk/UI/lib/dynatable.html 2012-03-21 14:22:42 UTC (rev 4519)
@@ -13,6 +13,7 @@
<?lsmb- END -?>
<tbody>
<?lsmb- ROWCOUNT = 0;
+ PFX = attributes.input_prefix;
FOREACH ROW IN tbody.rows;
ROWCOUNT = ROWCOUNT + 1 -?>
<tr class="<?lsmb ROW.html_class ?>">
@@ -24,7 +25,7 @@
<input id="<?lsmb COL.col_id ?>-<?lsmb loop.count ?>"
type="text"
class="<?lsmb COL.class ?>"
- name="<?lsmb COL.col_id ?>_<?lsmb loop.count ?>"
+ name="<?lsmb PFX _ COL.col_id _ '_' _ ROW.row_id ?>"
value="<?lsmb ROW.${COL.col_id} ?>"
/>
<?lsmb- ELSIF COL.type == 'checkbox';
@@ -36,14 +37,14 @@
?>
<input id="<?lsmb COL.col_id ?>-<?lsmb loop.count ?>"
type="checkbox"
- name="<?lsmb COL.col_id ?>_<?lsmb loop.count ?>"
+ name="<?lsmb PFX _ COL.col_id ?>_<?lsmb loop.count ?>"
class="<?lsmb COL.class ?>"
value="<?lsmb ROW.row_id ?>"
<?lsmb CHECKED ?> />
<?lsmb- ELSIF COL.type == 'radio' ?>
<input id="<?lsmb COL.col_id ?>-<?lsmb loop.count ?>"
type="radio"
- name="<?lsmb COL.col_id ?>"
+ name="<?lsmb PFX _ COL.col_id ?>"
class="<?lsmb COL.class ?>"
value="<?lsmb ROW.row_id ?>"
<?lsmb CHECKED ?> />
@@ -55,6 +56,12 @@
HREF = COL.href_base _ ROW.row_id;
END
?><a href="<?lsmb HREF ?>"><?lsmb ROW.${COL.col_id} ?></a>
+ <?lsmb ELSIF COL.type == 'mirrored';
+ NAME = PFX _ ROW.${COL.col_id} _ '_' _ $ROW.row_id;
+ ROW.${COL.col_id} ?>
+ <input type="hidden"
+ name="<?lsmb NAME ?>"
+ value ="<?lsmb ROW.${COL.col_id} ?>" />
<?lsmb- ELSE -?>
<?lsmb ROW.${COL.col_id} ?>
<?lsmb- END -?>
@@ -87,7 +94,7 @@
<input id="<?lsmb COL.col_id ?>-<?lsmb loop.count ?>"
type="text"
class="<?lsmb COL.class ?>"
- name="<?lsmb COL.col_id ?>_<?lsmb loop.count ?>"
+ name="<?lsmb PFX _ COL.col_id _ 'tfoot_' _ loop.count ?>"
value="<?lsmb ROW.${COL.col_id} ?>"
/>
<?lsmb- ELSIF TYPE == 'checkbox';
@@ -99,14 +106,14 @@
?>
<input id="<?lsmb COL.col_id ?>-<?lsmb loop.count ?>"
type="checkbox"
- name="<?lsmb COL.col_id ?>_<?lsmb loop.count ?>"
+ name="<?lsmb PFX _ COL.col_id ?>_<?lsmb loop.count ?>"
class="<?lsmb COL.class ?>"
value="<?lsmb ROW.row_id ?>"
<?lsmb CHECKED ?> />
<?lsmb- ELSIF TYPE == 'radio' ?>
<input id="<?lsmb COL.col_id ?>-<?lsmb loop.count ?>"
type="radio"
- name="<?lsmb COL.col_id ?>"
+ name="<?lsmb PFX _ COL.col_id ?>"
class="<?lsmb COL.class ?>"
value="<?lsmb ROW.row_id ?>"
<?lsmb CHECKED ?> />
@@ -118,6 +125,12 @@
HREF = COL.href_base _ ROW.row_id;
END
?><a href="<?lsmb HREF ?>"><?lsmb ROW.${COL.col_id} ?></a>
+ <?lsmb ELSIF TYPE == 'mirrored';
+ NAME = PFX _ ROW.${COL.col_id} _ '_' _ 'tfoot_' _ ROWCOUNT;
+ ROW.${COL.col_id} ?>
+ <input type="hidden"
+ name="<?lsmb NAME ?>"
+ value ="<?lsmb ROW.${COL.col_id} ?>" />
<?lsmb- ELSE -?>
<?lsmb ROW.${COL.col_id} ?>
<?lsmb- END -?>
Copied: trunk/UI/search_results.html (from rev 4513, branches/1.3/UI/search_results.html)
===================================================================
--- trunk/UI/search_results.html (rev 0)
+++ trunk/UI/search_results.html 2012-03-21 14:22:42 UTC (rev 4519)
@@ -0,0 +1,41 @@
+<?lsmb-
+INCLUDE 'ui-header.html';
+PROCESS 'elements.html';
+PROCESS 'dynatable.html';
+
+IF select_multi ;
+ COLTYPE = 'checkbox'
+ELSE
+ COLTYPE = 'radio'
+END;
+
+columns.unshift({
+ col_id = 'select',
+ name = '', # No label
+ type = COLTYPE
+});
+
+-?>
+<body>
+<form name="search" action="<?lsmb script ?>" method="post">
+<?lsmb-
+
+PROCESS dynatable
+ attributes = {
+ class = 'search'
+ id = 'search'
+ input_prefix = 'search_'
+ }
+ tbody = { rows = rows };
+
+PROCESS button element_data = {
+ name = 'action'
+ text = text('Continue')
+ class = 'submit'
+ type = 'submit'
+}
+
+-?>
+</form>
+</body>
+</html>
Modified: trunk/sql/modules/LOADORDER
===================================================================
--- trunk/sql/modules/LOADORDER 2012-03-21 12:40:21 UTC (rev 4518)
+++ trunk/sql/modules/LOADORDER 2012-03-21 14:22:42 UTC (rev 4519)
@@ -28,4 +28,6 @@
Util.sql
Assets.sql
Files.sql
+Parts.sql
Fixes.sql
+
Copied: trunk/sql/modules/Parts.sql (from rev 4518, branches/1.3/sql/modules/Parts.sql)
===================================================================
--- trunk/sql/modules/Parts.sql (rev 0)
+++ trunk/sql/modules/Parts.sql 2012-03-21 14:22:42 UTC (rev 4519)
@@ -0,0 +1,17 @@
+BEGIN;
+
+CREATE OR REPLACE FUNCTION parts__search_lite
+(in_partnumber text, in_description text)
+RETURNS SETOF parts AS
+$$
+SELECT *
+ FROM parts
+ WHERE ($1 IS NULL OR (partnumber like $1 || '%'))
+ AND ($2 IS NULL
+ OR (to_tsvector(get_default_lang()::name, description)
+ @@
+ plainto_tsquery(get_default_lang()::name, $2::tsvector)))
+ORDER BY partnumber;
+$$ LANGUAGE SQL;
+
+COMMIT;
Modified: trunk/sql/modules/Util.sql
===================================================================
--- trunk/sql/modules/Util.sql 2012-03-21 12:40:21 UTC (rev 4518)
+++ trunk/sql/modules/Util.sql 2012-03-21 14:22:42 UTC (rev 4519)
@@ -19,6 +19,13 @@
END;
$$ language plpgsql;
+
+CREATE OR REPLACE FUNCTION get_default_lang() RETURNS text AS
+$$ SELECT description FROM language
+ WHERE code = (SELECT substring(value, 1, 2) FROM defaults
+ WHERE setting_key = 'default_language');
+$$ LANGUAGE sql;
+
CREATE OR REPLACE FUNCTION je_get_default_lines() returns varchar as
$$
SELECT value FROM menu_attribute where node_id = 74 and attribute = 'rowcount';
Property changes on: trunk/sql/upgrade/1.2-1.3-manual.sql
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.3/sql/upgrade/1.2-1.3-manual.sql:3712-4507
/branches/1.3/sql/upgrade/1.2-1.3.sql:3711-3851
/trunk/sql/upgrade/1.2-1.3.sql:858-3710
+ /branches/1.3/sql/upgrade/1.2-1.3-manual.sql:3712-4518
/branches/1.3/sql/upgrade/1.2-1.3.sql:3711-3851
/trunk/sql/upgrade/1.2-1.3.sql:858-3710
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.