Changeset 631
- Timestamp:
- 01/07/07 03:02:43 (6 years ago)
- Location:
- trunk
- Files:
-
- 5 modified
-
htmlarea.js (modified) (1 diff)
-
plugins/ExtendedFileManager/assets/manager.js (modified) (4 diffs)
-
plugins/ExtendedFileManager/extended-file-manager.js (modified) (3 diffs)
-
plugins/ExtendedFileManager/manager.php (modified) (1 diff)
-
plugins/FullScreen/full-screen.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/htmlarea.js
r629 r631 6776 6776 }; 6777 6777 } 6778 // detect the size of visible area 6779 // when calling from a popup window, call HTMLArea.viewportSize(window) to get the size of the popup 6780 HTMLArea.viewportSize = function(scope) 6781 { 6782 scope = (scope) ? scope : window; 6783 var x,y; 6784 if (window.innerHeight) // all except Explorer 6785 { 6786 x = scope.innerWidth; 6787 y = scope.innerHeight; 6788 } 6789 else if (document.documentElement && document.documentElement.clientHeight) 6790 // Explorer 6 Strict Mode 6791 { 6792 x = scope.document.documentElement.clientWidth; 6793 y = scope.document.documentElement.clientHeight; 6794 } 6795 else if (document.body) // other Explorers 6796 { 6797 x = scope.document.body.clientWidth; 6798 y = scope.document.body.clientHeight; 6799 } 6800 return {'x':x,'y':y}; 6801 }; 6778 6802 6779 6803 // find X position of an element -
trunk/plugins/ExtendedFileManager/assets/manager.js
r608 r631 47 47 48 48 //initialise the form 49 50 if (manager_mode == "link") 51 { 52 var offsetForInputs = (HTMLArea.is_ie) ? 155 : 140; 53 } 54 else 55 { 56 var offsetForInputs = (HTMLArea.is_ie) ? 220 : 200; 57 } 49 58 init = function () 50 59 { 51 if (manager_mode == "link") 52 __dlg_init(null, {width:650,height:500}); 53 else 54 __dlg_init(null, {width:650,height:560}); 60 var h = 100 // space above files 61 + 250 // files iframe 62 + offsetForInputs; 63 64 __dlg_init(null, {width:650,height:h}); 55 65 56 66 __dlg_translate('ExtendedFileManager'); … … 294 304 var id = fields[i]; 295 305 var el = document.getElementById(id); 296 if(id == "f_url" && el.value.indexOf('://') < 0 )306 if(id == "f_url" && el.value.indexOf('://') < 0 && el.value ) 297 307 param[id] = makeURL(base_url,el.value); 298 308 else … … 320 330 } 321 331 } 322 323 332 __dlg_close(param); 324 333 return false; … … 517 526 } 518 527 528 529 function resize() 530 { 531 var win = HTMLArea.viewportSize(window); 532 document.getElementById('imgManager').style.height = win.y - 150 - offsetForInputs + 'px'; 533 534 return true; 535 } 519 536 addEvent(window, 'load', init); 537 addEvent(window, 'resize', resize); -
trunk/plugins/ExtendedFileManager/extended-file-manager.js
r579 r631 139 139 var img = image; 140 140 if (!img) { 141 if ( !param.f_url ) return false; 141 142 if (HTMLArea.is_ie) { 142 143 var sel = editor._getSelection(); … … 156 157 157 158 } else { 158 img.src = param.f_url; 159 if ( !param.f_url ) { // delete the image if empty url passed 160 img.parentNode.removeChild(img); 161 editor.updateToolbar(); 162 return false; 163 } else { 164 img.src = param.f_url; 165 } 159 166 } 160 167 … … 168 175 case "f_alt" : img.alt = value; break; 169 176 case "f_title" : img.title = value; break; 170 case "f_border" : 171 img.style.borderWidth = /[^0-9]/.test(value) ? value : (value != '') ? (parseInt(value) + 'px') :''; 172 if(img.style.borderWidth && !img.style.borderStyle) 177 case "f_border" : 178 if (value) 173 179 { 174 img.style.borderStyle = 'solid'; 180 img.style.borderWidth = /[^0-9]/.test(value) ? value : (value != '') ? (parseInt(value) + 'px') : ''; 181 if(img.style.borderWidth && !img.style.borderStyle) 182 { 183 img.style.borderStyle = 'solid'; 184 } 185 else if (!img.style.borderWidth) 186 { 187 img.style.border = ''; 188 } 175 189 } 176 else if (!img.style.borderWidth) 177 { 178 img.style.border = ''; 179 } 180 break; 181 case "f_borderColor": img.style.borderColor = value; break; 190 break; 191 case "f_borderColor": img.style.borderColor = value; break; 182 192 case "f_backgroundColor": img.style.backgroundColor = value; break; 183 193 case "f_align" : img.align = value; break; -
trunk/plugins/ExtendedFileManager/manager.php
r608 r631 108 108 </head> 109 109 <body class="dialog" > 110 <div class="title"> File Manager</div>110 <div class="title">Insert <?php echo ($insertMode == 'image' ? 'Image' : 'File Link') ?></div> 111 111 <form action="<?php print $IMConfig['backend_url']; ?>" id="uploadForm" method="post" enctype="multipart/form-data"> 112 112 <input type="hidden" name="__plugin" value="ExtendedFileManager" /> -
trunk/plugins/FullScreen/full-screen.js
r376 r631 57 57 e._sizing = true; 58 58 // Width & Height of window 59 var x,y; 60 if (window.innerHeight) // all except Explorer 61 { 62 x = window.innerWidth; 63 y = window.innerHeight; 64 } 65 else if (document.documentElement && document.documentElement.clientHeight) 66 // Explorer 6 Strict Mode 67 { 68 x = document.documentElement.clientWidth; 69 y = document.documentElement.clientHeight; 70 } 71 else if (document.body) // other Explorers 72 { 73 x = document.body.clientWidth; 74 y = document.body.clientHeight; 75 } 59 var dim = HTMLArea.viewportSize(); 76 60 77 e.sizeEditor( x + 'px',y + 'px',true,true);61 e.sizeEditor(dim.x + 'px',dim.y + 'px',true,true); 78 62 e._sizing = false; 79 63 }
