Overview
Comment: | Fix wiki editor |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | dev |
Files: | files | file ages | folders |
SHA1: |
59c3c5c3d9896df9cc36a97963334708 |
User & Date: | bohwaz on 2020-11-15 19:54:04 |
Other Links: | branch diff | manifest | tags |
Context
2020-11-15
| ||
23:55 | Use KD2\HTTP to generate a proper URL check-in: a8c381cc4d user: bohwaz tags: dev | |
19:54 | Fix wiki editor check-in: 59c3c5c3d9 user: bohwaz tags: dev | |
12:10 | Fix UX wording for my services check-in: 60620e3a0c user: bohwaz tags: dev | |
Changes
Modified src/www/admin/static/admin.css from [ac821d1000] to [b01f7eff64].
︙ | ︙ | |||
1140 1141 1142 1143 1144 1145 1146 | background: rgba(var(--gMainColor), 0.7); color: #fff; white-space: pre; } .actions .icn:hover, .num a:hover, .icn.action:hover, .icn-btn:hover, .radio-btn:hover div, a.num:hover { color: darkred; | | | 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 | background: rgba(var(--gMainColor), 0.7); color: #fff; white-space: pre; } .actions .icn:hover, .num a:hover, .icn.action:hover, .icn-btn:hover, .radio-btn:hover div, a.num:hover { color: darkred; background-color: #ff9; z-index: 300; } .droits b { border: 2px solid #999; border-radius: 1em; color: #000; |
︙ | ︙ |
Modified src/www/admin/static/scripts/wiki_editor.css from [d04c8ee367] to [30c3c98262].
︙ | ︙ | |||
16 17 18 19 20 21 22 | } nav.te { margin-bottom: .5em; height: 30px; } | | < < < | < < | > > < < < < < < < < < > | | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | } nav.te { margin-bottom: .5em; height: 30px; } nav.te button { text-decoration: none; cursor: pointer; background: #eee no-repeat center center; display: inline-block; vertical-align: bottom; transition: all .2s; border: 1px solid #999; box-shadow: 2px 2px 5px #999; } nav.te .bold, nav.te .italic, nav.te .title, nav.te .link { font-family: Georgia, "Times New Roman", serif; } nav.te .bold { font-weight: bold; } nav.te .italic { font-style: italic; } nav.te .link { text-decoration: underline; color: blue; } nav.te .fullscreen { text-indent: -70em; width: 32px; overflow: hidden; } nav.te .icnl { font-size: 18px; } nav.te .ext.icnl { |
︙ | ︙ | |||
79 80 81 82 83 84 85 | margin-left: 2em; } .textEditor.fullscreen nav.te .fullscreen { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAADFBMVEUAAABNTVFOTlBOTlBLB/faAAAAA3RSTlMAOsPdsomtAAAAQElEQVQI12NIEWCRZNi5gTePIe8D/08G6Q/8Txj0P/B/YVj/gf8fAzawHyQhD1ICJvI/8O9k2FnAl8eQosAiCQCgixb13aKGIwAAAABJRU5ErkJggg=="); } | | | | 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | margin-left: 2em; } .textEditor.fullscreen nav.te .fullscreen { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAADFBMVEUAAABNTVFOTlBOTlBLB/faAAAAA3RSTlMAOsPdsomtAAAAQElEQVQI12NIEWCRZNi5gTePIe8D/08G6Q/8Txj0P/B/YVj/gf8fAzawHyQhD1ICJvI/8O9k2FnAl8eQosAiCQCgixb13aKGIwAAAABJRU5ErkJggg=="); } .textEditor nav button.close { display: none; float: right; } .textEditor nav button.reload { display: none; float: left; } .textEditor.fullscreen { position: fixed; top: 0; |
︙ | ︙ | |||
110 111 112 113 114 115 116 | height: 90%; } .textEditor.iframe textarea { display: none; } | | | | 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | height: 90%; } .textEditor.iframe textarea { display: none; } .textEditor.iframe nav button { display: none; } .textEditor.iframe nav button.close, .textEditor.iframe nav button.reload { display: inline-block; } .textEditor iframe { border: none; background: #eee; border-radius: .5em; |
︙ | ︙ |
Modified src/www/admin/static/scripts/wiki_editor.js from [e1b49b3d06] to [2d8c9cc5c3].
1 2 3 4 5 6 | (function () { var wiki_id = window.location.search.match(/id=(\d+)/)[1]; g.onload(function () { g.style('scripts/wiki_editor.css'); | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | (function () { var wiki_id = window.location.search.match(/id=(\d+)/)[1]; g.onload(function () { g.style('scripts/wiki_editor.css'); g.script('scripts/text_editor.min.js', function () { var t = new textEditor('f_contenu'); t.parent = t.textarea.parentNode; var toolbar = document.createElement('nav'); toolbar.className = 'te'; var toggleFullscreen = function (e) |
︙ | ︙ | |||
118 119 120 121 122 123 124 | t.parent.className = t.parent.className.replace(/ iframe$/, ''); t.iframe.className = 'hidden'; }; var appendButton = function (name, title, action, altTitle) { | | > > > > | > | | | | | | 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | t.parent.className = t.parent.className.replace(/ iframe$/, ''); t.iframe.className = 'hidden'; }; var appendButton = function (name, title, action, altTitle) { var btn = document.createElement('button'); btn.type = 'button'; btn.title = altTitle ? altTitle : title; if (title.length == 1) { btn.dataset.icon = title; } else { btn.innerText = title; } btn.className = 'icn-btn ' +name; btn.onclick = function () { action.call(); return false; }; toolbar.appendChild(btn); return btn; }; var wrapTags = function (left, right) { t.wrapSelection(t.getSelection(), left, right); return true; }; appendButton('title', "== Titre", function () { wrapTags("== ", ""); } ); appendButton('bold', '**gras**', function () { wrapTags('**', '**'); } ); appendButton('italic', "''italique''", function () { wrapTags("''", "''"); } ); appendButton('link', "[[lien|http://]]", function () { if (url = window.prompt('Adresse URL ?')) wrapTags("[[", "|" + url + ']]'); } ); appendButton('file', "📎", openFileInsert, 'Insérer fichier / image'); appendButton('ext preview', '⎙', openPreview, 'Prévisualiser'); appendButton('ext help', '❓', openSyntaxHelp, 'Aide sur la syntaxe'); appendButton('ext fullscreen', 'Plein écran', toggleFullscreen, 'Plein écran'); appendButton('ext close', 'Fermer', closeIFrame); t.parent.insertBefore(toolbar, t.parent.firstChild); t.shortcuts.push({key: 'F11', callback: toggleFullscreen}); t.shortcuts.push({ctrl: true, key: 'b', callback: function () { return wrapTags('**', '**'); } }); t.shortcuts.push({ctrl: true, key: 'g', callback: function () { return wrapTags('**', '**'); } }); t.shortcuts.push({ctrl: true, key: 'i', callback: function () { return wrapTags("''", "''"); } }); if (window.location.hash.match(/fullscreen/)) { t.toggleFullscreen(); window.location.hash = ''; } }); }); }()); |