Version 14.49.1

This commit is contained in:
Antonio Cañas Vargas 2014-12-31 13:30:26 +01:00
parent e981d4623e
commit 7cd3d217d2
5 changed files with 39 additions and 25 deletions

View File

@ -338,14 +338,15 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
#CENTRAL_ZONE
{
min-width:740px;
min-height:740px;
width:100%;
margin:-7px 0 0 0;
padding:10px 0;
border-radius:6px;
box-shadow:inset -2px -2px 1px 0 rgba(50, 50, 50, 0.2);
text-align:center;
overflow:hidden;
vertical-align:top;
overflow:hidden;
position:relative;
display:inline-block;
}

View File

@ -193,13 +193,16 @@ p {margin:0;}
#CENTRAL_ZONE
{
min-width:740px;
min-height:740px;
width:100%;
margin:-6px 0 0 0;
padding:10px 0;
border-radius:8px;
box-shadow:inset -2px -2px 1px 0 rgba(50, 50, 50, 0.2);
text-align:center;
vertical-align:top;
overflow:hidden;
position:relative;
display:inline-block;
}

View File

@ -35,11 +35,12 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 14.49 (2014/12/31)"
#define Log_PLATFORM_VERSION "SWAD 14.49.1 (2014/12/31)"
// 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 | tail -1
/*
Version 14.49.1 :Dec 31, 2014 Changes in layout. (174432 lines)
Version 14.49 :Dec 31, 2014 Option to admin one user removed from main menu.
Fixed bugs in layout.
Fixed bugs in admin of one user. (174419 lines)

View File

@ -289,7 +289,7 @@
#define Cfg_MIN_NUM_COURSES_TO_CONFIRM_SHOW_BIG_LIST 500 // If the number of courses in a list is greater than this, ask me for confirmation before showing the list
/* Layout */
#define Cfg_LAYOUT_MOBILE_NUM_COLUMNS 4
#define Cfg_LAYOUT_MOBILE_NUM_COLUMNS 3
/* Notifications */
#define Cfg_MAX_CHARS_NOTIF_SUMMARY_SWAD 50

View File

@ -130,7 +130,7 @@ void Lay_WriteStartOfPage (void)
extern const unsigned Txt_Current_CGI_SWAD_Language;
extern const char *The_TabOnBgColors[The_NUM_THEMES];
extern const char *Txt_NEW_YEAR_GREETING;
unsigned ColspanCentralPart = 3;
unsigned ColspanCentralPart;
// char QueryDebug[1024];
/***** If, when this function is called, the head is being written, or the head is already written ==>
@ -259,17 +259,27 @@ void Lay_WriteStartOfPage (void)
Lay_WritePageTopHeading ();
if (Gbl.Prefs.Layout == Lay_LAYOUT_DESKTOP)
switch (Gbl.Prefs.Layout)
{
if (Gbl.Prefs.SideCols == Lay_SHOW_BOTH_COLUMNS) // 11: both side columns visible, left and right
ColspanCentralPart = 1;
else if (Gbl.Prefs.SideCols != Lay_HIDE_BOTH_COLUMNS) // 10 or 01: only one side column visible, left or right
ColspanCentralPart = 2;
case Lay_LAYOUT_DESKTOP:
if (Gbl.Prefs.SideCols == Lay_SHOW_BOTH_COLUMNS)
ColspanCentralPart = 1; // 11: both side columns visible, left and right
else if (Gbl.Prefs.SideCols == Lay_HIDE_BOTH_COLUMNS)
ColspanCentralPart = 3; // 00: both side columns hidden
else
ColspanCentralPart = 2; // 10 or 01: only one side column visible, left or right
break;
case Lay_LAYOUT_MOBILE:
ColspanCentralPart = 3;
break;
default:
break;
}
fprintf (Gbl.F.Out,"<td colspan=\"%u\" style=\"text-align:center;"
" vertical-align:top;\">"
"<div id=\"CENTRAL_ZONE\""
" style=\"vertical-align:top; background-color:%s;\">"
" style=\"background-color:%s;\">"
"<table style=\"width:100%%; vertical-align:top;\">"
"<tr>",
ColspanCentralPart,
@ -290,15 +300,6 @@ void Lay_WriteStartOfPage (void)
" vertical-align:top;\">");
Lay_WriteMenuThisTabDesktop ();
fprintf (Gbl.F.Out,"</td>");
/* Start of main zone for actions output */
fprintf (Gbl.F.Out,"<td style=\"text-align:left; vertical-align:top;\">");
Usr_WarningWhenDegreeTypeDoesntAllowDirectLogin ();
/* If it is mandatory to read any information about course */
if (Gbl.CurrentCrs.Info.ShowMsgMustBeRead)
Inf_WriteMsgYouMustReadInfo ();
break;
case Lay_LAYOUT_MOBILE:
/* Tab content */
@ -318,6 +319,16 @@ void Lay_WriteStartOfPage (void)
}
/***** Main zone *****/
/* Start of main zone for actions output */
fprintf (Gbl.F.Out,"<td style=\"padding:0 10px 10px 10px;"
" text-align:left; vertical-align:top;\">");
Usr_WarningWhenDegreeTypeDoesntAllowDirectLogin ();
/* If it is mandatory to read any information about course */
if (Gbl.CurrentCrs.Info.ShowMsgMustBeRead)
Inf_WriteMsgYouMustReadInfo ();
/* Write title of the current action */
if (Gbl.Prefs.Layout == Lay_LAYOUT_DESKTOP &&
Act_Actions[Act_Actions[Gbl.CurrentAct].SuperAction].IndexInMenu >= 0)
@ -1131,7 +1142,7 @@ static void Lay_WriteMenuThisTabDesktop (void)
{
IsTheSelectedAction = (NumAct == Act_Actions[Gbl.CurrentAct].SuperAction);
Title = Act_GetTitleAction (NumAct);
Title = Act_GetSubtitleAction (NumAct);
if (SeparationBetweenPreviousAndCurrentOption)
{
@ -1217,7 +1228,7 @@ static void Lay_WriteMenuThisTabMobile (void)
break;
if (Act_CheckIfIHavePermissionToExecuteAction (NumAct))
{
Title = Act_GetTitleAction (NumAct);
Title = Act_GetSubtitleAction (NumAct);
if (NumOptVisible % Cfg_LAYOUT_MOBILE_NUM_COLUMNS == 0)
fprintf (Gbl.F.Out,"<tr>");
@ -1232,8 +1243,8 @@ static void Lay_WriteMenuThisTabMobile (void)
(NumAct == Act_Actions[Gbl.CurrentAct].SuperAction) ? The_ClassMenuOn[Gbl.Prefs.Theme] :
The_ClassMenuOff[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/%s/%s64x64.gif\""
" alt=\"%s\" title=\"%s\""
" class=\"ICON64x64\" style=\"margin:4px;\" />"
" alt=\"\" class=\"ICON64x64\""
" style=\"margin:4px;\" />"
"<div>%s</div>"
"</a>"
"</form>"
@ -1241,8 +1252,6 @@ static void Lay_WriteMenuThisTabMobile (void)
"</td>",
Gbl.Prefs.PathIconSet,Cfg_ICON_ACTION_64x64,
Act_Actions[NumAct].Icon,
Title,
Title,
Txt_MENU_BR[Gbl.CurrentTab][NumOptInMenu]);
if ((NumOptVisible % Cfg_LAYOUT_MOBILE_NUM_COLUMNS) ==