From a400136e66f74e033b4970eef2bb2494425f4cf5 Mon Sep 17 00:00:00 2001 From: Ruud Date: Mon, 16 Apr 2012 00:06:57 +0200 Subject: [PATCH] Use custom mask for question --- couchpotato/static/scripts/library/question.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/couchpotato/static/scripts/library/question.js b/couchpotato/static/scripts/library/question.js index b80005e..cab6346 100644 --- a/couchpotato/static/scripts/library/question.js +++ b/couchpotato/static/scripts/library/question.js @@ -18,13 +18,7 @@ var Question = new Class( { createMask : function() { var self = this - $(document.body).mask( { - 'hideOnClick' : true, - 'destroyOnHide' : true, - 'onHide' : function() { - self.container.destroy(); - } - }).show(); + self.mask = new Element('div.mask').fade('hide').inject(document.body).fade('in'); }, createQuestion : function() { @@ -71,7 +65,11 @@ var Question = new Class( { }, close : function() { - $(document.body).get('mask').destroy(); + var self = this; + self.mask.fade('out'); + (function(){self.mask.destroy()}).delay(1000); + + this.container.destroy(); }, toElement : function() {