Ticket #1126: ticket1126.patch

File ticket1126.patch, 2.0 KB (added by FND, 3 years ago)
  • core/js/Macros.js

    diff --git a/core/js/Macros.js b/core/js/Macros.js
    index 77bb41f..ce2ab3b 100644
    a b  
    354354                var e,v; 
    355355                if(field != "text" && !rows) { 
    356356                        e = createTiddlyElement(null,"input"); 
    357                         if(tiddler.isReadOnly()) 
    358                                 e.setAttribute("readOnly","readOnly"); 
    359357                        e.setAttribute("edit",field); 
    360358                        e.setAttribute("type","text"); 
    361359                        e.value = store.getValue(tiddler,field) || defVal; 
     
    366364                        var wrapper1 = createTiddlyElement(null,"fieldset",null,"fieldsetFix"); 
    367365                        var wrapper2 = createTiddlyElement(wrapper1,"div"); 
    368366                        e = createTiddlyElement(wrapper2,"textarea"); 
    369                         if(tiddler.isReadOnly()) 
    370                                 e.setAttribute("readOnly","readOnly"); 
    371367                        e.value = v = store.getValue(tiddler,field) || defVal; 
    372368                        rows = rows || 10; 
    373369                        var lines = v.match(/\n/mg); 
     
    379375                        e.setAttribute("edit",field); 
    380376                        place.appendChild(wrapper1); 
    381377                } 
     378                if(tiddler.isReadOnly()) { 
     379                        e.setAttribute("readOnly","readOnly"); 
     380                        addClass(e,"readOnly"); 
     381                } 
    382382                return e; 
    383383        } 
    384384}; 
  • core/shadows/StyleSheetColors.tiddler

    diff --git a/core/shadows/StyleSheetColors.tiddler b/core/shadows/StyleSheetColors.tiddler
    index bcad1c3..db3e096 100644
    a b  
    123123.editor input {border:1px solid [[ColorPalette::PrimaryMid]];} 
    124124.editor textarea {border:1px solid [[ColorPalette::PrimaryMid]]; width:100%;} 
    125125.editorFooter {color:[[ColorPalette::TertiaryMid]];} 
     126.readOnly {background:[[ColorPalette::TertiaryLight]];} 
    126127 
    127128#backstageArea {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::TertiaryMid]];} 
    128129#backstageArea a {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}