Initial work on help sections.
This commit is contained in:
@@ -75,7 +75,7 @@ Gollum.Formats = {
|
||||
org: {
|
||||
bold: Gollum.encloseStrategy('*', 'bold text', '*'),
|
||||
italic: Gollum.encloseStrategy('/', 'italic text', '/'),
|
||||
ul: Gollum.prefixStrategy('* ', 'Bullet list item', true),
|
||||
ul: Gollum.prefixStrategy('- ', 'Bullet list item', true),
|
||||
ol: Gollum.prefixStrategy('1. ', 'Numbered list item', true)
|
||||
},
|
||||
pod: {
|
||||
@@ -156,4 +156,26 @@ $(function(){
|
||||
$(this).addClass("open")
|
||||
}
|
||||
})
|
||||
|
||||
$('#guides .write select[name=format]').change(function() {
|
||||
var target = $('#editbar .sections .toc div.current').get(0)
|
||||
sectionItemClick.call(target)
|
||||
})
|
||||
|
||||
var sectionItemClick = function() {
|
||||
$('#editbar .sections .toc div').removeClass('current')
|
||||
$(this).addClass('current')
|
||||
$('#editbar .sections .page').removeClass('current')
|
||||
var classes = $(this).attr('class').split(' ')
|
||||
var name = classes[0]
|
||||
var format = $('#guides .write select[name=format] option:selected').attr('value')
|
||||
if (classes.indexOf('gollum') == -1) {
|
||||
$('#editbar .sections .page.' + name + '.' + format).addClass('current')
|
||||
} else {
|
||||
$('#editbar .sections .page.' + name).addClass('current')
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
$('#editbar .sections .toc div').click(sectionItemClick)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user