Changeset 890
- Timestamp:
- 09/13/07 14:52:14 (12 years ago)
- Location:
- branches/ray
- Files:
-
- 30 added
- 1 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ray/XinhaCore.js
r862 r890 2847 2847 { 2848 2848 this._doc.body.contentEditable = true; 2849 2850 if (this._iframe.contentWindow.event.srcElement.tagName.toLowerCase() == 'html') // if clicked below the text (=body), the text cursor does not appear, see #10192851 {2852 var r = this._doc.body.createTextRange();2853 setTimeout (function () { r.collapse(); r.select();},100); // won't do without timeout, dunno why2854 }2855 2849 } 2856 2850 … … 3141 3135 { 3142 3136 var editor=this; 3143 var doc = (Xinha.is_ie) ? this._doc.getElementsByTagName("html")[0] : this._doc; // #1019 Cusor not jumping to editable part of window when clicked in IE, see also #10393137 var doc = this._doc; 3144 3138 3145 3139 editor.whenDocReady( … … 3156 3150 } 3157 3151 ); 3152 if (Xinha.is_ie) 3153 { // #1019 Cusor not jumping to editable part of window when clicked in IE, see also #1039 3154 Xinha._addEvent( 3155 editor._doc.getElementsByTagName("html")[0], 3156 "click", 3157 function() 3158 { 3159 if (editor._iframe.contentWindow.event.srcElement.tagName.toLowerCase() == 'html') // if clicked below the text (=body), the text cursor does not appear, see #1019 3160 { 3161 var r = editor._doc.body.createTextRange(); 3162 r.collapse(); 3163 r.select() 3164 //setTimeout (function () { r.collapse(); r.select();},100); // won't do without timeout, dunno why 3165 } 3166 return true; 3167 } 3168 ); 3169 } 3158 3170 3159 3171 // intercept some events; for updating the toolbar & keyboard handlers … … 3317 3329 { 3318 3330 if ( !Xinha.isSupportedBrowser ) return; 3319 3331 Xinha.setLoadingMessage (Xinha._lc("Loading plugins")); 3320 3332 // Rip the ones that are loaded and look for ones that have failed 3321 3333 var retVal = true; -
branches/ray/XinhaLoader.js
r791 r890 7 7 Xinha.is_safari = (Xinha.agt.indexOf("safari") != -1); 8 8 Xinha.opera_version = navigator.appVersion.substring(0, navigator.appVersion.indexOf(" "))*1; 9 Xinha.is_mac 9 Xinha.is_mac = (Xinha.agt.indexOf("mac") != -1); 10 10 Xinha.is_mac_ie = (Xinha.is_ie && Xinha.is_mac); 11 11 Xinha.is_win_ie = (Xinha.is_ie && !Xinha.is_mac); … … 158 158 }; 159 159 Xinha._lc = function(string) {return string;} 160 161 Xinha._addEvent = function(el, evname, func) 162 { 163 if ( document.addEventListener ) 164 { 165 el.addEventListener(evname, func, true); 166 } 167 else 168 { 169 el.attachEvent("on" + evname, func); 170 } 171 } -
branches/ray/examples/testbed.html
r796 r890 30 30 // in this example we do a little regular expression to find the absolute path. 31 31 _editor_url = document.location.href.replace(/examples\/.*/, '') 32 _editor_lang = " en"; // And the language we need to use in the editor.32 _editor_lang = "de"; // And the language we need to use in the editor. 33 33 </script> 34 34 … … 65 65 'Linker', 66 66 'Stylist', 67 'SmartReplace' 67 'SmartReplace', 68 'InsertSnippet' 68 69 ]; 69 70 // THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING :) -
branches/ray/modules/Dialogs/XinhaDialog.js
r862 r890 280 280 //Xinha._addEvent(window, 'resize', this.onResizeWin ); 281 281 282 rootElemStyle.display = '';283 282 //rootElemStyle.display = ''; 283 Xinha.Dialog.fadeIn(this.rootElem); 284 284 var dialogHeight = rootElem.offsetHeight; 285 285 var dialogWidth = rootElem.offsetWidth; … … 367 367 else 368 368 { 369 this.rootElem.style.display = 'none'; 370 this.hideBackground(); 369 //this.rootElem.style.display = 'none'; 370 Xinha.Dialog.fadeOut(this.rootElem); 371 this.hideBackground(); 371 372 var dialog = this; 372 373 … … 393 394 } 394 395 } 395 // Restore the selection396 // Restore the selection --> should this happen only with modals? 396 397 this.editor.restoreSelection(this._lastRange); 397 398 … … 654 655 Xinha.Dialog.prototype.hideBackground = function() 655 656 { 656 this.background.style.display = 'none'; 657 //this.background.style.display = 'none'; 658 Xinha.Dialog.fadeOut(this.background); 657 659 } 658 660 Xinha.Dialog.prototype.showBackground = function() 659 661 { 660 this.background.style.display = ''; 662 //this.background.style.display = ''; 663 Xinha.Dialog.fadeIn(this.background,70); 661 664 } 662 665 Xinha.Dialog.prototype.posBackground = function(pos) … … 945 948 Xinha.Dialog.activeModeless.rootElem.style.zIndex = parseInt(Xinha.Dialog.activeModeless.rootElem.style.zIndex) + 10; 946 949 } 950 Xinha.Dialog.setOpacity = function(el,value) 951 { 952 if (typeof el.style.filter != 'undefined') 953 { 954 el.style.filter = (value < 100) ? 'alpha(opacity='+value+')' : ''; 955 } 956 else 957 { 958 el.style.opacity = value/100; 959 } 960 } 961 Xinha.Dialog.fadeIn = function(el,endOpacity,delay,step) 962 { 963 delay = delay || 1; 964 step = step || 25; 965 endOpacity = endOpacity || 100; 966 el.op = el.op || 0; 967 var op = el.op; 968 if (el.style.display == 'none') 969 { 970 Xinha.Dialog.setOpacity(el,0); 971 el.style.display = ''; 972 } 973 if (op < endOpacity) 974 { 975 el.op += step; 976 Xinha.Dialog.setOpacity(el,op); 977 el.timeOut = setTimeout(function(){Xinha.Dialog.fadeIn(el,endOpacity,delay,step);},delay); 978 } 979 else 980 { 981 Xinha.Dialog.setOpacity(el,endOpacity); 982 el.op = endOpacity; 983 el.timeOut = null; 984 } 985 } 986 987 Xinha.Dialog.fadeOut = function(el,delay,step) 988 { 989 delay = delay || 1; 990 step = step || 30; 991 if (typeof el.op == 'undefined') el.op = 100; 992 var op = el.op; 993 994 if (op >= 0) 995 { 996 el.op -= step; 997 Xinha.Dialog.setOpacity(el,op); 998 el.timeOut = setTimeout(function(){Xinha.Dialog.fadeOut(el,delay,step);},delay); 999 } 1000 else 1001 { 1002 Xinha.Dialog.setOpacity(el,0); 1003 el.style.display = 'none'; 1004 el.op = 0; 1005 el.timeOut = null; 1006 } 1007 } 1008 1009 -
branches/ray/modules/GetHtml/DOMwalk.js
r862 r890 52 52 }; 53 53 54 Xinha.emptyAttributes = " checked disabled ismap readonly nowrap compact declare selected defer multiple noresize noshade "; 55 Xinha.elGetsNewLine = function (el) { return (" br meta link title ".indexOf(" " + el.tagName.toLowerCase() + " ") != -1);}; 54 Xinha.emptyAttributes = " checked disabled ismap readonly nowrap compact declare selected defer multiple noresize noshade " 56 55 57 56 Xinha.getHTMLWrapper = function(root, outputRoot, editor, indent) … … 133 132 { 134 133 closed = (!(root.hasChildNodes() || Xinha.needsClosingTag(root))); 135 html += ((Xinha.isBlockElement(root) || Xinha.elGetsNewLine(root)) ? ('\n' + indent) : '') + "<" + root.tagName.toLowerCase();134 html += ((Xinha.isBlockElement(root)) ? ('\n' + indent) : '') + "<" + root.tagName.toLowerCase(); 136 135 var attrs = root.attributes; 137 136 -
branches/ray/modules/InternetExplorer/InternetExplorer.js
r862 r890 306 306 Xinha.prototype.restoreSelection = function(savedSelection) 307 307 { 308 savedSelection.select();308 try { savedSelection.select() } catch (e) {}; 309 309 } 310 310 -
branches/ray/plugins/SaveSubmit/save-submit.js
r761 r890 34 34 SaveSubmit._pluginInfo = { 35 35 name : "SaveSubmit", 36 version : "1.0 ",36 version : "1.05", 37 37 developer : "Raimund Meyer", 38 38 developer_url : "http://rheinauf.de", … … 41 41 sponsor_url : "", 42 42 license : "htmlArea" 43 }44 45 SaveSubmit.prototype.onGenerateOnce = function() {46 this.initial_html = this.editor.getInnerHTML();47 43 } 48 44 … … 73 69 } 74 70 SaveSubmit.prototype.getChanged = function() { 75 if ( this.initial_html === null) this.initial_html = this.editor.getInnerHTML();71 if (!this.initial_html) this.initial_html = this.editor.getInnerHTML(); 76 72 if (this.initial_html != this.editor.getInnerHTML() && this.changed == false) { 77 73 this.changed = true; -
branches/ray/plugins/Stylist/stylist.js
r806 r890 596 596 var editor = this.editor; 597 597 var rootElem = this.dialog.rootElem; 598 599 if (rootElem.style.display == 'none') return; 600 598 601 var panelContainer = rootElem.parentNode; 599 602
Note: See TracChangeset
for help on using the changeset viewer.