-<style type="text/css" media="screen">
body {
margin: 0;
padding: 0 20px;
list-style: none;
margin-bottom: 3px;
}
-</style>
--- /dev/null
+#variants_table {
+ float: left;
+ width: 450px;
+ height: 550px;
+ border-right: 1px #c6dcf1 solid;
+ margin-left: 20px;
+ overflow: auto;
+}
+#stemma_graph {
+ height: 450px;
+ float: left;
+ width: 500px;
+ text-align: center;
+ border: 1px #c6dcf1 solid;
+}
+#statistics {
+ font-style: italic;
+ margin-bottom: 25px;
+ position: relative;
+ top: -15px;
+}
+.genealogical {
+ background: #88ffaa;
+}
+.coincidental {
+ background: #fff;
+}
+.conflict {
+ background: #ff6666;
+}
+.active_variant_row {
+ background: #c6dcf1;
+ font-style: italic;
+}
+.active_variant_cell {
+ background: #e8f1fe;
+}
+.cellb0 {
+ border-right: 20px solid #ffeeaa;
+}
+.cellb1 {
+ border-right: 20px solid #afc6e9;
+}
+.cellb2 {
+ border-right: 20px solid #d5fff6;
+}
+.cellb3 {
+ border-right: 20px solid #ffccaa;
+}
+.cellb4 {
+ border-right: 20px solid #ffaaaa;
+}
+.cellb5 {
+ border-right: 20px solid #e5ff80;
+}
+.cellb6 {
+ border-right: 20px solid #e5d5ff;
+}
+.cellb7 {
+ border-right: 20px solid #ffd5e5;
+}
-<style type="text/css" media="screen">
-
/* General site-wide layout */
body {
margin: 0;
font-style: italic;
}
+div.button {
+ background: transparent url('../images/b_button_a.png') no-repeat scroll top right;
+ color: #fff;
+ display: block;
+ float: left;
+ font: normal 12px Times, Times New Roman, Serif; /* arial, sans-serif; */
+ height: 24px;
+ margin-right: 6px;
+ padding-right: 18px; /* sliding doors padding */
+ text-decoration: none;
+}
+div.button.reset {
+ background: transparent url('../images/c_button_a.png') no-repeat scroll top right;
+}
+div.button span {
+ background: transparent url('../images/b_button_span.png') no-repeat;
+ display: block;
+ line-height: 14px;
+ padding: 5px 0 5px 18px;
+}
+div.button.reset span {
+ background: transparent url('../images/c_button_span.png') no-repeat;
+}
+div.button:hover {
+ background-position: bottom right;
+ color: #444;
+ outline: none; /* hide dotted outline in Firefox */
+}
+div.button:hover span {
+ background-position: bottom left;
+}
+
+
/* Index page components */
#directory_container {
border: 1px #c6dcf1 solid;
}
#directory {
+ margin-left: 10px;
}
.traditionname {
text-decoration: underline;
.mainnav a {
color: #488dd2;
}
-#variant_graph {
+#variant_container {
clear: both;
- /* width: 900px; */
height: 400px;
+ padding-top: 20px;
+}
+#variant_graph {
+ /* width: 900px; */
+ clear: both;
overflow: auto;
text-align: center;
}
#variant_graph img {
margin-top: expression(( 400 - this.height ) / 2);
}
+#stemma_container {
+ float: left;
+ height: 450px;
+ margin-left: 40px;
+}
+#stemma_container h2 h3 {
+ color: #666;
+}
#stemma_graph {
- float: left;
+ height: 375px;
width: 500px;
- height: 450px;
text-align: center;
- margin-left: 50px;
+ border: 1px #c6dcf1 solid;
}
#stemma_graph img {
margin-top: expression(( 450 - this.height ) / 2);
}
-/* Additional components for the stexaminer */
-#variants_table {
- float: left;
- width: 450px;
- height: 550px;
- border-right: 1px #c6dcf1 solid;
- margin-left: 20px;
- overflow: auto;
+#stexaminer_button {
+ bottom: 0;
+ margin-top: 5px;
}
-#statistics {
- font-style: italic;
- margin-bottom: 25px;
- position: relative;
- top: -15px;
-}
-.genealogical {
- background: #88ffaa;
-}
-.coincidental {
- background: #fff;
-}
-.conflict {
- background: #ff6666;
-}
-.active_variant_row {
- background: #c6dcf1;
- font-style: italic;
-}
-.active_variant_cell {
- background: #e8f1fe;
-}
-.cellb0 {
- border-right: 20px solid #ffeeaa;
-}
-.cellb1 {
- border-right: 20px solid #afc6e9;
-}
-.cellb2 {
- border-right: 20px solid #d5fff6;
-}
-.cellb3 {
- border-right: 20px solid #ffccaa;
-}
-.cellb4 {
- border-right: 20px solid #ffaaaa;
-}
-.cellb5 {
- border-right: 20px solid #e5ff80;
-}
-.cellb6 {
- border-right: 20px solid #e5d5ff;
-}
-.cellb7 {
- border-right: 20px solid #ffd5e5;
+#relater_button {
+ float: left;
+ margin-left: 83px;
+ margin-top: 7px;
}
-</style>
\ No newline at end of file
-function loadTradition( textid ) {
+function loadTradition( textid, textname ) {
// First insert the placeholder image
var basepath = window.location.pathname
if( basepath.lastIndexOf('/') == basepath.length - 1 ) {
variant_svg_element.height.baseVal.value = container_height;
variant_svg_element.width.baseVal.value = (svg_width/svg_height * container_height);
});
+
+ // Then populate the various elements with the right text name/ID.
+ // Stemma and variant graph titles
+ $('.texttitle').empty();
+ $('.texttitle').append( textname );
+ // Stexaminer submit action
+ $('#run_stexaminer').attr( 'action', basepath + "/stexaminer/" + textid );
+ // Relationship mapper submit action
+ $('#run_relater').attr( 'action', basepath + "/relation/" + textid );
}
--- /dev/null
+var colors = ['#ffeeaa','#afc6e9','#d5fff6','#ffccaa','#ffaaaa','#e5ff80','#e5d5ff','#ffd5e5'];
+
+$(document).ready(function() {
+ $('svg').width('485px');
+})
+
+
+
+function load_stemma_svg( topic, data, subscriberData ) {
+ var params = {};
+ var postData = {};
+
+ postData.textid = data;
+
+ params[gadgets.io.RequestParameters.METHOD] = gadgets.io.MethodType.POST;
+ params[gadgets.io.RequestParameters.POST_DATA] = gadgets.io.encodeValues(postData);
+ var url = "http://eccentricity.org:3000/svg_service";
+
+ gadgets.io.makeRequest(url,
+ function (o) {
+ displaySVG(o.text);
+ }, params);
+
+}
+
+function loaded() {
+ gadgets.window.adjustHeight(400);
+ subId = gadgets.Hub.subscribe("interedition.svg.dot.coloring", do_color_nodes);
+ subId = gadgets.Hub.subscribe("interedition.svg.dot.decoloring", de_color_nodes);
+ subId = gadgets.Hub.subscribe("interedition.tradition.selected", load_stemma_svg);
+}
+
+if (gadgets.util.hasFeature('pubsub-2')) {
+ gadgets.HubSettings.onConnect = function(hum, suc, err) { loaded(); };
+}
+else gadgets.util.registerOnLoadHandler(loaded);
$(document).ready(function() {
$('.rowid').click( function() {
row_triggered = true;
- $('ellipse').attr( {stroke:'black', fill:'#fff'} );
+ $('ellipse').attr( {stroke:'white', fill:'#fff'} );
$('.node').children('polygon').attr( {stroke:'#fff', fill:'#fff'} );
$('.node').children('text').attr( {stroke:'none', fill:'#000'} );
$('tr.active_variant_row').children('td').removeClass('cellb0 cellb1 cellb2 cellb3 cellb4 cellb5 cellb6 cellb7');
if( !row_triggered ) {
$('tr.active_variant_row').children('td').removeClass('cellb0 cellb1 cellb2 cellb3 cellb4 cellb5 cellb6 cellb7');
$('td.active_variant_cell').removeClass('active_variant_cell');
- $('ellipse').attr( {stroke:'black', fill:'#fff'} );
+ $('ellipse').attr( {stroke:'white', fill:'#fff'} );
$('.node').children('polygon').attr( {stroke:'#fff', fill:'#fff'} );
$('.node').children('text').attr( {stroke:'none', fill:'#000'} );
};
<ul>
[% SET i = 0 -%]
[% FOREACH t IN texts -%]
- <li><span class="traditionname" onClick="$('.traditionname').removeClass('selected');$(this).addClass('selected');loadTradition('[% t.id %]')">[% t.name %]</span></li>
+ <li><span class="traditionname" onClick="$('.traditionname').removeClass('selected');$(this).addClass('selected');loadTradition('[% t.id %]','[% t.name %]')">[% t.name %]</span></li>
[% i = i + 1 -%]
[% END -%]
</table>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<link type="text/css" href="[% c.uri_for('/css/cupertino/jquery-ui-1.8.13.custom.css') %]" rel="stylesheet" />
<link type="text/css" href="[% c.uri_for('/css/style.css') %]" rel="stylesheet" />
+[% IF applicationstyle -%]
+ <link type="text/css" href="[% applicationstyle %]" rel="stylesheet" />
+[% END -%]
<script type="text/javascript" src="[% c.uri_for('/js/jquery-1.4.4.min.js') %]"></script>
<script type="text/javascript" src="[% c.uri_for('/js/jquery-ui-1.8.10.custom.min.js') %]"></script>
<script type="text/javascript" src="[% c.uri_for('/js/jquery.mousewheel.min.js') %]"></script>
<script type="text/javascript" src="[% c.uri_for('/js/jquery.svg.js') %]"></script>
<script type="text/javascript" src="[% c.uri_for('/js/jquery.svgdom.js') %]"></script>
+[% IF applicationjs -%]
<script type="text/javascript" src="[% applicationjs %]"></script>
+[% END -%]
[% content %]
<title>[% pagetitle %]</title>
</head>
applicationjs = c.uri_for( 'js/componentload.js' )
%]
<script type="text/javascript">
+var selectedTextID;
$(document).ready(function() {
// call out to load the directory div
$('#directory').load( "[% c.uri_for( 'directory' ) %]" );
<img src="[% c.uri_for( 'images', 'ajax-loader.gif' ) %]" />
</div>
</div>
- <div id="stemma_graph"></div>
- <div id="variant_graph"></div>
+ <div id="stemma_container">
+ <h2>Stemma for <span class="texttitle">selected text</span></h2>
+ <div id="stemma_graph"></div>
+ <form id="run_stexaminer" action="" method="GET" name="run_stexaminer">
+ <div class="button" id="stexaminer_button" onClick="$('#run_stexaminer').submit()">
+ <span>Examine variants against this stemma</span>
+ </div>
+ </form>
+ </div>
+ <div id="variant_container">
+ <div style="float: left"><h2>Variant graph for <span class="texttitle">selected text</span></h2></div>
+ <form id="run_relater" action="" method="GET" name="run_relater">
+ <div class="button" id="relater_button" onClick="$('#run_relater').submit()">
+ <span>Run relationship mapper</span>
+ </div>
+ </form>
+ <div id="variant_graph"></div>
+ </div>
[% PROCESS footer.tt %]
\ No newline at end of file
[% WRAPPER header.tt
pagetitle = "Stemmaweb - Relationship mapper"
- applicationjs = base _ "/js/relationship.js"
+ applicationjs = c.uri_for('/js/relationship.js')
+ applicationstyle = c.uri_for('/css/relationship.css')
%]
<script type="text/javascript">
$(function() {
$('#svgenlargement').svg({loadURL: '[% svg_string %]', onLoad: svgEnlargementLoaded});
});
</script>
-<link type="text/css" href="[% c.uri_for('/css/relationship.css') %]" rel="stylesheet" />
[% END %]
<div id="graph_container">
[% PROCESS header.tt
pagetitle = "Stexaminer - $text_title"
- applicationjs = base _ "js/stexaminer.js"
+ applicationjs = c.uri_for('/js/stexaminer.js')
+ applicationstyle = c.uri_for('/css/stexaminer.css')
%]
<h1>Stexaminer</h1>
<h2>[% text_title %]</h2>