Up to [Local Repository] / interchange / lib / Vend / Table
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
* Add type_empty parameter to table editor. This allows the selection of a different widget type if the length of the data is zero. Found on the extended page of the meta editor for the field. An example of use would be a "created" field in a table, which is a DATETIME type. If the value of the field is the empty string or NULL, set type_empty to "datetime" to put a date widget in. Make the normal widget type be "value", which allows you to just display the data when the value is already set.
Various minor UTF-8 changes.
Correct attribution of &Vend::CharSet::display_chars (which is from
perluniintro manpage).
Enable localization of an error string.
Match content type more tightly in 2 spots ("text" is only trustworthy
in the MIME major type, not minor, and even that may be a stretch).
Simplify request method matching in a few places for readability and a
(trivial) performance benefit.
Use conventional $c lexical instead of $g for catalog hashref.
Fix tab/space differences to match context.
Update copyrights of files changed in 2008.
* Add ability to set arbitrary options from table editor callouts. Sparked by: http://www.icdevgroup.org/pipermail/interchange-users/2008-March/048740.html Now allows an option to be set with the opts callout, for example the "ampm" option for the time widget. [table-editor label.starttime='Start Time' filter.starttime=date_change widget.starttime=time opts.starttime="ampm=1" ] Options are specified in Interchange string option format as interpreted by get_option_hash() routine.
applied localization patch from Rene Hertell (#118)
Fixed problem where form values do not always default to the $Values hash values for corresponding form fields when defaults=1 and wizard=1 are both set in the table editor.
Pass applylocale option into Vend::Form::options_to_array in order to localize option labels (#80).
* Updated copyright headers to 2007 (closes bug #102) * Added GPL and copyright headers to a few files that were missing them.
New Free Software Foundation Address in headers of various files
New Free Software Foundation Address in headers of various files
* Fixed a CSS syntax error, reported by Paul Jordan in IRC.
(back-ported from CVS HEAD)
* Fixed a CSS syntax error, reported by Paul Jordan in IRC.
Correct display of "Are you sure you want to delete $SKU" dialog when multi-part primary keys are used. Problem found and fixed by Jeff Boes <jeff@endpoint.com>. Thanks!
Remove compatible_5_2 pragma, which kept table editor error text (mistakenly) hidden, as was the case up to Interchange 5.2. Should be noted in UPGRADE document.
Big copyright and version number update to prepare for 5.3.2 release.
fix bug with duplicate column header, visible in order status UI page
Fix recently broken quoting.
- XHTML-compliance: - lowercased/quoted HTML tags (all containers, so no ">" vs. "/>" issues)
* Make defaults for meta editor on views work. * Allow saving defaults from meta-less editor starts to initialize meta editor. * Allow an overlay of certain meta values based on a subkey.
* Remove %Vend::Table::Editor::Filter_desc in favor of codedef::filter setting. Included compatibility so previous "filters" call will work.
* We had been running without warnings so long, we had gotten a bit sloppy
in our code in some places.
Because we do lots of uninitialized hash member stuff with arrays
of fields and $opt, it is basically unreasonable for us to run with
the "use of uninitialized variable" warnings. Because we do a fair
amount of numerical comparisons on empty string values, it seemed
unreasonable to run with "string value in numeric gt" enabled.
Also, because Safe, HTML::Entities, and some other modules have
these checks enabled, page code is bound to have warnings issued
no matter what you do.
It seems better to run with some warnings enabled so that we can
catch bad code practice.
So I have made the code run without warnings prior to and after
interpolate_html(), and turned off warnings by default in the
page code.
If it is desirable to turn on warnings for pages, you can use
[pragma perl_warnings_in_page] and see warnings for that page
(or by default if you put in catalog.cfg).
* In general these changes are:
no warnings qw(uninitialized numeric);
in most pages.
* Add $::Pragma->{perl_warnings_in_page}.
* Remove defined checks when simple set tests will do.
* Streamline some code.
* A bit more intelligence in the width-guessing -- when all cells were the same size it would get confused.
* Add adjust_cell_class parameter to address the ragged help text display in the table editor. If adjust-cell-class=classname is passed as an option, a JavaScript is appended which adjusts all 'classname' table cells to the widest width among them. (If one is 2x larger than all the rest, it is ignored.) Note that you may need to fiddle with help_cell_style or other style parameters to get it just right. The "adjust_width" style attempts to automatically set the help cell width for a reasonable display, but it won't always be reasonable. * Reposition Display_options option-setting so that it can affect the cell styles without munging the "extra" value. * Add new adjust_width display class which automagically uses the adjust_width feature. * Allow user-supplied callback code in an option, with checking to make sure it is a code reference. * Next commit will be db_metaconfig support.
* Add default CSS style sheet for the table editor, that matches
the UI.
Called with:
[table-editor table=inventory style-sheet=default]
Can be set via GlobalSub or elsewhere with:
$Vend::Table::Editor::Style_sheet{foo} = $foo_css;
It is output to the PRESCRIPT area, possibly in an output or
just prepended to the table editor.
* Anyone is invited to submit more.
* Correct exclusion mapping for top buttons and messages area. This corrects an empty table data cell which was not displaying messages when BOTTOM_BUTTONS was in effect.
* Fix problem with non-UI table editor display, caused bad form. Modify FORM_BEGIN in place to insert prescript area. * Change way intro_text is displayed in wizard/survey mode.
* Add Stefan's suggested Visibility modification for CodeDef options.
By default the visibility is public.
It wants something like:
codedef:JavaScriptCheck
Will return all public Descriptions.
codedef:JavaScriptCheck:private -- return public and private.
codedef:JavaScriptCheck:private,admin -- return public,private,admin
If Visibility is "with Foo::Bar", it checks to see if $Foo::Bar::VERSION
is true and returns the option if it is.
* Create routine to automatically select Routine for certain type of
CodeDef. Currently there are many separate methods of doing that.
This one prefers local over global, and is called with:
codedef_routine($type, $name);
For instance, codedef_routine('OrderCheck', 'multistate') will
return $Vend::Cfg->{CodeDef}{OrderCheck}{multistate} if it exists,
otherwise returns $Global::CodeDef->{OrderCheck}{multistate}.
* Modify Form.pm to use this for JavaScriptCheck. More will be
added.
* Modify filters to add private Visibility for non-mainstream filters.
* Modify meta editor to use this.
* The variable names in country_select were not necessarily unique. Though
testing worked with two country variables (country and b_country) this
would not necessarily be the case with all browsers/javascript implentations.
Rename all variables to make the code pretty much unique. It could be conflict
with non_standard variable names, so it may take more thought. This should
be at least better.
* Add a callback_prescript and callback_postscript hook for widgets to
use. This allows sending code to an area before the form (prescript)
or after the form (postscript). To begin with, only country_select
uses this.
* Add calls to callback_prescript and callback_postscript to
country_select (if routine is present). This puts the script
code in a better place and removes the necessity for state_select
being before country_select.
* Callbacks could be used like:
[display
name=country
type=country_select
callback_prescript=`sub {
my $val = shift;
$Scratch->{meta_header} .= "\n$val";
return;
}
`
callback_postscript=`sub {
my $val = shift;
$Scratch->{some_footer} .= "\n$val";
return;
}
`
]
* Make the start of XHTML support for Interchange. * Add global XHTML and catalog XHTML options. Global is false/off by default, and catalog option is defaulted from global option. * The only effect is that Dispatch.pm sets $Vend::Xtrailer to the appropriate value of '/' or ''. * Use $Vend::Xtrailer to set any <br/> or <br> we use. * Change some generated HTML to: -- lowercase tags -- quote parms -- use $Vend::Xtrailer * Supply [br] tag which returns the proper <br/> or <br>.
* Add descriptions to filters. Some descriptions for trivial, obsolete, or very complex filters were left commented out to not clutter a filter list with garbage. * Fix codedef:foo options callout to not be case sensitive. * Sort codedef:foo return lists by label.
* Add new automatic options generator -- CodeDef::(Filter|JavascriptCheck|etc.). * By placing the string 'codedef:filter' in the options field, you can pull out the Description members of any CodeDef region. * For example, if you wanted to build a generator for OrderCheck strings, and had custom OrderCheck members, you just define the Description as: CodeDef foo OrderCheck 1 CodeDef foo Description The foo check CodeDef bar OrderCheck 1 CodeDef bar Description The bar check When you use [display name=checks type=select options="codedef:OrderCheck"] you generate: <select name="checks"> <option value="foo">The foo check <option value="bar">The bar check </select> * Will work for any CodeDef, including UserTag. Does require a Description member, though, which are largely undefined.
* Modify table editor to easily switch between display types without
having (necessarily) to create your own row_template. Defines
eight standard display types, three of which were already in
use -- image_meta (UI), simple_row (unused, probably) and
the default.
* Add admin/db_metaconfig support to select the display type in the
normal flex_editor.
* Add fields_template_only=1 parameter to [table-editor] that allows you
to input a simple table with only the field definitions -- wraps it in
a standard overall_template.
* Create an example [survey-wizard ] tag that uses these new features. It:
-- reads multi-column page descriptions like [table-editor]
-- accepts file uploads
-- allows targeting of file uploads to a directory
-- allows completely custom per-page templates for complex HTML
forms
-- works in conjunction with changed [email ...] tag to attach
file-upload fields to the results email
This is created in eg/ because it will be in flux as it is gradually
adapted to allow multi-faceted content upload for products in a
"wizard" format -- i.e. upload images, PDF documents, license keys,
etc. to multiple tables, directories, and targets with emailed
workflow.
As far as I can tell, the current is completely compatible with
auto-wizard, but that will change over time and it may be renamed
or just kept in eg/ for custom implementation.
* The new [email] tag is as far as known completely compatible with
the current tag, and allows attachments to be added with
parameters, i.e. in the simplest case:
[email
from="Me"
to="You"
subject=Test
attach="foo.pdf"
]
Here is the pdf.
[/email]
Also allows more complicated multiple uploads:
[email
from="Me"
to="You"
subject=Test
attach.1="foo.pdf"
attach.2="bar.pdf"
]
Here are the pdfs.
[/email]
or even:
[email
from="Me"
to="You"
subject=Test
attach.1=`{
path => 'foo.pdf',
filename => "Mike's copy of foo.pdf",
disposition => 'attachment',
type => 'application/pdf',
}`
attach.2=`{
path => 'bar.pdf',
filename => "Jon's copy of foo.pdf",
disposition => 'attachment',
type => 'application/pdf',
}`
]
Here are the pdfs.
[/email]
* Unhide error text which unaccountably has been hidden all along. * Add ability to control the error template with a parameter -- accepts same input as [error] tag. * Allow old behavior with "Pragma compatible_5_2".
* Fix longstanding bug where $base_entry_value was not showing the proper columns (with a columns:: spec) in the meta editor.
* Add ExtraMeta capability to UserTags.
If you put an ExtraMeta setting in the CodeDef for the widget, it
works the same as a meta record of _widget::type, i.e. it is a structure
like this one for the "imagedir" widget:
CodeDef imagedir ExtraMeta <<EOM
{
_order => [ qw/ follow_symlinks / ],
follow_symlinks => {
widget => 'yesno',
label => 'Follow Symlinks',
help => 'Set to yes if you want to list all files, \
even following symbolic links',
},
}
EOM
This adds a "Special for imagedir widget" tab in the meta_editor,
which allows special settings for the widget.
Can be done in catalog.cfg widgets and global widgets. The actual
ExtraMeta is a string value which is runtime-interpolated to a
hash.
Can be set in Vend::Form native widgets by setting %Vend::Form::ExtraMeta,
i.e.:
$Vend::Form::ExtraMeta{text} = {
_order => [ 'maxlen' },
maxlen => {
widget => 'text_4',
label => 'Maximum length for value',
}
};
Not that it will do any good until the settings are honored by the
widget. Should be set to an actual reference.
There is an illustration for the "imagedir" widget as above.
* Add back in the nascent display_filter edit in meta_editor, and
give help/setting for restrict_allow.
* Allow labels to contain an equals sign. Found by Bill Carr.
( Continuation of previous changes to these files, inadvertently committed. ) * Spreadsheets can now do file upload, including those linked inside another table.
* Allow table editor to set mv_return_table if not already set, ensures that a linked spreadsheet won't command the table upon return to the select page. * Allow a field's restrict_allow to be set to control expansion of append/prepend values. * Make ui_wizard_fields control when ui_data_fields not set. Used to always come from ui_data_fields.
* Remove duplicate members from array.
* Have table-editor pre-populate the appropriate fields of a COMPOSITE_KEY record when an item_id is requested and the item does not exist.
* Make table-editor recognize returned scalar keys from meta_editor and other link-back sources.
* Add new Class DBI_CompositeKey which allows multiple-key tables to
be used in Interchange in the majority of ways other tables are
used.
Setup is simple. Just use a normal DBI looking table, then
add
Database foo MULTIPLE_KEYS key1 key2 key3
This implies:
Database foo Class DBI_CompositeKey
If you have not already set up the table as a DBI type
(i.e. "Database foo foo.txt dbi:mysql:foobase") then
this will fail.
You should definitely have a COLUMN_DEF for each key. CREATE_SQL
or using NoImport works fine, too.
If you want a unique constraint you have to add it. If you
don't have unique set, you may get anomalous behavior.
-- Keys are passed via arrays, hashes, or null-separation. For
instance:
[data table=foo col=value1 key.0=foo key.1=bar key.2=baz]
[data table=foo col=value1 key.key1=foo key.key2=bar key.key3=baz]
[data table=foo col=value1 key=` join "\0", qw/foo bar baz/`]
All three of the above will return the same thing, as will:
[perl tables=foo]
my $db = $Db{foo};
my @key = qw/foo bar baz/;
my %key = (
key1 => 'foo',
key2 => 'bar',
key3 => 'baz',
);
my $try1 = $db->field(\@key, 'value1');
my $try2 = $db->field(\%key, 'value1');
my $try3 = $db->field( join("\0", @key), 'value1');
if($try1 eq $try2 and $try1 eq $try3) {
return "Access methods returned same value.";
}
else {
return "ERROR: Access methods returned differing values.";
}
[/perl]
-- [import-fields table=foo] works, but the {cleanse} option is
not allowed.
-- [import table=foo ...] works.
-- Exports work.
-- Imports from text files work, i.e. removing .sql file.
-- Table editor works.
-- Flex-select works. There is not as yet a batch delete, but that
should be possible in the future. "Edit keys in sequence" is unlikely
to ever work.
-- Autonumbering and AUTO_SEQUENCE are obviously moot.
-- $db->set_slice(), $db->get_slice work. So does $db->delete_record().
All use the same key types as other access methods.
-- $db->set_row() works, but doesn't do the one-field insert behavior.
Probably a plus. 8-) It should set _Default_ary, but that is not
tested.
weed out duplicates in ui_data_fields originating from bad metadata, causing error in item edit: probable bad form -- number of values min=0 (wholesale) max=2 (sku)
* Allow individual profile checks defined in metadata.
It is defined in the "Help and Check" section of meta_editor.
IMPORTANT: To enable these checks, the ui_profile part of the overall
table definition has to be non-blank. You can just put a comment like
# Enable individual form profile checks
To enforce a profile on a field, set it's check value to a valid
IC profile check. For example, to make sure the length of a field
is between 4 and 10 characters, do:
length 4-10
Or to ensure it looks like a US or Canada postal code
postcode
This results in the following being set in the extended field
of mv_metadata:
{ check => 'postcode' }
If the check has an "=" sign anywhere, the field name is not
prepended. So to do multiple checks, you need to do
SECURITY:
Since the filter or lookup check type can do data lookups and potentially
call routines, we need to have some security. The table-editor tag
sets the scratch value "mv_individual_profile" when a ui_profile
is defined.
WITHOUT TABLE EDITOR:
To use this without the table editor, just set an mv_profile as
normal. Then for each individual check, define in the form:
<input type=text name=foo value="">
<input type=hidden name=mv_individual_profile value="foo=length 1">
That would check the form variable "foo" for a length of 1.
This is automatically done by the [display ...] tag, so you can
do:
[display type=text name=foo check="length 1"]
to do the same thing.
You will need to set the scratch value mv_individual_profile yourself
to enable these.
POSITIONING WITHIN PROFILE:
The facility works by modifying the first mv_form_profile run and
inserts its values either just before the first &fatal=yes or
*after* the first &update=yes, whichever comes first. If neither
are in the profile, they are put first in the profile.
MULTIPLE CHECKS:
If you have multiple mv_form_profile settings, the individual checks
are only run as a part of the first one and are not repeated.
* Add blank_default metadata setting, which is the value a field should
be initialized to (on display) if the current value has a length of 0.
* Remove extended.js_check from meta editor, as that was never implemented.
* Add some labels and help to meta editor.
* Add option "top-buttons-rows" to set the number of rows where top buttons will be triggered. Use said options in appropriate pages.
display top buttoms if option notable is set
* Allow setting of a disabled.param=1 entry so that you can show widgets in a table editor yet not accept data from them. The DISABLED=1 flag will be set in the widget (which normally grays it out) and it will be set to be display_only. * Pass the form and form_name parameters to Vend::Form for use in widgets.
* Make containing form name (i.e. <form name=foo ...>) available to the widget.
* Apply Paul's patch to number of rows thing, which gets multiple row tabs working on the tabbed display if not in ui_style mode.
Merge changes from unstable 5.1 branch in version 1.46.
* Fix missing relocation variables found by Paul.
* Remove stray </A> found by Ton.
* Allow cancel_text to be set when in database edit mode.
* Remove redundancy found by Paul Vinciguerra. * What I hope is the final little thing to make the tabbed-display fully operational with Mozilla 1.5.
* Make tabbed-display relative now that Mozilla supports this. Should make setting html-width and table-width in metadata moot.
* Don't focus on meta links when tabbing through form.
* Add new link_blank_auto setting for table linking. This has the
effect of:
-- Automatically using auto-numbering
-- setting the foreign key column to match the key of the
edited record (as you would have to do to return the row
once entered)
-- Making both those fields hidden and non-changeable.
Supported in UI with a couple of new settings.
* Allow hidden fields to come from all_opts again (was disrupting surveys).
Two patches for lookup_query in mv_metadata: * Substitute for placeholders in query (just like with prepend and append): _UI_TABLE_ _UI_COLUMN_ _UI_KEY_ This allows foreign table lookup queries to be tailored for the record currently being edited in the table editor. * Avoid internal server error if query fails.
* Allow default opening of a particular tab by adding * to the end of the
tab label.
Overridden by explicit "start_at" option given in options/args.
* Further allow focus of editor to start at a particular field if
it is marked with a *.
ui_data_fields => q{
=General
foo
bar
=Specific*
buz
baz*
},
The "Specific" tab will be presented open when the record is edited.
The form focus will be at the "baz" field.
* Fix several things with Table editor
-- Modified passing of {table} parameter in display for table editor,
setting flag to prevent getting table data twice.
-- Make lookup_query honor {db} parameter for selecting base table
for lookup
-- Lookup should now work internally to the table if no {db} spec'd
-- Sigh -- Mozilla screwed up their CSS size passing like MSIE, so
remove special things that made item editor/table editor automatically
look better on Mozilla (without setting *_height and *_width explicitly).
-- Added MAXLENGTH to things you can set in meta_editor
-- Added MAXLENGTH to parameters honored by [display ...]/Vend::Form,
without having to manipulate extra=" maxlength=22" stuff.
-- Put hooks in for auto-JS checks in table editor / [display]
* Other
-- Made default metadata (for merge) match foundation
* Fix sequential edit.
The great copyright, email address, URL, and version update.
removed duplicate hash record
removed duplicate hash record
* Allow override of incomplete form checking -- idea from Dan Browning.
Various changes to Vend::Table::Editor. * Fix bug found by Jon where extra queries were done by Vend::Form due to table and column parameters being passed when not necessary. TODO: Investigate use of table and column at all for Vend::Form -- I think that code is only needed to support the old, old, static option/modifier type of IC, i.e. [item-accessories]. * Add "hidden_all" parameter that allows passing of parameters in links generated by [table-editor]. * Add --none-- option to storage book select, so that you can save the main data without adding to storage book. * Minor language change clarifying "save here only". * Probably final address editing changes prior to hoped-for new address capability Kevin Old is working on.
* Fix "die" and server error when column defined twice in fields-to-edit specification. Do warning instead. * Add ability to pass no-meta=1 parameter (don't show meta links) from CGI or table definition.
* Allow ui_profile to be set from metadata.
avoid code duplication
* Major update to product options. * Options are now modular in much the same way as Vend::Payment is. You can add an unlimited number of option types simply by dropping a module into Vend::Options. * By default, the old 4.8 style options are in force, implemented with Vend::Options::Old48. If you add this to catalog.cfg (in etc/after.cfg in foundation): OptionsEnable option_type The "option_type" names a field in the products file which controls the option type. This enables new-style options. It can also be in a specific table and field, ala AutoModifier: OptionsEnable table:field Indeed, this is added to AutoModifer after catalog.cfg. * There are two new-style options included: Vend::Options::Matrix Vend::Options::Simple These are equivalent to the current matrix and simple options. * Options behavior is controlled in catalog.cfg by a locale-style multiple hash (ala UserDb or Route): Options Matrix sort o_sort,o_group Options Matrix variant_table my_variants * To find and add a new option type, simply set something in catalog.cfg: Options MyOptions table my_options That will cause a require of Vend::Options::MyOptions. * The matrix products have been moved to the "variants" table. * The options table contains options for both Matrix and Simple types, but only fields for building those simple-type options (which are used to generate variants for Matrix). The followign fields have been removed from options: differential mv_shipmode o_enable o_exclude o_footer o_header o_include o_master o_matrix o_modular phantom volume weight * The variants table is a subset of the fields in products. * The admin page for each option style is defined in its admin_page routine, usually an include from inclued/Options/OptionType. * size and color fields removed from products table, option_type added.
* Fix link_rows_blank setting for form linking.
* Fix "admin/bg.gif not found" error * Allow pass of nodelete and mv_auto_export options in URL
updated LINUXIA branch to 4.9 sources in order to use it as testbed again
treat blank templates as if they are empty, so [table-editor ...] [/table-editor] exhibits the same behaviour as [table-editor][/table-editor]
* Major changes to the Interchange output model and UI.
* There will be more commits for menu data.
UI
-------
* Zeald's redesign of the UI layout is almost fully implemented. There
are but a few pages that don't incorporate the new layout.
* Each page can have an entry in mv_metadata, which allows setting
of page titles, display types, menus, and more via database setting.
An editor is provided.
* Virtual UI pages are fully supported. This will allow catalog-specific
UI settings to be transmitted to a catalog with simple database updates.
Each page is simply an entry in mv_metadata.
* The second-level menu can be set either with the page class, as before,
or in the page metadata with $Scratch->{second_menu}.
* There is a third-level menu callable via $Scratch->{third_menu}. There
are few situations where the old "next_line" menu setting causes the
third-level menu -- old menu files should be compatible but where possible
the third-level menu is explicitly specified.
* [table-editor] and [tabbed-display] can now do tabs to the third-level
menus. This provides a very seamless tabbed display that does not
require a page access to change.
* Many changes made to pages to map output to the new template.
* New GPG encryption wizard to make setting up of encryption as close
to painless as I can make it.
* Change to menu editor to incorporate better menu loading.
* New merge_metadata function allows management of new metadata when
updating the UI.
* Many, many minor changes and visual improvements.
* A good deal of documentation about the metadata and table editor
has been written, and those items should be committed soon. Many
of the features are covered.
Core
-----
* Output of the parser is now sent to @Vend::Output, which allows remapping
of the parser output before output by the Server module.
There should be no difference in behavior by default.
Each piece of output is pushed onto an array, and pointers
are maintained as to the name of the output. The default if
the output is not remapped is to go to the $Vend::OutputMap{''} space.
When output is done in non-mapped mode, @Vend::Output is simply
joined and sent.
The behavior diffence comes if you use the Vend::Page::output_cat
routine. It will output the value of a named space.
You can map output with the ITL tag:
[output-to name=foo]
To return to the default space, you use:
[output-to name=""]
To return to the *previous* named space, use:
[output-to]
That is not normally what is wanted, though.
All of the above allows you to map pieces of a page to different named
spaces and unpack them with the [unpack] tag.
This is all perhaps easier illustrated than described -- the illustration
is in the changes to the UI, which map output from the page code to the
template.
* Get restrict_allow settings right -- the default was not allowing the "var" to be expanded in the image preview path. Should probably look at this concept on a per-field basis, and set the default to "". Fixes Bugzilla #475, reported by as@freibergnet.de.
* Properly handle class/style stuff in default output. * This might be wasted motion as templating is about to take another big hit... 8-)
* Add general purpose survey and mailed-form creator for the UI. Puts a customer satisfaction survey in the foundation -- probably should provide a mailed feedback example, too. * Make outdated bin/update command work better. Probably should remove this script, though. * Bring "edit items in sequence" into the Vend::Table::Editor intrinsically. No need now to do the munging of item_id_left on the select page, but still compatible with that (to ease problems for users who have done custom select pages). * Add intro_text option for the table editor so that the first page of a wizard can have some stuff. * Revamp auto-wizard to work with the survey table's mv_metadata structure. Provides several standard output options for wizards. (online help is in process).
Change locale handling.
* Add new directive "ExecutionLocale", which defaults to "C". This is
set before every page so that the daemon cannot be left in a bad locale.
* Changed current default resolution code to always honor a "DefaultLocale"
directive, which existed before but was indirectly set.
* Honor any current "Locale en_US default 1" setting, or its equivalent
in the LocaleDatabase.
* Change old method of setting locales outside of config() routine
to setting them within the config. Default is resolved in the normal
%Default custom routine fashion.
* Change so it only sets defaults from POSIX::localeconv() if specified
specifically with "Locale en_US". Will not do it indirectly, so
MV_LOCALE_NO_DEFAULTS will no longer be necessary.
* Keep track of last locale set, and if the default has not otherwise
been specified explicitly set the default to that.
* Of course still allow default user locale setting with ScratchDefault.
I believe this will be completely compatible with the current setup and
remove ambiguity and possiblity for error.
Some examples:
## Always forces default locale to be de_DE, despite any future
## settings
DefaultLocale de_DE
## A way of setting DefaultLocale indirectly, would be rendered
## meaninngless by the above. Same if done in LocaleDatabase
Locale de_DE default 1
## Set the execution locale to de_DE, so you can put , separated
## numbers in the db -- don't know if this would work
ExecutionLocale de_DE
If two locales have "default" set and no DefaultLocale is specified,
the behavior is undefined, as the first default found will be set
as the default.
* Change form hrefs for [table-editor] so that it does not generate
"process" or "ui" by default. This will allow a URL restriction of
$Config->{VendURL}/admin/ to be effective. TODO: Change the forms in
pages/admin to not use [process].
The methodology is to use mv_nextpage as the form action and set
mv_action to the action, as well as mv_ui if the user is an admin.
* Add mv_ui CGI parameter to cause the 'ui' action to be performed
prior to process. This allows ui handling while still using mv_action.
To be debated -- setting mv_ui by default if $Vend::admin.
* Add handling of yesno_checkbox type so that you don't need to have
two checkboxes with one/zero and "yes/no".
* Add "default_widget" option which allows setting the default widget
for a field if none is specified.
* Fix {SEND} handling for nph output.
* Prevent insertion of $Variable->{MV_AUTOLOAD} on every interpolate_html.
* Allow extended handling of interpolation for append/prepend html
if $opt->{restrict_allow} is set in the table editor.
Fairly major changes which do two types of things.
* Enhance "views".
-- Allow selection of view based on a field (like prod_group),
allows different editor displays for different product types
and many other possiblities.
-- Allow expansion of values in include_forms, or complete ITL.
-- Allow linking of field-specific meta from within the
db_metaconfig editor (convenience). Not enabled by default.
* Change display in UI.
-- You can [set display_class]cssclass[/set] and change the default
display (padding, etc.) in the main content cell.
-- Default changed to 1 padding and left-justify always.
-- Widths changed in select and table-editor.
* Allow passing in of values useful for the "links" widget.
* Major update to order status functions in UI. Much of this is funded thanks to Gary Norton and Broadgap Technologies. * Created new update_order_status.tag usertag which does most of the functions done previously in admin/order_status.html * Order status funky page code replaced with [table-editor version]. * Now can "Shipped checked orders". If you check the ship_auto check box, it will: -- settle CC charge with payment processor if that is needed or wanted -- ship all lines on order -- update all status to shipped -- archive the order * Added following fields to transactions: auth_code -- contains authorization code needed for charge settlement tracking_number -- separate shipping tracking number from status Also updated log_transaction to insert auth_code if available. * Regularized database types for orderline and transactions * Removed unnecessary blank "reports" sampledata for orderline and transaction * Added much metadata for orderline, transactions, and payment settings * Fix auto-encryption of credit card number in Vend::Payment even if no EncryptKey or credit card number. * Modified Vend::Payment::TestPayment to allow testing of charge settlement. * Allow setting link-no-blank=1 in [table-editor] to prevent addition of rows in a linked table for a particular view. * To test out settlement and batch updates with Vend::Payment::TestPayment 1. Uncomment "Require" line in interchange.cfg. 2. Set following payment preferences in Administration->Preferences: MV_PAYMENT_MODE testpayment MV_PAYMENT_ID test SETTLE_TRANSACTION 1 3. Restart, place a new order, and use Order Manager to ship.
* Allow a table to be configured as meta-specific by default.
* Fix problem where empty but defined check would cause profile error for "undefined profile check ''". * Don't bail out for no fields until ui_wizard_fields is parsed.
* Make possible to generate multiple tabbed displays per page by setting different panel_id options. * Change full_interpolate to first in ordered transforms, so that menu entries that need to intepolate ITL do so before menu processing is done.
* Minor things: -- Add some WHATSNEW updates -- Optimize the form_name and form_extra stuff -- Make help_anchor work as in docs
* Fix bug found by Dan Browning where multiple columns of the same name would not display in the same editor, even if different tables. (This is the real fix, the one last night was just an evil twin.)
* Remove the suddenly-regenerated can't-change-variable-database bug that arrived back with all of the extra templates. * Add DirectoryIndex index.html to catalog.cfg. * Add the oft-requested "recompute_transaction" thing for transactions, using the next two features. * Add "include_form" capability for Table::Editor, with the ability to put random widgets in the form. Used in the recompute_transaction thing, via.... * New mv_cleanup facility that is like mv_click and mv_check, but happens after the form processing actions is done.
* Templateable editor. Example:
[table-editor table=products item_id=os28004]
{TOP_OF_FORM}
{HIDDEN_FIELDS}
<table>
<tr>
<td>
Whoa, boy!
</td>
<td>
{COLUMN_description__WIDGET}
</td>
</tr>
<tr>
{COLUMN_comment}
</tr>
<tr>
<td colspan=2>
{:REST}
</td>
<tr>
<td colspan=2>
{BOTTOM_BUTTONS}
</td>
</td>
</table>
{BOTTOM_OF_FORM}
[/table-editor]
The key feature that makes this usable for me is the {:REST},
which plops the rest of the fields in a tabbed display inside
that table cell.
* Allow configuring of link_table with db_metaconfig, example provided
in foundation with transactions table. Only allows one link table --
multiple link tables would need to be configured in via the
extended field or with tag options.
* More bug fixes in table-editor stuff. This thing is really coming along!
* Supply end tags to the table-editor in the page editor. While it works
without it, performance should be better and a stray [/table-editor]
won't cause problems.
* Redo of the meta editors. -- Change all to paneled display -- One meta-editor for all table configuration options, opens to different panels depending on context. -- Remove _meta_ links in meta editors, was always confusing * Change Foundation to no longer need hard-coded __MVC_SAMPLEURL__ etc in mv_metadata.asc. This should solve one of the bigger annoyances in relocating catalogs. * Redo items display metadata. * Minor changes to customer_bill stuff to remove ugly mailto links. * Fix display_only so that works again. * Change ugly, ugly 4.5.5-era admin/add_meta_option page, use table editor instead.
* Starting baby steps on "save all config to meta" which will allow dynamic field configuration and then save of a view. * Allow starting with a particular tab open in a tabbed display. * Export tag_attr_list routine from Interpolate.pm.
* Last preps for complete templatabililty.
-- Now can set all styles for rows and cells in metadata.
-- Titles are handled transparently for tabbed and non-tabbed displays.
-- Can template the different types of rows:
row_template --> The normal data row
combo_template --> The row that is used for user inputted widgets
break_template --> The row for titles
-- Fixed quite a few bugs in row formatting
-- Old row_template styles should be transparently converted to the
new tag_attr_list style
Next stop -- overall_template.
{FORM_INTRO}
<table>
<tr>
<td colspan=2>
{TOP_BUTTONS}
</td>
</tr>
<tr>
{COLUMN_SKU}
{COLUMN_PRICE}
</tr>
{REST}
<tr>
<td colspan=2>
{BOTTOM_BUTTONS}