Changeset 197
- Timestamp:
- 2007-03-30 22:43:17 (2 years ago)
- Files:
-
- branches/0.9.x/chrome/content/dmoverlay.js (modified) (3 diffs)
- branches/0.9.x/chrome/content/dta/addurl.js (modified) (2 diffs)
- branches/0.9.x/chrome/content/privacy/overlaySanitizeUI.xul (modified) (1 diff)
- branches/0.9.x/chrome/content/saveas.xul (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/0.9.x/chrome/content/dmoverlay.js
r194 r197 11 11 var DtaDialog = { 12 12 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 14 43 this.dialog = dialog; 15 44 this.url = dialog.mLauncher.source.spec; … … 24 53 25 54 if (dir.length > 0) { 26 document.getElementById("directoryturbodta").setAttribute("hidden", "false");27 55 document.getElementById("directoryturbodta").setAttribute("value", document.getElementById("directoryturbodta").value + " " + dir); 28 56 } else { 29 document.getElementById("tdownthemall box").setAttribute("hidden","true");30 document.getElementById("directoryturbodta box").setAttribute("hidden","true");57 document.getElementById("tdownthemall").setAttribute("hidden","true"); 58 document.getElementById("directoryturbodta").setAttribute('hidden', 'true'); 31 59 } 32 33 try {34 // se dalle nostre preferenze si deseleziona il fatto di metterlo35 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) {}42 60 43 61 this.remember=document.getElementById("rememberChoice"); … … 51 69 }, 52 70 false); 53 var basicBox = document.getElementById('basicBox');54 if (basicBox && !basicBox.collapsed) {55 // revert mofo bug #31553656 // https://bugzilla.mozilla.org/show_bug.cgi?id=31553657 window.setTimeout(58 function() {59 DtaDialog.revertUI();60 },61 062 );63 64 }65 71 }, 66 72 branches/0.9.x/chrome/content/dta/addurl.js
r194 r197 107 107 window.close(); 108 108 return true; 109 } catch(e) {DTA_debug.dump("addURLnow(): ", e);} 109 } catch(ex) { 110 DTA_debug.dump("addURLnow(): ", e); 111 } 112 return false; 110 113 } 111 114 … … 144 147 } catch (ex) {} 145 148 $("URLref").value = refPage; 149 } 150 151 if (e.mask) { 152 $("renaming").value = e.mask; 146 153 } 147 154 } else { branches/0.9.x/chrome/content/privacy/overlaySanitizeUI.xul
r194 r197 36 36 * ***** END LICENSE BLOCK ***** --> 37 37 38 <!DOCTYPE overlay>38 <!DOCTYPE overlay> 39 39 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" 57 47 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]; 62 49 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 } 67 72 } 68 73 else { 74 Components.utils.reportError("Cannot overlay!" + pref + chk); 75 } 69 76 } 70 } 71 dtaInit(); 72 ]]></script> 73 </overlay> 77 dtaInit(); 78 ]]></script> 79 </overlay> branches/0.9.x/chrome/content/saveas.xul
r194 r197 20 20 21 21 <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"> 25 24 <radio id="downthemall" label="DownThemAll!..." /> 26 <spacer flex="1"/>27 </hbox>28 <hbox insertbefore="save" id="tdownthemallbox" >29 25 <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>
