From 22e789294a1fa77201aade4b785e998ac1f37092 Mon Sep 17 00:00:00 2001
From: PavelBegunkov <asml.silence@gmail.com>
Date: Tue, 26 Jul 2016 14:34:18 +0300
Subject: [PATCH] Fix wnd.js error + dead code elimination/

---
 media/js/settings.js                                  | 7 -------
 media/js/student/index.js                             | 4 ++--
 media/js/wnd/wnd.js                                   | 2 +-
 ~dev_rating/application/classes/Controller/Window.php | 5 +----
 4 files changed, 4 insertions(+), 14 deletions(-)

diff --git a/media/js/settings.js b/media/js/settings.js
index 8f16b483d..431254870 100644
--- a/media/js/settings.js
+++ b/media/js/settings.js
@@ -103,11 +103,4 @@ function onSettingsPopup() {
             }, 'json'
         );
     });
-
-
-    // email section
-    $('.changeEmail').click(function () {
-        //if (/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,6})$/.test($('.inputNewEmail').val()))
-        //    $.post(URLdir+'/handler/settings/changeEmail', {'email': $('.inputNewEmail').val()},
-    });
 }
diff --git a/media/js/student/index.js b/media/js/student/index.js
index b5c439f5c..c4c2487c4 100644
--- a/media/js/student/index.js
+++ b/media/js/student/index.js
@@ -1,6 +1,6 @@
 $(function () {
     $('#openHelp').click(function () {
         $.postJSON(URLdir + 'window/help:student:index')
-            .done(data => wnd.open(data))
+            .done(data => wnd.open(data));
     });
-});
\ No newline at end of file
+});
diff --git a/media/js/wnd/wnd.js b/media/js/wnd/wnd.js
index a89f454f8..2f9708a77 100644
--- a/media/js/wnd/wnd.js
+++ b/media/js/wnd/wnd.js
@@ -11,7 +11,7 @@ wnd.show = function () {
 
 wnd.hide = function () {
     wnd.isShow = false;
-    wnd.$.page.css({ position: 'static', 'margin-top', 0 });
+    wnd.$.page.css({ position: 'static', 'margin-top': 0 });
     $(window).scrollTop(wnd.scroll);
     wnd.$.window.fadeOut("fast");
 };
diff --git a/~dev_rating/application/classes/Controller/Window.php b/~dev_rating/application/classes/Controller/Window.php
index 2605ccf16..749311ecc 100644
--- a/~dev_rating/application/classes/Controller/Window.php
+++ b/~dev_rating/application/classes/Controller/Window.php
@@ -5,10 +5,7 @@ class Controller_Window extends Controller
     private $user;
 
     public function before() {
-        $user = User::instance();
-        //if ($user->isSignedIn()) {
-        //    $this->user = $user->toArray();
-        //}
+        $this->user = User::instance();
     }
 
     public function action_get() {
-- 
GitLab