Permalink
Browse files

More cleanup.

1 parent 061ac59 commit b92ba76a5124d09880455fef5a488c2bab2aee9e @mleibman committed with Michael Leibman Jan 17, 2012
Showing with 1,200 additions and 1,252 deletions.
  1. +14 −14 examples/example-checkbox-row-select.html
  2. +24 −26 examples/example-colspan.html
  3. +32 −38 examples/example-composite-editor-item-details.html
  4. +12 −15 examples/example-custom-column-value-extractor.html
  5. +63 −69 examples/example-grouping.html
  6. +13 −14 examples/example-header-row.html
  7. +18 −20 examples/example-optimizing-dataview.html
  8. +23 −23 examples/example-spreadsheet.html
  9. +11 −13 examples/example1-simple.html
  10. +19 −23 examples/example10-async-post-render.html
  11. +23 −24 examples/example11-autoheight.html
  12. +43 −44 examples/example12-fillbrowser.html
  13. +18 −21 examples/example13-getItem-sorting.html
  14. +14 −16 examples/example14-highlighting.html
  15. +12 −12 examples/example2-formatters.html
  16. +17 −17 examples/example3-editing.html
  17. +17 −18 examples/example3a-compound-editors.html
  18. +19 −21 examples/example3b-editing-with-undo.html
  19. +33 −33 examples/example4-model.html
  20. +167 −170 examples/example5-collapsing.html
  21. +19 −20 examples/example6-ajax-loading.html
  22. +12 −13 examples/example7-events.html
  23. +26 −31 examples/example8-alternative-display.html
  24. +67 −71 examples/example9-row-reordering.html
  25. +23 −23 examples/slick.compositeeditor.js
  26. +5 −5 plugins/slick.autotooltips.js
  27. +11 −11 plugins/slick.cellcopymanager.js
  28. +12 −12 plugins/slick.cellrangedecorator.js
  29. +10 −10 plugins/slick.cellrangeselector.js
  30. +10 −10 plugins/slick.cellselectionmodel.js
  31. +18 −18 plugins/slick.checkboxselectcolumn.js
  32. +10 −10 plugins/slick.rowmovemanager.js
  33. +10 −10 plugins/slick.rowselectionmodel.js
  34. +12 −12 slick.core.js
  35. +51 −53 slick.dataview.js
  36. +45 −45 slick.editors.js
  37. +221 −221 slick.grid.js
  38. +28 −28 slick.groupitemmetadataprovider.js
  39. +18 −18 slick.remotemodel.js
