Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions Code.gs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
function onOpen() {
var ui = SpreadsheetApp.getUi();
ui.createMenu('지오유')
.addItem('본 문서를 전자결재로 상신', 'openZioyou')
.addSeparator()
.addSubMenu(ui.createMenu('바로가기')
.addItem('그룹웨어로 이동', 'goToZioyou')
)
.addToUi();
}

function openZioyou() {
var htmlOutput = HtmlService.createHtmlOutputFromFile('index')
.setWidth(600)
.setHeight(500);
SpreadsheetApp.getUi().showModalDialog(htmlOutput, '전자결제 상신');
}

function goToZioyou() {
var url = 'http://www.zioyou.com';
var html = '<script>window.open("' + url + '");google.script.host.close();</script>';
var htmlOutput = HtmlService.createHtmlOutput(html);
SpreadsheetApp.getUi().showModalDialog(htmlOutput, '그룹웨어로 이동');
}

function updateSheet() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getActiveSheet();
sheet.getRange("A1").setValue("성공하였습니다.");
}
12 changes: 0 additions & 12 deletions README.md

This file was deleted.

55 changes: 25 additions & 30 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,30 +1,25 @@
function myFunction() {

}

function onOpen() {
var ui = SpreadsheetApp.getUi();
// Or DocumentApp or FormApp.
ui.createMenu('지오유')
.addItem('본 문서를 전자결재로 상신', 'menuItem1')
.addSeparator()
.addSubMenu(ui.createMenu('바로가기')
.addItem('그룹웨어로 이동', 'menuItem2'))
.addToUi();
}

function menuItem1() {
SpreadsheetApp.getUi() // Or DocumentApp or FormApp.
.alert('You clicked the first menu item!');
}

function menuItem2() {
SpreadsheetApp.getUi() // Or DocumentApp or FormApp.
.alert('You clicked the second menu item!');
myFunction();
}

function OpenZioYou(){
var htmlOutput = HtmlService.createHtmlOutputFromFile('openUrl').setHeight(100);
SpreadsheetApp.getUi().showModalDialog(htmlOutput, 'Opening ZioYou');
}
<!DOCTYPE html>
<html>
<head>
<base target="_top">
<style>
.ifm{
width: 100%;
height: 400px;
border: 0;
}
</style>
<script>
function fSend(){
if (confirm("정말로 상신하시겠습니까?")){
google.script.run.updateSheet();
alert("상신되었습니다. 고생하셨습니다.");
}
}
</script>
</head>
<body>
<iframe class="ifm" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vSk92NUZKRcmXlze23plrptK9zZBPdlq6nPBYkkihPgOf9fdBYeYmgLy6eX0eJEgbP9xBQJ8m-hsMEW/pubhtml?widget=true&amp;headers=false"></iframe>
<button onclick="fSend()">상신하기</button>
</body>
</html>
18 changes: 0 additions & 18 deletions note.txt

This file was deleted.

38 changes: 0 additions & 38 deletions ojt1/index.html

This file was deleted.

2 changes: 0 additions & 2 deletions ojt2/index.html

This file was deleted.

146 changes: 0 additions & 146 deletions ojt2/main.js

This file was deleted.