-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alan Stanley
committed
Feb 22, 2012
1 parent
6de147a
commit 235c2a1
Showing
2 changed files
with
35 additions
and
0 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,9 @@ | ||
$.urlParam = function(name){ | ||
var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href); | ||
if (!results) | ||
{ | ||
return 0; | ||
} | ||
return results[1] || 0; | ||
} | ||
|
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,26 @@ | ||
/* | ||
* AutoLoadEmic | ||
* | ||
* @author Alan Stanley | ||
* | ||
* Wrapper for TILE engine to automatically load | ||
* JSON data from Fedora Repository, based on the PID from the url | ||
* | ||
*/ | ||
var AutoLoadEmic={ | ||
id:"Auto1000101", | ||
name:'AutoLoad', | ||
/* | ||
* start() | ||
* @constructor | ||
* @params mode {Object} - Mode object passed to method | ||
*/ | ||
start:function(mode){ | ||
var PID = $.urlParam('PID'); | ||
|
||
TILE.preLoad='http://localhost/Development/emic/getTILE/' + PID; | ||
} | ||
}; | ||
|
||
// register the plugin with TILE | ||
TILE.engine.registerPlugin(AutoLoadEmic); |