Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitaeverywhere committed Oct 27, 2015
2 parents bf1a4ea + 04d2868 commit cd8cb1f
Show file tree
Hide file tree
Showing 8 changed files with 287 additions and 181 deletions.
2 changes: 1 addition & 1 deletion cache/projectTemplate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Description>
Cache Class Explorer vX.X.X/*build.replace:pkg.version*/
Class contains methods that return structured classes/packages data.</Description>
<TimeChanged>63844,1327.122337</TimeChanged>
<TimeChanged>63844,1495</TimeChanged>
<TimeCreated>63653,67019.989197</TimeCreated>

<Method name="getAllNamespacesList">
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "CacheClassExplorer",
"version": "1.8.2",
"description": "An UML Class explorer for InterSystems Caché",
"version": "1.9",
"description": "Class Explorer for InterSystems Caché",
"directories": {
"test": "test"
},
Expand Down
9 changes: 9 additions & 0 deletions web/css/extras.css
Original file line number Diff line number Diff line change
Expand Up @@ -323,4 +323,13 @@

.nowrap {
white-space: nowrap;
}

.leftAligned {
text-align: left;
}

.inlineBlock {
display: inline-block;
vertical-align: top;
}
42 changes: 42 additions & 0 deletions web/css/helpView.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#helpView {
position: absolute;
width: 100%;
bottom: 0;
height: 0;
background: rgba(245, 245, 245, 0.95);
z-index: 10;
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
-o-transition: all .5s ease;
transition: all .5s ease;
}

#helpView.active {
box-shadow: 0 0 5px black;
height: 100%;
}

#helpView > div.head {
position: absolute;
width: 100%;
box-sizing: border-box;
top: 0;
left: 0;
padding: 1em;
z-index: 2;
}

#helpView > div.head > h2 {
margin: 0;
}

#closeHelp {
float: right;
}

#helpView .body {
padding: 4em 1em 1em 1em;
box-sizing: border-box;
height: 100%;
overflow: auto;
}
150 changes: 150 additions & 0 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<link rel="stylesheet" href="css/joint.min.css"/>
<link rel="stylesheet" href="css/methodCodeView.css"/>
<link rel="stylesheet" href="css/settingsView.css"/>
<link rel="stylesheet" href="css/helpView.css"/>
<link rel="stylesheet" href="css/hoverMessage.css"/>
<!-- endbuild -->
<!-- build:js -->
Expand Down Expand Up @@ -138,6 +139,155 @@ <h1>
</div>
</div>
</div>
<div id="helpView">
<div class="head">
<div id="closeHelp" class="icon cross"></div>
<h2>Caché Class Explorer Help</h2>
</div>
<div class="body">
<p>
This info graphics below shows all the basics of designations on the diagram.
</p>
<div>
<div class="inlineBlock">
<table>
<tbody>
<tr>
<th colspan="4" class="leftAligned"><h2>Class Types</h2></th>
</tr>
<tr>
<td>
<div name="injector">{
"classes": { "Registered": { } }
}</div>
</td>
<td>
<div name="injector">{
"classes": { "Persistent": { "ClassType": "Persistent" } }
}</div>
</td>
<td>
<div name="injector">{
"classes": { "Serial": { "ClassType": "Serial" } }
}</div>
</td>
<td>
<div name="injector">{
"classes": { "Data Type": { "ClassType": "DataType" } }
}</div>
</td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<th colspan="2" class="leftAligned"><h2>Connection Types</h2></th>
</tr>
<tr>
<th class="leftAligned">Association</th>
<td>
<div name="injector">{
"layoutDirection": "LR",
"classes": {
"Class A": { "properties": { "Property": { "Type": "Class B" } } },
"Class B": { "ClassType": "Persistent" }
}
}</div>
</td>
</tr>
<tr>
<th class="leftAligned">One - to - Many</th>
<td>
<div name="injector">{
"layoutDirection": "LR",
"classes": {
"Class A": { "ClassType": "Persistent", "properties": { "Property": { "Cardinality": "one", "Type": "Class B" } } },
"Class B": { "ClassType": "Persistent", "properties": { "Property": { "Cardinality": "many", "Type": "Class A" } } }
}
}</div>
</td>
</tr>
<tr>
<th class="leftAligned">Parent - to - Child</th>
<td>
<div name="injector">{
"layoutDirection": "LR",
"classes": {
"Class B": { "ClassType": "Persistent", "properties": { "Property": { "Cardinality": "child", "Type": "Class A" } } },
"Class A": { "ClassType": "Persistent", "properties": { "Property": { "Cardinality": "parent", "Type": "Class B" } } }
}
}</div>
</td>
</tr>
<tr>
<th class="leftAligned">Inheritance</th>
<td>
<div name="injector">{
"layoutDirection": "LR",
"classes": {
"Derived Class": { "ClassType": "Persistent", "Super": "Inherited Class", "properties": { "Property": { "Type": "Nothing" } } },
"Inherited Class": { "ClassType": "DataType", "properties": { "Property": { "Type": "Nothing" } } }
}
}</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="inlineBlock">
<h2>Icons Description</h2>
<table>
<tr><td name="icon">crystalBall</td><td>Abstract</td></tr>
<tr><td name="icon">blueFlag</td><td>Final</td></tr>
<tr><td name="icon">moleculeCubeCross</td><td>Not a Procedure Block</td></tr>
<tr><td name="icon">ghost</td><td>Hidden</td></tr>
<tr><td name="icon">minus</td><td>Private</td></tr>
<tr><td name="icon">plus</td><td>Public</td></tr>
<tr><td name="icon">keyRed</td><td>Unique Key</td></tr>
<tr><td name="icon">keyGreen</td><td>Primary Key or ID Key</td></tr>
<tr><td name="icon">keyYellow</td><td>Just a Key</td></tr>
<tr><td name="icon">user</td><td>Client Method</td></tr>
<tr><td name="icon">redFlag</td><td>Not Inheritable</td></tr>
<tr><td name="icon">table</td><td>SQL Procedure</td></tr>
<tr><td name="icon">earth</td><td>WEB Method</td></tr>
<tr><td name="icon">zed</td><td>ZEN Method</td></tr>
<tr><td name="icon">eye</td><td>Read Only</td></tr>

