|
|
|
@ -1,7 +1,7 @@ |
|
|
|
|
import $ from 'jquery' |
|
|
|
|
|
|
|
|
|
var favoritesContainer = $('.js-favorites-tab'); |
|
|
|
|
var favoritesNetworksUrls = []; |
|
|
|
|
var favoritesContainer = $('.js-favorites-tab') |
|
|
|
|
var favoritesNetworksUrls = [] |
|
|
|
|
|
|
|
|
|
if (localStorage.getItem('favoritesNetworksUrls') === null) { |
|
|
|
|
localStorage.setItem('favoritesNetworksUrls', JSON.stringify(favoritesNetworksUrls)) |
|
|
|
@ -10,10 +10,10 @@ if (localStorage.getItem('favoritesNetworksUrls') === null) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$(document).on('change', ".network-selector-item-favorite input[type='checkbox']", function () { |
|
|
|
|
var networkUrl = $(this).attr('data-url'), |
|
|
|
|
thisStatus = $(this).is(':checked'), |
|
|
|
|
parent = $(".network-selector-item[data-url='" + networkUrl + "'").clone(), |
|
|
|
|
workWith = $(".network-selector-item[data-url='" + networkUrl + "'") |
|
|
|
|
var networkUrl = $(this).attr('data-url') |
|
|
|
|
var thisStatus = $(this).is(':checked'); |
|
|
|
|
var parent = $(".network-selector-item[data-url='" + networkUrl + "'").clone(); |
|
|
|
|
var workWith = $(".network-selector-item[data-url='" + networkUrl + "'"); |
|
|
|
|
|
|
|
|
|
// Add new checkbox status to same network in another tabs
|
|
|
|
|
$(".network-selector-item-favorite input[data-url='" + networkUrl + "']").prop('checked', thisStatus) |
|
|
|
|