Просмотр исходного кода

Fix enumeration for time periodes, in SquiLu/Squirrel enum do not behave like in C/C++.
Comment css html,body height 100%.

mingodad 12 лет назад
Родитель
Сommit
aff19c7e1b
3 измененных файлов с 8 добавлено и 4 удалено
  1. 1 1
      SquiLu-ourbiz/ourbiz-client.nut
  2. 4 1
      SquiLu-ourbiz/ourbiz.nut
  3. 3 2
      SquiLu-ourbiz/s/ourbiz/index.html

+ 1 - 1
SquiLu-ourbiz/ourbiz-client.nut

@@ -240,7 +240,7 @@ class HTTPConnBin extends HTTPConnAuthBase
 enum conn_type_e {e_conn_none, e_conn_http, e_conn_dbfile};
 
 constants.rawdelete("TimePeriode");
-enum TimePeriode {is_years = 1, is_months, is_weeks, is_days};
+enum TimePeriode {is_years = 1, is_months = 2, is_weeks = 3, is_days = 4};
 
 function getStatisticsPeriodeType(speriode){
 	if(speriode == "years") return TimePeriode.is_years;

+ 4 - 1
SquiLu-ourbiz/ourbiz.nut

@@ -285,7 +285,9 @@ local function mkSLEArray(str_buf, header, body, doAppend=false)
 }
 
 constants.rawdelete("TimePeriode");
-enum TimePeriode {is_years = 1, is_months, is_weeks, is_days};
+
+//enum do not does autonumber with initialization
+enum TimePeriode {is_years = 1, is_months = 2, is_weeks = 3, is_days = 4};
 
 local function getStatisticsPeriodeType(speriode){
 	if(speriode == C_years) return TimePeriode.is_years;
@@ -295,6 +297,7 @@ local function getStatisticsPeriodeType(speriode){
 }
 
 local function get_sql_bar_chart_statistics_periodes (periode_count, periode_type){
+
 	local speriode2;
 	local periodeMultiplier = 1;
 	local speriode;

+ 3 - 2
SquiLu-ourbiz/s/ourbiz/index.html

@@ -9,7 +9,7 @@
 
 <style type="text/css">
 body, html {
-	height: 100%;
+	/*height: 100%;*/
 	margin: 0;
 	padding: 0;
 }
@@ -112,7 +112,7 @@ table {border-collapse:collapse;}
 .wrappedTable {width:100%;}
 .wrappedTable th {
   color: #eee; background: #4e8c0b; text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
-	border: 1px solid #fff;
+  border: 1px solid #fff;
 }
 .wrappedTable tr td {border: 1px solid #ccc; padding-left: 5px; padding-right:5px;}
 .wrappedTable tr:hover td { background: #CAEFFD; color: #0768B3; cursor: pointer; }
@@ -187,6 +187,7 @@ tbody.firstRight tr > td:nth-child(4) input {width:7em;}
 input:focus, textarea:focus, select:focus {background-color: yellow;} 
 input[type=checkbox]:focus + label, input[type=radio]:focus + label {
 	background-color: yellow;
+	border:1px dashed #ccc;
 }
 
 .context-menu {