if( basepath.lastIndexOf('/') == basepath.length - 1 ) {
basepath = basepath.slice( 0, basepath.length - 1)
};
+var textOnLoad = "[% withtradition %]";
var selectedTextID;
var selectedTextInfo;
var selectedStemmaID = -1;
if (status == "error") {
var msg = "An error occurred: ";
$("#directory").html(msg + xhr.status + " " + xhr.statusText);
+ } else {
+ if( textOnLoad != "" ) {
+ // Call the click callback for the relevant text, if it is
+ // in the page.
+ $('#'+textOnLoad).click();
+ textOnLoad = "";
+ }
}
}
);
<div id="topbanner">
<h1>Stemmaweb - a collection of tools for analysis of collated texts</h1>
- <span class="mainnav">[% IF c.user_exists %]Hello! [% c.user.get_object.email %] <a class="navlink" href="[% c.uri_for( '/logout' ) %]">Sign out</a> | [% ELSE %]<a class="navlink" onclick="window.open('[% c.uri_for( '/login' ) %]', 'loginwindow', 'height=385,width=445')">Login</a> | <a class="navlink" onclick="window.open('[% c.uri_for( '/register' ) %]', 'regwindow', 'height=385,width=445')">Register</a> | [% END %]<a class="navlink" href="[% c.uri_for( 'about.html' ) %]">About</a> </span>
+ <span class="mainnav">[% IF c.user_exists %]Hello! [% c.user.get_object.email %] <a class="navlink" href="[% c.uri_for( '/logout' ) %]">Sign out</a> | [% ELSE %]<a class="navlink" onclick="window.open('[% c.uri_for( '/login' ) %]', 'loginwindow', 'height=385,width=445')">Login</a> | [% END %]<a class="navlink" href="[% c.uri_for( 'about.html' ) %]">About</a> </span>
</div>
<div id="directory_container">
<h2>Text directory</h2>
<div id="textinfo_container_buttons">
<form id="stemma_pager" action="" method="GET" name="stemma_pager">
<div id="stemma_pager_buttons">
- <div class="pager_left_button" id="stemma_pager_left_button" onClick="$('#stemma_pager').submit()"></div>
- <div class="pager_right_button" id="stemma_pager_right_button" onClick="$('#stemma_pager').submit()"></div>
+ <div class="pager_left_button" id="stemma_pager_left_button"></div>
+ <div class="pager_right_button" id="stemma_pager_right_button"></div>
</div>
</form>
<form id="open_stemma_add" action="" method="GET" name="add_new_stemma">