Browse files

css

  • Loading branch information...
1 parent 009845e commit 9aa13d2d2f1e1d88308601e3a2032fea7ec66663 @bartcc committed Mar 26, 2013
View
13 app/webroot/css/backbone/todos/application_boxmodel.css
@@ -31,9 +31,7 @@ h1, h2 {
font-weight: bold;
text-shadow: 0 1px 1px #ffffff;
}
-a {
- text-decoration: underline;
-}
+a {}
h1 {
font-size: 21pt;
color: #404040;
@@ -160,9 +158,9 @@ header .info {
list-style: none;
}
#tasks .item {
- padding: 15px 20px 15px 15px;
+ padding: 5px 20px 8px 15px;
position: relative;
- font-size: 24px;
+ font-size: 14px;
border-bottom: 1px solid #cccccc;
}
#tasks .item.editing{
@@ -174,10 +172,13 @@ header .info {
font-style: italic;
text-decoration: line-through;
}
+#tasks .item a {
+ text-decoration: underline;
+}
#tasks .item .destroy {
position: absolute;
right: 10px;
- top: 16px;
+ top: 6px;
display: none;
cursor: pointer;
width: 20px;
View
38 app/webroot/js/spine/app/todos/controllers/main.js
@@ -1,30 +1,31 @@
-var Main;
-var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) {
- for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; }
- function ctor() { this.constructor = child; }
- ctor.prototype = parent.prototype;
- child.prototype = new ctor;
- child.__super__ = parent.prototype;
- return child;
-};
-Main = (function() {
- __extends(Main, Spine.Controller);
+// Generated by CoffeeScript 1.6.1
+var Main,
+ __hasProp = {}.hasOwnProperty,
+ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
+
+Main = (function(_super) {
+
+ __extends(Main, _super);
+
Main.prototype.events = {
'sortupdate .items': 'sortupdate',
'click footer .clear': 'clear',
'keypress #create-todo input': 'create',
'keyup #new-todo': 'showTooltip'
};
+
Main.prototype.elements = {
"footer .clear": 'clear',
'.items': 'items',
'#create-todo input': 'input',
'#create-todo .countVal': 'count',
'#stats': 'stats'
};
+
Main.prototype.statsTemplate = function() {
return $.template(null, $('#stats-template').html());
};
+
function Main() {
Main.__super__.constructor.apply(this, arguments);
Task.bind('create', this.proxy(this.addOne));
@@ -35,13 +36,15 @@ Main = (function() {
Task.bind('refresh', this.proxy(this.addAll));
this.items.sortable();
}
+
Main.prototype.refreshList = function() {
Spine.trigger('render:refreshState', true);
Spine.Ajax.enabled = false;
Task.destroyAll();
Spine.Ajax.enabled = true;
return Task.fetch();
};
+
Main.prototype.sortupdate = function(e, ui) {
return this.items.children('li').each(function(index) {
var task;
@@ -52,6 +55,7 @@ Main = (function() {
}
});
};
+
Main.prototype.create = function(e) {
var task;
if (e.keyCode !== 13) {
@@ -62,6 +66,7 @@ Main = (function() {
this.input.val("");
return false;
};
+
Main.prototype.newAttributes = function() {
var attr;
attr = {};
@@ -71,6 +76,7 @@ Main = (function() {
});
return attr;
};
+
Main.prototype.addOne = function(task) {
var el, view;
view = new Tasks({
@@ -79,22 +85,26 @@ Main = (function() {
el = view.render().el;
return this.items.append(el);
};
+
Main.prototype.addAll = function() {
Task.each(this.proxy(this.addOne));
return Spine.trigger('render:refreshState', false);
};
+
Main.prototype.renderCount = function() {
var active;
active = Task.active().length;
return this.count.text(active + ' item' + (active !== 1 ? 's' : '') + ' left');
};
+
Main.prototype.renderStats = function() {
var active;
active = Task.active().length;
return this.stats.html($.tmpl(this.statsTemplate(), {
done: Task.done().length
}));
};
+
Main.prototype.updateUnsaved = function(task) {
if (!Spine.Ajax.enabled) {
return;
@@ -107,10 +117,12 @@ Main = (function() {
});
}
};
+
Main.prototype.clear = function() {
Task.destroyDone();
return Task.trigger('change:unsaved');
};
+
Main.prototype.showTooltip = function(e) {
var show, tooltip, val;
tooltip = this.$(".ui-tooltip-top");
@@ -127,5 +139,7 @@ Main = (function() {
};
return this.tooltipTimeout = setTimeout(show, 1000);
};
+
return Main;
-})();
+
+})(Spine.Controller);

0 comments on commit 9aa13d2

Please sign in to comment.