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>
|
|
|
91 |
</div>
|
1274 |
robert |
92 |
|
5866 |
hartmut |
93 |
<div id="wpsg-bs" >
|
|
|
94 |
<div class="wpsg_admin_submenu" >
|
1274 |
robert |
95 |
|
5866 |
hartmut |
96 |
<div class="list-group" id="wpsg_statistics_tabs">
|
|
|
97 |
<span class="list-group-head list-group-item"><?php echo __('Auswahl', 'wpsg'); ?></span>
|
|
|
98 |
|
|
|
99 |
<?php foreach ($this->view['charts'] as $index => $chart) { ?>
|
|
|
100 |
|
|
|
101 |
<a class="list-group-item <?php echo ((strtolower($index) == $_REQUEST['id'])?'active':''); ?>" href="admin.php?page=wpsg-Statistics&id=<?php echo wpsg_hspc($index); ?>"><?php echo wpsg_hspc($chart['name']); ?></a>
|
|
|
102 |
|
|
|
103 |
<?php } ?>
|
|
|
104 |
</div>
|
|
|
105 |
|
|
|
106 |
<div style="clear:both; margin-bottom:10px; margin-left:0px; margin-right:8px;"></div>
|
|
|
107 |
|
|
|
108 |
</div>
|
1274 |
robert |
109 |
</div>
|
|
|
110 |
|
2426 |
robert |
111 |
<div style="padding-right:10px; margin-left:210px; float:none;" class="subsubsub">
|
1274 |
robert |
112 |
|
|
|
113 |
<?php
|
2112 |
robert |
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))
|
1274 |
robert |
127 |
{
|
2112 |
robert |
128 |
$this->render($templatePath);
|
1274 |
robert |
129 |
}
|
1345 |
robert |
130 |
else
|
|
|
131 |
{
|
2682 |
daniel |
132 |
|
|
|
133 |
wpsg_debug($templatePath);
|
|
|
134 |
echo '<strong>'.__('Ungültige Anfrage', 'wpsg').'</strong>';
|
|
|
135 |
|
1345 |
robert |
136 |
}
|
1274 |
robert |
137 |
?>
|
|
|
138 |
|
|
|
139 |
</div>
|
|
|
140 |
|
|
|
141 |
<div style="clear:both; margin-bottom:10px; margin-left:0px; margin-right:8px;"></div>
|