Show More
@@ -99,19 +99,22 b' define([' | |||
|
99 | 99 | }, timeout); |
|
100 | 100 | } |
|
101 | 101 | |
|
102 | // bind the click callback if it is given | |
|
103 |
if (click_callback |
|
|
104 | this.element.click(function () { | |
|
105 | if (click_callback() !== false) { | |
|
106 | that.element.fadeOut(100, function () {that.inner.text('');}); | |
|
107 | } | |
|
108 | that.element.unbind('click'); | |
|
109 | if (that.timeout !== null) { | |
|
110 | clearTimeout(that.timeout); | |
|
111 | that.timeout = null; | |
|
112 | } | |
|
113 | }); | |
|
102 | // if no click callback assume we will just dismiss the notification | |
|
103 | if (click_callback === undefined) { | |
|
104 | click_callback = function(){return true}; | |
|
114 | 105 | } |
|
106 | // on click, remove widget if click callback say so | |
|
107 | // and unbind click event. | |
|
108 | this.element.click(function () { | |
|
109 | if (click_callback() !== false) { | |
|
110 | that.element.fadeOut(100, function () {that.inner.text('');}); | |
|
111 | that.element.unbind('click'); | |
|
112 | } | |
|
113 | if (that.timeout !== null) { | |
|
114 | clearTimeout(that.timeout); | |
|
115 | that.timeout = null; | |
|
116 | } | |
|
117 | }); | |
|
115 | 118 | }; |
|
116 | 119 | |
|
117 | 120 | /** |
General Comments 0
You need to be logged in to leave comments.
Login now