Up to [Local Repository] / interchange / lib / Vend
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Remove "Test." message that showed up to some users (RT #126).
New Free Software Foundation Address in headers of various files
New Free Software Foundation Address in headers of various files
* Allow setting of link target from menu table
introduced joiner option for old_simple menus without iterator
* Make timeout for menu blank settable (Greg Hanson change).
* Make timeout for menu blank settable (Greg Hanson change).
fix typo
Fix Javascript quoting error.
- XHTML-compliance: - lowercased/quoted HTML tags (all containers, so no ">" vs. "/>" issues)
* 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.
* 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>.
fix problem with unqualified call to interpolate_html
* Add new file-tree capability. This allows rendering of a tree
based on a directory structure.
[menu
menu-type=tree
file-tree=1
link-prepend="do_view/"
directory=foo
/]
Works just like a normal tree, except the tree is built from a
directory structure. Directories are automatically treated as
name-only placeholders, and the filename can be passed off to
another page/URL by setting the link-prepend option.
* Add ability to specify id="$opt->{js_prefix}{CODE}" id so that multiple
menus will work even in "use-file" mode.
* Enhance flyout menus to have a lined-up image indicating a submenu. The parameter is an image name (if not beginning with <) or arbitrary HTML (if first character is <). Use by passing the parameter: submenu_image_right="[var IMAGE_DIR]/right.gif" or submenu_image_left="[image src=asterisk.gif]" or to fake it out with some text: submenu_image_right=| <span style="font-size: smaller !important"> (more)</span> |
* Add code which tells you which is the last row in the menu. Improves ability to add spacers and other HTML formatting.
* Fix ordering so that indication of menu class will work.
allow translation of explode tree / collapse tree in menus
* Fix typo and dangling quote in collapse/explode URL, found by Philip Hempel <pshempel@linuxhardcore.com>.
* Fix bad variable reference.
* Remove IE-specific bounding box code in flyout menus. Turns out that caused absolute positioning problems when the page was scrolled, and that the DOM standard code I developed for Mozilla works just fine on MSIE 6.
* Add cheesy auto_format page/URL detection facility to try and tolerate user-built menus a bit better. In particular, this will recognize a non http: anchored absolute URL and will tolerate anchors in the page name. Called with auto-format=1 as a param.
* Don't add .html if file already has extension...
* Remove inexplicable setting for form.
* Optimization for tree-based menus, allow reliable build with [timed-build]. Example: [timed-build file=tmp/the_tree minutes=10 force=1] [menu name=the_tree menu-type=tree js-prefix=the_tree_ timed=1 ][/menu] [/timed-build] [menu open-script=1 js-prefix="the_tree_"/] This allows the tree to retain its opened status without having to build a different timed-build file for every combination. Now tree and flyout menus should be easily usable in a catalog without worrying about processor power. * Add configurability for the open/collapse/explode variable. Before this, you could only have one tree per page and have it keep the open status. Now: [menu name=foo menu-type=tree js_prefix=foo open_variable=foo_open][/menu] [menu name=bar menu-type=tree js_prefix=bar open_variable=bar_open][/menu] will work for the appropriate menu. (The other will collapse.) TODO: Allow passing of open status between different trees; should be quite possible.
* Add ability for [tree ...] tag to use a file such as that generated
by the UI's menu editor for its tree data. It uses the "code" field
for the subordinate if not otherwise passed, and uses the "msort"
field for the level determination.
Basically scans the lines starting after the one in question and
returns all until level is != the next highest level.
A minimal tree file would be:
msort description
0 Level 0
1 Level 1 subordinate of line=0
2 Level 2 subordinate of line=1
2 Level 2 subordinate of line=1
1 Level 1 subordinate of line=0
1 Level 1 subordinate of line=0
0 Level 0, another entry
1 Level 1 subordinate of line=6
2 Level 2 subordinate of line=7
1 Level 1 subordinate of line=6
* Add support in Menu.pm for file-based trees.
-- If use-file=1 is passed, the file will be found if possible and
used in preference to the database tree.
-- If file=filename.ext is passed, will be used regardless.
* Remove spurious open= parameters from flyout menus.
* Add "items" check to menu to allow showing an entry only if items are in the cart. Works for current cart ($Vend::Items) only.
* Fix flyout menu in anchor-down mode so that second and higher levels flies out right. This prevents problems selection options below the selected one.
* Prevent naming conflicts with automatically-generated menus.
* Don't translate absolute path internal links without protocol. (No WHATSNEW)
updated LINUXIA branch to 4.9 sources in order to use it as testbed again
* Add category-specific image links and toggles for the tree menu. To enable this for toggles, do: [menu menu-type=tree ... specific-image-toggle=N ] Where N is the level (1 == 0) to which you wish to do this. The image for a non-toggled category comes from the tree database field img_up, for a toggled category from img_dn. You can set the base URL for the images with: specific-image-base="__IMAGE_DIR__"; A trailing / is added if not already present. If you wish to allow image anchors for links as well, put the image name in the img_up field and add the parameter: specific-image-link=1 If the image name is not present, the normal "name" field is used. To enable all of this for the example product_tree component, you would have a call of: [menu tree-selector="[control tree_selector Products]" link-class="[control link_class barlink]" link-style="[control link_style]" link-class-open="[control link_class_open]" link-style-open="[control link_style_open font-size: larger;]" link-class-closed="[control link_class_closed]" link-style-closed="[control link_style_closed font-size: larger;]" no-image="[control no_image]" menu-type=tree specific-image-toggle=1 specific-image-base="__IMAGE_DIR__/tree" specific-image-link=1 reparse=0]
* Allow adding another value to the menu data from the option line, allows display of data that comes from the page.
A number of refinements to Menu module. * Passing timed=1 to [menu ...] tag prevents putting session ID and count in URL, allowing timed-build to work well. * first_line and last_line transforms allow you to specify a field to set to trigger the first line or the last line of the menu. This allows the current IC menu structures to work well with menus separated by space. * logical_page feature allows a tab "up" indication in another menu, based on the page of the entry. This allows multi-level tabs to have an "up" indication on different menus. * expand_values_form allows setting of ITL tag values even on multiple form values. Honors [cgi ..], [value ..], and [var ..].
* Fix ordering of open paramter for trees -- it was broken by the new Vend::Util::vendUrl routine.
* Prevent JS errors for Netscape 4.
* Regularize dhtml_tree to match dthml_flyout behavior. * Allow dhtml_flyout and dhtml_tree to delete branches based on transforms. * Adjust tree database types to hold proper "member" field, add metadata for member field.
* 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.
* Make variable and function names remappable (prefixed with mv_ by default)
to 1) avoid namespace collisions with other stuff and 2) allow multiple
trees and flyouts on the same page.
* Add auto-menu feature. If no menu name is passed (basically, you
put [menu] [/menu] in the page), it looks for a menu based on
the page name and directory name. It keeps looking above until
it finds one, then builds a menu out of the first it finds.
This allows a single menu to automatically apply for all pages in
a directory.
Example:
Menus in:
include/menus/about/whoweare.txt
include/menus/about.txt
Pages in question:
pages/about/index.html Gets about.txt for menu
pages/about/who/index.html Gets about/who.txt for menu
pages/about/why/index.html Gets about.txt for menu
* Add logged_in transform, that has three states:
empty Displayed for both non-member and member
1 Displayed for member only
0 Displayed for non-member only
* Change open tree variable to only pass open leaves instead of a
possibly-huge binary string.
* More bug fixes. * Introduced an MSIE positioning problem in my last run -- fixed. * Now can surely limit indications to one when menu_class changes. * dhtml_flyout() now does the two-pass transforms.
* Get rid of chicken-before-egg problem on simple menus -- the indicator was difficult to set and read in one pass. Solved by doing a pass on the list to do transforms, then feed the results to the menu_link routine. Custom iterator routines will have to handle this themselves.
* Add "flydown" menu, with anchor_down=1 parameter. * Fix bug in menu_group transform.
* Fix bug where transforms didn't happen to tree types.
* Fix problem with content-editor tag caused by presence of NoReparse bug when it was developed. * Add product_flyout component to illustrate flyout menu type. * Fix manifest to include the pieces of pages/ord/checkout that were missing.
* Add multi-level flyout menu style. Uses the tree menu type. [menu name=Products link-class=barlink menu-type=flyout flyout-class="categorybar" flyout-style=" padding: 3px; border: 3px solid #996633; "][/menu] Voila. Goes as many levels as you have.
* Certain things need to be done in order. For instance, we need to localize first, then do entities, and then and only then substitute for spaces. Originally this could happen in a random order, so if you had [menu localize=name entities=name nbsp=name ....] the results were unpredictable. * Add indicator_profile transform, which allows indication if a certain profile is run and passed. Allows generation of the wizard-style menu with checkboxes for completion. * Add entities transform which insures description and other things against breaking HTML.
* Don't fail ui_security check if none requested.
Update menu system some more. * Put bottom menu (tables, quicklinks, etc.) in menu system * Update preferences page so always have option of turning off meta links * Update translations where possible to reflect string addition * Make [area ....] pass through links that have a protocol, allows javascript:, http:, etc. links in menuing system * Place mv_ip and mv_increment pointers in rows for menus, so that increment-based conditionals can be done
* Change footer/header behavior so they are parsed for ITL by default.
* Update the Admin menus to be editable via the new menu editor. TODO: remove _edit_ links when not superuser and/or show_meta on. Seems to work pretty transparently.
* Remove dependencies on '&' as the UrlSepChar. * Enhance form_link to accept pre-formatted strings.
* Add the menu transforms and gates.
ui_security if-mm advanced on contents of a field for permission
superuser if field is set, user must be super
full_interpolate These fields get ITL interpolation before substitution, slow
expand_values [var VARNAME] , [cgi var], [value var] work, fast
menu_group Entry shows if field empty or matches regex
indicator Sets {indicated} if variable name set or page matches
depends_on Needs this CGI var set to show
exclude_on Don't show if this CGI var set
All take the form of:
gate_type=menu_field
The contents of "gate_type" specify a menu field which is used to
do the gating.
These features implement the same capability as the current UI menus
have with their custom code. So the typical entry for one of those will
be:
[menu menu-type=simple
superuser=super
depends_on=depends_on
exclude_on=exclude_on
expand_values=page,form,name
indicator=indicator
]
This should provide very fast menuing. It is still quite possible
to write your own custom menus with [loop ...] and such, but the
idea is to make these adaptable enough with enough examples to
mostly get rid of the old.
* More on new menu editor and menu system. It is based around Vend::Menu and the new tag [menu ...], which builds various types of DHTMl and standard HTML menus based on browser type. Two types, "tree" and "simple" are included -- will be adding at least two more, "checklist" and "ui". Also possible is "hover". The menu editor will be able to edit any of the menus. Eventually all UI menus will use this, and a simple menu component (i.e. a link list) can be placed in the public-facing catalog. There is a "product_tree" component to illustrate this, along with menus for the Quicklinks and Accounting menus. The major UI menus will be moved over next. * Move [image] tag into core since it is used by Vend::Menu. * Create variation of attr_list tag which is case-insensitive, allowing UPPERCASE attributes with lowercase rows (easier to read when combined with HTML in lower case). * Allow iterator for list-based tags to be a passed subroutine reference.