mirror of https://github.com/acanas/swad-core.git
Version 15.50
This commit is contained in:
parent
7ccd9ff5b0
commit
3fb649cfc2
404
css/swad.css
404
css/swad.css
|
@ -21,11 +21,8 @@
|
|||
You should have received a copy of the GNU Affero General Public License
|
||||
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;}
|
||||
|
||||
/********************************* Body **************************************/
|
||||
body
|
||||
{
|
||||
margin:0;
|
||||
|
@ -33,9 +30,19 @@ body
|
|||
font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;
|
||||
font-size:1em;
|
||||
}
|
||||
input {font-size:12pt; vertical-align:middle;}
|
||||
select {font-size:12pt;}
|
||||
textarea {font-size:12pt;}
|
||||
input
|
||||
{
|
||||
font-size:12pt;
|
||||
vertical-align:middle;
|
||||
}
|
||||
select
|
||||
{
|
||||
font-size:12pt;
|
||||
}
|
||||
textarea
|
||||
{
|
||||
font-size:12pt;
|
||||
}
|
||||
table
|
||||
{
|
||||
box-sizing:border-box;
|
||||
|
@ -71,6 +78,13 @@ hr.GREY_SEPARA {height:0; border-top:0; border-bottom:#707070 dotted 1px;}
|
|||
hr.BLUE_SEPARA {height:0; border-top:0; border-bottom:#4D88A1 dotted 1px;}
|
||||
hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
|
||||
|
||||
/*********************** Text decoration of links ****************************/
|
||||
a:link {text-decoration:none;}
|
||||
a:visited {text-decoration:none;}
|
||||
a:active {text-decoration:none;}
|
||||
a:hover {text-decoration:underline;}
|
||||
.MENU_LIST_ITEM a:hover {text-decoration:none;}
|
||||
|
||||
/****************** Layout (the whole page with a background) ****************/
|
||||
#whole_page_white
|
||||
{
|
||||
|
@ -153,12 +167,13 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
|
|||
text-align:left;
|
||||
vertical-align:middle;
|
||||
}
|
||||
@media only screen and (max-width: 1279px) { /* For mobile phones and tablets */
|
||||
@media only screen and (max-width: 1279px)
|
||||
{ /* For mobile phones and tablets */
|
||||
#head_search_text
|
||||
{
|
||||
display:none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#head_row_1_usr_lang
|
||||
{
|
||||
|
@ -200,7 +215,8 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
|
|||
.GREY_CUR_TIME {color:#E0E0E0; font-size:14pt; font-weight:bold;}
|
||||
.BLUE_CUR_TIME {color:#BAD2DA; font-size:14pt; font-weight:bold;}
|
||||
.YELLOW_CUR_TIME {color:#B3B0B3; font-size:14pt; font-weight:bold;}
|
||||
@media only screen and (max-width: 1023px) { /* For mobile phones */
|
||||
@media only screen and (max-width: 1023px)
|
||||
{ /* For mobile phones */
|
||||
#current_date
|
||||
{
|
||||
display:none;
|
||||
|
@ -209,13 +225,14 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
|
|||
{
|
||||
display:none;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 1024px) and (max-width: 1279px) { /* For tablets */
|
||||
}
|
||||
@media only screen and (min-width: 1024px) and (max-width: 1279px)
|
||||
{ /* For tablets */
|
||||
#current_date
|
||||
{
|
||||
display:none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#head_row_2_hierarchy
|
||||
{
|
||||
|
@ -239,7 +256,8 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
|
|||
vertical-align:top;
|
||||
padding-top:10px;
|
||||
}
|
||||
@media only screen and (max-width: 1023px) { /* For mobile phones */
|
||||
@media only screen and (max-width: 1023px)
|
||||
{ /* For mobile phones */
|
||||
#notif_all
|
||||
{
|
||||
display:none;
|
||||
|
@ -248,13 +266,14 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
|
|||
{
|
||||
display:none;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 1024px) and (max-width: 1279px) { /* For tablets */
|
||||
}
|
||||
@media only screen and (min-width: 1024px) and (max-width: 1279px)
|
||||
{ /* For tablets */
|
||||
#notif_all
|
||||
{
|
||||
display:none;
|
||||
}
|
||||
}
|
||||
}
|
||||
.WHITE_NOTIF {color:#707070; font-size:12pt; white-space:nowrap;}
|
||||
.GREY_NOTIF {color:#E0E0E0; font-size:12pt; white-space:nowrap;}
|
||||
.BLUE_NOTIF {color:white; font-size:12pt; white-space:nowrap;}
|
||||
|
@ -399,7 +418,8 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
|
|||
width:148px;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1279px) { /* For mobile phones and tablets */
|
||||
@media only screen and (max-width: 1279px)
|
||||
{ /* For mobile phones and tablets */
|
||||
#main_zone_central_none, #main_zone_central_left, #main_zone_central_right, #main_zone_central_both
|
||||
{
|
||||
display:table-cell;
|
||||
|
@ -414,8 +434,9 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
|
|||
{
|
||||
display:none;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 1280px) { /* For desktop */
|
||||
}
|
||||
@media only screen and (min-width: 1280px)
|
||||
{ /* For desktop */
|
||||
#main_zone_central_none /* Hide left and right columns */
|
||||
{
|
||||
display:table-cell;
|
||||
|
@ -460,174 +481,255 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
|
|||
position:absolute;
|
||||
right:0;
|
||||
}
|
||||
}
|
||||
|
||||
#main_zone_central_container
|
||||
{
|
||||
box-sizing:border-box;
|
||||
min-width:900px;
|
||||
min-height:900px;
|
||||
margin:-8px 0 0 0;
|
||||
padding:8px 0;
|
||||
border-radius:6px;
|
||||
box-shadow:inset -2px -2px 1px 0 rgba(50,50,50,0.2);
|
||||
text-align:center;
|
||||
vertical-align:top;
|
||||
position:relative;
|
||||
}
|
||||
|
||||
/***************************** Horizontal menu *******************************/
|
||||
#menu_horizontal
|
||||
@media only screen and (max-width: 1023px)
|
||||
{ /* For mobile-phones */
|
||||
#main_zone_central_container
|
||||
{
|
||||
box-sizing:border-box;
|
||||
margin:-8px 0 0 0;
|
||||
padding:8px 0;
|
||||
border-radius:6px;
|
||||
box-shadow:inset -2px -2px 1px 0 rgba(50,50,50,0.2);
|
||||
text-align:center;
|
||||
vertical-align:top;
|
||||
position:relative;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 1024px)
|
||||
{ /* For tablets and desktop */
|
||||
#main_zone_central_container
|
||||
{
|
||||
box-sizing:border-box;
|
||||
min-width:900px;
|
||||
min-height:900px;
|
||||
margin:-8px 0 0 0;
|
||||
padding:8px 0;
|
||||
border-radius:6px;
|
||||
box-shadow:inset -2px -2px 1px 0 rgba(50,50,50,0.2);
|
||||
text-align:center;
|
||||
vertical-align:top;
|
||||
position:relative;
|
||||
}
|
||||
}
|
||||
|
||||
/************* Main central zone with horizontal menu and canvas *************/
|
||||
#main_horizontal
|
||||
{
|
||||
box-sizing:border-box;
|
||||
width:100%;
|
||||
}
|
||||
#menu_horizontal .MENU_BOX
|
||||
#main_horizontal .MENU_LIST
|
||||
{
|
||||
box-sizing:border-box;
|
||||
width:100%;
|
||||
height:64px;
|
||||
padding:8px 16px;
|
||||
margin:0 auto;
|
||||
}
|
||||
#menu_horizontal .MAIN_ZONE_CANVAS /* Where content for each action is written */
|
||||
{
|
||||
box-sizing:border-box;
|
||||
width:100%;
|
||||
padding:8px 16px;
|
||||
text-align:left;
|
||||
vertical-align:top;
|
||||
}
|
||||
#menu_horizontal .MENU_LIST
|
||||
#main_horizontal ul
|
||||
{
|
||||
display:table;
|
||||
list-style-type:none;
|
||||
box-sizing:border-box;
|
||||
height:76px;
|
||||
margin:0 auto;
|
||||
padding:0;
|
||||
padding:8px 16px;
|
||||
list-style-type:none;
|
||||
}
|
||||
#menu_horizontal .MENU_LIST_ITEM
|
||||
#main_horizontal .MENU_LIST_ITEM
|
||||
{
|
||||
display:table-cell;
|
||||
box-sizing:border-box;
|
||||
width:138px;
|
||||
}
|
||||
.MENU_LIST_ITEM a:hover
|
||||
{
|
||||
text-decoration:none;
|
||||
}
|
||||
#menu_horizontal .OPTION
|
||||
{
|
||||
box-sizing:border-box;
|
||||
text-align:center;
|
||||
width:120px;
|
||||
height:60px;
|
||||
margin:0 auto;
|
||||
padding:32px 2px 2px 2px;
|
||||
background-size:32px 32px;
|
||||
background-repeat:no-repeat;
|
||||
background-position:center top;
|
||||
overflow:hidden;
|
||||
text-align:center;
|
||||
vertical-align:middle;
|
||||
}
|
||||
#menu_horizontal .OPTION_NOT_SELECTED
|
||||
#main_horizontal .MENU_OPT_OFF
|
||||
{
|
||||
opacity:0.67;
|
||||
}
|
||||
#menu_horizontal .OPTION_NOT_SELECTED:hover, #menu_horizontal .OPTION_SELECTED
|
||||
#main_horizontal .MENU_OPT_OFF:hover, #main_horizontal .MENU_OPT_ON
|
||||
{
|
||||
opacity:1;
|
||||
transform:scale(1.2,1.2);
|
||||
}
|
||||
|
||||
/******************************* Vertical menu *******************************/
|
||||
#menu_vertical
|
||||
#main_horizontal .MENU_ICON
|
||||
{
|
||||
box-sizing:border-box;
|
||||
padding:32px 0 0 0;
|
||||
background-size:32px 32px;
|
||||
background-repeat:no-repeat;
|
||||
background-position:center top;
|
||||
}
|
||||
#main_horizontal .MAIN_ZONE_CANVAS /* Where content for each action is written */
|
||||
{
|
||||
display:table;
|
||||
box-sizing:border-box;
|
||||
width:100%;
|
||||
margin:0 auto;
|
||||
}
|
||||
a:hover #menu_vertical.MENU_LIST_ITEM
|
||||
{
|
||||
text-decoration:none;
|
||||
}
|
||||
#menu_vertical .MENU_BOX
|
||||
{
|
||||
display:table-cell;
|
||||
box-sizing:border-box;
|
||||
width:180px;
|
||||
padding-left:8px;
|
||||
text-align:left;
|
||||
vertical-align:top;
|
||||
overflow:hidden;
|
||||
}
|
||||
#menu_vertical .MAIN_ZONE_CANVAS /* Where content for each action is written */
|
||||
{
|
||||
display:table-cell;
|
||||
box-sizing:border-box;
|
||||
padding:8px 16px;
|
||||
margin:0 auto;
|
||||
text-align:left;
|
||||
vertical-align:top;
|
||||
}
|
||||
#menu_vertical .MENU_LIST
|
||||
{
|
||||
display:table;
|
||||
list-style-type:none;
|
||||
margin:0;
|
||||
padding:0;
|
||||
|
||||
/************** Main central zone with vertical menu and canvas **************/
|
||||
@media only screen and (max-width: 1023px)
|
||||
{ /* For mobile phones */
|
||||
/* Mobile phone will display menu always in horizontal
|
||||
so the CSS must draw menu really in horizontal */
|
||||
#main_vertical
|
||||
{
|
||||
box-sizing:border-box;
|
||||
width:100%;
|
||||
}
|
||||
#main_vertical .MENU_LIST
|
||||
{
|
||||
width:100%;
|
||||
}
|
||||
#main_vertical ul
|
||||
{
|
||||
display:table;
|
||||
box-sizing:border-box;
|
||||
height:76px;
|
||||
margin:0 auto;
|
||||
padding:8px 16px;
|
||||
list-style-type:none;
|
||||
}
|
||||
#main_vertical .MENU_LIST_ITEM
|
||||
{
|
||||
display:table-cell;
|
||||
width:120px;
|
||||
height:60px;
|
||||
margin:0 auto;
|
||||
text-align:center;
|
||||
vertical-align:middle;
|
||||
}
|
||||
#main_vertical .MENU_OPT_OFF
|
||||
{
|
||||
opacity:0.67;
|
||||
}
|
||||
#main_vertical .MENU_OPT_OFF:hover, #main_vertical .MENU_OPT_ON
|
||||
{
|
||||
opacity:1;
|
||||
transform:scale(1.2,1.2);
|
||||
}
|
||||
#main_vertical .MENU_ICON
|
||||
{
|
||||
box-sizing:border-box;
|
||||
padding:32px 0 0 0;
|
||||
background-size:32px 32px;
|
||||
background-repeat:no-repeat;
|
||||
background-position:center top;
|
||||
}
|
||||
#main_vertical .MAIN_ZONE_CANVAS /* Where content for each action is written */
|
||||
{
|
||||
box-sizing:border-box;
|
||||
width:100%;
|
||||
padding:8px 16px;
|
||||
margin:0 auto;
|
||||
text-align:left;
|
||||
vertical-align:top;
|
||||
}
|
||||
#action_title /* Do not display action title */
|
||||
{
|
||||
display:none;
|
||||
}
|
||||
}
|
||||
#menu_vertical MENU_LIST_ITEM
|
||||
{
|
||||
display:block;
|
||||
}
|
||||
#menu_vertical .OPTION
|
||||
{
|
||||
display:table-cell;
|
||||
vertical-align:middle;
|
||||
height:40px;
|
||||
clear:both;
|
||||
margin:0 auto;
|
||||
padding:2px 2px 2px 50px;
|
||||
text-align:left;
|
||||
vertical-align:middle;
|
||||
background-size:40px 40px;
|
||||
background-repeat:no-repeat;
|
||||
background-position:2px 2px;
|
||||
overflow:hidden;
|
||||
}
|
||||
#menu_vertical .OPTION_NOT_SELECTED
|
||||
{
|
||||
opacity:0.67;
|
||||
}
|
||||
#menu_vertical .OPTION_NOT_SELECTED:hover, #menu_vertical .OPTION_SELECTED
|
||||
{
|
||||
opacity:1;
|
||||
|
||||
@media only screen and (min-width: 1024px)
|
||||
{ /* For tablets and desktop */
|
||||
#main_vertical
|
||||
{
|
||||
display:table;
|
||||
box-sizing:border-box;
|
||||
width:100%;
|
||||
}
|
||||
#main_vertical .MENU_LIST
|
||||
{
|
||||
display:table-cell;
|
||||
box-sizing:border-box;
|
||||
width:180px;
|
||||
}
|
||||
#main_vertical ul
|
||||
{
|
||||
display:table;
|
||||
margin:0;
|
||||
padding-left:8px;
|
||||
list-style-type:none;
|
||||
}
|
||||
#main_vertical .MENU_LIST_ITEM
|
||||
{
|
||||
text-align:left;
|
||||
}
|
||||
#main_vertical .MENU_OPT_OFF
|
||||
{
|
||||
opacity:0.67;
|
||||
}
|
||||
#main_vertical .MENU_OPT_OFF:hover, #main_vertical .MENU_OPT_ON
|
||||
{
|
||||
opacity:1;
|
||||
}
|
||||
#main_vertical .MENU_ICON
|
||||
{
|
||||
display:table-cell;
|
||||
height:42px;
|
||||
vertical-align:middle;
|
||||
padding:2px 2px 2px 50px;
|
||||
background-size:40px 40px;
|
||||
background-repeat:no-repeat;
|
||||
background-position:2px 2px;
|
||||
}
|
||||
#main_vertical .MAIN_ZONE_CANVAS /* Where content for each action is written */
|
||||
{
|
||||
display:table-cell;
|
||||
box-sizing:border-box;
|
||||
padding:8px 16px;
|
||||
margin:0 auto;
|
||||
text-align:left;
|
||||
vertical-align:top;
|
||||
}
|
||||
#action_title
|
||||
{
|
||||
box-sizing:border-box;
|
||||
width:400px;
|
||||
min-height:70px;
|
||||
clear:both;
|
||||
margin:0 auto;
|
||||
text-align:left;
|
||||
background-size:64px 64px;
|
||||
background-position:0 0;
|
||||
background-repeat:no-repeat;
|
||||
padding:4px 12px 12px 70px;
|
||||
overflow:hidden;
|
||||
}
|
||||
}
|
||||
|
||||
/********************************* Menu fonts ********************************/
|
||||
.WHITE_MENU_OFF {color:#4D88A1; font-size:12pt; font-weight:bold; line-height:110%;}
|
||||
.GREY_MENU_OFF {color:#707070; font-size:12pt; font-weight:bold; line-height:110%;}
|
||||
.BLUE_MENU_OFF {color:#4D88A1; font-size:12pt; font-weight:bold; line-height:110%;}
|
||||
.YELLOW_MENU_OFF {color:#BD4815; font-size:12pt; font-weight:bold; line-height:110%;}
|
||||
|
||||
.WHITE_MENU_ON {color:#4D88A1; font-size:12pt; font-weight:bold; line-height:110%;}
|
||||
.GREY_MENU_ON {color:#606060; font-size:12pt; font-weight:bold; line-height:110%;}
|
||||
.BLUE_MENU_ON {color:#4D88A1; font-size:12pt; font-weight:bold; line-height:110%;}
|
||||
.YELLOW_MENU_ON {color:#BD4815; font-size:12pt; font-weight:bold; line-height:110%;}
|
||||
|
||||
/****************** Title of current action in main block ********************/
|
||||
#action_title
|
||||
{
|
||||
box-sizing:border-box;
|
||||
width:400px;
|
||||
min-height:70px;
|
||||
clear:both;
|
||||
margin:0 auto;
|
||||
text-align:left;
|
||||
background-size:64px 64px;
|
||||
background-position:0 0;
|
||||
background-repeat:no-repeat;
|
||||
padding:4px 12px 12px 70px;
|
||||
overflow:hidden;
|
||||
@media only screen and (max-width: 799px)
|
||||
{ /* For mobile-phones */
|
||||
.MENU_TEXT
|
||||
{
|
||||
display:none;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 800px)
|
||||
{ /* For tablets and desktop */
|
||||
.MENU_TEXT
|
||||
{
|
||||
font-size:12pt;
|
||||
font-weight:bold;
|
||||
line-height:110%;
|
||||
}
|
||||
}
|
||||
|
||||
.WHITE_MENU_OFF {color:#4D88A1;}
|
||||
.GREY_MENU_OFF {color:#707070;}
|
||||
.BLUE_MENU_OFF {color:#4D88A1;}
|
||||
.YELLOW_MENU_OFF {color:#BD4815;}
|
||||
|
||||
.WHITE_MENU_ON {color:#4D88A1;}
|
||||
.GREY_MENU_ON {color:#606060;}
|
||||
.BLUE_MENU_ON {color:#4D88A1;}
|
||||
.YELLOW_MENU_ON {color:#BD4815;}
|
||||
|
||||
/****************** Title of current action in main block ********************/
|
||||
.WHITE_TITLE_ACTION {color:#606060; font-size:20pt;}
|
||||
.GREY_TITLE_ACTION {color:#606060; font-size:20pt;}
|
||||
.BLUE_TITLE_ACTION {color:#4D88A1; font-size:20pt;}
|
||||
|
|
|
@ -117,11 +117,13 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.49.4 (2015/11/29)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.50 (2015/11/30)"
|
||||
|
||||
// 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.50: Nov 30, 2015 Changes in layout of menus.
|
||||
Responsive design in menu: when screen is small, horizontal menu is drawn. (186514 lines)
|
||||
Version 15.49.4: Nov 29, 2015 Changes in layout of menus. (186481 lines)
|
||||
Version 15.49.3: Nov 29, 2015 Changes in layout of menus. (186502 lines)
|
||||
Version 15.49.2: Nov 29, 2015 Changes in layout of menus. (186501 lines)
|
||||
|
|
|
@ -110,7 +110,12 @@ void Lay_WriteStartOfPage (void)
|
|||
"whole_page_grey", // The_THEME_GREY
|
||||
"whole_page_blue", // The_THEME_BLUE
|
||||
"whole_page_yellow", // The_THEME_YELLOW
|
||||
};
|
||||
};
|
||||
const char *LayoutMainZone[Mnu_NUM_MENUS] =
|
||||
{
|
||||
"main_horizontal", // Mnu_MENU_HORIZONTAL
|
||||
"main_vertical", // Mnu_MENU_VERTICAL
|
||||
};
|
||||
|
||||
/***** If, when this function is called, the head is being written
|
||||
or the head is already written ==> don't do anything *****/
|
||||
|
@ -298,14 +303,14 @@ void Lay_WriteStartOfPage (void)
|
|||
}
|
||||
fprintf (Gbl.F.Out,"<div id=\"main_zone_central_container\" class=\"%s\">",
|
||||
The_TabOnBgColors[Gbl.Prefs.Theme]);
|
||||
fprintf (Gbl.F.Out,"<div id=\"%s\">",
|
||||
Gbl.Prefs.Menu == Mnu_MENU_VERTICAL ? "menu_vertical" :
|
||||
"menu_horizontal");
|
||||
|
||||
/* Layout with horizontal or vertical menu */
|
||||
fprintf (Gbl.F.Out,"<div id=\"%s\">",LayoutMainZone[Gbl.Prefs.Menu]);
|
||||
|
||||
/* Menu */
|
||||
Mnu_WriteMenuThisTab ();
|
||||
|
||||
/* Start of main zone for actions output */
|
||||
/* Start of canvas: main zone for actions output */
|
||||
fprintf (Gbl.F.Out,"<div class=\"MAIN_ZONE_CANVAS\">");
|
||||
|
||||
/* Write warning when degree type does not allow direct login */
|
||||
|
@ -349,8 +354,8 @@ static void Lay_WriteEndOfPage (void)
|
|||
if (!Gbl.Layout.DivsEndWritten)
|
||||
{
|
||||
/***** End of central part of main zone *****/
|
||||
fprintf (Gbl.F.Out,"</div>" // main_zone_canvas
|
||||
"</div>" // menu_horizontal or menu_vertical
|
||||
fprintf (Gbl.F.Out,"</div>" // Canvas (main zone to output content of the current action)
|
||||
"</div>" // Layout with horizontal or vertical menu
|
||||
"</div>"); // main_zone_central_container
|
||||
|
||||
/***** Write page footer *****/
|
||||
|
|
115
swad_menu.c
115
swad_menu.c
|
@ -72,8 +72,8 @@ const char *Mnu_MenuIcons[Mnu_NUM_MENUS] =
|
|||
|
||||
void Mnu_WriteMenuThisTab (void)
|
||||
{
|
||||
extern const char *The_ClassMenuOn[The_NUM_THEMES];
|
||||
extern const char *The_ClassMenuOff[The_NUM_THEMES];
|
||||
extern const char *The_ClassTxtMenuOn[The_NUM_THEMES];
|
||||
extern const char *The_ClassTxtMenuOff[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;
|
||||
|
@ -82,8 +82,8 @@ void Mnu_WriteMenuThisTab (void)
|
|||
bool IsTheSelectedAction;
|
||||
|
||||
/***** Menu start *****/
|
||||
fprintf (Gbl.F.Out,"<div class=\"MENU_BOX\">"
|
||||
"<ul class=\"MENU_LIST\">");
|
||||
fprintf (Gbl.F.Out,"<div class=\"MENU_LIST\">"
|
||||
"<ul>");
|
||||
|
||||
/***** Loop to write all options in menu. Each row holds an option *****/
|
||||
for (NumOptInMenu = 0;
|
||||
|
@ -104,30 +104,30 @@ void Mnu_WriteMenuThisTab (void)
|
|||
|
||||
/***** Start of container used to highlight this option *****/
|
||||
fprintf (Gbl.F.Out,"<div class=\"%s\">",
|
||||
IsTheSelectedAction ? "OPTION_SELECTED" :
|
||||
"OPTION_NOT_SELECTED");
|
||||
IsTheSelectedAction ? "MENU_OPT_ON" :
|
||||
"MENU_OPT_OFF");
|
||||
|
||||
/***** Start of form and link *****/
|
||||
Act_FormStart (NumAct);
|
||||
Act_LinkFormSubmit (Title,NULL);
|
||||
|
||||
/***** Icon *****/
|
||||
fprintf (Gbl.F.Out,"<div class=\"OPTION\""
|
||||
fprintf (Gbl.F.Out,"<div class=\"MENU_ICON\""
|
||||
" 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],
|
||||
fprintf (Gbl.F.Out,"<div class=\"MENU_TEXT %s\">"
|
||||
"%s"
|
||||
"</div>",
|
||||
IsTheSelectedAction ? The_ClassTxtMenuOn[Gbl.Prefs.Theme] :
|
||||
The_ClassTxtMenuOff[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 *****/
|
||||
|
@ -140,94 +140,7 @@ void Mnu_WriteMenuThisTab (void)
|
|||
|
||||
/***** Menu end *****/
|
||||
fprintf (Gbl.F.Out,"</ul>"
|
||||
"</div>");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************* Write vertical menu of current tab **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Mnu_WriteVerticalMenuThisTab (void)
|
||||
{
|
||||
extern const char *The_ClassMenuOn[The_NUM_THEMES];
|
||||
extern const char *The_ClassMenuOff[The_NUM_THEMES];
|
||||
// extern const char *The_ClassSeparator[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;
|
||||
// bool SeparationBetweenPreviousAndCurrentOption = false;
|
||||
// bool PreviousVisibleOptions = false;
|
||||
|
||||
/***** 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);
|
||||
/*
|
||||
if (SeparationBetweenPreviousAndCurrentOption)
|
||||
{
|
||||
if (PreviousVisibleOptions)
|
||||
fprintf (Gbl.F.Out,"<li>"
|
||||
"<hr class=\"%s\" />"
|
||||
"</li>",
|
||||
The_ClassSeparator[Gbl.Prefs.Theme]);
|
||||
SeparationBetweenPreviousAndCurrentOption = false;
|
||||
}
|
||||
*/
|
||||
/***** 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);
|
||||
|
||||
/***** 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>");
|
||||
|
||||
// PreviousVisibleOptions = true;
|
||||
}
|
||||
|
||||
// if (!SeparationBetweenPreviousAndCurrentOption)
|
||||
// SeparationBetweenPreviousAndCurrentOption = Act_Menu[Gbl.CurrentTab][NumOptInMenu].SubsequentSeparation;
|
||||
}
|
||||
"</div>");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -302,5 +215,5 @@ Mnu_Menu_t Mnu_GetParamMenu (void)
|
|||
if (UnsignedNum < Mnu_NUM_MENUS)
|
||||
return (Mnu_Menu_t) UnsignedNum;
|
||||
|
||||
return Mnu_MENU_UNKNOWN;
|
||||
return Mnu_MENU_DEFAULT;
|
||||
}
|
||||
|
|
|
@ -37,11 +37,11 @@
|
|||
/******************************* Public types ********************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Mnu_NUM_MENUS 2
|
||||
typedef enum
|
||||
{
|
||||
Mnu_MENU_HORIZONTAL = 0,
|
||||
Mnu_MENU_VERTICAL = 1,
|
||||
Mnu_MENU_UNKNOWN = 2,
|
||||
} Mnu_Menu_t; // Stored in database. Don't change numbers!
|
||||
#define Mnu_MENU_DEFAULT Mnu_MENU_HORIZONTAL
|
||||
|
||||
|
@ -50,7 +50,6 @@ typedef enum
|
|||
/*****************************************************************************/
|
||||
|
||||
void Mnu_WriteMenuThisTab (void);
|
||||
void Mnu_WriteVerticalMenuThisTab (void);
|
||||
|
||||
void Mnu_PutIconsToSelectMenu (void);
|
||||
void Mnu_ChangeMenu (void);
|
||||
|
|
28
swad_tab.c
28
swad_tab.c
|
@ -80,8 +80,8 @@ static void Tab_WriteBreadcrumbAction (void);
|
|||
|
||||
void Tab_DrawTabs (void)
|
||||
{
|
||||
extern const char *The_ClassTabOn[The_NUM_THEMES];
|
||||
extern const char *The_ClassTabOff[The_NUM_THEMES];
|
||||
extern const char *The_ClassTxtTabOn[The_NUM_THEMES];
|
||||
extern const char *The_ClassTxtTabOff[The_NUM_THEMES];
|
||||
extern const char *The_TabOnBgColors[The_NUM_THEMES];
|
||||
extern const char *The_TabOffBgColors[The_NUM_THEMES];
|
||||
extern const char *Txt_TABS_FULL_TXT[Tab_NUM_TABS];
|
||||
|
@ -123,8 +123,8 @@ void Tab_DrawTabs (void)
|
|||
Act_FormStart (ActMnu);
|
||||
Par_PutHiddenParamUnsigned ("NxtTab",(unsigned) NumTab);
|
||||
Act_LinkFormSubmit (Txt_TABS_FULL_TXT[NumTab],
|
||||
NumTab == Gbl.CurrentTab ? The_ClassTabOn[Gbl.Prefs.Theme] :
|
||||
The_ClassTabOff[Gbl.Prefs.Theme]);
|
||||
NumTab == Gbl.CurrentTab ? The_ClassTxtTabOn[Gbl.Prefs.Theme] :
|
||||
The_ClassTxtTabOff[Gbl.Prefs.Theme]);
|
||||
fprintf (Gbl.F.Out,"<img src=\"%s/%s/%s64x64.gif\""
|
||||
" alt=\"%s\" title=\"%s\""
|
||||
" class=\"ICON32x32\" style=\"margin:3px;\" />"
|
||||
|
@ -147,7 +147,7 @@ void Tab_DrawTabs (void)
|
|||
Tab_TabIcons[NumTab],
|
||||
Txt_TABS_FULL_TXT[NumTab],
|
||||
Txt_TABS_FULL_TXT[NumTab],
|
||||
The_ClassTabOff[Gbl.Prefs.Theme],
|
||||
The_ClassTxtTabOff[Gbl.Prefs.Theme],
|
||||
Txt_TABS_SHORT_TXT[NumTab]);
|
||||
|
||||
fprintf (Gbl.F.Out,"</div>"
|
||||
|
@ -198,7 +198,7 @@ static bool Tab_CheckIfICanViewTab (Act_Tab_t Tab)
|
|||
void Tab_DrawBreadcrumb (void)
|
||||
{
|
||||
extern const char *The_TabOnBgColors[The_NUM_THEMES];
|
||||
extern const char *The_ClassTabOn[The_NUM_THEMES];
|
||||
extern const char *The_ClassTxtTabOn[The_NUM_THEMES];
|
||||
|
||||
fprintf (Gbl.F.Out,"<div id=\"breadcrumb_container\" class=\"%s\">",
|
||||
The_TabOnBgColors[Gbl.Prefs.Theme]);
|
||||
|
@ -211,14 +211,14 @@ void Tab_DrawBreadcrumb (void)
|
|||
{
|
||||
/***** Tab *****/
|
||||
fprintf (Gbl.F.Out,"<span class=\"%s\"> > </span>",
|
||||
The_ClassTabOn[Gbl.Prefs.Theme]);
|
||||
The_ClassTxtTabOn[Gbl.Prefs.Theme]);
|
||||
Tab_WriteBreadcrumbTab ();
|
||||
|
||||
if (Act_Actions[Act_Actions[Gbl.CurrentAct].SuperAction].IndexInMenu >= 0)
|
||||
{
|
||||
/***** Menu *****/
|
||||
fprintf (Gbl.F.Out,"<span class=\"%s\"> > </span>",
|
||||
The_ClassTabOn[Gbl.Prefs.Theme]);
|
||||
The_ClassTxtTabOn[Gbl.Prefs.Theme]);
|
||||
Tab_WriteBreadcrumbAction ();
|
||||
}
|
||||
}
|
||||
|
@ -232,11 +232,11 @@ void Tab_DrawBreadcrumb (void)
|
|||
|
||||
static void Tab_WriteBreadcrumbHome (void)
|
||||
{
|
||||
extern const char *The_ClassTabOn[The_NUM_THEMES];
|
||||
extern const char *The_ClassTxtTabOn[The_NUM_THEMES];
|
||||
extern const char *Txt_Home_PAGE;
|
||||
|
||||
Act_FormStart (ActHom);
|
||||
Act_LinkFormSubmit (Txt_Home_PAGE,The_ClassTabOn[Gbl.Prefs.Theme]);
|
||||
Act_LinkFormSubmit (Txt_Home_PAGE,The_ClassTxtTabOn[Gbl.Prefs.Theme]);
|
||||
fprintf (Gbl.F.Out,"%s</a>",
|
||||
Txt_Home_PAGE);
|
||||
Act_FormEnd ();
|
||||
|
@ -248,13 +248,13 @@ static void Tab_WriteBreadcrumbHome (void)
|
|||
|
||||
static void Tab_WriteBreadcrumbTab (void)
|
||||
{
|
||||
extern const char *The_ClassTabOn[The_NUM_THEMES];
|
||||
extern const char *The_ClassTxtTabOn[The_NUM_THEMES];
|
||||
extern const char *Txt_TABS_FULL_TXT[Tab_NUM_TABS];
|
||||
|
||||
/***** Start form *****/
|
||||
Act_FormStart (ActMnu);
|
||||
Par_PutHiddenParamUnsigned ("NxtTab",(unsigned) Gbl.CurrentTab);
|
||||
Act_LinkFormSubmit (Txt_TABS_FULL_TXT[Gbl.CurrentTab],The_ClassTabOn[Gbl.Prefs.Theme]);
|
||||
Act_LinkFormSubmit (Txt_TABS_FULL_TXT[Gbl.CurrentTab],The_ClassTxtTabOn[Gbl.Prefs.Theme]);
|
||||
|
||||
/***** Title and end of form *****/
|
||||
fprintf (Gbl.F.Out,"%s</a>",
|
||||
|
@ -268,12 +268,12 @@ static void Tab_WriteBreadcrumbTab (void)
|
|||
|
||||
static void Tab_WriteBreadcrumbAction (void)
|
||||
{
|
||||
extern const char *The_ClassTabOn[The_NUM_THEMES];
|
||||
extern const char *The_ClassTxtTabOn[The_NUM_THEMES];
|
||||
const char *Title = Act_GetTitleAction (Gbl.CurrentAct);
|
||||
|
||||
/***** Start form *****/
|
||||
Act_FormStart (Act_Actions[Gbl.CurrentAct].SuperAction);
|
||||
Act_LinkFormSubmit (Title,The_ClassTabOn[Gbl.Prefs.Theme]);
|
||||
Act_LinkFormSubmit (Title,The_ClassTxtTabOn[Gbl.Prefs.Theme]);
|
||||
|
||||
/***** Title and end of form *****/
|
||||
fprintf (Gbl.F.Out,"%s</a>",
|
||||
|
|
|
@ -143,7 +143,7 @@ const char *The_ClassConnected[The_NUM_THEMES] =
|
|||
"YELLOW_CONNECTED",
|
||||
};
|
||||
|
||||
const char *The_ClassMenuOff[The_NUM_THEMES] =
|
||||
const char *The_ClassTxtMenuOff[The_NUM_THEMES] =
|
||||
{
|
||||
"WHITE_MENU_OFF",
|
||||
"GREY_MENU_OFF",
|
||||
|
@ -151,7 +151,7 @@ const char *The_ClassMenuOff[The_NUM_THEMES] =
|
|||
"YELLOW_MENU_OFF",
|
||||
};
|
||||
|
||||
const char *The_ClassMenuOn[The_NUM_THEMES] =
|
||||
const char *The_ClassTxtMenuOn[The_NUM_THEMES] =
|
||||
{
|
||||
"WHITE_MENU_ON",
|
||||
"GREY_MENU_ON",
|
||||
|
@ -159,7 +159,7 @@ const char *The_ClassMenuOn[The_NUM_THEMES] =
|
|||
"YELLOW_MENU_ON",
|
||||
};
|
||||
|
||||
const char *The_ClassTabOff[The_NUM_THEMES] =
|
||||
const char *The_ClassTxtTabOff[The_NUM_THEMES] =
|
||||
{
|
||||
"WHITE_TAB_OFF",
|
||||
"GREY_TAB_OFF",
|
||||
|
@ -167,7 +167,7 @@ const char *The_ClassTabOff[The_NUM_THEMES] =
|
|||
"YELLOW_TAB_OFF",
|
||||
};
|
||||
|
||||
const char *The_ClassTabOn[The_NUM_THEMES] =
|
||||
const char *The_ClassTxtTabOn[The_NUM_THEMES] =
|
||||
{
|
||||
"WHITE_TAB_ON",
|
||||
"GREY_TAB_ON",
|
||||
|
|
Loading…
Reference in New Issue