Skip to content

Commit ea7cc17

Browse files
committed
v3.5.0
1 parent f9181b7 commit ea7cc17

52 files changed

Lines changed: 21250 additions & 12392 deletions

Some content is hidden

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

ChangeLog.txt

Lines changed: 334 additions & 102 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
1-
jQuery grid plugin, supports 100,000+ records.
2-
==================================================
3-
[ParamQuery Grid](http://paramquery.com) (for jQuery)
1+
jQuery grid plugin, also support Angular, Reactjs, Vuejs
2+
========================================================
3+
[ParamQuery Grid](http://paramquery.com)
44

5-
[Angularjs Grid](http://angularjsgrid.com) (for Angularjs)
6-
7-
Copyright (c) 2012-2018 Paramvir Dhindsa
5+
Copyright (c) 2012-2021 Paramvir Dhindsa
86

97
[Released under GPL v3 license](http://paramquery.com/license)
10-
11-
12-
ParamQuery grid is a lightweight jQuery grid plugin inspired by MS Excel and Google spreadsheet.
13-
14-
Angularjs binding is also supported now. More bindings with other MVC/MVVM frameworks like Knockoutjs, Reactjs are coming soon.
15-
8+
9+
ParamQuery grid is a lightweight javascript grid for Angular, jQuery, Reactjs, Vuejs
1610

1711

1812
1. [Tutorial](http://paramquery.com/tutorial)
@@ -31,8 +25,17 @@ Angularjs binding is also supported now. More bindings with other MVC/MVVM frame
3125
### Features:
3226

3327
```
28+
29+
Supports 100,000+ records.
30+
31+
Support for Angular, Reactjs, Vuejs, Knockout, plain js.
32+
3433
Copy paste to and from Excel.
3534
35+
Autofill, drag to fill.
36+
37+
State management.
38+
3639
Edit history and tracking: undo and redo.
3740
3841
Local, remote and custom sorting for common data formats like Integer, real numbers, Strings, dates, etc.
@@ -45,7 +48,7 @@ Column and row grouping and fixed summary row.
4548
4649
Frozen rows & columns like Excel.
4750
48-
Export to Excel & CSV format.
51+
Export to Excel(xlsx), HTML, JSON & CSV format.
4952
5053
Nesting of grids and row details.
5154
@@ -59,7 +62,7 @@ Theme support.
5962
6063
i18n.
6164
62-
Consistent look and functionality across all major browsers IE(8+), Firefox, Chrome, Opera, etc
65+
Consistent look and functionality across all major browsers IE(11), Edge, Firefox, Chrome, Opera, etc
6366
6467
Displays data source formats like HTML, Array, XML, JSON, etc.
6568

angular/ng.pqgrid.dev.js

Lines changed: 27 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
/*!
2-
* Angularjs grid v2.0.5
3-
*
4-
* Copyright (c) 2016 Paramvir Dhindsa (http://paramquery.com)
2+
* ParamQuery Pro v3.5.0
3+
*
4+
* Copyright (c) 2012-2021 Paramvir Dhindsa (http://paramquery.com)
55
* Released under GNU General Public License v3
66
* http://paramquery.com/license
7-
*
7+
*
88
*/
9+
910
(function($) {
1011
"use strict";
11-
var pq = window.pq = window.pq || {};
1212
if (pq.ng) {
1313
return;
1414
}
@@ -69,13 +69,13 @@
6969
}
7070
})() : null;
7171
dataStr && (DM.data = $scope.$eval(dataStr));
72-
options.render = self.onRender(self, options, options.render);
73-
ngM.compileHeader && (options.refreshHeader = self.onRefreshHeader(self, options.refreshHeader));
74-
ngM.compileToolbar && (options.dataAvailable = self.oneDataReady(self, 'dataAvailable'));
75-
options.beforeRefreshData = self.onDataReady(self, dataStr, options.dataReady);
76-
compileRows && (options.refresh = self.onRefresh(self, options.refresh));
77-
$ele.pqGrid(options).data('pqGrid');
78-
$ele.on("pqgridcellsave", self.onRefreshRowCell(self, compileRows)).on("destroy", self.onDestroy(self));
72+
options.render = self.onRender(self, options, options.render, function(grid) {
73+
ngM.compileHeader && grid.on('refreshHeader', self.onRefreshHeader(self));
74+
ngM.compileToolbar && grid.one('dataReady', self.oneDataReady(self));
75+
grid.on('dataReady', self.onDataReady(self, dataStr));
76+
compileRows && grid.on('refresh', self.onRefresh(self));
77+
});
78+
self.grid = pq.grid($ele, options).on("refreshRow refreshCell", self.onRefreshRowCell(self, compileRows)).on("destroy", self.onDestroy(self));
7979
self.bindEvents($attr);
8080
watch === true && dataStr && self.digest($scope);
8181
};
@@ -98,7 +98,7 @@
9898
for (key in keys) {
9999
if (key.indexOf("on") === 0) {
100100
eventName = key.substring(2, 3).toLowerCase() + key.substr(3);
101-
self.$ele.on("pqgrid" + eventName.toLowerCase(), self.onEvent(self, $attr[key]));
101+
self.grid.on(eventName, self.onEvent(self, $attr[key]));
102102
}
103103
}
104104
};
@@ -197,7 +197,7 @@
197197
_p.onDataReady = function(self, dataStr) {
198198
return function onDataReady(evt) {
199199
if (dataStr) {
200-
var data = self.grid.options.dataModel.data;
200+
var data = this.options.dataModel.data;
201201
self.updateObjInt(data);
202202
self.$parse(dataStr).assign(self.$scope, data);
203203
};
@@ -237,18 +237,14 @@
237237
_p.onRefreshRowCell = function(self, bind) {
238238
return function(evt, ui) {
239239
if (bind) {
240-
var $tr = self.grid.getRow(ui);
241-
setTimeout(function() {
242-
try {
243-
self.rowScope($tr, ui.rowData, ui.rowIndx);
244-
} catch (ex) {}
245-
});
240+
var $tr = this.getRow(ui);
241+
self.rowScope($tr, ui.rowData, ui.rowIndx);
246242
}
247243
};
248244
};
249245
_p.onRefresh = function(self) {
250246
return function() {
251-
var grid = self.grid,
247+
var grid = this,
252248
$trs, $tr, i = 0,
253249
len, ui, rd;
254250
self.cleanRowScopes();
@@ -266,30 +262,29 @@
266262
};
267263
_p.onRefreshHeader = function(self) {
268264
return function() {
269-
var grid = self.grid,
265+
var grid = this,
270266
$scope = self.$scope;
271267
self.$compile(grid.$header)($scope);
272268
self.digest($scope);
273269
};
274270
};
275-
_p.oneDataReady = function(self, str) {
271+
_p.oneDataReady = function(self) {
276272
return function() {
277-
var grid = self.grid,
273+
var grid = this,
278274
$scope = self.$scope;
279-
self.$compile(grid.$toolbar)($scope);
275+
self.$compile(grid.toolbar())($scope);
280276
self.digest($scope);
281-
$(this).pqGrid('option', str, null);
282277
};
283278
};
284-
_p.onRender = function(self, options, cb) {
279+
_p.onRender = function(self, options, optionsRender, cb) {
285280
return function(evt, ui) {
286-
var grid = $(this).data('paramqueryPqGrid'),
281+
var grid = this,
287282
$scope = self.$scope;
288283
$scope.grid = grid;
289-
self.grid = grid;
290284
grid.$scope = $scope;
291285
options.grid = grid;
292-
cb && cb.call(this, evt, ui);
286+
optionsRender && optionsRender.call(grid, evt, ui);
287+
cb(grid);
293288
};
294289
};
295290
_p.onDestroy = function(self) {
@@ -344,9 +339,7 @@
344339
column.render = self.templateCell(template);
345340
}
346341
if (template = column.editorTemplate) {
347-
column.editor = {
348-
type: self.templateEditor(self, column.editor, template, $compile, $scope)
349-
};
342+
column.editor = self.templateEditor(self, column.editor, template, $compile, $scope);
350343
}
351344
if (valids = column.validations) {
352345
for (var j = 0; j < valids.length; j++) {
@@ -377,6 +370,7 @@
377370
$compile(tmpl)(edScope);
378371
scope_editor = edScope.editor;
379372
edScope.$destroy();
373+
return $.extend(editor, scope_editor);
380374
};
381375
};
382376
_p.templateCell = function(tmpl) {

angular/ng.pqgrid.min.js

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

array.htm

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,30 @@
22
<html>
33
<head>
44
<!--jQuery dependencies-->
5-
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/themes/base/jquery-ui.css" />
5+
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css" />
66
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
7-
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
7+
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
88

99
<!--PQ Grid files-->
1010
<link rel="stylesheet" href="pqgrid.min.css" />
11-
<script src="pqgrid.min.js"></script>
11+
<link rel="stylesheet" href="pqgrid.ui.min.css" />
12+
13+
<script src="pqgrid.dev.js"></script>
1214

1315
<!--jqueryui touch punch for touch devices-->
1416
<script src="touch-punch/touch-punch.min.js"></script>
1517

1618
<!--PQ Grid Office theme-->
1719
<link rel='stylesheet' href='themes/office/pqgrid.css' />
1820

21+
<!--jsZip for zip and xlsx export-->
22+
<script src="jsZip-2.5.0/jszip.min.js"></script>
23+
<style>
24+
*{
25+
font-size:12px;
26+
font-family: Arial;
27+
}
28+
</style>
1929
<script>
2030
$(function () {
2131
var data = [[1, 'Exxon Mobil', '339938.0', '36130.0'],

0 commit comments

Comments
 (0)