Commit Graph

1185 Commits

Author SHA1 Message Date
Chris Adams
3434fe600c Tests: update AJAX tests
* IE8 support for makeAjaxRequest test (xhr.response does not exist,
  responseText is supported by all major browsers)
* Update makeAjaxRequest test to confirm that the success callback is
  called and that the error callback is not
* Add a test for makeAjaxRequest with an invalid file and verify that
  error callback is called but the success callback is not
2013-07-02 16:37:19 -04:00
Chris Adams
6d7dd71577 Tests: IE8 support for log capture
No Array.indexOf. We are living like animals!
2013-07-02 16:20:56 -04:00
Chris Adams
9fb4ae2a9a Tests: more targeted log capture setup
@Ventero pointed out that functions also have a length property
2013-07-02 16:09:23 -04:00
Chris Adams
2a3044e0cf Tests: verify invalid string log messages 2013-07-02 15:20:17 -04:00
Chris Adams
7131c7a7da Tests: check for AJAX error log message 2013-07-02 15:19:55 -04:00
Chris Adams
5a300998a8 Tests: console log capture utility 2013-07-02 15:12:16 -04:00
Chris Adams
d782da411e Tests: code cleanup 2013-07-02 13:56:55 -04:00
radix-pro
3c7e4b794a Update iiiftilesource.js 2013-07-02 00:41:22 -07:00
radix-pro
8f8e028015 Update iiiftilesource.js 2013-07-02 00:34:23 -07:00
radix-pro
acd55c709d Update iiiftilesource.js 2013-07-02 00:27:53 -07:00
radix-pro
040ff3a7ae Update iiiftilesource.js 2013-07-02 00:18:37 -07:00
radix-pro
a4303fb232 Update iiiftilesource.js 2013-07-02 00:02:48 -07:00
radix-pro
0441cfe4ec Update iiiftilesource.js 2013-07-01 23:55:07 -07:00
radix-pro
44a9d1b98b Update iiiftilesource.js 2013-07-01 23:49:25 -07:00
radix-pro
dde42b641d Update iiiftilesource.js
Fix Issue #55 "Tiles rendering issue..."
2013-07-01 22:38:37 -07:00
Chris Adams
59a254bea6 Tests: add open failure tests, overhaul test framework
* Add tests for open failures
* Refactor tests to avoid tests depending on implied status from
  previous tests:
  1. The viewer is now created and destroyed for each
     test to avoid pollution and simplify error handling: nothing
     starts until you request it.
  2. Some tests like Basic: Homepage depended on the Zoom & Pan tests;
     now this is handled explicitly as part of the test setup
  3. All basic tests are now properly async tests (since they needed
     the viewer to load, they really were in the past except that
     they were relying on the viewer state left behind from previous
     tests)
* All tests now run inside the qunit-fixture to prevent masking
  failures. Util.resetDom() has been refactored to use the
  qunit-fixture and the teardown logic only used in the navigator
  tests has been moved into the navigator test teardown method
* Fixed undeclared mainViewerElement variable in optional path in
  the navigator tests
* JSHint cleanup
2013-07-01 18:26:44 -04:00
Chris Adams
0ed4703bd3 Viewport messages: add a class to the dialog for easy styling 2013-07-01 18:26:44 -04:00
Chris Adams
7048cda69e Tests: getString with placeholder expansion 2013-07-01 16:55:39 -04:00
Chris Adams
1ab6094420 Viewer: make viewport messages private, repeatable
* Marked _showMessage/_hideMessage as private
* Fix DOM manipulation bug: call standard removeNode() method rather
  than proprietary WebKit .remove()
* Change messageDiv to be the outer wrapper to simplify removing the
  entire message container
2013-07-01 13:43:48 -04:00
Chris Adams
b912896158 Viewer.showMessage() hides any previous message 2013-07-01 12:58:22 -04:00
Chris Adams
d447bd5612 Remove detritus left behind from error handler testing 2013-07-01 12:55:58 -04:00
Ian Gilman
d68999bc87 Changelog for #149 2013-07-01 09:23:10 -07:00
iangilman
73edc5935b Merge pull request #149 from acdha/simplified-ajax-requests
Simplify OpenSeadragon.makeAjaxRequest
2013-07-01 09:21:30 -07:00
Chris Adams
9de45ba281 Refactor OpenSeadragon.makeCenteredNode
* Use CSS display tables for vertical centering (tested back to IE8)
* Use the DOM instead of string concatenation
* Remove redundant styles ($.makeNeutralElement sets the same values
  for margin, padding & border)
