mirror of https://github.com/acanas/swad-core.git
Version 23.68: Mar 14, 2024 New order in list of actions.
This commit is contained in:
parent
fdd2d2b550
commit
14f2653119
|
@ -5,7 +5,7 @@
|
|||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuildCommandParser" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser" keep-relative-paths="false" name="CDT GCC Build Output Parser" parameter="(g?cc)|([gc]\+\+)|(clang)" prefer-non-shared="true"/>
|
||||
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="1458321346374226041" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-823415816682434587" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
|
|
|
@ -312,7 +312,7 @@ void ID_WriteUsrIDs (struct Usr_Data *UsrDat,const char *Anchor)
|
|||
bool ICanConfirmUsrID = ICanSeeUsrID &&
|
||||
Usr_ItsMe (UsrDat->UsrCod) == Usr_OTHER && // Not me
|
||||
!Frm_CheckIfInside () && // Not inside another form
|
||||
Act_GetBrowserTab (Gbl.Action.Act) == Act_BRW_1ST_TAB; // Only in main browser tab
|
||||
Act_GetBrowserTab (Gbl.Action.Act) == Act_1ST_TAB; // Only in main browser tab
|
||||
|
||||
for (NumID = 0;
|
||||
NumID < UsrDat->IDs.Num;
|
||||
|
|
|
@ -153,7 +153,7 @@ Act_Content_t Act_GetContentType (Act_Action_t Action)
|
|||
Act_BrowserTab_t Act_GetBrowserTab (Act_Action_t Action)
|
||||
{
|
||||
if (Action < 0 || Action >= ActLst_NUM_ACTIONS)
|
||||
return Act_BRW_UNK_TAB;
|
||||
return Act_UNK_TAB;
|
||||
|
||||
return ActLst_Actions[Action].BrowserTab;
|
||||
}
|
||||
|
@ -191,7 +191,7 @@ const char *Act_GetIcon (Act_Action_t Action)
|
|||
if (Action < 0 || Action >= ActLst_NUM_ACTIONS)
|
||||
return NULL;
|
||||
|
||||
return Ico_GetIcon (ActLst_Actions[Action].Icon);
|
||||
return Ico_GetIcon (Mnu_GetIcon (Action));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -57,16 +57,16 @@ typedef enum
|
|||
|
||||
typedef enum
|
||||
{
|
||||
Act_BRW_UNK_TAB, // Unknown tab
|
||||
Act_BRW_1ST_TAB, // The main (original, first) tab in the browser
|
||||
Act_BRW_NEW_TAB, // A new (second) blank tab in the browser
|
||||
Act_BRW_2ND_TAB, // The second tab in the browser
|
||||
Act_AJAX_NORMAL, // Update a zone of the page using AJAX
|
||||
Act_AJAX_RFRESH, // Update a zone of the page using AJAX, with auto-refresh
|
||||
Act_UPLOAD_FILE, // Upload a file. Do not write HTML content. Write Status code instead for Dropzone.js
|
||||
Act_DOWNLD_FILE, // Download a file in a new tab. Do not write HTML content.
|
||||
Act_204_NO_CONT, // Do not write HTML content. HTTP will return Status 204 No Content
|
||||
Act_WEB_SERVICE, // Web service. Send output to client using SOAP.
|
||||
Act_UNK_TAB, // Unknown tab
|
||||
Act_1ST_TAB, // The main (original, first) tab in the browser
|
||||
Act_NEW_TAB, // A new (second) blank tab in the browser
|
||||
Act_2ND_TAB, // The second tab in the browser
|
||||
Act_AJAX_NR, // Update a zone of the page using AJAX
|
||||
Act_AJAX_RF, // Update a zone of the page using AJAX, with auto-refresh
|
||||
Act_UPL_FIL, // Upload a file. Do not write HTML content. Write Status code instead for Dropzone.js
|
||||
Act_DWN_FIL, // Download a file in a new tab. Do not write HTML content.
|
||||
Act_204_NOC, // Do not write HTML content. HTTP will return Status 204 No Content
|
||||
Act_WEB_SVC, // Web service. Send output to client using SOAP.
|
||||
} Act_BrowserTab_t;
|
||||
|
||||
typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action
|
||||
|
@ -88,7 +88,6 @@ struct Act_Actions
|
|||
Act_BrowserTab_t BrowserTab;
|
||||
void (*FunctionPriori) ();
|
||||
void (*FunctionPosteriori) ();
|
||||
const char *Icon;
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
3271
swad_action_list.c
3271
swad_action_list.c
File diff suppressed because it is too large
Load Diff
3206
swad_action_list.h
3206
swad_action_list.h
File diff suppressed because it is too large
Load Diff
|
@ -6683,7 +6683,7 @@ void Brw_RenFolderFileBrowser (void)
|
|||
/****** Receive a new file in a file browser unsigned Dropzone.js ************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Brw_RcvFileInFileBrwDropzone (void)
|
||||
void Brw_RcvFileInFileBrwDZ (void)
|
||||
{
|
||||
bool UploadSucessful;
|
||||
struct BrwSiz_BrowserSize *Size = BrwSiz_GetSize ();
|
||||
|
|
|
@ -208,7 +208,7 @@ void Brw_RemSubtreeInFileBrowser (void);
|
|||
void Brw_ShowFormFileBrowser (void);
|
||||
void Brw_RecFolderFileBrowser (void);
|
||||
void Brw_RenFolderFileBrowser (void);
|
||||
void Brw_RcvFileInFileBrwDropzone (void);
|
||||
void Brw_RcvFileInFileBrwDZ (void);
|
||||
void Brw_RcvFileInFileBrwClassic (void);
|
||||
void Brw_RecLinkFileBrowser (void);
|
||||
void Brw_SetDocumentAsVisible (void);
|
||||
|
|
|
@ -633,10 +633,11 @@ Me sale este error, no s
|
|||
"can npt create received message (duplicated entry '243218-2160773' for key 'UsrCod_MsgCod')
|
||||
*/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 23.67.3 (2024-03-09)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 23.68 (2024-03-14)"
|
||||
#define CSS_FILE "swad23.67.2.css"
|
||||
#define JS_FILE "swad23.53.6.js"
|
||||
/*
|
||||
Version 23.68: Mar 14, 2024 New order in list of actions. (335700 lines)
|
||||
Version 23.67.3: Mar 09, 2024 Changes in global hits. (335454 lines)
|
||||
Version 23.67.2: Mar 09, 2024 Changes in layout. Fixed missing texts in actions. (335424 lines)
|
||||
Version 23.67.1: Mar 08, 2024 Fixed issue in layout. (335308 lines)
|
||||
|
|
|
@ -865,7 +865,7 @@ void Cty_WriteCountryName (long CtyCod)
|
|||
{
|
||||
char CtyName[Cty_MAX_BYTES_NAME + 1];
|
||||
Frm_PutForm_t PutForm = (!Frm_CheckIfInside () && // Only if not inside another form
|
||||
Act_GetBrowserTab (Gbl.Action.Act) == Act_BRW_1ST_TAB) ? Frm_PUT_FORM : // Only in main browser tab
|
||||
Act_GetBrowserTab (Gbl.Action.Act) == Act_1ST_TAB) ? Frm_PUT_FORM : // Only in main browser tab
|
||||
Frm_DONT_PUT_FORM;
|
||||
|
||||
/***** Get country name *****/
|
||||
|
|
|
@ -653,7 +653,7 @@ void Err_ShowErrorAndExit (const char *Txt)
|
|||
/***** End the output *****/
|
||||
if (!Gbl.Layout.HTMLEndWritten)
|
||||
{
|
||||
if (Act_GetBrowserTab (Gbl.Action.Act) == Act_BRW_1ST_TAB)
|
||||
if (Act_GetBrowserTab (Gbl.Action.Act) == Act_1ST_TAB)
|
||||
Lay_WriteAboutZone ();
|
||||
|
||||
HTM_Txt ("</body>\n"
|
||||
|
|
|
@ -135,8 +135,8 @@ static void Frm_BeginFormInternal (Act_Action_t NextAction,bool PutParLocationIf
|
|||
HTM_TxtF (" onsubmit=\"%s\"",OnSubmit);
|
||||
switch (Act_GetBrowserTab (NextAction))
|
||||
{
|
||||
case Act_BRW_NEW_TAB:
|
||||
case Act_DOWNLD_FILE:
|
||||
case Act_NEW_TAB:
|
||||
case Act_DWN_FIL:
|
||||
HTM_Txt (" target=\"_blank\"");
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -258,7 +258,7 @@ void Gbl_Cleanup (void)
|
|||
|
||||
if (!Gbl.Action.UsesAJAX &&
|
||||
!Gbl.WebService.IsWebService &&
|
||||
Act_GetBrowserTab (Gbl.Action.Act) == Act_BRW_1ST_TAB)
|
||||
Act_GetBrowserTab (Gbl.Action.Act) == Act_1ST_TAB)
|
||||
Ses_DB_RemovePar ();
|
||||
|
||||
Hie_FreeMyHierarchy ();
|
||||
|
|
|
@ -1509,7 +1509,7 @@ void Hie_PutIconToSelectMyHierarchy (__attribute__((unused)) void *Args)
|
|||
/****************** Select one node from my hierarchy ************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Hie_ReqSelectOneNodeFromMyHierarchy (void)
|
||||
void Hie_SelOneNodeFromMyHierarchy (void)
|
||||
{
|
||||
/***** Fill the list with the courses I belong to, if not filled *****/
|
||||
Hie_GetMyHierarchy (Hie_CRS);
|
||||
|
|
|
@ -97,6 +97,6 @@ unsigned Hie_GetNumUsrsWhoClaimToBelongTo (Hie_Level_t Level,
|
|||
void Hie_PutIconToSelectMyHierarchyInBreadcrumb (void);
|
||||
void Hie_PutIconToSelectMyHierarchy (__attribute__((unused)) void *Args);
|
||||
|
||||
void Hie_ReqSelectOneNodeFromMyHierarchy (void);
|
||||
void Hie_SelOneNodeFromMyHierarchy (void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -158,8 +158,8 @@ void Lay_WriteStartOfPage (void)
|
|||
BrowserTab = Act_GetBrowserTab (Gbl.Action.Act);
|
||||
switch (BrowserTab)
|
||||
{
|
||||
case Act_BRW_NEW_TAB:
|
||||
case Act_BRW_2ND_TAB:
|
||||
case Act_NEW_TAB:
|
||||
case Act_2ND_TAB:
|
||||
Gbl.Prefs.Theme = The_THEME_WHITE; // In a new tab, use white background
|
||||
break;
|
||||
default:
|
||||
|
@ -281,7 +281,7 @@ void Lay_WriteStartOfPage (void)
|
|||
/***** HTML body *****/
|
||||
switch (BrowserTab)
|
||||
{
|
||||
case Act_BRW_1ST_TAB:
|
||||
case Act_1ST_TAB:
|
||||
HTM_TxtF ("<body class=\"BODY_%s\" onload=\"init();\">\n",
|
||||
The_GetSuffix ());
|
||||
HTM_DIV_Begin ("id=\"zoomLyr\" class=\"ZOOM ZOOM_%s\"",
|
||||
|
@ -292,8 +292,8 @@ void Lay_WriteStartOfPage (void)
|
|||
HTM_DIV_End ();
|
||||
HTM_DIV_End ();
|
||||
break;
|
||||
case Act_BRW_NEW_TAB:
|
||||
case Act_BRW_2ND_TAB:
|
||||
case Act_NEW_TAB:
|
||||
case Act_2ND_TAB:
|
||||
HTM_Txt ("<body onload=\"init();\"");
|
||||
switch (Gbl.Action.Act)
|
||||
{
|
||||
|
@ -430,7 +430,7 @@ void Lay_WriteEndOfPage (void)
|
|||
HTM_DIV_End (); // main_zone_central_container
|
||||
|
||||
/***** Write page footer *****/
|
||||
if (Act_GetBrowserTab (Gbl.Action.Act) == Act_BRW_1ST_TAB)
|
||||
if (Act_GetBrowserTab (Gbl.Action.Act) == Act_1ST_TAB)
|
||||
Lay_WriteFootFromHTMLFile ();
|
||||
|
||||
/***** End of main zone and page *****/
|
||||
|
@ -769,7 +769,7 @@ static void Lay_WriteScriptInit (void)
|
|||
bool RefreshMatchStd = false;
|
||||
bool RefreshMatchTch = false;
|
||||
|
||||
RefreshConnected = Act_GetBrowserTab (Gbl.Action.Act) == Act_BRW_1ST_TAB &&
|
||||
RefreshConnected = Act_GetBrowserTab (Gbl.Action.Act) == Act_1ST_TAB &&
|
||||
(Gbl.Prefs.SideCols & Lay_SHOW_RIGHT_COLUMN); // Right column visible
|
||||
|
||||
switch (Gbl.Action.Act)
|
||||
|
@ -884,7 +884,7 @@ static void Lay_WriteScriptParsAJAX (void)
|
|||
Gbl.Hierarchy.Node[Hie_CRS].HieCod);
|
||||
|
||||
/***** Parameter to refresh connected users *****/
|
||||
if (Act_GetBrowserTab (Gbl.Action.Act) == Act_BRW_1ST_TAB)
|
||||
if (Act_GetBrowserTab (Gbl.Action.Act) == Act_1ST_TAB)
|
||||
// Refresh parameter
|
||||
HTM_TxtF ("const refreshParamNxtActCon = \"act=%ld\";\n",
|
||||
Act_GetActCod (ActRefCon));
|
||||
|
|
|
@ -232,7 +232,7 @@ void Log_GetAndShowLastClicks (void)
|
|||
Action = Act_GetActionFromActCod (ActCod);
|
||||
|
||||
/* Use a special color for this row depending on the action */
|
||||
ClassRow = (Act_GetBrowserTab (Action) == Act_DOWNLD_FILE) ? "DAT_SMALL_YELLOW" :
|
||||
ClassRow = (Act_GetBrowserTab (Action) == Act_DWN_FIL) ? "DAT_SMALL_YELLOW" :
|
||||
(ActCod == Act_GetActCod (ActLogIn ) ||
|
||||
ActCod == Act_GetActCod (ActLogInNew)) ? "DAT_SMALL_GREEN" :
|
||||
(ActCod == Act_GetActCod (ActLogOut )) ? "DAT_SMALL_RED" :
|
||||
|
|
12
swad_main.c
12
swad_main.c
|
@ -127,8 +127,8 @@ int main (void)
|
|||
/***** Get number of sessions *****/
|
||||
switch (Act_GetBrowserTab (Gbl.Action.Act))
|
||||
{
|
||||
case Act_BRW_1ST_TAB:
|
||||
case Act_AJAX_RFRESH:
|
||||
case Act_1ST_TAB:
|
||||
case Act_AJAX_RF:
|
||||
Ses_GetNumSessions ();
|
||||
break;
|
||||
default:
|
||||
|
@ -158,7 +158,7 @@ int main (void)
|
|||
if (FunctionPriori != NULL)
|
||||
FunctionPriori ();
|
||||
|
||||
if (Act_GetBrowserTab (Gbl.Action.Act) == Act_204_NO_CONT)
|
||||
if (Act_GetBrowserTab (Gbl.Action.Act) == Act_204_NOC)
|
||||
/***** Write HTTP Status 204 No Content *****/
|
||||
Lay_WriteHTTPStatus204NoContent ();
|
||||
|
||||
|
@ -188,9 +188,9 @@ int main (void)
|
|||
/* When updating a small zone via AJAX, all output is already done */
|
||||
switch (Act_GetBrowserTab (Gbl.Action.Act))
|
||||
{
|
||||
case Act_AJAX_NORMAL:
|
||||
case Act_AJAX_RFRESH:
|
||||
case Act_WEB_SERVICE:
|
||||
case Act_AJAX_NR:
|
||||
case Act_AJAX_RF:
|
||||
case Act_WEB_SVC:
|
||||
/* All the output is made, so don't write anymore */
|
||||
Gbl.Layout.DivsEndWritten =
|
||||
Gbl.Layout.HTMLEndWritten = true;
|
||||
|
|
138
swad_menu.c
138
swad_menu.c
|
@ -68,6 +68,126 @@ const char *Mnu_MenuIcons[Mnu_NUM_MENUS] =
|
|||
#define MAX_MENU_ID 16
|
||||
|
||||
// Actions not initialized are 0 by default
|
||||
static const struct Mnu_Menu
|
||||
{
|
||||
Act_Action_t Action;
|
||||
const char *Icon;
|
||||
} Mnu_Menu[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
|
||||
{
|
||||
[TabUnk] = {
|
||||
},
|
||||
[TabStr] = {
|
||||
[ 0] = {ActFrmLogIn ,"power-off" },
|
||||
[ 1] = {ActReqSch ,"search" },
|
||||
[ 2] = {ActSeeGblTL ,"comment-dots" },
|
||||
[ 3] = {ActSeeSocPrf ,"user-circle" },
|
||||
[ 4] = {ActSeeCal ,"calendar" },
|
||||
[ 5] = {ActSeeNtf ,"bell" },
|
||||
},
|
||||
[TabSys] = {
|
||||
[ 0] = {ActSeeSysInf ,"info" },
|
||||
[ 1] = {ActSeeCty ,"globe-americas" },
|
||||
[ 2] = {ActSeePen ,"sitemap" },
|
||||
[ 3] = {ActSeeLnk ,"up-right-from-square" },
|
||||
[ 4] = {ActSeePlg ,"puzzle-piece" },
|
||||
[ 5] = {ActMtn ,"tools" },
|
||||
},
|
||||
[TabCty] = {
|
||||
[ 0] = {ActSeeCtyInf ,"info" },
|
||||
[ 1] = {ActSeeIns ,"university" },
|
||||
},
|
||||
[TabIns] = {
|
||||
[ 0] = {ActSeeInsInf ,"info" },
|
||||
[ 1] = {ActSeeCtr ,"building" },
|
||||
[ 2] = {ActSeePlc ,"map-marker-alt" },
|
||||
[ 3] = {ActSeeDpt ,"users" },
|
||||
[ 4] = {ActSeeHld ,"calendar-day" },
|
||||
},
|
||||
[TabCtr] = {
|
||||
[ 0] = {ActSeeCtrInf ,"info" },
|
||||
[ 1] = {ActSeeDeg ,"graduation-cap" },
|
||||
[ 2] = {ActSeeBld ,"building" },
|
||||
[ 3] = {ActSeeRoo ,"chalkboard-teacher" },
|
||||
},
|
||||
[TabDeg] = {
|
||||
[ 0] = {ActSeeDegInf ,"info" },
|
||||
[ 1] = {ActSeeCrs ,"chalkboard-teacher" },
|
||||
},
|
||||
[TabCrs] = {
|
||||
[ 0] = {ActSeeCrsInf ,"info" },
|
||||
[ 1] = {ActSeePrg ,"clipboard-list" },
|
||||
[ 2] = {ActSeeTchGui ,"book-open" },
|
||||
[ 3] = {ActSeeSyl ,"list-ol" },
|
||||
[ 4] = {ActSeeBib ,"book" },
|
||||
[ 5] = {ActSeeFAQ ,"question" },
|
||||
[ 6] = {ActSeeCrsLnk ,"up-right-from-square" },
|
||||
[ 7] = {ActSeeAss ,"check" },
|
||||
[ 8] = {ActSeeCrsTT ,"clock" },
|
||||
},
|
||||
[TabAss] = {
|
||||
[ 0] = {ActSeeAllAsg ,"edit" },
|
||||
[ 1] = {ActSeeAllPrj ,"file-invoice" },
|
||||
[ 2] = {ActSeeAllCfe ,"bullhorn" },
|
||||
[ 3] = {ActEdiTstQst ,"clipboard-question" },
|
||||
[ 4] = {ActReqTst ,"check" },
|
||||
[ 5] = {ActSeeAllExa ,"file-signature" },
|
||||
[ 6] = {ActSeeAllGam ,"gamepad" },
|
||||
[ 7] = {ActSeeAllRub ,"tasks" },
|
||||
},
|
||||
[TabFil] = {
|
||||
[ 0] = {ActSeeAdmDocIns ,"folder-open" },
|
||||
[ 1] = {ActAdmShaIns ,"folder-open" },
|
||||
[ 2] = {ActSeeAdmDocCtr ,"folder-open" },
|
||||
[ 3] = {ActAdmShaCtr ,"folder-open" },
|
||||
[ 4] = {ActSeeAdmDocDeg ,"folder-open" },
|
||||
[ 5] = {ActAdmShaDeg ,"folder-open" },
|
||||
[ 6] = {ActSeeAdmDocCrsGrp ,"folder-open" },
|
||||
[ 7] = {ActAdmTchCrsGrp ,"folder-open" },
|
||||
[ 8] = {ActAdmShaCrsGrp ,"folder-open" },
|
||||
[ 9] = {ActAdmAsgWrkUsr ,"folder-open" },
|
||||
[10] = {ActReqAsgWrkCrs ,"folder-open" },
|
||||
[11] = {ActSeeAdmMrk ,"list-alt" },
|
||||
[12] = {ActAdmBrf ,"briefcase" },
|
||||
},
|
||||
[TabUsr] = {
|
||||
[ 0] = {ActReqSelGrp ,"sitemap" },
|
||||
[ 1] = {ActLstStd ,"users" },
|
||||
[ 2] = {ActLstTch ,"user-tie" },
|
||||
[ 3] = {ActLstOth ,"user-friends" },
|
||||
[ 4] = {ActSeeAllAtt ,"calendar-check" },
|
||||
[ 5] = {ActReqSignUp ,"hand-point-up" },
|
||||
[ 6] = {ActSeeSignUpReq ,"hand-point-up" },
|
||||
[ 7] = {ActLstCon ,"user-clock" },
|
||||
},
|
||||
[TabMsg] = {
|
||||
[ 0] = {ActSeeAnn ,"bullhorn" },
|
||||
[ 1] = {ActSeeAllNot ,"sticky-note" },
|
||||
[ 2] = {ActSeeFor ,"comments" },
|
||||
[ 3] = {ActSeeChtRms ,"comments" },
|
||||
[ 4] = {ActSeeRcvMsg ,"envelope" },
|
||||
[ 5] = {ActReqMaiUsr ,"at" },
|
||||
},
|
||||
[TabAna] = {
|
||||
[ 0] = {ActReqUseGbl ,"chart-pie" },
|
||||
[ 1] = {ActSeePhoDeg ,"graduation-cap" },
|
||||
[ 2] = {ActReqStaCrs ,"tasks" },
|
||||
[ 3] = {ActSeeAllSvy ,"poll" },
|
||||
[ 4] = {ActReqAccGbl ,"chart-line" },
|
||||
[ 5] = {ActReqMyUsgRep ,"file-alt" },
|
||||
[ 6] = {ActMFUAct ,"heart" },
|
||||
},
|
||||
[TabPrf] = {
|
||||
[ 0] = {ActFrmRolSes ,"power-off" },
|
||||
[ 1] = {ActMyCrs ,"sitemap" },
|
||||
[ 2] = {ActSeeMyTT ,"clock" },
|
||||
[ 3] = {ActSeeMyAgd ,"calendar" },
|
||||
[ 4] = {ActFrmMyAcc ,"at" },
|
||||
[ 5] = {ActReqEdiRecSha ,"address-card" },
|
||||
[ 6] = {ActReqEdiSet ,"cog" },
|
||||
},
|
||||
};
|
||||
|
||||
/*
|
||||
static const Act_Action_t Mnu_MenuActions[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
|
||||
{
|
||||
[TabUnk] = {
|
||||
|
@ -182,13 +302,25 @@ static const Act_Action_t Mnu_MenuActions[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_
|
|||
[ 6] = ActReqEdiSet,
|
||||
},
|
||||
};
|
||||
|
||||
*/
|
||||
/*****************************************************************************/
|
||||
/****************************** Private prototypes ***************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Mnu_PutIconsMenu (__attribute__((unused)) void *Args);
|
||||
|
||||
/*****************************************************************************/
|
||||
/********************** Get icon associated to an action *********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
const char *Mnu_GetIcon (Act_Action_t Action)
|
||||
{
|
||||
if (Action < 0 || Action >= ActLst_NUM_ACTIONS)
|
||||
return NULL;
|
||||
|
||||
return Mnu_Menu[Gbl.Action.Tab][Act_GetIndexInMenu (Action)].Icon;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******* When I change to another tab, go to the first option allowed ********/
|
||||
/*****************************************************************************/
|
||||
|
@ -203,7 +335,7 @@ Act_Action_t Mnu_GetFirstActionAvailableInCurrentTab (void)
|
|||
NumOptInMenu < Act_MAX_OPTIONS_IN_MENU_PER_TAB;
|
||||
NumOptInMenu++)
|
||||
{
|
||||
if ((Action = Mnu_MenuActions[Gbl.Action.Tab][NumOptInMenu]) == 0)
|
||||
if ((Action = Mnu_Menu[Gbl.Action.Tab][NumOptInMenu].Action) == 0)
|
||||
return ActUnk;
|
||||
if (Act_CheckIfIHavePermissionToExecuteAction (Action))
|
||||
return Action;
|
||||
|
@ -240,7 +372,7 @@ void Mnu_WriteMenuThisTab (void)
|
|||
NumOptInMenu < Act_MAX_OPTIONS_IN_MENU_PER_TAB;
|
||||
NumOptInMenu++)
|
||||
{
|
||||
NumAct = Mnu_MenuActions[Gbl.Action.Tab][NumOptInMenu];
|
||||
NumAct = Mnu_Menu[Gbl.Action.Tab][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))
|
||||
|
|
|
@ -45,6 +45,8 @@ typedef enum
|
|||
/***************************** Public prototypes *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
const char *Mnu_GetIcon (Act_Action_t Action);
|
||||
|
||||
Act_Action_t Mnu_GetFirstActionAvailableInCurrentTab (void);
|
||||
void Mnu_WriteMenuThisTab (void);
|
||||
|
||||
|
|
|
@ -776,11 +776,11 @@ void Par_GetMainPars (void)
|
|||
/***** Some preliminary adjusts depending on action *****/
|
||||
switch (Act_GetBrowserTab (Gbl.Action.Act))
|
||||
{
|
||||
case Act_AJAX_NORMAL:
|
||||
case Act_AJAX_NR:
|
||||
Gbl.Action.UsesAJAX = true;
|
||||
Gbl.Action.IsAJAXAutoRefresh = false;
|
||||
break;
|
||||
case Act_AJAX_RFRESH:
|
||||
case Act_AJAX_RF:
|
||||
Gbl.Action.UsesAJAX = true;
|
||||
Gbl.Action.IsAJAXAutoRefresh = true;
|
||||
break;
|
||||
|
|
12
swad_photo.c
12
swad_photo.c
|
@ -1073,9 +1073,9 @@ void Pho_BuildHTMLUsrPhoto (const struct Usr_Data *UsrDat,const char *PhotoURL,
|
|||
unsigned NumFollowers;
|
||||
bool PhotoExists;
|
||||
Act_BrowserTab_t BrowserTab = Act_GetBrowserTab (Gbl.Action.Act);
|
||||
bool BrowserTabIs1stTab = (BrowserTab == Act_BRW_1ST_TAB ||
|
||||
BrowserTab == Act_AJAX_NORMAL ||
|
||||
BrowserTab == Act_AJAX_RFRESH);
|
||||
bool BrowserTabIs1stTab = (BrowserTab == Act_1ST_TAB ||
|
||||
BrowserTab == Act_AJAX_NR ||
|
||||
BrowserTab == Act_AJAX_RF);
|
||||
bool PutZoomCode = (Zoom == Pho_ZOOM) && // Make zoom
|
||||
BrowserTabIs1stTab; // Only in main browser tab (or AJAX)
|
||||
char IdCaption[Frm_MAX_BYTES_ID + 1];
|
||||
|
@ -1279,9 +1279,9 @@ void Pho_ShowUsrPhoto (const struct Usr_Data *UsrDat,const char *PhotoURL,
|
|||
const char *ClassPhoto,Pho_Zoom_t Zoom)
|
||||
{
|
||||
Act_BrowserTab_t BrowserTab = Act_GetBrowserTab (Gbl.Action.Act);
|
||||
bool BrowserTabIs1stTab = (BrowserTab == Act_BRW_1ST_TAB ||
|
||||
BrowserTab == Act_AJAX_NORMAL ||
|
||||
BrowserTab == Act_AJAX_RFRESH);
|
||||
bool BrowserTabIs1stTab = (BrowserTab == Act_1ST_TAB ||
|
||||
BrowserTab == Act_AJAX_NR ||
|
||||
BrowserTab == Act_AJAX_RF);
|
||||
Frm_PutForm_t PutFormPublicProfile = (!Frm_CheckIfInside () && // Only if not inside another form
|
||||
BrowserTabIs1stTab) ? Frm_PUT_FORM : // Only in main browser tab (or AJAX)
|
||||
Frm_DONT_PUT_FORM;
|
||||
|
|
|
@ -2075,7 +2075,7 @@ void Rec_ShowSharedUsrRecord (Rec_SharedRecordViewType_t TypeOfView,
|
|||
Rec_RecordHelp[Rec_SHA_RECORD_LIST] = Rec_RecordListHelp[UsrDat->Roles.InCurrentCrs];
|
||||
|
||||
PutFormLinks = (!Frm_CheckIfInside () && // Only if not inside another form
|
||||
Act_GetBrowserTab (Gbl.Action.Act) == Act_BRW_1ST_TAB) ? Frm_PUT_FORM : // Only in main browser tab
|
||||
Act_GetBrowserTab (Gbl.Action.Act) == Act_1ST_TAB) ? Frm_PUT_FORM : // Only in main browser tab
|
||||
Frm_DONT_PUT_FORM;
|
||||
|
||||
Ins.HieCod = UsrDat->InsCod;
|
||||
|
@ -2347,7 +2347,7 @@ static void Rec_PutIconsCommands (__attribute__((unused)) void *Args)
|
|||
};
|
||||
|
||||
if (!Frm_CheckIfInside () && // Only if not inside another form
|
||||
Act_GetBrowserTab (Gbl.Action.Act) == Act_BRW_1ST_TAB && // Only in main browser tab
|
||||
Act_GetBrowserTab (Gbl.Action.Act) == Act_1ST_TAB && // Only in main browser tab
|
||||
Gbl.Usrs.Me.Logged) // Only if I am logged
|
||||
{
|
||||
ICanViewUsrProfile = Pri_ShowingIsAllowed (Rec_Record.UsrDat->BaPrfVisibility,
|
||||
|
|
|
@ -680,14 +680,14 @@ static void Sta_WriteSelectorAction (const struct Sta_Stats *Stats)
|
|||
Action == Stats->NumAction ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%u: %s",
|
||||
"%04u: %s",
|
||||
(unsigned) Action,Act_GetActionText (Action));
|
||||
else
|
||||
HTM_OPTION (HTM_Type_UNSIGNED,&ActionUnsigned,
|
||||
Action == Stats->NumAction ? HTM_OPTION_SELECTED :
|
||||
HTM_OPTION_UNSELECTED,
|
||||
HTM_OPTION_ENABLED,
|
||||
"%u: %s > %s > %s",
|
||||
"%04u: %s > %s > %s",
|
||||
(unsigned) Action,Tab_GetTxt (Tab),
|
||||
Act_GetTitleAction (Action),
|
||||
Act_GetActionText (Action));
|
||||
|
|
11536
swad_text_action.c
11536
swad_text_action.c
File diff suppressed because it is too large
Load Diff
|
@ -276,7 +276,7 @@ void Usr_InformAboutNumClicksBeforePhoto (void)
|
|||
{
|
||||
if (Gbl.Usrs.Me.NumAccWithoutPhoto >= Pho_MAX_CLICKS_WITHOUT_PHOTO)
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_send_your_photo_because_);
|
||||
else if (Act_GetBrowserTab (Gbl.Action.Act) == Act_BRW_1ST_TAB)
|
||||
else if (Act_GetBrowserTab (Gbl.Action.Act) == Act_1ST_TAB)
|
||||
Ale_ShowAlertAndButton (ActReqMyPho,NULL,NULL,
|
||||
NULL,NULL,
|
||||
Btn_CONFIRM_BUTTON,Txt_Upload_photo,
|
||||
|
|
Loading…
Reference in New Issue