Skip to content

Commit eb5e978

Browse files
author
oren
committed
everything
0 parents  commit eb5e978

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+11780
-0
lines changed

favicon.ico

1.12 KB
Binary file not shown.

img/glyphicons-halflings-white.png

4.25 KB
Loading

img/glyphicons-halflings.png

4.25 KB
Loading

index.html

+181
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
<!doctype html>
2+
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
3+
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
4+
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
5+
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
6+
<head>
7+
<meta charset="utf-8">
8+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
9+
10+
<title></title>
11+
<meta name="description" content="">
12+
<meta name="author" content="">
13+
14+
<meta name="viewport" content="width=device-width">
15+
16+
<!-- Use SimpLESS (Win/Linux/Mac) or LESS.app (Mac) to compile your .less files
17+
<link rel="stylesheet/less" href="less/style.less">
18+
<script src="js/libs/less-1.3.0.min.js"></script>
19+
20+
to style.css, and replace the 2 lines above by this one:
21+
22+
-->
23+
<link rel="stylesheet" href="less/style.css">
24+
25+
<script src="js/libs/modernizr-2.5.3-respond-1.1.0.min.js"></script>
26+
</head>
27+
<body>
28+
<!--[if lt IE 7]><p class=chromeframe>Your browser is <em>ancient!</em> <a href="http://browsehappy.com/">Upgrade to a different browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to experience this site.</p><![endif]-->
29+
30+
31+
<div class="container">
32+
<!--h1>TODO today/week/month</h1-->
33+
<h2 id="day"><span>Sunday</span><a href="#clear" class="clear" rel="d">clear</a></h2>
34+
<div>
35+
<input type="text" id="d1" />
36+
<input type="text" id="d2" />
37+
<input type="text" id="d3" />
38+
</div>
39+
40+
41+
<hr>
42+
<div class="row">
43+
<div class="span6">
44+
<h2>Week<a href="#clear" class="clear" rel="w">clear</a></h2>
45+
<div>
46+
<input type="text" id="w1"/>
47+
<input type="text" id="w2" />
48+
<input type="text" id="w3" />
49+
</div>
50+
</div>
51+
<div class="span6">
52+
<h2 id="month"><span>April</span><a href="#clear" class="clear" rel="m">clear</a></h2>
53+
<div>
54+
<input type="text" id="m1" />
55+
<input type="text" id="m2" />
56+
<input type="text" id="m3" />
57+
</div>
58+
</div>
59+
</div>
60+
61+
<footer>
62+
<p>&copy; Oren Roth 2012</p>
63+
</footer>
64+
65+
</div> <!-- /container -->
66+
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
67+
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.7.2.min.js"><\/script>')</script>
68+
69+
<script src="js/libs/bootstrap/bootstrap.min.js"></script>
70+
71+
<!--script src="js/script.js"></script-->
72+
<script>
73+
var date = new Date(),
74+
month = date.getMonth(),
75+
weekday = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"),
76+
monthname = new Array("January","February","March","April","May","June","July","August","September","October","November","December"),
77+
day = date.getDay(),
78+
ctrlDown = false;
79+
$("#month span").text(monthname[month]);
80+
$("#day span").text(weekday[day]);
81+
82+
$('input').each(function(){
83+
var $this = $(this),
84+
id = $(this).attr('id'),
85+
val = localStorage.getItem(id),
86+
dir = localStorage.getItem(id + 'dir');
87+
88+
$this.keydown(function(event) {
89+
90+
var $note = $(this),
91+
id = $note.attr('id');
92+
//===================switch text direction=========================
93+
94+
if (event.which == 17) {
95+
ctrlDown = true;
96+
}
97+
if (event.which == 16) {
98+
if(ctrlDown){
99+
setTimeout ( function(){saveNote(id + 'dir',$note.css('direction'));},200 );
100+
$note.css('direction',$(this).css('direction')=="ltr" ? "rtl" : "ltr");
101+
}
102+
}
103+
104+
105+
106+
//event.preventDefault();
107+
//save here
108+
setTimeout ( function(){saveNote(id,$note.val());},10 );
109+
})
110+
.keyup(function(event) {
111+
if (event.which == 17) {
112+
ctrlDown = false;
113+
}
114+
115+
})
116+
.val(val)
117+
.wrap('<div class="inputCon' + (localStorage.getItem( id + "complete") ? " complete" : "") + '" />');
118+
119+
120+
121+
if(dir){
122+
$this.css('direction',dir);
123+
}
124+
125+
126+
});
127+
128+
function saveNote(noteId,msg){
129+
130+
if(msg === '')
131+
localStorage.removeItem(noteId);
132+
else
133+
localStorage.setItem(noteId,msg);
134+
}
135+
136+
function clearInput(el){
137+
var id = el.attr('id');
138+
el.parent().removeClass('complete');
139+
localStorage.removeItem( id + "complete")
140+
el.val('');
141+
saveNote(id,el.val());
142+
}
143+
144+
//set the body height to window height minus the padding
145+
document.body.style.height = (document.height-100) +"px";
146+
147+
$(".clear").on('click',function(){
148+
149+
var elStart = $(this).attr('rel');
150+
151+
$("input[id^=" + elStart + "]").val('').each(function(){
152+
clearInput($(this));
153+
});
154+
});
155+
156+
//=================== clear & done =========================
157+
$(".inputCon").append('<span class="done">v</span><span class="clearOne">x</span>');
158+
$(".done").on('click',function(){
159+
var $this = $(this),
160+
$parent = $this.parent();
161+
162+
$parent.toggleClass('complete');
163+
164+
165+
166+
var id = $this.siblings('input').attr('id');
167+
if($parent.hasClass('complete'))
168+
saveNote(id + "complete",true);
169+
else
170+
localStorage.removeItem( id + "complete");
171+
172+
});
173+
$(".clearOne").on('click',function(){
174+
var $this = $(this);
175+
176+
clearInput($this.siblings('input'));
177+
178+
});
179+
</script>
180+
</body>
181+
</html>

js/libs/bootstrap/alert.js

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
/* ==========================================================
2+
* bootstrap-alert.js v2.0.2
3+
* http://twitter.github.com/bootstrap/javascript.html#alerts
4+
* ==========================================================
5+
* Copyright 2012 Twitter, Inc.
6+
*
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
* ========================================================== */
19+
20+
21+
!function( $ ){
22+
23+
"use strict"
24+
25+
/* ALERT CLASS DEFINITION
26+
* ====================== */
27+
28+
var dismiss = '[data-dismiss="alert"]'
29+
, Alert = function ( el ) {
30+
$(el).on('click', dismiss, this.close)
31+
}
32+
33+
Alert.prototype = {
34+
35+
constructor: Alert
36+
37+
, close: function ( e ) {
38+
var $this = $(this)
39+
, selector = $this.attr('data-target')
40+
, $parent
41+
42+
if (!selector) {
43+
selector = $this.attr('href')
44+
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
45+
}
46+
47+
$parent = $(selector)
48+
$parent.trigger('close')
49+
50+
e && e.preventDefault()
51+
52+
$parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
53+
54+
$parent
55+
.trigger('close')
56+
.removeClass('in')
57+
58+
function removeElement() {
59+
$parent
60+
.trigger('closed')
61+
.remove()
62+
}
63+
64+
$.support.transition && $parent.hasClass('fade') ?
65+
$parent.on($.support.transition.end, removeElement) :
66+
removeElement()
67+
}
68+
69+
}
70+
71+
72+
/* ALERT PLUGIN DEFINITION
73+
* ======================= */
74+
75+
$.fn.alert = function ( option ) {
76+
return this.each(function () {
77+
var $this = $(this)
78+
, data = $this.data('alert')
79+
if (!data) $this.data('alert', (data = new Alert(this)))
80+
if (typeof option == 'string') data[option].call($this)
81+
})
82+
}
83+
84+
$.fn.alert.Constructor = Alert
85+
86+
87+
/* ALERT DATA-API
88+
* ============== */
89+
90+
$(function () {
91+
$('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
92+
})
93+
94+
}( window.jQuery );

0 commit comments

Comments
 (0)