[interchange-cvs] interchange - heins modified 7 files

interchange-cvs at icdevgroup.org interchange-cvs at icdevgroup.org
Sun Apr 17 15:38:08 EDT 2005


User:      heins
Date:      2005-04-17 19:38:08 GMT
Modified:  .        MANIFEST
Modified:  dist/lib/UI/pages/admin genfunction.html
Modified:  dist/lib/UI/pages/include/menus Fixed.txt
Modified:  dist/lib/UI/vars UI_STD_HEAD
Added:     dist/lib/UI/pages/include/menus Saved.txt
Added:     dist/lib/UI/profiles save_link
Added:     dist/standard/include/menus Saved.txt
Log:
* Add "Save link" function to the Fixed top line menu. When followed,
  it saves the current page to the Saved menu and sends you to Miscellaneous
  to view the result. Keeps CGI parameters via [history-scan no-session=1]
  and inserts them in the "form" value of the menu entry. Tries to get a
  page title from Scratch, but if set farther down in the page may not
  work just right.

* Change admin/genfunction to display two menus side-by-side, and
  you can set which menu is displayed with a parameter (default
  MiscFunction and Saved).

* Add save_link profile which does the work.

* Modify Fixed menu to include this function.

* Add default blank Saved menu to standard demo (and global include).

Revision  Changes    Path
2.158     +4 -0      interchange/MANIFEST


rev 2.158, prev_rev 2.157
Index: MANIFEST
===================================================================
RCS file: /var/cvs/interchange/MANIFEST,v
retrieving revision 2.157
retrieving revision 2.158
diff -u -r2.157 -r2.158
--- MANIFEST	16 Apr 2005 16:54:15 -0000	2.157
+++ MANIFEST	17 Apr 2005 19:38:07 -0000	2.158
@@ -471,6 +471,7 @@
 dist/lib/UI/pages/admin/reports/order/.access
 dist/lib/UI/pages/admin/reports/order/.autoload
 dist/lib/UI/pages/admin/reports/order/ByAffiliate.html
+dist/lib/UI/pages/admin/reports/order/BySKU.html
 dist/lib/UI/pages/admin/reports/order/Detail.html
 dist/lib/UI/pages/admin/reports/order/Monthly.html
 dist/lib/UI/pages/admin/reports/traffic/.access
@@ -529,6 +530,7 @@
 dist/lib/UI/pages/include/menus/OrderView.txt
 dist/lib/UI/pages/include/menus/Quicklinks.txt
 dist/lib/UI/pages/include/menus/Reports.txt
+dist/lib/UI/pages/include/menus/Saved.txt
 dist/lib/UI/pages/include/menus/Surveys.txt
 dist/lib/UI/pages/include/menus/Tables.txt
 dist/lib/UI/pages/include/menus/Top.txt
@@ -560,6 +562,7 @@
 dist/lib/UI/profiles/order_button_build
 dist/lib/UI/profiles/process_filter
 dist/lib/UI/profiles/recompute_transaction
+dist/lib/UI/profiles/save_link
 dist/lib/UI/ui.cfg
 dist/lib/UI/vars/UI_EDIT_LINK
 dist/lib/UI/vars/UI_JSLIB
@@ -800,6 +803,7 @@
 dist/standard/include/menus/MiscFunction.txt
 dist/standard/include/menus/OrderView.txt
 dist/standard/include/menus/Products.txt
+dist/standard/include/menus/Saved.txt
 dist/standard/include/menus/Top.txt
 dist/standard/include/menus/Untitled.txt
 dist/standard/pages/aboutus.html



2.4       +51 -2     interchange/dist/lib/UI/pages/admin/genfunction.html


rev 2.4, prev_rev 2.3
Index: genfunction.html
===================================================================
RCS file: /var/cvs/interchange/dist/lib/UI/pages/admin/genfunction.html,v
retrieving revision 2.3
retrieving revision 2.4
diff -u -r2.3 -r2.4
--- genfunction.html	25 Jul 2003 22:07:26 -0000	2.3
+++ genfunction.html	17 Apr 2005 19:38:07 -0000	2.4
@@ -6,12 +6,17 @@
 
 <!-- ----- BEGIN REAL STUFF ----- -->
 
+<table align=center width="95%">
+<tr>
+	<td width="50%" valign=top>
+
 <div style="margin-left: 5px">
+[tmp tmp_menu][either][cgi menu][or]MiscFunction[/either][/tmp]
 [tmpn first]1[/tmpn]
 <dl>
 [menu
 	type=simple
-	name=MiscFunction
+	name="[scratch tmp_menu]"
 	inactive=inactive
 	localize=name,description
 	reparse=1]
@@ -37,9 +42,53 @@
 	</dd>
 </dl>
 [if-mm super]
-&#91;[page href=admin/menu_editor form=qmenu_name=MiscFunction]edit</a>&#93;
+&#91;[page href=admin/menu_editor form="qmenu_name=[scratch tmp_menu]"]edit [scratch tmp_menu]</a>&#93;
 [/if-mm]
 </div>
+
+	</td>
+	<td width="50%" valign=top>
+
+<div style="margin-left: 5px">
+[tmp tmp_menu2][either][cgi menu2][or]Saved[/either][/tmp]
+[tmpn first]1[/tmpn]
+<dl>
+[menu
+	type=simple
+	name="[scratch tmp_menu2]"
+	inactive=inactive
+	localize=name,description
+	reparse=1]
+{PAGE:}
+	[if scratch first]
+		[set first][/set]
+	[else]
+		<br>&nbsp;
+		</dd>
+	[/else]
+	[/if]
+	<dt class=titlebox>{NAME?}{NAME}{/NAME?}</dt>
+	<dd>
+	<br>
+{/PAGE:}{PAGE?}
+<a
+	style="font-size: larger"
+	href="{HREF}"{DESCRIPTION?}
+	title="{DESCRIPTION}"{/DESCRIPTION?}>{NAME}</a><br>
+{/PAGE?}
+[/menu]
+	<br>&nbsp;
+	</dd>
+</dl>
+[if-mm super]
+&#91;[page href=admin/menu_editor form="qmenu_name=[scratch tmp_menu2]"]edit [scratch tmp_menu2]</a>&#93;
+[/if-mm]
+</div>
+
+	</td>
+</tr>
+</table>
+		
 <!-- ----- END REAL STUFF ----- -->
 
 @_UI_STD_FOOTER_@



1.2       +5 -4      interchange/dist/lib/UI/pages/include/menus/Fixed.txt


rev 1.2, prev_rev 1.1
Index: Fixed.txt
===================================================================
RCS file: /var/cvs/interchange/dist/lib/UI/pages/include/menus/Fixed.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Fixed.txt	20 Jan 2003 17:37:18 -0000	1.1
+++ Fixed.txt	17 Apr 2005 19:38:07 -0000	1.2
@@ -1,6 +1,7 @@
 code	mgroup	msort	next_line	indicator	exclude_on	depends_on	page	form	name	super	inactive	description	help_name	img_dn	img_up	img_sel	img_icon	url
 001		x001					index		Go to catalog		0							
-002		x002					javascript:window.name = 'mainwindow';window.open('[area admin/quicklinks]','Quicklinks','top=0,left=0,scrollbars,location=no,status=no,toolbar=no,resizable,fullsize=no,width=170,height=700'); void 0		Quicklinks		0	Window with quick links to commonly-used functions						
-003		x003				reconfig	admin/reconfig		Apply Changes		0	Apply changes made to configuration						
-004		x004					admin/login		Log out		0	Log out as an administrator						
-005		x005					javascript:open_help()	Help%20on%20this%20screen	Help		0							
+002		x002					admin/genfunction	mv_click=save_link&mv_action=back&url=[filter op="mac urlencode" interpolate=1][history-scan count=0 no-session=1][/filter]&title=[filter op="mac urlencode" interpolate=1][scratch page_title][/filter]	Save link		0	Save this page in "Saved" menu						
+003		x003					javascript:window.name = 'mainwindow';window.open('http://sam.perusion.com/cgi-bin/found/admin/quicklinks.html?id=LvSNRgSd&mv_pc=1825','Quicklinks','top=0,left=0,scrollbars,location=no,status=no,toolbar=no,resizable,fullsize=no,width=170,height=700'); void 0		Quicklinks		0	Window with quick links to commonly-used functions						
+004		x004				reconfig	admin/reconfig		Apply Changes		0	Apply changes made to configuration						
+005		x005					admin/login		Log out		0	Log out as an administrator						
+006		x006					javascript:open_help()		Help		0	Help on this screen						



