Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

update to brunch 1.3.1

  • Loading branch information...
commit da0e709799fe7b26ef33b26c802e90b762d9c88f 1 parent 302c7e7
@ninoseki authored
View
26 .npmignore
@@ -0,0 +1,26 @@
+# Numerous always-ignore extensions
+*.diff
+*.err
+*.orig
+*.log
+*.rej
+*.swo
+*.swp
+*.vi
+*~
+*.sass-cache
+
+# OS or Editor folders
+.DS_Store
+.cache
+.project
+.settings
+.tmproj
+nbproject
+Thumbs.db
+
+# NPM packages folder.
+node_modules/
+
+# Brunch folder for temporary files.
+tmp/
View
2  app/views/column_view.coffee
@@ -1,4 +1,4 @@
-columnTemplate = require('./templates/column')
+columnTemplate = require('views/templates/column')
class exports.ColumnView extends Backbone.View
className: "column"
View
2  app/views/columns_view.coffee
@@ -1,5 +1,5 @@
{ColumnView} = require('views/column_view')
-columnsTemplate = require('./templates/columns')
+columnsTemplate = require('views/templates/columns')
class exports.ColumnsView extends Backbone.View
id: "columns"
View
2  app/views/home_view.coffee
@@ -1,4 +1,4 @@
-homeTemplate = require('./templates/home')
+homeTemplate = require('views/templates/home')
class exports.HomeView extends Backbone.View
el: '#main'
View
2  app/views/new_column_view.coffee
@@ -1,4 +1,4 @@
-newColumnTemplate = require('./templates/new_column')
+newColumnTemplate = require('views/templates/new_column')
class exports.NewColumnView extends Backbone.View
id: "new-column"
View
2  app/views/new_note_view.coffee
@@ -1,4 +1,4 @@
-newNoteTemplate = require('./templates/new_note')
+newNoteTemplate = require('views/templates/new_note')
class exports.NewNoteView extends Backbone.View
id: "new-note"
View
2  app/views/note_view.coffee
@@ -1,4 +1,4 @@
-noteTemplate = require('./templates/note')
+noteTemplate = require('views/templates/note')
class exports.NoteView extends Backbone.View
className: "note white"
View
2  app/views/notes_view.coffee
@@ -1,5 +1,5 @@
{NoteView} = require('views/note_view')
-notesTemplate = require('./templates/notes')
+notesTemplate = require('views/templates/notes')
class exports.NotesView extends Backbone.View
id: "notes"
View
2  app/views/resting_view.coffee
@@ -1,4 +1,4 @@
-timerTemplate = require('./templates/timer')
+timerTemplate = require('views/templates/timer')
class exports.RestingView extends Backbone.View
el: "#modal"
View
2  app/views/stats_view.coffee
@@ -1,4 +1,4 @@
-statsTemplate = require('./templates/stats')
+statsTemplate = require('views/templates/stats')
class exports.StatsView extends Backbone.View
el: "#modal"
View
2  app/views/working_view.coffee
@@ -1,4 +1,4 @@
-timerTemplate = require('./templates/timer')
+timerTemplate = require('views/templates/timer')
class exports.WorkingView extends Backbone.View
el: "#modal"
View
9 build/index.html
@@ -22,10 +22,10 @@
<a href="#working">
<button id="start-pomodoro" class="btn primary">Start Pomodoro</button>
</a>
- <a href="#resting/300">
+ <a href="#resting/short">
<button id="take-a-short-break" class="btn success">Take a short break</button>
</a>
- <a href="#resting/900">
+ <a href="#resting/long">
<button id="take-a-long-break" class="btn success">Take a long break</button>
</a>
</span>
@@ -34,6 +34,11 @@
<button class="btn">Show stats</button>
</a>
</span>
+ <span id="small_timer_container" style="margin-left: 5px">
+ <a href="#small_timer">
+ <button id="small_timer" class="btn success">Timer</button>
+ </a>
+ </span>
</div>
</div>
</div>
View
46 build/options.html
@@ -0,0 +1,46 @@
+<html>
+<head><title>Pomodoro Daisuki</title></head>
+<script type="text/javascript">
+
+function save_parameter(name){
+ var input = document.getElementById(name);
+ localStorage[name] = input.value;
+}
+
+function load_parameter(name){
+ var value = localStorage[name];
+ if (!value) {
+ return;
+ }
+ var input = document.getElementById(name);
+ input.value = value;
+}
+
+function save_options() {
+ save_parameter("pomodoro-duration");
+ save_parameter("short-duration");
+ save_parameter("long-duration");
+
+ var status = document.getElementById("status");
+ status.innerHTML = "Options Saved.";
+ setTimeout(function() {
+ status.innerHTML = "";
+ }, 750);
+}
+
+function restore_options() {
+ load_parameter("pomodoro-duration");
+ load_parameter("short-duration");
+ load_parameter("long-duration");
+}
+</script>
+
+<body onload="restore_options()">
+<table>
+<tr><td>Duration of a pomodoro </td><td><input id="pomodoro-duration" size=2 value="25" /></td><td>minutes</td></tr>
+<tr><td>Duration of a short break </td><td><input id="short-duration" size=2 value="5" /></td><td>minutes</td></tr>
+<tr><td>Duration of a long break </td><td><input id="long-duration" size=2 value="15"/></td><td>minutes</td></tr>
+</table>
+<button onclick="save_options()">Save</button> <span id="status"></span>
+</body>
+</html>
View
2,494 build/scripts/app.js
@@ -1,52 +1,80 @@
(function(/*! Brunch !*/) {
- if (!this.require) {
- var modules = {}, cache = {}, require = function(name, root) {
- var module = cache[name], path = expand(root, name), fn;
- if (module) {
- return module;
- } else if (fn = modules[path] || modules[path = expand(path, './index')]) {
- module = {id: name, exports: {}};
- try {
- cache[name] = module.exports;
- fn(module.exports, function(name) {
- return require(name, dirname(path));
- }, module);
- return cache[name] = module.exports;
- } catch (err) {
- delete cache[name];
- throw err;
- }
- } else {
- throw 'module \'' + name + '\' not found';
- }
- }, expand = function(root, name) {
- var results = [], parts, part;
- if (/^\.\.?(\/|$)/.test(name)) {
- parts = [root, name].join('/').split('/');
- } else {
- parts = name.split('/');
- }
- for (var i = 0, length = parts.length; i < length; i++) {
- part = parts[i];
- if (part == '..') {
- results.pop();
- } else if (part != '.' && part != '') {
- results.push(part);
- }
+ 'use strict';
+
+ var globals = typeof window !== 'undefined' ? window : global;
+ if (typeof globals.require === 'function') return;
+
+ var modules = {};
+ var cache = {};
+
+ var has = function(object, name) {
+ return hasOwnProperty.call(object, name);
+ };
+
+ var expand = function(root, name) {
+ var results = [], parts, part;
+ if (/^\.\.?(\/|$)/.test(name)) {
+ parts = [root, name].join('/').split('/');
+ } else {
+ parts = name.split('/');
+ }
+ for (var i = 0, length = parts.length; i < length; i++) {
+ part = parts[i];
+ if (part === '..') {
+ results.pop();
+ } else if (part !== '.' && part !== '') {
+ results.push(part);
}
- return results.join('/');
- }, dirname = function(path) {
- return path.split('/').slice(0, -1).join('/');
- };
- this.require = function(name) {
- return require(name, '');
}
- this.require.define = function(bundle) {
- for (var key in bundle)
- modules[key] = bundle[key];
+ return results.join('/');
+ };
+
+ var dirname = function(path) {
+ return path.split('/').slice(0, -1).join('/');
+ };
+
+ var localRequire = function(path) {
+ return function(name) {
+ var dir = dirname(path);
+ var absolute = expand(dir, name);
+ return require(absolute);
};
+ };
+
+ var initModule = function(name, definition) {
+ var module = {id: name, exports: {}};
+ definition(module.exports, localRequire(name), module);
+ var exports = cache[name] = module.exports;
+ return exports;
+ };
+
+ var require = function(name) {
+ var path = expand(name, '.');
+
+ if (has(cache, path)) return cache[path];
+ if (has(modules, path)) return initModule(path, modules[path]);
+
+ var dirIndex = expand(path, './index');
+ if (has(cache, dirIndex)) return cache[dirIndex];
+ if (has(modules, dirIndex)) return initModule(dirIndex, modules[dirIndex]);
+
+ throw new Error('Cannot find module "' + name + '"');
+ };
+
+ var define = function(bundle) {
+ for (var key in bundle) {
+ if (has(bundle, key)) {
+ modules[key] = bundle[key];
+ }
+ }
}
-}).call(this);// Make it safe to do console.log() always.
+
+ globals.require = require;
+ globals.require.define = define;
+ globals.require.brunch = true;
+})();
+
+// Make it safe to do console.log() always.
(function (con) {
var method;
var dummy = function() {};
@@ -57,6 +85,8 @@
con[method] = con[method] || dummy;
}
})(window.console = window.console || {});
+;
+
/*!
* jQuery JavaScript Library v1.7
* http://jquery.com/
@@ -9357,6 +9387,8 @@ jQuery.each([ "Height", "Width" ], function( i, name ) {
// Expose jQuery to the global object
window.jQuery = window.$ = jQuery;
})( window );
+;
+
// Underscore.js 1.1.7
// (c) 2011 Jeremy Ashkenas, DocumentCloud Inc.
// Underscore is freely distributable under the MIT license.
@@ -10196,6 +10228,8 @@ window.jQuery = window.$ = jQuery;
};
})();
+;
+
// Backbone.js 0.5.3
// (c) 2010 Jeremy Ashkenas, DocumentCloud Inc.
// Backbone may be freely distributed under the MIT license.
@@ -11354,6 +11388,8 @@ window.jQuery = window.$ = jQuery;
};
}).call(this);
+;
+
/**
* Backbone localStorage Adapter v1.0
* https://github.com/jeromegn/Backbone.localStorage
@@ -11454,7 +11490,9 @@ Backbone.sync = function(method, model, options, error) {
} else {
options.error("Record not found");
}
-};/* =========================================================
+};;
+
+/* =========================================================
* bootstrap-modal.js v1.4.0
* http://twitter.github.com/bootstrap/javascript.html#modal
* =========================================================
@@ -11725,6 +11763,8 @@ Backbone.sync = function(method, model, options, error) {
}( window.jQuery || window.ender );
+;
+
/*
Highcharts JS v2.1.9 (2011-11-11)
@@ -11901,6 +11941,8 @@ g,h,i=A(d.softConnector,true),j=d.distance,m=this.center,v=m[2]/2;m=m[1];var P=j
y;for(y=Na;y--;)Sa[y].rank>=U&&Sa.splice(y,1);Na=Sa.length}for(y=0;y<Na;y++){b=Sa[y];h=b.labelPos;b=9999;for(H=0;H<U;H++){g=bb(C[H]-h[1]);if(g<b){b=g;Ea=H}}if(Ea<y&&C[y]!==null)Ea=y;else{if(U<Na-y+Ea&&C[y]!==null)Ea=U-Na+y;for(;C[Ea]===null;)Ea++}Z.push({i:Ea,y:C[Ea]});C[Ea]=null}Z.sort(z);for(y=0;y<Na;y++){b=Sa[y];h=b.labelPos;g=b.dataLabel;H=Z.pop();Y=h[1];U=b.visible===false?ob:Ab;Ea=H.i;H=H.y;if(Y>H&&C[Ea+1]!==null||Y<H&&C[Ea-1]!==null)H=Y;Y=this.getX(Ea===0||Ea===C.length-1?Y:H,M);g.attr({visibility:U,
align:h[6]})[g.moved?"animate":"attr"]({x:Y+d.x+({left:e,right:-e}[h[6]]||0),y:H+d.y});g.moved=true;if(P&&f){g=b.connector;h=i?[Za,Y+(h[6]==="left"?5:-5),H,"C",Y,H,2*h[2]-h[4],2*h[3]-h[5],h[2],h[3],Ka,h[4],h[5]]:[Za,Y+(h[6]==="left"?5:-5),H,Ka,h[2],h[3],Ka,h[4],h[5]];if(g){g.animate({d:h});g.attr("visibility",U)}else b.connector=g=this.chart.renderer.path(h).attr({"stroke-width":f,stroke:d.connectorColor||b.color||"#606060",visibility:U,zIndex:3}).translate(c.plotLeft,c.plotTop).add()}}}}},drawTracker:hd.prototype.drawTracker,
getSymbol:function(){}});wb.pie=ma;db.Highcharts={Chart:Nd,dateFormat:Zc,pathAnim:Nc,getOptions:function(){return Xa},hasRtlBug:me,numberFormat:Ed,Point:Oc,Color:bc,Renderer:fd,seriesTypes:wb,setOptions:function(a){Xa=Ca(Xa,a);Id();return Xa},Series:sb,addEvent:Qa,removeEvent:pb,createElement:hb,discardElement:pc,css:Ja,each:u,extend:sa,map:tc,merge:Ca,pick:A,extendClass:yb,product:"Highcharts",version:"2.1.9"}})();
+;
+
/*!
* jQuery UI 1.8.11
*
@@ -12307,6 +12349,8 @@ load:function(c){c=this._getIndex(c);var h=this,i=this.options,j=this.anchors.eq
"cache.tabs",true);h._trigger("load",null,h._ui(h.anchors[c],h.panels[c]));try{i.ajaxOptions.success(l,k)}catch(m){}},error:function(l,k){h._cleanup();h._trigger("load",null,h._ui(h.anchors[c],h.panels[c]));try{i.ajaxOptions.error(l,k,c,j)}catch(m){}}}));h.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},
url:function(c,h){this.anchors.eq(c).removeData("cache.tabs").data("load.tabs",h);return this},length:function(){return this.anchors.length}});b.extend(b.ui.tabs,{version:"1.8.11"});b.extend(b.ui.tabs.prototype,{rotation:null,rotate:function(c,h){var i=this,j=this.options,n=i._rotate||(i._rotate=function(p){clearTimeout(i.rotation);i.rotation=setTimeout(function(){var l=j.selected;i.select(++l<i.anchors.length?l:0)},c);p&&p.stopPropagation()});h=i._unrotate||(i._unrotate=!h?function(p){p.clientX&&
i.rotate(null)}:function(){t=j.selected;n()});if(c){this.element.bind("tabsshow",n);this.anchors.bind(j.event+".tabs",h);n()}else{clearTimeout(i.rotation);this.element.unbind("tabsshow",n);this.anchors.unbind(j.event+".tabs",h);delete this._rotate;delete this._unrotate}return this}})})(jQuery);
+;
+
// Moment.js
//
// (c) 2011 Tim Wood
@@ -12930,185 +12974,307 @@ i.rotate(null)}:function(){t=j.selected;n()});if(c){this.element.bind("tabsshow"
window.moment = moment;
}
-})(Date);(function ($) {
- function configuration(settings) {
- return $.extend({
- seconds:60,
- tick:function (timer, formatted_time) {
- },
- format:'mm:ss',
- reset:false,
- show_in_title:false,
- origin_title:undefined,
- buzzer:function () {
- }
- }, settings);
- }
-
- $.fn.extend({
- startTimer:function (settings) {
- var timer = $(this);
- var settings = configuration(settings);
- var origin_title = document.title;
-
- return this.each(function () {
- if (localStorage['jquery.countdown.ended_at'] === undefined || settings.reset) {
- localStorage['jquery.countdown.ended_at'] = new Date().getTime() + settings.seconds * 1000;
- }
- var tick = function () {
- var ended_at = localStorage['jquery.countdown.ended_at'];
- var current_time = parseInt(ended_at) - new Date().getTime();
-
- if (current_time < 0 || isNaN(current_time)) {
- timer.clearTimer();
-
- // when not called clearTimer externally
- if (ended_at !== undefined) {
- settings.buzzer();
- }
- if (settings.show_in_title) {
- document.title = origin_title;
- }
-
- return false;
- } else {
- // var formatted_time = new Date(current_time).toString(settings.format);
- var formatted_time = moment(current_time).format(settings.format);
- timer.text(formatted_time);
- if (settings.show_in_title) {
- document.title = formatted_time;
- }
-
- return true;
- }
- };
-
- if (tick()) {
- var interval = setInterval(function () {
- if (!tick()) {
- clearInterval(interval);
- }
- }, 1000);
- }
- });
- },
- clearTimer:function () {
- localStorage.removeItem('jquery.countdown.ended_at');
- }
- });
-})(jQuery);
-
-(this.require.define({
- "models/state_model": function(exports, require, module) {
- (function() {
- 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; };
+})(Date);;
+
+(function ($) {
+ function configuration(settings) {
+ return $.extend({
+ seconds:60,
+ tick:function (timer, formatted_time) {
+ },
+ format:'mm:ss',
+ reset:false,
+ show_in_title:false,
+ origin_title:undefined,
+ buzzer:function () {
+ }
+ }, settings);
+ }
- exports.State = (function(_super) {
+ $.fn.extend({
+ startTimer:function (settings) {
+ var timer = $(this);
+ var settings = configuration(settings);
+ var origin_title = document.title;
- __extends(State, _super);
+ return this.each(function () {
+ if (localStorage['jquery.countdown.ended_at'] === undefined || settings.reset) {
+ localStorage['jquery.countdown.ended_at'] = new Date().getTime() + settings.seconds * 1000;
+ }
+ var tick = function () {
+ var ended_at = localStorage['jquery.countdown.ended_at'];
+ var current_time = parseInt(ended_at) - new Date().getTime();
+
+ if (current_time < 0 || isNaN(current_time)) {
+ timer.clearTimer();
+
+ // when not called clearTimer externally
+ if (ended_at !== undefined) {
+ settings.buzzer();
+ }
+ if (settings.show_in_title) {
+ document.title = origin_title;
+ }
+
+ return false;
+ } else {
+ // var formatted_time = new Date(current_time).toString(settings.format);
+ var formatted_time = moment(current_time).format(settings.format);
+ timer.text(formatted_time);
+ if (settings.show_in_title) {
+ document.title = formatted_time;
+ }
+
+ return true;
+ }
+ };
+
+ if (tick()) {
+ var interval = setInterval(function () {
+ if (!tick()) {
+ clearInterval(interval);
+ }
+ }, 1000);
+ }
+ });
+ },
+ clearTimer:function () {
+ localStorage.removeItem('jquery.countdown.ended_at');
+ }
+ });
+})(jQuery);
- function State() {
- State.__super__.constructor.apply(this, arguments);
- }
+;
- return State;
+// lib/handlebars/base.js
+var Handlebars = {};
- })(Backbone.Model);
+Handlebars.VERSION = "1.0.beta.6";
-}).call(this);
+Handlebars.helpers = {};
+Handlebars.partials = {};
+
+Handlebars.registerHelper = function(name, fn, inverse) {
+ if(inverse) { fn.not = inverse; }
+ this.helpers[name] = fn;
+};
+Handlebars.registerPartial = function(name, str) {
+ this.partials[name] = str;
+};
+
+Handlebars.registerHelper('helperMissing', function(arg) {
+ if(arguments.length === 2) {
+ return undefined;
+ } else {
+ throw new Error("Could not find property '" + arg + "'");
}
-}));
-(this.require.define({
- "collections/states_collection": function(exports, require, module) {
- (function() {
- var State,
- __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; };
+});
- State = require('models/state_model').State;
+var toString = Object.prototype.toString, functionType = "[object Function]";
- exports.States = (function(_super) {
+Handlebars.registerHelper('blockHelperMissing', function(context, options) {
+ var inverse = options.inverse || function() {}, fn = options.fn;
- __extends(States, _super);
- function States() {
- States.__super__.constructor.apply(this, arguments);
+ var ret = "";
+ var type = toString.call(context);
+
+ if(type === functionType) { context = context.call(this); }
+
+ if(context === true) {
+ return fn(this);
+ } else if(context === false || context == null) {
+ return inverse(this);
+ } else if(type === "[object Array]") {
+ if(context.length > 0) {
+ for(var i=0, j=context.length; i<j; i++) {
+ ret = ret + fn(context[i]);
+ }
+ } else {
+ ret = inverse(this);
}
+ return ret;
+ } else {
+ return fn(context);
+ }
+});
- States.prototype.model = State;
+Handlebars.registerHelper('each', function(context, options) {
+ var fn = options.fn, inverse = options.inverse;
+ var ret = "";
- States.prototype.initialize = function() {
- return this.localStorage = new Store("state");
- };
+ if(context && context.length > 0) {
+ for(var i=0, j=context.length; i<j; i++) {
+ ret = ret + fn(context[i]);
+ }
+ } else {
+ ret = inverse(this);
+ }
+ return ret;
+});
- States.prototype.getCurrentState = function() {
- var first;
- first = this.first();
- if (first === void 0) first = this.create();
- return first;
- };
+Handlebars.registerHelper('if', function(context, options) {
+ var type = toString.call(context);
+ if(type === functionType) { context = context.call(this); }
- States.prototype.getCurrentStateName = function() {
- var currentState;
- currentState = this.getCurrentState();
- return currentState.get('name');
- };
+ if(!context || Handlebars.Utils.isEmpty(context)) {
+ return options.inverse(this);
+ } else {
+ return options.fn(this);
+ }
+});
- States.prototype.setCurrentStateName = function(name) {
- var currentState;
- currentState = this.getCurrentState();
- return currentState.save({
- name: name
- });
- };
+Handlebars.registerHelper('unless', function(context, options) {
+ var fn = options.fn, inverse = options.inverse;
+ options.fn = inverse;
+ options.inverse = fn;
- return States;
+ return Handlebars.helpers['if'].call(this, context, options);
+});
- })(Backbone.Collection);
+Handlebars.registerHelper('with', function(context, options) {
+ return options.fn(context);
+});
-}).call(this);
+Handlebars.registerHelper('log', function(context) {
+ Handlebars.log(context);
+});
+;
+// lib/handlebars/utils.js
+Handlebars.Exception = function(message) {
+ var tmp = Error.prototype.constructor.apply(this, arguments);
+ for (var p in tmp) {
+ if (tmp.hasOwnProperty(p)) { this[p] = tmp[p]; }
}
-}));
-(this.require.define({
- "collections/notes_collection": function(exports, require, module) {
- (function() {
- var Note,
- __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; };
- Note = require('models/note_model').Note;
+ this.message = tmp.message;
+};
+Handlebars.Exception.prototype = new Error;
- exports.Notes = (function(_super) {
+// Build out our basic SafeString type
+Handlebars.SafeString = function(string) {
+ this.string = string;
+};
+Handlebars.SafeString.prototype.toString = function() {
+ return this.string.toString();
+};
- __extends(Notes, _super);
+(function() {
+ var escape = {
+ "<": "&lt;",
+ ">": "&gt;",
+ '"': "&quot;",
+ "'": "&#x27;",
+ "`": "&#x60;"
+ };
- function Notes() {
- Notes.__super__.constructor.apply(this, arguments);
- }
+ var badChars = /&(?!\w+;)|[<>"'`]/g;
+ var possible = /[&<>"'`]/;
- Notes.prototype.model = Note;
+ var escapeChar = function(chr) {
+ return escape[chr] || "&amp;";
+ };
- Notes.prototype.initialize = function() {
- return this.localStorage = new Store("notes");
+ Handlebars.Utils = {
+ escapeExpression: function(string) {
+ // don't escape SafeStrings, since they're already safe
+ if (string instanceof Handlebars.SafeString) {
+ return string.toString();
+ } else if (string == null || string === false) {
+ return "";
+ }
+
+ if(!possible.test(string)) { return string; }
+ return string.replace(badChars, escapeChar);
+ },
+
+ isEmpty: function(value) {
+ if (typeof value === "undefined") {
+ return true;
+ } else if (value === null) {
+ return true;
+ } else if (value === false) {
+ return true;
+ } else if(Object.prototype.toString.call(value) === "[object Array]" && value.length === 0) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+ };
+})();;
+// lib/handlebars/runtime.js
+Handlebars.VM = {
+ template: function(templateSpec) {
+ // Just add water
+ var container = {
+ escapeExpression: Handlebars.Utils.escapeExpression,
+ invokePartial: Handlebars.VM.invokePartial,
+ programs: [],
+ program: function(i, fn, data) {
+ var programWrapper = this.programs[i];
+ if(data) {
+ return Handlebars.VM.program(fn, data);
+ } else if(programWrapper) {
+ return programWrapper;
+ } else {
+ programWrapper = this.programs[i] = Handlebars.VM.program(fn);
+ return programWrapper;
+ }
+ },
+ programWithDepth: Handlebars.VM.programWithDepth,
+ noop: Handlebars.VM.noop
};
- return Notes;
+ return function(context, options) {
+ options = options || {};
+ return templateSpec.call(container, Handlebars, context, options.helpers, options.partials, options.data);
+ };
+ },
- })(Backbone.Collection);
+ programWithDepth: function(fn, data, $depth) {
+ var args = Array.prototype.slice.call(arguments, 2);
-}).call(this);
+ return function(context, options) {
+ options = options || {};
+ return fn.apply(this, [context, options.data || data].concat(args));
+ };
+ },
+ program: function(fn, data) {
+ return function(context, options) {
+ options = options || {};
+
+ return fn(context, options.data || data);
+ };
+ },
+ noop: function() { return ""; },
+ invokePartial: function(partial, name, context, helpers, partials, data) {
+ options = { helpers: helpers, partials: partials, data: data };
+
+ if(partial === undefined) {
+ throw new Handlebars.Exception("The partial " + name + " could not be found");
+ } else if(partial instanceof Function) {
+ return partial(context, options);
+ } else if (!Handlebars.compile) {
+ throw new Handlebars.Exception("The partial " + name + " could not be compiled when running in runtime-only mode");
+ } else {
+ partials[name] = Handlebars.compile(partial);
+ return partials[name](context, options);
+ }
}
-}));
-(this.require.define({
- "collections/columns_collection": function(exports, require, module) {
- (function() {
+};
+
+Handlebars.template = Handlebars.VM.template;
+;
+;
+
+window.require.define({"collections/columns_collection": function(exports, require, module) {
var Column,
- __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; };
+ __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; };
Column = require('models/column_model').Column;
@@ -13117,7 +13283,7 @@ i.rotate(null)}:function(){t=j.selected;n()});if(c){this.element.bind("tabsshow"
__extends(Columns, _super);
function Columns() {
- Columns.__super__.constructor.apply(this, arguments);
+ return Columns.__super__.constructor.apply(this, arguments);
}
Columns.prototype.model = Column;
@@ -13129,17 +13295,40 @@ i.rotate(null)}:function(){t=j.selected;n()});if(c){this.element.bind("tabsshow"
return Columns;
})(Backbone.Collection);
+
+}});
-}).call(this);
+window.require.define({"collections/notes_collection": function(exports, require, module) {
+ var Note,
+ __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; };
- }
-}));
-(this.require.define({
- "collections/pomodoros_collection": function(exports, require, module) {
- (function() {
+ Note = require('models/note_model').Note;
+
+ exports.Notes = (function(_super) {
+
+ __extends(Notes, _super);
+
+ function Notes() {
+ return Notes.__super__.constructor.apply(this, arguments);
+ }
+
+ Notes.prototype.model = Note;
+
+ Notes.prototype.initialize = function() {
+ return this.localStorage = new Store("notes");
+ };
+
+ return Notes;
+
+ })(Backbone.Collection);
+
+}});
+
+window.require.define({"collections/pomodoros_collection": function(exports, require, module) {
var Pomodoro,
- __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; };
+ __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; };
Pomodoro = require('models/pomodoro_model').Pomodoro;
@@ -13148,7 +13337,7 @@ i.rotate(null)}:function(){t=j.selected;n()});if(c){this.element.bind("tabsshow"
__extends(Pomodoros, _super);
function Pomodoros() {
- Pomodoros.__super__.constructor.apply(this, arguments);
+ return Pomodoros.__super__.constructor.apply(this, arguments);
}
Pomodoros.prototype.model = Pomodoro;
@@ -13164,24 +13353,98 @@ i.rotate(null)}:function(){t=j.selected;n()});if(c){this.element.bind("tabsshow"
return _.each(clone_models, function(pomodoro) {
var date;
date = moment(parseInt(pomodoro.get('created_at'))).format(format);
- if (today > date) return pomodoro.destroy();
+ if (today > date) {
+ return pomodoro.destroy();
+ }
});
};
return Pomodoros;
})(Backbone.Collection);
+
+}});
-}).call(this);
+window.require.define({"collections/states_collection": function(exports, require, module) {
+ var State,
+ __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; };
- }
-}));
-(this.require.define({
- "initialize": function(exports, require, module) {
- (function() {
+ State = require('models/state_model').State;
+
+ exports.States = (function(_super) {
+
+ __extends(States, _super);
+
+ function States() {
+ return States.__super__.constructor.apply(this, arguments);
+ }
+
+ States.prototype.model = State;
+
+ States.prototype.initialize = function() {
+ return this.localStorage = new Store("state");
+ };
+
+ States.prototype.getCurrentState = function() {
+ var first;
+ first = this.first();
+ if (first === void 0) {
+ first = this.create();
+ }
+ return first;
+ };
+
+ States.prototype.getCurrentStateName = function() {
+ var currentState;
+ currentState = this.getCurrentState();
+ return currentState.get('name');
+ };
+
+ States.prototype.setCurrentStateName = function(name) {
+ var currentState;
+ currentState = this.getCurrentState();
+ return currentState.save({
+ name: name
+ });
+ };
+
+ return States;
+
+ })(Backbone.Collection);
+
+}});
+
+window.require.define({"helpers": function(exports, require, module) {
+
+ exports.BrunchApplication = (function() {
+
+ function BrunchApplication() {
+ var _this = this;
+ this.routers = {};
+ this.models = {};
+ this.collections = {};
+ this.views = {};
+ this.utils = {};
+ jQuery(function() {
+ return _this.initialize(_this);
+ });
+ }
+
+ BrunchApplication.prototype.onReady = function() {
+ return null;
+ };
+
+ return BrunchApplication;
+
+ })();
+
+}});
+
+window.require.define({"initialize": function(exports, require, module) {
var BrunchApplication, Columns, ColumnsView, HomeView, MainRouter, NewColumnView, NewNoteView, Notes, NotesView, Pomodoros, RestingView, States, StatsView, WorkingView,
- __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; };
+ __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; };
BrunchApplication = require('helpers').BrunchApplication;
@@ -13216,7 +13479,7 @@ i.rotate(null)}:function(){t=j.selected;n()});if(c){this.element.bind("tabsshow"
__extends(Application, _super);
function Application() {
- Application.__super__.constructor.apply(this, arguments);
+ return Application.__super__.constructor.apply(this, arguments);
}
Application.prototype.initialize = function() {
@@ -13238,7 +13501,7 @@ i.rotate(null)}:function(){t=j.selected;n()});if(c){this.element.bind("tabsshow"
this.audios.alarm = new Audio("audios/alarm.wav");
this.settings = {};
this.settings.date_format = "YYYY-MM-DD";
- this.development = true;
+ this.development = false;
Backbone.history.start();
this.collections.states.fetch();
currentStateName = app.collections.states.getCurrentStateName();
@@ -13253,23 +13516,19 @@ i.rotate(null)}:function(){t=j.selected;n()});if(c){this.element.bind("tabsshow"
})(BrunchApplication);
window.app = new exports.Application;
+
+}});
-}).call(this);
-
- }
-}));
-(this.require.define({
- "models/column_model": function(exports, require, module) {
- (function() {
- 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; };
+window.require.define({"models/column_model": function(exports, require, module) {
+ var __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; };
exports.Column = (function(_super) {
__extends(Column, _super);
function Column() {
- Column.__super__.constructor.apply(this, arguments);
+ return Column.__super__.constructor.apply(this, arguments);
}
Column.prototype.defaults = {
@@ -13284,23 +13543,19 @@ i.rotate(null)}:function(){t=j.selected;n()});if(c){this.element.bind("tabsshow"
return Column;
})(Backbone.Model);
+
+}});
-}).call(this);
-
- }
-}));
-(this.require.define({
- "models/note_model": function(exports, require, module) {
- (function() {
- 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; };
+window.require.define({"models/note_model": function(exports, require, module) {
+ var __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; };
exports.Note = (function(_super) {
__extends(Note, _super);
function Note() {
- Note.__super__.constructor.apply(this, arguments);
+ return Note.__super__.constructor.apply(this, arguments);
}
Note.prototype.defaults = {
@@ -13319,20 +13574,122 @@ i.rotate(null)}:function(){t=j.selected;n()});if(c){this.element.bind("tabsshow"
return Note;
})(Backbone.Model);
+
+}});
-}).call(this);
+window.require.define({"models/pomodoro_model": function(exports, require, module) {
+ var __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; };
- }
-}));
-(this.require.define({
- "views/column_view": function(exports, require, module) {
- (function() {
+ exports.Pomodoro = (function(_super) {
+
+ __extends(Pomodoro, _super);
+
+ function Pomodoro() {
+ return Pomodoro.__super__.constructor.apply(this, arguments);
+ }
+
+ return Pomodoro;
+
+ })(Backbone.Model);
+
+}});
+
+window.require.define({"models/state_model": function(exports, require, module) {
+ var __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; };
+
+ exports.State = (function(_super) {
+
+ __extends(State, _super);
+
+ function State() {
+ return State.__super__.constructor.apply(this, arguments);
+ }
+
+ return State;
+
+ })(Backbone.Model);
+
+}});
+
+window.require.define({"routers/main_router": function(exports, require, module) {
+ var __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; };
+
+ exports.MainRouter = (function(_super) {
+
+ __extends(MainRouter, _super);
+
+ function MainRouter() {
+ return MainRouter.__super__.constructor.apply(this, arguments);
+ }
+
+ MainRouter.prototype.routes = {
+ "home": "home",
+ "working": "working",
+ "resting/:rest_type": "resting",
+ "stats": "stats",
+ "small_timer": "small_timer"
+ };
+
+ MainRouter.prototype.home = function() {
+ app.views.home.render();
+ app.collections.notes.fetch();
+ app.collections.columns.fetch();
+ return app.collections.states.setCurrentStateName('home');
+ };
+
+ MainRouter.prototype.working = function() {
+ var duration;
+ app.views.working.render();
+ duration = localStorage["pomodoro-duration"];
+ if (!duration) {
+ duration = 25;
+ }
+ app.views.working.startTimer(app.development === true ? 10 : duration * 60);
+ return app.collections.states.setCurrentStateName('working');
+ };
+
+ MainRouter.prototype.resting = function(rest_type) {
+ var duration;
+ app.views.resting.render();
+ duration = localStorage[rest_type + "-duration"];
+ if (!duration) {
+ if (rest_type === "short") {
+ duration = 5;
+ }
+ if (rest_type === "long") {
+ duration = 15;
+ }
+ }
+ app.views.resting.startTimer(app.development === true ? 10 : duration * 60);
+ return app.collections.states.setCurrentStateName('resting/' + rest_type);
+ };
+
+ MainRouter.prototype.stats = function() {
+ app.collections.pomodoros.fetch();
+ return app.views.stats.render();
+ };
+
+ MainRouter.prototype.small_timer = function() {
+ $("#modal").modal("show");
+ return app.routers.main.navigate('home', true);
+ };
+
+ return MainRouter;
+
+ })(Backbone.Router);
+
+}});
+
+window.require.define({"views/column_view": function(exports, require, module) {
var columnTemplate,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
- __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; };
+ __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; };
- columnTemplate = require('./templates/column');
+ columnTemplate = require('views/templates/column');
exports.ColumnView = (function(_super) {
@@ -13340,8 +13697,9 @@ i.rotate(null)}:function(){t=j.selected;n()});if(c){this.element.bind("tabsshow"
function ColumnView() {
this.update = __bind(this.update, this);
+
this.render = __bind(this.render, this);
- ColumnView.__super__.constructor.apply(this, arguments);
+ return ColumnView.__super__.constructor.apply(this, arguments);
}
ColumnView.prototype.className = "column";
@@ -13389,123 +13747,97 @@ i.rotate(null)}:function(){t=j.selected;n()});if(c){this.element.bind("tabsshow"
return ColumnView;
})(Backbone.View);
+
+}});
-}).call(this);
+window.require.define({"views/columns_view": function(exports, require, module) {
+ var ColumnView, columnsTemplate,
+ __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
+ __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; };
- }
-}));
-(this.require.define({
- "views/new_note_view": function(exports, require, module) {
- (function() {
- var newNoteTemplate,
- __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; };
+ ColumnView = require('views/column_view').ColumnView;
- newNoteTemplate = require('./templates/new_note');
+ columnsTemplate = require('views/templates/columns');
- exports.NewNoteView = (function(_super) {
+ exports.ColumnsView = (function(_super) {
- __extends(NewNoteView, _super);
+ __extends(ColumnsView, _super);
- function NewNoteView() {
- NewNoteView.__super__.constructor.apply(this, arguments);
+ function ColumnsView() {
+ this.addAll = __bind(this.addAll, this);
+
+ this.addOne = __bind(this.addOne, this);
+
+ this.reindex = __bind(this.reindex, this);
+ return ColumnsView.__super__.constructor.apply(this, arguments);
}
- NewNoteView.prototype.id = "new-note";
+ ColumnsView.prototype.id = "columns";
- NewNoteView.prototype.events = {
- "click .addNote": "create"
+ ColumnsView.prototype.initialize = function() {
+ app.collections.columns.bind('add', this.addOne);
+ app.collections.columns.bind('reset', this.addAll);
+ return app.collections.columns.bind('remove', this.reindex);
};
- NewNoteView.prototype.render = function() {
- this.$(this.el).html(newNoteTemplate());
- this.delegateEvents();
+ ColumnsView.prototype.render = function() {
+ $(this.el).html(columnsTemplate());
return this;
};
- NewNoteView.prototype.create = function(event) {
- var color;
- color = event.currentTarget.className.split(" ")[1];
- return app.collections.notes.create({
- color: color
+ ColumnsView.prototype.adjustSize = function() {
+ var column_width, length, width;
+ width = $('body').width();
+ length = app.collections.columns.length;
+ column_width = width / length;
+ return $('.column').each(function(index) {
+ $(this).width(column_width);
+ return $(this).css('left', index * column_width);
});
};
- return NewNoteView;
-
- })(Backbone.View);
-
-}).call(this);
-
- }
-}));
-(this.require.define({
- "helpers": function(exports, require, module) {
- (function() {
-
- exports.BrunchApplication = (function() {
-
- function BrunchApplication() {
- var _this = this;
- this.routers = {};
- this.models = {};
- this.collections = {};
- this.views = {};
- this.utils = {};
- jQuery(function() {
- return _this.initialize(_this);
+ ColumnsView.prototype.reindex = function() {
+ app.collections.columns.each(function(column, index) {
+ return column.save({
+ index: index
+ });
});
- }
-
- BrunchApplication.prototype.onReady = function() {
- return null;
+ return this.adjustSize();
};
- return BrunchApplication;
-
- })();
-
-}).call(this);
-
- }
-}));
-(this.require.define({
- "models/pomodoro_model": function(exports, require, module) {
- (function() {
- 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; };
-
- exports.Pomodoro = (function(_super) {
-
- __extends(Pomodoro, _super);
-
- function Pomodoro() {
- Pomodoro.__super__.constructor.apply(this, arguments);
- }
+ ColumnsView.prototype.addOne = function(column) {
+ var view;
+ view = new ColumnView({
+ model: column
+ });
+ $(this.el).append(view.render().el);
+ return this.adjustSize();
+ };
- return Pomodoro;
+ ColumnsView.prototype.addAll = function() {
+ return app.collections.columns.each(this.addOne);
+ };
- })(Backbone.Model);
+ return ColumnsView;
-}).call(this);
+ })(Backbone.View);
+
+}});
- }
-}));
-(this.require.define({
- "views/home_view": function(exports, require, module) {
- (function() {
+window.require.define({"views/home_view": function(exports, require, module) {
var homeTemplate,
- __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; };
+ __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; };
- homeTemplate = require('./templates/home');
+ homeTemplate = require('views/templates/home');
exports.HomeView = (function(_super) {
__extends(HomeView, _super);
function HomeView() {
- HomeView.__super__.constructor.apply(this, arguments);
+ return HomeView.__super__.constructor.apply(this, arguments);
}
HomeView.prototype.el = '#main';
@@ -13522,417 +13854,108 @@ i.rotate(null)}:function(){t=j.selected;n()});if(c){this.element.bind("tabsshow"
return HomeView;
})(Backbone.View);
+
+}});
-}).call(this);
-
- }
-}));
-(this.require.define({
- "views/working_view": function(exports, require, module) {
- (function() {
- var timerTemplate,
- __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
- __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; };
+window.require.define({"views/new_column_view": function(exports, require, module) {
+ var newColumnTemplate,
+ __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; };
- timerTemplate = require('./templates/timer');
+ newColumnTemplate = require('views/templates/new_column');
- exports.WorkingView = (function(_super) {
+ exports.NewColumnView = (function(_super) {
- __extends(WorkingView, _super);
+ __extends(NewColumnView, _super);
- function WorkingView() {
- this.buzzer = __bind(this.buzzer, this);
- this.startTimer = __bind(this.startTimer, this);
- WorkingView.__super__.constructor.apply(this, arguments);
+ function NewColumnView() {
+ return NewColumnView.__super__.constructor.apply(this, arguments);
}
- WorkingView.prototype.el = "#modal";
+ NewColumnView.prototype.id = "new-column";
- WorkingView.prototype.events = {
- "click #cancel": "resetTimer"
+ NewColumnView.prototype.events = {
+ "click #add-column": "create"
};
- WorkingView.prototype.render = function() {
- this.$(this.el).html(timerTemplate({
- title: "Working"
- }));
- this.$(this.el).modal({
- backdrop: 'static',
- show: true
- });
+ NewColumnView.prototype.render = function() {
+ this.$(this.el).html(newColumnTemplate());
return this;
};
- WorkingView.prototype.startTimer = function(seconds) {
- return $('#timer').startTimer({
- seconds: seconds,
- reset: false,
- show_in_title: true,
- buzzer: this.buzzer
+ NewColumnView.prototype.create = function() {
+ return app.collections.columns.create({
+ index: app.collections.columns.length
});
};
- WorkingView.prototype.buzzer = function() {
- var notification;
- app.collections.pomodoros.create({
- created_at: new Date().getTime()
- });
- app.audios.alarm.play();
- notification = webkitNotifications.createNotification('images/tomato_32.png', 'notification', 'pomodoro is done!');
- notification.show();
- this.$(this.el).modal('hide');
- return app.routers.main.navigate('home', true);
- };
+ return NewColumnView;
- WorkingView.prototype.resetTimer = function() {
- $("#timer").clearTimer();
- this.$(this.el).modal('hide');
- return app.routers.main.navigate('home', true);
- };
+ })(Backbone.View);
+
+}});
- return WorkingView;
+window.require.define({"views/new_note_view": function(exports, require, module) {
+ var newNoteTemplate,
+ __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; };
- })(Backbone.View);
+ newNoteTemplate = require('views/templates/new_note');
-}).call(this);
-
- }
-}));
-(this.require.define({
- "views/stats_view": function(exports, require, module) {
- (function() {
- var statsTemplate,
- __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
- __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; };
-
- statsTemplate = require('./templates/stats');
-
- exports.StatsView = (function(_super) {
-
- __extends(StatsView, _super);
-
- function StatsView() {
- this.close = __bind(this.close, this);
- StatsView.__super__.constructor.apply(this, arguments);
- }
-
- StatsView.prototype.el = "#modal";
-
- StatsView.prototype.id = "stats";
-
- StatsView.prototype.events = {
- "click .close": "close"
- };
-
- StatsView.prototype.render = function() {
- this.$(this.el).html(statsTemplate({
- title: "Weekly Stats",
- count: 0
- }));
- this.showStatsGraph();
- this.$(this.el).modal({
- backdrop: 'static',
- show: true
- });
- return this;
- };
-
- StatsView.prototype.showStatsGraph = function() {
- var chart, key, stats, value;
- stats = this.getWeeklyStats();
- return chart = new Highcharts.Chart({
- chart: {
- renderTo: "stats-graph",
- defaultSeriesType: "column",
- height: 400,
- width: 560
- },
- title: {
- text: ""
- },
- xAxis: {
- categories: (function() {
- var _results;
- _results = [];
- for (key in stats) {
- _results.push(key);
- }
- return _results;
- })(),
- labels: {
- formatter: function() {
- return this.value.substr(5);
- }
- }
- },
- yAxis: {
- title: ""
- },
- series: [
- {
- name: "number of pomodoros",
- data: (function() {
- var _results;
- _results = [];
- for (key in stats) {
- value = stats[key];
- _results.push(value);
- }
- return _results;
- })()
- }
- ]
- });
- };
-
- StatsView.prototype.getWeeklyStats = function() {
- var date, i, pomodoros, stats;
- stats = {};
- for (i = 0; i <= 6; i++) {
- date = moment().day(i).format(app.settings.date_format);
- pomodoros = app.collections.pomodoros.filter(function(pomodoro) {
- return date === moment(parseInt(pomodoro.get('created_at'))).format(app.settings.date_format);
- });
- stats[date] = pomodoros.length;
- }
- return stats;
- };
-
- StatsView.prototype.close = function() {
- this.$(this.el).modal('hide');
- return app.routers.main.navigate('home', true);
- };
-
- return StatsView;
-
- })(Backbone.View);
-
-}).call(this);
-
- }
-}));
-(this.require.define({
- "views/notes_view": function(exports, require, module) {
- (function() {
- var NoteView, notesTemplate,
- __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
- __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; };
-
- NoteView = require('views/note_view').NoteView;
-
- notesTemplate = require('./templates/notes');
-
- exports.NotesView = (function(_super) {
-
- __extends(NotesView, _super);
-
- function NotesView() {
- this.addAll = __bind(this.addAll, this);
- this.addOne = __bind(this.addOne, this);
- NotesView.__super__.constructor.apply(this, arguments);
- }
-
- NotesView.prototype.id = "notes";
-
- NotesView.prototype.initialize = function() {
- app.collections.notes.bind('add', this.addOne);
- return app.collections.notes.bind('reset', this.addAll);
- };
-
- NotesView.prototype.render = function() {
- $(this.el).html(notesTemplate());
- return this;
- };
-
- NotesView.prototype.addOne = function(note) {
- var view;
- view = new NoteView({
- model: note
- });
- return $(this.el).append(view.render().el);
- };
-
- NotesView.prototype.addAll = function() {
- return app.collections.notes.each(this.addOne);
- };
-
- return NotesView;
-
- })(Backbone.View);
-
-}).call(this);
-
- }
-}));
-(this.require.define({
- "views/columns_view": function(exports, require, module) {
- (function() {
- var ColumnView, columnsTemplate,
- __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
- __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; };
-
- ColumnView = require('views/column_view').ColumnView;
-
- columnsTemplate = require('./templates/columns');
-
- exports.ColumnsView = (function(_super) {
-
- __extends(ColumnsView, _super);
-
- function ColumnsView() {
- this.addAll = __bind(this.addAll, this);
- this.addOne = __bind(this.addOne, this);
- this.reindex = __bind(this.reindex, this);
- ColumnsView.__super__.constructor.apply(this, arguments);
- }
-
- ColumnsView.prototype.id = "columns";
-
- ColumnsView.prototype.initialize = function() {
- app.collections.columns.bind('add', this.addOne);
- app.collections.columns.bind('reset', this.addAll);
- return app.collections.columns.bind('remove', this.reindex);
- };
-
- ColumnsView.prototype.render = function() {
- $(this.el).html(columnsTemplate());
- return this;
- };
-
- ColumnsView.prototype.adjustSize = function() {
- var column_width, length, width;
- width = $('body').width();
- length = app.collections.columns.length;
- column_width = width / length;
- return $('.column').each(function(index) {
- $(this).width(column_width);
- return $(this).css('left', index * column_width);
- });
- };
-
- ColumnsView.prototype.reindex = function() {
- app.collections.columns.each(function(column, index) {
- return column.save({
- index: index
- });
- });
- return this.adjustSize();
- };
-
- ColumnsView.prototype.addOne = function(column) {
- var view;
- view = new ColumnView({
- model: column
- });
- $(this.el).append(view.render().el);
- return this.adjustSize();
- };
-
- ColumnsView.prototype.addAll = function() {
- return app.collections.columns.each(this.addOne);
- };
-
- return ColumnsView;
-
- })(Backbone.View);
-
-}).call(this);
-
- }
-}));
-(this.require.define({
- "views/resting_view": function(exports, require, module) {
- (function() {
- var timerTemplate,
- __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
- __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; };
-
- timerTemplate = require('./templates/timer');
-
- exports.RestingView = (function(_super) {
+ exports.NewNoteView = (function(_super) {
- __extends(RestingView, _super);
+ __extends(NewNoteView, _super);
- function RestingView() {
- this.buzzer = __bind(this.buzzer, this);
- this.startTimer = __bind(this.startTimer, this);
- RestingView.__super__.constructor.apply(this, arguments);
+ function NewNoteView() {
+ return NewNoteView.__super__.constructor.apply(this, arguments);
}
- RestingView.prototype.el = "#modal";
+ NewNoteView.prototype.id = "new-note";
- RestingView.prototype.events = {
- "click #cancel": "resetTimer"
+ NewNoteView.prototype.events = {
+ "click .addNote": "create"
};
- RestingView.prototype.render = function() {
- this.$(this.el).html(timerTemplate({
- title: "Resting"
- }));
- this.$(this.el).modal({
- backdrop: 'static',
- show: true
- });
+ NewNoteView.prototype.render = function() {
+ this.$(this.el).html(newNoteTemplate());
+ this.delegateEvents();
return this;
};
- RestingView.prototype.startTimer = function(seconds) {
- return $('#timer').startTimer({
- seconds: seconds,
- reset: false,
- show_in_title: true,
- buzzer: this.buzzer
+ NewNoteView.prototype.create = function(event) {
+ var color;
+ color = event.currentTarget.className.split(" ")[1];
+ return app.collections.notes.create({
+ color: color
});
};
- RestingView.prototype.buzzer = function() {
- var notification;
- app.audios.alarm.play();
- notification = webkitNotifications.createNotification('images/tomato_32.png', 'notification', 'resting is done!');
- notification.show();
- this.$(this.el).modal('hide');
- return app.routers.main.navigate('home', true);
- };
-
- RestingView.prototype.resetTimer = function() {
- $("#timer").clearTimer();
- this.$(this.el).modal('hide');
- return app.routers.main.navigate('home', true);
- };
-
- return RestingView;
+ return NewNoteView;
})(Backbone.View);
+
+}});
-}).call(this);
-
- }
-}));
-(this.require.define({
- "views/note_view": function(exports, require, module) {
- (function() {
+window.require.define({"views/note_view": function(exports, require, module) {
var noteTemplate,
- __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; };
+ __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; };
- noteTemplate = require('./templates/note');
+ noteTemplate = require('views/templates/note');
exports.NoteView = (function(_super) {
__extends(NoteView, _super);
function NoteView() {
- NoteView.__super__.constructor.apply(this, arguments);
+ return NoteView.__super__.constructor.apply(this, arguments);
}
NoteView.prototype.className = "note white";
NoteView.prototype.events = {
+ "mouseover": "mouseover",
+ "mouseout": "mouseout",
"focus textarea": "focus",
"blur textarea": "blur",
"keyup textarea": "updateContent",
@@ -13968,6 +13991,14 @@ i.rotate(null)}:function(){t=j.selected;n()});if(c){this.element.bind("tabsshow"
return this;
};
+ NoteView.prototype.mouseout = function(event) {
+ return this.$('.delete').hide();
+ };
+
+ NoteView.prototype.mouseover = function(event) {
+ return this.$('.delete').show();
+ };
+
NoteView.prototype.focus = function(event) {
if (event.currentTarget.value === 'click here to write') {
return event.currentTarget.value = '';
@@ -14023,593 +14054,804 @@ i.rotate(null)}:function(){t=j.selected;n()});if(c){this.element.bind("tabsshow"
return NoteView;
})(Backbone.View);
+
+}});
-}).call(this);
+window.require.define({"views/notes_view": function(exports, require, module) {
+ var NoteView, notesTemplate,
+ __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
+ __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; };
- }
-}));
-(this.require.define({
- "routers/main_router": function(exports, require, module) {
- (function() {
- 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; };
+ NoteView = require('views/note_view').NoteView;
- exports.MainRouter = (function(_super) {
+ notesTemplate = require('views/templates/notes');
- __extends(MainRouter, _super);
+ exports.NotesView = (function(_super) {
- function MainRouter() {
- MainRouter.__super__.constructor.apply(this, arguments);
+ __extends(NotesView, _super);
+
+ function NotesView() {
+ this.addAll = __bind(this.addAll, this);
+
+ this.addOne = __bind(this.addOne, this);
+ return NotesView.__super__.constructor.apply(this, arguments);
}
- MainRouter.prototype.routes = {
- "home": "home",
- "working": "working",
- "resting/:seconds": "resting",
- "stats": "stats"
+ NotesView.prototype.id = "notes";
+
+ NotesView.prototype.initialize = function() {
+ app.collections.notes.bind('add', this.addOne);
+ return app.collections.notes.bind('reset', this.addAll);
};
- MainRouter.prototype.home = function() {
- app.views.home.render();
- app.collections.notes.fetch();
- app.collections.columns.fetch();
- return app.collections.states.setCurrentStateName('home');
+ NotesView.prototype.render = function() {
+ $(this.el).html(notesTemplate());
+ return this;
};
- MainRouter.prototype.working = function() {
- app.views.working.render();
- app.views.working.startTimer(app.development === true ? 10 : 25 * 60);
- return app.collections.states.setCurrentStateName('working');
+ NotesView.prototype.addOne = function(note) {
+ var view;
+ view = new NoteView({
+ model: note
+ });
+ return $(this.el).append(view.render().el);
};
- MainRouter.prototype.resting = function(seconds) {
- app.views.resting.render();
- app.views.resting.startTimer(app.development === true ? 10 : parseInt(seconds));
- return app.collections.states.setCurrentStateName('resting/' + seconds);
+ NotesView.prototype.addAll = function() {
+ return app.collections.notes.each(this.addOne);
};
- MainRouter.prototype.stats = function() {
- app.collections.pomodoros.fetch();
- return app.views.stats.render();
+ return NotesView;
+
+ })(Backbone.View);
+
+}});
+
+window.require.define({"views/resting_view": function(exports, require, module) {
+ var timerTemplate,
+ __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
+ __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; };
+
+ timerTemplate = require('views/templates/timer');
+
+ exports.RestingView = (function(_super) {
+
+ __extends(RestingView, _super);
+
+ function RestingView() {
+ this.buzzer = __bind(this.buzzer, this);
+
+ this.startTimer = __bind(this.startTimer, this);
+ return RestingView.__super__.constructor.apply(this, arguments);
+ }
+
+ RestingView.prototype.el = "#modal";
+
+ RestingView.prototype.events = {
+ "click #cancel": "resetTimer"
};
- return MainRouter;
+ RestingView.prototype.render = function() {
+ this.$(this.el).html(timerTemplate({
+ title: "Resting"
+ }));
+ $('#hide').hide();
+ this.$(this.el).modal({
+ backdrop: 'static',
+ show: true
+ });
+ return this;
+ };
- })(Backbone.Router);
+ RestingView.prototype.startTimer = function(seconds) {
+ return $('#timer').startTimer({
+ seconds: seconds,
+ reset: false,
+ show_in_title: true,
+ buzzer: this.buzzer
+ });
+ };
-}).call(this);
+ RestingView.prototype.buzzer = function() {
+ var notification;
+ app.audios.alarm.play();
+ notification = webkitNotifications.createNotification('images/tomato_32.png', 'notification', 'resting is done!');
+ notification.show();
+ this.$(this.el).modal('hide');
+ return app.routers.main.navigate('home', true);
+ };
- }
-}));
-(this.require.define({
- "views/new_column_view": function(exports, require, module) {
- (function() {
- var newColumnTemplate,
- __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; };
+ RestingView.prototype.resetTimer = function() {
+ $("#timer").clearTimer();
+ this.$(this.el).modal('hide');
+ return app.routers.main.navigate('home', true);
+ };
- newColumnTemplate = require('./templates/new_column');
+ return RestingView;
- exports.NewColumnView = (function(_super) {
+ })(Backbone.View);
+
+}});
- __extends(NewColumnView, _super);
+window.require.define({"views/stats_view": function(exports, require, module) {
+ var statsTemplate,
+ __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
+ __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; };
- function NewColumnView() {
- NewColumnView.__super__.constructor.apply(this, arguments);
+ statsTemplate = require('views/templates/stats');
+
+ exports.StatsView = (function(_super) {
+
+ __extends(StatsView, _super);
+
+ function StatsView() {
+ this.close = __bind(this.close, this);
+ return StatsView.__super__.constructor.apply(this, arguments);
}
- NewColumnView.prototype.id = "new-column";
+ StatsView.prototype.el = "#modal";
- NewColumnView.prototype.events = {
- "click #add-column": "create"
+ StatsView.prototype.id = "stats";
+
+ StatsView.prototype.events = {
+ "click .close": "close"
+ };
+
+ StatsView.prototype.render = function() {
+ this.$(this.el).html(statsTemplate({
+ title: "Weekly Stats",
+ count: 0
+ }));
+ this.showStatsGraph();
+ this.$(this.el).modal({
+ backdrop: 'static',
+ show: true
+ });
+ return this;
+ };
+
+ StatsView.prototype.showStatsGraph = function() {
+ var chart, key, stats, value;
+ stats = this.getWeeklyStats();
+ return chart = new Highcharts.Chart({
+ chart: {
+ renderTo: "stats-graph",
+ defaultSeriesType: "column",
+ height: 400,
+ width: 560
+ },
+ title: {
+ text: ""
+ },
+ xAxis: {
+ categories: (function() {
+ var _results;
+ _results = [];
+ for (key in stats) {
+ _results.push(key);
+ }
+ return _results;
+ })(),
+ labels: {
+ formatter: function() {
+ return this.value.substr(5);
+ }
+ }
+ },
+ yAxis: {
+ title: ""
+ },
+ series: [
+ {
+ name: "number of pomodoros",
+ data: (function() {
+ var _results;
+ _results = [];
+ for (key in stats) {
+ value = stats[key];
+ _results.push(value);
+ }
+ return _results;
+ })()
+ }
+ ]
+ });
};
- NewColumnView.prototype.render = function() {
- this.$(this.el).html(newColumnTemplate());
- return this;
+ StatsView.prototype.getWeeklyStats = function() {
+ var date, i, pomodoros, stats, _i;
+ stats = {};
+ for (i = _i = 0; _i <= 6; i = ++_i) {
+ date = moment().day(i).format(app.settings.date_format);
+ pomodoros = app.collections.pomodoros.filter(function(pomodoro) {
+ return date === moment(parseInt(pomodoro.get('created_at'))).format(app.settings.date_format);
+ });
+ stats[date] = pomodoros.length;
+ }
+ return stats;
};
- NewColumnView.prototype.create = function() {
- return app.collections.columns.create({
- index: app.collections.columns.length
- });
+ StatsView.prototype.close = function() {
+ this.$(this.el).modal('hide');
+ return app.routers.main.navigate('home', true);
};
- return NewColumnView;
+ return StatsView;
})(Backbone.View);
+
+}});
-}).call(this);
-
- }
-}));
-(this.require.define({
- "views/templates/notes": function(exports, require, module) {
- module.exports = function(__obj) {
- var _safe = function(value) {
- if (typeof value === 'undefined' && value == null)
- value = '';
- var result = new String(value);
- result.ecoSafe = true;
- return result;
- };
- return (function() {
- var __out = [], __self = this, _print = function(value) {
- if (typeof value !== 'undefined' && value != null)
- __out.push(value.ecoSafe ? value : __self.escape(value));
- }, _capture = function(callback) {
+window.require.define({"views/templates/column": function(exports, require, module) {
+ module.exports = function (__obj) {
+ if (!__obj) __obj = {};
+ var __out = [], __capture = function(callback) {
var out = __out, result;
__out = [];
callback.call(this);
result = __out.join('');
__out = out;
- return _safe(result);
+ return __safe(result);
+ }, __sanitize = function(value) {
+ if (value && value.ecoSafe) {
+ return value;
+ } else if (typeof value !== 'undefined' && value != null) {
+ return __escape(value);
+ } else {
+ return '';
+ }
+ }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;
+ __safe = __obj.safe = function(value) {
+ if (value && value.ecoSafe) {
+ return value;
+ } else {
+ if (!(typeof value !== 'undefined' && value != null)) value = '';
+ var result = new String(value);
+ result.ecoSafe = true;
+ return result;
+ }
};
- (function() {
-
-
-
- }).call(this);
-
- return __out.join('');
- }).call((function() {
- var obj = {
- escape: function(value) {
+ if (!__escape) {
+ __escape = __obj.escape = function(value) {
return ('' + value)
.replace(/&/g, '&amp;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;');
- },
- safe: _safe
- }, key;
- for (key in __obj) obj[key] = __obj[key];
- return obj;
- })());
-};
+ };
+ }
+ (function() {
+ (function() {
+
+ __out.push('<div class="display">\n <h2>');
+
+ __out.push(__sanitize(this.column.title));
+
+ __out.push('<span class="column-destroy"></span></h2>\n</div>\n<div class="edit">\n <input class="title-input" type="text" value="');
+
+ __out.push(__sanitize(this.column.title));
+
+ __out.push('">\n</div>\n\n');
+
+ if (this.column.index > 0) {
+ __out.push('\n <div class="border-right"/>\n');
+ }
+
+ }).call(this);
+
+ }).call(__obj);
+ __obj.safe = __objSafe, __obj.escape = __escape;
+ return __out.join('');
}
-}));
-(this.require.define({
- "views/templates/home": function(exports, require, module) {
- module.exports = function(__obj) {
- var _safe = function(value) {
- if (typeof value === 'undefined' && value == null)
- value = '';
- var result = new String(value);
- result.ecoSafe = true;
- return result;
- };
- return (function() {
- var __out = [], __self = this, _print = function(value) {
- if (typeof value !== 'undefined' && value != null)
- __out.push(value.ecoSafe ? value : __self.escape(value));
- }, _capture = function(callback) {
+}});
+
+window.require.define({"views/templates/columns": function(exports, require, module) {
+ module.exports = function (__obj) {
+ if (!__obj) __obj = {};
+ var __out = [], __capture = function(callback) {
var out = __out, result;
__out = [];
callback.call(this);
result = __out.join('');
__out = out;
- return _safe(result);
+ return __safe(result);
+ }, __sanitize = function(value) {
+ if (value && value.ecoSafe) {
+ return value;
+ } else if (typeof value !== 'undefined' && value != null) {
+ return __escape(value);
+ } else {
+ return '';
+ }
+ }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;
+ __safe = __obj.safe = function(value) {
+ if (value && value.ecoSafe) {
+ return value;
+ } else {
+ if (!(typeof value !== 'undefined' && value != null)) value = '';
+ var result = new String(value);
+ result.ecoSafe = true;
+ return result;
+ }
};
- (function() {
-
-
-
- }).call(this);
-
- return __out.join('');
- }).call((function() {
- var obj = {
- escape: function(value) {
+ if (!__escape) {
+ __escape = __obj.escape = function(value) {
return ('' + value)
.replace(/&/g, '&amp;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;');
- },
- safe: _safe
- }, key;
- for (key in __obj) obj[key] = __obj[key];
- return obj;
- })());
-};
+ };
+ }
+ (function() {
+ (function() {
+
+
+
+ }).call(this);
+
+ }).call(__obj);
+ __obj.safe = __objSafe, __obj.escape = __escape;
+ return __out.join('');
}
-}));
-(this.require.define({
- "views/templates/new_column": function(exports, require, module) {
- module.exports = function(__obj) {
- var _safe = function(value) {
- if (typeof value === 'undefined' && value == null)
- value = '';
- var result = new String(value);
- result.ecoSafe = true;
- return result;
- };
- return (function() {
- var __out = [], __self = this, _print = function(value) {
- if (typeof value !== 'undefined' && value != null)
- __out.push(value.ecoSafe ? value : __self.escape(value));
- }, _capture = function(callback) {
+}});
+
+window.require.define({"views/templates/home": function(exports, require, module) {
+ module.exports = function (__obj) {
+ if (!__obj) __obj = {};
+ var __out = [], __capture = function(callback) {
var out = __out, result;
__out = [];
callback.call(this);
result = __out.join('');
__out = out;
- return _safe(result);
+ return __safe(result);
+ }, __sanitize = function(value) {
+ if (value && value.ecoSafe) {
+ return value;
+ } else if (typeof value !== 'undefined' && value != null) {
+ return __escape(value);
+ } else {
+ return '';
+ }
+ }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;
+ __safe = __obj.safe = function(value) {
+ if (value && value.ecoSafe) {
+ return value;
+ } else {
+ if (!(typeof value !== 'undefined' && value != null)) value = '';
+ var result = new String(value);
+ result.ecoSafe = true;
+ return result;
+ }
};
- (function() {
-
- _print(_safe('<a href="#">\n <button id="add-column" class="btn">Add column</button>\n</a>\n\n\n'));
-
- }).call(this);
-
- return __out.join('');
- }).call((function() {
- var obj = {
- escape: function(value) {
+ if (!__escape) {
+ __escape = __obj.escape = function(value) {
return ('' + value)
.replace(/&/g, '&amp;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;');
- },
- safe: _safe
- }, key;
- for (key in __obj) obj[key] = __obj[key];
- return obj;
- })());
-};
+ };
+ }
+ (function() {
+ (function() {
+
+
+
+ }).call(this);
+
+ }).call(__obj);
+ __obj.safe = __objSafe, __obj.escape = __escape;
+ return __out.join('');
}
-}));
-(this.require.define({
- "views/templates/note": function(exports, require, module) {
- module.exports = function(__obj) {
- var _safe = function(value) {
- if (typeof value === 'undefined' && value == null)
- value = '';
- var result = new String(value);
- result.ecoSafe = true;
- return result;
- };
- return (function() {