From 7577714ce43c995c8ae98b28f40d55c07d6e2410 Mon Sep 17 00:00:00 2001 From: Sean Grove Date: Thu, 26 Apr 2012 17:54:19 -0700 Subject: [PATCH 1/6] Notify user when dragging file over upload target --- .../javascripts/backbone/plugins/attachments.js.coffee | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/backbone/plugins/attachments.js.coffee b/app/assets/javascripts/backbone/plugins/attachments.js.coffee index 18188698..76cdb06b 100644 --- a/app/assets/javascripts/backbone/plugins/attachments.js.coffee +++ b/app/assets/javascripts/backbone/plugins/attachments.js.coffee @@ -30,7 +30,7 @@ class Kandan.Plugins.Attachments fileItemTemplate: _.template '''
- + <%= fileName %> @@ -59,7 +59,7 @@ class Kandan.Plugins.Attachments - # TODO this part is very bad for APIs! shoudnt be exposing a backbone collection in a plugin. + # TODO this part is very bad for APIs! Shouldn't be exposing a backbone collection in a plugin. @render: ($widgetEl)-> $uploadForm = @templates.dropzone({ channelId: Kandan.Data.Channels.activeChannelId(), @@ -121,6 +121,11 @@ class Kandan.Plugins.Attachments dragOver: -> console.log "reached dropzone!" + $(".dropzone").text("UPLOAD!") + + dragLeave: -> + console.log "left dropzone!" + $(".dropzone").text("Drop file here to upload") }) From c12d67e8ab9c71040d6044c90e37fa33d430405d Mon Sep 17 00:00:00 2001 From: Sean Grove Date: Thu, 26 Apr 2012 17:54:36 -0700 Subject: [PATCH 2/6] Use cloudfuji_paperclip with STS awareness --- Gemfile | 2 +- Gemfile.lock | 19 ++++++++++--------- app/models/attachment.rb | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Gemfile b/Gemfile index 7bc98bb1..26913086 100644 --- a/Gemfile +++ b/Gemfile @@ -20,7 +20,7 @@ gem '_bushido-faye', '0.8.2' # Helper gems gem 'kaminari' gem 'aws-sdk' -gem 'paperclip' +gem 'cloudfuji_paperclip' gem 'remotipart' gem 'jquery-rails' diff --git a/Gemfile.lock b/Gemfile.lock index dd5ee27b..ec926521 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,6 +53,12 @@ GEM json (>= 1.4.6) orm_adapter (~> 0.0.3) rest-client (>= 1.6.1) + cloudfuji_paperclip (3.0.3) + activemodel (>= 3.0.0) + activerecord (>= 3.0.0) + activesupport (>= 3.0.0) + cocaine (>= 0.0.2) + mime-types cocaine (0.2.1) coffee-rails (3.2.2) coffee-script (>= 2.2.0) @@ -103,16 +109,11 @@ GEM i18n (>= 0.4.0) mime-types (~> 1.16) treetop (~> 1.4.8) - mime-types (1.17.2) - multi_json (1.1.0) + mime-types (1.18) + multi_json (1.3.2) multi_xml (0.4.2) nokogiri (1.5.0) orm_adapter (0.0.6) - paperclip (2.7.0) - activerecord (>= 2.3.0) - activesupport (>= 2.3.2) - cocaine (>= 0.0.2) - mime-types pg (0.12.2) polyglot (0.3.3) rack (1.4.1) @@ -163,7 +164,7 @@ GEM treetop (1.4.10) polyglot polyglot (>= 0.3.1) - tzinfo (0.3.32) + tzinfo (0.3.33) uglifier (1.2.3) execjs (>= 0.3.0) multi_json (>= 1.0.2) @@ -180,6 +181,7 @@ DEPENDENCIES aws-sdk bourbon cloudfuji + cloudfuji_paperclip coffee-rails (~> 3.2.1) devise devise_cloudfuji_authenticatable @@ -187,7 +189,6 @@ DEPENDENCIES execjs jquery-rails kaminari - paperclip pg (= 0.12.2) rails (= 3.2.2) remotipart diff --git a/app/models/attachment.rb b/app/models/attachment.rb index 7b5350ac..50cc1516 100644 --- a/app/models/attachment.rb +++ b/app/models/attachment.rb @@ -1,4 +1,4 @@ -require 'paperclip' +require 'cloudfuji_paperclip' class Attachment < ActiveRecord::Base belongs_to :channel From 3f2ae90c4968a3e20aa15b26e8dbb1806471c4a8 Mon Sep 17 00:00:00 2001 From: Kev Zettler Date: Thu, 26 Apr 2012 21:55:53 -0700 Subject: [PATCH 3/6] updated readme added link to kandan home --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4729d140..70b59e7a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Kandan - Modern Open Source Chat +Kandan - [Modern Open Source Chat](http://www.kandan.me) ================================ The slickest chat app out there. Open-source and well-supported to boot. From d3980892e1f9650ec42b5b1a6355f95c7bffb142 Mon Sep 17 00:00:00 2001 From: Kev Zettler Date: Thu, 26 Apr 2012 21:59:33 -0700 Subject: [PATCH 4/6] proper mailing list link in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 70b59e7a..fcc98121 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,7 @@ Get Involved! ============= That's not a question, it's an order! Or more of a friendly offer, really. Kandan is a fully open-source app, so dive in and start adding features, fixing bugs (what bugs?), and cleaning up the code. -* Talk with us on the [mailing list])(https://groups.google.com/forum/?fromgroups#!forum/cloudfuji) +* Talk with us on the [mailing list](https://groups.google.com/forum/?fromgroups#!forum/cloudfuji) * GitHub [issues tracker](https://github.com/cloudfuji/kandan/issues) * Twitter [@cloudfuji](https://twitter.com/#!/cloudfuji) * [New-wave open-source meetup](www.meetup.com/San-Francisco-New-Wave-Open-Source-Apps/) - we meetup once a month to share tips on how developers grow business around super high-quality open source software From 605d12db691fb17777074ee12c6c1d91d74efea6 Mon Sep 17 00:00:00 2001 From: Will Date: Thu, 26 Apr 2012 22:52:19 -0700 Subject: [PATCH 5/6] changed logout link --- app/views/main/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/main/index.html.erb b/app/views/main/index.html.erb index 97dc2a4b..78352510 100644 --- a/app/views/main/index.html.erb +++ b/app/views/main/index.html.erb @@ -43,6 +43,6 @@
- logout + <%= link_to 'logout' destroy_user_session_path, :method => :destroy %>
From dfce969e47fe527c5c233553313f575321de81cd Mon Sep 17 00:00:00 2001 From: Will Date: Thu, 26 Apr 2012 22:59:48 -0700 Subject: [PATCH 6/6] added in missing comma --- app/views/main/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/main/index.html.erb b/app/views/main/index.html.erb index 78352510..08d08596 100644 --- a/app/views/main/index.html.erb +++ b/app/views/main/index.html.erb @@ -43,6 +43,6 @@
- <%= link_to 'logout' destroy_user_session_path, :method => :destroy %> + <%= link_to 'logout', destroy_user_session_path, :method => :destroy %>