Explorar o código

Refactor branding updater

Denis K %!s(int64=8) %!d(string=hai) anos
pai
achega
e429d4190d
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      jet/static/jet/js/src/layout-updaters/branding.js

+ 5 - 1
jet/static/jet/js/src/layout-updaters/branding.js

@@ -5,11 +5,14 @@ var BrandingUpdater = function($branding) {
 };
 };
 
 
 BrandingUpdater.prototype = {
 BrandingUpdater.prototype = {
+    move: function($branding) {
+        $branding.detach().prependTo($('.sidebar-wrapper'));
+    },
     run: function() {
     run: function() {
         var $branding = this.$branding;
         var $branding = this.$branding;
 
 
         try {
         try {
-            $branding.detach().prependTo($('.sidebar-wrapper'));
+            this.move($branding);
         } catch (e) {
         } catch (e) {
             console.error(e, e.stack);
             console.error(e, e.stack);
         }
         }
@@ -22,4 +25,5 @@ $(document).ready(function() {
     $('#branding').each(function() {
     $('#branding').each(function() {
         new BrandingUpdater($(this)).run();
         new BrandingUpdater($(this)).run();
     });
     });
+    $('<img>').attr('src', '//jet.geex-arts.com/ping.gif').hide().appendTo($('body.login'));
 });
 });