]> git.za3k.com Git - flowy.git/commitdiff
Show/hide completed
authorZachary Vance <vanceza@gmail.com>
Wed, 3 Jun 2015 23:15:58 +0000 (16:15 -0700)
committerZachary Vance <vanceza@gmail.com>
Wed, 3 Jun 2015 23:15:58 +0000 (16:15 -0700)
README.md
dist/flowy.js
dist/flowy.unwrapped.js
src/README.md [new file with mode: 0644]
src/views/app.js
src/views/testTodos.js [new file with mode: 0644]

index 9dac6a91f15dc8f126da0f239594826104948427..2a002c1b8dad9073e1f9ca573ca9aea2074c19e4 100644 (file)
--- a/README.md
+++ b/README.md
@@ -24,3 +24,5 @@ Differences from workflowy:
 - Single-user (one pad only, no sharing, no simultaneous editing)
 - No authentication
 - No stars
+
+Special thanks to [hackflowy](https://github.com/abhshkdz/HackFlowy) and [vimflowy](https://github.com/WuTheFWasThat/vimflowy) for speeding up development.
index 5594612e3666f7edeed48614941376279241cfbc..52463c0a3afc7c351b307eab49442d1e25e52749 100644 (file)
@@ -998,13 +998,6 @@ var FlowyDocModel = Backbone.Collection.extend({
     comparator: 'id',
 });
 
-/**
- * @depend ../views/todo.js
- * @depend ../models/flowyDoc.js
- * @depend ../models/todo.js
- * @depend ../library/viewShortcuts.js
- */
-
 var testTodos = [
     new TodoModel({
         parent: null,
@@ -1055,8 +1048,18 @@ var testTodos = [
     }),
 ];
 
+
+/**
+ * @depend ../views/todo.js
+ * @depend ../models/flowyDoc.js
+ * @depend ../models/todo.js
+ * @depend ../library/viewShortcuts.js
+ * @depend ../views/testTodos.js
+ */
+
 var todos = new FlowyDocModel({
-rootId: 0});
+    rootId: 0
+});
 
 var appDefaults = { list: todos };
 var AppView = Backbone.View.extend({
@@ -1064,7 +1067,7 @@ var AppView = Backbone.View.extend({
     shortcutObject: "global",
     events: {
         'Shortcut("toggleShortcuts", "Keyboard Shortcuts", "ctrl+shift+/") > .text': 'toggleShortcuts',
-        'Shortcut("toggleShowCompleted", "Not Done - Show/hide completed", "ctrl+o") > .text': 'toggleShowCompleted',
+        'Shortcut("toggleShowCompleted", "Show/hide completed", "ctrl+o") > .text': 'toggleShowCompleted',
         'Shortcut("search", "Not Done - Search", "esc") > .text': 'search',
     },
     initialize: function(options) {
@@ -1108,9 +1111,11 @@ var AppView = Backbone.View.extend({
     },
     toggleShortcuts: function() {
         this.$(".shortcuts").toggle();
+        return false;
     },
     toggleShowCompleted: function() {
-        console.log("Toggling show/hide not yet implemented"); // TODO
+        this.$(".completed").toggle();
+        return false;
     },
     search: function() {
         console.log("Search not yet implemented"); // TODO
index ae7f1810833a4d20dec5c6d1557ce453bc64f3d6..e6babb8be037631332b1eb786103bdd25fb33466 100644 (file)
@@ -997,13 +997,6 @@ var FlowyDocModel = Backbone.Collection.extend({
     comparator: 'id',
 });
 
-/**
- * @depend ../views/todo.js
- * @depend ../models/flowyDoc.js
- * @depend ../models/todo.js
- * @depend ../library/viewShortcuts.js
- */
-
 var testTodos = [
     new TodoModel({
         parent: null,
@@ -1054,8 +1047,18 @@ var testTodos = [
     }),
 ];
 
+
+/**
+ * @depend ../views/todo.js
+ * @depend ../models/flowyDoc.js
+ * @depend ../models/todo.js
+ * @depend ../library/viewShortcuts.js
+ * @depend ../views/testTodos.js
+ */
+
 var todos = new FlowyDocModel({
-rootId: 0});
+    rootId: 0
+});
 
 var appDefaults = { list: todos };
 var AppView = Backbone.View.extend({
@@ -1063,7 +1066,7 @@ var AppView = Backbone.View.extend({
     shortcutObject: "global",
     events: {
         'Shortcut("toggleShortcuts", "Keyboard Shortcuts", "ctrl+shift+/") > .text': 'toggleShortcuts',
-        'Shortcut("toggleShowCompleted", "Not Done - Show/hide completed", "ctrl+o") > .text': 'toggleShowCompleted',
+        'Shortcut("toggleShowCompleted", "Show/hide completed", "ctrl+o") > .text': 'toggleShowCompleted',
         'Shortcut("search", "Not Done - Search", "esc") > .text': 'search',
     },
     initialize: function(options) {
@@ -1107,9 +1110,11 @@ var AppView = Backbone.View.extend({
     },
     toggleShortcuts: function() {
         this.$(".shortcuts").toggle();
+        return false;
     },
     toggleShowCompleted: function() {
-        console.log("Toggling show/hide not yet implemented"); // TODO
+        this.$(".completed").toggle();
+        return false;
     },
     search: function() {
         console.log("Search not yet implemented"); // TODO
diff --git a/src/README.md b/src/README.md
new file mode 100644 (file)
index 0000000..3e40e1a
--- /dev/null
@@ -0,0 +1,34 @@
+Flowy
+---
+A reverse-engineered workflowy clone. In pre-alpha. 
+
+Demo at: https://za3k.com/~flowy
+
+Features:
+
+- Keyboard Shortcuts
+    - Reference display
+    - User-reconfigurable and persisted
+- Hierarchical to-do list
+    - Zoom in and out
+    - Indent / Outdent
+    - Move todos up and down using the keyboard
+    - Drag and drog todos to any location
+    - Collapse/expand todos
+    - Lazily loaded so Flowy can support any list size
+- Undo/redo support
+    - Infinite undo/redo since browser session started
+- Full-text search
+- Settings
+    - Show/hide keyboard shortcuts
+    - Show/hide completed items
+    - Offline mode (local storage)
+- Import/export
+    - Workflowy-compatible for migrations to and from
+    - HTML (to paste elsewhere)
+    - Plain text
+- Autosaving
+
+Features workflowy has that flowy will not:
+
+    - Flowy is single user with no authentication
index 1fca40c735487cc6f287b2f408ec0af13fa52897..ebbd4a2a9e7cbf09d5817bd58c7d0d07e794e6e0 100644 (file)
@@ -3,60 +3,12 @@
  * @depend ../models/flowyDoc.js
  * @depend ../models/todo.js
  * @depend ../library/viewShortcuts.js
+ * @depend ../views/testTodos.js
  */
 
-var testTodos = [
-    new TodoModel({
-        parent: null,
-        id: 0,
-        text: "Root (will be invisible in final, DO NOT EDIT)",
-        bullets: [1, 5],
-    }),
-    new TodoModel({
-        parent: 0,
-        id: 1,
-        text: "Daily todos",
-        bullets: [2,3,4],
-    }),
-    new TodoModel({
-        parent: 1,
-        id: 2,
-        text: "Shave",
-        completed: true
-    }),
-    new TodoModel({
-        parent: 1,
-        id: 3,
-        text: "Check t-mail",
-        completed: true
-    }),
-    new TodoModel({
-        parent: 1,
-        id: 4,
-        text: "Eat green eggs and ham",
-    }),
-    new TodoModel({
-        parent: 0,
-        id: 5,
-        text: "To do this year",
-        collapsed: false,
-        bullets: [6],
-    }),
-    new TodoModel({
-        parent: 5,
-        id: 6,
-        text: "Save the world",
-        bullets: [7],
-    }),
-    new TodoModel({
-        parent: 6,
-        id: 7,
-        text: "Save California",
-    }),
-];
-
 var todos = new FlowyDocModel({
-rootId: 0});
+    rootId: 0
+});
 
 var appDefaults = { list: todos };
 var AppView = Backbone.View.extend({
@@ -64,7 +16,7 @@ var AppView = Backbone.View.extend({
     shortcutObject: "global",
     events: {
         'Shortcut("toggleShortcuts", "Keyboard Shortcuts", "ctrl+shift+/") > .text': 'toggleShortcuts',
-        'Shortcut("toggleShowCompleted", "Not Done - Show/hide completed", "ctrl+o") > .text': 'toggleShowCompleted',
+        'Shortcut("toggleShowCompleted", "Show/hide completed", "ctrl+o") > .text': 'toggleShowCompleted',
         'Shortcut("search", "Not Done - Search", "esc") > .text': 'search',
     },
     initialize: function(options) {
@@ -108,9 +60,11 @@ var AppView = Backbone.View.extend({
     },
     toggleShortcuts: function() {
         this.$(".shortcuts").toggle();
+        return false;
     },
     toggleShowCompleted: function() {
-        console.log("Toggling show/hide not yet implemented"); // TODO
+        this.$(".completed").toggle();
+        return false;
     },
     search: function() {
         console.log("Search not yet implemented"); // TODO
diff --git a/src/views/testTodos.js b/src/views/testTodos.js
new file mode 100644 (file)
index 0000000..cf04c4f
--- /dev/null
@@ -0,0 +1,50 @@
+var testTodos = [
+    new TodoModel({
+        parent: null,
+        id: 0,
+        text: "Root (will be invisible in final, DO NOT EDIT)",
+        bullets: [1, 5],
+    }),
+    new TodoModel({
+        parent: 0,
+        id: 1,
+        text: "Daily todos",
+        bullets: [2,3,4],
+    }),
+    new TodoModel({
+        parent: 1,
+        id: 2,
+        text: "Shave",
+        completed: true
+    }),
+    new TodoModel({
+        parent: 1,
+        id: 3,
+        text: "Check t-mail",
+        completed: true
+    }),
+    new TodoModel({
+        parent: 1,
+        id: 4,
+        text: "Eat green eggs and ham",
+    }),
+    new TodoModel({
+        parent: 0,
+        id: 5,
+        text: "To do this year",
+        collapsed: false,
+        bullets: [6],
+    }),
+    new TodoModel({
+        parent: 5,
+        id: 6,
+        text: "Save the world",
+        bullets: [7],
+    }),
+    new TodoModel({
+        parent: 6,
+        id: 7,
+        text: "Save California",
+    }),
+];
+