</table>
</div>
</div>
<p>
Some of the class properties or parameters and all of the methods and SQL procedures
<b>are clickable</b>. You can click them and get additional information such as code of
the method or code of SQL procedure.
</p>
<p>
Elements which have italic font are <b>hoverable</b>. You can hover over them
to get additional information. Non-hoverable elements are usually those which
does not have any keywords or comments defined.
</p>
<script>
var cont = [].slice.call(document.querySelectorAll("#helpView *[name=injector]")),
cont2 = [].slice.call(document.querySelectorAll("#helpView *[name=icon]")), i;
for (i in cont) {
var ue, json = {
classes: { "Unable to parse JSON": { } }
};
try { json = JSON.parse(cont[i].textContent) } catch (e) { }
cont[i].textContent = "";
ue = new CacheClassExplorer(null, cont[i]);
ue.classView.injectView(json);
}
for (i in cont2) {
var ico = lib.image[cont2[i].textContent];
if (ico) {
cont2[i].innerHTML = "<img src=\"" + ico + "\"/>"
}
}
</script>
</div>
</div>
</div>
</body>
</html>
20 changes: 16 additions & 4 deletions web/js/CacheClassExplorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ var CacheClassExplorer = function (treeViewContainer, classViewContainer) {
diagramSearchButton: id("button.diagramSearch"),
settingsView: id("settingsView"),
closeSettings: id("closeSettings"),
helpView: id("helpView"),
closeHelp: id("closeHelp"),
settingsExtraText: id("settingsExtraText"),
settings: {
showDataTypesOnDiagram: id("setting.showDataTypesOnDiagram"),
Expand Down Expand Up @@ -66,13 +68,17 @@ var CacheClassExplorer = function (treeViewContainer, classViewContainer) {
};

this.UI = new UI(this);
this.source = new Source(this);
this.classTree = new ClassTree(this, treeViewContainer);
if (treeViewContainer) {
this.source = new Source(this);
this.classTree = new ClassTree(this, treeViewContainer);
}
this.classView = new ClassView(this, classViewContainer);
this.NAMESPACE = null;

this.initSettings();
this.init();
if (treeViewContainer) {
this.initSettings();
this.init();
}

};

Expand Down Expand Up @@ -207,6 +213,12 @@ CacheClassExplorer.prototype.init = function () {
self.setNamespace(ns);
}
});
this.elements.helpButton.addEventListener("click", function () {
self.elements.helpView.classList.add("active");
});
this.elements.closeHelp.addEventListener("click", function () {
self.elements.helpView.classList.remove("active");
});
this.elements.showSettingsButton.addEventListener("click", function () {
self.elements.settingsView.classList.add("active");
});
Expand Down
Loading

0 comments on commit cd8cb1f

Please sign in to comment.