Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function buildAddOn(e) {
- var tempsections = [];
- for (var i =0 ; i<15; i++) {
- var tempsection = CardService.newCardSection().setHeader('Texts '+ i + 'aaaa.');
- tempsection.addWidget(CardService.newTextButton().setText("Sections num"+i).setOnClickAction(CardService.newAction().setFunctionName("test")));
- tempsections.push(tempsection);
- }
- // Build the main card after adding the section.
- var card = CardService.newCardBuilder()
- .setHeader(CardService.newCardHeader()
- .setTitle('Quick Label')
- .setImageUrl('https://www.gstatic.com/images/icons/material/system/1x/label_googblue_48dp.png'))
- .addSection(tempsections[0])
- .addSection(tempsections[1])
- .addSection(tempsections[2])
- .addSection(tempsections[3])
- .addSection(tempsections[4])
- .addSection(tempsections[5])
- .addSection(tempsections[6])
- .addSection(tempsections[7])
- .addSection(tempsections[8])
- .addSection(tempsections[9])
- .addSection(tempsections[10])
- .addSection(tempsections[11])
- .addSection(tempsections[12])
- .addSection(tempsections[13])
- .addSection(tempsections[14])
- .build();
- return [card];
- }
- function test() {
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement