diff annotator_files/lib/plugin/unsupported.js @ 3:6356e78ccf5c

new version contains Annotator JS files to be used with FilesystemSite.
author casties
date Thu, 05 Apr 2012 19:37:27 +0200
parents
children 6979313586cf
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/annotator_files/lib/plugin/unsupported.js	Thu Apr 05 19:37:27 2012 +0200
@@ -0,0 +1,30 @@
+var __hasProp = Object.prototype.hasOwnProperty,
+  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };
+
+Annotator.Plugin.Unsupported = (function(_super) {
+
+  __extends(Unsupported, _super);
+
+  function Unsupported() {
+    Unsupported.__super__.constructor.apply(this, arguments);
+  }
+
+  Unsupported.prototype.options = {
+    message: Annotator._t("Sorry your current browser does not support the Annotator")
+  };
+
+  Unsupported.prototype.pluginInit = function() {
+    var _this = this;
+    if (!Annotator.supported()) {
+      return $(function() {
+        Annotator.showNotification(_this.options.message);
+        if ((window.XMLHttpRequest === void 0) && (ActiveXObject !== void 0)) {
+          return $('html').addClass('ie6');
+        }
+      });
+    }
+  };
+
+  return Unsupported;
+
+})(Annotator.Plugin);