Upgrade to Bootstrap 3

This commit is contained in:
benweet 2013-08-08 23:29:49 +01:00
parent 98ef0bfd52
commit 917675a66d
6 changed files with 22 additions and 22 deletions

View File

@ -238,16 +238,14 @@ define([
logger.log("onCreatePreviewButton");
var onCreatePreviewButtonListenerList = getExtensionListenerList("onCreatePreviewButton");
var extensionPreviewButtonsFragment = document.createDocumentFragment();
var buttonGrpElt = crel('div', {
class: 'btn-group'
var previewButtonsElt = crel('div', {
class: 'extension-preview-buttons'
});
extensionPreviewButtonsFragment.appendChild(buttonGrpElt);
var buttonGroupInnerHtml = "";
extensionPreviewButtonsFragment.appendChild(previewButtonsElt);
_.each(onCreatePreviewButtonListenerList, function(listener) {
buttonGroupInnerHtml += listener();
previewButtonsElt.appendChild(createBtn(listener));
});
buttonGrpElt.innerHTML = buttonGroupInnerHtml;
document.getElementById('extension-preview-buttons').appendChild(extensionPreviewButtonsFragment);
document.querySelector('.ui-layout-resizer-north').appendChild(extensionPreviewButtonsFragment);
}
// Call onReady listeners

View File

@ -27,7 +27,7 @@ define([
};
buttonHtmlCode.onCreatePreviewButton = function() {
return '<button class="btn btn-default dropdown-toggle action-html-code" title="HTML code" data-toggle="dropdown" data-target=".panel-html-code"><i class="icon-code"></i></button>';
return buttonHtmlCodeHTML;
};
var selectedFileDesc = undefined;
@ -52,7 +52,6 @@ define([
};
buttonHtmlCode.onReady = function() {
$('#extension-preview-buttons').append($(buttonHtmlCodeHTML));
textareaElt = document.getElementById('input-html-code');
$(".action-html-code").click(function() {
_.defer(function() {

View File

@ -8,13 +8,9 @@ define([
buttonMarkdownSyntax.settingsBlock = '<p>Adds a "Markdown syntax" button over the preview.</p>';
buttonMarkdownSyntax.onCreatePreviewButton = function() {
return '<button class="btn btn-default dropdown-toggle" title="Markdown syntax" data-toggle="dropdown" data-target=".panel-markdown-syntax"><i class="icon-help-circled"></i></button>';
return buttonMarkdownSyntaxHTML;
};
buttonMarkdownSyntax.onReady = function() {
$('#extension-preview-buttons').append($(buttonMarkdownSyntaxHTML));
};
return buttonMarkdownSyntax;
});

View File

@ -1,6 +1,7 @@
<div class="panel-html-code">
<button class="btn btn-default dropdown-toggle action-html-code" title="HTML code" data-toggle="dropdown">
<i class="icon-code"></i>
</button>
<div class="dropdown-menu pull-right">
<h3>HTML code</h3>
<textarea id="input-html-code" class="form-control"></textarea>
</div>
</div>

View File

@ -1,4 +1,6 @@
<div class="panel-markdown-syntax">
<button class="btn btn-default dropdown-toggle" title="Markdown syntax" data-toggle="dropdown">
<i class="icon-help-circled"></i>
</button>
<div class="dropdown-menu pull-right">
<h3>Markdown syntax</h3>
<div class="markdown-syntax">
@ -140,4 +142,3 @@ Violets are blue.
<p class="muted">Based on the <a target="_blank" href="https://github.com/fletcher/MultiMarkdown/blob/master/Documentation/Markdown%20Syntax.md">Markdown syntax guide</a>, by Fletcher T. Penney.</p>
</div>
</div>
</div>

View File

@ -377,11 +377,16 @@ Override Bootstrap
* Preview extensions buttons
********************/
#extension-preview-buttons {
position: fixed;
.ui-layout-resizer-north, .ui-layout-resizer-south {
overflow: visible !important;
}
.extension-preview-buttons {
position: absolute;
top: 15px;
right: 25px;
top: auto;
z-index: 1;
font-size: 14px;
.dropdown-menu {
border: 0 !important;
margin-top: 1px;