Start add-new-snipt

master
Nick Sergeant 2012-04-07 23:43:11 -04:00
parent 634485e654
commit cba3c1b0d5
1 changed files with 10 additions and 0 deletions

View File

@ -282,6 +282,8 @@
initialize: function(opts) {
var that = this;
opts.snipts.each(this.addExistingSnipt);
this.keyboardShortcuts();
@ -295,6 +297,11 @@
cmd = 'Ctrl';
}
$('span.cmd-ctrl').text(cmd);
// This should probably be handled more traditionally.
$('button#add-snipt').click(function() {
that.addNewSnipt();
});
},
addExistingSnipt: function() {
@ -346,6 +353,9 @@
model: new Snipt.SniptModel(data)
});
},
addNewSnipt: function() {
return false;
},
escapeUI: function(destroyed) {
if (window.editing) {
if (!window.site.$html.hasClass('detail')) {