pick column (useability request)

This topic is: not resolved

This topic contains 13 replies, has 5 voices, and was last updated by  kaiiser 3 years, 2 months ago.

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #162845

    marcelp102
    Member

    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

    #162846

    logikal16
    Member

    @kaiiser – How is ASMselect any different from the current multi-select? All aspects of the current multi-select areas are controllable via CSS.

    #162847

    kaiiser
    Member

    ASMselect 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!

    #162848

    kaiiser
    Member

    @logikal/@scott/@tonyjansen: what do you say?

    #162849

    rhyslbw
    Participant
    Post count: 8

    ASMselect gets my vote for a cleaner PICK interface

    #162850

    kaiiser
    Member

    so far on the wishlist?

    #162851

    logikal16
    Member

    @kaiiser – Could you get it working via an input helper?

    #162852

    kaiiser
    Member

    @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.

    #162853

    Alex Sancho
    Member

    does 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

    #162854

    Alex Sancho
    Member

    OK, 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

    #162855

    kaiiser
    Member

    @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.

    #162856

    kaiiser
    Member

    @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.

    #162844

    kaiiser
    Member

    hi,

    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!

    #162857

    kaiiser
    Member

    I forgot to write back here for documentation: helper is working fine now.

Viewing 14 posts - 1 through 14 (of 14 total)

You must be logged in to reply to this topic.

Wordpress Cloud Hosting