When changing the title of a presentation, the title in the bottom of the slide should also change

pull/1/head
Caleb James DeLisle 7 years ago
parent f95acda758
commit 12e82e80ec

@ -1,4 +1,7 @@
define(['jquery'], function ($) {
define([
'jquery',
'/common/common-util.js'
], function ($, Util) {
var module = {};
module.create = function (Common, cfg) {
@ -6,6 +9,7 @@ define(['jquery'], function ($) {
var metadataMgr = Common.getMetadataMgr();
var sframeChan = Common.getSframeChannel();
var titleUpdated;
var evTitleChange = Util.mkEvent();
exp.defaultTitle = metadataMgr.getMetadata().defaultTitle;
exp.title = document.title;
@ -50,6 +54,7 @@ define(['jquery'], function ($) {
metadataMgr.onTitleChange(function (title) {
sframeChan.query('Q_SET_PAD_TITLE_IN_DRIVE', title, function (err) {
if (err) { return; }
evTitleChange.fire(title);
if (titleUpdated) { titleUpdated(undefined, title); }
});
});
@ -62,6 +67,8 @@ define(['jquery'], function ($) {
};
};
exp.onTitleChange = evTitleChange.reg;
return exp;
};

@ -303,6 +303,7 @@ define([
Slide.setTitle = function (titleObj) {
Title = titleObj;
Title.onTitleChange(function () { draw(Slide.index); });
};
return Slide;

Loading…
Cancel
Save