Version 15.48

This commit is contained in:
Antonio Cañas Vargas 2015-11-27 21:24:24 +01:00
parent 8b85c15271
commit d48ff5f23e
12 changed files with 68 additions and 67 deletions

View File

@ -348,17 +348,10 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
/*********************** Layout (fourth row, main zone) **********************/ /*********************** Layout (fourth row, main zone) **********************/
#main_zone #main_zone
{ {
box-sizing:border-box;
display:table; display:table;
width:100%; width:100%;
} }
.LEFT_RIGHT_COL
{
display:table-cell;
width:160px;
text-align:center;
vertical-align:top;
position:absolute;
}
.LEFT_RIGHT_CELL .LEFT_RIGHT_CELL
{ {
padding:3px 6px; padding:3px 6px;
@ -379,13 +372,11 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
} }
#left_col #left_col
{ {
left:0; display:none;
visibility:hidden;
} }
#right_col #right_col
{ {
right:0; display:none;
visibility:hidden;
} }
} }
@media only screen and (min-width: 1280px) { /* For desktop */ @media only screen and (min-width: 1280px) { /* For desktop */
@ -400,7 +391,6 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
display:table-cell; display:table-cell;
text-align:center; text-align:center;
vertical-align:top; vertical-align:top;
padding-left:160px;
} }
#main_zone_central_right /* Hide left column, show right column */ #main_zone_central_right /* Hide left column, show right column */
{ {
@ -414,23 +404,30 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
display:table-cell; display:table-cell;
text-align:center; text-align:center;
vertical-align:top; vertical-align:top;
padding-left:160px;
padding-right:160px; padding-right:160px;
} }
#left_col #left_col
{ {
left:0; display:table-cell;
width:160px;
text-align:center;
vertical-align:top;
} }
#right_col #right_col
{ {
display:table-cell;
width:160px;
text-align:center;
vertical-align:top;
position:absolute;
right:0; right:0;
} }
} }
#main_zone_central_container #main_zone_central_container
{ {
min-width:925px; min-width:900px;
min-height:925px; min-height:900px;
margin:-8px 0 0 0; margin:-8px 0 0 0;
padding:10px 0; padding:10px 0;
border-radius:6px; border-radius:6px;
@ -1496,15 +1493,22 @@ a:hover img.CENTRE_PHOTO_SHOW
} }
/********************************** Page foot ********************************/ /********************************** Page foot ********************************/
#foot_zone
{
box-sizing:border-box;
padding:20px;
}
.FOOT_LIST_CONTAINER .FOOT_LIST_CONTAINER
{ {
position:relative; position:relative;
float:left; float:left;
text-align:left;
padding-bottom:20px;
} }
.FOOT_LIST_TITLE .FOOT_LIST_TITLE
{ {
color:#666; color:#666;
font-size:1em; font-size:14pt;
font-weight:bold; font-weight:bold;
white-space:nowrap; white-space:nowrap;
} }
@ -1514,7 +1518,7 @@ a:hover img.CENTRE_PHOTO_SHOW
margin:0; margin:0;
padding:0; padding:0;
border-width:0; border-width:0;
font-size:0.9em; font-size:12pt;
white-space:nowrap; white-space:nowrap;
line-height:140%; line-height:140%;
} }
@ -1525,5 +1529,5 @@ a:hover img.CENTRE_PHOTO_SHOW
.FOOT .FOOT
{ {
color:#A0A0A0; color:#A0A0A0;
font-size:10pt; font-size:12pt;
} }

View File

@ -1,5 +1,5 @@
<div style="margin:0 10%"> <div>
<div class="FOOT_LIST_CONTAINER" style="width:17%;"> <div class="FOOT_LIST_CONTAINER" style="width:20%;">
<h2 title="Information" class="FOOT_LIST_TITLE">Information</h2> <h2 title="Information" class="FOOT_LIST_TITLE">Information</h2>
<ul class="FOOT_LIST"> <ul class="FOOT_LIST">
<li><a href="https://openswad.org/info/" target="_blank" class="FOOT_LINK" title="What is SWAD?"> <li><a href="https://openswad.org/info/" target="_blank" class="FOOT_LINK" title="What is SWAD?">
@ -16,7 +16,7 @@
Shop</a></li> Shop</a></li>
</ul> </ul>
</div> </div>
<div class="FOOT_LIST_CONTAINER" style="width:17%;"> <div class="FOOT_LIST_CONTAINER" style="width:20%;">
<h2 title="Documentation" class="FOOT_LIST_TITLE">Documentation</h2> <h2 title="Documentation" class="FOOT_LIST_TITLE">Documentation</h2>
<ul class="FOOT_LIST"> <ul class="FOOT_LIST">
<li><a href="https://openswad.org/SWAD-manual-EN.pdf" target="_blank" class="FOOT_LINK" title="Manual (EN)"> <li><a href="https://openswad.org/SWAD-manual-EN.pdf" target="_blank" class="FOOT_LINK" title="Manual (EN)">
@ -31,7 +31,7 @@
Tools</a></li> Tools</a></li>
</ul> </ul>
</div> </div>
<div class="FOOT_LIST_CONTAINER" style="width:17%;"> <div class="FOOT_LIST_CONTAINER" style="width:20%;">
<h2 title="Information" class="FOOT_LIST_TITLE">Social</h2> <h2 title="Information" class="FOOT_LIST_TITLE">Social</h2>
<ul class="FOOT_LIST"> <ul class="FOOT_LIST">
<li><a href="http://twitter.com/openswad" target="_blank" class="FOOT_LINK" title="Twitter"> <li><a href="http://twitter.com/openswad" target="_blank" class="FOOT_LINK" title="Twitter">
@ -54,7 +54,7 @@
Open HUB</a></li> Open HUB</a></li>
</ul> </ul>
</div> </div>
<div class="FOOT_LIST_CONTAINER" style="width:17%;"> <div class="FOOT_LIST_CONTAINER" style="width:20%;">
<h2 title="Free software" class="FOOT_LIST_TITLE">Free software</h2> <h2 title="Free software" class="FOOT_LIST_TITLE">Free software</h2>
<ul class="FOOT_LIST"> <ul class="FOOT_LIST">
<li><a href="https://openswad.org/source/" target="_blank" class="FOOT_LINK" title="Source code"> <li><a href="https://openswad.org/source/" target="_blank" class="FOOT_LINK" title="Source code">
@ -79,18 +79,7 @@
Final Year Projects</a></li> Final Year Projects</a></li>
</ul> </ul>
</div> </div>
<div class="FOOT_LIST_CONTAINER" style="width:17%;"> <div class="FOOT_LIST_CONTAINER" style="width:20%;">
<h2 title="Installations" class="FOOT_LIST_TITLE">Installations</h2>
<ul class="FOOT_LIST">
<li><a href="https://openswad.org/" target="_blank" class="FOOT_LINK" title="OpenSWAD.org">
OpenSWAD.org</a></li>
<li><a href="https://swad.ugr.es/" target="_blank" class="FOOT_LINK" title="UGR (Spain)">
UGR (Spain)</a></li>
<li><a href="http://www.cevuna.una.py/swad/" target="_blank" class="FOOT_LINK" title="UNA (Paraguay)">
UNA (Paraguay)</a></li>
</ul>
</div>
<div class="FOOT_LIST_CONTAINER" style="width:15%;">
<h2 title="Mobile" class="FOOT_LIST_TITLE">Mobile</h2> <h2 title="Mobile" class="FOOT_LIST_TITLE">Mobile</h2>
<ul class="FOOT_LIST"> <ul class="FOOT_LIST">
<li> <li>

View File

@ -956,6 +956,6 @@ void Ban_ClickOnBanner (void)
// See: http://stackoverflow.com/questions/381954/how-do-i-fix-firefox-trying-to-save-image-as-htm // See: http://stackoverflow.com/questions/381954/how-do-i-fix-firefox-trying-to-save-image-as-htm
// http://elouai.com/force-download.php // http://elouai.com/force-download.php
Gbl.Layout.HTMLStartWritten = Gbl.Layout.HTMLStartWritten =
Gbl.Layout.TablEndWritten = Gbl.Layout.DivsEndWritten =
Gbl.Layout.HTMLEndWritten = true; // Don't write HTML at all Gbl.Layout.HTMLEndWritten = true; // Don't write HTML at all
} }

View File

@ -115,12 +115,13 @@
/****************************** Public constants *****************************/ /****************************** Public constants *****************************/
/*****************************************************************************/ /*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 15.47.4 (2015/11/27)" #define Log_PLATFORM_VERSION "SWAD 15.48 (2015/11/27)"
// Number of lines (includes comments but not blank lines) has been got with the following command: // Number of lines (includes comments but not blank lines) has been got with the following command:
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1 // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
/* /*
Version 15.47.4: Nov 27, 2015 Fixed CSS problem in layout. (? lines) Version 15.48: Nov 27, 2015 Fixed problems in layout. (186384 lines)
Version 15.47.4: Nov 27, 2015 Fixed CSS problem in layout. (186374 lines)
Version 15.47.3: Nov 27, 2015 Responsive design in notifications. (186365 lines) Version 15.47.3: Nov 27, 2015 Responsive design in notifications. (186365 lines)
Version 15.47.2: Nov 27, 2015 Responsive design in current local date and time. (? lines) Version 15.47.2: Nov 27, 2015 Responsive design in current local date and time. (? lines)
Version 15.47.1: Nov 27, 2015 swad_desktop.css is renamed to swad.css. Version 15.47.1: Nov 27, 2015 swad_desktop.css is renamed to swad.css.

View File

@ -543,5 +543,5 @@ void Cht_OpenChatWindow (void)
/***** Close index.html file *****/ /***** Close index.html file *****/
fclose (FileChat); fclose (FileChat);
Gbl.Layout.TablEndWritten = Gbl.Layout.HTMLEndWritten = true; Gbl.Layout.DivsEndWritten = Gbl.Layout.HTMLEndWritten = true;
} }

View File

@ -149,7 +149,7 @@ bool Fil_ReadStdinIntoTmpFile (void)
/* Don't write HTML at all */ /* Don't write HTML at all */
Gbl.Layout.HTMLStartWritten = Gbl.Layout.HTMLStartWritten =
Gbl.Layout.TablEndWritten = Gbl.Layout.DivsEndWritten =
Gbl.Layout.HTMLEndWritten = true; Gbl.Layout.HTMLEndWritten = true;
/* Start HTTP response */ /* Start HTTP response */

View File

@ -8172,7 +8172,7 @@ void Brw_RcvFileInFileBrwDropzone (void)
is a code status and a message for Dropzone.js *****/ is a code status and a message for Dropzone.js *****/
/* Don't write HTML at all */ /* Don't write HTML at all */
Gbl.Layout.HTMLStartWritten = Gbl.Layout.HTMLStartWritten =
Gbl.Layout.TablEndWritten = Gbl.Layout.DivsEndWritten =
Gbl.Layout.HTMLEndWritten = true; Gbl.Layout.HTMLEndWritten = true;
/* Start HTTP response */ /* Start HTTP response */
@ -9273,7 +9273,7 @@ void Brw_DownloadFile (void)
// See: http://stackoverflow.com/questions/381954/how-do-i-fix-firefox-trying-to-save-image-as-htm // See: http://stackoverflow.com/questions/381954/how-do-i-fix-firefox-trying-to-save-image-as-htm
// http://elouai.com/force-download.php // http://elouai.com/force-download.php
Gbl.Layout.HTMLStartWritten = Gbl.Layout.HTMLStartWritten =
Gbl.Layout.TablEndWritten = Gbl.Layout.DivsEndWritten =
Gbl.Layout.HTMLEndWritten = true; // Don't write HTML at all Gbl.Layout.HTMLEndWritten = true; // Don't write HTML at all
} }
else // !ICanView else // !ICanView

View File

@ -118,7 +118,7 @@ void Gbl_InitializeGlobals (void)
Gbl.Layout.WritingHTMLStart = Gbl.Layout.WritingHTMLStart =
Gbl.Layout.HTMLStartWritten = Gbl.Layout.HTMLStartWritten =
Gbl.Layout.TablEndWritten = Gbl.Layout.DivsEndWritten =
Gbl.Layout.HTMLEndWritten = false; Gbl.Layout.HTMLEndWritten = false;
Gbl.DB.DatabaseIsOpen = false; Gbl.DB.DatabaseIsOpen = false;

View File

