1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-23 14:41:44 +00:00

add edit modal & fix some features

This commit is contained in:
Rokt33r
2015-05-30 14:06:40 +09:00
parent b8e10f320d
commit 6cf723eabe
20 changed files with 241 additions and 770 deletions

View File

@@ -0,0 +1,18 @@
angular.module('codexen.directives')
.directive('btnEditSnippet', function (editSnippetModal, $rootScope) {
return {
scope:{
snippet: '=btnEditSnippet'
},
link: function (scope, el) {
el.on('click', function () {
editSnippetModal.open(scope.snippet)
.result.then(function (snippet) {
$rootScope.$broadcast('snippetUpdated', snippet)
}, function () {
console.log('edit snippet modal dismissed')
})
})
}
}
})