Support for MixItUp 2.0

Permalink Browser Info Environment
Will you have support for MixItUp v.2? Or in it's current form, does it support the filter function? We have a client for which that would be perfect for.

Type: Discussion
Status: In Progress
TeKnoZiz
View Replies:
c5mix replied on at Permalink Reply
c5mix
The current version is 1.5.4. I have no plans on updating it to v2. If you need functionality that's in v2, here's an upgrade tutorial:
https://mixitup.kunkalabs.com/docs/version-1-migration/...
The js file you would need to replace is located at packages/theme_treviso/themes/treviso/js/jquery.mixitup.min.js
You would need to remove opacity=0; from "ul.portfolio li" on line 395 of the theme's main.css file.
On line 146 of the Portfolio Sortable page list template's view.php file (packages/theme_treviso/blocks/page_list/templates/portfolio_sortable/view.php) you need to change this:
$('#ccm-portfolio-grid-<?php echo $bID ?> ul.portfolio').mixitup({

To this:
$('#ccm-portfolio-grid-<?php echo $bID ?> ul.portfolio').mixItUp({
TeKnoZiz replied on at Permalink Reply
TeKnoZiz
I did perform those changes and swapped out the JS file, but the result was that I only saw the tabs and not the pages. The new package came with a bunch of support files, so not sure if or how they figure in.
c5mix replied on at Permalink Reply
c5mix
Not sure. that should be all you have to do. Make sure you made that css change I mentioned.
TeKnoZiz replied on at Permalink Reply
TeKnoZiz
Ok here are the additional changes to make version 2 of mixItUp work:

Replace lines 20-27 in view.php with

<ul class="portfoliofilter">
        <li class="filter active" data-filter="all"><?php   echo t('All') ?></li>
        <?php   foreach ($values as $v) {
         if(is_object($ak)){
         echo '<li class="filter" data-filter=".'.$v->value.'">'.$v->value.'</li>';
         }
      }?>
    </ul>


And lines 136-144 with

$(document).ready(function() { 
   $(function(){
      $('#ccm-portfolio-grid-<?php echo $bID ?> ul.portfolio').mixItUp({
         selectors: { target: '.item', filter: '.filter'  },
         animation: { effects: 'fade scale', easing: 'ease' },
         layout: { display: 'inline-block' }
      });
   });
});


That should take care of it!
c5mix replied on at Permalink Reply
c5mix
Thanks so much for posting this!
TeKnoZiz replied on at Permalink Reply
TeKnoZiz
I did perform those changes and swapped out the JS file, but the result was that I only saw the tabs and not the pages. The new package came with a bunch of support files, so not sure if or how they figure in.

concrete5 Environment Information

# concrete5 Version
5.6.3.3

# concrete5 Packages
Dashboard Maximizer (2.0.4), Page Auto Redirect (2.0), tnSpacer (1.3), Treviso Theme (0.9.9).

# concrete5 Overrides
blocks/image, languages/ar, languages/cs_CZ, languages/da_DK, languages/de_DE, languages/el_GR, languages/es_AR, languages/es_ES, languages/es_MX, languages/es_PE, languages/fa_IR, languages/fi_FI, languages/fr_FR, languages/it_IT, languages/ja_JP, languages/nb_NO, languages/nl_NL, languages/pt_PT, languages/ro_RO, languages/ru_RU, languages/sk_SK, languages/sl_SI, languages/sv_SE, languages/tr_TR, languages/vi_VN, languages/zh_TW, themes/treviso

# concrete5 Cache Settings
Block Cache - On
Overrides Cache - On
Full Page Caching - Off

# Server Software
Apache

# Server API
apache2handler

# PHP Version
5.6.2

# PHP Extensions
apache2handler, bcmath, bz2, calendar, Core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imap, intl, json, ldap, libxml, mbstring, mcrypt, mysql, mysqli, openssl, pcre, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, Reflection, session, SimpleXML, soap, sockets, SPL, sqlite3, standard, tokenizer, wddx, xml, xmlreader, xmlwriter, xsl, yaz, zip, zlib.

# PHP Settings
max_execution_time - 30
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
memory_limit - 128M
post_max_size - 32M
sql.safe_mode - Off
upload_max_filesize - 32M
ldap.max_links - Unlimited
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
pgsql.max_links - Unlimited
pgsql.max_persistent - Unlimited
session.cache_limiter - nocache
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5

Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.89 Safari/537.36

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.