mirror of
https://github.com/zulip/zulip.git
synced 2025-11-18 21:06:16 +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
|
// open
|
||||||
$('body').on('click', '.hotspot-icon', function (e) {
|
$('body').on('click', '.hotspot-icon', function (e) {
|
||||||
// hide icon
|
// hide icon
|
||||||
$(this).animate({ opacity: 0 }, {
|
hotspots.close_hotspot_icon(this);
|
||||||
duration: 300,
|
|
||||||
done: function () {
|
|
||||||
$(this).css({ display: 'none' });
|
|
||||||
}.bind(this),
|
|
||||||
});
|
|
||||||
|
|
||||||
// show popover
|
// show popover
|
||||||
var hotspot_name = $(e.target).closest('.hotspot-icon')
|
var hotspot_name = $(e.target).closest('.hotspot-icon')
|
||||||
|
|||||||
@@ -207,6 +207,15 @@ exports.is_open = function () {
|
|||||||
return $('.hotspot.overlay').hasClass('show');
|
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) {
|
exports.load_new = function (new_hotspots) {
|
||||||
new_hotspots.forEach(function (hotspot) {
|
new_hotspots.forEach(function (hotspot) {
|
||||||
hotspot.location = HOTSPOT_LOCATIONS[hotspot.name];
|
hotspot.location = HOTSPOT_LOCATIONS[hotspot.name];
|
||||||
|
|||||||
Reference in New Issue
Block a user