[Frontend] Removing glyph definitions; updating tests

Fixes #1047
Search and removal of "glyph" definitions in bundle
and other JS files; updating tests accordingly;
This commit is contained in:
Charles Hacskaylo 2016-07-25 10:20:33 -07:00
parent 574b8bd5c1
commit 650fbcc921
34 changed files with 22 additions and 102 deletions

View File

@ -49,7 +49,6 @@ define([
{
"key": "eventGenerator",
"name": "Event Message Generator",
"glyph": "\u0066",
"cssclass": "icon-folder-new",
"description": "For development use. Creates sample event message data that mimics a live data stream.",
"priority": 10,

View File

@ -36,7 +36,7 @@ define([
"name": "Export Telemetry as CSV",
"implementation": ExportTelemetryAsCSVAction,
"category": "contextual",
"glyph": "\u0033",
"cssclass": "icon-download",
"depends": [ "exportService" ]
}
]

View File

@ -86,7 +86,6 @@ define([
{
"key": "generator",
"name": "Sine Wave Generator",
"glyph": "\u0054",
"cssclass": "icon-telemetry",
"description": "For development use. Generates example streaming telemetry data using a simple sine wave algorithm.",
"priority": 10,

View File

@ -49,7 +49,6 @@ define([
{
"key": "imagery",
"name": "Example Imagery",
"glyph": "\u00e3",
"cssclass": "icon-image",
"features": "creation",
"description": "For development use. Creates example imagery data that mimics a live imagery stream.",

View File

@ -43,18 +43,18 @@ define([
{
"name":"Mars Science Laboratory",
"key": "msl.curiosity",
"glyph": "o"
"cssclass": "icon-object"
},
{
"name": "Instrument",
"key": "msl.instrument",
"glyph": "o",
"cssclass": "icon-object",
"model": {"composition": []}
},
{
"name": "Measurement",
"key": "msl.measurement",
"glyph": "\u0054",
"cssclass": "icon-telemetry",
"model": {"telemetry": {}},
"telemetry": {
"source": "rems.source",

View File

@ -81,7 +81,7 @@ define([
{
"key": "plot",
"name": "Example Telemetry Plot",
"glyph": "\u0074",
"cssclass": "icon-telemetry-panel",
"description": "For development use. A plot for displaying telemetry.",
"priority": 10,
"delegates": [

View File

@ -246,7 +246,7 @@ define([
{
"key": "items",
"name": "Items",
"glyph": "9",
"cssclass": "icon-thumbs-strip",
"description": "Grid of available items",
"template": itemsTemplate,
"uses": [

View File

@ -174,7 +174,6 @@ define([
],
"description": "Edit",
"category": "view-control",
"glyph": "p",
"cssclass": "major icon-pencil"
},
{
@ -184,7 +183,6 @@ define([
"view-control"
],
"implementation": PropertiesAction,
"glyph": "p",
"cssclass": "major icon-pencil",
"name": "Edit Properties...",
"description": "Edit properties of this object.",
@ -196,7 +194,6 @@ define([
"key": "remove",
"category": "contextual",
"implementation": RemoveAction,
"glyph": "Z",
"cssclass": "icon-trash",
"name": "Remove",
"description": "Remove this object from its containing object.",

View File

@ -51,7 +51,6 @@ define(
function AddAction(type, parent, context, $q, dialogService, policyService) {
this.metadata = {
key: 'add',
glyph: type.getGlyph(),
cssclass: type.getCssClass(),
name: type.getName(),
type: type.getKey(),

View File

@ -47,7 +47,6 @@ define(
function CreateAction(type, parent, context) {
this.metadata = {
key: 'create',
glyph: type.getGlyph(),
cssclass: type.getCssClass(),
name: type.getName(),
type: type.getKey(),

View File

@ -120,7 +120,6 @@ define(
mockParent.useCapability.andReturn(mockDomainObject);
mockType.getKey.andReturn("test");
mockType.getGlyph.andReturn("T");
mockType.getCssClass.andReturn("icon-telemetry");
mockType.getDescription.andReturn("a test type");
mockType.getName.andReturn("Test");
@ -139,7 +138,6 @@ define(
expect(metadata.name).toEqual("Test");
expect(metadata.description).toEqual("a test type");
expect(metadata.glyph).toEqual("T");
expect(metadata.cssclass).toEqual("icon-telemetry");
});

View File

@ -75,7 +75,6 @@ define(
testModel = { someKey: "some value" };
mockType.getKey.andReturn("test");
mockType.getGlyph.andReturn("T");
mockType.getCssClass.andReturn("icon-telemetry");
mockType.getDescription.andReturn("a test type");
mockType.getName.andReturn("Test");

View File

@ -67,16 +67,16 @@
// Used in grid-item.html, tree-item, inspector location
@extend .ui-symbol;
@extend .icon;
line-height: inherit; // This is Ok for the symbolsfont
line-height: inherit;
position: relative;
&.l-icon-link {
.t-item-icon-glyph {
&:after {
color: $colorIconLink;
content: "\e921";
content: $glyph-icon-link;
height: auto; width: auto;
position: absolute;
left: 0; top: 0; right: 0; bottom: 10%;
left: 0; top: 0; right: 0; bottom: 20%;
@include transform-origin(bottom left);
@include transform(scale(0.3));
z-index: 2;

View File

@ -258,12 +258,11 @@ define([
{
"key": "root",
"name": "Root",
"glyph": "\u0046"
"cssclass": "icon-folder"
},
{
"key": "folder",
"name": "Folder",
"glyph": "\u0046",
"cssclass": "icon-folder",
"features": "creation",
"description": "Create folders to organize other objects or links to objects.",
@ -275,12 +274,10 @@ define([
{
"key": "unknown",
"name": "Unknown Type",
"glyph": "\u003f",
"cssclass": "icon-object-unknown"
},
{
"name": "Unknown Type",
"glyph": "\u003f",
"cssclass": "icon-object-unknown"
}
],

View File

@ -58,8 +58,7 @@ define(
* @property {string} key machine-readable identifier for this action
* @property {string} name human-readable name for this action
* @property {string} description human-readable description
* @property {string} glyph character to display as icon
* @property {string} cssclass CSS class for icon, supercedes glyph
* @property {string} cssclass CSS class for icon
* @property {ActionContext} context the context in which the action
* will be performed.
*/

View File

@ -56,13 +56,13 @@ define(
* @method Type#getDescription
*/
/**
* Get the glyph associated with this type. Glyphs are
* single-character strings which will appear as icons (when
* Get the cssclass associated with this type. cssclass is a
* string which will appear as an icon (when
* displayed in an appropriate font) which visually
* distinguish types from one another.
*
* @returns {string} the glyph to be displayed
* @method Type#getGlyph
* @returns {string} the cssclass for this type
* @method Type#getCssClass
*/
/**
* Get an array of properties associated with objects of
@ -144,11 +144,6 @@ define(
return this.typeDef.description;
};
TypeImpl.prototype.getGlyph = function () {
// TO-DO: remove this function
return this.typeDef.glyph;
};
TypeImpl.prototype.getCssClass = function () {
return this.typeDef.cssclass;
};

View File

@ -61,7 +61,7 @@ define(
* domain object's whose `type` capability matches or inherits
* from that type.
*
* Views themselves are primarily metadata, such as name, glyph, and
* Views themselves are primarily metadata, such as name, icon and
* description (to be shown in the UI); they do not contain any
* information directly applicable to rendering to the DOM, although
* they do contain sufficient information (such as a `templateUrl`,

View File

@ -33,7 +33,6 @@ define(
key: 'test-type',
name: 'Test Type',
description: 'A type, for testing',
glyph: 't',
cssclass: 'icon-telemetry-panel',
inherits: ['test-parent-1', 'test-parent-2'],
features: ['test-feature-1'],
@ -55,11 +54,7 @@ define(
expect(type.getDescription()).toEqual('A type, for testing');
});
it("exposes glyph from definition", function () {
expect(type.getGlyph()).toEqual('t');
});
it("exposes glyph CSS class from definition", function() {
it("exposes CSS class from definition", function() {
expect(type.getCssClass()).toEqual('icon-telemetry-panel');
});

View File

@ -30,20 +30,17 @@ define(
testTypeDefinitions = [
{
key: 'basic',
glyph: "X",
cssclass: "icon-magnify-in",
name: "Basic Type"
},
{
key: 'multi1',
glyph: "Z",
cssclass: "icon-trash",
description: "Multi1 Description",
capabilities: ['a1', 'b1']
},
{
key: 'multi2',
glyph: "Y",
cssclass: "icon-magnify-out",
capabilities: ['a2', 'b2', 'c2']
},
@ -73,7 +70,6 @@ define(
it("looks up non-inherited types by name", function () {
captured.type = provider.getType('basic');
expect(captured.type.getGlyph()).toEqual("X");
expect(captured.type.getCssClass()).toEqual("icon-magnify-in");
expect(captured.type.getName()).toEqual("Basic Type");
expect(captured.type.getDescription()).toBeUndefined();
@ -82,7 +78,6 @@ define(
it("supports single inheritance", function () {
captured.type = provider.getType('single-subtype');
expect(captured.type.getGlyph()).toEqual("X");
expect(captured.type.getCssClass()).toEqual("icon-magnify-in");
expect(captured.type.getName()).toEqual("Basic Subtype");
expect(captured.type.getDescription()).toEqual("A test subtype");
@ -91,7 +86,6 @@ define(
it("supports multiple inheritance", function () {
captured.type = provider.getType('multi-subtype');
expect(captured.type.getGlyph()).toEqual("Y");
expect(captured.type.getCssClass()).toEqual("icon-magnify-out");
expect(captured.type.getName()).toEqual("Multi-parent Subtype");
expect(captured.type.getDescription()).toEqual("Multi1 Description");

View File

@ -66,7 +66,6 @@ define([
"key": "move",
"name": "Move",
"description": "Move object to another location.",
"glyph": "f",
"cssclass": "icon-move",
"category": "contextual",
"implementation": MoveAction,
@ -80,7 +79,6 @@ define([
"key": "copy",
"name": "Duplicate",
"description": "Duplicate object to another location.",
"glyph": "+",
"cssclass": "icon-duplicate",
"category": "contextual",
"implementation": CopyAction,
@ -97,7 +95,6 @@ define([
"key": "link",
"name": "Create Link",
"description": "Create Link to object in another location.",
"glyph": "è",
"cssclass": "icon-link",
"category": "contextual",
"implementation": LinkAction,
@ -111,7 +108,6 @@ define([
"key": "follow",
"name": "Go To Original",
"description": "Go to the original, un-linked instance of this object.",
"glyph": "",
"cssclass": "",
"category": "contextual",
"implementation": GoToOriginalAction
@ -120,7 +116,6 @@ define([
"key": "locate",
"name": "Set Primary Location",
"description": "Set a domain object's primary location.",
"glyph": "",
"cssclass": "",
"category": "contextual",
"implementation": SetPrimaryLocationAction

View File

@ -136,7 +136,6 @@ define([
],
"category": "contextual",
"name": "Start",
"glyph": "ï",
"cssclass": "icon-play",
"priority": "preferred"
},
@ -148,7 +147,6 @@ define([
],
"category": "contextual",
"name": "Restart at 0",
"glyph": "r",
"cssclass": "icon-refresh",
"priority": "preferred"
}
@ -157,7 +155,6 @@ define([
{
"key": "clock",
"name": "Clock",
"glyph": "\u0043",
"cssclass": "icon-clock",
"description": "A UTC-based clock that supports a variety of display formats. Clocks can be added to Display Layouts.",
"priority": 101,
@ -215,7 +212,6 @@ define([
{
"key": "timer",
"name": "Timer",
"glyph": "\u00f5",
"cssclass": "icon-timer",
"description": "A timer that counts up or down to a datetime. Timers can be started, stopped and reset whenever needed, and support a variety of display formats. Each Timer displays the same value to all users. Timers can be added to Display Layouts.",
"priority": 100,

View File

@ -48,10 +48,6 @@ define(
return "icon-clock";
};
ClockIndicator.prototype.getGlyphClass = function () {
return "no-icon no-collapse float-right subtle";
};
ClockIndicator.prototype.getText = function () {
return this.text;
};

View File

@ -49,7 +49,6 @@ define(
it("implements the Indicator interface", function () {
expect(indicator.getCssClass()).toEqual(jasmine.any(String));
expect(indicator.getGlyphClass()).toEqual(jasmine.any(String));
expect(indicator.getText()).toEqual(jasmine.any(String));
expect(indicator.getDescription()).toEqual(jasmine.any(String));
});

View File

@ -41,7 +41,6 @@ define([
{
"name": "Imagery",
"key": "imagery",
"glyph": "ã",
"cssclass": "icon-image",
"template": imageryTemplate,
"priority": "preferred",

View File

@ -56,7 +56,6 @@ define([
{
"key": "layout",
"name": "Display Layout",
"glyph": "\u004c",
"cssclass": "icon-layout",
"type": "layout",
"template": layoutTemplate,
@ -66,7 +65,6 @@ define([
{
"key": "fixed",
"name": "Fixed Position",
"glyph": "3",
"cssclass": "icon-telemetry-panel",
"type": "telemetry.panel",
"template": fixedTemplate,
@ -142,7 +140,6 @@ define([
},
{
"property": "fill",
"glyph": "",
"cssclass": "icon-paint-bucket",
"title": "Fill color",
"description": "Set fill color",
@ -150,7 +147,6 @@ define([
},
{
"property": "stroke",
"glyph": "â",
"cssclass": "icon-line-horz",
"title": "Border color",
"description": "Set border color",
@ -158,7 +154,6 @@ define([
},
{
"property": "color",
"glyph": "ä",
"cssclass": "icon-T",
"title": "Text color",
"description": "Set text color",
@ -167,7 +162,6 @@ define([
},
{
"property": "url",
"glyph": "ã",
"cssclass": "icon-image",
"control": "dialog-button",
"title": "Image Properties",
@ -180,7 +174,6 @@ define([
},
{
"property": "text",
"glyph": "G",
"cssclass": "icon-gear",
"control": "dialog-button",
"title": "Text Properties",
@ -193,7 +186,6 @@ define([
},
{
"method": "showTitle",
"glyph": "ç",
"cssclass": "icon-two-parts-both",
"control": "button",
"title": "Show title",
@ -201,7 +193,6 @@ define([
},
{
"method": "hideTitle",
"glyph": "å",
"cssclass": "icon-two-parts-one-only",
"control": "button",
"title": "Hide title",
@ -214,7 +205,6 @@ define([
{
"method": "remove",
"control": "button",
"glyph": "Z",
"cssclass": "icon-trash",
"title": "Delete",
"description": "Delete the selected item"
@ -284,7 +274,6 @@ define([
{
"key": "layout",
"name": "Display Layout",
"glyph": "\u004c",
"cssclass": "icon-layout",
"description": "Assemble other objects and components together into a reusable screen layout. Working in a simple canvas workspace, simply drag in the objects you want, position and size them. Save your design and view or edit it at any time.",
"priority": 900,
@ -317,7 +306,6 @@ define([
{
"key": "telemetry.panel",
"name": "Telemetry Panel",
"glyph": "t",
"cssclass": "icon-telemetry-panel",
"description": "A panel for collecting telemetry elements.",
"priority": 899,

View File

@ -36,7 +36,6 @@ define([
{
"key": "example.page",
"name": "Web Page",
"glyph": "\u00ea",
"cssclass": "icon-page",
"description": "Embed a web page or web-based image in a resizeable window component. Can be added to Display Layouts. Note that the URL being embedded must allow iframing.",
"priority": 50,

View File

@ -45,7 +45,6 @@ define([
{
"name": "Plot",
"key": "plot",
"glyph": "6",
"cssclass": "icon-sine",
"template": plotTemplate,
"needs": [

View File

@ -313,7 +313,7 @@ define(
/**
* Get the current mode that is applicable to this plot. This
* will include key, name, and glyph fields.
* will include key, name, and cssclass fields.
*/
PlotController.prototype.getMode = function () {
return this.modeOptions.getMode();

View File

@ -27,14 +27,12 @@ define(
var STACKED = {
key: "stacked",
name: "Stacked",
glyph: "m",
cssclass: "icon-menu-hamburger",
Constructor: PlotStackMode
},
OVERLAID = {
key: "overlaid",
name: "Overlaid",
glyph: "6",
cssclass: "icon-sine",
Constructor: PlotOverlayMode
};
@ -117,7 +115,7 @@ define(
/**
* Get all mode options available for each plot. Each
* mode contains a `name` and `glyph` field suitable
* mode contains a `name` and `cssclass` field suitable
* for display in a template.
* @return {Array} the available modes
*/

View File

@ -36,7 +36,7 @@ define([
{
"key": "static.markup",
"name": "Static Markup",
"glyph": "p",
"cssclass": "icon-pencil",
"description": "Static markup sandbox",
"features": [
"creation"

View File

@ -60,7 +60,6 @@ define([
{
"key": "table",
"name": "Historical Telemetry Table",
"glyph": "\ue604",
"cssclass": "icon-tabular",
"description": "A static table of all values over time for all included telemetry elements. Rows are timestamped data values for each telemetry element; columns are data fields. The number of rows is based on the range of your query. New incoming data must be manually re-queried for.",
"priority": 861,
@ -84,7 +83,6 @@ define([
{
"key": "rttable",
"name": "Real-time Telemetry Table",
"glyph": "\ue620",
"cssclass": "icon-tabular-realtime",
"description": "A scrolling table of latest values for all included telemetry elements. Rows are timestamped data values for each telemetry element; columns are data fields. New incoming data is automatically added to the view.",
"priority": 860,
@ -129,7 +127,6 @@ define([
{
"name": "Historical Table",
"key": "table",
"glyph": "\ue604",
"cssclass": "icon-tabular",
"templateUrl": "templates/historical-table.html",
"needs": [
@ -141,7 +138,6 @@ define([
{
"name": "Real-time Table",
"key": "rt-table",
"glyph": "\ue620",
"cssclass": "icon-tabular-realtime",
"templateUrl": "templates/rt-table.html",
"needs": [

View File

@ -151,7 +151,6 @@ define([
{
"key": "timeline",
"name": "Timeline",
"glyph": "\u0053",
"cssclass": "icon-timeline",
"description": "A time-oriented container that lets you enclose and organize other Timelines and Activities. The Timeline view provides both tabular and Gantt views as well as resource utilization graphing of Activities.",
"priority": 502,
@ -195,7 +194,6 @@ define([
{
"key": "activity",
"name": "Activity",
"glyph": "\u0061",
"cssclass": "icon-activity",
"features": [
"creation"
@ -242,7 +240,6 @@ define([
{
"key": "mode",
"name": "Activity Mode",
"glyph": "\u0041",
"cssclass": "icon-activity-mode",
"features": [
"creation"
@ -283,7 +280,6 @@ define([
{
"key": "values",
"name": "Values",
"glyph": "\u0041",
"cssclass": "icon-activity-mode",
"template": valuesTemplate,
"type": "mode",
@ -295,7 +291,6 @@ define([
{
"key": "timeline",
"name": "Timeline",
"glyph": "\u0053",
"cssclass": "icon-timeline",
"type": "timeline",
"description": "A time-oriented container that lets you enclose and organize other Timelines and Activities. The Timeline view provides both tabular and Gantt views as well as resource utilization graphing of Activities.",
@ -307,19 +302,16 @@ define([
"items": [
{
"method": "add",
"glyph": "\u002b",
"control": "menu-button",
"text": "Add",
"options": [
{
"name": "Timeline",
"glyph": "\u0053",
"cssclass": "icon-timeline",
"key": "timeline"
},
{
"name": "Activity",
"glyph": "\u0061",
"cssclass": "icon-activity",
"key": "activity"
}
@ -330,14 +322,12 @@ define([
{
"items": [
{
"glyph": "\u00e9",
"cssclass": "icon-plot-resource",
"description": "Graph Resource Utilization",
"control": "button",
"method": "toggleGraph"
},
{
"glyph": "icon-activity-mode",
"cssclass": "icon-activity-mode",
"control": "dialog-button",
"description": "Apply Activity Modes...",
@ -351,7 +341,6 @@ define([
"property": "modes"
},
{
"glyph": "\u00e8",
"cssclass": "icon-chain-links",
"description": "Edit Activity Link",
"title": "Activity Link",
@ -365,7 +354,6 @@ define([
"property": "link"
},
{
"glyph": "\u0047",
"cssclass": "icon-gear",
"description": "Edit Properties...",
"control": "button",
@ -379,7 +367,6 @@ define([
"method": "remove",
"description": "Remove Item",
"control": "button",
"glyph": "\u005a",
"cssclass": "icon-trash"
}
]

View File

@ -63,7 +63,6 @@ define(
// Prepare the structure for the button itself
self.buttonStructure = {};
self.buttonStructure.glyph = structure.glyph;
self.buttonStructure.cssclass = structure.cssclass;
self.buttonStructure.name = structure.name;
self.buttonStructure.description = structure.description;

View File

@ -46,7 +46,7 @@ define(
);
testStructure = {
name: "A Test",
glyph: "T",
cssclass: "icon-T",
description: "Test description",
control: "dialog-button",
title: "Test title",
@ -83,7 +83,7 @@ define(
mockScope.$watch.mostRecentCall.args[1](testStructure);
buttonStructure = controller.getButtonStructure();
expect(buttonStructure.glyph).toEqual(testStructure.glyph);
expect(buttonStructure.cssclass).toEqual(testStructure.cssclass);
expect(buttonStructure.description).toEqual(testStructure.description);
expect(buttonStructure.name).toEqual(testStructure.name);
expect(buttonStructure.click).toEqual(jasmine.any(Function));