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