mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 04:23:46 +00:00
hotspots: Move the code for closing hotspot icon to hotspots.js.
This commit is contained in:
committed by
Tim Abbott
parent
e58534022e
commit
120ebc8f13
@@ -646,12 +646,7 @@ $(function () {
|
||||
// open
|
||||
$('body').on('click', '.hotspot-icon', function (e) {
|
||||
// hide icon
|
||||
$(this).animate({ opacity: 0 }, {
|
||||
duration: 300,
|
||||
done: function () {
|
||||
$(this).css({ display: 'none' });
|
||||
}.bind(this),
|
||||
});
|
||||
hotspots.close_hotspot_icon(this);
|
||||
|
||||
// show popover
|
||||
var hotspot_name = $(e.target).closest('.hotspot-icon')
|
||||
|
||||
@@ -207,6 +207,15 @@ exports.is_open = function () {
|
||||
return $('.hotspot.overlay').hasClass('show');
|
||||
};
|
||||
|
||||
exports.close_hotspot_icon = function (elem) {
|
||||
$(elem).animate({ opacity: 0 }, {
|
||||
duration: 300,
|
||||
done: function () {
|
||||
$(elem).css({ display: 'none' });
|
||||
}.bind(elem),
|
||||
});
|
||||
};
|
||||
|
||||
exports.load_new = function (new_hotspots) {
|
||||
new_hotspots.forEach(function (hotspot) {
|
||||
hotspot.location = HOTSPOT_LOCATIONS[hotspot.name];
|
||||
|
||||
Reference in New Issue
Block a user