Version 14.50

This commit is contained in:
Antonio Cañas Vargas 2014-12-31 19:51:49 +01:00
parent d1729f2a53
commit 1a04994f6e
6 changed files with 197 additions and 56 deletions

View File

@ -22,10 +22,11 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
A:link {text-decoration:none;}
A:visited {text-decoration:none;}
A:active {text-decoration:none;}
A:hover {text-decoration:underline;}
a:link {text-decoration:none;}
a:visited {text-decoration:none;}
a:active {text-decoration:none;}
a:hover {text-decoration:none;}
body
{
margin:0;
@ -234,32 +235,33 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
.TAB_OFF
{
float:left;
width:86px;height:61px;
width:86px;height:59px;
margin:1px 1px 0 1px;
padding:0 1px 0 1px;
padding:2px 1px 0 1px;
border-radius:6px 6px 0 0;
box-shadow:inset -2px -2px 1px 0 rgba(50, 50, 50, 0.2);
text-align:center;
vertical-align:middle;
overflow:hidden;
display:inline-block;
}
.TAB_ON
{
float:left;
width:88px;height:62px;
width:88px;height:60px;
margin:0;
padding:1px 1px 0 1px;
padding:3px 1px 0 1px;
border-radius:6px 6px 0 0;
box-shadow:inset -2px -2px 1px 0 rgba(50, 50, 50, 0.2);
text-align:center;
vertical-align:middle;
overflow:hidden;
display:inline-block;
}
.WHITE_TAB_OFF
{
font-family:Arial, "Nimbus Sans L", "DejaVu LGC Sans", "Bitstream Vera Sans", sans-serif;
color:#707070;
font-size:7.5pt;
font-size:7pt;
font-weight:bold;
line-height:100%;
white-space:nowrap;
@ -267,9 +269,8 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
}
.GREY_TAB_OFF
{
font-family:Arial, "Nimbus Sans L", "DejaVu LGC Sans", "Bitstream Vera Sans", sans-serif;
color:#505050;
font-size:7.5pt;
font-size:7pt;
font-weight:bold;
line-height:100%;
white-space:nowrap;
@ -277,9 +278,8 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
}
.BLUE_TAB_OFF
{
font-family:Arial, "Nimbus Sans L", "DejaVu LGC Sans", "Bitstream Vera Sans", sans-serif;
color:#365E6E;
font-size:7.5pt;
font-size:7pt;
font-weight:bold;
line-height:100%;
white-space:nowrap;
@ -287,9 +287,8 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
}
.YELLOW_TAB_OFF
{
font-family:Arial, "Nimbus Sans L", "DejaVu LGC Sans", "Bitstream Vera Sans", sans-serif;
color:#7C4D2A;
font-size:7.5pt;
font-size:7pt;
font-weight:bold;
line-height:100%;
white-space:nowrap;
@ -297,9 +296,8 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
}
.WHITE_TAB_ON
{
font-family:Arial, "Nimbus Sans L", "DejaVu LGC Sans", "Bitstream Vera Sans", sans-serif;
color:#4D88A1;
font-size:7.5pt;
font-size:7pt;
font-weight:bold;
line-height:100%;
white-space:nowrap;
@ -307,9 +305,8 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
}
.GREY_TAB_ON
{
font-family:Arial, "Nimbus Sans L", "DejaVu LGC Sans", "Bitstream Vera Sans", sans-serif;
color:#606060;
font-size:7.5pt;
font-size:7pt;
font-weight:bold;
line-height:100%;
white-space:nowrap;
@ -317,9 +314,8 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
}
.BLUE_TAB_ON
{
font-family:Arial, "Nimbus Sans L", "DejaVu LGC Sans", "Bitstream Vera Sans", sans-serif;
color:#4D88A1;
font-size:7.5pt;
font-size:7pt;
font-weight:bold;
line-height:100%;
white-space:nowrap;
@ -327,9 +323,8 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
}
.YELLOW_TAB_ON
{
font-family:Arial, "Nimbus Sans L", "DejaVu LGC Sans", "Bitstream Vera Sans", sans-serif;
color:#BD4815;
font-size:7.5pt;
font-size:7pt;
font-weight:bold;
line-height:100%;
white-space:nowrap;
@ -372,6 +367,7 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
/*********************************** Icons ***********************************/
.ICON16x16 {width:16px; height:16px; vertical-align:middle;}
.ICON16x16B {width:16px; height:16px; vertical-align:middle; display:block;}
.ICON28x28 {width:28px; height:28px; vertical-align:middle;}
.ICON32x32 {width:32px; height:32px; vertical-align:middle;}
.ICON64x64 {width:64px; height:64px; vertical-align:middle;}
@ -576,11 +572,59 @@ a:hover img.CENTRE_PHOTO_SHOW
}
.ICON_HIGHLIGHT
{
opacity:0.8;
opacity:0.6;
}
.ICON_HIGHLIGHT:hover
{
opacity:1;
transform:scale(1.1,1.1);
}
.ICON_SCALED
{
opacity:1;
transform:scale(1.1,1.1);
}
/***************************** Horizontal menu *******************************/
#submenu_container ul
{
margin:0 auto;
padding:0;
list-style-type:none;
text-align:center;
vertical-align:middle;
}
#submenu_container ul li
{
display:table-cell;
height:60px;
vertical-align:middle;
}
#submenu_container li
{
display:inline-block;
width:100px;height:60px;
vertical-align:middle;
}
.MENU_OFF
{
display:inline-block;
width:100px;height:60px;
margin:0;
padding:0 2px;
text-align:center;
vertical-align:middle;
overflow:hidden;
}
.MENU_ON
{
display:inline-block;
width:100px;height:60px;
margin:0;
padding:0;
text-align:center;
vertical-align:middle;
overflow:hidden;
}
/******************************** Menu options *******************************/
@ -608,20 +652,15 @@ a:hover img.CENTRE_PHOTO_SHOW
display:table-cell;
vertical-align:middle;
}
.WHITE_MENU_OFF {color:#707070; font-size:11pt; font-weight:bold; line-height:110%;}
.GREY_MENU_OFF {color:#707070; font-size:11pt; font-weight:bold; line-height:110%;}
.BLUE_MENU_OFF {color:#4D88A1; font-size:11pt; font-weight:bold; line-height:110%;}
.YELLOW_MENU_OFF {color:#BD4815; font-size:11pt; font-weight:bold; line-height:110%;}
.WHITE_MENU_OFF {color:#707070; font-size:10pt; font-weight:bold; line-height:110%;}
.GREY_MENU_OFF {color:#707070; font-size:10pt; font-weight:bold; line-height:110%;}
.BLUE_MENU_OFF {color:#4D88A1; font-size:10pt; font-weight:bold; line-height:110%;}
.YELLOW_MENU_OFF {color:#BD4815; font-size:10pt; font-weight:bold; line-height:110%;}
.WHITE_MENU_ON {color:#4D88A1; font-size:11pt; font-weight:bold; line-height:110%; text-decoration:underline;}
.GREY_MENU_ON {color:#606060; font-size:11pt; font-weight:bold; line-height:110%; text-decoration:underline;}
.BLUE_MENU_ON {color:#4D88A1; font-size:11pt; font-weight:bold; line-height:110%; text-decoration:underline;}
.YELLOW_MENU_ON {color:#BD4815; font-size:11pt; font-weight:bold; line-height:110%; text-decoration:underline;}
.WHITE_MENU_ON:link {text-decoration:underline;}
.GREY_MENU_ON:link {text-decoration:underline;}
.BLUE_MENU_ON:link {text-decoration:underline;}
.YELLOW_MENU_ON:link {text-decoration:underline;}
.WHITE_MENU_ON {color:#4D88A1; font-size:10pt; font-weight:bold; line-height:110%;}
.GREY_MENU_ON {color:#606060; font-size:10pt; font-weight:bold; line-height:110%;}
.BLUE_MENU_ON {color:#4D88A1; font-size:10pt; font-weight:bold; line-height:110%;}
.YELLOW_MENU_ON {color:#BD4815; font-size:10pt; font-weight:bold; line-height:110%;}
.WHITE_FORMUL {color:#4D88A1; font-size:11pt;}
.GREY_FORMUL {color:#4D88A1; font-size:11pt;}

View File

@ -420,7 +420,7 @@ a:hover img.CENTRE_PHOTO_SHOW
}
.ICON_HIGHLIGHT
{
opacity:0.8;
opacity:0.7;
}
.ICON_HIGHLIGHT:hover
{

View File

@ -35,12 +35,13 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 14.49.2 (2014/12/31)"
#define Log_PLATFORM_VERSION "SWAD 14.50 (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.2 :Dec 31, 2014 Removed text of menu options whit BR. (172611 lines)
Version 14.50 :Dec 31, 2014 Horizontal menu (not finished). (172735 lines)
Version 14.49.2 :Dec 31, 2014 Removed text of menu options with BR. (172611 lines)
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.

View File

@ -779,7 +779,7 @@ static void Exa_ShowExamAnnouncement (long ExaCod,Exa_tTypeViewExamAnnouncement_
/***** Start frame *****/
Lay_StartRoundFrameTable10 ("500px",0,NULL);
fprintf (Gbl.F.Out,"<tr>" \
"<td style=\"text-align:center;>" \
"<td style=\"text-align:center;\">" \
"<table style=\"width:100%%; padding:20px; border-spacing:3px;\">");
/***** Institution logo *****/

View File

@ -63,6 +63,8 @@ const char *Lay_LayoutIcons[Lay_NUM_LAYOUTS] =
/****************************** Private constants ****************************/
/*****************************************************************************/
// #define HORIZONTAL_MENU 1
const char *Lay_TabIcons[Act_NUM_TABS] =
{
/* TabUnk */ NULL,
@ -107,13 +109,20 @@ static void Lay_DrawTabsDeskTop (void);
static void Lay_DrawTabsMobile (void);
static bool Lay_CheckIfICanViewTab (Act_Tab_t Tab);
static void Lay_DrawBreadcrumb (void);
static void Lay_WriteMenuThisTabDesktop (void);
#ifndef HORIZONTAL_MENU
static void Lay_WriteVerticalMenuThisTabDesktop (void);
#endif
#ifdef HORIZONTAL_MENU
static void Lay_WriteHorizontalMenuThisTabDesktop (void);
#endif
static void Lay_WriteMenuThisTabMobile (void);
static void Lay_WriteBreadcrumbHome (void);
static void Lay_WriteBreadcrumbTab (void);
static void Lay_WriteBreadcrumbAction (void);
#ifndef HORIZONTAL_MENU
static void Lay_WriteTitleAction (void);
#endif
static void Lay_ShowLeftColumn (void);
static void Lay_ShowRightColumn (void);
@ -295,11 +304,14 @@ void Lay_WriteStartOfPage (void)
Prf_PutLeftIconToHideShowCols ();
fprintf (Gbl.F.Out,"</td>");
#ifndef HORIZONTAL_MENU
/* Tab content, including always vertical menu (left) and always main zone (right) */
fprintf (Gbl.F.Out,"<td style=\"width:140px; text-align:left;"
" vertical-align:top;\">");
Lay_WriteMenuThisTabDesktop ();
Lay_WriteVerticalMenuThisTabDesktop ();
fprintf (Gbl.F.Out,"</td>");
#endif
break;
case Lay_LAYOUT_MOBILE:
/* Tab content */
@ -323,16 +335,26 @@ void Lay_WriteStartOfPage (void)
fprintf (Gbl.F.Out,"<td style=\"padding:0 10px 10px 10px;"
" text-align:left; vertical-align:top;\">");
#ifdef HORIZONTAL_MENU
fprintf (Gbl.F.Out,"<div id=\"submenu_container\" style=\"display:table; margin:0 auto;\">");
Lay_WriteHorizontalMenuThisTabDesktop ();
fprintf (Gbl.F.Out,"</div>");
#endif
Usr_WarningWhenDegreeTypeDoesntAllowDirectLogin ();
/* If it is mandatory to read any information about course */
if (Gbl.CurrentCrs.Info.ShowMsgMustBeRead)
Inf_WriteMsgYouMustReadInfo ();
#ifndef HORIZONTAL_MENU
/* Write title of the current action */
if (Gbl.Prefs.Layout == Lay_LAYOUT_DESKTOP &&
Act_Actions[Act_Actions[Gbl.CurrentAct].SuperAction].IndexInMenu >= 0)
Lay_WriteTitleAction ();
#endif
Gbl.Layout.WritingHTMLStart = false;
Gbl.Layout.HTMLStartWritten = true;
@ -922,7 +944,9 @@ static void Lay_DrawTabsDeskTop (void)
if (ICanViewTab)
{
fprintf (Gbl.F.Out,"<div"); // This div must be present even in current tab in order to render properly the tab
if (NumTab != Gbl.CurrentTab)
if (NumTab == Gbl.CurrentTab)
fprintf (Gbl.F.Out," class=\"ICON_SCALED\"");
else
fprintf (Gbl.F.Out," class=\"ICON_HIGHLIGHT\"");
fprintf (Gbl.F.Out,">");
Act_FormStart (ActMnu);
@ -932,7 +956,7 @@ static void Lay_DrawTabsDeskTop (void)
The_ClassTabOff[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"<img src=\"%s/%s/%s32x32.gif\""
" alt=\"%s\" title=\"%s\""
" class=\"ICON32x32\" style=\"margin:4px;\" />"
" class=\"ICON28x28\" style=\"margin:4px;\" />"
"<div>%s</div>"
"</a>"
"</form>",
@ -946,7 +970,7 @@ static void Lay_DrawTabsDeskTop (void)
fprintf (Gbl.F.Out,"<div class=\"ICON_HIDDEN\">"
"<img src=\"%s/%s/%s32x32.gif\""
" alt=\"%s\" title=\"%s\""
" class=\"ICON32x32\" style=\"margin:4px;\" />"
" class=\"ICON28x28\" style=\"margin:4px;\" />"
"<div class=\"%s\">%s</div>",
Gbl.Prefs.PathIconSet,Cfg_ICON_ACTION_32x32,
Lay_TabIcons[NumTab],
@ -1113,7 +1137,8 @@ static void Lay_DrawBreadcrumb (void)
/************* Write the menu of current tab (desktop layout) ****************/
/*****************************************************************************/
static void Lay_WriteMenuThisTabDesktop (void)
#ifndef HORIZONTAL_MENU
static void Lay_WriteVerticalMenuThisTabDesktop (void)
{
extern const char *The_ClassMenuOn[The_NUM_THEMES];
extern const char *The_ClassMenuOff[The_NUM_THEMES];
@ -1200,6 +1225,80 @@ static void Lay_WriteMenuThisTabDesktop (void)
/***** List end *****/
fprintf (Gbl.F.Out,"</ul>");
}
#endif
/*****************************************************************************/
/********** Write horizontal menu of current tab (desktop layout) ************/
/*****************************************************************************/
#ifdef HORIZONTAL_MENU
static void Lay_WriteHorizontalMenuThisTabDesktop (void)
{
extern const char *The_ClassMenuOn[The_NUM_THEMES];
extern const char *The_ClassMenuOff[The_NUM_THEMES];
extern const struct Act_Menu Act_Menu[Act_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB];
extern const char *Txt_MENU_TITLE[Act_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,"<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\" style=\"display:inline-block;\">");
else
fprintf (Gbl.F.Out,"<div class=\"ICON_HIGHLIGHT\" style=\"display:inline-block;\">");
/***** 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,"<input type=\"image\" src=\"%s/%s/%s32x32.gif\""
" alt=\"\" class=\"%s\""
" style=\"margin:0;\" />"
"<div>%s</div>"
"</a>"
"</form>",
Gbl.Prefs.PathIconSet,Cfg_ICON_ACTION_32x32,
Act_Actions[NumAct].Icon,
IsTheSelectedAction ? "ICON28x28" :
"ICON28x28",
Txt_MENU_TITLE[Gbl.CurrentTab][NumOptInMenu]);
/***** 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>");
}
#endif
/*****************************************************************************/
/************* Write the menu of current tab (mobile layout) *****************/
@ -1325,6 +1424,7 @@ static void Lay_WriteBreadcrumbAction (void)
/*********** Write icon and title associated to the current action ***********/
/*****************************************************************************/
#ifndef HORIZONTAL_MENU
static void Lay_WriteTitleAction (void)
{
extern const char *The_ClassTitleAction[The_NUM_THEMES];
@ -1351,6 +1451,7 @@ static void Lay_WriteTitleAction (void)
/***** Container end *****/
fprintf (Gbl.F.Out,"</div>");
}
#endif
/*****************************************************************************/
/***************************** Show left column ******************************/

View File

@ -16689,23 +16689,23 @@ const char *Txt_MENU_TITLE[Act_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
,
// ActLstAdm
#if L==0
"Administradors"
"Administrad." // Administradors
#elif L==1
"Verwalter"
#elif L==2
"Administrators"
"Administrat." // Administrators
#elif L==3
"Administradores"
"Administrad." // Administradores
#elif L==4
"Administrateurs"
"Administrat." // Administrateurs
#elif L==5
"Administradores" // Okoteve traducción
"Administrad." // Administradores // Okoteve traducción
#elif L==6
"Amministratori"
"Amministrat." // Amministratori
#elif L==7
"Administratorzy"
"Administrat." // Administratorzy
#elif L==8
"Administradores"
"Administrad." // Administradores
#endif
,
// ActReqSignUp