Subversion Repositories wpShopGermany4

Rev

Rev 5261 | Rev 5945 | 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
 
5866 hartmut 75
	<div class="wpsg_products" id="wpsg-bs">
1274 robert 76
 
5866 hartmut 77
		<nav class="navbar navbar-default">
78
			<div class="container-fluid">
79
				<div class="navbar-header">
80
					<a class="navbar-brand" href="#"><?php echo __('wpShopGermany', 'wpsg'); ?></a>
81
				</div>
82
				<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
83
					<ul class="nav navbar-nav">
84
						<li role="presentation" class="<?php echo ((!isset($_REQUEST['action']))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt"><?php echo __("Statistik", "wpsg"); ?></a></li>
85
<!--
86
						<li role="presentation" class="wpsg_showhide_filter <?php echo (($this->view['hasFilter'] === true)?'active':''); ?>"><a href="#" onclick="return false;"><span class="glyphicon glyphicon-search"></span><?php echo __("Suche", "wpsg"); ?></a></li>
87
				 		<li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'add'))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=add"><span class="glyphicon glyphicon-plus"></span><?php echo __("Hinzufügen", "wpsg"); ?></a></li>
88
-->
89
					</ul>
90
				</div>
91
			</div>
92
		</nav>
93
	</div>
1274 robert 94
 
5866 hartmut 95
	<div id="wpsg-bs" >
96
		<div class="wpsg_admin_submenu" >
1274 robert 97
 
5866 hartmut 98
			<div class="list-group" id="wpsg_statistics_tabs">
99
				<span class="list-group-head list-group-item"><?php echo __('Auswahl', 'wpsg'); ?></span>
100
 
101
			<?php foreach ($this->view['charts'] as $index => $chart) { ?>
102
 
103
				<a class="list-group-item <?php echo ((strtolower($index) == $_REQUEST['id'])?'active':''); ?>" href="admin.php?page=wpsg-Statistics&amp;id=<?php echo wpsg_hspc($index); ?>"><?php echo wpsg_hspc($chart['name']); ?></a>
104
 
105
			<?php } ?>
106
			</div>
107
 
108
			<div style="clear:both; margin-bottom:10px; margin-left:0px; margin-right:8px;"></div>
109
 
110
		</div>
1274 robert 111
	</div>
112
 
2426 robert 113
	<div style="padding-right:10px; margin-left:210px; float:none;" class="subsubsub">
1274 robert 114
 
115
		<?php
2112 robert 116
 
117
			if (wpsg_isSizedString($this->view['chart']['data']['template']))
118
			{
119
				$templateFile = $this->view['chart']['data']['template'].'.phtml';
120
			}
121
			else
122
			{
123
				$templateFile = str_replace('get', '', strtolower($this->view['standardFilter'][$this->view['filter']['standard']]['func']).'.phtml');
124
			}
125
 
126
			$templatePath = WPSG_PATH_VIEW.'/mods/mod_statistics/'.strtolower($this->view['charts'][$_REQUEST['id']]['func']).'/'.$templateFile;
127
 
128
			if (is_file($templatePath))
1274 robert 129
			{
2112 robert 130
				$this->render($templatePath);
1274 robert 131
			}
1345 robert 132
			else
133
			{
2682 daniel 134
 
135
				wpsg_debug($templatePath);
136
				echo '<strong>'.__('Ungültige Anfrage', 'wpsg').'</strong>';
137
 
1345 robert 138
			}
1274 robert 139
		?>
140
 
141
	</div>
142
 
143
	<div style="clear:both; margin-bottom:10px; margin-left:0px; margin-right:8px;"></div>