Skip to content

Commit

Permalink
[Frontend] Refactoring glyphs to classes
Browse files Browse the repository at this point in the history
fixes #1047
Context menus and associated actions,
custom checkboxes, tree item being edited
  • Loading branch information
charlesh88 committed Jun 27, 2016
1 parent b561d4f commit 2bd34f7
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 23 deletions.
1 change: 1 addition & 0 deletions platform/commonUI/edit/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ define([
"category": "contextual",
"implementation": RemoveAction,
"glyph": "Z",
"cssclass": "icon-trash",
"name": "Remove",
"description": "Remove this object from its containing object.",
"depends": [
Expand Down
3 changes: 0 additions & 3 deletions platform/commonUI/general/res/sass/_icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@
color: lighten($colorAlert, $ltGamma);
}
}
&.major {
font-size: 1.65em;
}
}

.bar .ui-symbol {
Expand Down
4 changes: 2 additions & 2 deletions platform/commonUI/general/res/sass/controls/_controls.scss
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ label.radio.custom {
}
}

label.checkbox.custom input:checked ~ em:before { content: "\32"; }
label.radio.custom input:checked ~ em:before { content: "\e619"; }
label.checkbox.custom input:checked ~ em:before { content: $glyph-icon-check; }
label.radio.custom input:checked ~ em:before { content: $glyph-icon-bullet; }

.s-menu-btn label.checkbox.custom {
margin-left: 5px;
Expand Down
9 changes: 5 additions & 4 deletions platform/commonUI/general/res/sass/controls/_menus.scss
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,12 @@
a.menu-item-a {
color: $colorMenuFg;
display: block;
&:before {
color: $colorMenuIc;
left: $interiorMargin;
}
}
&:before,
a.menu-item-a:before {
color: $colorMenuIc;
left: $interiorMargin;
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion platform/commonUI/general/res/sass/forms/_filter.scss
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
.l-filter {
$iconEdgeM: 4px;
$iconD: $formInputH - ($iconEdgeM * 2);
@extend .icon-magnify;
// Adds a magnifying glass before, holds an input and a clear button
display: inline-block;
position: relative;
Expand All @@ -106,7 +107,6 @@

&:before {
// Magnify glass icon
content:'\4d';
left: $interiorMargin;
@include trans-prop-nice(color, 250ms);
pointer-events: none;
Expand Down
7 changes: 2 additions & 5 deletions platform/commonUI/general/res/sass/search/_search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@

.clear-icon {
// 'x' in circle icon
&:before {
content: '\e607';
}
@extend .icon-x-in-circle;
}

.holder-search {
Expand All @@ -41,6 +39,7 @@
$textInputHeight: 19px; // This is equal to the default value, 19px
$iconEdgeM: 4px;
$iconD: $treeSearchInputBarH - ($iconEdgeM*2);
@extend .icon-magnify;
font-size: 0.8em;
position: relative;

Expand Down Expand Up @@ -76,8 +75,6 @@

&:before {
// Magnify glass icon
content:'\4d';
font-family: symbolsfont;
left: $interiorMarginSm;
@include trans-prop-nice(color, 250ms);
pointer-events: none;
Expand Down
2 changes: 1 addition & 1 deletion platform/commonUI/general/res/sass/tree/_tree.scss
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ mct-representation {
@extend .ui-symbol;
@include pulse($dur: 1s, $opacity0: 0.25);
color: $colorItemTreeEditingFg;
content: '\70';
content: $glyph-icon-pencil;
margin-right: $interiorMarginSm;
}
.t-object-label {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,12 @@
<div class="menu-element context-menu-wrapper mobile-disable-select" ng-controller="ContextMenuController">
<div class="menu context-menu">
<ul>

<li ng-repeat="menuAction in menuActions"
ng-click="menuAction.perform()"
title="{{menuAction.getMetadata().description}}"
>
<span class="ui-symbol icon type-icon">
{{menuAction.getMetadata().glyph}}
</span>
class="{{menuAction.getMetadata().cssclass}}">
{{menuAction.getMetadata().name}}
</li>

</ul>
</div>
</div>
5 changes: 4 additions & 1 deletion platform/entanglement/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ define([
"name": "Move",
"description": "Move object to another location.",
"glyph": "f",
"cssclass": "icon-move",
"category": "contextual",
"implementation": MoveAction,
"depends": [
Expand All @@ -80,6 +81,7 @@ define([
"name": "Duplicate",
"description": "Duplicate object to another location.",
"glyph": "+",
"cssclass": "icon-duplicate",
"category": "contextual",
"implementation": CopyAction,
"depends": [
Expand All @@ -96,6 +98,7 @@ define([
"name": "Create Link",
"description": "Create Link to object in another location.",
"glyph": "è",
"cssclass": "icon-link",
"category": "contextual",
"implementation": LinkAction,
"depends": [
Expand All @@ -108,7 +111,7 @@ define([
"key": "follow",
"name": "Go To Original",
"description": "Go to the original, un-linked instance of this object.",
"glyph": "ô",
"glyph": "",
"category": "contextual",
"implementation": GoToOriginalAction
},
Expand Down

0 comments on commit 2bd34f7

Please sign in to comment.