Plugin Directory

Changeset 381580

Timestamp:
05/06/2011 03:43:56 AM (13 years ago)
Author:
alternatekev
Message:

v 1.9 updates including visual cleanup

Location:
polldaddy/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • polldaddy/trunk/admin-style.php

    r381437 r381580  
    119119        color: #666;
    120120        padding: 10px;
     121
    121122    }
    122123   
     
    205206    }
    206207   
     208
     209
     210
     211
     212
     213
     214
     215
     216
     217
     218
    207219</style>
  • polldaddy/trunk/polldaddy.css

    r381437 r381580  
    3333.has-sidebar .has-sidebar-content{margin-right:245px;}
    3434#post-body-content #titlediv{margin:10px 0;}
    35 tr.polldaddy-shortcode-row{background-color:#FFFEEB;}
     35tr.polldaddy-shortcode-row{}
    3636tr.polldaddy-shortcode-row h4{padding:0;margin:0.3em 0;clear:both;}
    3737tr.polldaddy-shortcode-row pre{float:left;background-color:#fff;padding:.2em;margin:0 0 .5em;border:1px solid #ccc;}
  • polldaddy/trunk/polldaddy.js

    r381437 r381580  
    3030            }
    3131        });
     32
     33
     34
     35
     36
     37
    3238        $('a.delete-rating').click(function () {
    3339            return confirm( opts.delete_rating.replace("%s", $(this).parents('td').find('strong').text() ) );
     
    6975            win.send_to_editor('[polldaddy poll=' + parseInt(pollID).toString() + ']');
    7076        });
    71         $('.polldaddy-show-shortcode').toggle(function () {
     77        $('.polldaddy-show-shortcode').toggle(function (ev) {
     78            ev.preventDefault();
    7279            $(this).parents('tr:first').next('tr').fadeIn();
    7380            $(this).parents('tr:first').next('tr').show();
     81
     82
    7483            return false;
    7584        }, function () {
     
    7786            $(this).parents('tr:first').next('tr').hide();
    7887            return false;
     88
     89
     90
     91
     92
     93
     94
    7995        });
    8096        var hiddenStyleID = $(':input[name=styleID]');
  • polldaddy/trunk/polldaddy.php

    r381437 r381580  
    11161116?>
    11171117
    1118         <h2><?php
     1118        <h2><?php
    11191119                if ( $this->is_author )
    1120                     printf( __( 'Poll Results <a href="%s" class="button add-new-h2">Edit Poll</a>', 'polldaddy' ), esc_url( add_query_arg( array( 'action' => 'edit', 'poll' => $poll, 'message' => false ) ) ) );
     1120                    );
    11211121                else
    1122                     printf( __( 'Poll Results <a href="%s" class="button add-new-h2">List Polls</a>', 'polldaddy' ), esc_url( add_query_arg( array( 'action' => false, 'poll' => false, 'message' => false ) ) ) ); ?></h2>
     1122                    ); ?></h2>
    11231123
    11241124<?php
     
    13581358                                        <td class="poll-votes column-vote num"><?php echo number_format_i18n( $poll->_responses ); ?><span class="votes-label"><?php _e( 'votes' ); ?></span></td>
    13591359                                </tr>
    1360                                 <tr class="polldaddy-shortcode-row" style="display: none;">
    1361                                         <td colspan="4">
    1362                                                 <h4><?php _e( 'WordPress Shortcode', 'polldaddy' ); ?></h4>
    1363                                                 <input type="text" readonly="readonly" style="width: 175px;" onclick="this.select();" value="[polldaddy poll=<?php echo (int) $poll_id; ?>]"/>
    1364 
    1365                                                 <h4><?php _e( 'JavaScript', 'polldaddy' ); ?></h4>
    1366                                                 <pre>&lt;script type="text/javascript" language="javascript"
    1367   src="http://static.polldaddy.com/p/<?php echo (int) $poll_id; ?>.js"&gt;&lt;/script&gt;
     1360                                <tr class="polldaddy-shortcode-row <?php if( $class ): ?> alternate <?php endif; ?>" style="display: none;">
     1361                                    <td colspan="4" style="padding:10px 0px 10px 20px;">
     1362                                       
     1363                                        <a style="display:block;font-size:12px;font-weight:bold;"  href="<?php echo $edit_link; ?>"><?php echo esc_html( $poll->___content ); ?></a>
     1364                                           
     1365                                        <div class="pd-embed-col">
     1366                                            <h4 style="color:#666;font-weight:normal;"><?php _e( 'WordPress Shortcode', 'polldaddy' ); ?></h4>
     1367                                            <input type="text" readonly="readonly" style="width: 175px;" onclick="this.select();" value="[polldaddy poll=<?php echo (int) $poll_id; ?>]"/>
     1368                                        </div>
     1369
     1370                                        <div class="pd-embed-col">
     1371                                            <h4 style="color:#666;font-weight:normal;"><?php _e( 'Short URL (Good for Twitter etc.)', 'polldaddy' ); ?></h4>
     1372                                            <input type="text" readonly="readonly" style="width: 175px;" onclick="this.select();" value="http://poll.fm/<?php echo base_convert( $poll_id, 10, 36 ); ?>"/>
     1373
     1374                                        </div>
     1375
     1376                                        <div class="pd-embed-col">
     1377                                            <h4 style="color:#666;font-weight:normal;"><?php _e( 'Facebook URL', 'polldaddy' ); ?></h4>
     1378                                            <input type="text" readonly="readonly" style="width: 175px;" onclick="this.select();" value="http://poll.fm/f/<?php echo base_convert( $poll_id, 10, 36 ); ?>"/>
     1379                                        </div>
     1380                                           
     1381                                        <br class="clearing" />   
     1382                                           
     1383
     1384                                        <h4 style="padding-top:10px;color:#666;font-weight:normal;"><?php _e( 'JavaScript', 'polldaddy' ); ?></h4>
     1385                                        <pre style="max-width:542px;text-wrap:word-wrap;margin-bottom:20px;">&lt;script type="text/javascript" language="javascript"
     1386src="http://static.polldaddy.com/p/<?php echo (int) $poll_id; ?>.js"&gt;&lt;/script&gt;
    13681387&lt;noscript&gt;
    1369  &lt;a href="http://polldaddy.com/poll/<?php echo (int) $poll_id; ?>/"&gt;<?php echo trim( strip_tags( $poll->___content ) ); ?>&lt;/a&gt;&lt;br/&gt;
    1370  &lt;span style="font:9px;"&gt;(&lt;a href="http://www.polldaddy.com"&gt;polls&lt;/a&gt;)&lt;/span&gt;
     1388&lt;a href="http://polldaddy.com/poll/<?php echo (int) $poll_id; ?>/"&gt;<?php echo trim( strip_tags( $poll->___content ) ); ?>&lt;/a&gt;&lt;br/&gt;
     1389&lt;span style="font:9px;"&gt;(&lt;a href="http://www.polldaddy.com"&gt;polls&lt;/a&gt;)&lt;/span&gt;
    13711390&lt;/noscript&gt;</pre>
    1372 <h4><?php _e( 'Short URL (Good for Twitter etc.)', 'polldaddy' ); ?></h4>
    1373 <input type="text" readonly="readonly" style="width: 175px;" onclick="this.select();" value="http://poll.fm/<?php echo base_convert( $poll_id, 10, 36 ); ?>"/>
    1374 <h4><?php _e( 'Facebook URL', 'polldaddy' ); ?></h4>
    1375 <input type="text" readonly="readonly" style="width: 175px;" onclick="this.select();" value="http://poll.fm/f/<?php echo base_convert( $poll_id, 10, 36 ); ?>"/>
     1391>
     1392>
     1393                        </p>                   
     1394                   
    13761395                    </td>
    13771396                </tr>
     
    16411660            <input type="text" autocomplete="off" id="title" placeholder="<?php _e( 'Enter Question Here' ); ?>" value="<?php echo $question; ?>" tabindex="1" size="30" name="question" />
    16421661           
    1643             <?php if( isset( $poll ) ): ?>
     1662            <?php if( isset( $poll ) ): ?>
    16441663                <div class="inside">
    16451664                    <div id="edit-slug-box" style="margin-bottom:30px;">
    16461665                        <strong><?php _e( 'WordPress Shortcode:' ); ?></strong>
    1647                         <span style="color:#999;">[polldaddy poll=<?php echo $poll->_id; ?>]</span>
    1648                         <span><a href="#" class="button"><?php _e( 'Copy' ); ?></a></span>
    1649                         <span><a href="#" class="button"><?php _e( 'Embed in New Post' ); ?></a></span>
     1666                        <input type="text" style="color:#999;" value="[polldaddy poll=<?php echo $poll->_id; ?>]" id="shortcode-field" readonly="readonly" />
     1667                        <span><a href="post-new.php?content=[polldaddy poll=<?php echo $poll->_id; ?>]" class="button"><?php _e( 'Embed Poll in New Post' ); ?></a></span>
    16501668                    </div>
    16511669                </div>
     
    21802198
    21812199        $results = $polldaddy->get_poll_results( $poll_id );
     2200
     2201
    21822202?>
    2183 
     2203        <h3 style="line-height:21px;"><?php echo $poll->question;  ?></h3>
    21842204        <table class="poll-results widefat">
    21852205            <thead>
    21862206                <tr>
    2187                     <th scope="col" class="column-title"><?php _e( 'Answer', 'polldaddy' ); ?></th>
     2207                    <th scope="col" class="column-title"><?php _e( 'Answer', 'polldaddy' ); ?></th>
    21882208                    <th scope="col" class="column-vote"><?php _e( 'Votes', 'polldaddy' ); ?></th>
     2209
     2210
    21892211                </tr>
    21902212            </thead>
     
    22052227
    22062228                <tr<?php echo $class; ?>>
    2207                     <th scope="row" class="column-title"><?php echo $content; ?></th>
    2208                     <td class="column-vote">
    2209                         <div class="result-holder">
    2210                             <span class="result-bar" style="width: <?php echo number_format( $answer->_percent, 2 ); ?>%;">&nbsp;</span>
    2211                             <span class="result-total alignleft"><?php echo number_format_i18n( $answer->_total ); ?></span>
    2212                             <span class="result-percent alignright"><?php echo number_format_i18n( $answer->_percent ); ?>%</span>
    2213                         </div>
     2229                    <th scope="row" style="vertical-align:bottom;" class="column-title"><?php echo $content; ?></th>
     2230                    <td class="column-vote" style="text-align:right;vertical-align:middle;">
     2231                        <?php echo number_format_i18n( $answer->_total ); ?>
     2232                    </td>   
     2233                    <td style="text-align:right;vertical-align:middle;">
     2234                        <?php echo number_format_i18n( $answer->_percent ); ?>%                     
     2235                    </td>
     2236                    <td style="vertical-align:middle;">
     2237                        <span class="result-bar" style="width: <?php echo number_format( $answer->_percent, 2 ); ?>%;">&nbsp;</span>
    22142238                    </td>
    22152239                </tr>
Note: See TracChangeset for help on using the changeset viewer.