summaryrefslogtreecommitdiff
path: root/www/crm/wp-content/uploads/civicrm/templates_c/en_US/%%CC/CCD/CCDBFFBE%%openFlashChart.tpl.php
blob: 54f08ce7fedad235815e3e36405f46861bfa999c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php /* Smarty version 2.6.31, created on 2019-08-30 18:41:44
         compiled from CRM/common/openFlashChart.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('block', 'crmScope', 'CRM/common/openFlashChart.tpl', 1, false),)), $this); ?>
<?php $this->_tag_stack[] = array('crmScope', array('extensionKey' => "")); $_block_repeat=true;smarty_block_crmScope($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?><script type="text/javascript" src="<?php echo $this->_tpl_vars['config']->resourceBase; ?>
packages/OpenFlashChart/js/json/openflashchart.packed.js"></script>
<script type="text/javascript" src="<?php echo $this->_tpl_vars['config']->resourceBase; ?>
packages/OpenFlashChart/js/swfobject.js"></script>
<?php echo '
<script type="text/javascript">
    function createSWFObject( chartID, divName, xSize, ySize, loadDataFunction ) {
       var flashFilePath = '; ?>
"<?php echo $this->_tpl_vars['config']->resourceBase; ?>
packages/OpenFlashChart/open-flash-chart.swf"<?php echo ';

       //create object.
       swfobject.embedSWF( flashFilePath, divName,
                         xSize, ySize, "9.0.0",
                         "expressInstall.swf",
                         {"get-data":loadDataFunction, "id":chartID},
                         null,
                         {"wmode": \'transparent\'}
                        );
    }
  OFC = {};
  OFC.jquery = {
           name: "jQuery",
             image: function(src) { return "<img src=\'data:image/png;base64," + $(\'#\'+src)[0].get_img_binary() + "\' />"},
             popup: function(src) {
             var img_win = window.open(\'\', \'Save Chart as Image\');
             // HTML, HEAD, and BODY tags in JS literals obfuscated to avoid being parsed as DOM elements.
             var html = \'html\', head = \'head\', body = \'body\';
           img_win.document.write(\'<\' + html + \'><\' + head + \'><title>Save Chart as Image<\\/title><\\/\' + head + \'><\' + body + \'>\' + OFC.jquery.image(src) + \' <\\/\' + body + \'><\\/\' + html + \'>\');
           img_win.document.close();
                       }
                 }

function save_image( divName ) {
      var divId = '; ?>
"<?php echo $this->_tpl_vars['contriChart']; ?>
"<?php echo ' ? \'open_flash_chart_\'+divName : '; ?>
"<?php echo $this->_tpl_vars['divId']; ?>
"<?php echo ';
          if( !divId ) {
               divId = \'open_flash_\'+divName;
        }
      OFC.jquery.popup( divId );
}

</script>
'; ?>

<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_crmScope($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?>