diff --git a/labs/meteor-client/.meteor/.gitignore b/labs/meteor-client/.meteor/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..40830374235df1c19661a2901b7ca73cc9499f3d --- /dev/null +++ b/labs/meteor-client/.meteor/.gitignore @@ -0,0 +1 @@ +local diff --git a/labs/meteor-client/.meteor/packages b/labs/meteor-client/.meteor/packages new file mode 100644 index 0000000000000000000000000000000000000000..06863c0128fab1d719a6d7884676e105a6ef132d --- /dev/null +++ b/labs/meteor-client/.meteor/packages @@ -0,0 +1,9 @@ +# Meteor packages used by this project, one per line. +# +# 'meteor add' and 'meteor remove' will edit this file for you, +# but you can also edit it by hand. + +standard-app-packages +autopublish +insecure +bootstrap diff --git a/labs/meteor-client/.meteor/release b/labs/meteor-client/.meteor/release new file mode 100644 index 0000000000000000000000000000000000000000..db5f2c74b717bea92fad92de43273da1ee530a83 --- /dev/null +++ b/labs/meteor-client/.meteor/release @@ -0,0 +1 @@ +0.8.1.3 diff --git a/labs/meteor-client/client/main.html b/labs/meteor-client/client/main.html new file mode 100644 index 0000000000000000000000000000000000000000..d3d78ff2456654a27bdaa51454e352335478379c --- /dev/null +++ b/labs/meteor-client/client/main.html @@ -0,0 +1,15 @@ +<head> + <title>Demo</title> +</head> +<body> + <div class="container"> + <header class="navbar"> + <div class="navbar-inner"> + <a class="brand" href="/">Demo</a> + </div> + </header> + <div id="main" class="row-fluid"> + {{> usersList}} + </div> + </div> +</body> \ No newline at end of file diff --git a/labs/meteor-client/client/main.js b/labs/meteor-client/client/main.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/labs/meteor-client/client/stylesheets/style.css b/labs/meteor-client/client/stylesheets/style.css new file mode 100644 index 0000000000000000000000000000000000000000..aa4e0220c5568e1acecbe31fded2590ae468f9ee --- /dev/null +++ b/labs/meteor-client/client/stylesheets/style.css @@ -0,0 +1,94 @@ +.grid-block, .main, .post, .comments li, .comment-form { +background: #fff; +border-radius: 3px; +padding: 10px; +margin-bottom: 10px; +box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15); +} +body { +background: #eee; +color: #666666; +} +.navbar { margin-bottom: 10px } +.navbar .navbar-inner { +border-radius: 0px 0px 3px 3px; +} +#spinner { height: 300px } +.post { +*zoom: 1; +-webkit-transition: all 300ms 0ms; +-webkit-transition-delay: ease-in; +-moz-transition: all 300ms 0ms ease-in; +-o-transition: all 300ms 0ms ease-in; +transition: all 300ms 0ms ease-in; +position: relative; +opacity: 1; +} +.post:before, .post:after { +content: ""; +display: table; +} +.post:after { clear: both } +.post.invisible { opacity: 0 } +.post .upvote { +display: block; +margin: 7px 12px 0 0; +float: left; +} +.post .post-content { float: left } +.post .post-content h3 { +margin: 0; +line-height: 1.4; +font-size: 18px; +} +.post .post-content h3 a { +display: inline-block; +margin-right: 5px; +} +.post .post-content h3 span { +font-weight: normal; +font-size: 14px; +display: inline-block; +color: #aaaaaa; +} +.post .post-content p { margin: 0 } +.post .discuss { +display: block; +float: right; +margin-top: 7px; +} +.comments { +list-style-type: none; +margin: 0; +} +.comments li h4 { +font-size: 16px; +margin: 0; +} +.comments li h4 .date { +font-size: 12px; +font-weight: normal; +} +.comments li h4 a { font-size: 12px } +.comments li p:last-child { margin-bottom: 0 } +.dropdown-menu span { +display: block; +padding: 3px 20px; +clear: both; +line-height: 20px; +color: #bbb; +white-space: nowrap; +} +.load-more { +display: block; +border-radius: 3px; +background: rgba(0, 0, 0, 0.05); +text-align: center; +height: 60px; +line-height: 60px; +margin-bottom: 10px; +} +.load-more:hover { +text-decoration: none; +background: rgba(0, 0, 0, 0.1); +} \ No newline at end of file diff --git a/labs/meteor-client/client/views/users/user_item.html b/labs/meteor-client/client/views/users/user_item.html new file mode 100644 index 0000000000000000000000000000000000000000..4a69d22e5c7f4c2c0b18a3dc942b23e10c13c04c --- /dev/null +++ b/labs/meteor-client/client/views/users/user_item.html @@ -0,0 +1,7 @@ +<template name="userItem"> + <div class="post"> + <div class="post-content"> + <h3><a href="{{url}}">{{title}}</a><span>{{domain}}</span></h3> + </div> + </div> +</template> diff --git a/labs/meteor-client/client/views/users/user_item.js b/labs/meteor-client/client/views/users/user_item.js new file mode 100644 index 0000000000000000000000000000000000000000..daaf254576058c2a02a96657391613578177ce99 --- /dev/null +++ b/labs/meteor-client/client/views/users/user_item.js @@ -0,0 +1,7 @@ +Template.userItem.helpers({ + domain: function() { + var a = document.createElement('a'); + a.href = this.url; + return a.hostname; + } +}); \ No newline at end of file diff --git a/labs/meteor-client/client/views/users/users_list.html b/labs/meteor-client/client/views/users/users_list.html new file mode 100644 index 0000000000000000000000000000000000000000..126282c9286d42729341db64b20c77803e59634d --- /dev/null +++ b/labs/meteor-client/client/views/users/users_list.html @@ -0,0 +1,7 @@ +<template name="usersList"> + <div class="posts"> + {{#each users}} + {{> userItem}} + {{/each}} + </div> +</template> \ No newline at end of file diff --git a/labs/meteor-client/client/views/users/users_list.js b/labs/meteor-client/client/views/users/users_list.js new file mode 100644 index 0000000000000000000000000000000000000000..5c8825ecac2a96840c192a36ba635268171bdb05 --- /dev/null +++ b/labs/meteor-client/client/views/users/users_list.js @@ -0,0 +1,21 @@ +var postsData = [ + { + title: 'Introducing Telescope', + author: 'Sacha Greif', + url: 'http://sachagreif.com/introducing-telescope/' + }, + { + title: 'Meteor', + author: 'Tom Coleman', + url: 'http://meteor.com' + }, + { + title: 'The Meteor Book', + author: 'Tom Coleman', + url: 'http://themeteorbook.com' + } +]; + +Template.usersList.helpers({ + users: postsData +}); diff --git a/labs/meteor-client/collections/users.js b/labs/meteor-client/collections/users.js new file mode 100644 index 0000000000000000000000000000000000000000..a6aeb9b41fa8cd971810a3fed66dea563c9f6518 --- /dev/null +++ b/labs/meteor-client/collections/users.js @@ -0,0 +1,23 @@ +Users = new Meteor.Collection('bbb_users'); + +Meteor.methods({ + authenticate: function(auth) { + if (!auth.token) + throw new Meteor.Error(422, "You need a token to authenticate."); + + if (!auth.userId) + throw new Meteor.Error(422, "You need a userId to authenticate."); + + if (!auth.meetingId) + throw new Meteor.Error(422, "You need a meetingId to authenticate."); + + var user = {userId: "user1", meetingId: "demo123"}; + //UserSession.set(meetingId + ":" userId, user); + var userId = Meteor.users.insert(user); + this.setUserId = userId; + return userId; + }, + showUserId: function() { + throw new Meteor.Error(422, this.userId); + } +}); \ No newline at end of file diff --git a/labs/meteor-client/server/fixtures.js b/labs/meteor-client/server/fixtures.js new file mode 100644 index 0000000000000000000000000000000000000000..e2155d3cd5d9db34ee51ca3780394dfdfab46340 --- /dev/null +++ b/labs/meteor-client/server/fixtures.js @@ -0,0 +1,36 @@ +if (Users.find().count() === 0) { + Users.insert({ + meetingId: "abc", + user: { + handRaised: false, + phoneUser: false, + presenter: false, + externUserId: "24d1tjpraogv", + webcamStream: "", + userId: "24d1tjpraogv", + name: "RED", + permissions: { + disablePrivChat: false, + disableCam: false, + disableMic: false, + lockedLayout: false, + disablePubChat: false + }, + hasStream: false, + role: "MODERATOR", + locked: false, + voiceUser: { + talking: false, + webUserId: "24d1tjpraogv", + joined: false, + muted: false, + userId: "24d1tjpraogv", + callerNum: "RED", + callerName: "RED", + locked: false + }, + listenOnly: false + } + + }); +} \ No newline at end of file diff --git a/labs/meteor-client/smart.json b/labs/meteor-client/smart.json new file mode 100644 index 0000000000000000000000000000000000000000..5d5e1bfa86be7ac24025b18ec45771da9ecb8ffd --- /dev/null +++ b/labs/meteor-client/smart.json @@ -0,0 +1,3 @@ +{ + "packages": {} +} diff --git a/labs/meteor-client/smart.lock b/labs/meteor-client/smart.lock new file mode 100644 index 0000000000000000000000000000000000000000..7d0d8072afbcb04151f6c99d424236f3a24ba371 --- /dev/null +++ b/labs/meteor-client/smart.lock @@ -0,0 +1,7 @@ +{ + "meteor": {}, + "dependencies": { + "basePackages": {}, + "packages": {} + } +}