Support textareas in backgrid.
parent
41805d40b5
commit
3df180831f
|
@ -790,3 +790,12 @@ td.edit-cell.editable.sortable.renderable.editor {
|
||||||
position: relative;
|
position: relative;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.backgrid .textarea-cell {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.backgrid .textarea-cell.editor textarea {
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
}
|
|
@ -413,6 +413,37 @@
|
||||||
model.set(column.get("name"), this.$select.val());
|
model.set(column.get("name"), this.$select.val());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
TextareaCellEditor the cell editor renders a textarea multi-line text input
|
||||||
|
box as its editor.
|
||||||
|
|
||||||
|
@class Backgrid.TextareaCellEditor
|
||||||
|
@extends Backgrid.InputCellEditor
|
||||||
|
*/
|
||||||
|
var TextareaCellEditor = Backgrid.TextareaCellEditor = Backgrid.InputCellEditor.extend({
|
||||||
|
/** @property */
|
||||||
|
tagName: "textarea",
|
||||||
|
|
||||||
|
events: {
|
||||||
|
"blur": "saveOrCancel",
|
||||||
|
"keydown": ""
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
TextareaCell displays multiline HTML strings.
|
||||||
|
|
||||||
|
@class Backgrid.Extension.TextareaCell
|
||||||
|
@extends Backgrid.Cell
|
||||||
|
*/
|
||||||
|
var TextareaCell = Backgrid.Extension.TextareaCell = Backgrid.Cell.extend({
|
||||||
|
/** @property */
|
||||||
|
className: "textarea-cell",
|
||||||
|
|
||||||
|
editor: TextareaCellEditor
|
||||||
|
});
|
||||||
|
|
||||||
return Backgrid;
|
return Backgrid;
|
||||||
|
|
||||||
}));
|
}));
|
||||||
|
|
Loading…
Reference in New Issue