Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don't worry, you can still create the pull request.
  • 4 commits
  • 13 files changed
  • 0 commit comments
  • 1 contributor
View
10 scripted/demos/cloud/index.html
@@ -1,13 +1,21 @@
<html>
<head>
<title>SIMILE Widgets | Exhibit | Examples | Cloud</title>
- <link rel="stylesheet" href="style.css" type="text/css" />
+ <link rel="stylesheet" href="http://www.simile-widgets.org/styles/common.css" type="text/css" />
<link href="tagged-data.js" type="application/json" rel="exhibit-data" />
<script src="http://api.simile-widgets.org/exhibit/3.0.0rc1/exhibit-api.js"></script>
</head>
<body>
+ <ul id="path">
+ <li><a href="http://www.simile-widgets.org/">SIMILE Widgets</a></li>
+ <li><a href="http://www.simile-widgets.org/exhibit3/">Exhibit 3.0</a></li>
+ <li><a href="http://databench.zepheira.com/">Demos</a></li>
+ <li><a href="http://databench.zepheira.com/demos/">Scripted Demos</a></li>
+ <li><span>Examples: Tag Cloud</span></li>
+ </ul>
+
<div ex:role="exhibit-collection" ex:itemTypes="Celebrity"></div>
<table id="frame">
<tr>
View
12 scripted/demos/history/decide.html
@@ -3,14 +3,22 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>2008 Presidential Election Candidates on the Issues</title>
-
- <link href="opinions.js" type="application/json" rel="exhibit-data" />
+ <link rel="stylesheet" href="http://www.simile-widgets.org/styles/common.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="style.css" />
+ <link href="opinions.js" type="application/json" rel="exhibit-data" />
<script src="http://api.simile-widgets.org/exhibit/3.0.0rc1/exhibit-api.js"></script>
</head>
<body>
+ <ul id="path">
+ <li><a href="http://www.simile-widgets.org/">SIMILE Widgets</a></li>
+ <li><a href="http://www.simile-widgets.org/exhibit3/">Exhibit 3.0</a></li>
+ <li><a href="http://databench.zepheira.com/">Demos</a></li>
+ <li><a href="http://databench.zepheira.com/demos/">Scripted Demos</a></li>
+ <li><span>Examples: 2008 Election Decision</span></li>
+ </ul>
+
<div ex:itemtypes="Candidate" ex:role="exhibit-collection"></div>
<div id="content">
<div id="header" class="title-panel">
View
2  scripted/demos/history/style.css
@@ -25,7 +25,7 @@ div.exhibit-facet-header-filterControl {
float: left;
width: 19%;
margin: 0 1% 0 0;
- font-size: 0.7em;
+ font-size: 0.9em;
}
#f1 .exhibit-facet-body,
View
12 scripted/demos/icd/index.html
@@ -1,13 +1,22 @@
<html>
<head>
<title>ICD10 Hierarchical Facet Browser</title>
- <link rel="exhibit-data" href="icd10-infectious.json" />
+ <link rel="stylesheet" href="http://www.simile-widgets.org/styles/common.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="style.css" />
+ <link rel="exhibit-data" href="icd10-infectious.json" />
<script src="http://api.simile-widgets.org/exhibit/3.0.0rc1/exhibit-api.js"></script>
</head>
<body>
+ <ul id="path">
+ <li><a href="http://www.simile-widgets.org/">SIMILE Widgets</a></li>
+ <li><a href="http://www.simile-widgets.org/exhibit3/">Exhibit 3.0</a></li>
+ <li><a href="http://databench.zepheira.com/">Demos</a></li>
+ <li><a href="http://databench.zepheira.com/demos/">Scripted Demos</a></li>
+ <li><span>Examples: ICD10 Hierarchical Facet</span></li>
+ </ul>
+ <div id="content">
<h1>ICD10 Hierarchical Term Browser</h1>
<table cellspacing="0" cellpadding="0" border="0" width="100%"><tr>
@@ -90,5 +99,6 @@
</td>
</tr>
</table>
+ </div>
</body>
</html>
View
7 scripted/demos/icd/style.css
@@ -1,8 +1,11 @@
body {
+ padding: 0;
+ background: #ffffff;
+}
+
+#content {
font-family: "Gill Sans", "Trebuchet MS", "Helvetica", "Arial", "sans serif";
font-size: 11pt;
- padding: 0.5in;
- background: #ffffff;
}
table {
View
12 scripted/demos/nobelists/nobelists.html
@@ -1,7 +1,7 @@
<html>
<head>
<title>SIMILE Widgets | Exhibit | Examples | MIT Nobel Prize Winners</title>
-
+ <link rel="stylesheet" href="http://www.simile-widgets.org/styles/common.css" type="text/css" />
<link href="nobelists.js" type="application/json" rel="exhibit-data" />
<script src="http://api.simile-widgets.org/exhibit/3.0.0rc1/exhibit-api.js"></script>
@@ -9,7 +9,6 @@
<style>
body {
- font-size: 75%;
margin: 0;
padding: 0;
font-family: "Lucida Grande","Tahoma","Helvetica","Arial",sans-serif;
@@ -75,6 +74,14 @@
</script>
</head>
<body>
+ <ul id="path">
+ <li><a href="http://www.simile-widgets.org/">SIMILE Widgets</a></li>
+ <li><a href="http://www.simile-widgets.org/exhibit3/">Exhibit 3.0</a></li>
+ <li><a href="http://databench.zepheira.com/">Demos</a></li>
+ <li><a href="http://databench.zepheira.com/demos/">Scripted Demos</a></li>
+ <li><span>Examples: MIT Nobelists</span></li>
+ </ul>
+
<div id="main-content">
<div id="title-panel">
<h1>63 MIT-related Nobel Prize Winners</h1>
@@ -134,6 +141,7 @@
ex:viewClass="Timeline"
ex:start=".nobel-year"
ex:colorKey=".discipline"
+ ex:caption=".discipline"
ex:bubbleWidth="150"
ex:bubbleHeight="150">
<div ex:role="lens" class="nobelist-timeline-lens" style="display: none;">
View
9 scripted/demos/senate/html5.html
@@ -2,6 +2,7 @@
<html>
<head>
<title>SIMILE Widgets | Exhibit | Examples | Senate</title>
+ <link rel="stylesheet" href="http://www.simile-widgets.org/styles/common.css" type="text/css" />
<link rel="stylesheet" href="styles.css" />
<link href="senate-committees.js" type="application/json" rel="exhibit-data" />
@@ -23,6 +24,14 @@
</head>
<body>
+ <ul id="path">
+ <li><a href="http://www.simile-widgets.org/">SIMILE Widgets</a></li>
+ <li><a href="http://www.simile-widgets.org/exhibit3/">Exhibit 3.0</a></li>
+ <li><a href="http://databench.zepheira.com/">Demos</a></li>
+ <li><a href="http://databench.zepheira.com/demos/">Scripted Demos</a></li>
+ <li><span>Examples: Senate (HTML5)</span></li>
+ </ul>
+
<div data-ex-role="exhibit-collection" data-ex-item-types="Senator"></div>
<table id="frame">
<tr>
View
9 scripted/demos/senate/senate.html
@@ -1,6 +1,7 @@
<html>
<head>
<title>SIMILE Widgets | Exhibit | Examples | Senate</title>
+ <link rel="stylesheet" href="http://www.simile-widgets.org/styles/common.css" type="text/css" />
<link rel="stylesheet" href="styles.css" type="text/css" />
<link href="senate-committees.js" type="application/json" rel="exhibit-data" />
@@ -22,6 +23,14 @@
</head>
<body>
+ <ul id="path">
+ <li><a href="http://www.simile-widgets.org/">SIMILE Widgets</a></li>
+ <li><a href="http://www.simile-widgets.org/exhibit3/">Exhibit 3.0</a></li>
+ <li><a href="http://databench.zepheira.com/">Demos</a></li>
+ <li><a href="http://databench.zepheira.com/demos/">Scripted Demos</a></li>
+ <li><span>Examples: Senate</span></li>
+ </ul>
+
<div ex:role="exhibit-collection" ex:itemTypes="Senator"></div>
<table id="frame">
<tr>
View
9 scripted/demos/thumbnail/index.html
@@ -1,6 +1,7 @@
<html>
<head>
<title>SIMILE Widgets | Exhibit | Examples | Thumbnail View</title>
+ <link rel="stylesheet" href="http://www.simile-widgets.org/styles/common.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
<link href="tagged-data.js" type="application/json" rel="exhibit-data" />
@@ -8,6 +9,14 @@
</head>
<body>
+ <ul id="path">
+ <li><a href="http://www.simile-widgets.org/">SIMILE Widgets</a></li>
+ <li><a href="http://www.simile-widgets.org/exhibit3/">Exhibit 3.0</a></li>
+ <li><a href="http://databench.zepheira.com/">Demos</a></li>
+ <li><a href="http://databench.zepheira.com/demos/">Scripted Demos</a></li>
+ <li><span>Examples: Thumbnail View</span></li>
+ </ul>
+
<div ex:role="exhibit-collection" ex:itemTypes="Celebrity"></div>
<table id="frame">
<tr>
View
9 scripted/demos/thumbnail/tabled.html
@@ -1,6 +1,7 @@
<html>
<head>
<title>SIMILE Widgets | Exhibit | Examples | Thumbnail View</title>
+ <link rel="stylesheet" href="http://www.simile-widgets.org/styles/common.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
<link href="tagged-data.js" type="application/json" rel="exhibit-data" />
@@ -8,6 +9,14 @@
</head>
<body>
+ <ul id="path">
+ <li><a href="http://www.simile-widgets.org/">SIMILE Widgets</a></li>
+ <li><a href="http://www.simile-widgets.org/exhibit3/">Exhibit 3.0</a></li>
+ <li><a href="http://databench.zepheira.com/">Demos</a></li>
+ <li><a href="http://databench.zepheira.com/demos/">Scripted Demos</a></li>
+ <li><span>Examples: Thumbnail View with Columns</span></li>
+ </ul>
+
<div ex:role="exhibit-collection" ex:itemTypes="Celebrity"></div>
<table id="frame">
<tr>
View
27 scripted/src/extensions/time/scripts/timeline-view.js
@@ -113,10 +113,18 @@ Exhibit.TimelineView._accessorSpecs = [
"attributeName": "eventLabel",
"type": "text"
},
+ // hoverText is deprecated in Timeline, does not work at all with an event.
+ // It will still work here as an attribute name, but it will be overridden
+ // by caption. Eventually hoverText will disappear as an option.
{
"accessorName": "getHoverText",
"attributeName": "hoverText",
"type": "text"
+ },
+ {
+ "accessorName": "getCaption",
+ "attributeName": "caption",
+ "type": "text"
}
];
@@ -385,7 +393,7 @@ Exhibit.TimelineView.prototype._reconstructTimeline = function(newEvents) {
*
*/
Exhibit.TimelineView.prototype._reconstruct = function() {
- var self, collection, database, settings, accessors, currentSize, unplottableItems, currentSet, hasColorKey, hasIconKey, hasHoverText, colorCodingFlags, iconCodingFlags, events, addEvent, legendWidget, colorCoder, keys, k, key, color, iconCoder, icon, plottableSize, band, centerDate, earliest, latest;
+ var self, collection, database, settings, accessors, currentSize, unplottableItems, currentSet, hasColorKey, hasIconKey, hasHoverText, hasCaption, colorCodingFlags, iconCodingFlags, events, addEvent, legendWidget, colorCoder, keys, k, key, color, iconCoder, icon, plottableSize, band, centerDate, earliest, latest;
self = this;
collection = this.getUIContext().getCollection();
@@ -406,7 +414,8 @@ Exhibit.TimelineView.prototype._reconstruct = function() {
currentSet = collection.getRestrictedItems();
hasColorKey = (this._accessors.getColorKey !== null);
hasIconKey = (this._accessors.getIconKey !== null && this._iconCoder !== null);
- hasHoverText = (this._accessors.getHoverText !== null);
+ hasHoverText = this._accessors.getHoverText !== null;
+ hasCaption = this._accessors.getCaption !== null;
colorCodingFlags = { mixed: false, missing: false, others: false, keys: new Exhibit.Set() };
iconCodingFlags = { mixed: false, missing: false, others: false, keys: new Exhibit.Set() };
events = [];
@@ -426,7 +435,7 @@ Exhibit.TimelineView.prototype._reconstruct = function() {
icon: icon,
color: color,
textColor: color,
- hoverText: hoverText
+ caption: hoverText
});
evt._itemID = itemID;
evt.getProperty = function(name) {
@@ -463,6 +472,7 @@ Exhibit.TimelineView.prototype._reconstruct = function() {
icon = self._iconCoder.translateSet(iconKeys, iconCodingFlags);
}
+ // deprecated, will be overwritten by caption if caption is used
if (hasHoverText) {
hoverKeys = new Exhibit.Set();
accessors.getHoverText(itemID, database, function(key) { hoverKeys.add(key); });
@@ -473,6 +483,17 @@ Exhibit.TimelineView.prototype._reconstruct = function() {
}
}
+ // caption supercedes hoverText
+ if (hasCaption) {
+ hoverKeys = new Exhibit.Set();
+ accessors.getCaption(itemID, database, function(key) { hoverKeys.add(key); });
+ for (i in hoverKeys._hash) {
+ if (hoverKeys._hash.hasOwnProperty(i)) {
+ hoverText = i;
+ }
+ }
+ }
+
for (i = 0; i < durations.length; i++) {
addEvent(itemID, durations[i], color, icon, hoverText);
}
View
4 scripted/src/scripts/bc/attributes.js
@@ -29,7 +29,7 @@ Exhibit.Backwards.Attributes.enable = function() {
/**
* A backwards compatible mechanism for retrieving an Exhibit attribute value.
* @static
- * @param {Element} elmt
+ * @param {jQuery|Element} elmt
* @param {String} name
* @param {String} splitOn
* @returns {String|Array}
@@ -38,7 +38,7 @@ Exhibit.Backwards.Attributes.getAttribute = function(elmt, name, splitOn) {
var value, i, values;
try {
- value = elmt.getAttribute(name);
+ value = $(elmt).attr(name);
if (typeof value === "undefined" || value === null || value.length === 0) {
value = $(elmt).attr(Exhibit.Backwards.Attributes.prefix+name);
if (typeof value === "undefined" || value === null || value.length === 0) {
View
4 scripted/src/scripts/exhibit.js
@@ -35,7 +35,7 @@ Exhibit.checkBackwardsCompatibility = function() {
* Retrieve an Exhibit-specific attribute from an element.
*
* @static
- * @param {Element} elmt
+ * @param {jQuery|Element} elmt
* @param {String} name Full attribute name or Exhibit attribute (without any
* prefix), e.g., "id" or "itemTypes". "item-types" or "data-ex-item-types"
* are equivalent to "itemTypes", but "itemTypes" is the preferred form.
@@ -47,7 +47,7 @@ Exhibit.getAttribute = function(elmt, name, splitOn) {
var value, i, values;
try {
- value = elmt.getAttribute(name);
+ value = $(elmt).attr(name);
if (typeof value === "undefined" || value === null || value.length === 0) {
value = $(elmt).data("ex-"+name);
if (typeof value === "undefined" || value === null || value.length === 0) {

No commit comments for this range

Something went wrong with that request. Please try again.