assets.js.views.google.GoogleGroupController.js Maven / Gradle / Ivy
The newest version!
/*
* Serposcope - SEO rank checker https://serposcope.serphacker.com/
*
* Copyright (c) 2016 SERP Hacker
* @author Pierre Nogues
* @license https://opensource.org/licenses/MIT MIT License
*/
/* global serposcope, canonLoc, Papa */
serposcope.googleGroupController = function () {
var onResize = function(){
$('.tab-content').css("min-height", serposcope.theme.availableHeight() - 150);
serposcope.googleGroupControllerGrid.resize();
};
var configureModalFocus = function() {
$('#new-target').on('shown.bs.modal', function(){ $('#targetName').focus(); });
$('#new-target-bulk').on('shown.bs.modal', function(){ $('#bulk-target').focus(); });
$('#new-search').on('shown.bs.modal', function(){ $('#searchName').focus(); });
$('#new-search-bulk').on('shown.bs.modal', function(){ $('#bulk-search').focus(); });
};
var showNewSearchModal = function(){
$('.modal').modal('hide');
$('#new-search').modal();
return false;
};
var showNewBulkSearchModal = function(){
$('.modal').modal('hide');
$('#new-search-bulk').modal();
return false;
};
var showNewTargetModal = function(){
$('.modal').modal('hide');
$('#new-target').modal();
return false;
};
var showNewBulkTargetModal = function(){
$('.modal').modal('hide');
$('#new-target-bulk').modal();
return false;
};
var showNewEventModal = function(elt){
$('#modal-add-event').modal();
return false;
};
var deleteTarget = function(elt){
var id = $(elt.currentTarget).attr("data-id");
var name = $("#target-" + id +" .target-name").html();
var href= $(elt.currentTarget).attr("href");
if(!confirm("Delete website \"" + name + "\" ?\nAll history will be erased.")){
return false;
}
$('