diff --git a/css/swad_desktop.css b/css/swad_desktop.css index eb5477891..a7842f236 100644 --- a/css/swad_desktop.css +++ b/css/swad_desktop.css @@ -57,6 +57,14 @@ 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;} +/************* Institution / Centre / Degree logo in top title ***************/ +.TOP_LOGO + { + margin-right:8px; + text-align:left; + vertical-align:top; + } + /****************** Title of current action in main block ********************/ #action_title { diff --git a/css/swad_mobile.css b/css/swad_mobile.css index 26adbc7b3..8189e5c2c 100644 --- a/css/swad_mobile.css +++ b/css/swad_mobile.css @@ -52,6 +52,14 @@ table td img {border-width:0; border-style:none;} form {margin:0; display:inline;} +/************* Institution / Centre / Degree logo in top title ***************/ +.TOP_LOGO + { + margin-right:8px; + text-align:left; + vertical-align:top; + } + /************************* Users connected globally **************************/ .CONNECTED { diff --git a/swad_centre.c b/swad_centre.c index 63d6ccad0..368880ade 100644 --- a/swad_centre.c +++ b/swad_centre.c @@ -174,7 +174,7 @@ void Ctr_SeeCtrWithPendingDegs (void) "", BgColor,Ctr.WWW,Ctr.FullName); Log_DrawLogo (Sco_SCOPE_CTR,Ctr.CtrCod,Ctr.ShortName, - 16,"vertical-align:top;",true); + 16,"CENTER_TOP",true); fprintf (Gbl.F.Out,"" ""); @@ -606,7 +606,7 @@ static void Ctr_ListOneCentreForSeeing (struct Centre *Ctr,unsigned NumCtr) TxtClass,BgColor, Ctr->WWW,Ctr->FullName); Log_DrawLogo (Sco_SCOPE_CTR,Ctr->CtrCod,Ctr->ShortName, - 16,"vertical-align:top;",true); + 16,"CENTER_TOP",true); fprintf (Gbl.F.Out,"" ""); diff --git a/swad_changelog.h b/swad_changelog.h index 9073fa40e..24911e73a 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -103,11 +103,13 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 14.124.2 (2015/08/03)" +#define Log_PLATFORM_VERSION "SWAD 14.124.3 (2015/08/06)" // 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.124.3: Aug 03, 2015 Changes in CSS of forms. + Changes in function to draw institution / centre / degree logo. (184782 lines) Version 14.124.2: Aug 03, 2015 Changes in CSS of forms. (184768 lines) Version 14.124.1: Aug 03, 2015 Changes in CSS of forms. Fixed bug in edition of institutions. (184782 lines) diff --git a/swad_course.c b/swad_course.c index 6bfe336bb..2ffcdba74 100644 --- a/swad_course.c +++ b/swad_course.c @@ -3342,7 +3342,7 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA sprintf (Gbl.Title,Txt_Go_to_X,row[2]); Act_LinkFormSubmit (Gbl.Title,StyleNoBR); Log_DrawLogo (Sco_SCOPE_DEG,Deg.DegCod,Deg.ShortName, - 16,"vertical-align:top;",true); + 16,"CENTER_TOP",true); fprintf (Gbl.F.Out," %s (%s)" "", row[2],row[7]); diff --git a/swad_degree.c b/swad_degree.c index 5088d3ac0..067158345 100644 --- a/swad_degree.c +++ b/swad_degree.c @@ -225,7 +225,7 @@ void Deg_SeeDegWithPendingCrss (void) " target=\"_blank\">", BgColor,Deg.WWW,Deg.FullName); Log_DrawLogo (Sco_SCOPE_DEG,Deg.DegCod,Deg.ShortName, - 16,"vertical-align:top;",true); + 16,"CENTER_TOP",true); fprintf (Gbl.F.Out,"" ""); @@ -754,16 +754,13 @@ void Deg_WriteBigNameCtyInsCtrDegCrs (void) { if (Gbl.CurrentDeg.Deg.DegCod > 0) Log_DrawLogo (Sco_SCOPE_DEG,Gbl.CurrentDeg.Deg.DegCod, - Gbl.CurrentDeg.Deg.ShortName,32, - "vertical-align:top; margin-right:8px;",false); + Gbl.CurrentDeg.Deg.ShortName,32,"TOP_LOGO",false); else if (Gbl.CurrentCtr.Ctr.CtrCod > 0) Log_DrawLogo (Sco_SCOPE_CTR,Gbl.CurrentCtr.Ctr.CtrCod, - Gbl.CurrentCtr.Ctr.ShortName,32, - "vertical-align:top; margin-right:8px;",false); + Gbl.CurrentCtr.Ctr.ShortName,32,"TOP_LOGO",false); else if (Gbl.CurrentIns.Ins.InsCod > 0) Log_DrawLogo (Sco_SCOPE_INS,Gbl.CurrentIns.Ins.InsCod, - Gbl.CurrentIns.Ins.ShortName,32, - "vertical-align:top; margin-right:8px;",false); + Gbl.CurrentIns.Ins.ShortName,32,"TOP_LOGO",false); else if (Gbl.CurrentCty.Cty.CtyCod > 0) if (Cty_CheckIfCountryMapExists (&Gbl.CurrentCty.Cty)) Cty_DrawCountryMap (&Gbl.CurrentCty.Cty,"COUNTRY_MAP_TITLE"); @@ -1291,7 +1288,7 @@ static void Deg_ListOneDegreeForSeeing (struct Degree *Deg,unsigned NumDeg) BgColor, Deg->WWW,Deg->FullName); Log_DrawLogo (Sco_SCOPE_DEG,Deg->DegCod,Deg->ShortName, - 16,"vertical-align:top;",true); + 16,"CENTER_TOP",true); fprintf (Gbl.F.Out,"" ""); @@ -3966,7 +3963,7 @@ void Deg_GetAndWriteDegreesAdminBy (long UsrCod,unsigned ColSpan) sprintf (Gbl.Title,Txt_Go_to_X,row[2]); Act_LinkFormSubmit (Gbl.Title,"DAT_SMALL_NOBR"); Log_DrawLogo (Sco_SCOPE_DEG,DegCod,row[1], - 16,"vertical-align:top;",true); + 16,"CENTER_TOP",true); fprintf (Gbl.F.Out," %s",row[2]); Act_FormEnd (); } diff --git a/swad_file_browser.c b/swad_file_browser.c index a1753590e..370abc7ae 100644 --- a/swad_file_browser.c +++ b/swad_file_browser.c @@ -11004,7 +11004,7 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row) sprintf (Gbl.Title,Txt_Go_to_X,InsShortName); Act_LinkFormSubmit (Gbl.Title,"DAT"); Log_DrawLogo (Sco_SCOPE_INS,InsCod,InsShortName, - 16,"vertical-align:top;",true); + 16,"CENTER_TOP",true); fprintf (Gbl.F.Out," %s",InsShortName); Act_FormEnd (); } @@ -11021,7 +11021,7 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row) sprintf (Gbl.Title,Txt_Go_to_X,CtrShortName); Act_LinkFormSubmit (Gbl.Title,"DAT"); Log_DrawLogo (Sco_SCOPE_CTR,CtrCod,CtrShortName, - 16,"vertical-align:top;",true); + 16,"CENTER_TOP",true); fprintf (Gbl.F.Out," %s",CtrShortName); Act_FormEnd (); } @@ -11038,7 +11038,7 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row) sprintf (Gbl.Title,Txt_Go_to_X,DegShortName); Act_LinkFormSubmit (Gbl.Title,"DAT"); Log_DrawLogo (Sco_SCOPE_DEG,DegCod,DegShortName, - 16,"vertical-align:top;",true); + 16,"CENTER_TOP",true); fprintf (Gbl.F.Out," %s",DegShortName); Act_FormEnd (); } diff --git a/swad_institution.c b/swad_institution.c index baf810c99..be5cf077f 100644 --- a/swad_institution.c +++ b/swad_institution.c @@ -164,7 +164,7 @@ void Ins_SeeInsWithPendingCtrs (void) "", BgColor,Ins.WWW,Ins.FullName); Log_DrawLogo (Sco_SCOPE_INS,Ins.InsCod,Ins.ShortName, - 16,"vertical-align:top;",true); + 16,"CENTER_TOP",true); fprintf (Gbl.F.Out,"" ""); diff --git a/swad_layout.c b/swad_layout.c index c5c65b62f..5968744c8 100644 --- a/swad_layout.c +++ b/swad_layout.c @@ -1546,7 +1546,8 @@ void Lay_WriteHeaderClassPhoto (unsigned NumColumns,bool PrintView,bool DrawingC if (DegCod > 0) { if (!PrintView) - fprintf (Gbl.F.Out,"", + fprintf (Gbl.F.Out,"", Deg.WWW); Log_DrawLogo (Sco_SCOPE_DEG,Deg.DegCod,Deg.ShortName,Size,NULL,true); if (!PrintView) diff --git a/swad_link.c b/swad_link.c index 78cf0d36d..30650c6d4 100644 --- a/swad_link.c +++ b/swad_link.c @@ -110,8 +110,8 @@ void Lnk_WriteMenuWithInstitutionalLinks (void) if (Gbl.Links.Num) { fprintf (Gbl.F.Out,"" - "" + "" "
"); Lnk_WriteListOfLinks (); fprintf (Gbl.F.Out,"
" @@ -344,14 +344,13 @@ static void Lnk_ListLinksForEdition (void) fprintf (Gbl.F.Out,""); /* Link code */ - fprintf (Gbl.F.Out,"" - "%ld " + fprintf (Gbl.F.Out,"" + "%ld" "", Lnk->LnkCod); /* Link short name */ - fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,""); Act_FormStart (ActRenLnkSho); Lnk_PutParamLnkCod (Lnk->LnkCod); fprintf (Gbl.F.Out,""); /* Link full name */ - fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,""); Act_FormStart (ActRenLnkFul); Lnk_PutParamLnkCod (Lnk->LnkCod); fprintf (Gbl.F.Out,""); /* Link WWW */ - fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,""); Act_FormStart (ActChgLnkWWW); Lnk_PutParamLnkCod (Lnk->LnkCod); fprintf (Gbl.F.Out,""); /***** Link short name *****/ - fprintf (Gbl.F.Out,"" - "" + fprintf (Gbl.F.Out,"" + "" "", Lnk_MAX_LENGTH_LINK_SHORT_NAME,Lnk->ShortName); /***** Link full name *****/ - fprintf (Gbl.F.Out,"" - "" + fprintf (Gbl.F.Out,"" + "" "", Lnk_MAX_LENGTH_LINK_FULL_NAME,Lnk->FullName); /***** Link WWW *****/ - fprintf (Gbl.F.Out,"" - "" + fprintf (Gbl.F.Out,"" + "" "" "", Cns_MAX_LENGTH_WWW,Lnk->WWW); @@ -673,16 +673,16 @@ static void Lnk_PutHeadLinks (void) fprintf (Gbl.F.Out,"" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" - "" + "" "%s" "" "", diff --git a/swad_logo.c b/swad_logo.c index 54d62edfc..e841d362f 100644 --- a/swad_logo.c +++ b/swad_logo.c @@ -65,7 +65,7 @@ static void Log_PutLinkToRemoveLogo (Act_Action_t Action); /*****************************************************************************/ void Log_DrawLogo (Sco_Scope_t Scope,long Cod,const char *AltText, - unsigned Size,const char *Style,bool PutIconIfNotExists) + unsigned Size,const char *Class,bool PutIconIfNotExists) { static const char *Icon[Sco_NUM_SCOPES] = { @@ -161,9 +161,9 @@ void Log_DrawLogo (Sco_Scope_t Scope,long Cod,const char *AltText, " class=\"ICON%ux%u\"", AltText,AltText, Size,Size); - if (Style) - if (Style[0]) - fprintf (Gbl.F.Out," style=\"%s\"",Style); + if (Class) + if (Class[0]) + fprintf (Gbl.F.Out," class=\"%s\"",Class); fprintf (Gbl.F.Out," />"); } } diff --git a/swad_logo.h b/swad_logo.h index 59af47d1c..4419721d2 100644 --- a/swad_logo.h +++ b/swad_logo.h @@ -40,7 +40,7 @@ /*****************************************************************************/ void Log_DrawLogo (Sco_Scope_t Scope,long Cod,const char *AltText, - unsigned Size,const char *Style,bool PutIconIfNotExists); + unsigned Size,const char *Class,bool PutIconIfNotExists); void Log_PutFormToChangeLogo (Sco_Scope_t Scope); void Log_RequestLogo (Sco_Scope_t Scope); void Log_ReceiveLogo (Sco_Scope_t Scope); diff --git a/swad_photo.c b/swad_photo.c index 7f95ad070..bbca301d1 100644 --- a/swad_photo.c +++ b/swad_photo.c @@ -2016,7 +2016,7 @@ static void Pho_ShowOrPrintListDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint) fprintf (Gbl.F.Out,"
", Deg.WWW,Deg.FullName); Log_DrawLogo (Sco_SCOPE_DEG,Deg.DegCod,Deg.ShortName, - 16,"vertical-align:top;",true); + 16,"CENTER_TOP",true); fprintf (Gbl.F.Out," %s ", Deg.ShortName); if (SeeOrPrint == Pho_DEGREES_SEE) diff --git a/swad_statistic.c b/swad_statistic.c index 45d8dc904..4ff7fcd89 100644 --- a/swad_statistic.c +++ b/swad_statistic.c @@ -3495,7 +3495,7 @@ static void Sta_WriteDegree (long DegCod) "", Deg.FullName,Deg.WWW); Log_DrawLogo (Sco_SCOPE_DEG,Deg.DegCod,Deg.ShortName, - 16,"vertical-align:top;",true); + 16,"CENTER_TOP",true); fprintf (Gbl.F.Out," %s ", Deg.ShortName); }