mirror of https://github.com/acanas/swad-core.git
Version 22.46.2: Oct 14, 2022 Changes in anchors behavior in project listing.
This commit is contained in:
parent
7a83f44ae3
commit
7b260ed625
|
@ -606,10 +606,11 @@ TODO: Fix bug: error al enviar un mensaje a dos recipientes, error on duplicate
|
||||||
|
|
||||||
TODO: Attach pdf files in multimedia.
|
TODO: Attach pdf files in multimedia.
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 22.46.1 (2022-10-14)"
|
#define Log_PLATFORM_VERSION "SWAD 22.46.2 (2022-10-14)"
|
||||||
#define CSS_FILE "swad22.46.css"
|
#define CSS_FILE "swad22.46.css"
|
||||||
#define JS_FILE "swad21.100.js"
|
#define JS_FILE "swad21.100.js"
|
||||||
/*
|
/*
|
||||||
|
Version 22.46.2: Oct 14, 2022 Changes in anchors behavior in project listing. (333228 lines)
|
||||||
Version 22.46.1: Oct 14, 2022 Fixed bug filtering projects by department. (333227 lines)
|
Version 22.46.1: Oct 14, 2022 Fixed bug filtering projects by department. (333227 lines)
|
||||||
Version 22.46: Oct 13, 2022 Review of projects. (333219 lines)
|
Version 22.46: Oct 13, 2022 Review of projects. (333219 lines)
|
||||||
Version 22.45: Oct 13, 2022 Review of projects (not finished). (333137 lines)
|
Version 22.45: Oct 13, 2022 Review of projects (not finished). (333137 lines)
|
||||||
|
|
|
@ -200,12 +200,11 @@ static void Prj_PutIconToShowAllData (struct Prj_Projects *Projects);
|
||||||
static void Prj_PutIconsOnePrj (void *Projects);
|
static void Prj_PutIconsOnePrj (void *Projects);
|
||||||
|
|
||||||
//---------------------- Show one project in a row ----------------------------
|
//---------------------- Show one project in a row ----------------------------
|
||||||
static void Prj_ShowProjectRow (struct Prj_Projects *Projects,
|
static void Prj_ShowProjectRow (struct Prj_Projects *Projects);
|
||||||
unsigned NumIndex);
|
|
||||||
static void Prj_ShowProjectFirstRow (struct Prj_Projects *Projects,
|
static void Prj_ShowProjectFirstRow (struct Prj_Projects *Projects,
|
||||||
const char *ClassData,
|
const char *ClassData,
|
||||||
const struct Prj_Faults *Faults,
|
const struct Prj_Faults *Faults,
|
||||||
unsigned NumIndex,unsigned UniqueId,
|
unsigned UniqueId,
|
||||||
const char *Anchor);
|
const char *Anchor);
|
||||||
static void Prj_ShowProjectDepartment (const struct Prj_Projects *Projects,
|
static void Prj_ShowProjectDepartment (const struct Prj_Projects *Projects,
|
||||||
const char *ClassData);
|
const char *ClassData);
|
||||||
|
@ -490,7 +489,6 @@ static void Prj_ShowPrjsInCurrentPage (void *Projects)
|
||||||
extern const char *Txt_No_projects;
|
extern const char *Txt_No_projects;
|
||||||
struct Pagination Pagination;
|
struct Pagination Pagination;
|
||||||
unsigned NumPrj;
|
unsigned NumPrj;
|
||||||
unsigned NumIndex;
|
|
||||||
|
|
||||||
if (Projects)
|
if (Projects)
|
||||||
{
|
{
|
||||||
|
@ -563,17 +561,17 @@ static void Prj_ShowPrjsInCurrentPage (void *Projects)
|
||||||
case Prj_ORDER_START_TIME:
|
case Prj_ORDER_START_TIME:
|
||||||
case Prj_ORDER_END_TIME:
|
case Prj_ORDER_END_TIME:
|
||||||
// NumPrj: 1, 2, 3 ==> NumIndex = 3, 2, 1
|
// NumPrj: 1, 2, 3 ==> NumIndex = 3, 2, 1
|
||||||
NumIndex = ((struct Prj_Projects *) Projects)->Num + 1 - NumPrj;
|
((struct Prj_Projects *) Projects)->NumIndex = ((struct Prj_Projects *) Projects)->Num + 1 - NumPrj;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// NumPrj: 1, 2, 3 ==> NumIndex = 1, 2, 3
|
// NumPrj: 1, 2, 3 ==> NumIndex = 1, 2, 3
|
||||||
NumIndex = NumPrj;
|
((struct Prj_Projects *) Projects)->NumIndex = NumPrj;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Show project */
|
/* Show project */
|
||||||
((struct Prj_Projects *) Projects)->View = Prj_LIST_PROJECTS;
|
((struct Prj_Projects *) Projects)->View = Prj_LIST_PROJECTS;
|
||||||
Prj_ShowProjectRow ((struct Prj_Projects *) Projects,NumIndex);
|
Prj_ShowProjectRow ((struct Prj_Projects *) Projects);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** End table *****/
|
/***** End table *****/
|
||||||
|
@ -1298,8 +1296,9 @@ void Prj_ShowOneProjectWithFileBrowser (struct Prj_Projects *Projects)
|
||||||
|
|
||||||
/***** Table head and project *****/
|
/***** Table head and project *****/
|
||||||
Projects->View = Prj_FILE_BROWSER_PROJECT;
|
Projects->View = Prj_FILE_BROWSER_PROJECT;
|
||||||
|
Projects->NumIndex = 0;
|
||||||
Prj_ShowProjectsHead (Projects);
|
Prj_ShowProjectsHead (Projects);
|
||||||
Prj_ShowProjectRow (Projects,0);
|
Prj_ShowProjectRow (Projects);
|
||||||
|
|
||||||
/***** End table *****/
|
/***** End table *****/
|
||||||
HTM_TABLE_End ();
|
HTM_TABLE_End ();
|
||||||
|
@ -1326,7 +1325,7 @@ static void Prj_PutIconsOnePrj (void *Projects)
|
||||||
if (Projects)
|
if (Projects)
|
||||||
{
|
{
|
||||||
/***** Set anchor string *****/
|
/***** Set anchor string *****/
|
||||||
Frm_SetAnchorStr (((struct Prj_Projects *) Projects)->Prj.PrjCod,&Anchor);
|
Frm_SetAnchorStr ((long) ((struct Prj_Projects *) Projects)->NumIndex,&Anchor);
|
||||||
|
|
||||||
/***** Icons to remove/edit this project *****/
|
/***** Icons to remove/edit this project *****/
|
||||||
Prj_PutIconsToRemEditOnePrj (Projects,Anchor);
|
Prj_PutIconsToRemEditOnePrj (Projects,Anchor);
|
||||||
|
@ -1365,8 +1364,9 @@ void Prj_PrintOneProject (void)
|
||||||
|
|
||||||
/***** Table head and project *****/
|
/***** Table head and project *****/
|
||||||
Projects.View = Prj_PRINT_ONE_PROJECT;
|
Projects.View = Prj_PRINT_ONE_PROJECT;
|
||||||
|
Projects.NumIndex = 0;
|
||||||
Prj_ShowProjectsHead (&Projects);
|
Prj_ShowProjectsHead (&Projects);
|
||||||
Prj_ShowProjectRow (&Projects,0);
|
Prj_ShowProjectRow (&Projects);
|
||||||
|
|
||||||
/***** End table *****/
|
/***** End table *****/
|
||||||
HTM_TABLE_End ();
|
HTM_TABLE_End ();
|
||||||
|
@ -1379,8 +1379,7 @@ void Prj_PrintOneProject (void)
|
||||||
/*********** When listing projects, show one row with one project ************/
|
/*********** When listing projects, show one row with one project ************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Prj_ShowProjectRow (struct Prj_Projects *Projects,
|
static void Prj_ShowProjectRow (struct Prj_Projects *Projects)
|
||||||
unsigned NumIndex)
|
|
||||||
{
|
{
|
||||||
extern const char *Txt_Description;
|
extern const char *Txt_Description;
|
||||||
extern const char *Txt_Required_knowledge;
|
extern const char *Txt_Required_knowledge;
|
||||||
|
@ -1394,14 +1393,14 @@ static void Prj_ShowProjectRow (struct Prj_Projects *Projects,
|
||||||
"DAT";
|
"DAT";
|
||||||
|
|
||||||
/***** Set anchor string *****/
|
/***** Set anchor string *****/
|
||||||
Frm_SetAnchorStr (Projects->Prj.PrjCod,&Anchor);
|
Frm_SetAnchorStr ((long) Projects->NumIndex,&Anchor);
|
||||||
|
|
||||||
/***** Check project faults *****/
|
/***** Check project faults *****/
|
||||||
Prj_CheckIfPrjIsFaulty (Projects->Prj.PrjCod,&Faults);
|
Prj_CheckIfPrjIsFaulty (Projects->Prj.PrjCod,&Faults);
|
||||||
|
|
||||||
/***** First row with main data (dates, title...) *****/
|
/***** First row with main data (dates, title...) *****/
|
||||||
UniqueId++;
|
UniqueId++;
|
||||||
Prj_ShowProjectFirstRow (Projects,ClassData,&Faults,NumIndex,UniqueId,Anchor);
|
Prj_ShowProjectFirstRow (Projects,ClassData,&Faults,UniqueId,Anchor);
|
||||||
|
|
||||||
/***** Review status *****/
|
/***** Review status *****/
|
||||||
Prj_ShowProjectReviewStatus (Projects,ClassLabel,ClassData,&Faults,Anchor);
|
Prj_ShowProjectReviewStatus (Projects,ClassLabel,ClassData,&Faults,Anchor);
|
||||||
|
@ -1454,7 +1453,7 @@ static void Prj_ShowProjectRow (struct Prj_Projects *Projects,
|
||||||
static void Prj_ShowProjectFirstRow (struct Prj_Projects *Projects,
|
static void Prj_ShowProjectFirstRow (struct Prj_Projects *Projects,
|
||||||
const char *ClassData,
|
const char *ClassData,
|
||||||
const struct Prj_Faults *Faults,
|
const struct Prj_Faults *Faults,
|
||||||
unsigned NumIndex,unsigned UniqueId,
|
unsigned UniqueId,
|
||||||
const char *Anchor)
|
const char *Anchor)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Actions[Act_NUM_ACTIONS];
|
extern const char *Txt_Actions[Act_NUM_ACTIONS];
|
||||||
|
@ -1473,7 +1472,7 @@ static void Prj_ShowProjectFirstRow (struct Prj_Projects *Projects,
|
||||||
HTM_TD_Begin ("rowspan=\"4\" class=\"RT BIG_INDEX_%s %s\"",
|
HTM_TD_Begin ("rowspan=\"4\" class=\"RT BIG_INDEX_%s %s\"",
|
||||||
The_GetSuffix (),
|
The_GetSuffix (),
|
||||||
The_GetColorRows ());
|
The_GetColorRows ());
|
||||||
HTM_Unsigned (NumIndex);
|
HTM_Unsigned (Projects->NumIndex);
|
||||||
if (Faults->PrjIsFaulty)
|
if (Faults->PrjIsFaulty)
|
||||||
{
|
{
|
||||||
HTM_BR ();
|
HTM_BR ();
|
||||||
|
|
|
@ -195,6 +195,7 @@ struct Prj_Projects
|
||||||
long *LstPrjCods; // List of project codes
|
long *LstPrjCods; // List of project codes
|
||||||
Prj_Order_t SelectedOrder;
|
Prj_Order_t SelectedOrder;
|
||||||
unsigned CurrentPage;
|
unsigned CurrentPage;
|
||||||
|
unsigned NumIndex; // Index shown in first column of projects list
|
||||||
struct Prj_Project Prj; // Selected/current project
|
struct Prj_Project Prj; // Selected/current project
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue