[interchange-cvs] interchange - heins modified 2 files

interchange-core@icdevgroup.org interchange-core@icdevgroup.org
Fri Apr 4 10:05:01 2003


User:      heins
Date:      2003-04-04 15:04:12 GMT
Modified:  dist/lib/UI/pages/admin menu_loader.html menu_editor.html
Log:
* Fix bug where [l[msort]] screwed up JavaScript.

* Add support for the "Separate Category File" loader.

Revision  Changes    Path
2.3       +142 -0    interchange/dist/lib/UI/pages/admin/menu_loader.html


rev 2.3, prev_rev 2.2
Index: menu_loader.html
===================================================================
RCS file: /var/cvs/interchange/dist/lib/UI/pages/admin/menu_loader.html,v
retrieving revision 2.2
retrieving revision 2.3
diff -u -r2.2 -r2.3
--- menu_loader.html	14 Jan 2003 15:25:42 -0000	2.2
+++ menu_loader.html	4 Apr 2003 15:04:12 -0000	2.3
@@ -43,9 +43,11 @@
 
 	[if !cgi qmenu_products]
 			[cgi name=qmenu_products set=__ProductFiles_0__ hide=1]
+			[cgi name=qmenu_separate set="[either]__DEFAULT_CATEGORY_TABLE__[or]category[/either]" hide=1]
 			[cgi name=qmenu_comb_field set=comb_category hide=1]
 			[cgi name=qmenu_toplevel_field set=prod_group hide=1]
 			[cgi name=qmenu_sublevel_field set=category hide=1]
