Plugin Directory

Changeset 697251


Ignore:
Timestamp:
04/14/2013 10:03:30 AM (13 years ago)
Author:
Po.st
Message:

Release v 1.3.1

Location:
post/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • post/trunk/js/post-constructor.js

    r696833 r697251  
    5959    position.each(function($t){
    6060        var $t = $(this);
     61
     62        $('input',$t).bind('click',function(){
     63
     64            if(!$(this).next().hasClass('selected') && $(this).attr('name') === 'display_position_vertical') {
     65                $('.post-wizard__position__item',$t).removeClass('selected');
     66                $(this).next().addClass('selected');
     67                var idx = $('input',$t).index(this);
     68                if($t.hasClass('post-wizard__position__vertical')){
     69                    $('.post-wizard__position__vertical-pretext .post-wizard__position__pretext__inner').hide();
     70                    $('.post-wizard__position__vertical-pretext .post-wizard__position__pretext__inner').eq(idx).show();
     71                }
     72            }
     73        });
    6174        $('label',$t).bind('click', function(){
    6275
    63             if(!$(this).hasClass('selected')) {
    64                 $(this).addClass('selected');
    65                 $(this).parent().find('input').attr('checked', !$(this).parent().find('input').is(':checked'))
     76            if ($(this).parent().find('input').attr('name') === 'display_position_horizontal[]') {
     77                if(!$(this).hasClass('selected')) {
     78                    $(this).addClass('selected');
     79                    $(this).parent().find('input').attr('checked', !$(this).parent().find('input').is(':checked'))
     80
     81                } else {
     82                    if (!($(this).closest('ul').find('.selected').length === 2)) {
     83                        $('.post-wizard__position__item', position).addClass('selected');
     84                        $('input', position).attr('checked', true)
     85                    }
     86                    $(this).removeClass('selected');
     87                    $(this).parent().find('input').attr('checked', false);
     88                }
    6689
    6790            } else {
    68                 if (!($(this).closest('ul').find('.selected').length === 2)) {
    69                     $('.post-wizard__position__item', position).addClass('selected');
    70                     $('input', position).attr('checked', true)
    71                 }
    72                 $(this).removeClass('selected');
    73                 $(this).parent().find('input').attr('checked', false);
    74             }
    75 
     91                if(!$(this).hasClass('selected')) {
     92                    $(this).parent().find('input').trigger('click');
     93                }
     94            }
    7695            return false;
    7796        });
  • post/trunk/post.php

    r696833 r697251  
    55  Description: Po.st makes your site social by letting your users share posts and pages with others. Po.st supports several social networks, email and languages. Check the README file for configuration options and our support site at <a href="http://support.po.st/">http://support.po.st/</a> for other inquiries.
    66  Author: Po.st
    7   Version: 1.3
     7  Version: 1.3.1
    88  Author URI: http://www.po.st/
    99 */
     
    137137    <a class="pw-button-post"></a>
    138138</div>';
     139
    139140    $display_custom_position_horizontal = get_option('post_display_custom_position_horizontal', 'above');
    140141    $design_custom_code = get_option('post_design_custom_code', $default_design_custom_code);
     
    283284
    284285function post_make_widget($url='', $title='', $options=NULL){
     286
    285287    global $displayTypes, $avServices, $orientationType, $positionType, $post;
    286288
     
    312314        $design_totaltype = $options['post_design_totaltype'];
    313315    }
    314     $display_position_horizontal = $display_position_horizontal[0];
     316
    315317    $out = "";
    316318    $extra = '';
     
    353355            }
    354356        }
    355 
    356         $positionClass = $positionType[$design_orientation][${"display_position_$design_orientation"}][0]['class'];
    357         echo $positionClass;
     357        if ($design_orientation == 'vertical') {
     358            $positionClass = $positionType[$design_orientation][${"display_position_$design_orientation"}]['class'];
     359        } else {
     360            $positionClass = $positionType[$design_orientation][${"display_position_$design_orientation"}[0]]['class'];
     361        }
     362
    358363        if ($design_orientation == 'vertical') {
    359364            $out .= "<div class='{$positionClass}' style='position:fixed; margin-top:-9999px'>";
     
    407412    $options['post_display_pages'] = isset($_POST['show_on'])?$_POST['show_on']:array();
    408413    $options['post_display_pages'] = implode(',', array_keys($options['post_display_pages']));
    409     /*if (isset($_POST['display_position_horizontal'] )){
    410         if (count($_POST['display_position_horizontal']) > 1) {
    411             $options['post_display_position_horizontal'] = 'both';
    412         } else {
    413             $options['post_display_position_horizontal'] = $options['post_display_position_horizontal'][0];
    414         }
    415     } else {
    416         $options['post_display_position_horizontal'][0] = 'above';
    417     }*/
     414
    418415    $options['post_display_position_horizontal'] = isset($_POST['display_position_horizontal'] )?$_POST['display_position_horizontal']:'above';
    419416    $options['post_display_position_vertical'] = isset($_POST['display_position_vertical'])?$_POST['display_position_vertical']:'left';
  • post/trunk/readme.txt

    r696833 r697251  
    44Requires at least: 3.4.1, 3.4.2, 3.0
    55Tested up to: 3.4.1, 3.4.2, 3.0
    6 Stable tag: 1.3
     6Stable tag: 1.3.1
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4545
    4646== Changelog ==
     47= 1.3.1 =
     48* Bug fix.
     49
    4750= 1.3 =
    4851* Added ability to have share buttons on top and bottom of blog posts.
  • post/trunk/tpl/form.tpl.php

    r696833 r697251  
    101101                    <?php foreach ($positionType['horizontal'] as $type => $data):?>
    102102                    <li>
    103                         <input type='checkbox' id='position-horizontal-<?php print $type?>' name='display_position_horizontal[]' value='<?php print $type?>' <?php if (in_array($type, $display_position_horizontal))print 'checked="checked"';?>/>
    104                         <label for='position-horizontal-<?php print $type?>' class="post-wizard__position__item<?php if (in_array($type, $display_position_horizontal))print ' selected';?>">
     103                        <input type='checkbox' id='position-horizontal-<?php print $type?>' name='display_position_horizontal[]' value='<?php print $type?>' <?php if ((is_array($display_position_horizontal) && in_array($type, $display_position_horizontal)) || ($display_position_horizontal == $type))print 'checked="checked"';?>/>
     104                        <label for='position-horizontal-<?php print $type?>' class="post-wizard__position__item<?php if ((is_array($display_position_horizontal) && in_array($type, $display_position_horizontal)) || ($display_position_horizontal == $type))print ' selected';?>">
    105105                            <i class="post-wizard__position__ico <?php print $type?>"></i>
    106106                            <span class="post-wizard__position__item__inner"><?php print $data['label']?></span>
     
    112112                    <?php foreach ($positionType['vertical'] as $type => $data):?>
    113113                    <li>
    114                         <input type='checkbox' id='position-vertical-<?php print $type?>' name='display_position_vertical' value='<?php print $type?>' <?php if (in_array($type, $display_position_horizontal))print 'checked="checked"';?>/>
    115                         <label for='position-vertical-<?php print $type?>' class="post-wizard__position__item<?php if (in_array($type, $display_position_horizontal))print ' selected';?>">
     114                        <input type='radio' id='position-vertical-<?php print $type?>' name='display_position_vertical' value='<?php print $type?>' <?php if ($display_position_vertical == $type)print 'checked="checked"';?>/>
     115                        <label for='position-vertical-<?php print $type?>' class="post-wizard__position__item<?php if ($display_position_vertical == $type)print ' selected';?>">
    116116                            <i class="post-wizard__position__ico <?php print $type?>"></i>
    117117                            <span class="post-wizard__position__item__inner"><?php print $data['label']?></span>
Note: See TracChangeset for help on using the changeset viewer.