add help text to relationship mapper
Tara L Andrews [Wed, 7 Mar 2012 12:13:43 +0000 (13:13 +0100)]
stemmaweb/lib/stemmaweb/Controller/Relation.pm
stemmaweb/lib/stemmaweb/View/TT.pm
stemmaweb/root/css/relationship.css
stemmaweb/root/js/relationship.js
stemmaweb/root/src/header.tt
stemmaweb/root/src/relate.tt

index 832a447..4ca7a25 100644 (file)
@@ -29,6 +29,19 @@ sub index :Path :Args(0) {
        $c->stash->{'template'} = 'relate.tt';
 }
 
+=head2 help
+
+ GET relation/help
+
+Returns the help window HTML.
+
+=cut
+
+sub help :Local :Args(0) {
+       my( $self, $c ) = @_;
+       $c->stash->{'template'} = 'relatehelp.tt';
+}
+
 =head2 definitions
 
  GET relation/definitions
index 493f8a6..55061d7 100644 (file)
@@ -10,6 +10,7 @@ __PACKAGE__->config(
     INCLUDE_PATH => [
        stemmaweb->path_to( 'root', 'src' ),
     ],
+    ENCODING => 'utf-8',
     render_die => 1,
 );
 
index c0d1d8b..0d85213 100644 (file)
@@ -13,10 +13,19 @@ body {
        height: 100px;
        margin-top: 20px;
 }
+#bannerinfo {
+       float: right;
+       margin-right: 12%;
+       margin-top: 15px;
+}
 #logoimg {
        float: left;
        margin-left: 20px;
 }
+.helptag {
+       color: #488dd2;
+       text-decoration: underline;
+}
 #logotitle {
        float: left;
        margin-left: 30px;
index 2cbd7ee..414b78c 100644 (file)
@@ -586,6 +586,15 @@ $(document).ready(function () {
      }
   });
   
+  $('.helptag').popupWindow({ 
+         height:500, 
+         width:800, 
+         top:50, 
+         left:50,
+         scrollbars:1 
+  }); 
+
+  
   function toggle_relation_active( node_id ) {
       $('#svgenlargement .relation').find( "title:contains('" + node_id +  "')" ).each( function(index) {
           matchid = new RegExp( "^" + node_id );
index 6d844a1..1bd5508 100644 (file)
@@ -10,6 +10,7 @@
     <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.popupWindow.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 -%]
index 17ffc96..72ea8e1 100644 (file)
@@ -11,6 +11,9 @@ $(function() {
 [% END %]
 
        <div id="topbanner">
+               <div id="bannerinfo">
+                       <a href="help" title="Relationship mapper help" class="helptag">Help / About</a>
+               </div>
                <h1>Relationship mapper</h1>
                <h2>[% text_title %]</h2>
        </div>
@@ -36,7 +39,7 @@ $(function() {
                        <select name="scope" id="scope" class=".ui-widget select">
                        </select>
                        <br/><br/>
-                       <label for="note">Annotation on note..&nbsp;</label>
+                       <label for="note">Annotation or note..&nbsp;</label>
                        <input type="text" width="60" name="note" id="note" class=".ui-widget input" />
                </fieldset>
        <div id="status"></div>