small bug fixes

pull/1/head
Caleb James DeLisle 7 years ago
parent 1b01855dd2
commit 77fe6a9bba

@ -117,7 +117,7 @@ define([
if (state !== STATE.READY) { return; } if (state !== STATE.READY) { return; }
var oldContent = normalize(contentGetter()); var oldContent = normalize(contentGetter());
var newContentStr = cpNfInner.realtime.getUserDoc(); var newContentStr = cpNfInner.chainpad.getUserDoc();
var newContent = normalize(JSON.parse(newContentStr)); var newContent = normalize(JSON.parse(newContentStr));
var meta = extractMetadata(newContent); var meta = extractMetadata(newContent);
@ -346,7 +346,6 @@ define([
title: title.getTitleConfig(), title: title.getTitleConfig(),
metadataMgr: cpNfInner.metadataMgr, metadataMgr: cpNfInner.metadataMgr,
readOnly: readOnly, readOnly: readOnly,
ifrw: window,
realtime: cpNfInner.chainpad, realtime: cpNfInner.chainpad,
common: Cryptpad, common: Cryptpad,
sfCommon: common, sfCommon: common,

@ -38,6 +38,7 @@ define([], function () {
var queue = []; var queue = [];
var messageFromInner = function (m, cb) { queue.push([ m, cb ]); }; var messageFromInner = function (m, cb) { queue.push([ m, cb ]); };
sframeChan.on('Q_RT_MESSAGE', function (message, cb) { sframeChan.on('Q_RT_MESSAGE', function (message, cb) {
console.log(message);
messageFromInner(message, cb); messageFromInner(message, cb);
}); });

@ -321,9 +321,7 @@ define([
}; };
if (!framework.isReadOnly()) { if (!framework.isReadOnly()) {
console.log('\n\n\n\n\nREGISTER\n\n\n\n\n');
framework.onEditableChange(function () { framework.onEditableChange(function () {
console.log("Editable change");
var locked = framework.isLocked(); var locked = framework.isLocked();
$(inner).css({ 'background-color': ((locked) ? '#aaa' : '') }); $(inner).css({ 'background-color': ((locked) ? '#aaa' : '') });
inner.setAttribute('contenteditable', !locked); inner.setAttribute('contenteditable', !locked);
@ -350,9 +348,6 @@ define([
}; };
framework._.sfCommon.openFilePicker(pickerCfg); framework._.sfCommon.openFilePicker(pickerCfg);
}).appendTo(framework._.toolbar.$rightside); }).appendTo(framework._.toolbar.$rightside);
var $tags = framework._.sfCommon.createButton('hashtag', true);
framework._.toolbar.$rightside.append($tags);
} }
framework.setTitleRecommender(function () { framework.setTitleRecommender(function () {

Loading…
Cancel
Save