mirror of
https://github.com/redmine/redmine.git
synced 2025-11-17 02:30:56 +01:00
wiki:
* added "Heading" and "Inline quote" buttons to the toolbar * changed "Link" button behaviour (now produces [[Link]]) * added a simple help on text formatting git-svn-id: http://redmine.rubyforge.org/svn/trunk@327 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -346,13 +346,13 @@ jsToolBar.prototype.elements.del = {
|
||||
}
|
||||
|
||||
// quote
|
||||
//jsToolBar.prototype.elements.quote = {
|
||||
// type: 'button',
|
||||
// title: 'Inline quote',
|
||||
// fn: {
|
||||
// wiki: function() { this.singleTag('{{','}}') }
|
||||
// }
|
||||
//}
|
||||
jsToolBar.prototype.elements.quote = {
|
||||
type: 'button',
|
||||
title: 'Inline quote',
|
||||
fn: {
|
||||
wiki: function() { this.singleTag('??') }
|
||||
}
|
||||
}
|
||||
|
||||
// code
|
||||
jsToolBar.prototype.elements.code = {
|
||||
@@ -364,7 +364,21 @@ jsToolBar.prototype.elements.code = {
|
||||
}
|
||||
|
||||
// spacer
|
||||
//jsToolBar.prototype.elements.space1 = {type: 'space'}
|
||||
jsToolBar.prototype.elements.space1 = {type: 'space'}
|
||||
|
||||
// heading
|
||||
jsToolBar.prototype.elements.heading = {
|
||||
type: 'button',
|
||||
title: 'Heading',
|
||||
fn: {
|
||||
wiki: function() {
|
||||
this.encloseSelection('','',function(str) {
|
||||
str = str.replace(/\r/g,'');
|
||||
return 'h2. '+str.replace(/\n/g,"\n* ");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// br
|
||||
//jsToolBar.prototype.elements.br = {
|
||||
@@ -410,6 +424,7 @@ jsToolBar.prototype.elements.ol = {
|
||||
jsToolBar.prototype.elements.space3 = {type: 'space'}
|
||||
|
||||
// link
|
||||
/*
|
||||
jsToolBar.prototype.elements.link = {
|
||||
type: 'button',
|
||||
title: 'Link',
|
||||
@@ -438,3 +453,12 @@ jsToolBar.prototype.elements.link.fn.wiki = function() {
|
||||
this.encloseSelection(stag,etag);
|
||||
}
|
||||
};
|
||||
*/
|
||||
// link or wiki page
|
||||
jsToolBar.prototype.elements.link = {
|
||||
type: 'button',
|
||||
title: 'Link',
|
||||
fn: {
|
||||
wiki: function() { this.encloseSelection("[[", "]]") }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user