Skip to content

Commit

Permalink
SAK-32371 : Resources doesnt use font awesome icons (sakaiproject#4297)
Browse files Browse the repository at this point in the history
  • Loading branch information
frasese authored and ern committed Apr 27, 2017
1 parent a15c90c commit 7c1dfdf
Show file tree
Hide file tree
Showing 33 changed files with 658 additions and 194 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,235 @@
application/binary=fa fa-file-o
application/andrew-inset=fa fa-file-o
application/applefile=fa fa-file-o
application/astound=fa fa-file-o
application/atomicmail=fa fa-file-o
application/cals-1840=fa fa-file-o
application/ccv=fa fa-file-o
application/commonground=fa fa-file-o
application/cybercash=fa fa-file-o
application/dca-rft=fa fa-file-o
application/dec-dx=fa fa-file-o
application/envoy=fa fa-file-o
application/fastman=fa fa-file-audio-o
application/fractals=fa fa-file-o
application/futuresplash=fa fa-file-o
application/hdf=fa fa-file-o
application/ims-cp=fa fa-file-archive-o
application/java=fa fa-file-code-o
application/mac-binhex40=fa fa-file-o
application/macwriteii=fa fa-file-o
application/mbedlet=fa fa-file-o
application/ms-excel=fa fa-file-excel-o
application/excel=fa fa-file-excel-o
application/vnd.ms-excel.sheet.macroEnabled.12=fa fa-file-excel-o
application/ms-powerpoint=fa fa-file-powerpoint-o
application/mspowerpoint=fa fa-file-powerpoint-o
application/x-mspowerpoint=fa fa-file-powerpoint-o
application/msppt=fa fa-file-powerpoint-o
application/vnd.ms-powerpoint=fa fa-file-powerpoint-o
application/x-powerpoint=fa fa-file-powerpoint-o
application/powerpoint=fa fa-file-powerpoint-o
application/vnd.ms-access=fa fa-file-o
application/msaccess=fa fa-file-o
application/msword=fa fa-file-word-o
application/vnd.ms-word=fa fa-file-word-o
application/news-message-id=fa fa-file-o
application/news-transmission=fa fa-file-o
application/octet-stream=fa fa-file-o
application/x-msdownload=fa fa-file-o
application/x-msdos-program=fa fa-file-o
application/oda=fa fa-file-o
application/pdf=fa fa-file-pdf-o
application/postscript=fa fa-file-o
application/remote-printing=fa fa-file-o
application/riscos=fa fa-file-o
application/rtf=fa fa-file-word-o
application/sgml=fa fa-file-o
application/x-shockwave-flash=fa fa-file-o
application/slate=fa fa-file-o
application/vnd.artgalry=fa fa-file-o
application/vnd.framemaker=fa fa-file-o
application/vnd.koan=fa fa-file-audio-o
application/vnd.mif=fa fa-file-o
application/vnd.ms-excel=fa fa-file-excel-o
application/vnd.ms-powerpoint=fa fa-file-powerpoint-o
application/vnd.ms-project=fa fa-file-o
application/vnd.ms-tnef=fa fa-file-o
application/vnd.ms-works=fa fa-file-o
application/vnd.music-niff=fa fa-file-audio-o
application/vnd.svd=fa fa-file-o
application/vnd.truedoc=fa fa-file-o
application/wita=fa fa-file-o
application/wordperfect5.1=fa fa-file-o
application/x-alpha-form=fa fa-file-o
application/x-asap=fa fa-file-o
application/x-bcpio=fa fa-file-o
application/x-chat=fa fa-file-o
application/x-cpio=fa fa-file-o
application/x-crossover-doc=fa fa-file-word-o
application/x-csh=fa fa-file-o
application/x-director=fa fa-file-o
application/x-dvi=fa fa-file-o
application/x-gtar=fa fa-file-archive-o
application/x-javascript=fa fa-file-o
application/x-koan=fa fa-file-audio-o
application/x-latex=fa fa-file-o
application/x-msexcel=fa fa-file-excel-o
application/x-net-install=fa fa-file-o
application/x-ns-proxy-autoconfig=fa fa-file-o
application/x-oleobject=fa fa-file-o
application/x-olescript=fa fa-file-o
application/x-osp=fa fa-file-o
application/x-pcn=fa fa-file-o
application/x-pdf=fa fa-file-pdf-o
application/x-perl=fa fa-file-o
application/x-pn-realaudio=fa fa-file-o
application/x-pointplus=fa fa-file-o
application/x-rad-powermedia=fa fa-file-o
application/x-sh=fa fa-file-o
application/x-shar=fa fa-file-o
application/x-sprite=fa fa-file-o
application/x-stuffit=fa fa-file-archive-o
application/x-tar=fa fa-file-archive-o
application/x-tcl=fa fa-file-o
application/x-tex=fa fa-file-o
application/x-troff=fa fa-file-o
application/x-troff-man=fa fa-file-o
application/x-troff-me=fa fa-file-o
application/x-troff-ms=fa fa-file-o
application/x-ustar=fa fa-file-archive-o
application/x-wais-source=fa fa-file-o
application/x-webbasic=fa fa-file-o
application/x-wingz=fa fa-file-o
application/x-www-form-urlencoded=fa fa-file-o
application/x-www-local-exec=fa fa-file-o
application/x-zip-compressed=fa fa-file-archive-o
application/x-gzip=fa fa-file-archive-o
application/x400-bp=fa fa-file-o
application/xhtml+xml=fa fa-file-code-o
application/zip=fa fa-file-archive-o
application/x-mspublisher=fa fa-file-o
audio/basic=fa fa-file-audio-o
audio/echospeech=fa fa-file-audio-o
audio/voxware=fa fa-file-audio-o
audio/x-aiff=fa fa-file-audio-o
audio/x-wav=fa fa-file-audio-o
audio/wav=fa fa-file-audio-o
audio/mpeg=fa fa-file-audio-o
audio/mpg=fa fa-file-audio-o
audio/mp3=fa fa-file-audio-o
audio/x-mp3=fa fa-file-audio-o
audio/mpeg3=fa fa-file-audio-o
audio/x-mpeg3=fa fa-file-audio-o
audio/mpg=fa fa-file-audio-o
audio/x-pn-realaudio=fa fa-file-o
audio/x-realaudio=fa fa-file-o
audio/x-mpg=fa fa-file-audio-o
audio/x-mpegaudio=fa fa-file-audio-o
audio/x-mpeg=fa fa-file-audio-o
audio/x-mpeg-2=fa fa-file-audio-o
folder=fa fa-folder-open
image/bitmap=fa fa-file-image-o
image/bmp=fa fa-file-image-o
image/cgm=fa fa-file-image-o
image/fif=fa fa-file-image-o
image/g3fax=fa fa-file-image-o
image/gif=fa fa-file-image-o
image/png=fa fa-file-image-o
image/ief=fa fa-file-image-o
image/jpeg=fa fa-file-image-o
image/jpg=fa fa-file-image-o
image/photoshop=fa fa-file-o
image/naplps=fa fa-file-image-o
image/rgb=fa fa-file-image-o
image/svg+xml=fa fa-file-image-o
image/tiff=fa fa-file-image-o
image/vnd.dwg=fa fa-file-image-o
image/vnd.dxf=fa fa-file-image-o
image/vnd.svf =fa fa-file-image-o
image/wavelet=fa fa-file-image-o
image/x-cals=fa fa-file-image-o
image/x-cmu-raster=fa fa-file-image-o
image/x-cmx=fa fa-file-image-o
image/x-dwg=fa fa-file-image-o
image/x-dxf =fa fa-file-image-o
image/x-mgx-dsf=fa fa-file-image-o
image/x-ms-bmp=fa fa-file-image-o
image/x-photo-cd=fa fa-file-image-o
image/x-pict=fa fa-file-image-o
image/x-png=fa fa-file-image-o
image/x-portable-anymap=fa fa-file-image-o
image/x-portable-bitmap=fa fa-file-image-o
image/x-portable-graymap=fa fa-file-image-o
image/x-portable-pixmap=fa fa-file-image-o
image/x-rgb=fa fa-file-image-o
image/x-xbitmap=fa fa-file-image-o
image/x-xpixmap=fa fa-file-image-o
image/x-xwindowdump=fa fa-file-image-o
text/rtf=fa fa-file-text-o
text/css=fa fa-file-text-o
text/html=fa fa-file-code-o
text/javascript=fa fa-file-o
text/plain=fa fa-file-text-o
text/richtext=fa fa-file-word-o
text/sgml=fa fa-file-text-o
text/tab-separated-values=fa fa-file-excel-o
text/url=fa fa-file-o
text/vbscript=fa fa-file-o
text/x-comma-separated-values=fa fa-file-text-o
text/x-enriched=fa fa-file-text-o
text/x-setext=fa fa-file-text-o
text/x-speech=fa fa-file-text-o
text/xml=fa fa-file-code-o
vector/x-svf =fa fa-file-image-o
video/mpeg=fa fa-file-video-o
video/mpeg-2=fa fa-file-video-o
video/quicktime=fa fa-file-video-o
video/vdo=fa fa-file-video-o
video/vivo=fa fa-file-video-o
video/vnd.vivo=fa fa-file-video-o
video/x-msvideo=fa fa-file-video-o
video/x-sgi-movie=fa fa-file-video-o
video/mp4=fa fa-file-video-o
video/x-m4v=fa fa-file-video-o
video/webm=fa fa-file-video-o
workbook/formulaone=fa fa-file-o
x-conference/x-cooltalk=fa fa-file-o
x-form/x-openscape=fa fa-file-o
x-music/x-midi=fa fa-file-audio-o
x-script/x-wfxclient =fa fa-file-o
image/pjpeg=fa fa-file-image-o
x-world/x-vrml=fa fa-file-o
model/vrml=fa fa-file-o
application/x-blaxxunCC3D=fa fa-file-o
application/x-blaxxunCC3Dpro=fa fa-file-o
application/x-CC3D=fa fa-file-o
application/vnd.ms-excel.sheet.binary.macroEnabled.12=fa fa-file-excel-o
application/vnd.ms-excel.sheet.macroEnabled.12=fa fa-file-excel-o
application/vnd.ms-powerpoint.presentation.macroEnabled.12=fa fa-file-powerpoint-o
application/vnd.ms-powerpoint.slideshow.macroEnabled.12=fa fa-file-powerpoint-o
application/vnd.ms-word.document.macroEnabled.12=fa fa-file-word-o
application/vnd.ms-word.template.macroEnabled.12=fa fa-file-word-o
application/vnd.ms-xpsdocument=fa fa-file-o
application/vnd.openxmlformats-officedocument.presentationml.presentation=fa fa-file-powerpoint-o
application/vnd.openxmlformats-officedocument.presentationml.slideshow=fa fa-file-powerpoint-o
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet=fa fa-file-excel-o
application/vnd.openxmlformats-officedocument.wordprocessingml.document=fa fa-file-word-o
application/vnd.openxmlformats-officedocument.wordprocessingml.template=fa fa-file-word-o
application/vnd.openxmlformats=fa fa-files-o
application/vnd.oasis.opendocument.text=fa fa-files-o
application/vnd.oasis.opendocument.text-template=fa fa-files-o
application/vnd.oasis.opendocument.text-web=fa fa-files-o
application/vnd.oasis.opendocument.text-master=fa fa-files-o
application/vnd.oasis.opendocument.graphics=fa fa-file-o
application/vnd.oasis.opendocument.graphics-template=fa fa-file-o
application/vnd.oasis.opendocument.presentation=fa fa-file-o
application/vnd.oasis.opendocument.presentation-template=fa fa-file-o
application/vnd.oasis.opendocument.spreadsheet=fa fa-file-o
application/vnd.oasis.opendocument.spreadsheet-template=fa fa-file-o
application/vnd.oasis.opendocument.chart=fa fa-file-o
application/vnd.oasis.opendocument.formula=fa fa-file-o
application/vnd.oasis.opendocument.database=fa fa-file-o
application/vnd.oasis.opendocument.image=fa fa-file-o
application/vnd.openofficeorg.extension=fa fa-file-o
application/ogg=fa fa-file-audio-o
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,7 @@ protected void finishAction(SessionState state, ToolSession toolSession, Resourc
ResourceType typedef = registry.getType(typeId);
item.setHoverText(typedef.getLocalizedHoverText(resource));
item.setIconLocation(typedef.getIconLocation(resource));
item.setIconClass(typedef.getIconClass(resource));
new_items.add(item);
}
toolSession.setAttribute(STATE_HELPER_CHANGED, Boolean.TRUE.toString());
Expand Down Expand Up @@ -1039,6 +1040,7 @@ protected String initHelperAction(SessionState state, ToolSession toolSession)
ResourceType typedef = registry.getType(typeId);
item.setHoverText(typedef.getLocalizedHoverText(res));
item.setIconLocation(typedef.getIconLocation(res));
item.setIconClass(typedef.getIconClass(res));

new_items.add(item);
}
Expand Down Expand Up @@ -1320,6 +1322,7 @@ else if(fileContentStream != null)
ResourceType typedef = registry.getType(typeId);
item.setHoverText(typedef.getLocalizedHoverText(attachment));
item.setIconLocation(typedef.getIconLocation(attachment));
item.setIconClass(typedef.getIconClass(attachment));
new_items.add(item);
disableSecurityAdvisors();

Expand Down Expand Up @@ -1444,6 +1447,7 @@ public void doAttachurl(RunData data)
ResourceType typedef = registry.getType(typeId);
item.setHoverText(typedef.getLocalizedHoverText(attachment));
item.setIconLocation(typedef.getIconLocation(attachment));
item.setIconClass(typedef.getIconClass(attachment));
new_items.add(item);
disableSecurityAdvisors();
toolSession.setAttribute(STATE_HELPER_CHANGED, Boolean.TRUE.toString());
Expand Down Expand Up @@ -1748,6 +1752,7 @@ else if(copyAction instanceof ServiceLevelAction)
item.setResourceType(typeId);
item.setHoverText(typedef.getLocalizedHoverText(resource));
item.setIconLocation(typedef.getIconLocation(resource));
item.setIconClass(typedef.getIconClass(resource));
new_items.add(item);
toolSession.setAttribute(STATE_HELPER_CHANGED, Boolean.TRUE.toString());
disableSecurityAdvisors();
Expand Down Expand Up @@ -1888,6 +1893,7 @@ public void attachLink(String itemId, SessionState state)
ResourceType typedef = registry.getType(typeId);
item.setHoverText(typedef.getLocalizedHoverText(res));
item.setIconLocation(typedef.getIconLocation(res));
item.setIconClass(typedef.getIconClass(res));

