Skip to content
This repository was archived by the owner on Apr 2, 2019. It is now read-only.

Commit 7cc8084

Browse files
committed
Version 0.2.6
1 parent 6af43fc commit 7cc8084

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+498
-177
lines changed

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
### 0.2.6
2+
Bug Fixes and Improvements
3+
4+
- TextCell should trigger and error and highlight the text area if the formatter
5+
returns undefined. [Issue #149](https://github.com/wyuenho/backgrid/issues/149)
6+
- SelectCell and Select2Cell can now handle multiple
7+
selections. [Issue #152](https://github.com/wyuenho/backgrid/issues/159)
8+
- ServerSideFilter's query parameter will now persist across server mode
9+
pagination with
10+
PageableCollection. [Issue #159](https://github.com/wyuenho/backgrid/issues/159)
11+
- Paginator no longer requires the column definition list in its constructor.
12+
- Paginator will no long page into the negative under server mode and when
13+
there's no `totalRecords`
14+
set. [Issue #33](https://github.com/wyuenho/backgrid/issues/33)
15+
- DatetimeFormatter now accepts UNIX offset values and MomentFormatter now
16+
accepts both UNIX offset and UNIX timestamp
17+
values. [Issue #145](https://github.com/wyuenho/backgrid/issues/145)
18+
- The `error` class can now be applied to cells without going into edit mode.
19+
- SelectCellEditor will now save the value if there's only one
20+
option. [Issue #153](https://github.com/wyuenho/backgrid/issues/153)
21+
122
### 0.2.5
223
New Features
324

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ functionalities easy.
2727
- Chrome 4+
2828
- Safari 4+
2929
- Firefox 4+
30+
- Opera 9+
3031

3132
### Notes:
3233

@@ -55,7 +56,7 @@ var columns = [{
5556
// Defines a cell type, and ID is displayed as an integer without the ',' separating 1000s.
5657
cell: Backgrid.IntegerCell.extend({
5758
orderSeparator: ''
58-
})
59+
}1)
5960
}, {
6061
name: "name",
6162
label: "Name",
@@ -83,11 +84,10 @@ var columns = [{
8384
var grid = new Backgrid.Grid({
8485
columns: columns,
8586
collection: territories,
86-
footer: Backgrid.Paginator
8787
});
8888

89-
// Render the grid and attach the root to your HTML document
90-
$("#example-1-result").append(grid.render().$el);
89+
// Render the grid and attach the Grid's root to your HTML document
90+
$("#example-1-result").append(grid.render().el);
9191
```
9292

9393
# Result:

api/data-03f6d0eff7392a61971ad69a7c3faeb8.js renamed to api/data-2955af782e470c702685db56403591a1.js

Lines changed: 67 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,12 @@ Docs = {
217217
"private": null,
218218
"icon": "icon-class"
219219
},
220+
{
221+
"name": "Backgrid.SelectFormatter",
222+
"extends": "Backgrid.CellFormatter",
223+
"private": null,
224+
"icon": "icon-class"
225+
},
220226
{
221227
"name": "Backgrid.Grid",
222228
"extends": "Backbone.View",
@@ -1011,6 +1017,24 @@ Docs = {
10111017
},
10121018
"sort": 3
10131019
},
1020+
{
1021+
"name": "multiple",
1022+
"fullName": "Backgrid.SelectCell.multiple",
1023+
"icon": "icon-property",
1024+
"url": "#!/api/Backgrid.SelectCell-property-multiple",
1025+
"meta": {
1026+
},
1027+
"sort": 3
1028+
},
1029+
{
1030+
"name": "formatter",
1031+
"fullName": "Backgrid.SelectCell.formatter",
1032+
"icon": "icon-property",
1033+
"url": "#!/api/Backgrid.SelectCell-property-formatter",
1034+
"meta": {
1035+
},
1036+
"sort": 3
1037+
},
10141038
{
10151039
"name": "optionValues",
10161040
"fullName": "Backgrid.SelectCell.optionValues",
@@ -1020,6 +1044,15 @@ Docs = {
10201044
},
10211045
"sort": 3
10221046
},
1047+
{
1048+
"name": "delimiter",
1049+
"fullName": "Backgrid.SelectCell.delimiter",
1050+
"icon": "icon-property",
1051+
"url": "#!/api/Backgrid.SelectCell-property-delimiter",
1052+
"meta": {
1053+
},
1054+
"sort": 3
1055+
},
10231056
{
10241057
"name": "initialize",
10251058
"fullName": "Backgrid.SelectCell.initialize",
@@ -1819,19 +1852,19 @@ Docs = {
18191852
"sort": 3
18201853
},
18211854
{
1822-
"name": "save",
1823-
"fullName": "Backgrid.Extension.TextareaEditor.save",
1855+
"name": "saveOrCancel",
1856+
"fullName": "Backgrid.Extension.TextareaEditor.saveOrCancel",
18241857
"icon": "icon-method",
1825-
"url": "#!/api/Backgrid.Extension.TextareaEditor-method-save",
1858+
"url": "#!/api/Backgrid.Extension.TextareaEditor-method-saveOrCancel",
18261859
"meta": {
18271860
},
18281861
"sort": 3
18291862
},
18301863
{
1831-
"name": "cancel",
1832-
"fullName": "Backgrid.Extension.TextareaEditor.cancel",
1833-
"icon": "icon-method",
1834-
"url": "#!/api/Backgrid.Extension.TextareaEditor-method-cancel",
1864+
"name": "clearError",
1865+
"fullName": "Backgrid.Extension.TextareaEditor.clearError",
1866+
"icon": "icon-property",
1867+
"url": "#!/api/Backgrid.Extension.TextareaEditor-property-clearError",
18351868
"meta": {
18361869
},
18371870
"sort": 3
@@ -2090,6 +2123,33 @@ Docs = {
20902123
},
20912124
"sort": 3
20922125
},
2126+
{
2127+
"name": "SelectFormatter",
2128+
"fullName": "Backgrid.SelectFormatter",
2129+
"icon": "icon-class",
2130+
"url": "#!/api/Backgrid.SelectFormatter",
2131+
"meta": {
2132+
},
2133+
"sort": 1
2134+
},
2135+
{
2136+
"name": "constructor",
2137+
"fullName": "Backgrid.SelectFormatter.constructor",
2138+
"icon": "icon-method",
2139+
"url": "#!/api/Backgrid.SelectFormatter-method-constructor",
2140+
"meta": {
2141+
},
2142+
"sort": 3
2143+
},
2144+
{
2145+
"name": "fromRaw",
2146+
"fullName": "Backgrid.SelectFormatter.fromRaw",
2147+
"icon": "icon-method",
2148+
"url": "#!/api/Backgrid.SelectFormatter-method-fromRaw",
2149+
"meta": {
2150+
},
2151+
"sort": 3
2152+
},
20932153
{
20942154
"name": "Grid",
20952155
"fullName": "Backgrid.Grid",

api/index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<link rel="stylesheet" href="resources/css/app-d837b293d081641aaa2111b87080b6d6.css" type="text/css" />
1313

1414
<script type="text/javascript" src="extjs/ext-all.js"></script>
15-
<script type="text/javascript" src="data-03f6d0eff7392a61971ad69a7c3faeb8.js"></script>
15+
<script type="text/javascript" src="data-2955af782e470c702685db56403591a1.js"></script>
1616

1717
<script type="text/javascript" src="app-9096a86b4ef476d85905927d55b2fdef.js"></script>
1818

@@ -59,6 +59,7 @@ <h3>Formatters</h3>
5959
<li><a href="#!/api/Backgrid.EmailFormatter" rel="Backgrid.EmailFormatter" class="docClass">Backgrid.EmailFormatter</a></li>
6060
<li><a href="#!/api/Backgrid.NumberFormatter" rel="Backgrid.NumberFormatter" class="docClass">Backgrid.NumberFormatter</a></li>
6161
<li><a href="#!/api/Backgrid.DatetimeFormatter" rel="Backgrid.DatetimeFormatter" class="docClass">Backgrid.DatetimeFormatter</a></li>
62+
<li><a href="#!/api/Backgrid.SelectFormatter" rel="Backgrid.SelectFormatter" class="docClass">Backgrid.SelectFormatter</a></li>
6263
</ul>
6364
</div>
6465
<div class='right-column'>
@@ -128,7 +129,7 @@ <h3>Filter</h3>
128129
</div>
129130

130131

131-
<div id='footer-content' style='display: none'>Generated on Sat 27 Apr 2013 19:31:16 by <a href='https://github.com/senchalabs/jsduck'>JSDuck</a> 4.8.0.</div>
132+
<div id='footer-content' style='display: none'>Generated on Tue 07 May 2013 23:21:44 by <a href='https://github.com/senchalabs/jsduck'>JSDuck</a> 4.8.0.</div>
132133

133134
<script type='text/javascript'> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-36403214-1']); _gaq.push(['_setDomainName', 'backgridjs.com']); _gaq.push(['_setAllowLinker', true]); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();</script>
134135

api/output/Backgrid.BooleanCell.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ Ext.data.JsonP.Backgrid_BooleanCell({
133133

134134
]
135135
},
136-
"linenr": 644,
136+
"linenr": 643,
137137
"files": [
138138
{
139139
"filename": "cell.js",

api/output/Backgrid.BooleanCellEditor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Ext.data.JsonP.Backgrid_BooleanCellEditor({
109109

110110
]
111111
},
112-
"linenr": 558,
112+
"linenr": 557,
113113
"files": [
114114
{
115115
"filename": "cell.js",

api/output/Backgrid.CellFormatter.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ Ext.data.JsonP.Backgrid_CellFormatter({
108108
"Backgrid.EmailFormatter",
109109
"Backgrid.Extension.MomentFormatter",
110110
"Backgrid.NumberFormatter",
111+
"Backgrid.SelectFormatter",
111112
"Backgrid.StringFormatter"
112113
],
113114
"mixedInto": [
@@ -116,5 +117,5 @@ Ext.data.JsonP.Backgrid_CellFormatter({
116117
"parentMixins": [
117118

118119
],
119-
"html": "<div><pre class=\"hierarchy\"><h4>Subclasses</h4><div class='dependency'><a href='#!/api/Backgrid.DatetimeFormatter' rel='Backgrid.DatetimeFormatter' class='docClass'>Backgrid.DatetimeFormatter</a></div><div class='dependency'><a href='#!/api/Backgrid.EmailFormatter' rel='Backgrid.EmailFormatter' class='docClass'>Backgrid.EmailFormatter</a></div><div class='dependency'><a href='#!/api/Backgrid.Extension.MomentFormatter' rel='Backgrid.Extension.MomentFormatter' class='docClass'>Backgrid.Extension.MomentFormatter</a></div><div class='dependency'><a href='#!/api/Backgrid.NumberFormatter' rel='Backgrid.NumberFormatter' class='docClass'>Backgrid.NumberFormatter</a></div><div class='dependency'><a href='#!/api/Backgrid.StringFormatter' rel='Backgrid.StringFormatter' class='docClass'>Backgrid.StringFormatter</a></div></pre><div class='doc-contents'><p>Just a convenient class for interested parties to subclass.</p>\n\n<p>The default Cell classes don't require the formatter to be a subclass of\nFormatter as long as the fromRaw(rawData) and toRaw(formattedData) methods\nare defined.</p>\n</div><div class='members'><div class='members-section'><div class='definedBy'>Defined By</div><h3 class='members-title icon-method'>Methods</h3><div class='subsection'><div id='method-constructor' class='member first-child not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Backgrid.CellFormatter'>Backgrid.CellFormatter</span><br/></div><strong class='new-keyword'>new</strong><a href='#!/api/Backgrid.CellFormatter-method-constructor' class='name expandable'>Backgrid.CellFormatter</a>( <span class='pre'></span> ) : <a href=\"#!/api/Backgrid.CellFormatter\" rel=\"Backgrid.CellFormatter\" class=\"docClass\">Backgrid.CellFormatter</a></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Backgrid.CellFormatter\" rel=\"Backgrid.CellFormatter\" class=\"docClass\">Backgrid.CellFormatter</a></span><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-fromRaw' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Backgrid.CellFormatter'>Backgrid.CellFormatter</span><br/></div><a href='#!/api/Backgrid.CellFormatter-method-fromRaw' class='name expandable'>fromRaw</a>( <span class='pre'>rawData</span> ) : *</div><div class='description'><div class='short'>Takes a raw value from a model and returns an optionally formatted string\nfor display. ...</div><div class='long'><p>Takes a raw value from a model and returns an optionally formatted string\nfor display. The default implementation simply returns the supplied value\nas is without any type conversion.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>rawData</span> : *<div class='sub-desc'>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'>*</span><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-toRaw' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Backgrid.CellFormatter'>Backgrid.CellFormatter</span><br/></div><a href='#!/api/Backgrid.CellFormatter-method-toRaw' class='name expandable'>toRaw</a>( <span class='pre'>formattedData</span> ) : *|undefined</div><div class='description'><div class='short'>Takes a formatted string, usually from user input, and returns a\nappropriately typed value for persistence in the model. ...</div><div class='long'><p>Takes a formatted string, usually from user input, and returns a\nappropriately typed value for persistence in the model.</p>\n\n<p>If the user input is invalid or unable to be converted to a raw value\nsuitable for persistence in the model, toRaw must return <code>undefined</code>.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>formattedData</span> : string<div class='sub-desc'>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'>*|undefined</span><div class='sub-desc'>\n</div></li></ul></div></div></div></div></div></div></div>"
120+
"html": "<div><pre class=\"hierarchy\"><h4>Subclasses</h4><div class='dependency'><a href='#!/api/Backgrid.DatetimeFormatter' rel='Backgrid.DatetimeFormatter' class='docClass'>Backgrid.DatetimeFormatter</a></div><div class='dependency'><a href='#!/api/Backgrid.EmailFormatter' rel='Backgrid.EmailFormatter' class='docClass'>Backgrid.EmailFormatter</a></div><div class='dependency'><a href='#!/api/Backgrid.Extension.MomentFormatter' rel='Backgrid.Extension.MomentFormatter' class='docClass'>Backgrid.Extension.MomentFormatter</a></div><div class='dependency'><a href='#!/api/Backgrid.NumberFormatter' rel='Backgrid.NumberFormatter' class='docClass'>Backgrid.NumberFormatter</a></div><div class='dependency'><a href='#!/api/Backgrid.SelectFormatter' rel='Backgrid.SelectFormatter' class='docClass'>Backgrid.SelectFormatter</a></div><div class='dependency'><a href='#!/api/Backgrid.StringFormatter' rel='Backgrid.StringFormatter' class='docClass'>Backgrid.StringFormatter</a></div></pre><div class='doc-contents'><p>Just a convenient class for interested parties to subclass.</p>\n\n<p>The default Cell classes don't require the formatter to be a subclass of\nFormatter as long as the fromRaw(rawData) and toRaw(formattedData) methods\nare defined.</p>\n</div><div class='members'><div class='members-section'><div class='definedBy'>Defined By</div><h3 class='members-title icon-method'>Methods</h3><div class='subsection'><div id='method-constructor' class='member first-child not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Backgrid.CellFormatter'>Backgrid.CellFormatter</span><br/></div><strong class='new-keyword'>new</strong><a href='#!/api/Backgrid.CellFormatter-method-constructor' class='name expandable'>Backgrid.CellFormatter</a>( <span class='pre'></span> ) : <a href=\"#!/api/Backgrid.CellFormatter\" rel=\"Backgrid.CellFormatter\" class=\"docClass\">Backgrid.CellFormatter</a></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Backgrid.CellFormatter\" rel=\"Backgrid.CellFormatter\" class=\"docClass\">Backgrid.CellFormatter</a></span><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-fromRaw' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Backgrid.CellFormatter'>Backgrid.CellFormatter</span><br/></div><a href='#!/api/Backgrid.CellFormatter-method-fromRaw' class='name expandable'>fromRaw</a>( <span class='pre'>rawData</span> ) : *</div><div class='description'><div class='short'>Takes a raw value from a model and returns an optionally formatted string\nfor display. ...</div><div class='long'><p>Takes a raw value from a model and returns an optionally formatted string\nfor display. The default implementation simply returns the supplied value\nas is without any type conversion.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>rawData</span> : *<div class='sub-desc'>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'>*</span><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-toRaw' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Backgrid.CellFormatter'>Backgrid.CellFormatter</span><br/></div><a href='#!/api/Backgrid.CellFormatter-method-toRaw' class='name expandable'>toRaw</a>( <span class='pre'>formattedData</span> ) : *|undefined</div><div class='description'><div class='short'>Takes a formatted string, usually from user input, and returns a\nappropriately typed value for persistence in the model. ...</div><div class='long'><p>Takes a formatted string, usually from user input, and returns a\nappropriately typed value for persistence in the model.</p>\n\n<p>If the user input is invalid or unable to be converted to a raw value\nsuitable for persistence in the model, toRaw must return <code>undefined</code>.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>formattedData</span> : string<div class='sub-desc'>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'>*|undefined</span><div class='sub-desc'>\n</div></li></ul></div></div></div></div></div></div></div>"
120121
});

api/output/Backgrid.DateCell.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ Ext.data.JsonP.Backgrid_DateCell({
157157

158158
]
159159
},
160-
"linenr": 526,
160+
"linenr": 525,
161161
"files": [
162162
{
163163
"filename": "cell.js",

api/output/Backgrid.DatetimeCell.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ Ext.data.JsonP.Backgrid_DatetimeCell({
157157

158158
]
159159
},
160-
"linenr": 460,
160+
"linenr": 459,
161161
"files": [
162162
{
163163
"filename": "cell.js",

0 commit comments

Comments
 (0)