var eaFollowPublicDashboards=eaFollowPublicDashboards||{followAll:function(){var n=$(this).closest("div.modal");n.find(".js-public-all").hasClass("disabled")||(eaShareMyDashboard.removeNewUsers(n),n.find(".js-hidden-users").val(""),n.find(".js-hidden-followAll-input").val(!0),n.find(".js-hidden-followNone-input").val(!1),n.find(".specific-users").hide(),n.find(".public-warning-none").hide(),n.find(".public-warning-all").slideDown(),n.find(".js-submit").data("manual-validation",[]),n.find(".modal-footer").removeClass("hidden"),n.find(".js-public-all").addClass("what-share-selected"),n.find(".js-public-none").removeClass("what-share-selected"),n.find(".js-public-specific").removeClass("what-share-selected"))},followNone:function(){var n=$(this).closest("div.modal");n.find(".js-public-none").hasClass("disabled")||(eaShareMyDashboard.removeNewUsers(n),n.find(".js-hidden-users").val(""),n.find(".js-hidden-followAll-input").val(!1),n.find(".js-hidden-followNone-input").val(!0),n.find(".specific-users").hide(),n.find(".public-warning-all").hide(),n.find(".public-warning-none").slideDown(),n.find(".js-submit").data("manual-validation",[]),n.find(".modal-footer").removeClass("hidden"),n.find(".js-public-none").addClass("what-share-selected"),n.find(".js-public-all").removeClass("what-share-selected"),n.find(".js-public-specific").removeClass("what-share-selected"))},followSpecificMembers:function(){var n=$(this).closest("div.modal");n.find(".js-hidden-followAll-input").val(!1),n.find(".js-hidden-followNone-input").val(!1),n.find(".js-public-specific").addClass("what-share-selected"),n.find(".js-public-all").removeClass("what-share-selected"),n.find(".js-public-none").removeClass("what-share-selected"),n.find(".public-warning-all").hide(),n.find(".public-warning-none").hide(),n.find(".specific-users").slideDown(),n.find(".modal-footer").removeClass("hidden"),n.find(".js-submit").data("manual-validation",["users"])},cancelDialogEvent:function(){var n=$(this).closest("div.modal");eaFollowPublicDashboards.closingDialogFunc(n)},closeDialogEvent:function(){var n=$(this).closest("div.modal");eaFollowPublicDashboards.closingDialogFunc(n)},closingDialogFunc:function(n){var u=n.find("form").attr("id"),i,t,r;if(u==="FollowPublicDashboards"){for(i=[".js-refresh-follow-public-dashboards"],t=0;t<i.length;t++)r=$(i[t]),r.length>0&&eaAjax.refreshTargetContent(r,eaAjaxOptionsForModalAndButtonRefresh);return}$(".modal-backdrop").detach()},wireUpEventsEvent:function(){var n=$(this),t=n.closest("div.modal");eaFollowPublicDashboards.wireUpEvents(t)},wireUpEvents:function(n){var t=n.hasClass("modal")?n:n.find("div.modal"),i;t.off("click",".js-public-all",eaFollowPublicDashboards.followAll),t.off("click",".js-public-none",eaFollowPublicDashboards.followNone),t.off("click",".js-public-specific",eaFollowPublicDashboards.followSpecificMembers);t.on("click",".js-public-all",eaFollowPublicDashboards.followAll);t.on("click",".js-public-none",eaFollowPublicDashboards.followNone);t.on("click",".js-public-specific",eaFollowPublicDashboards.followSpecificMembers);i=t.attr("id"),t.parent().off("hidden.bs.modal","#"+i,eaFollowPublicDashboards.closeDialogEvent);t.parent().on("hidden.bs.modal","#"+i,eaFollowPublicDashboards.closeDialogEvent);$(".modal-backdrop").detach()},wireUp:function(){var n=$(".js-share-modal.follow-public");n.each(function(){var n=$(this).closest("div.modal"),t=n.attr("id");defaultImage=$(".js-has-user-data").data("default-image"),eaFollowPublicDashboards.wireUpEvents(n)})}},$userList=[],$formattedUserList={},defaultImage="";$().ready(function(){eaFollowPublicDashboards.wireUp()})