small bug fixes

This commit is contained in:
Caleb James DeLisle 2017-09-26 10:23:35 +02:00
parent 1b01855dd2
commit 77fe6a9bba
3 changed files with 2 additions and 7 deletions

View File

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

View File

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

View File

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