mirror of
https://github.com/redmine/redmine.git
synced 2025-11-14 09:16:02 +01:00
Toolbar button to insert a table (#1575).
Patch by Mizuki ISHIKAWA and Hiroyuki ENDO. git-svn-id: http://svn.redmine.org/redmine/trunk@19561 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -170,6 +170,24 @@ jsToolBar.prototype.elements.unbq = {
|
||||
}
|
||||
}
|
||||
|
||||
// table
|
||||
jsToolBar.prototype.elements.table = {
|
||||
type: 'button',
|
||||
title: 'Table',
|
||||
fn: {
|
||||
wiki: function() {
|
||||
var This = this;
|
||||
this.tableMenu(function(cols, rowCount){
|
||||
This.encloseLineSelection(
|
||||
'|'+cols.join(' |')+' |\n' + // header
|
||||
Array(cols.length+1).join('|--')+'|\n' + // second line
|
||||
Array(rowCount+1).join(Array(cols.length+1).join('| ')+'|\n') // cells
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// pre
|
||||
jsToolBar.prototype.elements.pre = {
|
||||
type: 'button',
|
||||
|
||||
Reference in New Issue
Block a user