@@ -2,9 +2,9 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <link rel="stylesheet" href="../slick.grid.css" type="text/css" />
- <link rel="stylesheet" href="../css/smoothness/jquery-ui-1.8.16.custom.css" type="text/css" />
- <link rel="stylesheet" href="examples.css" type="text/css" />
+ <link rel="stylesheet" href="../slick.grid.css" type="text/css"/>
+ <link rel="stylesheet" href="../css/smoothness/jquery-ui-1.8.16.custom.css" type="text/css"/>
+ <link rel="stylesheet" href="examples.css" type="text/css"/>
<style>
.slick-cell-checkboxsel {
background: #f0f0f0;
@@ -48,10 +48,10 @@
var grid;
var data = [];
var options = {
- editable:true,
- enableCellNavigation:true,
- asyncEditorLoading:false,
- autoEdit:false
+ editable: true,
+ enableCellNavigation: true,
+ asyncEditorLoading: false,
+ autoEdit: false
};
var columns = [];
@@ -62,23 +62,23 @@
}
var checkboxSelector = new Slick.CheckboxSelectColumn({
- cssClass:"slick-cell-checkboxsel"
+ cssClass: "slick-cell-checkboxsel"
});
columns.push(checkboxSelector.getColumnDefinition());
for (var i = 0; i < 5; i++) {
columns.push({
- id:i,
- name:String.fromCharCode("A".charCodeAt(0) + i),
- field:i,
- width:100,
- editor:TextCellEditor
+ id: i,
+ name: String.fromCharCode("A".charCodeAt(0) + i),
+ field: i,
+ width: 100,
+ editor: TextCellEditor
});
}
grid = new Slick.Grid("#myGrid", data, columns, options);
- grid.setSelectionModel(new Slick.RowSelectionModel({selectActiveRow:false}));
+ grid.setSelectionModel(new Slick.RowSelectionModel({selectActiveRow: false}));
grid.registerPlugin(checkboxSelector);
})
</script>
@@ -1,9 +1,9 @@
<!DOCTYPE HTML>
<html>
<head>
- <link rel="stylesheet" href="../slick.grid.css" type="text/css" />
- <link rel="stylesheet" href="../css/smoothness/jquery-ui-1.8.16.custom.css" type="text/css" />
- <link rel="stylesheet" href="examples.css" type="text/css" />
+ <link rel="stylesheet" href="../slick.grid.css" type="text/css"/>
+ <link rel="stylesheet" href="../css/smoothness/jquery-ui-1.8.16.custom.css" type="text/css"/>
+ <link rel="stylesheet" href="examples.css" type="text/css"/>
</head>
<body>
<table width="100%">
@@ -31,49 +31,47 @@
<script>
var grid;
-
var columns = [
- {id:"title", name:"Title", field:"title"},
- {id:"duration", name:"Duration", field:"duration"},
- {id:"%", name:"% Complete", field:"percentComplete", selectable:false},
- {id:"start", name:"Start", field:"start"},
- {id:"finish", name:"Finish", field:"finish"},
- {id:"effort-driven", name:"Effort Driven", field:"effortDriven"}
+ {id: "title", name: "Title", field: "title"},
+ {id: "duration", name: "Duration", field: "duration"},
+ {id: "%", name: "% Complete", field: "percentComplete", selectable: false},
+ {id: "start", name: "Start", field: "start"},
+ {id: "finish", name: "Finish", field: "finish"},
+ {id: "effort-driven", name: "Effort Driven", field: "effortDriven"}
];
var options = {
- enableCellNavigation:true,
- enableColumnReorder:false
+ enableCellNavigation: true,
+ enableColumnReorder: false
};
$(function () {
var data = [];
for (var i = 0; i < 10; i++) {
data[i] = {
- title:"Task " + i,
- duration:"5 days",
- percentComplete:Math.round(Math.random() * 100),
- start:"01/01/2009",
- finish:"01/05/2009",
- effortDriven:(i % 5 == 0)
+ title: "Task " + i,
+ duration: "5 days",
+ percentComplete: Math.round(Math.random() * 100),
+ start: "01/01/2009",
+ finish: "01/05/2009",
+ effortDriven: (i % 5 == 0)
};
}
data.getItemMetadata = function (row) {
if (row % 2 === 1) {
return {
- "columns":{
- "duration":{
- "colspan":3
+ "columns": {
+ "duration": {
+ "colspan": 3
}
}
};
- }
- else {
+ } else {
return {
- "columns":{
- 0:{
- "colspan":"*"
+ "columns": {
+ 0: {
+ "colspan": "*"
}
}
};
@@ -3,9 +3,9 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>SlickGrid example: CompositeEditor</title>
- <link rel="stylesheet" href="../slick.grid.css" type="text/css" />
- <link rel="stylesheet" href="../css/smoothness/jquery-ui-1.8.16.custom.css" type="text/css" />
- <link rel="stylesheet" href="examples.css" type="text/css" />
+ <link rel="stylesheet" href="../slick.grid.css" type="text/css"/>
+ <link rel="stylesheet" href="../css/smoothness/jquery-ui-1.8.16.custom.css" type="text/css"/>
+ <link rel="stylesheet" href="examples.css" type="text/css"/>
<style>
.cell-title {
font-weight: bold;
@@ -35,10 +35,6 @@
float: right;
}
- .item-details-row {
-
- }
-
.item-details-label {
margin-left: 10px;
margin-top: 20px;
@@ -112,30 +108,29 @@
<script>
function requiredFieldValidator(value) {
if (value == null || value == undefined || !value.length) {
- return {valid:false, msg:"This is a required field"};
- }
- else {
- return {valid:true, msg:null};
+ return {valid: false, msg: "This is a required field"};
+ } else {
+ return {valid: true, msg: null};
}
}
var grid;
var data = [];
var columns = [
- {id:"title", name:"Title", field:"title", width:120, cssClass:"cell-title", editor:TextCellEditor, validator:requiredFieldValidator},
- {id:"desc", name:"Description", field:"description", width:100, editor:TextCellEditor},
- {id:"duration", name:"Duration", field:"duration", editor:TextCellEditor},
- {id:"%", name:"% Complete", field:"percentComplete", width:80, resizable:false, formatter:GraphicalPercentCompleteCellFormatter, editor:PercentCompleteCellEditor},
- {id:"start", name:"Start", field:"start", minWidth:60, editor:DateCellEditor},
- {id:"finish", name:"Finish", field:"finish", minWidth:60, editor:DateCellEditor},
- {id:"effort-driven", name:"Effort Driven", width:80, minWidth:20, maxWidth:80, cssClass:"cell-effort-driven", field:"effortDriven", formatter:BoolCellFormatter, editor:YesNoCheckboxCellEditor}
+ {id: "title", name: "Title", field: "title", width: 120, cssClass: "cell-title", editor: TextCellEditor, validator: requiredFieldValidator},
+ {id: "desc", name: "Description", field: "description", width: 100, editor: TextCellEditor},
+ {id: "duration", name: "Duration", field: "duration", editor: TextCellEditor},
+ {id: "percent", name: "% Complete", field: "percentComplete", width: 80, resizable: false, formatter: GraphicalPercentCompleteCellFormatter, editor: PercentCompleteCellEditor},
+ {id: "start", name: "Start", field: "start", minWidth: 60, editor: DateCellEditor},
+ {id: "finish", name: "Finish", field: "finish", minWidth: 60, editor: DateCellEditor},
+ {id: "effort-driven", name: "Effort Driven", width: 80, minWidth: 20, maxWidth: 80, cssClass: "cell-effort-driven", field: "effortDriven", formatter: BoolCellFormatter, editor: YesNoCheckboxCellEditor}
];
var options = {
- editable:true,
- enableAddRow:true,
- enableCellNavigation:true,
- asyncEditorLoading:false,
- autoEdit:false
+ editable: true,
+ enableAddRow: true,
+ enableCellNavigation: true,
+ asyncEditorLoading: false,
+ autoEdit: false
};
@@ -147,19 +142,18 @@
var $modal = $("<div class='item-details-form'></div>");
$modal = $("#itemDetailsTemplate")
- .tmpl({
- context:grid.getDataItem(grid.getActiveCell().row),
- columns:columns
- })
- .appendTo("body");
+ .tmpl({
+ context: grid.getDataItem(grid.getActiveCell().row),
+ columns: columns
+ })
+ .appendTo("body");
$modal.keydown(function (e) {
if (e.which == $.ui.keyCode.ENTER) {
grid.getEditController().commitCurrentEdit();
e.stopPropagation();
e.preventDefault();
- }
- else if (e.which == $.ui.keyCode.ESCAPE) {
+ } else if (e.which == $.ui.keyCode.ESCAPE) {
grid.getEditController().cancelCurrentEdit();
e.stopPropagation();
e.preventDefault();
@@ -180,13 +174,13 @@
});
var compositeEditor = new Slick.CompositeEditor(
- columns,
- containers,
- {
- destroy:function () {
- $modal.remove();
- }
- }
+ columns,
+ containers,
+ {
+ destroy: function () {
+ $modal.remove();
+ }
+ }
);
grid.editActiveCell(compositeEditor);
@@ -224,7 +218,7 @@
var idx = args.validationResults.errors.length;
while (idx--) {
err = args.validationResults.errors[idx];
- $(err.container).stop(true, true).effect("highlight", {color:"red"});
+ $(err.container).stop(true, true).effect("highlight", {color: "red"});
}
}
});
@@ -3,9 +3,9 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>SlickGrid example: Custom column value extractor</title>
- <link rel="stylesheet" href="../slick.grid.css" type="text/css" />
- <link rel="stylesheet" href="../css/smoothness/jquery-ui-1.8.16.custom.css" type="text/css" />
- <link rel="stylesheet" href="examples.css" type="text/css" />
+ <link rel="stylesheet" href="../slick.grid.css" type="text/css"/>
+ <link rel="stylesheet" href="../css/smoothness/jquery-ui-1.8.16.custom.css" type="text/css"/>
+ <link rel="stylesheet" href="examples.css" type="text/css"/>
</head>
<body>
<table width="100%">
@@ -29,20 +29,18 @@
<script src="../slick.grid.js"></script>
<script>
-
var grid;
-
var columns = [
- {id:"title", name:"Name", field:"name"},
- {id:"field1", name:"Field1", field:"values", fieldIdx:0},
- {id:"field2", name:"Field2", field:"values", fieldIdx:1},
- {id:"field3", name:"Field3", field:"values", fieldIdx:2}
+ {id: "title", name: "Name", field: "name"},
+ {id: "field1", name: "Field1", field: "values", fieldIdx: 0},
+ {id: "field2", name: "Field2", field: "values", fieldIdx: 1},
+ {id: "field3", name: "Field3", field: "values", fieldIdx: 2}
];
var options = {
- enableCellNavigation:true,
- enableColumnReorder:false,
- dataItemColumnValueExtractor:getItemColumnValue
+ enableCellNavigation: true,
+ enableColumnReorder: false,
+ dataItemColumnValueExtractor: getItemColumnValue
};
// Get the item column value using a custom 'fieldIdx' column param
@@ -59,8 +57,8 @@
var data = [];
for (var i = 0; i < 500; i++) {
data[i] = {
- name:"Item " + i,
- values:[
+ name: "Item " + i,
+ values: [
Math.round(Math.random() * 100),
Math.round(Math.random() * 100),
Math.round(Math.random() * 100)
@@ -70,7 +68,6 @@
grid = new Slick.Grid("#myGrid", data, columns, options);
})
-
</script>
</body>
</html>
Oops, something went wrong.

0 comments on commit b92ba76

Please sign in to comment.