﻿$(document).ready(function() {
    $('#btnDiscussMiniBlog').unbind().click(function() {
        if (userID <= 0) {
            ShowLogin();
            return;
        }
        $('#divShareAddMiniBlog').hide();
        var miniBlogID = $(this).attr('miniblogid');
        ShowLoading();
        $.ajax({
            type: "POST",
            url: commonControllerUrl + '/GetOtherControlHtmlAjax/',
            data: { 'paramStr': 'miniBlogID|' + miniBlogID, 'viewName': '..\\User\\Controls\\ShowLayer\\ShareSendDiscuss' },
            success: function(data) {
                HideLoading();
                $('#ShowLayerContainer').html(data);
                $('#divShareSendDiscuss').show();
            },
            error: function(xmlHttpRequest, error) {
                HideLoading();
                AlertTips("系统提示：", "对不起，系统故障，我们将尽快处理！", 2);
            }
        });
    });

    $('#btnShareToMiniBlog').unbind().click(function() {
        if (userID <= 0) {
            ShowLogin();
            return;
        }
        $('#ShowLayerContainer').html('');
        var miniBlogID = $(this).attr('miniblogid');
        if ($('#divShareAddMiniBlog').length == 0) {
            ShowLoading();
            $.ajax({
                type: "POST",
                url: commonControllerUrl + '/GetOtherControlHtmlAjax/',
                data: { 'paramStr': 'miniBlogID|' + miniBlogID, 'viewName': '..\\User\\Controls\\ShowLayer\\ShareAddMiniBlog' },
                success: function(data) {
                    HideLoading();
                    $('body').append(data);
                    $('#divShareAddMiniBlog').show();
                },
                error: function(xmlHttpRequest, error) {
                    HideLoading();
                    AlertTips("系统提示：", "对不起，系统故障，我们将尽快处理！", 2);
                }
            });
        } else {
            $('#divShareAddMiniBlog').show();
        }
    });
});

//点击窗体隐藏
function ClickHideThis() {
    $('.divShareThis,.divShareThisArrow').hide();
    $('#divShowMiniBlogTips').hide();
    $('#divAddMiniBlogKeyword,#divKeywordTopicListBorder,#divKeywordTopicListInfo').hide();
}
