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; vertical-align:middle;
overflow:hidden; overflow:hidden;
} }
.TAB_OFF a:hover
{
text-decoration:none;
}
.TAB_ON .TAB_ON
{ {
display:inline-block; display:inline-block;
@ -300,6 +304,10 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
vertical-align:middle; vertical-align:middle;
overflow:hidden; overflow:hidden;
} }
.TAB_ON a:hover
{
text-decoration:none;
}
.WHITE_TAB_OFF .WHITE_TAB_OFF
{ {
color:#707070; color:#707070;
@ -461,7 +469,7 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
min-width:900px; min-width:900px;
min-height:900px; min-height:900px;
margin:-8px 0 0 0; margin:-8px 0 0 0;
padding:10px 20px; padding:16px 0;
border-radius:6px; border-radius:6px;
box-shadow:inset -2px -2px 1px 0 rgba(50,50,50,0.2); box-shadow:inset -2px -2px 1px 0 rgba(50,50,50,0.2);
text-align:center; text-align:center;
@ -472,39 +480,43 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
{ {
display:table; display:table;
box-sizing:border-box; box-sizing:border-box;
width:100%;
margin:0 auto; margin:0 auto;
} }
#main_zone_menu_vertical #main_zone_menu_vertical
{ {
display:table-cell; display:table-cell;
box-sizing:border-box; box-sizing:border-box;
width:175px; width:180px;
padding-left:8px;
text-align:left; text-align:left;
vertical-align:top; vertical-align:top;
overflow:hidden;
} }
#main_zone_canvas /* Where content for each action is written */ #main_zone_canvas /* Where content for each action is written */
{ {
display:table-cell; display:table-cell;
box-sizing:border-box; box-sizing:border-box;
padding:0 16px;
text-align:left; text-align:left;
vertical-align:top; vertical-align:top;
// padding:0 12px 12px 12px;
} }
/***************************** Horizontal menu *******************************/ /***************************** Horizontal menu *******************************/
#horizontal_menu ul #menu_horizontal ul
{ {
display:table; display:table;
list-style-type:none; list-style-type:none;
border:0; border:0;
margin:0 auto; margin:0 auto;
padding:0 0 4px 0; padding:0 0 4px 0;
// background:red;
} }
#horizontal_menu li #menu_horizontal li
{ {
display:table-cell; display:inline-block;
box-sizing:border-box; box-sizing:border-box;
width:138px; width:100px;
height:64px; height:64px;
border:0; border:0;
margin:0; margin:0;
@ -512,53 +524,74 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
text-align:center; text-align:center;
vertical-align:middle; vertical-align:middle;
} }
.MENU_OFF #menu_horizontal a:hover
{ {
display:inline-block; text-decoration:none;
box-sizing:border-box;
width:138px;
height:64px;
margin:0;
padding:0 2px;
text-align:center;
vertical-align:middle;
} }
.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; display:inline-block;
box-sizing:border-box; opacity:1;
width:138px; transform:scale(1.15,1.15);
height:64px;
margin:0;
padding:0;
text-align:center;
vertical-align:middle;
} }
/******************************* Vertical menu *******************************/ /******************************* Vertical menu *******************************/
#vertical_menu #menu_vertical ul
{ {
list-style-type:none; list-style-type:none;
padding:0; padding:0;
margin: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; height:40px;
clear:both; clear:both;
margin:0 auto; margin:0 auto;
text-align:left; text-align:left;
vertical-align:middle; vertical-align:middle;
background-size:40px 40px;
background-repeat:no-repeat; background-repeat:no-repeat;
background-position:2px 2px; background-position:2px 2px;
padding:2px 2px 2px 50px; padding:2px 2px 2px 50px;
overflow:hidden; overflow:hidden;
} }
.MENU_TEXT #menu_vertical .OPTION_NOT_SELECTED
{ {
display:table-cell; opacity:0.67;
height:40px; }
vertical-align:middle; #menu_vertical .OPTION_NOT_SELECTED:hover
{
opacity:1;
}
#menu_vertical .OPTION_SELECTED
{
opacity:1;
} }
/********************************* Menu fonts ********************************/ /********************************* Menu fonts ********************************/
@ -576,7 +609,7 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
#action_title #action_title
{ {
box-sizing:border-box; box-sizing:border-box;
width:375px; width:480px;
min-height:68px; min-height:68px;
clear:both; clear:both;
margin:0 auto; margin:0 auto;
@ -1179,6 +1212,7 @@ a:hover img.CENTRE_PHOTO_SHOW
{ {
opacity:1; opacity:1;
} }
/*
.ICON_SCALING .ICON_SCALING
{ {
display:inline-block; display:inline-block;
@ -1186,15 +1220,15 @@ a:hover img.CENTRE_PHOTO_SHOW
.ICON_SCALING:hover .ICON_SCALING:hover
{ {
opacity:1; opacity:1;
transform:scale(1.2,1.2); transform:scale(1.15,1.15);
} }
.ICON_SCALED .ICON_SCALED
{ {
display:inline-block; display:inline-block;
opacity:1; opacity:1;
transform:scale(1.2,1.2); transform:scale(1.15,1.15);
} }
*/
/********************************* Form fonts ********************************/ /********************************* Form fonts ********************************/
.WHITE_FORM {color:#4D88A1; font-size:13pt;} .WHITE_FORM {color:#4D88A1; font-size:13pt;}
.GREY_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 "Optativas/libre conf." to "Optativas varios cursos"
// TODO: Edition of courses: Rename "Curso" to "Año / semestre / cuatrimestre" // TODO: Edition of courses: Rename "Curso" to "Año / semestre / cuatrimestre"
// TODO: Listing of courses: Put "Optativas" year at the end // 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 *****************************/ /****************************** 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: // 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.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.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. Version 15.49: Nov 27, 2015 Fixed width in edition of institutional links.
Lot of fixing in CSS related to sizes. (186455 lines) Lot of fixing in CSS related to sizes. (186455 lines)

View File

@ -66,6 +66,86 @@ const char *Mnu_MenuIcons[Mnu_NUM_MENUS] =
"vertical", "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 **********************/ /******************* Write vertical menu of current tab **********************/
/*****************************************************************************/ /*****************************************************************************/
@ -85,7 +165,8 @@ void Mnu_WriteVerticalMenuThisTab (void)
bool PreviousVisibleOptions = false; bool PreviousVisibleOptions = false;
/***** List start *****/ /***** 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 *****/ /***** Loop to write all options in menu. Each row holds an option *****/
for (NumOptInMenu = 0; for (NumOptInMenu = 0;
@ -116,24 +197,22 @@ void Mnu_WriteVerticalMenuThisTab (void)
fprintf (Gbl.F.Out,"<li>"); fprintf (Gbl.F.Out,"<li>");
/***** Start of container used to highlight this option *****/ /***** Start of container used to highlight this option *****/
if (!IsTheSelectedAction) fprintf (Gbl.F.Out,"<div class=\"%s\">",
fprintf (Gbl.F.Out,"<div class=\"ICON_HIGHLIGHT\">"); IsTheSelectedAction ? "OPTION_SELECTED" :
"OPTION_NOT_SELECTED");
/***** Start of form and link *****/ /***** Start of form and link *****/
Act_FormStart (NumAct); Act_FormStart (NumAct);
Act_LinkFormSubmit (Title,IsTheSelectedAction ? The_ClassMenuOn[Gbl.Prefs.Theme] : Act_LinkFormSubmit (Title,NULL);
The_ClassMenuOff[Gbl.Prefs.Theme]);
/***** Icon *****/ /***** Icon *****/
fprintf (Gbl.F.Out,"<div class=\"MENU_OPTION\"" fprintf (Gbl.F.Out,"<div class=\"OPTION\""
" style=\"background-image:url('%s/%s/%s64x64.gif');" " style=\"background-image:url('%s/%s/%s64x64.gif');\">",
" background-size:40px 40px;\">",
Gbl.Prefs.PathIconSet,Cfg_ICON_ACTION, Gbl.Prefs.PathIconSet,Cfg_ICON_ACTION,
Act_Actions[NumAct].Icon); Act_Actions[NumAct].Icon);
/***** Text *****/ /***** Text *****/
fprintf (Gbl.F.Out,"<div class=\"MENU_TEXT\">" fprintf (Gbl.F.Out,"<div class=\"%s\">%s",
"<span class=\"%s\">%s</span>",
IsTheSelectedAction ? The_ClassMenuOn[Gbl.Prefs.Theme] : IsTheSelectedAction ? The_ClassMenuOn[Gbl.Prefs.Theme] :
The_ClassMenuOff[Gbl.Prefs.Theme], The_ClassMenuOff[Gbl.Prefs.Theme],
Txt_MENU_TITLE[Gbl.CurrentTab][NumOptInMenu]); Txt_MENU_TITLE[Gbl.CurrentTab][NumOptInMenu]);
@ -145,7 +224,6 @@ void Mnu_WriteVerticalMenuThisTab (void)
Act_FormEnd (); Act_FormEnd ();
/***** End of container used to highlight this option *****/ /***** End of container used to highlight this option *****/
if (!IsTheSelectedAction)
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
/***** End of element *****/ /***** End of element *****/
@ -158,78 +236,6 @@ void Mnu_WriteVerticalMenuThisTab (void)
SeparationBetweenPreviousAndCurrentOption = Act_Menu[Gbl.CurrentTab][NumOptInMenu].SubsequentSeparation; 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 *****/ /***** List end *****/
fprintf (Gbl.F.Out,"</ul>" fprintf (Gbl.F.Out,"</ul>"
"</div>"); "</div>");

View File

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