|
|
@ -130,7 +130,6 @@ define([
|
|
|
|
|
|
|
|
|
|
|
|
// Flag to check if a file from the filepicker is a mediatag for the slides or a background image
|
|
|
|
// Flag to check if a file from the filepicker is a mediatag for the slides or a background image
|
|
|
|
var Background = {
|
|
|
|
var Background = {
|
|
|
|
isBackground: false
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var mkSlideOptionsButton = function (framework, slideOptions) {
|
|
|
|
var mkSlideOptionsButton = function (framework, slideOptions) {
|
|
|
@ -208,7 +207,6 @@ define([
|
|
|
|
style: 'font-size: 17px',
|
|
|
|
style: 'font-size: 17px',
|
|
|
|
id: 'cp-app-slide-options-bg'
|
|
|
|
id: 'cp-app-slide-options-bg'
|
|
|
|
}).click(function () {
|
|
|
|
}).click(function () {
|
|
|
|
Background.isBackground = true;
|
|
|
|
|
|
|
|
var pickerCfg = {
|
|
|
|
var pickerCfg = {
|
|
|
|
types: ['file'],
|
|
|
|
types: ['file'],
|
|
|
|
where: ['root'],
|
|
|
|
where: ['root'],
|
|
|
@ -216,7 +214,12 @@ define([
|
|
|
|
fileType: ['image/']
|
|
|
|
fileType: ['image/']
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
common.openFilePicker(pickerCfg);
|
|
|
|
common.openFilePicker(pickerCfg, function (data) {
|
|
|
|
|
|
|
|
if (data.type === 'file') {
|
|
|
|
|
|
|
|
data.mt = common.getMediaTag(data).outerHTML;
|
|
|
|
|
|
|
|
Background.todo(data);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
}).text(Messages.printBackgroundButton).appendTo($p);
|
|
|
|
}).text(Messages.printBackgroundButton).appendTo($p);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$p.append($('<br>'));
|
|
|
|
$p.append($('<br>'));
|
|
|
@ -330,7 +333,7 @@ define([
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var mkColorConfiguration = function (framework, $modal) {
|
|
|
|
var mkColorConfiguration = function (framework, $modal, slideOptions) {
|
|
|
|
var textColor;
|
|
|
|
var textColor;
|
|
|
|
var backColor;
|
|
|
|
var backColor;
|
|
|
|
var metadataMgr = framework._.cpNfInner.metadataMgr;
|
|
|
|
var metadataMgr = framework._.cpNfInner.metadataMgr;
|
|
|
@ -341,11 +344,13 @@ define([
|
|
|
|
$modal.css('color', text);
|
|
|
|
$modal.css('color', text);
|
|
|
|
$modal.css('border-color', text);
|
|
|
|
$modal.css('border-color', text);
|
|
|
|
$('#' + SLIDE_COLOR_ID).find('i').css('color', text);
|
|
|
|
$('#' + SLIDE_COLOR_ID).find('i').css('color', text);
|
|
|
|
|
|
|
|
slideOptions.textColor = text;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (back) {
|
|
|
|
if (back) {
|
|
|
|
backColor = back;
|
|
|
|
backColor = back;
|
|
|
|
$modal.css('background-color', back);
|
|
|
|
//$modal.css('background-color', back);
|
|
|
|
$('#' + SLIDE_BACKCOLOR_ID).find('i').css('color', back);
|
|
|
|
$('#' + SLIDE_BACKCOLOR_ID).find('i').css('color', back);
|
|
|
|
|
|
|
|
slideOptions.bgColor = back;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
var updateLocalColors = function (text, back) {
|
|
|
|
var updateLocalColors = function (text, back) {
|
|
|
@ -411,14 +416,6 @@ define([
|
|
|
|
|
|
|
|
|
|
|
|
var mkFilePicker = function (framework, editor) {
|
|
|
|
var mkFilePicker = function (framework, editor) {
|
|
|
|
framework.setMediaTagEmbedder(function (mt, data) {
|
|
|
|
framework.setMediaTagEmbedder(function (mt, data) {
|
|
|
|
if (Background.isBackground) {
|
|
|
|
|
|
|
|
if (data.type === 'file') {
|
|
|
|
|
|
|
|
data.mt = mt[0].outerHTML;
|
|
|
|
|
|
|
|
Background.todo(data);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Background.isBackground = false;
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
editor.replaceSelection($(mt)[0].outerHTML);
|
|
|
|
editor.replaceSelection($(mt)[0].outerHTML);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -477,7 +474,7 @@ define([
|
|
|
|
mkThemeButton(framework);
|
|
|
|
mkThemeButton(framework);
|
|
|
|
mkPrintButton(framework, editor, $content, $print);
|
|
|
|
mkPrintButton(framework, editor, $content, $print);
|
|
|
|
mkSlideOptionsButton(framework, slideOptions, $toolbarDrawer);
|
|
|
|
mkSlideOptionsButton(framework, slideOptions, $toolbarDrawer);
|
|
|
|
var colors = mkColorConfiguration(framework, $modal);
|
|
|
|
var colors = mkColorConfiguration(framework, $modal, slideOptions);
|
|
|
|
mkFilePicker(framework, editor);
|
|
|
|
mkFilePicker(framework, editor);
|
|
|
|
mkSlidePreviewPane(framework, $contentContainer);
|
|
|
|
mkSlidePreviewPane(framework, $contentContainer);
|
|
|
|
|
|
|
|
|
|
|
|