body {
background: #f9f9fa;
}
+.page {
+ width: 80%;
+ margin-left: auto;
+ margin-right: auto;
+ max-width: 700px;
+ border: 1px solid #ccc;
+ padding-top: 60px;
+ padding-bottom: 10px;
+ padding-right: 60px;
+ padding-left: 60px;
+ background: #ffffff;
+}
.todo > .text {
font-size: 20pt;
margin-top: 5px;
}
#todo-list {
width: 80%;
- margin: auto;
- max-width: 600px;
- border: 1px solid #ccc;
- padding-top: 60px;
- padding-bottom: 10px;
- background: #ffffff;
}
.with-dropshadow {
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}
.shortcuts .description {
background-color: #efefef;
- max-width: 80px;
- padding: 0 0 0 7px;
-}
-.shortcuts .keybinding {
- padding: 0 0 0 7px;
+ max-width: 70px;
}
.shortcuts td {
+ padding: 10px;
border-top: 0;
border-bottom: 1px solid #aaa;
}
allowRebind: false, // Insert javascript to allow rebinding shortcuts
highlightRepeats: true, // Warn about shortcuts which are bound to multiple actions (if user can remap shortcuts) // TODO
shortcuts: _.sortBy(this.shortcuts, 'description'),
+ noDisplay: [], // ids not to display
includeElement: true,
});
+ options.shortcuts = _.reject(options.shortcuts, function(shortcut) { return _.contains(options.noDisplay, shortcut.id); } );
if (options.objectGrouping === "default") {
var multipleObjectTypes = _.chain(options.shortcuts).pluck('object').unique().size().value() > 1;
options.objectGrouping = multipleObjectTypes;
"input > .text": "textChange",
"blur > .text": "render", // Because the model shouldn't update the view during active editing, add a re-render at the end
"keydown > .text": "keydown",
- 'Shortcut("toggleComplete", "Mark an item as complete or not", "ctrl+enter") > .text': "toggleComplete",
+ 'Shortcut("toggleComplete", "Complete", "ctrl+enter") > .text': "toggleComplete",
'Shortcut("backspace", "Combine an item with the previous item", "backspace") > .text': "backspace",
'Shortcut("delete", "Combine an item with the next item", "del") > .text': "delete",
+ //'Shortcut("next", "Next", "down") > .text': 'next',
+ //'Shortcut("previous", "Previous", "previous") > .text': 'previous',
+
},
initialize: function() {
this.childViewPositions = [];
e.save();
});
});
- Shortcut.bindShortcutsDisplay(this.$("#shortcuts-wrapper")[0], {allowRebind: true});
+ Shortcut.bindShortcutsDisplay(this.$("#shortcuts-wrapper")[0], {allowRebind: true, noDisplay: ['backspace', 'delete'] });
this.views = {}; // A list of views for each element in the collection
this.list.fetch();
this.render();
allowRebind: false, // Insert javascript to allow rebinding shortcuts
highlightRepeats: true, // Warn about shortcuts which are bound to multiple actions (if user can remap shortcuts) // TODO
shortcuts: _.sortBy(this.shortcuts, 'description'),
+ noDisplay: [], // ids not to display
includeElement: true,
});
+ options.shortcuts = _.reject(options.shortcuts, function(shortcut) { return _.contains(options.noDisplay, shortcut.id); } );
if (options.objectGrouping === "default") {
var multipleObjectTypes = _.chain(options.shortcuts).pluck('object').unique().size().value() > 1;
options.objectGrouping = multipleObjectTypes;
"input > .text": "textChange",
"blur > .text": "render", // Because the model shouldn't update the view during active editing, add a re-render at the end
"keydown > .text": "keydown",
- 'Shortcut("toggleComplete", "Mark an item as complete or not", "ctrl+enter") > .text': "toggleComplete",
+ 'Shortcut("toggleComplete", "Complete", "ctrl+enter") > .text': "toggleComplete",
'Shortcut("backspace", "Combine an item with the previous item", "backspace") > .text': "backspace",
'Shortcut("delete", "Combine an item with the next item", "del") > .text': "delete",
+ //'Shortcut("next", "Next", "down") > .text': 'next',
+ //'Shortcut("previous", "Previous", "previous") > .text': 'previous',
+
},
initialize: function() {
this.childViewPositions = [];
e.save();
});
});
- Shortcut.bindShortcutsDisplay(this.$("#shortcuts-wrapper")[0], {allowRebind: true});
+ Shortcut.bindShortcutsDisplay(this.$("#shortcuts-wrapper")[0], {allowRebind: true, noDisplay: ['backspace', 'delete'] });
this.views = {}; // A list of views for each element in the collection
this.list.fetch();
this.render();
</head>
<body>
<div id="todo-app">
- <div id="todo-list">
+ <div class="page">
+ <div id="todo-list">
+ </div>
</div>
<button id="reset-button">Initial setup / Reset</button>
<div id="shortcuts-wrapper">
background: #f9f9fa;
}
+.page {
+ width: 80%;
+ margin-left: auto;
+ margin-right: auto;
+ max-width: 700px;
+ border: 1px solid #ccc;
+ padding-top: 60px;
+ padding-bottom: 10px;
+ padding-right: 60px;
+ padding-left: 60px;
+ background: #ffffff;
+}
+
.todo > .text {
font-size: 20pt;
margin-top: 5px;
#todo-list {
width: 80%;
- margin: auto;
- max-width: 600px;
- border: 1px solid #ccc;
- padding-top: 60px;
- padding-bottom: 10px;
- background: #ffffff;
}
.with-dropshadow {
width: 100%;
.description {
background-color: #efefef;
- max-width: 80px;
- padding: 0 0 0 7px;
+ max-width: 70px;
}
.keybinding {
- padding: 0 0 0 7px;
}
td {
+ padding: 10px;
border-top: 0;
border-bottom: 1px solid #aaa;
}
</head>
<body>
<div id="todo-app">
- <div id="todo-list">
+ <div class="page">
+ <div id="todo-list">
+ </div>
</div>
<button id="reset-button">Initial setup / Reset</button>
<div id="shortcuts-wrapper">
allowRebind: false, // Insert javascript to allow rebinding shortcuts
highlightRepeats: true, // Warn about shortcuts which are bound to multiple actions (if user can remap shortcuts) // TODO
shortcuts: _.sortBy(this.shortcuts, 'description'),
+ noDisplay: [], // ids not to display
includeElement: true,
});
+ options.shortcuts = _.reject(options.shortcuts, function(shortcut) { return _.contains(options.noDisplay, shortcut.id); } );
if (options.objectGrouping === "default") {
var multipleObjectTypes = _.chain(options.shortcuts).pluck('object').unique().size().value() > 1;
options.objectGrouping = multipleObjectTypes;
e.save();
});
});
- Shortcut.bindShortcutsDisplay(this.$("#shortcuts-wrapper")[0], {allowRebind: true});
+ Shortcut.bindShortcutsDisplay(this.$("#shortcuts-wrapper")[0], {allowRebind: true, noDisplay: ['backspace', 'delete'] });
this.views = {}; // A list of views for each element in the collection
this.list.fetch();
this.render();
"input > .text": "textChange",
"blur > .text": "render", // Because the model shouldn't update the view during active editing, add a re-render at the end
"keydown > .text": "keydown",
- 'Shortcut("toggleComplete", "Mark an item as complete or not", "ctrl+enter") > .text': "toggleComplete",
+ 'Shortcut("toggleComplete", "Complete", "ctrl+enter") > .text': "toggleComplete",
'Shortcut("backspace", "Combine an item with the previous item", "backspace") > .text': "backspace",
'Shortcut("delete", "Combine an item with the next item", "del") > .text': "delete",
+ //'Shortcut("next", "Next", "down") > .text': 'next',
+ //'Shortcut("previous", "Previous", "previous") > .text': 'previous',
+
},
initialize: function() {
this.childViewPositions = [];