Subversion Repositories wpShopGermany4

Rev

Rev 4943 | Rev 5866 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2428 robert 1
<!-- Root-Template für Statistikdaten  -->
1285 robert 2
 
3
	<script type="text/javascript">
1274 robert 4
 
1285 robert 5
		function wpsg_statistic_addExportButton()
6
		{
7
 
1318 robert 8
			var z = 0;
9
 
1285 robert 10
			if (!jQuery.jqplot.use_excanvas) {
11
				jQuery('div.jqplot-target').each(function(){
12
		            var outerDiv = jQuery(document.createElement('div'));
13
		            var header = jQuery(document.createElement('div'));
14
		            var div = jQuery(document.createElement('div'));
15
 
16
		            outerDiv.append(header);
17
		            outerDiv.append(div);
18
 
1318 robert 19
		            outerDiv.addClass('jqplot-image-container' + z);
1285 robert 20
		            header.addClass('jqplot-image-container-header');
21
		            div.addClass('jqplot-image-container-content');
22
 
23
		            header.html('<?php echo '<span style="font-size:11px;">'.__('Um das Bild auf Ihrer Festplatte zu speichern, klicken Sie mit der rechten Maustaste auf das Bild und wählen Sie "Bild speichern unter..."', 'wpsg').'</span>'; ?>');
24
		            header.append('<br /><br />');
25
 
26
		            jQuery(this).after(outerDiv);
27
		            outerDiv.hide();
28
 
29
		            outerDiv = header = div = close = null;
30
 
31
		            if (!jQuery.jqplot._noToImageButton) {
32
		                var btn = jQuery(document.createElement('button'));
33
		                btn.addClass('button');
34
		                btn.text('Bild exportieren');
35
		                btn.css('margin-top', '25px');
36
		                btn.addClass('jqplot-image-button');
1318 robert 37
		                btn.attr('id', 'exportbtn-'+z);
38
 
1285 robert 39
		                btn.bind('click', {chart: jQuery(this)}, function(evt) {
1318 robert 40
 
41
		                	var btnId = jQuery(this).attr('id');
42
		                	btnId = btnId.split('-');
43
		                	btnId = btnId[1];
1285 robert 44
 
45
		                    var imgelem = evt.data.chart.jqplotToImageElem();
1318 robert 46
		                    var div = jQuery(this).nextAll('div.jqplot-image-container' + btnId).first();
1285 robert 47
		                    div.children('div.jqplot-image-container-content').empty();
48
		                    div.children('div.jqplot-image-container-content').append(imgelem);
1318 robert 49
 
1285 robert 50
 
1318 robert 51
 
52
		                    jQuery('div.jqplot-image-container' + btnId).dialog( {
1285 robert 53
		                    	'modal': true,
54
		                	    'width': 650,
55
		                	    'height': 620,
56
		                	    'title': '<?php echo __('Export', 'wpsg'); ?>'
57
		                    } );
58
		                    div = null;
59
 
60
			            });
1318 robert 61
		                z++;
1285 robert 62
		                jQuery(this).after(btn);
63
		                btn.after('<br />');
64
		                btn = null;
65
		            }
66
		        });
67
		    }
68
 
1318 robert 69
		}
1285 robert 70
 
71
	</script>
72
 
1274 robert 73
	<div class="icon32 icon32-posts-post" id="icon-edit"><br></div>
74
	<h2>
75
		<?php echo __('Statistik', 'wpsg'); ?>
76
	</h2>
77
 
78
	<br/>
79
 
2678 daniel 80
	<div class="wpsg_admin_submenu" style="margin-top:8px;">
1274 robert 81
 
82
		<div class="head">
83
			<div class="title"><?php echo __('Auswahl', 'wpsg'); ?></div>
84
			<div style="clear:both;"></div>
85
		</div>
86
 
87
		<ul>
88
		<?php foreach ($this->view['charts'] as $index => $chart) { ?>
89
 
90
			<li class="<?php echo ((strtolower($index) == $_REQUEST['id'])?'current':''); ?>"><a href="admin.php?page=wpsg-Statistics&amp;id=<?php echo wpsg_hspc($index); ?>"><?php echo wpsg_hspc($chart['name']); ?></a></li>
91
 
92
		<?php } ?>
93
		</ul>
94
		<div style="clear:both; margin-bottom:10px; margin-left:0px; margin-right:8px;"></div>
95
 
96
	</div>
97
 
2426 robert 98
	<div style="padding-right:10px; margin-left:210px; float:none;" class="subsubsub">
1274 robert 99
 
100
		<?php
2112 robert 101
 
102
			if (wpsg_isSizedString($this->view['chart']['data']['template']))
103
			{
104
				$templateFile = $this->view['chart']['data']['template'].'.phtml';
105
			}
106
			else
107
			{
108
				$templateFile = str_replace('get', '', strtolower($this->view['standardFilter'][$this->view['filter']['standard']]['func']).'.phtml');
109
			}
110
 
111
			$templatePath = WPSG_PATH_VIEW.'/mods/mod_statistics/'.strtolower($this->view['charts'][$_REQUEST['id']]['func']).'/'.$templateFile;
112
 
113
			if (is_file($templatePath))
1274 robert 114
			{
2112 robert 115
				$this->render($templatePath);
1274 robert 116
			}
1345 robert 117
			else
118
			{
2682 daniel 119
 
120
				wpsg_debug($templatePath);
121
				echo '<strong>'.__('Ungültige Anfrage', 'wpsg').'</strong>';
122
 
1345 robert 123
			}
1274 robert 124
		?>
125
 
126
	</div>
127
 
128
	<div style="clear:both; margin-bottom:10px; margin-left:0px; margin-right:8px;"></div>