<%@ LANGUAGE = JavaScript %>
<% /*
    $Revision$
    $Id$

    File:           fac_delete_widget_onpage.asp
    Description:    Verwijderen fac-object

    Parameters:     wgt_page_key
    Context:        Vanuit edit-scherm
    Result:         JSON object
    Note:           Verwijdert de widgets op een pagina (niet de pagina zelf)

*/
var JSON_Result = true;
%>

<!--#include file="../Shared/common.inc"-->
<!-- #include file="fac_widget.inc" -->

<%

var wgt_page_key = getQParamInt("wgt_page_key");

var this_wgt_page = wgt.func_enabled_wgt_page(wgt_page_key);
var result = { success: false };
if (wgt_page_key > -1 && this_wgt_page.canWrite)
{
    wgt.emptyWidgetPage(wgt_page_key);
    result.success = true;
    result.toaster = L("fac_widget_onpage_del");
}

Response.Write(JSON.stringify(result));
%><% ASPPAGE_END(); %>
