From 8d9034cf48e3fe8cddcffadf87c9fb9535996b7e Mon Sep 17 00:00:00 2001 From: voodoohop Date: Tue, 18 Mar 2014 18:39:46 -0300 Subject: [PATCH] first site alpha release with just event calendar --- masonrify.coffee | 13 ++++++------- package.js | 2 +- template.html | 4 ++-- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/masonrify.coffee b/masonrify.coffee index 2c3575f..1936cf6 100644 --- a/masonrify.coffee +++ b/masonrify.coffee @@ -4,9 +4,8 @@ class Masonrify @instances= {} constructor: (container, options) -> - options = _.extend({itemSelector: ".masonry_element", stamp: ".stamped"}, options) - console.log("instantiating packery with options", options) - @_ms = new Packery(container, options) + options = _.extend({itemSelector: ".masonry_element", stamp: ".stamped", masonry: options}, options) + @_ms = new Isotope(container, options) addItems: (items) -> @_ms.addItems(items) appended: (div) -> @_ms.appended(div) @@ -45,13 +44,13 @@ Meteor.startup -> Masonrify.instances[this.data.id] = new Masonrify(this.firstNode, this.data) Template.masonryContainer.masonryContainerId = -> - console.log("got masonry cont id", this.id) + #console.log("got masonry cont id", this.id) this.id Template.masonryElement.setContainerId = (arg1,arg2) -> - console.log("setContainerId", this, arg1,arg2) + #console.log("setContainerId", this, arg1,arg2) return null Template.masonryElement.rendered = (arg1, arg2) -> - console.log("masonryElement rendered", this) + #console.log("masonryElement rendered", this) contId = getContainerId(this.data) element = this.firstNode Masonrify.instances[contId]?.appended(element) @@ -59,4 +58,4 @@ Meteor.startup -> Template.masonryElement.destroyed = -> - Masonrify.instances[this.data]?.debouncedRelayout(true) + Masonrify.instances[getContainerId(this.data)]?.debouncedRelayout(true) diff --git a/package.js b/package.js index 922a380..fbf3c21 100644 --- a/package.js +++ b/package.js @@ -12,7 +12,7 @@ Package.on_use(function (api) { 'ui'] , 'client'); - api.add_files(['packery/packery.pkgd.min.js', 'imagesloaded/imagesloaded.pkgd.js'], 'client'); + api.add_files(['isotope/isotope-v2.pkgd.js', 'imagesloaded/imagesloaded.pkgd.js'], 'client'); api.add_files(['template.html'], 'client'); api.add_files(['masonry_style.css'], 'client'); api.add_files(['masonrify.coffee'], 'client'); diff --git a/template.html b/template.html index 11d4d23..29c3686 100644 --- a/template.html +++ b/template.html @@ -1,12 +1,12 @@