From: Will Budicm Date: Wed, 26 Aug 2020 02:54:03 +0000 (+1000) Subject: Implemented RTF View, not tested. X-Git-Url: https://lifelog.hopto.org/gitweb/?a=commitdiff_plain;h=3541fdb03c09810fbd8d037e48bd7bbc814d2d75;p=LifeLog.git Implemented RTF View, not tested. --- diff --git a/htdocs/cgi-bin/main.cgi b/htdocs/cgi-bin/main.cgi index 2f18a60..5c4e3e6 100755 --- a/htdocs/cgi-bin/main.cgi +++ b/htdocs/cgi-bin/main.cgi @@ -65,6 +65,7 @@ my $prm_vc = $cgi->param("vc"); my $prm_vc_lst = $cgi->param("vclst"); my $prm_xc = $cgi->param("xc"); my $prm_xc_lst = $cgi->param("xclst"); +my $prm_rtf = $cgi->param("vrtf"); my $rs_dat_from = $cgi->param('v_from'); my $rs_dat_to = $cgi->param('v_to'); my $rs_prev = $cgi->param('rs_prev'); @@ -271,6 +272,8 @@ qq(
#We use js+perl, trickery to filter by amount type, as well. if ($prm_aa >0){my $s = $prm_aa - 1;$prm_aa = " AFLAG=$s AND";}else{$prm_aa=""} + $stmS .= " ID_RTF>0 AND" if($prm_rtf==1); + if ( $rs_keys && $rs_keys ne '*' ) { my @keywords = split / /, $rs_keys; @@ -313,8 +316,7 @@ qq( } } elsif ($prm_vc) { - - + if(@vc_lst){ foreach (@vc_lst){ $stmS .= " ID_CAT=$_ OR"; @@ -370,7 +372,7 @@ qq( my $id = 0; my $log_start = index $sqlVWL, "<="; my $re_a_tag = qr/.*<\/a>/si; - my $isInViewMode = rindex ($sqlVWL, 'PID<=') > 0 || rindex ($sqlVWL, 'ID_CAT=') > 0 || $prm_aa || rindex ($sqlVWL, 'REGEXP')>0; + my $isInViewMode = rindex ($sqlVWL, 'PID<=') > 0 || rindex ($sqlVWL, 'ID_CAT=') > 0 || $prm_aa || rindex ($sqlVWL, 'REGEXP')>0 || $prm_rtf; toBuf $cgi->pre("###[Session PARAMS->isV:$isInViewMode|vc=$prm_vc|xc=$prm_xc|aa: $prm_aa|xc_lst=$prm_xc_lst|\@xc_lst=@xc_lst|keepExcludes=".&Settings::keepExcludes."] -> ".$sqlVWL) if $DEBUG; @@ -727,8 +729,10 @@ if ( $log_rc == 0 ) { Search Failed to Retrive any records on keywords: [$rs_keys]$criter!); } else { - if ($isInViewMode) { $log_output .= 'You have reached the end of the data view!' } - else{ $log_output .= 'Database is New or Empty!'} + if ($isInViewMode) { + if($prm_rtf){$log_output .= 'No RTF records found matching criteria.'} + else {$log_output .= 'You have reached the end of the data view!'} + }else{ $log_output .= 'Database is New or Empty!'} } } @@ -899,6 +903,10 @@ $log_output .= qq( $aopts   +   + + View RTF Logs:  +   diff --git a/htdocs/cgi-bin/wsrc/main.js b/htdocs/cgi-bin/wsrc/main.js index adce212..ee96214 100644 --- a/htdocs/cgi-bin/wsrc/main.js +++ b/htdocs/cgi-bin/wsrc/main.js @@ -753,6 +753,10 @@ function display(desc, times){ pnl.fadeOut(1000*times); } +function viewRTFLogs(btn){ + $("#vrtf").val(1); +} + function viewByAmountType(btn) { var aa = $("#amf2 option:selected"); aa.val(parseInt(aa.val())+1);