Version 16.193.4

This commit is contained in:
Antonio Cañas Vargas 2017-04-27 17:02:45 +02:00
parent 15604a0608
commit 892d3a23ee
7 changed files with 43 additions and 21 deletions

View File

@ -1497,15 +1497,21 @@ a:hover /* Default ==> underlined */
display:inline-block; display:inline-block;
box-sizing:border-box; box-sizing:border-box;
max-width:90%; max-width:90%;
margin:8px auto 0 auto; margin:8px auto;
padding:12px;
background-color:#FFF9EA; background-color:#FFF9EA;
border-radius:2px;
box-shadow: 0 2px 2px 0 rgba(124,121,109,0.14), 0 2px 1px -2px rgba(124,121,109,0.2), 0 1px 5px 0 rgba(124,121,109,0.12);
/* opacity:0.9; */
}
.ALERT_TXT
{
box-sizing:border-box;
margin:0 auto;
padding:12px 12px 12px 45px;
background-position:12px 12px; background-position:12px 12px;
background-size:20px 20px; background-size:20px 20px;
background-repeat:no-repeat; background-repeat:no-repeat;
padding:12px 12px 12px 45px;
border-radius:2px;
box-shadow: 0 2px 2px 0 rgba(124,121,109,0.14), 0 2px 1px -2px rgba(124,121,109,0.2), 0 1px 5px 0 rgba(124,121,109,0.12);
opacity:0.9;
font-size:12pt; font-size:12pt;
color:#632921; color:#632921;
text-align:left; text-align:left;

BIN
icon/question16x16.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 B

View File

@ -221,13 +221,15 @@
/****************************** Public constants *****************************/ /****************************** Public constants *****************************/
/*****************************************************************************/ /*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.193.3 (2017-04-27)" #define Log_PLATFORM_VERSION "SWAD 16.193.4 (2017-04-27)"
#define CSS_FILE "swad16.192.css" #define CSS_FILE "swad16.193.4.css"
#define JS_FILE "swad16.181.js" #define JS_FILE "swad16.181.js"
// 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 16.193.4: Apr 27, 2017 Changes in layout of alerts.
Changed dialog to remove user as administrator. (218311 lines)
Version 16.193.3: Apr 27, 2017 Changes in layout of alerts. Version 16.193.3: Apr 27, 2017 Changes in layout of alerts.
Changed dialog to remove my photo. (218291 lines) Changed dialog to remove my photo. (218291 lines)
Version 16.193.2: Apr 27, 2017 Statistics tab is renamed as Analytics tab. (218265 lines) Version 16.193.2: Apr 27, 2017 Statistics tab is renamed as Analytics tab. (218265 lines)

View File

@ -3986,19 +3986,22 @@ static void Enr_AskIfRemAdm (bool ItsMe,Sco_Scope_t Scope,const char *InsCtrDegN
if (Usr_ChkIfUsrCodExists (Gbl.Usrs.Other.UsrDat.UsrCod)) if (Usr_ChkIfUsrCodExists (Gbl.Usrs.Other.UsrDat.UsrCod))
{ {
/***** Show question and button to remove user as administrator *****/
/* Start alert */
sprintf (Gbl.Message, sprintf (Gbl.Message,
ItsMe ? Txt_Do_you_really_want_to_be_removed_as_an_administrator_of_X : ItsMe ? Txt_Do_you_really_want_to_be_removed_as_an_administrator_of_X :
Txt_Do_you_really_want_to_remove_the_following_user_as_an_administrator_of_X, Txt_Do_you_really_want_to_remove_the_following_user_as_an_administrator_of_X,
InsCtrDegName); InsCtrDegName);
Lay_ShowAlert (Lay_INFO,Gbl.Message); Lay_ShowAlertAndButton1 (Lay_QUESTION,Gbl.Message);
/* Show user's record */
Rec_ShowSharedRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat); Rec_ShowSharedRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat);
Act_FormStart (Enr_ActRemAdm[Scope]); /* End alert */
Usr_PutParamOtherUsrCodEncrypted (); Lay_ShowAlertAndButton2 (Enr_ActRemAdm[Scope],Usr_PutParamOtherUsrCodEncrypted,
Lay_PutRemoveButton (ItsMe ? Txt_Remove_me_as_an_administrator : Lay_REMOVE_BUTTON,
Txt_Remove_USER_as_an_administrator); ItsMe ? Txt_Remove_me_as_an_administrator :
Act_FormEnd (); Txt_Remove_USER_as_an_administrator);
} }
else else
Lay_ShowErrorAndExit ("User doesn't exist."); Lay_ShowErrorAndExit ("User doesn't exist.");

View File

@ -1588,7 +1588,7 @@ void Lay_ShowErrorAndExit (const char *Message)
void Lay_ShowAlert (Lay_AlertType_t AlertType,const char *Message) void Lay_ShowAlert (Lay_AlertType_t AlertType,const char *Message)
{ {
Lay_ShowAlertAndButton1 (AlertType,Message); Lay_ShowAlertAndButton1 (AlertType,Message);
Lay_ShowAlertAndButton2 (ActUnk,Lay_NO_BUTTON,NULL); Lay_ShowAlertAndButton2 (ActUnk,NULL,Lay_NO_BUTTON,NULL);
} }
void Lay_ShowAlertAndButton1 (Lay_AlertType_t AlertType,const char *Message) void Lay_ShowAlertAndButton1 (Lay_AlertType_t AlertType,const char *Message)
@ -1599,16 +1599,19 @@ void Lay_ShowAlertAndButton1 (Lay_AlertType_t AlertType,const char *Message)
/***** Start box *****/ /***** Start box *****/
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\">" fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\">"
"<div class=\"ALERT\"" "<div class=\"ALERT\">");
" style=\"background-image:url('%s/%s');\">",
Gbl.Prefs.IconsURL,Lay_AlertIcons[AlertType]);
/***** Write message *****/ /***** Write message *****/
fprintf (Gbl.F.Out,"<div class=\"ALERT_TXT\""
" style=\"background-image:url('%s/%s');\">",
Gbl.Prefs.IconsURL,Lay_AlertIcons[AlertType]);
if (Message) if (Message)
fprintf (Gbl.F.Out,"%s",Message); fprintf (Gbl.F.Out,"%s",Message);
fprintf (Gbl.F.Out,"</div>");
} }
void Lay_ShowAlertAndButton2 (Act_Action_t NextAction,Lay_Button_t Button,const char *TxtButton) void Lay_ShowAlertAndButton2 (Act_Action_t NextAction,void (*FuncParams) (),
Lay_Button_t Button,const char *TxtButton)
{ {
/***** Optional button *****/ /***** Optional button *****/
if (NextAction != ActUnk && if (NextAction != ActUnk &&
@ -1616,14 +1619,21 @@ void Lay_ShowAlertAndButton2 (Act_Action_t NextAction,Lay_Button_t Button,const
TxtButton) TxtButton)
if (TxtButton[0]) if (TxtButton[0])
{ {
/* Start form */
Act_FormStart (NextAction); Act_FormStart (NextAction);
if (FuncParams)
FuncParams ();
/* Put button *****/
Lay_PutButton (Button,TxtButton); Lay_PutButton (Button,TxtButton);
/* End form */
Act_FormEnd (); Act_FormEnd ();
} }
/***** End box *****/ /***** End box *****/
fprintf (Gbl.F.Out,"</div>" fprintf (Gbl.F.Out,"</div>"
"</div>"); "</div>");
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -120,7 +120,8 @@ void Lay_EndRoundFrame (void);
void Lay_ShowErrorAndExit (const char *Message); void Lay_ShowErrorAndExit (const char *Message);
void Lay_ShowAlert (Lay_AlertType_t AlertType,const char *Message); void Lay_ShowAlert (Lay_AlertType_t AlertType,const char *Message);
void Lay_ShowAlertAndButton1 (Lay_AlertType_t AlertType,const char *Message); void Lay_ShowAlertAndButton1 (Lay_AlertType_t AlertType,const char *Message);
void Lay_ShowAlertAndButton2 (Act_Action_t NextAction,Lay_Button_t Button,const char *TxtButton); void Lay_ShowAlertAndButton2 (Act_Action_t NextAction,void (*FuncParams) (),
Lay_Button_t Button,const char *TxtButton);
void Lay_RefreshNotifsAndConnected (void); void Lay_RefreshNotifsAndConnected (void);
void Lay_RefreshLastClicks (void); void Lay_RefreshLastClicks (void);

View File

@ -423,7 +423,7 @@ void Pho_ReqRemoveMyPhoto (void)
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
/* End alert */ /* End alert */
Lay_ShowAlertAndButton2 (ActRemMyPho,Lay_REMOVE_BUTTON,Txt_Remove_photo); Lay_ShowAlertAndButton2 (ActRemMyPho,NULL,Lay_REMOVE_BUTTON,Txt_Remove_photo);
} }
else else
Lay_ShowAlert (Lay_INFO,Txt_The_photo_no_longer_exists); Lay_ShowAlert (Lay_INFO,Txt_The_photo_no_longer_exists);