Upgrade to Bootstrap 3

This commit is contained in:
benweet 2013-08-10 02:19:32 +01:00
parent 907c721459
commit 27322f3a98
3 changed files with 70 additions and 48 deletions

View File

@ -188,7 +188,7 @@ define([
togglerLength_closed: 60,
stateManagement__enabled: false,
center__minWidth: 200,
center__minHeight: 200,
center__minHeight: 100,
onopen: function() {
setPreviewButtonsVisibility();
},
@ -365,21 +365,25 @@ define([
editor.undoManager.reinit(initDocumentContent, fileDesc.editorStart, fileDesc.editorEnd, fileDesc.editorScrollTop);
// Hide default buttons
$(".wmd-button-row").addClass("btn-group").find("li:not(.wmd-spacer)").addClass("btn btn-success").css("left", 0).find("span").hide();
$(".wmd-button-row li").addClass("btn btn-success").css("left", 0).find("span").hide();
// Add customized buttons
$("#wmd-bold-button").append($('<i class="icon-bold">'));
$("#wmd-italic-button").append($('<i class="icon-italic">'));
$("#wmd-link-button").append($('<i class="icon-globe">'));
$("#wmd-quote-button").append($('<i class="icon-indent-right">'));
$("#wmd-code-button").append($('<i class="icon-code">'));
$("#wmd-image-button").append($('<i class="icon-picture">'));
$("#wmd-olist-button").append($('<i class="icon-list-numbered">'));
$("#wmd-ulist-button").append($('<i class="icon-list-bullet">'));
$("#wmd-heading-button").append($('<i class="icon-text-height">'));
$("#wmd-hr-button").append($('<i class="icon-ellipsis">'));
$("#wmd-undo-button").append($('<i class="icon-reply">'));
$("#wmd-redo-button").append($('<i class="icon-forward">'));
var btnGroupElt = $('.wmd-button-group1');
$("#wmd-bold-button").append($('<i class="icon-bold">')).appendTo(btnGroupElt);
$("#wmd-italic-button").append($('<i class="icon-italic">')).appendTo(btnGroupElt);
var btnGroupElt = $('.wmd-button-group2');
$("#wmd-link-button").append($('<i class="icon-globe">')).appendTo(btnGroupElt);
$("#wmd-quote-button").append($('<i class="icon-indent-right">')).appendTo(btnGroupElt);
$("#wmd-code-button").append($('<i class="icon-code">')).appendTo(btnGroupElt);
$("#wmd-image-button").append($('<i class="icon-picture">')).appendTo(btnGroupElt);
var btnGroupElt = $('.wmd-button-group3');
$("#wmd-olist-button").append($('<i class="icon-list-numbered">')).appendTo(btnGroupElt);
$("#wmd-ulist-button").append($('<i class="icon-list-bullet">')).appendTo(btnGroupElt);
$("#wmd-heading-button").append($('<i class="icon-text-height">')).appendTo(btnGroupElt);
$("#wmd-hr-button").append($('<i class="icon-ellipsis">')).appendTo(btnGroupElt);
var btnGroupElt = $('.wmd-button-group4');
$("#wmd-undo-button").append($('<i class="icon-reply">')).appendTo(btnGroupElt);
$("#wmd-redo-button").append($('<i class="icon-forward">')).appendTo(btnGroupElt);
eventMgr.onFileOpen(fileDesc);
};

View File

@ -1,20 +1,20 @@
<div class="navbar navbar-fixed-top ui-layout-north">
<div class="navbar-inner">
<div class="nav left-space"></div>
<div class="nav right-space pull-right"></div>
<ul class="nav">
<li><div id="wmd-button-bar"></div></li>
<li class="wmd-button-group1 btn-group"></li>
</ul>
<ul class="nav">
<li class="wmd-button-group2 btn-group"></li>
</ul>
<ul class="nav">
<li class="wmd-button-group3 btn-group"></li>
</ul>
<ul class="nav">
<li class="wmd-button-group4 btn-group"></li>
</ul>
<ul class="nav pull-right">
<li id="extension-buttons"></li>
<li class="btn-group"><button
class="btn btn-success action-create-file"
title="New local document">
<i class="icon-file"></i>
</button>
<button class="btn btn-success" title="Delete current document"
data-toggle="modal" data-target="#modal-remove-file-confirm">
<i class="icon-trash"></i>
</button></li>
<li>
<button data-toggle="dropdown" class="action-open-file hide"></button>
<ul class="dropdown-menu file-selector">
@ -27,11 +27,26 @@
</ul>
</li>
</ul>
<ul class="nav pull-right">
<li class="btn-group"><button
class="btn btn-success action-create-file"
title="New local document">
<i class="icon-file"></i>
</button>
<button class="btn btn-success" title="Delete current document"
data-toggle="modal" data-target="#modal-remove-file-confirm">
<i class="icon-trash"></i>
</button></li>
</ul>
<ul class="nav pull-right">
<li id="extension-buttons"></li>
</ul>
<ul class="nav pull-right">
<li><a class="btn btn-success file-title-navbar" href="#"
title="Rename current document"> </a></li>
<li><input type="text"
class="col-lg-4 form-control hide input-file-title" placeholder="Document title" /></li>
class="col-lg-4 form-control hide input-file-title"
placeholder="Document title" /></li>
</ul>
<ul class="nav pull-right">
<li><i class="working-indicator icon-none"></i></li>
@ -41,6 +56,7 @@
<textarea id="wmd-input" class="ui-layout-center form-control"></textarea>
<div class="ui-layout-east preview-container"></div>
<div class="ui-layout-south preview-container"></div>
<div id="wmd-button-bar" class="hide"></div>
<div class="menu-panel collapse width">
@ -59,10 +75,12 @@
<ul class="nav collapse collapse-open-from">
<li><a data-toggle="modal"
data-target="#modal-import-harddrive-markdown"
class="action-reset-input action-close-panel" 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"
data-target="#modal-import-harddrive-html"
class="action-reset-input action-close-panel" href="#">Convert HTML to Markdown</a></li>
class="action-reset-input action-close-panel" href="#">Convert
HTML to Markdown</a></li>
</ul>
<a href="#" data-toggle="collapse" data-target=".collapse-save-as"
@ -105,16 +123,17 @@
<ul class="nav collapse collapse-publish-on">
</ul>
<a href="#" data-toggle="modal" data-target="#modal-manage-publish"
class="action-reset-input list-group-item action-close-panel"><i class="icon-share"></i>
Manage publication</a>
class="action-reset-input list-group-item action-close-panel"><i
class="icon-share"></i> Manage publication</a>
</div>
<ul class="nav">
<li><a href="#" data-toggle="modal"
data-target="#modal-settings"
class="action-load-settings list-group-item action-close-panel"><i class="icon-cog"></i>
Settings</a></li>
class="action-load-settings list-group-item action-close-panel"><i
class="icon-cog"></i> Settings</a></li>
<li><a href="#" data-toggle="modal" data-target="#modal-about"
class="list-group-item action-close-panel"><i class="icon-help-circled"></i> About</a></li>
class="list-group-item action-close-panel"><i
class="icon-help-circled"></i> About</a></li>
</ul>
</div>
@ -128,12 +147,12 @@
</button>
<div class="panel-content">
<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 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>

View File

@ -81,10 +81,6 @@ Override Bootstrap
background-color: @bg-navbar-hover;
}
.btn-group {
margin-right: 10px;
}
// Last dropdown-toggle in a button-group (Bootstrap override)
.btn-group>.btn+.dropdown-toggle {
padding-right: 11px;
@ -164,13 +160,17 @@ Override Bootstrap
.navbar {
position: static;
padding: 0;
.navbar-inner {
margin-left: 50px;
margin-right: 30px;
.left-space {
width: 30px;
height: 38px;
}
.right-space {
width: 20px;
height: 38px;
}
.nav {
float: left;
margin: 6px 5px 0;
margin: 6px 10px 5px;
& > li {
display: inline-block;
}
@ -351,7 +351,6 @@ Override Bootstrap
********************/
#extension-buttons {
margin-right: 15px;
.btn-group {
margin: 0;
}