Ticket #956: Inserting symbol in Edit window instead of main toolbar.
authorLukasz Anwajler <lukasz@anwajler.com>
Mon, 29 Nov 2010 18:48:00 +0000 (12:48 -0600)
committerLukasz Anwajler <lukasz@anwajler.com>
Mon, 29 Nov 2010 18:48:00 +0000 (12:48 -0600)
apps/wiki/templates/wiki/tabs/wysiwyg_editor.html
redakcja/static/css/html.css
redakcja/static/js/wiki/view_editor_wysiwyg.js

index 9f6232c..5e3c46f 100644 (file)
@@ -10,9 +10,6 @@
         </button>
         <button id="insert-annotation-button">
             {% trans "Insert annotation" %}
         </button>
         <button id="insert-annotation-button">
             {% trans "Insert annotation" %}
-        </button>
-        <button id="insert-symbol-button">
-            {% trans "Insert special character" %}
         </button>
                {% endif %}
         <div class="toolbar-end">
         </button>
                {% endif %}
         <div class="toolbar-end">
index cc53e22..ffed30e 100644 (file)
@@ -488,7 +488,7 @@ div[x-node] > .uwaga {
     visibility: hidden;
 }
 
     visibility: hidden;
 }
 
-.edit-button, .delete-button, .accept-button, .tytul-button, .wyroznienie-button, .slowo-button {
+.edit-button, .delete-button, .accept-button, .tytul-button, .wyroznienie-button, .slowo-button, .znak-button {
     position: absolute;
     top: -21px;
     left: -1px;
     position: absolute;
     top: -21px;
     left: -1px;
@@ -512,16 +512,20 @@ div[x-node] > .uwaga {
 }
 
 .tytul-button {
 }
 
 .tytul-button {
-    left:200px;
+    left:150px;
     width:100px;
 }
 
 .wyroznienie-button {
     width:100px;
 }
 
 .wyroznienie-button {
-    left:300px;
+    left:250px;
     width:100px;
 }
 .slowo-button {
     width:100px;
 }
 .slowo-button {
-    left: 400px;
+    left:350px;
+    width:100px;
+}
+.znak-button {
+    left:450px;
     width:100px;
 }
 
     width:100px;
 }
 
@@ -530,7 +534,8 @@ div[x-node] > .uwaga {
 .accept-button:hover, .accept-button:active,
 .tytul-button:hover, .tytul-button:active,
 .wyroznienie-button:hover, .wyroznienie-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 {
+.slowo-button:hover, .slowo-button:active,
+.znak-button:hover, .znak-button:active {
     /*    color: #FFF;*/
     background-color: #999;
     color: #FFF;
     /*    color: #FFF;*/
     background-color: #999;
     color: #FFF;
@@ -633,12 +638,14 @@ div[x-node] > .uwaga {
 #specialCharsContainer {
     text-align: center; 
     width: 600px; 
 #specialCharsContainer {
     text-align: center; 
     width: 600px; 
+    height: 400px;
     padding:20px; 
     background-color: gray; 
     position: absolute; 
     top: 20px; 
     left: 20px; 
     z-index:1000;
     padding:20px; 
     background-color: gray; 
     position: absolute; 
     top: 20px; 
     left: 20px; 
     z-index:1000;
+    overflow:auto;
 }
 #specialCharsContainer a {
     color: white;
 }
 #specialCharsContainer a {
     color: white;
index 4e0bdee..6e4342d 100644 (file)
             'Τ','τ','Υ','υ','Φ','φ','Χ','χ','Ψ','ψ','Ω','ω','–',
             '—','¡','¿','$','¢','£','€','©','®','°','¹','²','³',
             '¼','½','¾','†','§','‰','•','←','↑','→','↓',
             'Τ','τ','Υ','υ','Φ','φ','Χ','χ','Ψ','ψ','Ω','ω','–',
             '—','¡','¿','$','¢','£','€','©','®','°','¹','²','³',
             '¼','½','¾','†','§','‰','•','←','↑','→','↓',
-            '„”','«»','’','[',']','[','~','|','−','·',
+            '„','”','«','»','’','[',']','[','~','|','−','·',
             '×','÷','≈','≠','±','≤','≥','∈'];
             var tableContent = "<tr>";
             
             '×','÷','≈','≠','±','≤','≥','∈'];
             var tableContent = "<tr>";
             
         }
 
         // start edition on this node
         }
 
         // 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><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><textarea></textarea></div>').css({
             position: 'absolute',
             height: h,
             left: x,
             position: 'absolute',
             height: h,
             left: x,
                        } else if (buttonName == "tytuł dzieła") {
                                startTag = "<tytul_dziela>";
                                endTag = "</tytul_dziela>";
                        } else if (buttonName == "tytuł dzieła") {
                                startTag = "<tytul_dziela>";
                                endTag = "</tytul_dziela>";
+                       } else if(buttonName == "znak spec."){
+                           addSymbol();
+                           return false;
                        }
                        }
+                       
                        var myField = textAreaOpened;                   
                         
                        //IE support
                        var myField = textAreaOpened;                   
                         
                        //IE support
                 $('#insert-theme-button').click(function(){
                     addTheme();
                     return false;
                 $('#insert-theme-button').click(function(){
                     addTheme();
                     return false;
-                });
-                
-                $('#insert-symbol-button').click(function(){
-                    addSymbol();
-                    return false;
-                });                
+                });            
 
                 $('.edit-button').live('click', function(event){
                     event.preventDefault();
 
                 $('.edit-button').live('click', function(event){
                     event.preventDefault();