Changeset 20341


Ignore:
Timestamp:
Jan 23, 2013, 12:20:32 AM (11 years ago)
Author:
julien1311
Message:

[piwecard] working on ajax to preview email messages

Location:
extensions/Piwecard
Files:
3 added
5 edited

Legend:

Unmodified
Added
Removed
  • extensions/Piwecard/admin/admin_configuration.php

    r20320 r20341  
    173173$template->assign('ecard_email_message_html', ((isset($configuration['email_message']['html'])) ? $configuration['email_message']['html'] : htmlspecialchars_decode($piwecard->config['email_message']['html'])));
    174174$template->assign('preview_image', get_root_url().PIWECARD_PATH.'admin/images/image.jpg');
    175    
     175
    176176$template->set_filename('plugin_admin_content', dirname(__FILE__) . '/template/admin_configuration.tpl');
    177177$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
  • extensions/Piwecard/admin/template/admin_configuration.tpl

    r20320 r20341  
    2424                        if (data.stat =='ok') {
    2525                                $("#previewEmail").html(data.result.message);
     26                                $.each(data.result.style, function(index, value) {
     27                                        document.getElementById(index).setAttribute("style", value);
     28                                });
    2629                                $.colorbox({
    2730                                        inline:true,
    2831                                        href:"#previewEmail",
    29                                         onComplete:function(){
     32                                        onComplete: function(style){
    3033                                                $("#cboxLoadedContent").css('text-align', 'left');
    3134                                        }
  • extensions/Piwecard/include/piwecard.class.php

    r20320 r20341  
    180180                       
    181181                        if (!empty($page['category'])) {
    182                                 // Gets all upper categories from the image category
     182                                // Gets all upper categories from the image category to test
     183                                //      - if the upper category is activated for this function
    183184                                $query = 'SELECT * FROM '.CATEGORIES_TABLE.' WHERE id = '.pwg_db_real_escape_string($page['category']['id']).';';
    184185                                $cat = pwg_db_fetch_assoc(pwg_query($query));
  • extensions/Piwecard/mail/template/mail_html.tpl

    r20320 r20341  
    66<style>
    77{literal}
    8 body {
     8#email_body {
    99        font-family: Univers, Helvetica, Optima;
    1010        font-size:12px;
     
    1313        background-color: #DDDDDD;
    1414}
    15 #the_page {
     15#the_email {
    1616        margin: 0px;
    1717        padding: 0px;
    1818        text-align: left;
    1919}
    20 #content {
     20#email_content {
    2121        margin: 0px;
    2222        padding: 30px 0px 0px 30px;
    2323        width: 732px;
    2424}
    25 hr {
     25.email_hr {
    2626        width: 632px;
    2727        margin-left: 0;
    2828}
    29 #copyright {
     29#email_copyright {
    3030        font-size: 10px;
    3131        margin: 0px;
     
    3939</style>
    4040</head>
    41 <body>
    42         <div id="the_page">
    43                 <div id="content" class="content">
     41<body id="email_body">
     42        <div id="the_email">
     43                <div id="email_content" class="content">
    4444                        {$MESSAGE_HTML}
    4545                </div>
    46                 <div id="copyright">
    47                         <hr>
     46                <div id="email_copyright">
     47                        <hr class="email_hr" />
    4848                        {'Sent by'|@translate}
    4949                        <a href="{$GALLERY_URL}">{$GALLERY_TITLE}</a>
  • extensions/Piwecard/main.inc.php

    r20320 r20341  
    7777
    7878function piwecard_ws_add_methods($arr) {
    79         require_once('admin/ws_functions.inc.php');
     79        require_once('ws/ws_functions.inc.php');
    8080}
    8181?>
Note: See TracChangeset for help on using the changeset viewer.