updated by GasGit automation
This commit is contained in:
parent
0ea8d9c791
commit
14363f6b28
1 changed files with 27 additions and 1 deletions
|
@ -8,6 +8,18 @@ var Home = (function (home) {
|
||||||
ns.initialize = function (reason) {
|
ns.initialize = function (reason) {
|
||||||
|
|
||||||
|
|
||||||
|
Process.control.buttons.generate.addEventListener('click',function () {
|
||||||
|
|
||||||
|
Provoke.run("Server","generateTestData")
|
||||||
|
.then (function (result) {
|
||||||
|
App.toast ("Sample data generated","You can delete this sheet at any time");
|
||||||
|
})
|
||||||
|
['catch'](function (err) {
|
||||||
|
App.showNotification ("Failed to generate sample data", err);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
// insert in sheet
|
// insert in sheet
|
||||||
Process.control.buttons.insert.addEventListener('click', function () {
|
Process.control.buttons.insert.addEventListener('click', function () {
|
||||||
try {
|
try {
|
||||||
|
@ -18,6 +30,13 @@ var Home = (function (home) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// if the close button exists then do it.
|
||||||
|
if (Process.control.buttons.close) {
|
||||||
|
Process.control.buttons.close.addEventListener('click', function () {
|
||||||
|
google.script.host.close();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// watch out for exiting the tab
|
// watch out for exiting the tab
|
||||||
var toggles = document.querySelectorAll('[data-mui-controls="' + Process.control.tabs.settings.id + '"]');
|
var toggles = document.querySelectorAll('[data-mui-controls="' + Process.control.tabs.settings.id + '"]');
|
||||||
toggles[0].addEventListener ('mui.tabs.hidestart',function () {
|
toggles[0].addEventListener ('mui.tabs.hidestart',function () {
|
||||||
|
@ -39,7 +58,7 @@ var Home = (function (home) {
|
||||||
Object.keys(Process.control.sankey.store).forEach(function(d) {
|
Object.keys(Process.control.sankey.store).forEach(function(d) {
|
||||||
try {
|
try {
|
||||||
if (elems.controls[d] && elems.controls[d].checked) {
|
if (elems.controls[d] && elems.controls[d].checked) {
|
||||||
elementer.applySettings(Process.control.sankey.store[d])
|
elementer.applySettings(Process.control.sankey.store[d]);
|
||||||
// make default values visible for height/width
|
// make default values visible for height/width
|
||||||
if(!parseInt(elems.controls.previewHeight.value,10)){
|
if(!parseInt(elems.controls.previewHeight.value,10)){
|
||||||
elems.controls.previewHeight.value = Process.control.chart.defOptions.height;
|
elems.controls.previewHeight.value = Process.control.chart.defOptions.height;
|
||||||
|
@ -72,6 +91,13 @@ var Home = (function (home) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// this is about restoring settings if selected in the settings menus
|
||||||
|
Process.control.buttons.reset.forEach(function(d) {
|
||||||
|
d.addEventListener('click',function() {
|
||||||
|
Process.restoreResetValues (Process.control.sankey.elementer , d.id.match(/resetButton_(\w+)-elem/)[1]);
|
||||||
|
d.disabled = true;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
//this us about saving and clearing settings in property stores
|
//this us about saving and clearing settings in property stores
|
||||||
Process.control.buttons.manage.addEventListener('click', function () {
|
Process.control.buttons.manage.addEventListener('click', function () {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue