Changeset 191 in t29-www for en/dev


Ignore:
Timestamp:
Sep 5, 2010, 9:25:46 PM (14 years ago)
Author:
sven
Message:

Translation System (alles nur in /en):

  • Alle Texte auf englischen Seiten in Absaetze gepackt, damit bearbeitbar
  • Extraseiten aufgeraeumt (uralte Weiterleitungen geloescht)
  • Translation-System-Verbesserung: "Enabled"-Text erst mit Script anzeigen
  • Verbessertes Preloader-System in tools.js
  • Sidebar-Boxen auch auf Extraseiten anzeigen
  • Kleine Designverbesserungen
Location:
en/dev/translation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • en/dev/translation/editor.css

    r189 r191  
    2727body.tr-editing #content { color: #555; }
    2828body.tr-editing #content img { position: relative; }
     29body.tr-enabled #content h2 a.anchor, body.tr-enabled #content h3 a.anchor { display: none; }
    2930
    3031
  • en/dev/translation/editor.js

    r189 r191  
    99 **/
    1010 
    11 if(!t29) t29 = {}; // defined in tools.js
    12 t29.tr = {};       // this namespace
     11if(!t29) t29 = {};       // defined in tools.js
     12if(!t29.tr) t29.tr = {}; // this namespace, also defined in tools.js
    1313
    1414t29.tr.settings = {
    1515    disable_img_license_system: true, // when tr system enabled, disable img licenses for more cleareness
    16         editable_elements: function(){ return $("#content").find("p, ul, ol, blockquote, h2, h3"); },
     16        editable_elements: function(){ return $("#content").find("p, ul, ol, blockquote, dl, table, h2, h3"); },
    1717        infobox_default: "<b>Click</b> to contribute a better translation",
    1818        infobox_corrected: "<span class='thanks'>Thank you for your correction.</span> Click to improve your text again.",
    1919        editorbox_heading: "Contribute a better translation",
    20         top_notice_text: "<h3>Thank you for improving this page</h3><p>Simply hover the text with your mouse and edit a paragraph by clicking on it.</p>"
     20        top_notice_text: "<h3>Thank you for improving this page</h3><p>Simply hover the text with your mouse and edit a paragraph by clicking on it.</p>",
     21       
    2122};
    2223
     
    3536        if(!t29.tr.is_enabled()) $("body").addClass("tr-disabled"); // prepare
    3637        t29.tr.sidebar = $("#sidebar-tr");
    37         t29.tr.sidebar.find(".tr-enabled .button").click(t29.tr.call("set_enabled",false));
    38        
     38        t29.tr.sidebar.append('<span class="arrow tr-enabled"></span>');
     39        t29.tr.sidebar.find(".tr-enabled .button").attr("href","#back_to_normal_mode").click(t29.tr.call("set_enabled",false));
    3940        // initial value
    4041        //t29.tr.set_enabled(true);
     
    198199                alert("Bad state: Starting editing while editing?");
    199200                return; // bad
     201        } else if(!editing_target_or_false && !t29.tr.is_editing()) {
     202                // hab gar nicht bearbeitet.
     203                return;
    200204        }
    201205       
     
    226230                // stop editing
    227231                t29.tr.initial_editor = null;
    228                 //              v- falls es noch irgendeinen anderen Muell geben sollte
    229                 old_editor.add(".tr-editing").attr("contenteditable", "false").removeClass("tr-editing");
     232                if(old_editor) { // falls es noch irgendeinen anderen Muell geben sollte
     233                        old_editor.add(".tr-editing").attr("contenteditable", "false").removeClass("tr-editing");
     234                }
    230235                t29.tr.editorbox.hide();
    231236        }
Note: See TracChangeset for help on using the changeset viewer.
© 2008 - 2013 technikum29 • Sven Köppel • Some rights reserved
Powered by Trac
Expect where otherwise noted, content on this site is licensed under a Creative Commons 3.0 License