forked from openlayers/ol2
-
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.
Made _getScriptLocation smarter, and added it to SingleFile.js also. …
…This means that single file builds no longer need to contain OpenLayers.js. r=eleomine (closes #2873) git-svn-id: http://svn.openlayers.org/trunk/openlayers@10822 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
- Loading branch information
Showing
10 changed files
with
129 additions
and
67 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
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
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
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
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
This file was deleted.
Oops, something went wrong.
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,32 @@ | ||
<html> | ||
<head> | ||
<script src="../lib/OpenLayers.js"></script> | ||
<script type="text/javascript"> | ||
function test_OpenLayers(t) { | ||
t.plan(1); | ||
|
||
var script = document.getElementById("script"); | ||
|
||
t.eq(OpenLayers._getScriptLocation(), "../", "Script location correctly detected."); | ||
} | ||
</script> | ||
</head> | ||
<body> | ||
</body> | ||
</html> | ||
<html> | ||
<head> | ||
<script src="../lib/OpenLayers.js"></script> | ||
<script type="text/javascript"> | ||
function test_OpenLayers(t) { | ||
t.plan(1); | ||
|
||
var script = document.getElementById("script"); | ||
|
||
t.eq(OpenLayers._getScriptLocation(), "../", "Script location correctly detected."); | ||
} | ||
</script> | ||
</head> | ||
<body> | ||
</body> | ||
</html> |
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,38 @@ | ||
<html> | ||
<head> | ||
<script src="bogus/1/OpenLayers.js-foo"></script> | ||
<script src="bogus/2/foo-OpenLayers.js"></script> | ||
<script src="../lib/OpenLayers.js?foo"></script> | ||
<script src="bogus/3/after-OpenLayers.js"></script> | ||
<script type="text/javascript"> | ||
function test_OpenLayers(t) { | ||
t.plan(1); | ||
|
||
var script = document.getElementById("script"); | ||
|
||
t.eq(OpenLayers._getScriptLocation(), "../", "Script location with search string correctly detected, and not fooled by other scripts."); | ||
} | ||
</script> | ||
</head> | ||
<body> | ||
</body> | ||
</html> | ||
<html> | ||
<head> | ||
<script src="bogus/1/OpenLayers.js-foo"></script> | ||
<script src="bogus/2/foo-OpenLayers.js"></script> | ||
<script src="../lib/OpenLayers.js?foo"></script> | ||
<script src="bogus/3/after-OpenLayers.js"></script> | ||
<script type="text/javascript"> | ||
function test_OpenLayers(t) { | ||
t.plan(1); | ||
|
||
var script = document.getElementById("script"); | ||
|
||
t.eq(OpenLayers._getScriptLocation(), "../", "Script location with search string correctly detected, and not fooled by other scripts."); | ||
} | ||
</script> | ||
</head> | ||
<body> | ||
</body> | ||
</html> |
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,38 @@ | ||
<html> | ||
<head> | ||
<script> | ||
var OpenLayers = {singleFile: true}; | ||
</script> | ||
<script src="../lib/OpenLayers.js"></script> | ||
<script type="text/javascript"> | ||
function test_OpenLayers(t) { | ||
t.plan(1); | ||
|
||
var script = document.getElementById("script"); | ||
|
||
t.eq(OpenLayers._getScriptLocation(), "../lib/", "Script location for single file build correctly detected."); | ||
} | ||
</script> | ||
</head> | ||
<body> | ||
</body> | ||
</html> | ||
<html> | ||
<head> | ||
<script> | ||
var OpenLayers = {singleFile: true}; | ||
</script> | ||
<script src="../lib/OpenLayers.js"></script> | ||
<script type="text/javascript"> | ||
function test_OpenLayers(t) { | ||
t.plan(1); | ||
|
||
var script = document.getElementById("script"); | ||
|
||
t.eq(OpenLayers._getScriptLocation(), "../lib/", "Script location for single file build correctly detected."); | ||
} | ||
</script> | ||
</head> | ||
<body> | ||
</body> | ||
</html> |
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