Last active
December 25, 2017 04:01
-
-
Save brainysmurf/b0d6df8e1cda1139f856de4dbf073d6d to your computer and use it in GitHub Desktop.
DbSheets_Temp Adds the ability to use temporary spreadsheets within dbsheets.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (global, Factory) { | |
/* | |
Build upon dbsheets | |
*/ | |
if (pkg && pkg.dbsheets && pkg.dbsheets.extend) { | |
pkg.dbsheets.extend.registerInit(function (dbObj) { | |
dbObj.makeTemp = function (title) { | |
title = title || "Temporary"; | |
return dbObj.createWithTitle(title); | |
}; | |
dbObj.destroyTemp = function (tmp) { | |
Drive.Files.remove(tmp.getId()); | |
}; | |
dbObj.withTempSpreadsheet = pkg.contextManager()({enter: dbObj.makeTemp, exit: dbObj.destroyTemp}); | |
dbObj.withTempDontDelete = pkg.contextManager()({enter: dbObj.makeTemp}); | |
}); | |
} | |
})(this, | |
function Package () { | |
// nothing | |
} | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
return { | |
self: {"dbsheets_temp": "b0d6df8e1cda1139f856de4dbf073d6d"}, | |
packages: [ | |
{}, | |
] | |
}; | |
})(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
return { | |
version: 0, | |
packages: [ | |
{"contextManager": "3d2064f689d3652e6c9bb5631868074b"}, | |
] | |
}; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment