[interchange-cvs] interchange - thunder modified 2 files
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Fri Jul 6 09:54:35 EDT 2007
User: thunder
Date: 2007-07-06 13:54:34 GMT
Modified: . WHATSNEW-5.5
Modified: dist/lib/UI/pages/admin quick_question.html
Log:
fix test for existing sku while entering new item in Admin UI (#17)
Revision Changes Path
1.39 +3 -0 interchange/WHATSNEW-5.5
rev 1.39, prev_rev 1.38
Index: WHATSNEW-5.5
===================================================================
RCS file: /var/cvs/interchange/WHATSNEW-5.5,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- WHATSNEW-5.5 6 Jul 2007 11:48:19 -0000 1.38
+++ WHATSNEW-5.5 6 Jul 2007 13:54:34 -0000 1.39
@@ -130,6 +130,9 @@
* Tidied up some code in customer_mailing.html
+* Fixed test to see if sku exists on creation of new item
+ in quick_question.html (#17)
+
Standard demo
-------------
2.2 +40 -14 interchange/dist/lib/UI/pages/admin/quick_question.html
rev 2.2, prev_rev 2.1
Index: quick_question.html
===================================================================
RCS file: /var/cvs/interchange/dist/lib/UI/pages/admin/quick_question.html,v
retrieving revision 2.1
retrieving revision 2.2
diff -u -r2.1 -r2.2
--- quick_question.html 7 Nov 2002 19:15:55 -0000 2.1
+++ quick_question.html 6 Jul 2007 13:54:34 -0000 2.2
@@ -1,22 +1,48 @@
+[comment]
+This page is being used on 'Items -> Create new item'. It is loaded in an
+iframe which informs the user whether or not a SKU is already existing.
+
+mv_metadata.asc contains a block of code which calls this page using an area
+tag with a couple of attributes. mv_metadata.asc has no love for newlines,
+but the area tags needs them to separate the attributes. Below calc block
+separates out the attributes so they can be parsed later on.
+[/comment]
+
+[calc]
+ my $tempcgi = $CGI->{type};
+ my @tempcgiarr = split(/\s{2,}/,$tempcgi);
+ my ($var,$val);
+
+ foreach my $arr_elem (@tempcgiarr) {
+ if (!($arr_elem =~ /\=/)) {
+ $CGI->{type} = $arr_elem; #only type should have no = as we split on it
+ }
+ ($var,$val) = split(/\=/,$arr_elem);
+ $CGI->{$var} = $val;
+ }
+ return "";
+[/calc]
+
<html>
<head>
<title>Quick question</title>
-<body style="[cgi name=style filter=entities]">
+<body style="[cgi name=style filter=entities]" margintop="0" marginleft="0">
[tmp litmus][if type="[cgi type]" term="[cgi term]"]1[/if][/tmp]
[calc]
- my $yes = $CGI->{yes} || errmsg('Yes');
- my $no = $CGI->{no} || errmsg('No');
- if($CGI->{yes_style}) {
- $CGI->{yes_style} =~ $Tag->filter('entities', $CGI->{yes_style});
- $yes = qq{<span style="$CGI->{yes_style}">$yes</span>};
- }
- if($CGI->{no_style}) {
- $CGI->{no_style} =~ $Tag->filter('entities', $CGI->{no_style});
- $yes = qq{<span style="$CGI->{no_style}">$no</span>};
- }
- my $status = $Scratch->{litmus};
- $status = ! $status if $CGI->{reverse};
- return $status ? $yes : $no;
+ my $yes = $CGI->{yes} || errmsg('Yes');
+ my $no = $CGI->{no} || errmsg('No');
+ if($CGI->{yes_style}) {
+ $CGI->{yes_style} =~ $Tag->filter('entities', $CGI->{yes_style});
+ $yes = qq{<span style="$CGI->{yes_style}">$yes</span>};
+ }
+ if($CGI->{no_style}) {
+ $CGI->{no_style} =~ $Tag->filter('entities', $CGI->{no_style});
+ $yes = qq{<span style="$CGI->{no_style}">$no</span>};
+ }
+ my $status = $Scratch->{litmus};
+ $status = ! $status if $CGI->{reverse};
+ return $status ? $yes : $no;
[/calc]
</body>
</html>
+
More information about the interchange-cvs
mailing list