Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add dev structure, and move search box

  • Loading branch information...
commit f17e65a3ba35f3b83252a39c0a4cbd0600d1d891 1 parent a98d3f2
Alex MacCaw authored
6 .gitignore
View
@@ -1,2 +1,8 @@
public/uploads
public/system
+.bundle
+db/*.sqlite3
+log/*.log
+tmp/**/*
+vendor/bundle
+vendor/gems
2  app/javascripts/controllers/assets.js
View
@@ -30,7 +30,7 @@ window.Assets = Spine.Controller.create({
var message = Message.create({
name: this.handle,
- body: "Uploading " + file.name + "...",
+ body: "Uploading " + file.name,
channel_id: this.messages.channel.id
});
2  app/javascripts/controllers/messages.js
View
@@ -19,6 +19,8 @@ window.MessagesItem = Spine.Controller.create({
var elements = this.template(this.item);
this.el.replaceWith(elements);
this.el = elements;
+ this.el.autolink();
+ this.el.mailto();
return this;
},
2  app/javascripts/controllers/searches.js
View
@@ -12,7 +12,7 @@ window.Searches = Spine.Controller.create({
},
init: function(){
- this.input = $("#title input[type=search]");
+ this.input = $("#sidebar input[type=search]");
this.input.keyup(this.query);
this.model = Search.inst();
this.model.bind("change", this.render);
6 app/javascripts/controllers/settings.js
View
@@ -1,6 +1,12 @@
(function($){
+
+var Channels = Spine.Controller.create({
+
+})
window.Settings = Spine.Controller.create({
+
+
newChannel: function(){
var channelName = prompt("Channel name?");
if ( !channelName ) return;
14 app/javascripts/utils.js
View
@@ -13,4 +13,18 @@ $.fn.forItem = function(item){
});
};
+$.fn.autolink = function () {
+ return this.each( function(){
+ var re = /((http|https|ftp):\/\/[\w?=&.\/-;#~%-]+(?![\w\s?&.\/;#~%"=-]*>))/g;
+ $(this).html( $(this).html().replace(re, '<a href="$1">$1</a> ') );
+ });
+};
+
+$.fn.mailto = function () {
+ return this.each( function() {
+ var re = /(([a-z0-9*._+]){1,}\@(([a-z0-9]+[-]?){1,}[a-z0-9]+\.){1,}([a-z]{2,4}|museum)(?![\w\s?&.\/;#~%"=-]*>))/g
+ $(this).html( $(this).html().replace( re, '<a href="mailto:$1">$1</a>' ) );
+ });
+};
+
})(jQuery);
16 app/stylesheets/application.less
View
@@ -132,15 +132,21 @@ body {
li.current {
color: #FFF;
- text-shadow: 0 1px 1px #46677F;
-
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
-
+ text-shadow: 0 -1px 1px #46677F;
.vbg-gradient(#7BB5DB, #4775B8);
+ border-bottom-color: #609FD0;
+
+ .inset-box-shadow(0, 2px, 2px, #4775B8);
+ -webkit-box-shadow: inset 0 1px 1px #4775B8, inset 0 -1px 1px #3E67A3;
}
}
+#sidebar input[type="search"] {
+ font-size: 20px;
+ margin: 15px 10px;
+ width: 170px;
+}
+
#content {
.box-flex(1);
.vbox();
7 app/views/app/index.html.erb
View
@@ -15,9 +15,7 @@
</head>
<body>
<header id="title">
- <h1>Holla</h1>
-
- <input type="search" results="0" incremental="true" placeholder="Search">
+ <h1>Holla</h1>
</header>
<div id="wrapper">
@@ -31,6 +29,9 @@
<li data-name="settings">Settings</li>
<li data-name="profile">Profile</li>
</ul>
+
+ <h3>Search</h3>
+ <input type="search" results="0" incremental="true" placeholder="Search">
</div>
<div class="vdivide"></div>
45 db/development_structure.sql
View
@@ -0,0 +1,45 @@
+CREATE TABLE `channels` (
+ `id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `created_at` datetime DEFAULT NULL,
+ `updated_at` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE TABLE `messages` (
+ `id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `body` text COLLATE utf8_unicode_ci,
+ `created_at` datetime DEFAULT NULL,
+ `updated_at` datetime DEFAULT NULL,
+ `channel_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE TABLE `schema_migrations` (
+ `version` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ UNIQUE KEY `unique_schema_migrations` (`version`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+CREATE TABLE `sessions` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `session_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
+ `data` text COLLATE utf8_unicode_ci,
+ `created_at` datetime DEFAULT NULL,
+ `updated_at` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `index_sessions_on_session_id` (`session_id`),
+ KEY `index_sessions_on_updated_at` (`updated_at`)
+) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+INSERT INTO schema_migrations (version) VALUES ('20110324001706');
+
+INSERT INTO schema_migrations (version) VALUES ('20110324051348');
+
+INSERT INTO schema_migrations (version) VALUES ('20110325083934');
+
+INSERT INTO schema_migrations (version) VALUES ('20110325211741');
+
+INSERT INTO schema_migrations (version) VALUES ('20110326065302');
+
+INSERT INTO schema_migrations (version) VALUES ('20110326213742');
Please sign in to comment.
Something went wrong with that request. Please try again.