--- a/integration/v2/js/main.js Thu Jun 20 16:21:35 2013 +0200
+++ b/integration/v2/js/main.js Fri Jun 21 14:52:50 2013 +0200
@@ -1,11 +1,18 @@
$(function(){
//masonry
- var container = $('.list-projets-3');
- container.masonry({
+ var masonry465 = $('.masonry-465');
+ masonry465.masonry({
columnWidth: 465,
- itemSelector: '.item',
+ itemSelector: '.item-masonry',
gutter : 20
});
+
+ var masonry225 = $('.masonry-225');
+ masonry225.masonry({
+ columnWidth: 225,
+ itemSelector: '.item-masonry',
+ gutter : 16
+ });
//popin
$('.open-popin').bind('click', function(e){
e.preventDefault();
@@ -27,14 +34,22 @@
e.stopPropagation();
});
//tag it
- var keywordsTagIt = $('.tag-it').tagit({
- allowSpaces : true
- });
- $('.list-key-add a').bind('click', function(e){
- e.preventDefault();
- var tag = $(this).attr('data-tag');
- keywordsTagIt.tagit("createTag", tag);
- });
-
+ if($('.tag-it').length){
+ var keywordsTagIt = $('.tag-it').tagit({
+ allowSpaces : true
+ });
+ $('.list-key-add a').bind('click', function(e){
+ e.preventDefault();
+ var tag = $(this).attr('data-tag');
+ keywordsTagIt.tagit("createTag", tag);
+ });
+ }
+//filters
+ $('.filters a').each(function(){
+ var text = $.trim($(this).text());
+ if(text.length > 30){
+ $(this).text(text.substr(0, 30) + '...')
+ }
+ })
});//ready