phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] news_admin/js/fckeditor/editor/dialog/common fck_dial


From: skwashd
Subject: [Phpgroupware-cvs] news_admin/js/fckeditor/editor/dialog/common fck_dialog_common.css, 1.1 fck_dialog_common.js, 1.1
Date: Tue, 24 May 2005 16:32:00 +0200

Update of news_admin/js/fckeditor/editor/dialog/common

Added Files:
     Branch: MAIN
            fck_dialog_common.css 
            fck_dialog_common.js 

Log Message:
I am working on a much better version of news_admin, this is just a taste of 
what is coming.

Adding FCKeditor, which has the following issues:
* Images and files support FCKd
* Spellcheck FCKing up

Didn't include non php code or samples other unneeded crap

====================================================
Index: fck_dialog_common.css
/*
 * FCKeditor - The text editor for internet
 * Copyright (C) 2003-2004 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/
 *
 * File Name: fck_dialog_common.css
 *      This is the CSS file used for interface details in some dialog
 *      windows.
 *
 * Version:  2.0 RC3
 * Modified: 2005-02-08 19:20:22
 *
 * File Authors:
 *              Frederico Caldeira Knabben (address@hidden)
 */

.ImagePreviewArea
{
        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: 1px none;
        font-size: 1px ;
}

.BtnUnlocked
{
        background-image: url(images/unlocked.gif);
}

.BtnOver
{
        border: 1px outset;
        cursor: pointer;
        cursor: hand;
}

====================================================
Index: fck_dialog_common.js
/*
 * FCKeditor - The text editor for internet
 * Copyright (C) 2003-2004 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/
 *
 * File Name: fck_dialog_common.js
 *      Useful functions used by almost all dialog window pages.
 *
 * Version:  2.0 RC3
 * Modified: 2005-02-09 13:52:45
 *
 * File Authors:
 *              Frederico Caldeira Knabben (address@hidden)
 */

// 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 = element.getAttribute( attName, 2 ) ;

        return ( oValue == null ? valueIfNull : oValue ) ;
}

// Functions used by text fiels to accept numbers only.
function IsDigit( e )
{
        e = e || event ;
        var iCode = ( e.keyCode || e.charCode ) ;

        event.returnValue =
                (
                        ( iCode >= 48 && iCode <= 57 )          // Numbers
                        || (iCode >= 37 && iCode <= 40)         // Arrows
                        || iCode == 8                                           
// Backspace
                        || iCode == 46                                          
// Delete
                ) ;

        return event.returnValue ;
}

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 ;
}






reply via email to

[Prev in Thread] Current Thread [Next in Thread]