first commit
This commit is contained in:
commit
8e0c8a1497
8 changed files with 380 additions and 0 deletions
32
it.to.work/marked-posts.js
Normal file
32
it.to.work/marked-posts.js
Normal file
|
@ -0,0 +1,32 @@
|
|||
// mark posts with dbl-click
|
||||
// $('ol').delegate('a', 'click dblclick', function(e) {
|
||||
// e.stopPropagation();
|
||||
// }).delegate('li', 'dblclick', function(e) {
|
||||
// $(this).toggleClass('marked');
|
||||
// });
|
||||
|
||||
/*
|
||||
//Mark posts with a double click
|
||||
$('ol').on('dblclick', 'li:not(a)', function(e) {
|
||||
//Deselect this post as the intention was to mark it
|
||||
$(this).removeClass('selected');
|
||||
$(this).toggleClass('marked'); //Mark this post only
|
||||
});
|
||||
*/
|
||||
|
||||
//(Un)Mark posts with a double click
|
||||
define(['module', 'jquery'], function(myself, $) {
|
||||
return new function() {
|
||||
|
||||
//include css file
|
||||
$('<link/>', {
|
||||
rel: 'stylesheet',
|
||||
type: 'text/css',
|
||||
href: myself.uri.replace(/.js$/, '.css')
|
||||
}).appendTo('head');
|
||||
|
||||
$('ol').on('dblclick', 'li:not(a)', function(e) {
|
||||
$(this).toggleClass('marked'); //Mark this post only
|
||||
});
|
||||
};
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue