-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
issue #20, contacts, jnlp, error logging added
- Loading branch information
1 parent
c5f2e3e
commit 7a8aa38
Showing
4 changed files
with
41 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
js/samp.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,13 +55,14 @@ You can pass options object to initialization function: | |
|
||
get Aladin(DSS2) #{coords} 15arcmin;sync;"UCAC3, #{name}" = get VizieR(UCAC3,allcolumns) #{coords} #{radius}arcmin;sync;set "UCAC3, #{name}" shape=triangle color=red | ||
|
||
where #{coords}, #{name} and #{radius} are placeholders. | ||
where #{coords}, #{name} and #{radius} are placeholders. IMPORTANT: To be able send scripts to aladin, you must use included in distribution jnlp file as default hub. JSAMP hub used in Topcat restricts by default unknown MTypes, so it is necessary to run it with -web:norestrictmtypes key. | ||
|
||
e.g. customizing table headings sort icons | ||
|
||
var tOptions = { sortIcon: { asc: '<img src="up.png"/>', desc: '<img src="down.png"/>' } }; | ||
AstroTools.init({ tableOptions: tOptions }) | ||
|
||
|
||
Features | ||
======== | ||
|
||
|
@@ -165,3 +166,4 @@ Markup Example | |
|
||
<a class="at-table-link" data-vo-table-id="123456" href="http://andromeda.star.bris.ac.uk/data/messier.xml" data-vo-table-name="Exampe table">Table</a> | ||
|
||
Contact me [email protected], if you still have a question. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ var AstroTools = (function() { | |
ClientTracker, | ||
waitingForHubInterval, | ||
isHubOnlineInterval, | ||
defaultHubUrl = 'http://www.starlink.ac.uk/topcat/topcat-lite.jnlp', | ||
defaultHubUrl = 'topcat-lite.jnlp', | ||
iconUrl = 'img/icon.png', | ||
aladinScript = 'get Aladin(DSS2) #{coords} 15arcmin;sync;"UCAC3, #{name}" = get VizieR(UCAC3,allcolumns) #{coords} #{radius}arcmin;sync;set "UCAC3, #{name}" shape=triangle color=red', | ||
table, | ||
|
@@ -177,6 +177,7 @@ var AstroTools = (function() { | |
} | ||
|
||
function noop() { } | ||
function errorHandler( error ) { if ( window.console ) console.error( error ) } | ||
|
||
function disconnect() { | ||
if ( SAMPConnection ) { | ||
|
@@ -225,8 +226,11 @@ var AstroTools = (function() { | |
function declareMetadata() { | ||
SAMPConnection.declareMetadata([{ | ||
'samp.name': 'AstroTools', | ||
'samp.description': 'Simple toolbox', | ||
'samp.icon.url': absolutizeURL( iconUrl ) | ||
'samp.description.text': 'Simple toolbox', | ||
'samp.icon.url': absolutizeURL( iconUrl ), | ||
'home.page': 'https://github.com/AnotherOneAckap/AstroTools', | ||
'author.name': 'Askar Timirgazin, Ivan Zolotukhin', | ||
'author.email': '[email protected]' | ||
}], noop, onError ); | ||
} | ||
|
||
|
@@ -331,7 +335,7 @@ var AstroTools = (function() { | |
'script': script | ||
}); | ||
if ( that.SAMPConnection instanceof samp.Connection && ! that.SAMPConnection.closed ) | ||
that.SAMPConnection.notifyAll([message]); | ||
that.SAMPConnection.notifyAll( [message], noop, errorHandler ); | ||
|
||
// sending to others | ||
var | ||
|
@@ -343,7 +347,7 @@ var AstroTools = (function() { | |
'dec': dec.toString() | ||
}); | ||
if ( that.SAMPConnection instanceof samp.Connection && ! that.SAMPConnection.closed ) | ||
that.SAMPConnection.notifyAll([message]); | ||
that.SAMPConnection.notifyAll( [message], noop, errorHandler ); | ||
}); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0"?> | ||
<jnlp spec="1.0+" codebase="http://andromeda.star.bris.ac.uk/~mbt/topcat"> | ||
<information> | ||
<title>TOPCAT</title> | ||
<vendor>Mark Taylor, Bristol University, UK</vendor> | ||
<homepage href="http://www.starlink.ac.uk/topcat/"/> | ||
<description kind="one-line">"TOPCAT - lite version"</description> | ||
<icon href="images/tc_sok.gif"/> | ||
<offline-allowed/> | ||
<!-- <shortcut online="false"><desktop/></shortcut> --> | ||
<related-content href="sun253/index.html"> | ||
<title>SUN/253</title> | ||
<description kind="one-line">Comprehensive user document</description> | ||
</related-content> | ||
</information> | ||
<security> | ||
<all-permissions/> | ||
</security> | ||
<resources> | ||
<j2se version="1.5+"/> | ||
<jar href="topcat-lite.jar"/> | ||
</resources> | ||
<application-desc main-class="uk.ac.starlink.topcat.Driver"> | ||
<argument>-jsamp</argument> | ||
<argument>hub</argument> | ||
<argument>-web:norestrictmtypes</argument> | ||
</application-desc> | ||
</jnlp> |