Changeset 845


Ignore:
Timestamp:
06/03/07 12:11:44 (12 years ago)
Author:
gocher
Message:
  • integrate new config settings in the example:

sizeIncludesPanels, htmlareaPaste, getHtmlMethod, undoTimeout, changeJustifyWithDirection, fullPage, pageStyle, expandRelativeUrl, maikeLinkShowsTarget, stripScripts

Location:
trunk/examples
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/Extended.html

    r677 r845  
    1 <html> 
     1<html> 
    22 
    33<head> 
     
    77 
    88function getAbsolutePos(el) { 
    9         var r = { x: el.offsetLeft, y: el.offsetTop }; 
    10         if (el.offsetParent) { 
    11                 var tmp = getAbsolutePos(el.offsetParent); 
    12                 r.x += tmp.x; 
    13                 r.y += tmp.y; 
    14         } 
    15         return r; 
     9  var r = { x: el.offsetLeft, y: el.offsetTop }; 
     10  if (el.offsetParent) { 
     11    var tmp = getAbsolutePos(el.offsetParent); 
     12    r.x += tmp.x; 
     13    r.y += tmp.y; 
     14  } 
     15  return r; 
    1616}; 
    1717 
     
    6767 
    6868function __dlg_onclose() { 
    69         opener.Dialog._return(null); 
     69  opener.Dialog._return(null); 
    7070}; 
    7171 
    7272// closes the dialog and passes the return info upper. 
    7373function __dlg_close(val) { 
    74         opener.Dialog._return(val); 
    75         window.close(); 
     74  opener.Dialog._return(val); 
     75  window.close(); 
    7676}; 
    7777 
    7878function __dlg_close_on_esc(ev) { 
    79         ev || (ev = window.event); 
    80         if (ev.keyCode == 27) { 
    81                 window.close(); 
    82                 return false; 
    83         } 
    84         return true; 
     79  ev || (ev = window.event); 
     80  if (ev.keyCode == 27) { 
     81    window.close(); 
     82    return false; 
     83  } 
     84  return true; 
    8585}; 
    8686 
    8787function __dlg_init(bottom) { 
    8888  var body = document.body; 
    89         var body_height = 0; 
    90         if (typeof bottom == "undefined") { 
    91                 var div = document.createElement("div"); 
    92                 body.appendChild(div); 
    93                 var pos = getAbsolutePos(div); 
    94                 body_height = pos.y; 
    95         } else { 
    96                 var pos = getAbsolutePos(bottom); 
    97                 body_height = pos.y + bottom.offsetHeight; 
    98         } 
    99         window.dialogArguments = opener.Dialog._arguments; 
    100         if (!document.all) { 
    101                 window.sizeToContent(); 
    102                 window.sizeToContent(); // for reasons beyond understanding, 
    103                                         // only if we call it twice we get the 
    104                                         // correct size. 
    105                 window.addEventListener("unload", __dlg_onclose, true); 
    106                 window.innerWidth = body.offsetWidth + 5; 
    107                 window.innerHeight = body_height + 2; 
    108                 // center on parent 
    109                 var x = opener.screenX + (opener.outerWidth - window.outerWidth) / 2; 
    110                 var y = opener.screenY + (opener.outerHeight - window.outerHeight) / 2; 
    111                 window.moveTo(x, y); 
    112         } else { 
    113                 // window.dialogHeight = body.offsetHeight + 50 + "px"; 
    114                 // window.dialogWidth = body.offsetWidth + "px"; 
    115                 window.resizeTo(body.offsetWidth, body_height); 
    116                 var ch = body.clientHeight; 
    117                 var cw = body.clientWidth; 
    118                 window.resizeBy(body.offsetWidth - cw, body_height - ch); 
    119                 var W = body.offsetWidth; 
    120                 var H = 2 * body_height - ch; 
    121                 var x = (screen.availWidth - W) / 2; 
    122                 var y = (screen.availHeight - H) / 2; 
    123                 window.moveTo(x, y); 
    124         } 
    125         document.body.onkeypress = __dlg_close_on_esc; 
     89  var body_height = 0; 
     90  if (typeof bottom == "undefined") { 
     91    var div = document.createElement("div"); 
     92    body.appendChild(div); 
     93    var pos = getAbsolutePos(div); 
     94    body_height = pos.y; 
     95  } else { 
     96    var pos = getAbsolutePos(bottom); 
     97    body_height = pos.y + bottom.offsetHeight; 
     98  } 
     99  window.dialogArguments = opener.Dialog._arguments; 
     100  if (!document.all) { 
     101    window.sizeToContent(); 
     102    window.sizeToContent();  // for reasons beyond understanding, 
     103          // only if we call it twice we get the 
     104          // correct size. 
     105    window.addEventListener("unload", __dlg_onclose, true); 
     106    window.innerWidth = body.offsetWidth + 5; 
     107    window.innerHeight = body_height + 2; 
     108    // center on parent 
     109    var x = opener.screenX + (opener.outerWidth - window.outerWidth) / 2; 
     110    var y = opener.screenY + (opener.outerHeight - window.outerHeight) / 2; 
     111    window.moveTo(x, y); 
     112  } else { 
     113    // window.dialogHeight = body.offsetHeight + 50 + "px"; 
     114    // window.dialogWidth = body.offsetWidth + "px"; 
     115    window.resizeTo(body.offsetWidth, body_height); 
     116    var ch = body.clientHeight; 
     117    var cw = body.clientWidth; 
     118    window.resizeBy(body.offsetWidth - cw, body_height - ch); 
     119    var W = body.offsetWidth; 
     120    var H = 2 * body_height - ch; 
     121    var x = (screen.availWidth - W) / 2; 
     122    var y = (screen.availHeight - H) / 2; 
     123    window.moveTo(x, y); 
     124  } 
     125  document.body.onkeypress = __dlg_close_on_esc; 
    126126}; 
    127127 
     
    208208 
    209209<style type="text/css"> 
    210         .fr { width: 16em; float: left; padding: 2px 5px; text-align: right; } 
     210  label { width: 16em; float: left; padding: 2px 5px; text-align: right; } 
     211  br { clear: both; } 
    211212</style> 
    212213 
    213214</head> 
    214215 
    215 <body class="dialog" onload="Init(); window.resizeTo(360, 590);"> 
     216<body class="dialog" onload="Init(); window.resizeTo(420, 820);"> 
    216217<div class="title">Settings</div> 
    217218  <form action="" method="get"> 
    218     <div class="fr">Editor width:</div> 
    219       <input type="text" name="width" id="width" title="" /> 
    220     <p /> 
    221     <div class="fr">Editor height:</div> 
    222       <input type="text" name="height" id="height" title="" /> 
    223     <p /> 
    224     <div class="fr">Size includes bars</div> 
    225       <input type="checkbox" name="sizeIncludesBars" id="sizeIncludesBars" value="true" /> 
    226     <p /> 
    227     <div class="fr">Status Bar</div> 
    228       <input type="checkbox" name="statusBar" id="statusBar" value="true" /> 
    229     <p /> 
    230     <div class="fr">Mozilla Parameter Handler:</div> 
    231     <select name="mozParaHandler" id="mozParaHandler"> 
    232       <option value="built-in">built-in</option> 
    233       <option value="dirty">dirty</option> 
    234       <option value="best">best</option> 
     219  <fieldset> 
     220    <legend>Xinha options</legend> 
     221    <label for="width">Editor width:</label> 
     222    <input type="text" name="width" id="width" title="Allowed values are 'auto', 'toolbar' or a numeric value followed by 'px'." /><br /> 
     223    <label for="height">Editor height:</label> 
     224    <input type="text" name="height" id="height" title="Allowed values are 'auto' or a numeric value followed by 'px'." /><br /> 
     225    <label for="sizeIncludesBars">Size includes bars</label> 
     226    <input type="checkbox" name="sizeIncludesBars" id="sizeIncludesBars" value="true" title="Specifies whether the toolbar should be included in the size, or are extra to it." /><br /> 
     227    <label for="sizeIncludesPanels">Size includes panels</label> 
     228    <input type="checkbox" name="sizeIncludesPanels" id="sizeIncludesPanels" value="true" title="Specifies whether the panels should be included in the size, or are extra to it." /><br /> 
     229    <label for="statusBar">Status Bar</label> 
     230    <input type="checkbox" name="statusBar" id="statusBar" value="true" title="Enable creation of the status bar?" /><br /> 
     231    <label for="htmlareaPaste">Htmlarea Paste</label> 
     232    <input type="checkbox" name="htmlareaPaste" id="htmlareaPaste" value="true" title="Intercept ^V and use the Xinha paste command" /><br /> 
     233    <label for="mozParaHandler">Mozilla Parameter Handler:</label> 
     234    <select name="mozParaHandler" id="mozParaHandler" title="Gecko only: Let the built-in routine for handling the return key decide if to enter br or p tags or use a custom implementation."> 
     235    <option value="built-in">built-in</option> 
     236    <option value="dirty">dirty</option> 
     237    <option value="best">best</option> 
     238    </select><br /> 
     239    <label for="getHtmlMethod">GetHtml Method:</label> 
     240    <select name="getHtmlMethod" id="getHtmlMethod" title="This determines the method how the HTML output is generated."> 
     241    <option value="DOMwalk">DOMwalk</option> 
     242    <option value="TransformInnerHTML">TransformInnerHTML</option> 
     243    </select><br /> 
     244    <label for="undoSteps">Undo steps:</label> 
     245    <input type="text" name="undoSteps" id="undoSteps" title="Maximum size of the undo queue."  /><br /> 
     246    <label for="undoTimeout">Undo Timeout:</label> 
     247    <input type="text" name="undoTimeout" id="undoTimeout" title="The time interval at which undo samples are taken, default: 500 (1/2 sec)."  /><br /> 
     248    <label for="changeJustifyWithDirection">change justify with direction</label> 
     249    <input type="checkbox" name="changeJustifyWithDirection" id="changeJustifyWithDirection" value="true" title="Set this to true if you want to explicitly right-justify when setting the text direction to right-to-left" /><br /> 
     250    <label for="fullPage">full Page</label> 
     251    <input type="checkbox" name="fullPage" id="fullPage" value="true" title="If true then Xinha will retrieve the full HTML, starting with the HTML-tag." /><br /> 
     252    <label for="pageStyle">Page style:</label> 
     253    <textarea name="pageStyle" id="pageStyle" title="Raw style definitions included in the edited document"></textarea> 
     254<!--    pageStyleSheets --> 
     255    <label for="baseHref">Base href:</label> 
     256    <input type="text" name="baseHref" id="baseHref" title="specify a base href for relative links" /><br /> 
     257    <label for="expandRelativeUrl">expand relative Url</label> 
     258    <input type="checkbox" name="expandRelativeUrl" id="expandRelativeUrl" value="true" title="If true, relative URLs (../) will be made absolute"/><br /> 
     259    <label for="stripBaseHref">Strip base href</label> 
     260    <input type="checkbox" name="stripBaseHref" id="stripBaseHref" value="true" title="We can strip the server part out of URL to make/leave them semi-absolute" /><br /> 
     261    <label for="stripSelfNamedAnchors">Strip self named anchors</label> 
     262    <input type="checkbox" name="stripSelfNamedAnchors" id="stripSelfNamedAnchors" value="true" title="We can strip the url of the editor page from named links" /><br /> 
     263    <label for="only7BitPrintablesInURLs">only 7bit printables in URLs</label> 
     264    <input type="checkbox" name="only7BitPrintablesInURLs" id="only7BitPrintablesInURLs" value="true" title="In URLs all characters above ASCII value 127 have to be encoded using % codes" /><br /> 
     265    <label for="sevenBitClean">7bit Clean</label> 
     266    <input type="checkbox" name="sevenBitClean" id="sevenBitClean" value="true" title="If you are putting the HTML written in Xinha into an email you might want it to be 7-bit characters only." /><br /> 
     267    <label for="killWordOnPaste">kill Word on paste</label> 
     268    <input type="checkbox" name="killWordOnPaste" id="killWordOnPaste" value="true" title="Set to true if you want Word code to be cleaned upon Paste." /><br /> 
     269    <label for="makeLinkShowsTarget">make Link Shows Target</label> 
     270    <input type="checkbox" name="makeLinkShowsTarget" id="makeLinkShowsTarget" value="true" title="Enable the 'Target' field in the Make Link dialog." /><br /> 
     271    <label for="flowToolbars">flow toolbars</label> 
     272    <input type="checkbox" name="flowToolbars" id="flowToolbars" value="true" /><br /> 
     273    <label for="stripScripts">strip Scripts</label> 
     274    <input type="checkbox" name="stripScripts" id="stripScripts" value="true" title="Set to false if you want to allow JavaScript in the content" /><br /> 
     275    <label for="showLoading">show loading</label> 
     276    <input type="checkbox" name="showLoading" id="showLoading" value="true" /><br /> 
     277  </fieldset> 
     278 
     279  <fieldset id="CharacterMapOptions" class="options"> 
     280    <legend>CharacterMap options</legend> 
     281    <label for="CharacterMapMode">Mode :</label> 
     282    <select id="CharacterMapMode" name="CharacterMapMode"> 
     283    <option value="popup">popup</option> 
     284    <option value="panel">panel</option> 
    235285    </select> 
    236     <div class="space"></div> 
    237     <div class="fr">Undo steps:</div> 
    238       <input type="text" name="undoSteps" id="undoSteps" title="" /> 
    239     <p /> 
    240     <div class="fr">Base href:</div> 
    241       <input type="text" name="baseHref" id="baseHref" title="" /> 
    242     <p /> 
    243     <div class="fr">Strip base href</div> 
    244       <input type="checkbox" name="stripBaseHref" id="stripBaseHref" value="true" /> 
    245     <p /> 
    246     <div class="fr">Strip self named anchors</div> 
    247       <input type="checkbox" name="stripSelfNamedAnchors" id="stripSelfNamedAnchors" value="true" /> 
    248     <p /> 
    249     <div class="fr">only 7bit printables in URLs</div> 
    250       <input type="checkbox" name="only7BitPrintablesInURLs" id="only7BitPrintablesInURLs" value="true" /> 
    251     <p /> 
    252     <div class="fr">7bit Clean</div> 
    253       <input type="checkbox" name="sevenBitClean" id="sevenBitClean" value="true" /> 
    254     <p /> 
    255     <div class="fr">kill Word on paste</div> 
    256       <input type="checkbox" name="killWordOnPaste" id="killWordOnPaste" value="true" /> 
    257     <p /> 
    258     <div class="fr">flow toolbars</div> 
    259       <input type="checkbox" name="flowToolbars" id="flowToolbars" value="true" /> 
    260     <p /> 
    261     <div class="fr">show loading</div> 
    262       <input type="checkbox" name="showLoading" id="showLoading" value="true" /> 
    263     <p /> 
    264  
    265     <div id="CharacterMapOptions" class="options"> 
    266     <hr size="0.5"> 
    267     <div class="fr">CharacterMap mode :</div> 
    268       <select id="CharacterMapMode" name="CharacterMapMode"> 
    269         <option value="popup">popup</option> 
    270         <option value="panel">panel</option> 
    271       </select> 
    272     </div> 
    273     <p /> 
    274  
    275     <div id="ListTypeOptions" class="options"> 
    276     <hr size="0.5"> 
    277     <div class="fr">ListType mode :</div> 
    278       <select id="ListTypeMode" name="ListTypeMode"> 
    279         <option value="toolbar">toolbar</option> 
    280         <option value="panel">panel</option> 
    281       </select> 
    282     </div> 
    283     <p /> 
    284  
    285     <div id="CharCounterOptions" class="options"> 
    286     <hr size="0.5"> 
    287     <div class="fr">CharCounter (showChar) :</div><input type="checkbox" name="showChar" id="showChar" value="true" /><br /> 
    288     <div class="fr">CharCounter (showWord) :</div><input type="checkbox" name="showWord" id="showWord" value="true" /><br /> 
    289     <div class="fr">CharCounter (showHtml) :</div><input type="checkbox" name="showHtml" id="showHtml" value="true" /> 
    290     </div> 
    291     <p /> 
     286  </fieldset> 
     287 
     288  <fieldset id="ListTypeOptions" class="options"> 
     289    <legend>ListType options</legend> 
     290    <label class="ListTypeMode">Mode :</label> 
     291    <select id="ListTypeMode" name="ListTypeMode"> 
     292    <option value="toolbar">toolbar</option> 
     293    <option value="panel">panel</option> 
     294    </select> 
     295  </fieldset> 
     296 
     297  <fieldset id="CharCounterOptions" class="options"> 
     298    <legend>CharCounter options</legend> 
     299    <label for="showChar">show Char :</label> 
     300    <input type="checkbox" name="showChar" id="showChar" value="true" /><br /> 
     301    <label for="showWord">show Word :</label> 
     302    <input type="checkbox" name="showWord" id="showWord" value="true" /><br /> 
     303    <label for="showHtml">show Html :</label> 
     304    <input type="checkbox" name="showHtml" id="showHtml" value="true" /><br /> 
     305  </fieldset> 
     306  <br /> 
    292307 
    293308  <div id="buttons"> 
  • trunk/examples/ext_example-body.html

    r836 r845  
    9292      xinha_config.height = settings.height; 
    9393      xinha_config.sizeIncludesBars = settings.sizeIncludesBars; 
     94      xinha_config.sizeIncludesPanels = settings.sizeIncludesPanels; 
    9495      xinha_config.statusBar = settings.statusBar; 
     96      xinha_config.htmlareaPaste = settings.htmlareaPaste; 
    9597      xinha_config.mozParaHandler = settings.mozParaHandler; 
     98      xinha_config.getHtmlMethod = settings.getHtmlMethod; 
    9699      xinha_config.undoSteps = settings.undoSteps; 
     100      xinha_config.undoTimeout = settings.undoTimeout; 
     101      xinha_config.changeJustifyWithDirection = settings.changeJustifyWithDirection; 
     102      xinha_config.fullPage = settings.fullPage; 
     103      xinha_config.pageStyle = settings.pageStyle; 
    97104      xinha_config.baseHref = settings.baseHref; 
     105      xinha_config.expandRelativeUrl = settings.expandRelativeUrl; 
    98106      xinha_config.stripBaseHref = settings.stripBaseHref; 
    99107      xinha_config.stripSelfNamedAnchors = settings.stripSelfNamedAnchors; 
     
    101109      xinha_config.sevenBitClean = settings.sevenBitClean; 
    102110      xinha_config.killWordOnPaste = settings.killWordOnPaste; 
     111      xinha_config.makeLinkShowsTarget = settings.makeLinkShowsTarget; 
     112      xinha_config.flowToolbars = settings.flowToolbars; 
     113      xinha_config.stripScripts = settings.stripScripts; 
    103114      xinha_config.flowToolbars = settings.flowToolbars; 
    104115      xinha_config.showLoading = settings.showLoading; 
    105  
     116      xinha_config.pageStyleSheets = ["own.css"]; 
     117 
     118// Create a default configuration for the plugins 
    106119      if (typeof CharCounter != 'undefined') { 
    107120        xinha_config.CharCounter.showChar = settings.showChar; 
     
    110123      } 
    111124 
    112       if (typeof CharacterMap != 'undefined') xinha_config.CharacterMap.mode = settings.CharacterMapMode; 
    113       if (typeof ListType != 'undefined') xinha_config.ListType.mode = settings.ListTypeMode; 
    114  
    115       if(typeof CSS != 'undefined') { 
    116         xinha_config.pageStyle = "@import url(custom.css);"; 
    117       } 
     125      if(typeof CharacterMap != 'undefined') xinha_config.CharacterMap.mode = settings.CharacterMapMode; 
     126      if(typeof ListType != 'undefined') xinha_config.ListType.mode = settings.ListTypeMode; 
     127      if(typeof CSS != 'undefined') xinha_config.pageStyle = xinha_config.pageStyle + "\n" + "@import url(custom.css);"; 
     128      if(typeof DynamicCSS != 'undefined') xinha_config.pageStyle = "@import url(dynamic.css);"; 
     129      if(typeof Filter != 'undefined') xinha_config.Filters = ["Word", "Paragraph"]; 
    118130 
    119131      if(typeof Stylist != 'undefined') { 
     
    128140        // (you can do this for stylistLoadStylesheet as well) 
    129141        xinha_config.stylistLoadStyles('p.pink_text { color:pink }', {'p.pink_text' : 'Pretty Pink'}); 
    130       } 
    131  
    132       if(typeof DynamicCSS != 'undefined') { 
    133         xinha_config.pageStyle = "@import url(dynamic.css);"; 
    134142      } 
    135143 
     
    151159                     { options: keywrds2, context: "li" } ] 
    152160        } 
    153       } 
    154  
    155       if(typeof Filter != 'undefined') { 
    156         xinha_config.Filters = ["Word", "Paragraph"]; 
    157161      } 
    158162 
  • trunk/examples/ext_example-menu.php

    r715 r845  
    1 <?PHP 
     1<?php 
    22  $LocalPluginPath = dirname(dirname(__FILE__)).DIRECTORY_SEPARATOR.'plugins'; 
    33  $LocalSkinPath = dirname(dirname(__File__)).DIRECTORY_SEPARATOR.'skins'; 
     
    3131    height: "auto", 
    3232    sizeIncludesBars: true, 
     33    sizeIncludesPanels: true, 
    3334    statusBar: true, 
     35    htmlareaPaste: false, 
    3436    mozParaHandler: "best", 
     37    getHtmlMethod: "DOMwalk", 
    3538    undoSteps: 20, 
     39    undoTimeout: 500, 
     40    changeJustifyWithDirection: false, 
     41    fullPage: false, 
     42    pageStyle: "", 
    3643    baseHref: null, 
     44    expandRelativeUrl: true, 
    3745    stripBaseHref: true, 
    3846    stripSelfNamedAnchors: true, 
     
    4048    sevenBitClean: false, 
    4149    killWordOnPaste: true, 
     50    makeLinkShowsTarget: true, 
    4251    flowToolbars: true, 
     52    stripScripts: false, 
    4353    CharacterMapMode: "popup", 
    4454    ListTypeMode: "toolbar", 
     
    101111 
    102112function Dialog(url, action, init) { 
    103         if (typeof init == "undefined") { 
    104                 init = window;  // pass this window object by default 
    105         } 
    106         Dialog._geckoOpenModal(url, action, init); 
     113  if (typeof init == "undefined") { 
     114    init = window;      // pass this window object by default 
     115  } 
     116  Dialog._geckoOpenModal(url, action, init); 
    107117}; 
    108118 
    109119Dialog._parentEvent = function(ev) { 
    110         setTimeout( function() { if (Dialog._modal && !Dialog._modal.closed) { Dialog._modal.focus() } }, 50); 
    111         if (Dialog._modal && !Dialog._modal.closed) { 
    112                 agt = navigator.userAgent.toLowerCase(); 
    113                 is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1)); 
    114                 if (is_ie) { 
    115                         ev.cancelBubble = true; 
    116                         ev.returnValue = false; 
    117                 } else { 
    118                         ev.preventDefault(); 
    119                         ev.stopPropagation(); 
    120                 } 
    121         } 
     120  setTimeout( function() { if (Dialog._modal && !Dialog._modal.closed) { Dialog._modal.focus() } }, 50); 
     121  if (Dialog._modal && !Dialog._modal.closed) { 
     122    agt = navigator.userAgent.toLowerCase(); 
     123    is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1)); 
     124    if (is_ie) { 
     125      ev.cancelBubble = true; 
     126      ev.returnValue = false; 
     127    } else { 
     128      ev.preventDefault(); 
     129      ev.stopPropagation(); 
     130    } 
     131  } 
    122132}; 
    123133 
     
    133143 
    134144Dialog._geckoOpenModal = function(url, action, init) { 
    135         var dlg = window.open(url, "hadialog", 
    136                               "toolbar=no,menubar=no,personalbar=no,width=10,height=10," + 
    137                               "scrollbars=no,resizable=yes,modal=yes,dependable=yes"); 
    138         Dialog._modal = dlg; 
    139         Dialog._arguments = init; 
    140  
    141         // capture some window's events 
    142         function capwin(w) { 
     145  var dlg = window.open(url, "hadialog", 
     146            "toolbar=no,menubar=no,personalbar=no,width=10,height=10," + 
     147            "scrollbars=no,resizable=yes,modal=yes,dependable=yes"); 
     148  Dialog._modal = dlg; 
     149  Dialog._arguments = init; 
     150 
     151  // capture some window's events 
     152  function capwin(w) { 
    143153//              Xinha._addEvent(w, "click", Dialog._parentEvent); 
    144154//              Xinha._addEvent(w, "mousedown", Dialog._parentEvent); 
    145155//              Xinha._addEvent(w, "focus", Dialog._parentEvent); 
    146         }; 
    147         // release the captured events 
    148         function relwin(w) { 
     156  }; 
     157  // release the captured events 
     158  function relwin(w) { 
    149159//              Xinha._removeEvent(w, "click", Dialog._parentEvent); 
    150160//              Xinha._removeEvent(w, "mousedown", Dialog._parentEvent); 
    151161//              Xinha._removeEvent(w, "focus", Dialog._parentEvent); 
    152         }; 
    153         capwin(window); 
    154         // capture other frames 
    155         for (var i = 0; i < window.frames.length; capwin(window.frames[i++])); 
    156         // make up a function to be called when the Dialog ends. 
    157         Dialog._return = function (val) { 
    158                 if (val && action) { 
    159                         action(val); 
    160                 } 
    161                 relwin(window); 
    162                 // capture other frames 
    163                 for (var i = 0; i < window.frames.length; relwin(window.frames[i++])); 
    164                 Dialog._modal = null; 
    165         }; 
     162  }; 
     163  capwin(window); 
     164  // capture other frames 
     165  for (var i = 0; i < window.frames.length; capwin(window.frames[i++])); 
     166  // make up a function to be called when the Dialog ends. 
     167  Dialog._return = function (val) { 
     168    if (val && action) { 
     169      action(val); 
     170    } 
     171    relwin(window); 
     172    // capture other frames 
     173    for (var i = 0; i < window.frames.length; relwin(window.frames[i++])); 
     174    Dialog._modal = null; 
     175  }; 
    166176}; 
    167177 
     
    172182        settings.height = param["height"]; 
    173183        settings.sizeIncludesBars = (param["sizeIncludesBars"]=="true"); 
     184        settings.sizeIncludesPanels = (param["sizeIncludesPanels"]=="true"); 
    174185        settings.statusBar = (param["statusBar"]=="true"); 
     186        settings.htmlareaPaste = (param["htmlareaPaste"]=="true"); 
    175187        settings.mozParaHandler = param["mozParaHandler"]; 
     188        settings.getHtmlMethod = param["getHtmlMethod"]; 
    176189        settings.undoSteps = param["undoSteps"]; 
     190        settings.undoTimeout = param["undoTimeout"]; 
     191        settings.changeJustifyWithDirection = (param["changeJustifyWithDirection"]=="true"); 
     192        settings.fullPage = (param["fullPage"]=="true"); 
     193        settings.pageStyle = param["pageStyle"]; 
    177194        settings.baseHref = param["baseHref"]; 
     195        settings.expandRelativeUrl = (param["expandRelativeUrl"]=="true"); 
    178196        settings.stripBaseHref = (param["stripBaseHref"]=="true"); 
    179197        settings.stripSelfNamedAnchors = (param["stripSelfNamedAnchors"]=="true"); 
     
    181199        settings.sevenBitClean = (param["sevenBitClean"]=="true"); 
    182200        settings.killWordOnPaste = (param["killWordOnPaste"]=="true"); 
     201        settings.makeLinkShowsTarget = (param["makeLinkShowsTarget"]=="true"); 
    183202        settings.flowToolbars = (param["flowToolbars"]=="true"); 
     203        settings.stripScripts = (param["stripScripts"]=="true"); 
    184204        settings.CharacterMapMode = param["CharacterMapMode"]; 
    185205        settings.ListTypeMode = param["ListTypeMode"]; 
     
    243263          <option value="">-- no skin --</option> 
    244264<?php 
    245         $d = @dir($LocalSkinPath); 
    246         while (false !== ($entry = $d->read()))  //not a dot file or directory 
    247         {       if(substr($entry,0,1) != '.') 
    248                 { echo '<option value="' . $entry . '"> ' . $entry . '</option>'."\n"; 
    249                 } 
    250         } 
    251         $d->close(); 
     265  $d = @dir($LocalSkinPath); 
     266  while (false !== ($entry = $d->read()))  //not a dot file or directory 
     267  { if(substr($entry,0,1) != '.') 
     268    { echo '<option value="' . $entry . '"> ' . $entry . '</option>'."\n"; 
     269    } 
     270  } 
     271  $d->close(); 
    252272?> 
    253273          </select> 
     
    260280      <div id="div_plugins" style="width:100%; overflow:auto"> 
    261281<?php 
    262         $d = @dir($LocalPluginPath); 
    263         $dir_array = array(); 
    264         while (false !== ($entry = $d->read()))  //not a dot file or directory 
    265         {       if(substr($entry,0,1) != '.') 
    266                 { 
    267                         $dir_array[] = $entry; 
    268                 } 
    269         } 
    270         $d->close(); 
    271         sort($dir_array); 
    272         foreach ($dir_array as $entry) 
    273         { 
    274                 echo '<label><input type="checkbox" name="plugins" id="plugins" value="' . $entry . '"> ' . $entry . '</label>'."\n"; 
    275         } 
     282  $d = @dir($LocalPluginPath); 
     283  $dir_array = array(); 
     284  while (false !== ($entry = $d->read()))  //not a dot file or directory 
     285  { if(substr($entry,0,1) != '.') 
     286    { $dir_array[] = $entry; 
     287    } 
     288  } 
     289  $d->close(); 
     290  sort($dir_array); 
     291  foreach ($dir_array as $entry) 
     292  { echo '<label><input type="checkbox" name="plugins" id="plugins" value="' . $entry . '"> ' . $entry . '</label>'."\n"; 
     293  } 
    276294 
    277295?> 
  • trunk/examples/ext_example.html

    r677 r845  
    11<html> 
    2  
     2<head><title>Xinha Extended Example</title></head> 
    33  <!--------------------------------------:noTabs=true:tabSize=2:indentSize=2:-- 
    44    --  Xinha example frameset. 
Note: See TracChangeset for help on using the changeset viewer.