Fixed constants module

This commit is contained in:
benweet 2013-11-09 00:09:42 +00:00
parent b20ea7949f
commit d3069049b2
4 changed files with 19 additions and 20 deletions

View File

@ -76,4 +76,6 @@ define([], function() {
"night": "Night",
"school": "School",
};
return constants;
});

View File

@ -221,20 +221,6 @@ define([
previewContentsElt = document.getElementById('preview-contents');
$previewContentsElt = $(previewContentsElt);
if(window.viewerMode === false) {
// Create accordion in settings dialog
var accordionHtml = _.chain(extensionList).sortBy(function(extension) {
return extension.extensionName.toLowerCase();
}).reduce(function(html, extension) {
return html + (extension.settingsBlock ? _.template(settingsExtensionsAccordionHTML, {
extensionId: extension.extensionId,
extensionName: extension.extensionName,
isOptional: extension.isOptional,
settingsBlock: extension.settingsBlock
}) : "");
}, "").value();
document.querySelector('.accordion-extensions').innerHTML = accordionHtml;
// Create a button from an extension listener
var createBtn = function(listener) {
var buttonGrpElt = crel('div', {
@ -250,6 +236,20 @@ define([
return buttonGrpElt;
};
if(window.viewerMode === false) {
// Create accordion in settings dialog
var accordionHtml = _.chain(extensionList).sortBy(function(extension) {
return extension.extensionName.toLowerCase();
}).reduce(function(html, extension) {
return html + (extension.settingsBlock ? _.template(settingsExtensionsAccordionHTML, {
extensionId: extension.extensionId,
extensionName: extension.extensionName,
isOptional: extension.isOptional,
settingsBlock: extension.settingsBlock
}) : "");
}, "").value();
document.querySelector('.accordion-extensions').innerHTML = accordionHtml;
// Create extension buttons
logger.log("onCreateButton");
var onCreateButtonListenerList = getExtensionListenerList("onCreateButton");

View File

@ -8,7 +8,7 @@ define([
'google-code-prettify',
'highlightjs',
'pagedown-extra',
], function($, _, utils, Extension, markdownExtraSettingsBlockHTML, prettyPrint, hljs) {
], function($, _, utils, Extension, markdownExtraSettingsBlockHTML, prettify, hljs) {
var markdownExtra = new Extension("markdownExtra", "Markdown Extra", true);
markdownExtra.settingsBlock = markdownExtraSettingsBlockHTML;
@ -71,7 +71,7 @@ define([
}
else if(markdownExtra.config.highlighter == "prettify") {
options.highlighter = "prettify";
editor.hooks.chain("onPreviewRefresh", prettyPrint);
editor.hooks.chain("onPreviewRefresh", prettify.prettyPrint);
}
Markdown.Extra.init(converter, options);

View File

@ -85,9 +85,6 @@ requirejs.config({
highlightjs: {
exports: 'hljs'
},
'google-code-prettify': {
exports: 'prettyPrint'
},
'bootstrap-tour': {
deps: ['bootstrap'],
exports: 'Tour'