summaryrefslogtreecommitdiff
path: root/views/mods/mod_coverletter
diff options
context:
space:
mode:
authorDaniel Schmitzer <noreply@maennchen1.de>2019-01-16 05:05:05 +0000
committerDaniel Schmitzer <noreply@maennchen1.de>2019-01-16 05:05:05 +0000
commit83d45bfa57a8ad478b85964e01b45d5da92dc4a3 (patch)
tree76a90a0e7788611bec2c03dd3b6fbded6238ccb8 /views/mods/mod_coverletter
parentb85a31d36baa6f2013a6c3d2346c06b688f936c5 (diff)
- BETA
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@7258 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/mods/mod_coverletter')
-rw-r--r--views/mods/mod_coverletter/coverletter_pdf.phtml147
-rw-r--r--views/mods/mod_coverletter/order_view.phtml91
-rw-r--r--views/mods/mod_coverletter/settings_edit.phtml213
3 files changed, 451 insertions, 0 deletions
diff --git a/views/mods/mod_coverletter/coverletter_pdf.phtml b/views/mods/mod_coverletter/coverletter_pdf.phtml
new file mode 100644
index 0000000..69ab94f
--- /dev/null
+++ b/views/mods/mod_coverletter/coverletter_pdf.phtml
@@ -0,0 +1,147 @@
+<?php
+
+ /**
+ * FPDF Template für die Generierung des Lieferscheins
+ */
+
+ require_once WPSG_PATH_LIB.'fpdf/fpdf.php';
+ require_once WPSG_PATH_LIB.'fpdf/fpdi.php';
+ require_once WPSG_PATH_LIB.'wpsg_fpdf.class.php';
+
+ global $absender_left, $absender_top, $adress_left, $adress_top, $dndata_left, $dndata_top;
+
+ if (!function_exists('addCoverLetterPage')) {
+
+ function addCoverLetterPage($shop, $pdf) {
+
+ global $absender_left, $absender_top, $adress_left, $adress_top, $dndata_left, $dndata_top;
+
+ $rdata_left = 0;
+ $pdf->AddPage();
+
+ if (file_exists($shop->callMod('wpsg_mod_coverletter', 'getFilePath', array(''))."wpsg_coverletter_bp.pdf")) {
+
+ $pdf->setSourceFile($shop->callMod('wpsg_mod_coverletter', 'getFilePath', array(''))."wpsg_coverletter_bp.pdf");
+ $tplidx = $pdf->importPage(1, '/MediaBox');
+ $pdf->useTemplate($tplidx, 0, 0, 210);
+
+ } else if (file_exists($shop->callMod('wpsg_mod_coverletter', 'getFilePath', array(''))."wpsg_coverletter_bp.jpg")) {
+
+ $pdf->image($shop->callMod('wpsg_mod_coverletter', 'getFilePath', array(''))."wpsg_coverletter_bp.jpg", 0, 0, 210, 297, 'jpg');
+
+ }
+
+ if (file_exists($shop->callMod('wpsg_mod_coverletter', 'getFilePath', array(''))."wpsg_coverletter_logo.jpg")) {
+
+ list($width, $height, $type, $attr) = getimagesize($shop->callMod('wpsg_mod_coverletter', 'getFilePath', array(''))."wpsg_coverletter_logo.jpg");
+
+ // Umrechnung von Inch zu Pixel
+ $wPix = (25.4 * $width) / 96;
+ $hPix = (25.4 * $height) / 96;
+
+ $transparency = str_replace("%", "", $shop->get_option('wpsg_mod_coverletter_logo_transparency'));
+ if($transparency !== "100") $transparency = str_replace(array("0", "00"), "", $transparency);
+
+ $alpha = 1;
+ if (wpsg_isSizedString($transparency) && $transparency !== "100") $alpha = "0.$transparency";
+ if (wpsg_isSizedString($transparency) && $transparency === "100") $alpha = $transparency;
+
+ $logo_pos = $shop->get_option('wpsg_mod_coverletter_logo_position');
+
+ if(isset($logo_pos) && $logo_pos === "left") { $abscissa = 0; }
+ if(isset($logo_pos) && $logo_pos === "center") { $abscissa = 105 - ($wPix / 2); }
+ if(isset($logo_pos) && $logo_pos === "right") { $abscissa = 210 - $wPix; }
+
+ $pdf->SetAlpha($alpha);
+ $pdf->image($shop->callMod('wpsg_mod_coverletter', 'getFilePath', array(''))."wpsg_coverletter_logo.jpg", $abscissa, 0, $wPix, $hPix);
+ $pdf->SetAlpha(1);
+
+ }
+
+ // Adresse des Kunden
+ $pdf->SetFont('Arial', '', 12);
+ $pdf->Text($adress_left, $adress_top, $shop->view['data']['company']);
+ $pdf->Text($adress_left, $adress_top + 5, $shop->view['data']['firstname'].' '.$shop->view['data']['name']);
+ $pdf->Text($adress_left, $adress_top + 10, $shop->view['data']['street'].' '.$shop->view['data']['hnr']);
+ $pdf->Text($adress_left, $adress_top + 15, $shop->view['data']['zip'].' '.$shop->view['data']['city']);
+ $pdf->Text($adress_left, $adress_top + 20, $shop->view['data']['country']);
+
+ // Daten
+ $pdf->SetFont('Arial', 'B', 16);
+ $pdf->Text($dndata_left, $dndata_top, $shop->view['title']);
+ $pdf->SetFont('Arial', 'B', 9);
+ $pdf->Text($dndata_left, $dndata_top + 6, $shop->view['clnr']);
+ $pdf->SetFont('Arial', '', 9);
+
+ $pdf->Text($rdata_left + 100, $dndata_top, __("Kunden-Nr", "wpsg"));
+ $pdf->Text($rdata_left + 100, $dndata_top + 6, (($shop->view['customer']['knr'] != '')?$shop->view['customer']['knr']:$shop->view['customer']['id']));
+
+ $pdf->Text($rdata_left + 125, $dndata_top, __("Best. Nr.", "wpsg"));
+ $pdf->Text($rdata_left + 125, $dndata_top + 6, ((trim($shop->view['order']['onr']) != '')?$shop->view['order']['onr']:$shop->view['order']['id']));
+
+ $pdf->Text($rdata_left + 145, $dndata_top, __("Bestelldatum", "wpsg"));
+ $pdf->Text($rdata_left + 145, $dndata_top + 6, wpsg_formatTimestamp(strtotime($shop->view['order']['cdate']), true));
+
+ $pdf->Text($rdata_left + 170, $dndata_top, __("Datum", "wpsg"));
+ $pdf->Text($rdata_left + 170, $dndata_top + 6, wpsg_formatTimestamp(time(), true));
+
+ foreach ($shop->view['arTexts'] as $text) {
+
+ if (isset($text['aktiv']) && $text['aktiv'] == 1) {
+
+ $pdf->SetFont('Arial', 'B', ((intval($text['fontsize']) > 0)?intval($text['fontsize']):10));
+ $pdf->wpsg_SetTextColor($text['color']);
+ $pdf->wpsg_MultiCell($text['x'], $text['y'], 5, $text['text']);
+ $pdf->wpsg_SetTextColor("#000000");
+
+ }
+
+ }
+
+ // Text
+ $pdf->setFont('Arial', '', 10);
+ $pdf->wpsg_MultiCell($dndata_left - 1, $dndata_top + 12, 4, $shop->view['text']);
+
+ }
+
+ }
+
+ // Positionierung der Absenderadresszeile
+ $absender_left = 25;
+ $absender_top = 50;
+
+ // Positionierung der Zieladress
+ $adress_left = 25;
+ $adress_top = 55;
+
+ // Positionierund des Lieferscheinkopfes
+ $dndata_left = 25;
+ $dndata_top = 90;
+
+ // Positionierung der Produktdaten
+ $prod_left = 25;
+ $prod_top = 105;
+
+ // Anzahl an Produkten pro Seite
+ $prod_break = 10;
+
+ $pdf = new wpsg_fpdf();
+ $pdf->SetAutoPageBreak(true, 5);
+ addCoverLetterPage($this, $pdf);
+
+ $offset += 5;
+
+ ob_end_clean();
+
+ if ($this->view['preview']) {
+
+ $pdf->Output($this->view['filename'], 'I');
+
+ } else {
+
+ $pdf->Output($this->view['filename'], 'F');
+
+ if ($this->view['output'] === true) $pdf->Output($this->view['filename'], 'I');
+
+ }
+ \ No newline at end of file
diff --git a/views/mods/mod_coverletter/order_view.phtml b/views/mods/mod_coverletter/order_view.phtml
new file mode 100644
index 0000000..6804fdb
--- /dev/null
+++ b/views/mods/mod_coverletter/order_view.phtml
@@ -0,0 +1,91 @@
+<?php
+
+ /**
+ * Template für die Integration des Anschreiben Moduls in die Bestellverwaltung
+ */
+
+?>
+
+<?php echo wpsg_drawForm_AdminboxStart(__('Anschreiben', 'wpsg'));?>
+
+ <?php if (sizeof($this->view['mod_anschreiben']['aranschreiben']) == 0 ) { ?>
+
+ <p><?php echo __('Bisher kein Anschreiben geschrieben.', 'wpsg'); ?></p>
+
+ <?php } else { ?>
+ <table>
+ <?php foreach ($this->view['mod_anschreiben']['aranschreiben_gesamt'] as $a) { ?>
+ <tr>
+ <td>#<?php echo ($a['anr'] != ''); ?>
+
+ <?php if ($a['anr'] != "") { ?>
+ <?php echo wpsg_translate(__('Anschreiben gespeichert am #1#', 'wpsg'), date("d.m.Y", $a['ts_datum'])); ?>
+ <?php } ?>
+
+ </td>
+ <td style="text-align:right;">
+
+ <?php if ($a['anr'] != "") {
+
+ $rfile = $this->callMod('wpsg_mod_anschreiben', 'getFilePath', array($this->view['data']['id'], true)).'A'.$r['anr'].'.pdf';
+
+ } ?>
+
+ </td>
+ </tr>
+ <?php } ?>
+ </table>
+ <?php } ?>
+
+ <br>
+
+ <div class="wpsg_clear"></div>
+
+ <hr />
+
+ <div class="inside">
+ <div>
+
+ <form target="_blank" method="post" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&mod=wpsg_mod_coverletter&edit_id=<?php echo $this->view['data']['id']; ?>&action=ajax&noheader=1" id="wpsg_mod_coverletter_form">
+
+ <?php $arShopLocations = $this->getShopLocations(); ?>
+ <?php $arShopLocationLabels = []; foreach ($arShopLocations as $l_id => $l) $arShopLocationLabels[$l_id] = $l['label']; ?>
+
+ <?php if (sizeof($arShopLocations) > 1) { ?>
+
+ <?php echo wpsg_drawForm_Select('target', __('Shop Adresse', 'wpsg'), $arShopLocationLabels, '1'); ?>
+
+ <?php } else { ?>
+
+ <input type="hidden" name="target" value="1" />
+
+ <?php } ?>
+
+ <?php echo wpsg_drawForm_Textarea('text', __('Text', 'wpsg'),'', ['noLabel' => true, 'fullLabel' => __('Text für das Anschreiben', 'wpsg'), 'style' => 'height:200px']); ?>
+
+ <br />
+
+ <input type="submit" name="wpsg_mod_coverletter_write" value="<?php echo __("Speichern & Drucken", "wpsg"); ?>" style="float:left;" class="button button-primary" />
+
+ <div class="wpsg_clear"></div>
+
+ </form>
+
+ </div>
+ </div>
+
+<?php echo wpsg_drawForm_AdminboxEnd(); ?>
+
+<script>
+
+ jQuery('#wpsg_mod_coverletter_form').on('submit', function() {
+
+ setTimeout(function() {
+
+ location.reload();
+
+ }, 1000);
+
+ } );
+
+</script>
diff --git a/views/mods/mod_coverletter/settings_edit.phtml b/views/mods/mod_coverletter/settings_edit.phtml
new file mode 100644
index 0000000..57ef23c
--- /dev/null
+++ b/views/mods/mod_coverletter/settings_edit.phtml
@@ -0,0 +1,213 @@
+<?php
+
+ /**
+ * Template für die Einstellungen des "Anschreiben" Moduls
+ */
+
+?>
+
+<div>
+ <ul class="nav nav-tabs" role="tablist">
+ <li role="presentation" class="active"><a href="#tab1" aria-controls="home" role="tab" data-toggle="tab"><?php echo __('Vordefinierte Textfelder', 'wpsg'); ?></a></li>
+ </ul>
+ <div class="tab-content">
+ <div role="tabpanel" class="tab-pane active" id="tab1">
+
+ <?php echo wpsg_drawForm_TextStart(); ?>
+ <div style="position:relative;">
+ <?php if ($this->view['wpsg_mod_coverletter']['bp'] === false) { ?>
+ <p><?php echo __('Es wurde bisher kein Briefpapier hochgeladen', 'wpsg'); ?></p>
+ <?php } else { ?>
+ <a target="_blank" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_coverletter&do=getBp&noheader=1" target="_blank"><?php echo __('Derzeitiges Briefpapier', 'wpsg'); ?></a>
+ <?php } ?>
+ <a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign form-control-feedback" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_coverletter_bp" data-wpsg-tip="mod_coverletter_bp" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_coverletter_bp"></a>
+ <input type="file" name="wpsg_mod_coverletter_bp">
+ <?php $strSuffix = ''; if ($this->view['wpsg_mod_coverletter']['bp'] !== false) { $strSuffix = '
+ <label>
+ <input type="checkbox" name="wpsg_mod_coverletter_bp_del" value="1" />&nbsp;'.__('Löschen', 'wpsg').'
+ </label>';
+ echo __($strSuffix);
+ } ?>
+ </div>
+ <?php echo wpsg_drawForm_TextEnd(__('Briefpapier (PDF/JPG)', 'wpsg'), array('noP' => true, 'helps' => 'wpsg_mod_coverletter_bp')); ?>
+
+ <hr>
+
+ <?php echo wpsg_drawForm_TextStart(); ?>
+ <div style="position:relative;">
+ <?php if ($this->view['wpsg_mod_coverletter']['logo'] === false) { ?>
+ <p><?php echo __('Es wurde bisher kein Logo hochgeladen', 'wpsg'); ?></p>
+ <?php } else { ?>
+ <a target="_blank" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_coverletter&do=getLogo&noheader=1" target="_blank"><?php echo __('Derzeitiges Logo', 'wpsg'); ?></a>
+ <?php } ?>
+ <a class="wpsg_glyphicon_right glyphicon glyphicon-question-sign form-control-feedback" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_coverletter_logo" data-wpsg-tip="mod_coverletter_logo" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_coverletter_logo"></a>
+ <input type="file" name="wpsg_mod_coverletter_logo">
+ <?php $logo_pos = $this->get_option("wpsg_mod_coverletter_logo_position"); ?>
+ <?php $defaultAlign = !isset($logo_pos) || empty($logo_pos) ? "align-buttons-active" : ""; ?>
+
+ <?php $alignLeft = $logo_pos === 'left' ? "align-buttons-active" : ""; ?>
+ <?php $alignCenter = $logo_pos === 'center' ? "align-buttons-active" : ""; ?>
+ <?php $alignRight = $logo_pos === 'right' ? "align-buttons-active" : ""; ?>
+
+ <?php $logo_transparency = $this->get_option("wpsg_mod_coverletter_logo_transparency") ?: "0%"; ?>
+
+ <?php $strSuffix = ''; if ($this->view['logo'] !== false) { $strSuffix = '
+ <div class="row">
+ <div class="col-md-4">
+ <div class="align-buttons">
+ <input type="input" data-toggle="tooltip" class="logo-align-button logo-align-button-left '.$alignLeft.'" name="wpsg_mod_coverletter_logo_position_left" value="&#xf036" onclick="handleLogoAlignClick($(this))" onkeydown="return false;" onfocus="return false;" autocomplete="off" title="'.__("Logo linksbündig ausrichten").'">
+ <input type="input" data-toggle="tooltip" class="logo-align-button logo-align-button-center '.$alignCenter.'" name="wpsg_mod_coverletter_logo_position_center" value="&#xf037" onclick="handleLogoAlignClick($(this))" onkeydown="return false;" onfocus="return false;" autocomplete="off" title="'.__("Logo zentrieren").'">
+ <input type="input" data-toggle="tooltip" class="logo-align-button logo-align-button-right '.$alignRight.' '.$defaultAlign.'" name="wpsg_mod_coverletter_logo_position_right" value="&#xf038" onclick="handleLogoAlignClick($(this))" onkeydown="return false;" onfocus="return false;" autocomplete="off" title="'.__("Logo rechtsbündig ausrichten").'">
+ </div>
+ </div>
+ <div class="col-md-8 logo-transparency">
+ <label>
+ <input type="text" name="wpsg_mod_coverletter_logo_transparency" value="'.$logo_transparency.'" />&nbsp;'.__('Logodeckkraft', 'wpsg').'
+ </label>
+ </div>
+ <div class="col-md-12">
+ <label>
+ <input type="checkbox" name="wpsg_mod_coverletter_logo_del" value="1" />&nbsp;'.__('Löschen', 'wpsg').'
+ </label>
+ </div>
+ </div>';
+ echo __($strSuffix);
+ } ?>
+
+
+ <button class="button wpsg_coverletter_preview" style="float:right; margin-right:10px;" name="wpsg_coverletter_preview" type="button">
+ <?php echo __("Vorschau", "wpsg"); ?>
+ </button>
+
+ </div>
+
+ <?php echo wpsg_drawForm_TextEnd(__('Logo (JPG)', 'wpsg'), array('noP' => true, 'helps' => 'wpsg_mod_coverletter_logo')); ?>
+
+ <hr /><br />
+
+ <table class="table table-body-striped wpsg_mod_coverletter_fieldtable">
+ <thead>
+ <tr>
+ <th class="col_bezeichnung"><?php echo __('Bezeichnung', 'wpsg'); ?></th>
+ <th class="col_freitext"><?php echo __('Freitext', 'wpsg'); ?></th>
+ <th class="col_x"><?php echo __('X', 'wpsg'); ?></th>
+ <th class="col_y"><?php echo __('Y', 'wpsg'); ?></th>
+ <th class="col_color"><?php echo __('Farbe', 'wpsg'); ?></th>
+ <th class="col_groesse"><?php echo __('Größe', 'wpsg'); ?></th>
+ <th class="col_action"></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach ($this->view['wpsg_mod_coverletter']['fields'] as $f => $field_name) { ?>
+ <tr>
+ <td><?php echo wpsg_hspc($field_name); ?></td>
+ <td>
+ <input type="text" style="width:100%;" name="text[<?php echo $f; ?>][text]" value="<?php echo wpsg_getStr($this->view['wpsg_mod_coverletter']['arTexts'][$f]['text']); ?>" />
+ </td>
+ <td>
+ <input type="text" style="width:100%;" name="text[<?php echo $f; ?>][x]" value="<?php echo wpsg_getStr($this->view['wpsg_mod_coverletter']['arTexts'][$f]['x']); ?>" />
+ </td>
+ <td>
+ <input type="text" style="width:100%;" name="text[<?php echo $f; ?>][y]" value="<?php echo wpsg_getStr($this->view['wpsg_mod_coverletter']['arTexts'][$f]['y']); ?>" />
+ </td>
+ <td>
+ <input type="text" style="width:100%;" name="text[<?php echo $f; ?>][color]" value="<?php echo wpsg_getStr($this->view['wpsg_mod_coverletter']['arTexts'][$f]['color']); ?>" />
+ </td>
+ <td>
+ <select name="text[<?php echo $f; ?>][fontsize]" style="width:100%;">
+ <option <?php echo ((wpsg_getStr($this->view['wpsg_mod_coverletter']['arTexts'][$f]['fontsize']) == "8")?'selected="selected"':''); ?> value="8">8</option>
+ <option <?php echo ((wpsg_getStr($this->view['wpsg_mod_coverletter']['arTexts'][$f]['fontsize']) == "9")?'selected="selected"':''); ?> value="9">9</option>
+ <option <?php echo ((wpsg_getStr($this->view['wpsg_mod_coverletter']['arTexts'][$f]['fontsize']) == "10")?'selected="selected"':''); ?> value="10">10</option>
+ <option <?php echo ((wpsg_getStr($this->view['wpsg_mod_coverletter']['arTexts'][$f]['fontsize']) == "11")?'selected="selected"':''); ?> value="11">11</option>
+ <option <?php echo ((wpsg_getStr($this->view['wpsg_mod_coverletter']['arTexts'][$f]['fontsize']) == "12")?'selected="selected"':''); ?> value="12">12</option>
+ <option <?php echo ((wpsg_getStr($this->view['wpsg_mod_coverletter']['arTexts'][$f]['fontsize']) == "13")?'selected="selected"':''); ?> value="13">13</option>
+ <option <?php echo ((wpsg_getStr($this->view['wpsg_mod_coverletter']['arTexts'][$f]['fontsize']) == "14")?'selected="selected"':''); ?> value="14">14</option>
+ </select>
+ </td>
+ <td>
+ <input type="checkbox" title="<?php echo __('Diese Checkbox aktivieren, damit die Textzeile verwendet wird.', 'wpsg'); ?>" value="1" name="text[<?php echo $f; ?>][aktiv]" <?php echo ((wpsg_isSizedInt($this->view['wpsg_mod_coverletter']['arTexts'][$f]['aktiv']))?'checked="checked"':''); ?> />
+ </td>
+ </tr>
+ <?php } ?>
+ </tbody>
+ </table>
+
+ <input class="button" onclick="if (!confirm('<?php echo __('Sind Sie sich sicher? Ihre bisherigen Einstellungen gehen verloren!', 'wpsg'); ?>')) return false; else location.href = '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;action=module&amp;modul=<?php echo $_REQUEST['modul']; ?>&amp;do=reset&amp;noheader=1';" type="button" value="<?php echo __('Standardeinstellungen laden', 'wpsg'); ?>" />
+
+ <br /><br />
+
+ <div class="info">
+ <p>
+ <?php echo __('Die Angaben für X (Abstand von Links) und Y (Abstand von Oben) werden in mm eingetragen.', 'wpsg'); ?><br />
+ <?php echo __('Die Farbe wird im Hexadezimalformat angegeben (#FFFFFF für weiß, #000000 für schwarz).', 'wpsg'); ?>
+ </p>
+ </div>
+
+ <br />
+
+ </div>
+ </div>
+</div>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+ /**
+ * Stellt sicher, dass immer nur ein Button der align-buttons die highlight Klasse hat
+ */
+ function handleLogoAlignClick(pressedEl)
+ {
+
+ if(pressedEl.hasClass("align-buttons-active")) return;
+ else
+ {
+
+ pressedEl.addClass("align-buttons-active");
+ pressedEl[0].value = pressedEl[0].value + " selected";
+
+ jQuery.each($(".logo-align-button"), function(index, element) {
+ if(element.classList.contains("align-buttons-active") && element !== pressedEl[0]){
+
+ var values = element.value.split(" ");
+ element.value = values[0];
+
+ element.classList.remove("align-buttons-active");
+
+ return false;
+
+ }
+ });
+
+ }
+
+ } // function handleLogoAlignClick()
+
+ /**
+ * Wird beim Klicken auf den Vorschau Button ausgelöst
+ */
+ function wpsg_coverletter_preview()
+ {
+
+ var url = "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_coverletter&do=orderAjax&noheader=1&wpsg_coverletter_preview=1";
+
+ window.open(url, '_blank');
+
+ return false;
+
+ } // function wpsg_coverletter_preview()
+
+
+
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_tab').wpsg_tab( {
+ 'cookiename': 'wpsg_mod_coverletter_tab',
+ 'tab2': function() {
+ jQuery('.tablink').show();
+ }
+ } );
+
+ jQuery(".wpsg_coverletter_preview").click(function(){ wpsg_coverletter_preview(); });
+
+ } );
+
+ /* ]]> */</script> \ No newline at end of file