Patches item #1774878, was opened at 2007-08-15 12:12
Message generated for change (Settings changed) made by hansonr
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=379135&aid=1774878&group_id=23629
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: File IO
Group: None
>Status: Closed
Priority: 5
Private: No
Submitted By: Jonathan Gutow (gutow)
Assigned to: Nobody/Anonymous (nobody)
Summary: Patches to make PopIn pages more user friendly
Initial Comment:
This patch primarily changes the template for the repeated div in the popin
pages generated. The idea is to make it so that someone using a simple web
page editor like SeaMonkey (aka Netscape) or any number of others can edit all
the text without having to edit the html code. In addition these changes make
it so that the page behaves gracefully (shows pictures) if the javascript
fails. There are also a few changes to the code to put images into the web
page.
Jonathan
Here is the patch:
------------------------------
Index:
/Users/jonathan/Documents/Programming/java/Jmol/src/org/openscience/jmol/app/webexport/pop_in_template.html
===================================================================
---
/Users/jonathan/Documents/Programming/java/Jmol/src/org/openscience/jmol/app/webexport/pop_in_template.html
(revision 8091)
+++
/Users/jonathan/Documents/Programming/java/Jmol/src/org/openscience/jmol/app/webexport/pop_in_template.html
(working copy)
@@ -2,23 +2,13 @@
<html>
<head>
<!--/* Allows to open Jmol models on request, in a div
-
-
-
Available from http://biomodel.uah.es/Jmol/ and
http://wiki.jmol.org/
-
Author: Angel Herrez. Version 2007.04.23
-
Modified by Jonathan Gutow Version 2007.07.17
-
-
This template is offered freely for anyone to use or adapt it,
-
according to Creative Commons Attribution-ShareAlike 3.0 License,
-
http://creativecommons.org/licenses/by-sa/3.0/
-
*/-->
<meta content="text/html; charset=iso-8859-1"
http-equiv="Content-Type">
@@ -28,17 +18,12 @@
.floatRightDiv { padding:0.3em 0.5ex; font-size:0.9em; float:right;}
.floatLeftDiv { padding:0.3em 0.5ex; font-size:0.9em; float:left;}
</style>
+ <script>
+ var appletpath = "@APPLETPATH@";
+ var pathtojmolscripts= appletpath+"/Jmol.js";
+ </script>
<script src="JmolPopIn.js" type="text/javascript"></script>
- <script src="@APPLETPATH@/Jmol.js" type="text/javascript"></script>
-
-
-<script type='text/javascript'>
- jmolInitialize("@APPLETPATH@"); //Where Jmol.jar is; if you change this,
also change it in the above script tag
- jmolSetDocument(false); //Required
- dataDir = "."; //Where the data AND SCRIPT files are to be found.
-</script>
-
-
+ <script src="@APPLETPATH@/Jmol.js" type="text/javascript"></script>
<meta content="J. Gutow" name="author">
<meta content="Based on javascript by A. Herraez" name="description">
</head>
@@ -47,14 +32,17 @@
<div style="text-align: center;"><Insert Your TITLE HERE><br>
</div>
<Insert Your INTRODUCTION HERE></div>
-
[EMAIL PROTECTED]@
-
-<table style="width:100%">
+<script type="text/javascript">
+ jmolInitialize(appletpath);
+ jmolSetDocument(false);
+ dataDir = "."; //Where the data AND SCRIPT files are to be
found.
+</script>
+<table style = "width: 100%;" border="0" cellpadding="0" cellspacing="0">
+<tbody>
@APPLETDEFS@
-</table>
-
-<div style="text-align: right;">Based on template by A. Herraez as modified by
J. Gutow</div>
+</tbody></table><br>
+<div style="text-align: right;">Based on template by A. Herraez as
+modified by J. Gutow and B. Hanson</div>
<div style="text-align: right;">
@CREATIONDATA@
</div>
Index:
/Users/jonathan/Documents/Programming/java/Jmol/src/org/openscience/jmol/app/webexport/pop_in_template2.html
===================================================================
---
/Users/jonathan/Documents/Programming/java/Jmol/src/org/openscience/jmol/app/webexport/pop_in_template2.html
(revision 8091)
+++
/Users/jonathan/Documents/Programming/java/Jmol/src/org/openscience/jmol/app/webexport/pop_in_template2.html
(working copy)
@@ -4,20 +4,21 @@
<table style="text-align: left; width: @[EMAIL PROTECTED];" border='1'
cellpadding='2' cellspacing='2'>
<tr>
<td style="vertical-align: top; width: @[EMAIL PROTECTED]; height:
@[EMAIL PROTECTED];">
-
- <script type="text/javascript">
-
- putJmolDiv(@I@, "@[EMAIL PROTECTED]", "@[EMAIL PROTECTED]",
@WIDTH@, @HEIGHT@);
-
- </script>
-
+ <div id="[EMAIL PROTECTED]@" class="JmolDiv" style="width:
@[EMAIL PROTECTED]; height: @[EMAIL PROTECTED]; background-image:URL(@IMAGE@)">
+ <table cellpadding="10">
+ <tr>
+ <td style="color: rgb(255, 255, 51);">
+ To get a 3-D model you can
manipulate, click <a
href="javascript:void(popInJmol(@I@,'@SCRIPT@',@WIDTH@,@HEIGHT@))">here</a>.
+ Download time may be
significant the first time the applet is loaded.
+ </td>
+ </tr>
+ </table>
+ </div>
</td>
</tr>
<tr>
- <td style="vertical-align: top;">
-
- insert caption for @NAME@ here
-
+ <td style="vertical-align: top;">
+ insert caption for @NAME@ here
</td>
</tr>
</table>
@@ -23,8 +24,6 @@
</table>
</div>
<div>
-
- insert note for @NAME@ here
-
+Insert additonal explanatory text here. Long text will wrap around the Jmol
model @[EMAIL PROTECTED]
</div></div></td></tr>
Index:
/Users/jonathan/Documents/Programming/java/Jmol/src/org/openscience/jmol/app/webexport/PopInJmol.java
===================================================================
---
/Users/jonathan/Documents/Programming/java/Jmol/src/org/openscience/jmol/app/webexport/PopInJmol.java
(revision 8091)
+++
/Users/jonathan/Documents/Programming/java/Jmol/src/org/openscience/jmol/app/webexport/PopInJmol.java
(working copy)
@@ -61,6 +61,8 @@
s = TextFormat.simpleReplace(s, "@WIDTH@", "" + JmolSizeW);
s = TextFormat.simpleReplace(s, "@HEIGHT@", "" + JmolSizeH);
s = TextFormat.simpleReplace(s, "@NAME@", name);
+ s = TextFormat.simpleReplace(s, "@SCRIPT@", name+".spt");
+ s = TextFormat.simpleReplace(s, "@IMAGE@",
instance.pictFile.substring(instance.pictFile.lastIndexOf("/")+1,
instance.pictFile.length()));
appletDefs.append(s);
}
return html;
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=379135&aid=1774878&group_id=23629
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers