mirror of
https://github.com/flynx/pWiki.git
synced 2025-12-17 00:21:40 +00:00
tweaks...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
1a2d9dda6a
commit
697c249757
2
bootstrap.js
vendored
2
bootstrap.js
vendored
File diff suppressed because one or more lines are too long
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
<h1 saveto="..">
|
<h1 saveto="..">
|
||||||
<slot name="title">@source(../title)</slot>
|
<slot name="title" class="title">@source(../title)</slot>
|
||||||
</h1>
|
</h1>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
|||||||
9
wiki.js
9
wiki.js
@ -417,6 +417,12 @@ var macro = {
|
|||||||
return elem
|
return elem
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Setup the page title and .title element...
|
||||||
|
//
|
||||||
|
// Use the text from:
|
||||||
|
// 1) set it H1 if it is the first tag in .text
|
||||||
|
// 2) set it to .location
|
||||||
|
//
|
||||||
title: function(context, elem){
|
title: function(context, elem){
|
||||||
elem = $(elem)
|
elem = $(elem)
|
||||||
var title = elem.find('.text h1').first()
|
var title = elem.find('.text h1').first()
|
||||||
@ -424,7 +430,7 @@ var macro = {
|
|||||||
// show first H1 as title...
|
// show first H1 as title...
|
||||||
if(elem.find('.text').text().trim().indexOf(title.text().trim()) == 0){
|
if(elem.find('.text').text().trim().indexOf(title.text().trim()) == 0){
|
||||||
title.detach()
|
title.detach()
|
||||||
elem.find('slot[name="title"]').html(title.html())
|
elem.find('.title').html(title.html())
|
||||||
$('title').html(title.text())
|
$('title').html(title.text())
|
||||||
|
|
||||||
// show location...
|
// show location...
|
||||||
@ -437,6 +443,7 @@ var macro = {
|
|||||||
// XXX this needs save/reload...
|
// XXX this needs save/reload...
|
||||||
editor: function(context, elem){
|
editor: function(context, elem){
|
||||||
// XXX title
|
// XXX title
|
||||||
|
// - on focus set it to .title
|
||||||
// XXX text
|
// XXX text
|
||||||
// XXX raw
|
// XXX raw
|
||||||
// XXX checkbox
|
// XXX checkbox
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user