Home » Topics » Pods 1.x » pick column (useability request)
pick column (useability request)
This topic contains 13 replies, has 5 voices, and was last updated by kaiiser 3 years, 2 months ago.
-
AuthorPosts
-
December 4, 2009 at 1:44 pm #162845
This can be done with a input helper, when if got some more time I will try to make a helper that uses the script you showed
December 5, 2009 at 10:20 am #162846@kaiiser – How is ASMselect any different from the current multi-select? All aspects of the current multi-select areas are controllable via CSS.
December 6, 2009 at 5:29 pm #162847ASMselect displays
- the selected values under the drop-down. this way nothing get´s out of the viewport with long lists (ex.: numbers 1-100). visible feedback offers a quick overview and therefore a much better user-experience.
- only one line like a classic/basic drop-down. so the whole interface is vertically much less extended.
in a current project i got 22 columns incl. 9 pick columns and 3 of them are multi select boxes. the viewport now got a height of about 1263px. a single line got 28px (incl. margin) and a multi select got 168px (incl. margin8). in my case this could save 420px of viewport.
i hope you agree. thanks!
December 11, 2009 at 5:53 am #162848@logikal/@scott/@tonyjansen: what do you say?
December 11, 2009 at 8:52 pm #162849ASMselect gets my vote for a cleaner PICK interface
December 22, 2009 at 5:17 am #162850so far on the wishlist?
January 4, 2010 at 8:44 am #162851January 11, 2010 at 12:50 am #162852@logikal: yea. got it. scott pointed me at input_fields.php, so it was easy then.
mount asm-select into wp_head-hook:
<pre>
$your_path = THEME;
add_action(‘wp_head’, wp_enqueue_script( ‘jquery_asmselect’, $your_path . ‘/js/jquery.asmselect.js’, array(‘jquery’) ), 10 );
</pre><script>-part:
<pre>
jQuery.noConflict();
jQuery(document).ready(function() {
jQuery("select[multiple]").asmSelect({
addItemTarget: ‘bottom’,
animate: true,
highlight: true,
sortable: true
} );
</pre>input-helper
<pre>
<select name="<?php echo $name; ?>" multiple="multiple" title="<?php echo $name; ?>">
<?php
if (!empty($value))
{
foreach ($value as $key => $val)
{
$active = empty($val['active']) ? ” : ‘ active’;
?>
<option value="<?php echo $val['id']; ?>"><?php echo $val['name']; ?></div>
<?php
}
}
?>
</select>
</pre>the only thing not working is the $name in title and name of the <select>. this seems to get overwritten by asm-select.
January 12, 2010 at 5:43 am #162853does anyone tried this, I’m trying to make it work, but has some problems.
asmselect works with some minor changes to the input-helper, just adding the select attribute to options, but the form refuses to save the selected value.
any help appreciated
January 12, 2010 at 6:11 am #162854OK, finally I’ve got it working, i need to modify the input-helper and jquery.asmselect.js this is the modified input-helper
<pre>
<select name="<?php echo $name; ?>" id="<?php echo $name; ?>" multiple="multiple" title="– select one –" class="form pick <?php echo $name; ?>">
<?php
if (!empty($value))
{
foreach ($value as $key => $val)
{
$active = empty($val['active']) ? ” : ‘ active’;
$selected = empty($val['active']) ? ” : ‘ selected="selected"’;
?>
<option value="<?php echo $val['id']; ?>" class="option<?php echo $active; ?>"<?php echo $selected; ?>><?php echo $val['name']; ?></div>
<?php
}
}
?>
</select>
</pre>on jquery.asmselect.js i’ve modified the line 270 from this
<pre>$O.attr(‘selected’, true);</pre>
to this
<pre>$O.attr(‘selected’, true).addClass(‘active’);</pre>
and line 323 from this
<pre>$O.attr(‘selected’, false);</pre>
to this
<pre>$O.attr(‘selected’, false).removeClass(‘active’);</pre>
hopes this helps
January 13, 2010 at 12:07 pm #162855@aleksancho: No need to worry about hacking the asm-select. I made a helper. You can download it here: http://pods.uproot.us/packages/multi-select-input-helper-jquery-asm-select/
I´ve even included some css (see comments). it works good for me and is asm-select update-save. (only thing could be, that you have to exchange the "$" with "jQuery" if you´re running it in no-conflict mode.
January 13, 2010 at 12:10 pm #162856@aleksancho: edit: sry, i didn´t try to save anything at the moment.. i´ll write back when i tried it and (in case) i´m going to modify the helper. thanks.
February 23, 2010 at 6:44 am #162844hi,
what i really like with the pods-admin-interface is that it´s not vertical extending and pretty compact. but what´s really annoying are the really large multi select boxes (users hate scrolling and hate not having instant visual feedback).
there´s a (jQuery) sollution for this, that i really like. it displays all selected items, so the user get´s an instant overview of what he/she already got: http://code.google.com/p/jquery-asmselect/
P-L-E-A-S-E implement that feature. i really got problems with users telling me that this particular feature should be better. i hope so much you hear me at that point, scott!
February 23, 2010 at 6:44 am #162857I forgot to write back here for documentation: helper is working fine now.
-
AuthorPosts
You must be logged in to reply to this topic.