Something resonnable.

This commit is contained in:
Yann Esposito (Yogsototh) 2011-04-14 18:58:58 +02:00
parent 61807729d6
commit 58bdb0e540
5 changed files with 43 additions and 28 deletions

View file

@ -2,7 +2,7 @@
* http://lessframework.com
* by Joni Korpi
* License: http://creativecommons.org/licenses/MIT/ */
/* line 7, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/_reset.scss */
/* line 7, ../../../../../../Library/Ruby/Gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/_reset.scss */
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6,
p, blockquote, pre, a, abbr, address, cite, code, del, dfn, em,
img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, hr,
@ -15,55 +15,55 @@ menu, footer, header, nav, section, summary, time, mark, audio, video {
border: 0;
}
/* line 14, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/_reset.scss */
/* line 14, ../../../../../../Library/Ruby/Gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/_reset.scss */
article, aside, canvas, figure, figure img, figcaption, hgroup,
footer, header, nav, section, audio, video {
display: block;
}
/* line 18, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/_reset.scss */
/* line 18, ../../../../../../Library/Ruby/Gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/_reset.scss */
a img {
border: 0;
}
/* line 1, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/typography/_16px.scss */
/* line 1, ../../../../../../Library/Ruby/Gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/typography/_16px.scss */
.gigantic {
font-size: 110px;
line-height: 120px;
letter-spacing: -2px;
}
/* line 7, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/typography/_16px.scss */
/* line 7, ../../../../../../Library/Ruby/Gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/typography/_16px.scss */
.huge, h1 {
font-size: 68px;
line-height: 72px;
letter-spacing: -1px;
}
/* line 13, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/typography/_16px.scss */
/* line 13, ../../../../../../Library/Ruby/Gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/typography/_16px.scss */
.large, h2 {
font-size: 42px;
line-height: 48px;
}
/* line 18, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/typography/_16px.scss */
/* line 18, ../../../../../../Library/Ruby/Gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/typography/_16px.scss */
.bigger, h3 {
font-size: 26px;
line-height: 36px;
}
/* line 23, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/typography/_16px.scss */
/* line 23, ../../../../../../Library/Ruby/Gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/typography/_16px.scss */
.big, h4 {
font-size: 22px;
line-height: 30px;
}
/* line 28, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/typography/_16px.scss */
/* line 28, ../../../../../../Library/Ruby/Gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/typography/_16px.scss */
body {
font: 16px/24px Georgia, serif;
}
/* line 32, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/typography/_16px.scss */
/* line 32, ../../../../../../Library/Ruby/Gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/typography/_16px.scss */
.small, small {
font-size: 13px;
line-height: 18px;
@ -76,27 +76,27 @@ body {
-webkit-text-size-adjust: 100%;
}
/* line 34, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/_framework.scss */
/* line 37, ../../../../../../Library/Ruby/Gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/_framework.scss */
::selection {
background: rgb(255,255,158);
}
/* line 35, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/_framework.scss */
/* line 38, ../../../../../../Library/Ruby/Gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/_framework.scss */
::-moz-selection {
background: rgb(255,255,158);
}
/* line 36, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/_framework.scss */
/* line 39, ../../../../../../Library/Ruby/Gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/_framework.scss */
img::selection {
background: transparent;
}
/* line 37, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/_framework.scss */
/* line 40, ../../../../../../Library/Ruby/Gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/_framework.scss */
img::-moz-selection {
background: transparent;
}
/* line 38, ../../../../../../var/lib/gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/_framework.scss */
/* line 41, ../../../../../../Library/Ruby/Gems/1.8/gems/compass-less-plugin-1.0/stylesheets/less/_framework.scss */
body {
-webkit-tap-highlight-color: rgb(255,255,158);
}

View file

@ -28,7 +28,7 @@ header #title {
padding-left: 30px;
color: #333;
font-size: 20px;
text-shadow: 1px 1px #555, -1px -1px #111;
text-shadow: 1px 1px #555555, -1px -1px #111111;
line-height: 42px;
font-weight: normal;
height: 50px;
@ -45,7 +45,7 @@ header #signout {
width: 80px;
color: #CCC;
font-size: 14px;
text-shadow: 1px 1px #555, -1px -1px #111;
text-shadow: 1px 1px #555555, -1px -1px #111111;
line-height: 42px;
font-weight: bold;
height: 50px;
@ -65,7 +65,7 @@ header #signout:active {
/* line 59, ../src/main.scss */
#main, footer {
width: 640px;
width: 630px;
margin: 80px auto;
}

View file

@ -46,8 +46,8 @@
<h1>My todo list for today</h1>
<div id="mainblock">
<div id="task">
<input id="addtasktextfield" name="addtasktextfield" type="text" value="Add a task..." class="inactive"></input>
<input type="button" id="addtaskbutton" name="addtaskbutton" value="Add Task"></input>
<input id="addtasktextfield" name="addtasktextfield" type="text" value="Add a task..." class="inactive">
<input type="button" id="addtaskbutton" name="addtaskbutton" value="Add Task">
</div>
<div id="todolist">
<!--

View file

@ -65,23 +65,20 @@ MainController.prototype.addTodo = function(text, id) {
MainController.prototype.finished = function(item_id) {
var self=this;
log(self.todolist);
log(item_id);
log('loop');
$.each( self.todolist.undone, function (i,v) {
log(v['id'])
if (v['id'] == item_id) {
element=v;
self.todolist.undone.splice(i,1);
self.todolist.done += v;
self.todolist.done.push(v);
return false;
}
});
$('.item').remove();
self.initialization();
mainController.initialization();
}
MainController.prototype.initialization = function() {
var self=this;
$('.item').remove();
$.each( self.todolist.done.reverse(), function(i,v) {
self.addDone(v['text'], v['id']);
});
@ -91,6 +88,17 @@ MainController.prototype.initialization = function() {
});
self.todolist.undone.reverse();
}
MainController.prototype.addTask = function(text) {
var self=this;
self.todolist.undone.push(
{id: self.todolist.nextId, text: text}
);
self.todolist.nextId += 1;
self.initialization();
}
MainController.prototype.addSomeTask = function() {
this.addTask( $('#addtasktextfield').val() );
}
var mainController = new MainController();
@ -98,4 +106,11 @@ var mainController = new MainController();
$(document).ready( function() {
autoclear('addtasktextfield','Add a task...');
mainController.initialization();
$('#addtaskbutton').click( function(){mainController.addSomeTask()} );
$('#addtasktextfield').keypress( function(k){
if (k.which == 13) {
mainController.addSomeTask();
$('#addtasktextfield').val('');
}
} );
});

View file

@ -57,7 +57,7 @@ header #signout:active {
cursor: pointer;
}
#main, footer {
width: 640px;
width: 630px;
margin: 80px auto;
}
#main h1 {