diff --git a/css/swad16.146.css b/css/swad16.147.css
similarity index 98%
rename from css/swad16.146.css
rename to css/swad16.147.css
index b66d8afd8..3873e290a 100644
--- a/css/swad16.146.css
+++ b/css/swad16.147.css
@@ -1900,10 +1900,24 @@ a:hover img.CENTRE_PHOTO_SHOW
vertical-align:middle;
}
-/*****************************************************************************/
-
-.FILENAME {color:#404040; font-size:18pt; font-weight:bold;}
-
+/******************************* File browsers *******************************/
+.FILENAME
+ {
+ display:inline-block;
+ box-sizing:border-box;
+ width:260px; /* width of LST_EDIT + 10 */
+ text-align:left;
+ vertical-align:middle;
+ white-space:nowrap;
+ overflow:hidden;
+ text-overflow:ellipsis;
+ }
+.FILENAME_TXT
+ {
+ color:#404040;
+ font-size:18pt;
+ font-weight:bold;
+ }
.BROWSER_TITLE {color:#94745C; font-size:13pt; font-weight:bold;}
.BROWSER_TITLE_LIGHT {color:#D5C6BB; font-size:13pt; font-weight:bold;}
.BROWSER_SUBTITLE {color:#94745C; font-size:12pt;}
@@ -1912,19 +1926,20 @@ a:hover img.CENTRE_PHOTO_SHOW
box-sizing:border-box;
width:100%;
}
-
-.T1 {color:#404040; font-size:15pt;}
-.T2 {color:#404040; font-size:13pt;}
-.T3 {color:#404040; font-size:12pt;}
-
.LST {color:#404040; font-size:11pt; white-space:nowrap;}
.LST_HID {color:#A0A0A0; font-size:11pt; white-space:nowrap;}
.LST_REC {color:#008000; font-size:11pt; white-space:nowrap;}
.LST_REC_HID {color:#89BE87; font-size:11pt; white-space:nowrap;}
-.LST_EDIT {color:#404040; font-weight:bold; font-size:11pt; height:20px; padding-top:0; padding-bottom:0; margin-top:-1px; margin-bottom:-1px; border-width:1px; border-style:solid; border-color:#ECE9D8;}
-.LST_EDIT_HID {color:#A0A0A0; font-weight:bold; font-size:11pt; height:20px; padding-top:0; padding-bottom:0; margin-top:-1px; margin-bottom:-1px; border-width:1px; border-style:solid; border-color:#ECE9D8;}
-.LST_EDIT_REC {color:#008000; font-weight:bold; font-size:11pt; height:20px; padding-top:0; padding-bottom:0; margin-top:-1px; margin-bottom:-1px; border-width:1px; border-style:solid; border-color:#ECE9D8;}
-.LST_EDIT_REC_HID {color:#89BE87; font-weight:bold; font-size:11pt; height:20px; padding-top:0; padding-bottom:0; margin-top:-1px; margin-bottom:-1px; border-width:1px; border-style:solid; border-color:#ECE9D8;}
+.LST_EDIT {width:250px; color:#404040; font-weight:bold; font-size:11pt; height:20px; padding:0; margin:-1px; border-width:1px; border-style:solid; border-color:#ECE9D8;}
+.LST_EDIT_HID {width:250px; color:#A0A0A0; font-weight:bold; font-size:11pt; height:20px; padding:0; margin:-1px; border-width:1px; border-style:solid; border-color:#ECE9D8;}
+.LST_EDIT_REC {width:250px; color:#008000; font-weight:bold; font-size:11pt; height:20px; padding:0; margin:-1px; border-width:1px; border-style:solid; border-color:#ECE9D8;}
+.LST_EDIT_REC_HID {width:250px; color:#89BE87; font-weight:bold; font-size:11pt; height:20px; padding:0; margin:-1px; border-width:1px; border-style:solid; border-color:#ECE9D8;}
+
+/*****************************************************************************/
+
+.T1 {color:#404040; font-size:15pt;}
+.T2 {color:#404040; font-size:13pt;}
+.T3 {color:#404040; font-size:12pt;}
.DAT {color:#606060; font-size:13pt;}
.DAT_NOBR {color:#606060; font-size:13pt; white-space:nowrap;}
@@ -2359,6 +2374,7 @@ a:hover img.CENTRE_PHOTO_SHOW
}
.OWNER_WORKS_DATA
{
+ display:inline-block;
box-sizing:border-box;
width:100px;
text-align:left;
diff --git a/swad_changelog.h b/swad_changelog.h
index 5ed17016c..a70c30d5d 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -197,19 +197,20 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
-#define Log_PLATFORM_VERSION "SWAD 16.146.9 (2017-03-04)"
-#define CSS_FILE "swad16.146.css"
+#define Log_PLATFORM_VERSION "SWAD 16.147 (2017-03-04)"
+#define CSS_FILE "swad16.147.css"
#define JS_FILE "swad16.144.js"
// 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
/*
- Version 16.146.9: Mar 03, 2017 Changes in layout of assignments and works. (216271 lines)
- Version 16.146.8: Mar 03, 2017 Changes in layout of connected users. (216284 lines)
- Version 16.146.7: Mar 03, 2017 Changes in layout of my courses. (216339 lines)
- Version 16.146.6: Mar 03, 2017 Changes in layout of countries. (216331 lines)
- Version 16.146.5: Mar 03, 2017 Code refactoring related with author of assignments, attendance events and surveys. (216319 lines)
- Version 16.146.4: Mar 03, 2017 Changes in layout of surveys. (216349 lines)
+ Version 16.147: Mar 04, 2017 Changes in layout of file browser. (216292 lines)
+ Version 16.146.9: Mar 04, 2017 Changes in layout of assignments and works. (216271 lines)
+ Version 16.146.8: Mar 04, 2017 Changes in layout of connected users. (216284 lines)
+ Version 16.146.7: Mar 04, 2017 Changes in layout of my courses. (216339 lines)
+ Version 16.146.6: Mar 04, 2017 Changes in layout of countries. (216331 lines)
+ Version 16.146.5: Mar 04, 2017 Code refactoring related with author of assignments, attendance events and surveys. (216319 lines)
+ Version 16.146.4: Mar 04, 2017 Changes in layout of surveys. (216349 lines)
Version 16.146.3: Mar 04, 2017 Changes in layout of edition of institutions, centres and degrees. (216363 lines)
Version 16.146.2: Mar 04, 2017 Changes in layout of authors. (216354 lines)
Version 16.146.1: Mar 03, 2017 Changes in layout of assigments. (216350 lines)
diff --git a/swad_file_browser.c b/swad_file_browser.c
index c4711e198..a69473ef2 100644
--- a/swad_file_browser.c
+++ b/swad_file_browser.c
@@ -1520,12 +1520,14 @@ static void Brw_PutIconFileWithLinkToViewMetadata (unsigned Size,
static void Brw_PutIconFile (unsigned Size,Brw_FileType_t FileType,const char *FileName);
static void Brw_WriteFileName (unsigned Level,bool IsPublic,
const char *PathInTree,const char *FileName,const char *FileNameToShow);
-static void Brw_GetFileNameToShow (Brw_FileBrowser_t FileBrowser,unsigned Level,
- Brw_FileType_t FileType,
- const char *FileName,char *FileNameToShow);
-static void Brw_LimitLengthFileNameToShow (Brw_FileType_t FileType,
- const char FileName[NAME_MAX + 1],
- char FileNameToShow[NAME_MAX + 1]);
+static void Brw_GetFileNameToShowDependingOnLevel (Brw_FileBrowser_t FileBrowser,
+ unsigned Level,
+ Brw_FileType_t FileType,
+ const char *FileName,
+ char *FileNameToShow);
+static void Brw_GetFileNameToShow (Brw_FileType_t FileType,
+ const char FileName[NAME_MAX + 1],
+ char FileNameToShow[NAME_MAX + 1]);
static void Brw_WriteDatesAssignment (void);
static void Brw_WriteFileSizeAndDate (struct FileMetadata *FileMetadata);
static void Brw_WriteFileOrFolderPublisher (unsigned Level,unsigned long UsrCod);
@@ -3393,7 +3395,10 @@ static void Brw_ShowDataOwnerAsgWrk (struct UsrData *UsrDat)
fprintf (Gbl.F.Out,"");
/***** Start form to send a message to this user *****/
- fprintf (Gbl.F.Out,"
");
+ fprintf (Gbl.F.Out," ");
+
+ fprintf (Gbl.F.Out,"RoleInCurrentCrsDB == Rol_STUDENT ? ActSeeRecOneStd :
ActSeeRecOneTch);
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
@@ -3418,6 +3423,10 @@ static void Brw_ShowDataOwnerAsgWrk (struct UsrData *UsrDat)
" class=\"AUTHOR_TXT\">%s",
UsrDat->Email,UsrDat->Email);
Act_FormEnd ();
+
+ fprintf (Gbl.F.Out,"
");
+
+
fprintf (Gbl.F.Out," ");
}
@@ -5208,7 +5217,7 @@ static bool Brw_WriteRowFileBrowser (unsigned Level,Brw_ExpandTree_t ExpandTree,
Gbl.FileBrowser.Asg.AsgCod = -1L;
/***** Get the name of the file to show *****/
- Brw_GetFileNameToShow (Gbl.FileBrowser.Type,Level,
+ Brw_GetFileNameToShowDependingOnLevel (Gbl.FileBrowser.Type,Level,
Gbl.FileBrowser.FileType,
FileName,FileNameToShow);
@@ -5880,6 +5889,8 @@ static void Brw_WriteFileName (unsigned Level,bool IsPublic,
fprintf (Gbl.F.Out," LIGHT_GREEN");
fprintf (Gbl.F.Out,"\" style=\"width:99%%;\">");
+ fprintf (Gbl.F.Out,"");
+
/***** Form to rename folder *****/
if (Gbl.FileBrowser.ICanEditFileOrFolder) // Can I rename this folder?
{
@@ -5894,7 +5905,7 @@ static void Brw_WriteFileName (unsigned Level,bool IsPublic,
if (Gbl.FileBrowser.ICanEditFileOrFolder) // Can I rename this folder?
{
fprintf (Gbl.F.Out," ",
FileName,Gbl.FileBrowser.InputStyle,
@@ -5918,6 +5929,8 @@ static void Brw_WriteFileName (unsigned Level,bool IsPublic,
}
/***** End of cell *****/
+ fprintf (Gbl.F.Out,"
");
+
fprintf (Gbl.F.Out,"");
}
else // File or link
@@ -5928,6 +5941,8 @@ static void Brw_WriteFileName (unsigned Level,bool IsPublic,
fprintf (Gbl.F.Out," LIGHT_GREEN");
fprintf (Gbl.F.Out,"\" style=\"width:99%%;\"> ");
+ fprintf (Gbl.F.Out,"");
+
Act_FormStart (Brw_ActDowFile[Gbl.FileBrowser.Type]);
Brw_PutParamsFileBrowser (Brw_ActDowFile[Gbl.FileBrowser.Type],
PathInTree,FileName,
@@ -5952,6 +5967,8 @@ static void Brw_WriteFileName (unsigned Level,bool IsPublic,
Txt_Public_open_educational_resource_OER_for_everyone,
Txt_Public_open_educational_resource_OER_for_everyone);
+ fprintf (Gbl.F.Out,"
");
+
fprintf (Gbl.F.Out,"");
}
}
@@ -5960,40 +5977,31 @@ static void Brw_WriteFileName (unsigned Level,bool IsPublic,
/*********************** Which filename must be shown? ***********************/
/*****************************************************************************/
-static void Brw_GetFileNameToShow (Brw_FileBrowser_t FileBrowser,unsigned Level,
- Brw_FileType_t FileType,
- const char *FileName,char *FileNameToShow)
+static void Brw_GetFileNameToShowDependingOnLevel (Brw_FileBrowser_t FileBrowser,
+ unsigned Level,
+ Brw_FileType_t FileType,
+ const char *FileName,
+ char *FileNameToShow)
{
extern const char *Txt_ROOT_FOLDER_EXTERNAL_NAMES[Brw_NUM_TYPES_FILE_BROWSER];
- Brw_LimitLengthFileNameToShow (FileType,
- Level ? FileName :
- Txt_ROOT_FOLDER_EXTERNAL_NAMES[FileBrowser],
- FileNameToShow);
+ Brw_GetFileNameToShow (FileType,
+ Level ? FileName :
+ Txt_ROOT_FOLDER_EXTERNAL_NAMES[FileBrowser],
+ FileNameToShow);
}
-/*****************************************************************************/
-/*************** Limit the length of the filename to be shown ****************/
-/*****************************************************************************/
-
-static void Brw_LimitLengthFileNameToShow (Brw_FileType_t FileType,
- const char FileName[NAME_MAX + 1],
- char FileNameToShow[NAME_MAX + 1])
+static void Brw_GetFileNameToShow (Brw_FileType_t FileType,
+ const char FileName[NAME_MAX + 1],
+ char FileNameToShow[NAME_MAX + 1])
{
- size_t NumChars;
-
/***** Copy file name *****/
Str_Copy (FileNameToShow,FileName,
NAME_MAX);
/***** Remove .url if link *****/
- NumChars = strlen (FileNameToShow);
if (FileType == Brw_IS_LINK) // It's a link (URL inside a .url file)
- NumChars -= 4; // Remove .url
- FileNameToShow[NumChars] = '\0';
-
- /***** Limit length of the file name to show *****/
- Str_LimitLengthHTMLStr (FileNameToShow,60);
+ FileNameToShow[strlen (FileNameToShow) - 4] = '\0'; // Remove .url
}
/*****************************************************************************/
@@ -6183,7 +6191,7 @@ void Brw_AskRemFileFromTree (void)
Gbl.FileBrowser.FileType,-1L);
/* Show question */
- Brw_GetFileNameToShow (Gbl.FileBrowser.FileType,Gbl.FileBrowser.Level,
+ Brw_GetFileNameToShowDependingOnLevel (Gbl.FileBrowser.FileType,Gbl.FileBrowser.Level,
Gbl.FileBrowser.FileType,
Gbl.FileBrowser.FilFolLnkName,FileNameToShow);
sprintf (Gbl.Message,Txt_Do_you_really_want_to_remove_FILE_OR_LINK_X,
@@ -6227,9 +6235,9 @@ void Brw_RemFileFromTree (void)
else if (S_ISREG (FileStatus.st_mode)) // It's a file or a link
{
/* Name of the file/link to be shown */
- Brw_LimitLengthFileNameToShow (Str_FileIs (Gbl.FileBrowser.FilFolLnkName,"url") ? Brw_IS_LINK :
- Brw_IS_FILE,
- Gbl.FileBrowser.FilFolLnkName,FileNameToShow);
+ Brw_GetFileNameToShow (Str_FileIs (Gbl.FileBrowser.FilFolLnkName,"url") ? Brw_IS_LINK :
+ Brw_IS_FILE,
+ Gbl.FileBrowser.FilFolLnkName,FileNameToShow);
/* Remove file/link from disk and database */
Brw_RemoveFileFromDiskAndDB (Path,
@@ -6630,7 +6638,7 @@ static void Brw_WriteCurrentClipboard (void)
if (Gbl.FileBrowser.Clipboard.Level) // Is the root folder?
{
// Not the root folder
- Brw_GetFileNameToShow (Gbl.FileBrowser.Clipboard.FileBrowser,
+ Brw_GetFileNameToShowDependingOnLevel (Gbl.FileBrowser.Clipboard.FileBrowser,
Gbl.FileBrowser.Clipboard.Level,
Gbl.FileBrowser.Clipboard.FileType,
Gbl.FileBrowser.Clipboard.FileName,FileNameToShow);
@@ -7661,7 +7669,7 @@ static bool Brw_PasteTreeIntoFolder (unsigned LevelOrg,
Brw_IS_FILE; // It's a file
/***** Name of the file/folder/link to be shown ****/
- Brw_LimitLengthFileNameToShow (FileType,FileNameOrg,FileNameToShow);
+ Brw_GetFileNameToShow (FileType,FileNameOrg,FileNameToShow);
/***** Construct the name of the destination file or folder *****/
if (LevelOrg == 0) // Origin of copy is the root folder,
@@ -7856,7 +7864,7 @@ void Brw_ShowFormFileBrowser (void)
if (Brw_CheckIfICanCreateIntoFolder (Gbl.FileBrowser.Level))
{
/***** Name of the folder to be shown ****/
- Brw_GetFileNameToShow (Gbl.FileBrowser.Type,Gbl.FileBrowser.Level,
+ Brw_GetFileNameToShowDependingOnLevel (Gbl.FileBrowser.Type,Gbl.FileBrowser.Level,
Gbl.FileBrowser.FileType,
Gbl.FileBrowser.FilFolLnkName,FileNameToShow);
@@ -7920,7 +7928,7 @@ static void Brw_PutFormToCreateAFolder (const char *FileNameToShow)
fprintf (Gbl.F.Out,""
"%s: "
" "
" ",
The_ClassForm[Gbl.Prefs.Theme],Txt_Folder);
@@ -8103,7 +8111,7 @@ static void Brw_PutFormToCreateALink (const char *FileNameToShow)
""
" "
" "
"",
@@ -8120,7 +8128,7 @@ static void Brw_PutFormToCreateALink (const char *FileNameToShow)
""
" "
+ " size=\"30\" maxlength=\"100\" value=\"\" />"
" "
""
"",
@@ -8192,7 +8200,7 @@ void Brw_RecFolderFileBrowser (void)
PathCompleteInTreeIncludingFolder,false,Brw_LICENSE_DEFAULT);
/* The folder has been created sucessfully */
- Brw_GetFileNameToShow (Gbl.FileBrowser.Type,Gbl.FileBrowser.Level,
+ Brw_GetFileNameToShowDependingOnLevel (Gbl.FileBrowser.Type,Gbl.FileBrowser.Level,
Brw_IS_FOLDER,
Gbl.FileBrowser.FilFolLnkName,FileNameToShow);
sprintf (Gbl.Message,Txt_The_folder_X_has_been_created_inside_the_folder_Y,
@@ -8495,7 +8503,7 @@ static bool Brw_RcvFileInFileBrw (Brw_UploadType_t UploadType)
/* Show message of confirmation */
if (UploadType == Brw_CLASSIC_UPLOAD)
{
- Brw_GetFileNameToShow (Gbl.FileBrowser.Type,Gbl.FileBrowser.Level,
+ Brw_GetFileNameToShowDependingOnLevel (Gbl.FileBrowser.Type,Gbl.FileBrowser.Level,
Brw_IS_FOLDER,
Gbl.FileBrowser.FilFolLnkName,FileNameToShow);
sprintf (Gbl.Message,Txt_The_file_X_has_been_placed_inside_the_folder_Y,
@@ -8680,7 +8688,7 @@ void Brw_RecLinkFileBrowser (void)
PathCompleteInTreeIncludingFile,false,Brw_LICENSE_DEFAULT);
/* Show message of confirmation */
- Brw_GetFileNameToShow (Gbl.FileBrowser.Type,Gbl.FileBrowser.Level,
+ Brw_GetFileNameToShowDependingOnLevel (Gbl.FileBrowser.Type,Gbl.FileBrowser.Level,
Brw_IS_FOLDER,
Gbl.FileBrowser.FilFolLnkName,FileNameToShow);
sprintf (Gbl.Message,Txt_The_link_X_has_been_placed_inside_the_folder_Y,
@@ -8835,7 +8843,7 @@ void Brw_SetDocumentAsVisible (void)
Brw_RemoveAffectedClipboards (Gbl.FileBrowser.Type,Gbl.Usrs.Me.UsrDat.UsrCod,Gbl.Usrs.Other.UsrDat.UsrCod);
/***** Write message of confirmation *****/
- Brw_GetFileNameToShow (Gbl.FileBrowser.Type,Gbl.FileBrowser.Level,
+ Brw_GetFileNameToShowDependingOnLevel (Gbl.FileBrowser.Type,Gbl.FileBrowser.Level,
Gbl.FileBrowser.FileType,
Gbl.FileBrowser.FilFolLnkName,FileNameToShow);
sprintf (Gbl.Message,Txt_FILE_FOLDER_OR_LINK_X_is_now_visible,
@@ -8868,7 +8876,7 @@ void Brw_SetDocumentAsHidden (void)
Brw_RemoveAffectedClipboards (Gbl.FileBrowser.Type,Gbl.Usrs.Me.UsrDat.UsrCod,Gbl.Usrs.Other.UsrDat.UsrCod);
/***** Write confirmation message *****/
- Brw_GetFileNameToShow (Gbl.FileBrowser.Type,Gbl.FileBrowser.Level,
+ Brw_GetFileNameToShowDependingOnLevel (Gbl.FileBrowser.Type,Gbl.FileBrowser.Level,
Gbl.FileBrowser.FileType,
Gbl.FileBrowser.FilFolLnkName,FileNameToShow);
sprintf (Gbl.Message,Txt_FILE_FOLDER_OR_LINK_X_is_now_hidden,FileNameToShow);
@@ -9061,9 +9069,9 @@ void Brw_ShowFileMetadata (void)
ICanEdit = Brw_CheckIfICanEditFileMetadata (IAmTheOwner);
/***** Name of the file/link to be shown *****/
- Brw_LimitLengthFileNameToShow (FileMetadata.FileType,
- FileMetadata.FilFolLnkName,
- FileNameToShow);
+ Brw_GetFileNameToShow (FileMetadata.FileType,
+ FileMetadata.FilFolLnkName,
+ FileNameToShow);
/***** Start form to update the metadata of a file *****/
if (ICanEdit) // I can edit file properties
@@ -9099,7 +9107,7 @@ void Brw_ShowFileMetadata (void)
/***** Link to download the file *****/
fprintf (Gbl.F.Out,""
"");
+ " class=\"FILENAME_TXT CENTER_MIDDLE\">");
Brw_WriteBigLinkToDownloadFile (URL,&FileMetadata,FileNameToShow);
fprintf (Gbl.F.Out," "
" ");
@@ -9607,7 +9615,7 @@ static void Brw_WriteBigLinkToDownloadFile (const char *URL,
/* Link begin */
sprintf (Gbl.Title,Txt_Check_marks_in_file_X,FileNameToShow);
- Act_LinkFormSubmit (Gbl.Title,"FILENAME",NULL);
+ Act_LinkFormSubmit (Gbl.Title,"FILENAME_TXT",NULL);
Brw_PutIconFile (32,FileMetadata->FileType,FileMetadata->FilFolLnkName);
/* Name of the file of marks, link end and form end */
@@ -9623,7 +9631,7 @@ static void Brw_WriteBigLinkToDownloadFile (const char *URL,
else
{
/* Put anchor and filename */
- fprintf (Gbl.F.Out,"",
URL,
(FileMetadata->FileType == Brw_IS_LINK) ? URL : // If it's a link, show full URL in title
@@ -11471,9 +11479,9 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row)
BgColor,Title);
/***** Get the name of the file to show *****/
- Brw_LimitLengthFileNameToShow (FileMetadata.FileType,
- FileMetadata.FilFolLnkName,
- FileNameToShow);
+ Brw_GetFileNameToShow (FileMetadata.FileType,
+ FileMetadata.FilFolLnkName,
+ FileNameToShow);
/***** Write file name using path (row[1]) *****/
fprintf (Gbl.F.Out," ",
diff --git a/swad_report.c b/swad_report.c
index 83980d533..6309e6d84 100644
--- a/swad_report.c
+++ b/swad_report.c
@@ -265,8 +265,8 @@ static void Rep_PutLinkToMyUsageReport (struct Rep_Report *Report)
Req_TitleReport (&Report->CurrentTimeUTC);
/***** Put anchor and report filename *****/
- fprintf (Gbl.F.Out,"