* Return the outer wrapper element to ease DOM addition & removal
2013-06-28 15:52:48 -04:00
Chris Adams
1f345e4cc5 Viewer: refactor message code into showMessage/hideMessage methods
This avoids the need to deal with classes, and explicitly makes it
reusable for other needs
2013-06-28 15:46:31 -04:00
Chris Adams
630bccad3d Basic demo: set HTML5 doctype
This keeps IE8 out of quirks mode, which breaks things like 
getWindowSize…
2013-06-28 15:44:38 -04:00
Chris Adams
7f42dfc032 code style 2013-06-28 15:01:56 -04:00
Chris Adams
fb7c91acd2 code style 2013-06-28 14:54:44 -04:00
Chris Adams
7dcf662fdd Viewer: add a basic error message display system
This might be something we want to make configurable for users who want
to completely control how errors are displayed.

This also adds the first use of OpenSeadragon.makeCenteredNode currently
so we might want to clean up that code as well.
2013-06-28 14:32:57 -04:00
Chris Adams
2bf6b13bfe User-visible warning when tile sources fail to load
This is currently using window.alert in lieu of something more sophisticated but it works for indicating 404s or invalid file
contents
2013-06-28 14:11:20 -04:00
Chris Adams
494bf7fe41 strings: add logging for untranslated source messages
This should probably be changed to be closer to the goal of being
like gettext but we can at least tell developers when we clobber the
string
2013-06-28 14:11:19 -04:00
Chris Adams
464428cef7 makeAjaxRequest: don't set request to null
Setting onreadystatechange can avoid the possibility of it somehow being
called twice but there's no point in nulling the request right before we
let the GC collect it.
2013-06-28 14:00:02 -04:00
Chris Adams
db38b71dd9 makeAjaxRequest: throw error for missing callback 2013-06-27 16:03:43 -04:00
Chris Adams
1c6a57c710 makeAjaxRequest: log all errors, test callback
* All AJAX errors will log to the console
* The onError callback will only be called if defined
2013-06-27 16:03:41 -04:00
Chris Adams
5eccdfee98 Better match project style 2013-06-27 15:58:09 -04:00
Chris Adams
496b7d757b Simplify OpenSeadragon.makeAjaxRequest
* Since async is always true – and browsers are starting to deprecate
  synchronous XHR – we were able to prune considerable amount of code
* Add an error callback to match the existing success callback
2013-06-27 15:58:09 -04:00
iangilman
bb1dd78979 Merge pull request #148 from acdha/test-globals-cleanup
Tests: avoid leaking into global scope
2013-06-27 09:33:36 -07:00
Chris Adams
c850121e9b Tests: avoid leaking into global scope
This means that this will pass without error:

http://127.0.0.1:8000/test/test.html?noglobals=true
2013-06-26 16:54:37 -04:00
Ian Gilman
dcbb338083 Changelog for #136 2013-06-26 09:38:07 -07:00
iangilman
8fe0ce26b8 Merge pull request #136 from acdha/jshint-cleanup
JSHint tidying
2013-06-26 09:37:08 -07:00
Ian Gilman
e731c850b5 Changelog for #144 2013-06-26 09:24:55 -07:00
iangilman
f4139cef38 Merge pull request #144 from acdha/143-xhr-error-handling
Safe cleanup in makeAjaxRequest error handler
2013-06-26 09:23:04 -07:00
Ian Gilman
ae3c68a646 Added changelog for #142 2013-06-26 09:15:48 -07:00
Ian Gilman
3f1072b321 Fixed typos in comments 2013-06-26 09:15:37 -07:00
iangilman
1df4448be7 Merge pull request #142 from blind-coder/master
Fix for calculating overlay width / height
2013-06-26 09:13:31 -07:00
Chris Adams
c648c1df8a drawer: don't leak drawLevel into global namespace
This code is still under-tested and documented but no longer relies on
`drawLevel` being leaked into the global namespace where `updateLevel`
to find it.

See #145
2013-06-25 14:26:09 -04:00
Chris Adams
f2cba16a8b Safe cleanup in makeAjaxRequest error handler
Previously `request.onreadystatechange` was assigned an empty function
on success but null on failures, which breaks in IE (see
http://jsbin.com/ezozax/6/).

This patch simply mimics the success behaviour in the cleanup function

Closes #143
2013-06-25 14:13:45 -04:00
Benjamin 'blindCoder' Schieder
0150622e78 fix error when recalculating overlay width and height 2013-06-25 18:01:38 +02:00
Chris Adams
c2107fcb22 Declare _processDZIError directly on OpenSeadragon 2013-06-21 16:37:31 -04:00
Ian Gilman
9cbda1bd8f Updated changelog for #138 2013-06-21 09:30:45 -07:00