|
|
@ -62,6 +62,7 @@ var onCloudDataReceived = function(entry) {
|
|
|
|
self.cloud.data = entry.data;
|
|
|
|
self.cloud.data = entry.data;
|
|
|
|
|
|
|
|
|
|
|
|
uDom.nodeFromId('cloudPull').removeAttribute('disabled');
|
|
|
|
uDom.nodeFromId('cloudPull').removeAttribute('disabled');
|
|
|
|
|
|
|
|
uDom.nodeFromId('cloudPullAndMerge').removeAttribute('disabled');
|
|
|
|
|
|
|
|
|
|
|
|
var timeOptions = {
|
|
|
|
var timeOptions = {
|
|
|
|
weekday: 'short',
|
|
|
|
weekday: 'short',
|
|
|
@ -118,6 +119,14 @@ var pullData = function(ev) {
|
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
/******************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var pullAndMergeData = function() {
|
|
|
|
|
|
|
|
if ( typeof self.cloud.onPull === 'function' ) {
|
|
|
|
|
|
|
|
self.cloud.onPull(self.cloud.data, true);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
var openOptions = function() {
|
|
|
|
var openOptions = function() {
|
|
|
|
var input = uDom.nodeFromId('cloudDeviceName');
|
|
|
|
var input = uDom.nodeFromId('cloudDeviceName');
|
|
|
|
input.value = self.cloud.options.deviceName;
|
|
|
|
input.value = self.cloud.options.deviceName;
|
|
|
@ -188,6 +197,7 @@ var onInitialize = function(options) {
|
|
|
|
|
|
|
|
|
|
|
|
uDom('#cloudPush').on('click', pushData);
|
|
|
|
uDom('#cloudPush').on('click', pushData);
|
|
|
|
uDom('#cloudPull').on('click', pullData);
|
|
|
|
uDom('#cloudPull').on('click', pullData);
|
|
|
|
|
|
|
|
uDom('#cloudPullAndMerge').on('click', pullAndMergeData);
|
|
|
|
uDom('#cloudCog').on('click', openOptions);
|
|
|
|
uDom('#cloudCog').on('click', openOptions);
|
|
|
|
uDom('#cloudOptions').on('click', closeOptions);
|
|
|
|
uDom('#cloudOptions').on('click', closeOptions);
|
|
|
|
uDom('#cloudOptionsSubmit').on('click', submitOptions);
|
|
|
|
uDom('#cloudOptionsSubmit').on('click', submitOptions);
|
|
|
|