diff --git a/css/default.css b/css/default.css index 249510e7..410cd2ca 100644 --- a/css/default.css +++ b/css/default.css @@ -490,6 +490,14 @@ div.dropdown-menu i { z-index: 1050 !important; } +#modal-settings .modal-header { + padding-bottom: 0; +} + +#modal-settings .form-horizontal { + margin-top: 10px; +} + #modal-settings textarea { height: 80px; max-width: 206px; @@ -526,19 +534,24 @@ div.dropdown-menu i { margin: 0 10px; } -.accordion-toggle { - cursor: help; +#modal-settings .accordion-toggle { + cursor: help; +} + +#modal-settings .tab-pane-button-container { + width: 200px; + margin: 10px auto; +} + +#modal-settings .nav-tabs { + border-bottom: 1px solid transparent; + margin: 20px 0 0; } .nav-tabs > .active > a, .nav-tabs > .active > a:hover, .nav-tabs > .active > a:focus { color: #fff; background-color: #777; border-color: #777; - border-bottom-color: transparent; -} - -.nav-tabs { - border-bottom-color: #eee; } .nav > li > a:hover, @@ -551,6 +564,11 @@ div.dropdown-menu i { border-color: #eee; } +.tooltip-inner { + text-align: left; +} + +/* Table style */ table { margin-bottom: 20px; } diff --git a/index.html b/index.html index 82364298..03ef8846 100644 --- a/index.html +++ b/index.html @@ -510,18 +510,18 @@
Converts email adresses in the form <email@example.com> into a clickable links.
' + settingsBloc: 'Converts email adresses in the form <email@example.com> into clickable links.
' }; emailConverter.onEditorConfigure = function(editor) { diff --git a/js/extensions/toc.js b/js/extensions/toc.js index c4973e33..1144561e 100644 --- a/js/extensions/toc.js +++ b/js/extensions/toc.js @@ -8,9 +8,30 @@ define([ extensionId: "toc", extensionName: "Table of content", optional: true, - settingsBloc: 'Generates a table of content when a [TOC] marker is found.
' + defaultConfig: { + marker: "\\[(TOC|toc)\\]" + }, + settingsBloc: [ + 'Generates a table of content when a [TOC] marker is found.
', + '\[TOC\]<\/p>/g, toc); + html = html.replace(new RegExp("
" + toc.config.marker + "<\\/p>", "g"), htmlToc); $("#wmd-preview").html(html); }); }; diff --git a/js/gdrive-provider.js b/js/gdrive-provider.js index 56f4677a..2fdadb46 100644 --- a/js/gdrive-provider.js +++ b/js/gdrive-provider.js @@ -2,10 +2,11 @@ define([ "underscore", "core", "utils", + "settings", "extension-manager", "file-manager", "google-helper" -], function(_, core, utils, extensionMgr, fileMgr, googleHelper) { +], function(_, core, utils, settings, extensionMgr, fileMgr, googleHelper) { var PROVIDER_GDRIVE = "gdrive"; @@ -250,7 +251,7 @@ define([ localStorage.removeItem(PROVIDER_GDRIVE + ".state"); state = JSON.parse(state); if(state.action == "create") { - googleHelper.upload(undefined, state.folderId, GDRIVE_DEFAULT_FILE_TITLE, "", undefined, function(error, file) { + googleHelper.upload(undefined, state.folderId, GDRIVE_DEFAULT_FILE_TITLE, settings.defaultContent, undefined, function(error, file) { if(error) { return; } diff --git a/js/google-helper.js b/js/google-helper.js index f7d95551..2e576ac0 100644 --- a/js/google-helper.js +++ b/js/google-helper.js @@ -139,6 +139,7 @@ define([ if(response && response.id) { // Upload success result = response; + result.content = content; task.chain(); return; } diff --git a/js/utils.js b/js/utils.js index d7acfa14..0c712029 100644 --- a/js/utils.js +++ b/js/utils.js @@ -76,6 +76,23 @@ define([ } return value; }; + + // Return input value and check that it's a valid RegExp + utils.getInputRegExpValue = function(element, event) { + element = jqElt(element); + var value = utils.getInputTextValue(element, event); + if(value === undefined) { + return undefined; + } + try { + new RegExp(value); + } + catch(e) { + inputError(element, event); + return undefined; + } + return value; + }; // Return checkbox boolean value utils.getInputChecked = function(element) { diff --git a/themes/night/night.css b/themes/night/night.css index bc74ae5a..e230ebfb 100644 --- a/themes/night/night.css +++ b/themes/night/night.css @@ -23,7 +23,7 @@ input[readonly], select[readonly], textarea[readonly] { background-color: #fff; } -textarea, input, .dropdown-menu, .modal { +#wmd-input, input, .dropdown-menu, .modal { background: #111; color: #fff; } @@ -176,15 +176,14 @@ input[type="color"]:focus, 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; - border-bottom-color: transparent; -} - -.nav-tabs { - border-bottom-color: #222; } .nav > li > a:hover,