Version 15.49.2

This commit is contained in:
Antonio Cañas Vargas 2015-11-29 18:32:57 +01:00
parent 4ee4070ffb
commit 2fc7ce4f4c
4 changed files with 163 additions and 120 deletions

View File

@ -285,6 +285,10 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
vertical-align:middle;
overflow:hidden;
}
.TAB_OFF a:hover
{
text-decoration:none;
}
.TAB_ON
{
display:inline-block;
@ -300,6 +304,10 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
vertical-align:middle;
overflow:hidden;
}
.TAB_ON a:hover
{
text-decoration:none;
}
.WHITE_TAB_OFF
{
color:#707070;
@ -461,7 +469,7 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
min-width:900px;
min-height:900px;
margin:-8px 0 0 0;
padding:10px 20px;
padding:16px 0;
border-radius:6px;
box-shadow:inset -2px -2px 1px 0 rgba(50,50,50,0.2);
text-align:center;
@ -472,39 +480,43 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
{
display:table;
box-sizing:border-box;
width:100%;
margin:0 auto;
}
#main_zone_menu_vertical
{
display:table-cell;
box-sizing:border-box;
width:175px;
width:180px;
padding-left:8px;
text-align:left;
vertical-align:top;
overflow:hidden;
}
#main_zone_canvas /* Where content for each action is written */
{
display:table-cell;
box-sizing:border-box;
padding:0 16px;
text-align:left;
vertical-align:top;
// padding:0 12px 12px 12px;
}
/***************************** Horizontal menu *******************************/
#horizontal_menu ul
#menu_horizontal ul
{
display:table;
list-style-type:none;
border:0;
margin:0 auto;
padding:0 0 4px 0;
// background:red;
}
#horizontal_menu li
#menu_horizontal li
{
display:table-cell;
display:inline-block;
box-sizing:border-box;
width:138px;
width:100px;
height:64px;
border:0;
margin:0;
@ -512,53 +524,74 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
text-align:center;
vertical-align:middle;
}
.MENU_OFF
#menu_horizontal a:hover
{
display:inline-block;
box-sizing:border-box;
width:138px;
height:64px;
margin:0;
padding:0 2px;
text-align:center;
vertical-align:middle;
text-decoration:none;
}
.MENU_ON
#menu_horizontal .OPTION
{
margin:0 auto;
background-size:32px 32px;
background-repeat:no-repeat;
background-position:center top;
padding:32px 2px 2px 2px;
overflow:hidden;
}
#menu_horizontal .OPTION_NOT_SELECTED
{
opacity:0.67;
display:inline-block;
}
#menu_horizontal .OPTION_NOT_SELECTED:hover
{
opacity:1;
transform:scale(1.15,1.15);
}
#menu_horizontal .OPTION_SELECTED
{
display:inline-block;
box-sizing:border-box;
width:138px;
height:64px;
margin:0;
padding:0;
text-align:center;
vertical-align:middle;
opacity:1;
transform:scale(1.15,1.15);
}
/******************************* Vertical menu *******************************/
#vertical_menu
#menu_vertical ul
{
list-style-type:none;
padding:0;
margin:0;
// background:red;
}
.MENU_OPTION
#menu_vertical a:hover
{
text-decoration:none;
}
#menu_vertical .OPTION
{
display:table-cell;
vertical-align:middle;
height:40px;
clear:both;
margin:0 auto;
text-align:left;
vertical-align:middle;
background-size:40px 40px;
background-repeat:no-repeat;
background-position:2px 2px;
padding:2px 2px 2px 50px;
overflow:hidden;
}
.MENU_TEXT
#menu_vertical .OPTION_NOT_SELECTED
{
display:table-cell;
height:40px;
vertical-align:middle;
opacity:0.67;
}
#menu_vertical .OPTION_NOT_SELECTED:hover
{
opacity:1;
}
#menu_vertical .OPTION_SELECTED
{
opacity:1;
}
/********************************* Menu fonts ********************************/
@ -576,7 +609,7 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
#action_title
{
box-sizing:border-box;
width:375px;
width:480px;
min-height:68px;
clear:both;
margin:0 auto;
@ -1179,6 +1212,7 @@ a:hover img.CENTRE_PHOTO_SHOW
{
opacity:1;
}
/*
.ICON_SCALING
{
display:inline-block;
@ -1186,15 +1220,15 @@ a:hover img.CENTRE_PHOTO_SHOW
.ICON_SCALING:hover
{
opacity:1;
transform:scale(1.2,1.2);
transform:scale(1.15,1.15);
}
.ICON_SCALED
{
display:inline-block;
opacity:1;
transform:scale(1.2,1.2);
transform:scale(1.15,1.15);
}
*/
/********************************* Form fonts ********************************/
.WHITE_FORM {color:#4D88A1; font-size:13pt;}
.GREY_FORM {color:#4D88A1; font-size:13pt;}

View File

@ -110,16 +110,19 @@
// TODO: Edition of courses: Rename "Optativas/libre conf." to "Optativas varios cursos"
// TODO: Edition of courses: Rename "Curso" to "Año / semestre / cuatrimestre"
// TODO: Listing of courses: Put "Optativas" year at the end
// TODO: Timetable: Sunday can be the first day of the week
// TODO: Timetable: Day can start at 6 am
/*****************************************************************************/
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 15.49.1 (2015/11/27)"
#define Log_PLATFORM_VERSION "SWAD 15.49.2 (2015/11/29)"
// 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
/*
Version 15.49.2: Nov 29, 2015 Changes in layout of menus. (186501 lines)
Version 15.49.1: Nov 27, 2015 Length of country names limited in listing. of countries. (186460 lines)
Version 15.49: Nov 27, 2015 Fixed width in edition of institutional links.
Lot of fixing in CSS related to sizes. (186455 lines)

View File

@ -66,6 +66,86 @@ const char *Mnu_MenuIcons[Mnu_NUM_MENUS] =
"vertical",
};
/*****************************************************************************/
/******************* Write horizontal menu of current tab ********************/
/*****************************************************************************/
void Mnu_WriteHorizontalMenuThisTab (void)
{
extern const char *The_ClassMenuOn[The_NUM_THEMES];
extern const char *The_ClassMenuOff[The_NUM_THEMES];
extern const struct Act_Menu Act_Menu[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB];
extern const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB];
unsigned NumOptInMenu;
Act_Action_t NumAct;
const char *Title;
bool IsTheSelectedAction;
/***** List start *****/
fprintf (Gbl.F.Out,"<div id=\"menu_horizontal\">"
"<ul>");
/***** Loop to write all options in menu. Each row holds an option *****/
for (NumOptInMenu = 0;
NumOptInMenu < Act_MAX_OPTIONS_IN_MENU_PER_TAB;
NumOptInMenu++)
{
NumAct = Act_Menu[Gbl.CurrentTab][NumOptInMenu].Action;
if (NumAct == 0) // At the end of each tab, actions are initialized to 0, so 0 marks the end of the menu
break;
if (Act_CheckIfIHavePermissionToExecuteAction (NumAct))
{
IsTheSelectedAction = (NumAct == Act_Actions[Gbl.CurrentAct].SuperAction);
Title = Act_GetSubtitleAction (NumAct);
/***** Start of element *****/
fprintf (Gbl.F.Out,"<li>");
/***** Start of container used to highlight this option *****/
fprintf (Gbl.F.Out,"<div class=\"%s\">",
IsTheSelectedAction ? "OPTION_SELECTED" :
"OPTION_NOT_SELECTED");
/***** Start of form and link *****/
Act_FormStart (NumAct);
Act_LinkFormSubmit (Title,NULL);
/*
Act_LinkFormSubmit (Title,IsTheSelectedAction ? The_ClassMenuOn[Gbl.Prefs.Theme] :
The_ClassMenuOff[Gbl.Prefs.Theme]);
*/
/***** Icon *****/
fprintf (Gbl.F.Out,"<div class=\"OPTION\""
" style=\"background-image:url('%s/%s/%s64x64.gif');\">",
Gbl.Prefs.PathIconSet,Cfg_ICON_ACTION,
Act_Actions[NumAct].Icon);
/***** Text *****/
fprintf (Gbl.F.Out,"<div class=\"%s\">%s",
IsTheSelectedAction ? The_ClassMenuOn[Gbl.Prefs.Theme] :
The_ClassMenuOff[Gbl.Prefs.Theme],
Txt_MENU_TITLE[Gbl.CurrentTab][NumOptInMenu]);
/***** End of link and form *****/
fprintf (Gbl.F.Out,"</div>"
"</div>"
"</a>");
Act_FormEnd ();
/***** End of container used to highlight this option *****/
fprintf (Gbl.F.Out,"</div>");
/***** End of element *****/
fprintf (Gbl.F.Out,"</li>");
}
}
/***** List end *****/
fprintf (Gbl.F.Out,"</ul>"
"</div>");
}
/*****************************************************************************/
/******************* Write vertical menu of current tab **********************/
/*****************************************************************************/
@ -85,7 +165,8 @@ void Mnu_WriteVerticalMenuThisTab (void)
bool PreviousVisibleOptions = false;
/***** List start *****/
fprintf (Gbl.F.Out,"<ul id=\"vertical_menu\">");
fprintf (Gbl.F.Out,"<div id=\"menu_vertical\">"
"<ul>");
/***** Loop to write all options in menu. Each row holds an option *****/
for (NumOptInMenu = 0;
@ -116,24 +197,22 @@ void Mnu_WriteVerticalMenuThisTab (void)
fprintf (Gbl.F.Out,"<li>");
/***** Start of container used to highlight this option *****/
if (!IsTheSelectedAction)
fprintf (Gbl.F.Out,"<div class=\"ICON_HIGHLIGHT\">");
fprintf (Gbl.F.Out,"<div class=\"%s\">",
IsTheSelectedAction ? "OPTION_SELECTED" :
"OPTION_NOT_SELECTED");
/***** Start of form and link *****/
Act_FormStart (NumAct);
Act_LinkFormSubmit (Title,IsTheSelectedAction ? The_ClassMenuOn[Gbl.Prefs.Theme] :
The_ClassMenuOff[Gbl.Prefs.Theme]);
Act_LinkFormSubmit (Title,NULL);
/***** Icon *****/
fprintf (Gbl.F.Out,"<div class=\"MENU_OPTION\""
" style=\"background-image:url('%s/%s/%s64x64.gif');"
" background-size:40px 40px;\">",
fprintf (Gbl.F.Out,"<div class=\"OPTION\""
" style=\"background-image:url('%s/%s/%s64x64.gif');\">",
Gbl.Prefs.PathIconSet,Cfg_ICON_ACTION,
Act_Actions[NumAct].Icon);
/***** Text *****/
fprintf (Gbl.F.Out,"<div class=\"MENU_TEXT\">"
"<span class=\"%s\">%s</span>",
fprintf (Gbl.F.Out,"<div class=\"%s\">%s",
IsTheSelectedAction ? The_ClassMenuOn[Gbl.Prefs.Theme] :
The_ClassMenuOff[Gbl.Prefs.Theme],
Txt_MENU_TITLE[Gbl.CurrentTab][NumOptInMenu]);
@ -145,8 +224,7 @@ void Mnu_WriteVerticalMenuThisTab (void)
Act_FormEnd ();
/***** End of container used to highlight this option *****/
if (!IsTheSelectedAction)
fprintf (Gbl.F.Out,"</div>");
fprintf (Gbl.F.Out,"</div>");
/***** End of element *****/
fprintf (Gbl.F.Out,"</li>");
@ -158,78 +236,6 @@ void Mnu_WriteVerticalMenuThisTab (void)
SeparationBetweenPreviousAndCurrentOption = Act_Menu[Gbl.CurrentTab][NumOptInMenu].SubsequentSeparation;
}
/***** List end *****/
fprintf (Gbl.F.Out,"</ul>");
}
/*****************************************************************************/
/******************* Write horizontal menu of current tab ********************/
/*****************************************************************************/
void Mnu_WriteHorizontalMenuThisTab (void)
{
extern const char *The_ClassMenuOn[The_NUM_THEMES];
extern const char *The_ClassMenuOff[The_NUM_THEMES];
extern const struct Act_Menu Act_Menu[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB];
extern const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB];
unsigned NumOptInMenu;
Act_Action_t NumAct;
const char *Title;
bool IsTheSelectedAction;
/***** List start *****/
fprintf (Gbl.F.Out,"<div id=\"horizontal_menu\">"
"<ul>");
/***** Loop to write all options in menu. Each row holds an option *****/
for (NumOptInMenu = 0;
NumOptInMenu < Act_MAX_OPTIONS_IN_MENU_PER_TAB;
NumOptInMenu++)
{
NumAct = Act_Menu[Gbl.CurrentTab][NumOptInMenu].Action;
if (NumAct == 0) // At the end of each tab, actions are initialized to 0, so 0 marks the end of the menu
break;
if (Act_CheckIfIHavePermissionToExecuteAction (NumAct))
{
IsTheSelectedAction = (NumAct == Act_Actions[Gbl.CurrentAct].SuperAction);
Title = Act_GetSubtitleAction (NumAct);
/***** Start of element *****/
fprintf (Gbl.F.Out,"<li class=\"%s\">",
IsTheSelectedAction ? "MENU_ON" :
"MENU_OFF");
/***** Start of container used to highlight this option *****/
if (IsTheSelectedAction)
fprintf (Gbl.F.Out,"<div class=\"ICON_SCALED\">");
else
fprintf (Gbl.F.Out,"<div class=\"ICON_HIGHLIGHT ICON_SCALING\">");
/***** Start of form and link *****/
Act_FormStart (NumAct);
Act_LinkFormSubmit (Title,IsTheSelectedAction ? The_ClassMenuOn[Gbl.Prefs.Theme] :
The_ClassMenuOff[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"<img src=\"%s/%s/%s64x64.gif\""
" alt=\"%s\" title=\"%s\""
" class=\"ICON28x28\" />"
"<div>%s</div>"
"</a>",
Gbl.Prefs.PathIconSet,Cfg_ICON_ACTION,
Act_Actions[NumAct].Icon,
Txt_MENU_TITLE[Gbl.CurrentTab][NumOptInMenu],
Txt_MENU_TITLE[Gbl.CurrentTab][NumOptInMenu],
Txt_MENU_TITLE[Gbl.CurrentTab][NumOptInMenu]);
Act_FormEnd ();
/***** End of container used to highlight this option *****/
fprintf (Gbl.F.Out,"</div>");
/***** End of element *****/
fprintf (Gbl.F.Out,"</li>");
}
}
/***** List end *****/
fprintf (Gbl.F.Out,"</ul>"
"</div>");

View File

@ -49,8 +49,8 @@ typedef enum
/***************************** Public prototypes *****************************/
/*****************************************************************************/
void Mnu_WriteVerticalMenuThisTab (void);
void Mnu_WriteHorizontalMenuThisTab (void);
void Mnu_WriteVerticalMenuThisTab (void);
void Mnu_PutIconsToSelectMenu (void);
void Mnu_ChangeMenu (void);