Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onMainPageAttach(page) {
- google.script.run.withSuccessHandler( function(resp) {
- page.descendants.ToFolderLink.text = resp.title;
- page.descendants.ToFolderLink.href = resp.link;
- }).getLinkToFolderByProperty();
- }
- /**
- * @param {widget} widget - Button widget.
- * @param {event}
- */
- function onMainInputClick(widget, event) {
- // var widgets = widget.parent.descendants;
- var input = widget.parent.descendants.InputTextBox.value;
- app.popups.ModalLoadingIndicator.visible = true;
- google.script.run.withSuccessHandler( function(resp) {
- var props = app.currentPage.properties;
- props.TitleProperty = resp.title;
- props.UrlProperty = resp.url;
- props.MessageProperty = resp.message;
- app.popups.ModalLoadingIndicator.visible = false;
- }).processMain(input);
- }
- /**
- * @param {widget} widget - Button widget.
- * @param {event}
- */
- function onToFolderButtonClick(widget) {
- var toFolder = widget.parent.descendants.ToFolderTextBox.value;
- widget.parent.descendants.ToFolderTextBox.value = '';
- app.popups.ModalLoadingIndicator.visible = true;
- google.script.run.withSuccessHandler( function(resp) {
- var props = app.currentPage.properties;
- props.ToFolderName = resp.title;
- props.ToFolderUrl = resp.url;
- props.MessageProperty = resp.message;
- app.popups.ModalLoadingIndicator.visible = false;
- }).setToFolderByUrl(toFolder);
- }
Add Comment
Please, Sign In to add comment