/branches/livraison_aha/api/fckeditor/editor/dialog/common/moz-bindings.xml |
---|
New file |
0,0 → 1,30 |
<?xml version="1.0" encoding="utf-8" ?> |
<bindings xmlns="http://www.mozilla.org/xbl"> |
<binding id="numericfield"> |
<implementation> |
<constructor> |
this.keypress = CheckIsDigit ; |
</constructor> |
<method name="CheckIsDigit"> |
<body> |
<![CDATA[ |
var iCode = keyCode ; |
var bAccepted = |
( |
( iCode >= 48 && iCode <= 57 ) // Numbers |
|| (iCode >= 37 && iCode <= 40) // Arrows |
|| iCode == 8 // Backspace |
|| iCode == 46 // Delete |
) ; |
return bAccepted ; |
]]> |
</body> |
</method> |
</implementation> |
<events> |
<event type="keypress" value="CheckIsDigit()" /> |
</events> |
</binding> |
</bindings> |
/branches/livraison_aha/api/fckeditor/editor/dialog/common/fck_dialog_common.css |
---|
New file |
0,0 → 1,79 |
/* |
* FCKeditor - The text editor for internet |
* Copyright (C) 2003-2006 Frederico Caldeira Knabben |
* |
* Licensed under the terms of the GNU Lesser General Public License: |
* http://www.opensource.org/licenses/lgpl-license.php |
* |
* For further information visit: |
* http://www.fckeditor.net/ |
* |
* "Support Open Source software. What about a donation today?" |
* |
* File Name: fck_dialog_common.css |
* This is the CSS file used for interface details in some dialog |
* windows. |
* |
* File Authors: |
* Frederico Caldeira Knabben (fredck@fckeditor.net) |
*/ |
.ImagePreviewArea |
{ |
border: #000000 1px solid; |
overflow: auto; |
width: 100%; |
height: 170px; |
background-color: #ffffff; |
} |
.FlashPreviewArea |
{ |
border: #000000 1px solid; |
padding: 5px; |
overflow: auto; |
width: 100%; |
height: 170px; |
background-color: #ffffff; |
} |
.BtnReset |
{ |
float: left; |
background-position: center center; |
background-image: url(images/reset.gif); |
width: 16px; |
height: 16px; |
background-repeat: no-repeat; |
border: 1px none; |
font-size: 1px ; |
} |
.BtnLocked, .BtnUnlocked |
{ |
float: left; |
background-position: center center; |
background-image: url(images/locked.gif); |
width: 16px; |
height: 16px; |
background-repeat: no-repeat; |
border: none 1px; |
font-size: 1px ; |
} |
.BtnUnlocked |
{ |
background-image: url(images/unlocked.gif); |
} |
.BtnOver |
{ |
border: outset 1px; |
cursor: pointer; |
cursor: hand; |
} |
.FCK__FieldNumeric |
{ |
behavior: url(common/fcknumericfield.htc) ; |
} |
/branches/livraison_aha/api/fckeditor/editor/dialog/common/fck_dialog_common.js |
---|
New file |
0,0 → 1,148 |
/* |
* FCKeditor - The text editor for internet |
* Copyright (C) 2003-2006 Frederico Caldeira Knabben |
* |
* Licensed under the terms of the GNU Lesser General Public License: |
* http://www.opensource.org/licenses/lgpl-license.php |
* |
* For further information visit: |
* http://www.fckeditor.net/ |
* |
* "Support Open Source software. What about a donation today?" |
* |
* File Name: fck_dialog_common.js |
* Useful functions used by almost all dialog window pages. |
* |
* File Authors: |
* Frederico Caldeira Knabben (fredck@fckeditor.net) |
*/ |
// Gets a element by its Id. Used for shorter coding. |
function GetE( elementId ) |
{ |
return document.getElementById( elementId ) ; |
} |
function ShowE( element, isVisible ) |
{ |
if ( typeof( element ) == 'string' ) |
element = GetE( element ) ; |
element.style.display = isVisible ? '' : 'none' ; |
} |
function SetAttribute( element, attName, attValue ) |
{ |
if ( attValue == null || attValue.length == 0 ) |
element.removeAttribute( attName, 0 ) ; // 0 : Case Insensitive |
else |
element.setAttribute( attName, attValue, 0 ) ; // 0 : Case Insensitive |
} |
function GetAttribute( element, attName, valueIfNull ) |
{ |
var oAtt = element.attributes[attName] ; |
if ( oAtt == null || !oAtt.specified ) |
return valueIfNull ? valueIfNull : '' ; |
var oValue ; |
if ( !( oValue = element.getAttribute( attName, 2 ) ) ) |
oValue = oAtt.nodeValue ; |
return ( oValue == null ? valueIfNull : oValue ) ; |
} |
// Functions used by text fiels to accept numbers only. |
function IsDigit( e ) |
{ |
if ( !e ) |
e = event ; |
var iCode = ( e.keyCode || e.charCode ) ; |
return ( |
( iCode >= 48 && iCode <= 57 ) // Numbers |
|| (iCode >= 37 && iCode <= 40) // Arrows |
|| iCode == 8 // Backspace |
|| iCode == 46 // Delete |
) ; |
} |
String.prototype.trim = function() |
{ |
return this.replace( /(^\s*)|(\s*$)/g, '' ) ; |
} |
String.prototype.startsWith = function( value ) |
{ |
return ( this.substr( 0, value.length ) == value ) ; |
} |
String.prototype.remove = function( start, length ) |
{ |
var s = '' ; |
if ( start > 0 ) |
s = this.substring( 0, start ) ; |
if ( start + length < this.length ) |
s += this.substring( start + length , this.length ) ; |
return s ; |
} |
String.prototype.ReplaceAll = function( searchArray, replaceArray ) |
{ |
var replaced = this ; |
for ( var i = 0 ; i < searchArray.length ; i++ ) |
{ |
replaced = replaced.replace( searchArray[i], replaceArray[i] ) ; |
} |
return replaced ; |
} |
function OpenFileBrowser( url, width, height ) |
{ |
// oEditor must be defined. |
var iLeft = ( oEditor.FCKConfig.ScreenWidth - width ) / 2 ; |
var iTop = ( oEditor.FCKConfig.ScreenHeight - height ) / 2 ; |
var sOptions = "toolbar=no,status=no,resizable=yes,dependent=yes,scrollbars=yes" ; |
sOptions += ",width=" + width ; |
sOptions += ",height=" + height ; |
sOptions += ",left=" + iLeft ; |
sOptions += ",top=" + iTop ; |
// The "PreserveSessionOnFileBrowser" because the above code could be |
// blocked by popup blockers. |
if ( oEditor.FCKConfig.PreserveSessionOnFileBrowser && oEditor.FCKBrowserInfo.IsIE ) |
{ |
// The following change has been made otherwise IE will open the file |
// browser on a different server session (on some cases): |
// http://support.microsoft.com/default.aspx?scid=kb;en-us;831678 |
// by Simone Chiaretta. |
var oWindow = oEditor.window.open( url, 'FCKBrowseWindow', sOptions ) ; |
if ( oWindow ) |
{ |
// Detect Yahoo popup blocker. |
try |
{ |
var sTest = oWindow.name ; // Yahoo returns "something", but we can't access it, so detect that and avoid strange errors for the user. |
oWindow.opener = window ; |
} |
catch(e) |
{ |
alert( oEditor.FCKLang.BrowseServerBlocked ) ; |
} |
} |
else |
alert( oEditor.FCKLang.BrowseServerBlocked ) ; |
} |
else |
window.open( url, 'FCKBrowseWindow', sOptions ) ; |
} |
/branches/livraison_aha/api/fckeditor/editor/dialog/common/images/locked.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/branches/livraison_aha/api/fckeditor/editor/dialog/common/images/locked.gif |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/branches/livraison_aha/api/fckeditor/editor/dialog/common/images/reset.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/branches/livraison_aha/api/fckeditor/editor/dialog/common/images/reset.gif |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/branches/livraison_aha/api/fckeditor/editor/dialog/common/images/unlocked.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/branches/livraison_aha/api/fckeditor/editor/dialog/common/images/unlocked.gif |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/branches/livraison_aha/api/fckeditor/editor/dialog/common/fcknumericfield.htc |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/branches/livraison_aha/api/fckeditor/editor/dialog/common/fcknumericfield.htc |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |