Version 22.0: Sep 12, 2022 New action to change resource link. Not implemented.

This commit is contained in:
acanas 2022-09-12 23:51:59 +02:00
parent 3986739834
commit cc58884e9a
9 changed files with 155 additions and 105 deletions

View File

@ -454,6 +454,7 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
[ActUnhPrgRsc ] = {1922,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,PrgRsc_UnhideResource ,NULL},
[ActUp_PrgRsc ] = {1923,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,PrgRsc_MoveUpResource ,NULL},
[ActDwnPrgRsc ] = {1924,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,PrgRsc_MoveDownResource ,NULL},
[ActChgLnkPrgRsc ] = {1932,-1,TabUnk,ActSeePrg ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,PrgRsc_ChangeResourceLink ,NULL},
[ActEdiTchGui ] = { 785,-1,TabUnk,ActSeeTchGui ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Inf_FormsToSelSendInfo ,NULL},
@ -3773,6 +3774,7 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un
ActNewPrgRsc, // #1929
ActReqLnkSeeDocCrs, // #1930
ActReqLnkAdmDocCrs, // #1931
ActChgLnkPrgRsc, // #1932
};
/*****************************************************************************/

View File

@ -65,7 +65,7 @@ typedef enum
typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action
#define Act_MAX_ACTION_COD 1931
#define Act_MAX_ACTION_COD 1932
#define Act_MAX_OPTIONS_IN_MENU_PER_TAB 13
@ -420,107 +420,108 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to
#define ActUnhPrgRsc (ActChgCrsSta + 37)
#define ActUp_PrgRsc (ActChgCrsSta + 38)
#define ActDwnPrgRsc (ActChgCrsSta + 39)
#define ActEdiTchGui (ActChgCrsSta + 40)
#define ActSeeSylLec (ActChgCrsSta + 41)
#define ActSeeSylPra (ActChgCrsSta + 42)
#define ActEdiSylLec (ActChgCrsSta + 43)
#define ActEdiSylPra (ActChgCrsSta + 44)
#define ActDelItmSylLec (ActChgCrsSta + 45)
#define ActDelItmSylPra (ActChgCrsSta + 46)
#define ActUp_IteSylLec (ActChgCrsSta + 47)
#define ActUp_IteSylPra (ActChgCrsSta + 48)
#define ActDwnIteSylLec (ActChgCrsSta + 49)
#define ActDwnIteSylPra (ActChgCrsSta + 50)
#define ActRgtIteSylLec (ActChgCrsSta + 51)
#define ActRgtIteSylPra (ActChgCrsSta + 52)
#define ActLftIteSylLec (ActChgCrsSta + 53)
#define ActLftIteSylPra (ActChgCrsSta + 54)
#define ActInsIteSylLec (ActChgCrsSta + 55)
#define ActInsIteSylPra (ActChgCrsSta + 56)
#define ActModIteSylLec (ActChgCrsSta + 57)
#define ActModIteSylPra (ActChgCrsSta + 58)
#define ActChgLnkPrgRsc (ActChgCrsSta + 40)
#define ActEdiTchGui (ActChgCrsSta + 41)
#define ActSeeSylLec (ActChgCrsSta + 42)
#define ActSeeSylPra (ActChgCrsSta + 43)
#define ActEdiSylLec (ActChgCrsSta + 44)
#define ActEdiSylPra (ActChgCrsSta + 45)
#define ActDelItmSylLec (ActChgCrsSta + 46)
#define ActDelItmSylPra (ActChgCrsSta + 47)
#define ActUp_IteSylLec (ActChgCrsSta + 48)
#define ActUp_IteSylPra (ActChgCrsSta + 49)
#define ActDwnIteSylLec (ActChgCrsSta + 50)
#define ActDwnIteSylPra (ActChgCrsSta + 51)
#define ActRgtIteSylLec (ActChgCrsSta + 52)
#define ActRgtIteSylPra (ActChgCrsSta + 53)
#define ActLftIteSylLec (ActChgCrsSta + 54)
#define ActLftIteSylPra (ActChgCrsSta + 55)
#define ActInsIteSylLec (ActChgCrsSta + 56)
#define ActInsIteSylPra (ActChgCrsSta + 57)
#define ActModIteSylLec (ActChgCrsSta + 58)
#define ActModIteSylPra (ActChgCrsSta + 59)
#define ActEdiBib (ActChgCrsSta + 59)
#define ActEdiFAQ (ActChgCrsSta + 60)
#define ActEdiCrsLnk (ActChgCrsSta + 61)
#define ActEdiBib (ActChgCrsSta + 60)
#define ActEdiFAQ (ActChgCrsSta + 61)
#define ActEdiCrsLnk (ActChgCrsSta + 62)
#define ActChgFrcReaCrsInf (ActChgCrsSta + 62)
#define ActChgFrcReaTchGui (ActChgCrsSta + 63)
#define ActChgFrcReaSylLec (ActChgCrsSta + 64)
#define ActChgFrcReaSylPra (ActChgCrsSta + 65)
#define ActChgFrcReaBib (ActChgCrsSta + 66)
#define ActChgFrcReaFAQ (ActChgCrsSta + 67)
#define ActChgFrcReaCrsLnk (ActChgCrsSta + 68)
#define ActChgFrcReaCrsInf (ActChgCrsSta + 63)
#define ActChgFrcReaTchGui (ActChgCrsSta + 64)
#define ActChgFrcReaSylLec (ActChgCrsSta + 65)
#define ActChgFrcReaSylPra (ActChgCrsSta + 66)
#define ActChgFrcReaBib (ActChgCrsSta + 67)
#define ActChgFrcReaFAQ (ActChgCrsSta + 68)
#define ActChgFrcReaCrsLnk (ActChgCrsSta + 69)
#define ActChgHavReaCrsInf (ActChgCrsSta + 69)
#define ActChgHavReaTchGui (ActChgCrsSta + 70)
#define ActChgHavReaSylLec (ActChgCrsSta + 71)
#define ActChgHavReaSylPra (ActChgCrsSta + 72)
#define ActChgHavReaBib (ActChgCrsSta + 73)
#define ActChgHavReaFAQ (ActChgCrsSta + 74)
#define ActChgHavReaCrsLnk (ActChgCrsSta + 75)
#define ActChgHavReaCrsInf (ActChgCrsSta + 70)
#define ActChgHavReaTchGui (ActChgCrsSta + 71)
#define ActChgHavReaSylLec (ActChgCrsSta + 72)
#define ActChgHavReaSylPra (ActChgCrsSta + 73)
#define ActChgHavReaBib (ActChgCrsSta + 74)
#define ActChgHavReaFAQ (ActChgCrsSta + 75)
#define ActChgHavReaCrsLnk (ActChgCrsSta + 76)
#define ActSelInfSrcCrsInf (ActChgCrsSta + 76)
#define ActSelInfSrcTchGui (ActChgCrsSta + 77)
#define ActSelInfSrcSylLec (ActChgCrsSta + 78)
#define ActSelInfSrcSylPra (ActChgCrsSta + 79)
#define ActSelInfSrcBib (ActChgCrsSta + 80)
#define ActSelInfSrcFAQ (ActChgCrsSta + 81)
#define ActSelInfSrcCrsLnk (ActChgCrsSta + 82)
#define ActRcvURLCrsInf (ActChgCrsSta + 83)
#define ActRcvURLTchGui (ActChgCrsSta + 84)
#define ActRcvURLSylLec (ActChgCrsSta + 85)
#define ActRcvURLSylPra (ActChgCrsSta + 86)
#define ActRcvURLBib (ActChgCrsSta + 87)
#define ActRcvURLFAQ (ActChgCrsSta + 88)
#define ActRcvURLCrsLnk (ActChgCrsSta + 89)
#define ActRcvPagCrsInf (ActChgCrsSta + 90)
#define ActRcvPagTchGui (ActChgCrsSta + 91)
#define ActRcvPagSylLec (ActChgCrsSta + 92)
#define ActRcvPagSylPra (ActChgCrsSta + 93)
#define ActRcvPagBib (ActChgCrsSta + 94)
#define ActRcvPagFAQ (ActChgCrsSta + 95)
#define ActRcvPagCrsLnk (ActChgCrsSta + 96)
#define ActEditorCrsInf (ActChgCrsSta + 97)
#define ActEditorTchGui (ActChgCrsSta + 98)
#define ActEditorSylLec (ActChgCrsSta + 99)
#define ActEditorSylPra (ActChgCrsSta + 100)
#define ActEditorBib (ActChgCrsSta + 101)
#define ActEditorFAQ (ActChgCrsSta + 102)
#define ActEditorCrsLnk (ActChgCrsSta + 103)
#define ActPlaTxtEdiCrsInf (ActChgCrsSta + 104)
#define ActPlaTxtEdiTchGui (ActChgCrsSta + 105)
#define ActPlaTxtEdiSylLec (ActChgCrsSta + 106)
#define ActPlaTxtEdiSylPra (ActChgCrsSta + 107)
#define ActPlaTxtEdiBib (ActChgCrsSta + 108)
#define ActPlaTxtEdiFAQ (ActChgCrsSta + 109)
#define ActPlaTxtEdiCrsLnk (ActChgCrsSta + 110)
#define ActRchTxtEdiCrsInf (ActChgCrsSta + 111)
#define ActRchTxtEdiTchGui (ActChgCrsSta + 112)
#define ActRchTxtEdiSylLec (ActChgCrsSta + 113)
#define ActRchTxtEdiSylPra (ActChgCrsSta + 114)
#define ActRchTxtEdiBib (ActChgCrsSta + 115)
#define ActRchTxtEdiFAQ (ActChgCrsSta + 116)
#define ActRchTxtEdiCrsLnk (ActChgCrsSta + 117)
#define ActRcvPlaTxtCrsInf (ActChgCrsSta + 118)
#define ActRcvPlaTxtTchGui (ActChgCrsSta + 119)
#define ActRcvPlaTxtSylLec (ActChgCrsSta + 120)
#define ActRcvPlaTxtSylPra (ActChgCrsSta + 121)
#define ActRcvPlaTxtBib (ActChgCrsSta + 122)
#define ActRcvPlaTxtFAQ (ActChgCrsSta + 123)
#define ActRcvPlaTxtCrsLnk (ActChgCrsSta + 124)
#define ActRcvRchTxtCrsInf (ActChgCrsSta + 125)
#define ActRcvRchTxtTchGui (ActChgCrsSta + 126)
#define ActRcvRchTxtSylLec (ActChgCrsSta + 127)
#define ActRcvRchTxtSylPra (ActChgCrsSta + 128)
#define ActRcvRchTxtBib (ActChgCrsSta + 129)
#define ActRcvRchTxtFAQ (ActChgCrsSta + 130)
#define ActRcvRchTxtCrsLnk (ActChgCrsSta + 131)
#define ActSelInfSrcCrsInf (ActChgCrsSta + 77)
#define ActSelInfSrcTchGui (ActChgCrsSta + 78)
#define ActSelInfSrcSylLec (ActChgCrsSta + 79)
#define ActSelInfSrcSylPra (ActChgCrsSta + 80)
#define ActSelInfSrcBib (ActChgCrsSta + 81)
#define ActSelInfSrcFAQ (ActChgCrsSta + 82)
#define ActSelInfSrcCrsLnk (ActChgCrsSta + 83)
#define ActRcvURLCrsInf (ActChgCrsSta + 84)
#define ActRcvURLTchGui (ActChgCrsSta + 85)
#define ActRcvURLSylLec (ActChgCrsSta + 86)
#define ActRcvURLSylPra (ActChgCrsSta + 87)
#define ActRcvURLBib (ActChgCrsSta + 88)
#define ActRcvURLFAQ (ActChgCrsSta + 89)
#define ActRcvURLCrsLnk (ActChgCrsSta + 90)
#define ActRcvPagCrsInf (ActChgCrsSta + 91)
#define ActRcvPagTchGui (ActChgCrsSta + 92)
#define ActRcvPagSylLec (ActChgCrsSta + 93)
#define ActRcvPagSylPra (ActChgCrsSta + 94)
#define ActRcvPagBib (ActChgCrsSta + 95)
#define ActRcvPagFAQ (ActChgCrsSta + 96)
#define ActRcvPagCrsLnk (ActChgCrsSta + 97)
#define ActEditorCrsInf (ActChgCrsSta + 98)
#define ActEditorTchGui (ActChgCrsSta + 99)
#define ActEditorSylLec (ActChgCrsSta + 100)
#define ActEditorSylPra (ActChgCrsSta + 101)
#define ActEditorBib (ActChgCrsSta + 102)
#define ActEditorFAQ (ActChgCrsSta + 103)
#define ActEditorCrsLnk (ActChgCrsSta + 104)
#define ActPlaTxtEdiCrsInf (ActChgCrsSta + 105)
#define ActPlaTxtEdiTchGui (ActChgCrsSta + 106)
#define ActPlaTxtEdiSylLec (ActChgCrsSta + 107)
#define ActPlaTxtEdiSylPra (ActChgCrsSta + 108)
#define ActPlaTxtEdiBib (ActChgCrsSta + 109)
#define ActPlaTxtEdiFAQ (ActChgCrsSta + 110)
#define ActPlaTxtEdiCrsLnk (ActChgCrsSta + 111)
#define ActRchTxtEdiCrsInf (ActChgCrsSta + 112)
#define ActRchTxtEdiTchGui (ActChgCrsSta + 113)
#define ActRchTxtEdiSylLec (ActChgCrsSta + 114)
#define ActRchTxtEdiSylPra (ActChgCrsSta + 115)
#define ActRchTxtEdiBib (ActChgCrsSta + 116)
#define ActRchTxtEdiFAQ (ActChgCrsSta + 117)
#define ActRchTxtEdiCrsLnk (ActChgCrsSta + 118)
#define ActRcvPlaTxtCrsInf (ActChgCrsSta + 119)
#define ActRcvPlaTxtTchGui (ActChgCrsSta + 120)
#define ActRcvPlaTxtSylLec (ActChgCrsSta + 121)
#define ActRcvPlaTxtSylPra (ActChgCrsSta + 122)
#define ActRcvPlaTxtBib (ActChgCrsSta + 123)
#define ActRcvPlaTxtFAQ (ActChgCrsSta + 124)
#define ActRcvPlaTxtCrsLnk (ActChgCrsSta + 125)
#define ActRcvRchTxtCrsInf (ActChgCrsSta + 126)
#define ActRcvRchTxtTchGui (ActChgCrsSta + 127)
#define ActRcvRchTxtSylLec (ActChgCrsSta + 128)
#define ActRcvRchTxtSylPra (ActChgCrsSta + 129)
#define ActRcvRchTxtBib (ActChgCrsSta + 130)
#define ActRcvRchTxtFAQ (ActChgCrsSta + 131)
#define ActRcvRchTxtCrsLnk (ActChgCrsSta + 132)
#define ActPrnCrsTT (ActChgCrsSta + 132)
#define ActEdiCrsTT (ActChgCrsSta + 133)
#define ActChgCrsTT (ActChgCrsSta + 134)
#define ActChgCrsTT1stDay (ActChgCrsSta + 135)
#define ActPrnCrsTT (ActChgCrsSta + 133)
#define ActEdiCrsTT (ActChgCrsSta + 134)
#define ActChgCrsTT (ActChgCrsSta + 135)
#define ActChgCrsTT1stDay (ActChgCrsSta + 136)
/*****************************************************************************/
/***************************** Assessment tab ********************************/

View File

@ -8292,7 +8292,7 @@ void Brw_ShowFileMetadata (void)
static void Brw_PutIconToGetLinkToFile (void *FileMetadata)
{
Ico_PutContextualIconToGetLink (Brw_ActReqLnk[Gbl.FileBrowser.Type],
Ico_PutContextualIconToGetLink (Brw_ActReqLnk[Gbl.FileBrowser.Type],NULL,
Brw_PutParamsToGetLinkToFile,FileMetadata);
}

View File

@ -606,10 +606,11 @@ TODO: Fix bug: error al enviar un mensaje a dos recipientes, error on duplicate
TODO: Attach pdf files in multimedia.
*/
#define Log_PLATFORM_VERSION "SWAD 21.117.1 (2022-09-12)"
#define Log_PLATFORM_VERSION "SWAD 22.0 (2022-09-12)"
#define CSS_FILE "swad21.107.1.css"
#define JS_FILE "swad21.100.js"
/*
Version 22.0: Sep 12, 2022 New action to change resource link. Not implemented. (329606 lines)
Version 21.117.1: Sep 12, 2022 Copy link to file into resource clipboard. (329561 lines)
Version 21.117: Sep 12, 2022 New database table with clipboards for program resources.
New actions to get link to file in course document area. (329514 lines)

View File

@ -307,10 +307,10 @@ void Ico_PutContextualIconToPrint (Act_Action_t NextAction,
"print.svg",Ico_BLACK);
}
void Ico_PutContextualIconToGetLink (Act_Action_t NextAction,
void Ico_PutContextualIconToGetLink (Act_Action_t NextAction,const char *Anchor,
void (*FuncParams) (void *Args),void *Args)
{
Lay_PutContextualLinkOnlyIcon (NextAction,NULL,
Lay_PutContextualLinkOnlyIcon (NextAction,Anchor,
FuncParams,Args,
"link.svg",Ico_BLACK);
}

View File

@ -81,7 +81,7 @@ void Ico_PutContextualIconToHideUnhide (const Act_Action_t NextAction[2],const c
bool Hidden);
void Ico_PutContextualIconToPrint (Act_Action_t NextAction,
void (*FuncParams) (void *Args),void *Args);
void Ico_PutContextualIconToGetLink (Act_Action_t NextAction,
void Ico_PutContextualIconToGetLink (Act_Action_t NextAction,const char *Anchor,
void (*FuncParams) (void *Args),void *Args);
void Ico_PutContextualIconToCopy (Act_Action_t NextAction,
void (*FuncParams) (void *Args),void *Args);

View File

@ -440,6 +440,12 @@ static void PrgRsc_WriteRowEditResource (unsigned NumRsc,unsigned NumResources,
Frm_EndForm ();
HTM_TD_End ();
/***** Link to resource *****/
HTM_TD_Begin ("class=\"PRG_MAIN LM %s\"",The_GetColorRows1 ());
Ico_PutContextualIconToGetLink (ActChgLnkPrgRsc,PrgRsc_RESOURCE_SECTION_ID,
PrgRsc_PutParams,&Resource->Rsc.Cod);
HTM_TD_End ();
/***** End row *****/
HTM_TR_End ();
}
@ -454,17 +460,17 @@ static void PrgRsc_WriteRowNewResource (long ItmCod,unsigned NumRsc)
HTM_TR_Begin (NULL);
/***** Forms to remove/edit this item resource *****/
HTM_TD_Begin ("class=\"PRG_COL1 LM %s\"",The_GetColorRows ());
HTM_TD_Begin ("class=\"PRG_COL1 LM %s\"",The_GetColorRows1 ());
HTM_TD_End ();
/***** Resource number *****/
HTM_TD_Begin ("class=\"PRG_NUM PRG_RSC_%s RM %s\"",
The_GetSuffix (),The_GetColorRows ());
The_GetSuffix (),The_GetColorRows1 ());
HTM_Unsigned (NumRsc + 1);
HTM_TD_End ();
/***** Title *****/
HTM_TD_Begin ("class=\"PRG_MAIN LM %s\"",The_GetColorRows ());
HTM_TD_Begin ("class=\"PRG_MAIN LM %s\"",The_GetColorRows1 ());
Frm_BeginFormAnchor (ActNewPrgRsc,PrgRsc_RESOURCE_SECTION_ID);
Prg_PutParamItmCod (ItmCod);
HTM_INPUT_TEXT ("Title",PrgRsc_MAX_CHARS_PROGRAM_RESOURCE_TITLE,"",
@ -476,6 +482,12 @@ static void PrgRsc_WriteRowNewResource (long ItmCod,unsigned NumRsc)
Frm_EndForm ();
HTM_TD_End ();
/***** Link to resource *****/
HTM_TD_Begin ("class=\"PRG_MAIN LM %s\"",The_GetColorRows1 ());
Ico_PutContextualIconToGetLink (ActChgLnkPrgRsc,PrgRsc_RESOURCE_SECTION_ID,
PrgRsc_PutParams,NULL);
HTM_TD_End ();
/***** End row *****/
HTM_TR_End ();
}
@ -828,3 +840,12 @@ static bool PrgRsc_ExchangeResources (const struct PrgRsc_Rsc *Rsc1,
return false; // No success
}
/*****************************************************************************/
/**************************** Change resource link ***************************/
/*****************************************************************************/
void PrgRsc_ChangeResourceLink (void)
{
Ale_ShowAlert (Ale_ERROR,"Not implemented.");
}

View File

@ -93,4 +93,6 @@ void PrgRsc_UnhideResource (void);
void PrgRsc_MoveUpResource (void);
void PrgRsc_MoveDownResource (void);
void PrgRsc_ChangeResourceLink (void);
#endif

View File

@ -6270,6 +6270,29 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"Move down resource" // Precisa de tradução
#elif L==10 // tr
"Move down resource" // Çeviri lazim!
#endif
,
[ActChgLnkPrgRsc] =
#if L==1 // ca
"Change resource link" // Necessita traducció
#elif L==2 // de
"Change resource link" // Need Übersetzung
#elif L==3 // en
"Change resource link"
#elif L==4 // es
"Cambiar enlace de recurso"
#elif L==5 // fr
"Change resource link" // Besoin de traduction
#elif L==6 // gn
"Cambiar enlace de recurso" // Okoteve traducción
#elif L==7 // it
"Change resource link" // Bisogno di traduzione
#elif L==8 // pl
"Change resource link" // Potrzebujesz tlumaczenie
#elif L==9 // pt
"Change resource link" // Precisa de tradução
#elif L==10 // tr
"Change resource link" // Çeviri lazim!
#endif
,
[ActEdiTchGui] =