swad-core/swad_icon.c

549 lines
19 KiB
C
Raw Normal View History

2017-06-11 19:13:28 +02:00
// swad_icon.c: icons
2014-12-01 23:55:08 +01:00
/*
SWAD (Shared Workspace At a Distance),
is a web platform developed at the University of Granada (Spain),
and used to support university teaching.
This file is part of SWAD core.
2021-02-09 12:43:45 +01:00
Copyright (C) 1999-2021 Antonio Ca<EFBFBD>as Vargas
2014-12-01 23:55:08 +01:00
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*****************************************************************************/
/********************************* Headers ***********************************/
/*****************************************************************************/
#include <string.h>
2017-06-10 21:38:10 +02:00
#include "swad_box.h"
2014-12-01 23:55:08 +01:00
#include "swad_config.h"
#include "swad_database.h"
2020-04-14 17:15:17 +02:00
#include "swad_figure.h"
2018-11-09 20:47:39 +01:00
#include "swad_form.h"
2014-12-01 23:55:08 +01:00
#include "swad_global.h"
2019-10-23 20:07:56 +02:00
#include "swad_HTML.h"
2014-12-01 23:55:08 +01:00
#include "swad_icon.h"
#include "swad_layout.h"
#include "swad_parameter.h"
2019-03-26 11:53:21 +01:00
#include "swad_setting.h"
2014-12-01 23:55:08 +01:00
/*****************************************************************************/
/************** External global variables from others modules ****************/
/*****************************************************************************/
extern struct Globals Gbl;
/*****************************************************************************/
2019-11-21 16:47:07 +01:00
/******************************** Public constants ***************************/
2014-12-01 23:55:08 +01:00
/*****************************************************************************/
2015-11-21 20:23:28 +01:00
#define Ico_MAX_BYTES_ICON_SET_ID 16
2014-12-01 23:55:08 +01:00
const char *Ico_IconSetId[Ico_NUM_ICON_SETS] =
{
2019-11-21 16:47:07 +01:00
[Ico_ICON_SET_AWESOME] = "awesome",
[Ico_ICON_SET_NUVOLA ] = "nuvola",
2014-12-01 23:55:08 +01:00
};
const char *Ico_IconSetNames[Ico_NUM_ICON_SETS] =
{
2019-11-21 16:47:07 +01:00
[Ico_ICON_SET_AWESOME] = "Awesome",
[Ico_ICON_SET_NUVOLA ] = "Nuvola",
2014-12-01 23:55:08 +01:00
};
2016-11-07 12:59:44 +01:00
/*****************************************************************************/
/***************************** Private prototypes ****************************/
/*****************************************************************************/
2020-04-08 03:41:05 +02:00
static void Ico_PutIconsIconSet (__attribute__((unused)) void *Args);
2016-11-07 12:59:44 +01:00
2019-01-09 01:41:54 +01:00
/*****************************************************************************/
/*********** Get icon with extension from icon without extension *************/
/*****************************************************************************/
#define Ico_NUM_ICON_EXTENSIONS 3
const char *Ico_GetIcon (const char *IconWithoutExtension)
{
static const char *Ico_IconExtensions[Ico_NUM_ICON_EXTENSIONS] =
{ // In order of preference
"svg",
"png",
"gif",
};
static char IconWithExtension[NAME_MAX + 1];
char PathIcon[PATH_MAX + 1];
unsigned NumExt;
for (NumExt = 0;
NumExt < Ico_NUM_ICON_EXTENSIONS;
NumExt++)
{
snprintf (IconWithExtension,sizeof (IconWithExtension),"%s.%s",
2019-01-09 01:41:54 +01:00
IconWithoutExtension,Ico_IconExtensions[NumExt]);
snprintf (PathIcon,sizeof (PathIcon),"%s/%s/%s",
2019-03-20 01:36:36 +01:00
Cfg_PATH_ICON_SETS_PUBLIC,
Ico_IconSetId[Gbl.Prefs.IconSet],
2019-01-09 01:41:54 +01:00
IconWithExtension);
if (Fil_CheckIfPathExists (PathIcon))
return IconWithExtension;
}
return "default.svg";
}
2014-12-01 23:55:08 +01:00
/*****************************************************************************/
/************************ Put icons to select a IconSet **********************/
/*****************************************************************************/
void Ico_PutIconsToSelectIconSet (void)
{
2019-03-26 11:53:21 +01:00
extern const char *Hlp_PROFILE_Settings_icons;
2015-01-01 15:50:45 +01:00
extern const char *Txt_Icons;
2014-12-01 23:55:08 +01:00
Ico_IconSet_t IconSet;
2019-01-12 03:00:59 +01:00
char Icon[PATH_MAX + 1];
2014-12-01 23:55:08 +01:00
2020-03-26 02:54:30 +01:00
Box_BoxBegin (NULL,Txt_Icons,
2020-04-09 21:36:21 +02:00
Ico_PutIconsIconSet,NULL,
2019-03-26 11:53:21 +01:00
Hlp_PROFILE_Settings_icons,Box_NOT_CLOSABLE);
Set_BeginSettingsHead ();
Set_BeginOneSettingSelector ();
for (IconSet = (Ico_IconSet_t) 0;
IconSet <= (Ico_IconSet_t) (Ico_NUM_ICON_SETS - 1);
IconSet++)
{
HTM_DIV_Begin ("class=\"%s\"",
IconSet == Gbl.Prefs.IconSet ? "PREF_ON" :
"PREF_OFF");
Frm_BeginForm (ActChgIco);
Par_PutHiddenParamString (NULL,"IconSet",Ico_IconSetId[IconSet]);
snprintf (Icon,sizeof (Icon),"%s/%s/cog.svg",
Cfg_ICON_FOLDER_SETS,
Ico_IconSetId[IconSet]);
Ico_PutSettingIconLink (Icon,Ico_IconSetNames[IconSet]);
Frm_EndForm ();
HTM_DIV_End ();
}
Set_EndOneSettingSelector ();
Set_EndSettingsHead ();
2019-10-25 22:48:34 +02:00
Box_BoxEnd ();
2016-11-07 12:59:44 +01:00
}
/*****************************************************************************/
2019-03-26 11:53:21 +01:00
/***************** Put contextual icons in icon-set setting *******************/
2016-11-07 12:59:44 +01:00
/*****************************************************************************/
2020-04-08 03:41:05 +02:00
static void Ico_PutIconsIconSet (__attribute__((unused)) void *Args)
2016-11-07 12:59:44 +01:00
{
2020-04-08 03:41:05 +02:00
/***** Put icon to show a figure *****/
Fig_PutIconToShowFigure (Fig_ICON_SETS);
2014-12-01 23:55:08 +01:00
}
/*****************************************************************************/
/***************************** Change icon set *******************************/
/*****************************************************************************/
void Ico_ChangeIconSet (void)
{
/***** Get param with icon set *****/
Gbl.Prefs.IconSet = Ico_GetParamIconSet ();
snprintf (Gbl.Prefs.URLIconSet,sizeof (Gbl.Prefs.URLIconSet),"%s/%s",
2019-03-20 01:36:36 +01:00
Cfg_URL_ICON_SETS_PUBLIC,
2018-10-18 02:02:32 +02:00
Ico_IconSetId[Gbl.Prefs.IconSet]);
2014-12-01 23:55:08 +01:00
/***** Store icon set in database *****/
if (Gbl.Usrs.Me.Logged)
Set_DB_UpdateMySettingsAboutIconSet (Ico_IconSetId[Gbl.Prefs.IconSet]);
2014-12-01 23:55:08 +01:00
2019-03-26 11:53:21 +01:00
/***** Set settings from current IP *****/
Set_SetSettingsFromIP ();
2014-12-01 23:55:08 +01:00
}
/*****************************************************************************/
/*********************** Get parameter with icon set *************************/
/*****************************************************************************/
Ico_IconSet_t Ico_GetParamIconSet (void)
{
2017-01-28 15:58:46 +01:00
char IconSetId[Ico_MAX_BYTES_ICON_SET_ID + 1];
2014-12-01 23:55:08 +01:00
Ico_IconSet_t IconSet;
2015-11-21 20:23:28 +01:00
Par_GetParToText ("IconSet",IconSetId,Ico_MAX_BYTES_ICON_SET_ID);
2019-12-15 20:02:34 +01:00
for (IconSet = (Ico_IconSet_t) 0;
IconSet <= (Ico_IconSet_t) (Ico_NUM_ICON_SETS - 1);
2014-12-01 23:55:08 +01:00
IconSet++)
if (!strcmp (IconSetId,Ico_IconSetId[IconSet]))
return IconSet;
2015-11-21 20:23:28 +01:00
return Ico_ICON_SET_DEFAULT;
2014-12-01 23:55:08 +01:00
}
/*****************************************************************************/
/************************* Get icon set from string **************************/
/*****************************************************************************/
Ico_IconSet_t Ico_GetIconSetFromStr (const char *Str)
{
Ico_IconSet_t IconSet;
2019-12-15 20:02:34 +01:00
for (IconSet = (Ico_IconSet_t) 0;
IconSet <= (Ico_IconSet_t) (Ico_NUM_ICON_SETS - 1);
2014-12-01 23:55:08 +01:00
IconSet++)
if (!strcasecmp (Str,Ico_IconSetId[IconSet]))
return IconSet;
2015-11-21 20:23:28 +01:00
return Ico_ICON_SET_DEFAULT;
2014-12-01 23:55:08 +01:00
}
2017-06-11 19:13:28 +02:00
/*****************************************************************************/
2019-01-10 15:26:33 +01:00
/*** Show contextual icons to add, remove, edit, view, hide, unhide, print ***/
2017-06-11 19:13:28 +02:00
/*****************************************************************************/
2019-01-10 15:26:33 +01:00
void Ico_PutContextualIconToAdd (Act_Action_t NextAction,const char *Anchor,
2020-03-26 02:54:30 +01:00
void (*FuncParams) (void *Args),void *Args,
2019-01-10 15:26:33 +01:00
const char *Txt)
{
2020-03-26 02:54:30 +01:00
Lay_PutContextualLinkOnlyIcon (NextAction,Anchor,
FuncParams,Args,
2019-01-12 03:00:59 +01:00
"plus.svg",
Txt);
2019-01-10 15:26:33 +01:00
}
2020-10-13 22:34:31 +02:00
void Ico_PutContextualIconToRemove (Act_Action_t NextAction,const char *Anchor,
2020-03-26 02:54:30 +01:00
void (*FuncParams) (void *Args),void *Args)
2017-06-11 19:13:28 +02:00
{
extern const char *Txt_Remove;
2020-10-13 22:34:31 +02:00
Lay_PutContextualLinkOnlyIcon (NextAction,Anchor,
2020-03-26 02:54:30 +01:00
FuncParams,Args,
2019-01-12 03:00:59 +01:00
"trash.svg",
Txt_Remove);
2017-06-11 19:13:28 +02:00
}
2020-03-03 12:00:36 +01:00
void Ico_PutContextualIconToEdit (Act_Action_t NextAction,const char *Anchor,
2020-03-26 02:54:30 +01:00
void (*FuncParams) (void *Args),void *Args)
2017-06-11 19:13:28 +02:00
{
extern const char *Txt_Edit;
2020-03-26 02:54:30 +01:00
Lay_PutContextualLinkOnlyIcon (NextAction,Anchor,
FuncParams,Args,
2019-01-12 03:00:59 +01:00
"pen.svg",
Txt_Edit);
2017-06-11 19:13:28 +02:00
}
2020-03-26 02:54:30 +01:00
void Ico_PutContextualIconToViewFiles (Act_Action_t NextAction,
void (*FuncParams) (void *Args),void *Args)
2017-10-06 01:20:05 +02:00
{
2017-10-08 17:35:02 +02:00
extern const char *Txt_Files;
2017-10-06 01:20:05 +02:00
2020-03-26 02:54:30 +01:00
Lay_PutContextualLinkOnlyIcon (NextAction,NULL,
FuncParams,Args,
2019-01-12 03:00:59 +01:00
"folder-open.svg",
Txt_Files);
2017-10-06 01:20:05 +02:00
}
2020-03-26 02:54:30 +01:00
void Ico_PutContextualIconToView (Act_Action_t NextAction,
void (*FuncParams) (void *Args),void *Args)
2017-06-11 19:13:28 +02:00
{
extern const char *Txt_View;
2020-03-26 02:54:30 +01:00
Lay_PutContextualLinkOnlyIcon (NextAction,NULL,
FuncParams,Args,
2020-09-30 20:23:52 +02:00
"list.svg",
2019-01-12 03:00:59 +01:00
Txt_View);
2017-06-11 19:13:28 +02:00
}
2020-03-26 02:54:30 +01:00
void Ico_PutContextualIconToConfigure (Act_Action_t NextAction,
void (*FuncParams) (void *Args),void *Args)
2019-10-25 01:36:42 +02:00
{
extern const char *Txt_Configure;
2020-03-26 02:54:30 +01:00
Lay_PutContextualLinkOnlyIcon (NextAction,NULL,
FuncParams,Args,
2019-10-25 01:36:42 +02:00
"cog.svg",
Txt_Configure);
}
2020-03-26 02:54:30 +01:00
void Ico_PutContextualIconToHide (Act_Action_t NextAction,const char *Anchor,
void (*FuncParams) (void *Args),void *Args)
2017-06-11 19:13:28 +02:00
{
extern const char *Txt_Hide;
2020-03-26 02:54:30 +01:00
Lay_PutContextualLinkOnlyIcon (NextAction,Anchor,
FuncParams,Args,
2020-02-19 00:45:26 +01:00
"eye-green.svg",
2019-01-12 03:00:59 +01:00
Txt_Hide);
2017-06-11 19:13:28 +02:00
}
2020-03-26 02:54:30 +01:00
void Ico_PutContextualIconToUnhide (Act_Action_t NextAction,const char *Anchor,
void (*FuncParams) (void *Args),void *Args)
2017-06-11 19:13:28 +02:00
{
extern const char *Txt_Show;
2020-03-26 02:54:30 +01:00
Lay_PutContextualLinkOnlyIcon (NextAction,Anchor,
FuncParams,Args,
2020-02-19 00:45:26 +01:00
"eye-slash-red.svg",
2019-01-12 03:00:59 +01:00
Txt_Show);
2017-06-11 19:13:28 +02:00
}
2020-03-26 02:54:30 +01:00
void Ico_PutContextualIconToPrint (Act_Action_t NextAction,
void (*FuncParams) (void *Args),void *Args)
2017-06-11 19:13:28 +02:00
{
extern const char *Txt_Print;
2020-03-26 02:54:30 +01:00
Lay_PutContextualLinkOnlyIcon (NextAction,NULL,
FuncParams,Args,
2019-01-12 03:00:59 +01:00
"print.svg",
Txt_Print);
}
2020-03-26 02:54:30 +01:00
void Ico_PutContextualIconToCopy (Act_Action_t NextAction,
void (*FuncParams) (void *Args),void *Args)
2019-04-21 23:27:04 +02:00
{
extern const char *Txt_Copy;
2020-03-26 02:54:30 +01:00
Lay_PutContextualLinkOnlyIcon (NextAction,NULL,
FuncParams,Args,
2019-04-21 23:27:04 +02:00
"copy.svg",
Txt_Copy);
}
2020-03-26 02:54:30 +01:00
void Ico_PutContextualIconToPaste (Act_Action_t NextAction,
void (*FuncParams) (void *Args),void *Args)
2019-04-21 23:53:21 +02:00
{
extern const char *Txt_Paste;
2020-03-26 02:54:30 +01:00
Lay_PutContextualLinkOnlyIcon (NextAction,NULL,
FuncParams,Args,
2019-04-21 23:53:21 +02:00
"paste.svg",
Txt_Paste);
}
2020-03-26 02:54:30 +01:00
void Ico_PutContextualIconToCreateInFolder (Act_Action_t NextAction,
void (*FuncParams) (void *Args),void *Args,
bool Open)
2019-04-22 01:06:48 +02:00
{
extern const char *Txt_Upload_file_or_create_folder;
2020-03-26 02:54:30 +01:00
Lay_PutContextualLinkOnlyIcon (NextAction,NULL,
FuncParams,Args,
2019-04-22 01:06:48 +02:00
Open ? "folder-open-yellow-plus.png" :
"folder-yellow-plus.png",
Txt_Upload_file_or_create_folder);
}
2020-03-26 02:54:30 +01:00
void Ico_PutContextualIconToShowResults (Act_Action_t NextAction,const char *Anchor,
void (*FuncParams) (void *Args),void *Args)
2019-12-06 18:42:11 +01:00
{
extern const char *Txt_Results;
2020-03-26 02:54:30 +01:00
Lay_PutContextualLinkOnlyIcon (NextAction,Anchor,
FuncParams,Args,
2019-12-08 15:03:40 +01:00
"trophy.svg",
2019-12-06 18:42:11 +01:00
Txt_Results);
}
2020-03-26 02:54:30 +01:00
void Ico_PutContextualIconToShowAttendanceList (Act_Action_t NextAction,
void (*FuncParams) (void *Args),void *Args)
2019-12-06 22:49:45 +01:00
{
extern const char *Txt_Attendance_list;
2020-03-26 02:54:30 +01:00
Lay_PutContextualLinkOnlyIcon (NextAction,NULL,
FuncParams,Args,
2020-02-20 00:32:07 +01:00
"tasks.svg",
2019-12-06 22:49:45 +01:00
Txt_Attendance_list);
}
2020-03-26 02:54:30 +01:00
void Ico_PutContextualIconToZIP (Act_Action_t NextAction,
void (*FuncParams) (void *Args),void *Args)
2019-04-22 14:50:31 +02:00
{
extern const char *Txt_Create_ZIP_file;
2020-03-26 02:54:30 +01:00
Lay_PutContextualLinkOnlyIcon (NextAction,NULL,
FuncParams,Args,
2019-04-22 14:50:31 +02:00
"download.svg",
Txt_Create_ZIP_file);
}
2019-01-12 03:00:59 +01:00
/*****************************************************************************/
/**************** Show an icon inside a div (without text) *******************/
/*****************************************************************************/
void Ico_PutDivIcon (const char *DivClass,const char *Icon,const char *Title)
{
2019-10-24 00:04:40 +02:00
HTM_DIV_Begin ("class=\"%s\"",DivClass);
2019-10-29 09:01:05 +01:00
Ico_PutIcon (Icon,Title,"CONTEXT_ICO_16x16");
2019-10-23 20:07:56 +02:00
HTM_DIV_End ();
2019-01-12 03:00:59 +01:00
}
/*****************************************************************************/
/*********** Show an icon with a link inside a div (without text) ************/
/*****************************************************************************/
void Ico_PutDivIconLink (const char *DivClass,const char *Icon,const char *Title)
{
2019-10-24 00:04:40 +02:00
HTM_DIV_Begin ("class=\"%s\"",DivClass);
2019-01-12 19:46:33 +01:00
Ico_PutIconLink (Icon,Title);
2019-10-23 20:07:56 +02:00
HTM_DIV_End ();
2017-06-11 19:13:28 +02:00
}
/*****************************************************************************/
/****************** Show an icon with a link (without text) ******************/
/*****************************************************************************/
2019-01-12 03:00:59 +01:00
void Ico_PutIconLink (const char *Icon,const char *Title)
2017-06-11 19:13:28 +02:00
{
2019-11-11 15:46:54 +01:00
HTM_INPUT_IMAGE (Cfg_URL_ICON_PUBLIC,Icon,Title,"CONTEXT_OPT ICO_HIGHLIGHT CONTEXT_ICO_16x16");
2019-01-12 03:00:59 +01:00
}
2019-01-12 19:46:33 +01:00
/*****************************************************************************/
/******************* Show an icon with a link (with text) ********************/
/*****************************************************************************/
void Ico_PutIconTextLink (const char *Icon,const char *Text)
{
/***** Print icon and optional text *****/
2019-10-24 00:04:40 +02:00
HTM_DIV_Begin ("class=\"CONTEXT_OPT ICO_HIGHLIGHT\"");
2019-10-29 09:01:05 +01:00
Ico_PutIcon (Icon,Text,"CONTEXT_ICO_x16");
2019-11-11 10:59:24 +01:00
HTM_TxtF ("&nbsp;%s",Text);
2019-10-23 20:07:56 +02:00
HTM_DIV_End ();
2019-01-12 19:46:33 +01:00
}
2019-01-12 03:00:59 +01:00
/*****************************************************************************/
2019-03-26 11:53:21 +01:00
/**************************** Show a setting selector *************************/
2019-01-12 03:00:59 +01:00
/*****************************************************************************/
2019-03-26 11:53:21 +01:00
void Ico_PutSettingIconLink (const char *Icon,const char *Title)
2019-01-12 03:00:59 +01:00
{
2019-11-11 15:46:54 +01:00
HTM_INPUT_IMAGE (Cfg_URL_ICON_PUBLIC,Icon,Title,"ICO_HIGHLIGHT ICOx20");
2017-06-11 19:13:28 +02:00
}
2017-09-11 09:05:26 +02:00
/*****************************************************************************/
2020-02-19 09:40:28 +01:00
/********************* Put an active or disabled icon ************************/
2017-09-11 09:05:26 +02:00
/*****************************************************************************/
2020-02-19 09:40:28 +01:00
void Ico_PutIconOn (const char *Icon,const char *Title)
{
Ico_PutIcon (Icon,Title,"CONTEXT_OPT CONTEXT_ICO_16x16");
}
2019-01-12 19:46:33 +01:00
void Ico_PutIconOff (const char *Icon,const char *Title)
2017-09-11 09:05:26 +02:00
{
2019-10-29 09:01:05 +01:00
Ico_PutIcon (Icon,Title,"CONTEXT_OPT ICO_HIDDEN CONTEXT_ICO_16x16");
}
/*****************************************************************************/
/******************************* Put an icon *********************************/
/*****************************************************************************/
void Ico_PutIcon (const char *Icon,const char *Title,const char *Class)
{
2019-10-30 00:42:01 +01:00
HTM_IMG (Cfg_URL_ICON_PUBLIC,Icon,Title,
2019-10-30 22:31:03 +01:00
"class=\"%s\"",Class);
2017-06-11 19:13:28 +02:00
}
/*****************************************************************************/
/********** Put a icon to submit a form. **********/
/********** When clicked, the icon will be replaced by an animation **********/
/*****************************************************************************/
2019-01-12 19:46:33 +01:00
void Ico_PutCalculateIcon (const char *Title)
2017-06-11 19:13:28 +02:00
{
/***** Begin container *****/
2019-10-24 00:04:40 +02:00
HTM_DIV_Begin ("class=\"CONTEXT_OPT ICO_HIGHLIGHT\"");
2019-10-28 21:24:07 +01:00
/***** Static icon *****/
HTM_IMG (Cfg_URL_ICON_PUBLIC,"recycle16x16.gif",Title, // TODO: change name and resolution to refresh64x64.png
"class=\"CONTEXT_ICO_16x16\" id=\"update_%d\"",Gbl.Form.Num);
2019-10-28 21:24:07 +01:00
/***** Animated icon *****/
HTM_IMG (Cfg_URL_ICON_PUBLIC,"working16x16.gif",Title, // TODO: change name and resolution to refreshing64x64.gif
"class=\"CONTEXT_ICO_16x16\" style=\"display:none;\"" // Animated icon hidden
" id=\"updating_%d\"",Gbl.Form.Num);
2019-10-28 21:24:07 +01:00
/***** End container *****/
2019-10-23 20:07:56 +02:00
HTM_DIV_End ();
2017-06-11 19:13:28 +02:00
}
/*****************************************************************************/
/********** Put a icon with a text to submit a form. **********/
/********** When clicked, the icon will be replaced by an animation **********/
/*****************************************************************************/
2019-01-12 19:46:33 +01:00
void Ico_PutCalculateIconWithText (const char *Text)
2017-06-11 19:13:28 +02:00
{
/***** Begin container *****/
2019-10-24 00:04:40 +02:00
HTM_DIV_Begin ("class=\"ICO_HIGHLIGHT\" style=\"margin:0 6px 0 0; display:inline;\"");
2019-10-28 21:24:07 +01:00
/***** Static icon *****/
HTM_IMG (Cfg_URL_ICON_PUBLIC,"recycle16x16.gif",Text,
"class=\"ICO20x20\" id=\"update_%d\"",Gbl.Form.Num);
2019-10-28 21:24:07 +01:00
/***** Animated icon *****/
HTM_IMG (Cfg_URL_ICON_PUBLIC,"working16x16.gif",Text, // Animated icon
"class=\"ICO20x20\" style=\"display:none;\"" // hidden
" id=\"updating_%d\"",Gbl.Form.Num);
2019-10-28 21:24:07 +01:00
/***** Text *****/
HTM_TxtF ("&nbsp;%s",Text);
2019-10-28 21:24:07 +01:00
/***** End container *****/
2019-10-23 20:07:56 +02:00
HTM_DIV_End ();
2017-06-11 19:13:28 +02:00
}
/*****************************************************************************/
/******** Put a disabled icon indicating that removal is not allowed *********/
/*****************************************************************************/
void Ico_PutIconRemovalNotAllowed (void)
{
extern const char *Txt_Removal_not_allowed;
2019-01-08 13:13:04 +01:00
Ico_PutIconOff ("trash.svg",Txt_Removal_not_allowed);
2017-06-11 19:13:28 +02:00
}
/*****************************************************************************/
2019-01-11 02:55:01 +01:00
/*************************** Put an icon to cut ******************************/
/*****************************************************************************/
void Ico_PutIconCut (void)
{
extern const char *Txt_Cut;
2019-01-12 03:00:59 +01:00
Ico_PutIconLink ("cut.svg",Txt_Cut);
2019-01-11 02:55:01 +01:00
}
/*****************************************************************************/
/************************** Put an icon to paste *****************************/
/*****************************************************************************/
void Ico_PutIconPaste (void)
{
extern const char *Txt_Paste;
2019-01-12 03:00:59 +01:00
Ico_PutIconLink ("paste.svg",Txt_Paste);
2019-01-11 02:55:01 +01:00
}
2020-02-19 00:45:26 +01:00
/*****************************************************************************/
/************* Put icon indicating that a content is not visible *************/
/*****************************************************************************/
void Ico_PutIconNotVisible (void)
{
extern const char *Txt_Not_visible;
Ico_PutIconOff ("eye-slash-red.svg",Txt_Not_visible);
}