1.1                  interchange/dist/lib/UI/pages/include/menus/Saved.txt


rev 1.1, prev_rev 1.0
Index: Saved.txt
===================================================================
code	mgroup	msort	next_line	indicator	exclude_on	depends_on	page	form	name	super	inactive	description	help_name	img_dn	img_up	img_sel	img_icon	url	member
001		x001							Saved links		0								



1.1                  interchange/dist/lib/UI/profiles/save_link


rev 1.1, prev_rev 1.0
Index: save_link
===================================================================
__NAME__ save_link

[calc]
	my $url = $Tag->filter('urldecode', $CGI->{url});
	$url =~ s!^($Config->{VendURL}|$Config->{SecureURL})/?!!;

	my ($page, $form) = split /\?/, $url, 2;

	my $menufile = $Variable->{SAVED_LINKS_FILE} || 'include/menus/Saved.txt';
	if($menufile ne $Tag->filter('filesafe', $menufile)) {
		$Tag->error({ name => save_link, set => "Refuse to save in $menufile"});
		return undef;
	}

	my $file_data = $Tag->file($menufile);

	my $linesep = "\n";
	$file_data =~ m{.*(\r?\n)}
		and $linesep = $1;
	my @lines = split /\r?\n/, $file_data;
	my $hdr = shift @lines;
	my @fields = split /\t/, $hdr;

	my %used;
	my %hash;
	my $code;

	for(@lines) {
		m{^(.*?)\t}
			and $code = $1
			and $used{$code}++;
	}

	$code++;
	$code++ while $used{$code}++;

	my $time = $Tag->time({ body => '%b %e, %Y %H:%M'});
	$hash{name} = $Tag->filter('urldecode', $CGI->{title}) || "$page saved at $time";
	$hash{code} = $code;
	$hash{page} = $page;
	$form =~ s/\&/\r/g;
	$hash{description} = "Saved $page at $time with $form";
	$hash{form} = $form;
	$hash{msort} = "x$code";
	if(! -f $menufile) {
		$Tag->writefile($menufile, $file_data);
	}

	my $newline = join "\t", @hash{@fields};
	$newline .= $linesep;
	$Tag->log( { file => $menufile, type => 'text', body => $newline } );

	return;
[/calc]



2.41      +2 -2      interchange/dist/lib/UI/vars/UI_STD_HEAD


rev 2.41, prev_rev 2.40
Index: UI_STD_HEAD
===================================================================
RCS file: /var/cvs/interchange/dist/lib/UI/vars/UI_STD_HEAD,v
retrieving revision 2.40
retrieving revision 2.41
diff -u -r2.40 -r2.41
--- UI_STD_HEAD	6 Dec 2003 18:26:55 -0000	2.40
+++ UI_STD_HEAD	17 Apr 2005 19:38:07 -0000	2.41
@@ -1,4 +1,4 @@
-## UI Header vars, version: $Id: UI_STD_HEAD,v 2.40 2003/12/06 18:26:55 mheins Exp $
+## UI Header vars, version: $Id: UI_STD_HEAD,v 2.41 2005/04/17 19:38:07 mheins Exp $
 Variable UI_STD_INIT <<EOV
 [calcn]
 	# is this browser able to grok DHTML ?
@@ -121,7 +121,7 @@
 	ui_security=depends_on
 	extra_value.check_publish=`$Scratch->{check_publish}`
 	superuser=super
-	full_interpolate=page
+	full_interpolate=page,form
 	localize="name,description"
 	]
 	<td nowrap>&nbsp;<a href="{HREF}" {CHECK_PUBLISH} title="{DESCRIPTION}" class=toplink>{NAME}</a>&nbsp;</td>{MV_LAST_ROW:}<td>-</td>{/MV_LAST_ROW:}



1.1                  interchange/dist/standard/include/menus/Saved.txt


rev 1.1, prev_rev 1.0
Index: Saved.txt
===================================================================
code	mgroup	msort	next_line	indicator	exclude_on	depends_on	page	form	name	super	inactive	description	help_name	img_dn	img_up	img_sel	img_icon	url	member
001		x001							Saved links		0								








More information about the interchange-cvs mailing list