| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
Jquery 1.6+ requires use of prop instead of attr to manipulate checked state.
|
| |
|
|
|
|
| |
Checkbox editor was firing onCellChange event even when there was no change. This fixes that behavior and also returns a boolean on serialzeValue instead of the previous "checked" or undefined.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
- Split up formatters into a separate file.
- Moved both formatters and editors into Slick.Formatters.* and
Slick.Editors.* namespaces. Renamed some for clarity.
- Removed obscure unused formatters from old examples.
- Made the default formatter escape HTML since that seems to be the
more common expectation (issue #267).
|
| |
|
| |
|
|
|
|
|
| |
Added CellRangeSelector and refactored CellSelectionModel to make use of it.
Added a sample FormulaEditor cell editor that uses CellRangeSelector to let the user drag-select a range of cells and have them appended to the currently edited cell.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BREAKING Editor API changes:
- REMOVED: .saveValue(item) method
- ADDED: .serializeValue() method
- ADDED: .applyValue(item,serializedValue) method
These changes have been made to make the interface more flexible and to support functionality similar to what "setValueHandler" column option used to offer. This is especially useful for implementing remote edits using AJAX and undo/redo.
IMPORTANT: .applyValue(item,serializedValue) will be called after the editor is destroyed - treat this method as static
Grid changes:
- CHANGED: the grid now calls .loadValue(item) on the editor during construction so you no longer need to do it in the .init()
- ADDED: new "editCommandHandler" grid option: options.editCommandHandler(item,column,editCommand)
When specified, the handler will be called instead of immediately applying the changes. The client can the call editCommand.execute() to apply the changes.
editCommand:
row - the row of the cell that has been edited
cell - the column of the cell that has been edited
editor - cell editor
prevSerializedValue - the serialized value prior to user edit
serializedValue - the serialized value after the user edit
execute() - a delegate to apply the changes and update the row
undo() - a delegate to undo the changes and update the row
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The cell editor interface has been changed to allow for more flexible implementations.
Instead of working with a single value, the editors can now work on multiple fields at once. Formatters can already combine data from multiple fields into one cell; this enables us to write editors that can work with them. To migrate your existing editors, remove .getValue() and .setValue(value) methods and implement .loadValue(item) and .saveValue(item) (should be a trivial migration). The "value" property of the "args" param passed to the editor constructor has also been removed since it was error-prone. In most cases you can replace that by "args.item[args.column.field]".
One side-effect of this design change is that the "setValueHandler" column option is no longer supported. The same functionality can be implemented via a custom editor/wrapper, "onCellChange" event, or a combination of both.
The signature of "onAddNewRow" was also changed to take in an empty object to which the field value was saved via editor.saveValue({}), and a column definition.
- REMOVED: "setValueHandler" column option
- REMOVED: "value" property on cell editor "args"
- ADDED: example 3a to demonstrate compound cell editors
Other changes:
- FIXED: onValidationError being fired twice when autoEdit is on
- REMOVED: TaskNameCellEditor as it was not being used
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Cell editor interface has been changed!
Cell editors can now be attached to document body (or any other element) and not just the cell container. This lets us create editor controls that get outside of the grid boundary. The grid provides ways of updating editor position and visibility as the grid and any other scroll parents and scrolled. If the editor implements .position(box), .show() and hide(), those methods will be called whenever the position or visibility of the cell changes. The box parameter has top, left, right, bottom, width, height and visible properties. The position is calculated at a document body level taking into consideration all scroll and offset parents. Note that since the detached editors are no longer children of the edited cell, keyboard events will not bubble up, so make sure you handle things like Esc, Enter, Tab, etc. using the provided callbacks or grid methods.
Cell editors now recieve just one "args" param:
{
grid: a reference to SlickGrid instance,
gridPosition: a box with grid position and dimensions,
position: a box with edited cell position and dimensions,
container: edited cell,
column: column definition,
value: current cell value,
item: data context,
commitChanges: a callback to commit changes,
cancelChanges: a callback to cancel changes
}
Take a look at the new LongTextCellEditor for a sample implementation.
Other changes:
- ADDED: new methods - navigatePrev(), navigateNext(), navigateLeft(), navigateRight(), navigateUp(), navigateDown()
- FIXED: pressing Enter on a cell in read mode in autoEdit grid loads the editor for the next row
- FIXED: removeRows() and removeAllRows() now call fire onBeforeEditorDestroy event when removing a row with an active editor
- ADDED: LongTextCellEditor and autoEdit options to example #3
- FIXED: JS error on adding new rows in example #4
|
|
|
|
| |
Sample text cell editors now control which keys should not be propagated.
|
|
|
|
| |
self-executing function
|
|
|
|
| |
window
|
| |
|
|
|
|
|
| |
inside closure and remove remaining references to global jQuery inside
closures
|
|
|
|
| |
New drag handle image.
|
| |
|
| |
|
| |
|
|
|
|
| |
decimals and just rounds them.
|
|
|
|
|
|
|
|
|
| |
- Abortable JSONP requests.
- Better "buffering" indicator.
- Sorting support (Digg only supports sorting on diggs for the feed I'm using).
plus some other minor stuff.
|
| |
|
| |
|
|
|
|
| |
Some performance optimizations in the rendering function; needs more work.
|
| |
|
|
|