From 2264a7a2a424b2fe6413c8f91673af5cb51bf974 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Fri, 29 Jul 2005 04:03:12 +0000 Subject: [PATCH] convert to hover help --- lib/WebGUI/Help/ProductManager.pm | 45 ++++++++ lib/WebGUI/Operation/ProductManager.pm | 55 ++++++--- lib/WebGUI/i18n/English/ProductManager.pm | 135 +++++++++++----------- 3 files changed, 153 insertions(+), 82 deletions(-) diff --git a/lib/WebGUI/Help/ProductManager.pm b/lib/WebGUI/Help/ProductManager.pm index 74b6f0b22..b44884d3c 100644 --- a/lib/WebGUI/Help/ProductManager.pm +++ b/lib/WebGUI/Help/ProductManager.pm @@ -71,6 +71,11 @@ our $HELP = { title => 'help edit parameter title', body => 'help edit parameter body', fields => [ + { + title => 'edit parameter name', + description => 'edit parameter name description', + namespace => 'ProductManager', + }, ], related => [ ] @@ -79,6 +84,26 @@ our $HELP = { title => 'help edit option title', body => 'help edit option body', fields => [ + { + title => 'edit option value', + description => 'edit option value description', + namespace => 'ProductManager', + }, + { + title => 'edit option price modifier', + description => 'edit option price modifier description', + namespace => 'ProductManager', + }, + { + title => 'edit option weight modifier', + description => 'edit option weight modifier description', + namespace => 'ProductManager', + }, + { + title => 'edit option sku modifier', + description => 'edit option sku modifier description', + namespace => 'ProductManager', + }, ], related => [ ] @@ -95,6 +120,26 @@ our $HELP = { title => 'help edit variant title', body => 'help edit variant body', fields => [ + { + title => 'price override', + description => 'price override description', + namespace => 'ProductManager', + }, + { + title => 'weight override', + description => 'weight override description', + namespace => 'ProductManager', + }, + { + title => 'sku override', + description => 'sku override description', + namespace => 'ProductManager', + }, + { + title => 'available', + description => 'available description', + namespace => 'ProductManager', + }, ], related => [ ] diff --git a/lib/WebGUI/Operation/ProductManager.pm b/lib/WebGUI/Operation/ProductManager.pm index b7b7fd668..c7f5e52ab 100755 --- a/lib/WebGUI/Operation/ProductManager.pm +++ b/lib/WebGUI/Operation/ProductManager.pm @@ -137,7 +137,7 @@ sub www_editProduct { ); $f->submit; - return _submenu($f->print, 'edit product', 'edit product'); + return _submenu($f->print, 'edit product', 'edit product', 'ProductManager'); } #------------------------------------------------------------------- @@ -189,9 +189,18 @@ sub www_editProductParameter { } $f = WebGUI::HTMLForm->new; - $f->hidden('op', 'editProductParameterSave'); - $f->hidden('parameterId', $parameterId); - $f->hidden('productId', $productId); + $f->hidden( + -name => 'op', + -value => 'editProductParameterSave', + ); + $f->hidden( + -name => 'parameterId', + -value => $parameterId, + ); + $f->hidden( + -name => 'productId', + -value => $productId, + ); $f->readOnly( -label => $i18n->get('parameter ID'), -value => $parameterId, @@ -199,12 +208,13 @@ sub www_editProductParameter { $f->text( -name => 'name', -label => $i18n->get('edit parameter name'), + -hoverHelp => $i18n->get('edit parameter name description'), -value => $session{form}{name} || $parameter->{name}, -maxlength => 64, ); $f->submit; - return _submenu($f->print, 'edit parameter', 'edit parameter'); + return _submenu($f->print, 'edit parameter', 'edit parameter', 'ProductManager'); } #------------------------------------------------------------------- @@ -259,9 +269,18 @@ sub www_editProductParameterOption { } $f = WebGUI::HTMLForm->new; - $f->hidden('op', 'editProductParameterOptionSave'); - $f->hidden('optionId', $optionId); - $f->hidden('parameterId', $session{form}{parameterId}); + $f->hidden( + -name => 'op', + -value => 'editProductParameterOptionSave', + ); + $f->hidden( + -name => 'optionId', + -value => $optionId, + ); + $f->hidden( + -name => 'parameterId', + -value => $session{form}{parameterId}, + ); $f->readOnly( -label => $i18n->get('option ID'), -value => $optionId @@ -269,30 +288,34 @@ sub www_editProductParameterOption { $f->text( -name => 'value', -label => $i18n->get('edit option value'), + -hoverHelp => $i18n->get('edit option value description'), -value => $session{form}{value} || $option->{value}, -maxlength => 64, ); $f->float( -name => 'priceModifier', -label => $i18n->get('edit option price modifier'), + -hoverHelp => $i18n->get('edit option price modifier description'), -value => $session{form}{priceModifier} || $option->{priceModifier}, -maxlength => 11, ); $f->float( -name => 'weightModifier', -label => $i18n->get('edit option weight modifier'), + -hoverHelp => $i18n->get('edit option weight modifier description'), -value => $session{form}{weightModifier} || $option->{weightModifier}, -maxlength => 7, ); $f->text( -name => 'skuModifier', -label => $i18n->get('edit option sku modifier'), + -hoverHelp => $i18n->get('edit option sku modifier description'), -value => $session{form}{skuModifier} || $option->{skuModifier}, -maxlength => 64, ); $f->submit; - return _submenu($f->print, 'edit option', 'edit option'); + return _submenu($f->print, 'edit option', 'edit option', 'ProductManager'); } #------------------------------------------------------------------- @@ -342,26 +365,30 @@ sub www_editProductVariant { $f->float( -name => 'price', -label => $i18n->get('price override'), + -hoverHelp => $i18n->get('price override description'), -value => $variant->{priceOverride} ? $variant->{price} : '' ); $f->float( -name => 'weight', -label => $i18n->get('weight override'), + -hoverHelp => $i18n->get('weight override description'), -value => $variant->{weightOverride} ? $variant->{weight} : '' ); $f->text( -name => 'sku', -label => $i18n->get('sku override'), + -hoverHelp => $i18n->get('sku override description'), -value => $variant->{skuOverride} ? $variant->{sku} : '' ); $f->yesNo( -name => 'available', -label => $i18n->get('available'), + -hoverHelp => $i18n->get('available description'), -value => $variant->{available} ); $f->submit; - return _submenu($f->print, 'edit variant', 'edit variant'); + return _submenu($f->print, 'edit variant', 'edit variant', 'ProductManager'); } #------------------------------------------------------------------- @@ -405,7 +432,7 @@ sub www_editSkuTemplate { $f->submit; $output .= $f->print; - return _submenu($output, 'edit sku composition label', 'edit sku template'); + return _submenu($output, 'edit sku composition label', 'edit sku template', 'ProductManager'); } #------------------------------------------------------------------- @@ -445,7 +472,7 @@ sub www_listProducts { } $output .= ''; - return _submenu($output, 'list products', 'list products'); + return _submenu($output, 'list products', 'list products', 'ProductManager'); } #------------------------------------------------------------------- @@ -507,7 +534,7 @@ sub www_listProductVariants { $output .= WebGUI::Form::submit; $output .= WebGUI::Form::formFooter; - return _submenu($output, 'list variants label', 'list variants'); + return _submenu($output, 'list variants label', 'list variants', 'ProductManager'); } #------------------------------------------------------------------- @@ -571,7 +598,7 @@ sub www_manageProduct { $output .= '
'; } - return _submenu($output, 'manage product', 'manage product'); + return _submenu($output, 'manage product', 'manage product', 'ProductManager'); } 1; diff --git a/lib/WebGUI/i18n/English/ProductManager.pm b/lib/WebGUI/i18n/English/ProductManager.pm index f09caf1d1..a75cfd39c 100644 --- a/lib/WebGUI/i18n/English/ProductManager.pm +++ b/lib/WebGUI/i18n/English/ProductManager.pm @@ -375,22 +375,24 @@ are:

message => q|Parameters define the variables of your product, like 'Color' or 'Size'. A parameter only has a name. This name will also be used for the name of the template variable pointing to this parameter in the -SKU Template.
-
-Name
-

The name of this parameter.
-
-
+SKU Template.

If you add a new parameter, you will be taken to the SKU Template edit screen when you click on 'Save'. This allows you to add this parameter -to the SKU Template of the product.
-
+to the SKU Template of the product.

+ If you edit an existing parameter the SKU Template should be updated automatically and you will be taken back to the Manage product -screen after clicking 'Save'.
|, - lastUpdated => 0, +screen after clicking 'Save'.

+|, + lastUpdated => 1122609076, context => q|The body of the edit parameter help page| }, + + 'edit parameter name description' => { + message => q|The name of this parameter.

|, + lastUpdated => 1122609059, + }, + 'help edit option title' => { message => q|Edit option|, lastUpdated => 0, @@ -398,34 +400,34 @@ screen after clicking 'Save'.
|, }, 'help edit option body' => { message => q|Options are the values a parameter can take, like 'Blue', 'Red' or -'Grey'.
-
-Options consist of several modifiers.
-
-Value
-

The value of this option (ie. 'Blue').
-
-
-Price modifier
-
-
The amount this option adds to the -default price for product variants containig this option.
-
-
-Weight modifier
-
-
The weight this option adds to the -default weight for product variants consisting of this option.
-
-
-SKU modifier
-
-
The value that the template variable of -the parameter this is an option of in the SKU template takes.
-
|, - lastUpdated => 0, +'Grey'.

+Options consist of several modifiers.

+|, + lastUpdated => 1122609429, context => q|The body of the edit option help page| }, + 'edit option value description' => { + message => q|The value of this option (ie. 'Blue').

|, + lastUpdated => 1122609417, + }, + + 'edit option price modifier description' => { + message => q|The amount this option adds to the +default price for product variants containig this option.

|, + lastUpdated => 1122609417, + }, + + 'edit option weight modifier description' => { + message => q|The weight this option adds to the +default weight for product variants consisting of this option.

|, + lastUpdated => 1122609417, + }, + + 'edit option sku modifier description' => { + message => q|The value that the template variable of +the parameter this is an option of in the SKU template takes.

|, + lastUpdated => 1122609417, + }, 'help list variants title' => { message => q|List product variants|, lastUpdated => 0, @@ -472,44 +474,41 @@ button next to the variant you want to edit.
|, message => q|Product variants have their price, weight and SKU automatically generated by WebGUI. Mostly this is exactly what you want, but sometimes you'll want to override one or more of these properties. For -example if you want to discount some variants.
-
+example if you want to discount some variants.

+ This is the place to set those overrides. Form fields that are empty have their value automatically calculated by WebGUI where those that -contain data will set the corresponding property to that value.
-
+contain data will set the corresponding property to that value.

+ If you have overridden a field but want to return it to the generated value simply empty it and WebGUI will regenerate the value for it. -Please note that a field containing only spaces is not empty.
-
-The overrides you can set for a product variant are:
-
-Price override
-
-

Here you can set the price for this -varaint.
-
-
-Weight override
-
-
Here you can set yhe weight of this -variant.
-
-
-SKU override
-
-
Here you can set the SKU of this -variant.
-
-
-Available
-
-
This sets whether this variant is -available for purchase.
-
|, - lastUpdated => 0, +Please note that a field containing only spaces is not empty.

+ +The overrides you can set for a product variant are:

+|, + lastUpdated => 1122609743, context => q|The body of the edit variant help page| }, + 'price override description' => { + message => q|Here you can set the price for this variant.

|, + lastUpdated => 1122609731, + }, + + 'weight override description' => { + message => q|Here you can set yhe weight of this variant.

|, + lastUpdated => 1122609731, + }, + + 'sku override description' => { + message => q|Here you can set the SKU of this variant.

|, + lastUpdated => 1122609731, + }, + + 'available description' => { + message => q|This sets whether this variant is available for purchase.

|, + lastUpdated => 1122609731, + }, + 'help edit sku template title' => { message => q|Edit SKU template|, lastUpdated => 0,