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,6 +221,21 @@ define([
previewContentsElt = document.getElementById('preview-contents');
$previewContentsElt = $(previewContentsElt);
// Create a button from an extension listener
var createBtn = function(listener) {
var buttonGrpElt = crel('div', {
class: 'btn-group'
});
var btnElt = listener();
if(_.isString(btnElt)) {
buttonGrpElt.innerHTML = btnElt;
}
else if(_.isElement(btnElt)) {
buttonGrpElt.appendChild(btnElt);
}
return buttonGrpElt;
};
if(window.viewerMode === false) {
// Create accordion in settings dialog
var accordionHtml = _.chain(extensionList).sortBy(function(extension) {
@ -235,21 +250,6 @@ define([
}, "").value();
document.querySelector('.accordion-extensions').innerHTML = accordionHtml;
// Create a button from an extension listener
var createBtn = function(listener) {
var buttonGrpElt = crel('div', {
class: 'btn-group'
});
var btnElt = listener();
if(_.isString(btnElt)) {
buttonGrpElt.innerHTML = btnElt;
}
else if(_.isElement(btnElt)) {
buttonGrpElt.appendChild(btnElt);
}
return buttonGrpElt;
};
// 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'