@ -102,7 +102,7 @@ struct Globals
{ {
bool WritingHTMLStart; // Used to avoid writing the HTML head when aborting program on error bool WritingHTMLStart; // Used to avoid writing the HTML head when aborting program on error
bool HTMLStartWritten; // Used to avoid writing more than once the HTML head bool HTMLStartWritten; // Used to avoid writing more than once the HTML head
bool TablEndWritten; // Used to avoid writing more than once the HTML end bool DivsEndWritten; // Used to avoid writing more than once the HTML end
bool HTMLEndWritten; // Used to avoid writing more than once the HTML end bool HTMLEndWritten; // Used to avoid writing more than once the HTML end
} Layout; } Layout;
struct struct

View File

@ -132,7 +132,7 @@ void Lay_WriteStartOfPage (void)
{ {
fprintf (Gbl.F.Out,"Content-Type: text/html; charset=windows-1252\r\n\r\n"); fprintf (Gbl.F.Out,"Content-Type: text/html; charset=windows-1252\r\n\r\n");
Gbl.Layout.WritingHTMLStart = false; Gbl.Layout.WritingHTMLStart = false;
Gbl.Layout.HTMLStartWritten = Gbl.Layout.TablEndWritten = true; Gbl.Layout.HTMLStartWritten = Gbl.Layout.DivsEndWritten = true;
return; return;
} }
@ -140,7 +140,7 @@ void Lay_WriteStartOfPage (void)
if (Gbl.WebService.IsWebService) if (Gbl.WebService.IsWebService)
{ {
Gbl.Layout.WritingHTMLStart = false; Gbl.Layout.WritingHTMLStart = false;
Gbl.Layout.HTMLStartWritten = Gbl.Layout.TablEndWritten = true; Gbl.Layout.HTMLStartWritten = Gbl.Layout.DivsEndWritten = true;
return; return;
} }
@ -247,7 +247,7 @@ void Lay_WriteStartOfPage (void)
fprintf (Gbl.F.Out,"<body>\n"); fprintf (Gbl.F.Out,"<body>\n");
Gbl.Layout.WritingHTMLStart = false; Gbl.Layout.WritingHTMLStart = false;
Gbl.Layout.HTMLStartWritten = Gbl.Layout.HTMLStartWritten =
Gbl.Layout.TablEndWritten = true; Gbl.Layout.DivsEndWritten = true;
return; return;
} }
@ -263,20 +263,24 @@ void Lay_WriteStartOfPage (void)
/* Left column */ /* Left column */
if (Gbl.Prefs.SideCols & Lay_SHOW_LEFT_COLUMN) // Left column visible if (Gbl.Prefs.SideCols & Lay_SHOW_LEFT_COLUMN) // Left column visible
{ {
fprintf (Gbl.F.Out,"<div id=\"left_col\" class=\"LEFT_RIGHT_COL\">"); fprintf (Gbl.F.Out,"<div id=\"left_col\">");
Lay_ShowLeftColumn (); Lay_ShowLeftColumn ();
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
} }
/* Right column */ /* Right column */
// Right column is written before central column
// but it must be drawn at right using "position:absolute; right:0".
// The reason to write right column before central column
// is that central column may hold a lot of content drawn slowly.
if (Gbl.Prefs.SideCols & Lay_SHOW_RIGHT_COLUMN) // Right column visible if (Gbl.Prefs.SideCols & Lay_SHOW_RIGHT_COLUMN) // Right column visible
{ {
fprintf (Gbl.F.Out,"<div id=\"right_col\" class=\"LEFT_RIGHT_COL\">"); fprintf (Gbl.F.Out,"<div id=\"right_col\">");
Lay_ShowRightColumn (); Lay_ShowRightColumn ();
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
} }
/* Central (main) part */ /* Central (main) column */
switch (Gbl.Prefs.SideCols) switch (Gbl.Prefs.SideCols)
{ {
case 0: case 0:
@ -349,15 +353,23 @@ void Lay_WriteStartOfPage (void)
static void Lay_WriteEndOfPage (void) static void Lay_WriteEndOfPage (void)
{ {
if (!Gbl.Layout.TablEndWritten) if (!Gbl.Layout.DivsEndWritten)
{ {
/***** End of central part of main zone *****/
fprintf (Gbl.F.Out,"</div>" // main_zone_canvas fprintf (Gbl.F.Out,"</div>" // main_zone_canvas
"</div>" // main_zone_central_content "</div>" // main_zone_central_content
"</div>" // main_zone_central_container "</div>"); // main_zone_central_container
"</div>" // main_zone_central
/***** Write page footer *****/
if (Act_Actions[Gbl.CurrentAct].BrowserWindow == Act_MAIN_WINDOW)
Lay_WritePageFooter ();
/***** End of main zone and page *****/
fprintf (Gbl.F.Out,"</div>" // main_zone_central
"</div>" // main_zone "</div>" // main_zone
"</div>\n"); // whole_page_* (box that contains the whole page except the foot) "</div>\n"); // whole_page_* (box that contains the whole page except the foot)
Gbl.Layout.TablEndWritten = true;
Gbl.Layout.DivsEndWritten = true;
} }
} }
@ -1218,10 +1230,6 @@ void Lay_ShowErrorAndExit (const char *Message)
/***** Compute time to send page *****/ /***** Compute time to send page *****/
Sta_ComputeTimeToSendPage (); Sta_ComputeTimeToSendPage ();
/***** Write page footer *****/
if (Act_Actions[Gbl.CurrentAct].BrowserWindow == Act_MAIN_WINDOW)
Lay_WritePageFooter ();
/***** Log access *****/ /***** Log access *****/
Sta_LogAccess (Message); Sta_LogAccess (Message);
@ -1318,7 +1326,7 @@ void Lay_RefreshNotifsAndConnected (void)
fprintf (Gbl.F.Out,"%ld|",Gbl.Usrs.Connected.Lst[NumUsr].TimeDiff); fprintf (Gbl.F.Out,"%ld|",Gbl.Usrs.Connected.Lst[NumUsr].TimeDiff);
/***** All the output is made, so don't write anymore *****/ /***** All the output is made, so don't write anymore *****/
Gbl.Layout.TablEndWritten = Gbl.Layout.HTMLEndWritten = true; Gbl.Layout.DivsEndWritten = Gbl.Layout.HTMLEndWritten = true;
} }
/*****************************************************************************/ /*****************************************************************************/
@ -1332,7 +1340,7 @@ void Lay_RefreshLastClicks (void)
Con_GetAndShowLastClicks (); Con_GetAndShowLastClicks ();
/***** All the output is made, so don't write anymore *****/ /***** All the output is made, so don't write anymore *****/
Gbl.Layout.TablEndWritten = Gbl.Layout.HTMLEndWritten = true; Gbl.Layout.DivsEndWritten = Gbl.Layout.HTMLEndWritten = true;
} }
/*****************************************************************************/ /*****************************************************************************/
@ -1344,10 +1352,9 @@ void Lay_WritePageFooter (void)
extern const char *Txt_About_X; extern const char *Txt_About_X;
extern const char *Txt_Questions_and_problems; extern const char *Txt_Questions_and_problems;
Lay_WriteFootFromHTMLFile (); fprintf (Gbl.F.Out,"<div id=\"foot_zone\" class=\"FOOT\">");
fprintf (Gbl.F.Out,"<div class=\"FOOT CENTER_MIDDLE\"" Lay_WriteFootFromHTMLFile ();
" style=\"padding-bottom:12px;\">");
/***** Institution and centre hosting the platform *****/ /***** Institution and centre hosting the platform *****/
fprintf (Gbl.F.Out,"<a href=\"%s\" class=\"FOOT\" target=\"_blank\">" fprintf (Gbl.F.Out,"<a href=\"%s\" class=\"FOOT\" target=\"_blank\">"

View File

@ -690,7 +690,7 @@ void Mrk_ShowMyMarks (void)
Fil_FastCopyOfOpenFiles (FileUsrMarks,Gbl.F.Out); Fil_FastCopyOfOpenFiles (FileUsrMarks,Gbl.F.Out);
fclose (FileUsrMarks); fclose (FileUsrMarks);
Gbl.Layout.TablEndWritten = Gbl.Layout.HTMLEndWritten = true; Gbl.Layout.DivsEndWritten = Gbl.Layout.HTMLEndWritten = true;
} }
else // Problems in table of marks or user's ID not found else // Problems in table of marks or user's ID not found
{ {

View File

@ -1062,5 +1062,5 @@ void Plg_WebService (void)
Svc_WebService (); Svc_WebService ();
/***** All the output is made, so don't write anymore *****/ /***** All the output is made, so don't write anymore *****/
Gbl.Layout.TablEndWritten = Gbl.Layout.HTMLEndWritten = true; Gbl.Layout.DivsEndWritten = Gbl.Layout.HTMLEndWritten = true;
} }