Changeset 29
- Timestamp:
- 03/05/05 06:37:17 (8 years ago)
- Location:
- trunk/plugins/Linker
- Files:
-
- 2 modified
-
dialog.html (modified) (1 diff)
-
linker.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/Linker/dialog.html
r20 r29 81 81 <div style="text-align:right"> 82 82 <input type="button" id="[ok]" value="_(OK)" /> 83 <input type="button" id="[clear]" value="_(REMOVE LINK)" onclick="this.form['[href]'].value='';this.form['[to]'].value='';document.getElementById('[ok]').click();" /> 83 84 <input type="button" id="[cancel]" value="_(CANCEL)" /> 84 85 </div> -
trunk/plugins/Linker/linker.js
r28 r29 169 169 if(values.type == 'url') 170 170 { 171 atr.href = values.href; 172 atr.target = values.target; 173 if(values.target == 'popup') 171 if(values.href) 174 172 { 175 176 if(values.p_width) 173 atr.href = values.href; 174 atr.target = values.target; 175 if(values.target == 'popup') 177 176 { 178 values.p_options.push('width=' + values.p_width); 177 178 if(values.p_width) 179 { 180 values.p_options.push('width=' + values.p_width); 181 } 182 if(values.p_height) 183 { 184 values.p_options.push('height=' + values.p_height); 185 } 186 atr.onclick = 'try{if(document.designMode && document.designMode == \'on\') return false;}catch(e){} window.open(this.href, \'' + (values.p_name.replace(/[^a-z0-9_]/i, '_')) + '\', \'' + values.p_options.join(',') + '\');return false;'; 179 187 } 180 if(values.p_height)181 {182 values.p_options.push('height=' + values.p_height);183 }184 atr.onclick = 'try{if(document.designMode && document.designMode == \'on\') return false;}catch(e){} window.open(this.href, \'' + (values.p_name.replace(/[^a-z0-9_]/i, '_')) + '\', \'' + values.p_options.join(',') + '\');return false;';185 188 } 186 189 } 187 190 else 188 191 { 189 atr.href = 'mailto:' + values.to + '?'; 190 if(values.subject) atr.href += 'subject=' + escape(values.subject); 191 if(values.body) atr.href += (values.subject ? '&' : '') + 'body=' + escape(values.body); 192 if(values.to) 193 { 194 atr.href = 'mailto:' + values.to + '?'; 195 if(values.subject) atr.href += 'subject=' + escape(values.subject); 196 if(values.body) atr.href += (values.subject ? '&' : '') + 'body=' + escape(values.body); 197 } 192 198 } 193 199 … … 214 220 else 215 221 { 222 if(!atr.href) return true; 223 216 224 // Insert a link, we let the browser do this, we figure it knows best 217 225 var tmp = HTMLArea.uniq('http://www.example.com/Link');
