}
my $cgi = CGI->new();
+
my $session = CGI::Session->new("driver:File",$cgi, {Directory=>&Settings::logPath, SameSite=>'Lax'});
my $sssCreatedDB = $session->param("cdb");
my $sid=$session->id();
my ($css,$colBG,$colSHDW) = (Settings::theme('css'),Settings::theme('colBG'),Settings::theme('colSHDW'));
print $cgi->header(-expires=>"0s", -charset=>"UTF-8", -cookie=>$cookie);
print $cgi->start_html(
+ -dtd=>"html",
-title => "Personal Log Login",
# -BGCOLOR => $colBG,
- -script=> [ {-type => 'text/javascript', -src => 'wsrc/main.js'},
- {-type => 'text/javascript', -src => 'wsrc/feeds.js'},
+ -script=> [ {-type => 'text/javascript', -src => 'wsrc/main.js'},
+ {-type => 'text/javascript', -src => 'wsrc/feeds.js'},
{-type => 'text/javascript', -src => 'wsrc/jquery.js'},
{-type => 'text/javascript', -src => 'wsrc/jquery-ui.js'}],
-style => [
{-type => 'text/css', -src => 'wsrc/feeds.css'},
{-type => 'text/css', -src => 'wsrc/jquery-ui.css'},
{-type => 'text/css', -src => 'wsrc/jquery-ui.theme.css'},
- {-type => 'text/css', -src => $css}
+ {-type => 'text/css', -src => $css}
],
-onload => "onBodyLoadGeneric()"
);
- my @ht = split(m/\s/,`hostname -I`);
- my $hst = "";
- $hst = `hostname` . "($ht[0])" if (@ht);
+ my @ht = (`hostname -I` =~ m/(.*)\s/g);
+ my $host = `hostname`; $host =~ s/\s*$//g; $host .= "($ht[0])" if (@ht);
$frm = <<HTML;
<form id="frm_login" action="login_ctr.cgi" method="post" style="filter: drop-shadow(10px 8px 5px #3e6f70);">
<table border="0" width="50%"
style="opacity: 1; box-sizing: border-box; margin-bottom: 5px; box-shadow: 5px 5px 5px $colSHDW;">
<tr class="r0">
- <td colspan="3"><h23 id="lifelog_head">Welcome to Life Log</h3></td>
+ <td colspan="3"><h3 id="lifelog_head">Welcome to Life Log</h3></td>
</tr>
<tr class="r1">
<td align="right">Alias:</td><td><input type="text" name="alias" value="$alias"/></td><td></td>
Make sure you note down your password.</span>
<input type="hidden" name="CGISESSID" value="$sid"/>
<input type="hidden" name="login" value="1"/></td></tr>
- <tr class="r0"><td colspan="2">Host -> <b>$hst</b></td><td><input type="submit" value="Login"/></td></tr>
+ <tr class="r0"><td colspan="2">Host -> <b>$host</b></td><td><input type="submit" value="Login"/></td></tr>
</table></form>
HTML
- print qq(<DIV class="content"><a name="top"/>
- <br>
- <div id="menu_page" style="margin-left: 85vw;">
- <span class="menu_head">
-
- <a id="to_bottom" href="#bottom" title="Go to bottom of page.">
- <span class="ui-icon ui-icon-arrowthick-1-s" style="float:none;"></span></a>
- <span class="menu_title"> Menu </span>
- <a id="to_top" href="#top" title="Go to top of page.">
- <span class="ui-icon ui-icon-arrowthick-1-n" style="float:none;"></span></a>
-
- </span>
- <hr>
- <a class="ui-button ui-corner-all ui-widget" href="index.cgi">Index</a><hr>
- <a class="a_" onclick="return demoLogin()">Demo</a><hr>
- <a class="a_" onclick="return fetchFeeds()">Feeds</a><hr>
- <a class="a_" onclick="return contactForm()">Contact</a><hr>
+ print qq(
+<DIV class="content"><a name="top"><br></a>
+ <div id="menu_page" style="margin-left: 85vw;display: none;">
+ <span class="menu_head">
+
+ <a id="to_bottom" href="#bottom" title="Go to bottom of page.">
+ <span class="ui-icon ui-icon-arrowthick-1-s" style="float:none;"></span></a>
+ <span class="menu_title"> Menu </span>
+ <a id="to_top" href="#top" title="Go to top of page.">
+ <span class="ui-icon ui-icon-arrowthick-1-n" style="float:none;"></span></a>
+
+ </span>
+ <hr>
+ <a class="ui-button ui-corner-all ui-widget" href="index.cgi">Index</a><hr>
+ <a class="a_" onclick="return demoLogin()">Demo</a><hr>
+ <a class="a_" onclick="return fetchFeeds()">Feeds</a><hr>
+ <a class="a_" onclick="return contactForm()">Contact</a><hr>
+ </div>
+ <div class="rz login">
+ $frm
+ <br>
+ <a href="https://github.com/wbudic/LifeLog" target="_blank" style="font-size:small">
+ <div style="display: inline-block; vertical-align: middle; text-align: center; width:50%; opacity: 0.8;">
+ <div style="display:table-cell; height:20px; vertical-align: middle;">
+ <img src="wsrc/images/pingy.svg" height="30px" style="filter: drop-shadow(10px 10px 5px #3e6f70);"> LifeLog v.).Settings::release().qq(
</div>
- <div class="rz login">
- $frm
- <br>
- <a href="https://github.com/wbudic/LifeLog" target="_blank" style="font-size:small">
- <div style="display: inline-block; vertical-align: middle; text-align: center; width:50%; opacity: 0.8;">
- <div style="display:table-cell; height:20px; vertical-align: middle;">
- <img src="wsrc/images/pingy.svg" height="30px" style="filter: drop-shadow(10px 10px 5px #3e6f70);"> LifeLog v.).Settings::release().qq(</a>
- </div>
- </div>
- <br>
- </div><a name="feed_top"/>
- <a id="rss_anchor"></a>
- <div id="feeds" class="rz" style="width:60% !important;visibility:hidden">RSS</div>
- <a name="bottom"/>
- </DIV>
+ </div>
+ </a>
+ <br>
+ </div><a name="feed_top"></a>
+ <a id="rss_anchor"></a>
+ <div id="feeds" class="rz" style="width:60% !important;visibility:hidden">RSS</div>
+ <a name="bottom"></a>
+</DIV>
);
Settings::printDebugHTML($DBG) if Settings::debug();
print $cgi->end_html;
Source : https://github.com/wbudic/LifeLog
Open Source Code License -> https://github.com/wbudic/PerlCNF/blob/master/ISC_License.md
=cut copyright
-
<input type="submit" value="Search"/></td></tr>
</TABLE>
</form>
+<span id="cat_desc" name="cat_desc"><img src="wsrc/images/Wedges-9.1s-64px.png" style="height: 46px;"/><div><br>Please Wait...</div></span>
HTML
}
<button type="button" onclick="return setNow();">Now</button>
<button type="reset" onclick="setNow();resetDoc(); return true;">Reset</button>
-
-
- <span id="cat_desc" name="cat_desc"><br>Please Wait...<img src="images/Wedges-9.1s-64px.png"></span>
-
Category:
-
<button data-dropdown="#dropdown-standard" style="margin: 0px; padding: 0;">
<span id="lcat" class="ui-button"> <i><font size=1>--Select --</font> </i></span>
« </button>
</td>
</tr>
<tr class="collpsd" style="text-align:right; vertical-align:top;">
- <td>Amount:</td></span>
+ <td>Amount:</td>
<td id="al">
<input id="am" name="am" type="text">
Marks as:
<a id="menu_close" href="#"><span class="ui-icon ui-icon-heart" style="float:none;"></span></a>
</div>
<hr>
- <a id="Log_btn" class="a_" onclick="return toggle('#div_log',true, '#el');" title="Click to enter a log.">Log</a><br>
+ <a id="Log_btn" class="a_" onclick="return toggle('#div_log',true, '#el');" title="Click to enter a log.">Log</a><br><br>
<div class="nav_data">
<a href="#" title="TOP" onclick="return submitTop();"><span class="ui-icon ui-icon-triangle-1-w" style="float:none;"></span></a>
<a href="#" title="PREVIOUS" onclick="return submitPrev($log_rc_prev, $rec_limit);"><span class="ui-icon ui-icon-arrowthick-1-w" style="float:none;"></span></a>
toBuf (
qq(
$sideMenu
-<DIV class="content">
-<a id="top" name="top"></a>
+<DIV class="content"><a id="top" name="top"></a>
<div id="div_log">$frm</div>
$quill
<div id="div_srh">$srh</div>
<div id="div_hlp">$help</div>
+
<div>\n$log_output\n</div><br>
$tail
</DIV>
print $cgi->header( -expires => "+0s", -charset => "UTF-8" );
print $cgi->start_html(
+ -dtd=>"html",
-title => "Personal Log Login",
-BGCOLOR => Settings::theme('colBG'),
-script =>{ -type => 'text/javascript', -src => 'wsrc/main.js' },
#Bug 26 -Fixed here by prefixing to collected html body buffer.
$BUFFER = $cgi->start_html(
+ -dtd=>"html",
-title => "Personal Log",
-BGCOLOR => Settings::theme('colBG'),
-onload => "onBodyLoad('$toggle','".&Settings::language."','".&Settings::timezone."','$today','".&Settings::sessionExprs."','$rs_cur',".&Settings::dbVLSZ.");",
-/home/will/LifeLog/htdocs/
\ No newline at end of file
+/home/will/dev_new/LifeLog/htdocs/
\ No newline at end of file
##no critic qw(Subroutines::RequireFinalReturn)
##no critic Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions
-use constant VERSION => '3.0';
+use constant VERSION => '3.1';
our @files;
our %lists;
our %properties;
our %RESERVED_WORDS = map +($_, 1), qw{ CONST CONSTANT DATA DATE VARIABLE VAR
FILE TABLE TREE INDEX
- VIEW SQL MIGRATE DO LIB PROCESSOR
+ VIEW SQL MIGRATE DO LIB PROCESSOR APP_SETTINGS
PLUGIN MACRO %LOG INCLUDE INSTRUCTOR };
sub isReservedWord { my ($self, $word)=@_; return $word ? $RESERVED_WORDS{$word} : undef }
}
sub setPlugin{
my ($self, $obj) = @_;
- $self->{plugin} = $obj;
+ $self->{plugin} = \$obj;
}
sub result {
my ($self, $value) = @_;
if($ref eq 'ARRAY'){
return @{$ret}
}elsif($ref eq 'PropertyValueStyle'){
+ return ${$ret->{plugin}} if $ret->{instructor} eq 'APP_SETTINGS';
return $ret;
}
else{
elsif($t eq 'MACRO'){
$instructs{$e}=$v;
}
+ elsif($t eq 'APP_SETTINGS'){
+ $self->instructPlugin(InstructedDataItem -> new($e, 'APP_SETTINGS', $v));
+ }
elsif(exists $instructors{$t}){
if(not $instructors{$t}->instruct($e, $v) && $self->{STRICT}){
CNFParserException->throw("Instruction processing failed for '<<$e<$t>>'!\t");
}elsif($type eq 'InstructedDataItem'){
my $t = $struct->{ins};
if($t eq 'PLUGIN'){
- instructPlugin($self,$struct,$anons);
+ instructPlugin($self,$struct);
}
}else{warn "What is -> $struct type:$type ?"}
}
}
sub instructPlugin {
- my ($self, $struct, $anons) = @_;
+ my ($self, $struct) = @_;
try{
- $properties{$struct->{'ele'}} = doPlugin($self, $struct, $anons);
+ $properties{$struct->{'ele'}} = doPlugin($self, $struct);
$self->log("Plugin instructed ->". $struct->{'ele'});
}catch($e){
if($self->{STRICT}){
CNFParserException->throw(error=>$e);
}else{
- $self->trace("Error @ Plugin -> ". $struct->toString() ." Error-> $@")
+ $self->trace("Error @ ".$struct->{ins}." -> ". $struct->toString() ." Error-> $@")
}
}
}
###
# Setup and pass to pluging CNF functionality.
-# @TODO Current Under development.
+# @TODO Currently Under development.
###
sub doPlugin {
- my ($self, $struct, $anons) = @_;
- my ($elem, $script) = ($struct->{'ele'}, $struct->{'val'});
+ my ($self, $struct) = @_;
+ my ($elem, $instructor, $script) = ($struct->{'ele'}, $struct-> {'ins'}, $struct->{'val'});
my $plugin = PropertyValueStyle->new($elem, $script);
my $pck = $plugin->{package};
my $prp = $plugin->{property};
my $sub = $plugin->{subroutine};
- if($pck && $prp && $sub){
+ if($instructor eq 'APP_SETTINGS'){
+ $pck = 'ClassicAppSettings' if ! $pck;
+ ## no critic (RequireBarewordIncludes)
+ require "$pck.pm";
+ my $obj = $pck -> new($plugin);
+ $sub = 'setup_with' if !$sub;
+ $obj-> $sub($self);
+ $plugin->setPlugin($obj);
+ $plugin->{instructor} = $instructor;
+ return $plugin;
+ }
+ elsif($pck && $prp && $sub){
## no critic (RequireBarewordIncludes)
require "$pck.pm";
#Properties are global, all plugins share a %Settings property if specifed, otherwise the default will be set from here only.
my $res = $obj-> $sub($self, $prp);
if($res){
$plugin->setPlugin($obj);
+ $plugin->{instructor} = $instructor;
return $plugin;
}else{
die "Sorry, the PLUGIN feature has not been Implemented Yet!"
- MACRO
1. Value is searched and replaced by a property value, outside the property scripted.
2. Parsing abruptly stops if this abstract property specified is not found.
- 3. Macro format specifications, have been aforementioned in this document. However make sure that your macro an constant also including the *$* signifier if desired.
\ No newline at end of file
+ 3. Macro format specifications, have been aforementioned in this document. However make sure that your macro an constant also including the *$* signifier if desired.
+ - APP_SETTINGS - Provides external expected application settings defaults to the configuration.
+ 1. These are added and processed in place as they appear sequentionaly in the script.
+ 1. It can be made possible in the future, to meta instruct to run APP_SETTING at the processing or post processing stages of CNF parsing.
+ 2. These can be externally added constance type CNF items if are found missing or not specified in current cnf file or from includes.
+ 3. An application usually obtains its settings object as an CNF property. Decoupling the CNF from handling this, making it abstract to the parser.
}
#menu_page a:hover {
color: #04eefa;
- font-style:bold;
- }
+}
.menu_head {
border: 2px solid #00000017;
-
+body::after{
+ /* hide images */
+ position:absolute; width:0; height:0; overflow:hidden; z-index:-1;
+ /* load images */
+ content: url('images/Wedges-9.1s-64px.png') url('images/Sun-Rotating.gif');
+ }
ID = id?id:"#feeds";
var pnl =$(ID);
pnl.html(
- '<div><span style="border:1px solid Crimson;padding:5px;"><font color="Crimson"> <b>P l e a s e W a i t ! </b></font></span><br><img src="images/Wedges-9.1s-64px.png"></div>'
+ '<div><span style="border:1px solid Crimson;padding:5px;"><font color="Crimson"> <b>P l e a s e W a i t ! </b></font></span><br><img src="wsrc/images/Wedges-9.1s-64px.png"></div>'
);
pnl.show();
pnl.css('visibility','visible');
ID = '#feeds';
var pnl = $(ID);
pnl.html(
- '<div><span style="border:1px solid Crimson;padding:5px;"><font color="Crimson"> <b> Please   Wait -> '+feed+' loading... </b></font></span><br><img src="images/Wedges-9.1s-64px.png"></div>'
+ '<div><span style="border:1px solid Crimson;padding:5px;"><font color="Crimson"> <b> Please   Wait -> '+feed+' loading... </b></font></span><br><img src="wsrc/images/Wedges-9.1s-64px.png"></div>'
);
pnl.show();
pnl.css('visibility','visible');
background-attachment: fixed;
background-size: cover;
}
-.content {
+.content{
margin: 0;
padding:0;
}
#cat_desc {
position: absolute;
+ max-width: 480px;
+
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ height: 40px;
+ padding: 15px;
+ margin: auto;
+ margin-left: 10px;
+ top: calc(100vh - 100px);
+
border: 2px solid #94cde7;
- padding: 5px;
- text-align: center;
- background: #ccffff;
- margin-top: 15px;
- margin-left: 200px;
- width: 280px;
+ font-weight: bolder;
+ background-color: #ccffff;
+ color: black;
+
text-decoration-style: wavy;
+}
+ui-menu,.ui-autocomplete {
+ background: #ccffff;
}
.span_cat {
}
#al {
- align-items: left;
- align-content: left;
text-align: left;
}
background-image: none;
color: #000000 !important;
}
-.ui-selectmenu-button:{
+.ui-selectmenu-button{
background-image: none;
}
.ui-selectmenu-button:hover{
background: #00ddfa;
}
-
+.dropdown-menu table td{
+ color:rgb(226, 34, 34);
+ background: #98e6e6;
+ border-radius: 2pt;
+ padding:0px;
+ margin:2px;
+ text-align: left;
+ vertical-align: text-top;
+}
+.dropdown-menu tr td ul {
+ min-width:140px;
+ list-style:none;
+ background: #98e6e6;
+ box-shadow:0 3px 5px rgba(0,0,0,0.1);
+ padding:0;
+ margin:1px;
+}
font-weight: bold;
}
.ui-widget-content {
- background: #183c76;
- color: #362b36;
+ background: #98e6e6;
}
.ui-menu {
list-style: none;
display: block;
padding: .2em .4em;
line-height: 1.5;
- zoom: 1;
}
.ui-menu .ui-menu-item a.ui-state-hover,
color: #472f80;
}
a:hover {
- color: #ff4d21;
font-style:normal;
}
a:active {
var DBI_LVAR_SZ;
var EDIT_LOG_TXT = "";
+
function onBodyLoadGeneric() {
$("input[type=submit], input[type=reset], .ui-widget-content, button, .a_").button();
$("#btn_save_doc").button();
if(!LOCALE || LOCALE==="English"){
LOCALE = "en-US";
}
+ show("#menu_page");
+
}
function onBodyLoad(toggle, locale, tz, today, expires, rs_cur, log_limit) {
}});
+ // jQuery.fn.dispPos = function () {
+ // this.css("position","absolute");
+ // this.css("top", Math.max(0, (($(window).height() - $(this).outerHeight())-320 ) +
+ // $(window).scrollTop()) + "px");
+ // this.css("left", Math.max(0, (($(window).width() - $(this).outerWidth()) / 6) - 100 +
+ // $(window).scrollLeft()) + "px");
+ // this.css( "zIndex", 8 );
+ // return this;
+ // }
+ // margin-left: 10px;
+ // top: calc(100vh - 100px);
+
jQuery.fn.dispPos = function () {
this.css("position","absolute");
- this.css("top", Math.max(0, (($(window).height() - $(this).outerHeight())-320 ) +
- $(window).scrollTop()) + "px");
- this.css("left", Math.max(0, (($(window).width() - $(this).outerWidth()) / 6) - 100 +
- $(window).scrollLeft()) + "px");
+ // this.css("top", Math.max(0, $(window).height() - "100px"));
+ this.css("left", "10px");
this.css( "zIndex", 8 );
return this;
}
+
jQuery.fn.dropdownPos = function (e,desc) {
var pnl = $("#cat_desc");
var top = e.css('top');
source: AUTOWORDS
});
});
- $('#main_table').css('visibility', 'visible');
display("Log page is ready!", 5);
+ $('#main_table').css('visibility', 'visible');
}
}
return false;
}
-
#cat_desc {
position: absolute;
+ max-width: 480px;
+
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ height: 40px;
+ padding: 15px;
+ margin: auto;
+ margin-left: 10px;
+ top: calc(100vh - 100px);
+
border: 2px solid #7a3d03;
- padding: 5px;
- text-align: center;
- background: #d1663c;
+ font-weight: bolder;
+ background-color: #d1663c;
color: #d8d8d8;
- margin-top: 20px;
- margin-left: 200px;
- width: 280px;
+
text-decoration-style: wavy;
}
#cat_desc {
position: absolute;
+ max-width: 480px;
+
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ height: 40px;
+ padding: 15px;
+ margin: auto;
+ margin-left: 10px;
+ top: calc(100vh - 100px);
+
border: 2px solid #9bb6c3;
- padding: 5px;
- text-align: center;
- background: #0f0f0f;
+ font-weight: bolder;
+ background-color: #0f0f0f;
color: #d8d8d8;
- margin-top: 20px;
- margin-left: 200px;
- width: 280px;
+
text-decoration-style: wavy;
}
+
.span_cat {
border:1px solid #9bb6c3;
border-style: outset;
}
#div_log {
+ display: none;
font-weight: bold;
}
#div_srh {
padding-left: 5px;
text-align: left;
}
+
#cat_desc {
position: absolute;
+ max-width: 480px;
+
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ height: 40px;
+ padding: 15px;
+ margin: auto;
+ margin-left: 10px;
+ top: calc(100vh - 100px);
+
border: 2px solid black;
- padding: 5px;
- text-align: center;
- background: #D4AF37;
- color:black;
- margin-top: 20px;
- margin-left: 200px;
- width: 280px;
- text-decoration-style: wavy;
+ font-weight: bolder;
+ background-color: gold;
+ color: black;
+ text-decoration-style: wavy;
}
+
.span_cat {
font-family: Bookman;
border: 1px solid #b2f8ef;
padding-right: 10px;
padding-left: 10px;
box-sizing: border-box;
- width: auto;}
+ width: auto;
+}
#cat_lst {
visibility: hidden;
}
}
#al {
- align-items: left;
- align-content: left;
text-align: left;
}
.log {
max-width:550px;
- text-align: left;
+ /* text-align: left; */
word-wrap: break-word;
white-space: normal;
padding-left: 5px;
background-image: none;
color: #000000 !important;
}
-.ui-selectmenu-button:{
+.ui-selectmenu-button{
background-image: none;
}
.ui-selectmenu-button:hover{
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default, .ui-button, html .ui-button.ui-state-disabled:hover, html .ui-button.ui-state-disabled:active {
border: 1px solid #ead5ae;
background-color: #d4af37;
- background: #fbff00;
+ background: gold;
}
.dropdown-menu table td{
color:rgb(226, 34, 34);
}
.ui-widget-header {
border: 1px solid #40413e;
- background: #fbff00;
+ background: #f0cc57;;
color: #222222;
- font-weight: bold;
}
.ui-widget-content{
border: 1px solid #dddddd;
- background: #e9ff27;
+ background: #f0cc57;
color: #362b36;
}