openpsa / jsgrid

Fork of last jqGrid version before license change
http://openpsa.github.io/jsgrid/
Other
28 stars 12 forks source link

remove templates in grid.base #75

Open bouks opened 9 years ago

bouks commented 9 years ago

I think including templates in grid.base is not a good thing. It makes the program bigger and some people won't use it or create their own templates (what about naming conflicts ?). We can do separate file for this if we want to offer templates or just let responsability to the user to create templates.

I propose to remove them (they do not exist in jqgrid) included by this commit :

https://github.com/openpsa/grid.js/commit/788418f2c98e72b3d77382d6b0560dd3545886b9

flack commented 9 years ago

Well, naming conflicts shouldn't be a problem. If a user defines e.g. an integer template, it will simply override the default one.

The file size also doesn't bother me very much, since it's only 14 lines uncompressed (but maybe that's only because I don't use jqgrid in high-traffic sites :-)).

In general, I like the idea of making configuration easier, but maybe we could do it a bit smarter. For example, if you set formatter: 'number' on a column, jqgrid could automatically change the default sorttype to "number" as well (and vice versa). The only problem is that this could add even more code..

meh-uk commented 9 years ago

Do we need to fix this before release or can it wait?