Skip to content

Commit

Permalink
SAK-31697 namespace for icons icon-sakai--<tool id> (sakaiproject#3234)
Browse files Browse the repository at this point in the history
  • Loading branch information
ern authored and buckett committed Nov 16, 2016
1 parent 80420c9 commit 1993df5
Show file tree
Hide file tree
Showing 30 changed files with 185 additions and 178 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1706,10 +1706,10 @@
<tr>
<td class="groupCell">
<a href="javascript:void(0)" id="collapse_$roleCount" class="toggleRoleLink" style="display:none;" title="$collapseString">
<img src="/library/image/sakai/collapse.gif" alt="$collapseString" /><span class="members"><i class="icon-sakai-membership"></i></span>
<img src="/library/image/sakai/collapse.gif" alt="$collapseString" /><span class="members"><i class="icon-sakai--sakai-membership"></i></span>
</a>
<a href="javascript:void(0)" id="expand_$roleCount" class="toggleRoleLink" style="display:inline" title="$expandString">
<img src="/library/image/sakai/expand.gif" alt="$expandString"/><span class="members"><i class="icon-sakai-membership"></i></span>
<img src="/library/image/sakai/expand.gif" alt="$expandString"/><span class="members"><i class="icon-sakai--sakai-membership"></i></span>
</a>
<input id="$showInputString" name="showInputString_$roleCount" #if ($!value_allPurposeAccessList.contains($role)) checked="checked" #end type="checkbox" name="allPurpose_$role" class="selectAllMembers"/>
<label for="showInputString_$roleCount">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
#end
#end
#if ($size > 0)
<i class="icon-sakai-clip"></i>
<i class="icon-sakai--clip"></i>
#else
&nbsp;
#end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
<category name="portfolio" />
<configuration name="functions.require" />
<configuration name="sakai:menuClass" value="icon-sakai-lessonbuildertool"/>
<configuration name="sakai:menuClass" value="icon-sakai -2 dashes- sakai-lessonbuildertool"/>
<configuration name="imsti.launch"
value="http://www.dr-chuck.com/sakai-api-test/tool.php" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
*/
public class AssignmentColumnHeaderPanel extends Panel {

public static final String ICON_SAKAI = "icon-sakai--";
private static final long serialVersionUID = 1L;

private final IModel<Assignment> modelData;
Expand Down Expand Up @@ -139,13 +140,13 @@ public void onClick() {
externalAppFlag.add(new AttributeModifier("data-content",
gradebookPage.generatePopoverContent(new StringResourceModel("label.gradeitem.externalapplabel",
null, new Object[] { assignment.getExternalAppName() }).getString())));
String iconClass = "icon-sakai";
String iconClass = ICON_SAKAI + "default-tool";
if ("Assignments".equals(assignment.getExternalAppName())) {
iconClass = "icon-sakai-assignment-grades";
iconClass = ICON_SAKAI + "sakai-assignment-grades";
} else if ("Tests & Quizzes".equals(assignment.getExternalAppName())) {
iconClass = "icon-sakai-samigo";
iconClass = ICON_SAKAI + "sakai-samigo";
} else if ("Lesson Builder".equals(assignment.getExternalAppName())) {
iconClass = "icon-sakai-lessonbuildertool";
iconClass = ICON_SAKAI + "sakai-lessonbuildertool";
}
externalAppFlag
.add(new AttributeModifier("class", "gb-external-app-flag " + iconClass));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -616,11 +616,11 @@ private UIStyleDecorator getImageSourceDecorator(SimplePageItem pageItem) {

switch (pageItem.getType()) {
case SimplePageItem.FORUM:
return new UIStyleDecorator("icon-sakai-forums");
return new UIStyleDecorator("icon-sakai--sakai-forums");
case SimplePageItem.ASSIGNMENT:
return new UIStyleDecorator("icon-sakai-assignment-grades");
return new UIStyleDecorator("icon-sakai--sakai-assignment-grades");
case SimplePageItem.ASSESSMENT:
return new UIStyleDecorator("icon-sakai-samigo");
return new UIStyleDecorator("icon-sakai--sakai-samigo");
case SimplePageItem.QUESTION:
return new UIStyleDecorator("fa-question");
case SimplePageItem.COMMENTS:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1344,13 +1344,13 @@ public int compare(SimpleStudentPage o1, SimpleStudentPage o2) {
UIOutput itemicon = UIOutput.make(linkdiv,"item-icon");
switch (i.getType()) {
case SimplePageItem.FORUM:
itemicon.decorate(new UIStyleDecorator("icon-sakai-forums"));
itemicon.decorate(new UIStyleDecorator("icon-sakai--sakai-forums"));
break;
case SimplePageItem.ASSIGNMENT:
itemicon.decorate(new UIStyleDecorator("icon-sakai-assignment-grades"));
itemicon.decorate(new UIStyleDecorator("icon-sakai--sakai-assignment-grades"));
break;
case SimplePageItem.ASSESSMENT:
itemicon.decorate(new UIStyleDecorator("icon-sakai-samigo"));
itemicon.decorate(new UIStyleDecorator("icon-sakai--sakai-samigo"));
break;
case SimplePageItem.BLTI:
itemicon.decorate(new UIStyleDecorator("fa-globe"));
Expand Down
2 changes: 1 addition & 1 deletion lessonbuilder/tool/src/webapp/js/announcements.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function showAnnouncements(url, tool_href, number, announcementsDiv){
//get the announcement tool url
var link_to_tool = tool_href.split("?", 1);
var title = msg("simplepage.announcements-header-title");
var text_for_announcements = '<div class="announcementsHeaderDiv"><h3 class="announcementSummaryHeader"><span aria-hidden="true" class="fa-item-text icon-sakai-announcements"></span><a href="'+link_to_tool+'" target="_top" class="announcementLink" title ="'+title+'">'+title+'</a></h3></div><div class="announcementList">';
var text_for_announcements = '<div class="announcementsHeaderDiv"><h3 class="announcementSummaryHeader"><span aria-hidden="true" class="fa-item-text icon-sakai--sakai-announcements"></span><a href="'+link_to_tool+'" target="_top" class="announcementLink" title ="'+title+'">'+title+'</a></h3></div><div class="announcementList">';
//Get announcements
$.ajax({
url: announcementsUrl,
Expand Down
2 changes: 1 addition & 1 deletion lessonbuilder/tool/src/webapp/js/forum-summary.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function showForums(forumsUrl, toolHref, itemsToShow, forumSummaryDiv ){
}
function outputForums(messagesArray, toolHref, forumSummaryDiv){
var title = msg("simplepage.forum-header-title");
var text_for_forums = '<div class="forumSummaryHeaderDiv"><h3 class="forumSummaryHeader"><span aria-hidden="true" class="fa-item-text icon-sakai-forums"></span><a href="'+toolHref+'" class="forumSummaryLink" title ="'+title+'">'+title+'</a></h3></div>';
var text_for_forums = '<div class="forumSummaryHeaderDiv"><h3 class="forumSummaryHeader"><span aria-hidden="true" class="fa-item-text icon-sakai--sakai-forums"></span><a href="'+toolHref+'" class="forumSummaryLink" title ="'+title+'">'+title+'</a></h3></div>';
if(messagesArray.length == 0){
text_for_forums += '<p>'+msg("simplepage.forum-summary-no-message")+'</p>';
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@
</h:panelGrid>


<f:verbatim><div id="permalinkHolder"><a class="closeMe" href="#" style=""><span class="icon-sakai-delete"></span></a></f:verbatim>
<f:verbatim><div id="permalinkHolder"><a class="closeMe" href="#" style=""><span class="icon-sakai--delete"></span></a></f:verbatim>
<h:outputText value="#{msgs.cdfm_button_bar_permalink_message}" style="display:block" styleClass="textPanelFooter"/>
<h:inputTextarea value="" />
<f:verbatim></div></f:verbatim>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@
@SuppressWarnings("deprecation")
public class PortalSiteHelperImpl implements PortalSiteHelper
{
// namespace for sakai icons see _icons.scss
public static final String ICON_SAKAI = "icon-sakai--";

// Alias prefix for page aliases. Use Entity.SEPARATOR as IDs shouldn't contain it.
private static final String PAGE_ALIAS = Entity.SEPARATOR+ "pagealias"+ Entity.SEPARATOR;

Expand Down Expand Up @@ -700,7 +703,7 @@ else if ("always".equals(showHelpGlobal))
if (firstTool != null)
{
String menuClass = firstTool.getToolId();
menuClass = "icon-" + menuClass.replace('.', '-');
menuClass = ICON_SAKAI + menuClass.replace('.', '-');
m.put("menuClass", menuClass);
Properties tmp = firstTool.getConfig();
if ( tmp != null ) {
Expand All @@ -715,7 +718,7 @@ else if ("always".equals(showHelpGlobal))
}
else
{
m.put("menuClass", "icon-default-tool");
m.put("menuClass", ICON_SAKAI + "default-tool");
}
m.put("pageProps", createPageProps(p));
// this is here to allow the tool reorder to work
Expand Down Expand Up @@ -755,7 +758,7 @@ else if ("always".equals(showHelpGlobal))
m.put("toolpopup", Boolean.valueOf(source!=null));
m.put("toolpopupurl", source);
String menuClass = placement.getToolId();
menuClass = "icon-" + menuClass.replace('.', '-');
menuClass = ICON_SAKAI + menuClass.replace('.', '-');
m.put("menuClass", menuClass);
Properties tmp = placement.getConfig();
if ( tmp != null ) {
Expand Down Expand Up @@ -790,8 +793,8 @@ else if ("always".equals(showHelpGlobal))
String helpUrl = ServerConfigurationService.getHelpUrl(null);
theMap.put("pageNavShowHelp", Boolean.valueOf(showHelp));
theMap.put("pageNavHelpUrl", helpUrl);
theMap.put("helpMenuClass", "icon-sakai-help");
theMap.put("subsiteClass", "icon-sakai-subsite");
theMap.put("helpMenuClass", ICON_SAKAI + "help");
theMap.put("subsiteClass", ICON_SAKAI + "subsite");

// theMap.put("pageNavSitContentshead",
// Web.escapeHtml(rb.getString("sit_contentshead")));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@

<li class="Mrphs-toolsNav__menuitem--subsite">
<a id="toggleSubsitesLink" class="Mrphs-toolsNav__menuitem--link" href="javascript:;" title="${rloader.subsitesTitle}" aria-haspopup="true">
<span class="Mrphs-toolsNav__menuitem--icon icon-sakai-subsites-list"> </span>
<span class="Mrphs-toolsNav__menuitem--icon icon-sakai--subsites-list"> </span>
<span class="Mrphs-toolsNav__menuitem--title">${rloader.subsites}</span>
</a>
</li>
Expand All @@ -171,7 +171,7 @@

<li>
<a class="Mrphs-toolsNav__menuitem--link" href="${sitePages.pageNavAddMoreToolsUrl}">
<span class="Mrphs-toolsNav__menuitem--icon icon-sakai-add-tool"></span>
<span class="Mrphs-toolsNav__menuitem--icon icon-sakai--add-tool"></span>
<span class="Mrphs-toolsNav__menuitem--title">${rloader.sit_addmoretools}</span>
</a>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
#foreach( $page in $sitePages.pageNavTools )
#if (${page.current})
<a href="${page.pageResetUrl}" title="$rloader.sit_reset" class="Mrphs-hierarchy-item Mrphs-hierarchy--toolName">
<span class="Mrphs-breadcrumb--reset-icon icon-sakai fa fa-share" aria-hidden="true"></span>
<span class="Mrphs-breadcrumb--reset-icon fa fa-share" aria-hidden="true"></span>
<span class="Mrphs-breadcrumb--icon ${page.menuClass} $!{page.menuClassOverride}"></span>
<span>${page.pageTitle}</span>
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<div class="fav-title #if (${site.isMyWorkspace}) fav-title-myworkspace #end">
<a href="${site.siteUrl}" title="${site.siteTitleNotTruncated}">
#if (${site.isMyWorkspace})
<i class="fa fa-home icon-sakai"></i><span class="fullTitle">${rloader.sit_mywor}</span>
<i class="fa fa-home"></i><span class="fullTitle">${rloader.sit_mywor}</span>
#elseif ( ( ${tabDisplayLabel} == 2 ) && ( ${site.shortDescription} ) )
<span class="fullTitle">${site.shortDescription}</span>
#else
Expand Down
4 changes: 2 additions & 2 deletions reference/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ There are lot of other variables you can refer to the *[_defaults.scss](./librar

2. There are 2 sections to this file .

* Icons used under the Site Navigation drop down menu.(Top): To change icons you have to modify the extends under *.Mrphs-toolsNav__menuitem--icon* section located at line 4 of the file. The list on the left hand are the tools in Sakai and right hand side are the icons from font-awsome, ex: in the line ```&.icon-sakai-schedule{ @extend .fa-calendar;}```, "*&.icon-sakai-schedule"* is the sakai Schedule tool and "*.fa-calendar*" is the font-awsome icon which you can get by clicking on the icon ex: [http://fortawesome.github.io/Font-Awesome/icon/calendar/](http://fortawesome.github.io/Font-Awesome/icon/calendar/)
* Icons used under the Site Navigation drop down menu.(Top): To change icons you have to modify the extends under *.Mrphs-toolsNav__menuitem--icon* section located at line 4 of the file. The list on the left hand are the tools in Sakai and right hand side are the icons from font-awsome, ex: in the line ```&.icon-sakai--sakai-schedule{ @extend .fa-calendar;}```, "*&.icon-sakai--sakai-schedule"* is the sakai Schedule tool and "*.fa-calendar*" is the font-awsome icon which you can get by clicking on the icon ex: [http://fortawesome.github.io/Font-Awesome/icon/calendar/](http://fortawesome.github.io/Font-Awesome/icon/calendar/)

* Icons used in the Tool Navigation menu (Side) . To change the icons in this section you have to modify the extends under *.Mrphs-sitesNav__submenuitem{ .toolMenuIcon{* which is located around line 72 of the file. The list on the left hand are the tools in Sakai and right hand side are the icons from font-awsome, ex: in the line ```&.icon-sakai-schedule{ @extend .fa-calendar;}``` "*&.icon-sakai-schedule*" is the sakai Schedule tool and "*.fa-calendar*" is the font-awsome icon which you can get by clicking on the icon ex: [http://fortawesome.github.io/Font-Awesome/icon/calendar/](http://fortawesome.github.io/Font-Awesome/icon/calendar/)
* Icons used in the Tool Navigation menu (Side) . To change the icons in this section you have to modify the extends under *.Mrphs-sitesNav__submenuitem{ .toolMenuIcon{* which is located around line 72 of the file. The list on the left hand are the tools in Sakai and right hand side are the icons from font-awsome, ex: in the line ```&.icon-sakai--sakai-schedule{ @extend .fa-calendar;}``` "*&.icon-sakai--sakai-schedule*" is the sakai Schedule tool and "*.fa-calendar*" is the font-awsome icon which you can get by clicking on the icon ex: [http://fortawesome.github.io/Font-Awesome/icon/calendar/](http://fortawesome.github.io/Font-Awesome/icon/calendar/)

3. You have to re compile the theme to apply the changes.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ function showToolMenu(jqObj){
.attr('title', maxToolsText)
.append(maxToolsText);

goToSite.find('a span').addClass('icon-sakai-see-all-tools')
goToSite.find('a span').addClass('icon-sakai--see-all-tools')

$PBJQ.getJSON(siteURL, function(data){
$PBJQ.each(data, function(i, item){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var buildDropdownMenu = function(container, siteId, callback) {
var navsubmenu = "<ul class=\"Mrphs-sitesNav__submenu\" role=\"menu\">";
var maxToolsInt = parseInt($PBJQ('#linkNav').attr('data-max-tools-int'));
var maxToolsText = $PBJQ('#linkNav').attr('data-max-tools-anchor');
var goToSite = '<li class=\"Mrphs-sitesNav__submenuitem\"><a role=\"menuitem\" href=\"' + portal.portalPath + '/site/' + siteId + '\" title=\"' + maxToolsText + '\"><span class=\"toolMenuIcon icon-sakai-see-all-tools\"></span>' + maxToolsText + '</a></li>';
var goToSite = '<li class=\"Mrphs-sitesNav__submenuitem\"><a role=\"menuitem\" href=\"' + portal.portalPath + '/site/' + siteId + '\" title=\"' + maxToolsText + '\"><span class=\"toolMenuIcon icon-sakai--see-all-tools\"></span>' + maxToolsText + '</a></li>';
var siteURL = '/direct/site/' + siteId + '/pages.json';
var currentSite = window.location.pathname.split('/').pop();

Expand All @@ -40,14 +40,14 @@ var buildDropdownMenu = function(container, siteId, callback) {
if (item.toolpopup) {
var link_attrs = ' role="menuitem" href="{{tool_url}}?sakai.popup=yes" title="{{item_title}}" onclick="window.open(\'{{item_toolpopupurl}}\');"';
li_template = '<li class="Mrphs-sitesNav__submenuitem" >' +
'<a class="Mrphs-sitesNav__submenuitem-icon"' + link_attrs + '><span class="toolMenuIcon icon-{{icon}}"></span></a>' +
'<a class="Mrphs-sitesNav__submenuitem-icon"' + link_attrs + '><span class="toolMenuIcon icon-sakai--{{icon}}"></span></a>' +
'<a class="Mrphs-sitesNav__submenuitem-title"' + link_attrs + '>{{item_title}}</a>' +
'</li>';
} else {
var link_attrs = ' role="menuitem" href="{{tool_url}}" title="{{item_title}}"';

li_template = '<li class="Mrphs-sitesNav__submenuitem{{is_current}}">' +
'<a class="Mrphs-sitesNav__submenuitem-icon"' + link_attrs + '><span class="toolMenuIcon icon-{{icon}}"></span></a>' +
'<a class="Mrphs-sitesNav__submenuitem-icon"' + link_attrs + '><span class="toolMenuIcon icon-sakai--{{icon}}"></span></a>' +
'<a class="Mrphs-sitesNav__submenuitem-title"' + link_attrs + '>{{item_title}}</a>' +
'</li>';
}
Expand Down
Loading

0 comments on commit 1993df5

Please sign in to comment.