Upgrade to Bootstrap 3
This commit is contained in:
parent
25ca30ce28
commit
5225c111b4
29
js/core.js
29
js/core.js
@ -165,7 +165,8 @@ define([
|
|||||||
if(forceHide === true || layout.state.north.isClosed) {
|
if(forceHide === true || layout.state.north.isClosed) {
|
||||||
menuPanelElt.hide();
|
menuPanelElt.hide();
|
||||||
documentPanelElt.hide();
|
documentPanelElt.hide();
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
menuPanelElt.show();
|
menuPanelElt.show();
|
||||||
documentPanelElt.show();
|
documentPanelElt.show();
|
||||||
}
|
}
|
||||||
@ -418,13 +419,12 @@ define([
|
|||||||
menuPanelElt.on('shown.bs.collapse', function() {
|
menuPanelElt.on('shown.bs.collapse', function() {
|
||||||
isMenuPanelShown = true;
|
isMenuPanelShown = true;
|
||||||
// Register a click listener when menu panel is open
|
// Register a click listener when menu panel is open
|
||||||
$(document).on("click.hide-menu-panel", function(e) {
|
$('body').on('click.hide-menu-panel', '.action-close-panel, :not(.menu-panel, .menu-panel *)', function(e) {
|
||||||
if(!$(e.target).is('.menu-panel [data-toggle=collapse]')) {
|
// If click outside the panel, close the panel and unregister
|
||||||
// If click outside the panel, close the panel and unregister the listener
|
// the listener
|
||||||
menuPanelElt.collapse('hide');
|
menuPanelElt.collapse('hide');
|
||||||
$(document).off("click.hide-menu-panel");
|
$('body').off('click.hide-menu-panel');
|
||||||
isMenuPanelShown = false;
|
isMenuPanelShown = false;
|
||||||
}
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -433,13 +433,12 @@ define([
|
|||||||
documentPanelElt.on('shown.bs.collapse', function() {
|
documentPanelElt.on('shown.bs.collapse', function() {
|
||||||
isDocumentPanelShown = true;
|
isDocumentPanelShown = true;
|
||||||
// Register a click listener when document panel is open
|
// Register a click listener when document panel is open
|
||||||
$(document).on("click.hide-document-panel", function(e) {
|
$('body').on('click.hide-document-panel', '.action-close-panel, :not(.document-panel, .document-panel *)', function(e) {
|
||||||
if(!$(e.target).is('.document-panel [data-toggle=collapse]')) {
|
// If click outside the panel, close the panel and unregister
|
||||||
// If click outside the panel, close the panel and unregister the listener
|
// the listener
|
||||||
documentPanelElt.collapse('hide');
|
documentPanelElt.collapse('hide');
|
||||||
$(document).off("click.hide-document-panel");
|
$(document).off('click.hide-document-panel');
|
||||||
isDocumentPanelShown = false;
|
isDocumentPanelShown = false;
|
||||||
}
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -238,9 +238,15 @@ define([
|
|||||||
logger.log("onCreatePreviewButton");
|
logger.log("onCreatePreviewButton");
|
||||||
var onCreatePreviewButtonListenerList = getExtensionListenerList("onCreatePreviewButton");
|
var onCreatePreviewButtonListenerList = getExtensionListenerList("onCreatePreviewButton");
|
||||||
var extensionPreviewButtonsFragment = document.createDocumentFragment();
|
var extensionPreviewButtonsFragment = document.createDocumentFragment();
|
||||||
_.each(onCreatePreviewButtonListenerList, function(listener) {
|
var buttonGrpElt = crel('div', {
|
||||||
extensionPreviewButtonsFragment.appendChild(createBtn(listener));
|
class: 'btn-group'
|
||||||
});
|
});
|
||||||
|
extensionPreviewButtonsFragment.appendChild(buttonGrpElt);
|
||||||
|
var buttonGroupInnerHtml = "";
|
||||||
|
_.each(onCreatePreviewButtonListenerList, function(listener) {
|
||||||
|
buttonGroupInnerHtml += listener();
|
||||||
|
});
|
||||||
|
buttonGrpElt.innerHTML = buttonGroupInnerHtml;
|
||||||
document.getElementById('extension-preview-buttons').appendChild(extensionPreviewButtonsFragment);
|
document.getElementById('extension-preview-buttons').appendChild(extensionPreviewButtonsFragment);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ define([
|
|||||||
};
|
};
|
||||||
|
|
||||||
buttonHtmlCode.onCreatePreviewButton = function() {
|
buttonHtmlCode.onCreatePreviewButton = function() {
|
||||||
return buttonHtmlCodeHTML;
|
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>';
|
||||||
};
|
};
|
||||||
|
|
||||||
var selectedFileDesc = undefined;
|
var selectedFileDesc = undefined;
|
||||||
@ -52,6 +52,7 @@ define([
|
|||||||
};
|
};
|
||||||
|
|
||||||
buttonHtmlCode.onReady = function() {
|
buttonHtmlCode.onReady = function() {
|
||||||
|
$('#extension-preview-buttons').append($(buttonHtmlCodeHTML));
|
||||||
textareaElt = document.getElementById('input-html-code');
|
textareaElt = document.getElementById('input-html-code');
|
||||||
$(".action-html-code").click(function() {
|
$(".action-html-code").click(function() {
|
||||||
_.defer(function() {
|
_.defer(function() {
|
||||||
|
@ -8,7 +8,11 @@ define([
|
|||||||
buttonMarkdownSyntax.settingsBlock = '<p>Adds a "Markdown syntax" button over the preview.</p>';
|
buttonMarkdownSyntax.settingsBlock = '<p>Adds a "Markdown syntax" button over the preview.</p>';
|
||||||
|
|
||||||
buttonMarkdownSyntax.onCreatePreviewButton = function() {
|
buttonMarkdownSyntax.onCreatePreviewButton = function() {
|
||||||
return buttonMarkdownSyntaxHTML;
|
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>';
|
||||||
|
};
|
||||||
|
|
||||||
|
buttonMarkdownSyntax.onReady = function() {
|
||||||
|
$('#extension-preview-buttons').append($(buttonMarkdownSyntaxHTML));
|
||||||
};
|
};
|
||||||
|
|
||||||
return buttonMarkdownSyntax;
|
return buttonMarkdownSyntax;
|
||||||
|
@ -62,10 +62,10 @@ define([
|
|||||||
var fileSelectorElt = $(".file-selector");
|
var fileSelectorElt = $(".file-selector");
|
||||||
fileSelectorElt.empty();
|
fileSelectorElt.empty();
|
||||||
var documentPanelSelectorElt = $(".document-panel > .panel-content > .list-group");
|
var documentPanelSelectorElt = $(".document-panel > .panel-content > .list-group");
|
||||||
documentPanelSelectorElt.empty();
|
documentPanelSelectorElt.find('.list-group-item').remove();
|
||||||
_.chain(fileSystem).sortBy(sortFunction).each(function(fileDesc) {
|
_.chain(fileSystem).sortBy(sortFunction).each(function(fileDesc) {
|
||||||
var a = $('<a href="#">').html(composeTitle(fileDesc));
|
var a = $('<a href="#">').html(composeTitle(fileDesc));
|
||||||
var documentPanelItemElt = a.clone().addClass('list-group-item');
|
var documentPanelItemElt = a.clone().addClass('list-group-item action-close-panel');
|
||||||
documentPanelItemElt.add(a).click(function() {
|
documentPanelItemElt.add(a).click(function() {
|
||||||
if(!liMap[fileDesc.fileIndex].is(".disabled")) {
|
if(!liMap[fileDesc.fileIndex].is(".disabled")) {
|
||||||
fileMgr.selectFile(fileDesc);
|
fileMgr.selectFile(fileDesc);
|
||||||
|
@ -59,10 +59,10 @@
|
|||||||
<ul class="nav collapse collapse-open-from">
|
<ul class="nav collapse collapse-open-from">
|
||||||
<li><a data-toggle="modal"
|
<li><a data-toggle="modal"
|
||||||
data-target="#modal-import-harddrive-markdown"
|
data-target="#modal-import-harddrive-markdown"
|
||||||
class="action-reset-input" href="#">Import from hard drive</a></li>
|
class="action-reset-input action-close-panel" href="#">Import from hard drive</a></li>
|
||||||
<li><a data-toggle="modal"
|
<li><a data-toggle="modal"
|
||||||
data-target="#modal-import-harddrive-html"
|
data-target="#modal-import-harddrive-html"
|
||||||
class="action-reset-input" href="#">Convert HTML to Markdown</a></li>
|
class="action-reset-input action-close-panel" href="#">Convert HTML to Markdown</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<a href="#" data-toggle="collapse" data-target=".collapse-save-as"
|
<a href="#" data-toggle="collapse" data-target=".collapse-save-as"
|
||||||
@ -95,7 +95,7 @@
|
|||||||
to Dropbox</a></li>
|
to Dropbox</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<a href="#" data-toggle="modal" data-target="#modal-manage-sync"
|
<a href="#" data-toggle="modal" data-target="#modal-manage-sync"
|
||||||
class="action-reset-input list-group-item"><i
|
class="action-reset-input list-group-item action-close-panel"><i
|
||||||
class="icon-refresh"></i> Manage synchronization</a>
|
class="icon-refresh"></i> Manage synchronization</a>
|
||||||
</div>
|
</div>
|
||||||
<div class=dropdown-header>PUBLISH</div>
|
<div class=dropdown-header>PUBLISH</div>
|
||||||
@ -105,7 +105,7 @@
|
|||||||
<ul class="nav collapse collapse-publish-on">
|
<ul class="nav collapse collapse-publish-on">
|
||||||
</ul>
|
</ul>
|
||||||
<a href="#" data-toggle="modal" data-target="#modal-manage-publish"
|
<a href="#" data-toggle="modal" data-target="#modal-manage-publish"
|
||||||
class="action-reset-input list-group-item"><i class="icon-share"></i>
|
class="action-reset-input list-group-item action-close-panel"><i class="icon-share"></i>
|
||||||
Manage publication</a>
|
Manage publication</a>
|
||||||
</div>
|
</div>
|
||||||
<ul class="nav">
|
<ul class="nav">
|
||||||
@ -128,6 +128,10 @@
|
|||||||
</button>
|
</button>
|
||||||
<div class="panel-content">
|
<div class="panel-content">
|
||||||
<div class="list-group">
|
<div class="list-group">
|
||||||
|
<div class="input-group">
|
||||||
|
<span class="input-group-addon"><i class="icon-search"></i></span><input
|
||||||
|
type="text" class="form-control"></input>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<button class="btn btn-default dropdown-toggle action-html-code" title="HTML code" data-toggle="dropdown">
|
<div class="panel-html-code">
|
||||||
<i class="icon-code"></i>
|
|
||||||
</button>
|
|
||||||
<div class="dropdown-menu pull-right">
|
<div class="dropdown-menu pull-right">
|
||||||
<h3>HTML code</h3>
|
<h3>HTML code</h3>
|
||||||
<textarea id="input-html-code" class="form-control"></textarea>
|
<textarea id="input-html-code" class="form-control"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
<button class="btn btn-default dropdown-toggle" title="Markdown syntax" data-toggle="dropdown">
|
<div class="panel-markdown-syntax">
|
||||||
<i class="icon-help-circled"></i>
|
|
||||||
</button>
|
|
||||||
<div class="dropdown-menu pull-right">
|
<div class="dropdown-menu pull-right">
|
||||||
<h3>Markdown syntax</h3>
|
<h3>Markdown syntax</h3>
|
||||||
<div class="markdown-syntax">
|
<div class="markdown-syntax">
|
||||||
@ -142,3 +140,4 @@ 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>
|
<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>
|
</div>
|
||||||
|
</div>
|
@ -7,7 +7,7 @@
|
|||||||
@icon-color: #525252;
|
@icon-color: #525252;
|
||||||
@icon-color-inv: #fff;
|
@icon-color-inv: #fff;
|
||||||
@menu-panel-width: 250px;
|
@menu-panel-width: 250px;
|
||||||
@document-panel-width: 250px;
|
@document-panel-width: 300px;
|
||||||
@panel-bg: @bg-navbar-hover;
|
@panel-bg: @bg-navbar-hover;
|
||||||
@transparent: fade(#000, 0%);
|
@transparent: fade(#000, 0%);
|
||||||
|
|
||||||
@ -259,7 +259,7 @@ Override Bootstrap
|
|||||||
padding-bottom: 25px;
|
padding-bottom: 25px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
i {
|
a > i {
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
@ -276,6 +276,9 @@ Override Bootstrap
|
|||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.input-group {
|
||||||
|
padding: 15px 20px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -375,13 +378,10 @@ Override Bootstrap
|
|||||||
********************/
|
********************/
|
||||||
|
|
||||||
#extension-preview-buttons {
|
#extension-preview-buttons {
|
||||||
&,
|
position: absolute;
|
||||||
.dropdown-menu {
|
right: 25px;
|
||||||
position: fixed;
|
top: auto;
|
||||||
right: 25px;
|
z-index: 1;
|
||||||
top: auto;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
.dropdown-menu {
|
.dropdown-menu {
|
||||||
border: 0 !important;
|
border: 0 !important;
|
||||||
margin-top: 1px;
|
margin-top: 1px;
|
||||||
|
4
tools/increment_version
Executable file
4
tools/increment_version
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
version_minor=`sed 's/.*-\([0-9]*\)/\1/' version`
|
||||||
|
((version_minor++))
|
||||||
|
sed -i '' "s/\(.*-\)[0-9]*/\1$version_minor/" version
|
Loading…
Reference in New Issue
Block a user