예제 #1
0
파일: index.php 프로젝트: oanav/closetshare
function watchlist_scripts_loaded()
{
    echo '<!-- Watchlist js -->';
    echo '<script type="text/javascript">';
    echo 'var watchlist_url = "' . osc_ajax_plugin_url('watchlist/ajax_watchlist.php') . '";';
    echo '</script>';
    echo '<!-- Watchlist js end -->';
}
                        $("#prm_" + id).attr('disabled', false);
                        var flash = $("#flash_js");
                        var message = $('<div>').addClass('flashmessage').addClass('flashmessage-error').attr('id', 'flashmessage').html(data.msg);
                        flash.html(message);
                        $("#flashmessage").slideDown('slow').delay(3000).slideUp('slow');
                        $("html, body").animate({ scrollTop: 0 }, "slow");
                    }
                }
            });
        }
        function addPublish(id) {
            $("#pub_" + id).attr('disabled', true);
            $.ajax({
                type: "POST",
                url: '<?php 
    echo osc_ajax_plugin_url(PAYMENT_PRO_PLUGIN_FOLDER . 'ajax.php');
    ?>
&pub=' + id,
                dataType: 'json',
                success: function(data){
                    if(data.error==0) {
                        window.location = '<?php 
    echo osc_route_url('payment-pro-checkout');
    ?>
';
                    } else {
                        $("#pub_" + id).attr('disabled', false);
                        var flash = $("#flash_js");
                        var message = $('<div>').addClass('flashmessage').addClass('flashmessage-error').attr('id', 'flashmessage').html(data.msg);
                        flash.html(message);
                        $("#flashmessage").slideDown('slow').delay(3000).slideUp('slow');