OSDN Git Service

update html
[sawarabi-fonts/sawarabi-fonts.git] / html / js / lang.js
index 1b6294c..6fdb2ca 100644 (file)
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.4.0
+// Generated by CoffeeScript 1.12.7
 (function() {
   var CurrentLangLabel, LangMenu, LangMenuItem, availableLanguages, main;
 
   };
 
   CurrentLangLabel = (function() {
-
     function CurrentLangLabel(menu) {
-      var _this = this;
       this.el = "#current-lang";
       this.$el = $(this.el);
       this.menu = menu;
-      this.$el.click(function(event) {
-        event.stopPropagation();
-        return $(_this.menu.$el).css({
-          "z-index": 99
-        }).toggle();
-      });
+      this.$el.click((function(_this) {
+        return function(event) {
+          event.stopPropagation();
+          return $(_this.menu.$el).css({
+            "z-index": 99
+          }).toggle();
+        };
+      })(this));
     }
 
     CurrentLangLabel.prototype.text = function() {
@@ -40,7 +40,6 @@
   })();
 
   LangMenuItem = (function() {
-
     function LangMenuItem(langSymbol, langText) {
       this.$el = $(document.createElement("div"));
       this.$el.attr({
   })();
 
   LangMenu = (function() {
-
     function LangMenu() {
       this.el = "#lang-menu-container";
       this.$el = $(this.el);
     }
 
     LangMenu.prototype.buildItems = function(currentLangText) {
-      var k, v,
-        _this = this;
+      var k, v;
       for (k in availableLanguages) {
         v = availableLanguages[k];
         if (v === currentLangText) {
         }
       }
       $('.item', this.$el).click(this.onclickItem);
-      $('body').click(function() {
-        return _this.$el.hide();
-      });
+      $('body').click((function(_this) {
+        return function() {
+          return _this.$el.hide();
+        };
+      })(this));
     };
 
     LangMenu.prototype.onclickItem = function(event) {
       var key, root;
-      console.log(this);
       if ($(this).attr("id") === "current-lang") {
         return;
       }
       key = $(this).attr("data-key") + '/';
-      if (key === 'ja/') {
-        key = '';
-      }
       root = '../';
-      if ($("div#current-lang").attr("data-key") === "ja") {
-        root = './';
-      }
       window.location = root + key;
     };