Subversion Repositories wpShopGermany4

Rev

Rev 5945 | 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);
49
 
1318 robert 50
		                    jQuery('div.jqplot-image-container' + btnId).dialog( {
1285 robert 51
		                    	'modal': true,
52
		                	    'width': 650,
53
		                	    'height': 620,
54
		                	    'title': '<?php echo __('Export', 'wpsg'); ?>'
55
		                    } );
56
		                    div = null;
57
 
58
			            });
1318 robert 59
		                z++;
1285 robert 60
		                jQuery(this).after(btn);
61
		                btn.after('<br />');
62
		                btn = null;
63
		            }
64
		        });
65
		    }
66
 
1318 robert 67
		}
1285 robert 68
 
69
	</script>
70
 
1274 robert 71
	<div class="icon32 icon32-posts-post" id="icon-edit"><br></div>
72
 
5866 hartmut 73
	<div class="wpsg_products" id="wpsg-bs">
1274 robert 74
 
5866 hartmut 75
		<nav class="navbar navbar-default">
76
			<div class="container-fluid">
77
				<div class="navbar-header">
78
					<a class="navbar-brand" href="#"><?php echo __('wpShopGermany', 'wpsg'); ?></a>
79
				</div>
80
				<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
81
					<ul class="nav navbar-nav">
82
						<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>
83
<!--
5945 hartmut 84
						<li role="presentation" class="wpsg_showhide_filter <?php echo ((wpsg_getInt($this->view['hasFilter']) === true)?'active':''); ?>"><a href="#" onclick="return false;"><span class="glyphicon glyphicon-search"></span><?php echo __("Suche", "wpsg"); ?></a></li>
5866 hartmut 85
				 		<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>
86
-->
87
					</ul>
88
				</div>
89
			</div>
90
		</nav>
7555 daniel 91
 
92
		<div class="wpsg_msg_wrap"><hr class="wp-header-end wpsg-wp-header-end"/></div>
93
		<div class="wpsg_clear"></div>
5866 hartmut 94
 
7555 daniel 95
		<div style="display:flex; flex-direction:row; justify-content:flex-start; align-items:flex-start;">
5866 hartmut 96
 
7555 daniel 97
			<div class="wpsg_admin_submenu">
5866 hartmut 98
 
7555 daniel 99
				<div class="list-group" id="wpsg_statistics_tabs">
100
					<span class="list-group-head list-group-item"><?php echo __('Auswahl', 'wpsg'); ?></span>
101
 
102
				<?php foreach ($this->view['charts'] as $index => $chart) { ?>
1274 robert 103
 
7555 daniel 104
					<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>
2112 robert 105
 
7555 daniel 106
				<?php } ?>
107
				</div>
108
 
109
			</div>
110
 
111
			<div style="padding-left:15px;" class="stat_content">
112
 
113
				<?php
114
 
115
					if (wpsg_isSizedString($this->view['chart']['data']['template']))
116
					{
117
						$templateFile = $this->view['chart']['data']['template'].'.phtml';
118
					}
119
					else
120
					{
121
						$templateFile = str_replace('get', '', strtolower($this->view['standardFilter'][$this->view['filter']['standard']]['func']).'.phtml');
122
					}
123
 
124
					$templatePath = WPSG_PATH_VIEW.'/mods/mod_statistics/'.strtolower($this->view['charts'][$_REQUEST['id']]['func']).'/'.$templateFile;
125
 
126
					if (is_file($templatePath))
127
					{
128
						$this->render($templatePath);
129
					}
130
					else
131
					{
132
 
133
						wpsg_debug($templatePath);
134
						echo '<strong>'.__('Ungültige Anfrage', 'wpsg').'</strong>';
135
 
136
					}
137
				?>
138
 
139
			</div>
2112 robert 140
 
7555 daniel 141
		</div>
1274 robert 142
 
7555 daniel 143
	</div>