Major revision of comment system.
- Comments are stored in HTML as well as Markdown, so that conversion only happens when saving (rather than when viewing). - Added 'markdown' Jinja filter for easy development. This is quite a heavy filter, so it shouldn't be used (much) in production. - Added CLI command to update schemas on existing node types.
This commit is contained in:
42
src/scripts/tutti/6_jquery_extensions.js
Normal file
42
src/scripts/tutti/6_jquery_extensions.js
Normal file
@@ -0,0 +1,42 @@
|
||||
(function ( $ ) {
|
||||
$.fn.flashOnce = function() {
|
||||
var target = this;
|
||||
this
|
||||
.addClass('flash-on')
|
||||
.delay(1000) // this delay is linked to the transition in the flash-on CSS class.
|
||||
.queue(function() {
|
||||
target
|
||||
.removeClass('flash-on')
|
||||
.addClass('flash-off')
|
||||
.dequeue()
|
||||
;})
|
||||
.delay(1000) // this delay is just to clean up the flash-X classes.
|
||||
.queue(function() {
|
||||
target
|
||||
.removeClass('flash-on flash-off')
|
||||
.dequeue()
|
||||
;})
|
||||
;
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Fades out the element, then erases its contents and shows the now-empty element again.
|
||||
*/
|
||||
$.fn.fadeOutAndClear = function(fade_speed) {
|
||||
var target = this;
|
||||
this
|
||||
.fadeOut(fade_speed, function() {
|
||||
target
|
||||
.html('')
|
||||
.show();
|
||||
});
|
||||
}
|
||||
|
||||
$.fn.scrollHere = function(scroll_duration_msec) {
|
||||
$('html, body').animate({
|
||||
scrollTop: this.offset().top
|
||||
}, scroll_duration_msec);
|
||||
}
|
||||
|
||||
}(jQuery));
|
Reference in New Issue
Block a user