Version18.117.2

This commit is contained in:
Antonio Cañas Vargas 2019-04-21 23:27:04 +02:00
parent 1b3a2651c6
commit a1c1306375
5 changed files with 31 additions and 26 deletions

View File

@ -448,10 +448,11 @@ En OpenSWAD:
ps2pdf source.ps destination.pdf
*/
#define Log_PLATFORM_VERSION "SWAD 18.117.1 (2019-04-21)"
#define Log_PLATFORM_VERSION "SWAD 18.117.2 (2019-04-21)"
#define CSS_FILE "swad18.112.1.css"
#define JS_FILE "swad18.116.5.js"
/*
Version 18.117.2: Apr 21, 2019 Changed the behaviour of copying a file/folder in file browser. (242650 lines)
Version 18.117.1: Apr 21, 2019 Changed the behaviour of removing a file/folder in file browser. (242647 lines)
Version 18.117: Apr 21, 2019 Changed the behaviour of hiding/showing a file browser row. (242698 lines)
Version 18.116.10:Apr 20, 2019 Changed the behaviour of hiding/showing a survey. (242802 lines)

View File

@ -1264,7 +1264,7 @@ static bool Brw_CheckIfCanPasteIn (unsigned Level);
static void Brw_PutIconRemove (const char PathInTree[PATH_MAX + 1],
const char *FileName);
static void Brw_PutIconCopy (const char PathInTree[PATH_MAX + 1],
const char *FileName,const char *FileNameShow);
const char *FileName);
static void Brw_PutIconPaste (unsigned Level,const char PathInTree[PATH_MAX + 1],
const char *FileName,const char *FileNameToShow);
static void Brw_IndentAndWriteIconExpandContract (unsigned Level,
@ -5468,7 +5468,7 @@ static bool Brw_WriteRowFileBrowser (unsigned Level,const char *RowId,
/***** Initializations *****/
Gbl.FileBrowser.Clipboard.IsThisFile = false;
snprintf (FileBrowserId,sizeof (FileBrowserId),
"file_browser_%u",
"fil_brw_%u",
Gbl.FileBrowser.Id);
/***** Is this row hidden or visible? *****/
@ -5714,7 +5714,7 @@ static void Brw_PutIconsRemoveCopyPaste (unsigned Level,
Brw_PutIconRemove (PathInTree,FileName);
/***** Icon to copy *****/
Brw_PutIconCopy (PathInTree,FileName,FileNameToShow);
Brw_PutIconCopy (PathInTree,FileName);
/***** Icon to paste *****/
Brw_PutIconPaste (Level,PathInTree,FileName,FileNameToShow);
@ -5795,6 +5795,7 @@ static void Brw_PutIconRemove (const char PathInTree[PATH_MAX + 1],
}
else
Ico_PutIconRemovalNotAllowed ();
fprintf (Gbl.F.Out,"</td>");
}
@ -5803,22 +5804,15 @@ static void Brw_PutIconRemove (const char PathInTree[PATH_MAX + 1],
/*****************************************************************************/
static void Brw_PutIconCopy (const char PathInTree[PATH_MAX + 1],
const char *FileName,const char *FileNameToShow)
const char *FileName)
{
extern const char *Txt_Copy_FOLDER_FILE_OR_LINK_X;
fprintf (Gbl.F.Out,"<td class=\"BM%u\">",Gbl.RowEvenOdd);
/***** Form to copy into the clipboard *****/
Frm_StartForm (Brw_ActCopy[Gbl.FileBrowser.Type]);
Brw_PutParamsFileBrowser (Brw_ActCopy[Gbl.FileBrowser.Type],
PathInTree,FileName,
Gbl.FileBrowser.FileType,-1L);
snprintf (Gbl.Title,sizeof (Gbl.Title),
Txt_Copy_FOLDER_FILE_OR_LINK_X,
FileNameToShow);
Ico_PutIconLink ("copy.svg",Gbl.Title);
Frm_EndForm ();
Brw_PathInTree = PathInTree;
Brw_FileName = FileName;
Ico_PutContextualIconToCopy (Brw_ActCopy[Gbl.FileBrowser.Type],
Brw_PutImplicitParamsFileBrowser);
fprintf (Gbl.F.Out,"</td>");
}

View File

@ -288,6 +288,15 @@ void Ico_PutContextualIconToPrint (Act_Action_t NextAction,void (*FuncParams) (v
Txt_Print);
}
void Ico_PutContextualIconToCopy (Act_Action_t NextAction,void (*FuncParams) (void))
{
extern const char *Txt_Copy;
Lay_PutContextualLinkOnlyIcon (NextAction,NULL,FuncParams,
"copy.svg",
Txt_Copy);
}
/*****************************************************************************/
/**************** Show an icon inside a div (without text) *******************/
/*****************************************************************************/

View File

@ -65,6 +65,7 @@ void Ico_PutContextualIconToView (Act_Action_t NextAction,void (*FuncParams) (vo
void Ico_PutContextualIconToUnhide (Act_Action_t NextAction,const char *Anchor,void (*FuncParams) (void));
void Ico_PutContextualIconToHide (Act_Action_t NextAction,const char *Anchor,void (*FuncParams) (void));
void Ico_PutContextualIconToPrint (Act_Action_t NextAction,void (*FuncParams) (void));
void Ico_PutContextualIconToCopy (Act_Action_t NextAction,void (*FuncParams) (void));
void Ico_PutDivIcon (const char *DivClass,const char *Icon,const char *Title);
void Ico_PutDivIconLink (const char *DivClass,const char *Icon,const char *Title);

View File

@ -4669,25 +4669,25 @@ const char *Txt_Cookies =
"Cookies";
#endif
const char *Txt_Copy_FOLDER_FILE_OR_LINK_X = // Warning: it is very important to include %s in the following sentences
const char *Txt_Copy =
#if L==1 // ca
"Copiar %s";
"Copiar";
#elif L==2 // de
"Kopieren %s";
"Kopieren";
#elif L==3 // en
"Copy %s";
"Copy";
#elif L==4 // es
"Copiar %s";
"Copiar";
#elif L==5 // fr
"Copier %s";
"Copier";
#elif L==6 // gn
"Ekopia %s";
"Ekopia";
#elif L==7 // it
"Copiare %s";
"Copiare";
#elif L==8 // pl
"Kopia %s";
"Kopia";
#elif L==9 // pt
"Copiar %s";
"Copiar";
#endif
const char *Txt_Copy_not_allowed =