Permalink
Browse files

Merge branch 'master' of https://github.com/buddycloud/buddycloud-web…

  • Loading branch information...
2 parents 8c1f126 + a778cf4 commit 71dbb6a907cf89ef2173dab029a0213b59c8b68b @mrflix mrflix committed Mar 3, 2012
Showing with 2,009 additions and 631 deletions.
  1. +11 −7 assets/config.js
  2. +18 −5 assets/create_topic_channel.html
  3. +3 −1 assets/index.html
  4. +31 −19 assets/streams.html
  5. +0 −1 brunch/src/vendor/dynamictemplate.js
  6. +9 −7 package.json
  7. +0 −2 readme.md
  8. +35 −60 src/build/packaging.coffee
  9. +12 −5 src/build/server.coffee
  10. +0 −15 src/build/util.coffee
  11. +3 −0 src/collections/base.coffee
  12. +12 −9 src/collections/channel.coffee
  13. +4 −0 src/controllers/router.coffee
  14. +2 −0 src/handlers/connection.coffee
  15. +71 −12 src/handlers/connector.coffee
  16. +146 −88 src/handlers/data.coffee
  17. +38 −0 src/handlers/rsm_queue.coffee
  18. +67 −48 src/init.coffee
  19. +21 −2 src/models/channel.coffee
  20. +0 −4 src/models/metadata/node.coffee
  21. +24 −50 src/models/node/base.coffee
  22. +70 −1 src/models/user.coffee
  23. +15 −0 src/styles/channels.styl
  24. +1 −0 src/styles/edit.styl
  25. +1 −1 src/styles/forms.styl
  26. +10 −1 src/styles/main.styl
  27. +20 −7 src/styles/stream.styl
  28. +8 −1 src/templates/channel/comments.coffee
  29. +35 −10 src/templates/channel/details/index.coffee
  30. +27 −38 src/templates/channel/details/list.coffee
  31. +157 −0 src/templates/channel/details/user.coffee
  32. +15 −5 src/templates/channel/edit.coffee
  33. +25 −0 src/templates/channel/error_notification.coffee
  34. +46 −0 src/templates/channel/follow_notification.coffee
  35. +28 −8 src/templates/channel/index.coffee
  36. +27 −0 src/templates/channel/pending_notification.coffee
  37. +55 −33 src/templates/channel/post.coffee
  38. +14 −0 src/templates/channel/private.coffee
  39. +52 −0 src/templates/create_topic_channel/index.coffee
  40. +20 −3 src/templates/sidebar/entry.coffee
  41. +4 −0 src/templates/sidebar/index.coffee
  42. +57 −20 src/util.coffee
  43. +7 −1 src/vendor/backbone-extensions.js
  44. +3 −3 src/vendor/modernizr.js
  45. +52 −7 src/vendor/strophe.buddycloud.js
  46. +67 −8 src/vendor/strophe.pubsub.js
  47. +8 −5 src/views/authentication/base.coffee
  48. +2 −2 src/views/authentication/login.coffee
  49. +13 −0 src/views/authentication/overlay.coffee
  50. +3 −1 src/views/base.coffee
  51. +20 −8 src/views/channel/details/index.coffee
  52. +75 −4 src/views/channel/details/list.coffee
  53. +76 −0 src/views/channel/details/user.coffee
  54. +164 −54 src/views/channel/edit.coffee
  55. +16 −3 src/views/channel/error_notification.coffee
  56. +42 −0 src/views/channel/follow_notification.coffee
  57. +138 −64 src/views/channel/index.coffee
  58. +16 −0 src/views/channel/pending_notification.coffee
  59. +32 −2 src/views/channel/post.coffee
  60. +12 −6 src/views/channel/posts.coffee
  61. +33 −0 src/views/create_topic_channel/index.coffee
  62. +7 −0 src/views/main.coffee
  63. +9 −0 src/views/sidebar/entry.coffee
  64. +11 −0 src/views/sidebar/index.coffee
  65. +9 −0 src/views/sidebar/search.coffee
View
@@ -3,18 +3,22 @@
window.config = {
/* address of the bosh gateway. this should be reachable from webclient domain */
- bosh_service: 'http://beta.buddycloud.org:5280/http-bind/',
- //bosh_service: 'https://beta.buddycloud.org:443/http-bind/', // secure
- //bosh_service: 'http://bosh.metajack.im:5280/xmpp-httpbind', // just for testing!
+ bosh_service: 'https://beta.buddycloud.org:443/http-bind/',
/*this is the inbox domain for anon users */
- home_domain: "buddycloud.org",
+ home_domain: "example.com",
/* domain to authenticate against for anon users */
- anon_domain: "anon.buddycloud.org",
+ anon_domain: "anon.example.com",
/* overall used domain for this webclient instance.
* used for registration and login. */
- domain: "buddycloud.org",
- embedly_key: "2c1bedbc2aa111e1acbf4040d3dc5c07"
+ domain: "example.com",
+
+ /* Default domain to create topics under
+ * unless the user specifies …@domain as the name. */
+ //topic_domain: "topics.example.com",
+
+ /* Sign up for an embed.ly account to use OStatus */
+ //embedly_key: "xxx"
};
@@ -225,17 +225,17 @@ <h2 class="title">Create Channel</h2>
<div class="access">
<label for="channel_public_access">Public Access</label>
<div>
- <input type="checkbox" id="channel_public_access"/>
+ <input type="checkbox" id="channel_public_access" checked="checked"/>
</div>
</div>
<div class="role">
<label for="channel_default_role">Default Role</label>
<div>
<select id="channel_default_role">
- <option value="follower">follower</option>
- <option value="followerPlus">follower+</option>
+ <option value="member">follower</option>
+ <option value="publisher" selected>follower+post</option>
</select>
- <span class="hint followerSelected">
+ <span class="hint followerPlusSelected">
<span class="follower">
can only read your channel
</span>
@@ -245,9 +245,22 @@ <h2 class="title">Create Channel</h2>
</span>
</div>
</div>
+ <div class="publish">
+ <label for="channel_publish">Posting</label>
+ <div>
+ <select id="channel_publish">
+ <option value="open">Anyone</option>
+ <option value="subscribers" selected="selected">Followers</option>
+ <option value="moderators">Moderators</option>
+ </select>
+ <span class="hint followerSelected">
+ can post
+ </span>
+ </div>
+ </div>
</form>
<nav class="bottom clearfix">
- <div class="button callToAction">Create</div>
+ <div id="create_button" class="button callToAction">Create</div>
<div class="button">Discard</div>
</nav>
</div><!-- /channelView -->
View
@@ -8,7 +8,7 @@
<link rel="stylesheet" href="web/css/main.css" type="text/css" media="screen">
<script type="text/javascript" src="config.js"></script>
<script type="text/javascript" src="web/js/app.js"></script>
- <script type="text/javascript">require('./init');</script>
+ <link rel="icon" href="favicon.ico">
</head>
<body class="start">
@@ -27,6 +27,7 @@
<h2>buddycloud login</h2>
<div class="error">
<div id="nobosh">BOSH Service unavailable!</div>
+ <div id="nochannelserver">Channel Server unreachable!</div>
<div id="authfail">Unable to confirm your username or password. Please try again.</div>
<div id="connfail">Connection to the server closed.</div>
<div id="disconnected">Thats weird. You disconnected.</div>
@@ -58,6 +59,7 @@ <h2>buddycloud login</h2>
<p class="negative">Let's get setup</p>
<div class="error">
<div id="nobosh">BOSH Service unavailable!</div>
+ <div id="nochannelserver">Channel Server unreachable!</div>
<div id="regifail">Cannot create new Account.</div>
<div id="authfail">Unable to confirm your username or password.</div>
<div id="connfail">Connection to the server closed.</div>
View
@@ -20,13 +20,21 @@ <h2>Edit Mode</h2>
-->
<div class="edits">
<div class="contenteditable">
- <input id="allowPost" type="checkbox">
- <label for="allowPost">New followers can post</label>
+ <input id="allowPost" type="checkbox">
+ <label for="allowPost">New followers can post</label>
</div>
- <div class="contenteditable">
+ <!--div class="contenteditable">
+ <select id="channel_publish">
+ <option value="open">Anyone</option>
+ <option value="subscribers">Followers</option>
+ <option value="moderators">Moderators</option>
+ </select>
+ <label for="channel_publish">can post</label>
+ </div-->
+ <!--div class="contenteditable">
<label for="userEmail">Email</label>
<input id="userEmail" type="email" value="vera@buddycloud.com" placeholder="Email Adress">
- </div>
+ </div-->
<nav class="clearfix">
<div class="button translucid cancel">Cancel</div>
<div class="button prominent save">Save</div>
@@ -211,6 +219,7 @@ <h3>Delete Channel</h3>
</div>
</div><!-- /antiscroll-inner -->
</div><!-- /channels -->
+ <p id="create_topic_channel">Create topic channel…</p>
<!-- replaced by scrolling
<div id="more_channels">
all Channels
@@ -249,20 +258,23 @@ <h2 class="title" data-editmode="singleLine">Vera Meisterkoch's World</h2>
<div class="button prominent" id="createNewTopic">Post</div>
</div>
</section>
- <!-- this produces some weird bug - some content below it gets lost when this is visible
- <article class="notification">
- <section>
- <img class="avatar" src="public/avatars/user4.jpg" />
- <span class="name">Martin</span>
- <p>wants to follow this channel.</p>
- <span class="granted">started following this channel.</span>
- <span class="denied">was denied to follow this channel.</span>
- <div class="controls">
- <div class="button small negative light">Deny</div>
- <div class="button small prominent positive light">Grant Martin to join</div>
- </div>
- </section>
- </article>-->
+ <!-- this produces some weird bug - some content below
+ it gets lost when this is visible -->
+ <div class="notifications">
+ <article class="notification">
+ <section>
+ <img class="avatar" src="public/avatars/user4.jpg" />
+ <span class="name">Martin</span>
+ <p>wants to follow this channel.</p>
+ <span class="granted">started following this channel.</span>
+ <span class="denied">was denied to follow this channel.</span>
+ <div class="controls">
+ <div class="button small negative light">Deny</div>
+ <div class="button small positive light">Grant Martin to join</div>
+ </div>
+ </section>
+ </article>
+ </div>
<section class="topics">
<article class="topic">
<section class="opener">
@@ -506,7 +518,7 @@ <h5>Ban User</h5>
</ul>
</div>
</section>
- <section class="actionRow">
+ <section class="actionRow choose">
<div>Change Role</div>
<div>Ban User</div>
</section>
View
@@ -1,6 +1,6 @@
{ "name": "channel-webclient"
, "description": "buddycloud webclient"
-, "version": "0.0.0-47"
+, "version": "0.0.0-57"
, "author": "?"
, "homepage": "https://github.com/buddycloud/channel-webclient"
, "repository": { "type": "git", "url": "git://github.com/buddycloud/channel-webclient.git" }
@@ -12,9 +12,9 @@
, "dependencies": {
"coffee-script": "1.1.3"
, "colors": "0.6.0-1"
-, "tar": "0.1.9"
-, "zlib": "1.0.5"
-, "bufferstream": "0.5.0-pre"
+, "tarball": "0.0.3"
+, "request": "2.9.100"
+, "bufferstream": "0.5.0"
, "node-dev": "0.1.9"
, "express": "2.5.2"
, "jsconfig": "0.1.2"
@@ -24,19 +24,21 @@
, "shimify": "0.0.0"
, "jqueryify": "0.0.2"
, "underscore": "1.3.0"
+, "scopify": "0.2.1"
, "browserify": "https://github.com/poelzi/node-browserify/tarball/master"
, "backbone-browserify": "0.5.3"
-, "jquery-browserify": "1.6.2"
+, "br-jquery": "0.0.1"
, "jquery-autosuggestion": "0.0.3"
, "jquery-inputevent": "0.1.4"
, "jquery-textsaver": "0.1.4"
, "formatdate": "0.2.0"
, "store": "1.1.1"
, "async": "0.1.15"
, "dynamictemplate": "0.4.2"
-, "dt-compiler": "0.1.1"
-, "dt-jquery": "0.2.3"
+, "dt-compiler": "0.1.5"
+, "dt-jquery": "0.2.6"
, "Strophe.js": "https://github.com/metajack/strophejs/tarball/master"
+, "notificon": "https://github.com/dodo/Notificon/tarball/master"
}
, "_dependencies_missing_from_npm": {
"jQuery.fn.autoResize": "5025b4a5c3ed60d7218827eb19e8c0c4e641aabe",
View
@@ -23,7 +23,5 @@ This code is Apache 2 licensed and copyright buddycloud.
# Attribution
* lock/unlock icons: By Yusuke Kamiyamane, licensed under Creative Commons Attribution 3.0 license. "unlock-small.png" is a version of "lock-small.png" modified by mrflix.
-* other iconography from "Free Wireframe Toolbar Icons" by Gentleface, licensed under a The Creative Commons Attribution-NonCommercial use license. *http://gentleface.com/free_icon_set.html)
-
[![Build Status](https://secure.travis-ci.org/buddycloud/buddycloud-webclient.png)](http://travis-ci.org/buddycloud/buddycloud-webclient)
View
@@ -1,86 +1,61 @@
-tar = require 'tar'
-zlib = require 'zlib'
-http = require 'http'
-url = require 'url'
-config = require 'jsconfig'
-PostBuffer = require 'bufferstream/postbuffer'
-{ spiderDir, BufferedStream } = require './util'
{ createWriteStream } = require 'fs'
+request = require 'request'
+async = require 'async'
+config = require 'jsconfig'
+BufferStream = require 'bufferstream'
+{ Pack:Tarball } = require 'tarball'
+{ spiderDir } = require './util'
onError = (e) ->
console.error "#{e.stack or e.message or e}".red
process.exit 1
entries = [
- ""
+ "index.html"
"config.js"
+ "favicon.ico"
"web/js/app.js"
"web/js/store.js"
"web/css/main.css"
].concat spiderDir("assets", "web/fonts"), spiderDir("assets", "public")
-module.exports = (baseUrl, tarPath) ->
- tarPack = new tar.Pack(noProprietary: yes)
- tarPack
- .on('error', onError)
- .pipe(zlib.Gzip())
+module.exports = (tarPath) ->
+ tarball = new Tarball {noProprietary:yes},
+ compress:on
+ defaults:
+ uname:'www'
+ gname:'nogroup'
+ uid: 1000
+ gid: 1000
+
+ tarball
.on('error', onError)
.pipe(createWriteStream(tarPath))
.on('error', onError)
.on 'close', ->
console.log "Built #{tarPath}".bold.green
process.exit 0
- idle = yes
-
- pushNextEntry = ->
- return unless idle
- idle = no
-
- entry = entries.shift()
- unless entry?
- return tarPack.end()
-
-
+ # using mapSeries because we dont to glutter the terminal
+ async.mapSeries( entries
+ ,(entry, done) ->
msg = "GET".cyan+" "+"/#{entry}".magenta+" "+"".bold.black
process.stdout.write msg
-
- u = url.parse("#{baseUrl}/#{entry}")
- req = http.get
- host: u.hostname
- port: u.port
- path: u.path
- path = if u.path == "/" then "/index.html" else u.path
- path = path.replace /^\/+/, ""
- req.on 'response', (res) ->
- # No Content-Length means we cannot pipe(). tar.Pack
- # needs to know a file's size beforehand though, so we
- # need to buffer the HTTP body.
- new PostBuffer(res).onEnd (body) ->
- console.log "","#{body?.length}".green,".".bold.black
- stream = new BufferedStream
- stream.props =
- path: path
- mode: 0755
- size: body.length
- uid: 1000
- gid: 1000
- uname: 'www'
- gname: 'nogroup'
- stream.root = path: "."
- stream.path = path
- flushed = tarPack.add stream
- stream.run body
-
- idle = yes
- if flushed
- process.nextTick pushNextEntry
- # else - Waiting for data to be flushed, continue
- req.on 'error', onError
-
- tarPack.on 'drain', pushNextEntry
- pushNextEntry()
+ request("http://#{config.host}:#{config.port}/#{entry}")
+ .on('error', onError)
+ .on 'response', (res) ->
+ stream = new BufferStream disabled:yes # no splitting needed
+ stream.path = entry # res.path can't be set
+ stream.props = size:res.headers['content-length']
+ tarball.append stream, ->
+ console.log "","#{stream.props.size}".green,".".bold.black
+ done()
+ res.pipe(stream)
+ ,(err) ->
+ onError(err) if err?
+ tarball.end()
+ )
Oops, something went wrong.

0 comments on commit 71dbb6a

Please sign in to comment.