Upgrade to Bootstrap 3

This commit is contained in:
benweet 2013-08-22 02:19:59 +02:00
parent 5d06c75e23
commit 109bce8e28
30 changed files with 267 additions and 432 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 404 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@ -13,11 +13,11 @@
height="200"
id="svg2"
version="1.1"
inkscape:version="0.48.4 r9939"
inkscape:version="0.48.2 r9819"
sodipodi:docname="stackedit-promo.svg"
inkscape:export-filename="C:\Documents and Settings\g550003\Mes documents\Mes images\stackedit-promo.png"
inkscape:export-xdpi="27"
inkscape:export-ydpi="27">
inkscape:export-filename="/Users/g550003/workspace/stackedit/img/stackedit-promo.png"
inkscape:export-xdpi="54"
inkscape:export-ydpi="54">
<defs
id="defs4" />
<sodipodi:namedview
@ -28,15 +28,15 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.70710678"
inkscape:cx="615.19651"
inkscape:cy="-117.83362"
inkscape:cx="681.08785"
inkscape:cy="-71.421139"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1920"
inkscape:window-height="1143"
inkscape:window-x="-4"
inkscape:window-y="-4"
inkscape:window-width="1680"
inkscape:window-height="918"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
@ -78,7 +78,7 @@
id="tspan2995">edit</tspan></tspan></text>
<g
id="g3013"
transform="matrix(5.1237266,0,0,5.1237266,-369.65277,-4165.4739)">
transform="matrix(5.4895348,0,0,5.4895348,-409.28558,-4529.9871)">
<path
sodipodi:nodetypes="cccc"
inkscape:connector-curvature="0"

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@ -162,27 +162,27 @@ define([
// Set the panels visibility
var layout = undefined;
var menuPanelElt = undefined;
var documentPanelElt = undefined;
var $menuPanelElt = undefined;
var $documentPanelElt = undefined;
function setPanelVisibility(forceHide) {
if(forceHide === true || layout.state.north.isClosed) {
menuPanelElt.hide();
documentPanelElt.hide();
$menuPanelElt.hide();
$documentPanelElt.hide();
}
else {
menuPanelElt.show();
documentPanelElt.show();
$menuPanelElt.show();
$documentPanelElt.show();
}
}
// Set the preview button visibility
var previewButtonsElt = undefined;
var $previewButtonsElt = undefined;
function setPreviewButtonsVisibility(forceHide) {
if(forceHide === true || layout.state.east.isClosed) {
previewButtonsElt.hide();
$previewButtonsElt.hide();
}
else {
previewButtonsElt.show();
$previewButtonsElt.show();
}
}
@ -241,19 +241,19 @@ define([
});
$(".ui-layout-toggler-south").addClass("btn btn-info").html('<i class="icon-none"></i>');
$(".ui-layout-toggler-east").addClass("btn btn-info").html('<i class="icon-none"></i>');
var northTogglerElt = $(".ui-layout-toggler-north").addClass("btn btn-info").html('<i class="icon-none"></i>');
var $northTogglerElt = $(".ui-layout-toggler-north").addClass("btn btn-info").html('<i class="icon-none"></i>');
// We attach the preview buttons to the UI layout resizer in order to
// have fixed position
// We also move the north toggler to the east or south resizer as the
// north resizer is very small
previewButtonsElt = $('<div class="extension-preview-buttons">');
$previewButtonsElt = $('<div class="extension-preview-buttons">');
if(settings.layoutOrientation == "horizontal") {
$('.ui-layout-resizer-north').append(previewButtonsElt);
$('.ui-layout-resizer-east').append(northTogglerElt);
$('.ui-layout-resizer-north').append($previewButtonsElt);
$('.ui-layout-resizer-east').append($northTogglerElt);
}
else {
$('.ui-layout-resizer-south').append(previewButtonsElt).append(northTogglerElt);
$('.ui-layout-resizer-south').append($previewButtonsElt).append($northTogglerElt);
}
setPanelVisibility();
@ -282,7 +282,7 @@ define([
editor.refreshPreview();
return;
}
var previewContainerElt = $(".preview-container");
var $previewContainerElt = $(".preview-container");
// Store editor scrollTop on scroll event
$editorElt.scroll(function() {
@ -298,7 +298,7 @@ define([
}
});
// Store preview scrollTop on scroll event
previewContainerElt.scroll(function() {
$previewContainerElt.scroll(function() {
if(documentContent !== undefined) {
fileDesc.previewScrollTop = $(this).scrollTop();
}
@ -306,7 +306,7 @@ define([
// Create the converter and the editor
var converter = new Markdown.Converter();
// Create MD sections for extensions
// Parse MD sections for extensions
converter.hooks.chain("preConversion", function(text) {
eventMgr.previewStartTime = new Date();
var tmpText = text + "\n\n";
@ -362,7 +362,7 @@ define([
if(documentContent === undefined) {
makePreview();
$editorElt.scrollTop(fileDesc.editorScrollTop);
previewContainerElt.scrollTop(fileDesc.previewScrollTop);
$previewContainerElt.scrollTop(fileDesc.previewScrollTop);
}
else {
debouncedMakePreview();
@ -376,7 +376,7 @@ define([
return function() {
makePreview();
if(documentContent === undefined) {
previewContainerElt.scrollTop(fileDesc.previewScrollTop);
$previewContainerElt.scrollTop(fileDesc.previewScrollTop);
}
checkDocumentChanges();
};
@ -391,22 +391,22 @@ define([
$(".wmd-button-row li").addClass("btn btn-success").css("left", 0).find("span").hide();
// Add customized buttons
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);
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);
};
@ -431,10 +431,10 @@ define([
var isMenuPanelShown = false;
core.onReady = function() {
if(viewerMode === true) {
$('body').html(bodyViewerHTML);
document.body.innerHTML = bodyViewerHTML;
}
else {
$('body').html(bodyIndexHTML);
document.body.innerHTML = bodyIndexHTML;
}
// listen to online/offline events
@ -452,57 +452,57 @@ define([
e.stopPropagation();
});
menuPanelElt = $('.menu-panel').collapse({
$menuPanelElt = $('.menu-panel').collapse({
toggle: false
});
var menuPanelBackdropElt = undefined;
menuPanelElt.on('show.bs.collapse', function(e) {
if(e.target === menuPanelElt[0]) {
$menuPanelElt.on('show.bs.collapse', function(e) {
if(e.target === $menuPanelElt[0]) {
isMenuPanelShown = true;
menuPanelBackdropElt = utils.createBackdrop('collapse', '.menu-panel');
menuPanelElt.addClass('move-to-front');
$menuPanelElt.addClass('move-to-front');
}
else {
// Close all open sub-menus when one submenu opens
menuPanelElt.find('.in').collapse('hide');
$menuPanelElt.find('.in').collapse('hide');
}
}).on('hide.bs.collapse', function(e) {
if(e.target === menuPanelElt[0]) {
if(e.target === $menuPanelElt[0]) {
isMenuPanelShown = false;
menuPanelBackdropElt.remove();
menuPanelElt.removeClass('move-to-front');
$menuPanelElt.removeClass('move-to-front');
}
}).on('hidden.bs.collapse', function(e) {
if(e.target === menuPanelElt[0]) {
if(e.target === $menuPanelElt[0]) {
// Close all open sub-menus when menu panel is closed
menuPanelElt.find('.in').collapse('hide');
$menuPanelElt.find('.in').collapse('hide');
}
});
documentPanelElt = $('.document-panel').collapse({
$documentPanelElt = $('.document-panel').collapse({
toggle: false
});
var documentPanelBackdropElt = undefined;
documentPanelElt.on('show.bs.collapse', function(e) {
if(e.target === documentPanelElt[0]) {
$documentPanelElt.on('show.bs.collapse', function(e) {
if(e.target === $documentPanelElt[0]) {
isDocumentPanelShown = true;
documentPanelBackdropElt = utils.createBackdrop('collapse', '.document-panel');
documentPanelElt.addClass('move-to-front');
$documentPanelElt.addClass('move-to-front');
}
else {
// Close all open sub-menus when one submenu opens
documentPanelElt.find('.in').collapse('hide');
$documentPanelElt.find('.in').collapse('hide');
}
}).on('hide.bs.collapse', function(e) {
if(e.target === documentPanelElt[0]) {
if(e.target === $documentPanelElt[0]) {
isDocumentPanelShown = false;
documentPanelBackdropElt.remove();
documentPanelElt.removeClass('move-to-front');
$documentPanelElt.removeClass('move-to-front');
}
}).on('hidden.bs.collapse', function(e) {
if(e.target === documentPanelElt[0]) {
if(e.target === $documentPanelElt[0]) {
// Close all open sub-menus when menu panel is closed
documentPanelElt.find('.in').collapse('hide');
$documentPanelElt.find('.in').collapse('hide');
}
});
@ -549,8 +549,8 @@ define([
var isModalShown = false;
$('.modal').on('show.bs.modal', function() {
// Close panel if open
menuPanelElt.collapse('hide');
documentPanelElt.collapse('hide');
$menuPanelElt.collapse('hide');
$documentPanelElt.collapse('hide');
isModalShown = true;
}).on('shown.bs.modal', function() {
// Focus on the first input when modal opens

View File

@ -8,6 +8,7 @@ define([
"text!html/settingsExtensionsAccordion.html",
"extensions/partialRendering",
"extensions/userCustom",
"extensions/buttonMarkdownSyntax",
"extensions/googleAnalytics",
"extensions/dialogAbout",
"extensions/dialogManagePublication",
@ -29,7 +30,6 @@ define([
"extensions/buttonShare",
"extensions/buttonStat",
"extensions/buttonHtmlCode",
"extensions/buttonMarkdownSyntax",
"extensions/buttonViewer",
"libs/bootstrap/bootstrap",
"libs/jquery.waitforimages"
@ -177,7 +177,7 @@ define([
// The number of times we expect tryFinished to be called
var nbAsyncPreviewListener = onAsyncPreviewListenerList.length + 1;
var previewContentsElt = undefined;
var previewContentsJQElt = undefined;
var $previewContentsElt = undefined;
eventMgr["onAsyncPreview"] = function() {
logger.log("onAsyncPreview");
logger.log("Conversion time: " + (new Date() - eventMgr.previewStartTime));
@ -196,7 +196,7 @@ define([
}
}
// We assume images are loading in the preview
previewContentsJQElt.waitForImages(tryFinished);
$previewContentsElt.waitForImages(tryFinished);
_.each(onAsyncPreviewListenerList, function(asyncPreviewListener) {
asyncPreviewListener(tryFinished);
});
@ -205,7 +205,7 @@ define([
var onReady = createEventHook("onReady");
eventMgr["onReady"] = function() {
previewContentsElt = document.getElementById('preview-contents');
previewContentsJQElt = $(previewContentsElt);
$previewContentsElt = $(previewContentsElt);
if(viewerMode === false) {
// Create accordion in settings dialog
@ -256,13 +256,13 @@ define([
previewButtonsElt.appendChild(extensionPreviewButtonsFragment);
// A bit of jQuery...
previewButtonsElt = $(previewButtonsElt);
var previewButtonsWidth = previewButtonsElt.width();
previewButtonsElt.find('.btn-group').each(function() {
var btnGroupElt = $(this);
var $previewButtonsElt = $(previewButtonsElt);
var previewButtonsWidth = $previewButtonsElt.width();
$previewButtonsElt.find('.btn-group').each(function() {
var $btnGroupElt = $(this);
// Align dropdown to the left of the screen
btnGroupElt.find('.dropdown-menu').css({
right: -previewButtonsWidth + btnGroupElt.width() + btnGroupElt.position().left
$btnGroupElt.find('.dropdown-menu').css({
right: -previewButtonsWidth + $btnGroupElt.width() + $btnGroupElt.position().left
});
});

View File

@ -58,7 +58,7 @@ define([
$("#input-html-code").each(function() {
if($(this).is(":hidden"))
return;
$(this).get(0).select();
this.select();
});
});
});

View File

@ -34,8 +34,9 @@ define([
};
buttonPublish.onCreateButton = function() {
button = $(buttonPublishHTML).click(function() {
if(!$(this).hasClass("disabled")) {
var $buttonPublishHTML = $(buttonPublishHTML);
button = $buttonPublishHTML.click(function() {
if(!$buttonPublishHTML.hasClass("disabled")) {
publisher.publish();
}
});

View File

@ -6,7 +6,7 @@ define([
"text!html/buttonShareLocation.html",
], function($, _, Extension, buttonShareHTML, buttonShareLocationHTML) {
var buttonShare = new Extension("buttonShare", 'Button "Share"', true);
var buttonShare = new Extension("buttonShare", 'Button "Share"', true, true);
buttonShare.settingsBlock = '<p>Adds a "Share document" button in the navigation bar.</p>';
buttonShare.onCreateButton = function() {
@ -14,24 +14,23 @@ define([
};
var fileDesc = undefined;
var linkListElt = undefined;
var $noLinkElt = undefined;
var refreshDocumentSharing = function(fileDescParameter) {
if(fileDescParameter !== undefined && fileDescParameter !== fileDesc) {
return;
}
var linkList = $(".link-container .link-list").empty();
$(".link-container .no-link").show();
var attributesList = _.values(fileDesc.publishLocations);
_.each(attributesList, function(attributes) {
var linkListHtml = _.reduce(fileDesc.publishLocations, function(result, attributes) {
if(attributes.sharingLink) {
var lineElement = $(_.template(buttonShareLocationHTML, {
result += _.template(buttonShareLocationHTML, {
link: attributes.sharingLink
}));
linkList.append(lineElement);
$(".link-container .no-link").hide();
});
}
});
return result;
}, '');
linkListElt.innerHTML = linkListHtml;
$noLinkElt.toggleClass('hide', linkListHtml.length !== 0);
};
buttonShare.onFileSelected = function(fileDescParameter) {
@ -41,6 +40,12 @@ define([
buttonShare.onNewPublishSuccess = refreshDocumentSharing;
buttonShare.onPublishRemoved = refreshDocumentSharing;
buttonShare.onReady = function() {
var linkContainerElt = document.querySelector('.link-container');
linkListElt = linkContainerElt.querySelector('.link-list');
$noLinkElt = $(linkContainerElt.querySelector('.no-link'));
};
return buttonShare;

View File

@ -1,11 +1,11 @@
define([
"jquery",
"underscore",
"crel",
"utils",
"classes/Extension",
"text!html/buttonSync.html",
"text!html/buttonSyncSettingsBlock.html",
], function($, _, utils, Extension, buttonSyncHTML, buttonSyncSettingsBlockHTML) {
], function($, _, crel, utils, Extension, buttonSyncSettingsBlockHTML) {
var buttonSync = new Extension("buttonSync", 'Button "Synchronize"');
buttonSync.settingsBlock = buttonSyncSettingsBlockHTML;
@ -26,19 +26,19 @@ define([
synchronizer = synchronizerParameter;
};
var button = undefined;
var $button = undefined;
var syncRunning = false;
var isOffline = false;
// Enable/disable the button
var updateButtonState = function() {
if(button === undefined) {
if($button === undefined) {
return;
}
if(syncRunning === true || synchronizer.hasSync() === false || isOffline) {
button.addClass("disabled");
$button.addClass("disabled");
}
else {
button.removeClass("disabled");
$button.removeClass("disabled");
}
};
@ -54,12 +54,17 @@ define([
};
buttonSync.onCreateButton = function() {
button = $(buttonSyncHTML).click(function() {
var button = crel('button', {
class: 'btn btn-success'
}, crel('i', {
class: 'icon-refresh'
}));
$button = $(button).click(function() {
if(!$(this).hasClass("disabled")) {
synchronizer.sync();
}
});
return button[0];
return button;
};
buttonSync.onReady = updateButtonState;

View File

@ -60,9 +60,9 @@ define([
selectedFolderList = [];
selectedDocumentList = [];
_.each(documentListElt.querySelectorAll('input[type="checkbox"]:checked'), function(checkboxElt) {
var parentElt = $(checkboxElt.parentNode.parentNode);
var folderDesc = folderList[parentElt.data('folderIndex')];
var fileDesc = fileSystem[parentElt.data('fileIndex')];
var $parentElt = $(checkboxElt.parentNode.parentNode);
var folderDesc = folderList[$parentElt.data('folderIndex')];
var fileDesc = fileSystem[$parentElt.data('fileIndex')];
if(folderDesc !== undefined) {
selectedFolderList.push(folderDesc);
}
@ -110,18 +110,18 @@ define([
eventMgr.onFoldersChanged();
}
var liMoveElt = undefined;
var liDeleteElt = undefined;
var $liMoveElt = undefined;
var $liDeleteElt = undefined;
function doActiveButtons() {
doSelect();
liMoveElt.toggleClass('disabled', _.size(folderList) === 0 || _.size(selectedDocumentList) === 0);
liDeleteElt.toggleClass('disabled', _.size(selectedFolderList) === 0 && _.size(selectedDocumentList) === 0);
$liMoveElt.toggleClass('disabled', _.size(folderList) === 0 || _.size(selectedDocumentList) === 0);
$liDeleteElt.toggleClass('disabled', _.size(selectedFolderList) === 0 && _.size(selectedDocumentList) === 0);
}
var orphanDocumentList = undefined;
var documentCountElt = undefined;
var folderCountElt = undefined;
var $documentCountElt = undefined;
var $folderCountElt = undefined;
var refreshManager = function() {
if(isVisible === false) {
return;
@ -130,8 +130,8 @@ define([
doActiveButtons();
// Refresh file/folder counters
documentCountElt.text(_.size(fileSystem));
folderCountElt.text(_.size(folderList) + 1);
$documentCountElt.text(_.size(fileSystem));
$folderCountElt.text(_.size(folderList) + 1);
// List orphan documents
orphanDocumentList = _.filter(fileSystem, function(fileDesc) {
@ -183,12 +183,12 @@ define([
// Set delete event listeners
_.each(documentListElt.querySelectorAll('.button-delete'), function(buttonElt) {
buttonElt = $(buttonElt);
buttonElt.click(function(e) {
var $buttonElt = $(buttonElt);
$buttonElt.click(function(e) {
e.stopPropagation();
var parentElt = buttonElt.parent();
var folderDesc = folderList[parentElt.data('folderIndex')];
var fileDesc = fileSystem[parentElt.data('fileIndex')];
var $parentElt = $buttonElt.parent();
var folderDesc = folderList[$parentElt.data('folderIndex')];
var fileDesc = fileSystem[$parentElt.data('fileIndex')];
selectedDocumentList = [];
selectedFolderList = [];
if(folderDesc) {
@ -204,28 +204,28 @@ define([
// Set rename event listeners
_.each(documentListElt.querySelectorAll('.button-rename'), function(buttonElt) {
buttonElt = $(buttonElt);
buttonElt.click(function(e) {
var $buttonElt = $(buttonElt);
$buttonElt.click(function(e) {
e.stopPropagation();
var parentElt = buttonElt.parent();
var $parentElt = $buttonElt.parent();
var name = undefined;
var folderDesc = folderList[parentElt.data('folderIndex')];
var fileDesc = fileSystem[parentElt.data('fileIndex')];
var folderDesc = folderList[$parentElt.data('folderIndex')];
var fileDesc = fileSystem[$parentElt.data('fileIndex')];
if(folderDesc) {
name = folderDesc.name;
}
else if(fileDesc) {
name = fileDesc.title;
}
parentElt.find('.name').addClass('hide');
parentElt.find('.input-rename').removeClass('hide').val(name)[0].select();
$parentElt.find('.name').addClass('hide');
$parentElt.find('.input-rename').removeClass('hide').val(name)[0].select();
});
});
_.each(documentListElt.querySelectorAll('.input-rename'), function(inputElt) {
inputElt = $(inputElt);
var $inputElt = $(inputElt);
function rename() {
var parentElt = inputElt.parent();
var name = $.trim(inputElt.val());
var parentElt = $inputElt.parent();
var name = $.trim($inputElt.val());
var folderDesc = folderList[parentElt.data('folderIndex')];
var fileDesc = fileSystem[parentElt.data('fileIndex')];
if(name && folderDesc && name != folderDesc.name) {
@ -237,11 +237,11 @@ define([
eventMgr.onTitleChanged(fileDesc);
}
else {
inputElt.addClass('hide');
$inputElt.addClass('hide');
parentElt.find('.name').removeClass('hide');
}
}
inputElt.blur(function() {
$inputElt.blur(function() {
rename();
}).keyup(function(e) {
if(e.keyCode == 13) {
@ -249,7 +249,7 @@ define([
e.stopPropagation();
}
if(e.keyCode == 27) {
inputElt.val('');
$inputElt.val('');
rename();
e.stopPropagation();
}
@ -258,11 +258,11 @@ define([
// Set folder checkbox special behavior
_.each(documentListElt.querySelectorAll('.folder .checkbox'), function(checkboxElt) {
checkboxElt = $(checkboxElt);
checkboxElt.click(function(e) {
var $checkboxElt = $(checkboxElt);
$checkboxElt.click(function(e) {
e.stopPropagation();
}).find('[type=checkbox]').change(function() {
var documentCheckboxElts = checkboxElt.parent().next().find('[type=checkbox]');
var documentCheckboxElts = $checkboxElt.parent().next().find('[type=checkbox]');
if(this.checked) {
documentCheckboxElts.prop('checked', true).prop('disabled', true);
}
@ -288,8 +288,8 @@ define([
documentManager.onReady = function() {
modalElt = document.querySelector('.modal-document-manager');
documentListElt = modalElt.querySelector('.list-group.document-list');
documentCountElt = $(modalElt.querySelectorAll('.document-count'));
folderCountElt = $(modalElt.querySelectorAll('.folder-count'));
$documentCountElt = $(modalElt.querySelectorAll('.document-count'));
$folderCountElt = $(modalElt.querySelectorAll('.folder-count'));
selectedDocumentListElt = modalElt.querySelector('.list-group.selected-document-list');
var selectFolderListElt = modalElt.querySelector('.list-group.select-folder-list');
@ -332,15 +332,15 @@ define([
});
// Delete selection actions
var aDeleteElt = $(modalElt.querySelectorAll('.action-delete-items')).click(function() {
if(liDeleteElt.hasClass('disabled')) {
var $aDeleteElt = $(modalElt.querySelectorAll('.action-delete-items')).click(function() {
if($liDeleteElt.hasClass('disabled')) {
return;
}
doSelect();
doDeleteConfirmation();
});
liDeleteElt = aDeleteElt.parent();
$liDeleteElt = $aDeleteElt.parent();
// Delete confirmation actions
$(modalElt.querySelectorAll('.action-delete-items-confirm')).click(function() {
@ -351,8 +351,8 @@ define([
});
// Move selection actions
var aMoveElt = $(modalElt.querySelectorAll('.action-move-items')).click(function() {
if(liMoveElt.hasClass('disabled')) {
var $aMoveElt = $(modalElt.querySelectorAll('.action-move-items')).click(function() {
if($liMoveElt.hasClass('disabled')) {
return;
}
@ -396,7 +396,7 @@ define([
$(modalElt.querySelectorAll('.document-list')).addClass('hide');
$(modalElt.querySelectorAll('.choose-folder, .select-folder-list')).removeClass('hide');
});
liMoveElt = aMoveElt.parent();
$liMoveElt = $aMoveElt.parent();
// Cancel button
$(modalElt.querySelectorAll('.action-cancel')).click(function() {

View File

@ -96,9 +96,9 @@ define([
// Add click listeners
_.each(documentListElt.querySelectorAll('.file'), function(fileElt) {
fileElt = $(fileElt);
fileElt.click(function(e) {
var fileDesc = fileSystem[fileElt.data('fileIndex')];
var $fileElt = $(fileElt);
$fileElt.click(function(e) {
var fileDesc = fileSystem[$fileElt.data('fileIndex')];
if(fileDesc && fileDesc !== selectedFileDesc) {
fileMgr.selectFile(fileDesc);
}

View File

@ -90,23 +90,6 @@ define([
documentSelector.onNewPublishSuccess = buildSelector;
documentSelector.onPublishRemoved = buildSelector;
// Filter for search input in file selector
function filterFileSelector(filter) {
var liList = $(".file-selector > li");
liList.show();
if(filter) {
var words = filter.toLowerCase().split(/\s+/);
liList.each(function() {
var fileTitle = $(this).text().toLowerCase();
if(_.some(words, function(word) {
return fileTitle.indexOf(word) === -1;
})) {
$(this).hide();
}
});
}
}
documentSelector.onReady = function() {
$editorElt = $("#wmd-input");
@ -129,9 +112,9 @@ define([
}), dropdownElt));
var $dropdownElt = $(dropdownElt).dropdown();
var documentPanelTogglerElt = $('.document-panel .collapse-button');
documentPanelTogglerElt.prop("title", _.template("<%= title %> <%= shortcutPrevious %> <%= shortcutNext %>", {
title: documentPanelTogglerElt.prop("title"),
var $documentPanelTogglerElt = $('.document-panel .collapse-button');
$documentPanelTogglerElt.prop("title", _.template("<%= title %> <%= shortcutPrevious %> <%= shortcutNext %>", {
title: $documentPanelTogglerElt.prop("title"),
shortcutPrevious: documentSelector.config.shortcutPrevious,
shortcutNext: documentSelector.config.shortcutNext
}));

View File

@ -15,9 +15,9 @@ define([
sectionList = sectionListParam;
};
var editorElt = undefined;
var previewElt = undefined;
var textareaElt = undefined;
var $editorElt = undefined;
var $previewElt = undefined;
var $textareaElt = undefined;
var mdSectionList = [];
var htmlSectionList = [];
function pxToFloat(px) {
@ -30,16 +30,16 @@ define([
// Try to find Markdown sections by looking for titles
mdSectionList = [];
// It has to be the same width as wmd-input
textareaElt.width(editorElt.width());
$textareaElt.width($editorElt.width());
// Consider wmd-input top padding (will be used for 1st and last
// section)
var padding = pxToFloat(editorElt.css('padding-top'));
var padding = pxToFloat($editorElt.css('padding-top'));
var mdSectionOffset = 0;
function addMdSection(sectionText) {
var sectionHeight = padding;
if(sectionText.length !== 0) {
textareaElt.val(sectionText);
sectionHeight += textareaElt.prop('scrollHeight');
if(sectionText !== undefined) {
$textareaElt.val(sectionText);
sectionHeight += $textareaElt.prop('scrollHeight');
}
var newSectionOffset = mdSectionOffset + sectionHeight;
mdSectionList.push({
@ -52,14 +52,18 @@ define([
}
_.each(sectionList, function(sectionText, index) {
if(index !== sectionList.length - 1) {
// Remove the last \n preceding the next title
sectionText = sectionText.substring(0, sectionText.length - 1);
if(sectionText.length === 0) {
sectionText = undefined;
}
else {
// Remove the last \n preceding the next title
sectionText = sectionText.substring(0, sectionText.length - 1);
}
}
else {
// Last section
// Consider wmd-input bottom padding and exclude \n\n previously
// added
padding += pxToFloat(editorElt.css('padding-bottom'));
// Consider wmd-input bottom padding and keep last empty line
padding += pxToFloat($editorElt.css('padding-bottom'));
}
addMdSection(sectionText);
});
@ -67,12 +71,12 @@ define([
// Try to find corresponding sections in the preview
htmlSectionList = [];
var htmlSectionOffset = 0;
var previewScrollTop = previewElt.scrollTop();
var previewScrollTop = $previewElt.scrollTop();
// Each title element is a section separator
previewElt.find(".preview-content > .wmd-title").each(function() {
var titleElt = $(this);
$previewElt.find(".preview-content > .wmd-title").each(function() {
var $titleElt = $(this);
// Consider div scroll position and header element top margin
var newSectionOffset = titleElt.position().top + previewScrollTop + pxToFloat(titleElt.css('margin-top'));
var newSectionOffset = $titleElt.position().top + previewScrollTop + pxToFloat($titleElt.css('margin-top'));
htmlSectionList.push({
startOffset: htmlSectionOffset,
endOffset: newSectionOffset,
@ -81,7 +85,7 @@ define([
htmlSectionOffset = newSectionOffset;
});
// Last section
var scrollHeight = previewElt.prop('scrollHeight');
var scrollHeight = $previewElt.prop('scrollHeight');
htmlSectionList.push({
startOffset: htmlSectionOffset,
endOffset: scrollHeight,
@ -91,17 +95,17 @@ define([
// apply Scroll Link (-10 to have a gap > 9 px)
lastEditorScrollTop = -10;
lastPreviewScrollTop = -10;
runScrollLink();
doScrollLink();
}, 500);
var isScrollEditor = false;
var isScrollPreview = false;
var runScrollLink = _.debounce(function() {
var doScrollLink = _.debounce(function() {
if(mdSectionList.length === 0 || mdSectionList.length !== htmlSectionList.length) {
return;
}
var editorScrollTop = editorElt.scrollTop();
var previewScrollTop = previewElt.scrollTop();
var editorScrollTop = $editorElt.scrollTop();
var previewScrollTop = $previewElt.scrollTop();
function animate(srcScrollTop, srcSectionList, destElt, destSectionList, currentDestScrollTop, callback) {
// Find the section corresponding to the offset
var sectionIndex = undefined;
@ -121,7 +125,7 @@ define([
destElt.prop('scrollHeight') - destElt.outerHeight()
]);
if(Math.abs(destScrollTop - currentDestScrollTop) <= 9) {
// Skip the animation in case it's not necessary
// Skip the animation if diff is <= 9
callback(currentDestScrollTop);
return;
}
@ -136,7 +140,7 @@ define([
isScrollEditor = false;
// Animate the preview
lastEditorScrollTop = editorScrollTop;
animate(editorScrollTop, mdSectionList, previewElt, htmlSectionList, previewScrollTop, function(destScrollTop) {
animate(editorScrollTop, mdSectionList, $previewElt, htmlSectionList, previewScrollTop, function(destScrollTop) {
lastPreviewScrollTop = destScrollTop;
});
}
@ -144,7 +148,7 @@ define([
isScrollPreview = false;
// Animate the editor
lastPreviewScrollTop = previewScrollTop;
animate(previewScrollTop, htmlSectionList, editorElt, mdSectionList, editorScrollTop, function(destScrollTop) {
animate(previewScrollTop, htmlSectionList, $editorElt, mdSectionList, editorScrollTop, function(destScrollTop) {
lastEditorScrollTop = destScrollTop;
});
}
@ -157,39 +161,44 @@ define([
};
};
scrollLink.onLayoutCreated = function() {
editorElt = $("#wmd-input");
previewElt = $(".preview-container");
scrollLink.onReady = function() {
$editorElt = $("#wmd-input");
$previewElt = $(".preview-container");
// This textarea is used to measure sections height
textareaElt = $("#md-section-helper");
$textareaElt = $("#md-section-helper");
$(".preview-container").bind("keyup mouseup mousewheel", function() {
$previewElt.bind("keyup mouseup mousewheel", function() {
isScrollPreview = true;
isScrollEditor = false;
runScrollLink();
doScrollLink();
});
$("#wmd-input").bind("keyup mouseup mousewheel", function() {
$('.table-of-contents').click(function() {
isScrollPreview = true;
isScrollEditor = false;
doScrollLink();
});
$editorElt.bind("keyup mouseup mousewheel", function() {
isScrollEditor = true;
isScrollPreview = false;
runScrollLink();
doScrollLink();
});
};
var previewContentsElt = undefined;
var $previewContentsElt = undefined;
scrollLink.onEditorConfigure = function(editor) {
previewContentsElt = $("#preview-contents");
$previewContentsElt = $("#preview-contents");
editor.getConverter().hooks.chain("postConversion", function(text) {
// To avoid losing scrolling position before elements are fully
// loaded
previewContentsElt.height(previewContentsElt.height());
$previewContentsElt.height($previewContentsElt.height());
return text;
});
};
scrollLink.onPreviewFinished = function() {
// Now set the correct height
previewContentsElt.height("auto");
$previewContentsElt.height("auto");
isScrollEditor = true;
buildSections();
};

View File

@ -6,15 +6,16 @@ define([
var workingIndicator = new Extension("workingIndicator", "Working Indicator");
var $bodyElt = undefined;
var $workingIndicatorElt = undefined;
workingIndicator.onAsyncRunning = function(isRunning) {
if(isRunning === false) {
$(".working-indicator").removeClass("show");
$("body").removeClass("working");
}
else {
$(".working-indicator").addClass("show");
$("body").addClass("working");
}
$bodyElt.toggleClass("working", isRunning);
$workingIndicatorElt.toggleClass("show", isRunning);
};
workingIndicator.onReady = function() {
$bodyElt = $(document.body);
$workingIndicatorElt = $(".working-indicator");
};
return workingIndicator;

View File

@ -41,14 +41,9 @@ define([
eventMgr.onFileSelected(fileDesc);
// Hide the viewer pencil button
if(fileDesc.fileIndex == TEMPORARY_FILE_INDEX) {
$(".action-edit-document").removeClass("hide");
}
else {
$(".action-edit-document").addClass("hide");
}
$(".action-edit-document").toggleClass("hide", fileDesc.fileIndex != TEMPORARY_FILE_INDEX);
}
// Refresh the editor (even if it's the same file)
core.initEditor(fileDesc);
};
@ -160,8 +155,8 @@ define([
fileMgr.selectFile();
var fileTitleElt = $('.file-title-navbar');
var fileTitleInputElt = $(".input-file-title");
var $fileTitleElt = $('.file-title-navbar');
var $fileTitleInputElt = $(".input-file-title");
$(".action-create-file").click(function() {
var fileDesc = fileMgr.createFile();
fileMgr.selectFile(fileDesc);
@ -169,41 +164,41 @@ define([
if(wmdInput.setSelectionRange) {
wmdInput.setSelectionRange(0, 0);
}
fileTitleElt.click();
$fileTitleElt.click();
});
$(".action-remove-file").click(function() {
fileMgr.deleteFile();
});
fileTitleElt.click(function() {
$fileTitleElt.click(function() {
if(viewerMode === true) {
return;
}
fileTitleElt.addClass('hide');
var fileTitleInput = fileTitleInputElt.removeClass('hide');
$fileTitleElt.addClass('hide');
var fileTitleInput = $fileTitleInputElt.removeClass('hide');
_.defer(function() {
fileTitleInput.focus().get(0).select();
});
});
function applyTitle() {
fileTitleInputElt.addClass('hide');
fileTitleElt.removeClass('hide');
var title = $.trim(fileTitleInputElt.val());
$fileTitleInputElt.addClass('hide');
$fileTitleElt.removeClass('hide');
var title = $.trim($fileTitleInputElt.val());
var fileDesc = fileMgr.currentFile;
if(title && title != fileDesc.title) {
fileDesc.title = title;
eventMgr.onTitleChanged(fileDesc);
}
fileTitleInputElt.val(fileDesc.title);
$fileTitleInputElt.val(fileDesc.title);
$editorElt.focus();
}
fileTitleInputElt.blur(function() {
$fileTitleInputElt.blur(function() {
applyTitle();
}).keyup(function(e) {
if(e.keyCode == 13) {
applyTitle();
}
if(e.keyCode == 27) {
fileTitleInputElt.val("");
$fileTitleInputElt.val("");
applyTitle();
}
});

View File

@ -328,7 +328,7 @@
<p>
Are you sure you want to delete "<span class="file-title"></span>"?
</p>
<blockquote class="muted">
<blockquote>
<b>NOTE:</b> This will not delete the file on synchronized
locations.
</blockquote>
@ -445,7 +445,7 @@
</div>
</div>
</div>
<blockquote class="muted">
<blockquote>
<b>NOTE:</b>
<ul>
<li>You can move or rename the file afterwards within Google
@ -491,7 +491,7 @@
</div>
</div>
</div>
<blockquote class="muted">
<blockquote>
<b>NOTE:</b>
<ul>
<li>Dropbox file path does not depend on document title.</li>
@ -526,11 +526,11 @@
following location(s):
</p>
<div class="msg-sync-list sync-list hide"></div>
<blockquote class="msg-sync-list hide muted">
<blockquote class="msg-sync-list hide">
<b>NOTE:</b> Removing a synchronized location will not delete any
file.
</blockquote>
<blockquote class="msg-no-sync hide muted">
<blockquote class="msg-no-sync hide">
"<span class="file-title"></span>" is not synchronized yet. <br />
<br /> <b>NOTE:</b> You can add synchronized locations by
exporting your document using <i class="icon-provider-gdrive"></i>
@ -789,7 +789,7 @@
location(s):
</p>
<div class="msg-publish-list publish-list hide"></div>
<blockquote class="muted">
<blockquote>
<div class="msg-no-publish hide">
"<span class="file-title"></span>" is not published yet. <br /> <br />
</div>
@ -968,7 +968,7 @@
<div class="modal-body">
<p>StackEdit has stopped because another instance was running in
the same browser.</p>
<blockquote class="muted">If you want to reopen
<blockquote>If you want to reopen
StackEdit, click on "Reload".</blockquote>
</div>
<div class="modal-footer">
@ -989,7 +989,7 @@
</div>
<div class="modal-body">
<p>This will delete all your local documents.</p>
<blockquote class="muted">Are you sure?</blockquote>
<blockquote>Are you sure?</blockquote>
</div>
<div class="modal-footer">
<a href="#" class="btn btn-default" data-dismiss="modal">Cancel</a>

View File

@ -78,7 +78,7 @@
<div class="modal-body">
<p>StackEdit has stopped because another instance was running in
the same browser.</p>
<blockquote class="muted">If you want to reopen
<blockquote>If you want to reopen
StackEdit, click on "Reload".</blockquote>
</div>
<div class="modal-footer">

View File

@ -139,6 +139,6 @@ like `` `this` ``.
Violets are blue.
</code></pre>
<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>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>

View File

@ -3,13 +3,13 @@
<i class="icon-link"></i>
</button>
<div class="dropdown-menu pull-right link-container">
<h3 class="muted">Sharing</h3>
<h3>Sharing</h3>
<div class="link-list"></div>
<p class="no-link">To share this document you need first to <a
href="#" class="action-publish-gist">publish it as a Gist</a> in
Markdown format.
</p>
<blockquote class="muted">
<blockquote>
<b>NOTE:</b> You can open any URL within StackEdit using <a
href="viewer.html?url=https://raw.github.com/benweet/stackedit/master/README.md"
title="Sharing example">viewer.html?url=...</a>

View File

@ -1,5 +1,5 @@
<div class="input-group">
<div class="input-group-btn"><a href="<%= link %>" class="btn btn-info" title="Sharing location"><i
class="icon-link"></i></a></div> <input class="col-lg-5 form-control" type="text"
<a href="<%= link %>" class="input-group-addon" title="Sharing location"><i
class="icon-link"></i></a> <input class="col-lg-5 form-control" type="text"
value="<%= link %>" readonly />
</div>

View File

@ -1,3 +0,0 @@
<button class="btn btn-success" title="Synchronize all documents">
<i class="icon-refresh"></i>
</button>

View File

@ -5,7 +5,7 @@
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"
aria-hidden="true">&times;</button>
<img src="img/stackedit-promo.png" />
<img src="img/stackedit-promo.png" width="240" height="60" />
</div>
<div class="modal-body">
<dl>

View File

@ -1,5 +1,5 @@
<p>Renders modified sections only.</p>
<blockquote class="muted">
<blockquote>
<b>NOTE:</b> Document sections are based on title elements (h1, h2...). Therefore if
your document does not contain any title, performance will not be increased.
</blockquote>

View File

@ -1,5 +1,5 @@
<p>Binds together editor and preview scrollbars.</p>
<blockquote class="muted">
<blockquote>
<b>NOTE:</b> The mapping between Markdown and HTML is based on the
position of the title elements (h1, h2...) in the page. Therefore if
your document does not contain any title, the mapping will be linear and

View File

@ -323,7 +323,7 @@ define([
}
// Binds model with textarea
realtimeBinding = gapi.drive.realtime.databinding.bindString(string, $("#wmd-input")[0]);
realtimeBinding = gapi.drive.realtime.databinding.bindString(string, document.getElementById("wmd-input"));
// Update content state according to collaborators changes
if(remoteContentChanged === true) {

View File

@ -216,7 +216,7 @@ define([
// dialog
var publishPreferences = {};
_.each(provider.publishPreferencesInputIds, function(inputId) {
publishPreferences[inputId] = $("#input-publish-" + inputId).val();
publishPreferences[inputId] = document.getElementById("input-publish-" + inputId).value;
});
publishPreferences.format = publishAttributes.format;
localStorage[provider.providerId + ".publishPreferences"] = JSON.stringify(publishPreferences);
@ -257,7 +257,7 @@ define([
// Save As menu items
$(".action-download-md").click(function() {
var content = $("#wmd-input").val();
var content = document.getElementById("wmd-input").value;
var title = fileMgr.currentFile.title;
utils.saveAs(content, title + ".md");
});

View File

@ -1,3 +1,7 @@
@import "main.less"
@primary-bg: #d5dde3;
.navbar .working-indicator.show {
.img-retina('../../../../img/loader-blue-gray.gif', '../../../../img/loader-blue-gray2x.gif', 50px, 17px);
}

View File

@ -109,6 +109,7 @@ body {
.list-group-item {
padding: 10px 15px;
margin: 0;
.list-group & {
border-radius: 0;
}
@ -139,7 +140,7 @@ body {
background-color: @btn-primary-hover-bg;
}
.btn-success:hover {
.btn-success:hover, .open .dropdown-toggle.btn-success {
color: @btn-success-color;
background-color: @bg-navbar-hover !important; // important to override .nav > li > a:hover
}
@ -279,13 +280,12 @@ body {
}
.working-indicator {
background-image: none !important;
width: 43px;
height: 11px;
width: 50px;
height: 17px;
background-position: 0 0;
margin-top: 15px;
margin-top: 12px;
&.show {
background-image: url("../../img/ajax-loader.gif") !important;
.img-retina('../../../../img/loader-default.gif', '../../../../img/loader-default2x.gif', 50px, 17px);
}
}
}
@ -898,6 +898,11 @@ div.dropdown-menu textarea {
.icon-trash {
font-size: 95%;
margin-top: -2px;
}
.icon-folder {
margin-top: -2px;
}
// Provider's icons (the colored ones)
@ -966,6 +971,7 @@ div.dropdown-menu textarea {
code, pre {
font-family: Menlo, Consolas, "Courier New", monospace;
font-size: 12px !important;
}
/* Definition list */

View File

@ -27,6 +27,7 @@
@modal-footer-border-color: @primary-bg;
@modal-content-separator-color: @primary-bg;
@nav-link-hover-bg: @primary-bg;
@nav-tabs-link-hover-border-color: @primary-bg;
@list-group-hover-bg: @primary-bg;
@btn-default-hover-bg: fade(#fff, 8%);
@btn-primary-hover-bg: lighten(@secondary-bg, 8%);
@ -39,178 +40,6 @@
.box-shadow(~"inset 0 1px 1px rgba(255, 255, 255, 0), 0 0 8px rgba(255, 255, 255, 0.75)");
}
/*
input[readonly], select[readonly], textarea[readonly] {
background-color: #fff;
}
blockquote {
border-color: #333;
}
#preview-contents {
color: #ccc;
}
#preview-contents blockquote {
border-color: #444;
}
.muted {
color: #aaa;
}
[class^="icon-"], [class*=" icon-"] {
background-image: url("../../img/glyphicons-halflings-white.png");
}
.navbar-inner .btn,
#extension-preview-buttons .btn {
background-color: #444;
}
#extension-preview-buttons .btn-group:hover .btn {
background-color: #333;
}
.navbar-inner .btn:hover,
.navbar-inner .btn:focus,
.navbar-inner .btn:active,
.navbar-inner .btn.active,
.btn-group.open .btn.dropdown-toggle,
#extension-preview-buttons .dropdown-menu,
#extension-preview-buttons .btn-group.open .btn,
#extension-preview-buttons .btn-group.open:hover .btn {
background-color: #444;
}
.btn:hover {
background-color: #333;
}
.btn:hover, .btn:focus {
color: #fff;
}
.btn-primary {
background-color: #444;
}
.btn-primary:hover {
background-color: #555;
}
.navbar-inner .btn.disabled,
.navbar-inner .btn.blocked,
.navbar-inner .btn[disabled] {
background-color: #444;
}
.navbar .nav > li > a {
color: #bbb;
}
.dropdown-menu {
border-color: #333 !important;
}
.dropdown-menu > li > a {
color: #aaa;
}
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus,
.dropdown-submenu:hover > a,
.dropdown-submenu:focus > a,
.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus,
div.jGrowl div.jGrowl-notification {
background-color: #444;
}
.dropdown-menu .divider {
background-color: #111 !important;
border-color: #111 !important;
color: #555 !important;
}
.dropdown-menu:before {
border-bottom-color: #333 !important;
}
.navbar .nav > li > .dropdown-menu:after {
border-bottom-color: #111;
}
.dropdown-menu > .disabled > a,
.dropdown-menu > .disabled > a:hover,
.dropdown-menu > .disabled > a:focus {
color: #444;
}
.modal textarea:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="datetime"]:focus,
input[type="datetime-local"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
input[type="time"]:focus,
input[type="week"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="color"]:focus,
.uneditable-input:focus
{
background-color: #eee !important;
-webkit-box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0), 0 0 8px rgba(255, 255, 255, 1) !important;
-moz-box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0), 0 0 8px rgba(255, 255, 255, 1) !important;
box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0), 0 0 8px rgba(255, 255, 255, 1) !important;
}
.error {
background-color: #ffbca8 !important;
-webkit-box-shadow: inset 0 1px 1px rgba(255, 134, 97, 0), 0 0 8px rgba(255, 255, 255, 1) !important;
-moz-box-shadow: inset 0 1px 1px rgba(255, 134, 97, 0), 0 0 8px rgba(255, 255, 255, 1) !important;
box-shadow: inset 0 1px 1px rgba(255, 134, 97, 0), 0 0 8px rgba(255, 255, 255, 1) !important;
}
#modal-settings .accordion-group {
border-bottom-color: #222;
}
.nav-tabs > .active > a, .nav-tabs > .active > a:hover, .nav-tabs > .active > a:focus {
color: #fff;
background-color: #333;
border-color: #333;
}
.nav > li > a:hover,
.nav > li > a:focus {
background-color: #222;
}
.nav-tabs > li > a:hover,
.nav-tabs > li > a:focus {
border-color: #222 #222 #222;
}
.nav .dropdown-toggle .caret, .nav .dropdown-toggle:hover .caret, .nav .dropdown-toggle:focus .caret {
border-top-color: #888;
border-bottom-color: #888;
}
.working-indicator.show {
background-image: url("ajax-loader.gif") !important;
}
.viewer .navbar-inner {
background-color:rgba(80,80,80,0.75) !important;
}
*/
.navbar .working-indicator.show {
.img-retina('../../../../img/loader-night.gif', '../../../../img/loader-night2x.gif', 50px, 17px);
}

View File

@ -341,7 +341,7 @@ define([
// export dialog
var exportPreferences = {};
_.each(provider.exportPreferencesInputIds, function(inputId) {
exportPreferences[inputId] = $("#input-sync-export-" + inputId).val();
exportPreferences[inputId] = document.getElementById("input-sync-export-" + inputId).value;
});
localStorage[provider.providerId + ".exportPreferences"] = JSON.stringify(exportPreferences);
});