]> lifelog.hopto.org Git - LifeLog.git/commitdiff
New Categories dropdown, developed.
authorWill Budic <redacted>
Sun, 23 Feb 2020 00:19:45 +0000 (11:19 +1100)
committerWill Budic <redacted>
Sun, 23 Feb 2020 00:19:45 +0000 (11:19 +1100)
Current Development Check List.md
htdocs/cgi-bin/config.cgi
htdocs/cgi-bin/main.cgi
htdocs/cgi-bin/wsrc/jquery.sweet-dropdown.css [new file with mode: 0644]
htdocs/cgi-bin/wsrc/jquery.sweet-dropdown.js [new file with mode: 0644]
htdocs/cgi-bin/wsrc/main.css
htdocs/cgi-bin/wsrc/main_earth.css
htdocs/cgi-bin/wsrc/main_moon.css
htdocs/cgi-bin/wsrc/main_sun.css

index cb9a762e27c6c0f3e955dbce4e2951c6281e2e88..f12dc240b2a9ff1e2b129c2d70798fdc89651c04 100644 (file)
@@ -10,7 +10,7 @@ This version is not compatible in data structure to prior versions. Data migrati
 ### v.1.7 Encountered
 
 * Application log needed in the background for System based logs.
-* New Categories dropdown, grouping in ascending order and presenting in columns of five at a time.
+* &#10004; New Categories dropdown, grouping in ascending order and presenting in columns of five at a time.
 * New CNF Development.
   * Migration is currently hard to maintain and data export and import is wrongly reliant to CVS.
   * CVS imports/exports are to be made obsolete in the future. It is not safe.
@@ -58,6 +58,7 @@ This version is not compatible in data structure to prior versions. Data migrati
 
 ## Planned New Possible Features of Minor Relevance
 
+* Fit to page log. Making log subpage scrollable rather than whole page to see the bottom.
 * Make session timeot sub pages aware via JSON.
 * Multiple category assignment table (set via hashtags and end of a post).
 * Log cards Export/Import. Send log entries via email or USB, why not?
index 86b3fb89d45991d393ee2ab96c2330e32056693c..269441f427e248adba4c51b9df4cf072b51a679d 100755 (executable)
@@ -128,7 +128,7 @@ my  $frmCats = qq(
         </tr>
       <tr class="r1">
          <td colspan="2"><a href="#bottom">&#x21A1;</a>&nbsp;&nbsp;&nbsp;<input type="submit" value="Add New Category First" onclick="return submitNewCategory()"/> or <input type="submit" value="Change"/></td>
-         <td colspan="1" align="right"><b>Categories Configuration In -> $dbname</b>&nbsp;<input type="submit" value="Change"/></td>
+         <td colspan="1" align="right"><b>Categories Configuration In -> $dbname</b>&nbsp;<input type="submit" value="Change" onclick="return checkConfigCatsChange()"/></td>
         </tr>
         <tr class="r1">
           <td colspan="3"><div style="text-align:left; float"><font color="red">WARNING!</font>
@@ -1054,7 +1054,7 @@ sub cats {
 
 
 sub error {
-    my $url = $cgi->url();
+    my $url = $cgi->url(-path_info => 1);
     print qq(<h2>Sorry Encountered Errors</h2><p>Page -> $url</p><p>$ERROR</p>);
     print qq(<h3>CGI Parameters</h3>);
     print "<ol>\n";
index 90ee53e09948632f4de9a8836f8d953de1f23984..442e931e9f1830d5f6ccc2b89925c5a32075be35 100755 (executable)
@@ -84,8 +84,9 @@ my $lang  = Date::Language->new(Settings::language());
 my $today = DateTime->now;
    $today -> set_time_zone(Settings::timezone());
 
-#Excludes can be now set as permanent to page view excluded, visible if view searched.
+#Excludes can be now be set as permanent to page view excluded, visible if view searched.
 #http://localhost:8080/cgi-bin/main.cgi?vc=0&category=0&xc=0&idx_cat_x=0&v_from=&v_to=&keywords=&srch_reset=0
+
 if(!$prm_vc && &Settings::keepExcludes){
     if($prm_xc_lst){
         &Settings::configProperty($db, 201, '^EXCLUDES', $prm_xc_lst);
@@ -95,6 +96,10 @@ if(!$prm_vc && &Settings::keepExcludes){
        $prm_xc = $prm_xc_lst if (!$prm_xc && !$cgi->param('srch_reset'));
     }
 }
+elsif(!$prm_xc && $prm_xc_lst){
+#view call only
+    $prm_xc = $prm_xc_lst;
+}
 
 if ( !$rs_dat_to && $rs_dat_from ) {
     my $dur = $today;
@@ -145,6 +150,13 @@ if($prm_xc){
        $prm_xc = $sss->param('sss_xc');
 }
 
+
+
+#TODO (2020-02-23) It gets too complicated. should not have both $prm_xc and $prm_xc_lst;
+       if(!$prm_xc_lst && index($prm_xc, ',') > 0){
+           $prm_xc_lst =  $prm_xc;
+       }
+##
 my @xc_lst = split /\,/, $prm_xc_lst;
 
 
@@ -183,6 +195,7 @@ print $cgi->start_html(
         { -type => 'text/css', -src => 'wsrc/quill/katex.min.css' },
         { -type => 'text/css', -src => 'wsrc/quill/monokai-sublime.min.css' },
         { -type => 'text/css', -src => 'wsrc/quill/quill.snow.css' },
+        { -type => 'text/css', -src => 'wsrc/jquery.sweet-dropdown.css' },
 
     ],
     -script => [
@@ -205,18 +218,19 @@ print $cgi->start_html(
         { -type => 'text/javascript', -src => 'wsrc/jscolor.js' },
         { -type => 'text/javascript', -src => 'wsrc/moment.js' },
         { -type => 'text/javascript', -src => 'wsrc/moment-timezone-with-data.js' },
+        { -type => 'text/javascript', -src => 'wsrc/jquery.sweet-dropdown.js'}
 
     ],
 );
 
 
 my $st;
-my $str_sqlCat = "SELECT ID, NAME, DESCRIPTION FROM CAT ORDER BY ID;";
-my $str_sql    = "SELECT ID, ID_CAT, ID_RTF, DATE, LOG, AMOUNT, AFLAG, STICKY FROM VW_LOG WHERE STICKY = 1 LIMIT ".&Settings::viewAllLimit.";";
+my $sqlCAT = "SELECT ID, NAME, DESCRIPTION FROM CAT ORDER BY ID;";
+my $sqlVWL = "SELECT ID, ID_CAT, ID_RTF, DATE, LOG, AMOUNT, AFLAG, STICKY FROM VW_LOG WHERE STICKY = 1 LIMIT ".&Settings::viewAllLimit.";";
 
 print qq(## Using db -> $dsn\n) if $DEBUG;
 
-$st = $db->prepare($str_sqlCat);
+$st = $db->prepare($sqlCAT);
 $st->execute() or LifeLogException->throw($DBI::errstri);
 
 my $cats = qq(<select   class="ui-widget-content" id="ec" name="ec"
@@ -230,7 +244,9 @@ my %hshDesc = {};
 my $c_sel   = 1;
 my $cats_v  = $cats;
 my $cats_x  = $cats;
-my $cat_desc = "";
+my $data_cats = "";
+my $td_cat = "<tr><td><ul>";
+my $td_itm_cnt =0;
 $cats_v =~ s/\"ec\"/\"vc\"/g;
 $cats_x =~ s/\"ec\"/\"xc\"/g;
 while ( my @row = $st->fetchrow_array() ) {
@@ -252,18 +268,33 @@ while ( my @row = $st->fetchrow_array() ) {
     else {
         $cats_x .= qq(<option value="$row[0]">$row[1]</option>\n);
     }
-    $hshCats{ $row[0] } = $row[1];
-    $hshDesc{ $row[0] } = $row[2];
-}
+    my $n = $row[1];
+    $n =~ s/\s*$//g;
+    $hshCats{$row[0]} = $n;
+    $hshDesc{$row[0]} = $row[2];
+    if($td_itm_cnt>4){
+        $td_cat .= "</ul></td><td><ul>";
+        $td_itm_cnt = 0;
+    }
+    $td_cat .= "<li id='$row[0]'><a href='#'>$row[1]</a></li>";
+    $td_itm_cnt++;
 
-$cats .= '</select>';
+}
+if($td_itm_cnt<5){#fill spacing.
+    for (my $i=0;$i<5-$td_itm_cnt;$i++){
+        $td_cat .= "<li><a href='#'></a>&nbsp;</li>";
+    }
+}
+$td_cat .= "</ul></td></tr>";
+$cats   .= '</select>';
 $cats_v .= '</select>';
 $cats_x .= '</select>';
 
 for my $key ( keys %hshDesc ) {
     my $kv = $hshDesc{$key};
-    if ( $kv ne ".." ) {
-        $cat_desc .= qq(<li id="$key">$kv</li>\n);
+    if ( $kv ne ".." && index($key,'HASH(0x')!=0) {
+        my $n = $hshCats{$key};
+        $data_cats .= qq(<meta id="$key" name="$n" content="$kv">\n);
     }
 }
 my $log_output =
@@ -308,16 +339,16 @@ qq(<form id="frm_log" action="data.cgi" onSubmit="return formDelValidation();">
                     $stmS = $stmS . " OR ";
                 }
             }
-            $str_sql = $stmS . $stmE;
+            $sqlVWL = $stmS . $stmE;
         }
     }
     elsif ($rs_cat_idx && $rs_cat_idx != $prm_xc) {
 
         if ($stmD) {
-            $str_sql = $stmS . $stmD . " AND ID_CAT='" . $rs_cat_idx . "'" . $stmE;
+            $sqlVWL = $stmS . $stmD . " AND ID_CAT='" . $rs_cat_idx . "'" . $stmE;
         }
         else {
-            $str_sql = $stmS . " ID_CAT=" . $rs_cat_idx . ";" . $stmE;
+            $sqlVWL = $stmS . " ID_CAT=" . $rs_cat_idx . ";" . $stmE;
         }
     }
     else {
@@ -329,17 +360,17 @@ qq(<form id="frm_log" action="data.cgi" onSubmit="return formDelValidation();">
                             $ands .= " ID_CAT!=$_ AND";
                     }
                     $ands =~ s/AND$//g;
-                    $str_sql = $stmS . $ands . $stmE;
+                    $sqlVWL = $stmS . $ands . $stmE;
                 }
                 else{
-                    $str_sql = $stmS . " ID_CAT!=$prm_xc;" . $stmE;
+                    $sqlVWL = $stmS . " ID_CAT!=$prm_xc;" . $stmE;
                 }
 
 
 
         }
         if ($stmD) {
-            $str_sql = $stmS . $stmD . $stmE;
+            $sqlVWL = $stmS . $stmD . $stmE;
         }
     }
 
@@ -349,10 +380,10 @@ qq(<form id="frm_log" action="data.cgi" onSubmit="return formDelValidation();">
 
     my $tfId      = 0;
     my $id        = 0;
-    my $log_start = index $str_sql, "<=";
+    my $log_start = index $sqlVWL, "<=";
     my $re_a_tag  = qr/<a\s+.*?>.*<\/a>/si;
 
-    print $cgi->pre("###[Session PARAMS->vc=$prm_vc|xc=$prm_xc|xc_lst=@xc_lst|keepExcludes=".&Settings::keepExcludes."] -> ".$str_sql) if $DEBUG;
+    print $cgi->pre("###[Session PARAMS->vc=$prm_vc|xc=$prm_xc|xc_lst=$prm_xc_lst|xc_lst=@xc_lst|keepExcludes=".&Settings::keepExcludes."] -> ".$sqlVWL) if $DEBUG;
 
     if ( $log_start > 0 ) {
 
@@ -376,13 +407,13 @@ qq(<form id="frm_log" action="data.cgi" onSubmit="return formDelValidation();">
 
 
     #place sticky or view param.ed entries first!
-    buildLog(traceDBExe($str_sql));
+    buildLog(traceDBExe($sqlVWL));
 
-    if(index ($str_sql, 'PID <=') < 1 && !$prm_vc  && !$prm_xc && !$rs_keys && !$rs_dat_from){
-        $str_sql = "SELECT ID, ID_CAT, ID_RTF, DATE, LOG, AMOUNT, AFLAG, STICKY FROM VW_LOG WHERE STICKY != 1  ORDER BY DATE DESC LIMIT ".&Settings::viewAllLimit.";";
-        print $cgi->pre("###2 -> ".$str_sql)  if $DEBUG;
+    if(index ($sqlVWL, 'PID <=') < 1 && !$prm_vc  && !$prm_xc && !$rs_keys && !$rs_dat_from){
+        $sqlVWL = "SELECT ID, ID_CAT, ID_RTF, DATE, LOG, AMOUNT, AFLAG, STICKY FROM VW_LOG WHERE STICKY != 1  ORDER BY DATE DESC LIMIT ".&Settings::viewAllLimit.";";
+        print $cgi->pre("###2 -> ".$sqlVWL)  if $DEBUG;
         ;
-        &buildLog(traceDBExe($str_sql));
+        &buildLog(traceDBExe($sqlVWL));
     }
 
 
@@ -399,7 +430,7 @@ sub traceDBExe {
 
 sub buildLog {
     my $pst = shift;
-    #print "## str_sql: $str_sql\n";
+    #print "## sqlVWL: $sqlVWL\n";
     while ( my @row = $pst->fetchrow_array() ) {
         my $i = 0;
         $id = $row[$i++]; #ID must be rowid in LOG.
@@ -748,10 +779,20 @@ _TXT
       . $today->ymd . " " . $today->hms . qq(">
 
        &nbsp;<button type="button" onclick="return setNow();">Now</button>
-                       &nbsp;<button type="reset"  onclick="setNow();resetDoc(); return true;">Reset</button></td>
-                       <td style="text-align:top; vertical-align:top">Category:
-    $cats
-                               <br><br><div id="cat_desc" name="cat_desc"></div>
+                       &nbsp;<button type="reset"  onclick="setNow();resetDoc(); return true;">Reset</button>
+
+
+                <span id="cat_desc" name="cat_desc">Enter log...</span>
+
+            </td>
+                       <td style="text-align:top; vertical-align:top">Category:&nbsp;
+            <span id="lcat" class="span_cat"><i><font size=1>--Select --</font></i></span>
+                <button class="bordered" data-dropdown="#dropdown-standard">&#171;</button>
+
+            <div class="dropdown-menu dropdown-anchor-top-right dropdown-has-anchor" id="dropdown-standard">
+                        <table class="tbl">$td_cat</table>
+            </div>
+<!-- OLD -> \$cats was here -->
                        </td>
        </tr>
        <tr class="collpsd"><td style="text-align:right; vertical-align:top">Log:</td>
@@ -778,6 +819,7 @@ _TXT
        </tr>
        <tr class="collpsd"><td colspan="3"></td></tr>
        </table>
+    <input type="hidden" name="ec" id="ec" value="0"/>
        <input type="hidden" name="submit_is_edit" id="submit_is_edit" value="0"/>
        <input type="hidden" name="submit_is_view" id="submit_is_view" value="0"/>
        <input type="hidden" name="rs_all" value="0"/>
@@ -811,17 +853,38 @@ _TXT
     qq(
     <tr class="collpsd">
      <td align="right"><b>View by Category:</b></td>
-     <td align="left">$cats_v&nbsp;&nbsp;
+     <td align="left">
+
+                 <span id="lcat_v" class="span_cat"><i><font size=1>--Select --</font></i></span>
+                 <button class="bordered" data-dropdown="#dropdown-standard-v">&#171;</button>
+
+            <div id="dropdown-standard-v" class="dropdown-menu        dropdown-anchor-left-center      dropdown-has-anchor">
+                        <table class="tbl">$td_cat</table>
+            </div>
+     <!--
+    \$cats_v&nbsp;&nbsp;   -->
         <button id="btn_cat" onclick="viewByCategory(this);">View</button>
         <input id="idx_cat" name="category" type="hidden" value="0"/>
      </td>
    </tr>
    <tr class="collpsd">
      <td align="right"><b>Exclude Category:</b></td>
-     <td align="left">$cats_x&nbsp;&nbsp;
+     <td align="left">
+
+
+                 <span id="lcat_x" class="span_cat"><i><font size=1>--Select --</font></i></span>
+                 <button class="bordered" data-dropdown="#dropdown-standard-x">&#171;</button>
+
+            <div id="dropdown-standard-x" class="dropdown-menu        dropdown-anchor-left-center      dropdown-has-anchor">
+                        <table class="tbl">$td_cat</table>
+            </div>
+
+     <!-- \$cats_x&nbsp;&nbsp;   -->
         <input id="idx_cat_x" name="idx_cat_x" type="hidden" value="0"/>
+
         <button id="btnxca" onClick="return addExclude()"/>Add</button>&nbsp;&nbsp;
-        <button id="btnxrc" type="button" onClick="return removeExclude()">Remove</button>&nbsp;&nbsp;
+        <button id="btnxrc" type="button" onClick="return removeExclude()">Remove</button>&nbsp;
+        <button id="btnxrc" type="button" onClick="return resetExclude()">Reset</button>&nbsp;&nbsp;&nbsp;
         <button id="btn_cat" onclick="return viewExcludeCategory(this);">View</button>&nbsp;&nbsp;
         <input id="sss_xc" name="sss_xc" type="checkbox" $sss_checked/> Keep In Seession
      </td>
@@ -859,7 +922,8 @@ _TXT
  #   Page printout from here!   #
 ################################
 
-print qq(<div id="menu" title="To close this menu click on its heart, and wait.">
+print qq(
+<div id="menu" title="To close this menu click on its heart, and wait.">
 <div class="hdr" style="marging=0;padding:0px;">
 <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>&nbsp;
 <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>
@@ -882,7 +946,7 @@ $sm_reset_all
 <a class="a_" href="login_ctr.cgi?logout=bye">LOGOUT</a><br>
 <span style="font-size: x-small;">$vmode</span><br>
 </div>
-         <div id="div_log">$frm</div>\n
+         <div id="div_log">$frm</div>
          <div id="div_srh">$srh</div>
       $quill
       <div id="div_hlp">$help</div>
@@ -890,9 +954,10 @@ $sm_reset_all
          <div><a class="a_" href="stats.cgi">View Statistics</a></div><br>
          <div><a class="a_" href="config.cgi">Configure Log</a></div><hr>
          <div><a class="a_" href="login_ctr.cgi?logout=bye">LOGOUT</a><hr><a name="bottom"/></div>
-<ul id="cat_lst">
-       $cat_desc
-</ul>
+<div id="cat_lst">
+       $data_cats
+</div>
+<!-- Page Settings Specifics date:20200222 -->
 <script type="text/javascript">
     \$( function() {
         var tags = [$autowords];
@@ -903,6 +968,7 @@ $sm_reset_all
 </script>
 );
 
+
 print $cgi->end_html;
 $st->finish;
 $db->disconnect();
@@ -910,8 +976,6 @@ undef($sss);
 exit;
 
 
-
-
 sub processSubmit {
 
         my $date = $cgi->param('date');
@@ -985,11 +1049,11 @@ try {
                                         $sand .= "and ID_CAT!=$_ ";
                                 }
                         }
-                        else{        $sand = "and ID_CAT != $prm_xc"; }
+                        else{ $sand = "and ID_CAT != $prm_xc"; }
 
                     }
 
-                    $str_sql = qq(SELECT PID, ID_CAT, ID_RTF, DATE, LOG, AMOUNT, AFLAG, STICKY from VW_LOG where PID <= $rs_cur and STICKY != 1 $sand)." LIMIT ".&Settings::viewAllLimit.";";
+                    $sqlVWL = qq(SELECT PID, ID_CAT, ID_RTF, DATE, LOG, AMOUNT, AFLAG, STICKY from VW_LOG where PID <= $rs_cur and STICKY != 1 $sand)." LIMIT ".&Settings::viewAllLimit.";";
                     return;
                 }
             }
diff --git a/htdocs/cgi-bin/wsrc/jquery.sweet-dropdown.css b/htdocs/cgi-bin/wsrc/jquery.sweet-dropdown.css
new file mode 100644 (file)
index 0000000..17b9374
--- /dev/null
@@ -0,0 +1,413 @@
+.dropdown-menu {
+ position:absolute;
+ z-index:9999999;
+ display:none;
+ opacity:0;
+ top:0;
+ left:0;
+ -webkit-transition:opacity 0.2s, -webkit-transform 0.2s;
+ transition:opacity 0.2s, transform 0.2s;
+ -webkit-transform:translateY(-20px) scale(0.93);
+ transform:translateY(-20px) scale(0.93);
+ border-radius:3px
+}
+.dropdown-menu.dropdown-opened {
+ opacity:1;
+ -webkit-transform:none !important;
+ transform:none !important
+}
+.dropdown-menu.fixed {
+ position:fixed
+}
+.dropdown-menu.dropdown-anchor-left-top,
+.dropdown-menu.dropdown-anchor-left-center,
+.dropdown-menu.dropdown-anchor-left-bottom {
+ -webkit-transform:translateX(-20px) scale(0.93);
+ transform:translateX(-20px) scale(0.93)
+}
+.dropdown-menu.dropdown-anchor-right-top,
+.dropdown-menu.dropdown-anchor-right-center,
+.dropdown-menu.dropdown-anchor-right-bottom {
+ -webkit-transform:translateX(20px) scale(0.93);
+ transform:translateX(20px) scale(0.93)
+}
+.dropdown-menu .dropdown-anchor {
+ border:7px solid #2fa6ca
+}
+.dropdown-menu .dropdown-anchor,
+.dropdown-menu .dropdown-anchor::after {
+ position:absolute;
+ content:'';
+ display:inline-block
+}
+.dropdown-menu .dropdown-anchor::after {
+ before-border:6px solid #fff
+}
+.dropdown-menu.dark .dropdown-anchor,
+.dropdown-menu.dark .dropdown-anchor::after {
+ border-color:#32363F
+}
+.dropdown-menu.grey-anchor .dropdown-anchor,
+.dropdown-menu.grey-anchor .dropdown-anchor::after {
+ border-color:#f6f6f6
+}
+.dropdown-menu.accent-anchor .dropdown-anchor,
+.dropdown-menu.accent-anchor .dropdown-anchor::after {
+ border-color:#F57C00
+}
+.dropdown-menu.dropdown-anchor-top-left:not(.dropdown-overlay-trigger),
+.dropdown-menu.dropdown-anchor-top-center:not(.dropdown-overlay-trigger),
+.dropdown-menu.dropdown-anchor-top-right:not(.dropdown-overlay-trigger) {
+ margin-top:10px
+}
+.dropdown-menu.dropdown-anchor-top-left .dropdown-anchor,
+.dropdown-menu.dropdown-anchor-top-center .dropdown-anchor,
+.dropdown-menu.dropdown-anchor-top-right .dropdown-anchor {
+ border-top-color:transparent;
+ border-right-color:transparent;
+ border-left-color:transparent;
+ top:-14px
+}
+.dropdown-menu.dropdown-anchor-top-left .dropdown-anchor::after,
+.dropdown-menu.dropdown-anchor-top-center .dropdown-anchor::after,
+.dropdown-menu.dropdown-anchor-top-right .dropdown-anchor::after {
+ border-top-color:transparent;
+ border-right-color:transparent;
+ border-left-color:transparent;
+ margin-top:-5px;
+ margin-left:-6px
+}
+.dropdown-menu.dropdown-anchor-top-left.dropdown-anchor-top-left .dropdown-anchor,
+.dropdown-menu.dropdown-anchor-top-center.dropdown-anchor-top-left .dropdown-anchor,
+.dropdown-menu.dropdown-anchor-top-right.dropdown-anchor-top-left .dropdown-anchor {
+ left:15px
+}
+.dropdown-menu.dropdown-anchor-top-left.dropdown-anchor-top-center .dropdown-anchor,
+.dropdown-menu.dropdown-anchor-top-center.dropdown-anchor-top-center .dropdown-anchor,
+.dropdown-menu.dropdown-anchor-top-right.dropdown-anchor-top-center .dropdown-anchor {
+ left:calc(50% - 7px)
+}
+.dropdown-menu.dropdown-anchor-top-left.dropdown-anchor-top-right .dropdown-anchor,
+.dropdown-menu.dropdown-anchor-top-center.dropdown-anchor-top-right .dropdown-anchor,
+.dropdown-menu.dropdown-anchor-top-right.dropdown-anchor-top-right .dropdown-anchor {
+ left:calc(100% - 28px)
+}
+.dropdown-menu.dropdown-anchor-right-top:not(.dropdown-overlay-trigger),
+.dropdown-menu.dropdown-anchor-right-center:not(.dropdown-overlay-trigger),
+.dropdown-menu.dropdown-anchor-right-bottom:not(.dropdown-overlay-trigger) {
+ margin-left:-10px
+}
+.dropdown-menu.dropdown-anchor-right-top .dropdown-anchor,
+.dropdown-menu.dropdown-anchor-right-center .dropdown-anchor,
+.dropdown-menu.dropdown-anchor-right-bottom .dropdown-anchor {
+ border-top-color:transparent;
+ border-right-color:transparent;
+ border-bottom-color:transparent;
+ left:100%
+}
+.dropdown-menu.dropdown-anchor-right-top .dropdown-anchor::after,
+.dropdown-menu.dropdown-anchor-right-center .dropdown-anchor::after,
+.dropdown-menu.dropdown-anchor-right-bottom .dropdown-anchor::after {
+ border-top-color:transparent;
+ border-right-color:transparent;
+ border-bottom-color:transparent;
+ margin-left:-7px;
+ margin-top:-6px
+}
+.dropdown-menu.dropdown-anchor-right-top.dropdown-anchor-right-top .dropdown-anchor,
+.dropdown-menu.dropdown-anchor-right-center.dropdown-anchor-right-top .dropdown-anchor,
+.dropdown-menu.dropdown-anchor-right-bottom.dropdown-anchor-right-top .dropdown-anchor {
+ top:11px
+}
+.dropdown-menu.dropdown-anchor-right-top.dropdown-anchor-right-center .dropdown-anchor,
+.dropdown-menu.dropdown-anchor-right-center.dropdown-anchor-right-center .dropdown-anchor,
+.dropdown-menu.dropdown-anchor-right-bottom.dropdown-anchor-right-center .dropdown-anchor {
+ top:calc(50% - 7px)
+}
+.dropdown-menu.dropdown-anchor-right-top.dropdown-anchor-right-bottom .dropdown-anchor,
+.dropdown-menu.dropdown-anchor-right-center.dropdown-anchor-right-bottom .dropdown-anchor,
+.dropdown-menu.dropdown-anchor-right-bottom.dropdown-anchor-right-bottom .dropdown-anchor {
+ top:calc(100% - 26px)
+}
+.dropdown-menu.dropdown-anchor-bottom-left:not(.dropdown-overlay-trigger),
+.dropdown-menu.dropdown-anchor-bottom-center:not(.dropdown-overlay-trigger),
+.dropdown-menu.dropdown-anchor-bottom-right:not(.dropdown-overlay-trigger) {
+ margin-top:-10px
+}
+.dropdown-menu.dropdown-anchor-bottom-left .dropdown-anchor,
+.dropdown-menu.dropdown-anchor-bottom-center .dropdown-anchor,
+.dropdown-menu.dropdown-anchor-bottom-right .dropdown-anchor {
+ border-right-color:transparent;
+ border-bottom-color:transparent;
+ border-left-color:transparent;
+ top:100%
+}
+.dropdown-menu.dropdown-anchor-bottom-left .dropdown-anchor::after,
+.dropdown-menu.dropdown-anchor-bottom-center .dropdown-anchor::after,
+.dropdown-menu.dropdown-anchor-bottom-right .dropdown-anchor::after {
+ border-right-color:transparent;
+ border-bottom-color:transparent;
+ border-left-color:transparent;
+ margin-top:-7px;
+ margin-left:-6px
+}
+.dropdown-menu.dropdown-anchor-bottom-left.dropdown-anchor-bottom-left .dropdown-anchor,
+.dropdown-menu.dropdown-anchor-bottom-center.dropdown-anchor-bottom-left .dropdown-anchor,
+.dropdown-menu.dropdown-anchor-bottom-right.dropdown-anchor-bottom-left .dropdown-anchor {
+ left:15px
+}
+.dropdown-menu.dropdown-anchor-bottom-left.dropdown-anchor-bottom-center .dropdown-anchor,
+.dropdown-menu.dropdown-anchor-bottom-center.dropdown-anchor-bottom-center .dropdown-anchor,
+.dropdown-menu.dropdown-anchor-bottom-right.dropdown-anchor-bottom-center .dropdown-anchor {
+ left:calc(50% - 7px)
+}
+.dropdown-menu.dropdown-anchor-bottom-left.dropdown-anchor-bottom-right .dropdown-anchor,
+.dropdown-menu.dropdown-anchor-bottom-center.dropdown-anchor-bottom-right .dropdown-anchor,
+.dropdown-menu.dropdown-anchor-bottom-right.dropdown-anchor-bottom-right .dropdown-anchor {
+ left:calc(100% - 28px)
+}
+.dropdown-menu.dropdown-anchor-left-top:not(.dropdown-overlay-trigger),
+.dropdown-menu.dropdown-anchor-left-center:not(.dropdown-overlay-trigger),
+.dropdown-menu.dropdown-anchor-left-bottom:not(.dropdown-overlay-trigger) {
+ margin-left:10px
+}
+.dropdown-menu.dropdown-anchor-left-top .dropdown-anchor,
+.dropdown-menu.dropdown-anchor-left-center .dropdown-anchor,
+.dropdown-menu.dropdown-anchor-left-bottom .dropdown-anchor {
+ border-top-color:transparent;
+ border-bottom-color:transparent;
+ border-left-color:transparent;
+ left:-14px
+}
+.dropdown-menu.dropdown-anchor-left-top .dropdown-anchor::after,
+.dropdown-menu.dropdown-anchor-left-center .dropdown-anchor::after,
+.dropdown-menu.dropdown-anchor-left-bottom .dropdown-anchor::after {
+ border-top-color:transparent;
+ border-bottom-color:transparent;
+ border-left-color:transparent;
+ margin-left:-5px;
+ margin-top:-6px
+}
+.dropdown-menu.dropdown-anchor-left-top.dropdown-anchor-left-top .dropdown-anchor,
+.dropdown-menu.dropdown-anchor-left-center.dropdown-anchor-left-top .dropdown-anchor,
+.dropdown-menu.dropdown-anchor-left-bottom.dropdown-anchor-left-top .dropdown-anchor {
+ top:11px
+}
+.dropdown-menu.dropdown-anchor-left-top.dropdown-anchor-left-center .dropdown-anchor,
+.dropdown-menu.dropdown-anchor-left-center.dropdown-anchor-left-center .dropdown-anchor,
+.dropdown-menu.dropdown-anchor-left-bottom.dropdown-anchor-left-center .dropdown-anchor {
+ top:calc(50% - 7px)
+}
+.dropdown-menu.dropdown-anchor-left-top.dropdown-anchor-left-bottom .dropdown-anchor,
+.dropdown-menu.dropdown-anchor-left-center.dropdown-anchor-left-bottom .dropdown-anchor,
+.dropdown-menu.dropdown-anchor-left-bottom.dropdown-anchor-left-bottom .dropdown-anchor {
+ top:calc(100% - 26px)
+}
+.dropdown-menu.max-height ul {
+ max-height:184px
+}
+.dropdown-menu table td{
+    color:#555;
+    background: #e4f1fb url("images/ui-bg_glass_100_e4f1fb_1x400.png") 50% 50% repeat-x;
+    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: #d7ebf9 url("images/ui-bg_glass_80_d7ebf9_1x400.png") 50% 50% repeat-x;
+ box-shadow:0 3px 5px rgba(0,0,0,0.1);
+ padding:0;
+ margin:1px;
+}
+.dropdown-menu ul li {
+ list-style:none;
+ padding:0;
+ margin:0;
+ line-height:18px;
+}
+.dropdown-menu ul li>a,
+.dropdown-menu ul li label {
+ display:block;
+ color:#000;
+ text-decoration:none;
+ line-height:18px;
+ padding:5px 15px;
+ white-space:nowrap;
+ transition:all 0.1s;
+}
+.dropdown-menu ul li>a svg,
+.dropdown-menu ul li label svg {
+ height:14px;
+ width:18px;
+ vertical-align:middle;
+ margin-left:-2px;
+ margin-right:4px;
+ margin-top:-3px
+}
+.dropdown-menu ul li>a svg path,
+.dropdown-menu ul li>a svg polygon,
+.dropdown-menu ul li label svg path,
+.dropdown-menu ul li label svg polygon {
+ transition:fill 0.1s;
+ fill:#0b0b0b
+}
+.dropdown-menu ul li>a span.greenSVG svg path,
+.dropdown-menu ul li>a span.greenSVG svg polygon,
+.dropdown-menu ul li label span.greenSVG svg path,
+.dropdown-menu ul li label span.greenSVG svg polygon {
+ fill:#B7D968
+}
+.dropdown-menu ul li>a .flag,
+.dropdown-menu ul li label .flag {
+ padding-bottom:1px
+}
+.dropdown-menu ul li>a:not(.grey):hover,
+.dropdown-menu ul li>a:hover,
+.dropdown-menu ul li label:not(.grey):hover,
+.dropdown-menu ul li label:hover {
+ background-color:#436581;
+ color:#FFF;
+ cursor:pointer
+}
+.dropdown-menu ul li>a:not(.grey):hover svg path,
+.dropdown-menu ul li>a:not(.grey):hover svg polygon,
+.dropdown-menu ul li>a:hover svg path,
+.dropdown-menu ul li>a:hover svg polygon,
+.dropdown-menu ul li label:not(.grey):hover svg path,
+.dropdown-menu ul li label:not(.grey):hover svg polygon,
+.dropdown-menu ul li label:hover svg path,
+.dropdown-menu ul li label:hover svg polygon {
+ fill:#e4f1fb url("images/ui-bg_glass_100_e4f1fb_1x400.png") 50% 50% repeat-x;
+}
+.dropdown-menu ul li>a.active,
+.dropdown-menu ul li label.active {
+ -webkit-user-select:none;
+ -moz-user-select:none;
+ user-select:none;
+ cursor:default;
+ pointer-events:none;
+ color:#999;
+ background:#745cfc
+}
+.dropdown-menu ul li>a.grey:hover,
+.dropdown-menu ul li label.grey:hover {
+ cursor:default
+}
+.dropdown-menu ul li>a.disabled,
+.dropdown-menu ul li>a.disabled:hover,
+.dropdown-menu ul li>a.disabled:active,
+.dropdown-menu ul li label.disabled,
+.dropdown-menu ul li label.disabled:hover,
+.dropdown-menu ul li label.disabled:active {
+ -webkit-user-select:none;
+ -moz-user-select:none;
+ user-select:none;
+ cursor:default;
+ pointer-events:none;
+ cursor:default;
+ color:#999
+}
+.dropdown-menu ul li.title {
+ padding:7.5px 15px;
+ background:#f6f6f6;
+ color:#999;
+ font-family:"Roboto","Open Sans",sans-serif;
+ font-size:12px;
+ text-transform:uppercase;
+ border:0;
+ border-top-left-radius:3px;
+ border-top-right-radius:3px
+}
+.dropdown-menu ul li.title.grey {
+ background:#999;
+ color:#F57C00
+}
+.dropdown-menu ul li.title.light {
+ background:#f6f6f6;
+ color:#fccfa2
+}
+.dropdown-menu ul li.title.accent {
+ background:#F57C00;
+ color:#fccfa2
+}
+.dropdown-menu ul li>a:hover small.grey {
+ opacity:0.75;
+ color:#fff
+}
+.dropdown-menu ul li:first-child.divider {
+ display:none
+}
+.dropdown-menu.right-aligned {
+ text-align:right
+}
+.dropdown-menu.right-aligned ul li a svg {
+ margin-right:0;
+ margin-left:4px
+}
+.dropdown-menu .divider {
+ height:1px;
+ border:6px solid #e4f1fb url("images/ui-bg_glass_100_e4f1fb_1x400.png") 50% 50% repeat-x;
+ margin:5px 1px;
+ overflow:hidden
+}
+.dropdown-menu.dark.assign-dropdown ul li a {
+ color:#fff
+}
+.dropdown-menu.dark.assign-dropdown ul li a:hover {
+ background:#F57C00;
+ color:#fff
+}
+.dropdown-menu.dark ul {
+ background:#32363F
+}
+.dropdown-menu.dark ul li>a,
+.dropdown-menu.dark ul li label {
+ color:#939aaa
+}
+.dropdown-menu.dark ul li>a svg path,
+.dropdown-menu.dark ul li>a svg polygon,
+.dropdown-menu.dark ul li label svg path,
+.dropdown-menu.dark ul li label svg polygon {
+ fill:#778093
+}
+.dropdown-menu.dark ul li>a.active,
+.dropdown-menu.dark ul li label.active {
+ color:#7f889a;
+ background:#393d48
+}
+.dropdown-menu.dark ul li>a.active.green,
+.dropdown-menu.dark ul li label.active.green {
+ background:#B7D968;
+ color:#fff
+}
+.dropdown-menu.dark ul li>a.active.green svg path,
+.dropdown-menu.dark ul li>a.active.green svg polygon,
+.dropdown-menu.dark ul li label.active.green svg path,
+.dropdown-menu.dark ul li label.active.green svg polygon {
+ fill:#fff
+}
+.dropdown-menu.dark ul li>a.active.accent,
+.dropdown-menu.dark ul li label.active.accent {
+ background:#F57C00;
+ color:#fff
+}
+.dropdown-menu.dark ul li>a.active.accent svg path,
+.dropdown-menu.dark ul li>a.active.accent svg polygon,
+.dropdown-menu.dark ul li label.active.accent svg path,
+.dropdown-menu.dark ul li label.active.accent svg polygon {
+ fill:#fff
+}
+.dropdown-menu.dark ul .divider {
+ background:rgba(255,255,255,0.08)
+}
+@media screen and (max-width: 420px) {
+ .dropdown-menu ul li>a {
+  line-height:32px;
+  padding-left:24px;
+  padding-right:24px
+ }
+}
diff --git a/htdocs/cgi-bin/wsrc/jquery.sweet-dropdown.js b/htdocs/cgi-bin/wsrc/jquery.sweet-dropdown.js
new file mode 100644 (file)
index 0000000..53927a0
--- /dev/null
@@ -0,0 +1,11 @@
+/*!
+ * SweetDropdown: Sweet and versatile dropdowns
+ * v1.0.0, 2017-04-09
+ * http://github.com/adeptoas/sweet-dropdown
+ *
+ * Copyright (c) 2016 Adepto.as AS ยท Oslo, Norway
+ * Dual licensed under the MIT and GPL licenses.
+ *
+ * See LICENSE-MIT.txt and LICENSE-GPL.txt
+ */
+!function($){var showDropdown;return $.fn.sweetDropdown=function(method,data){switch(method){case"attach":return $(this).attr("data-dropdown",data);case"detach":return $(this).removeAttr("data-dropdown");case"show":return $(this).click();case"hide":return $.sweetDropdown.hideAll(),$(this);case"enable":return $(this).removeClass("dropdown-disabled");case"disable":return $(this).addClass("dropdown-disabled")}},$.sweetDropdown=function(){},$.sweetDropdown.attachAll=function(){return $("body").off("click.dropdown").on("click.dropdown","[data-dropdown]",showDropdown),$("[data-dropdown]").off("click.dropdown").on("click.dropdown",showDropdown),$("html, .sweet-modal-content").off("click.dropdown").on("click.dropdown",$.sweetDropdown.hideAll),$(window).off("resize.dropdown").on("resize.dropdown",$.sweetDropdown.hideAll),!0},$.sweetDropdown.hideAll=function(e,hideException){var animTimeout,el,hideExceptionID,targetGroup,trigger;return null==e&&(e=null),null==hideException&&(hideException=null),targetGroup=e?$(e.target).parents().addBack():null,targetGroup&&targetGroup.hasClass("dropdown-menu")&&!targetGroup.is("A")?void 0:(el=".dropdown-menu",trigger="[data-dropdown]",hideExceptionID="",hideException&&(hideExceptionID=$(hideException).attr("id"),$('[data-dropdown="#'+hideExceptionID+'"]').hasClass("dropdown-open")||(el=".dropdown-menu:not(#"+hideExceptionID+")",trigger='[data-dropdown!="#'+hideExceptionID+'"]')),$("body").find(el).removeClass("dropdown-opened").end().find(trigger).removeClass("dropdown-open"),animTimeout=window.setTimeout(function(){return $("body").find(el).hide().end()},200),!0)},$.sweetDropdown.ANCHOR_POSITIONS=["top-left","top-center","top-right","right-top","right-center","right-bottom","bottom-left","bottom-center","bottom-right","left-top","left-center","left-bottom"],$.sweetDropdown.defaults={anchorPosition:"center"},showDropdown=function(e){var $anchor,$dropdown,$trigger,addAnchorX,addAnchorY,addX,addY,anchorPosition,anchorSide,bottomTrigger,hasAnchor,heightDropdown,heightTrigger,i,isDisabled,isOpen,left,leftTrigger,len,position,positionParts,ref,rightTrigger,top,topTrigger,widthDropdown,widthTrigger;if(null==e&&(e=null),$trigger=$(this),$dropdown=$($trigger.data("dropdown")),$anchor=$dropdown.find(".dropdown-anchor"),hasAnchor=$dropdown.hasClass("dropdown-has-anchor"),isOpen=$trigger.hasClass("dropdown-open"),isDisabled=$trigger.hasClass("dropdown-disabled"),widthDropdown=$dropdown.outerWidth(),widthTrigger=$trigger.outerWidth(),heightDropdown=$dropdown.outerHeight(),heightTrigger=$trigger.outerHeight(),topTrigger=$trigger.position().top,leftTrigger=$trigger.position().left,$trigger.hasClass("dropdown-use-offset")&&(topTrigger=$trigger.offset().top,leftTrigger=$trigger.offset().left),bottomTrigger=topTrigger+heightTrigger,rightTrigger=leftTrigger+widthTrigger,$dropdown.length<1)return console.error("[SweetDropdown] Could not find dropdown: "+$(this).data("dropdown"));if($anchor.length<1&&hasAnchor&&($anchor=$('<div class="dropdown-anchor"></div>'),$dropdown.prepend($anchor)),void 0!==e&&(e.preventDefault(),e.stopPropagation()),isOpen||isDisabled)return!1;for($.sweetDropdown.hideAll(null,$trigger.data("dropdown")),anchorPosition=$.sweetDropdown.defaults.anchorPosition,ref=$.sweetDropdown.ANCHOR_POSITIONS,i=0,len=ref.length;len>i;i++)position=ref[i],$dropdown.hasClass("dropdown-anchor-"+position)&&(anchorPosition=position);if(top=0,left=0,positionParts=anchorPosition.split("-"),anchorSide=positionParts[0],anchorPosition=positionParts[1],"top"===anchorSide||"bottom"===anchorSide)switch(anchorPosition){case"left":left=leftTrigger;break;case"center":left=leftTrigger-widthDropdown/2+widthTrigger/2;break;case"right":left=rightTrigger-widthDropdown}if("left"===anchorSide||"right"===anchorSide)switch(anchorPosition){case"top":top=topTrigger;break;case"center":top=topTrigger-heightDropdown/2+heightTrigger/2;break;case"bottom":top=topTrigger+heightTrigger-heightDropdown}switch(anchorSide){case"top":top=topTrigger+heightTrigger;break;case"right":left=leftTrigger-widthDropdown;break;case"bottom":top=topTrigger-heightDropdown;break;case"left":left=leftTrigger+widthTrigger}return addX=parseInt($dropdown.data("add-x")),addY=parseInt($dropdown.data("add-y")),isNaN(addX)||(left+=addX),isNaN(addY)||(top+=addY),addAnchorX=parseInt($trigger.data("add-anchor-x")),addAnchorY=parseInt($trigger.data("add-anchor-y")),isNaN(addAnchorX)||$anchor.css({marginLeft:addAnchorX}),isNaN(addAnchorY)||$anchor.css({marginTop:addAnchorY}),$dropdown.css({top:top,left:left,display:"block"}),window.setTimeout(function(){return $dropdown.addClass("dropdown-opened")},0),$trigger.addClass("dropdown-open"),$trigger},$(function(){return $.sweetDropdown.attachAll()})}(jQuery);
\ No newline at end of file
index 7ddb753f2ecc755c9f0c624f43c0b215ba312e16..9b975036020b68180d468e3a80f42448a6dffce1 100644 (file)
@@ -50,11 +50,32 @@ th,
     text-align: left;
 }
 
+#cat_desc {
+    position: absolute;
+    border: 2px solid #94cde7;
+    padding: 5px;
+    text-align: center;
+    background: #ccffff;
+    margin-top: 15px;
+    margin-left: 200px;
+    width: 400px;
+    text-decoration-style: wavy;
+
+}
+.span_cat {
+    border:1px solid #b2f8ef;
+    border-style: inset; 
+    padding: 2px;
+    padding-right: 5px;
+    width: 180px;
+}
+
 .r0 {
     background-color: #e6ffff;
     border: 1px solid black;
-    border-right: 1px solid black;
+    border-right: 2px solid black;
     vertical-align: top;
+    padding:2px;
 }
 .r1 {
     background-color: #ccffff;
@@ -128,7 +149,7 @@ div#rz {
 }
 
 #tag_FRM {
-    border: 2px solid rgb(148, 205, 231);
+    border: 2px solid #94cde7;
     padding: 5px;
     text-align: right;
     vertical-align: top;
@@ -139,17 +160,6 @@ img {
     padding: 0 10px
 }
 
-#cat_desc {
-    position: absolute;
-    border: 2px solid #94cde7;
-    padding: 5px;
-    text-align: center;
-    background: #ccffff;
-    margin-top: 15px;
-    width: 280px;
-    text-decoration-style: wavy;
-}
-
 #menu {
     position: fixed;
     float: left;
index 683f19ede921ac07ed0b998c94182c8165e24e41..fe08c36d0777f29e05fb90caa728a9647c7f8529 100644 (file)
@@ -137,15 +137,26 @@ img {
     padding: 0 10px
 }
 
+
 #cat_desc {
     position: absolute;
     border: 2px solid #7a3d03;
     padding: 5px;
     text-align: center;
     background: #c28a4a;
-    margin-top: 15px;
+
+    margin-top: 20px;
+    margin-left: 200px;
     width: 280px;
     text-decoration-style: wavy;
+
+}
+.span_cat {
+    border:1px solid #7a3d03;
+    border-style: outset;
+    padding: 2px;
+    padding-right: 5px;
+    width: 180px;
 }
 
 #menu {
index ddff7fd231233a44e2cc61419088230445a2c373..6cf65f8d8d89917474d58fb6b55ac0baa76a7fd5 100644 (file)
@@ -151,9 +151,18 @@ img {
     text-align: center;
     background: #0f0f0f;
     color: #d8d8d8;
-    margin-top: 15px;
+    margin-top: 20px;
+    margin-left: 200px;
     width: 280px;
     text-decoration-style: wavy;
+
+}
+.span_cat {
+    border:1px solid #9bb6c3;
+    border-style: outset;
+    padding: 2px;
+    padding-right: 5px;
+    width: 180px;
 }
 
 #menu {
index 68ffbcf496cd3d13ebe4a7d209c94426f5687b75..7cd55c3e7a38bf62fd2de97fe953b3723d30fc34 100644 (file)
@@ -139,17 +139,28 @@ img {
     padding: 0 10px
 }
 
+
 #cat_desc {
     position: absolute;
     border: 2px solid black;
     padding: 5px;
     text-align: center;
     background: #D4AF37;
-    margin-top: 15px;
+    margin-top: 20px;
+    margin-left: 200px;
     width: 280px;
     text-decoration-style: wavy;
+
+}
+.span_cat {
+    border:1px solid #b2f8ef;
+    border-style: outset;
+    padding: 2px;
+    padding-right: 5px;
+    width: 180px;
 }
 
+
 #menu {
     position: fixed;
     float: left;