Visual Editor - questions editing [replace word]
authorMarcin Koziej <marcin.koziej@nowoczesnapolska.org.pl>
Tue, 11 Dec 2012 10:29:59 +0000 (11:29 +0100)
committerMarcin Koziej <marcin.koziej@nowoczesnapolska.org.pl>
Tue, 11 Dec 2012 10:29:59 +0000 (11:29 +0100)
redakcja/static/css/html.css
redakcja/static/js/wiki/view_editor_wysiwyg.js

index d7f2a7a..9199ede 100644 (file)
@@ -496,7 +496,8 @@ div[x-node] > .uwaga {
     visibility: hidden;
 }
 
-.edit-button, .delete-button, .accept-button, .tytul-button, .wyroznienie-button, .slowo-button, .znak-button {
+/*.edit-button, .delete-button, .accept-button, .tytul-button, .wyroznienie-button, .slowo-button, .znak-button, .luka-button */
+.edit-button, .delete-button, .accept-button, .akap-edit-button {
     position: absolute;
     top: -21px;
     left: -1px;
@@ -537,13 +538,31 @@ div[x-node] > .uwaga {
     width:100px;
 }
 
-.edit-button:hover, .edit-button:active,
+.luka-button {
+    left:550px;
+    width:100px;
+}
+
+.zastap-button {
+    top: -50px;
+    left:550px;
+    width:100px;
+}
+
+
+/*.edit-button:hover, .edit-button:active,
 .delete-button:hover, .delete-button:active,
 .accept-button:hover, .accept-button:active,
 .tytul-button:hover, .tytul-button:active,
 .wyroznienie-button:hover, .wyroznienie-button:active,
 .slowo-button:hover, .slowo-button:active,
-.znak-button:hover, .znak-button:active {
+.znak-button:hover, .znak-button:active,
+.luka-button:hover, .luka-button:active */
+
+.edit-button:hover, .edit-button:active,
+.delete-button:hover, .delete-button:active,
+.accept-button:hover, .accept-button:active,
+.akap-edit-button:hover, .akap-edit-button:active {
     /*    color: #FFF;*/
     background-color: #999;
     color: #FFF;
@@ -756,5 +775,17 @@ div[x-node] > .uwaga {
 
 .htmlview span.luka {
     color: #808080;
-    text-decoration: underline;
-}
\ No newline at end of file
+    display: inline-block;
+    padding: 0px 8px;
+    border-bottom: 1px solid grey;
+}
+
+.htmlview span.zastap {
+    color: darkred;
+}
+
+.htmlview span.zastap:after {
+    content: "→" attr(data-wlf-rozw);
+    color: darkgoldenrod;
+}
+
index 3ccaea7..23abde0 100644 (file)
         }
 
         // start edition on this node
-        var $overlay = $('<div class="html-editarea"><button class="accept-button">Zapisz</button><button class="delete-button">Usuń</button><button class="tytul-button akap-edit-button">tytuł dzieła</button><button class="wyroznienie-button akap-edit-button">wyróżnienie</button><button class="slowo-button akap-edit-button">słowo obce</button><button class="znak-button akap-edit-button">znak spec.</button><textarea></textarea></div>').css({
+        var $overlay = $('<div class="html-editarea"><button class="accept-button">Zapisz</button><button class="delete-button">Usuń</button><button class="tytul-button akap-edit-button">tytuł dzieła</button><button class="wyroznienie-button akap-edit-button">wyróżnienie</button><button class="slowo-button akap-edit-button">słowo obce</button><button class="znak-button akap-edit-button">znak spec.</button><button class="luka-button akap-edit-button">luka</button><button class="zastap-button akap-edit-button">zastąp</button><textarea></textarea></div>').css({
             position: 'absolute',
             height: h,
             left: x,
                        } else if(buttonName == "znak spec."){
                            addSymbol();
                            return false;
+                       } else if (buttonName == "luka") {
+                               startTag = "<luka>";
+                               endTag = "</luka>";
+                       } else if (buttonName == "zastąp") {
+                               startTag = "<zastap rozw=\"\">";
+                               endTag = "</zastap>";
                        }
                        
                        var myField = textAreaOpened;