forked from jspreadsheet/ce
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
paulhodel
authored and
paulhodel
committed
Dec 12, 2019
1 parent
392954f
commit 0cd29c5
Showing
2 changed files
with
66 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
|
||
/** | ||
* jExcel v3.7.1 | ||
* jExcel v3.7.2 | ||
* | ||
* Author: Paul Hodel <[email protected]> | ||
* Website: https://bossanova.uk/jexcel/ | ||
|
@@ -193,7 +193,7 @@ var jexcel = (function(el, options) { | |
noCellsSelected: 'No cells selected', | ||
}, | ||
// About message | ||
about:"jExcel CE Spreadsheet\nVersion 3.7.1\nAuthor: Paul Hodel <[email protected]>\nWebsite: https://bossanova.uk/jexcel/v3", | ||
about:"jExcel CE Spreadsheet\nVersion 3.7.2\nAuthor: Paul Hodel <[email protected]>\nWebsite: https://bossanova.uk/jexcel/v3", | ||
}; | ||
|
||
// Loading initial configuration from user | ||
|
@@ -605,6 +605,38 @@ var jexcel = (function(el, options) { | |
obj.setStyle(obj.options.style, null, null, 1, 1); | ||
} | ||
} | ||
|
||
/** | ||
* Refresh the data | ||
* | ||
* @return void | ||
*/ | ||
obj.refresh = function() { | ||
if (obj.options.url) { | ||
// Loading | ||
if (obj.options.loadingSpin == true) { | ||
jSuites.loading.show(); | ||
} | ||
|
||
jSuites.ajax({ | ||
url: obj.options.url, | ||
method: 'GET', | ||
dataType: 'json', | ||
success: function(result) { | ||
// Data | ||
obj.options.data = (result.data) ? result.data : result; | ||
// Prepare table | ||
obj.setData(); | ||
// Hide spin | ||
if (obj.options.loadingSpin == true) { | ||
jSuites.loading.hide(); | ||
} | ||
} | ||
}); | ||
} else { | ||
obj.setData(); | ||
} | ||
} | ||
|
||
/** | ||
* Set data | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters