Changeset 1332 for trunk/XinhaCore.js


Ignore:
Timestamp:
02/03/18 06:47:19 (6 months ago)
Author:
gogo
Message:

Pushing some old updates up from my current production system...

  • Add some iPhone/iPad fixes (no idea if these are still valid, I don't have one to test with).
  • Add new plugin event onBeforeSubmitTextarea, fired after the textarea get's its value set by outwardHtml, so you can do any last minute modifications.
  • Increase stylist delay to 500ms for reliability
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XinhaCore.js

    r1326 r1332  
    175175 */ 
    176176Xinha.is_mac       = (Xinha.agt.indexOf("mac") != -1); 
     177Xinha.is_ios       = (Xinha.agt.indexOf("iphone") != -1) || (Xinha.agt.indexOf("ipad") != -1) ; 
     178 
    177179/** Browser is Microsoft Internet Explorer Mac 
    178180 * @type Boolean  
     
    196198 * @type Boolean  
    197199 */ 
    198 Xinha.is_ff2 = Xinha.is_real_gecko && parseInt(navigator.productSub.substr(0,10), 10) < 20071210; 
     200// http://trac.xinha.org/ticket/1620 
     201Xinha.is_ff2 = Xinha.is_real_gecko && navigator.productSub && parseInt(navigator.productSub.substr(0,10), 10) < 20071210; 
    199202 
    200203/** File is opened locally opened ("file://" protocol) 
     
    22012204  var statusBarTree = document.createElement("span"); 
    22022205  statusBarTree.className = "statusBarTree"; 
    2203   statusBarTree.innerHTML = Xinha._lc("Path") + ": "; 
     2206  if(Xinha.is_ios) 
     2207  { 
     2208    statusBarTree.innerHTML = Xinha._lc("Touch here first to activate editor."); 
     2209  } 
     2210  else 
     2211  { 
     2212    statusBarTree.innerHTML = Xinha._lc("Path") + ": "; 
     2213  } 
    22042214 
    22052215  this._statusBarTree = statusBarTree; 
     
    27122722        editor.firePluginEvent('onBeforeSubmit'); 
    27132723        editor._textArea.value = editor.outwardHtml(editor.getHTML()); 
     2724        editor.firePluginEvent('onBeforeSubmitTextArea'); 
    27142725        return true; 
    27152726      } 
     
    32993310  this.disableToolbar(); 
    33003311 
     3312  if(Xinha.is_ios) 
     3313  { 
     3314    this._statusBarTree.innerHTML = Xinha._lc("Touch here first to activate editor."); 
     3315  } 
     3316  else 
     3317  { 
     3318    this._statusBarTree.innerHTML = Xinha._lc("Path") + ": "; 
     3319  } 
     3320 
    33013321  if ( Xinha.is_designMode && this._doc.designMode != 'off' ) 
    33023322  { 
     
    35923612      if(!resetting_events_for_opera) { 
    35933613      // if we have multiple editors some bug in Mozilla makes some lose editing ability 
     3614      if(!Xinha.is_ios) 
     3615      { 
    35943616      Xinha._addEvents( 
    35953617        doc, 
     
    36013623        } 
    36023624      ); 
     3625      } 
     3626      else 
     3627      {          
     3628        Xinha._addEvents( 
     3629          editor._statusBar, 
     3630          ["click"], 
     3631          function() 
     3632          {            
     3633            editor.activateEditor(); 
     3634            editor.focusEditor(); 
     3635            return true; 
     3636          } 
     3637        ); 
     3638      } 
     3639 
    36033640      if (Xinha.is_ie) 
    36043641      { // #1019 Cusor not jumping to editable part of window when clicked in IE, see also #1039 
Note: See TracChangeset for help on using the changeset viewer.