[interchange-cvs] interchange - heins modified 7 files
interchange-core@icdevgroup.org
interchange-core@icdevgroup.org
Tue Aug 6 18:02:59 2002
User: heins
Date: 2002-08-06 22:02:34 GMT
Modified: dist/lib/UI/pages/admin menu_editor.html search_wizard.html
Modified: search_wizard2.html search_wizard3.html
Modified: search_wizard_results.html
Modified: dist/lib/UI/pages/admin/accounting index.html
Modified: dist/lib/UI/pages/admin/reports/traffic ByAffiliate.html
Log:
* Add "create search" button for menu editor. Interfaces to search wizard
and then auto-returns.
* Change pages to use the defined UrlSepChar instead of hard-coded
'&', and note places where that practice is deviated from because
of interfaces to other software.
Revision Changes Path
2.6 +46 -4 interchange/dist/lib/UI/pages/admin/menu_editor.html
rev 2.6, prev_rev 2.5
Index: menu_editor.html
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/interchange/dist/lib/UI/pages/admin/menu_editor.html,v
retrieving revision 2.5
retrieving revision 2.6
diff -u -r2.5 -r2.6
--- menu_editor.html 5 Aug 2002 04:05:40 -0000 2.5
+++ menu_editor.html 6 Aug 2002 22:02:34 -0000 2.6
@@ -475,7 +475,7 @@
return join "\n", @out;
[/perl]
=20
-[restrict enable=3D"perl calc scratch loop image" log=3Dnone]
+[restrict enable=3D"perl calc scratch loop image area" log=3Dnone]
[loop head-skip=3D1 lr=3D1 list=3D"[scratch qmenu_data]"][loop-sub jsline]
sub {
$loopname =3D shift;
@@ -683,7 +683,7 @@
parms =3D parms.replace(/=3D/g, "-_EQUAL_X_-");
parms =3D parms.replace(/\n/g, "-_NEWLINE_X_-");
parms =3D escape(parms);
- parms =3D parms.replace(/-_NEWLINE_X_-/g, '&');
+ parms =3D parms.replace(/-_NEWLINE_X_-/g, '@@UrlJoiner@@');
parms =3D parms.replace(/-_EQUAL_X_-/g, '=3D');
// alert("parms=3D" + parms);
return parms;
@@ -692,7 +692,7 @@
function unescapeParams (parms) {
// alert("parms=3D" + parms);
parms =3D parms.replace(/=3D/g, "-_EQUAL_X_-");
- parms =3D parms.replace(/&/g, "-_NEWLINE_X_-");
+ parms =3D parms.replace(/@@UrlJoiner@@/g, "-_NEWLINE_X_-");
parms =3D unescape(parms);
parms =3D parms.replace(/-_NEWLINE_X_-/g, "\n");
parms =3D parms.replace(/-_EQUAL_X_-/g, '=3D');
@@ -879,6 +879,10 @@
if(l !=3D undefined && l[CHECK] =3D=3D 1)
checkcur =3D idx;
// alert("idx=3D" + idx + ", writing " + out);
+ if(lines.length > 25)=20
+ document.getElementById('scrollbox').style.overflow =3D 'scroll';
+ if(lines.length < 25)=20
+ document.getElementById('scrollbox').style.overflow =3D 'visible';
return;
}
=20
@@ -934,6 +938,10 @@
if(l !=3D undefined && l[CHECK] =3D=3D 1)
checkcur =3D idx;
// alert("idx=3D" + idx + ", writing " + out);
+ if(lines.length > 25)=20
+ document.getElementById('scrollbox').style.overflow =3D 'scroll';
+ if(lines.length < 25)=20
+ document.getElementById('scrollbox').style.overflow =3D 'visible';
return;
}
=20
@@ -1391,6 +1399,19 @@
return;
}
=20
+ function search_win () {
+ window.name =3D 'mainwindow[scratch window_name]';
+ var url =3D '[area
+ href=3D"admin/search_wizard"
+ form=3D|
+ ui_source_form=3Dqmenuform
+ ui_source_var=3Dparams
+ |]';
+ url +=3D '&ui_searchblob=3D' + escape(form.params.value);
+ window.open(url, undefined, 'scrollbars,location=3Dno,status=3Dno,toolb=
ar=3Dno,resizable,fullsize=3Dno,width=3D900,height=3D700');
+ return void(0);
+ }
+
function motion (idx, motion, fromchecked) {
=20
if(motion =3D=3D 'left' || motion =3D=3D 'right') {
@@ -1523,6 +1544,12 @@
<table width=3D"95%">
<tr>
<td width=3D"40%" valign=3Dtop>[set empty][/set]
+ <div id=3Dscrollbox style=3D"
+ width: 100%;
+ height: 800px;
+ overflow: auto;
+ border: 1pt gray shaded;
+ ">
[loop head-skip=3D1 lr=3D1 list=3D"[scratch qmenu_data]"][list]<div id=3Db=
ox[loop-increment] style=3D"font-size: 11pt; width=3D300px;"></div>
[/list][no-match][set empty]1[/set][/no-match]
[/loop]
@@ -1536,6 +1563,7 @@
[/if]
[/loop-change 1]</div>
[/loop]
+ </div>
</td>
<td valign=3Dtop>
<table>
@@ -1557,7 +1585,21 @@
</tr>
<tr>
<td class=3Dclabel>
- Form values
+ Form values<br>
+ <input name=3Dui_searchblob type=3Dhidden value=3D"">
+ <input name=3Dui_source_win type=3Dhidden value=3D"[scratch window_nam=
e]">
+
+ <div align=3Dright>
+ <input
+ style=3D"font-size: smaller; font-weight: bold;"
+ type=3Dbutton
+ value=3D"Create search"
+ onClick=3D"this.form.page.value =3D 'search';form_changed(1);search_wi=
n();"
+ > <input
+ style=3D"font-size: smaller;"
+ type=3Dbutton onClick=3D"this.form.params.value=3D''"
+ value=3D"clear search">
+ </div>
</td>
<td class=3Dcdata>
<textarea cols=3D50 rows=3D4 name=3Dparams onChange=3D"form_changed(1)=
;"></textarea>
2.4 +2 -0 interchange/dist/lib/UI/pages/admin/search_wizard.html
rev 2.4, prev_rev 2.3
Index: search_wizard.html
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/interchange/dist/lib/UI/pages/admin/search_wizard.html,v
retrieving revision 2.3
retrieving revision 2.4
diff -u -r2.3 -r2.4
--- search_wizard.html 1 May 2002 20:55:47 -0000 2.3
+++ search_wizard.html 6 Aug 2002 22:02:34 -0000 2.4
@@ -230,6 +230,8 @@
<FORM NAME=3Dsearch_wizard ACTION=3D"[process]" METHOD=3DGET>
<INPUT TYPE=3Dhidden NAME=3Dmv_todo VALUE=3Dback>
<INPUT TYPE=3Dhidden NAME=3Dui_target VALUE=3D"[cgi ui_target]">
+<INPUT TYPE=3Dhidden NAME=3Dui_source_form VALUE=3D"[cgi ui_source_form]">
+<INPUT TYPE=3Dhidden NAME=3Dui_source_var VALUE=3D"[cgi ui_source_var]">
[return-to]
=20
<P>
2.1 +2 -0 interchange/dist/lib/UI/pages/admin/search_wizard2.html
rev 2.1, prev_rev 2.0
Index: search_wizard2.html
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/interchange/dist/lib/UI/pages/admin/search_wizard2.html,v
retrieving revision 2.0
retrieving revision 2.1
diff -u -r2.0 -r2.1
--- search_wizard2.html 18 Jul 2001 02:22:00 -0000 2.0
+++ search_wizard2.html 6 Aug 2002 22:02:34 -0000 2.1
@@ -149,6 +149,8 @@
<INPUT TYPE=3Dhidden NAME=3Dmv_todo VALUE=3Dback>
<INPUT TYPE=3Dhidden NAME=3Dcurrent_column VALUE=3D"[value current_column]=
">
<INPUT TYPE=3Dhidden NAME=3Dui_target VALUE=3D"[cgi ui_target]">
+<INPUT TYPE=3Dhidden NAME=3Dui_source_form VALUE=3D"[cgi ui_source_form]">
+<INPUT TYPE=3Dhidden NAME=3Dui_source_var VALUE=3D"[cgi ui_source_var]">
[return-to]
<P>
<table __UI_T_PROPERTIES__>
2.1 +2 -0 interchange/dist/lib/UI/pages/admin/search_wizard3.html
rev 2.1, prev_rev 2.0
Index: search_wizard3.html
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/interchange/dist/lib/UI/pages/admin/search_wizard3.html,v
retrieving revision 2.0
retrieving revision 2.1
diff -u -r2.0 -r2.1
--- search_wizard3.html 18 Jul 2001 02:22:00 -0000 2.0
+++ search_wizard3.html 6 Aug 2002 22:02:34 -0000 2.1
@@ -137,6 +137,8 @@
<INPUT TYPE=3Dhidden NAME=3Dmv_todo VALUE=3Dback>
<INPUT TYPE=3Dhidden NAME=3Dcurrent_column VALUE=3D"[value current_column]=
">
<INPUT TYPE=3Dhidden NAME=3Dui_target VALUE=3D"[cgi ui_target]">
+<INPUT TYPE=3Dhidden NAME=3Dui_source_form VALUE=3D"[cgi ui_source_form]">
+<INPUT TYPE=3Dhidden NAME=3Dui_source_var VALUE=3D"[cgi ui_source_var]">
[return-to]
<P>
<table __UI_T_PROPERTIES__>
2.1 +27 -0 interchange/dist/lib/UI/pages/admin/search_wizard_resu=
lts.html
rev 2.1, prev_rev 2.0
Index: search_wizard_results.html
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/interchange/dist/lib/UI/pages/admin/search_wizard_result=
s.html,v
retrieving revision 2.0
retrieving revision 2.1
diff -u -r2.0 -r2.1
--- search_wizard_results.html 18 Jul 2001 02:22:00 -0000 2.0
+++ search_wizard_results.html 6 Aug 2002 22:02:34 -0000 2.1
@@ -170,6 +170,7 @@
$page .=3D "\tsearch=3D$qchar\n\t\t";
$page .=3D join "\n\t\t", @string;
$page .=3D "\n\t$qchar\n]";
+ $Scratch->{search_blob} =3D join "\r", grep /^\s*\w+=3D/, @string;
$Scratch->{search_page} =3D $page;
$Scratch->{rows} =3D scalar(@string) + 5;
return;
@@ -192,6 +193,32 @@
=20
<FORM>
<TEXTAREA COLS=3D80 ROWS=3D"[scratch rows]" NAME=3Djunk>[scratch search_pa=
ge]</TEXTAREA>
+<br>
+[if cgi ui_source_form]
+[and cgi ui_source_var]
+<script>
+ var par =3D window.opener;
+ function send_to (caller) {
+ if(par =3D=3D undefined) {
+ alert("par is " + f);
+ return;
+ }
+ var f =3D par.document.[cgi ui_source_form].[cgi ui_source_var];
+ if(f =3D=3D undefined) {
+ alert("f is " + f);
+ }
+ else {
+ caller.value =3D 'Sending to [cgi ui_source_form].[cgi ui_source_var]';
+ f.value =3D [jsq interpolate=3D1][scratch search_blob][/jsq];
+ }
+ window.close();
+ }
+
+ if(par)
+ document.write('<input style=3D"font-weight: bold" type=3Dbutton onClick=
=3D"send_to(this); window.close()" value=3D"Send back to source">');
+
+</script>
+[/if]
</FORM>
=20
<A HREF=3D"[scratch name=3Dsearch_page interpolate=3D1]" TARGET=3Dtest>Tes=
t</A>
1.2 +1 -0 interchange/dist/lib/UI/pages/admin/accounting/index.h=
tml
rev 1.2, prev_rev 1.1
Index: index.html
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/interchange/dist/lib/UI/pages/admin/accounting/index.htm=
l,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- index.html 3 Aug 2002 19:41:43 -0000 1.1
+++ index.html 6 Aug 2002 22:02:34 -0000 1.2
@@ -24,6 +24,7 @@
"login=3D$user",
"path=3D$path",
);
+ # Leave this as & instead of UrlJoiner for SQL-Ledger
$Scratch->{sl_parms} =3D join "&", @parms;
$Scratch->{tmp_url} =3D
$def . "?" . "$Scratch->{sl_parms}&password=3D$pass&action=3DLogin";
2.2 +1 -0 interchange/dist/lib/UI/pages/admin/reports/traffic/By=
Affiliate.html
rev 2.2, prev_rev 2.1
Index: ByAffiliate.html
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/interchange/dist/lib/UI/pages/admin/reports/traffic/ByAf=
filiate.html,v
retrieving revision 2.1
retrieving revision 2.2
diff -u -r2.1 -r2.2
--- ByAffiliate.html 5 Dec 2001 23:44:28 -0000 2.1
+++ ByAffiliate.html 6 Aug 2002 22:02:34 -0000 2.2
@@ -204,6 +204,7 @@
$visit_by_aff_by_day{$_->[0]}{$_->[5]}++;
}
=20
+ # Leave this at & instead of UrlJoiner because of Vend::Track
my (@items) =3D split /\&/, $_->[6];
foreach $it (@items) {
my($tag, $val) =3D split /=3D/, $it, 2;