parent
a91691cb6b
commit
9c911275f6
@ -128,6 +128,7 @@ Refine.GDataImportingController.prototype.getOptions = function() {
|
||||
this._parsingPanelElmts.sheetRecordContainer.find('input').each(function() {
|
||||
if (this.checked) {
|
||||
options.sheetUrl = this.getAttribute('sheetUrl');
|
||||
options.worksheetIndex = this.getAttribute('worksheetIndex');
|
||||
}
|
||||
});
|
||||
|
||||
@ -243,6 +244,7 @@ Refine.GDataImportingController.prototype._showParsingPanel = function() {
|
||||
.attr('type', 'radio')
|
||||
.attr('name', 'gdata-importing-parsing-worksheet')
|
||||
.attr('sheetUrl', this.link)
|
||||
.attr('worksheetIndex', this.worksheetIndex)
|
||||
.appendTo(td0);
|
||||
if (i === 0) {
|
||||
checkbox.prop("checked", true);
|
||||
|
@ -161,12 +161,14 @@ public class GDataImportingController implements ImportingController {
|
||||
|
||||
List<Sheet> worksheetEntries =
|
||||
getWorksheetEntriesForDoc(token, spreadSheetId);
|
||||
int workSheetIndex = 0;
|
||||
for (Sheet sheet : worksheetEntries) {
|
||||
ObjectNode worksheetO = ParsingUtilities.mapper.createObjectNode();
|
||||
JSONUtilities.safePut(worksheetO, "name", sheet.getProperties().getTitle());
|
||||
JSONUtilities.safePut(worksheetO, "rows", sheet.getProperties().getGridProperties().getRowCount());
|
||||
JSONUtilities.safePut(worksheetO, "link",
|
||||
"https://sheets.googleapis.com/v4/spreadsheets/" + spreadSheetId + "/values/" + sheet.getProperties().getTitle());
|
||||
JSONUtilities.safePut(worksheetO, "worksheetIndex", workSheetIndex++);
|
||||
|
||||
JSONUtilities.append(worksheets, worksheetO);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user