new_items.add(item);
toolSession.setAttribute(STATE_HELPER_CHANGED, Boolean.TRUE.toString());
Expand Down Expand Up @@ -2144,6 +2150,7 @@ else if ("o".equals(notification))
ResourceType typedef = registry.getType(typeId);
new_item.setHoverText(typedef.getLocalizedHoverText(resource));
new_item.setIconLocation(typedef.getIconLocation(resource));
new_item.setIconClass(typedef.getIconClass(resource));

List new_items = (List) toolSession.getAttribute(STATE_ADDED_ITEMS);
if(new_items == null)
Expand Down Expand Up @@ -2644,6 +2651,7 @@ public static class AttachItem
protected String m_resourceType;
protected String hoverText;
protected String iconLocation;
protected String iconClass;

/**
* @param id
Expand Down Expand Up @@ -2808,6 +2816,28 @@ public void setIconLocation(String iconLocation)
}
this.iconLocation = iconLocation;
}

public String getIconClass()
{
return iconClass;
}

public void setIconClass(String iconClass)
{
if(iconClass == null)
{
ContentTypeImageService imageService = (ContentTypeImageService) ComponentManager.get("org.sakaiproject.content.api.ContentTypeImageService");
if(this.m_contentType == null)
{
iconClass = imageService.getContentTypeImageClass("application/binary");
}
else
{
iconClass = imageService.getContentTypeImageClass(this.m_contentType);
}
}
this.iconClass = iconClass;
}

} // Inner class AttachItem

Expand Down
Loading

0 comments on commit 7c1dfdf

Please sign in to comment.