Version 14.102

This commit is contained in:
Antonio Cañas Vargas 2015-03-24 19:41:54 +01:00
parent 5572467839
commit b386ab9b24
10 changed files with 156 additions and 118 deletions

View File

@ -201,57 +201,6 @@ hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;}
background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.2));
}
/*
.signin-wrapper .primary-btn {
font-size: 18px;
padding: 9px 13px;
}
.primary-btn, .following.first-hover .follow-btn:hover, .following .follow-btn, .following .follow-button.cancel-hover-style:hover, .following .follow-button, .notifying .device-follow-button, .button-group-item .content.selected {
background-color: #55acee;
background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.05));
border: 1px solid #3b88c3;
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset;
color: #fff;
}
.btn {
background-color: #f5f8fa;
background-image: linear-gradient(#fff, #f5f8fa);
}
.btn {
background-color: #ccd6dd;
background-repeat: no-repeat;
border: 1px solid #e1e8ed;
border-radius: 4px;
color: #66757f;
cursor: pointer;
display: inline-block;
font-size: 14px;
font-weight: bold;
line-height: normal;
padding: 8px 16px;
position: relative;
}
button {
border: 0 none;
}
button {
background: none repeat scroll 0 0 transparent;
border: 0 none;
padding: 0;
}
button, html input[type="button"], input[type="reset"], input[type="submit"] {
cursor: pointer;
}
button, select {
text-transform: none;
}
button {
overflow: visible;
}
*/
/********************************** Notice ***********************************/
.NOTICE_CONTAINER

View File

@ -104,6 +104,53 @@ p {margin:0;}
.DAY_EVENT {border:solid 1px; border-color:white; background-color:#FFF080;}
.TODAY_EVENT {border:solid 1px; border-color:#50B800; background-color:#FFF080;}
/********************************* Buttons ***********************************/
.BT_CREATE
{
background-color:#5BC33B;
border:1px solid #518741;
}
.BT_CONFIRM
{
background-color:#55ACEE;
border:1px solid #3B88C3;
}
.BT_REMOVE
{
background-color:#EF5555;
border:1px solid #C33B3B;
}
.BT_SUBMIT
{
color:white;
font-size:16px;
font-weight:bold;
line-height:normal;
margin:8px;
padding:8px 16px;
border-radius:4px;
box-shadow:0 1px 0 rgba(255, 255, 255, 0.15) inset;
}
.BT_SUBMIT_INLINE
{
color:white;
font-size:12px;
font-weight:bold;
line-height:normal;
margin:0 4px;
padding:4px 8px;
border-radius:4px;
box-shadow:0 1px 0 rgba(255, 255, 255, 0.15) inset;
}
.BT_SUBMIT:hover
{
background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.2));
}
.BT_SUBMIT_INLINE:hover
{
background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.2));
}
/********************************** Notice ***********************************/
.NOTICE_CONTAINER

View File

@ -4310,8 +4310,8 @@ void Act_LinkFormSubmitAnimated (const char *Title,const char *LinkStyle)
fprintf (Gbl.F.Out," class=\"%s\"",LinkStyle);
fprintf (Gbl.F.Out," onclick=\"javascript:"
"document.getElementById('update_%d').style.display='none';" // Icon to be hiden on click
"document.getElementById('updating_%d').style.display='';" // Icon to be shown on click
"document.getElementById('%s').submit();return false;\">",
" document.getElementById('updating_%d').style.display='';" // Icon to be shown on click
" document.getElementById('%s').submit();return false;\">",
Gbl.NumForm,
Gbl.NumForm,
Gbl.FormId);

View File

@ -3049,8 +3049,8 @@ static void Att_ListEventsToSelect (void)
fprintf (Gbl.F.Out,"<tr>"
"<td colspan=\"4\" class=\"DAT\""
" style=\"text-align:center;\">");
Act_LinkFormSubmit (Txt_Update_attendance_according_to_selected_events,The_ClassFormul[Gbl.Prefs.Theme]);
Lay_PutSendIcon ("recycle",Txt_Update_attendance_according_to_selected_events,Txt_Update_attendance);
Act_LinkFormSubmitAnimated (Txt_Update_attendance_according_to_selected_events,The_ClassFormul[Gbl.Prefs.Theme]);
Lay_PutCalculateIcon (Txt_Update_attendance_according_to_selected_events,Txt_Update_attendance);
fprintf (Gbl.F.Out,"</td>"
"</tr>");
}

View File

@ -103,12 +103,12 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 14.101.1 (2015/03/24)"
#define Log_PLATFORM_VERSION "SWAD 14.102 (2015/03/24)"
// 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 14.101.1: Mar 24, 2015 Changes in some update buttons. (? lines)
Version 14.102: Mar 24, 2015 Changes in some update buttons. (183865 lines)
Version 14.101: Mar 24, 2015 Fixed bug in form to create a new account.
Fixed bug in statistics.
New design of buttons. (183753 lines)

View File

@ -76,11 +76,23 @@ void Con_ShowConnectedUsrs (void)
extern const char *Txt_MONTHS_SMALL_SHORT[12];
extern const char *Txt_Connected_users;
fprintf (Gbl.F.Out,"<div style=\"text-align:center;\">");
/***** Set where to show connected users to main zone *****/
Gbl.Usrs.Connected.WhereToShow = Con_SHOW_ON_MAIN_ZONE;
/***** Start frame *****/
/* Current time */
sprintf (Gbl.Title,"%s<br />%u %s, %u:%02u",
Txt_Connected_users,
Gbl.Now.Date.Day,
Txt_MONTHS_SMALL_SHORT[Gbl.Now.Date.Month-1],
Gbl.Now.Time.Hour,
Gbl.Now.Time.Minute);
Lay_StartRoundFrameTable10 (NULL,0,Gbl.Title);
/***** Put form to update connected users *****/
fprintf (Gbl.F.Out,"<tr>"
"<td style=\"padding-bottom:10px; text-align:center;\">");
Act_FormStart (ActLstCon);
/* Users connected belonging to the platform, current degree or current course */
Gbl.Scope.Current = Sco_SCOPE_CRS;
if (Gbl.Usrs.Me.LoggedRole == Rol_ROLE_SYS_ADM)
{
@ -91,24 +103,14 @@ void Con_ShowConnectedUsrs (void)
Sco_PutSelectorScope (false);
fprintf (Gbl.F.Out,"</div>");
}
Act_LinkFormSubmit (Txt_Update_connected_users,The_ClassFormul[Gbl.Prefs.Theme]);
Lay_PutSendIcon ("recycle",Txt_Update_connected_users,Txt_Update_connected_users);
Act_LinkFormSubmitAnimated (Txt_Update_connected_users,The_ClassFormul[Gbl.Prefs.Theme]);
Lay_PutCalculateIcon (Txt_Update_connected_users,Txt_Update_connected_users);
Act_FormEnd ();
fprintf (Gbl.F.Out,"</div>");
/***** Show connected users *****/
Gbl.Usrs.Connected.WhereToShow = Con_SHOW_ON_MAIN_ZONE;
/* Current time */
sprintf (Gbl.Title,"%s<br />%u %s, %u:%02u",
Txt_Connected_users,
Gbl.Now.Date.Day,
Txt_MONTHS_SMALL_SHORT[Gbl.Now.Date.Month-1],
Gbl.Now.Time.Hour,
Gbl.Now.Time.Minute);
Lay_StartRoundFrameTable10 (NULL,0,Gbl.Title);
fprintf (Gbl.F.Out,"<tr>"
"<td>");
fprintf (Gbl.F.Out,"</td>"
"</tr>"
"<tr>"
"<td style=\"text-align:center;\">");
/* Number of connected users in the whole platform */
Con_ShowGlobalConnectedUsrs ();
@ -118,6 +120,8 @@ void Con_ShowConnectedUsrs (void)
fprintf (Gbl.F.Out,"</td>"
"</tr>");
/***** End frame *****/
Lay_EndRoundFrameTable10 ();
}

View File

@ -277,11 +277,10 @@ static void Grp_ShowFormSeveralGrps (Act_Action_t NextAction)
/***** Submit button *****/
fprintf (Gbl.F.Out,"<tr>"
"<td colspan=\"7\" class=\"%s\""
" style=\"text-align:center;\">"
"<br />",
" style=\"padding-top:10px; text-align:center;\">",
The_ClassFormul[Gbl.Prefs.Theme]);
Act_LinkFormSubmit (Txt_Update_students_according_to_selected_groups,The_ClassFormul[Gbl.Prefs.Theme]);
Lay_PutSendIcon ("recycle",Txt_Update_students_according_to_selected_groups,Txt_Update_students);
Act_LinkFormSubmitAnimated (Txt_Update_students_according_to_selected_groups,The_ClassFormul[Gbl.Prefs.Theme]);
Lay_PutCalculateIcon (Txt_Update_students_according_to_selected_groups,Txt_Update_students);
fprintf (Gbl.F.Out,"</td>"
"</tr>");

View File

@ -88,24 +88,29 @@ void Ind_ReqIndicatorsCourses (void)
unsigned Ind;
unsigned NumCrss;
/***** Start frame *****/
Lay_StartRoundFrameTable10 (NULL,2,Txt_Indicators_of_courses);
fprintf (Gbl.F.Out,"<tr>"
"<td style=\"text-align:center;\">");
/***** Form to update indicators *****/
/* Start form */
Act_FormStart (ActReqStaCrs);
fprintf (Gbl.F.Out,"<table class=\"CELLS_PAD_2\" style=\"margin:0 auto;\">");
/* Compute stats for anywhere, centre, degree or course? */
fprintf (Gbl.F.Out,"<tr>"
fprintf (Gbl.F.Out,"<table class=\"CELLS_PAD_2\" style=\"margin:0 auto;\">"
"<tr>"
"<td class=\"%s\""
" style=\"text-align:right; vertical-align:middle;\">"
"%s:"
"</td>"
"<td style=\"text-align:left; vertical-align:middle;\">",
The_ClassFormul[Gbl.Prefs.Theme],Txt_Scope);
Gbl.Scope.Allowed = 1 << Sco_SCOPE_SYS |
1 << Sco_SCOPE_CTY |
Gbl.Scope.Allowed = 1 << Sco_SCOPE_SYS |
1 << Sco_SCOPE_CTY |
1 << Sco_SCOPE_INS |
1 << Sco_SCOPE_CTR |
1 << Sco_SCOPE_DEG |
1 << Sco_SCOPE_CTR |
1 << Sco_SCOPE_DEG |
1 << Sco_SCOPE_CRS;
Gbl.Scope.Default = Sco_SCOPE_CRS;
Sco_GetScope ();
@ -163,24 +168,32 @@ void Ind_ReqIndicatorsCourses (void)
fprintf (Gbl.F.Out," selected=\"selected\"");
fprintf (Gbl.F.Out,">%u</option>",Ind);
}
fprintf (Gbl.F.Out,"</select>");
fprintf (Gbl.F.Out,"</select>"
"</td>"
"</tr>");
/* Send button */
fprintf (Gbl.F.Out,"<tr>"
"<td colspan=\"2\" style=\"text-align:center;\">");
Act_LinkFormSubmitAnimated (Txt_Update_indicators,The_ClassFormul[Gbl.Prefs.Theme]);
Lay_PutCalculateIcon (Txt_Update_indicators,Txt_Update_indicators);
fprintf (Gbl.F.Out,"</td>"
"</tr>"
"</table>");
/* Form end */
fprintf (Gbl.F.Out,"</td>"
"</table>");
Lay_PutConfirmButton (Txt_Update_indicators);
Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>"
"</tr>"
"<tr>"
"<td style=\"text-align:center;\">");
/***** Get courses from database *****/
NumCrss = Ind_GetTableOfCourses (&mysql_res);
if (Ind_GetIfShowBigList (NumCrss))
{
/***** Show the stats of courses *****/
/* Start table */
Lay_StartRoundFrameTable10 (NULL,0,Txt_Indicators_of_courses);
fprintf (Gbl.F.Out,"<tr>"
"<td style=\"text-align:center;\">");
/* Show table */
Ind_ShowTableOfCoursesWithIndicators (Ind_INDICATORS_BRIEF,NumCrss,mysql_res);
@ -192,13 +205,13 @@ void Ind_ReqIndicatorsCourses (void)
Par_PutHiddenParamLong ("Indicators",Gbl.Stat.NumIndicators);
Lay_PutConfirmButton (Txt_Show_more_details);
Act_FormEnd ();
/* End table */
fprintf (Gbl.F.Out,"</td>"
"</tr>");
Lay_EndRoundFrameTable10 ();
}
/***** End frame *****/
fprintf (Gbl.F.Out,"</td>"
"</tr>");
Lay_EndRoundFrameTable10 ();
/***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res);
}
@ -310,6 +323,32 @@ static unsigned Ind_GetTableOfCourses (MYSQL_RES **mysql_res)
" ORDER BY degrees.FullName,courses.FullName");
}
break;
case Sco_SCOPE_CTY:
if (Gbl.Stat.DptCod > 0)
sprintf (Query,"SELECT DISTINCTROW degrees.FullName,courses.FullName,courses.CrsCod,courses.InsCrsCod"
" FROM institutions,centres,degrees,courses,crs_usr,usr_data"
" WHERE institutions.CtyCod='%ld'"
" AND institutions.InsCod=centres.InsCod"
" AND centres.CtrCod=degrees.CtrCod"
" AND degrees.DegCod=courses.DegCod"
" AND courses.CrsCod=crs_usr.CrsCod"
" AND crs_usr.Role='%u'"
" AND crs_usr.UsrCod=usr_data.UsrCod"
" AND usr_data.DptCod='%ld'"
" ORDER BY degrees.FullName,courses.FullName",
Gbl.CurrentCty.Cty.CtyCod,
(unsigned) Rol_ROLE_TEACHER,
Gbl.Stat.DptCod);
else
sprintf (Query,"SELECT degrees.FullName,courses.FullName,courses.CrsCod,courses.InsCrsCod"
" FROM institutions,centres,degrees,courses"
" WHERE institutions.CtyCod='%ld'"
" AND institutions.InsCod=centres.InsCod"
" AND centres.CtrCod=degrees.CtrCod"
" AND degrees.DegCod=courses.DegCod"
" ORDER BY degrees.FullName,courses.FullName",
Gbl.CurrentCty.Cty.CtyCod);
break;
case Sco_SCOPE_INS:
if (Gbl.Stat.DptCod > 0)
sprintf (Query,"SELECT DISTINCTROW degrees.FullName,courses.FullName,courses.CrsCod,courses.InsCrsCod"

View File

@ -1718,8 +1718,8 @@ static void Pho_PutLinkToCalculateDegreeStats (void)
Usr_PutParamUsrListType (Gbl.Usrs.Me.ListType);
Usr_PutParamColsClassPhoto ();
Usr_PutParamListWithPhotos ();
Act_LinkFormSubmit (Txt_Calculate_average_photo_of_a_degree,The_ClassFormul[Gbl.Prefs.Theme]);
Lay_PutSendIcon ("recycle",Txt_Calculate_average_photo_of_a_degree,Txt_Calculate_average_photo_of_THE_DEGREE_X);
Act_LinkFormSubmitAnimated (Txt_Calculate_average_photo_of_a_degree,The_ClassFormul[Gbl.Prefs.Theme]);
Lay_PutCalculateIcon (Txt_Calculate_average_photo_of_a_degree,Txt_Calculate_average_photo_of_THE_DEGREE_X);
/***** Put selector with all the degrees *****/
fprintf (Gbl.F.Out,"<select name=\"OthDegCod\">");

View File

@ -17598,23 +17598,23 @@ const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
,
// ActReqPubPrf
#if L==0
"Perfil"
"Perfils"
#elif L==1
"Profil"
"Profiles"
#elif L==2
"Profile"
"Profiles"
#elif L==3
"Perfil"
"Perfiles"
#elif L==4
"Profil"
"Profils"
#elif L==5
"Che"
#elif L==6
"Profilo"
"Profili"
#elif L==7
"Profil"
"Profile"
#elif L==8
"Perfil"
"Perfiles"
#endif
,
NULL,
@ -19594,23 +19594,23 @@ const char *Txt_MENU_SUBTITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
,
// ActReqPubPrf
#if L==0
"Perfil"
"Perfils"
#elif L==1
"Profil"
"Profiles"
#elif L==2
"Public profile of a user"
"Public profiles of users"
#elif L==3
"Perfil p&uacute;blico de un usuario"
"Perfiles p&uacute;blicos de usuarios"
#elif L==4
"Profil"
"Profils"
#elif L==5
"Che"
#elif L==6
"Profilo"
"Profili"
#elif L==7
"Profil"
"Profile"
#elif L==8
"Perfil"
"Perfiles"
#endif
,
NULL,