Changeset 197

Show
Ignore:
Timestamp:
2007-03-30 22:43:17 (2 years ago)
Author:
MaierMan
Message:

imported from CVS

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/0.9.x/chrome/content/dmoverlay.js

    r194 r197  
    1111var DtaDialog = { 
    1212        init: function dd_init() { 
    13  
     13         
     14                var basicBox = document.getElementById('basicBox'); 
     15                const doRevert = basicBox && !basicBox.collapsed; 
     16                const doOverlay = DTA_AddingFunctions.getPreference("extensions.dta.context.downloadWin", true); 
     17                if ( 
     18                        !doOverlay 
     19                        && typeof(gFlashGotDMDialog) == 'undefined' 
     20                ) { 
     21                        // we do not actually overlay! 
     22                        return; 
     23                } 
     24                if (doRevert) { 
     25                        // revert mofo bug #315536 
     26                        // https://bugzilla.mozilla.org/show_bug.cgi?id=315536 
     27                        window.setTimeout( 
     28                                function() { 
     29                                        DtaDialog.revertUI(); 
     30                                }, 
     31                                0 
     32                        ); 
     33                         
     34                } 
     35                 
     36                if (!doOverlay) { 
     37                        // we do not actually overlay! 
     38                        // but we revert to help FlashGot ;) 
     39                        return; 
     40                } 
     41                document.getElementById('downthemallcontainer').collapsed = false; 
     42                 
    1443                this.dialog = dialog; 
    1544                this.url = dialog.mLauncher.source.spec; 
     
    2453                 
    2554                if (dir.length > 0) { 
    26                         document.getElementById("directoryturbodta").setAttribute("hidden", "false"); 
    2755                        document.getElementById("directoryturbodta").setAttribute("value", document.getElementById("directoryturbodta").value + " " + dir);              
    2856                } else { 
    29                         document.getElementById("tdownthemallbox").setAttribute("hidden","true"); 
    30                         document.getElementById("directoryturbodtabox").setAttribute("hidden","true"); 
     57                        document.getElementById("tdownthemall").setAttribute("hidden","true"); 
     58                        document.getElementById("directoryturbodta").setAttribute('hidden', 'true'); 
    3159                } 
    32                  
    33                 try { 
    34                         // se dalle nostre preferenze si deseleziona il fatto di metterlo 
    35                         var saveEnabled = DTA_AddingFunctions.getPreference("extensions.dta.context.downloadWin", true); 
    36                         if (!saveEnabled) { 
    37                                 document.getElementById("downthemallbox").setAttribute("hidden","true"); 
    38                                 document.getElementById("tdownthemallbox").setAttribute("hidden","true"); 
    39                                 document.getElementById("directoryturbodtabox").setAttribute("hidden","true"); 
    40                         } 
    41                 } catch (e) {} 
    4260                 
    4361                this.remember=document.getElementById("rememberChoice"); 
     
    5169                        },   
    5270                false); 
    53                 var basicBox = document.getElementById('basicBox'); 
    54                 if (basicBox && !basicBox.collapsed) { 
    55                         // revert mofo bug #315536 
    56                         // https://bugzilla.mozilla.org/show_bug.cgi?id=315536 
    57                         window.setTimeout( 
    58                                 function() { 
    59                                         DtaDialog.revertUI(); 
    60                                 }, 
    61                                 0 
    62                         ); 
    63                          
    64                 } 
    6571        }, 
    6672         
  • branches/0.9.x/chrome/content/dta/addurl.js

    r194 r197  
    107107                window.close(); 
    108108                return true; 
    109 } catch(e) {DTA_debug.dump("addURLnow(): ", e);} 
     109} catch(ex) { 
     110        DTA_debug.dump("addURLnow(): ", e); 
     111
     112        return false; 
    110113} 
    111114 
     
    144147                                } catch (ex) {} 
    145148                                $("URLref").value        = refPage; 
     149                        } 
     150                         
     151                        if (e.mask) { 
     152                                $("renaming").value = e.mask; 
    146153                        } 
    147154                } else { 
  • branches/0.9.x/chrome/content/privacy/overlaySanitizeUI.xul

    r194 r197  
    3636 * ***** END LICENSE BLOCK ***** --> 
    3737  
    38  <!DOCTYPE overlay> 
     38<!DOCTYPE overlay> 
    3939   
    40  <overlay id="dta" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> 
    41  <script type="application/x-javascript"><![CDATA[ 
    42         function dtaInit() 
    43         { 
    44                 // looks nasty. I know :p 
    45                 // but the pref-window does not provide an id for preferences. 
    46                 // and the tools-window had an id-less groupbox. 
    47                 // hence we cannot simply use overlay elements, but must add the stuff "on-the-fly" 
    48                 var prefs = document.getElementsByTagName('preferences')[0]; 
    49                 var gb = document.getElementsByTagName('groupbox')[0]; 
    50                 if (prefs && gb) 
    51                 { 
    52                         var pref = document.createElement('preference'); 
    53                         pref.setAttribute('id', 'privacy.item.extensions-dta'); 
    54                         pref.setAttribute('name', 'privacy.item.extensions-dta'); 
    55                         pref.setAttribute('type', 'bool');       
    56                         prefs.appendChild(pref); 
     40<overlay id="dta" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> 
     41        <script type="application/x-javascript"><![CDATA[ 
     42                function dtaInit() { 
     43                        // looks nasty. I know :p 
     44                        // but the pref-window does not provide an id for preferences. 
     45                        // and the tools-window had an id-less groupbox. 
     46                        // hence we cannot simply use overlay elements, but must add the stuff "on-the-fly" 
    5747                         
    58                         var check = document.createElement('checkbox'); 
    59                         check.setAttribute('label', 'downTHEMall history'); 
    60                         check.setAttribute('preference', 'privacy.item.extensions-dta'); 
    61                         gb.appendChild(check); 
     48                        var prefs = document.getElementsByTagName('preferences')[0]; 
    6249                         
    63                         if (gSanitizePromptDialog) 
    64                         { 
    65                                 pref.setAttribute('readonly', 'true'); 
    66                                 check.setAttribute('onsyncfrompreference', 'return gSanitizePromptDialog.onReadGeneric();'); 
     50                        var chk = document.getElementsByTagName('checkbox'); 
     51                        chk = chk[chk.length - 1]; 
     52                        if (prefs && chk) { 
     53 
     54                                var pref = document.createElement('preference'); 
     55                                pref.setAttribute('id', 'privacy.item.extensions-dta'); 
     56                                pref.setAttribute('name', 'privacy.item.extensions-dta'); 
     57                                pref.setAttribute('type', 'bool');       
     58                                prefs.appendChild(pref); 
     59 
     60                                var check = document.createElement('checkbox'); 
     61                                check.setAttribute('label', 'downTHEMall history'); 
     62                                check.setAttribute('preference', 'privacy.item.extensions-dta'); 
     63                                 
     64                                // insertAfter 
     65                                // If you don't believe: http://developer.mozilla.org/en/docs/DOM:element.insertBefore#Example 
     66                                chk.parentNode.insertBefore(check, chk.nextSibling); 
     67                                 
     68                                if (gSanitizePromptDialog) { 
     69                                        pref.setAttribute('readonly', 'true'); 
     70                                        check.setAttribute('onsyncfrompreference', 'return gSanitizePromptDialog.onReadGeneric();'); 
     71                                } 
    6772                        } 
    68                          
     73                        else { 
     74                                Components.utils.reportError("Cannot overlay!" + pref + chk); 
     75                        } 
    6976                } 
    70         } 
    71         dtaInit(); 
    72  ]]></script> 
    73  </overlay> 
     77                dtaInit(); 
     78]]></script> 
     79</overlay> 
  • branches/0.9.x/chrome/content/saveas.xul

    r194 r197  
    2020 
    2121<stringbundle id="stringsB" src="chrome://dta/locale/saveas.properties"/> 
    22  
    23   <radiogroup id="mode" > 
    24           <hbox insertbefore="save" id="downthemallbox" > 
     22        <radiogroup id="mode"> 
     23                <vbox insertbefore="save" id="downthemallcontainer" collapsed="true" flex="1"> 
    2524                        <radio id="downthemall" label="DownThemAll!..." /> 
    26                         <spacer flex="1"/> 
    27           </hbox> 
    28           <hbox insertbefore="save" id="tdownthemallbox" > 
    2925                        <radio id="turbodta" label="dTaOneClick!" /> 
    30                         <spacer flex="1"/> 
    31           </hbox> 
    32           <hbox insertbefore="save" id="directoryturbodtabox"> 
    33                         <label crop="center" style="padding-left: 0px; margin-left: 30px; margin-top: 0px; padding-top: 0px; font-size:90%;" class="turbodtadir" id="directoryturbodta" value="&on;" hidden="true" /> 
    34                         <spacer flex="1"/> 
    35           </hbox> 
    36   </radiogroup> 
    37  </overlay> 
     26                        <label id="directoryturbodta" crop="center" style="padding-left: 0px; margin-left: 30px; margin-top: 0px; padding-top: 0px; font-size:90%;" class="turbodtadir" flex="1" value="&on;" /> 
     27                </vbox> 
     28        </radiogroup> 
     29</overlay>