+			[cgi name=qmenu_sku_field set=sku hide=1]
 	[/if]
 
 [tabbed-display 
@@ -297,6 +299,146 @@
 		</td>
 		<td class=chelp>
 			Use to allow building even if the table is defined as LARGE
+		</td>
+	</tr>
+	<tr>
+		<td class=clabel>
+			&nbsp;
+		</td>
+		<td class=cdata>
+				<input type=submit value="[L]Load Menu[/L]"><br>
+		</td>
+		<td class=chelp>
+			Do menu build
+		</td>
+	</tr>
+</table>
+				
+</form>
+[/tabbed-panel]
+[tabbed-panel Separate Category File]
+<blockquote class=chelp>
+This function loads a tree menu based on the contents of two category fields in a separate table, producing a two-level tree with no leaf items. The menu may be added to after that.
+</blockquote>
+	<form action="[process href=admin/menu_editor]" style="margin-bottom:0px;">
+	<input type=hidden name=mv_session_id value="[data session id]">
+	<input type=hidden name=mv_action value="back">
+	<input type=hidden name=qmenu_load_type value="category_file">
+
+<table width="100%" border=0 cellpadding=4 cellspacing=0>
+	<tr>
+		<td class=clabel>
+		Table
+		</td>
+		<td class=cdata>
+			<select name="qmenu_separate"
+					onChange="
+							populateTable(
+								this.form.qmenu_separate.options,
+								this.form.qmenu_comb_field.options,
+								this.form.qmenu_separate.options[this.form.qmenu_separate.selectedIndex].value
+								);
+							populateTable(
+								this.form.qmenu_separate.options,
+								this.form.qmenu_sort_order.options,
+								this.form.qmenu_separate.options[this.form.qmenu_separate.selectedIndex].value
+								);
+							populateTable(
+								this.form.qmenu_separate.options,
+								this.form.qmenu_toplevel_field.options,
+								this.form.qmenu_separate.options[this.form.qmenu_separate.selectedIndex].value
+								);
+							populateTable(
+								this.form.qmenu_separate.options,
+								this.form.qmenu_sublevel_field.options,
+								this.form.qmenu_separate.options[this.form.qmenu_separate.selectedIndex].value
+								);
+						"
+			size=1 style="width:130px;">
+				[loop list="[list-databases]" option=qmenu_separate cgi=1]
+				<OPTION VALUE="[loop-code]">[loop-code]</OPTION>
+				[/loop]
+			</select>
+		</td>
+		<td class=chelp>
+			Default: pub_category
+		</td>
+	</tr>
+	<tr>
+		<td class=clabel>
+			Top level field
+		</td>
+		<td class=cdata>
+		<select name="qmenu_toplevel_field" style="width:130px;">
+			<option value=""> -- none --
+			[loop list="[db-columns table='[cgi qmenu_products]']" option=qmenu_toplevel_field cgi=1]
+			<option>[loop-code]
+			[/loop]
+		</select>
+		</td>
+		<td class=chelp>
+			Default: prod_group
+		</td>
+ 	</tr>
+	<tr>
+		<td class=clabel>
+			Sub level field
+		</td>
+		<td class=cdata>
+		<select name="qmenu_sublevel_field" style="width:130px;">
+			<option value=""> -- none --
+			[loop list="[db-columns table='[cgi qmenu_products]']" option=qmenu_sublevel_field cgi=1]
+			<option>[loop-code]
+			[/loop]
+		</select>
+		</td>
+		<td class=chelp>
+			Default: category
+		</td>
+ 	</tr>
+	<tr>
+		<td class=clabel>
+			SKU field
+		</td>
+		<td class=cdata>
+		<select name="qmenu_sku_field" style="width:130px;">
+			<option value=""> -- none --
+			[loop list="[db-columns table='[cgi qmenu_products]']" option=qmenu_sku_field cgi=1]
+			<option>[loop-code]
+			[/loop]
+		</select>
+		</td>
+		<td class=chelp>
+			Default: sku<br><br>
+			This field holds the sku of the actual items that are returned in the search.
+		</td>
+ 	</tr>
+	<tr>
+		<td class=clabel>
+			Description field
+		</td>
+		<td class=cdata>
+		<select name="qmenu_desc_field" style="width:130px;">
+			<option value=""> -- none --
+			[loop list="[db-columns table='[cgi qmenu_products]']" option=qmenu_desc_field cgi=1]
+			<option>[loop-code]
+			[/loop]
+		</select>
+		</td>
+		<td class=chelp>
+			Default: <not used><br><br>
+			Use this field to set extra information, for example to sort the items in the order of this field when the search is returned.
+		</td>
+ 	</tr>
+	<tr>
+		<td class=clabel>
+		 Search page
+		</td>
+		<td class=cdata>
+			<input name="qmenu_search_page"  style="width:130px;" value="[either][cgi qmenu_search_page][or]results_tree[/either]">
+		</td>
+		<td class=chelp>
+			Selects page to display search
 		</td>
 	</tr>
 	<tr>



2.20      +7 -2      interchange/dist/lib/UI/pages/admin/menu_editor.html


rev 2.20, prev_rev 2.19
Index: menu_editor.html
===================================================================
RCS file: /var/cvs/interchange/dist/lib/UI/pages/admin/menu_editor.html,v
retrieving revision 2.19
retrieving revision 2.20
diff -u -r2.19 -r2.20
--- menu_editor.html	14 Jan 2003 02:25:50 -0000	2.19
+++ menu_editor.html	4 Apr 2003 15:04:12 -0000	2.20
@@ -8,6 +8,9 @@
 [set page_title]Menu construction[/set]
 [tmpn dhtml_required]1[/tmpn]
 [set ui_class]Design[/set]
+[if cgi qmenu_separate]
+[cgi name=qmenu_products set="[cgi qmenu_separate]" hide=1]
+[/if]
 [if cgi qmenu_name]
 [set page_banner]Edit the <i>[cgi qmenu_name]</i> menu[/set]
 [else]
@@ -105,8 +108,10 @@
 			table => $CGI->{qmenu_products},
 			first_field => $CGI->{qmenu_toplevel_field},
 			second_field => $CGI->{qmenu_sublevel_field},
+			desc_field => $CGI->{qmenu_desc_field},
 			even_large => $CGI->{qmenu_even_large},
-			type => 'tree',
+			sku_field => $CGI->{qmenu_sku_field},
+			type => $CGI->{qmenu_load_type} || 'tree',
 		);
 
 		$CGI->{qmenu_text} = $Tag->menu_load(\%opt);
@@ -976,7 +981,7 @@
 			l[MSORT] = 0;
 		}
 
-		toggle[l[MSORT]] = l[0];
+		toggle[ l[MSORT] ] = l[0];
 
 		out = out + 'border=0 align=absbottom ' +
 				'id="img' + idx + '"></A>' + "\n" +