Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Nikoya

    (@nicolas-andre)

    I can’t wait … ??

    So i’ve done that and that work !

    I’ve use #2 (my way) :

    There is 3 files to modify :

    – wpcolumns/wpcolumns_plugin.js
    – wpcolumns/plugin_shortcode.php
    – styles/bootstrap_admin.min.css

    This is the code :

    Edit wpcolumns/wpcolumns_plugin.js
    Line 150 add

    clearleft='<input type="checkbox"  name="'+index+'clear['+i+']" id="'+index+'clear'+i+'" value="yes">';

    Line 155 replace
    ele+='<td><div class="head_division">'+sm+'</div><div class="head_division">'+smoff+'</div><div class="head_division head_division_check right">'+hidecol+'</div></td>';

    by

    ele+='<td><div class="head_division head_division_check">'+clearleft+'</div><div class="head_division">'+sm+'</div><div class="head_division">'+smoff+'</div><div class="head_division head_division_check right">'+hidecol+'</div></td>';

    Line 267 replace :
    //var a_md=[],a_sm=[],a_xs=[],a_lg=[],j=0,a_md_off=[],a_sm_off=[],a_xs_off=[],a_lg_off=[],a_md_hide=[],a_sm_hide=[],a_xs_hide=[],a_lg_hide=[],sm='',md='',xs='',smoff='',mdoff='',xsoff='',lgoff='',smhide='',mdhide='',xshide='',lghide='';

    BY

    var a_md=[],a_sm=[],a_xs=[],a_lg=[],j=0,a_md_off=[],a_sm_off=[],a_xs_off=[],a_lg_off=[],a_md_hide=[],a_sm_hide=[],a_xs_hide=[],a_lg_hide=[],sm='',md='',xs='',smoff='',mdoff='',xsoff='',lgoff='',smhide='',mdhide='',xshide='',lghide='',smclear='',mdclear='',xsclear='',lgclear='';

    Line 355 ADD

    if(jQuery('#mdclear'+i).is(':checked')){
                    mdclear=' mdclear="yes"';
                }
                else{
                    mdclear='';
                }
                if(jQuery('#smclear'+i).is(':checked')){
                    smclear=' smclear="yes"';
                }
                else{
                    smclear='';
                }
                if(jQuery('#xsclear'+i).is(':checked')){
                    xsclear=' xsclear="yes"';
                }
                else{
                    xsclear='';
                }
                if(jQuery('#lgclear'+i).is(':checked')){
                    lgclear=' lgclear="yes"';
                }
                else{
                    lgclear='';
                }

    Line 382 Replace

    shortcode += '<br/>[column lg="'+a_lg[i]+'"'+md+sm+xs+mdoff+smoff+xsoff+lgoff+mdhide+smhide+xshide+lghide+' ]<br/>text<br/>[/column]';

    BY

    shortcode += '<br/>[column lg="'+a_lg[i]+'"'+md+sm+xs+mdoff+smoff+xsoff+lgoff+mdhide+smhide+xshide+lghide+mdclear+smclear+xsclear+lgclear+' ]<br/>text<br/>[/column]';

    File plugin_shortcode.php

    Line 27 Add this in the array

    'mdclear' => '',
            'smclear' => '',
            'xsclear' => '',
            'lgclear' => '',

    Line 74 add

    $arr2 = array('mdclear', 'smclear', 'xsclear', 'lgclear');
        foreach ($arr2 as $k => $aa) {
            $nn = str_replace('clear', '', $aa);
            if (${$aa} == 'yes') {
                $classes[] = 'clear-' . $nn;
            }
        }

    Edit file bootstrap_admin.min.css

    Replace .head_division{float:left;font-size:10px;text-align:left;width:42%}.head_division.right{text-align:right}.head_division_check{width:10%}

    BY

    .head_division{float:left;font-size:10px;text-align:left;width:30%}.head_division.right{text-align:right}.head_division_check{width:20%}

    Finally just add ccs in your theme/styles.css

    /* Small devices (tablets, 768px and up) */
    @media (max-width: 767px){
        .clear-xs{clear:left;}
    }
    
    /* Small devices (tablets, 768px and up) */
    @media (min-width: 768px) and (max-width: 991px) {
        .clear-sm{clear:left;}
    }
    
    /* Medium devices (desktops, 992px and up) */
    @media (min-width: 992px) and (max-width: 1199px){
        .clear-md{clear:left;}
    }
    
    /* Large devices (large desktops, 1200px and up) */
    @media (min-width: 1200) {
        .clear-lg{clear:left;}
    }

    Easy to do, easy to maintain, easy to use

    Thx

    Thread Starter Nikoya

    (@nicolas-andre)

    sorry for bbcode ??

    this is picture in wp-admin :

    (new column ‘clear left’)

    https://imageshack.us/photo/my-images/266/ayz2.jpg/

    Plugin Author osCitas Themes

    (@oscitas)

    Hi Nikoya,

    Thanks a lot for your work. We will implement your changes soon. You can push your changes to our Git Repository. It will be easy to track the changes in github.

    Once again thanks for your efforts.

    Thread Starter Nikoya

    (@nicolas-andre)

    Ok i’ll try.

    to be honnest i don’t remeneber to already have never pushed anything on Git so ..

    i’ll try ^^

    Thread Starter Nikoya

    (@nicolas-andre)

    I’ve pushed it.

    hmmm … i think i’ve pushed it ^^

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Columns : Add clear function when new line’ is closed to new replies.