Changeset 697251
- Timestamp:
- 04/14/2013 10:03:30 AM (13 years ago)
- Location:
- post/trunk
- Files:
-
- 4 edited
-
js/post-constructor.js (modified) (1 diff)
-
post.php (modified) (6 diffs)
-
readme.txt (modified) (2 diffs)
-
tpl/form.tpl.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
post/trunk/js/post-constructor.js
r696833 r697251 59 59 position.each(function($t){ 60 60 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 }); 61 74 $('label',$t).bind('click', function(){ 62 75 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 } 66 89 67 90 } 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 } 76 95 return false; 77 96 }); -
post/trunk/post.php
r696833 r697251 5 5 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. 6 6 Author: Po.st 7 Version: 1.3 7 Version: 1.3.1 8 8 Author URI: http://www.po.st/ 9 9 */ … … 137 137 <a class="pw-button-post"></a> 138 138 </div>'; 139 139 140 $display_custom_position_horizontal = get_option('post_display_custom_position_horizontal', 'above'); 140 141 $design_custom_code = get_option('post_design_custom_code', $default_design_custom_code); … … 283 284 284 285 function post_make_widget($url='', $title='', $options=NULL){ 286 285 287 global $displayTypes, $avServices, $orientationType, $positionType, $post; 286 288 … … 312 314 $design_totaltype = $options['post_design_totaltype']; 313 315 } 314 $display_position_horizontal = $display_position_horizontal[0]; 316 315 317 $out = ""; 316 318 $extra = ''; … … 353 355 } 354 356 } 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 358 363 if ($design_orientation == 'vertical') { 359 364 $out .= "<div class='{$positionClass}' style='position:fixed; margin-top:-9999px'>"; … … 407 412 $options['post_display_pages'] = isset($_POST['show_on'])?$_POST['show_on']:array(); 408 413 $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 418 415 $options['post_display_position_horizontal'] = isset($_POST['display_position_horizontal'] )?$_POST['display_position_horizontal']:'above'; 419 416 $options['post_display_position_vertical'] = isset($_POST['display_position_vertical'])?$_POST['display_position_vertical']:'left'; -
post/trunk/readme.txt
r696833 r697251 4 4 Requires at least: 3.4.1, 3.4.2, 3.0 5 5 Tested up to: 3.4.1, 3.4.2, 3.0 6 Stable tag: 1.3 6 Stable tag: 1.3.1 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 45 45 46 46 == Changelog == 47 = 1.3.1 = 48 * Bug fix. 49 47 50 = 1.3 = 48 51 * Added ability to have share buttons on top and bottom of blog posts. -
post/trunk/tpl/form.tpl.php
r696833 r697251 101 101 <?php foreach ($positionType['horizontal'] as $type => $data):?> 102 102 <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';?>"> 105 105 <i class="post-wizard__position__ico <?php print $type?>"></i> 106 106 <span class="post-wizard__position__item__inner"><?php print $data['label']?></span> … … 112 112 <?php foreach ($positionType['vertical'] as $type => $data):?> 113 113 <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';?>"> 116 116 <i class="post-wizard__position__ico <?php print $type?>"></i> 117 117 <span class="post-wizard__position__item__inner"><?php print $data['label']?></span>
Note: See TracChangeset
for help on using the changeset viewer.