{literal}
<script>
    jQuery("#enlargeChart{/literal}{$WIDGETREPORTID}{literal}").on('click touchstart', function() {
        var height = jQuery(window.parent).height() - (jQuery(window.parent).height() / 3);
        var width = jQuery(window.parent).width() - (jQuery(window.parent).width() / 3);
        var url = "index.php?module={/literal}{$MODULE_NAME}{literal}&view={/literal}{$MODULE_NAME}{literal}Ajax&file=AdvancedReportsWidget&record={/literal}{$WIDGETREPORTID}{literal}&fullScreen=true";
        var popup = window.open(url,"Enlrage",'height='+height+',width='+width);
    });

{/literal}{if (version_compare($VTIGER_VERSION, '7.0.0', '<') && $THEME == null)}{literal}
    if(window.isTouchDevice) {
        jQuery('#ar-refresh-{/literal}{$WIDGETREPORTID}{literal}').on('touchstart', function() {
            $(this).trigger('click');
        });

        jQuery('#ar-close-{/literal}{$WIDGETREPORTID}{literal}').on('touchstart', function() {
            $(this).trigger('click');
        });

        jQuery('#open-report-{/literal}{$WIDGETREPORTID}{literal}').on('touchend', function() {
            var href = $(this).attr('href');

            if (href) window.location = href;
        });
    }
{/literal}{/if}{literal}
</script>
{/literal}


<a id="open-report-{$WIDGETREPORTID}" href="index.php?module={$MODULE_NAME}&view=Report&record={$WIDGETREPORTID}" target="_parent">
    <i class="icon-share" hspace="2" border="0" align="absmiddle" title="Open Report" alt="Open Report"></i>
</a>
<a href="javascript:void(0);" id="enlargeChart{$WIDGETREPORTID}">
    <i class="icon-move" hspace="2" border="0" align="absmiddle" title="{vtranslate('LBL_FULLSCREEN')}" alt="{vtranslate('LBL_FULLSCREEN')}"></i>
</a>
<a href="javascript:void(0);" id="ar-refresh-{$WIDGETREPORTID}" name="drefresh"
    data-url="{$WIDGET->getUrl()}&linkid={$WIDGET->get('linkid')}&content=data&reportId={$WIDGETREPORTID}">
    <i class="icon-refresh" hspace="2" border="0" align="absmiddle" title="{vtranslate('LBL_REFRESH')}" alt="{vtranslate('LBL_REFRESH')}"></i>
</a>
{if !$WIDGET->isDefault()}
    <a name="dclose" class="widget" id="ar-close-{$WIDGETREPORTID}" data-url="{$WIDGET->getDeleteUrl()}">
        <i class="icon-remove" hspace="2" border="0" align="absmiddle" title="{vtranslate('LBL_REMOVE')}" alt="{vtranslate('LBL_REMOVE')}"></i>
    </a>
{/if}