code
stringlengths
1
2.01M
repo_name
stringlengths
3
62
path
stringlengths
1
267
language
stringclasses
231 values
license
stringclasses
13 values
size
int64
1
2.01M
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** @fileoverview The "dialogui" plugin. */ CKEDITOR.plugins.add( 'dialogui' ); (function() { var initPrivateObject = function( elementDefinition ) { this._ || ( this._ = {} ); this._['default'] = this._.initValue = elementDefinition['default'] || ''; this._.required = elementDefinition[ 'required' ] || false; var args = [ this._ ]; for ( var i = 1 ; i < arguments.length ; i++ ) args.push( arguments[i] ); args.push( true ); CKEDITOR.tools.extend.apply( CKEDITOR.tools, args ); return this._; }, textBuilder = { build : function( dialog, elementDefinition, output ) { return new CKEDITOR.ui.dialog.textInput( dialog, elementDefinition, output ); } }, commonBuilder = { build : function( dialog, elementDefinition, output ) { return new CKEDITOR.ui.dialog[elementDefinition.type]( dialog, elementDefinition, output ); } }, containerBuilder = { build : function( dialog, elementDefinition, output ) { var children = elementDefinition.children, child, childHtmlList = [], childObjList = []; for ( var i = 0 ; ( i < children.length && ( child = children[i] ) ) ; i++ ) { var childHtml = []; childHtmlList.push( childHtml ); childObjList.push( CKEDITOR.dialog._.uiElementBuilders[ child.type ].build( dialog, child, childHtml ) ); } return new CKEDITOR.ui.dialog[ elementDefinition.type ]( dialog, childObjList, childHtmlList, output, elementDefinition ); } }, commonPrototype = { isChanged : function() { return this.getValue() != this.getInitValue(); }, reset : function( noChangeEvent ) { this.setValue( this.getInitValue(), noChangeEvent ); }, setInitValue : function() { this._.initValue = this.getValue(); }, resetInitValue : function() { this._.initValue = this._['default']; }, getInitValue : function() { return this._.initValue; } }, commonEventProcessors = CKEDITOR.tools.extend( {}, CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors, { onChange : function( dialog, func ) { if ( !this._.domOnChangeRegistered ) { dialog.on( 'load', function() { this.getInputElement().on( 'change', function() { // Make sure 'onchange' doesn't get fired after dialog closed. (#5719) if ( !dialog.parts.dialog.isVisible() ) return; this.fire( 'change', { value : this.getValue() } ); }, this ); }, this ); this._.domOnChangeRegistered = true; } this.on( 'change', func ); } }, true ), eventRegex = /^on([A-Z]\w+)/, cleanInnerDefinition = function( def ) { // An inner UI element should not have the parent's type, title or events. for ( var i in def ) { if ( eventRegex.test( i ) || i == 'title' || i == 'type' ) delete def[i]; } return def; }; CKEDITOR.tools.extend( CKEDITOR.ui.dialog, /** @lends CKEDITOR.ui.dialog */ { /** * Base class for all dialog elements with a textual label on the left. * @constructor * @example * @extends CKEDITOR.ui.dialog.uiElement * @param {CKEDITOR.dialog} dialog * Parent dialog object. * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition * The element definition. Accepted fields: * <ul> * <li><strong>label</strong> (Required) The label string.</li> * <li><strong>labelLayout</strong> (Optional) Put 'horizontal' here if the * label element is to be layed out horizontally. Otherwise a vertical * layout will be used.</li> * <li><strong>widths</strong> (Optional) This applies only for horizontal * layouts - an 2-element array of lengths to specify the widths of the * label and the content element.</li> * </ul> * @param {Array} htmlList * List of HTML code to output to. * @param {Function} contentHtml * A function returning the HTML code string to be added inside the content * cell. */ labeledElement : function( dialog, elementDefinition, htmlList, contentHtml ) { if ( arguments.length < 4 ) return; var _ = initPrivateObject.call( this, elementDefinition ); _.labelId = CKEDITOR.tools.getNextId() + '_label'; var children = this._.children = []; /** @ignore */ var innerHTML = function() { var html = [], requiredClass = elementDefinition.required ? ' cke_required' : '' ; if ( elementDefinition.labelLayout != 'horizontal' ) html.push( '<label class="cke_dialog_ui_labeled_label' + requiredClass + '" ', ' id="'+ _.labelId + '"', ( _.inputId? ' for="' + _.inputId + '"' : '' ), ( elementDefinition.labelStyle ? ' style="' + elementDefinition.labelStyle + '"' : '' ) +'>', elementDefinition.label, '</label>', '<div class="cke_dialog_ui_labeled_content"' + ( elementDefinition.controlStyle ? ' style="' + elementDefinition.controlStyle + '"' : '' ) + ' role="presentation">', contentHtml.call( this, dialog, elementDefinition ), '</div>' ); else { var hboxDefinition = { type : 'hbox', widths : elementDefinition.widths, padding : 0, children : [ { type : 'html', html : '<label class="cke_dialog_ui_labeled_label' + requiredClass + '"' + ' id="' + _.labelId + '"' + ' for="' + _.inputId + '"' + ( elementDefinition.labelStyle ? ' style="' + elementDefinition.labelStyle + '"' : '' ) +'>' + CKEDITOR.tools.htmlEncode( elementDefinition.label ) + '</span>' }, { type : 'html', html : '<span class="cke_dialog_ui_labeled_content"' + ( elementDefinition.controlStyle ? ' style="' + elementDefinition.controlStyle + '"' : '' ) + '>' + contentHtml.call( this, dialog, elementDefinition ) + '</span>' } ] }; CKEDITOR.dialog._.uiElementBuilders.hbox.build( dialog, hboxDefinition, html ); } return html.join( '' ); }; CKEDITOR.ui.dialog.uiElement.call( this, dialog, elementDefinition, htmlList, 'div', null, { role : 'presentation' }, innerHTML ); }, /** * A text input with a label. This UI element class represents both the * single-line text inputs and password inputs in dialog boxes. * @constructor * @example * @extends CKEDITOR.ui.dialog.labeledElement * @param {CKEDITOR.dialog} dialog * Parent dialog object. * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition * The element definition. Accepted fields: * <ul> * <li><strong>default</strong> (Optional) The default value.</li> * <li><strong>validate</strong> (Optional) The validation function. </li> * <li><strong>maxLength</strong> (Optional) The maximum length of text box * contents.</li> * <li><strong>size</strong> (Optional) The size of the text box. This is * usually overridden by the size defined by the skin, however.</li> * </ul> * @param {Array} htmlList * List of HTML code to output to. */ textInput : function( dialog, elementDefinition, htmlList ) { if ( arguments.length < 3 ) return; initPrivateObject.call( this, elementDefinition ); var domId = this._.inputId = CKEDITOR.tools.getNextId() + '_textInput', attributes = { 'class' : 'cke_dialog_ui_input_' + elementDefinition.type, id : domId, type : elementDefinition.type }, i; // Set the validator, if any. if ( elementDefinition.validate ) this.validate = elementDefinition.validate; // Set the max length and size. if ( elementDefinition.maxLength ) attributes.maxlength = elementDefinition.maxLength; if ( elementDefinition.size ) attributes.size = elementDefinition.size; if ( elementDefinition.inputStyle ) attributes.style = elementDefinition.inputStyle; /** @ignore */ var innerHTML = function() { // IE BUG: Text input fields in IE at 100% would exceed a <td> or inline // container's width, so need to wrap it inside a <div>. var html = [ '<div class="cke_dialog_ui_input_', elementDefinition.type, '" role="presentation"' ]; if ( elementDefinition.width ) html.push( 'style="width:'+ elementDefinition.width +'" ' ); html.push( '><input ' ); attributes[ 'aria-labelledby' ] = this._.labelId; this._.required && ( attributes[ 'aria-required' ] = this._.required ); for ( var i in attributes ) html.push( i + '="' + attributes[i] + '" ' ); html.push( ' /></div>' ); return html.join( '' ); }; CKEDITOR.ui.dialog.labeledElement.call( this, dialog, elementDefinition, htmlList, innerHTML ); }, /** * A text area with a label on the top or left. * @constructor * @extends CKEDITOR.ui.dialog.labeledElement * @example * @param {CKEDITOR.dialog} dialog * Parent dialog object. * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition * The element definition. Accepted fields: * <ul> * <li><strong>rows</strong> (Optional) The number of rows displayed. * Defaults to 5 if not defined.</li> * <li><strong>cols</strong> (Optional) The number of cols displayed. * Defaults to 20 if not defined. Usually overridden by skins.</li> * <li><strong>default</strong> (Optional) The default value.</li> * <li><strong>validate</strong> (Optional) The validation function. </li> * </ul> * @param {Array} htmlList * List of HTML code to output to. */ textarea : function( dialog, elementDefinition, htmlList ) { if ( arguments.length < 3 ) return; initPrivateObject.call( this, elementDefinition ); var me = this, domId = this._.inputId = CKEDITOR.tools.getNextId() + '_textarea', attributes = {}; if ( elementDefinition.validate ) this.validate = elementDefinition.validate; // Generates the essential attributes for the textarea tag. attributes.rows = elementDefinition.rows || 5; attributes.cols = elementDefinition.cols || 20; if ( typeof elementDefinition.inputStyle != 'undefined' ) attributes.style = elementDefinition.inputStyle; /** @ignore */ var innerHTML = function() { attributes[ 'aria-labelledby' ] = this._.labelId; this._.required && ( attributes[ 'aria-required' ] = this._.required ); var html = [ '<div class="cke_dialog_ui_input_textarea" role="presentation"><textarea class="cke_dialog_ui_input_textarea" id="', domId, '" ' ]; for ( var i in attributes ) html.push( i + '="' + CKEDITOR.tools.htmlEncode( attributes[i] ) + '" ' ); html.push( '>', CKEDITOR.tools.htmlEncode( me._['default'] ), '</textarea></div>' ); return html.join( '' ); }; CKEDITOR.ui.dialog.labeledElement.call( this, dialog, elementDefinition, htmlList, innerHTML ); }, /** * A single checkbox with a label on the right. * @constructor * @extends CKEDITOR.ui.dialog.uiElement * @example * @param {CKEDITOR.dialog} dialog * Parent dialog object. * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition * The element definition. Accepted fields: * <ul> * <li><strong>checked</strong> (Optional) Whether the checkbox is checked * on instantiation. Defaults to false.</li> * <li><strong>validate</strong> (Optional) The validation function.</li> * <li><strong>label</strong> (Optional) The checkbox label.</li> * </ul> * @param {Array} htmlList * List of HTML code to output to. */ checkbox : function( dialog, elementDefinition, htmlList ) { if ( arguments.length < 3 ) return; var _ = initPrivateObject.call( this, elementDefinition, { 'default' : !!elementDefinition[ 'default' ] } ); if ( elementDefinition.validate ) this.validate = elementDefinition.validate; /** @ignore */ var innerHTML = function() { var myDefinition = CKEDITOR.tools.extend( {}, elementDefinition, { id : elementDefinition.id ? elementDefinition.id + '_checkbox' : CKEDITOR.tools.getNextId() + '_checkbox' }, true ), html = []; var labelId = CKEDITOR.tools.getNextId() + '_label'; var attributes = { 'class' : 'cke_dialog_ui_checkbox_input', type : 'checkbox', 'aria-labelledby' : labelId }; cleanInnerDefinition( myDefinition ); if ( elementDefinition[ 'default' ] ) attributes.checked = 'checked'; if ( typeof myDefinition.inputStyle != 'undefined' ) myDefinition.style = myDefinition.inputStyle; _.checkbox = new CKEDITOR.ui.dialog.uiElement( dialog, myDefinition, html, 'input', null, attributes ); html.push( ' <label id="', labelId, '" for="', attributes.id, '"' + ( elementDefinition.labelStyle ? ' style="' + elementDefinition.labelStyle + '"' : '' ) + '>', CKEDITOR.tools.htmlEncode( elementDefinition.label ), '</label>' ); return html.join( '' ); }; CKEDITOR.ui.dialog.uiElement.call( this, dialog, elementDefinition, htmlList, 'span', null, null, innerHTML ); }, /** * A group of radio buttons. * @constructor * @example * @extends CKEDITOR.ui.dialog.labeledElement * @param {CKEDITOR.dialog} dialog * Parent dialog object. * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition * The element definition. Accepted fields: * <ul> * <li><strong>default</strong> (Required) The default value.</li> * <li><strong>validate</strong> (Optional) The validation function.</li> * <li><strong>items</strong> (Required) An array of options. Each option * is a 1- or 2-item array of format [ 'Description', 'Value' ]. If 'Value' * is missing, then the value would be assumed to be the same as the * description.</li> * </ul> * @param {Array} htmlList * List of HTML code to output to. */ radio : function( dialog, elementDefinition, htmlList ) { if ( arguments.length < 3) return; initPrivateObject.call( this, elementDefinition ); if ( !this._['default'] ) this._['default'] = this._.initValue = elementDefinition.items[0][1]; if ( elementDefinition.validate ) this.validate = elementDefinition.valdiate; var children = [], me = this; /** @ignore */ var innerHTML = function() { var inputHtmlList = [], html = [], commonAttributes = { 'class' : 'cke_dialog_ui_radio_item', 'aria-labelledby' : this._.labelId }, commonName = elementDefinition.id ? elementDefinition.id + '_radio' : CKEDITOR.tools.getNextId() + '_radio'; for ( var i = 0 ; i < elementDefinition.items.length ; i++ ) { var item = elementDefinition.items[i], title = item[2] !== undefined ? item[2] : item[0], value = item[1] !== undefined ? item[1] : item[0], inputId = CKEDITOR.tools.getNextId() + '_radio_input', labelId = inputId + '_label', inputDefinition = CKEDITOR.tools.extend( {}, elementDefinition, { id : inputId, title : null, type : null }, true ), labelDefinition = CKEDITOR.tools.extend( {}, inputDefinition, { title : title }, true ), inputAttributes = { type : 'radio', 'class' : 'cke_dialog_ui_radio_input', name : commonName, value : value, 'aria-labelledby' : labelId }, inputHtml = []; if ( me._['default'] == value ) inputAttributes.checked = 'checked'; cleanInnerDefinition( inputDefinition ); cleanInnerDefinition( labelDefinition ); if ( typeof inputDefinition.inputStyle != 'undefined' ) inputDefinition.style = inputDefinition.inputStyle; children.push( new CKEDITOR.ui.dialog.uiElement( dialog, inputDefinition, inputHtml, 'input', null, inputAttributes ) ); inputHtml.push( ' ' ); new CKEDITOR.ui.dialog.uiElement( dialog, labelDefinition, inputHtml, 'label', null, { id : labelId, 'for' : inputAttributes.id }, item[0] ); inputHtmlList.push( inputHtml.join( '' ) ); } new CKEDITOR.ui.dialog.hbox( dialog, children, inputHtmlList, html ); return html.join( '' ); }; CKEDITOR.ui.dialog.labeledElement.call( this, dialog, elementDefinition, htmlList, innerHTML ); this._.children = children; }, /** * A button with a label inside. * @constructor * @example * @extends CKEDITOR.ui.dialog.uiElement * @param {CKEDITOR.dialog} dialog * Parent dialog object. * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition * The element definition. Accepted fields: * <ul> * <li><strong>label</strong> (Required) The button label.</li> * <li><strong>disabled</strong> (Optional) Set to true if you want the * button to appear in disabled state.</li> * </ul> * @param {Array} htmlList * List of HTML code to output to. */ button : function( dialog, elementDefinition, htmlList ) { if ( !arguments.length ) return; if ( typeof elementDefinition == 'function' ) elementDefinition = elementDefinition( dialog.getParentEditor() ); initPrivateObject.call( this, elementDefinition, { disabled : elementDefinition.disabled || false } ); // Add OnClick event to this input. CKEDITOR.event.implementOn( this ); var me = this; // Register an event handler for processing button clicks. dialog.on( 'load', function( eventInfo ) { var element = this.getElement(); (function() { element.on( 'click', function( evt ) { me.fire( 'click', { dialog : me.getDialog() } ); evt.data.preventDefault(); } ); element.on( 'keydown', function( evt ) { if ( evt.data.getKeystroke() in { 32:1 } ) { me.click(); evt.data.preventDefault(); } } ); })(); element.unselectable(); }, this ); var outerDefinition = CKEDITOR.tools.extend( {}, elementDefinition ); delete outerDefinition.style; var labelId = CKEDITOR.tools.getNextId() + '_label'; CKEDITOR.ui.dialog.uiElement.call( this, dialog, outerDefinition, htmlList, 'a', null, { style : elementDefinition.style, href : 'javascript:void(0)', title : elementDefinition.label, hidefocus : 'true', 'class' : elementDefinition['class'], role : 'button', 'aria-labelledby' : labelId }, '<span id="' + labelId + '" class="cke_dialog_ui_button">' + CKEDITOR.tools.htmlEncode( elementDefinition.label ) + '</span>' ); }, /** * A select box. * @extends CKEDITOR.ui.dialog.uiElement * @example * @constructor * @param {CKEDITOR.dialog} dialog * Parent dialog object. * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition * The element definition. Accepted fields: * <ul> * <li><strong>default</strong> (Required) The default value.</li> * <li><strong>validate</strong> (Optional) The validation function.</li> * <li><strong>items</strong> (Required) An array of options. Each option * is a 1- or 2-item array of format [ 'Description', 'Value' ]. If 'Value' * is missing, then the value would be assumed to be the same as the * description.</li> * <li><strong>multiple</strong> (Optional) Set this to true if you'd like * to have a multiple-choice select box.</li> * <li><strong>size</strong> (Optional) The number of items to display in * the select box.</li> * </ul> * @param {Array} htmlList * List of HTML code to output to. */ select : function( dialog, elementDefinition, htmlList ) { if ( arguments.length < 3 ) return; var _ = initPrivateObject.call( this, elementDefinition ); if ( elementDefinition.validate ) this.validate = elementDefinition.validate; _.inputId = CKEDITOR.tools.getNextId() + '_select'; /** @ignore */ var innerHTML = function() { var myDefinition = CKEDITOR.tools.extend( {}, elementDefinition, { id : elementDefinition.id ? elementDefinition.id + '_select' : CKEDITOR.tools.getNextId() + '_select' }, true ), html = [], innerHTML = [], attributes = { 'id' : _.inputId, 'class' : 'cke_dialog_ui_input_select', 'aria-labelledby' : this._.labelId }; // Add multiple and size attributes from element definition. if ( elementDefinition.size != undefined ) attributes.size = elementDefinition.size; if ( elementDefinition.multiple != undefined ) attributes.multiple = elementDefinition.multiple; cleanInnerDefinition( myDefinition ); for ( var i = 0, item ; i < elementDefinition.items.length && ( item = elementDefinition.items[i] ) ; i++ ) { innerHTML.push( '<option value="', CKEDITOR.tools.htmlEncode( item[1] !== undefined ? item[1] : item[0] ).replace( /"/g, '&quot;' ), '" /> ', CKEDITOR.tools.htmlEncode( item[0] ) ); } if ( typeof myDefinition.inputStyle != 'undefined' ) myDefinition.style = myDefinition.inputStyle; _.select = new CKEDITOR.ui.dialog.uiElement( dialog, myDefinition, html, 'select', null, attributes, innerHTML.join( '' ) ); return html.join( '' ); }; CKEDITOR.ui.dialog.labeledElement.call( this, dialog, elementDefinition, htmlList, innerHTML ); }, /** * A file upload input. * @extends CKEDITOR.ui.dialog.labeledElement * @example * @constructor * @param {CKEDITOR.dialog} dialog * Parent dialog object. * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition * The element definition. Accepted fields: * <ul> * <li><strong>validate</strong> (Optional) The validation function.</li> * </ul> * @param {Array} htmlList * List of HTML code to output to. */ file : function( dialog, elementDefinition, htmlList ) { if ( arguments.length < 3 ) return; if ( elementDefinition['default'] === undefined ) elementDefinition['default'] = ''; var _ = CKEDITOR.tools.extend( initPrivateObject.call( this, elementDefinition ), { definition : elementDefinition, buttons : [] } ); if ( elementDefinition.validate ) this.validate = elementDefinition.validate; /** @ignore */ var innerHTML = function() { _.frameId = CKEDITOR.tools.getNextId() + '_fileInput'; // Support for custom document.domain in IE. var isCustomDomain = CKEDITOR.env.isCustomDomain(); var html = [ '<iframe' + ' frameborder="0"' + ' allowtransparency="0"' + ' class="cke_dialog_ui_input_file"' + ' role="presentation"' + ' id="', _.frameId, '"' + ' title="', elementDefinition.label, '"' + ' src="javascript:void(' ]; html.push( isCustomDomain ? '(function(){' + 'document.open();' + 'document.domain=\'' + document.domain + '\';' + 'document.close();' + '})()' : '0' ); html.push( ')">' + '</iframe>' ); return html.join( '' ); }; // IE BUG: Parent container does not resize to contain the iframe automatically. dialog.on( 'load', function() { var iframe = CKEDITOR.document.getById( _.frameId ), contentDiv = iframe.getParent(); contentDiv.addClass( 'cke_dialog_ui_input_file' ); } ); CKEDITOR.ui.dialog.labeledElement.call( this, dialog, elementDefinition, htmlList, innerHTML ); }, /** * A button for submitting the file in a file upload input. * @extends CKEDITOR.ui.dialog.button * @example * @constructor * @param {CKEDITOR.dialog} dialog * Parent dialog object. * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition * The element definition. Accepted fields: * <ul> * <li><strong>for</strong> (Required) The file input's page and element Id * to associate to, in a 2-item array format: [ 'page_id', 'element_id' ]. * </li> * <li><strong>validate</strong> (Optional) The validation function.</li> * </ul> * @param {Array} htmlList * List of HTML code to output to. */ fileButton : function( dialog, elementDefinition, htmlList ) { if ( arguments.length < 3 ) return; var _ = initPrivateObject.call( this, elementDefinition ), me = this; if ( elementDefinition.validate ) this.validate = elementDefinition.validate; var myDefinition = CKEDITOR.tools.extend( {}, elementDefinition ); var onClick = myDefinition.onClick; myDefinition.className = ( myDefinition.className ? myDefinition.className + ' ' : '' ) + 'cke_dialog_ui_button'; myDefinition.onClick = function( evt ) { var target = elementDefinition[ 'for' ]; // [ pageId, elementId ] if ( !onClick || onClick.call( this, evt ) !== false ) { dialog.getContentElement( target[0], target[1] ).submit(); this.disable(); } }; dialog.on( 'load', function() { dialog.getContentElement( elementDefinition[ 'for' ][0], elementDefinition[ 'for' ][1] )._.buttons.push( me ); } ); CKEDITOR.ui.dialog.button.call( this, dialog, myDefinition, htmlList ); }, html : (function() { var myHtmlRe = /^\s*<[\w:]+\s+([^>]*)?>/, theirHtmlRe = /^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/, emptyTagRe = /\/$/; /** * A dialog element made from raw HTML code. * @extends CKEDITOR.ui.dialog.uiElement * @name CKEDITOR.ui.dialog.html * @param {CKEDITOR.dialog} dialog Parent dialog object. * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition Element definition. * Accepted fields: * <ul> * <li><strong>html</strong> (Required) HTML code of this element.</li> * </ul> * @param {Array} htmlList List of HTML code to be added to the dialog's content area. * @example * @constructor */ return function( dialog, elementDefinition, htmlList ) { if ( arguments.length < 3 ) return; var myHtmlList = [], myHtml, theirHtml = elementDefinition.html, myMatch, theirMatch; // If the HTML input doesn't contain any tags at the beginning, add a <span> tag around it. if ( theirHtml.charAt( 0 ) != '<' ) theirHtml = '<span>' + theirHtml + '</span>'; // Look for focus function in definition. var focus = elementDefinition.focus; if ( focus ) { var oldFocus = this.focus; this.focus = function() { oldFocus.call( this ); typeof focus == 'function' && focus.call( this ); this.fire( 'focus' ); }; if ( elementDefinition.isFocusable ) { var oldIsFocusable = this.isFocusable; this.isFocusable = oldIsFocusable; } this.keyboardFocusable = true; } CKEDITOR.ui.dialog.uiElement.call( this, dialog, elementDefinition, myHtmlList, 'span', null, null, '' ); // Append the attributes created by the uiElement call to the real HTML. myHtml = myHtmlList.join( '' ); myMatch = myHtml.match( myHtmlRe ); theirMatch = theirHtml.match( theirHtmlRe ) || [ '', '', '' ]; if ( emptyTagRe.test( theirMatch[1] ) ) { theirMatch[1] = theirMatch[1].slice( 0, -1 ); theirMatch[2] = '/' + theirMatch[2]; } htmlList.push( [ theirMatch[1], ' ', myMatch[1] || '', theirMatch[2] ].join( '' ) ); }; })(), /** * Form fieldset for grouping dialog UI elements. * @constructor * @extends CKEDITOR.ui.dialog.uiElement * @param {CKEDITOR.dialog} dialog Parent dialog object. * @param {Array} childObjList * Array of {@link CKEDITOR.ui.dialog.uiElement} objects inside this * container. * @param {Array} childHtmlList * Array of HTML code that correspond to the HTML output of all the * objects in childObjList. * @param {Array} htmlList * Array of HTML code that this element will output to. * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition * The element definition. Accepted fields: * <ul> * <li><strong>label</strong> (Optional) The legend of the this fieldset.</li> * <li><strong>children</strong> (Required) An array of dialog field definitions which will be grouped inside this fieldset. </li> * </ul> */ fieldset : function( dialog, childObjList, childHtmlList, htmlList, elementDefinition ) { var legendLabel = elementDefinition.label; /** @ignore */ var innerHTML = function() { var html = []; legendLabel && html.push( '<legend' + ( elementDefinition.labelStyle ? ' style="' + elementDefinition.labelStyle + '"' : '' ) + '>' + legendLabel + '</legend>' ); for ( var i = 0; i < childHtmlList.length; i++ ) html.push( childHtmlList[ i ] ); return html.join( '' ); }; this._ = { children : childObjList }; CKEDITOR.ui.dialog.uiElement.call( this, dialog, elementDefinition, htmlList, 'fieldset', null, null, innerHTML ); } }, true ); CKEDITOR.ui.dialog.html.prototype = new CKEDITOR.ui.dialog.uiElement; CKEDITOR.ui.dialog.labeledElement.prototype = CKEDITOR.tools.extend( new CKEDITOR.ui.dialog.uiElement, /** @lends CKEDITOR.ui.dialog.labeledElement.prototype */ { /** * Sets the label text of the element. * @param {String} label The new label text. * @returns {CKEDITOR.ui.dialog.labeledElement} The current labeled element. * @example */ setLabel : function( label ) { var node = CKEDITOR.document.getById( this._.labelId ); if ( node.getChildCount() < 1 ) ( new CKEDITOR.dom.text( label, CKEDITOR.document ) ).appendTo( node ); else node.getChild( 0 ).$.nodeValue = label; return this; }, /** * Retrieves the current label text of the elment. * @returns {String} The current label text. * @example */ getLabel : function() { var node = CKEDITOR.document.getById( this._.labelId ); if ( !node || node.getChildCount() < 1 ) return ''; else return node.getChild( 0 ).getText(); }, /** * Defines the onChange event for UI element definitions. * @field * @type Object * @example */ eventProcessors : commonEventProcessors }, true ); CKEDITOR.ui.dialog.button.prototype = CKEDITOR.tools.extend( new CKEDITOR.ui.dialog.uiElement, /** @lends CKEDITOR.ui.dialog.button.prototype */ { /** * Simulates a click to the button. * @example * @returns {Object} Return value of the 'click' event. */ click : function() { if ( !this._.disabled ) return this.fire( 'click', { dialog : this._.dialog } ); this.getElement().$.blur(); return false; }, /** * Enables the button. * @example */ enable : function() { this._.disabled = false; var element = this.getElement(); element && element.removeClass( 'cke_disabled' ); }, /** * Disables the button. * @example */ disable : function() { this._.disabled = true; this.getElement().addClass( 'cke_disabled' ); }, isVisible : function() { return this.getElement().getFirst().isVisible(); }, isEnabled : function() { return !this._.disabled; }, /** * Defines the onChange event and onClick for button element definitions. * @field * @type Object * @example */ eventProcessors : CKEDITOR.tools.extend( {}, CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors, { /** @ignore */ onClick : function( dialog, func ) { this.on( 'click', function() { // Some browsers (Chrome, IE8, IE7 compat mode) don't move // focus to clicked button. Force this. this.getElement().focus(); func.apply( this, arguments ); }); } }, true ), /** * Handler for the element's access key up event. Simulates a click to * the button. * @example */ accessKeyUp : function() { this.click(); }, /** * Handler for the element's access key down event. Simulates a mouse * down to the button. * @example */ accessKeyDown : function() { this.focus(); }, keyboardFocusable : true }, true ); CKEDITOR.ui.dialog.textInput.prototype = CKEDITOR.tools.extend( new CKEDITOR.ui.dialog.labeledElement, /** @lends CKEDITOR.ui.dialog.textInput.prototype */ { /** * Gets the text input DOM element under this UI object. * @example * @returns {CKEDITOR.dom.element} The DOM element of the text input. */ getInputElement : function() { return CKEDITOR.document.getById( this._.inputId ); }, /** * Puts focus into the text input. * @example */ focus : function() { var me = this.selectParentTab(); // GECKO BUG: setTimeout() is needed to workaround invisible selections. setTimeout( function() { var element = me.getInputElement(); element && element.$.focus(); }, 0 ); }, /** * Selects all the text in the text input. * @example */ select : function() { var me = this.selectParentTab(); // GECKO BUG: setTimeout() is needed to workaround invisible selections. setTimeout( function() { var e = me.getInputElement(); if ( e ) { e.$.focus(); e.$.select(); } }, 0 ); }, /** * Handler for the text input's access key up event. Makes a select() * call to the text input. * @example */ accessKeyUp : function() { this.select(); }, /** * Sets the value of this text input object. * @param {Object} value The new value. * @returns {CKEDITOR.ui.dialog.textInput} The current UI element. * @example * uiElement.setValue( 'Blamo' ); */ setValue : function( value ) { !value && ( value = '' ); return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply( this, arguments ); }, keyboardFocusable : true }, commonPrototype, true ); CKEDITOR.ui.dialog.textarea.prototype = new CKEDITOR.ui.dialog.textInput(); CKEDITOR.ui.dialog.select.prototype = CKEDITOR.tools.extend( new CKEDITOR.ui.dialog.labeledElement, /** @lends CKEDITOR.ui.dialog.select.prototype */ { /** * Gets the DOM element of the select box. * @returns {CKEDITOR.dom.element} The &lt;select&gt; element of this UI * element. * @example */ getInputElement : function() { return this._.select.getElement(); }, /** * Adds an option to the select box. * @param {String} label Option label. * @param {String} value (Optional) Option value, if not defined it'll be * assumed to be the same as the label. * @param {Number} index (Optional) Position of the option to be inserted * to. If not defined the new option will be inserted to the end of list. * @example * @returns {CKEDITOR.ui.dialog.select} The current select UI element. */ add : function( label, value, index ) { var option = new CKEDITOR.dom.element( 'option', this.getDialog().getParentEditor().document ), selectElement = this.getInputElement().$; option.$.text = label; option.$.value = ( value === undefined || value === null ) ? label : value; if ( index === undefined || index === null ) { if ( CKEDITOR.env.ie ) selectElement.add( option.$ ); else selectElement.add( option.$, null ); } else selectElement.add( option.$, index ); return this; }, /** * Removes an option from the selection list. * @param {Number} index Index of the option to be removed. * @example * @returns {CKEDITOR.ui.dialog.select} The current select UI element. */ remove : function( index ) { var selectElement = this.getInputElement().$; selectElement.remove( index ); return this; }, /** * Clears all options out of the selection list. * @returns {CKEDITOR.ui.dialog.select} The current select UI element. */ clear : function() { var selectElement = this.getInputElement().$; while ( selectElement.length > 0 ) selectElement.remove( 0 ); return this; }, keyboardFocusable : true }, commonPrototype, true ); CKEDITOR.ui.dialog.checkbox.prototype = CKEDITOR.tools.extend( new CKEDITOR.ui.dialog.uiElement, /** @lends CKEDITOR.ui.dialog.checkbox.prototype */ { /** * Gets the checkbox DOM element. * @example * @returns {CKEDITOR.dom.element} The DOM element of the checkbox. */ getInputElement : function() { return this._.checkbox.getElement(); }, /** * Sets the state of the checkbox. * @example * @param {Boolean} true to tick the checkbox, false to untick it. * @param {Boolean} noChangeEvent Internal commit, to supress 'change' event on this element. */ setValue : function( checked, noChangeEvent ) { this.getInputElement().$.checked = checked; !noChangeEvent && this.fire( 'change', { value : checked } ); }, /** * Gets the state of the checkbox. * @example * @returns {Boolean} true means the checkbox is ticked, false means it's not ticked. */ getValue : function() { return this.getInputElement().$.checked; }, /** * Handler for the access key up event. Toggles the checkbox. * @example */ accessKeyUp : function() { this.setValue( !this.getValue() ); }, /** * Defines the onChange event for UI element definitions. * @field * @type Object * @example */ eventProcessors : { onChange : function( dialog, func ) { if ( !CKEDITOR.env.ie ) return commonEventProcessors.onChange.apply( this, arguments ); else { dialog.on( 'load', function() { var element = this._.checkbox.getElement(); element.on( 'propertychange', function( evt ) { evt = evt.data.$; if ( evt.propertyName == 'checked' ) this.fire( 'change', { value : element.$.checked } ); }, this ); }, this ); this.on( 'change', func ); } return null; } }, keyboardFocusable : true }, commonPrototype, true ); CKEDITOR.ui.dialog.radio.prototype = CKEDITOR.tools.extend( new CKEDITOR.ui.dialog.uiElement, /** @lends CKEDITOR.ui.dialog.radio.prototype */ { /** * Checks one of the radio buttons in this button group. * @example * @param {String} value The value of the button to be chcked. * @param {Boolean} noChangeEvent Internal commit, to supress 'change' event on this element. */ setValue : function( value, noChangeEvent ) { var children = this._.children, item; for ( var i = 0 ; ( i < children.length ) && ( item = children[i] ) ; i++ ) item.getElement().$.checked = ( item.getValue() == value ); !noChangeEvent && this.fire( 'change', { value : value } ); }, /** * Gets the value of the currently checked radio button. * @example * @returns {String} The currently checked button's value. */ getValue : function() { var children = this._.children; for ( var i = 0 ; i < children.length ; i++ ) { if ( children[i].getElement().$.checked ) return children[i].getValue(); } return null; }, /** * Handler for the access key up event. Focuses the currently * selected radio button, or the first radio button if none is * selected. * @example */ accessKeyUp : function() { var children = this._.children, i; for ( i = 0 ; i < children.length ; i++ ) { if ( children[i].getElement().$.checked ) { children[i].getElement().focus(); return; } } children[0].getElement().focus(); }, /** * Defines the onChange event for UI element definitions. * @field * @type Object * @example */ eventProcessors : { onChange : function( dialog, func ) { if ( !CKEDITOR.env.ie ) return commonEventProcessors.onChange.apply( this, arguments ); else { dialog.on( 'load', function() { var children = this._.children, me = this; for ( var i = 0 ; i < children.length ; i++ ) { var element = children[i].getElement(); element.on( 'propertychange', function( evt ) { evt = evt.data.$; if ( evt.propertyName == 'checked' && this.$.checked ) me.fire( 'change', { value : this.getAttribute( 'value' ) } ); } ); } }, this ); this.on( 'change', func ); } return null; } }, keyboardFocusable : true }, commonPrototype, true ); CKEDITOR.ui.dialog.file.prototype = CKEDITOR.tools.extend( new CKEDITOR.ui.dialog.labeledElement, commonPrototype, /** @lends CKEDITOR.ui.dialog.file.prototype */ { /** * Gets the &lt;input&gt; element of this file input. * @returns {CKEDITOR.dom.element} The file input element. * @example */ getInputElement : function() { var frameDocument = CKEDITOR.document.getById( this._.frameId ).getFrameDocument(); return frameDocument.$.forms.length > 0 ? new CKEDITOR.dom.element( frameDocument.$.forms[0].elements[0] ) : this.getElement(); }, /** * Uploads the file in the file input. * @returns {CKEDITOR.ui.dialog.file} This object. * @example */ submit : function() { this.getInputElement().getParent().$.submit(); return this; }, /** * Get the action assigned to the form. * @returns {String} The value of the action. * @example */ getAction : function() { return this.getInputElement().getParent().$.action; }, /** * The events must be applied on the inner input element, and * that must be done when the iframe & form has been loaded */ registerEvents : function( definition ) { var regex = /^on([A-Z]\w+)/, match; var registerDomEvent = function( uiElement, dialog, eventName, func ) { uiElement.on( 'formLoaded', function() { uiElement.getInputElement().on( eventName, func, uiElement ); }); }; for ( var i in definition ) { if ( !( match = i.match( regex ) ) ) continue; if ( this.eventProcessors[i] ) this.eventProcessors[i].call( this, this._.dialog, definition[i] ); else registerDomEvent( this, this._.dialog, match[1].toLowerCase(), definition[i] ); } return this; }, /** * Redraws the file input and resets the file path in the file input. * The redraw logic is necessary because non-IE browsers tend to clear * the &lt;iframe&gt; containing the file input after closing the dialog. * @example */ reset : function() { var _ = this._, frameElement = CKEDITOR.document.getById( _.frameId ), frameDocument = frameElement.getFrameDocument(), elementDefinition = _.definition, buttons = _.buttons, callNumber = this.formLoadedNumber, unloadNumber = this.formUnloadNumber, langDir = _.dialog._.editor.lang.dir, langCode = _.dialog._.editor.langCode; // The callback function for the iframe, but we must call tools.addFunction only once // so we store the function number in this.formLoadedNumber if ( !callNumber ) { callNumber = this.formLoadedNumber = CKEDITOR.tools.addFunction( function() { // Now we can apply the events to the input type=file this.fire( 'formLoaded' ) ; }, this ) ; // Remove listeners attached to the content of the iframe (the file input) unloadNumber = this.formUnloadNumber = CKEDITOR.tools.addFunction( function() { this.getInputElement().clearCustomData(); }, this ) ; this.getDialog()._.editor.on( 'destroy', function() { CKEDITOR.tools.removeFunction( callNumber ); CKEDITOR.tools.removeFunction( unloadNumber ); } ); } function generateFormField() { frameDocument.$.open(); // Support for custom document.domain in IE. if ( CKEDITOR.env.isCustomDomain() ) frameDocument.$.domain = document.domain; var size = ''; if ( elementDefinition.size ) size = elementDefinition.size - ( CKEDITOR.env.ie ? 7 : 0 ); // "Browse" button is bigger in IE. var inputId = _.frameId + '_input'; frameDocument.$.write( [ '<html dir="' + langDir + '" lang="' + langCode + '"><head><title></title></head><body style="margin: 0; overflow: hidden; background: transparent;">', '<form enctype="multipart/form-data" method="POST" dir="' + langDir + '" lang="' + langCode + '" action="', CKEDITOR.tools.htmlEncode( elementDefinition.action ), '">', // Replicate the field label inside of iframe. '<label id="', _.labelId, '" for="', inputId, '" style="display:none">', CKEDITOR.tools.htmlEncode( elementDefinition.label ), '</label>', '<input id="', inputId, '" aria-labelledby="', _.labelId,'" type="file" name="', CKEDITOR.tools.htmlEncode( elementDefinition.id || 'cke_upload' ), '" size="', CKEDITOR.tools.htmlEncode( size > 0 ? size : "" ), '" />', '</form>', '</body></html>', '<script>window.parent.CKEDITOR.tools.callFunction(' + callNumber + ');', 'window.onbeforeunload = function() {window.parent.CKEDITOR.tools.callFunction(' + unloadNumber + ')}</script>' ].join( '' ) ); frameDocument.$.close(); for ( var i = 0 ; i < buttons.length ; i++ ) buttons[i].enable(); } // #3465: Wait for the browser to finish rendering the dialog first. if ( CKEDITOR.env.gecko ) setTimeout( generateFormField, 500 ); else generateFormField(); }, getValue : function() { return this.getInputElement().$.value || ''; }, /*** * The default value of input type="file" is an empty string, but during initialization * of this UI element, the iframe still isn't ready so it can't be read from that object * Setting it manually prevents later issues about the current value ("") being different * of the initial value (undefined as it asked for .value of a div) */ setInitValue : function() { this._.initValue = ''; }, /** * Defines the onChange event for UI element definitions. * @field * @type Object * @example */ eventProcessors : { onChange : function( dialog, func ) { // If this method is called several times (I'm not sure about how this can happen but the default // onChange processor includes this protection) // In order to reapply to the new element, the property is deleted at the beggining of the registerEvents method if ( !this._.domOnChangeRegistered ) { // By listening for the formLoaded event, this handler will get reapplied when a new // form is created this.on( 'formLoaded', function() { this.getInputElement().on( 'change', function(){ this.fire( 'change', { value : this.getValue() } ); }, this ); }, this ); this._.domOnChangeRegistered = true; } this.on( 'change', func ); } }, keyboardFocusable : true }, true ); CKEDITOR.ui.dialog.fileButton.prototype = new CKEDITOR.ui.dialog.button; CKEDITOR.ui.dialog.fieldset.prototype = CKEDITOR.tools.clone( CKEDITOR.ui.dialog.hbox.prototype ); CKEDITOR.dialog.addUIElement( 'text', textBuilder ); CKEDITOR.dialog.addUIElement( 'password', textBuilder ); CKEDITOR.dialog.addUIElement( 'textarea', commonBuilder ); CKEDITOR.dialog.addUIElement( 'checkbox', commonBuilder ); CKEDITOR.dialog.addUIElement( 'radio', commonBuilder ); CKEDITOR.dialog.addUIElement( 'button', commonBuilder ); CKEDITOR.dialog.addUIElement( 'select', commonBuilder ); CKEDITOR.dialog.addUIElement( 'file', commonBuilder ); CKEDITOR.dialog.addUIElement( 'fileButton', commonBuilder ); CKEDITOR.dialog.addUIElement( 'html', commonBuilder ); CKEDITOR.dialog.addUIElement( 'fieldset', containerBuilder ); })(); /** * Fired when the value of the uiElement is changed * @name CKEDITOR.ui.dialog.uiElement#change * @event */ /** * Fired when the inner frame created by the element is ready. * Each time the button is used or the dialog is loaded a new * form might be created. * @name CKEDITOR.ui.dialog.fileButton#formLoaded * @event */
10npsite
trunk/guanli/system/ckeditor/_source/plugins/dialogui/plugin.js
JavaScript
asf20
50,951
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function() { var cssStyle = CKEDITOR.htmlParser.cssStyle, cssLength = CKEDITOR.tools.cssLength; var cssLengthRegex = /^((?:\d*(?:\.\d+))|(?:\d+))(.*)?$/i; /* * Replacing the former CSS length value with the later one, with * adjustment to the length unit. */ function replaceCssLength( length1, length2 ) { var parts1 = cssLengthRegex.exec( length1 ), parts2 = cssLengthRegex.exec( length2 ); // Omit pixel length unit when necessary, // e.g. replaceCssLength( 10, '20px' ) -> 20 if ( parts1 ) { if ( !parts1[ 2 ] && parts2[ 2 ] == 'px' ) return parts2[ 1 ]; if ( parts1[ 2 ] == 'px' && !parts2[ 2 ] ) return parts2[ 1 ] + 'px'; } return length2; } var htmlFilterRules = { elements : { $ : function( element ) { var attributes = element.attributes, realHtml = attributes && attributes[ 'data-cke-realelement' ], realFragment = realHtml && new CKEDITOR.htmlParser.fragment.fromHtml( decodeURIComponent( realHtml ) ), realElement = realFragment && realFragment.children[ 0 ]; // Width/height in the fake object are subjected to clone into the real element. if ( realElement && element.attributes[ 'data-cke-resizable' ] ) { var styles = new cssStyle( element ).rules, realAttrs = realElement.attributes, width = styles.width, height = styles.height; width && ( realAttrs.width = replaceCssLength( realAttrs.width, width ) ); height && ( realAttrs.height = replaceCssLength( realAttrs.height, height ) ); } return realElement; } } }; CKEDITOR.plugins.add( 'fakeobjects', { requires : [ 'htmlwriter' ], afterInit : function( editor ) { var dataProcessor = editor.dataProcessor, htmlFilter = dataProcessor && dataProcessor.htmlFilter; if ( htmlFilter ) htmlFilter.addRules( htmlFilterRules ); } }); CKEDITOR.editor.prototype.createFakeElement = function( realElement, className, realElementType, isResizable ) { var lang = this.lang.fakeobjects, label = lang[ realElementType ] || lang.unknown; var attributes = { 'class' : className, 'data-cke-realelement' : encodeURIComponent( realElement.getOuterHtml() ), 'data-cke-real-node-type' : realElement.type, alt : label, title : label, align : realElement.getAttribute( 'align' ) || '' }; // Do not set "src" on high-contrast so the alt text is displayed. (#8945) if ( !CKEDITOR.env.hc ) attributes.src = CKEDITOR.getUrl( 'images/spacer.gif' ); if ( realElementType ) attributes[ 'data-cke-real-element-type' ] = realElementType; if ( isResizable ) { attributes[ 'data-cke-resizable' ] = isResizable; var fakeStyle = new cssStyle(); var width = realElement.getAttribute( 'width' ), height = realElement.getAttribute( 'height' ); width && ( fakeStyle.rules.width = cssLength( width ) ); height && ( fakeStyle.rules.height = cssLength( height ) ); fakeStyle.populate( attributes ); } return this.document.createElement( 'img', { attributes : attributes } ); }; CKEDITOR.editor.prototype.createFakeParserElement = function( realElement, className, realElementType, isResizable ) { var lang = this.lang.fakeobjects, label = lang[ realElementType ] || lang.unknown, html; var writer = new CKEDITOR.htmlParser.basicWriter(); realElement.writeHtml( writer ); html = writer.getHtml(); var attributes = { 'class' : className, 'data-cke-realelement' : encodeURIComponent( html ), 'data-cke-real-node-type' : realElement.type, alt : label, title : label, align : realElement.attributes.align || '' }; // Do not set "src" on high-contrast so the alt text is displayed. (#8945) if ( !CKEDITOR.env.hc ) attributes.src = CKEDITOR.getUrl( 'images/spacer.gif' ); if ( realElementType ) attributes[ 'data-cke-real-element-type' ] = realElementType; if ( isResizable ) { attributes[ 'data-cke-resizable' ] = isResizable; var realAttrs = realElement.attributes, fakeStyle = new cssStyle(); var width = realAttrs.width, height = realAttrs.height; width != undefined && ( fakeStyle.rules.width = cssLength( width ) ); height != undefined && ( fakeStyle.rules.height = cssLength ( height ) ); fakeStyle.populate( attributes ); } return new CKEDITOR.htmlParser.element( 'img', attributes ); }; CKEDITOR.editor.prototype.restoreRealElement = function( fakeElement ) { if ( fakeElement.data( 'cke-real-node-type' ) != CKEDITOR.NODE_ELEMENT ) return null; var element = CKEDITOR.dom.element.createFromHtml( decodeURIComponent( fakeElement.data( 'cke-realelement' ) ), this.document ); if ( fakeElement.data( 'cke-resizable') ) { var width = fakeElement.getStyle( 'width' ), height = fakeElement.getStyle( 'height' ); width && element.setAttribute( 'width', replaceCssLength( element.getAttribute( 'width' ), width ) ); height && element.setAttribute( 'height', replaceCssLength( element.getAttribute( 'height' ), height ) ); } return element; }; })();
10npsite
trunk/guanli/system/ckeditor/_source/plugins/fakeobjects/plugin.js
JavaScript
asf20
5,396
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.add( 'floatpanel', { requires : [ 'panel' ] }); (function() { var panels = {}; var isShowing = false; function getPanel( editor, doc, parentElement, definition, level ) { // Generates the panel key: docId-eleId-skinName-langDir[-uiColor][-CSSs][-level] var key = CKEDITOR.tools.genKey( doc.getUniqueId(), parentElement.getUniqueId(), editor.skinName, editor.lang.dir, editor.uiColor || '', definition.css || '', level || '' ); var panel = panels[ key ]; if ( !panel ) { panel = panels[ key ] = new CKEDITOR.ui.panel( doc, definition ); panel.element = parentElement.append( CKEDITOR.dom.element.createFromHtml( panel.renderHtml( editor ), doc ) ); panel.element.setStyles( { display : 'none', position : 'absolute' }); } return panel; } CKEDITOR.ui.floatPanel = CKEDITOR.tools.createClass( { $ : function( editor, parentElement, definition, level ) { definition.forceIFrame = 1; var doc = parentElement.getDocument(), panel = getPanel( editor, doc, parentElement, definition, level || 0 ), element = panel.element, iframe = element.getFirst().getFirst(); // Disable native browser menu. (#4825) element.disableContextMenu(); this.element = element; this._ = { editor : editor, // The panel that will be floating. panel : panel, parentElement : parentElement, definition : definition, document : doc, iframe : iframe, children : [], dir : editor.lang.dir }; editor.on( 'mode', function(){ this.hide(); }, this ); }, proto : { addBlock : function( name, block ) { return this._.panel.addBlock( name, block ); }, addListBlock : function( name, multiSelect ) { return this._.panel.addListBlock( name, multiSelect ); }, getBlock : function( name ) { return this._.panel.getBlock( name ); }, /* corner (LTR): 1 = top-left 2 = top-right 3 = bottom-right 4 = bottom-left corner (RTL): 1 = top-right 2 = top-left 3 = bottom-left 4 = bottom-right */ showBlock : function( name, offsetParent, corner, offsetX, offsetY ) { var panel = this._.panel, block = panel.showBlock( name ); this.allowBlur( false ); isShowing = 1; // Record from where the focus is when open panel. this._.returnFocus = this._.editor.focusManager.hasFocus ? this._.editor : new CKEDITOR.dom.element( CKEDITOR.document.$.activeElement ); var element = this.element, iframe = this._.iframe, definition = this._.definition, position = offsetParent.getDocumentPosition( element.getDocument() ), rtl = this._.dir == 'rtl'; var left = position.x + ( offsetX || 0 ), top = position.y + ( offsetY || 0 ); // Floating panels are off by (-1px, 0px) in RTL mode. (#3438) if ( rtl && ( corner == 1 || corner == 4 ) ) left += offsetParent.$.offsetWidth; else if ( !rtl && ( corner == 2 || corner == 3 ) ) left += offsetParent.$.offsetWidth - 1; if ( corner == 3 || corner == 4 ) top += offsetParent.$.offsetHeight - 1; // Memorize offsetParent by it's ID. this._.panel._.offsetParentId = offsetParent.getId(); element.setStyles( { top : top + 'px', left: 0, display : '' }); // Don't use display or visibility style because we need to // calculate the rendering layout later and focus the element. element.setOpacity( 0 ); // To allow the context menu to decrease back their width element.getFirst().removeStyle( 'width' ); // Configure the IFrame blur event. Do that only once. if ( !this._.blurSet ) { // Non IE prefer the event into a window object. var focused = CKEDITOR.env.ie ? iframe : new CKEDITOR.dom.window( iframe.$.contentWindow ); // With addEventListener compatible browsers, we must // useCapture when registering the focus/blur events to // guarantee they will be firing in all situations. (#3068, #3222 ) CKEDITOR.event.useCapture = true; focused.on( 'blur', function( ev ) { if ( !this.allowBlur() ) return; // As we are using capture to register the listener, // the blur event may get fired even when focusing // inside the window itself, so we must ensure the // target is out of it. var target = ev.data.getTarget() ; if ( target.getName && target.getName() != 'iframe' ) return; if ( this.visible && !this._.activeChild && !isShowing ) { // Panel close is caused by user's navigating away the focus, e.g. click outside the panel. // DO NOT restore focus in this case. delete this._.returnFocus; this.hide(); } }, this ); focused.on( 'focus', function() { this._.focused = true; this.hideChild(); this.allowBlur( true ); }, this ); CKEDITOR.event.useCapture = false; this._.blurSet = 1; } panel.onEscape = CKEDITOR.tools.bind( function( keystroke ) { if ( this.onEscape && this.onEscape( keystroke ) === false ) return false; }, this ); CKEDITOR.tools.setTimeout( function() { var panelLoad = CKEDITOR.tools.bind( function () { var target = element.getFirst(); if ( block.autoSize ) { // We must adjust first the width or IE6 could include extra lines in the height computation var widthNode = block.element.$; if ( CKEDITOR.env.gecko || CKEDITOR.env.opera ) widthNode = widthNode.parentNode; if ( CKEDITOR.env.ie ) widthNode = widthNode.document.body; var width = widthNode.scrollWidth; // Account for extra height needed due to IE quirks box model bug: // http://en.wikipedia.org/wiki/Internet_Explorer_box_model_bug // (#3426) if ( CKEDITOR.env.ie && CKEDITOR.env.quirks && width > 0 ) width += ( target.$.offsetWidth || 0 ) - ( target.$.clientWidth || 0 ) + 3; // A little extra at the end. // If not present, IE6 might break into the next line, but also it looks better this way width += 4 ; target.setStyle( 'width', width + 'px' ); // IE doesn't compute the scrollWidth if a filter is applied previously block.element.addClass( 'cke_frameLoaded' ); var height = block.element.$.scrollHeight; // Account for extra height needed due to IE quirks box model bug: // http://en.wikipedia.org/wiki/Internet_Explorer_box_model_bug // (#3426) if ( CKEDITOR.env.ie && CKEDITOR.env.quirks && height > 0 ) height += ( target.$.offsetHeight || 0 ) - ( target.$.clientHeight || 0 ) + 3; target.setStyle( 'height', height + 'px' ); // Fix IE < 8 visibility. panel._.currentBlock.element.setStyle( 'display', 'none' ).removeStyle( 'display' ); } else target.removeStyle( 'height' ); // Flip panel layout horizontally in RTL with known width. if ( rtl ) left -= element.$.offsetWidth; // Pop the style now for measurement. element.setStyle( 'left', left + 'px' ); /* panel layout smartly fit the viewport size. */ var panelElement = panel.element, panelWindow = panelElement.getWindow(), rect = element.$.getBoundingClientRect(), viewportSize = panelWindow.getViewPaneSize(); // Compensation for browsers that dont support "width" and "height". var rectWidth = rect.width || rect.right - rect.left, rectHeight = rect.height || rect.bottom - rect.top; // Check if default horizontal layout is impossible. var spaceAfter = rtl ? rect.right : viewportSize.width - rect.left, spaceBefore = rtl ? viewportSize.width - rect.right : rect.left; if ( rtl ) { if ( spaceAfter < rectWidth ) { // Flip to show on right. if ( spaceBefore > rectWidth ) left += rectWidth; // Align to window left. else if ( viewportSize.width > rectWidth ) left = left - rect.left; // Align to window right, never cutting the panel at right. else left = left - rect.right + viewportSize.width; } } else if ( spaceAfter < rectWidth ) { // Flip to show on left. if ( spaceBefore > rectWidth ) left -= rectWidth; // Align to window right. else if ( viewportSize.width > rectWidth ) left = left - rect.right + viewportSize.width; // Align to window left, never cutting the panel at left. else left = left - rect.left; } // Check if the default vertical layout is possible. var spaceBelow = viewportSize.height - rect.top, spaceAbove = rect.top; if ( spaceBelow < rectHeight ) { // Flip to show above. if ( spaceAbove > rectHeight ) top -= rectHeight; // Align to window bottom. else if ( viewportSize.height > rectHeight ) top = top - rect.bottom + viewportSize.height; // Align to top, never cutting the panel at top. else top = top - rect.top; } // If IE is in RTL, we have troubles with absolute // position and horizontal scrolls. Here we have a // series of hacks to workaround it. (#6146) if ( CKEDITOR.env.ie ) { var offsetParent = new CKEDITOR.dom.element( element.$.offsetParent ), scrollParent = offsetParent; // Quirks returns <body>, but standards returns <html>. if ( scrollParent.getName() == 'html' ) scrollParent = scrollParent.getDocument().getBody(); if ( scrollParent.getComputedStyle( 'direction' ) == 'rtl' ) { // For IE8, there is not much logic on this, but it works. if ( CKEDITOR.env.ie8Compat ) left -= element.getDocument().getDocumentElement().$.scrollLeft * 2; else left -= ( offsetParent.$.scrollWidth - offsetParent.$.clientWidth ); } } // Trigger the onHide event of the previously active panel to prevent // incorrect styles from being applied (#6170) var innerElement = element.getFirst(), activePanel; if ( ( activePanel = innerElement.getCustomData( 'activePanel' ) ) ) activePanel.onHide && activePanel.onHide.call( this, 1 ); innerElement.setCustomData( 'activePanel', this ); element.setStyles( { top : top + 'px', left : left + 'px' } ); element.setOpacity( 1 ); } , this ); panel.isLoaded ? panelLoad() : panel.onLoad = panelLoad; // Set the panel frame focus, so the blur event gets fired. CKEDITOR.tools.setTimeout( function() { iframe.$.contentWindow.focus(); // We need this get fired manually because of unfired focus() function. this.allowBlur( true ); }, 0, this); }, CKEDITOR.env.air ? 200 : 0, this); this.visible = 1; if ( this.onShow ) this.onShow.call( this ); isShowing = 0; }, hide : function( returnFocus ) { if ( this.visible && ( !this.onHide || this.onHide.call( this ) !== true ) ) { this.hideChild(); // Blur previously focused element. (#6671) CKEDITOR.env.gecko && this._.iframe.getFrameDocument().$.activeElement.blur(); this.element.setStyle( 'display', 'none' ); this.visible = 0; this.element.getFirst().removeCustomData( 'activePanel' ); // Return focus properly. (#6247) var focusReturn = returnFocus !== false && this._.returnFocus; if ( focusReturn ) { // Webkit requires focus moved out panel iframe first. if ( CKEDITOR.env.webkit && focusReturn.type ) focusReturn.getWindow().$.focus(); focusReturn.focus(); } } }, allowBlur : function( allow ) // Prevent editor from hiding the panel. #3222. { var panel = this._.panel; if ( allow != undefined ) panel.allowBlur = allow; return panel.allowBlur; }, showAsChild : function( panel, blockName, offsetParent, corner, offsetX, offsetY ) { // Skip reshowing of child which is already visible. if ( this._.activeChild == panel && panel._.panel._.offsetParentId == offsetParent.getId() ) return; this.hideChild(); panel.onHide = CKEDITOR.tools.bind( function() { // Use a timeout, so we give time for this menu to get // potentially focused. CKEDITOR.tools.setTimeout( function() { if ( !this._.focused ) this.hide(); }, 0, this ); }, this ); this._.activeChild = panel; this._.focused = false; panel.showBlock( blockName, offsetParent, corner, offsetX, offsetY ); /* #3767 IE: Second level menu may not have borders */ if ( CKEDITOR.env.ie7Compat || ( CKEDITOR.env.ie8 && CKEDITOR.env.ie6Compat ) ) { setTimeout(function() { panel.element.getChild( 0 ).$.style.cssText += ''; }, 100); } }, hideChild : function() { var activeChild = this._.activeChild; if ( activeChild ) { delete activeChild.onHide; // Sub panels don't manage focus. (#7881) delete activeChild._.returnFocus; delete this._.activeChild; activeChild.hide(); } } } }); CKEDITOR.on( 'instanceDestroyed', function() { var isLastInstance = CKEDITOR.tools.isEmpty( CKEDITOR.instances ); for ( var i in panels ) { var panel = panels[ i ]; // Safe to destroy it since there're no more instances.(#4241) if ( isLastInstance ) panel.destroy(); // Panel might be used by other instances, just hide them.(#4552) else panel.element.hide(); } // Remove the registration. isLastInstance && ( panels = {} ); } ); })();
10npsite
trunk/guanli/system/ckeditor/_source/plugins/floatpanel/plugin.js
JavaScript
asf20
14,660
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function() { function forceHtmlMode( evt ) { evt.data.mode = 'html'; } CKEDITOR.plugins.add( 'pastefromword', { init : function( editor ) { // Flag indicate this command is actually been asked instead of a generic // pasting. var forceFromWord = 0; var resetFromWord = function( evt ) { evt && evt.removeListener(); editor.removeListener( 'beforePaste', forceHtmlMode ); forceFromWord && setTimeout( function() { forceFromWord = 0; }, 0 ); }; // Features bring by this command beside the normal process: // 1. No more bothering of user about the clean-up. // 2. Perform the clean-up even if content is not from MS-Word. // (e.g. from a MS-Word similar application.) editor.addCommand( 'pastefromword', { canUndo : false, exec : function() { // Ensure the received data format is HTML and apply content filtering. (#6718) forceFromWord = 1; editor.on( 'beforePaste', forceHtmlMode ); if ( editor.execCommand( 'paste', 'html' ) === false ) { editor.on( 'dialogShow', function ( evt ) { evt.removeListener(); evt.data.on( 'cancel', resetFromWord ); }); editor.on( 'dialogHide', function( evt ) { evt.data.removeListener( 'cancel', resetFromWord ); } ); } editor.on( 'afterPaste', resetFromWord ); } }); // Register the toolbar button. editor.ui.addButton( 'PasteFromWord', { label : editor.lang.pastefromword.toolbar, command : 'pastefromword' }); editor.on( 'pasteState', function( evt ) { editor.getCommand( 'pastefromword' ).setState( evt.data ); }); editor.on( 'paste', function( evt ) { var data = evt.data, mswordHtml; // MS-WORD format sniffing. if ( ( mswordHtml = data[ 'html' ] ) && ( forceFromWord || ( /(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/ ).test( mswordHtml ) ) ) { var isLazyLoad = this.loadFilterRules( function() { // Event continuation with the original data. if ( isLazyLoad ) editor.fire( 'paste', data ); else if ( !editor.config.pasteFromWordPromptCleanup || ( forceFromWord || confirm( editor.lang.pastefromword.confirmCleanup ) ) ) { data[ 'html' ] = CKEDITOR.cleanWord( mswordHtml, editor ); } }); // The cleanup rules are to be loaded, we should just cancel // this event. isLazyLoad && evt.cancel(); } }, this ); }, loadFilterRules : function( callback ) { var isLoaded = CKEDITOR.cleanWord; if ( isLoaded ) callback(); else { var filterFilePath = CKEDITOR.getUrl( CKEDITOR.config.pasteFromWordCleanupFile || ( this.path + 'filter/default.js' ) ); // Load with busy indicator. CKEDITOR.scriptLoader.load( filterFilePath, callback, null, true ); } return !isLoaded; }, requires : [ 'clipboard' ] }); })(); /** * Whether to prompt the user about the clean up of content being pasted from * MS Word. * @name CKEDITOR.config.pasteFromWordPromptCleanup * @since 3.1 * @type Boolean * @default undefined * @example * config.pasteFromWordPromptCleanup = true; */ /** * The file that provides the MS Word cleanup function for pasting operations. * Note: This is a global configuration shared by all editor instances present * in the page. * @name CKEDITOR.config.pasteFromWordCleanupFile * @since 3.1 * @type String * @default 'default' * @example * // Load from 'pastefromword' plugin 'filter' sub folder (custom.js file). * CKEDITOR.config.pasteFromWordCleanupFile = 'custom'; */
10npsite
trunk/guanli/system/ckeditor/_source/plugins/pastefromword/plugin.js
JavaScript
asf20
3,943
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function() { var fragmentPrototype = CKEDITOR.htmlParser.fragment.prototype, elementPrototype = CKEDITOR.htmlParser.element.prototype; fragmentPrototype.onlyChild = elementPrototype.onlyChild = function() { var children = this.children, count = children.length, firstChild = ( count == 1 ) && children[ 0 ]; return firstChild || null; }; elementPrototype.removeAnyChildWithName = function( tagName ) { var children = this.children, childs = [], child; for ( var i = 0; i < children.length; i++ ) { child = children[ i ]; if ( !child.name ) continue; if ( child.name == tagName ) { childs.push( child ); children.splice( i--, 1 ); } childs = childs.concat( child.removeAnyChildWithName( tagName ) ); } return childs; }; elementPrototype.getAncestor = function( tagNameRegex ) { var parent = this.parent; while ( parent && !( parent.name && parent.name.match( tagNameRegex ) ) ) parent = parent.parent; return parent; }; fragmentPrototype.firstChild = elementPrototype.firstChild = function( evaluator ) { var child; for ( var i = 0 ; i < this.children.length ; i++ ) { child = this.children[ i ]; if ( evaluator( child ) ) return child; else if ( child.name ) { child = child.firstChild( evaluator ); if ( child ) return child; } } return null; }; // Adding a (set) of styles to the element's 'style' attributes. elementPrototype.addStyle = function( name, value, isPrepend ) { var styleText, addingStyleText = ''; // name/value pair. if ( typeof value == 'string' ) addingStyleText += name + ':' + value + ';'; else { // style literal. if ( typeof name == 'object' ) { for ( var style in name ) { if ( name.hasOwnProperty( style ) ) addingStyleText += style + ':' + name[ style ] + ';'; } } // raw style text form. else addingStyleText += name; isPrepend = value; } if ( !this.attributes ) this.attributes = {}; styleText = this.attributes.style || ''; styleText = ( isPrepend ? [ addingStyleText, styleText ] : [ styleText, addingStyleText ] ).join( ';' ); this.attributes.style = styleText.replace( /^;|;(?=;)/, '' ); }; /** * Return the DTD-valid parent tag names of the specified one. * @param tagName */ CKEDITOR.dtd.parentOf = function( tagName ) { var result = {}; for ( var tag in this ) { if ( tag.indexOf( '$' ) == -1 && this[ tag ][ tagName ] ) result[ tag ] = 1; } return result; }; // 1. move consistent list item styles up to list root. // 2. clear out unnecessary list item numbering. function postProcessList( list ) { var children = list.children, child, attrs, count = list.children.length, match, mergeStyle, styleTypeRegexp = /list-style-type:(.*?)(?:;|$)/, stylesFilter = CKEDITOR.plugins.pastefromword.filters.stylesFilter; attrs = list.attributes; if ( styleTypeRegexp.exec( attrs.style ) ) return; for ( var i = 0; i < count; i++ ) { child = children[ i ]; if ( child.attributes.value && Number( child.attributes.value ) == i + 1 ) delete child.attributes.value; match = styleTypeRegexp.exec( child.attributes.style ); if ( match ) { if ( match[ 1 ] == mergeStyle || !mergeStyle ) mergeStyle = match[ 1 ]; else { mergeStyle = null; break; } } } if ( mergeStyle ) { for ( i = 0; i < count; i++ ) { attrs = children[ i ].attributes; attrs.style && ( attrs.style = stylesFilter( [ [ 'list-style-type'] ] )( attrs.style ) || '' ); } list.addStyle( 'list-style-type', mergeStyle ); } } var cssLengthRelativeUnit = /^([.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz){1}?/i; var emptyMarginRegex = /^(?:\b0[^\s]*\s*){1,4}$/; // e.g. 0px 0pt 0px var romanLiternalPattern = '^m{0,4}(cm|cd|d?c{0,3})(xc|xl|l?x{0,3})(ix|iv|v?i{0,3})$', lowerRomanLiteralRegex = new RegExp( romanLiternalPattern ), upperRomanLiteralRegex = new RegExp( romanLiternalPattern.toUpperCase() ); var orderedPatterns = { 'decimal' : /\d+/, 'lower-roman': lowerRomanLiteralRegex, 'upper-roman': upperRomanLiteralRegex, 'lower-alpha' : /^[a-z]+$/, 'upper-alpha': /^[A-Z]+$/ }, unorderedPatterns = { 'disc' : /[l\u00B7\u2002]/, 'circle' : /[\u006F\u00D8]/,'square' : /[\u006E\u25C6]/}, listMarkerPatterns = { 'ol' : orderedPatterns, 'ul' : unorderedPatterns }, romans = [ [1000, 'M'], [900, 'CM'], [500, 'D'], [400, 'CD'], [100, 'C'], [90, 'XC'], [50, 'L'], [40, 'XL'], [10, 'X'], [9, 'IX'], [5, 'V'], [4, 'IV'], [1, 'I'] ], alpahbets = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; // Convert roman numbering back to decimal. function fromRoman( str ) { str = str.toUpperCase(); var l = romans.length, retVal = 0; for ( var i = 0; i < l; ++i ) { for ( var j = romans[i], k = j[1].length; str.substr( 0, k ) == j[1]; str = str.substr( k ) ) retVal += j[ 0 ]; } return retVal; } // Convert alphabet numbering back to decimal. function fromAlphabet( str ) { str = str.toUpperCase(); var l = alpahbets.length, retVal = 1; for ( var x = 1; str.length > 0; x *= l ) { retVal += alpahbets.indexOf( str.charAt( str.length - 1 ) ) * x; str = str.substr( 0, str.length - 1 ); } return retVal; } var listBaseIndent = 0, previousListItemMargin = null, previousListId; var plugin = ( CKEDITOR.plugins.pastefromword = { utils : { // Create a <cke:listbullet> which indicate an list item type. createListBulletMarker : function ( bullet, bulletText ) { var marker = new CKEDITOR.htmlParser.element( 'cke:listbullet' ); marker.attributes = { 'cke:listsymbol' : bullet[ 0 ] }; marker.add( new CKEDITOR.htmlParser.text( bulletText ) ); return marker; }, isListBulletIndicator : function( element ) { var styleText = element.attributes && element.attributes.style; if ( /mso-list\s*:\s*Ignore/i.test( styleText ) ) return true; }, isContainingOnlySpaces : function( element ) { var text; return ( ( text = element.onlyChild() ) && ( /^(:?\s|&nbsp;)+$/ ).test( text.value ) ); }, resolveList : function( element ) { // <cke:listbullet> indicate a list item. var attrs = element.attributes, listMarker; if ( ( listMarker = element.removeAnyChildWithName( 'cke:listbullet' ) ) && listMarker.length && ( listMarker = listMarker[ 0 ] ) ) { element.name = 'cke:li'; if ( attrs.style ) { attrs.style = plugin.filters.stylesFilter( [ // Text-indent is not representing list item level any more. [ 'text-indent' ], [ 'line-height' ], // First attempt is to resolve indent level from on a constant margin increment. [ ( /^margin(:?-left)?$/ ), null, function( margin ) { // Deal with component/short-hand form. var values = margin.split( ' ' ); margin = CKEDITOR.tools.convertToPx( values[ 3 ] || values[ 1 ] || values [ 0 ] ); // Figure out the indent unit by checking the first time of incrementation. if ( !listBaseIndent && previousListItemMargin !== null && margin > previousListItemMargin ) listBaseIndent = margin - previousListItemMargin; previousListItemMargin = margin; attrs[ 'cke:indent' ] = listBaseIndent && ( Math.ceil( margin / listBaseIndent ) + 1 ) || 1; } ], // The best situation: "mso-list:l0 level1 lfo2" tells the belonged list root, list item indentation, etc. [ ( /^mso-list$/ ), null, function( val ) { val = val.split( ' ' ); var listId = Number( val[ 0 ].match( /\d+/ ) ), indent = Number( val[ 1 ].match( /\d+/ ) ); if ( indent == 1 ) { listId !== previousListId && ( attrs[ 'cke:reset' ] = 1 ); previousListId = listId; } attrs[ 'cke:indent' ] = indent; } ] ] )( attrs.style, element ) || ''; } // First level list item might be presented without a margin. // In case all above doesn't apply. if ( !attrs[ 'cke:indent' ] ) { previousListItemMargin = 0; attrs[ 'cke:indent' ] = 1; } // Inherit attributes from bullet. CKEDITOR.tools.extend( attrs, listMarker.attributes ); return true; } // Current list disconnected. else previousListId = previousListItemMargin = listBaseIndent = null; return false; }, // Providing a shorthand style then retrieve one or more style component values. getStyleComponents : ( function() { var calculator = CKEDITOR.dom.element.createFromHtml( '<div style="position:absolute;left:-9999px;top:-9999px;"></div>', CKEDITOR.document ); CKEDITOR.document.getBody().append( calculator ); return function( name, styleValue, fetchList ) { calculator.setStyle( name, styleValue ); var styles = {}, count = fetchList.length; for ( var i = 0; i < count; i++ ) styles[ fetchList[ i ] ] = calculator.getStyle( fetchList[ i ] ); return styles; }; } )(), listDtdParents : CKEDITOR.dtd.parentOf( 'ol' ) }, filters : { // Transform a normal list into flat list items only presentation. // E.g. <ul><li>level1<ol><li>level2</li></ol></li> => // <cke:li cke:listtype="ul" cke:indent="1">level1</cke:li> // <cke:li cke:listtype="ol" cke:indent="2">level2</cke:li> flattenList : function( element, level ) { level = typeof level == 'number' ? level : 1; var attrs = element.attributes, listStyleType; // All list items are of the same type. switch ( attrs.type ) { case 'a' : listStyleType = 'lower-alpha'; break; case '1' : listStyleType = 'decimal'; break; // TODO: Support more list style type from MS-Word. } var children = element.children, child; for ( var i = 0; i < children.length; i++ ) { child = children[ i ]; if ( child.name in CKEDITOR.dtd.$listItem ) { var attributes = child.attributes, listItemChildren = child.children, count = listItemChildren.length, last = listItemChildren[ count - 1 ]; // Move out nested list. if ( last.name in CKEDITOR.dtd.$list ) { element.add( last, i + 1 ); // Remove the parent list item if it's just a holder. if ( !--listItemChildren.length ) children.splice( i--, 1 ); } child.name = 'cke:li'; // Inherit numbering from list root on the first list item. attrs.start && !i && ( attributes.value = attrs.start ); plugin.filters.stylesFilter( [ [ 'tab-stops', null, function( val ) { var margin = val.split( ' ' )[ 1 ].match( cssLengthRelativeUnit ); margin && ( previousListItemMargin = CKEDITOR.tools.convertToPx( margin[ 0 ] ) ); } ], ( level == 1 ? [ 'mso-list', null, function( val ) { val = val.split( ' ' ); var listId = Number( val[ 0 ].match( /\d+/ ) ); listId !== previousListId && ( attributes[ 'cke:reset' ] = 1 ); previousListId = listId; } ] : null ) ] )( attributes.style ); attributes[ 'cke:indent' ] = level; attributes[ 'cke:listtype' ] = element.name; attributes[ 'cke:list-style-type' ] = listStyleType; } // Flatten sub list. else if ( child.name in CKEDITOR.dtd.$list ) { // Absorb sub list children. arguments.callee.apply( this, [ child, level + 1 ] ); children = children.slice( 0, i ).concat( child.children ).concat( children.slice( i + 1 ) ); element.children = []; for ( var j = 0, num = children.length; j < num ; j++ ) element.add( children[ j ] ); } } delete element.name; // We're loosing tag name here, signalize this element as a list. attrs[ 'cke:list' ] = 1; }, /** * Try to collect all list items among the children and establish one * or more HTML list structures for them. * @param element */ assembleList : function( element ) { var children = element.children, child, listItem, // The current processing cke:li element. listItemAttrs, listItemIndent, // Indent level of current list item. lastIndent, lastListItem, // The previous one just been added to the list. list, // Current staging list and it's parent list if any. openedLists = [], previousListStyleType, previousListType; // Properties of the list item are to be resolved from the list bullet. var bullet, listType, listStyleType, itemNumeric; for ( var i = 0; i < children.length; i++ ) { child = children[ i ]; if ( 'cke:li' == child.name ) { child.name = 'li'; listItem = child; listItemAttrs = listItem.attributes; bullet = listItemAttrs[ 'cke:listsymbol' ]; bullet = bullet && bullet.match( /^(?:[(]?)([^\s]+?)([.)]?)$/ ); listType = listStyleType = itemNumeric = null; if ( listItemAttrs[ 'cke:ignored' ] ) { children.splice( i--, 1 ); continue; } // This's from a new list root. listItemAttrs[ 'cke:reset' ] && ( list = lastIndent = lastListItem = null ); // List item indent level might come from a real list indentation or // been resolved from a pseudo list item's margin value, even get // no indentation at all. listItemIndent = Number( listItemAttrs[ 'cke:indent' ] ); // We're moving out of the current list, cleaning up. if ( listItemIndent != lastIndent ) previousListType = previousListStyleType = null; // List type and item style are already resolved. if ( !bullet ) { listType = listItemAttrs[ 'cke:listtype' ] || 'ol'; listStyleType = listItemAttrs[ 'cke:list-style-type' ]; } else { // Probably share the same list style type with previous list item, // give it priority to avoid ambiguous between C(Alpha) and C.(Roman). if ( previousListType && listMarkerPatterns[ previousListType ] [ previousListStyleType ].test( bullet[ 1 ] ) ) { listType = previousListType; listStyleType = previousListStyleType; } else { for ( var type in listMarkerPatterns ) { for ( var style in listMarkerPatterns[ type ] ) { if ( listMarkerPatterns[ type ][ style ].test( bullet[ 1 ] ) ) { // Small numbering has higher priority, when dealing with ambiguous // between C(Alpha) and C.(Roman). if ( type == 'ol' && ( /alpha|roman/ ).test( style ) ) { var num = /roman/.test( style ) ? fromRoman( bullet[ 1 ] ) : fromAlphabet( bullet[ 1 ] ); if ( !itemNumeric || num < itemNumeric ) { itemNumeric = num; listType = type; listStyleType = style; } } else { listType = type; listStyleType = style; break; } } } } } // Simply use decimal/disc for the rest forms of unrepresentable // numerals, e.g. Chinese..., but as long as there a second part // included, it has a bigger chance of being a order list ;) !listType && ( listType = bullet[ 2 ] ? 'ol' : 'ul' ); } previousListType = listType; previousListStyleType = listStyleType || ( listType == 'ol' ? 'decimal' : 'disc' ); if ( listStyleType && listStyleType != ( listType == 'ol' ? 'decimal' : 'disc' ) ) listItem.addStyle( 'list-style-type', listStyleType ); // Figure out start numbering. if ( listType == 'ol' && bullet ) { switch ( listStyleType ) { case 'decimal' : itemNumeric = Number( bullet[ 1 ] ); break; case 'lower-roman': case 'upper-roman': itemNumeric = fromRoman( bullet[ 1 ] ); break; case 'lower-alpha': case 'upper-alpha': itemNumeric = fromAlphabet( bullet[ 1 ] ); break; } // Always create the numbering, swipe out unnecessary ones later. listItem.attributes.value = itemNumeric; } // Start the list construction. if ( !list ) { openedLists.push( list = new CKEDITOR.htmlParser.element( listType ) ); list.add( listItem ); children[ i ] = list; } else { if ( listItemIndent > lastIndent ) { openedLists.push( list = new CKEDITOR.htmlParser.element( listType ) ); list.add( listItem ); lastListItem.add( list ); } else if ( listItemIndent < lastIndent ) { // There might be a negative gap between two list levels. (#4944) var diff = lastIndent - listItemIndent, parent; while ( diff-- && ( parent = list.parent ) ) list = parent.parent; list.add( listItem ); } else list.add( listItem ); children.splice( i--, 1 ); } lastListItem = listItem; lastIndent = listItemIndent; } else if ( list ) list = lastIndent = lastListItem = null; } for ( i = 0; i < openedLists.length; i++ ) postProcessList( openedLists[ i ] ); list = lastIndent = lastListItem = previousListId = previousListItemMargin = listBaseIndent = null; }, /** * A simple filter which always rejecting. */ falsyFilter : function( value ) { return false; }, /** * A filter dedicated on the 'style' attribute filtering, e.g. dropping/replacing style properties. * @param styles {Array} in form of [ styleNameRegexp, styleValueRegexp, * newStyleValue/newStyleGenerator, newStyleName ] where only the first * parameter is mandatory. * @param whitelist {Boolean} Whether the {@param styles} will be considered as a white-list. */ stylesFilter : function( styles, whitelist ) { return function( styleText, element ) { var rules = []; // html-encoded quote might be introduced by 'font-family' // from MS-Word which confused the following regexp. e.g. //'font-family: &quot;Lucida, Console&quot;' ( styleText || '' ) .replace( /&quot;/g, '"' ) .replace( /\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g, function( match, name, value ) { name = name.toLowerCase(); name == 'font-family' && ( value = value.replace( /["']/g, '' ) ); var namePattern, valuePattern, newValue, newName; for ( var i = 0 ; i < styles.length; i++ ) { if ( styles[ i ] ) { namePattern = styles[ i ][ 0 ]; valuePattern = styles[ i ][ 1 ]; newValue = styles[ i ][ 2 ]; newName = styles[ i ][ 3 ]; if ( name.match( namePattern ) && ( !valuePattern || value.match( valuePattern ) ) ) { name = newName || name; whitelist && ( newValue = newValue || value ); if ( typeof newValue == 'function' ) newValue = newValue( value, element, name ); // Return an couple indicate both name and value // changed. if ( newValue && newValue.push ) name = newValue[ 0 ], newValue = newValue[ 1 ]; if ( typeof newValue == 'string' ) rules.push( [ name, newValue ] ); return; } } } !whitelist && rules.push( [ name, value ] ); }); for ( var i = 0 ; i < rules.length ; i++ ) rules[ i ] = rules[ i ].join( ':' ); return rules.length ? ( rules.join( ';' ) + ';' ) : false; }; }, /** * Migrate the element by decorate styles on it. * @param styleDefiniton * @param variables */ elementMigrateFilter : function ( styleDefiniton, variables ) { return function( element ) { var styleDef = variables ? new CKEDITOR.style( styleDefiniton, variables )._.definition : styleDefiniton; element.name = styleDef.element; CKEDITOR.tools.extend( element.attributes, CKEDITOR.tools.clone( styleDef.attributes ) ); element.addStyle( CKEDITOR.style.getStyleText( styleDef ) ); }; }, /** * Migrate styles by creating a new nested stylish element. * @param styleDefinition */ styleMigrateFilter : function( styleDefinition, variableName ) { var elementMigrateFilter = this.elementMigrateFilter; return function( value, element ) { // Build an stylish element first. var styleElement = new CKEDITOR.htmlParser.element( null ), variables = {}; variables[ variableName ] = value; elementMigrateFilter( styleDefinition, variables )( styleElement ); // Place the new element inside the existing span. styleElement.children = element.children; element.children = [ styleElement ]; }; }, /** * A filter which remove cke-namespaced-attribute on * all none-cke-namespaced elements. * @param value * @param element */ bogusAttrFilter : function( value, element ) { if ( element.name.indexOf( 'cke:' ) == -1 ) return false; }, /** * A filter which will be used to apply inline css style according the stylesheet * definition rules, is generated lazily when filtering. */ applyStyleFilter : null }, getRules : function( editor ) { var dtd = CKEDITOR.dtd, blockLike = CKEDITOR.tools.extend( {}, dtd.$block, dtd.$listItem, dtd.$tableContent ), config = editor.config, filters = this.filters, falsyFilter = filters.falsyFilter, stylesFilter = filters.stylesFilter, elementMigrateFilter = filters.elementMigrateFilter, styleMigrateFilter = CKEDITOR.tools.bind( this.filters.styleMigrateFilter, this.filters ), createListBulletMarker = this.utils.createListBulletMarker, flattenList = filters.flattenList, assembleList = filters.assembleList, isListBulletIndicator = this.utils.isListBulletIndicator, containsNothingButSpaces = this.utils.isContainingOnlySpaces, resolveListItem = this.utils.resolveList, convertToPx = function( value ) { value = CKEDITOR.tools.convertToPx( value ); return isNaN( value ) ? value : value + 'px'; }, getStyleComponents = this.utils.getStyleComponents, listDtdParents = this.utils.listDtdParents, removeFontStyles = config.pasteFromWordRemoveFontStyles !== false, removeStyles = config.pasteFromWordRemoveStyles !== false; return { elementNames : [ // Remove script, meta and link elements. [ ( /meta|link|script/ ), '' ] ], root : function( element ) { element.filterChildren(); assembleList( element ); }, elements : { '^' : function( element ) { // Transform CSS style declaration to inline style. var applyStyleFilter; if ( CKEDITOR.env.gecko && ( applyStyleFilter = filters.applyStyleFilter ) ) applyStyleFilter( element ); }, $ : function( element ) { var tagName = element.name || '', attrs = element.attributes; // Convert length unit of width/height on blocks to // a more editor-friendly way (px). if ( tagName in blockLike && attrs.style ) { attrs.style = stylesFilter( [ [ ( /^(:?width|height)$/ ), null, convertToPx ] ] )( attrs.style ) || ''; } // Processing headings. if ( tagName.match( /h\d/ ) ) { element.filterChildren(); // Is the heading actually a list item? if ( resolveListItem( element ) ) return; // Adapt heading styles to editor's convention. elementMigrateFilter( config[ 'format_' + tagName ] )( element ); } // Remove inline elements which contain only empty spaces. else if ( tagName in dtd.$inline ) { element.filterChildren(); if ( containsNothingButSpaces( element ) ) delete element.name; } // Remove element with ms-office namespace, // with it's content preserved, e.g. 'o:p'. else if ( tagName.indexOf( ':' ) != -1 && tagName.indexOf( 'cke' ) == -1 ) { element.filterChildren(); // Restore image real link from vml. if ( tagName == 'v:imagedata' ) { var href = element.attributes[ 'o:href' ]; if ( href ) element.attributes.src = href; element.name = 'img'; return; } delete element.name; } // Assembling list items into a whole list. if ( tagName in listDtdParents ) { element.filterChildren(); assembleList( element ); } }, // We'll drop any style sheet, but Firefox conclude // certain styles in a single style element, which are // required to be changed into inline ones. 'style' : function( element ) { if ( CKEDITOR.env.gecko ) { // Grab only the style definition section. var styleDefSection = element.onlyChild().value.match( /\/\* Style Definitions \*\/([\s\S]*?)\/\*/ ), styleDefText = styleDefSection && styleDefSection[ 1 ], rules = {}; // Storing the parsed result. if ( styleDefText ) { styleDefText // Remove line-breaks. .replace(/[\n\r]/g,'') // Extract selectors and style properties. .replace( /(.+?)\{(.+?)\}/g, function( rule, selectors, styleBlock ) { selectors = selectors.split( ',' ); var length = selectors.length, selector; for ( var i = 0; i < length; i++ ) { // Assume MS-Word mostly generate only simple // selector( [Type selector][Class selector]). CKEDITOR.tools.trim( selectors[ i ] ) .replace( /^(\w+)(\.[\w-]+)?$/g, function( match, tagName, className ) { tagName = tagName || '*'; className = className.substring( 1, className.length ); // Reject MS-Word Normal styles. if ( className.match( /MsoNormal/ ) ) return; if ( !rules[ tagName ] ) rules[ tagName ] = {}; if ( className ) rules[ tagName ][ className ] = styleBlock; else rules[ tagName ] = styleBlock; } ); } }); filters.applyStyleFilter = function( element ) { var name = rules[ '*' ] ? '*' : element.name, className = element.attributes && element.attributes[ 'class' ], style; if ( name in rules ) { style = rules[ name ]; if ( typeof style == 'object' ) style = style[ className ]; // Maintain style rules priorities. style && element.addStyle( style, true ); } }; } } return false; }, 'p' : function( element ) { // This's a fall-back approach to recognize list item in FF3.6, // as it's not perfect as not all list style (e.g. "heading list") is shipped // with this pattern. (#6662) if ( /MsoListParagraph/.exec( element.attributes[ 'class' ] ) ) { var bulletText = element.firstChild( function( node ) { return node.type == CKEDITOR.NODE_TEXT && !containsNothingButSpaces( node.parent ); }); var bullet = bulletText && bulletText.parent, bulletAttrs = bullet && bullet.attributes; bulletAttrs && !bulletAttrs.style && ( bulletAttrs.style = 'mso-list: Ignore;' ); } element.filterChildren(); // Is the paragraph actually a list item? if ( resolveListItem( element ) ) return; // Adapt paragraph formatting to editor's convention // according to enter-mode. if ( config.enterMode == CKEDITOR.ENTER_BR ) { // We suffer from attribute/style lost in this situation. delete element.name; element.add( new CKEDITOR.htmlParser.element( 'br' ) ); } else elementMigrateFilter( config[ 'format_' + ( config.enterMode == CKEDITOR.ENTER_P ? 'p' : 'div' ) ] )( element ); }, 'div' : function( element ) { // Aligned table with no text surrounded is represented by a wrapper div, from which // table cells inherit as text-align styles, which is wrong. // Instead we use a clear-float div after the table to properly achieve the same layout. var singleChild = element.onlyChild(); if ( singleChild && singleChild.name == 'table' ) { var attrs = element.attributes; singleChild.attributes = CKEDITOR.tools.extend( singleChild.attributes, attrs ); attrs.style && singleChild.addStyle( attrs.style ); var clearFloatDiv = new CKEDITOR.htmlParser.element( 'div' ); clearFloatDiv.addStyle( 'clear' ,'both' ); element.add( clearFloatDiv ); delete element.name; } }, 'td' : function ( element ) { // 'td' in 'thead' is actually <th>. if ( element.getAncestor( 'thead') ) element.name = 'th'; }, // MS-Word sometimes present list as a mixing of normal list // and pseudo-list, normalize the previous ones into pseudo form. 'ol' : flattenList, 'ul' : flattenList, 'dl' : flattenList, 'font' : function( element ) { // Drop the font tag if it comes from list bullet text. if ( isListBulletIndicator( element.parent ) ) { delete element.name; return; } element.filterChildren(); var attrs = element.attributes, styleText = attrs.style, parent = element.parent; if ( 'font' == parent.name ) // Merge nested <font> tags. { CKEDITOR.tools.extend( parent.attributes, element.attributes ); styleText && parent.addStyle( styleText ); delete element.name; } // Convert the merged into a span with all attributes preserved. else { styleText = styleText || ''; // IE's having those deprecated attributes, normalize them. if ( attrs.color ) { attrs.color != '#000000' && ( styleText += 'color:' + attrs.color + ';' ); delete attrs.color; } if ( attrs.face ) { styleText += 'font-family:' + attrs.face + ';'; delete attrs.face; } // TODO: Mapping size in ranges of xx-small, // x-small, small, medium, large, x-large, xx-large. if ( attrs.size ) { styleText += 'font-size:' + ( attrs.size > 3 ? 'large' : ( attrs.size < 3 ? 'small' : 'medium' ) ) + ';'; delete attrs.size; } element.name = 'span'; element.addStyle( styleText ); } }, 'span' : function( element ) { // Remove the span if it comes from list bullet text. if ( isListBulletIndicator( element.parent ) ) return false; element.filterChildren(); if ( containsNothingButSpaces( element ) ) { delete element.name; return null; } // List item bullet type is supposed to be indicated by // the text of a span with style 'mso-list : Ignore' or an image. if ( isListBulletIndicator( element ) ) { var listSymbolNode = element.firstChild( function( node ) { return node.value || node.name == 'img'; }); var listSymbol = listSymbolNode && ( listSymbolNode.value || 'l.' ), listType = listSymbol && listSymbol.match( /^(?:[(]?)([^\s]+?)([.)]?)$/ ); if ( listType ) { var marker = createListBulletMarker( listType, listSymbol ); // Some non-existed list items might be carried by an inconsequential list, indicate by "mso-hide:all/display:none", // those are to be removed later, now mark it with "cke:ignored". var ancestor = element.getAncestor( 'span' ); if ( ancestor && (/ mso-hide:\s*all|display:\s*none /).test( ancestor.attributes.style ) ) marker.attributes[ 'cke:ignored' ] = 1; return marker; } } // Update the src attribute of image element with href. var children = element.children, attrs = element.attributes, styleText = attrs && attrs.style, firstChild = children && children[ 0 ]; // Assume MS-Word mostly carry font related styles on <span>, // adapting them to editor's convention. if ( styleText ) { attrs.style = stylesFilter( [ // Drop 'inline-height' style which make lines overlapping. [ 'line-height' ], [ ( /^font-family$/ ), null, !removeFontStyles ? styleMigrateFilter( config[ 'font_style' ], 'family' ) : null ] , [ ( /^font-size$/ ), null, !removeFontStyles ? styleMigrateFilter( config[ 'fontSize_style' ], 'size' ) : null ] , [ ( /^color$/ ), null, !removeFontStyles ? styleMigrateFilter( config[ 'colorButton_foreStyle' ], 'color' ) : null ] , [ ( /^background-color$/ ), null, !removeFontStyles ? styleMigrateFilter( config[ 'colorButton_backStyle' ], 'color' ) : null ] ] )( styleText, element ) || ''; } return null; }, // Migrate basic style formats to editor configured ones. 'b' : elementMigrateFilter( config[ 'coreStyles_bold' ] ), 'i' : elementMigrateFilter( config[ 'coreStyles_italic' ] ), 'u' : elementMigrateFilter( config[ 'coreStyles_underline' ] ), 's' : elementMigrateFilter( config[ 'coreStyles_strike' ] ), 'sup' : elementMigrateFilter( config[ 'coreStyles_superscript' ] ), 'sub' : elementMigrateFilter( config[ 'coreStyles_subscript' ] ), // Editor doesn't support anchor with content currently (#3582), // drop such anchors with content preserved. 'a' : function( element ) { var attrs = element.attributes; if ( attrs && !attrs.href && attrs.name ) delete element.name; else if ( CKEDITOR.env.webkit && attrs.href && attrs.href.match( /file:\/\/\/[\S]+#/i ) ) attrs.href = attrs.href.replace( /file:\/\/\/[^#]+/i,'' ); }, 'cke:listbullet' : function( element ) { if ( element.getAncestor( /h\d/ ) && !config.pasteFromWordNumberedHeadingToList ) delete element.name; } }, attributeNames : [ // Remove onmouseover and onmouseout events (from MS Word comments effect) [ ( /^onmouse(:?out|over)/ ), '' ], // Onload on image element. [ ( /^onload$/ ), '' ], // Remove office and vml attribute from elements. [ ( /(?:v|o):\w+/ ), '' ], // Remove lang/language attributes. [ ( /^lang/ ), '' ] ], attributes : { 'style' : stylesFilter( removeStyles ? // Provide a white-list of styles that we preserve, those should // be the ones that could later be altered with editor tools. [ // Leave list-style-type [ ( /^list-style-type$/ ), null ], // Preserve margin-left/right which used as default indent style in the editor. [ ( /^margin$|^margin-(?!bottom|top)/ ), null, function( value, element, name ) { if ( element.name in { p : 1, div : 1 } ) { var indentStyleName = config.contentsLangDirection == 'ltr' ? 'margin-left' : 'margin-right'; // Extract component value from 'margin' shorthand. if ( name == 'margin' ) { value = getStyleComponents( name, value, [ indentStyleName ] )[ indentStyleName ]; } else if ( name != indentStyleName ) return null; if ( value && !emptyMarginRegex.test( value ) ) return [ indentStyleName, value ]; } return null; } ], // Preserve clear float style. [ ( /^clear$/ ) ], [ ( /^border.*|margin.*|vertical-align|float$/ ), null, function( value, element ) { if ( element.name == 'img' ) return value; } ], [ (/^width|height$/ ), null, function( value, element ) { if ( element.name in { table : 1, td : 1, th : 1, img : 1 } ) return value; } ] ] : // Otherwise provide a black-list of styles that we remove. [ [ ( /^mso-/ ) ], // Fixing color values. [ ( /-color$/ ), null, function( value ) { if ( value == 'transparent' ) return false; if ( CKEDITOR.env.gecko ) return value.replace( /-moz-use-text-color/g, 'transparent' ); } ], // Remove empty margin values, e.g. 0.00001pt 0em 0pt [ ( /^margin$/ ), emptyMarginRegex ], [ 'text-indent', '0cm' ], [ 'page-break-before' ], [ 'tab-stops' ], [ 'display', 'none' ], removeFontStyles ? [ ( /font-?/ ) ] : null ], removeStyles ), // Prefer width styles over 'width' attributes. 'width' : function( value, element ) { if ( element.name in dtd.$tableContent ) return false; }, // Prefer border styles over table 'border' attributes. 'border' : function( value, element ) { if ( element.name in dtd.$tableContent ) return false; }, // Only Firefox carry style sheet from MS-Word, which // will be applied by us manually. For other browsers // the css className is useless. 'class' : falsyFilter, // MS-Word always generate 'background-color' along with 'bgcolor', // simply drop the deprecated attributes. 'bgcolor' : falsyFilter, // Deprecate 'valign' attribute in favor of 'vertical-align'. 'valign' : removeStyles ? falsyFilter : function( value, element ) { element.addStyle( 'vertical-align', value ); return false; } }, // Fore none-IE, some useful data might be buried under these IE-conditional // comments where RegExp were the right approach to dig them out where usual approach // is transform it into a fake element node which hold the desired data. comment : !CKEDITOR.env.ie ? function( value, node ) { var imageInfo = value.match( /<img.*?>/ ), listInfo = value.match( /^\[if !supportLists\]([\s\S]*?)\[endif\]$/ ); // Seek for list bullet indicator. if ( listInfo ) { // Bullet symbol could be either text or an image. var listSymbol = listInfo[ 1 ] || ( imageInfo && 'l.' ), listType = listSymbol && listSymbol.match( />(?:[(]?)([^\s]+?)([.)]?)</ ); return createListBulletMarker( listType, listSymbol ); } // Reveal the <img> element in conditional comments for Firefox. if ( CKEDITOR.env.gecko && imageInfo ) { var img = CKEDITOR.htmlParser.fragment.fromHtml( imageInfo[ 0 ] ).children[ 0 ], previousComment = node.previous, // Try to dig the real image link from vml markup from previous comment text. imgSrcInfo = previousComment && previousComment.value.match( /<v:imagedata[^>]*o:href=['"](.*?)['"]/ ), imgSrc = imgSrcInfo && imgSrcInfo[ 1 ]; // Is there a real 'src' url to be used? imgSrc && ( img.attributes.src = imgSrc ); return img; } return false; } : falsyFilter }; } }); // The paste processor here is just a reduced copy of html data processor. var pasteProcessor = function() { this.dataFilter = new CKEDITOR.htmlParser.filter(); }; pasteProcessor.prototype = { toHtml : function( data ) { var fragment = CKEDITOR.htmlParser.fragment.fromHtml( data, false ), writer = new CKEDITOR.htmlParser.basicWriter(); fragment.writeHtml( writer, this.dataFilter ); return writer.getHtml( true ); } }; CKEDITOR.cleanWord = function( data, editor ) { // Firefox will be confused by those downlevel-revealed IE conditional // comments, fixing them first( convert it to upperlevel-revealed one ). // e.g. <![if !vml]>...<![endif]> if ( CKEDITOR.env.gecko ) data = data.replace( /(<!--\[if[^<]*?\])-->([\S\s]*?)<!--(\[endif\]-->)/gi, '$1$2$3' ); var dataProcessor = new pasteProcessor(), dataFilter = dataProcessor.dataFilter; // These rules will have higher priorities than default ones. dataFilter.addRules( CKEDITOR.plugins.pastefromword.getRules( editor ) ); // Allow extending data filter rules. editor.fire( 'beforeCleanWord', { filter : dataFilter } ); try { data = dataProcessor.toHtml( data, false ); } catch ( e ) { alert( editor.lang.pastefromword.error ); } /* Below post processing those things that are unable to delivered by filter rules. */ // Remove 'cke' namespaced attribute used in filter rules as marker. data = data.replace( /cke:.*?".*?"/g, '' ); // Remove empty style attribute. data = data.replace( /style=""/g, '' ); // Remove the dummy spans ( having no inline style ). data = data.replace( /<span>/g, '' ); return data; }; })(); /** * Whether to ignore all font related formatting styles, including: * <ul> <li>font size;</li> * <li>font family;</li> * <li>font foreground/background color.</li></ul> * @name CKEDITOR.config.pasteFromWordRemoveFontStyles * @since 3.1 * @type Boolean * @default true * @example * config.pasteFromWordRemoveFontStyles = false; */ /** * Whether to transform MS Word outline numbered headings into lists. * @name CKEDITOR.config.pasteFromWordNumberedHeadingToList * @since 3.1 * @type Boolean * @default false * @example * config.pasteFromWordNumberedHeadingToList = true; */ /** * Whether to remove element styles that can't be managed with the editor. Note * that this doesn't handle the font specific styles, which depends on the * {@link CKEDITOR.config.pasteFromWordRemoveFontStyles} setting instead. * @name CKEDITOR.config.pasteFromWordRemoveStyles * @since 3.1 * @type Boolean * @default true * @example * config.pasteFromWordRemoveStyles = false; */
10npsite
trunk/guanli/system/ckeditor/_source/plugins/pastefromword/filter/default.js
JavaScript
asf20
44,458
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @fileOverview The "wysiwygarea" plugin. It registers the "wysiwyg" editing * mode, which handles the main editing area space. */ (function() { // Matching an empty paragraph at the end of document. var emptyParagraphRegexp = /(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>|&nbsp;|\u00A0|&#160;)?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi; var notWhitespaceEval = CKEDITOR.dom.walker.whitespaces( true ), notBogus = CKEDITOR.dom.walker.bogus( true ), notEmpty = function( node ) { return notWhitespaceEval( node ) && notBogus( node ); }; // Elements that could blink the cursor anchoring beside it, like hr, page-break. (#6554) function nonEditable( element ) { return element.isBlockBoundary() && CKEDITOR.dtd.$empty[ element.getName() ]; } function onInsert( insertFunc ) { return function( evt ) { if ( this.mode == 'wysiwyg' ) { this.focus(); // Since the insertion might happen from within dialog or menu // where the editor selection might be locked at the moment, // update the locked selection. var selection = this.getSelection(), selIsLocked = selection.isLocked; selIsLocked && selection.unlock(); this.fire( 'saveSnapshot' ); insertFunc.call( this, evt.data ); selIsLocked && this.getSelection().lock(); // Save snaps after the whole execution completed. // This's a workaround for make DOM modification's happened after // 'insertElement' to be included either, e.g. Form-based dialogs' 'commitContents' // call. CKEDITOR.tools.setTimeout( function() { this.fire( 'saveSnapshot' ); }, 0, this ); } }; } function doInsertHtml( data ) { if ( this.dataProcessor ) data = this.dataProcessor.toHtml( data ); if ( !data ) return; // HTML insertion only considers the first range. var selection = this.getSelection(), range = selection.getRanges()[ 0 ]; if ( range.checkReadOnly() ) return; // Opera: force block splitting when pasted content contains block. (#7801) if ( CKEDITOR.env.opera ) { var path = new CKEDITOR.dom.elementPath( range.startContainer ); if ( path.block ) { var nodes = CKEDITOR.htmlParser.fragment.fromHtml( data, false ).children; for ( var i = 0, count = nodes.length; i < count; i++ ) { if ( nodes[ i ]._.isBlockLike ) { range.splitBlock( this.enterMode == CKEDITOR.ENTER_DIV ? 'div' : 'p' ); range.insertNode( range.document.createText( '' ) ); range.select(); break; } } } } if ( CKEDITOR.env.ie ) { var $sel = selection.getNative(); // Delete control selections to avoid IE bugs on pasteHTML. if ( $sel.type == 'Control' ) $sel.clear(); else if ( selection.getType() == CKEDITOR.SELECTION_TEXT ) { // Due to IE bugs on handling contenteditable=false blocks // (#6005), we need to make some checks and eventually // delete the selection first. range = selection.getRanges()[ 0 ]; var endContainer = range && range.endContainer; if ( endContainer && endContainer.type == CKEDITOR.NODE_ELEMENT && endContainer.getAttribute( 'contenteditable' ) == 'false' && range.checkBoundaryOfElement( endContainer, CKEDITOR.END ) ) { range.setEndAfter( range.endContainer ); range.deleteContents(); } } $sel.createRange().pasteHTML( data ); } else this.document.$.execCommand( 'inserthtml', false, data ); // Webkit does not scroll to the cursor position after pasting (#5558) if ( CKEDITOR.env.webkit ) { selection = this.getSelection(); selection.scrollIntoView(); } } function doInsertText( text ) { var selection = this.getSelection(), mode = selection.getStartElement().hasAscendant( 'pre', true ) ? CKEDITOR.ENTER_BR : this.config.enterMode, isEnterBrMode = mode == CKEDITOR.ENTER_BR; var html = CKEDITOR.tools.htmlEncode( text.replace( /\r\n|\r/g, '\n' ) ); // Convert leading and trailing whitespaces into &nbsp; html = html.replace( /^[ \t]+|[ \t]+$/g, function( match, offset, s ) { if ( match.length == 1 ) // one space, preserve it return '&nbsp;'; else if ( !offset ) // beginning of block return CKEDITOR.tools.repeat( '&nbsp;', match.length - 1 ) + ' '; else // end of block return ' ' + CKEDITOR.tools.repeat( '&nbsp;', match.length - 1 ); } ); // Convert subsequent whitespaces into &nbsp; html = html.replace( /[ \t]{2,}/g, function ( match ) { return CKEDITOR.tools.repeat( '&nbsp;', match.length - 1 ) + ' '; } ); var paragraphTag = mode == CKEDITOR.ENTER_P ? 'p' : 'div'; // Two line-breaks create one paragraph. if ( !isEnterBrMode ) { html = html.replace( /(\n{2})([\s\S]*?)(?:$|\1)/g, function( match, group1, text ) { return '<'+paragraphTag + '>' + text + '</' + paragraphTag + '>'; }); } // One <br> per line-break. html = html.replace( /\n/g, '<br>' ); // Compensate padding <br> for non-IE. if ( !( isEnterBrMode || CKEDITOR.env.ie ) ) { html = html.replace( new RegExp( '<br>(?=</' + paragraphTag + '>)' ), function( match ) { return CKEDITOR.tools.repeat( match, 2 ); } ); } // Inline styles have to be inherited in Firefox. if ( CKEDITOR.env.gecko || CKEDITOR.env.webkit ) { var path = new CKEDITOR.dom.elementPath( selection.getStartElement() ), context = []; for ( var i = 0; i < path.elements.length; i++ ) { var tag = path.elements[ i ].getName(); if ( tag in CKEDITOR.dtd.$inline ) context.unshift( path.elements[ i ].getOuterHtml().match( /^<.*?>/) ); else if ( tag in CKEDITOR.dtd.$block ) break; } // Reproduce the context by preceding the pasted HTML with opening inline tags. html = context.join( '' ) + html; } doInsertHtml.call( this, html ); } function doInsertElement( element ) { var selection = this.getSelection(), ranges = selection.getRanges(), elementName = element.getName(), isBlock = CKEDITOR.dtd.$block[ elementName ]; var selIsLocked = selection.isLocked; if ( selIsLocked ) selection.unlock(); var range, clone, lastElement, bookmark; for ( var i = ranges.length - 1 ; i >= 0 ; i-- ) { range = ranges[ i ]; if ( !range.checkReadOnly() ) { // Remove the original contents, merge splitted nodes. range.deleteContents( 1 ); clone = !i && element || element.clone( 1 ); // If we're inserting a block at dtd-violated position, split // the parent blocks until we reach blockLimit. var current, dtd; if ( isBlock ) { while ( ( current = range.getCommonAncestor( 0, 1 ) ) && ( dtd = CKEDITOR.dtd[ current.getName() ] ) && !( dtd && dtd [ elementName ] ) ) { // Split up inline elements. if ( current.getName() in CKEDITOR.dtd.span ) range.splitElement( current ); // If we're in an empty block which indicate a new paragraph, // simply replace it with the inserting block.(#3664) else if ( range.checkStartOfBlock() && range.checkEndOfBlock() ) { range.setStartBefore( current ); range.collapse( true ); current.remove(); } else range.splitBlock(); } } // Insert the new node. range.insertNode( clone ); // Save the last element reference so we can make the // selection later. if ( !lastElement ) lastElement = clone; } } if ( lastElement ) { range.moveToPosition( lastElement, CKEDITOR.POSITION_AFTER_END ); // If we're inserting a block element immediately followed by // another block element, the selection must be optimized. (#3100,#5436,#8950) if ( isBlock ) { var next = lastElement.getNext( notEmpty ), nextName = next && next.type == CKEDITOR.NODE_ELEMENT && next.getName(); // If the next one is a text block, move cursor to the start of it's content. if ( nextName && CKEDITOR.dtd.$block[ nextName ] ) { if ( CKEDITOR.dtd[ nextName ][ '#' ] ) range.moveToElementEditStart( next ); // Otherwise move cursor to the before end of the last element. else range.moveToElementEditEnd( lastElement ); } // Open a new line if the block is inserted at the end of parent. else if ( !next ) { next = range.fixBlock( true, this.config.enterMode == CKEDITOR.ENTER_DIV ? 'div' : 'p' ); range.moveToElementEditStart( next ); } } } selection.selectRanges( [ range ] ); if ( selIsLocked ) this.getSelection().lock(); } // DOM modification here should not bother dirty flag.(#4385) function restoreDirty( editor ) { if ( !editor.checkDirty() ) setTimeout( function(){ editor.resetDirty(); }, 0 ); } var isNotWhitespace = CKEDITOR.dom.walker.whitespaces( true ), isNotBookmark = CKEDITOR.dom.walker.bookmark( false, true ); function isNotEmpty( node ) { return isNotWhitespace( node ) && isNotBookmark( node ); } function isNbsp( node ) { return node.type == CKEDITOR.NODE_TEXT && CKEDITOR.tools.trim( node.getText() ).match( /^(?:&nbsp;|\xa0)$/ ); } function restoreSelection( selection ) { if ( selection.isLocked ) { selection.unlock(); setTimeout( function() { selection.lock(); }, 0 ); } } function isBlankParagraph( block ) { return block.getOuterHtml().match( emptyParagraphRegexp ); } isNotWhitespace = CKEDITOR.dom.walker.whitespaces( true ); // Gecko need a key event to 'wake up' the editing // ability when document is empty.(#3864, #5781) function activateEditing( editor ) { var win = editor.window, doc = editor.document, body = editor.document.getBody(), bodyFirstChild = body.getFirst(), bodyChildsNum = body.getChildren().count(); if ( !bodyChildsNum || bodyChildsNum == 1 && bodyFirstChild.type == CKEDITOR.NODE_ELEMENT && bodyFirstChild.hasAttribute( '_moz_editor_bogus_node' ) ) { restoreDirty( editor ); // Memorize scroll position to restore it later (#4472). var hostDocument = editor.element.getDocument(); var hostDocumentElement = hostDocument.getDocumentElement(); var scrollTop = hostDocumentElement.$.scrollTop; var scrollLeft = hostDocumentElement.$.scrollLeft; // Simulating keyboard character input by dispatching a keydown of white-space text. var keyEventSimulate = doc.$.createEvent( "KeyEvents" ); keyEventSimulate.initKeyEvent( 'keypress', true, true, win.$, false, false, false, false, 0, 32 ); doc.$.dispatchEvent( keyEventSimulate ); if ( scrollTop != hostDocumentElement.$.scrollTop || scrollLeft != hostDocumentElement.$.scrollLeft ) hostDocument.getWindow().$.scrollTo( scrollLeft, scrollTop ); // Restore the original document status by placing the cursor before a bogus br created (#5021). bodyChildsNum && body.getFirst().remove(); doc.getBody().appendBogus(); var nativeRange = new CKEDITOR.dom.range( doc ); nativeRange.setStartAt( body , CKEDITOR.POSITION_AFTER_START ); nativeRange.select(); } } /** * Auto-fixing block-less content by wrapping paragraph (#3190), prevent * non-exitable-block by padding extra br.(#3189) */ function onSelectionChangeFixBody( evt ) { var editor = evt.editor, path = evt.data.path, blockLimit = path.blockLimit, selection = evt.data.selection, range = selection.getRanges()[0], body = editor.document.getBody(), enterMode = editor.config.enterMode; if ( CKEDITOR.env.gecko ) { activateEditing( editor ); // Ensure bogus br could help to move cursor (out of styles) to the end of block. (#7041) var pathBlock = path.block || path.blockLimit, lastNode = pathBlock && pathBlock.getLast( isNotEmpty ); // Check some specialities of the current path block: // 1. It is really displayed as block; (#7221) // 2. It doesn't end with one inner block; (#7467) // 3. It doesn't have bogus br yet. if ( pathBlock && pathBlock.isBlockBoundary() && !( lastNode && lastNode.type == CKEDITOR.NODE_ELEMENT && lastNode.isBlockBoundary() ) && !pathBlock.is( 'pre' ) && !pathBlock.getBogus() ) { pathBlock.appendBogus(); } } // When we're in block enter mode, a new paragraph will be established // to encapsulate inline contents right under body. (#3657) if ( editor.config.autoParagraph !== false && enterMode != CKEDITOR.ENTER_BR && range.collapsed && blockLimit.getName() == 'body' && !path.block ) { var fixedBlock = range.fixBlock( true, editor.config.enterMode == CKEDITOR.ENTER_DIV ? 'div' : 'p' ); // For IE, we should remove any filler node which was introduced before. if ( CKEDITOR.env.ie ) { var first = fixedBlock.getFirst( isNotEmpty ); first && isNbsp( first ) && first.remove(); } // If the fixed block is actually blank and is already followed by an exitable blank // block, we should revert the fix and move into the existed one. (#3684) if ( isBlankParagraph( fixedBlock ) ) { var element = fixedBlock.getNext( isNotWhitespace ); if ( element && element.type == CKEDITOR.NODE_ELEMENT && !nonEditable( element ) ) { range.moveToElementEditStart( element ); fixedBlock.remove(); } else { element = fixedBlock.getPrevious( isNotWhitespace ); if ( element && element.type == CKEDITOR.NODE_ELEMENT && !nonEditable( element ) ) { range.moveToElementEditEnd( element ); fixedBlock.remove(); } } } range.select(); // Cancel this selection change in favor of the next (correct). (#6811) evt.cancel(); } // Browsers are incapable of moving cursor out of certain block elements (e.g. table, div, pre) // at the end of document, makes it unable to continue adding content, we have to make this // easier by opening an new empty paragraph. var testRange = new CKEDITOR.dom.range( editor.document ); testRange.moveToElementEditEnd( editor.document.getBody() ); var testPath = new CKEDITOR.dom.elementPath( testRange.startContainer ); if ( !testPath.blockLimit.is( 'body') ) { var paddingBlock; if ( enterMode != CKEDITOR.ENTER_BR ) paddingBlock = body.append( editor.document.createElement( enterMode == CKEDITOR.ENTER_P ? 'p' : 'div' ) ); else paddingBlock = body; if ( !CKEDITOR.env.ie ) paddingBlock.appendBogus(); } } CKEDITOR.plugins.add( 'wysiwygarea', { requires : [ 'editingblock' ], init : function( editor ) { var fixForBody = ( editor.config.enterMode != CKEDITOR.ENTER_BR && editor.config.autoParagraph !== false ) ? editor.config.enterMode == CKEDITOR.ENTER_DIV ? 'div' : 'p' : false; var frameLabel = editor.lang.editorTitle.replace( '%1', editor.name ), frameDesc = editor.lang.editorHelp; if ( CKEDITOR.env.ie ) frameLabel += ', ' + frameDesc; var win = CKEDITOR.document.getWindow(); var contentDomReadyHandler; editor.on( 'editingBlockReady', function() { var mainElement, iframe, isLoadingData, isPendingFocus, frameLoaded, fireMode, onResize; // Support for custom document.domain in IE. var isCustomDomain = CKEDITOR.env.isCustomDomain(); // Creates the iframe that holds the editable document. var createIFrame = function( data ) { if ( iframe ) iframe.remove(); var src = 'document.open();' + // The document domain must be set any time we // call document.open(). ( isCustomDomain ? ( 'document.domain="' + document.domain + '";' ) : '' ) + 'document.close();'; // With IE, the custom domain has to be taken care at first, // for other browers, the 'src' attribute should be left empty to // trigger iframe's 'load' event. src = CKEDITOR.env.air ? 'javascript:void(0)' : CKEDITOR.env.ie ? 'javascript:void(function(){' + encodeURIComponent( src ) + '}())' : ''; var labelId = CKEDITOR.tools.getNextId(); iframe = CKEDITOR.dom.element.createFromHtml( '<iframe' + ' style="width:100%;height:100%"' + ' frameBorder="0"' + ' aria-describedby="' + labelId + '"' + ' title="' + frameLabel + '"' + ' src="' + src + '"' + ' tabIndex="' + ( CKEDITOR.env.webkit? -1 : editor.tabIndex ) + '"' + ' allowTransparency="true"' + '></iframe>' ); // Running inside of Firefox chrome the load event doesn't bubble like in a normal page (#5689) if ( document.location.protocol == 'chrome:' ) CKEDITOR.event.useCapture = true; // With FF, it's better to load the data on iframe.load. (#3894,#4058) iframe.on( 'load', function( ev ) { frameLoaded = 1; ev.removeListener(); var doc = iframe.getFrameDocument(); doc.write( data ); CKEDITOR.env.air && contentDomReady( doc.getWindow().$ ); }); // Reset adjustment back to default (#5689) if ( document.location.protocol == 'chrome:' ) CKEDITOR.event.useCapture = false; mainElement.append( CKEDITOR.dom.element.createFromHtml( '<span id="' + labelId + '" class="cke_voice_label">' + frameDesc + '</span>')); mainElement.append( iframe ); // Webkit: iframe size doesn't auto fit well. (#7360) if ( CKEDITOR.env.webkit ) { onResize = function() { // Hide the iframe to get real size of the holder. (#8941) mainElement.setStyle( 'width', '100%' ); iframe.hide(); iframe.setSize( 'width', mainElement.getSize( 'width' ) ); mainElement.removeStyle( 'width' ); iframe.show(); }; win.on( 'resize', onResize ); } }; // The script that launches the bootstrap logic on 'domReady', so the document // is fully editable even before the editing iframe is fully loaded (#4455). contentDomReadyHandler = CKEDITOR.tools.addFunction( contentDomReady ); var activationScript = '<script id="cke_actscrpt" type="text/javascript" data-cke-temp="1">' + ( isCustomDomain ? ( 'document.domain="' + document.domain + '";' ) : '' ) + 'window.parent.CKEDITOR.tools.callFunction( ' + contentDomReadyHandler + ', window );' + '</script>'; // Editing area bootstrap code. function contentDomReady( domWindow ) { if ( !frameLoaded ) return; frameLoaded = 0; editor.fire( 'ariaWidget', iframe ); var domDocument = domWindow.document, body = domDocument.body; // Remove this script from the DOM. var script = domDocument.getElementById( "cke_actscrpt" ); script && script.parentNode.removeChild( script ); body.spellcheck = !editor.config.disableNativeSpellChecker; var editable = !editor.readOnly; if ( CKEDITOR.env.ie ) { // Don't display the focus border. body.hideFocus = true; // Disable and re-enable the body to avoid IE from // taking the editing focus at startup. (#141 / #523) body.disabled = true; body.contentEditable = editable; body.removeAttribute( 'disabled' ); } else { // Avoid opening design mode in a frame window thread, // which will cause host page scrolling.(#4397) setTimeout( function() { // Prefer 'contentEditable' instead of 'designMode'. (#3593) if ( CKEDITOR.env.gecko && CKEDITOR.env.version >= 10900 || CKEDITOR.env.opera ) domDocument.$.body.contentEditable = editable; else if ( CKEDITOR.env.webkit ) domDocument.$.body.parentNode.contentEditable = editable; else domDocument.$.designMode = editable? 'off' : 'on'; }, 0 ); } editable && CKEDITOR.env.gecko && CKEDITOR.tools.setTimeout( activateEditing, 0, null, editor ); domWindow = editor.window = new CKEDITOR.dom.window( domWindow ); domDocument = editor.document = new CKEDITOR.dom.document( domDocument ); editable && domDocument.on( 'dblclick', function( evt ) { var element = evt.data.getTarget(), data = { element : element, dialog : '' }; editor.fire( 'doubleclick', data ); data.dialog && editor.openDialog( data.dialog ); }); // Prevent automatic submission in IE #6336 CKEDITOR.env.ie && domDocument.on( 'click', function( evt ) { var element = evt.data.getTarget(); if ( element.is( 'input' ) ) { var type = element.getAttribute( 'type' ); if ( type == 'submit' || type == 'reset' ) evt.data.preventDefault(); } }); // Gecko/Webkit need some help when selecting control type elements. (#3448) if ( !( CKEDITOR.env.ie || CKEDITOR.env.opera ) ) { domDocument.on( 'mousedown', function( ev ) { var control = ev.data.getTarget(); if ( control.is( 'img', 'hr', 'input', 'textarea', 'select' ) ) editor.getSelection().selectElement( control ); } ); } if ( CKEDITOR.env.gecko ) { domDocument.on( 'mouseup', function( ev ) { if ( ev.data.$.button == 2 ) { var target = ev.data.getTarget(); // Prevent right click from selecting an empty block even // when selection is anchored inside it. (#5845) if ( !target.getOuterHtml().replace( emptyParagraphRegexp, '' ) ) { var range = new CKEDITOR.dom.range( domDocument ); range.moveToElementEditStart( target ); range.select( true ); } } } ); } // Prevent the browser opening links in read-only blocks. (#6032) domDocument.on( 'click', function( ev ) { ev = ev.data; if ( ev.getTarget().is( 'a' ) && ev.$.button != 2 ) ev.preventDefault(); }); // Webkit: avoid from editing form control elements content. if ( CKEDITOR.env.webkit ) { // Mark that cursor will right blinking (#7113). domDocument.on( 'mousedown', function() { wasFocused = 1; } ); // Prevent from tick checkbox/radiobox/select domDocument.on( 'click', function( ev ) { if ( ev.data.getTarget().is( 'input', 'select' ) ) ev.data.preventDefault(); } ); // Prevent from editig textfield/textarea value. domDocument.on( 'mouseup', function( ev ) { if ( ev.data.getTarget().is( 'input', 'textarea' ) ) ev.data.preventDefault(); } ); } var focusTarget = CKEDITOR.env.ie ? iframe : domWindow; focusTarget.on( 'blur', function() { editor.focusManager.blur(); }); var wasFocused; focusTarget.on( 'focus', function() { var doc = editor.document; if ( CKEDITOR.env.gecko || CKEDITOR.env.opera ) doc.getBody().focus(); // Webkit needs focus for the first time on the HTML element. (#6153) else if ( CKEDITOR.env.webkit ) { if ( !wasFocused ) { editor.document.getDocumentElement().focus(); wasFocused = 1; } } editor.focusManager.focus(); }); var keystrokeHandler = editor.keystrokeHandler; // Prevent backspace from navigating off the page. keystrokeHandler.blockedKeystrokes[ 8 ] = !editable; keystrokeHandler.attach( domDocument ); domDocument.getDocumentElement().addClass( domDocument.$.compatMode ); // Override keystroke behaviors. editable && domDocument.on( 'keydown', function( evt ) { var keyCode = evt.data.getKeystroke(); // Backspace OR Delete. if ( keyCode in { 8 : 1, 46 : 1 } ) { var sel = editor.getSelection(), selected = sel.getSelectedElement(), range = sel.getRanges()[ 0 ], path = new CKEDITOR.dom.elementPath( range.startContainer ), block, parent, next, rtl = keyCode == 8; // Override keystrokes which should have deletion behavior // on fully selected element . (#4047) (#7645) if ( selected ) { // Make undo snapshot. editor.fire( 'saveSnapshot' ); // Delete any element that 'hasLayout' (e.g. hr,table) in IE8 will // break up the selection, safely manage it here. (#4795) range.moveToPosition( selected, CKEDITOR.POSITION_BEFORE_START ); // Remove the control manually. selected.remove(); range.select(); editor.fire( 'saveSnapshot' ); evt.data.preventDefault(); } else { // Handle the following special cases: (#6217) // 1. Del/Backspace key before/after table; // 2. Backspace Key after start of table. if ( ( block = path.block ) && range[ rtl ? 'checkStartOfBlock' : 'checkEndOfBlock' ]() && ( next = block[ rtl ? 'getPrevious' : 'getNext' ]( notWhitespaceEval ) ) && next.is( 'table' ) ) { editor.fire( 'saveSnapshot' ); // Remove the current empty block. if ( range[ rtl ? 'checkEndOfBlock' : 'checkStartOfBlock' ]() ) block.remove(); // Move cursor to the beginning/end of table cell. range[ 'moveToElementEdit' + ( rtl ? 'End' : 'Start' ) ]( next ); range.select(); editor.fire( 'saveSnapshot' ); evt.data.preventDefault(); } else if ( path.blockLimit.is( 'td' ) && ( parent = path.blockLimit.getAscendant( 'table' ) ) && range.checkBoundaryOfElement( parent, rtl ? CKEDITOR.START : CKEDITOR.END ) && ( next = parent[ rtl ? 'getPrevious' : 'getNext' ]( notWhitespaceEval ) ) ) { editor.fire( 'saveSnapshot' ); // Move cursor to the end of previous block. range[ 'moveToElementEdit' + ( rtl ? 'End' : 'Start' ) ]( next ); // Remove any previous empty block. if ( range.checkStartOfBlock() && range.checkEndOfBlock() ) next.remove(); else range.select(); editor.fire( 'saveSnapshot' ); evt.data.preventDefault(); } } } // PageUp OR PageDown if ( keyCode == 33 || keyCode == 34 ) { if ( CKEDITOR.env.gecko ) { var body = domDocument.getBody(); // Page up/down cause editor selection to leak // outside of editable thus we try to intercept // the behavior, while it affects only happen // when editor contents are not overflowed. (#7955) if ( domWindow.$.innerHeight > body.$.offsetHeight ) { range = new CKEDITOR.dom.range( domDocument ); range[ keyCode == 33 ? 'moveToElementEditStart' : 'moveToElementEditEnd']( body ); range.select(); evt.data.preventDefault(); } } } } ); // PageUp/PageDown scrolling is broken in document // with standard doctype, manually fix it. (#4736) if ( CKEDITOR.env.ie && domDocument.$.compatMode == 'CSS1Compat' ) { var pageUpDownKeys = { 33 : 1, 34 : 1 }; domDocument.on( 'keydown', function( evt ) { if ( evt.data.getKeystroke() in pageUpDownKeys ) { setTimeout( function () { editor.getSelection().scrollIntoView(); }, 0 ); } } ); } // Prevent IE from leaving new paragraph after deleting all contents in body. (#6966) if ( CKEDITOR.env.ie && editor.config.enterMode != CKEDITOR.ENTER_P ) { domDocument.on( 'selectionchange', function() { var body = domDocument.getBody(), sel = editor.getSelection(), range = sel && sel.getRanges()[ 0 ]; if ( range && body.getHtml().match( /^<p>&nbsp;<\/p>$/i ) && range.startContainer.equals( body ) ) { // Avoid the ambiguity from a real user cursor position. setTimeout( function () { range = editor.getSelection().getRanges()[ 0 ]; if ( !range.startContainer.equals ( 'body' ) ) { body.getFirst().remove( 1 ); range.moveToElementEditEnd( body ); range.select( 1 ); } }, 0 ); } }); } // Adds the document body as a context menu target. if ( editor.contextMenu ) editor.contextMenu.addTarget( domDocument, editor.config.browserContextMenuOnCtrl !== false ); setTimeout( function() { editor.fire( 'contentDom' ); if ( fireMode ) { editor.mode = 'wysiwyg'; editor.fire( 'mode', { previousMode : editor._.previousMode } ); fireMode = false; } isLoadingData = false; if ( isPendingFocus ) { editor.focus(); isPendingFocus = false; } setTimeout( function() { editor.fire( 'dataReady' ); }, 0 ); // Enable dragging of position:absolute elements in IE. try { editor.document.$.execCommand ( '2D-position', false, true); } catch(e) {} // IE, Opera and Safari may not support it and throw errors. try { editor.document.$.execCommand( 'enableInlineTableEditing', false, !editor.config.disableNativeTableHandles ); } catch(e) {} if ( editor.config.disableObjectResizing ) { try { editor.document.$.execCommand( 'enableObjectResizing', false, false ); } catch(e) { // For browsers in which the above method failed, we can cancel the resizing on the fly (#4208) editor.document.getBody().on( CKEDITOR.env.ie ? 'resizestart' : 'resize', function( evt ) { evt.data.preventDefault(); }); } } /* * IE BUG: IE might have rendered the iframe with invisible contents. * (#3623). Push some inconsequential CSS style changes to force IE to * refresh it. * * Also, for some unknown reasons, short timeouts (e.g. 100ms) do not * fix the problem. :( */ if ( CKEDITOR.env.ie ) { setTimeout( function() { if ( editor.document ) { var $body = editor.document.$.body; $body.runtimeStyle.marginBottom = '0px'; $body.runtimeStyle.marginBottom = ''; } }, 1000 ); } }, 0 ); } editor.addMode( 'wysiwyg', { load : function( holderElement, data, isSnapshot ) { mainElement = holderElement; if ( CKEDITOR.env.ie && CKEDITOR.env.quirks ) holderElement.setStyle( 'position', 'relative' ); // The editor data "may be dirty" after this // point. editor.mayBeDirty = true; fireMode = true; if ( isSnapshot ) this.loadSnapshotData( data ); else this.loadData( data ); }, loadData : function( data ) { isLoadingData = true; editor._.dataStore = { id : 1 }; var config = editor.config, fullPage = config.fullPage, docType = config.docType; // Build the additional stuff to be included into <head>. var headExtra = '<style type="text/css" data-cke-temp="1">' + editor._.styles.join( '\n' ) + '</style>'; !fullPage && ( headExtra = CKEDITOR.tools.buildStyleHtml( editor.config.contentsCss ) + headExtra ); var baseTag = config.baseHref ? '<base href="' + config.baseHref + '" data-cke-temp="1" />' : ''; if ( fullPage ) { // Search and sweep out the doctype declaration. data = data.replace( /<!DOCTYPE[^>]*>/i, function( match ) { editor.docType = docType = match; return ''; }).replace( /<\?xml\s[^\?]*\?>/i, function( match ) { editor.xmlDeclaration = match; return ''; }); } // Get the HTML version of the data. if ( editor.dataProcessor ) data = editor.dataProcessor.toHtml( data, fixForBody ); if ( fullPage ) { // Check if the <body> tag is available. if ( !(/<body[\s|>]/).test( data ) ) data = '<body>' + data; // Check if the <html> tag is available. if ( !(/<html[\s|>]/).test( data ) ) data = '<html>' + data + '</html>'; // Check if the <head> tag is available. if ( !(/<head[\s|>]/).test( data ) ) data = data.replace( /<html[^>]*>/, '$&<head><title></title></head>' ) ; else if ( !(/<title[\s|>]/).test( data ) ) data = data.replace( /<head[^>]*>/, '$&<title></title>' ) ; // The base must be the first tag in the HEAD, e.g. to get relative // links on styles. baseTag && ( data = data.replace( /<head>/, '$&' + baseTag ) ); // Inject the extra stuff into <head>. // Attention: do not change it before testing it well. (V2) // This is tricky... if the head ends with <meta ... content type>, // Firefox will break. But, it works if we place our extra stuff as // the last elements in the HEAD. data = data.replace( /<\/head\s*>/, headExtra + '$&' ); // Add the DOCTYPE back to it. data = docType + data; } else { data = config.docType + '<html dir="' + config.contentsLangDirection + '"' + ' lang="' + ( config.contentsLanguage || editor.langCode ) + '">' + '<head>' + '<title>' + frameLabel + '</title>' + baseTag + headExtra + '</head>' + '<body' + ( config.bodyId ? ' id="' + config.bodyId + '"' : '' ) + ( config.bodyClass ? ' class="' + config.bodyClass + '"' : '' ) + '>' + data + '</html>'; } // Distinguish bogus to normal BR at the end of document for Mozilla. (#5293). if ( CKEDITOR.env.gecko ) data = data.replace( /<br \/>(?=\s*<\/(:?html|body)>)/, '$&<br type="_moz" />' ); data += activationScript; // The iframe is recreated on each call of setData, so we need to clear DOM objects this.onDispose(); createIFrame( data ); }, getData : function() { var config = editor.config, fullPage = config.fullPage, docType = fullPage && editor.docType, xmlDeclaration = fullPage && editor.xmlDeclaration, doc = iframe.getFrameDocument(); var data = fullPage ? doc.getDocumentElement().getOuterHtml() : doc.getBody().getHtml(); // BR at the end of document is bogus node for Mozilla. (#5293). if ( CKEDITOR.env.gecko ) data = data.replace( /<br>(?=\s*(:?$|<\/body>))/, '' ); if ( editor.dataProcessor ) data = editor.dataProcessor.toDataFormat( data, fixForBody ); // Reset empty if the document contains only one empty paragraph. if ( config.ignoreEmptyParagraph ) data = data.replace( emptyParagraphRegexp, function( match, lookback ) { return lookback; } ); if ( xmlDeclaration ) data = xmlDeclaration + '\n' + data; if ( docType ) data = docType + '\n' + data; return data; }, getSnapshotData : function() { return iframe.getFrameDocument().getBody().getHtml(); }, loadSnapshotData : function( data ) { iframe.getFrameDocument().getBody().setHtml( data ); }, onDispose : function() { if ( !editor.document ) return; editor.document.getDocumentElement().clearCustomData(); editor.document.getBody().clearCustomData(); editor.window.clearCustomData(); editor.document.clearCustomData(); iframe.clearCustomData(); /* * IE BUG: When destroying editor DOM with the selection remains inside * editing area would break IE7/8's selection system, we have to put the editing * iframe offline first. (#3812 and #5441) */ iframe.remove(); }, unload : function( holderElement ) { this.onDispose(); if ( onResize ) win.removeListener( 'resize', onResize ); editor.window = editor.document = iframe = mainElement = isPendingFocus = null; editor.fire( 'contentDomUnload' ); }, focus : function() { var win = editor.window; if ( isLoadingData ) isPendingFocus = true; else if ( win ) { var sel = editor.getSelection(), ieSel = sel && sel.getNative(); // IE considers control-type element as separate // focus host when selected, avoid destroying the // selection in such case. (#5812) (#8949) if ( ieSel && ieSel.type == 'Control' ) return; // AIR needs a while to focus when moving from a link. CKEDITOR.env.air ? setTimeout( function () { win.focus(); }, 0 ) : win.focus(); editor.selectionChange(); } } }); editor.on( 'insertHtml', onInsert( doInsertHtml ) , null, null, 20 ); editor.on( 'insertElement', onInsert( doInsertElement ), null, null, 20 ); editor.on( 'insertText', onInsert( doInsertText ), null, null, 20 ); // Auto fixing on some document structure weakness to enhance usabilities. (#3190 and #3189) editor.on( 'selectionChange', function( evt ) { if ( editor.readOnly ) return; var sel = editor.getSelection(); // Do it only when selection is not locked. (#8222) if ( sel && !sel.isLocked ) { var isDirty = editor.checkDirty(); editor.fire( 'saveSnapshot', { contentOnly : 1 } ); onSelectionChangeFixBody.call( this, evt ); editor.fire( 'updateSnapshot' ); !isDirty && editor.resetDirty(); } }, null, null, 1 ); }); editor.on( 'contentDom', function() { var title = editor.document.getElementsByTag( 'title' ).getItem( 0 ); title.data( 'cke-title', editor.document.$.title ); // [IE] JAWS will not recognize the aria label we used on the iframe // unless the frame window title string is used as the voice label, // backup the original one and restore it on output. CKEDITOR.env.ie && ( editor.document.$.title = frameLabel ); }); editor.on( 'readOnly', function() { if ( editor.mode == 'wysiwyg' ) { // Symply reload the wysiwyg area. It'll take care of read-only. var wysiwyg = editor.getMode(); wysiwyg.loadData( wysiwyg.getData() ); } }); // IE>=8 stricts mode doesn't have 'contentEditable' in effect // on element unless it has layout. (#5562) if ( CKEDITOR.document.$.documentMode >= 8 ) { editor.addCss( 'html.CSS1Compat [contenteditable=false]{ min-height:0 !important;}' ); var selectors = []; for ( var tag in CKEDITOR.dtd.$removeEmpty ) selectors.push( 'html.CSS1Compat ' + tag + '[contenteditable=false]' ); editor.addCss( selectors.join( ',' ) + '{ display:inline-block;}' ); } // Set the HTML style to 100% to have the text cursor in affect (#6341) else if ( CKEDITOR.env.gecko ) { editor.addCss( 'html { height: 100% !important; }' ); editor.addCss( 'img:-moz-broken { -moz-force-broken-image-icon : 1; min-width : 24px; min-height : 24px; }' ); } // Remove the margin to avoid mouse confusion. (#8835) else if ( CKEDITOR.env.ie && CKEDITOR.env.version < 8 && editor.config.contentsLangDirection == 'ltr' ) editor.addCss( 'body{margin-right:0;}' ); /* #3658: [IE6] Editor document has horizontal scrollbar on long lines To prevent this misbehavior, we show the scrollbar always */ /* #6341: The text cursor must be set on the editor area. */ /* #6632: Avoid having "text" shape of cursor in IE7 scrollbars.*/ editor.addCss( 'html { _overflow-y: scroll; cursor: text; *cursor:auto;}' ); // Use correct cursor for these elements editor.addCss( 'img, input, textarea { cursor: default;}' ); // Disable form elements editing mode provided by some browers. (#5746) editor.on( 'insertElement', function ( evt ) { var element = evt.data; if ( element.type == CKEDITOR.NODE_ELEMENT && ( element.is( 'input' ) || element.is( 'textarea' ) ) ) { // We should flag that the element was locked by our code so // it'll be editable by the editor functions (#6046). var readonly = element.getAttribute( 'contenteditable' ) == 'false'; if ( !readonly ) { element.data( 'cke-editable', element.hasAttribute( 'contenteditable' ) ? 'true' : '1' ); element.setAttribute( 'contenteditable', false ); } } }); } }); // Fixing Firefox 'Back-Forward Cache' break design mode. (#4514) if ( CKEDITOR.env.gecko ) { (function() { var body = document.body; if ( !body ) window.addEventListener( 'load', arguments.callee, false ); else { var currentHandler = body.getAttribute( 'onpageshow' ); body.setAttribute( 'onpageshow', ( currentHandler ? currentHandler + ';' : '') + 'event.persisted && (function(){' + 'var allInstances = CKEDITOR.instances, editor, doc;' + 'for ( var i in allInstances )' + '{' + ' editor = allInstances[ i ];' + ' doc = editor.document;' + ' if ( doc )' + ' {' + ' doc.$.designMode = "off";' + ' doc.$.designMode = "on";' + ' }' + '}' + '})();' ); } } )(); } })(); /** * Disables the ability of resize objects (image and tables) in the editing * area. * @type Boolean * @default false * @example * config.disableObjectResizing = true; */ CKEDITOR.config.disableObjectResizing = false; /** * Disables the "table tools" offered natively by the browser (currently * Firefox only) to make quick table editing operations, like adding or * deleting rows and columns. * @type Boolean * @default true * @example * config.disableNativeTableHandles = false; */ CKEDITOR.config.disableNativeTableHandles = true; /** * Disables the built-in words spell checker if browser provides one.<br /><br /> * * <strong>Note:</strong> Although word suggestions provided by browsers (natively) will not appear in CKEditor's default context menu, * users can always reach the native context menu by holding the <em>Ctrl</em> key when right-clicking if {@link CKEDITOR.config.browserContextMenuOnCtrl} * is enabled or you're simply not using the context menu plugin. * * @type Boolean * @default true * @example * config.disableNativeSpellChecker = false; */ CKEDITOR.config.disableNativeSpellChecker = true; /** * Whether the editor must output an empty value ("") if it's contents is made * by an empty paragraph only. * @type Boolean * @default true * @example * config.ignoreEmptyParagraph = false; */ CKEDITOR.config.ignoreEmptyParagraph = true; /** * Fired when data is loaded and ready for retrieval in an editor instance. * @name CKEDITOR.editor#dataReady * @event */ /** * Whether automatically create wrapping blocks around inline contents inside document body, * this helps to ensure the integrality of the block enter mode. * <strong>Note:</strong> Changing the default value might introduce unpredictable usability issues. * @name CKEDITOR.config.autoParagraph * @since 3.6 * @type Boolean * @default true * @example * config.autoParagraph = false; */ /** * Fired when some elements are added to the document * @name CKEDITOR.editor#ariaWidget * @event * @param {Object} element The element being added */
10npsite
trunk/guanli/system/ckeditor/_source/plugins/wysiwygarea/plugin.js
JavaScript
asf20
45,921
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function() { CKEDITOR.plugins.add( 'stylescombo', { requires : [ 'richcombo', 'styles' ], init : function( editor ) { var config = editor.config, lang = editor.lang.stylesCombo, styles = {}, stylesList = [], combo; function loadStylesSet( callback ) { editor.getStylesSet( function( stylesDefinitions ) { if ( !stylesList.length ) { var style, styleName; // Put all styles into an Array. for ( var i = 0, count = stylesDefinitions.length ; i < count ; i++ ) { var styleDefinition = stylesDefinitions[ i ]; styleName = styleDefinition.name; style = styles[ styleName ] = new CKEDITOR.style( styleDefinition ); style._name = styleName; style._.enterMode = config.enterMode; stylesList.push( style ); } // Sorts the Array, so the styles get grouped by type. stylesList.sort( sortStyles ); } callback && callback(); }); } editor.ui.addRichCombo( 'Styles', { label : lang.label, title : lang.panelTitle, className : 'cke_styles', panel : { css : editor.skin.editor.css.concat( config.contentsCss ), multiSelect : true, attributes : { 'aria-label' : lang.panelTitle } }, init : function() { combo = this; loadStylesSet( function() { var style, styleName, lastType, type, i, count; // Loop over the Array, adding all items to the // combo. for ( i = 0, count = stylesList.length ; i < count ; i++ ) { style = stylesList[ i ]; styleName = style._name; type = style.type; if ( type != lastType ) { combo.startGroup( lang[ 'panelTitle' + String( type ) ] ); lastType = type; } combo.add( styleName, style.type == CKEDITOR.STYLE_OBJECT ? styleName : style.buildPreview(), styleName ); } combo.commit(); }); }, onClick : function( value ) { editor.focus(); editor.fire( 'saveSnapshot' ); var style = styles[ value ], selection = editor.getSelection(), elementPath = new CKEDITOR.dom.elementPath( selection.getStartElement() ); style[ style.checkActive( elementPath ) ? 'remove' : 'apply' ]( editor.document ); editor.fire( 'saveSnapshot' ); }, onRender : function() { editor.on( 'selectionChange', function( ev ) { var currentValue = this.getValue(), elementPath = ev.data.path, elements = elementPath.elements; // For each element into the elements path. for ( var i = 0, count = elements.length, element ; i < count ; i++ ) { element = elements[i]; // Check if the element is removable by any of // the styles. for ( var value in styles ) { if ( styles[ value ].checkElementRemovable( element, true ) ) { if ( value != currentValue ) this.setValue( value ); return; } } } // If no styles match, just empty it. this.setValue( '' ); }, this); }, onOpen : function() { if ( CKEDITOR.env.ie || CKEDITOR.env.webkit ) editor.focus(); var selection = editor.getSelection(), element = selection.getSelectedElement(), elementPath = new CKEDITOR.dom.elementPath( element || selection.getStartElement() ), counter = [ 0, 0, 0, 0 ]; this.showAll(); this.unmarkAll(); for ( var name in styles ) { var style = styles[ name ], type = style.type; if ( style.checkActive( elementPath ) ) this.mark( name ); else if ( type == CKEDITOR.STYLE_OBJECT && !style.checkApplicable( elementPath ) ) { this.hideItem( name ); counter[ type ]--; } counter[ type ]++; } if ( !counter[ CKEDITOR.STYLE_BLOCK ] ) this.hideGroup( lang[ 'panelTitle' + String( CKEDITOR.STYLE_BLOCK ) ] ); if ( !counter[ CKEDITOR.STYLE_INLINE ] ) this.hideGroup( lang[ 'panelTitle' + String( CKEDITOR.STYLE_INLINE ) ] ); if ( !counter[ CKEDITOR.STYLE_OBJECT ] ) this.hideGroup( lang[ 'panelTitle' + String( CKEDITOR.STYLE_OBJECT ) ] ); }, // Force a reload of the data reset: function() { if ( combo ) { delete combo._.panel; delete combo._.list; combo._.committed = 0; combo._.items = {}; combo._.state = CKEDITOR.TRISTATE_OFF; } styles = {}; stylesList = []; loadStylesSet(); } }); editor.on( 'instanceReady', function() { loadStylesSet(); } ); } }); function sortStyles( styleA, styleB ) { var typeA = styleA.type, typeB = styleB.type; return typeA == typeB ? 0 : typeA == CKEDITOR.STYLE_OBJECT ? -1 : typeB == CKEDITOR.STYLE_OBJECT ? 1 : typeB == CKEDITOR.STYLE_BLOCK ? 1 : -1; } })();
10npsite
trunk/guanli/system/ckeditor/_source/plugins/stylescombo/plugin.js
JavaScript
asf20
5,515
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.add( 'find', { requires : [ 'dialog' ], init : function( editor ) { var forms = CKEDITOR.plugins.find; editor.ui.addButton( 'Find', { label : editor.lang.findAndReplace.find, command : 'find' }); var findCommand = editor.addCommand( 'find', new CKEDITOR.dialogCommand( 'find' ) ); findCommand.canUndo = false; findCommand.readOnly = 1; editor.ui.addButton( 'Replace', { label : editor.lang.findAndReplace.replace, command : 'replace' }); var replaceCommand = editor.addCommand( 'replace', new CKEDITOR.dialogCommand( 'replace' ) ); replaceCommand.canUndo = false; CKEDITOR.dialog.add( 'find', this.path + 'dialogs/find.js' ); CKEDITOR.dialog.add( 'replace', this.path + 'dialogs/find.js' ); }, requires : [ 'styles' ] } ); /** * Defines the style to be used to highlight results with the find dialog. * @type Object * @default { element : 'span', styles : { 'background-color' : '#004', 'color' : '#fff' } } * @example * // Highlight search results with blue on yellow. * config.find_highlight = * { * element : 'span', * styles : { 'background-color' : '#ff0', 'color' : '#00f' } * }; */ CKEDITOR.config.find_highlight = { element : 'span', styles : { 'background-color' : '#004', 'color' : '#fff' } };
10npsite
trunk/guanli/system/ckeditor/_source/plugins/find/plugin.js
JavaScript
asf20
1,510
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function() { var isReplace; function findEvaluator( node ) { return node.type == CKEDITOR.NODE_TEXT && node.getLength() > 0 && ( !isReplace || !node.isReadOnly() ); } /** * Elements which break characters been considered as sequence. */ function nonCharactersBoundary( node ) { return !( node.type == CKEDITOR.NODE_ELEMENT && node.isBlockBoundary( CKEDITOR.tools.extend( {}, CKEDITOR.dtd.$empty, CKEDITOR.dtd.$nonEditable ) ) ); } /** * Get the cursor object which represent both current character and it's dom * position thing. */ var cursorStep = function() { return { textNode : this.textNode, offset : this.offset, character : this.textNode ? this.textNode.getText().charAt( this.offset ) : null, hitMatchBoundary : this._.matchBoundary }; }; var pages = [ 'find', 'replace' ], fieldsMapping = [ [ 'txtFindFind', 'txtFindReplace' ], [ 'txtFindCaseChk', 'txtReplaceCaseChk' ], [ 'txtFindWordChk', 'txtReplaceWordChk' ], [ 'txtFindCyclic', 'txtReplaceCyclic' ] ]; /** * Synchronize corresponding filed values between 'replace' and 'find' pages. * @param {String} currentPageId The page id which receive values. */ function syncFieldsBetweenTabs( currentPageId ) { var sourceIndex, targetIndex, sourceField, targetField; sourceIndex = currentPageId === 'find' ? 1 : 0; targetIndex = 1 - sourceIndex; var i, l = fieldsMapping.length; for ( i = 0 ; i < l ; i++ ) { sourceField = this.getContentElement( pages[ sourceIndex ], fieldsMapping[ i ][ sourceIndex ] ); targetField = this.getContentElement( pages[ targetIndex ], fieldsMapping[ i ][ targetIndex ] ); targetField.setValue( sourceField.getValue() ); } } var findDialog = function( editor, startupPage ) { // Style object for highlights: (#5018) // 1. Defined as full match style to avoid compromising ordinary text color styles. // 2. Must be apply onto inner-most text to avoid conflicting with ordinary text color styles visually. var highlightStyle = new CKEDITOR.style( CKEDITOR.tools.extend( { attributes : { 'data-cke-highlight': 1 }, fullMatch : 1, ignoreReadonly : 1, childRule : function(){ return 0; } }, editor.config.find_highlight, true ) ); /** * Iterator which walk through the specified range char by char. By * default the walking will not stop at the character boundaries, until * the end of the range is encountered. * @param { CKEDITOR.dom.range } range * @param {Boolean} matchWord Whether the walking will stop at character boundary. */ var characterWalker = function( range , matchWord ) { var self = this; var walker = new CKEDITOR.dom.walker( range ); walker.guard = matchWord ? nonCharactersBoundary : function( node ) { !nonCharactersBoundary( node ) && ( self._.matchBoundary = true ); }; walker[ 'evaluator' ] = findEvaluator; walker.breakOnFalse = 1; if ( range.startContainer.type == CKEDITOR.NODE_TEXT ) { this.textNode = range.startContainer; this.offset = range.startOffset - 1; } this._ = { matchWord : matchWord, walker : walker, matchBoundary : false }; }; characterWalker.prototype = { next : function() { return this.move(); }, back : function() { return this.move( true ); }, move : function( rtl ) { var currentTextNode = this.textNode; // Already at the end of document, no more character available. if ( currentTextNode === null ) return cursorStep.call( this ); this._.matchBoundary = false; // There are more characters in the text node, step forward. if ( currentTextNode && rtl && this.offset > 0 ) { this.offset--; return cursorStep.call( this ); } else if ( currentTextNode && this.offset < currentTextNode.getLength() - 1 ) { this.offset++; return cursorStep.call( this ); } else { currentTextNode = null; // At the end of the text node, walking foward for the next. while ( !currentTextNode ) { currentTextNode = this._.walker[ rtl ? 'previous' : 'next' ].call( this._.walker ); // Stop searching if we're need full word match OR // already reach document end. if ( this._.matchWord && !currentTextNode || this._.walker._.end ) break; } // Found a fresh text node. this.textNode = currentTextNode; if ( currentTextNode ) this.offset = rtl ? currentTextNode.getLength() - 1 : 0; else this.offset = 0; } return cursorStep.call( this ); } }; /** * A range of cursors which represent a trunk of characters which try to * match, it has the same length as the pattern string. */ var characterRange = function( characterWalker, rangeLength ) { this._ = { walker : characterWalker, cursors : [], rangeLength : rangeLength, highlightRange : null, isMatched : 0 }; }; characterRange.prototype = { /** * Translate this range to {@link CKEDITOR.dom.range} */ toDomRange : function() { var range = new CKEDITOR.dom.range( editor.document ); var cursors = this._.cursors; if ( cursors.length < 1 ) { var textNode = this._.walker.textNode; if ( textNode ) range.setStartAfter( textNode ); else return null; } else { var first = cursors[0], last = cursors[ cursors.length - 1 ]; range.setStart( first.textNode, first.offset ); range.setEnd( last.textNode, last.offset + 1 ); } return range; }, /** * Reflect the latest changes from dom range. */ updateFromDomRange : function( domRange ) { var cursor, walker = new characterWalker( domRange ); this._.cursors = []; do { cursor = walker.next(); if ( cursor.character ) this._.cursors.push( cursor ); } while ( cursor.character ); this._.rangeLength = this._.cursors.length; }, setMatched : function() { this._.isMatched = true; }, clearMatched : function() { this._.isMatched = false; }, isMatched : function() { return this._.isMatched; }, /** * Hightlight the current matched chunk of text. */ highlight : function() { // Do not apply if nothing is found. if ( this._.cursors.length < 1 ) return; // Remove the previous highlight if there's one. if ( this._.highlightRange ) this.removeHighlight(); // Apply the highlight. var range = this.toDomRange(), bookmark = range.createBookmark(); highlightStyle.applyToRange( range ); range.moveToBookmark( bookmark ); this._.highlightRange = range; // Scroll the editor to the highlighted area. var element = range.startContainer; if ( element.type != CKEDITOR.NODE_ELEMENT ) element = element.getParent(); element.scrollIntoView(); // Update the character cursors. this.updateFromDomRange( range ); }, /** * Remove highlighted find result. */ removeHighlight : function() { if ( !this._.highlightRange ) return; var bookmark = this._.highlightRange.createBookmark(); highlightStyle.removeFromRange( this._.highlightRange ); this._.highlightRange.moveToBookmark( bookmark ); this.updateFromDomRange( this._.highlightRange ); this._.highlightRange = null; }, isReadOnly : function() { if ( !this._.highlightRange ) return 0; return this._.highlightRange.startContainer.isReadOnly(); }, moveBack : function() { var retval = this._.walker.back(), cursors = this._.cursors; if ( retval.hitMatchBoundary ) this._.cursors = cursors = []; cursors.unshift( retval ); if ( cursors.length > this._.rangeLength ) cursors.pop(); return retval; }, moveNext : function() { var retval = this._.walker.next(), cursors = this._.cursors; // Clear the cursors queue if we've crossed a match boundary. if ( retval.hitMatchBoundary ) this._.cursors = cursors = []; cursors.push( retval ); if ( cursors.length > this._.rangeLength ) cursors.shift(); return retval; }, getEndCharacter : function() { var cursors = this._.cursors; if ( cursors.length < 1 ) return null; return cursors[ cursors.length - 1 ].character; }, getNextCharacterRange : function( maxLength ) { var lastCursor, nextRangeWalker, cursors = this._.cursors; if ( ( lastCursor = cursors[ cursors.length - 1 ] ) && lastCursor.textNode ) nextRangeWalker = new characterWalker( getRangeAfterCursor( lastCursor ) ); // In case it's an empty range (no cursors), figure out next range from walker (#4951). else nextRangeWalker = this._.walker; return new characterRange( nextRangeWalker, maxLength ); }, getCursors : function() { return this._.cursors; } }; // The remaining document range after the character cursor. function getRangeAfterCursor( cursor , inclusive ) { var range = new CKEDITOR.dom.range(); range.setStart( cursor.textNode, ( inclusive ? cursor.offset : cursor.offset + 1 ) ); range.setEndAt( editor.document.getBody(), CKEDITOR.POSITION_BEFORE_END ); return range; } // The document range before the character cursor. function getRangeBeforeCursor( cursor ) { var range = new CKEDITOR.dom.range(); range.setStartAt( editor.document.getBody(), CKEDITOR.POSITION_AFTER_START ); range.setEnd( cursor.textNode, cursor.offset ); return range; } var KMP_NOMATCH = 0, KMP_ADVANCED = 1, KMP_MATCHED = 2; /** * Examination the occurrence of a word which implement KMP algorithm. */ var kmpMatcher = function( pattern, ignoreCase ) { var overlap = [ -1 ]; if ( ignoreCase ) pattern = pattern.toLowerCase(); for ( var i = 0 ; i < pattern.length ; i++ ) { overlap.push( overlap[i] + 1 ); while ( overlap[ i + 1 ] > 0 && pattern.charAt( i ) != pattern .charAt( overlap[ i + 1 ] - 1 ) ) overlap[ i + 1 ] = overlap[ overlap[ i + 1 ] - 1 ] + 1; } this._ = { overlap : overlap, state : 0, ignoreCase : !!ignoreCase, pattern : pattern }; }; kmpMatcher.prototype = { feedCharacter : function( c ) { if ( this._.ignoreCase ) c = c.toLowerCase(); while ( true ) { if ( c == this._.pattern.charAt( this._.state ) ) { this._.state++; if ( this._.state == this._.pattern.length ) { this._.state = 0; return KMP_MATCHED; } return KMP_ADVANCED; } else if ( !this._.state ) return KMP_NOMATCH; else this._.state = this._.overlap[ this._.state ]; } return null; }, reset : function() { this._.state = 0; } }; var wordSeparatorRegex = /[.,"'?!;: \u0085\u00a0\u1680\u280e\u2028\u2029\u202f\u205f\u3000]/; var isWordSeparator = function( c ) { if ( !c ) return true; var code = c.charCodeAt( 0 ); return ( code >= 9 && code <= 0xd ) || ( code >= 0x2000 && code <= 0x200a ) || wordSeparatorRegex.test( c ); }; var finder = { searchRange : null, matchRange : null, find : function( pattern, matchCase, matchWord, matchCyclic, highlightMatched, cyclicRerun ) { if ( !this.matchRange ) this.matchRange = new characterRange( new characterWalker( this.searchRange ), pattern.length ); else { this.matchRange.removeHighlight(); this.matchRange = this.matchRange.getNextCharacterRange( pattern.length ); } var matcher = new kmpMatcher( pattern, !matchCase ), matchState = KMP_NOMATCH, character = '%'; while ( character !== null ) { this.matchRange.moveNext(); while ( ( character = this.matchRange.getEndCharacter() ) ) { matchState = matcher.feedCharacter( character ); if ( matchState == KMP_MATCHED ) break; if ( this.matchRange.moveNext().hitMatchBoundary ) matcher.reset(); } if ( matchState == KMP_MATCHED ) { if ( matchWord ) { var cursors = this.matchRange.getCursors(), tail = cursors[ cursors.length - 1 ], head = cursors[ 0 ]; var rangeBefore = getRangeBeforeCursor( head ), rangeAfter = getRangeAfterCursor( tail ); // The word boundary checks requires to trim the text nodes. (#9036) rangeBefore.trim(); rangeAfter.trim(); var headWalker = new characterWalker( rangeBefore, true ), tailWalker = new characterWalker( rangeAfter, true ); if ( ! ( isWordSeparator( headWalker.back().character ) && isWordSeparator( tailWalker.next().character ) ) ) continue; } this.matchRange.setMatched(); if ( highlightMatched !== false ) this.matchRange.highlight(); return true; } } this.matchRange.clearMatched(); this.matchRange.removeHighlight(); // Clear current session and restart with the default search // range. // Re-run the finding once for cyclic.(#3517) if ( matchCyclic && !cyclicRerun ) { this.searchRange = getSearchRange( 1 ); this.matchRange = null; return arguments.callee.apply( this, Array.prototype.slice.call( arguments ).concat( [ true ] ) ); } return false; }, /** * Record how much replacement occurred toward one replacing. */ replaceCounter : 0, replace : function( dialog, pattern, newString, matchCase, matchWord, matchCyclic , isReplaceAll ) { isReplace = 1; // Successiveness of current replace/find. var result = 0; // 1. Perform the replace when there's already a match here. // 2. Otherwise perform the find but don't replace it immediately. if ( this.matchRange && this.matchRange.isMatched() && !this.matchRange._.isReplaced && !this.matchRange.isReadOnly() ) { // Turn off highlight for a while when saving snapshots. this.matchRange.removeHighlight(); var domRange = this.matchRange.toDomRange(); var text = editor.document.createText( newString ); if ( !isReplaceAll ) { // Save undo snaps before and after the replacement. var selection = editor.getSelection(); selection.selectRanges( [ domRange ] ); editor.fire( 'saveSnapshot' ); } domRange.deleteContents(); domRange.insertNode( text ); if ( !isReplaceAll ) { selection.selectRanges( [ domRange ] ); editor.fire( 'saveSnapshot' ); } this.matchRange.updateFromDomRange( domRange ); if ( !isReplaceAll ) this.matchRange.highlight(); this.matchRange._.isReplaced = true; this.replaceCounter++; result = 1; } else result = this.find( pattern, matchCase, matchWord, matchCyclic, !isReplaceAll ); isReplace = 0; return result; } }; /** * The range in which find/replace happened, receive from user * selection prior. */ function getSearchRange( isDefault ) { var searchRange, sel = editor.getSelection(), body = editor.document.getBody(); if ( sel && !isDefault ) { searchRange = sel.getRanges()[ 0 ].clone(); searchRange.collapse( true ); } else { searchRange = new CKEDITOR.dom.range(); searchRange.setStartAt( body, CKEDITOR.POSITION_AFTER_START ); } searchRange.setEndAt( body, CKEDITOR.POSITION_BEFORE_END ); return searchRange; } var lang = editor.lang.findAndReplace; return { title : lang.title, resizable : CKEDITOR.DIALOG_RESIZE_NONE, minWidth : 350, minHeight : 170, buttons : [ CKEDITOR.dialog.cancelButton ], // Cancel button only. contents : [ { id : 'find', label : lang.find, title : lang.find, accessKey : '', elements : [ { type : 'hbox', widths : [ '230px', '90px' ], children : [ { type : 'text', id : 'txtFindFind', label : lang.findWhat, isChanged : false, labelLayout : 'horizontal', accessKey : 'F' }, { type : 'button', id : 'btnFind', align : 'left', style : 'width:100%', label : lang.find, onClick : function() { var dialog = this.getDialog(); if ( !finder.find( dialog.getValueOf( 'find', 'txtFindFind' ), dialog.getValueOf( 'find', 'txtFindCaseChk' ), dialog.getValueOf( 'find', 'txtFindWordChk' ), dialog.getValueOf( 'find', 'txtFindCyclic' ) ) ) alert( lang .notFoundMsg ); } } ] }, { type : 'fieldset', label : CKEDITOR.tools.htmlEncode( lang.findOptions ), style : 'margin-top:29px', children : [ { type : 'vbox', padding : 0, children : [ { type : 'checkbox', id : 'txtFindCaseChk', isChanged : false, label : lang.matchCase }, { type : 'checkbox', id : 'txtFindWordChk', isChanged : false, label : lang.matchWord }, { type : 'checkbox', id : 'txtFindCyclic', isChanged : false, 'default' : true, label : lang.matchCyclic } ] } ] } ] }, { id : 'replace', label : lang.replace, accessKey : 'M', elements : [ { type : 'hbox', widths : [ '230px', '90px' ], children : [ { type : 'text', id : 'txtFindReplace', label : lang.findWhat, isChanged : false, labelLayout : 'horizontal', accessKey : 'F' }, { type : 'button', id : 'btnFindReplace', align : 'left', style : 'width:100%', label : lang.replace, onClick : function() { var dialog = this.getDialog(); if ( !finder.replace( dialog, dialog.getValueOf( 'replace', 'txtFindReplace' ), dialog.getValueOf( 'replace', 'txtReplace' ), dialog.getValueOf( 'replace', 'txtReplaceCaseChk' ), dialog.getValueOf( 'replace', 'txtReplaceWordChk' ), dialog.getValueOf( 'replace', 'txtReplaceCyclic' ) ) ) alert( lang .notFoundMsg ); } } ] }, { type : 'hbox', widths : [ '230px', '90px' ], children : [ { type : 'text', id : 'txtReplace', label : lang.replaceWith, isChanged : false, labelLayout : 'horizontal', accessKey : 'R' }, { type : 'button', id : 'btnReplaceAll', align : 'left', style : 'width:100%', label : lang.replaceAll, isChanged : false, onClick : function() { var dialog = this.getDialog(); var replaceNums; finder.replaceCounter = 0; // Scope to full document. finder.searchRange = getSearchRange( 1 ); if ( finder.matchRange ) { finder.matchRange.removeHighlight(); finder.matchRange = null; } editor.fire( 'saveSnapshot' ); while ( finder.replace( dialog, dialog.getValueOf( 'replace', 'txtFindReplace' ), dialog.getValueOf( 'replace', 'txtReplace' ), dialog.getValueOf( 'replace', 'txtReplaceCaseChk' ), dialog.getValueOf( 'replace', 'txtReplaceWordChk' ), false, true ) ) { /*jsl:pass*/ } if ( finder.replaceCounter ) { alert( lang.replaceSuccessMsg.replace( /%1/, finder.replaceCounter ) ); editor.fire( 'saveSnapshot' ); } else alert( lang.notFoundMsg ); } } ] }, { type : 'fieldset', label : CKEDITOR.tools.htmlEncode( lang.findOptions ), children : [ { type : 'vbox', padding : 0, children : [ { type : 'checkbox', id : 'txtReplaceCaseChk', isChanged : false, label : lang.matchCase }, { type : 'checkbox', id : 'txtReplaceWordChk', isChanged : false, label : lang.matchWord }, { type : 'checkbox', id : 'txtReplaceCyclic', isChanged : false, 'default' : true, label : lang.matchCyclic } ] } ] } ] } ], onLoad : function() { var dialog = this; // Keep track of the current pattern field in use. var patternField, wholeWordChkField; // Ignore initial page select on dialog show var isUserSelect = 0; this.on( 'hide', function() { isUserSelect = 0; }); this.on( 'show', function() { isUserSelect = 1; }); this.selectPage = CKEDITOR.tools.override( this.selectPage, function( originalFunc ) { return function( pageId ) { originalFunc.call( dialog, pageId ); var currPage = dialog._.tabs[ pageId ]; var patternFieldInput, patternFieldId, wholeWordChkFieldId; patternFieldId = pageId === 'find' ? 'txtFindFind' : 'txtFindReplace'; wholeWordChkFieldId = pageId === 'find' ? 'txtFindWordChk' : 'txtReplaceWordChk'; patternField = dialog.getContentElement( pageId, patternFieldId ); wholeWordChkField = dialog.getContentElement( pageId, wholeWordChkFieldId ); // Prepare for check pattern text filed 'keyup' event if ( !currPage.initialized ) { patternFieldInput = CKEDITOR.document .getById( patternField._.inputId ); currPage.initialized = true; } // Synchronize fields on tab switch. if ( isUserSelect ) syncFieldsBetweenTabs.call( this, pageId ); }; } ); }, onShow : function() { // Establish initial searching start position. finder.searchRange = getSearchRange(); // Fill in the find field with selected text. var selectedText = this.getParentEditor().getSelection().getSelectedText(), patternFieldId = ( startupPage == 'find' ? 'txtFindFind' : 'txtFindReplace' ); var field = this.getContentElement( startupPage, patternFieldId ); field.setValue( selectedText ); field.select(); this.selectPage( startupPage ); this[ ( startupPage == 'find' && this._.editor.readOnly? 'hide' : 'show' ) + 'Page' ]( 'replace'); }, onHide : function() { var range; if ( finder.matchRange && finder.matchRange.isMatched() ) { finder.matchRange.removeHighlight(); editor.focus(); range = finder.matchRange.toDomRange(); if ( range ) editor.getSelection().selectRanges( [ range ] ); } // Clear current session before dialog close delete finder.matchRange; }, onFocus : function() { if ( startupPage == 'replace' ) return this.getContentElement( 'replace', 'txtFindReplace' ); else return this.getContentElement( 'find', 'txtFindFind' ); } }; }; CKEDITOR.dialog.add( 'find', function( editor ) { return findDialog( editor, 'find' ); }); CKEDITOR.dialog.add( 'replace', function( editor ) { return findDialog( editor, 'replace' ); }); })();
10npsite
trunk/guanli/system/ckeditor/_source/plugins/find/dialogs/find.js
JavaScript
asf20
24,900
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.add( 'htmlwriter' ); /** * Class used to write HTML data. * @constructor * @example * var writer = new CKEDITOR.htmlWriter(); * writer.openTag( 'p' ); * writer.attribute( 'class', 'MyClass' ); * writer.openTagClose( 'p' ); * writer.text( 'Hello' ); * writer.closeTag( 'p' ); * alert( writer.getHtml() ); "&lt;p class="MyClass"&gt;Hello&lt;/p&gt;" */ CKEDITOR.htmlWriter = CKEDITOR.tools.createClass( { base : CKEDITOR.htmlParser.basicWriter, $ : function() { // Call the base contructor. this.base(); /** * The characters to be used for each identation step. * @type String * @default "\t" (tab) * @example * // Use two spaces for indentation. * editorInstance.dataProcessor.writer.indentationChars = ' '; */ this.indentationChars = '\t'; /** * The characters to be used to close "self-closing" elements, like "br" or * "img". * @type String * @default " /&gt;" * @example * // Use HTML4 notation for self-closing elements. * editorInstance.dataProcessor.writer.selfClosingEnd = '>'; */ this.selfClosingEnd = ' />'; /** * The characters to be used for line breaks. * @type String * @default "\n" (LF) * @example * // Use CRLF for line breaks. * editorInstance.dataProcessor.writer.lineBreakChars = '\r\n'; */ this.lineBreakChars = '\n'; this.forceSimpleAmpersand = 0; this.sortAttributes = 1; this._.indent = 0; this._.indentation = ''; // Indicate preformatted block context status. (#5789) this._.inPre = 0; this._.rules = {}; var dtd = CKEDITOR.dtd; for ( var e in CKEDITOR.tools.extend( {}, dtd.$nonBodyContent, dtd.$block, dtd.$listItem, dtd.$tableContent ) ) { this.setRules( e, { indent : 1, breakBeforeOpen : 1, breakAfterOpen : 1, breakBeforeClose : !dtd[ e ][ '#' ], breakAfterClose : 1 }); } this.setRules( 'br', { breakAfterOpen : 1 }); this.setRules( 'title', { indent : 0, breakAfterOpen : 0 }); this.setRules( 'style', { indent : 0, breakBeforeClose : 1 }); // Disable indentation on <pre>. this.setRules( 'pre', { indent : 0 }); }, proto : { /** * Writes the tag opening part for a opener tag. * @param {String} tagName The element name for this tag. * @param {Object} attributes The attributes defined for this tag. The * attributes could be used to inspect the tag. * @example * // Writes "&lt;p". * writer.openTag( 'p', { class : 'MyClass', id : 'MyId' } ); */ openTag : function( tagName, attributes ) { var rules = this._.rules[ tagName ]; if ( this._.indent ) this.indentation(); // Do not break if indenting. else if ( rules && rules.breakBeforeOpen ) { this.lineBreak(); this.indentation(); } this._.output.push( '<', tagName ); }, /** * Writes the tag closing part for a opener tag. * @param {String} tagName The element name for this tag. * @param {Boolean} isSelfClose Indicates that this is a self-closing tag, * like "br" or "img". * @example * // Writes "&gt;". * writer.openTagClose( 'p', false ); * @example * // Writes " /&gt;". * writer.openTagClose( 'br', true ); */ openTagClose : function( tagName, isSelfClose ) { var rules = this._.rules[ tagName ]; if ( isSelfClose ) this._.output.push( this.selfClosingEnd ); else { this._.output.push( '>' ); if ( rules && rules.indent ) this._.indentation += this.indentationChars; } if ( rules && rules.breakAfterOpen ) this.lineBreak(); tagName == 'pre' && ( this._.inPre = 1 ); }, /** * Writes an attribute. This function should be called after opening the * tag with {@link #openTagClose}. * @param {String} attName The attribute name. * @param {String} attValue The attribute value. * @example * // Writes ' class="MyClass"'. * writer.attribute( 'class', 'MyClass' ); */ attribute : function( attName, attValue ) { if ( typeof attValue == 'string' ) { this.forceSimpleAmpersand && ( attValue = attValue.replace( /&amp;/g, '&' ) ); // Browsers don't always escape special character in attribute values. (#4683, #4719). attValue = CKEDITOR.tools.htmlEncodeAttr( attValue ); } this._.output.push( ' ', attName, '="', attValue, '"' ); }, /** * Writes a closer tag. * @param {String} tagName The element name for this tag. * @example * // Writes "&lt;/p&gt;". * writer.closeTag( 'p' ); */ closeTag : function( tagName ) { var rules = this._.rules[ tagName ]; if ( rules && rules.indent ) this._.indentation = this._.indentation.substr( this.indentationChars.length ); if ( this._.indent ) this.indentation(); // Do not break if indenting. else if ( rules && rules.breakBeforeClose ) { this.lineBreak(); this.indentation(); } this._.output.push( '</', tagName, '>' ); tagName == 'pre' && ( this._.inPre = 0 ); if ( rules && rules.breakAfterClose ) this.lineBreak(); }, /** * Writes text. * @param {String} text The text value * @example * // Writes "Hello Word". * writer.text( 'Hello Word' ); */ text : function( text ) { if ( this._.indent ) { this.indentation(); !this._.inPre && ( text = CKEDITOR.tools.ltrim( text ) ); } this._.output.push( text ); }, /** * Writes a comment. * @param {String} comment The comment text. * @example * // Writes "&lt;!-- My comment --&gt;". * writer.comment( ' My comment ' ); */ comment : function( comment ) { if ( this._.indent ) this.indentation(); this._.output.push( '<!--', comment, '-->' ); }, /** * Writes a line break. It uses the {@link #lineBreakChars} property for it. * @example * // Writes "\n" (e.g.). * writer.lineBreak(); */ lineBreak : function() { if ( !this._.inPre && this._.output.length > 0 ) this._.output.push( this.lineBreakChars ); this._.indent = 1; }, /** * Writes the current indentation chars. It uses the * {@link #indentationChars} property, repeating it for the current * indentation steps. * @example * // Writes "\t" (e.g.). * writer.indentation(); */ indentation : function() { if( !this._.inPre ) this._.output.push( this._.indentation ); this._.indent = 0; }, /** * Sets formatting rules for a give element. The possible rules are: * <ul> * <li><b>indent</b>: indent the element contents.</li> * <li><b>breakBeforeOpen</b>: break line before the opener tag for this element.</li> * <li><b>breakAfterOpen</b>: break line after the opener tag for this element.</li> * <li><b>breakBeforeClose</b>: break line before the closer tag for this element.</li> * <li><b>breakAfterClose</b>: break line after the closer tag for this element.</li> * </ul> * * All rules default to "false". Each call to the function overrides * already present rules, leaving the undefined untouched. * * By default, all elements available in the {@link CKEDITOR.dtd.$block), * {@link CKEDITOR.dtd.$listItem} and {@link CKEDITOR.dtd.$tableContent} * lists have all the above rules set to "true". Additionaly, the "br" * element has the "breakAfterOpen" set to "true". * @param {String} tagName The element name to which set the rules. * @param {Object} rules An object containing the element rules. * @example * // Break line before and after "img" tags. * writer.setRules( 'img', * { * breakBeforeOpen : true * breakAfterOpen : true * }); * @example * // Reset the rules for the "h1" tag. * writer.setRules( 'h1', {} ); */ setRules : function( tagName, rules ) { var currentRules = this._.rules[ tagName ]; if ( currentRules ) CKEDITOR.tools.extend( currentRules, rules, true ); else this._.rules[ tagName ] = rules; } } });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/htmlwriter/plugin.js
JavaScript
asf20
8,463
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @fileOverview Undo/Redo system for saving shapshot for document modification * and other recordable changes. */ (function() { CKEDITOR.plugins.add( 'undo', { requires : [ 'selection', 'wysiwygarea' ], init : function( editor ) { var undoManager = new UndoManager( editor ); var undoCommand = editor.addCommand( 'undo', { exec : function() { if ( undoManager.undo() ) { editor.selectionChange(); this.fire( 'afterUndo' ); } }, state : CKEDITOR.TRISTATE_DISABLED, canUndo : false }); var redoCommand = editor.addCommand( 'redo', { exec : function() { if ( undoManager.redo() ) { editor.selectionChange(); this.fire( 'afterRedo' ); } }, state : CKEDITOR.TRISTATE_DISABLED, canUndo : false }); undoManager.onChange = function() { undoCommand.setState( undoManager.undoable() ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED ); redoCommand.setState( undoManager.redoable() ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED ); }; function recordCommand( event ) { // If the command hasn't been marked to not support undo. if ( undoManager.enabled && event.data.command.canUndo !== false ) undoManager.save(); } // We'll save snapshots before and after executing a command. editor.on( 'beforeCommandExec', recordCommand ); editor.on( 'afterCommandExec', recordCommand ); // Save snapshots before doing custom changes. editor.on( 'saveSnapshot', function( evt ) { undoManager.save( evt.data && evt.data.contentOnly ); }); // Registering keydown on every document recreation.(#3844) editor.on( 'contentDom', function() { editor.document.on( 'keydown', function( event ) { // Do not capture CTRL hotkeys. if ( !event.data.$.ctrlKey && !event.data.$.metaKey ) undoManager.type( event ); }); }); // Always save an undo snapshot - the previous mode might have // changed editor contents. editor.on( 'beforeModeUnload', function() { editor.mode == 'wysiwyg' && undoManager.save( true ); }); // Make the undo manager available only in wysiwyg mode. editor.on( 'mode', function() { undoManager.enabled = editor.readOnly ? false : editor.mode == 'wysiwyg'; undoManager.onChange(); }); editor.ui.addButton( 'Undo', { label : editor.lang.undo, command : 'undo' }); editor.ui.addButton( 'Redo', { label : editor.lang.redo, command : 'redo' }); editor.resetUndo = function() { // Reset the undo stack. undoManager.reset(); // Create the first image. editor.fire( 'saveSnapshot' ); }; /** * Amend the top of undo stack (last undo image) with the current DOM changes. * @name CKEDITOR.editor#updateUndo * @example * function() * { * editor.fire( 'saveSnapshot' ); * editor.document.body.append(...); * // Make new changes following the last undo snapshot part of it. * editor.fire( 'updateSnapshot' ); * ... * } */ editor.on( 'updateSnapshot', function() { if ( undoManager.currentImage ) undoManager.update(); }); } }); CKEDITOR.plugins.undo = {}; /** * Undo snapshot which represents the current document status. * @name CKEDITOR.plugins.undo.Image * @param editor The editor instance on which the image is created. */ var Image = CKEDITOR.plugins.undo.Image = function( editor ) { this.editor = editor; editor.fire( 'beforeUndoImage' ); var contents = editor.getSnapshot(), selection = contents && editor.getSelection(); // In IE, we need to remove the expando attributes. CKEDITOR.env.ie && contents && ( contents = contents.replace( /\s+data-cke-expando=".*?"/g, '' ) ); this.contents = contents; this.bookmarks = selection && selection.createBookmarks2( true ); editor.fire( 'afterUndoImage' ); }; // Attributes that browser may changing them when setting via innerHTML. var protectedAttrs = /\b(?:href|src|name)="[^"]*?"/gi; Image.prototype = { equals : function( otherImage, contentOnly ) { var thisContents = this.contents, otherContents = otherImage.contents; // For IE6/7 : Comparing only the protected attribute values but not the original ones.(#4522) if ( CKEDITOR.env.ie && ( CKEDITOR.env.ie7Compat || CKEDITOR.env.ie6Compat ) ) { thisContents = thisContents.replace( protectedAttrs, '' ); otherContents = otherContents.replace( protectedAttrs, '' ); } if ( thisContents != otherContents ) return false; if ( contentOnly ) return true; var bookmarksA = this.bookmarks, bookmarksB = otherImage.bookmarks; if ( bookmarksA || bookmarksB ) { if ( !bookmarksA || !bookmarksB || bookmarksA.length != bookmarksB.length ) return false; for ( var i = 0 ; i < bookmarksA.length ; i++ ) { var bookmarkA = bookmarksA[ i ], bookmarkB = bookmarksB[ i ]; if ( bookmarkA.startOffset != bookmarkB.startOffset || bookmarkA.endOffset != bookmarkB.endOffset || !CKEDITOR.tools.arrayCompare( bookmarkA.start, bookmarkB.start ) || !CKEDITOR.tools.arrayCompare( bookmarkA.end, bookmarkB.end ) ) { return false; } } } return true; } }; /** * @constructor Main logic for Redo/Undo feature. */ function UndoManager( editor ) { this.editor = editor; // Reset the undo stack. this.reset(); } var editingKeyCodes = { /*Backspace*/ 8:1, /*Delete*/ 46:1 }, modifierKeyCodes = { /*Shift*/ 16:1, /*Ctrl*/ 17:1, /*Alt*/ 18:1 }, navigationKeyCodes = { 37:1, 38:1, 39:1, 40:1 }; // Arrows: L, T, R, B UndoManager.prototype = { /** * Process undo system regard keystrikes. * @param {CKEDITOR.dom.event} event */ type : function( event ) { var keystroke = event && event.data.getKey(), isModifierKey = keystroke in modifierKeyCodes, isEditingKey = keystroke in editingKeyCodes, wasEditingKey = this.lastKeystroke in editingKeyCodes, sameAsLastEditingKey = isEditingKey && keystroke == this.lastKeystroke, // Keystrokes which navigation through contents. isReset = keystroke in navigationKeyCodes, wasReset = this.lastKeystroke in navigationKeyCodes, // Keystrokes which just introduce new contents. isContent = ( !isEditingKey && !isReset ), // Create undo snap for every different modifier key. modifierSnapshot = ( isEditingKey && !sameAsLastEditingKey ), // Create undo snap on the following cases: // 1. Just start to type . // 2. Typing some content after a modifier. // 3. Typing some content after make a visible selection. startedTyping = !( isModifierKey || this.typing ) || ( isContent && ( wasEditingKey || wasReset ) ); if ( startedTyping || modifierSnapshot ) { var beforeTypeImage = new Image( this.editor ), beforeTypeCount = this.snapshots.length; // Use setTimeout, so we give the necessary time to the // browser to insert the character into the DOM. CKEDITOR.tools.setTimeout( function() { var currentSnapshot = this.editor.getSnapshot(); // In IE, we need to remove the expando attributes. if ( CKEDITOR.env.ie ) currentSnapshot = currentSnapshot.replace( /\s+data-cke-expando=".*?"/g, '' ); // If changes have taken place, while not been captured yet (#8459), // compensate the snapshot. if ( beforeTypeImage.contents != currentSnapshot && beforeTypeCount == this.snapshots.length ) { // It's safe to now indicate typing state. this.typing = true; // This's a special save, with specified snapshot // and without auto 'fireChange'. if ( !this.save( false, beforeTypeImage, false ) ) // Drop future snapshots. this.snapshots.splice( this.index + 1, this.snapshots.length - this.index - 1 ); this.hasUndo = true; this.hasRedo = false; this.typesCount = 1; this.modifiersCount = 1; this.onChange(); } }, 0, this ); } this.lastKeystroke = keystroke; // Create undo snap after typed too much (over 25 times). if ( isEditingKey ) { this.typesCount = 0; this.modifiersCount++; if ( this.modifiersCount > 25 ) { this.save( false, null, false ); this.modifiersCount = 1; } } else if ( !isReset ) { this.modifiersCount = 0; this.typesCount++; if ( this.typesCount > 25 ) { this.save( false, null, false ); this.typesCount = 1; } } }, reset : function() // Reset the undo stack. { /** * Remember last pressed key. */ this.lastKeystroke = 0; /** * Stack for all the undo and redo snapshots, they're always created/removed * in consistency. */ this.snapshots = []; /** * Current snapshot history index. */ this.index = -1; this.limit = this.editor.config.undoStackSize || 20; this.currentImage = null; this.hasUndo = false; this.hasRedo = false; this.resetType(); }, /** * Reset all states about typing. * @see UndoManager.type */ resetType : function() { this.typing = false; delete this.lastKeystroke; this.typesCount = 0; this.modifiersCount = 0; }, fireChange : function() { this.hasUndo = !!this.getNextImage( true ); this.hasRedo = !!this.getNextImage( false ); // Reset typing this.resetType(); this.onChange(); }, /** * Save a snapshot of document image for later retrieve. */ save : function( onContentOnly, image, autoFireChange ) { var snapshots = this.snapshots; // Get a content image. if ( !image ) image = new Image( this.editor ); // Do nothing if it was not possible to retrieve an image. if ( image.contents === false ) return false; // Check if this is a duplicate. In such case, do nothing. if ( this.currentImage && image.equals( this.currentImage, onContentOnly ) ) return false; // Drop future snapshots. snapshots.splice( this.index + 1, snapshots.length - this.index - 1 ); // If we have reached the limit, remove the oldest one. if ( snapshots.length == this.limit ) snapshots.shift(); // Add the new image, updating the current index. this.index = snapshots.push( image ) - 1; this.currentImage = image; if ( autoFireChange !== false ) this.fireChange(); return true; }, restoreImage : function( image ) { // Bring editor focused to restore selection. var editor = this.editor, sel; if ( image.bookmarks ) { editor.focus(); // Retrieve the selection beforehand. (#8324) sel = editor.getSelection(); } this.editor.loadSnapshot( image.contents ); if ( image.bookmarks ) sel.selectBookmarks( image.bookmarks ); else if ( CKEDITOR.env.ie ) { // IE BUG: If I don't set the selection to *somewhere* after setting // document contents, then IE would create an empty paragraph at the bottom // the next time the document is modified. var $range = this.editor.document.getBody().$.createTextRange(); $range.collapse( true ); $range.select(); } this.index = image.index; // Update current image with the actual editor // content, since actualy content may differ from // the original snapshot due to dom change. (#4622) this.update(); this.fireChange(); }, // Get the closest available image. getNextImage : function( isUndo ) { var snapshots = this.snapshots, currentImage = this.currentImage, image, i; if ( currentImage ) { if ( isUndo ) { for ( i = this.index - 1 ; i >= 0 ; i-- ) { image = snapshots[ i ]; if ( !currentImage.equals( image, true ) ) { image.index = i; return image; } } } else { for ( i = this.index + 1 ; i < snapshots.length ; i++ ) { image = snapshots[ i ]; if ( !currentImage.equals( image, true ) ) { image.index = i; return image; } } } } return null; }, /** * Check the current redo state. * @return {Boolean} Whether the document has previous state to * retrieve. */ redoable : function() { return this.enabled && this.hasRedo; }, /** * Check the current undo state. * @return {Boolean} Whether the document has future state to restore. */ undoable : function() { return this.enabled && this.hasUndo; }, /** * Perform undo on current index. */ undo : function() { if ( this.undoable() ) { this.save( true ); var image = this.getNextImage( true ); if ( image ) return this.restoreImage( image ), true; } return false; }, /** * Perform redo on current index. */ redo : function() { if ( this.redoable() ) { // Try to save. If no changes have been made, the redo stack // will not change, so it will still be redoable. this.save( true ); // If instead we had changes, we can't redo anymore. if ( this.redoable() ) { var image = this.getNextImage( false ); if ( image ) return this.restoreImage( image ), true; } } return false; }, /** * Update the last snapshot of the undo stack with the current editor content. */ update : function() { this.snapshots.splice( this.index, 1, ( this.currentImage = new Image( this.editor ) ) ); } }; })(); /** * The number of undo steps to be saved. The higher this setting value the more * memory is used for it. * @name CKEDITOR.config.undoStackSize * @type Number * @default 20 * @example * config.undoStackSize = 50; */ /** * Fired when the editor is about to save an undo snapshot. This event can be * fired by plugins and customizations to make the editor saving undo snapshots. * @name CKEDITOR.editor#saveSnapshot * @event */ /** * Fired before an undo image is to be taken. An undo image represents the * editor state at some point. It's saved into an undo store, so the editor is * able to recover the editor state on undo and redo operations. * @name CKEDITOR.editor#beforeUndoImage * @since 3.5.3 * @see CKEDITOR.editor#afterUndoImage * @event */ /** * Fired after an undo image is taken. An undo image represents the * editor state at some point. It's saved into an undo store, so the editor is * able to recover the editor state on undo and redo operations. * @name CKEDITOR.editor#afterUndoImage * @since 3.5.3 * @see CKEDITOR.editor#beforeUndoImage * @event */
10npsite
trunk/guanli/system/ckeditor/_source/plugins/undo/plugin.js
JavaScript
asf20
15,459
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @file Forms Plugin */ CKEDITOR.plugins.add( 'forms', { requires : [ 'dialog' ], init : function( editor ) { var lang = editor.lang; editor.addCss( 'form' + '{' + 'border: 1px dotted #FF0000;' + 'padding: 2px;' + '}\n' ); editor.addCss( 'img.cke_hidden' + '{' + 'background-image: url(' + CKEDITOR.getUrl( this.path + 'images/hiddenfield.gif' ) + ');' + 'background-position: center center;' + 'background-repeat: no-repeat;' + 'border: 1px solid #a9a9a9;' + 'width: 16px !important;' + 'height: 16px !important;' + '}' ); // All buttons use the same code to register. So, to avoid // duplications, let's use this tool function. var addButtonCommand = function( buttonName, commandName, dialogFile ) { editor.addCommand( commandName, new CKEDITOR.dialogCommand( commandName ) ); editor.ui.addButton( buttonName, { label : lang.common[ buttonName.charAt(0).toLowerCase() + buttonName.slice(1) ], command : commandName }); CKEDITOR.dialog.add( commandName, dialogFile ); }; var dialogPath = this.path + 'dialogs/'; addButtonCommand( 'Form', 'form', dialogPath + 'form.js' ); addButtonCommand( 'Checkbox', 'checkbox', dialogPath + 'checkbox.js' ); addButtonCommand( 'Radio', 'radio', dialogPath + 'radio.js' ); addButtonCommand( 'TextField', 'textfield', dialogPath + 'textfield.js' ); addButtonCommand( 'Textarea', 'textarea', dialogPath + 'textarea.js' ); addButtonCommand( 'Select', 'select', dialogPath + 'select.js' ); addButtonCommand( 'Button', 'button', dialogPath + 'button.js' ); addButtonCommand( 'ImageButton', 'imagebutton', CKEDITOR.plugins.getPath('image') + 'dialogs/image.js' ); addButtonCommand( 'HiddenField', 'hiddenfield', dialogPath + 'hiddenfield.js' ); // If the "menu" plugin is loaded, register the menu items. if ( editor.addMenuItems ) { editor.addMenuItems( { form : { label : lang.form.menu, command : 'form', group : 'form' }, checkbox : { label : lang.checkboxAndRadio.checkboxTitle, command : 'checkbox', group : 'checkbox' }, radio : { label : lang.checkboxAndRadio.radioTitle, command : 'radio', group : 'radio' }, textfield : { label : lang.textfield.title, command : 'textfield', group : 'textfield' }, hiddenfield : { label : lang.hidden.title, command : 'hiddenfield', group : 'hiddenfield' }, imagebutton : { label : lang.image.titleButton, command : 'imagebutton', group : 'imagebutton' }, button : { label : lang.button.title, command : 'button', group : 'button' }, select : { label : lang.select.title, command : 'select', group : 'select' }, textarea : { label : lang.textarea.title, command : 'textarea', group : 'textarea' } }); } // If the "contextmenu" plugin is loaded, register the listeners. if ( editor.contextMenu ) { editor.contextMenu.addListener( function( element ) { if ( element && element.hasAscendant( 'form', true ) && !element.isReadOnly() ) return { form : CKEDITOR.TRISTATE_OFF }; }); editor.contextMenu.addListener( function( element ) { if ( element && !element.isReadOnly() ) { var name = element.getName(); if ( name == 'select' ) return { select : CKEDITOR.TRISTATE_OFF }; if ( name == 'textarea' ) return { textarea : CKEDITOR.TRISTATE_OFF }; if ( name == 'input' ) { switch( element.getAttribute( 'type' ) ) { case 'button' : case 'submit' : case 'reset' : return { button : CKEDITOR.TRISTATE_OFF }; case 'checkbox' : return { checkbox : CKEDITOR.TRISTATE_OFF }; case 'radio' : return { radio : CKEDITOR.TRISTATE_OFF }; case 'image' : return { imagebutton : CKEDITOR.TRISTATE_OFF }; default : return { textfield : CKEDITOR.TRISTATE_OFF }; } } if ( name == 'img' && element.data( 'cke-real-element-type' ) == 'hiddenfield' ) return { hiddenfield : CKEDITOR.TRISTATE_OFF }; } }); } editor.on( 'doubleclick', function( evt ) { var element = evt.data.element; if ( element.is( 'form' ) ) evt.data.dialog = 'form'; else if ( element.is( 'select' ) ) evt.data.dialog = 'select'; else if ( element.is( 'textarea' ) ) evt.data.dialog = 'textarea'; else if ( element.is( 'img' ) && element.data( 'cke-real-element-type' ) == 'hiddenfield' ) evt.data.dialog = 'hiddenfield'; else if ( element.is( 'input' ) ) { switch ( element.getAttribute( 'type' ) ) { case 'button' : case 'submit' : case 'reset' : evt.data.dialog = 'button'; break; case 'checkbox' : evt.data.dialog = 'checkbox'; break; case 'radio' : evt.data.dialog = 'radio'; break; case 'image' : evt.data.dialog = 'imagebutton'; break; default : evt.data.dialog = 'textfield'; break; } } }); }, afterInit : function( editor ) { var dataProcessor = editor.dataProcessor, htmlFilter = dataProcessor && dataProcessor.htmlFilter, dataFilter = dataProcessor && dataProcessor.dataFilter; // Cleanup certain IE form elements default values. if ( CKEDITOR.env.ie ) { htmlFilter && htmlFilter.addRules( { elements : { input : function( input ) { var attrs = input.attributes, type = attrs.type; // Old IEs don't provide type for Text inputs #5522 if ( !type ) attrs.type = 'text'; if ( type == 'checkbox' || type == 'radio' ) attrs.value == 'on' && delete attrs.value; } } } ); } if ( dataFilter ) { dataFilter.addRules( { elements : { input : function( element ) { if ( element.attributes.type == 'hidden' ) return editor.createFakeParserElement( element, 'cke_hidden', 'hiddenfield' ); } } } ); } }, requires : [ 'image', 'fakeobjects' ] } ); if ( CKEDITOR.env.ie ) { CKEDITOR.dom.element.prototype.hasAttribute = CKEDITOR.tools.override( CKEDITOR.dom.element.prototype.hasAttribute, function( original ) { return function( name ) { var $attr = this.$.attributes.getNamedItem( name ); if ( this.getName() == 'input' ) { switch ( name ) { case 'class' : return this.$.className.length > 0; case 'checked' : return !!this.$.checked; case 'value' : var type = this.getAttribute( 'type' ); return type == 'checkbox' || type == 'radio' ? this.$.value != 'on' : this.$.value; } } return original.apply( this, arguments ); }; }); }
10npsite
trunk/guanli/system/ckeditor/_source/plugins/forms/plugin.js
JavaScript
asf20
7,465
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.dialog.add( 'select', function( editor ) { // Add a new option to a SELECT object (combo or list). function addOption( combo, optionText, optionValue, documentObject, index ) { combo = getSelect( combo ); var oOption; if ( documentObject ) oOption = documentObject.createElement( "OPTION" ); else oOption = document.createElement( "OPTION" ); if ( combo && oOption && oOption.getName() == 'option' ) { if ( CKEDITOR.env.ie ) { if ( !isNaN( parseInt( index, 10) ) ) combo.$.options.add( oOption.$, index ); else combo.$.options.add( oOption.$ ); oOption.$.innerHTML = optionText.length > 0 ? optionText : ''; oOption.$.value = optionValue; } else { if ( index !== null && index < combo.getChildCount() ) combo.getChild( index < 0 ? 0 : index ).insertBeforeMe( oOption ); else combo.append( oOption ); oOption.setText( optionText.length > 0 ? optionText : '' ); oOption.setValue( optionValue ); } } else return false; return oOption; } // Remove all selected options from a SELECT object. function removeSelectedOptions( combo ) { combo = getSelect( combo ); // Save the selected index var iSelectedIndex = getSelectedIndex( combo ); // Remove all selected options. for ( var i = combo.getChildren().count() - 1 ; i >= 0 ; i-- ) { if ( combo.getChild( i ).$.selected ) combo.getChild( i ).remove(); } // Reset the selection based on the original selected index. setSelectedIndex( combo, iSelectedIndex ); } //Modify option from a SELECT object. function modifyOption( combo, index, title, value ) { combo = getSelect( combo ); if ( index < 0 ) return false; var child = combo.getChild( index ); child.setText( title ); child.setValue( value ); return child; } function removeAllOptions( combo ) { combo = getSelect( combo ); while ( combo.getChild( 0 ) && combo.getChild( 0 ).remove() ) { /*jsl:pass*/ } } // Moves the selected option by a number of steps (also negative). function changeOptionPosition( combo, steps, documentObject ) { combo = getSelect( combo ); var iActualIndex = getSelectedIndex( combo ); if ( iActualIndex < 0 ) return false; var iFinalIndex = iActualIndex + steps; iFinalIndex = ( iFinalIndex < 0 ) ? 0 : iFinalIndex; iFinalIndex = ( iFinalIndex >= combo.getChildCount() ) ? combo.getChildCount() - 1 : iFinalIndex; if ( iActualIndex == iFinalIndex ) return false; var oOption = combo.getChild( iActualIndex ), sText = oOption.getText(), sValue = oOption.getValue(); oOption.remove(); oOption = addOption( combo, sText, sValue, ( !documentObject ) ? null : documentObject, iFinalIndex ); setSelectedIndex( combo, iFinalIndex ); return oOption; } function getSelectedIndex( combo ) { combo = getSelect( combo ); return combo ? combo.$.selectedIndex : -1; } function setSelectedIndex( combo, index ) { combo = getSelect( combo ); if ( index < 0 ) return null; var count = combo.getChildren().count(); combo.$.selectedIndex = ( index >= count ) ? ( count - 1 ) : index; return combo; } function getOptions( combo ) { combo = getSelect( combo ); return combo ? combo.getChildren() : false; } function getSelect( obj ) { if ( obj && obj.domId && obj.getInputElement().$ ) // Dialog element. return obj.getInputElement(); else if ( obj && obj.$ ) return obj; return false; } return { title : editor.lang.select.title, minWidth : CKEDITOR.env.ie ? 460 : 395, minHeight : CKEDITOR.env.ie ? 320 : 300, onShow : function() { delete this.selectBox; this.setupContent( 'clear' ); var element = this.getParentEditor().getSelection().getSelectedElement(); if ( element && element.getName() == "select" ) { this.selectBox = element; this.setupContent( element.getName(), element ); // Load Options into dialog. var objOptions = getOptions( element ); for ( var i = 0 ; i < objOptions.count() ; i++ ) this.setupContent( 'option', objOptions.getItem( i ) ); } }, onOk : function() { var editor = this.getParentEditor(), element = this.selectBox, isInsertMode = !element; if ( isInsertMode ) element = editor.document.createElement( 'select' ); this.commitContent( element ); if ( isInsertMode ) { editor.insertElement( element ); if ( CKEDITOR.env.ie ) { var sel = editor.getSelection(), bms = sel.createBookmarks(); setTimeout(function() { sel.selectBookmarks( bms ); }, 0 ); } } }, contents : [ { id : 'info', label : editor.lang.select.selectInfo, title : editor.lang.select.selectInfo, accessKey : '', elements : [ { id : 'txtName', type : 'text', widths : [ '25%','75%' ], labelLayout : 'horizontal', label : editor.lang.common.name, 'default' : '', accessKey : 'N', style : 'width:350px', setup : function( name, element ) { if ( name == 'clear' ) this.setValue( this[ 'default' ] || '' ); else if ( name == 'select' ) { this.setValue( element.data( 'cke-saved-name' ) || element.getAttribute( 'name' ) || '' ); } }, commit : function( element ) { if ( this.getValue() ) element.data( 'cke-saved-name', this.getValue() ); else { element.data( 'cke-saved-name', false ); element.removeAttribute( 'name' ); } } }, { id : 'txtValue', type : 'text', widths : [ '25%','75%' ], labelLayout : 'horizontal', label : editor.lang.select.value, style : 'width:350px', 'default' : '', className : 'cke_disabled', onLoad : function() { this.getInputElement().setAttribute( 'readOnly', true ); }, setup : function( name, element ) { if ( name == 'clear' ) this.setValue( '' ); else if ( name == 'option' && element.getAttribute( 'selected' ) ) this.setValue( element.$.value ); } }, { type : 'hbox', widths : [ '175px', '170px' ], children : [ { id : 'txtSize', type : 'text', labelLayout : 'horizontal', label : editor.lang.select.size, 'default' : '', accessKey : 'S', style : 'width:175px', validate: function() { var func = CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed ); return ( ( this.getValue() === '' ) || func.apply( this ) ); }, setup : function( name, element ) { if ( name == 'select' ) this.setValue( element.getAttribute( 'size' ) || '' ); if ( CKEDITOR.env.webkit ) this.getInputElement().setStyle( 'width', '86px' ); }, commit : function( element ) { if ( this.getValue() ) element.setAttribute( 'size', this.getValue() ); else element.removeAttribute( 'size' ); } }, { type : 'html', html : '<span>' + CKEDITOR.tools.htmlEncode( editor.lang.select.lines ) + '</span>' } ] }, { type : 'html', html : '<span>' + CKEDITOR.tools.htmlEncode( editor.lang.select.opAvail ) + '</span>' }, { type : 'hbox', widths : [ '115px', '115px' ,'100px' ], children : [ { type : 'vbox', children : [ { id : 'txtOptName', type : 'text', label : editor.lang.select.opText, style : 'width:115px', setup : function( name, element ) { if ( name == 'clear' ) this.setValue( "" ); } }, { type : 'select', id : 'cmbName', label : '', title : '', size : 5, style : 'width:115px;height:75px', items : [], onChange : function() { var dialog = this.getDialog(), values = dialog.getContentElement( 'info', 'cmbValue' ), optName = dialog.getContentElement( 'info', 'txtOptName' ), optValue = dialog.getContentElement( 'info', 'txtOptValue' ), iIndex = getSelectedIndex( this ); setSelectedIndex( values, iIndex ); optName.setValue( this.getValue() ); optValue.setValue( values.getValue() ); }, setup : function( name, element ) { if ( name == 'clear' ) removeAllOptions( this ); else if ( name == 'option' ) addOption( this, element.getText(), element.getText(), this.getDialog().getParentEditor().document ); }, commit : function( element ) { var dialog = this.getDialog(), optionsNames = getOptions( this ), optionsValues = getOptions( dialog.getContentElement( 'info', 'cmbValue' ) ), selectValue = dialog.getContentElement( 'info', 'txtValue' ).getValue(); removeAllOptions( element ); for ( var i = 0 ; i < optionsNames.count() ; i++ ) { var oOption = addOption( element, optionsNames.getItem( i ).getValue(), optionsValues.getItem( i ).getValue(), dialog.getParentEditor().document ); if ( optionsValues.getItem( i ).getValue() == selectValue ) { oOption.setAttribute( 'selected', 'selected' ); oOption.selected = true; } } } } ] }, { type : 'vbox', children : [ { id : 'txtOptValue', type : 'text', label : editor.lang.select.opValue, style : 'width:115px', setup : function( name, element ) { if ( name == 'clear' ) this.setValue( "" ); } }, { type : 'select', id : 'cmbValue', label : '', size : 5, style : 'width:115px;height:75px', items : [], onChange : function() { var dialog = this.getDialog(), names = dialog.getContentElement( 'info', 'cmbName' ), optName = dialog.getContentElement( 'info', 'txtOptName' ), optValue = dialog.getContentElement( 'info', 'txtOptValue' ), iIndex = getSelectedIndex( this ); setSelectedIndex( names, iIndex ); optName.setValue( names.getValue() ); optValue.setValue( this.getValue() ); }, setup : function( name, element ) { if ( name == 'clear' ) removeAllOptions( this ); else if ( name == 'option' ) { var oValue = element.getValue(); addOption( this, oValue, oValue, this.getDialog().getParentEditor().document ); if ( element.getAttribute( 'selected' ) == 'selected' ) this.getDialog().getContentElement( 'info', 'txtValue' ).setValue( oValue ); } } } ] }, { type : 'vbox', padding : 5, children : [ { type : 'button', id : 'btnAdd', style : '', label : editor.lang.select.btnAdd, title : editor.lang.select.btnAdd, style : 'width:100%;', onClick : function() { //Add new option. var dialog = this.getDialog(), parentEditor = dialog.getParentEditor(), optName = dialog.getContentElement( 'info', 'txtOptName' ), optValue = dialog.getContentElement( 'info', 'txtOptValue' ), names = dialog.getContentElement( 'info', 'cmbName' ), values = dialog.getContentElement( 'info', 'cmbValue' ); addOption(names, optName.getValue(), optName.getValue(), dialog.getParentEditor().document ); addOption(values, optValue.getValue(), optValue.getValue(), dialog.getParentEditor().document ); optName.setValue( "" ); optValue.setValue( "" ); } }, { type : 'button', id : 'btnModify', label : editor.lang.select.btnModify, title : editor.lang.select.btnModify, style : 'width:100%;', onClick : function() { //Modify selected option. var dialog = this.getDialog(), optName = dialog.getContentElement( 'info', 'txtOptName' ), optValue = dialog.getContentElement( 'info', 'txtOptValue' ), names = dialog.getContentElement( 'info', 'cmbName' ), values = dialog.getContentElement( 'info', 'cmbValue' ), iIndex = getSelectedIndex( names ); if ( iIndex >= 0 ) { modifyOption( names, iIndex, optName.getValue(), optName.getValue() ); modifyOption( values, iIndex, optValue.getValue(), optValue.getValue() ); } } }, { type : 'button', id : 'btnUp', style : 'width:100%;', label : editor.lang.select.btnUp, title : editor.lang.select.btnUp, onClick : function() { //Move up. var dialog = this.getDialog(), names = dialog.getContentElement( 'info', 'cmbName' ), values = dialog.getContentElement( 'info', 'cmbValue' ); changeOptionPosition( names, -1, dialog.getParentEditor().document ); changeOptionPosition( values, -1, dialog.getParentEditor().document ); } }, { type : 'button', id : 'btnDown', style : 'width:100%;', label : editor.lang.select.btnDown, title : editor.lang.select.btnDown, onClick : function() { //Move down. var dialog = this.getDialog(), names = dialog.getContentElement( 'info', 'cmbName' ), values = dialog.getContentElement( 'info', 'cmbValue' ); changeOptionPosition( names, 1, dialog.getParentEditor().document ); changeOptionPosition( values, 1, dialog.getParentEditor().document ); } } ] } ] }, { type : 'hbox', widths : [ '40%', '20%', '40%' ], children : [ { type : 'button', id : 'btnSetValue', label : editor.lang.select.btnSetValue, title : editor.lang.select.btnSetValue, onClick : function() { //Set as default value. var dialog = this.getDialog(), values = dialog.getContentElement( 'info', 'cmbValue' ), txtValue = dialog.getContentElement( 'info', 'txtValue' ); txtValue.setValue( values.getValue() ); } }, { type : 'button', id : 'btnDelete', label : editor.lang.select.btnDelete, title : editor.lang.select.btnDelete, onClick : function() { // Delete option. var dialog = this.getDialog(), names = dialog.getContentElement( 'info', 'cmbName' ), values = dialog.getContentElement( 'info', 'cmbValue' ), optName = dialog.getContentElement( 'info', 'txtOptName' ), optValue = dialog.getContentElement( 'info', 'txtOptValue' ); removeSelectedOptions( names ); removeSelectedOptions( values ); optName.setValue( "" ); optValue.setValue( "" ); } }, { id : 'chkMulti', type : 'checkbox', label : editor.lang.select.chkMulti, 'default' : '', accessKey : 'M', value : "checked", setup : function( name, element ) { if ( name == 'select' ) this.setValue( element.getAttribute( 'multiple' ) ); if ( CKEDITOR.env.webkit ) this.getElement().getParent().setStyle( 'vertical-align', 'middle' ); }, commit : function( element ) { if ( this.getValue() ) element.setAttribute( 'multiple', this.getValue() ); else element.removeAttribute( 'multiple' ); } } ] } ] } ] }; });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/forms/dialogs/select.js
JavaScript
asf20
17,251
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.dialog.add( 'textfield', function( editor ) { var autoAttributes = { value : 1, size : 1, maxLength : 1 }; var acceptedTypes = { text : 1, password : 1 }; return { title : editor.lang.textfield.title, minWidth : 350, minHeight : 150, onShow : function() { delete this.textField; var element = this.getParentEditor().getSelection().getSelectedElement(); if ( element && element.getName() == "input" && ( acceptedTypes[ element.getAttribute( 'type' ) ] || !element.getAttribute( 'type' ) ) ) { this.textField = element; this.setupContent( element ); } }, onOk : function() { var editor, element = this.textField, isInsertMode = !element; if ( isInsertMode ) { editor = this.getParentEditor(); element = editor.document.createElement( 'input' ); element.setAttribute( 'type', 'text' ); } if ( isInsertMode ) editor.insertElement( element ); this.commitContent( { element : element } ); }, onLoad : function() { var autoSetup = function( element ) { var value = element.hasAttribute( this.id ) && element.getAttribute( this.id ); this.setValue( value || '' ); }; var autoCommit = function( data ) { var element = data.element; var value = this.getValue(); if ( value ) element.setAttribute( this.id, value ); else element.removeAttribute( this.id ); }; this.foreach( function( contentObj ) { if ( autoAttributes[ contentObj.id ] ) { contentObj.setup = autoSetup; contentObj.commit = autoCommit; } } ); }, contents : [ { id : 'info', label : editor.lang.textfield.title, title : editor.lang.textfield.title, elements : [ { type : 'hbox', widths : [ '50%', '50%' ], children : [ { id : '_cke_saved_name', type : 'text', label : editor.lang.textfield.name, 'default' : '', accessKey : 'N', setup : function( element ) { this.setValue( element.data( 'cke-saved-name' ) || element.getAttribute( 'name' ) || '' ); }, commit : function( data ) { var element = data.element; if ( this.getValue() ) element.data( 'cke-saved-name', this.getValue() ); else { element.data( 'cke-saved-name', false ); element.removeAttribute( 'name' ); } } }, { id : 'value', type : 'text', label : editor.lang.textfield.value, 'default' : '', accessKey : 'V' } ] }, { type : 'hbox', widths : [ '50%', '50%' ], children : [ { id : 'size', type : 'text', label : editor.lang.textfield.charWidth, 'default' : '', accessKey : 'C', style : 'width:50px', validate : CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed ) }, { id : 'maxLength', type : 'text', label : editor.lang.textfield.maxChars, 'default' : '', accessKey : 'M', style : 'width:50px', validate : CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed ) } ], onLoad : function() { // Repaint the style for IE7 (#6068) if ( CKEDITOR.env.ie7Compat ) this.getElement().setStyle( 'zoom', '100%' ); } }, { id : 'type', type : 'select', label : editor.lang.textfield.type, 'default' : 'text', accessKey : 'M', items : [ [ editor.lang.textfield.typeText, 'text' ], [ editor.lang.textfield.typePass, 'password' ] ], setup : function( element ) { this.setValue( element.getAttribute( 'type' ) ); }, commit : function( data ) { var element = data.element; if ( CKEDITOR.env.ie ) { var elementType = element.getAttribute( 'type' ); var myType = this.getValue(); if ( elementType != myType ) { var replace = CKEDITOR.dom.element.createFromHtml( '<input type="' + myType + '"></input>', editor.document ); element.copyAttributes( replace, { type : 1 } ); replace.replace( element ); editor.getSelection().selectElement( replace ); data.element = replace; } } else element.setAttribute( 'type', this.getValue() ); } } ] } ] }; });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/forms/dialogs/textfield.js
JavaScript
asf20
4,962
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.dialog.add( 'hiddenfield', function( editor ) { return { title : editor.lang.hidden.title, hiddenField : null, minWidth : 350, minHeight : 110, onShow : function() { delete this.hiddenField; var editor = this.getParentEditor(), selection = editor.getSelection(), element = selection.getSelectedElement(); if ( element && element.data( 'cke-real-element-type' ) && element.data( 'cke-real-element-type' ) == 'hiddenfield' ) { this.hiddenField = element; element = editor.restoreRealElement( this.hiddenField ); this.setupContent( element ); selection.selectElement( this.hiddenField ); } }, onOk : function() { var name = this.getValueOf( 'info', '_cke_saved_name' ), value = this.getValueOf( 'info', 'value' ), editor = this.getParentEditor(), element = CKEDITOR.env.ie && !( CKEDITOR.document.$.documentMode >= 8 ) ? editor.document.createElement( '<input name="' + CKEDITOR.tools.htmlEncode( name ) + '">' ) : editor.document.createElement( 'input' ); element.setAttribute( 'type', 'hidden' ); this.commitContent( element ); var fakeElement = editor.createFakeElement( element, 'cke_hidden', 'hiddenfield' ); if ( !this.hiddenField ) editor.insertElement( fakeElement ); else { fakeElement.replace( this.hiddenField ); editor.getSelection().selectElement( fakeElement ); } return true; }, contents : [ { id : 'info', label : editor.lang.hidden.title, title : editor.lang.hidden.title, elements : [ { id : '_cke_saved_name', type : 'text', label : editor.lang.hidden.name, 'default' : '', accessKey : 'N', setup : function( element ) { this.setValue( element.data( 'cke-saved-name' ) || element.getAttribute( 'name' ) || '' ); }, commit : function( element ) { if ( this.getValue() ) element.setAttribute( 'name', this.getValue() ); else { element.removeAttribute( 'name' ); } } }, { id : 'value', type : 'text', label : editor.lang.hidden.value, 'default' : '', accessKey : 'V', setup : function( element ) { this.setValue( element.getAttribute( 'value' ) || '' ); }, commit : function( element ) { if ( this.getValue() ) element.setAttribute( 'value', this.getValue() ); else element.removeAttribute( 'value' ); } } ] } ] }; });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/forms/dialogs/hiddenfield.js
JavaScript
asf20
2,811
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.dialog.add( 'button', function( editor ) { function commitAttributes( element ) { var val = this.getValue(); if ( val ) { element.attributes[ this.id ] = val; if ( this.id == 'name' ) element.attributes[ 'data-cke-saved-name' ] = val; } else { delete element.attributes[ this.id ]; if ( this.id == 'name' ) delete element.attributes[ 'data-cke-saved-name' ]; } } return { title : editor.lang.button.title, minWidth : 350, minHeight : 150, onShow : function() { delete this.button; var element = this.getParentEditor().getSelection().getSelectedElement(); if ( element && element.is( 'input' ) ) { var type = element.getAttribute( 'type' ); if ( type in { button:1, reset:1, submit:1 } ) { this.button = element; this.setupContent( element ); } } }, onOk : function() { var editor = this.getParentEditor(), element = this.button, isInsertMode = !element; var fake = element ? CKEDITOR.htmlParser.fragment.fromHtml( element.getOuterHtml() ).children[ 0 ] : new CKEDITOR.htmlParser.element( 'input' ); this.commitContent( fake ); var writer = new CKEDITOR.htmlParser.basicWriter(); fake.writeHtml( writer ); var newElement = CKEDITOR.dom.element.createFromHtml( writer.getHtml(), editor.document ); if ( isInsertMode ) editor.insertElement( newElement ); else { newElement.replace( element ); editor.getSelection().selectElement( newElement ); } }, contents : [ { id : 'info', label : editor.lang.button.title, title : editor.lang.button.title, elements : [ { id : 'name', type : 'text', label : editor.lang.common.name, 'default' : '', setup : function( element ) { this.setValue( element.data( 'cke-saved-name' ) || element.getAttribute( 'name' ) || '' ); }, commit : commitAttributes }, { id : 'value', type : 'text', label : editor.lang.button.text, accessKey : 'V', 'default' : '', setup : function( element ) { this.setValue( element.getAttribute( 'value' ) || '' ); }, commit : commitAttributes }, { id : 'type', type : 'select', label : editor.lang.button.type, 'default' : 'button', accessKey : 'T', items : [ [ editor.lang.button.typeBtn, 'button' ], [ editor.lang.button.typeSbm, 'submit' ], [ editor.lang.button.typeRst, 'reset' ] ], setup : function( element ) { this.setValue( element.getAttribute( 'type' ) || '' ); }, commit : commitAttributes } ] } ] }; });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/forms/dialogs/button.js
JavaScript
asf20
3,007
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.dialog.add( 'form', function( editor ) { var autoAttributes = { action : 1, id : 1, method : 1, enctype : 1, target : 1 }; return { title : editor.lang.form.title, minWidth : 350, minHeight : 200, onShow : function() { delete this.form; var element = this.getParentEditor().getSelection().getStartElement(); var form = element && element.getAscendant( 'form', true ); if ( form ) { this.form = form; this.setupContent( form ); } }, onOk : function() { var editor, element = this.form, isInsertMode = !element; if ( isInsertMode ) { editor = this.getParentEditor(); element = editor.document.createElement( 'form' ); !CKEDITOR.env.ie && element.append( editor.document.createElement( 'br' ) ); } if ( isInsertMode ) editor.insertElement( element ); this.commitContent( element ); }, onLoad : function() { function autoSetup( element ) { this.setValue( element.getAttribute( this.id ) || '' ); } function autoCommit( element ) { if ( this.getValue() ) element.setAttribute( this.id, this.getValue() ); else element.removeAttribute( this.id ); } this.foreach( function( contentObj ) { if ( autoAttributes[ contentObj.id ] ) { contentObj.setup = autoSetup; contentObj.commit = autoCommit; } } ); }, contents : [ { id : 'info', label : editor.lang.form.title, title : editor.lang.form.title, elements : [ { id : 'txtName', type : 'text', label : editor.lang.common.name, 'default' : '', accessKey : 'N', setup : function( element ) { this.setValue( element.data( 'cke-saved-name' ) || element.getAttribute( 'name' ) || '' ); }, commit : function( element ) { if ( this.getValue() ) element.data( 'cke-saved-name', this.getValue() ); else { element.data( 'cke-saved-name', false ); element.removeAttribute( 'name' ); } } }, { id : 'action', type : 'text', label : editor.lang.form.action, 'default' : '', accessKey : 'T' }, { type : 'hbox', widths : [ '45%', '55%' ], children : [ { id : 'id', type : 'text', label : editor.lang.common.id, 'default' : '', accessKey : 'I' }, { id : 'enctype', type : 'select', label : editor.lang.form.encoding, style : 'width:100%', accessKey : 'E', 'default' : '', items : [ [ '' ], [ 'text/plain' ], [ 'multipart/form-data' ], [ 'application/x-www-form-urlencoded' ] ] } ] }, { type : 'hbox', widths : [ '45%', '55%' ], children : [ { id : 'target', type : 'select', label : editor.lang.common.target, style : 'width:100%', accessKey : 'M', 'default' : '', items : [ [ editor.lang.common.notSet, '' ], [ editor.lang.common.targetNew, '_blank' ], [ editor.lang.common.targetTop, '_top' ], [ editor.lang.common.targetSelf, '_self' ], [ editor.lang.common.targetParent, '_parent' ] ] }, { id : 'method', type : 'select', label : editor.lang.form.method, accessKey : 'M', 'default' : 'GET', items : [ [ 'GET', 'get' ], [ 'POST', 'post' ] ] } ] } ] } ] }; });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/forms/dialogs/form.js
JavaScript
asf20
4,016
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.dialog.add( 'textarea', function( editor ) { return { title : editor.lang.textarea.title, minWidth : 350, minHeight : 220, onShow : function() { delete this.textarea; var element = this.getParentEditor().getSelection().getSelectedElement(); if ( element && element.getName() == "textarea" ) { this.textarea = element; this.setupContent( element ); } }, onOk : function() { var editor, element = this.textarea, isInsertMode = !element; if ( isInsertMode ) { editor = this.getParentEditor(); element = editor.document.createElement( 'textarea' ); } this.commitContent( element ); if ( isInsertMode ) editor.insertElement( element ); }, contents : [ { id : 'info', label : editor.lang.textarea.title, title : editor.lang.textarea.title, elements : [ { id : '_cke_saved_name', type : 'text', label : editor.lang.common.name, 'default' : '', accessKey : 'N', setup : function( element ) { this.setValue( element.data( 'cke-saved-name' ) || element.getAttribute( 'name' ) || '' ); }, commit : function( element ) { if ( this.getValue() ) element.data( 'cke-saved-name', this.getValue() ); else { element.data( 'cke-saved-name', false ); element.removeAttribute( 'name' ); } } }, { type : 'hbox', widths:['50%','50%'], children:[ { id : 'cols', type : 'text', label : editor.lang.textarea.cols, 'default' : '', accessKey : 'C', style : 'width:50px', validate : CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed ), setup : function( element ) { var value = element.hasAttribute( 'cols' ) && element.getAttribute( 'cols' ); this.setValue( value || '' ); }, commit : function( element ) { if ( this.getValue() ) element.setAttribute( 'cols', this.getValue() ); else element.removeAttribute( 'cols' ); } }, { id : 'rows', type : 'text', label : editor.lang.textarea.rows, 'default' : '', accessKey : 'R', style : 'width:50px', validate : CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed ), setup : function( element ) { var value = element.hasAttribute( 'rows' ) && element.getAttribute( 'rows' ); this.setValue( value || '' ); }, commit : function( element ) { if ( this.getValue() ) element.setAttribute( 'rows', this.getValue() ); else element.removeAttribute( 'rows' ); } } ] }, { id : 'value', type : 'textarea', label : editor.lang.textfield.value, 'default' : '', setup : function( element ) { this.setValue( element.$.defaultValue ); }, commit : function( element ) { element.$.value = element.$.defaultValue = this.getValue() ; } } ] } ] }; });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/forms/dialogs/textarea.js
JavaScript
asf20
3,527
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.dialog.add( 'radio', function( editor ) { return { title : editor.lang.checkboxAndRadio.radioTitle, minWidth : 350, minHeight : 140, onShow : function() { delete this.radioButton; var element = this.getParentEditor().getSelection().getSelectedElement(); if ( element && element.getName() == 'input' && element.getAttribute( 'type' ) == 'radio' ) { this.radioButton = element; this.setupContent( element ); } }, onOk : function() { var editor, element = this.radioButton, isInsertMode = !element; if ( isInsertMode ) { editor = this.getParentEditor(); element = editor.document.createElement( 'input' ); element.setAttribute( 'type', 'radio' ); } if ( isInsertMode ) editor.insertElement( element ); this.commitContent( { element : element } ); }, contents : [ { id : 'info', label : editor.lang.checkboxAndRadio.radioTitle, title : editor.lang.checkboxAndRadio.radioTitle, elements : [ { id : 'name', type : 'text', label : editor.lang.common.name, 'default' : '', accessKey : 'N', setup : function( element ) { this.setValue( element.data( 'cke-saved-name' ) || element.getAttribute( 'name' ) || '' ); }, commit : function( data ) { var element = data.element; if ( this.getValue() ) element.data( 'cke-saved-name', this.getValue() ); else { element.data( 'cke-saved-name', false ); element.removeAttribute( 'name' ); } } }, { id : 'value', type : 'text', label : editor.lang.checkboxAndRadio.value, 'default' : '', accessKey : 'V', setup : function( element ) { this.setValue( element.getAttribute( 'value' ) || '' ); }, commit : function( data ) { var element = data.element; if ( this.getValue() ) element.setAttribute( 'value', this.getValue() ); else element.removeAttribute( 'value' ); } }, { id : 'checked', type : 'checkbox', label : editor.lang.checkboxAndRadio.selected, 'default' : '', accessKey : 'S', value : "checked", setup : function( element ) { this.setValue( element.getAttribute( 'checked' ) ); }, commit : function( data ) { var element = data.element; if ( !( CKEDITOR.env.ie || CKEDITOR.env.opera ) ) { if ( this.getValue() ) element.setAttribute( 'checked', 'checked' ); else element.removeAttribute( 'checked' ); } else { var isElementChecked = element.getAttribute( 'checked' ); var isChecked = !!this.getValue(); if ( isElementChecked != isChecked ) { var replace = CKEDITOR.dom.element.createFromHtml( '<input type="radio"' + ( isChecked ? ' checked="checked"' : '' ) + '></input>', editor.document ); element.copyAttributes( replace, { type : 1, checked : 1 } ); replace.replace( element ); editor.getSelection().selectElement( replace ); data.element = replace; } } } } ] } ] }; });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/forms/dialogs/radio.js
JavaScript
asf20
3,596
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.dialog.add( 'checkbox', function( editor ) { return { title : editor.lang.checkboxAndRadio.checkboxTitle, minWidth : 350, minHeight : 140, onShow : function() { delete this.checkbox; var element = this.getParentEditor().getSelection().getSelectedElement(); if ( element && element.getAttribute( 'type' ) == 'checkbox' ) { this.checkbox = element; this.setupContent( element ); } }, onOk : function() { var editor, element = this.checkbox, isInsertMode = !element; if ( isInsertMode ) { editor = this.getParentEditor(); element = editor.document.createElement( 'input' ); element.setAttribute( 'type', 'checkbox' ); editor.insertElement( element ); } this.commitContent( { element : element } ); }, contents : [ { id : 'info', label : editor.lang.checkboxAndRadio.checkboxTitle, title : editor.lang.checkboxAndRadio.checkboxTitle, startupFocus : 'txtName', elements : [ { id : 'txtName', type : 'text', label : editor.lang.common.name, 'default' : '', accessKey : 'N', setup : function( element ) { this.setValue( element.data( 'cke-saved-name' ) || element.getAttribute( 'name' ) || '' ); }, commit : function( data ) { var element = data.element; // IE failed to update 'name' property on input elements, protect it now. if ( this.getValue() ) element.data( 'cke-saved-name', this.getValue() ); else { element.data( 'cke-saved-name', false ); element.removeAttribute( 'name' ); } } }, { id : 'txtValue', type : 'text', label : editor.lang.checkboxAndRadio.value, 'default' : '', accessKey : 'V', setup : function( element ) { var value = element.getAttribute( 'value' ); // IE Return 'on' as default attr value. this.setValue( CKEDITOR.env.ie && value == 'on' ? '' : value ); }, commit : function( data ) { var element = data.element, value = this.getValue(); if ( value && !( CKEDITOR.env.ie && value == 'on' ) ) element.setAttribute( 'value', value ); else { if ( CKEDITOR.env.ie ) { // Remove attribute 'value' of checkbox (#4721). var checkbox = new CKEDITOR.dom.element( 'input', element.getDocument() ); element.copyAttributes( checkbox, { value: 1 } ); checkbox.replace( element ); editor.getSelection().selectElement( checkbox ); data.element = checkbox; } else element.removeAttribute( 'value' ); } } }, { id : 'cmbSelected', type : 'checkbox', label : editor.lang.checkboxAndRadio.selected, 'default' : '', accessKey : 'S', value : "checked", setup : function( element ) { this.setValue( element.getAttribute( 'checked' ) ); }, commit : function( data ) { var element = data.element; if ( CKEDITOR.env.ie ) { var isElementChecked = !!element.getAttribute( 'checked' ), isChecked = !!this.getValue(); if ( isElementChecked != isChecked ) { var replace = CKEDITOR.dom.element.createFromHtml( '<input type="checkbox"' + ( isChecked ? ' checked="checked"' : '' ) + '/>', editor.document ); element.copyAttributes( replace, { type : 1, checked : 1 } ); replace.replace( element ); editor.getSelection().selectElement( replace ); data.element = replace; } } else { var value = this.getValue(); if ( value ) element.setAttribute( 'checked', 'checked' ); else element.removeAttribute( 'checked' ); } } } ] } ] }; });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/forms/dialogs/checkbox.js
JavaScript
asf20
4,267
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ // Register a plugin named "sample". CKEDITOR.plugins.add( 'keystrokes', { beforeInit : function( editor ) { /** * Controls keystrokes typing in this editor instance. * @name CKEDITOR.editor.prototype.keystrokeHandler * @type CKEDITOR.keystrokeHandler * @example */ editor.keystrokeHandler = new CKEDITOR.keystrokeHandler( editor ); editor.specialKeys = {}; }, init : function( editor ) { var keystrokesConfig = editor.config.keystrokes, blockedConfig = editor.config.blockedKeystrokes; var keystrokes = editor.keystrokeHandler.keystrokes, blockedKeystrokes = editor.keystrokeHandler.blockedKeystrokes; for ( var i = 0 ; i < keystrokesConfig.length ; i++ ) keystrokes[ keystrokesConfig[i][0] ] = keystrokesConfig[i][1]; for ( i = 0 ; i < blockedConfig.length ; i++ ) blockedKeystrokes[ blockedConfig[i] ] = 1; } }); /** * Controls keystrokes typing in an editor instance. * @constructor * @param {CKEDITOR.editor} editor The editor instance. * @example */ CKEDITOR.keystrokeHandler = function( editor ) { if ( editor.keystrokeHandler ) return editor.keystrokeHandler; /** * List of keystrokes associated to commands. Each entry points to the * command to be executed. * @type Object * @example */ this.keystrokes = {}; /** * List of keystrokes that should be blocked if not defined at * {@link keystrokes}. In this way it is possible to block the default * browser behavior for those keystrokes. * @type Object * @example */ this.blockedKeystrokes = {}; this._ = { editor : editor }; return this; }; (function() { var cancel; var onKeyDown = function( event ) { // The DOM event object is passed by the "data" property. event = event.data; var keyCombination = event.getKeystroke(); var command = this.keystrokes[ keyCombination ]; var editor = this._.editor; cancel = ( editor.fire( 'key', { keyCode : keyCombination } ) === true ); if ( !cancel ) { if ( command ) { var data = { from : 'keystrokeHandler' }; cancel = ( editor.execCommand( command, data ) !== false ); } if ( !cancel ) { var handler = editor.specialKeys[ keyCombination ]; cancel = ( handler && handler( editor ) === true ); if ( !cancel ) cancel = !!this.blockedKeystrokes[ keyCombination ]; } } if ( cancel ) event.preventDefault( true ); return !cancel; }; var onKeyPress = function( event ) { if ( cancel ) { cancel = false; event.data.preventDefault( true ); } }; CKEDITOR.keystrokeHandler.prototype = { /** * Attaches this keystroke handle to a DOM object. Keystrokes typed ** over this object will get handled by this keystrokeHandler. * @param {CKEDITOR.dom.domObject} domObject The DOM object to attach * to. * @example */ attach : function( domObject ) { // For most browsers, it is enough to listen to the keydown event // only. domObject.on( 'keydown', onKeyDown, this ); // Some browsers instead, don't cancel key events in the keydown, but in the // keypress. So we must do a longer trip in those cases. if ( CKEDITOR.env.opera || ( CKEDITOR.env.gecko && CKEDITOR.env.mac ) ) domObject.on( 'keypress', onKeyPress, this ); } }; })(); /** * A list of keystrokes to be blocked if not defined in the {@link CKEDITOR.config.keystrokes} * setting. In this way it is possible to block the default browser behavior * for those keystrokes. * @type Array * @default (see example) * @example * // This is actually the default value. * config.blockedKeystrokes = * [ * CKEDITOR.CTRL + 66 &#47;*B*&#47;, * CKEDITOR.CTRL + 73 &#47;*I*&#47;, * CKEDITOR.CTRL + 85 &#47;*U*&#47; * ]; */ CKEDITOR.config.blockedKeystrokes = [ CKEDITOR.CTRL + 66 /*B*/, CKEDITOR.CTRL + 73 /*I*/, CKEDITOR.CTRL + 85 /*U*/ ]; /** * A list associating keystrokes to editor commands. Each element in the list * is an array where the first item is the keystroke, and the second is the * name of the command to be executed. * @type Array * @default (see example) * @example * // This is actually the default value. * config.keystrokes = * [ * [ CKEDITOR.ALT + 121 &#47;*F10*&#47;, 'toolbarFocus' ], * [ CKEDITOR.ALT + 122 &#47;*F11*&#47;, 'elementsPathFocus' ], * * [ CKEDITOR.SHIFT + 121 &#47;*F10*&#47;, 'contextMenu' ], * * [ CKEDITOR.CTRL + 90 &#47;*Z*&#47;, 'undo' ], * [ CKEDITOR.CTRL + 89 &#47;*Y*&#47;, 'redo' ], * [ CKEDITOR.CTRL + CKEDITOR.SHIFT + 90 &#47;*Z*&#47;, 'redo' ], * * [ CKEDITOR.CTRL + 76 &#47;*L*&#47;, 'link' ], * * [ CKEDITOR.CTRL + 66 &#47;*B*&#47;, 'bold' ], * [ CKEDITOR.CTRL + 73 &#47;*I*&#47;, 'italic' ], * [ CKEDITOR.CTRL + 85 &#47;*U*&#47;, 'underline' ], * * [ CKEDITOR.ALT + 109 &#47;*-*&#47;, 'toolbarCollapse' ] * ]; */ CKEDITOR.config.keystrokes = [ [ CKEDITOR.ALT + 121 /*F10*/, 'toolbarFocus' ], [ CKEDITOR.ALT + 122 /*F11*/, 'elementsPathFocus' ], [ CKEDITOR.SHIFT + 121 /*F10*/, 'contextMenu' ], [ CKEDITOR.CTRL + CKEDITOR.SHIFT + 121 /*F10*/, 'contextMenu' ], [ CKEDITOR.CTRL + 90 /*Z*/, 'undo' ], [ CKEDITOR.CTRL + 89 /*Y*/, 'redo' ], [ CKEDITOR.CTRL + CKEDITOR.SHIFT + 90 /*Z*/, 'redo' ], [ CKEDITOR.CTRL + 76 /*L*/, 'link' ], [ CKEDITOR.CTRL + 66 /*B*/, 'bold' ], [ CKEDITOR.CTRL + 73 /*I*/, 'italic' ], [ CKEDITOR.CTRL + 85 /*U*/, 'underline' ], [ CKEDITOR.ALT + ( CKEDITOR.env.ie || CKEDITOR.env.webkit ? 189 : 109 ) /*-*/, 'toolbarCollapse' ], [ CKEDITOR.ALT + 48 /*0*/, 'a11yHelp' ] ]; /** * Fired when any keyboard key (or combination) is pressed into the editing area. * @name CKEDITOR.editor#key * @event * @param {Number} data.keyCode A number representing the key code (or * combination). It is the sum of the current key code and the * {@link CKEDITOR.CTRL}, {@link CKEDITOR.SHIFT} and {@link CKEDITOR.ALT} * constants, if those are pressed. */
10npsite
trunk/guanli/system/ckeditor/_source/plugins/keystrokes/plugin.js
JavaScript
asf20
6,299
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @file DOM iterator, which iterates over list items, lines and paragraphs. */ CKEDITOR.plugins.add( 'domiterator' ); (function() { /** * @name CKEDITOR.dom.iterator */ function iterator( range ) { if ( arguments.length < 1 ) return; this.range = range; this.forceBrBreak = 0; // Whether include <br>s into the enlarged range.(#3730). this.enlargeBr = 1; this.enforceRealBlocks = 0; this._ || ( this._ = {} ); } var beginWhitespaceRegex = /^[\r\n\t ]+$/, // Ignore bookmark nodes.(#3783) bookmarkGuard = CKEDITOR.dom.walker.bookmark( false, true ), whitespacesGuard = CKEDITOR.dom.walker.whitespaces( true ), skipGuard = function( node ) { return bookmarkGuard( node ) && whitespacesGuard( node ); }; // Get a reference for the next element, bookmark nodes are skipped. function getNextSourceNode( node, startFromSibling, lastNode ) { var next = node.getNextSourceNode( startFromSibling, null, lastNode ); while ( !bookmarkGuard( next ) ) next = next.getNextSourceNode( startFromSibling, null, lastNode ); return next; } iterator.prototype = { getNextParagraph : function( blockTag ) { // The block element to be returned. var block; // The range object used to identify the paragraph contents. var range; // Indicats that the current element in the loop is the last one. var isLast; // Indicate at least one of the range boundaries is inside a preformat block. var touchPre; // Instructs to cleanup remaining BRs. var removePreviousBr, removeLastBr; // This is the first iteration. Let's initialize it. if ( !this._.started ) { range = this.range.clone(); // Shrink the range to exclude harmful "noises" (#4087, #4450, #5435). range.shrink( CKEDITOR.NODE_ELEMENT, true ); touchPre = range.endContainer.hasAscendant( 'pre', true ) || range.startContainer.hasAscendant( 'pre', true ); range.enlarge( this.forceBrBreak && !touchPre || !this.enlargeBr ? CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS : CKEDITOR.ENLARGE_BLOCK_CONTENTS ); if ( !range.collapsed ) { var walker = new CKEDITOR.dom.walker( range.clone() ), ignoreBookmarkTextEvaluator = CKEDITOR.dom.walker.bookmark( true, true ); // Avoid anchor inside bookmark inner text. walker.evaluator = ignoreBookmarkTextEvaluator; this._.nextNode = walker.next(); // TODO: It's better to have walker.reset() used here. walker = new CKEDITOR.dom.walker( range.clone() ); walker.evaluator = ignoreBookmarkTextEvaluator; var lastNode = walker.previous(); this._.lastNode = lastNode.getNextSourceNode( true ); // We may have an empty text node at the end of block due to [3770]. // If that node is the lastNode, it would cause our logic to leak to the // next block.(#3887) if ( this._.lastNode && this._.lastNode.type == CKEDITOR.NODE_TEXT && !CKEDITOR.tools.trim( this._.lastNode.getText() ) && this._.lastNode.getParent().isBlockBoundary() ) { var testRange = new CKEDITOR.dom.range( range.document ); testRange.moveToPosition( this._.lastNode, CKEDITOR.POSITION_AFTER_END ); if ( testRange.checkEndOfBlock() ) { var path = new CKEDITOR.dom.elementPath( testRange.endContainer ); var lastBlock = path.block || path.blockLimit; this._.lastNode = lastBlock.getNextSourceNode( true ); } } // Probably the document end is reached, we need a marker node. if ( !this._.lastNode ) { this._.lastNode = this._.docEndMarker = range.document.createText( '' ); this._.lastNode.insertAfter( lastNode ); } // Let's reuse this variable. range = null; } this._.started = 1; } var currentNode = this._.nextNode; lastNode = this._.lastNode; this._.nextNode = null; while ( currentNode ) { // closeRange indicates that a paragraph boundary has been found, // so the range can be closed. var closeRange = 0, parentPre = currentNode.hasAscendant( 'pre' ); // includeNode indicates that the current node is good to be part // of the range. By default, any non-element node is ok for it. var includeNode = ( currentNode.type != CKEDITOR.NODE_ELEMENT ), continueFromSibling = 0; // If it is an element node, let's check if it can be part of the // range. if ( !includeNode ) { var nodeName = currentNode.getName(); if ( currentNode.isBlockBoundary( this.forceBrBreak && !parentPre && { br : 1 } ) ) { // <br> boundaries must be part of the range. It will // happen only if ForceBrBreak. if ( nodeName == 'br' ) includeNode = 1; else if ( !range && !currentNode.getChildCount() && nodeName != 'hr' ) { // If we have found an empty block, and haven't started // the range yet, it means we must return this block. block = currentNode; isLast = currentNode.equals( lastNode ); break; } // The range must finish right before the boundary, // including possibly skipped empty spaces. (#1603) if ( range ) { range.setEndAt( currentNode, CKEDITOR.POSITION_BEFORE_START ); // The found boundary must be set as the next one at this // point. (#1717) if ( nodeName != 'br' ) this._.nextNode = currentNode; } closeRange = 1; } else { // If we have child nodes, let's check them. if ( currentNode.getFirst() ) { // If we don't have a range yet, let's start it. if ( !range ) { range = new CKEDITOR.dom.range( this.range.document ); range.setStartAt( currentNode, CKEDITOR.POSITION_BEFORE_START ); } currentNode = currentNode.getFirst(); continue; } includeNode = 1; } } else if ( currentNode.type == CKEDITOR.NODE_TEXT ) { // Ignore normal whitespaces (i.e. not including &nbsp; or // other unicode whitespaces) before/after a block node. if ( beginWhitespaceRegex.test( currentNode.getText() ) ) includeNode = 0; } // The current node is good to be part of the range and we are // starting a new range, initialize it first. if ( includeNode && !range ) { range = new CKEDITOR.dom.range( this.range.document ); range.setStartAt( currentNode, CKEDITOR.POSITION_BEFORE_START ); } // The last node has been found. isLast = ( ( !closeRange || includeNode ) && currentNode.equals( lastNode ) ); // If we are in an element boundary, let's check if it is time // to close the range, otherwise we include the parent within it. if ( range && !closeRange ) { while ( !currentNode.getNext( skipGuard ) && !isLast ) { var parentNode = currentNode.getParent(); if ( parentNode.isBlockBoundary( this.forceBrBreak && !parentPre && { br : 1 } ) ) { closeRange = 1; includeNode = 0; isLast = isLast || ( parentNode.equals( lastNode) ); // Make sure range includes bookmarks at the end of the block. (#7359) range.setEndAt( parentNode, CKEDITOR.POSITION_BEFORE_END ); break; } currentNode = parentNode; includeNode = 1; isLast = ( currentNode.equals( lastNode ) ); continueFromSibling = 1; } } // Now finally include the node. if ( includeNode ) range.setEndAt( currentNode, CKEDITOR.POSITION_AFTER_END ); currentNode = getNextSourceNode ( currentNode, continueFromSibling, lastNode ); isLast = !currentNode; // We have found a block boundary. Let's close the range and move out of the // loop. if ( isLast || ( closeRange && range ) ) break; } // Now, based on the processed range, look for (or create) the block to be returned. if ( !block ) { // If no range has been found, this is the end. if ( !range ) { this._.docEndMarker && this._.docEndMarker.remove(); this._.nextNode = null; return null; } var startPath = new CKEDITOR.dom.elementPath( range.startContainer ); var startBlockLimit = startPath.blockLimit, checkLimits = { div : 1, th : 1, td : 1 }; block = startPath.block; if ( !block && !this.enforceRealBlocks && checkLimits[ startBlockLimit.getName() ] && range.checkStartOfBlock() && range.checkEndOfBlock() ) block = startBlockLimit; else if ( !block || ( this.enforceRealBlocks && block.getName() == 'li' ) ) { // Create the fixed block. block = this.range.document.createElement( blockTag || 'p' ); // Move the contents of the temporary range to the fixed block. range.extractContents().appendTo( block ); block.trim(); // Insert the fixed block into the DOM. range.insertNode( block ); removePreviousBr = removeLastBr = true; } else if ( block.getName() != 'li' ) { // If the range doesn't includes the entire contents of the // block, we must split it, isolating the range in a dedicated // block. if ( !range.checkStartOfBlock() || !range.checkEndOfBlock() ) { // The resulting block will be a clone of the current one. block = block.clone( false ); // Extract the range contents, moving it to the new block. range.extractContents().appendTo( block ); block.trim(); // Split the block. At this point, the range will be in the // right position for our intents. var splitInfo = range.splitBlock(); removePreviousBr = !splitInfo.wasStartOfBlock; removeLastBr = !splitInfo.wasEndOfBlock; // Insert the new block into the DOM. range.insertNode( block ); } } else if ( !isLast ) { // LIs are returned as is, with all their children (due to the // nested lists). But, the next node is the node right after // the current range, which could be an <li> child (nested // lists) or the next sibling <li>. this._.nextNode = ( block.equals( lastNode ) ? null : getNextSourceNode( range.getBoundaryNodes().endNode, 1, lastNode ) ); } } if ( removePreviousBr ) { var previousSibling = block.getPrevious(); if ( previousSibling && previousSibling.type == CKEDITOR.NODE_ELEMENT ) { if ( previousSibling.getName() == 'br' ) previousSibling.remove(); else if ( previousSibling.getLast() && previousSibling.getLast().$.nodeName.toLowerCase() == 'br' ) previousSibling.getLast().remove(); } } if ( removeLastBr ) { var lastChild = block.getLast(); if ( lastChild && lastChild.type == CKEDITOR.NODE_ELEMENT && lastChild.getName() == 'br' ) { // Take care not to remove the block expanding <br> in non-IE browsers. if ( CKEDITOR.env.ie || lastChild.getPrevious( bookmarkGuard ) || lastChild.getNext( bookmarkGuard ) ) lastChild.remove(); } } // Get a reference for the next element. This is important because the // above block can be removed or changed, so we can rely on it for the // next interation. if ( !this._.nextNode ) { this._.nextNode = ( isLast || block.equals( lastNode ) || !lastNode ) ? null : getNextSourceNode( block, 1, lastNode ); } return block; } }; CKEDITOR.dom.range.prototype.createIterator = function() { return new iterator( this ); }; })();
10npsite
trunk/guanli/system/ckeditor/_source/plugins/domiterator/plugin.js
JavaScript
asf20
12,003
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.add( 'table', { requires : [ 'dialog' ], init : function( editor ) { var table = CKEDITOR.plugins.table, lang = editor.lang.table; editor.addCommand( 'table', new CKEDITOR.dialogCommand( 'table' ) ); editor.addCommand( 'tableProperties', new CKEDITOR.dialogCommand( 'tableProperties' ) ); editor.ui.addButton( 'Table', { label : lang.toolbar, command : 'table' }); CKEDITOR.dialog.add( 'table', this.path + 'dialogs/table.js' ); CKEDITOR.dialog.add( 'tableProperties', this.path + 'dialogs/table.js' ); // If the "menu" plugin is loaded, register the menu items. if ( editor.addMenuItems ) { editor.addMenuItems( { table : { label : lang.menu, command : 'tableProperties', group : 'table', order : 5 }, tabledelete : { label : lang.deleteTable, command : 'tableDelete', group : 'table', order : 1 } } ); } editor.on( 'doubleclick', function( evt ) { var element = evt.data.element; if ( element.is( 'table' ) ) evt.data.dialog = 'tableProperties'; }); // If the "contextmenu" plugin is loaded, register the listeners. if ( editor.contextMenu ) { editor.contextMenu.addListener( function( element, selection ) { if ( !element || element.isReadOnly() ) return null; var isTable = element.hasAscendant( 'table', 1 ); if ( isTable ) { return { tabledelete : CKEDITOR.TRISTATE_OFF, table : CKEDITOR.TRISTATE_OFF }; } return null; } ); } } } );
10npsite
trunk/guanli/system/ckeditor/_source/plugins/table/plugin.js
JavaScript
asf20
1,827
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function() { var defaultToPixel = CKEDITOR.tools.cssLength; var commitValue = function( data ) { var id = this.id; if ( !data.info ) data.info = {}; data.info[id] = this.getValue(); }; function tableColumns( table ) { var cols = 0, maxCols = 0; for ( var i = 0, row, rows = table.$.rows.length; i < rows; i++ ) { row = table.$.rows[ i ], cols = 0; for ( var j = 0, cell, cells = row.cells.length; j < cells; j++ ) { cell = row.cells[ j ]; cols += cell.colSpan; } cols > maxCols && ( maxCols = cols ); } return maxCols; } // Whole-positive-integer validator. function validatorNum( msg ) { return function() { var value = this.getValue(), pass = !!( CKEDITOR.dialog.validate.integer()( value ) && value > 0 ); if ( !pass ) { alert( msg ); this.select(); } return pass; }; } function tableDialog( editor, command ) { var makeElement = function( name ) { return new CKEDITOR.dom.element( name, editor.document ); }; var dialogadvtab = editor.plugins.dialogadvtab; return { title : editor.lang.table.title, minWidth : 310, minHeight : CKEDITOR.env.ie ? 310 : 280, onLoad : function() { var dialog = this; var styles = dialog.getContentElement( 'advanced', 'advStyles' ); if ( styles ) { styles.on( 'change', function( evt ) { // Synchronize width value. var width = this.getStyle( 'width', '' ), txtWidth = dialog.getContentElement( 'info', 'txtWidth' ); txtWidth && txtWidth.setValue( width, true ); // Synchronize height value. var height = this.getStyle( 'height', '' ), txtHeight = dialog.getContentElement( 'info', 'txtHeight' ); txtHeight && txtHeight.setValue( height, true ); }); } }, onShow : function() { // Detect if there's a selected table. var selection = editor.getSelection(), ranges = selection.getRanges(), selectedTable = null; var rowsInput = this.getContentElement( 'info', 'txtRows' ), colsInput = this.getContentElement( 'info', 'txtCols' ), widthInput = this.getContentElement( 'info', 'txtWidth' ), heightInput = this.getContentElement( 'info', 'txtHeight' ); if ( command == 'tableProperties' ) { if ( ( selectedTable = selection.getSelectedElement() ) ) selectedTable = selectedTable.getAscendant( 'table', true ); else if ( ranges.length > 0 ) { // Webkit could report the following range on cell selection (#4948): // <table><tr><td>[&nbsp;</td></tr></table>] if ( CKEDITOR.env.webkit ) ranges[ 0 ].shrink( CKEDITOR.NODE_ELEMENT ); var rangeRoot = ranges[0].getCommonAncestor( true ); selectedTable = rangeRoot.getAscendant( 'table', true ); } // Save a reference to the selected table, and push a new set of default values. this._.selectedElement = selectedTable; } // Enable or disable the row, cols, width fields. if ( selectedTable ) { this.setupContent( selectedTable ); rowsInput && rowsInput.disable(); colsInput && colsInput.disable(); } else { rowsInput && rowsInput.enable(); colsInput && colsInput.enable(); } // Call the onChange method for the widht and height fields so // they get reflected into the Advanced tab. widthInput && widthInput.onChange(); heightInput && heightInput.onChange(); }, onOk : function() { var selection = editor.getSelection(), bms = this._.selectedElement && selection.createBookmarks(); var table = this._.selectedElement || makeElement( 'table' ), me = this, data = {}; this.commitContent( data, table ); if ( data.info ) { var info = data.info; // Generate the rows and cols. if ( !this._.selectedElement ) { var tbody = table.append( makeElement( 'tbody' ) ), rows = parseInt( info.txtRows, 10 ) || 0, cols = parseInt( info.txtCols, 10 ) || 0; for ( var i = 0 ; i < rows ; i++ ) { var row = tbody.append( makeElement( 'tr' ) ); for ( var j = 0 ; j < cols ; j++ ) { var cell = row.append( makeElement( 'td' ) ); if ( !CKEDITOR.env.ie ) cell.append( makeElement( 'br' ) ); } } } // Modify the table headers. Depends on having rows and cols generated // correctly so it can't be done in commit functions. // Should we make a <thead>? var headers = info.selHeaders; if ( !table.$.tHead && ( headers == 'row' || headers == 'both' ) ) { var thead = new CKEDITOR.dom.element( table.$.createTHead() ); tbody = table.getElementsByTag( 'tbody' ).getItem( 0 ); var theRow = tbody.getElementsByTag( 'tr' ).getItem( 0 ); // Change TD to TH: for ( i = 0 ; i < theRow.getChildCount() ; i++ ) { var th = theRow.getChild( i ); // Skip bookmark nodes. (#6155) if ( th.type == CKEDITOR.NODE_ELEMENT && !th.data( 'cke-bookmark' ) ) { th.renameNode( 'th' ); th.setAttribute( 'scope', 'col' ); } } thead.append( theRow.remove() ); } if ( table.$.tHead !== null && !( headers == 'row' || headers == 'both' ) ) { // Move the row out of the THead and put it in the TBody: thead = new CKEDITOR.dom.element( table.$.tHead ); tbody = table.getElementsByTag( 'tbody' ).getItem( 0 ); var previousFirstRow = tbody.getFirst(); while ( thead.getChildCount() > 0 ) { theRow = thead.getFirst(); for ( i = 0; i < theRow.getChildCount() ; i++ ) { var newCell = theRow.getChild( i ); if ( newCell.type == CKEDITOR.NODE_ELEMENT ) { newCell.renameNode( 'td' ); newCell.removeAttribute( 'scope' ); } } theRow.insertBefore( previousFirstRow ); } thead.remove(); } // Should we make all first cells in a row TH? if ( !this.hasColumnHeaders && ( headers == 'col' || headers == 'both' ) ) { for ( row = 0 ; row < table.$.rows.length ; row++ ) { newCell = new CKEDITOR.dom.element( table.$.rows[ row ].cells[ 0 ] ); newCell.renameNode( 'th' ); newCell.setAttribute( 'scope', 'row' ); } } // Should we make all first TH-cells in a row make TD? If 'yes' we do it the other way round :-) if ( ( this.hasColumnHeaders ) && !( headers == 'col' || headers == 'both' ) ) { for ( i = 0 ; i < table.$.rows.length ; i++ ) { row = new CKEDITOR.dom.element( table.$.rows[i] ); if ( row.getParent().getName() == 'tbody' ) { newCell = new CKEDITOR.dom.element( row.$.cells[0] ); newCell.renameNode( 'td' ); newCell.removeAttribute( 'scope' ); } } } // Set the width and height. info.txtHeight ? table.setStyle( 'height', info.txtHeight ) : table.removeStyle( 'height' ); info.txtWidth ? table.setStyle( 'width', info.txtWidth ) : table.removeStyle( 'width' ); if ( !table.getAttribute( 'style' ) ) table.removeAttribute( 'style' ); } // Insert the table element if we're creating one. if ( !this._.selectedElement ) { editor.insertElement( table ); // Override the default cursor position after insertElement to place // cursor inside the first cell (#7959), IE needs a while. setTimeout( function() { var firstCell = new CKEDITOR.dom.element( table.$.rows[ 0 ].cells[ 0 ] ); var range = new CKEDITOR.dom.range( editor.document ); range.moveToPosition( firstCell, CKEDITOR.POSITION_AFTER_START ); range.select( 1 ); }, 0 ); } // Properly restore the selection, (#4822) but don't break // because of this, e.g. updated table caption. else try { selection.selectBookmarks( bms ); } catch( er ){} }, contents : [ { id : 'info', label : editor.lang.table.title, elements : [ { type : 'hbox', widths : [ null, null ], styles : [ 'vertical-align:top' ], children : [ { type : 'vbox', padding : 0, children : [ { type : 'text', id : 'txtRows', 'default' : 3, label : editor.lang.table.rows, required : true, controlStyle : 'width:5em', validate : validatorNum( editor.lang.table.invalidRows ), setup : function( selectedElement ) { this.setValue( selectedElement.$.rows.length ); }, commit : commitValue }, { type : 'text', id : 'txtCols', 'default' : 2, label : editor.lang.table.columns, required : true, controlStyle : 'width:5em', validate : validatorNum( editor.lang.table.invalidCols ), setup : function( selectedTable ) { this.setValue( tableColumns( selectedTable ) ); }, commit : commitValue }, { type : 'html', html : '&nbsp;' }, { type : 'select', id : 'selHeaders', 'default' : '', label : editor.lang.table.headers, items : [ [ editor.lang.table.headersNone, '' ], [ editor.lang.table.headersRow, 'row' ], [ editor.lang.table.headersColumn, 'col' ], [ editor.lang.table.headersBoth, 'both' ] ], setup : function( selectedTable ) { // Fill in the headers field. var dialog = this.getDialog(); dialog.hasColumnHeaders = true; // Check if all the first cells in every row are TH for ( var row = 0 ; row < selectedTable.$.rows.length ; row++ ) { // If just one cell isn't a TH then it isn't a header column var headCell = selectedTable.$.rows[row].cells[0]; if ( headCell && headCell.nodeName.toLowerCase() != 'th' ) { dialog.hasColumnHeaders = false; break; } } // Check if the table contains <thead>. if ( ( selectedTable.$.tHead !== null) ) this.setValue( dialog.hasColumnHeaders ? 'both' : 'row' ); else this.setValue( dialog.hasColumnHeaders ? 'col' : '' ); }, commit : commitValue }, { type : 'text', id : 'txtBorder', 'default' : 1, label : editor.lang.table.border, controlStyle : 'width:3em', validate : CKEDITOR.dialog.validate['number']( editor.lang.table.invalidBorder ), setup : function( selectedTable ) { this.setValue( selectedTable.getAttribute( 'border' ) || '' ); }, commit : function( data, selectedTable ) { if ( this.getValue() ) selectedTable.setAttribute( 'border', this.getValue() ); else selectedTable.removeAttribute( 'border' ); } }, { id : 'cmbAlign', type : 'select', 'default' : '', label : editor.lang.common.align, items : [ [ editor.lang.common.notSet , ''], [ editor.lang.common.alignLeft , 'left'], [ editor.lang.common.alignCenter , 'center'], [ editor.lang.common.alignRight , 'right'] ], setup : function( selectedTable ) { this.setValue( selectedTable.getAttribute( 'align' ) || '' ); }, commit : function( data, selectedTable ) { if ( this.getValue() ) selectedTable.setAttribute( 'align', this.getValue() ); else selectedTable.removeAttribute( 'align' ); } } ] }, { type : 'vbox', padding : 0, children : [ { type : 'hbox', widths : [ '5em' ], children : [ { type : 'text', id : 'txtWidth', controlStyle : 'width:5em', label : editor.lang.common.width, title : editor.lang.common.cssLengthTooltip, 'default' : 500, getValue : defaultToPixel, validate : CKEDITOR.dialog.validate.cssLength( editor.lang.common.invalidCssLength.replace( '%1', editor.lang.common.width ) ), onChange : function() { var styles = this.getDialog().getContentElement( 'advanced', 'advStyles' ); styles && styles.updateStyle( 'width', this.getValue() ); }, setup : function( selectedTable ) { var val = selectedTable.getStyle( 'width' ); val && this.setValue( val ); }, commit : commitValue } ] }, { type : 'hbox', widths : [ '5em' ], children : [ { type : 'text', id : 'txtHeight', controlStyle : 'width:5em', label : editor.lang.common.height, title : editor.lang.common.cssLengthTooltip, 'default' : '', getValue : defaultToPixel, validate : CKEDITOR.dialog.validate.cssLength( editor.lang.common.invalidCssLength.replace( '%1', editor.lang.common.height ) ), onChange : function() { var styles = this.getDialog().getContentElement( 'advanced', 'advStyles' ); styles && styles.updateStyle( 'height', this.getValue() ); }, setup : function( selectedTable ) { var val = selectedTable.getStyle( 'height' ); val && this.setValue( val ); }, commit : commitValue } ] }, { type : 'html', html : '&nbsp;' }, { type : 'text', id : 'txtCellSpace', controlStyle : 'width:3em', label : editor.lang.table.cellSpace, 'default' : 1, validate : CKEDITOR.dialog.validate.number( editor.lang.table.invalidCellSpacing ), setup : function( selectedTable ) { this.setValue( selectedTable.getAttribute( 'cellSpacing' ) || '' ); }, commit : function( data, selectedTable ) { if ( this.getValue() ) selectedTable.setAttribute( 'cellSpacing', this.getValue() ); else selectedTable.removeAttribute( 'cellSpacing' ); } }, { type : 'text', id : 'txtCellPad', controlStyle : 'width:3em', label : editor.lang.table.cellPad, 'default' : 1, validate : CKEDITOR.dialog.validate.number( editor.lang.table.invalidCellPadding ), setup : function( selectedTable ) { this.setValue( selectedTable.getAttribute( 'cellPadding' ) || '' ); }, commit : function( data, selectedTable ) { if ( this.getValue() ) selectedTable.setAttribute( 'cellPadding', this.getValue() ); else selectedTable.removeAttribute( 'cellPadding' ); } } ] } ] }, { type : 'html', align : 'right', html : '' }, { type : 'vbox', padding : 0, children : [ { type : 'text', id : 'txtCaption', label : editor.lang.table.caption, setup : function( selectedTable ) { this.enable(); var nodeList = selectedTable.getElementsByTag( 'caption' ); if ( nodeList.count() > 0 ) { var caption = nodeList.getItem( 0 ); var firstElementChild = caption.getFirst( CKEDITOR.dom.walker.nodeType( CKEDITOR.NODE_ELEMENT ) ); if ( firstElementChild && !firstElementChild.equals( caption.getBogus() ) ) { this.disable(); this.setValue( caption.getText() ); return; } caption = CKEDITOR.tools.trim( caption.getText() ); this.setValue( caption ); } }, commit : function( data, table ) { if ( !this.isEnabled() ) return; var caption = this.getValue(), captionElement = table.getElementsByTag( 'caption' ); if ( caption ) { if ( captionElement.count() > 0 ) { captionElement = captionElement.getItem( 0 ); captionElement.setHtml( '' ); } else { captionElement = new CKEDITOR.dom.element( 'caption', editor.document ); if ( table.getChildCount() ) captionElement.insertBefore( table.getFirst() ); else captionElement.appendTo( table ); } captionElement.append( new CKEDITOR.dom.text( caption, editor.document ) ); } else if ( captionElement.count() > 0 ) { for ( var i = captionElement.count() - 1 ; i >= 0 ; i-- ) captionElement.getItem( i ).remove(); } } }, { type : 'text', id : 'txtSummary', label : editor.lang.table.summary, setup : function( selectedTable ) { this.setValue( selectedTable.getAttribute( 'summary' ) || '' ); }, commit : function( data, selectedTable ) { if ( this.getValue() ) selectedTable.setAttribute( 'summary', this.getValue() ); else selectedTable.removeAttribute( 'summary' ); } } ] } ] }, dialogadvtab && dialogadvtab.createAdvancedTab( editor ) ] }; } CKEDITOR.dialog.add( 'table', function( editor ) { return tableDialog( editor, 'table' ); } ); CKEDITOR.dialog.add( 'tableProperties', function( editor ) { return tableDialog( editor, 'tableProperties' ); } ); })();
10npsite
trunk/guanli/system/ckeditor/_source/plugins/table/dialogs/table.js
JavaScript
asf20
19,424
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @file Horizontal Page Break */ // Register a plugin named "newpage". CKEDITOR.plugins.add( 'newpage', { init : function( editor ) { editor.addCommand( 'newpage', { modes : { wysiwyg:1, source:1 }, exec : function( editor ) { var command = this; editor.setData( editor.config.newpage_html || '', function() { // Save the undo snapshot after all document changes are affected. (#4889) setTimeout( function () { editor.fire( 'afterCommandExec', { name: 'newpage', command: command } ); editor.selectionChange(); }, 200 ); } ); editor.focus(); }, async : true }); editor.ui.addButton( 'NewPage', { label : editor.lang.newPage, command : 'newpage' }); } }); /** * The HTML to load in the editor when the "new page" command is executed. * @name CKEDITOR.config.newpage_html * @type String * @default '' * @example * config.newpage_html = '&lt;p&gt;Type your text here.&lt;/p&gt;'; */
10npsite
trunk/guanli/system/ckeditor/_source/plugins/newpage/plugin.js
JavaScript
asf20
1,241
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.add( 'format', { requires : [ 'richcombo', 'styles' ], init : function( editor ) { var config = editor.config, lang = editor.lang.format; // Gets the list of tags from the settings. var tags = config.format_tags.split( ';' ); // Create style objects for all defined styles. var styles = {}; for ( var i = 0 ; i < tags.length ; i++ ) { var tag = tags[ i ]; styles[ tag ] = new CKEDITOR.style( config[ 'format_' + tag ] ); styles[ tag ]._.enterMode = editor.config.enterMode; } editor.ui.addRichCombo( 'Format', { label : lang.label, title : lang.panelTitle, className : 'cke_format', panel : { css : editor.skin.editor.css.concat( config.contentsCss ), multiSelect : false, attributes : { 'aria-label' : lang.panelTitle } }, init : function() { this.startGroup( lang.panelTitle ); for ( var tag in styles ) { var label = lang[ 'tag_' + tag ]; // Add the tag entry to the panel list. this.add( tag, styles[tag].buildPreview( label ), label ); } }, onClick : function( value ) { editor.focus(); editor.fire( 'saveSnapshot' ); var style = styles[ value ], elementPath = new CKEDITOR.dom.elementPath( editor.getSelection().getStartElement() ); style[ style.checkActive( elementPath ) ? 'remove' : 'apply' ]( editor.document ); // Save the undo snapshot after all changes are affected. (#4899) setTimeout( function() { editor.fire( 'saveSnapshot' ); }, 0 ); }, onRender : function() { editor.on( 'selectionChange', function( ev ) { var currentTag = this.getValue(); var elementPath = ev.data.path; for ( var tag in styles ) { if ( styles[ tag ].checkActive( elementPath ) ) { if ( tag != currentTag ) this.setValue( tag, editor.lang.format[ 'tag_' + tag ] ); return; } } // If no styles match, just empty it. this.setValue( '' ); }, this); } }); } }); /** * A list of semi colon separated style names (by default tags) representing * the style definition for each entry to be displayed in the Format combo in * the toolbar. Each entry must have its relative definition configuration in a * setting named "format_(tagName)". For example, the "p" entry has its * definition taken from config.format_p. * @type String * @default 'p;h1;h2;h3;h4;h5;h6;pre;address;div' * @example * config.format_tags = 'p;h2;h3;pre' */ CKEDITOR.config.format_tags = 'p;h1;h2;h3;h4;h5;h6;pre;address;div'; /** * The style definition to be used to apply the "Normal" format. * @type Object * @default { element : 'p' } * @example * config.format_p = { element : 'p', attributes : { 'class' : 'normalPara' } }; */ CKEDITOR.config.format_p = { element : 'p' }; /** * The style definition to be used to apply the "Normal (DIV)" format. * @type Object * @default { element : 'div' } * @example * config.format_div = { element : 'div', attributes : { 'class' : 'normalDiv' } }; */ CKEDITOR.config.format_div = { element : 'div' }; /** * The style definition to be used to apply the "Formatted" format. * @type Object * @default { element : 'pre' } * @example * config.format_pre = { element : 'pre', attributes : { 'class' : 'code' } }; */ CKEDITOR.config.format_pre = { element : 'pre' }; /** * The style definition to be used to apply the "Address" format. * @type Object * @default { element : 'address' } * @example * config.format_address = { element : 'address', attributes : { 'class' : 'styledAddress' } }; */ CKEDITOR.config.format_address = { element : 'address' }; /** * The style definition to be used to apply the "Heading 1" format. * @type Object * @default { element : 'h1' } * @example * config.format_h1 = { element : 'h1', attributes : { 'class' : 'contentTitle1' } }; */ CKEDITOR.config.format_h1 = { element : 'h1' }; /** * The style definition to be used to apply the "Heading 1" format. * @type Object * @default { element : 'h2' } * @example * config.format_h2 = { element : 'h2', attributes : { 'class' : 'contentTitle2' } }; */ CKEDITOR.config.format_h2 = { element : 'h2' }; /** * The style definition to be used to apply the "Heading 1" format. * @type Object * @default { element : 'h3' } * @example * config.format_h3 = { element : 'h3', attributes : { 'class' : 'contentTitle3' } }; */ CKEDITOR.config.format_h3 = { element : 'h3' }; /** * The style definition to be used to apply the "Heading 1" format. * @type Object * @default { element : 'h4' } * @example * config.format_h4 = { element : 'h4', attributes : { 'class' : 'contentTitle4' } }; */ CKEDITOR.config.format_h4 = { element : 'h4' }; /** * The style definition to be used to apply the "Heading 1" format. * @type Object * @default { element : 'h5' } * @example * config.format_h5 = { element : 'h5', attributes : { 'class' : 'contentTitle5' } }; */ CKEDITOR.config.format_h5 = { element : 'h5' }; /** * The style definition to be used to apply the "Heading 1" format. * @type Object * @default { element : 'h6' } * @example * config.format_h6 = { element : 'h6', attributes : { 'class' : 'contentTitle6' } }; */ CKEDITOR.config.format_h6 = { element : 'h6' };
10npsite
trunk/guanli/system/ckeditor/_source/plugins/format/plugin.js
JavaScript
asf20
5,708
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @file Special Character plugin */ CKEDITOR.plugins.add( 'specialchar', { requires : [ 'dialog' ], // List of available localizations. availableLangs : { cs:1, cy:1, de:1, el:1, en:1, eo:1, et:1, fa:1, fi:1, fr:1, he:1, hr:1, it:1, nb:1, nl:1, no:1, 'pt-br':1, tr:1, ug:1, 'zh-cn':1 }, init : function( editor ) { var pluginName = 'specialchar', plugin = this; // Register the dialog. CKEDITOR.dialog.add( pluginName, this.path + 'dialogs/specialchar.js' ); editor.addCommand( pluginName, { exec : function() { var langCode = editor.langCode; langCode = plugin.availableLangs[ langCode ] ? langCode : 'en'; CKEDITOR.scriptLoader.load( CKEDITOR.getUrl( plugin.path + 'lang/' + langCode + '.js' ), function() { CKEDITOR.tools.extend( editor.lang.specialChar, plugin.langEntries[ langCode ] ); editor.openDialog( pluginName ); }); }, modes : { wysiwyg:1 }, canUndo : false }); // Register the toolbar button. editor.ui.addButton( 'SpecialChar', { label : editor.lang.specialChar.toolbar, command : pluginName }); } } ); /** * The list of special characters visible in the Special Character dialog window. * @type Array * @example * config.specialChars = [ '&quot;', '&rsquo;', [ '&custom;', 'Custom label' ] ]; * config.specialChars = config.specialChars.concat( [ '&quot;', [ '&rsquo;', 'Custom label' ] ] ); */ CKEDITOR.config.specialChars = [ '!','&quot;','#','$','%','&amp;',"'",'(',')','*','+','-','.','/', '0','1','2','3','4','5','6','7','8','9',':',';', '&lt;','=','&gt;','?','@', 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O', 'P','Q','R','S','T','U','V','W','X','Y','Z', '[',']','^','_','`', 'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p', 'q','r','s','t','u','v','w','x','y','z', '{','|','}','~', "&euro;", "&lsquo;", "&rsquo;", "&ldquo;", "&rdquo;", "&ndash;", "&mdash;", "&iexcl;", "&cent;", "&pound;", "&curren;", "&yen;", "&brvbar;", "&sect;", "&uml;", "&copy;", "&ordf;", "&laquo;", "&not;", "&reg;", "&macr;", "&deg;", "&sup2;", "&sup3;", "&acute;", "&micro;", "&para;", "&middot;", "&cedil;", "&sup1;", "&ordm;", "&raquo;", "&frac14;", "&frac12;", "&frac34;", "&iquest;", "&Agrave;", "&Aacute;", "&Acirc;", "&Atilde;", "&Auml;", "&Aring;", "&AElig;", "&Ccedil;", "&Egrave;", "&Eacute;", "&Ecirc;", "&Euml;", "&Igrave;", "&Iacute;", "&Icirc;", "&Iuml;", "&ETH;", "&Ntilde;", "&Ograve;", "&Oacute;", "&Ocirc;", "&Otilde;", "&Ouml;", "&times;", "&Oslash;", "&Ugrave;", "&Uacute;", "&Ucirc;", "&Uuml;", "&Yacute;", "&THORN;", "&szlig;", "&agrave;", "&aacute;", "&acirc;", "&atilde;", "&auml;", "&aring;", "&aelig;", "&ccedil;", "&egrave;", "&eacute;", "&ecirc;", "&euml;", "&igrave;", "&iacute;", "&icirc;", "&iuml;", "&eth;", "&ntilde;", "&ograve;", "&oacute;", "&ocirc;", "&otilde;", "&ouml;", "&divide;", "&oslash;", "&ugrave;", "&uacute;", "&ucirc;", "&uuml;", "&yacute;", "&thorn;", "&yuml;", "&OElig;", "&oelig;", "&#372;", "&#374", "&#373", "&#375;", "&sbquo;", "&#8219;", "&bdquo;", "&hellip;", "&trade;", "&#9658;", "&bull;", "&rarr;", "&rArr;", "&hArr;", "&diams;", "&asymp;" ];
10npsite
trunk/guanli/system/ckeditor/_source/plugins/specialchar/plugin.js
JavaScript
asf20
3,420
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'nl', { euro: 'Euro-teken', lsquo: 'Linker enkel aanhalingsteken', rsquo: 'Rechter enkel aanhalingsteken', ldquo: 'Linker dubbel aanhalingsteken', rdquo: 'Rechter dubbel aanhalingsteken', ndash: 'En dash', mdash: 'Em dash', iexcl: 'Omgekeerd uitroepteken', cent: 'Cent-teken', pound: 'Pond-teken', curren: 'Valuta-teken', yen: 'Yen-teken', brvbar: 'Gebroken streep', sect: 'Paragraaf-teken', uml: 'Trema', copy: 'Copyright-teken', ordf: 'Vrouwelijk ordinaal', laquo: 'Linker guillemet', not: 'Ongelijk-teken', reg: 'Geregistreerd handelsmerk-teken', macr: 'Macron', deg: 'Graden-teken', sup2: 'Superscript twee', sup3: 'Superscript drie', acute: 'Accent aigu', micro: 'Mico-teken', para: 'Alinea-teken', middot: 'Halfhoge punt', cedil: 'Cedille', sup1: 'Superscript een', ordm: 'Mannelijk ordinaal', raquo: 'Rechter guillemet', frac14: 'Breuk kwart', frac12: 'Breuk half', frac34: 'Breuk driekwart', iquest: 'Omgekeerd vraagteken', Agrave: 'Latijnse hoofdletter A met een accent grave', Aacute: 'Latijnse hoofdletter A met een accent aigu', Acirc: 'Latijnse hoofdletter A met een circonflexe', Atilde: 'Latijnse hoofdletter A met een tilde', Auml: 'Latijnse hoofdletter A met een trema', Aring: 'Latijnse hoofdletter A met een corona', AElig: 'Latijnse hoofdletter Æ', Ccedil: 'Latijnse hoofdletter C met een cedille', Egrave: 'Latijnse hoofdletter E met een accent grave', Eacute: 'Latijnse hoofdletter E met een accent aigu', Ecirc: 'Latijnse hoofdletter E met een circonflexe', Euml: 'Latijnse hoofdletter E met een trema', Igrave: 'Latijnse hoofdletter I met een accent grave', Iacute: 'Latijnse hoofdletter I met een accent aigu', Icirc: 'Latijnse hoofdletter I met een circonflexe', Iuml: 'Latijnse hoofdletter I met een trema', ETH: 'Latijnse hoofdletter Eth', Ntilde: 'Latijnse hoofdletter N met een tilde', Ograve: 'Latijnse hoofdletter O met een accent grave', Oacute: 'Latijnse hoofdletter O met een accent aigu', Ocirc: 'Latijnse hoofdletter O met een circonflexe', Otilde: 'Latijnse hoofdletter O met een tilde', Ouml: 'Latijnse hoofdletter O met een trema', times: 'Maal-teken', Oslash: 'Latijnse hoofdletter O met een schuine streep', Ugrave: 'Latijnse hoofdletter U met een accent grave', Uacute: 'Latijnse hoofdletter U met een accent aigu', Ucirc: 'Latijnse hoofdletter U met een circonflexe', Uuml: 'Latijnse hoofdletter U met een trema', Yacute: 'Latijnse hoofdletter Y met een accent aigu', THORN: 'Latijnse hoofdletter Thorn', szlig: 'Latijnse kleine ringel-s', agrave: 'Latijnse kleine letter a met een accent grave', aacute: 'Latijnse kleine letter a met een accent aigu', acirc: 'Latijnse kleine letter a met een circonflexe', atilde: 'Latijnse kleine letter a met een tilde', auml: 'Latijnse kleine letter a met een trema', aring: 'Latijnse kleine letter a met een corona', aelig: 'Latijnse kleine letter æ', ccedil: 'Latijnse kleine letter c met een cedille', egrave: 'Latijnse kleine letter e met een accent grave', eacute: 'Latijnse kleine letter e met een accent aigu', ecirc: 'Latijnse kleine letter e met een circonflexe', euml: 'Latijnse kleine letter e met een trema', igrave: 'Latijnse kleine letter i met een accent grave', iacute: 'Latijnse kleine letter i met een accent aigu', icirc: 'Latijnse kleine letter i met een circonflexe', iuml: 'Latijnse kleine letter i met een trema', eth: 'Latijnse kleine letter eth', ntilde: 'Latijnse kleine letter n met een tilde', ograve: 'Latijnse kleine letter o met een accent grave', oacute: 'Latijnse kleine letter o met een accent aigu', ocirc: 'Latijnse kleine letter o met een circonflexe', otilde: 'Latijnse kleine letter o met een tilde', ouml: 'Latijnse kleine letter o met een trema', divide: 'Deel-teken', oslash: 'Latijnse kleine letter o met een schuine streep', ugrave: 'Latijnse kleine letter u met een accent grave', uacute: 'Latijnse kleine letter u met een accent aigu', ucirc: 'Latijnse kleine letter u met een circonflexe', uuml: 'Latijnse kleine letter u met een trema', yacute: 'Latijnse kleine letter y met een accent aigu', thorn: 'Latijnse kleine letter thorn', yuml: 'Latijnse kleine letter y met een trema', OElig: 'Latijnse hoofdletter Œ', oelig: 'Latijnse kleine letter œ', '372': 'Latijnse hoofdletter W met een circonflexe', '374': 'Latijnse hoofdletter Y met een circonflexe', '373': 'Latijnse kleine letter w met een circonflexe', '375': 'Latijnse kleine letter y met een circonflexe', sbquo: 'Lage enkele aanhalingsteken', '8219': 'Hoge omgekeerde enkele aanhalingsteken', bdquo: 'Lage dubbele aanhalingsteken', hellip: 'Beletselteken', trade: 'Trademark-teken', '9658': 'Zwarte driehoek naar rechts', bull: 'Bullet', rarr: 'Pijl naar rechts', rArr: 'Dubbele pijl naar rechts', hArr: 'Dubbele pijl naar links', diams: 'Zwart ruitje', asymp: 'Benaderingsteken' });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/specialchar/lang/nl.js
JavaScript
asf20
5,211
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'ug', { euro: 'ياۋرو بەلگىسى', lsquo: 'يالاڭ پەش سول', rsquo: 'يالاڭ پەش ئوڭ', ldquo: 'قوش پەش سول', rdquo: 'قوش پەش ئوڭ', ndash: 'سىزىقچە', mdash: 'سىزىق', iexcl: 'ئۈندەش', cent: 'تىيىن بەلگىسى', pound: 'فوند ستېرلىڭ', curren: 'پۇل بەلگىسى', yen: 'ياپونىيە يىنى', brvbar: 'ئۈزۈك بالداق', sect: 'پاراگراف بەلگىسى', uml: 'تاۋۇش ئايرىش بەلگىسى', copy: 'نەشر ھوقۇقى بەلگىسى', ordf: 'Feminine ordinal indicator', // MISSING laquo: 'قوش تىرناق سول', not: 'غەيرى بەلگە', reg: 'خەتلەتكەن تاۋار ماركىسى', macr: 'سوزۇش بەلگىسى', deg: 'گىرادۇس بەلگىسى', sup2: 'يۇقىرى ئىندېكىس 2', sup3: 'يۇقىرى ئىندېكىس 3', acute: 'ئۇرغۇ بەلگىسى', micro: 'Micro sign', // MISSING para: 'ئابزاس بەلگىسى', middot: 'ئوتتۇرا چېكىت', cedil: 'ئاستىغا قوشۇلىدىغان بەلگە', sup1: 'يۇقىرى ئىندېكىس 1', ordm: 'Masculine ordinal indicator', // MISSING raquo: 'قوش تىرناق ئوڭ', frac14: 'ئاددىي كەسىر تۆتتىن بىر', frac12: 'ئاددىي كەسىر ئىككىدىن بىر', frac34: 'ئاددىي كەسىر ئۈچتىن تۆرت', iquest: 'Inverted question mark', // MISSING Agrave: 'Latin capital letter A with grave accent', // MISSING Aacute: 'Latin capital letter A with acute accent', // MISSING Acirc: 'Latin capital letter A with circumflex', // MISSING Atilde: 'Latin capital letter A with tilde', // MISSING Auml: 'Latin capital letter A with diaeresis', // MISSING Aring: 'Latin capital letter A with ring above', // MISSING AElig: 'Latin Capital letter Æ', // MISSING Ccedil: 'Latin capital letter C with cedilla', // MISSING Egrave: 'Latin capital letter E with grave accent', // MISSING Eacute: 'Latin capital letter E with acute accent', // MISSING Ecirc: 'Latin capital letter E with circumflex', // MISSING Euml: 'Latin capital letter E with diaeresis', // MISSING Igrave: 'Latin capital letter I with grave accent', // MISSING Iacute: 'Latin capital letter I with acute accent', // MISSING Icirc: 'Latin capital letter I with circumflex', // MISSING Iuml: 'Latin capital letter I with diaeresis', // MISSING ETH: 'Latin capital letter Eth', // MISSING Ntilde: 'Latin capital letter N with tilde', // MISSING Ograve: 'قوش پەش ئوڭ', Oacute: 'Latin capital letter O with acute accent', // MISSING Ocirc: 'Latin capital letter O with circumflex', // MISSING Otilde: 'Latin capital letter O with tilde', // MISSING Ouml: 'Latin capital letter O with diaeresis', // MISSING times: 'Multiplication sign', // MISSING Oslash: 'Latin capital letter O with stroke', // MISSING Ugrave: 'Latin capital letter U with grave accent', // MISSING Uacute: 'Latin capital letter U with acute accent', // MISSING Ucirc: 'Latin capital letter U with circumflex', // MISSING Uuml: 'Latin capital letter U with diaeresis', // MISSING Yacute: 'Latin capital letter Y with acute accent', // MISSING THORN: 'Latin capital letter Thorn', // MISSING szlig: 'Latin small letter sharp s', // MISSING agrave: 'Latin small letter a with grave accent', // MISSING aacute: 'Latin small letter a with acute accent', // MISSING acirc: 'Latin small letter a with circumflex', // MISSING atilde: 'Latin small letter a with tilde', // MISSING auml: 'Latin small letter a with diaeresis', // MISSING aring: 'Latin small letter a with ring above', // MISSING aelig: 'Latin small letter æ', // MISSING ccedil: 'Latin small letter c with cedilla', // MISSING egrave: 'Latin small letter e with grave accent', // MISSING eacute: 'Latin small letter e with acute accent', // MISSING ecirc: 'Latin small letter e with circumflex', // MISSING euml: 'Latin small letter e with diaeresis', // MISSING igrave: 'Latin small letter i with grave accent', // MISSING iacute: 'Latin small letter i with acute accent', // MISSING icirc: 'Latin small letter i with circumflex', // MISSING iuml: 'Latin small letter i with diaeresis', // MISSING eth: 'Latin small letter eth', // MISSING ntilde: 'تىك موللاق سوئال بەلگىسى', ograve: 'Latin small letter o with grave accent', // MISSING oacute: 'Latin small letter o with acute accent', // MISSING ocirc: 'Latin small letter o with circumflex', // MISSING otilde: 'Latin small letter o with tilde', // MISSING ouml: 'Latin small letter o with diaeresis', // MISSING divide: 'Division sign', // MISSING oslash: 'Latin small letter o with stroke', // MISSING ugrave: 'Latin small letter u with grave accent', // MISSING uacute: 'Latin small letter u with acute accent', // MISSING ucirc: 'Latin small letter u with circumflex', // MISSING uuml: 'Latin small letter u with diaeresis', // MISSING yacute: 'Latin small letter y with acute accent', // MISSING thorn: 'Latin small letter thorn', // MISSING yuml: 'Latin small letter y with diaeresis', // MISSING OElig: 'Latin capital ligature OE', // MISSING oelig: 'Latin small ligature oe', // MISSING '372': 'Latin capital letter W with circumflex', // MISSING '374': 'Latin capital letter Y with circumflex', // MISSING '373': 'Latin small letter w with circumflex', // MISSING '375': 'Latin small letter y with circumflex', // MISSING sbquo: 'Single low-9 quotation mark', // MISSING '8219': 'Single high-reversed-9 quotation mark', // MISSING bdquo: 'Double low-9 quotation mark', // MISSING hellip: 'Horizontal ellipsis', // MISSING trade: 'Trade mark sign', // MISSING '9658': 'Black right-pointing pointer', // MISSING bull: 'Bullet', // MISSING rarr: 'ئوڭ يا ئوق', rArr: 'ئوڭ قوش سىزىق يا ئوق', hArr: 'ئوڭ سول قوش سىزىق يا ئوق', diams: 'ئۇيۇل غىچ', asymp: 'تەخمىنەن تەڭ' });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/specialchar/lang/ug.js
JavaScript
asf20
6,302
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'it', { euro: 'Simbolo Euro', lsquo: 'Virgoletta singola sinistra', rsquo: 'Virgoletta singola destra', ldquo: 'Virgolette aperte', rdquo: 'Virgolette chiuse', ndash: 'Trattino', mdash: 'Trattino lungo', iexcl: 'Punto esclavamativo invertito', cent: 'Simbolo Cent', pound: 'Simbolo Sterlina', curren: 'Simbolo Moneta', yen: 'Simbolo Yen', brvbar: 'Barra interrotta', sect: 'Simbolo di sezione', uml: 'Dieresi', copy: 'Simbolo Copyright', ordf: 'Indicatore ordinale femminile', laquo: 'Virgolette basse aperte', not: 'Nessun segno', reg: 'Simbolo Registrato', macr: 'Macron', deg: 'Simbolo Grado', sup2: 'Apice Due', sup3: 'Apice Tre', acute: 'Accento acuto', micro: 'Simbolo Micro', para: 'Simbolo Paragrafo', middot: 'Punto centrale', cedil: 'Cediglia', sup1: 'Apice Uno', ordm: 'Indicatore ordinale maschile', raquo: 'Virgolette basse chiuse', frac14: 'Frazione volgare un quarto', frac12: 'Frazione volgare un mezzo', frac34: 'Frazione volgare tre quarti', iquest: 'Punto interrogativo invertito', Agrave: 'Lettera maiuscola latina A con accento grave', Aacute: 'Lettera maiuscola latina A con accento acuto', Acirc: 'Lettera maiuscola latina A con accento circonflesso', Atilde: 'Lettera maiuscola latina A con tilde', Auml: 'Lettera maiuscola latina A con dieresi', Aring: 'Lettera maiuscola latina A con anello sopra', AElig: 'Lettera maiuscola latina AE', Ccedil: 'Lettera maiuscola latina C con cediglia', Egrave: 'Lettera maiuscola latina E con accento grave', Eacute: 'Lettera maiuscola latina E con accento acuto', Ecirc: 'Lettera maiuscola latina E con accento circonflesso', Euml: 'Lettera maiuscola latina E con dieresi', Igrave: 'Lettera maiuscola latina I con accento grave', Iacute: 'Lettera maiuscola latina I con accento acuto', Icirc: 'Lettera maiuscola latina I con accento circonflesso', Iuml: 'Lettera maiuscola latina I con dieresi', ETH: 'Lettera maiuscola latina Eth', Ntilde: 'Lettera maiuscola latina N con tilde', Ograve: 'Lettera maiuscola latina O con accento grave', Oacute: 'Lettera maiuscola latina O con accento acuto', Ocirc: 'Lettera maiuscola latina O con accento circonflesso', Otilde: 'Lettera maiuscola latina O con tilde', Ouml: 'Lettera maiuscola latina O con dieresi', times: 'Simbolo di moltiplicazione', Oslash: 'Lettera maiuscola latina O barrata', Ugrave: 'Lettera maiuscola latina U con accento grave', Uacute: 'Lettera maiuscola latina U con accento acuto', Ucirc: 'Lettera maiuscola latina U con accento circonflesso', Uuml: 'Lettera maiuscola latina U con accento circonflesso', Yacute: 'Lettera maiuscola latina Y con accento acuto', THORN: 'Lettera maiuscola latina Thorn', szlig: 'Lettera latina minuscola doppia S', agrave: 'Lettera minuscola latina a con accento grave', aacute: 'Lettera minuscola latina a con accento acuto', acirc: 'Lettera minuscola latina a con accento circonflesso', atilde: 'Lettera minuscola latina a con tilde', auml: 'Lettera minuscola latina a con dieresi', aring: 'Lettera minuscola latina a con anello superiore', aelig: 'Lettera minuscola latina ae', ccedil: 'Lettera minuscola latina c con cediglia', egrave: 'Lettera minuscola latina e con accento grave', eacute: 'Lettera minuscola latina e con accento acuto', ecirc: 'Lettera minuscola latina e con accento circonflesso', euml: 'Lettera minuscola latina e con dieresi', igrave: 'Lettera minuscola latina i con accento grave', iacute: 'Lettera minuscola latina i con accento acuto', icirc: 'Lettera minuscola latina i con accento circonflesso', iuml: 'Lettera minuscola latina i con dieresi', eth: 'Lettera minuscola latina eth', ntilde: 'Lettera minuscola latina n con tilde', ograve: 'Lettera minuscola latina o con accento grave', oacute: 'Lettera minuscola latina o con accento acuto', ocirc: 'Lettera minuscola latina o con accento circonflesso', otilde: 'Lettera minuscola latina o con tilde', ouml: 'Lettera minuscola latina o con dieresi', divide: 'Simbolo di divisione', oslash: 'Lettera minuscola latina o barrata', ugrave: 'Lettera minuscola latina u con accento grave', uacute: 'Lettera minuscola latina u con accento acuto', ucirc: 'Lettera minuscola latina u con accento circonflesso', uuml: 'Lettera minuscola latina u con dieresi', yacute: 'Lettera minuscola latina y con accento acuto', thorn: 'Lettera minuscola latina thorn', yuml: 'Lettera minuscola latina y con dieresi', OElig: 'Legatura maiuscola latina OE', oelig: 'Legatura minuscola latina oe', '372': 'Lettera maiuscola latina W con accento circonflesso', '374': 'Lettera maiuscola latina Y con accento circonflesso', '373': 'Lettera minuscola latina w con accento circonflesso', '375': 'Lettera minuscola latina y con accento circonflesso', sbquo: 'Singola virgoletta bassa low-9', '8219': 'Singola virgoletta bassa low-9 inversa', bdquo: 'Doppia virgoletta bassa low-9', hellip: 'Ellissi orizzontale', trade: 'Simbolo TM', '9658': 'Puntatore nero rivolto verso destra', bull: 'Punto', rarr: 'Freccia verso destra', rArr: 'Doppia freccia verso destra', hArr: 'Doppia freccia sinistra destra', diams: 'Simbolo nero diamante', asymp: 'Quasi uguale a' });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/specialchar/lang/it.js
JavaScript
asf20
5,505
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'de', { euro: 'Euro Zeichen', lsquo: 'Hochkomma links', rsquo: 'Hochkomma rechts', ldquo: 'Anführungszeichen links', rdquo: 'Anführungszeichen rechts', ndash: 'kleiner Strich', mdash: 'mittlerer Strich', iexcl: 'invertiertes Ausrufezeichen', cent: 'Cent', pound: 'Pfund', curren: 'Währung', yen: 'Yen', brvbar: 'gestrichelte Linie', sect: '§ Zeichen', uml: 'Diäresis', copy: 'Copyright', ordf: 'Feminine ordinal Anzeige', laquo: 'Nach links zeigenden Doppel-Winkel Anführungszeichen', not: 'Not-Zeichen', reg: 'Registriert', macr: 'Längezeichen', deg: 'Grad', sup2: 'Hoch 2', sup3: 'Hoch 3', acute: 'Akzentzeichen ', micro: 'Micro', para: 'Pilcrow-Zeichen', middot: 'Mittelpunkt', cedil: 'Cedilla', sup1: 'Hoch 1', ordm: 'Männliche Ordnungszahl Anzeige', raquo: 'Nach rechts zeigenden Doppel-Winkel Anführungszeichen', frac14: 'ein Viertel', frac12: 'Hälfte', frac34: 'Dreiviertel', iquest: 'Umgekehrtes Fragezeichen', Agrave: 'Lateinischer Buchstabe A mit AkzentGrave', Aacute: 'Lateinischer Buchstabe A mit Akutakzent', Acirc: 'Lateinischer Buchstabe A mit Zirkumflex', Atilde: 'Lateinischer Buchstabe A mit Tilde', Auml: 'Lateinischer Buchstabe A mit Trema', Aring: 'Lateinischer Buchstabe A mit Ring oben', AElig: 'Lateinischer Buchstabe Æ', Ccedil: 'Lateinischer Buchstabe C mit Cedille', Egrave: 'Lateinischer Buchstabe E mit AkzentGrave', Eacute: 'Lateinischer Buchstabe E mit Akutakzent', Ecirc: 'Lateinischer Buchstabe E mit Zirkumflex', Euml: 'Lateinischer Buchstabe E Trema', Igrave: 'Lateinischer Buchstabe I mit AkzentGrave', Iacute: 'Lateinischer Buchstabe I mit Akutakzent', Icirc: 'Lateinischer Buchstabe I mit Zirkumflex', Iuml: 'Lateinischer Buchstabe I mit Trema', ETH: 'Lateinischer Buchstabe Eth', Ntilde: 'Lateinischer Buchstabe N mit Tilde', Ograve: 'Lateinischer Buchstabe O mit AkzentGrave', Oacute: 'Lateinischer Buchstabe O mit Akutakzent', Ocirc: 'Lateinischer Buchstabe O mit Zirkumflex', Otilde: 'Lateinischer Buchstabe O mit Tilde', Ouml: 'Lateinischer Buchstabe O mit Trema', times: 'Multiplikation', Oslash: 'Lateinischer Buchstabe O durchgestrichen', Ugrave: 'Lateinischer Buchstabe U mit Akzentgrave', Uacute: 'Lateinischer Buchstabe U mit Akutakzent', Ucirc: 'Lateinischer Buchstabe U mit Zirkumflex', Uuml: 'Lateinischer Buchstabe a mit Trema', Yacute: 'Lateinischer Buchstabe a mit Akzent', THORN: 'Lateinischer Buchstabe mit Dorn', szlig: 'Kleiner lateinischer Buchstabe scharfe s', agrave: 'Kleiner lateinischer Buchstabe a mit Accent grave', aacute: 'Kleiner lateinischer Buchstabe a mit Akut', acirc: 'Lateinischer Buchstabe a mit Zirkumflex', atilde: 'Lateinischer Buchstabe a mit Tilde', auml: 'Kleiner lateinischer Buchstabe a mit Trema', aring: 'Kleiner lateinischer Buchstabe a mit Ring oben', aelig: 'Lateinischer Buchstabe æ', ccedil: 'Kleiner lateinischer Buchstabe c mit Cedille', egrave: 'Kleiner lateinischer Buchstabe e mit Accent grave', eacute: 'Kleiner lateinischer Buchstabe e mit Akut', ecirc: 'Kleiner lateinischer Buchstabe e mit Zirkumflex', euml: 'Kleiner lateinischer Buchstabe e mit Trema', igrave: 'Kleiner lateinischer Buchstabe i mit AkzentGrave', iacute: 'Kleiner lateinischer Buchstabe i mit Akzent', icirc: 'Kleiner lateinischer Buchstabe i mit Zirkumflex', iuml: 'Kleiner lateinischer Buchstabe i mit Trema', eth: 'Kleiner lateinischer Buchstabe eth', ntilde: 'Kleiner lateinischer Buchstabe n mit Tilde', ograve: 'Kleiner lateinischer Buchstabe o mit Accent grave', oacute: 'Kleiner lateinischer Buchstabe o mit Akzent', ocirc: 'Kleiner lateinischer Buchstabe o mit Zirkumflex', otilde: 'Lateinischer Buchstabe i mit Tilde', ouml: 'Kleiner lateinischer Buchstabe o mit Trema', divide: 'Divisionszeichen', oslash: 'Kleiner lateinischer Buchstabe o durchgestrichen', ugrave: 'Kleiner lateinischer Buchstabe u mit Accent grave', uacute: 'Kleiner lateinischer Buchstabe u mit Akut', ucirc: 'Kleiner lateinischer Buchstabe u mit Zirkumflex', uuml: 'Kleiner lateinischer Buchstabe u mit Trema', yacute: 'Kleiner lateinischer Buchstabe y mit Akut', thorn: 'Kleiner lateinischer Buchstabe Dorn', yuml: 'Kleiner lateinischer Buchstabe y mit Trema', OElig: 'Lateinischer Buchstabe Ligatur OE', oelig: 'Kleiner lateinischer Buchstabe Ligatur OE', '372': 'Lateinischer Buchstabe W mit Zirkumflex', '374': 'Lateinischer Buchstabe Y mit Zirkumflex', '373': 'Kleiner lateinischer Buchstabe w mit Zirkumflex', '375': 'Kleiner lateinischer Buchstabe y mit Zirkumflex', sbquo: 'Tiefergestelltes Komma', '8219': 'Rumgedrehtes Komma', bdquo: 'Doppeltes Anführungszeichen unten', hellip: 'horizontale Auslassungspunkte', trade: 'Handelszeichen', '9658': 'Dreickspfeil rechts', bull: 'Bullet', rarr: 'Pfeil rechts', rArr: 'Doppelpfeil rechts', hArr: 'Doppelpfeil links', diams: 'Karo', asymp: 'Ungefähr' });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/specialchar/lang/de.js
JavaScript
asf20
5,207
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'hr', { euro: 'Euro znak', lsquo: 'Lijevi jednostruki navodnik', rsquo: 'Desni jednostruki navodnik', ldquo: 'Lijevi dvostruki navodnik', rdquo: 'Desni dvostruki navodnik', ndash: 'En crtica', mdash: 'Em crtica', iexcl: 'Naopaki uskličnik', cent: 'Cent znak', pound: 'Funta znak', curren: 'Znak valute', yen: 'Yen znak', brvbar: 'Potrgana prečka', sect: 'Znak odjeljka', uml: 'Diaeresis', // MISSING copy: 'Copyright znak', ordf: 'Feminine ordinal indicator', // MISSING laquo: 'Lijevi dvostruki uglati navodnik', not: 'Not znak', reg: 'Registered znak', macr: 'Macron', // MISSING deg: 'Stupanj znak', sup2: 'Superscript two', // MISSING sup3: 'Superscript three', // MISSING acute: 'Acute accent', // MISSING micro: 'Micro sign', // MISSING para: 'Pilcrow sign', // MISSING middot: 'Srednja točka', cedil: 'Cedilla', // MISSING sup1: 'Superscript one', // MISSING ordm: 'Masculine ordinal indicator', // MISSING raquo: 'Desni dvostruku uglati navodnik', frac14: 'Vulgar fraction one quarter', // MISSING frac12: 'Vulgar fraction one half', // MISSING frac34: 'Vulgar fraction three quarters', // MISSING iquest: 'Naopaki upitnik', Agrave: 'Veliko latinsko slovo A s akcentom', Aacute: 'Latin capital letter A with acute accent', // MISSING Acirc: 'Latin capital letter A with circumflex', // MISSING Atilde: 'Latin capital letter A with tilde', // MISSING Auml: 'Latin capital letter A with diaeresis', // MISSING Aring: 'Latin capital letter A with ring above', // MISSING AElig: 'Latin Capital letter Æ', // MISSING Ccedil: 'Latin capital letter C with cedilla', // MISSING Egrave: 'Latin capital letter E with grave accent', // MISSING Eacute: 'Latin capital letter E with acute accent', // MISSING Ecirc: 'Latin capital letter E with circumflex', // MISSING Euml: 'Latin capital letter E with diaeresis', // MISSING Igrave: 'Latin capital letter I with grave accent', // MISSING Iacute: 'Latin capital letter I with acute accent', // MISSING Icirc: 'Latin capital letter I with circumflex', // MISSING Iuml: 'Latin capital letter I with diaeresis', // MISSING ETH: 'Latin capital letter Eth', // MISSING Ntilde: 'Latin capital letter N with tilde', // MISSING Ograve: 'Latin capital letter O with grave accent', // MISSING Oacute: 'Latin capital letter O with acute accent', // MISSING Ocirc: 'Latin capital letter O with circumflex', // MISSING Otilde: 'Latin capital letter O with tilde', // MISSING Ouml: 'Latin capital letter O with diaeresis', // MISSING times: 'Multiplication sign', // MISSING Oslash: 'Latin capital letter O with stroke', // MISSING Ugrave: 'Latin capital letter U with grave accent', // MISSING Uacute: 'Latin capital letter U with acute accent', // MISSING Ucirc: 'Latin capital letter U with circumflex', // MISSING Uuml: 'Latin capital letter U with diaeresis', // MISSING Yacute: 'Latin capital letter Y with acute accent', // MISSING THORN: 'Latin capital letter Thorn', // MISSING szlig: 'Latin small letter sharp s', // MISSING agrave: 'Latin small letter a with grave accent', // MISSING aacute: 'Latin small letter a with acute accent', // MISSING acirc: 'Latin small letter a with circumflex', // MISSING atilde: 'Latin small letter a with tilde', // MISSING auml: 'Latin small letter a with diaeresis', // MISSING aring: 'Latin small letter a with ring above', // MISSING aelig: 'Latin small letter æ', // MISSING ccedil: 'Latin small letter c with cedilla', // MISSING egrave: 'Latin small letter e with grave accent', // MISSING eacute: 'Latin small letter e with acute accent', // MISSING ecirc: 'Latin small letter e with circumflex', // MISSING euml: 'Latin small letter e with diaeresis', // MISSING igrave: 'Latin small letter i with grave accent', // MISSING iacute: 'Latin small letter i with acute accent', // MISSING icirc: 'Latin small letter i with circumflex', // MISSING iuml: 'Latin small letter i with diaeresis', // MISSING eth: 'Latin small letter eth', // MISSING ntilde: 'Latin small letter n with tilde', // MISSING ograve: 'Latin small letter o with grave accent', // MISSING oacute: 'Latin small letter o with acute accent', // MISSING ocirc: 'Latin small letter o with circumflex', // MISSING otilde: 'Latin small letter o with tilde', // MISSING ouml: 'Latin small letter o with diaeresis', // MISSING divide: 'Division sign', // MISSING oslash: 'Latin small letter o with stroke', // MISSING ugrave: 'Latin small letter u with grave accent', // MISSING uacute: 'Latin small letter u with acute accent', // MISSING ucirc: 'Latin small letter u with circumflex', // MISSING uuml: 'Latin small letter u with diaeresis', // MISSING yacute: 'Latin small letter y with acute accent', // MISSING thorn: 'Latin small letter thorn', // MISSING yuml: 'Latin small letter y with diaeresis', // MISSING OElig: 'Latin capital ligature OE', // MISSING oelig: 'Latin small ligature oe', // MISSING '372': 'Latin capital letter W with circumflex', // MISSING '374': 'Latin capital letter Y with circumflex', // MISSING '373': 'Latin small letter w with circumflex', // MISSING '375': 'Latin small letter y with circumflex', // MISSING sbquo: 'Single low-9 quotation mark', // MISSING '8219': 'Single high-reversed-9 quotation mark', // MISSING bdquo: 'Double low-9 quotation mark', // MISSING hellip: 'Horizontal ellipsis', // MISSING trade: 'Trade mark sign', // MISSING '9658': 'Black right-pointing pointer', // MISSING bull: 'Bullet', // MISSING rarr: 'Rightwards arrow', // MISSING rArr: 'Rightwards double arrow', // MISSING hArr: 'Left right double arrow', // MISSING diams: 'Black diamond suit', // MISSING asymp: 'Almost equal to' // MISSING });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/specialchar/lang/hr.js
JavaScript
asf20
6,048
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'tr', { euro: 'Euro işareti', lsquo: 'Sol tek tırnak işareti', rsquo: 'Sağ tek tırnak işareti', ldquo: 'Sol çift tırnak işareti', rdquo: 'Sağ çift tırnak işareti', ndash: 'En tire', mdash: 'Em tire', iexcl: 'Ters ünlem işareti', cent: 'Cent işareti', pound: 'Pound işareti', curren: 'Para birimi işareti', yen: 'Yen işareti', brvbar: 'Kırık bar', sect: 'Bölüm işareti', uml: 'İki sesli harfin ayrılması', copy: 'Telif hakkı işareti', ordf: 'Dişil sıralı gösterge', laquo: 'Sol-işaret çift açı tırnak işareti', not: 'Not işareti', reg: 'Kayıtlı işareti', macr: 'Makron', deg: 'Derece işareti', sup2: 'İkili üstsimge', sup3: 'Üçlü üstsimge', acute: 'Aksan işareti', micro: 'Mikro işareti', para: 'Pilcrow işareti', middot: 'Orta nokta', cedil: 'Kedilla', sup1: 'Üstsimge', ordm: 'Eril sıralı gösterge', raquo: 'Sağ işaret çift açı tırnak işareti', frac14: 'Bayağı kesrin dörtte biri', frac12: 'Bayağı kesrin bir yarım', frac34: 'Bayağı kesrin dörtte üç', iquest: 'Ters soru işareti', Agrave: 'Aksanlı latin harfi', Aacute: 'Aşırı aksanıyla Latin harfi', Acirc: 'Çarpık Latin harfi', Atilde: 'Tilde latin harfi', Auml: 'Sesli harf ayrılımlıı latin harfi', Aring: 'Halkalı latin büyük A harfi', AElig: 'Latin büyük Æ harfi', Ccedil: 'Latin büyük C harfi ile kedilla', Egrave: 'Aksanlı latin büyük E harfi', Eacute: 'Aşırı vurgulu latin büyük E harfi', Ecirc: 'Çarpık latin büyük E harfi', Euml: 'Sesli harf ayrılımlıı latin büyük E harfi', Igrave: 'Aksanlı latin büyük I harfi', Iacute: 'Aşırı aksanlı latin büyük I harfi', Icirc: 'Çarpık latin büyük I harfi', Iuml: 'Sesli harf ayrılımlıı latin büyük I harfi', ETH: 'Latin büyük Eth harfi', Ntilde: 'Tildeli latin büyük N harfi', Ograve: 'Aksanlı latin büyük O harfi', Oacute: 'Aşırı aksanlı latin büyük O harfi', Ocirc: 'Çarpık latin büyük O harfi', Otilde: 'Tildeli latin büyük O harfi', Ouml: 'Sesli harf ayrılımlı latin büyük O harfi', times: 'Çarpma işareti', Oslash: 'Vurgulu latin büyük O harfi', Ugrave: 'Aksanlı latin büyük U harfi', Uacute: 'Aşırı aksanlı latin büyük U harfi', Ucirc: 'Çarpık latin büyük U harfi', Uuml: 'Sesli harf ayrılımlı latin büyük U harfi', Yacute: 'Aşırı aksanlı latin büyük Y harfi', THORN: 'Latin büyük Thorn harfi', szlig: 'Latin küçük keskin s harfi', agrave: 'Aksanlı latin küçük a harfi', aacute: 'Aşırı aksanlı latin küçük a harfi', acirc: 'Çarpık latin küçük a harfi', atilde: 'Tildeli latin küçük a harfi', auml: 'Sesli harf ayrılımlı latin küçük a harfi', aring: 'Halkalı latin küçük a harfi', aelig: 'Latin büyük æ harfi', ccedil: 'Kedillalı latin küçük c harfi', egrave: 'Aksanlı latin küçük e harfi', eacute: 'Aşırı aksanlı latin küçük e harfi', ecirc: 'Çarpık latin küçük e harfi', euml: 'Sesli harf ayrılımlı latin küçük e harfi', igrave: 'Aksanlı latin küçük i harfi', iacute: 'Aşırı aksanlı latin küçük i harfi', icirc: 'Çarpık latin küçük i harfi', iuml: 'Sesli harf ayrılımlı latin küçük i harfi', eth: 'Latin küçük eth harfi', ntilde: 'Tildeli latin küçük n harfi', ograve: 'Aksanlı latin küçük o harfi', oacute: 'Aşırı aksanlı latin küçük o harfi', ocirc: 'Çarpık latin küçük o harfi', otilde: 'Tildeli latin küçük o harfi', ouml: 'Sesli harf ayrılımlı latin küçük o harfi', divide: 'Bölme işareti', oslash: 'Vurgulu latin küçük o harfi', ugrave: 'Aksanlı latin küçük u harfi', uacute: 'Aşırı aksanlı latin küçük u harfi', ucirc: 'Çarpık latin küçük u harfi', uuml: 'Sesli harf ayrılımlı latin küçük u harfi', yacute: 'Aşırı aksanlı latin küçük y harfi', thorn: 'Latin küçük thorn harfi', yuml: 'Sesli harf ayrılımlı latin küçük y harfi', OElig: 'Latin büyük bağlı OE harfi', oelig: 'Latin küçük bağlı oe harfi', '372': 'Çarpık latin büyük W harfi', '374': 'Çarpık latin büyük Y harfi', '373': 'Çarpık latin küçük w harfi', '375': 'Çarpık latin küçük y harfi', sbquo: 'Tek düşük-9 tırnak işareti', '8219': 'Tek yüksek-ters-9 tırnak işareti', bdquo: 'Çift düşük-9 tırnak işareti', hellip: 'Yatay elips', trade: 'Marka tescili işareti', '9658': 'Siyah sağ işaret işaretçisi', bull: 'Koyu nokta', rarr: 'Sağa doğru ok', rArr: 'Sağa doğru çift ok', hArr: 'Sol, sağ çift ok', diams: 'Siyah elmas takımı', asymp: 'Hemen hemen eşit' });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/specialchar/lang/tr.js
JavaScript
asf20
4,966
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'fr', { euro: 'Symbole Euro', lsquo: 'Guillemet simple ouvrant', rsquo: 'Guillemet simple fermant', ldquo: 'Guillemet double ouvrant', rdquo: 'Guillemet double fermant', ndash: 'Tiret haut', mdash: 'Tiret bas underscore', iexcl: 'Point d\'exclamation inversé', cent: 'Symbole Cent', pound: 'Symbole Livre Sterling', curren: 'Symbole monétaire', yen: 'Symbole Yen', brvbar: 'Barre verticale scindée', sect: 'Section', uml: 'Tréma', copy: 'Symbole Copyright', ordf: 'Indicateur ordinal féminin', laquo: 'Guillemet français ouvrant', not: 'Crochet de négation', reg: 'Marque déposée', macr: 'Macron', deg: 'Degré', sup2: 'Exposant 2', sup3: '\\tExposant 3', acute: 'Accent aigu', micro: 'Omicron', para: 'Paragraphe', middot: 'Point médian', cedil: 'Cédille', sup1: '\\tExposant 1', ordm: 'Indicateur ordinal masculin', raquo: 'Guillemet français fermant', frac14: 'Un quart', frac12: 'Un demi', frac34: 'Trois quarts', iquest: 'Point d\'interrogation inversé', Agrave: 'A majuscule accent grave', Aacute: 'A majuscule accent aigu', Acirc: 'A majuscule accent circonflexe', Atilde: 'A majuscule avec caron', Auml: 'A majuscule tréma', Aring: 'A majuscule avec un rond au-dessus', AElig: 'Æ majuscule ligaturés', Ccedil: 'C majuscule cédille', Egrave: 'E majuscule accent grave', Eacute: 'E majuscule accent aigu', Ecirc: 'E majuscule accent circonflexe', Euml: 'E majuscule tréma', Igrave: 'I majuscule accent grave', Iacute: 'I majuscule accent aigu', Icirc: 'I majuscule accent circonflexe', Iuml: 'I majuscule tréma', ETH: 'Lettre majuscule islandaise ED', Ntilde: 'N majuscule avec caron', Ograve: 'O majuscule accent grave', Oacute: 'O majuscule accent aigu', Ocirc: 'O majuscule accent circonflexe', Otilde: 'O majuscule avec caron', Ouml: 'O majuscule tréma', times: 'Multiplication', Oslash: 'O majuscule barré', Ugrave: 'U majuscule accent grave', Uacute: 'U majuscule accent aigu', Ucirc: 'U majuscule accent circonflexe', Uuml: 'U majuscule tréma', Yacute: 'Y majuscule accent aigu', THORN: 'Lettre islandaise Thorn majuscule', szlig: 'Lettre minuscule allemande s dur', agrave: 'a minuscule accent grave', aacute: 'a minuscule accent aigu', acirc: 'a minuscule accent circonflexe', atilde: 'a minuscule avec caron', auml: 'a minuscule tréma', aring: 'a minuscule avec un rond au-dessus', aelig: 'æ minuscule ligaturés', ccedil: 'c minuscule cédille', egrave: 'e minuscule accent grave', eacute: 'e minuscule accent aigu', ecirc: 'e minuscule accent circonflexe', euml: 'e minuscule tréma', igrave: 'i minuscule accent grave', iacute: 'i minuscule accent aigu', icirc: 'i minuscule accent circonflexe', iuml: 'i minuscule tréma', eth: 'Lettre minuscule islandaise ED', ntilde: 'n minuscule avec caron', ograve: 'o minuscule accent grave', oacute: 'o minuscule accent aigu', ocirc: 'o minuscule accent circonflexe', otilde: 'o minuscule avec caron', ouml: 'o minuscule tréma', divide: 'Division', oslash: 'o minuscule barré', ugrave: 'u minuscule accent grave', uacute: 'u minuscule accent aigu', ucirc: 'u minuscule accent circonflexe', uuml: 'u minuscule tréma', yacute: 'y minuscule accent aigu', thorn: 'Lettre islandaise thorn minuscule', yuml: 'y minuscule tréma', OElig: 'ligature majuscule latine Œ', oelig: 'ligature minuscule latine œ', '372': 'W majuscule accent circonflexe', '374': 'Y majuscule accent circonflexe', '373': 'w minuscule accent circonflexe', '375': 'y minuscule accent circonflexe', sbquo: 'Guillemet simple fermant (anglais)', '8219': 'Guillemet-virgule supérieur culbuté', bdquo: 'Guillemet-virgule double inférieur', hellip: 'Points de suspension', trade: 'Marque commerciale (trade mark)', '9658': 'Flèche noire pointant vers la droite', bull: 'Gros point médian', rarr: 'Flèche vers la droite', rArr: 'Double flèche vers la droite', hArr: 'Double flèche vers la gauche', diams: 'Carreau noir', asymp: 'Presque égal' });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/specialchar/lang/fr.js
JavaScript
asf20
4,338
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'zh-cn', { euro: '欧元符号', lsquo: '左单引号', rsquo: '右单引号', ldquo: '左双引号', rdquo: '右双引号', ndash: '短划线', mdash: '破折号', iexcl: '竖翻叹号', cent: '分币标记', pound: '英镑标记', curren: '货币标记', yen: '日元标记', brvbar: '间断条', sect: '节标记', uml: '分音符', copy: '版权所有标记', ordf: '阴性顺序指示符', laquo: '左指双尖引号', not: '非标记', reg: '注册标记', macr: '长音符', deg: '度标记', sup2: '上标二', sup3: '上标三', acute: '锐音符', micro: '微符', para: '段落标记', middot: '中间点', cedil: '下加符', sup1: '上标一', ordm: '阳性顺序指示符', raquo: '右指双尖引号', frac14: '普通分数四分之一', frac12: '普通分数二分之一', frac34: '普通分数四分之三', iquest: '竖翻问号', Agrave: '带抑音符的拉丁文大写字母 A', Aacute: '带锐音符的拉丁文大写字母 A', Acirc: '带扬抑符的拉丁文大写字母 A', Atilde: '带颚化符的拉丁文大写字母 A', Auml: '带分音符的拉丁文大写字母 A', Aring: '带上圆圈的拉丁文大写字母 A', AElig: '拉丁文大写字母 Ae', Ccedil: '带下加符的拉丁文大写字母 C', Egrave: '带抑音符的拉丁文大写字母 E', Eacute: '带锐音符的拉丁文大写字母 E', Ecirc: '带扬抑符的拉丁文大写字母 E', Euml: '带分音符的拉丁文大写字母 E', Igrave: '带抑音符的拉丁文大写字母 I', Iacute: '带锐音符的拉丁文大写字母 I', Icirc: '带扬抑符的拉丁文大写字母 I', Iuml: '带分音符的拉丁文大写字母 I', ETH: '拉丁文大写字母 Eth', Ntilde: '带颚化符的拉丁文大写字母 N', Ograve: '带抑音符的拉丁文大写字母 O', Oacute: '带锐音符的拉丁文大写字母 O', Ocirc: '带扬抑符的拉丁文大写字母 O', Otilde: '带颚化符的拉丁文大写字母 O', Ouml: '带分音符的拉丁文大写字母 O', times: '乘号', Oslash: '带粗线的拉丁文大写字母 O', Ugrave: '带抑音符的拉丁文大写字母 U', Uacute: '带锐音符的拉丁文大写字母 U', Ucirc: '带扬抑符的拉丁文大写字母 U', Uuml: '带分音符的拉丁文大写字母 U', Yacute: '带抑音符的拉丁文大写字母 Y', THORN: '拉丁文大写字母 Thorn', szlig: '拉丁文小写字母清音 S', agrave: '带抑音符的拉丁文小写字母 A', aacute: '带锐音符的拉丁文小写字母 A', acirc: '带扬抑符的拉丁文小写字母 A', atilde: '带颚化符的拉丁文小写字母 A', auml: '带分音符的拉丁文小写字母 A', aring: '带上圆圈的拉丁文小写字母 A', aelig: '拉丁文小写字母 Ae', ccedil: '带下加符的拉丁文小写字母 C', egrave: '带抑音符的拉丁文小写字母 E', eacute: '带锐音符的拉丁文小写字母 E', ecirc: '带扬抑符的拉丁文小写字母 E', euml: '带分音符的拉丁文小写字母 E', igrave: '带抑音符的拉丁文小写字母 I', iacute: '带锐音符的拉丁文小写字母 I', icirc: '带扬抑符的拉丁文小写字母 I', iuml: '带分音符的拉丁文小写字母 I', eth: '拉丁文小写字母 Eth', ntilde: '带颚化符的拉丁文小写字母 N', ograve: '带抑音符的拉丁文小写字母 O', oacute: '带锐音符的拉丁文小写字母 O', ocirc: '带扬抑符的拉丁文小写字母 O', otilde: '带颚化符的拉丁文小写字母 O', ouml: '带分音符的拉丁文小写字母 O', divide: '除号', oslash: '带粗线的拉丁文小写字母 O', ugrave: '带抑音符的拉丁文小写字母 U', uacute: '带锐音符的拉丁文小写字母 U', ucirc: '带扬抑符的拉丁文小写字母 U', uuml: '带分音符的拉丁文小写字母 U', yacute: '带抑音符的拉丁文小写字母 Y', thorn: '拉丁文小写字母 Thorn', yuml: '带分音符的拉丁文小写字母 Y', OElig: '拉丁文大写连字 Oe', oelig: '拉丁文小写连字 Oe', '372': '带扬抑符的拉丁文大写字母 W', '374': '带扬抑符的拉丁文大写字母 Y', '373': '带扬抑符的拉丁文小写字母 W', '375': '带扬抑符的拉丁文小写字母 Y', sbquo: '单下 9 形引号', '8219': '单高横翻 9 形引号', bdquo: '双下 9 形引号', hellip: '水平省略号', trade: '商标标志', '9658': '实心右指指针', bull: '加重号', rarr: '向右箭头', rArr: '向右双线箭头', hArr: '左右双线箭头', diams: '实心方块纸牌', asymp: '约等于' });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/specialchar/lang/zh-cn.js
JavaScript
asf20
4,871
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'eo', { euro: 'Eŭrosigno', lsquo: 'Supra 6-citilo', rsquo: 'Supra 9-citilo', ldquo: 'Supra 66-citilo', rdquo: 'Supra 99-citilo', ndash: 'Streketo', mdash: 'Substreko', iexcl: 'Renversita krisigno', cent: 'Cendosigno', pound: 'Pundosigno', curren: 'Monersigno', yen: 'Enosigno', brvbar: 'Rompita vertikala streko', sect: 'Kurba paragrafo', uml: 'Tremao', copy: 'Kopirajtosigno', ordf: 'Adjektiva numerfinaĵo', laquo: 'Duobla malplio-citilo', not: 'Negohoko', reg: 'Registrita marko', macr: 'Superstreko', deg: 'Gradosigno', sup2: 'Supra indico 2', sup3: 'Supra indico 3', acute: 'Dekstra korno', micro: 'Mikrosigno', para: 'Rekta paragrafo', middot: 'Meza punkto', cedil: 'Zoeto', sup1: 'Supra indico 1', ordm: 'Substantiva numerfinaĵo', raquo: 'Duobla plio-citilo', frac14: 'Kvaronosigno', frac12: 'Duonosigno', frac34: 'Trikvaronosigno', iquest: 'renversita demandosigno', Agrave: 'Latina ĉeflitero A kun liva korno', Aacute: 'Latina ĉeflitero A kun dekstra korno', Acirc: 'Latina ĉeflitero A kun ĉapelo', Atilde: 'Latina ĉeflitero A kun tildo', Auml: 'Latina ĉeflitero A kun tremao', Aring: 'Latina ĉeflitero A kun superringo', AElig: 'Latina ĉeflitera ligaturo Æ', Ccedil: 'Latina ĉeflitero C kun zoeto', Egrave: 'Latina ĉeflitero E kun liva korno', Eacute: 'Latina ĉeflitero E kun dekstra korno', Ecirc: 'Latina ĉeflitero E kun ĉapelo', Euml: 'Latina ĉeflitero E kun tremao', Igrave: 'Latina ĉeflitero I kun liva korno', Iacute: 'Latina ĉeflitero I kun dekstra korno', Icirc: 'Latina ĉeflitero I kun ĉapelo', Iuml: 'Latina ĉeflitero I kun tremao', ETH: 'Latina ĉeflitero islanda edo', Ntilde: 'Latina ĉeflitero N kun tildo', Ograve: 'Latina ĉeflitero O kun liva korno', Oacute: 'Latina ĉeflitero O kun dekstra korno', Ocirc: 'Latina ĉeflitero O kun ĉapelo', Otilde: 'Latina ĉeflitero O kun tildo', Ouml: 'Latina ĉeflitero O kun tremao', times: 'Multipliko', Oslash: 'Latina ĉeflitero O trastrekita', Ugrave: 'Latina ĉeflitero U kun liva korno', Uacute: 'Latina ĉeflitero U kun dekstra korno', Ucirc: 'Latina ĉeflitero U kun ĉapelo', Uuml: 'Latina ĉeflitero U kun tremao', Yacute: 'Latina ĉeflitero Y kun dekstra korno', THORN: 'Latina ĉeflitero islanda dorno', szlig: 'Latina etlitero germana sozo (akra s)', agrave: 'Latina etlitero a kun liva korno', aacute: 'Latina etlitero a kun dekstra korno', acirc: 'Latina etlitero a kun ĉapelo', atilde: 'Latina etlitero a kun tildo', auml: 'Latina etlitero a kun tremao', aring: 'Latina etlitero a kun superringo', aelig: 'Latina etlitera ligaturo æ', ccedil: 'Latina etlitero c kun zoeto', egrave: 'Latina etlitero e kun liva korno', eacute: 'Latina etlitero e kun dekstra korno', ecirc: 'Latina etlitero e kun ĉapelo', euml: 'Latina etlitero e kun tremao', igrave: 'Latina etlitero i kun liva korno', iacute: 'Latina etlitero i kun dekstra korno', icirc: 'Latina etlitero i kun ĉapelo', iuml: 'Latina etlitero i kun tremao', eth: 'Latina etlitero islanda edo', ntilde: 'Latina etlitero n kun tildo', ograve: 'Latina etlitero o kun liva korno', oacute: 'Latina etlitero o kun dekstra korno', ocirc: 'Latina etlitero o kun ĉapelo', otilde: 'Latina etlitero o kun tildo', ouml: 'Latina etlitero o kun tremao', divide: 'Dividosigno', oslash: 'Latina etlitero o trastrekita', ugrave: 'Latina etlitero u kun liva korno', uacute: 'Latina etlitero u kun dekstra korno', ucirc: 'Latina etlitero u kun ĉapelo', uuml: 'Latina etlitero u kun tremao', yacute: 'Latina etlitero y kun dekstra korno', thorn: 'Latina etlitero islanda dorno', yuml: 'Latina etlitero y kun tremao', OElig: 'Latina ĉeflitera ligaturo Œ', oelig: 'Latina etlitera ligaturo œ', '372': 'Latina ĉeflitero W kun ĉapelo', '374': 'Latina ĉeflitero Y kun ĉapelo', '373': 'Latina etlitero w kun ĉapelo', '375': 'Latina etlitero y kun ĉapelo', sbquo: 'Suba 9-citilo', '8219': 'Supra renversita 9-citilo', bdquo: 'Suba 99-citilo', hellip: 'Tripunkto', trade: 'Varmarka signo', '9658': 'Nigra sago dekstren', bull: 'Bulmarko', rarr: 'Sago dekstren', rArr: 'Duobla sago dekstren', hArr: 'Duobla sago maldekstren', diams: 'Nigra kvadrato', asymp: 'Preskaŭ egala' });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/specialchar/lang/eo.js
JavaScript
asf20
4,555
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'en', { euro: 'Euro sign', lsquo: 'Left single quotation mark', rsquo: 'Right single quotation mark', ldquo: 'Left double quotation mark', rdquo: 'Right double quotation mark', ndash: 'En dash', mdash: 'Em dash', iexcl: 'Inverted exclamation mark', cent: 'Cent sign', pound: 'Pound sign', curren: 'Currency sign', yen: 'Yen sign', brvbar: 'Broken bar', sect: 'Section sign', uml: 'Diaeresis', copy: 'Copyright sign', ordf: 'Feminine ordinal indicator', laquo: 'Left-pointing double angle quotation mark', not: 'Not sign', reg: 'Registered sign', macr: 'Macron', deg: 'Degree sign', sup2: 'Superscript two', sup3: 'Superscript three', acute: 'Acute accent', micro: 'Micro sign', para: 'Pilcrow sign', middot: 'Middle dot', cedil: 'Cedilla', sup1: 'Superscript one', ordm: 'Masculine ordinal indicator', raquo: 'Right-pointing double angle quotation mark', frac14: 'Vulgar fraction one quarter', frac12: 'Vulgar fraction one half', frac34: 'Vulgar fraction three quarters', iquest: 'Inverted question mark', Agrave: 'Latin capital letter A with grave accent', Aacute: 'Latin capital letter A with acute accent', Acirc: 'Latin capital letter A with circumflex', Atilde: 'Latin capital letter A with tilde', Auml: 'Latin capital letter A with diaeresis', Aring: 'Latin capital letter A with ring above', AElig: 'Latin Capital letter Æ', Ccedil: 'Latin capital letter C with cedilla', Egrave: 'Latin capital letter E with grave accent', Eacute: 'Latin capital letter E with acute accent', Ecirc: 'Latin capital letter E with circumflex', Euml: 'Latin capital letter E with diaeresis', Igrave: 'Latin capital letter I with grave accent', Iacute: 'Latin capital letter I with acute accent', Icirc: 'Latin capital letter I with circumflex', Iuml: 'Latin capital letter I with diaeresis', ETH: 'Latin capital letter Eth', Ntilde: 'Latin capital letter N with tilde', Ograve: 'Latin capital letter O with grave accent', Oacute: 'Latin capital letter O with acute accent', Ocirc: 'Latin capital letter O with circumflex', Otilde: 'Latin capital letter O with tilde', Ouml: 'Latin capital letter O with diaeresis', times: 'Multiplication sign', Oslash: 'Latin capital letter O with stroke', Ugrave: 'Latin capital letter U with grave accent', Uacute: 'Latin capital letter U with acute accent', Ucirc: 'Latin capital letter U with circumflex', Uuml: 'Latin capital letter U with diaeresis', Yacute: 'Latin capital letter Y with acute accent', THORN: 'Latin capital letter Thorn', szlig: 'Latin small letter sharp s', agrave: 'Latin small letter a with grave accent', aacute: 'Latin small letter a with acute accent', acirc: 'Latin small letter a with circumflex', atilde: 'Latin small letter a with tilde', auml: 'Latin small letter a with diaeresis', aring: 'Latin small letter a with ring above', aelig: 'Latin small letter æ', ccedil: 'Latin small letter c with cedilla', egrave: 'Latin small letter e with grave accent', eacute: 'Latin small letter e with acute accent', ecirc: 'Latin small letter e with circumflex', euml: 'Latin small letter e with diaeresis', igrave: 'Latin small letter i with grave accent', iacute: 'Latin small letter i with acute accent', icirc: 'Latin small letter i with circumflex', iuml: 'Latin small letter i with diaeresis', eth: 'Latin small letter eth', ntilde: 'Latin small letter n with tilde', ograve: 'Latin small letter o with grave accent', oacute: 'Latin small letter o with acute accent', ocirc: 'Latin small letter o with circumflex', otilde: 'Latin small letter o with tilde', ouml: 'Latin small letter o with diaeresis', divide: 'Division sign', oslash: 'Latin small letter o with stroke', ugrave: 'Latin small letter u with grave accent', uacute: 'Latin small letter u with acute accent', ucirc: 'Latin small letter u with circumflex', uuml: 'Latin small letter u with diaeresis', yacute: 'Latin small letter y with acute accent', thorn: 'Latin small letter thorn', yuml: 'Latin small letter y with diaeresis', OElig: 'Latin capital ligature OE', oelig: 'Latin small ligature oe', '372': 'Latin capital letter W with circumflex', '374': 'Latin capital letter Y with circumflex', '373': 'Latin small letter w with circumflex', '375': 'Latin small letter y with circumflex', sbquo: 'Single low-9 quotation mark', '8219': 'Single high-reversed-9 quotation mark', bdquo: 'Double low-9 quotation mark', hellip: 'Horizontal ellipsis', trade: 'Trade mark sign', '9658': 'Black right-pointing pointer', bull: 'Bullet', rarr: 'Rightwards arrow', rArr: 'Rightwards double arrow', hArr: 'Left right double arrow', diams: 'Black diamond suit', asymp: 'Almost equal to' });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/specialchar/lang/en.js
JavaScript
asf20
5,033
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'nb', { euro: 'Eurosymbol', lsquo: 'Venstre enkelt anførselstegn', rsquo: 'Høyre enkelt anførselstegn', ldquo: 'Venstre dobbelt anførselstegn', rdquo: 'Høyre anførsesltegn', ndash: 'Kort tankestrek', mdash: 'Lang tankestrek', iexcl: 'Omvendt utropstegn', cent: 'Centsymbol', pound: 'Pundsymbol', curren: 'Valutategn', yen: 'Yensymbol', brvbar: 'Brutt loddrett strek', sect: 'Paragraftegn', uml: 'Tøddel', copy: 'Copyrighttegn', ordf: 'Feminin ordensindikator', laquo: 'Venstre anførselstegn', not: 'Negasjonstegn', reg: 'Registrert varemerke-tegn', macr: 'Makron', deg: 'Gradsymbol', sup2: 'Hevet totall', sup3: 'Hevet tretall', acute: 'Akutt aksent', micro: 'Mikrosymbol', para: 'Avsnittstegn', middot: 'Midtstilt prikk', cedil: 'Cedille', sup1: 'Hevet ettall', ordm: 'Maskulin ordensindikator', raquo: 'Høyre anførselstegn', frac14: 'Fjerdedelsbrøk', frac12: 'Halvbrøk', frac34: 'Tre fjerdedelers brøk', iquest: 'Omvendt spørsmålstegn', Agrave: 'Stor A med grav aksent', Aacute: 'Stor A med akutt aksent', Acirc: 'Stor A med cirkumfleks', Atilde: 'Stor A med tilde', Auml: 'Stor A med tøddel', Aring: 'Stor Å', AElig: 'Stor Æ', Ccedil: 'Stor C med cedille', Egrave: 'Stor E med grav aksent', Eacute: 'Stor E med akutt aksent', Ecirc: 'Stor E med cirkumfleks', Euml: 'Stor E med tøddel', Igrave: 'Stor I med grav aksent', Iacute: 'Stor I med akutt aksent', Icirc: 'Stor I med cirkumfleks', Iuml: 'Stor I med tøddel', ETH: 'Stor Edd/stungen D', Ntilde: 'Stor N med tilde', Ograve: 'Stor O med grav aksent', Oacute: 'Stor O med akutt aksent', Ocirc: 'Stor O med cirkumfleks', Otilde: 'Stor O med tilde', Ouml: 'Stor O med tøddel', times: 'Multiplikasjonstegn', Oslash: 'Stor Ø', Ugrave: 'Stor U med grav aksent', Uacute: 'Stor U med akutt aksent', Ucirc: 'Stor U med cirkumfleks', Uuml: 'Stor U med tøddel', Yacute: 'Stor Y med akutt aksent', THORN: 'Stor Thorn', szlig: 'Liten dobbelt-s/Eszett', agrave: 'Liten a med grav aksent', aacute: 'Liten a med akutt aksent', acirc: 'Liten a med cirkumfleks', atilde: 'Liten a med tilde', auml: 'Liten a med tøddel', aring: 'Liten å', aelig: 'Liten æ', ccedil: 'Liten c med cedille', egrave: 'Liten e med grav aksent', eacute: 'Liten e med akutt aksent', ecirc: 'Liten e med cirkumfleks', euml: 'Liten e med tøddel', igrave: 'Liten i med grav aksent', iacute: 'Liten i med akutt aksent', icirc: 'Liten i med cirkumfleks', iuml: 'Liten i med tøddel', eth: 'Liten edd/stungen d', ntilde: 'Liten n med tilde', ograve: 'Liten o med grav aksent', oacute: 'Liten o med akutt aksent', ocirc: 'Liten o med cirkumfleks', otilde: 'Liten o med tilde', ouml: 'Liten o med tøddel', divide: 'Divisjonstegn', oslash: 'Liten ø', ugrave: 'Liten u med grav aksent', uacute: 'Liten u med akutt aksent', ucirc: 'Liten u med cirkumfleks', uuml: 'Liten u med tøddel', yacute: 'Liten y med akutt aksent', thorn: 'Liten thorn', yuml: 'Liten y med tøddel', OElig: 'Stor ligatur av O og E', oelig: 'Liten ligatur av o og e', '372': 'Stor W med cirkumfleks', '374': 'Stor Y med cirkumfleks', '373': 'Liten w med cirkumfleks', '375': 'Liten y med cirkumfleks', sbquo: 'Enkelt lavt 9-anførselstegn', '8219': 'Enkelt høyt reversert 9-anførselstegn', bdquo: 'Dobbelt lavt 9-anførselstegn', hellip: 'Ellipse', trade: 'Varemerkesymbol', '9658': 'Svart høyrevendt peker', bull: 'Tykk interpunkt', rarr: 'Høyrevendt pil', rArr: 'Dobbel høyrevendt pil', hArr: 'Dobbel venstrevendt pil', diams: 'Svart ruter', asymp: 'Omtrent likhetstegn' });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/specialchar/lang/nb.js
JavaScript
asf20
3,920
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'el', { euro: 'Σύμβολο Ευρώ', lsquo: 'Αριστερός χαρακτήρας μονού εισαγωγικού', rsquo: 'Δεξιός χαρακτήρας μονού εισαγωγικού', ldquo: 'Αριστερός χαρακτήρας διπλού εισαγωγικού', rdquo: 'Δεξιός χαρακτήρας διπλού εισαγωγικού', ndash: 'Παύλα en', mdash: 'Παύλα em', iexcl: 'Ανάποδο θαυμαστικό', cent: 'Σύμβολο Σεντ', pound: 'Σύμβολο λίρας', curren: 'Σύμβολο συναλλαγματικής μονάδας', yen: 'Σύμβολο Γιέν', brvbar: 'Σπασμένη μπάρα', sect: 'Σύμβολο τμήματος', uml: 'Διαίρεση', copy: 'Σύμβολο πνευματικών δικαιωμάτων', ordf: 'Feminine ordinal indicator', // MISSING laquo: 'Left-pointing double angle quotation mark', // MISSING not: 'Not sign', // MISSING reg: 'Registered sign', // MISSING macr: 'Macron', // MISSING deg: 'Degree sign', // MISSING sup2: 'Superscript two', // MISSING sup3: 'Superscript three', // MISSING acute: 'Acute accent', // MISSING micro: 'Micro sign', // MISSING para: 'Pilcrow sign', // MISSING middot: 'Middle dot', // MISSING cedil: 'Cedilla', // MISSING sup1: 'Superscript one', // MISSING ordm: 'Masculine ordinal indicator', // MISSING raquo: 'Right-pointing double angle quotation mark', // MISSING frac14: 'Vulgar fraction one quarter', // MISSING frac12: 'Vulgar fraction one half', // MISSING frac34: 'Vulgar fraction three quarters', // MISSING iquest: 'Inverted question mark', // MISSING Agrave: 'Latin capital letter A with grave accent', // MISSING Aacute: 'Latin capital letter A with acute accent', // MISSING Acirc: 'Latin capital letter A with circumflex', // MISSING Atilde: 'Latin capital letter A with tilde', // MISSING Auml: 'Latin capital letter A with diaeresis', // MISSING Aring: 'Latin capital letter A with ring above', // MISSING AElig: 'Latin Capital letter Æ', // MISSING Ccedil: 'Latin capital letter C with cedilla', // MISSING Egrave: 'Latin capital letter E with grave accent', // MISSING Eacute: 'Latin capital letter E with acute accent', // MISSING Ecirc: 'Latin capital letter E with circumflex', // MISSING Euml: 'Latin capital letter E with diaeresis', // MISSING Igrave: 'Latin capital letter I with grave accent', // MISSING Iacute: 'Latin capital letter I with acute accent', // MISSING Icirc: 'Latin capital letter I with circumflex', // MISSING Iuml: 'Latin capital letter I with diaeresis', // MISSING ETH: 'Latin capital letter Eth', // MISSING Ntilde: 'Latin capital letter N with tilde', // MISSING Ograve: 'Latin capital letter O with grave accent', // MISSING Oacute: 'Latin capital letter O with acute accent', // MISSING Ocirc: 'Latin capital letter O with circumflex', // MISSING Otilde: 'Latin capital letter O with tilde', // MISSING Ouml: 'Latin capital letter O with diaeresis', // MISSING times: 'Multiplication sign', // MISSING Oslash: 'Latin capital letter O with stroke', // MISSING Ugrave: 'Latin capital letter U with grave accent', // MISSING Uacute: 'Latin capital letter U with acute accent', // MISSING Ucirc: 'Latin capital letter U with circumflex', // MISSING Uuml: 'Latin capital letter U with diaeresis', // MISSING Yacute: 'Latin capital letter Y with acute accent', // MISSING THORN: 'Latin capital letter Thorn', // MISSING szlig: 'Latin small letter sharp s', // MISSING agrave: 'Latin small letter a with grave accent', // MISSING aacute: 'Latin small letter a with acute accent', // MISSING acirc: 'Latin small letter a with circumflex', // MISSING atilde: 'Latin small letter a with tilde', // MISSING auml: 'Latin small letter a with diaeresis', // MISSING aring: 'Latin small letter a with ring above', // MISSING aelig: 'Latin small letter æ', // MISSING ccedil: 'Latin small letter c with cedilla', // MISSING egrave: 'Latin small letter e with grave accent', // MISSING eacute: 'Latin small letter e with acute accent', // MISSING ecirc: 'Latin small letter e with circumflex', // MISSING euml: 'Latin small letter e with diaeresis', // MISSING igrave: 'Latin small letter i with grave accent', // MISSING iacute: 'Latin small letter i with acute accent', // MISSING icirc: 'Latin small letter i with circumflex', // MISSING iuml: 'Latin small letter i with diaeresis', // MISSING eth: 'Latin small letter eth', // MISSING ntilde: 'Latin small letter n with tilde', // MISSING ograve: 'Latin small letter o with grave accent', // MISSING oacute: 'Latin small letter o with acute accent', // MISSING ocirc: 'Latin small letter o with circumflex', // MISSING otilde: 'Latin small letter o with tilde', // MISSING ouml: 'Latin small letter o with diaeresis', // MISSING divide: 'Division sign', // MISSING oslash: 'Latin small letter o with stroke', // MISSING ugrave: 'Latin small letter u with grave accent', // MISSING uacute: 'Latin small letter u with acute accent', // MISSING ucirc: 'Latin small letter u with circumflex', // MISSING uuml: 'Latin small letter u with diaeresis', // MISSING yacute: 'Latin small letter y with acute accent', // MISSING thorn: 'Latin small letter thorn', // MISSING yuml: 'Latin small letter y with diaeresis', // MISSING OElig: 'Latin capital ligature OE', // MISSING oelig: 'Latin small ligature oe', // MISSING '372': 'Latin capital letter W with circumflex', // MISSING '374': 'Latin capital letter Y with circumflex', // MISSING '373': 'Latin small letter w with circumflex', // MISSING '375': 'Latin small letter y with circumflex', // MISSING sbquo: 'Single low-9 quotation mark', // MISSING '8219': 'Single high-reversed-9 quotation mark', // MISSING bdquo: 'Double low-9 quotation mark', // MISSING hellip: 'Horizontal ellipsis', // MISSING trade: 'Trade mark sign', // MISSING '9658': 'Black right-pointing pointer', // MISSING bull: 'Bullet', // MISSING rarr: 'Rightwards arrow', // MISSING rArr: 'Rightwards double arrow', // MISSING hArr: 'Left right double arrow', // MISSING diams: 'Black diamond suit', // MISSING asymp: 'Almost equal to' // MISSING });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/specialchar/lang/el.js
JavaScript
asf20
6,549
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'fi', { euro: 'Euron merkki', lsquo: 'Vasen yksittäinen lainausmerkki', rsquo: 'Oikea yksittäinen lainausmerkki', ldquo: 'Vasen kaksoislainausmerkki', rdquo: 'Oikea kaksoislainausmerkki', ndash: 'En dash', // MISSING mdash: 'Em dash', // MISSING iexcl: 'Inverted exclamation mark', // MISSING cent: 'Sentin merkki', pound: 'Punnan merkki', curren: 'Valuuttamerkki', yen: 'Yenin merkki', brvbar: 'Broken bar', // MISSING sect: 'Section sign', // MISSING uml: 'Diaeresis', // MISSING copy: 'Copyright sign', // MISSING ordf: 'Feminine ordinal indicator', // MISSING laquo: 'Left-pointing double angle quotation mark', // MISSING not: 'Not sign', // MISSING reg: 'Rekisteröity merkki', macr: 'Macron', // MISSING deg: 'Asteen merkki', sup2: 'Yläindeksi kaksi', sup3: 'Yläindeksi kolme', acute: 'Acute accent', // MISSING micro: 'Mikron merkki', para: 'Pilcrow sign', // MISSING middot: 'Middle dot', // MISSING cedil: 'Cedilla', // MISSING sup1: 'Yläindeksi yksi', ordm: 'Masculine ordinal indicator', // MISSING raquo: 'Right-pointing double angle quotation mark', // MISSING frac14: 'Vulgar fraction one quarter', // MISSING frac12: 'Vulgar fraction one half', // MISSING frac34: 'Vulgar fraction three quarters', // MISSING iquest: 'Ylösalaisin oleva kysymysmerkki', Agrave: 'Latin capital letter A with grave accent', // MISSING Aacute: 'Latin capital letter A with acute accent', // MISSING Acirc: 'Latin capital letter A with circumflex', // MISSING Atilde: 'Latin capital letter A with tilde', // MISSING Auml: 'Latin capital letter A with diaeresis', // MISSING Aring: 'Latin capital letter A with ring above', // MISSING AElig: 'Latin Capital letter Æ', // MISSING Ccedil: 'Latin capital letter C with cedilla', // MISSING Egrave: 'Latin capital letter E with grave accent', // MISSING Eacute: 'Latin capital letter E with acute accent', // MISSING Ecirc: 'Latin capital letter E with circumflex', // MISSING Euml: 'Latin capital letter E with diaeresis', // MISSING Igrave: 'Latin capital letter I with grave accent', // MISSING Iacute: 'Latin capital letter I with acute accent', // MISSING Icirc: 'Latin capital letter I with circumflex', // MISSING Iuml: 'Latin capital letter I with diaeresis', // MISSING ETH: 'Latin capital letter Eth', // MISSING Ntilde: 'Latin capital letter N with tilde', // MISSING Ograve: 'Latin capital letter O with grave accent', // MISSING Oacute: 'Latin capital letter O with acute accent', // MISSING Ocirc: 'Latin capital letter O with circumflex', // MISSING Otilde: 'Latin capital letter O with tilde', // MISSING Ouml: 'Latin capital letter O with diaeresis', // MISSING times: 'Kertomerkki', Oslash: 'Latin capital letter O with stroke', // MISSING Ugrave: 'Latin capital letter U with grave accent', // MISSING Uacute: 'Latin capital letter U with acute accent', // MISSING Ucirc: 'Latin capital letter U with circumflex', // MISSING Uuml: 'Latin capital letter U with diaeresis', // MISSING Yacute: 'Latin capital letter Y with acute accent', // MISSING THORN: 'Latin capital letter Thorn', // MISSING szlig: 'Latin small letter sharp s', // MISSING agrave: 'Latin small letter a with grave accent', // MISSING aacute: 'Latin small letter a with acute accent', // MISSING acirc: 'Latin small letter a with circumflex', // MISSING atilde: 'Latin small letter a with tilde', // MISSING auml: 'Latin small letter a with diaeresis', // MISSING aring: 'Latin small letter a with ring above', // MISSING aelig: 'Latin small letter æ', // MISSING ccedil: 'Latin small letter c with cedilla', // MISSING egrave: 'Latin small letter e with grave accent', // MISSING eacute: 'Latin small letter e with acute accent', // MISSING ecirc: 'Latin small letter e with circumflex', // MISSING euml: 'Latin small letter e with diaeresis', // MISSING igrave: 'Latin small letter i with grave accent', // MISSING iacute: 'Latin small letter i with acute accent', // MISSING icirc: 'Latin small letter i with circumflex', // MISSING iuml: 'Latin small letter i with diaeresis', // MISSING eth: 'Latin small letter eth', // MISSING ntilde: 'Latin small letter n with tilde', // MISSING ograve: 'Latin small letter o with grave accent', // MISSING oacute: 'Latin small letter o with acute accent', // MISSING ocirc: 'Latin small letter o with circumflex', // MISSING otilde: 'Latin small letter o with tilde', // MISSING ouml: 'Latin small letter o with diaeresis', // MISSING divide: 'Jakomerkki', oslash: 'Latin small letter o with stroke', // MISSING ugrave: 'Latin small letter u with grave accent', // MISSING uacute: 'Latin small letter u with acute accent', // MISSING ucirc: 'Latin small letter u with circumflex', // MISSING uuml: 'Latin small letter u with diaeresis', // MISSING yacute: 'Latin small letter y with acute accent', // MISSING thorn: 'Latin small letter thorn', // MISSING yuml: 'Latin small letter y with diaeresis', // MISSING OElig: 'Latin capital ligature OE', // MISSING oelig: 'Latin small ligature oe', // MISSING '372': 'Latin capital letter W with circumflex', // MISSING '374': 'Latin capital letter Y with circumflex', // MISSING '373': 'Latin small letter w with circumflex', // MISSING '375': 'Latin small letter y with circumflex', // MISSING sbquo: 'Single low-9 quotation mark', // MISSING '8219': 'Single high-reversed-9 quotation mark', // MISSING bdquo: 'Double low-9 quotation mark', // MISSING hellip: 'Horizontal ellipsis', // MISSING trade: 'Tavaramerkki merkki', '9658': 'Black right-pointing pointer', // MISSING bull: 'Bullet', // MISSING rarr: 'Nuoli oikealle', rArr: 'Kaksoisnuoli oikealle', hArr: 'Kaksoisnuoli oikealle ja vasemmalle', diams: 'Black diamond suit', // MISSING asymp: 'Noin' });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/specialchar/lang/fi.js
JavaScript
asf20
6,116
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'cy', { euro: 'Arwydd yr Ewro', lsquo: 'Dyfynnod chwith unigol', rsquo: 'Dyfynnod dde unigol', ldquo: 'Dyfynnod chwith dwbl', rdquo: 'Dyfynnod dde dwbl', ndash: 'Cysylltnod en', mdash: 'Cysylltnod em', iexcl: 'Ebychnod gwrthdro', cent: 'Arwydd sent', pound: 'Arwydd punt', curren: 'Arwydd arian cyfred', yen: 'Arwydd yen', brvbar: 'Bar toriedig', sect: 'Arwydd adran', uml: 'Didolnod', copy: 'Arwydd hawlfraint', ordf: 'Dangosydd benywaidd', laquo: 'Dyfynnod dwbl ar ongl i\'r chwith', not: 'Arwydd Nid', reg: 'Arwydd cofrestredig', macr: 'Macron', deg: 'Arwydd gradd', sup2: 'Dau uwchsgript', sup3: 'Tri uwchsgript', acute: 'Acen ddyrchafedig', micro: 'Arwydd micro', para: 'Arwydd pilcrow', middot: 'Dot canol', cedil: 'Sedila', sup1: 'Un uwchsgript', ordm: 'Dangosydd gwrywaidd', raquo: 'Dyfynnod dwbl ar ongl i\'r dde', frac14: 'Ffracsiwn cyffredin un cwarter', frac12: 'Ffracsiwn cyffredin un hanner', frac34: 'Ffracsiwn cyffredin tri chwarter', iquest: 'Marc cwestiwn gwrthdroëdig', Agrave: 'Priflythyren A Lladinaidd gydag acen ddisgynedig', Aacute: 'Priflythyren A Lladinaidd gydag acen ddyrchafedig', Acirc: 'Priflythyren A Lladinaidd gydag acen grom', Atilde: 'Priflythyren A Lladinaidd gyda thild', Auml: 'Priflythyren A Lladinaidd gyda didolnod', Aring: 'Priflythyren A Lladinaidd gyda chylch uwchben', AElig: 'Priflythyren Æ Lladinaidd', Ccedil: 'Priflythyren C Lladinaidd gyda sedila', Egrave: 'Priflythyren E Lladinaidd gydag acen ddisgynedig', Eacute: 'Priflythyren E Lladinaidd gydag acen ddyrchafedig', Ecirc: 'Priflythyren E Lladinaidd gydag acen grom', Euml: 'Priflythyren E Lladinaidd gyda didolnod', Igrave: 'Priflythyren I Lladinaidd gydag acen ddisgynedig', Iacute: 'Priflythyren I Lladinaidd gydag acen ddyrchafedig', Icirc: 'Priflythyren I Lladinaidd gydag acen grom', Iuml: 'Priflythyren I Lladinaidd gyda didolnod', ETH: 'Priflythyren Eth', Ntilde: 'Priflythyren N Lladinaidd gyda thild', Ograve: 'Priflythyren O Lladinaidd gydag acen ddisgynedig', Oacute: 'Priflythyren O Lladinaidd gydag acen ddyrchafedig', Ocirc: 'Priflythyren O Lladinaidd gydag acen grom', Otilde: 'Priflythyren O Lladinaidd gyda thild', Ouml: 'Priflythyren O Lladinaidd gyda didolnod', times: 'Arwydd lluosi', Oslash: 'Priflythyren O Lladinaidd gyda strôc', Ugrave: 'Priflythyren U Lladinaidd gydag acen ddisgynedig', Uacute: 'Priflythyren U Lladinaidd gydag acen ddyrchafedig', Ucirc: 'Priflythyren U Lladinaidd gydag acen grom', Uuml: 'Priflythyren U Lladinaidd gyda didolnod', Yacute: 'Priflythyren Y Lladinaidd gydag acen ddyrchafedig', THORN: 'Priflythyren Thorn', szlig: 'Llythyren s fach Lladinaidd siarp ', agrave: 'Llythyren a fach Lladinaidd gydag acen ddisgynedig', aacute: 'Llythyren a fach Lladinaidd gydag acen ddyrchafedig', acirc: 'Llythyren a fach Lladinaidd gydag acen grom', atilde: 'Llythyren a fach Lladinaidd gyda thild', auml: 'Llythyren a fach Lladinaidd gyda didolnod', aring: 'Llythyren a fach Lladinaidd gyda chylch uwchben', aelig: 'Llythyren æ fach Lladinaidd', ccedil: 'Llythyren c fach Lladinaidd gyda sedila', egrave: 'Llythyren e fach Lladinaidd gydag acen ddisgynedig', eacute: 'Llythyren e fach Lladinaidd gydag acen ddyrchafedig', ecirc: 'Llythyren e fach Lladinaidd gydag acen grom', euml: 'Llythyren e fach Lladinaidd gyda didolnod', igrave: 'Llythyren i fach Lladinaidd gydag acen ddisgynedig', iacute: 'Llythyren i fach Lladinaidd gydag acen ddyrchafedig', icirc: 'Llythyren i fach Lladinaidd gydag acen grom', iuml: 'Llythyren i fach Lladinaidd gyda didolnod', eth: 'Llythyren eth fach', ntilde: 'Llythyren n fach Lladinaidd gyda thild', ograve: 'Llythyren o fach Lladinaidd gydag acen ddisgynedig', oacute: 'Llythyren o fach Lladinaidd gydag acen ddyrchafedig', ocirc: 'Llythyren o fach Lladinaidd gydag acen grom', otilde: 'Llythyren o fach Lladinaidd gyda thild', ouml: 'Llythyren o fach Lladinaidd gyda didolnod', divide: 'Arwydd rhannu', oslash: 'Llyth', ugrave: 'Llythyren u fach Lladinaidd gydag acen ddisgynedig', uacute: 'Llythyren u fach Lladinaidd gydag acen ddyrchafedig', ucirc: 'Llythyren u fach Lladinaidd gydag acen grom', uuml: 'Llythyren u fach Lladinaidd gyda didolnod', yacute: 'Llythyren y fach Lladinaidd gydag acen ddisgynedig', thorn: 'Llythyren o fach Lladinaidd gyda strôc', yuml: 'Llythyren y fach Lladinaidd gyda didolnod', OElig: 'Priflythyren cwlwm OE Lladinaidd ', oelig: 'Priflythyren cwlwm oe Lladinaidd ', '372': 'Priflythyren W gydag acen grom', '374': 'Priflythyren Y gydag acen grom', '373': 'Llythyren w fach gydag acen grom', '375': 'Llythyren y fach gydag acen grom', sbquo: 'Dyfynnod sengl 9-isel', '8219': 'Dyfynnod sengl 9-uchel cildro', bdquo: 'Dyfynnod dwbl 9-isel', hellip: 'Coll geiriau llorweddol', trade: 'Arwydd marc masnachol', '9658': 'Pwyntydd du i\'r dde', bull: 'Bwled', rarr: 'Saeth i\'r dde', rArr: 'Saeth ddwbl i\'r dde', hArr: 'Saeth ddwbl i\'r chwith', diams: 'Siwt diemwnt du', asymp: 'Bron yn hafal iddo' });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/specialchar/lang/cy.js
JavaScript
asf20
5,352
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'no', { euro: 'Eurosymbol', lsquo: 'Venstre enkelt anførselstegn', rsquo: 'Høyre enkelt anførselstegn', ldquo: 'Venstre dobbelt anførselstegn', rdquo: 'Høyre anførsesltegn', ndash: 'Kort tankestrek', mdash: 'Lang tankestrek', iexcl: 'Omvendt utropstegn', cent: 'Centsymbol', pound: 'Pundsymbol', curren: 'Valutategn', yen: 'Yensymbol', brvbar: 'Brutt loddrett strek', sect: 'Paragraftegn', uml: 'Tøddel', copy: 'Copyrighttegn', ordf: 'Feminin ordensindikator', laquo: 'Venstre anførselstegn', not: 'Negasjonstegn', reg: 'Registrert varemerke-tegn', macr: 'Makron', deg: 'Gradsymbol', sup2: 'Hevet totall', sup3: 'Hevet tretall', acute: 'Akutt aksent', micro: 'Mikrosymbol', para: 'Avsnittstegn', middot: 'Midtstilt prikk', cedil: 'Cedille', sup1: 'Hevet ettall', ordm: 'Maskulin ordensindikator', raquo: 'Høyre anførselstegn', frac14: 'Fjerdedelsbrøk', frac12: 'Halvbrøk', frac34: 'Tre fjerdedelers brøk', iquest: 'Omvendt spørsmålstegn', Agrave: 'Stor A med grav aksent', Aacute: 'Stor A med akutt aksent', Acirc: 'Stor A med cirkumfleks', Atilde: 'Stor A med tilde', Auml: 'Stor A med tøddel', Aring: 'Stor Å', AElig: 'Stor Æ', Ccedil: 'Stor C med cedille', Egrave: 'Stor E med grav aksent', Eacute: 'Stor E med akutt aksent', Ecirc: 'Stor E med cirkumfleks', Euml: 'Stor E med tøddel', Igrave: 'Stor I med grav aksent', Iacute: 'Stor I med akutt aksent', Icirc: 'Stor I med cirkumfleks', Iuml: 'Stor I med tøddel', ETH: 'Stor Edd/stungen D', Ntilde: 'Stor N med tilde', Ograve: 'Stor O med grav aksent', Oacute: 'Stor O med akutt aksent', Ocirc: 'Stor O med cirkumfleks', Otilde: 'Stor O med tilde', Ouml: 'Stor O med tøddel', times: 'Multiplikasjonstegn', Oslash: 'Stor Ø', Ugrave: 'Stor U med grav aksent', Uacute: 'Stor U med akutt aksent', Ucirc: 'Stor U med cirkumfleks', Uuml: 'Stor U med tøddel', Yacute: 'Stor Y med akutt aksent', THORN: 'Stor Thorn', szlig: 'Liten dobbelt-s/Eszett', agrave: 'Liten a med grav aksent', aacute: 'Liten a med akutt aksent', acirc: 'Liten a med cirkumfleks', atilde: 'Liten a med tilde', auml: 'Liten a med tøddel', aring: 'Liten å', aelig: 'Liten æ', ccedil: 'Liten c med cedille', egrave: 'Liten e med grav aksent', eacute: 'Liten e med akutt aksent', ecirc: 'Liten e med cirkumfleks', euml: 'Liten e med tøddel', igrave: 'Liten i med grav aksent', iacute: 'Liten i med akutt aksent', icirc: 'Liten i med cirkumfleks', iuml: 'Liten i med tøddel', eth: 'Liten edd/stungen d', ntilde: 'Liten n med tilde', ograve: 'Liten o med grav aksent', oacute: 'Liten o med akutt aksent', ocirc: 'Liten o med cirkumfleks', otilde: 'Liten o med tilde', ouml: 'Liten o med tøddel', divide: 'Divisjonstegn', oslash: 'Liten ø', ugrave: 'Liten u med grav aksent', uacute: 'Liten u med akutt aksent', ucirc: 'Liten u med cirkumfleks', uuml: 'Liten u med tøddel', yacute: 'Liten y med akutt aksent', thorn: 'Liten thorn', yuml: 'Liten y med tøddel', OElig: 'Stor ligatur av O og E', oelig: 'Liten ligatur av o og e', '372': 'Stor W med cirkumfleks', '374': 'Stor Y med cirkumfleks', '373': 'Liten w med cirkumfleks', '375': 'Liten y med cirkumfleks', sbquo: 'Enkelt lavt 9-anførselstegn', '8219': 'Enkelt høyt reversert 9-anførselstegn', bdquo: 'Dobbelt lavt 9-anførselstegn', hellip: 'Ellipse', trade: 'Varemerkesymbol', '9658': 'Svart høyrevendt peker', bull: 'Tykk interpunkt', rarr: 'Høyrevendt pil', rArr: 'Dobbel høyrevendt pil', hArr: 'Dobbel venstrevendt pil', diams: 'Svart ruter', asymp: 'Omtrent likhetstegn' });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/specialchar/lang/no.js
JavaScript
asf20
3,920
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'fa', { euro: 'نشان یورو', lsquo: 'علامت نقل قول تکی چپ', rsquo: 'علامت نقل قول تکی راست', ldquo: 'علامت دوتایی نقل قول چپ', rdquo: 'علامت دوتایی نقل قول راست', ndash: 'En dash', // MISSING mdash: 'Em dash', // MISSING iexcl: 'علامت گذاری به عنوان علامت تعجب وارونه', cent: 'نشان سنت', pound: 'نشان پوند', curren: 'نشان ارز', yen: 'نشان ین', brvbar: 'نوار شکسته', sect: 'نشان بخش', uml: 'Diaeresis', // MISSING copy: 'نشان کپی رایت', ordf: 'Feminine ordinal indicator', // MISSING laquo: 'Left-pointing double angle quotation mark', // MISSING not: 'علامت ثبت نشده', reg: 'علامت ثبت شده', macr: 'Macron', // MISSING deg: 'نشان درجه', sup2: 'بالانویس دو', sup3: 'بالانویس سه', acute: 'لهجه غلیظ', micro: 'نشان مایکرو', para: 'Pilcrow sign', // MISSING middot: 'نقطه میانی', cedil: 'Cedilla', // MISSING sup1: 'Superscript one', // MISSING ordm: 'Masculine ordinal indicator', // MISSING raquo: 'نشان زاویهدار دوتایی نقل قول راست چین', frac14: 'Vulgar fraction one quarter', // MISSING frac12: 'Vulgar fraction one half', // MISSING frac34: 'Vulgar fraction three quarters', // MISSING iquest: 'Inverted question mark', // MISSING Agrave: 'Latin capital letter A with grave accent', // MISSING Aacute: 'Latin capital letter A with acute accent', // MISSING Acirc: 'Latin capital letter A with circumflex', // MISSING Atilde: 'Latin capital letter A with tilde', // MISSING Auml: 'Latin capital letter A with diaeresis', // MISSING Aring: 'Latin capital letter A with ring above', // MISSING AElig: 'Latin Capital letter Æ', // MISSING Ccedil: 'Latin capital letter C with cedilla', // MISSING Egrave: 'Latin capital letter E with grave accent', // MISSING Eacute: 'Latin capital letter E with acute accent', // MISSING Ecirc: 'Latin capital letter E with circumflex', // MISSING Euml: 'Latin capital letter E with diaeresis', // MISSING Igrave: 'Latin capital letter I with grave accent', // MISSING Iacute: 'Latin capital letter I with acute accent', // MISSING Icirc: 'Latin capital letter I with circumflex', // MISSING Iuml: 'Latin capital letter I with diaeresis', // MISSING ETH: 'Latin capital letter Eth', // MISSING Ntilde: 'Latin capital letter N with tilde', // MISSING Ograve: 'Latin capital letter O with grave accent', // MISSING Oacute: 'Latin capital letter O with acute accent', // MISSING Ocirc: 'Latin capital letter O with circumflex', // MISSING Otilde: 'Latin capital letter O with tilde', // MISSING Ouml: 'Latin capital letter O with diaeresis', // MISSING times: 'Multiplication sign', // MISSING Oslash: 'Latin capital letter O with stroke', // MISSING Ugrave: 'Latin capital letter U with grave accent', // MISSING Uacute: 'Latin capital letter U with acute accent', // MISSING Ucirc: 'Latin capital letter U with circumflex', // MISSING Uuml: 'Latin capital letter U with diaeresis', // MISSING Yacute: 'Latin capital letter Y with acute accent', // MISSING THORN: 'Latin capital letter Thorn', // MISSING szlig: 'Latin small letter sharp s', // MISSING agrave: 'Latin small letter a with grave accent', // MISSING aacute: 'Latin small letter a with acute accent', // MISSING acirc: 'Latin small letter a with circumflex', // MISSING atilde: 'Latin small letter a with tilde', // MISSING auml: 'Latin small letter a with diaeresis', // MISSING aring: 'Latin small letter a with ring above', // MISSING aelig: 'Latin small letter æ', // MISSING ccedil: 'Latin small letter c with cedilla', // MISSING egrave: 'Latin small letter e with grave accent', // MISSING eacute: 'Latin small letter e with acute accent', // MISSING ecirc: 'Latin small letter e with circumflex', // MISSING euml: 'Latin small letter e with diaeresis', // MISSING igrave: 'Latin small letter i with grave accent', // MISSING iacute: 'Latin small letter i with acute accent', // MISSING icirc: 'Latin small letter i with circumflex', // MISSING iuml: 'Latin small letter i with diaeresis', // MISSING eth: 'Latin small letter eth', // MISSING ntilde: 'Latin small letter n with tilde', // MISSING ograve: 'Latin small letter o with grave accent', // MISSING oacute: 'Latin small letter o with acute accent', // MISSING ocirc: 'Latin small letter o with circumflex', // MISSING otilde: 'Latin small letter o with tilde', // MISSING ouml: 'Latin small letter o with diaeresis', // MISSING divide: 'Division sign', // MISSING oslash: 'Latin small letter o with stroke', // MISSING ugrave: 'Latin small letter u with grave accent', // MISSING uacute: 'Latin small letter u with acute accent', // MISSING ucirc: 'Latin small letter u with circumflex', // MISSING uuml: 'Latin small letter u with diaeresis', // MISSING yacute: 'Latin small letter y with acute accent', // MISSING thorn: 'Latin small letter thorn', // MISSING yuml: 'Latin small letter y with diaeresis', // MISSING OElig: 'Latin capital ligature OE', // MISSING oelig: 'Latin small ligature oe', // MISSING '372': 'Latin capital letter W with circumflex', // MISSING '374': 'Latin capital letter Y with circumflex', // MISSING '373': 'Latin small letter w with circumflex', // MISSING '375': 'Latin small letter y with circumflex', // MISSING sbquo: 'Single low-9 quotation mark', // MISSING '8219': 'Single high-reversed-9 quotation mark', // MISSING bdquo: 'Double low-9 quotation mark', // MISSING hellip: 'Horizontal ellipsis', // MISSING trade: 'Trade mark sign', // MISSING '9658': 'Black right-pointing pointer', // MISSING bull: 'Bullet', // MISSING rarr: 'Rightwards arrow', // MISSING rArr: 'Rightwards double arrow', // MISSING hArr: 'جهتنمای دوتایی چپ به راست', diams: 'Black diamond suit', // MISSING asymp: 'تقریبا برابر با' });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/specialchar/lang/fa.js
JavaScript
asf20
6,350
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'et', { euro: 'Euromärk', lsquo: 'Alustav ühekordne jutumärk', rsquo: 'Lõpetav ühekordne jutumärk', ldquo: 'Alustav kahekordne jutumärk', rdquo: 'Lõpetav kahekordne jutumärk', ndash: 'Enn-kriips', mdash: 'Emm-kriips', iexcl: 'Pööratud hüüumärk', cent: 'Sendimärk', pound: 'Naela märk', curren: 'Valuutamärk', yen: 'Jeeni märk', brvbar: 'Katkestatud kriips', sect: 'Lõigu märk', uml: 'Täpid', copy: 'Autoriõiguse märk', ordf: 'Feminine ordinal indicator', // MISSING laquo: 'Left-pointing double angle quotation mark', // MISSING not: 'Ei-märk', reg: 'Registered sign', // MISSING macr: 'Macron', // MISSING deg: 'Kraadimärk', sup2: 'Ülaindeks kaks', sup3: 'Ülaindeks kolm', acute: 'Acute accent', // MISSING micro: 'Mikro-märk', para: 'Pilcrow sign', // MISSING middot: 'Keskpunkt', cedil: 'Cedilla', // MISSING sup1: 'Ülaindeks üks', ordm: 'Masculine ordinal indicator', // MISSING raquo: 'Right-pointing double angle quotation mark', // MISSING frac14: 'Vulgar fraction one quarter', // MISSING frac12: 'Vulgar fraction one half', // MISSING frac34: 'Vulgar fraction three quarters', // MISSING iquest: 'Inverted question mark', // MISSING Agrave: 'Latin capital letter A with grave accent', // MISSING Aacute: 'Latin capital letter A with acute accent', // MISSING Acirc: 'Latin capital letter A with circumflex', // MISSING Atilde: 'Ladina suur A tildega', Auml: 'Latin capital letter A with diaeresis', // MISSING Aring: 'Latin capital letter A with ring above', // MISSING AElig: 'Latin Capital letter Æ', // MISSING Ccedil: 'Latin capital letter C with cedilla', // MISSING Egrave: 'Latin capital letter E with grave accent', // MISSING Eacute: 'Latin capital letter E with acute accent', // MISSING Ecirc: 'Latin capital letter E with circumflex', // MISSING Euml: 'Latin capital letter E with diaeresis', // MISSING Igrave: 'Latin capital letter I with grave accent', // MISSING Iacute: 'Latin capital letter I with acute accent', // MISSING Icirc: 'Latin capital letter I with circumflex', // MISSING Iuml: 'Latin capital letter I with diaeresis', // MISSING ETH: 'Latin capital letter Eth', // MISSING Ntilde: 'Latin capital letter N with tilde', // MISSING Ograve: 'Latin capital letter O with grave accent', // MISSING Oacute: 'Latin capital letter O with acute accent', // MISSING Ocirc: 'Latin capital letter O with circumflex', // MISSING Otilde: 'Latin capital letter O with tilde', // MISSING Ouml: 'Täppidega ladina suur O', times: 'Multiplication sign', // MISSING Oslash: 'Latin capital letter O with stroke', // MISSING Ugrave: 'Latin capital letter U with grave accent', // MISSING Uacute: 'Latin capital letter U with acute accent', // MISSING Ucirc: 'Kandilise katusega suur ladina U', Uuml: 'Täppidega ladina suur U', Yacute: 'Latin capital letter Y with acute accent', // MISSING THORN: 'Latin capital letter Thorn', // MISSING szlig: 'Ladina väike terav s', agrave: 'Latin small letter a with grave accent', // MISSING aacute: 'Latin small letter a with acute accent', // MISSING acirc: 'Kandilise katusega ladina väike a', atilde: 'Tildega ladina väike a', auml: 'Täppidega ladina väike a', aring: 'Latin small letter a with ring above', // MISSING aelig: 'Latin small letter æ', // MISSING ccedil: 'Latin small letter c with cedilla', // MISSING egrave: 'Latin small letter e with grave accent', // MISSING eacute: 'Latin small letter e with acute accent', // MISSING ecirc: 'Latin small letter e with circumflex', // MISSING euml: 'Latin small letter e with diaeresis', // MISSING igrave: 'Latin small letter i with grave accent', // MISSING iacute: 'Latin small letter i with acute accent', // MISSING icirc: 'Latin small letter i with circumflex', // MISSING iuml: 'Latin small letter i with diaeresis', // MISSING eth: 'Latin small letter eth', // MISSING ntilde: 'Latin small letter n with tilde', // MISSING ograve: 'Latin small letter o with grave accent', // MISSING oacute: 'Latin small letter o with acute accent', // MISSING ocirc: 'Latin small letter o with circumflex', // MISSING otilde: 'Latin small letter o with tilde', // MISSING ouml: 'Latin small letter o with diaeresis', // MISSING divide: 'Division sign', // MISSING oslash: 'Latin small letter o with stroke', // MISSING ugrave: 'Latin small letter u with grave accent', // MISSING uacute: 'Latin small letter u with acute accent', // MISSING ucirc: 'Latin small letter u with circumflex', // MISSING uuml: 'Latin small letter u with diaeresis', // MISSING yacute: 'Latin small letter y with acute accent', // MISSING thorn: 'Latin small letter thorn', // MISSING yuml: 'Latin small letter y with diaeresis', // MISSING OElig: 'Latin capital ligature OE', // MISSING oelig: 'Latin small ligature oe', // MISSING '372': 'Latin capital letter W with circumflex', // MISSING '374': 'Latin capital letter Y with circumflex', // MISSING '373': 'Latin small letter w with circumflex', // MISSING '375': 'Latin small letter y with circumflex', // MISSING sbquo: 'Single low-9 quotation mark', // MISSING '8219': 'Single high-reversed-9 quotation mark', // MISSING bdquo: 'Double low-9 quotation mark', // MISSING hellip: 'Horizontal ellipsis', // MISSING trade: 'Trade mark sign', // MISSING '9658': 'Black right-pointing pointer', // MISSING bull: 'Bullet', // MISSING rarr: 'Rightwards arrow', // MISSING rArr: 'Rightwards double arrow', // MISSING hArr: 'Left right double arrow', // MISSING diams: 'Black diamond suit', // MISSING asymp: 'Almost equal to' // MISSING });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/specialchar/lang/et.js
JavaScript
asf20
5,945
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'he', { euro: 'יורו', lsquo: 'Left single quotation mark', // MISSING rsquo: 'Right single quotation mark', // MISSING ldquo: 'Left double quotation mark', // MISSING rdquo: 'Right double quotation mark', // MISSING ndash: 'En dash', // MISSING mdash: 'Em dash', // MISSING iexcl: 'Inverted exclamation mark', // MISSING cent: 'Cent sign', // MISSING pound: 'Pound sign', // MISSING curren: 'Currency sign', // MISSING yen: 'Yen sign', // MISSING brvbar: 'Broken bar', // MISSING sect: 'Section sign', // MISSING uml: 'Diaeresis', // MISSING copy: 'Copyright sign', // MISSING ordf: 'Feminine ordinal indicator', // MISSING laquo: 'Left-pointing double angle quotation mark', // MISSING not: 'Not sign', // MISSING reg: 'Registered sign', // MISSING macr: 'Macron', // MISSING deg: 'Degree sign', // MISSING sup2: 'Superscript two', // MISSING sup3: 'Superscript three', // MISSING acute: 'Acute accent', // MISSING micro: 'Micro sign', // MISSING para: 'Pilcrow sign', // MISSING middot: 'Middle dot', // MISSING cedil: 'Cedilla', // MISSING sup1: 'Superscript one', // MISSING ordm: 'Masculine ordinal indicator', // MISSING raquo: 'Right-pointing double angle quotation mark', // MISSING frac14: 'Vulgar fraction one quarter', // MISSING frac12: 'Vulgar fraction one half', // MISSING frac34: 'Vulgar fraction three quarters', // MISSING iquest: 'Inverted question mark', // MISSING Agrave: 'Latin capital letter A with grave accent', // MISSING Aacute: 'Latin capital letter A with acute accent', // MISSING Acirc: 'Latin capital letter A with circumflex', // MISSING Atilde: 'Latin capital letter A with tilde', // MISSING Auml: 'Latin capital letter A with diaeresis', // MISSING Aring: 'Latin capital letter A with ring above', // MISSING AElig: 'Latin Capital letter Æ', // MISSING Ccedil: 'Latin capital letter C with cedilla', // MISSING Egrave: 'Latin capital letter E with grave accent', // MISSING Eacute: 'Latin capital letter E with acute accent', // MISSING Ecirc: 'Latin capital letter E with circumflex', // MISSING Euml: 'Latin capital letter E with diaeresis', // MISSING Igrave: 'Latin capital letter I with grave accent', // MISSING Iacute: 'Latin capital letter I with acute accent', // MISSING Icirc: 'Latin capital letter I with circumflex', // MISSING Iuml: 'Latin capital letter I with diaeresis', // MISSING ETH: 'Latin capital letter Eth', // MISSING Ntilde: 'Latin capital letter N with tilde', // MISSING Ograve: 'Latin capital letter O with grave accent', // MISSING Oacute: 'Latin capital letter O with acute accent', // MISSING Ocirc: 'Latin capital letter O with circumflex', // MISSING Otilde: 'Latin capital letter O with tilde', // MISSING Ouml: 'Latin capital letter O with diaeresis', // MISSING times: 'Multiplication sign', // MISSING Oslash: 'Latin capital letter O with stroke', // MISSING Ugrave: 'Latin capital letter U with grave accent', // MISSING Uacute: 'Latin capital letter U with acute accent', // MISSING Ucirc: 'Latin capital letter U with circumflex', // MISSING Uuml: 'Latin capital letter U with diaeresis', // MISSING Yacute: 'Latin capital letter Y with acute accent', // MISSING THORN: 'Latin capital letter Thorn', // MISSING szlig: 'Latin small letter sharp s', // MISSING agrave: 'Latin small letter a with grave accent', // MISSING aacute: 'Latin small letter a with acute accent', // MISSING acirc: 'Latin small letter a with circumflex', // MISSING atilde: 'Latin small letter a with tilde', // MISSING auml: 'Latin small letter a with diaeresis', // MISSING aring: 'Latin small letter a with ring above', // MISSING aelig: 'Latin small letter æ', // MISSING ccedil: 'Latin small letter c with cedilla', // MISSING egrave: 'Latin small letter e with grave accent', // MISSING eacute: 'Latin small letter e with acute accent', // MISSING ecirc: 'Latin small letter e with circumflex', // MISSING euml: 'Latin small letter e with diaeresis', // MISSING igrave: 'Latin small letter i with grave accent', // MISSING iacute: 'Latin small letter i with acute accent', // MISSING icirc: 'Latin small letter i with circumflex', // MISSING iuml: 'Latin small letter i with diaeresis', // MISSING eth: 'Latin small letter eth', // MISSING ntilde: 'Latin small letter n with tilde', // MISSING ograve: 'Latin small letter o with grave accent', // MISSING oacute: 'Latin small letter o with acute accent', // MISSING ocirc: 'Latin small letter o with circumflex', // MISSING otilde: 'Latin small letter o with tilde', // MISSING ouml: 'Latin small letter o with diaeresis', // MISSING divide: 'Division sign', // MISSING oslash: 'Latin small letter o with stroke', // MISSING ugrave: 'Latin small letter u with grave accent', // MISSING uacute: 'Latin small letter u with acute accent', // MISSING ucirc: 'Latin small letter u with circumflex', // MISSING uuml: 'Latin small letter u with diaeresis', // MISSING yacute: 'Latin small letter y with acute accent', // MISSING thorn: 'Latin small letter thorn', // MISSING yuml: 'Latin small letter y with diaeresis', // MISSING OElig: 'Latin capital ligature OE', // MISSING oelig: 'Latin small ligature oe', // MISSING '372': 'Latin capital letter W with circumflex', // MISSING '374': 'Latin capital letter Y with circumflex', // MISSING '373': 'Latin small letter w with circumflex', // MISSING '375': 'Latin small letter y with circumflex', // MISSING sbquo: 'Single low-9 quotation mark', // MISSING '8219': 'Single high-reversed-9 quotation mark', // MISSING bdquo: 'Double low-9 quotation mark', // MISSING hellip: 'Horizontal ellipsis', // MISSING trade: 'Trade mark sign', // MISSING '9658': 'Black right-pointing pointer', // MISSING bull: 'Bullet', // MISSING rarr: 'Rightwards arrow', // MISSING rArr: 'Rightwards double arrow', // MISSING hArr: 'Left right double arrow', // MISSING diams: 'Black diamond suit', // MISSING asymp: 'Almost equal to' // MISSING });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/specialchar/lang/he.js
JavaScript
asf20
6,319
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'cs', { euro: 'Znak eura', lsquo: 'Počáteční uvozovka jednoduchá', rsquo: 'Koncová uvozovka jednoduchá', ldquo: 'Počáteční uvozovka dvojitá', rdquo: 'Koncová uvozovka dvojitá', ndash: 'En pomlčka', mdash: 'Em pomlčka', iexcl: 'Obrácený vykřičník', cent: 'Znak centu', pound: 'Znak libry', curren: 'Znak měny', yen: 'Znak jenu', brvbar: 'Přerušená svislá čára', sect: 'Znak oddílu', uml: 'Přehláska', copy: 'Znak copyrightu', ordf: 'Ženský indikátor rodu', laquo: 'Znak dvojitých lomených uvozovek vlevo', not: 'Logistický zápor', reg: 'Znak registrace', macr: 'Pomlčka nad', deg: 'Znak stupně', sup2: 'Dvojka jako horní index', sup3: 'Trojka jako horní index', acute: 'Čárka nad vpravo', micro: 'Znak mikro', para: 'Znak odstavce', middot: 'Tečka uprostřed', cedil: 'Ocásek vlevo', sup1: 'Jednička jako horní index', ordm: 'Mužský indikátor rodu', raquo: 'Znak dvojitých lomených uvozovek vpravo', frac14: 'Obyčejný zlomek jedna čtvrtina', frac12: 'Obyčejný zlomek jedna polovina', frac34: 'Obyčejný zlomek tři čtvrtiny', iquest: 'Znak obráceného otazníku', Agrave: 'Velké písmeno latinky A s čárkou nad vlevo', Aacute: 'Velké písmeno latinky A s čárkou nad vpravo', Acirc: 'Velké písmeno latinky A s vokáněm', Atilde: 'Velké písmeno latinky A s tildou', Auml: 'Velké písmeno latinky A s dvěma tečkami', Aring: 'Velké písmeno latinky A s kroužkem nad', AElig: 'Velké písmeno latinky Ae', Ccedil: 'Velké písmeno latinky C s ocáskem vlevo', Egrave: 'Velké písmeno latinky E s čárkou nad vlevo', Eacute: 'Velké písmeno latinky E s čárkou nad vpravo', Ecirc: 'Velké písmeno latinky E s vokáněm', Euml: 'Velké písmeno latinky E s dvěma tečkami', Igrave: 'Velké písmeno latinky I s čárkou nad vlevo', Iacute: 'Velké písmeno latinky I s čárkou nad vpravo', Icirc: 'Velké písmeno latinky I s vokáněm', Iuml: 'Velké písmeno latinky I s dvěma tečkami', ETH: 'Velké písmeno latinky Eth', Ntilde: 'Velké písmeno latinky N s tildou', Ograve: 'Velké písmeno latinky O s čárkou nad vlevo', Oacute: 'Velké písmeno latinky O s čárkou nad vpravo', Ocirc: 'Velké písmeno latinky O s vokáněm', Otilde: 'Velké písmeno latinky O s tildou', Ouml: 'Velké písmeno latinky O s dvěma tečkami', times: 'Znak násobení', Oslash: 'Velké písmeno latinky O přeškrtnuté', Ugrave: 'Velké písmeno latinky U s čárkou nad vlevo', Uacute: 'Velké písmeno latinky U s čárkou nad vpravo', Ucirc: 'Velké písmeno latinky U s vokáněm', Uuml: 'Velké písmeno latinky U s dvěma tečkami', Yacute: 'Velké písmeno latinky Y s čárkou nad vpravo', THORN: 'Velké písmeno latinky Thorn', szlig: 'Malé písmeno latinky ostré s', agrave: 'Malé písmeno latinky a s čárkou nad vlevo', aacute: 'Malé písmeno latinky a s čárkou nad vpravo', acirc: 'Malé písmeno latinky a s vokáněm', atilde: 'Malé písmeno latinky a s tildou', auml: 'Malé písmeno latinky a s dvěma tečkami', aring: 'Malé písmeno latinky a s kroužkem nad', aelig: 'Malé písmeno latinky ae', ccedil: 'Malé písmeno latinky c s ocáskem vlevo', egrave: 'Malé písmeno latinky e s čárkou nad vlevo', eacute: 'Malé písmeno latinky e s čárkou nad vpravo', ecirc: 'Malé písmeno latinky e s vokáněm', euml: 'Malé písmeno latinky e s dvěma tečkami', igrave: 'Malé písmeno latinky i s čárkou nad vlevo', iacute: 'Malé písmeno latinky i s čárkou nad vpravo', icirc: 'Malé písmeno latinky i s vokáněm', iuml: 'Malé písmeno latinky i s dvěma tečkami', eth: 'Malé písmeno latinky eth', ntilde: 'Malé písmeno latinky n s tildou', ograve: 'Malé písmeno latinky o s čárkou nad vlevo', oacute: 'Malé písmeno latinky o s čárkou nad vpravo', ocirc: 'Malé písmeno latinky o s vokáněm', otilde: 'Malé písmeno latinky o s tildou', ouml: 'Malé písmeno latinky o s dvěma tečkami', divide: 'Znak dělení', oslash: 'Malé písmeno latinky o přeškrtnuté', ugrave: 'Malé písmeno latinky u s čárkou nad vlevo', uacute: 'Malé písmeno latinky u s čárkou nad vpravo', ucirc: 'Malé písmeno latinky u s vokáněm', uuml: 'Malé písmeno latinky u s dvěma tečkami', yacute: 'Malé písmeno latinky y s čárkou nad vpravo', thorn: 'Malé písmeno latinky thorn', yuml: 'Malé písmeno latinky y s dvěma tečkami', OElig: 'Velká ligatura latinky OE', oelig: 'Malá ligatura latinky OE', '372': 'Velké písmeno latinky W s vokáněm', '374': 'Velké písmeno latinky Y s vokáněm', '373': 'Malé písmeno latinky w s vokáněm', '375': 'Malé písmeno latinky y s vokáněm', sbquo: 'Dolní 9 uvozovka jednoduchá', '8219': 'Horní obrácená 9 uvozovka jednoduchá', bdquo: 'Dolní 9 uvozovka dvojitá', hellip: 'Trojtečkový úvod', trade: 'Obchodní značka', '9658': 'Černý ukazatel směřující vpravo', bull: 'Kolečko', rarr: 'Šipka vpravo', rArr: 'Dvojitá šipka vpravo', hArr: 'Dvojitá šipka vlevo a vpravo', diams: 'Černé piky', asymp: 'Téměř se rovná' });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/specialchar/lang/cs.js
JavaScript
asf20
5,457
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'specialchar', 'pt-br', { euro: 'Euro', lsquo: 'Aspas simples esquerda', rsquo: 'Aspas simples direita', ldquo: 'Aspas duplas esquerda', rdquo: 'Aspas duplas direita', ndash: 'Traço', mdash: 'Travessão', iexcl: 'Ponto de exclamação invertido', cent: 'Cent', pound: 'Cerquilha', curren: 'Dinheiro', yen: 'Yen', brvbar: 'Bara interrompida', sect: 'Símbolo de Parágrafo', uml: 'Trema', copy: 'Direito de Cópia', ordf: 'Indicador ordinal feminino', laquo: 'Aspas duplas angulares esquerda', not: 'Negação', reg: 'Marca Registrada', macr: 'Mácron', deg: 'Grau', sup2: '2 Superscrito', sup3: '3 Superscrito', acute: 'Acento agudo', micro: 'Micro', para: 'Pé de mosca', middot: 'Ponto mediano', cedil: 'Cedilha', sup1: '1 Superscrito', ordm: 'Indicador ordinal masculino', raquo: 'Aspas duplas angulares direita', frac14: 'Um quarto', frac12: 'Um meio', frac34: 'Três quartos', iquest: 'Interrogação invertida', Agrave: 'A maiúsculo com acento grave', Aacute: 'A maiúsculo com acento agudo', Acirc: 'A maiúsculo com acento circunflexo', Atilde: 'A maiúsculo com til', Auml: 'A maiúsculo com trema', Aring: 'A maiúsculo com anel acima', AElig: 'Æ maiúsculo', Ccedil: 'Ç maiúlculo', Egrave: 'E maiúsculo com acento grave', Eacute: 'E maiúsculo com acento agudo', Ecirc: 'E maiúsculo com acento circumflexo', Euml: 'E maiúsculo com trema', Igrave: 'I maiúsculo com acento grave', Iacute: 'I maiúsculo com acento agudo', Icirc: 'I maiúsculo com acento circunflexo', Iuml: 'I maiúsculo com crase', ETH: 'Eth maiúsculo', Ntilde: 'N maiúsculo com til', Ograve: 'O maiúsculo com acento grave', Oacute: 'O maiúsculo com acento agudo', Ocirc: 'O maiúsculo com acento circunflexo', Otilde: 'O maiúsculo com til', Ouml: 'O maiúsculo com trema', times: 'Multiplicação', Oslash: 'Diâmetro', Ugrave: 'U maiúsculo com acento grave', Uacute: 'U maiúsculo com acento agudo', Ucirc: 'U maiúsculo com acento circunflexo', Uuml: 'U maiúsculo com trema', Yacute: 'Y maiúsculo com acento agudo', THORN: 'Thorn maiúsculo', szlig: 'Eszett minúsculo', agrave: 'a minúsculo com acento grave', aacute: 'a minúsculo com acento agudo', acirc: 'a minúsculo com acento circunflexo', atilde: 'a minúsculo com til', auml: 'a minúsculo com trema', aring: 'a minúsculo com anel acima', aelig: 'æ minúsculo', ccedil: 'ç minúsculo', egrave: 'e minúsculo com acento grave', eacute: 'e minúsculo com acento agudo', ecirc: 'e minúsculo com acento circunflexo', euml: 'e minúsculo com trema', igrave: 'i minúsculo com acento grave', iacute: 'i minúsculo com acento agudo', icirc: 'i minúsculo com acento circunflexo', iuml: 'i minúsculo com trema', eth: 'eth minúsculo', ntilde: 'n minúsculo com til', ograve: 'o minúsculo com acento grave', oacute: 'o minúsculo com acento agudo', ocirc: 'o minúsculo com acento circunflexo', otilde: 'o minúsculo com til', ouml: 'o minúsculo com trema', divide: 'Divisão', oslash: 'o minúsculo com cortado ou diâmetro', ugrave: 'u minúsculo com acento grave', uacute: 'u minúsculo com acento agudo', ucirc: 'u minúsculo com acento circunflexo', uuml: 'u minúsculo com trema', yacute: 'y minúsculo com acento agudo', thorn: 'thorn minúsculo', yuml: 'y minúsculo com trema', OElig: 'Ligação tipográfica OE maiúscula', oelig: 'Ligação tipográfica oe minúscula', '372': 'W maiúsculo com acento circunflexo', '374': 'Y maiúsculo com acento circunflexo', '373': 'w minúsculo com acento circunflexo', '375': 'y minúsculo com acento circunflexo', sbquo: 'Aspas simples inferior direita', '8219': 'Aspas simples superior esquerda', bdquo: 'Aspas duplas inferior direita', hellip: 'Reticências', trade: 'Trade mark', '9658': 'Ponta de seta preta para direita', bull: 'Ponto lista', rarr: 'Seta para direita', rArr: 'Seta dupla para direita', hArr: 'Seta dupla direita e esquerda', diams: 'Ouros', asymp: 'Aproximadamente' });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/specialchar/lang/pt-br.js
JavaScript
asf20
4,318
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.dialog.add( 'specialchar', function( editor ) { /** * Simulate "this" of a dialog for non-dialog events. * @type {CKEDITOR.dialog} */ var dialog, lang = editor.lang.specialChar; var onChoice = function( evt ) { var target, value; if ( evt.data ) target = evt.data.getTarget(); else target = new CKEDITOR.dom.element( evt ); if ( target.getName() == 'a' && ( value = target.getChild( 0 ).getHtml() ) ) { target.removeClass( "cke_light_background" ); dialog.hide(); // We must use "insertText" here to keep text styled. var span = editor.document.createElement( 'span' ); span.setHtml( value ); editor.insertText( span.getText() ); } }; var onClick = CKEDITOR.tools.addFunction( onChoice ); var focusedNode; var onFocus = function( evt, target ) { var value; target = target || evt.data.getTarget(); if ( target.getName() == 'span' ) target = target.getParent(); if ( target.getName() == 'a' && ( value = target.getChild( 0 ).getHtml() ) ) { // Trigger blur manually if there is focused node. if ( focusedNode ) onBlur( null, focusedNode ); var htmlPreview = dialog.getContentElement( 'info', 'htmlPreview' ).getElement(); dialog.getContentElement( 'info', 'charPreview' ).getElement().setHtml( value ); htmlPreview.setHtml( CKEDITOR.tools.htmlEncode( value ) ); target.getParent().addClass( "cke_light_background" ); // Memorize focused node. focusedNode = target; } }; var onBlur = function( evt, target ) { target = target || evt.data.getTarget(); if ( target.getName() == 'span' ) target = target.getParent(); if ( target.getName() == 'a' ) { dialog.getContentElement( 'info', 'charPreview' ).getElement().setHtml( '&nbsp;' ); dialog.getContentElement( 'info', 'htmlPreview' ).getElement().setHtml( '&nbsp;' ); target.getParent().removeClass( "cke_light_background" ); focusedNode = undefined; } }; var onKeydown = CKEDITOR.tools.addFunction( function( ev ) { ev = new CKEDITOR.dom.event( ev ); // Get an Anchor element. var element = ev.getTarget(); var relative, nodeToMove; var keystroke = ev.getKeystroke(), rtl = editor.lang.dir == 'rtl'; switch ( keystroke ) { // UP-ARROW case 38 : // relative is TR if ( ( relative = element.getParent().getParent().getPrevious() ) ) { nodeToMove = relative.getChild( [element.getParent().getIndex(), 0] ); nodeToMove.focus(); onBlur( null, element ); onFocus( null, nodeToMove ); } ev.preventDefault(); break; // DOWN-ARROW case 40 : // relative is TR if ( ( relative = element.getParent().getParent().getNext() ) ) { nodeToMove = relative.getChild( [ element.getParent().getIndex(), 0 ] ); if ( nodeToMove && nodeToMove.type == 1 ) { nodeToMove.focus(); onBlur( null, element ); onFocus( null, nodeToMove ); } } ev.preventDefault(); break; // SPACE // ENTER is already handled as onClick case 32 : onChoice( { data: ev } ); ev.preventDefault(); break; // RIGHT-ARROW case rtl ? 37 : 39 : // TAB case 9 : // relative is TD if ( ( relative = element.getParent().getNext() ) ) { nodeToMove = relative.getChild( 0 ); if ( nodeToMove.type == 1 ) { nodeToMove.focus(); onBlur( null, element ); onFocus( null, nodeToMove ); ev.preventDefault( true ); } else onBlur( null, element ); } // relative is TR else if ( ( relative = element.getParent().getParent().getNext() ) ) { nodeToMove = relative.getChild( [ 0, 0 ] ); if ( nodeToMove && nodeToMove.type == 1 ) { nodeToMove.focus(); onBlur( null, element ); onFocus( null, nodeToMove ); ev.preventDefault( true ); } else onBlur( null, element ); } break; // LEFT-ARROW case rtl ? 39 : 37 : // SHIFT + TAB case CKEDITOR.SHIFT + 9 : // relative is TD if ( ( relative = element.getParent().getPrevious() ) ) { nodeToMove = relative.getChild( 0 ); nodeToMove.focus(); onBlur( null, element ); onFocus( null, nodeToMove ); ev.preventDefault( true ); } // relative is TR else if ( ( relative = element.getParent().getParent().getPrevious() ) ) { nodeToMove = relative.getLast().getChild( 0 ); nodeToMove.focus(); onBlur( null, element ); onFocus( null, nodeToMove ); ev.preventDefault( true ); } else onBlur( null, element ); break; default : // Do not stop not handled events. return; } }); return { title : lang.title, minWidth : 430, minHeight : 280, buttons : [ CKEDITOR.dialog.cancelButton ], charColumns : 17, onLoad : function() { var columns = this.definition.charColumns, extraChars = editor.config.extraSpecialChars, chars = editor.config.specialChars; var charsTableLabel = CKEDITOR.tools.getNextId() + '_specialchar_table_label'; var html = [ '<table role="listbox" aria-labelledby="' + charsTableLabel + '"' + ' style="width: 320px; height: 100%; border-collapse: separate;"' + ' align="center" cellspacing="2" cellpadding="2" border="0">' ]; var i = 0, size = chars.length, character, charDesc; while ( i < size ) { html.push( '<tr>' ) ; for ( var j = 0 ; j < columns ; j++, i++ ) { if ( ( character = chars[ i ] ) ) { charDesc = ''; if ( character instanceof Array ) { charDesc = character[ 1 ]; character = character[ 0 ]; } else { var _tmpName = character.replace( '&', '' ).replace( ';', '' ).replace( '#', '' ); // Use character in case description unavailable. charDesc = lang[ _tmpName ] || character; } var charLabelId = 'cke_specialchar_label_' + i + '_' + CKEDITOR.tools.getNextNumber(); html.push( '<td class="cke_dark_background" style="cursor: default" role="presentation">' + '<a href="javascript: void(0);" role="option"' + ' aria-posinset="' + ( i +1 ) + '"', ' aria-setsize="' + size + '"', ' aria-labelledby="' + charLabelId + '"', ' style="cursor: inherit; display: block; height: 1.25em; margin-top: 0.25em; text-align: center;" title="', CKEDITOR.tools.htmlEncode( charDesc ), '"' + ' onkeydown="CKEDITOR.tools.callFunction( ' + onKeydown + ', event, this )"' + ' onclick="CKEDITOR.tools.callFunction(' + onClick + ', this); return false;"' + ' tabindex="-1">' + '<span style="margin: 0 auto;cursor: inherit">' + character + '</span>' + '<span class="cke_voice_label" id="' + charLabelId + '">' + charDesc + '</span></a>'); } else html.push( '<td class="cke_dark_background">&nbsp;' ); html.push( '</td>' ); } html.push( '</tr>' ); } html.push( '</tbody></table>', '<span id="' + charsTableLabel + '" class="cke_voice_label">' + lang.options +'</span>' ); this.getContentElement( 'info', 'charContainer' ).getElement().setHtml( html.join( '' ) ); }, contents : [ { id : 'info', label : editor.lang.common.generalTab, title : editor.lang.common.generalTab, padding : 0, align : 'top', elements : [ { type : 'hbox', align : 'top', widths : [ '320px', '90px' ], children : [ { type : 'html', id : 'charContainer', html : '', onMouseover : onFocus, onMouseout : onBlur, focus : function() { var firstChar = this.getElement().getElementsByTag( 'a' ).getItem( 0 ); setTimeout( function() { firstChar.focus(); onFocus( null, firstChar ); }, 0 ); }, onShow : function() { var firstChar = this.getElement().getChild( [ 0, 0, 0, 0, 0 ] ); setTimeout( function() { firstChar.focus(); onFocus( null, firstChar ); }, 0 ); }, onLoad : function( event ) { dialog = event.sender; } }, { type : 'hbox', align : 'top', widths : [ '100%' ], children : [ { type : 'vbox', align : 'top', children : [ { type : 'html', html : '<div></div>' }, { type : 'html', id : 'charPreview', className : 'cke_dark_background', style : 'border:1px solid #eeeeee;font-size:28px;height:40px;width:70px;padding-top:9px;font-family:\'Microsoft Sans Serif\',Arial,Helvetica,Verdana;text-align:center;', html : '<div>&nbsp;</div>' }, { type : 'html', id : 'htmlPreview', className : 'cke_dark_background', style : 'border:1px solid #eeeeee;font-size:14px;height:20px;width:70px;padding-top:2px;font-family:\'Microsoft Sans Serif\',Arial,Helvetica,Verdana;text-align:center;', html : '<div>&nbsp;</div>' } ] } ] } ] } ] } ] }; } );
10npsite
trunk/guanli/system/ckeditor/_source/plugins/specialchar/dialogs/specialchar.js
JavaScript
asf20
9,816
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @file Spell checker */ // Register a plugin named "wsc". CKEDITOR.plugins.add( 'wsc', { requires : [ 'dialog' ], init : function( editor ) { var commandName = 'checkspell'; var command = editor.addCommand( commandName, new CKEDITOR.dialogCommand( commandName ) ); // SpellChecker doesn't work in Opera and with custom domain command.modes = { wysiwyg : ( !CKEDITOR.env.opera && !CKEDITOR.env.air && document.domain == window.location.hostname ) }; editor.ui.addButton( 'SpellChecker', { label : editor.lang.spellCheck.toolbar, command : commandName }); CKEDITOR.dialog.add( commandName, this.path + 'dialogs/wsc.js' ); } }); CKEDITOR.config.wsc_customerId = CKEDITOR.config.wsc_customerId || '1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk' ; CKEDITOR.config.wsc_customLoaderScript = CKEDITOR.config.wsc_customLoaderScript || null;
10npsite
trunk/guanli/system/ckeditor/_source/plugins/wsc/plugin.js
JavaScript
asf20
1,082
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> <!-- Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license --> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script type="text/javascript"> function doLoadScript( url ) { if ( !url ) return false ; var s = document.createElement( "script" ) ; s.type = "text/javascript" ; s.src = url ; document.getElementsByTagName( "head" )[ 0 ].appendChild( s ) ; return true ; } var opener; function tryLoad() { opener = window.parent; // get access to global parameters var oParams = window.opener.oldFramesetPageParams; // make frameset rows string prepare var sFramesetRows = ( parseInt( oParams.firstframeh, 10 ) || '30') + ",*," + ( parseInt( oParams.thirdframeh, 10 ) || '150' ) + ',0' ; document.getElementById( 'itFrameset' ).rows = sFramesetRows ; // dynamic including init frames and crossdomain transport code // from config sproxy_js_frameset url var addScriptUrl = oParams.sproxy_js_frameset ; doLoadScript( addScriptUrl ) ; } </script> </head> <frameset id="itFrameset" onload="tryLoad();" border="0" rows="30,*,*,0"> <frame scrolling="no" framespacing="0" frameborder="0" noresize="noresize" marginheight="0" marginwidth="2" src="" name="navbar"></frame> <frame scrolling="auto" framespacing="0" frameborder="0" noresize="noresize" marginheight="0" marginwidth="0" src="" name="mid"></frame> <frame scrolling="no" framespacing="0" frameborder="0" noresize="noresize" marginheight="1" marginwidth="1" src="" name="bot"></frame> <frame scrolling="no" framespacing="0" frameborder="0" noresize="noresize" marginheight="1" marginwidth="1" src="" name="spellsuggestall"></frame> </frameset> </html>
10npsite
trunk/guanli/system/ckeditor/_source/plugins/wsc/dialogs/tmpFrameset.html
HTML
asf20
1,935
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.dialog.add( 'checkspell', function( editor ) { var number = CKEDITOR.tools.getNextNumber(), iframeId = 'cke_frame_' + number, textareaId = 'cke_data_' + number, errorBoxId = 'cke_error_' + number, interval, protocol = document.location.protocol || 'http:', errorMsg = editor.lang.spellCheck.notAvailable; var pasteArea = '<textarea'+ ' style="display: none"' + ' id="' + textareaId + '"' + ' rows="10"' + ' cols="40">' + ' </textarea><div' + ' id="' + errorBoxId + '"' + ' style="display:none;color:red;font-size:16px;font-weight:bold;padding-top:160px;text-align:center;z-index:11;">' + '</div><iframe' + ' src=""' + ' style="width:100%;background-color:#f1f1e3;"' + ' frameborder="0"' + ' name="' + iframeId + '"' + ' id="' + iframeId + '"' + ' allowtransparency="1">' + '</iframe>'; var wscCoreUrl = editor.config.wsc_customLoaderScript || ( protocol + '//loader.webspellchecker.net/sproxy_fck/sproxy.php' + '?plugin=fck2' + '&customerid=' + editor.config.wsc_customerId + '&cmd=script&doc=wsc&schema=22' ); if ( editor.config.wsc_customLoaderScript ) errorMsg += '<p style="color:#000;font-size:11px;font-weight: normal;text-align:center;padding-top:10px">' + editor.lang.spellCheck.errorLoading.replace( /%s/g, editor.config.wsc_customLoaderScript ) + '</p>'; function burnSpelling( dialog, errorMsg ) { var i = 0; return function () { if ( typeof( window.doSpell ) == 'function' ) { //Call from window.setInteval expected at once. if ( typeof( interval ) != 'undefined' ) window.clearInterval( interval ); initAndSpell( dialog ); } else if ( i++ == 180 ) // Timeout: 180 * 250ms = 45s. window._cancelOnError( errorMsg ); }; } window._cancelOnError = function( m ) { if ( typeof( window.WSC_Error ) == 'undefined' ) { CKEDITOR.document.getById( iframeId ).setStyle( 'display', 'none' ); var errorBox = CKEDITOR.document.getById( errorBoxId ); errorBox.setStyle( 'display', 'block' ); errorBox.setHtml( m || editor.lang.spellCheck.notAvailable ); } }; function initAndSpell( dialog ) { var LangComparer = new window._SP_FCK_LangCompare(), // Language abbr standarts comparer. pluginPath = CKEDITOR.getUrl( editor.plugins.wsc.path + 'dialogs/' ), // Service paths corecting/preparing. framesetPath = pluginPath + 'tmpFrameset.html'; // global var is used in FCK specific core // change on equal var used in fckplugin.js window.gFCKPluginName = 'wsc'; LangComparer.setDefaulLangCode( editor.config.defaultLanguage ); window.doSpell({ ctrl : textareaId, lang : editor.config.wsc_lang || LangComparer.getSPLangCode(editor.langCode ), intLang: editor.config.wsc_uiLang || LangComparer.getSPLangCode(editor.langCode ), winType : iframeId, // If not defined app will run on winpopup. // Callback binding section. onCancel : function() { dialog.hide(); }, onFinish : function( dT ) { editor.focus(); dialog.getParentEditor().setData( dT.value ); dialog.hide(); }, // Some manipulations with client static pages. staticFrame : framesetPath, framesetPath : framesetPath, iframePath : pluginPath + 'ciframe.html', // Styles defining. schemaURI : pluginPath + 'wsc.css', userDictionaryName: editor.config.wsc_userDictionaryName, customDictionaryName: editor.config.wsc_customDictionaryIds && editor.config.wsc_customDictionaryIds.split(","), domainName: editor.config.wsc_domainName }); // Hide user message console (if application was loaded more then after timeout). CKEDITOR.document.getById( errorBoxId ).setStyle( 'display', 'none' ); CKEDITOR.document.getById( iframeId ).setStyle( 'display', 'block' ); } return { title : editor.config.wsc_dialogTitle || editor.lang.spellCheck.title, minWidth : 485, minHeight : 380, buttons : [ CKEDITOR.dialog.cancelButton ], onShow : function() { var contentArea = this.getContentElement( 'general', 'content' ).getElement(); contentArea.setHtml( pasteArea ); contentArea.getChild( 2 ).setStyle( 'height', this._.contentSize.height + 'px' ); if ( typeof( window.doSpell ) != 'function' ) { // Load script. CKEDITOR.document.getHead().append( CKEDITOR.document.createElement( 'script', { attributes : { type : 'text/javascript', src : wscCoreUrl } }) ); } var sData = editor.getData(); // Get the data to be checked. CKEDITOR.document.getById( textareaId ).setValue( sData ); interval = window.setInterval( burnSpelling( this, errorMsg ), 250 ); }, onHide : function() { window.ooo = undefined; window.int_framsetLoaded = undefined; window.framesetLoaded = undefined; window.is_window_opened = false; }, contents : [ { id : 'general', label : editor.config.wsc_dialogTitle || editor.lang.spellCheck.title, padding : 0, elements : [ { type : 'html', id : 'content', html : '' } ] } ] }; }); // Expand the spell-check frame when dialog resized. (#6829) CKEDITOR.dialog.on( 'resize', function( evt ) { var data = evt.data, dialog = data.dialog; if ( dialog._.name == 'checkspell' ) { var content = dialog.getContentElement( 'general', 'content' ).getElement(), iframe = content && content.getChild( 2 ); iframe && iframe.setSize( 'height', data.height ); iframe && iframe.setSize( 'width', data.width ); } });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/wsc/dialogs/wsc.js
JavaScript
asf20
5,893
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ html, body { background-color: transparent; margin: 0px; padding: 0px; } body { padding: 10px; } body, td, input, select, textarea { font-size: 11px; font-family: 'Microsoft Sans Serif' , Arial, Helvetica, Verdana; } .midtext { padding:0px; margin:10px; } .midtext p { padding:0px; margin:10px; } .Button { border: #737357 1px solid; color: #3b3b1f; background-color: #c7c78f; } .PopupTabArea { color: #737357; background-color: #e3e3c7; } .PopupTitleBorder { border-bottom: #d5d59d 1px solid; } .PopupTabEmptyArea { padding-left: 10px; border-bottom: #d5d59d 1px solid; } .PopupTab, .PopupTabSelected { border-right: #d5d59d 1px solid; border-top: #d5d59d 1px solid; border-left: #d5d59d 1px solid; padding: 3px 5px 3px 5px; color: #737357; } .PopupTab { margin-top: 1px; border-bottom: #d5d59d 1px solid; cursor: pointer; } .PopupTabSelected { font-weight: bold; cursor: default; padding-top: 4px; border-bottom: #f1f1e3 1px solid; background-color: #f1f1e3; }
10npsite
trunk/guanli/system/ckeditor/_source/plugins/wsc/dialogs/wsc.css
CSS
asf20
1,232
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <!-- Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license --> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script type="text/javascript"> function gup( name ) { name = name.replace( /[\[]/, '\\\[' ).replace( /[\]]/, '\\\]' ) ; var regexS = '[\\?&]' + name + '=([^&#]*)' ; var regex = new RegExp( regexS ) ; var results = regex.exec( window.location.href ) ; if ( results ) return results[ 1 ] ; else return '' ; } var interval; function sendData2Master() { var destination = window.parent.parent ; try { if ( destination.XDTMaster ) { var t = destination.XDTMaster.read( [ gup( 'cmd' ), gup( 'data' ) ] ) ; window.clearInterval( interval ) ; } } catch (e) {} } function onLoad() { interval = window.setInterval( sendData2Master, 100 ); } </script> </head> <body onload="onLoad()"><p></p></body> </html>
10npsite
trunk/guanli/system/ckeditor/_source/plugins/wsc/dialogs/ciframe.html
HTML
asf20
1,120
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @fileOverview The "filebrowser" plugin that adds support for file uploads and * browsing. * * When a file is uploaded or selected inside the file browser, its URL is * inserted automatically into a field defined in the <code>filebrowser</code> * attribute. In order to specify a field that should be updated, pass the tab ID and * the element ID, separated with a colon.<br /><br /> * * <strong>Example 1: (Browse)</strong> * * <pre> * { * type : 'button', * id : 'browse', * filebrowser : 'tabId:elementId', * label : editor.lang.common.browseServer * } * </pre> * * If you set the <code>filebrowser</code> attribute for an element other than * the <code>fileButton</code>, the <code>Browse</code> action will be triggered.<br /><br /> * * <strong>Example 2: (Quick Upload)</strong> * * <pre> * { * type : 'fileButton', * id : 'uploadButton', * filebrowser : 'tabId:elementId', * label : editor.lang.common.uploadSubmit, * 'for' : [ 'upload', 'upload' ] * } * </pre> * * If you set the <code>filebrowser</code> attribute for a <code>fileButton</code> * element, the <code>QuickUpload</code> action will be executed.<br /><br /> * * The filebrowser plugin also supports more advanced configuration performed through * a JavaScript object. * * The following settings are supported: * * <ul> * <li><code>action</code> &ndash; <code>Browse</code> or <code>QuickUpload</code>.</li> * <li><code>target</code> &ndash; the field to update in the <code><em>tabId:elementId</em></code> format.</li> * <li><code>params</code> &ndash; additional arguments to be passed to the server connector (optional).</li> * <li><code>onSelect</code> &ndash; a function to execute when the file is selected/uploaded (optional).</li> * <li><code>url</code> &ndash; the URL to be called (optional).</li> * </ul> * * <strong>Example 3: (Quick Upload)</strong> * * <pre> * { * type : 'fileButton', * label : editor.lang.common.uploadSubmit, * id : 'buttonId', * filebrowser : * { * action : 'QuickUpload', // required * target : 'tab1:elementId', // required * params : // optional * { * type : 'Files', * currentFolder : '/folder/' * }, * onSelect : function( fileUrl, errorMessage ) // optional * { * // Do not call the built-in selectFuntion. * // return false; * } * }, * 'for' : [ 'tab1', 'myFile' ] * } * </pre> * * Suppose you have a file element with an ID of <code>myFile</code>, a text * field with an ID of <code>elementId</code> and a <code>fileButton</code>. * If the <code>filebowser.url</code> attribute is not specified explicitly, * the form action will be set to <code>filebrowser[<em>DialogWindowName</em>]UploadUrl</code> * or, if not specified, to <code>filebrowserUploadUrl</code>. Additional parameters * from the <code>params</code> object will be added to the query string. It is * possible to create your own <code>uploadHandler</code> and cancel the built-in * <code>updateTargetElement</code> command.<br /><br /> * * <strong>Example 4: (Browse)</strong> * * <pre> * { * type : 'button', * id : 'buttonId', * label : editor.lang.common.browseServer, * filebrowser : * { * action : 'Browse', * url : '/ckfinder/ckfinder.html&amp;type=Images', * target : 'tab1:elementId' * } * } * </pre> * * In this example, when the button is pressed, the file browser will be opened in a * popup window. If you do not specify the <code>filebrowser.url</code> attribute, * <code>filebrowser[<em>DialogName</em>]BrowseUrl</code> or * <code>filebrowserBrowseUrl</code> will be used. After selecting a file in the file * browser, an element with an ID of <code>elementId</code> will be updated. Just * like in the third example, a custom <code>onSelect</code> function may be defined. */ ( function() { /* * Adds (additional) arguments to given url. * * @param {String} * url The url. * @param {Object} * params Additional parameters. */ function addQueryString( url, params ) { var queryString = []; if ( !params ) return url; else { for ( var i in params ) queryString.push( i + "=" + encodeURIComponent( params[ i ] ) ); } return url + ( ( url.indexOf( "?" ) != -1 ) ? "&" : "?" ) + queryString.join( "&" ); } /* * Make a string's first character uppercase. * * @param {String} * str String. */ function ucFirst( str ) { str += ''; var f = str.charAt( 0 ).toUpperCase(); return f + str.substr( 1 ); } /* * The onlick function assigned to the 'Browse Server' button. Opens the * file browser and updates target field when file is selected. * * @param {CKEDITOR.event} * evt The event object. */ function browseServer( evt ) { var dialog = this.getDialog(); var editor = dialog.getParentEditor(); editor._.filebrowserSe = this; var width = editor.config[ 'filebrowser' + ucFirst( dialog.getName() ) + 'WindowWidth' ] || editor.config.filebrowserWindowWidth || '80%'; var height = editor.config[ 'filebrowser' + ucFirst( dialog.getName() ) + 'WindowHeight' ] || editor.config.filebrowserWindowHeight || '70%'; var params = this.filebrowser.params || {}; params.CKEditor = editor.name; params.CKEditorFuncNum = editor._.filebrowserFn; if ( !params.langCode ) params.langCode = editor.langCode; var url = addQueryString( this.filebrowser.url, params ); // TODO: V4: Remove backward compatibility (#8163). editor.popup( url, width, height, editor.config.filebrowserWindowFeatures || editor.config.fileBrowserWindowFeatures ); } /* * The onlick function assigned to the 'Upload' button. Makes the final * decision whether form is really submitted and updates target field when * file is uploaded. * * @param {CKEDITOR.event} * evt The event object. */ function uploadFile( evt ) { var dialog = this.getDialog(); var editor = dialog.getParentEditor(); editor._.filebrowserSe = this; // If user didn't select the file, stop the upload. if ( !dialog.getContentElement( this[ 'for' ][ 0 ], this[ 'for' ][ 1 ] ).getInputElement().$.value ) return false; if ( !dialog.getContentElement( this[ 'for' ][ 0 ], this[ 'for' ][ 1 ] ).getAction() ) return false; return true; } /* * Setups the file element. * * @param {CKEDITOR.ui.dialog.file} * fileInput The file element used during file upload. * @param {Object} * filebrowser Object containing filebrowser settings assigned to * the fileButton associated with this file element. */ function setupFileElement( editor, fileInput, filebrowser ) { var params = filebrowser.params || {}; params.CKEditor = editor.name; params.CKEditorFuncNum = editor._.filebrowserFn; if ( !params.langCode ) params.langCode = editor.langCode; fileInput.action = addQueryString( filebrowser.url, params ); fileInput.filebrowser = filebrowser; } /* * Traverse through the content definition and attach filebrowser to * elements with 'filebrowser' attribute. * * @param String * dialogName Dialog name. * @param {CKEDITOR.dialog.definitionObject} * definition Dialog definition. * @param {Array} * elements Array of {@link CKEDITOR.dialog.definition.content} * objects. */ function attachFileBrowser( editor, dialogName, definition, elements ) { var element, fileInput; for ( var i in elements ) { element = elements[ i ]; if ( element.type == 'hbox' || element.type == 'vbox' || element.type == 'fieldset' ) attachFileBrowser( editor, dialogName, definition, element.children ); if ( !element.filebrowser ) continue; if ( typeof element.filebrowser == 'string' ) { var fb = { action : ( element.type == 'fileButton' ) ? 'QuickUpload' : 'Browse', target : element.filebrowser }; element.filebrowser = fb; } if ( element.filebrowser.action == 'Browse' ) { var url = element.filebrowser.url; if ( url === undefined ) { url = editor.config[ 'filebrowser' + ucFirst( dialogName ) + 'BrowseUrl' ]; if ( url === undefined ) url = editor.config.filebrowserBrowseUrl; } if ( url ) { element.onClick = browseServer; element.filebrowser.url = url; element.hidden = false; } } else if ( element.filebrowser.action == 'QuickUpload' && element[ 'for' ] ) { url = element.filebrowser.url; if ( url === undefined ) { url = editor.config[ 'filebrowser' + ucFirst( dialogName ) + 'UploadUrl' ]; if ( url === undefined ) url = editor.config.filebrowserUploadUrl; } if ( url ) { var onClick = element.onClick; element.onClick = function( evt ) { // "element" here means the definition object, so we need to find the correct // button to scope the event call var sender = evt.sender; if ( onClick && onClick.call( sender, evt ) === false ) return false; return uploadFile.call( sender, evt ); }; element.filebrowser.url = url; element.hidden = false; setupFileElement( editor, definition.getContents( element[ 'for' ][ 0 ] ).get( element[ 'for' ][ 1 ] ), element.filebrowser ); } } } } /* * Updates the target element with the url of uploaded/selected file. * * @param {String} * url The url of a file. */ function updateTargetElement( url, sourceElement ) { var dialog = sourceElement.getDialog(); var targetElement = sourceElement.filebrowser.target || null; // If there is a reference to targetElement, update it. if ( targetElement ) { var target = targetElement.split( ':' ); var element = dialog.getContentElement( target[ 0 ], target[ 1 ] ); if ( element ) { element.setValue( url ); dialog.selectPage( target[ 0 ] ); } } } /* * Returns true if filebrowser is configured in one of the elements. * * @param {CKEDITOR.dialog.definitionObject} * definition Dialog definition. * @param String * tabId The tab id where element(s) can be found. * @param String * elementId The element id (or ids, separated with a semicolon) to check. */ function isConfigured( definition, tabId, elementId ) { if ( elementId.indexOf( ";" ) !== -1 ) { var ids = elementId.split( ";" ); for ( var i = 0 ; i < ids.length ; i++ ) { if ( isConfigured( definition, tabId, ids[i] ) ) return true; } return false; } var elementFileBrowser = definition.getContents( tabId ).get( elementId ).filebrowser; return ( elementFileBrowser && elementFileBrowser.url ); } function setUrl( fileUrl, data ) { var dialog = this._.filebrowserSe.getDialog(), targetInput = this._.filebrowserSe[ 'for' ], onSelect = this._.filebrowserSe.filebrowser.onSelect; if ( targetInput ) dialog.getContentElement( targetInput[ 0 ], targetInput[ 1 ] ).reset(); if ( typeof data == 'function' && data.call( this._.filebrowserSe ) === false ) return; if ( onSelect && onSelect.call( this._.filebrowserSe, fileUrl, data ) === false ) return; // The "data" argument may be used to pass the error message to the editor. if ( typeof data == 'string' && data ) alert( data ); if ( fileUrl ) updateTargetElement( fileUrl, this._.filebrowserSe ); } CKEDITOR.plugins.add( 'filebrowser', { init : function( editor, pluginPath ) { editor._.filebrowserFn = CKEDITOR.tools.addFunction( setUrl, editor ); editor.on( 'destroy', function () { CKEDITOR.tools.removeFunction( this._.filebrowserFn ); } ); } } ); CKEDITOR.on( 'dialogDefinition', function( evt ) { var definition = evt.data.definition, element; // Associate filebrowser to elements with 'filebrowser' attribute. for ( var i in definition.contents ) { if ( ( element = definition.contents[ i ] ) ) { attachFileBrowser( evt.editor, evt.data.name, definition, element.elements ); if ( element.hidden && element.filebrowser ) { element.hidden = !isConfigured( definition, element[ 'id' ], element.filebrowser ); } } } } ); } )(); /** * The location of an external file browser that should be launched when the <strong>Browse Server</strong> * button is pressed. If configured, the <strong>Browse Server</strong> button will appear in the * <strong>Link</strong>, <strong>Image</strong>, and <strong>Flash</strong> dialog windows. * @see The <a href="http://docs.cksource.com/CKEditor_3.x/Developers_Guide/File_Browser_(Uploader)">File Browser/Uploader</a> documentation. * @name CKEDITOR.config.filebrowserBrowseUrl * @since 3.0 * @type String * @default <code>''</code> (empty string = disabled) * @example * config.filebrowserBrowseUrl = '/browser/browse.php'; */ /** * The location of the script that handles file uploads. * If set, the <strong>Upload</strong> tab will appear in the <strong>Link</strong>, <strong>Image</strong>, * and <strong>Flash</strong> dialog windows. * @name CKEDITOR.config.filebrowserUploadUrl * @see The <a href="http://docs.cksource.com/CKEditor_3.x/Developers_Guide/File_Browser_(Uploader)">File Browser/Uploader</a> documentation. * @since 3.0 * @type String * @default <code>''</code> (empty string = disabled) * @example * config.filebrowserUploadUrl = '/uploader/upload.php'; */ /** * The location of an external file browser that should be launched when the <strong>Browse Server</strong> * button is pressed in the <strong>Image</strong> dialog window. * If not set, CKEditor will use <code>{@link CKEDITOR.config.filebrowserBrowseUrl}</code>. * @name CKEDITOR.config.filebrowserImageBrowseUrl * @since 3.0 * @type String * @default <code>''</code> (empty string = disabled) * @example * config.filebrowserImageBrowseUrl = '/browser/browse.php?type=Images'; */ /** * The location of an external file browser that should be launched when the <strong>Browse Server</strong> * button is pressed in the <strong>Flash</strong> dialog window. * If not set, CKEditor will use <code>{@link CKEDITOR.config.filebrowserBrowseUrl}</code>. * @name CKEDITOR.config.filebrowserFlashBrowseUrl * @since 3.0 * @type String * @default <code>''</code> (empty string = disabled) * @example * config.filebrowserFlashBrowseUrl = '/browser/browse.php?type=Flash'; */ /** * The location of the script that handles file uploads in the <strong>Image</strong> dialog window. * If not set, CKEditor will use <code>{@link CKEDITOR.config.filebrowserUploadUrl}</code>. * @name CKEDITOR.config.filebrowserImageUploadUrl * @since 3.0 * @type String * @default <code>''</code> (empty string = disabled) * @example * config.filebrowserImageUploadUrl = '/uploader/upload.php?type=Images'; */ /** * The location of the script that handles file uploads in the <strong>Flash</strong> dialog window. * If not set, CKEditor will use <code>{@link CKEDITOR.config.filebrowserUploadUrl}</code>. * @name CKEDITOR.config.filebrowserFlashUploadUrl * @since 3.0 * @type String * @default <code>''</code> (empty string = disabled) * @example * config.filebrowserFlashUploadUrl = '/uploader/upload.php?type=Flash'; */ /** * The location of an external file browser that should be launched when the <strong>Browse Server</strong> * button is pressed in the <strong>Link</strong> tab of the <strong>Image</strong> dialog window. * If not set, CKEditor will use <code>{@link CKEDITOR.config.filebrowserBrowseUrl}</code>. * @name CKEDITOR.config.filebrowserImageBrowseLinkUrl * @since 3.2 * @type String * @default <code>''</code> (empty string = disabled) * @example * config.filebrowserImageBrowseLinkUrl = '/browser/browse.php'; */ /** * The features to use in the file browser popup window. * @name CKEDITOR.config.filebrowserWindowFeatures * @since 3.4.1 * @type String * @default <code>'location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes'</code> * @example * config.filebrowserWindowFeatures = 'resizable=yes,scrollbars=no'; */ /** * The width of the file browser popup window. It can be a number denoting a value in * pixels or a percent string. * @name CKEDITOR.config.filebrowserWindowWidth * @type Number|String * @default <code>'80%'</code> * @example * config.filebrowserWindowWidth = 750; * @example * config.filebrowserWindowWidth = '50%'; */ /** * The height of the file browser popup window. It can be a number denoting a value in * pixels or a percent string. * @name CKEDITOR.config.filebrowserWindowHeight * @type Number|String * @default <code>'70%'</code> * @example * config.filebrowserWindowHeight = 580; * @example * config.filebrowserWindowHeight = '50%'; */
10npsite
trunk/guanli/system/ckeditor/_source/plugins/filebrowser/plugin.js
JavaScript
asf20
17,560
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @fileOverview Spell Check As You Type (SCAYT). * Button name : Scayt. */ (function() { var commandName = 'scaytcheck', openPage = ''; // Checks if a value exists in an array function in_array( needle, haystack ) { var found = 0, key; for ( key in haystack ) { if ( haystack[ key ] == needle ) { found = 1; break; } } return found; } var onEngineLoad = function() { var editor = this; var createInstance = function() // Create new instance every time Document is created. { var config = editor.config; // Initialise Scayt instance. var oParams = {}; // Get the iframe. oParams.srcNodeRef = editor.document.getWindow().$.frameElement; // syntax : AppName.AppVersion@AppRevision oParams.assocApp = 'CKEDITOR.' + CKEDITOR.version + '@' + CKEDITOR.revision; oParams.customerid = config.scayt_customerid || '1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2'; oParams.customDictionaryIds = config.scayt_customDictionaryIds || ''; oParams.userDictionaryName = config.scayt_userDictionaryName || ''; oParams.sLang = config.scayt_sLang || 'en_US'; // Introduce SCAYT onLoad callback. (#5632) oParams.onLoad = function() { // Draw down word marker to avoid being covered by background-color style.(#5466) if ( !( CKEDITOR.env.ie && CKEDITOR.env.version < 8 ) ) this.addStyle( this.selectorCss(), 'padding-bottom: 2px !important;' ); // Call scayt_control.focus when SCAYT loaded // and only if editor has focus and scayt control creates at first time (#5720) if ( editor.focusManager.hasFocus && !plugin.isControlRestored( editor ) ) this.focus(); }; oParams.onBeforeChange = function() { if ( plugin.getScayt( editor ) && !editor.checkDirty() ) setTimeout( function(){ editor.resetDirty(); }, 0 ); }; var scayt_custom_params = window.scayt_custom_params; if ( typeof scayt_custom_params == 'object' ) { for ( var k in scayt_custom_params ) oParams[ k ] = scayt_custom_params[ k ]; } // needs for restoring a specific scayt control settings if ( plugin.getControlId( editor ) ) oParams.id = plugin.getControlId( editor ); var scayt_control = new window.scayt( oParams ); scayt_control.afterMarkupRemove.push( function( node ) { ( new CKEDITOR.dom.element( node, scayt_control.document ) ).mergeSiblings(); } ); // Copy config. var lastInstance = plugin.instances[ editor.name ]; if ( lastInstance ) { scayt_control.sLang = lastInstance.sLang; scayt_control.option( lastInstance.option() ); scayt_control.paused = lastInstance.paused; } plugin.instances[ editor.name ] = scayt_control; try { scayt_control.setDisabled( plugin.isPaused( editor ) === false ); } catch (e) {} editor.fire( 'showScaytState' ); }; editor.on( 'contentDom', createInstance ); editor.on( 'contentDomUnload', function() { // Remove scripts. var scripts = CKEDITOR.document.getElementsByTag( 'script' ), scaytIdRegex = /^dojoIoScript(\d+)$/i, scaytSrcRegex = /^https?:\/\/svc\.webspellchecker\.net\/spellcheck\/script\/ssrv\.cgi/i; for ( var i=0; i < scripts.count(); i++ ) { var script = scripts.getItem( i ), id = script.getId(), src = script.getAttribute( 'src' ); if ( id && src && id.match( scaytIdRegex ) && src.match( scaytSrcRegex )) script.remove(); } }); editor.on( 'beforeCommandExec', function( ev ) // Disable SCAYT before Source command execution. { if ( ( ev.data.name == 'source' || ev.data.name == 'newpage' ) && editor.mode == 'wysiwyg' ) { var scayt_instance = plugin.getScayt( editor ); if ( scayt_instance ) { plugin.setPaused( editor, !scayt_instance.disabled ); // store a control id for restore a specific scayt control settings plugin.setControlId( editor, scayt_instance.id ); scayt_instance.destroy( true ); delete plugin.instances[ editor.name ]; } } // Catch on source mode switch off (#5720) else if ( ev.data.name == 'source' && editor.mode == 'source' ) plugin.markControlRestore( editor ); }); editor.on( 'afterCommandExec', function( ev ) { if ( !plugin.isScaytEnabled( editor ) ) return; if ( editor.mode == 'wysiwyg' && ( ev.data.name == 'undo' || ev.data.name == 'redo' ) ) window.setTimeout( function() { plugin.getScayt( editor ).refresh(); }, 10 ); }); editor.on( 'destroy', function( ev ) { var editor = ev.editor, scayt_instance = plugin.getScayt( editor ); // SCAYT instance might already get destroyed by mode switch (#5744). if ( !scayt_instance ) return; delete plugin.instances[ editor.name ]; // store a control id for restore a specific scayt control settings plugin.setControlId( editor, scayt_instance.id ); scayt_instance.destroy( true ); }); // Listen to data manipulation to reflect scayt markup. editor.on( 'afterSetData', function() { if ( plugin.isScaytEnabled( editor ) ) { window.setTimeout( function() { var instance = plugin.getScayt( editor ); instance && instance.refresh(); }, 10 ); } }); // Reload spell-checking for current word after insertion completed. editor.on( 'insertElement', function() { var scayt_instance = plugin.getScayt( editor ); if ( plugin.isScaytEnabled( editor ) ) { // Unlock the selection before reload, SCAYT will take // care selection update. if ( CKEDITOR.env.ie ) editor.getSelection().unlock( true ); // Return focus to the editor and refresh SCAYT markup (#5573). window.setTimeout( function() { scayt_instance.focus(); scayt_instance.refresh(); }, 10 ); } }, this, null, 50 ); editor.on( 'insertHtml', function() { var scayt_instance = plugin.getScayt( editor ); if ( plugin.isScaytEnabled( editor ) ) { // Unlock the selection before reload, SCAYT will take // care selection update. if ( CKEDITOR.env.ie ) editor.getSelection().unlock( true ); // Return focus to the editor (#5573) // Refresh SCAYT markup window.setTimeout( function() { scayt_instance.focus(); scayt_instance.refresh(); }, 10 ); } }, this, null, 50 ); editor.on( 'scaytDialog', function( ev ) // Communication with dialog. { ev.data.djConfig = window.djConfig; ev.data.scayt_control = plugin.getScayt( editor ); ev.data.tab = openPage; ev.data.scayt = window.scayt; }); var dataProcessor = editor.dataProcessor, htmlFilter = dataProcessor && dataProcessor.htmlFilter; if ( htmlFilter ) { htmlFilter.addRules( { elements : { span : function( element ) { if ( element.attributes[ 'data-scayt_word' ] && element.attributes[ 'data-scaytid' ] ) { delete element.name; // Write children, but don't write this node. return element; } } } } ); } // Override Image.equals method avoid CK snapshot module to add SCAYT markup to snapshots. (#5546) var undoImagePrototype = CKEDITOR.plugins.undo.Image.prototype; undoImagePrototype.equals = CKEDITOR.tools.override( undoImagePrototype.equals, function( org ) { return function( otherImage ) { var thisContents = this.contents, otherContents = otherImage.contents; var scayt_instance = plugin.getScayt( this.editor ); // Making the comparison based on content without SCAYT word markers. if ( scayt_instance && plugin.isScaytReady( this.editor ) ) { // scayt::reset might return value undefined. (#5742) this.contents = scayt_instance.reset( thisContents ) || ''; otherImage.contents = scayt_instance.reset( otherContents ) || ''; } var retval = org.apply( this, arguments ); this.contents = thisContents; otherImage.contents = otherContents; return retval; }; }); if ( editor.document ) createInstance(); }; CKEDITOR.plugins.scayt = { engineLoaded : false, instances : {}, // Data storage for SCAYT control, based on editor instances controlInfo : {}, setControlInfo : function( editor, o ) { if ( editor && editor.name && typeof ( this.controlInfo[ editor.name ] ) != 'object' ) this.controlInfo[ editor.name ] = {}; for ( var infoOpt in o ) this.controlInfo[ editor.name ][ infoOpt ] = o[ infoOpt ]; }, isControlRestored : function( editor ) { if ( editor && editor.name && this.controlInfo[ editor.name ] ) { return this.controlInfo[ editor.name ].restored ; } return false; }, markControlRestore : function( editor ) { this.setControlInfo( editor, { restored:true } ); }, setControlId: function( editor, id ) { this.setControlInfo( editor, { id:id } ); }, getControlId: function( editor ) { if ( editor && editor.name && this.controlInfo[ editor.name ] && this.controlInfo[ editor.name ].id ) { return this.controlInfo[ editor.name ].id; } return null; }, setPaused: function( editor , bool ) { this.setControlInfo( editor, { paused:bool } ); }, isPaused: function( editor ) { if ( editor && editor.name && this.controlInfo[editor.name] ) { return this.controlInfo[editor.name].paused; } return undefined; }, getScayt : function( editor ) { return this.instances[ editor.name ]; }, isScaytReady : function( editor ) { return this.engineLoaded === true && 'undefined' !== typeof window.scayt && this.getScayt( editor ); }, isScaytEnabled : function( editor ) { var scayt_instance = this.getScayt( editor ); return ( scayt_instance ) ? scayt_instance.disabled === false : false; }, getUiTabs : function( editor ) { var uiTabs = []; // read UI tabs value from config var configUiTabs = editor.config.scayt_uiTabs || "1,1,1"; // convert string to array configUiTabs = configUiTabs.split( ',' ); // "About us" should be always shown for standard config configUiTabs[3] = "1"; for ( var i = 0; i < 4; i++ ) { uiTabs[i] = (typeof window.scayt != "undefined" && typeof window.scayt.uiTags != "undefined") ? (parseInt(configUiTabs[i],10) && window.scayt.uiTags[i]) : parseInt(configUiTabs[i],10); } return uiTabs; }, loadEngine : function( editor ) { // SCAYT doesn't work with Firefox2, Opera and AIR. if ( CKEDITOR.env.gecko && CKEDITOR.env.version < 10900 || CKEDITOR.env.opera || CKEDITOR.env.air ) return editor.fire( 'showScaytState' ); if ( this.engineLoaded === true ) return onEngineLoad.apply( editor ); // Add new instance. else if ( this.engineLoaded == -1 ) // We are waiting. return CKEDITOR.on( 'scaytReady', function(){ onEngineLoad.apply( editor ); } ); // Use function(){} to avoid rejection as duplicate. CKEDITOR.on( 'scaytReady', onEngineLoad, editor ); CKEDITOR.on( 'scaytReady', function() { this.engineLoaded = true; }, this, null, 0 ); // First to run. this.engineLoaded = -1; // Loading in progress. // compose scayt url var protocol = document.location.protocol; // Default to 'http' for unknown. protocol = protocol.search( /https?:/) != -1? protocol : 'http:'; var baseUrl = 'svc.webspellchecker.net/scayt26/loader__base.js'; var scaytUrl = editor.config.scayt_srcUrl || ( protocol + '//' + baseUrl ); var scaytConfigBaseUrl = plugin.parseUrl( scaytUrl ).path + '/'; if( window.scayt == undefined ) { CKEDITOR._djScaytConfig = { baseUrl: scaytConfigBaseUrl, addOnLoad: [ function() { CKEDITOR.fireOnce( 'scaytReady' ); } ], isDebug: false }; // Append javascript code. CKEDITOR.document.getHead().append( CKEDITOR.document.createElement( 'script', { attributes : { type : 'text/javascript', async : 'true', src : scaytUrl } }) ); } else CKEDITOR.fireOnce( 'scaytReady' ); return null; }, parseUrl : function ( data ) { var match; if ( data.match && ( match = data.match(/(.*)[\/\\](.*?\.\w+)$/) ) ) return { path: match[1], file: match[2] }; else return data; } }; var plugin = CKEDITOR.plugins.scayt; // Context menu constructing. var addButtonCommand = function( editor, buttonName, buttonLabel, commandName, command, menugroup, menuOrder ) { editor.addCommand( commandName, command ); // If the "menu" plugin is loaded, register the menu item. editor.addMenuItem( commandName, { label : buttonLabel, command : commandName, group : menugroup, order : menuOrder }); }; var commandDefinition = { preserveState : true, editorFocus : false, canUndo : false, exec: function( editor ) { if ( plugin.isScaytReady( editor ) ) { var isEnabled = plugin.isScaytEnabled( editor ); this.setState( isEnabled ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_ON ); var scayt_control = plugin.getScayt( editor ); // the place where the status of editor focus should be restored // after there will be ability to store its state before SCAYT button click // if (storedFocusState is focused ) // scayt_control.focus(); // // now focus is set certainly scayt_control.focus(); scayt_control.setDisabled( isEnabled ); } else if ( !editor.config.scayt_autoStartup && plugin.engineLoaded >= 0 ) // Load first time { this.setState( CKEDITOR.TRISTATE_DISABLED ); plugin.loadEngine( editor ); } } }; // Add scayt plugin. CKEDITOR.plugins.add( 'scayt', { requires : [ 'menubutton' ], beforeInit : function( editor ) { var items_order = editor.config.scayt_contextMenuItemsOrder || 'suggest|moresuggest|control', items_order_str = ""; items_order = items_order.split( '|' ); if ( items_order && items_order.length ) { for ( var pos = 0 ; pos < items_order.length ; pos++ ) items_order_str += 'scayt_' + items_order[ pos ] + ( items_order.length != parseInt( pos, 10 ) + 1 ? ',' : '' ); } // Put it on top of all context menu items (#5717) editor.config.menu_groups = items_order_str + ',' + editor.config.menu_groups; }, init : function( editor ) { // Delete span[data-scaytid] when text pasting in editor (#6921) var dataFilter = editor.dataProcessor && editor.dataProcessor.dataFilter; var dataFilterRules = { elements : { span : function( element ) { var attrs = element.attributes; if ( attrs && attrs[ 'data-scaytid' ] ) delete element.name; } } }; dataFilter && dataFilter.addRules( dataFilterRules ); var moreSuggestions = {}, mainSuggestions = {}; // Scayt command. var command = editor.addCommand( commandName, commandDefinition ); // Add Options dialog. CKEDITOR.dialog.add( commandName, CKEDITOR.getUrl( this.path + 'dialogs/options.js' ) ); var uiTabs = plugin.getUiTabs( editor ); var menuGroup = 'scaytButton'; editor.addMenuGroup( menuGroup ); // combine menu items to render var uiMenuItems = {}; var lang = editor.lang.scayt; // always added uiMenuItems.scaytToggle = { label : lang.enable, command : commandName, group : menuGroup }; if ( uiTabs[0] == 1 ) uiMenuItems.scaytOptions = { label : lang.options, group : menuGroup, onClick : function() { openPage = 'options'; editor.openDialog( commandName ); } }; if ( uiTabs[1] == 1 ) uiMenuItems.scaytLangs = { label : lang.langs, group : menuGroup, onClick : function() { openPage = 'langs'; editor.openDialog( commandName ); } }; if ( uiTabs[2] == 1 ) uiMenuItems.scaytDict = { label : lang.dictionariesTab, group : menuGroup, onClick : function() { openPage = 'dictionaries'; editor.openDialog( commandName ); } }; // always added uiMenuItems.scaytAbout = { label : editor.lang.scayt.about, group : menuGroup, onClick : function() { openPage = 'about'; editor.openDialog( commandName ); } }; editor.addMenuItems( uiMenuItems ); editor.ui.add( 'Scayt', CKEDITOR.UI_MENUBUTTON, { label : lang.title, title : CKEDITOR.env.opera ? lang.opera_title : lang.title, className : 'cke_button_scayt', modes : { wysiwyg : 1 }, onRender: function() { command.on( 'state', function() { this.setState( command.state ); }, this); }, onMenu : function() { var isEnabled = plugin.isScaytEnabled( editor ); editor.getMenuItem( 'scaytToggle' ).label = lang[ isEnabled ? 'disable' : 'enable' ]; var uiTabs = plugin.getUiTabs( editor ); return { scaytToggle : CKEDITOR.TRISTATE_OFF, scaytOptions : isEnabled && uiTabs[0] ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED, scaytLangs : isEnabled && uiTabs[1] ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED, scaytDict : isEnabled && uiTabs[2] ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED, scaytAbout : isEnabled && uiTabs[3] ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED }; } }); // If the "contextmenu" plugin is loaded, register the listeners. if ( editor.contextMenu && editor.addMenuItems ) { editor.contextMenu.addListener( function( element, selection ) { if ( !plugin.isScaytEnabled( editor ) || selection.getRanges()[ 0 ].checkReadOnly() ) return null; var scayt_control = plugin.getScayt( editor ), node = scayt_control.getScaytNode(); if ( !node ) return null; var word = scayt_control.getWord( node ); if ( !word ) return null; var sLang = scayt_control.getLang(), _r = {}, items_suggestion = window.scayt.getSuggestion( word, sLang ); if ( !items_suggestion || !items_suggestion.length ) return null; // Remove unused commands and menuitems for ( var m in moreSuggestions ) { delete editor._.menuItems[ m ]; delete editor._.commands[ m ]; } for ( m in mainSuggestions ) { delete editor._.menuItems[ m ]; delete editor._.commands[ m ]; } moreSuggestions = {}; // Reset items. mainSuggestions = {}; var moreSuggestionsUnable = editor.config.scayt_moreSuggestions || 'on'; var moreSuggestionsUnableAdded = false; var maxSuggestions = editor.config.scayt_maxSuggestions; ( typeof maxSuggestions != 'number' ) && ( maxSuggestions = 5 ); !maxSuggestions && ( maxSuggestions = items_suggestion.length ); var contextCommands = editor.config.scayt_contextCommands || 'all'; contextCommands = contextCommands.split( '|' ); for ( var i = 0, l = items_suggestion.length; i < l; i += 1 ) { var commandName = 'scayt_suggestion_' + items_suggestion[i].replace( ' ', '_' ); var exec = ( function( el, s ) { return { exec: function() { scayt_control.replace( el, s ); } }; })( node, items_suggestion[i] ); if ( i < maxSuggestions ) { addButtonCommand( editor, 'button_' + commandName, items_suggestion[i], commandName, exec, 'scayt_suggest', i + 1 ); _r[ commandName ] = CKEDITOR.TRISTATE_OFF; mainSuggestions[ commandName ] = CKEDITOR.TRISTATE_OFF; } else if ( moreSuggestionsUnable == 'on' ) { addButtonCommand( editor, 'button_' + commandName, items_suggestion[i], commandName, exec, 'scayt_moresuggest', i + 1 ); moreSuggestions[ commandName ] = CKEDITOR.TRISTATE_OFF; moreSuggestionsUnableAdded = true; } } if ( moreSuggestionsUnableAdded ) { // Register the More suggestions group; editor.addMenuItem( 'scayt_moresuggest', { label : lang.moreSuggestions, group : 'scayt_moresuggest', order : 10, getItems : function() { return moreSuggestions; } }); mainSuggestions[ 'scayt_moresuggest' ] = CKEDITOR.TRISTATE_OFF; } if ( in_array( 'all', contextCommands ) || in_array( 'ignore', contextCommands) ) { var ignore_command = { exec: function(){ scayt_control.ignore( node ); } }; addButtonCommand( editor, 'ignore', lang.ignore, 'scayt_ignore', ignore_command, 'scayt_control', 1 ); mainSuggestions[ 'scayt_ignore' ] = CKEDITOR.TRISTATE_OFF; } if ( in_array( 'all', contextCommands ) || in_array( 'ignoreall', contextCommands ) ) { var ignore_all_command = { exec: function(){ scayt_control.ignoreAll( node ); } }; addButtonCommand(editor, 'ignore_all', lang.ignoreAll, 'scayt_ignore_all', ignore_all_command, 'scayt_control', 2); mainSuggestions['scayt_ignore_all'] = CKEDITOR.TRISTATE_OFF; } if ( in_array( 'all', contextCommands ) || in_array( 'add', contextCommands ) ) { var addword_command = { exec: function(){ window.scayt.addWordToUserDictionary( node ); } }; addButtonCommand(editor, 'add_word', lang.addWord, 'scayt_add_word', addword_command, 'scayt_control', 3); mainSuggestions['scayt_add_word'] = CKEDITOR.TRISTATE_OFF; } if ( scayt_control.fireOnContextMenu ) scayt_control.fireOnContextMenu( editor ); return mainSuggestions; }); } var showInitialState = function() { editor.removeListener( 'showScaytState', showInitialState ); if ( !CKEDITOR.env.opera && !CKEDITOR.env.air ) command.setState( plugin.isScaytEnabled( editor ) ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF ); else command.setState( CKEDITOR.TRISTATE_DISABLED ); }; editor.on( 'showScaytState', showInitialState ); if ( CKEDITOR.env.opera || CKEDITOR.env.air ) { editor.on( 'instanceReady', function() { showInitialState(); }); } // Start plugin if ( editor.config.scayt_autoStartup ) { editor.on( 'instanceReady', function() { plugin.loadEngine( editor ); }); } }, afterInit : function( editor ) { // Prevent word marker line from displaying in elements path and been removed when cleaning format. (#3570) (#4125) var elementsPathFilters, scaytFilter = function( element ) { if ( element.hasAttribute( 'data-scaytid' ) ) return false; }; if ( editor._.elementsPath && ( elementsPathFilters = editor._.elementsPath.filters ) ) elementsPathFilters.push( scaytFilter ); editor.addRemoveFormatFilter && editor.addRemoveFormatFilter( scaytFilter ); } }); })(); /** * If enabled (set to <code>true</code>), turns on SCAYT automatically * after loading the editor. * @name CKEDITOR.config.scayt_autoStartup * @type Boolean * @default <code>false</code> * @example * config.scayt_autoStartup = true; */ /** * Defines the number of SCAYT suggestions to show in the main context menu. * Possible values are: * <ul> * <li><code>0</code> (zero) &ndash; All suggestions are displayed in the main context menu.</li> * <li>Positive number &ndash; The maximum number of suggestions to show in the context * menu. Other entries will be shown in the "More Suggestions" sub-menu.</li> * <li>Negative number &ndash; No suggestions are shown in the main context menu. All * entries will be listed in the the "Suggestions" sub-menu.</li> * </ul> * @name CKEDITOR.config.scayt_maxSuggestions * @type Number * @default <code>5</code> * @example * // Display only three suggestions in the main context menu. * config.scayt_maxSuggestions = 3; * @example * // Do not show the suggestions directly. * config.scayt_maxSuggestions = -1; */ /** * Sets the customer ID for SCAYT. Required for migration from free, * ad-supported version to paid, ad-free version. * @name CKEDITOR.config.scayt_customerid * @type String * @default <code>''</code> * @example * // Load SCAYT using my customer ID. * config.scayt_customerid = 'your-encrypted-customer-id'; */ /** * Enables/disables the "More Suggestions" sub-menu in the context menu. * Possible values are <code>on</code> and <code>off</code>. * @name CKEDITOR.config.scayt_moreSuggestions * @type String * @default <code>'on'</code> * @example * // Disables the "More Suggestions" sub-menu. * config.scayt_moreSuggestions = 'off'; */ /** * Customizes the display of SCAYT context menu commands ("Add Word", "Ignore" * and "Ignore All"). This must be a string with one or more of the following * words separated by a pipe character ("|"): * <ul> * <li><code>off</code> &ndash; disables all options.</li> * <li><code>all</code> &ndash; enables all options.</li> * <li><code>ignore</code> &ndash; enables the "Ignore" option.</li> * <li><code>ignoreall</code> &ndash; enables the "Ignore All" option.</li> * <li><code>add</code> &ndash; enables the "Add Word" option.</li> * </ul> * @name CKEDITOR.config.scayt_contextCommands * @type String * @default <code>'all'</code> * @example * // Show only "Add Word" and "Ignore All" in the context menu. * config.scayt_contextCommands = 'add|ignoreall'; */ /** * Sets the default spell checking language for SCAYT. Possible values are: * <code>en_US</code>, <code>en_GB</code>, <code>pt_BR</code>, <code>da_DK</code>, * <code>nl_NL</code>, <code>en_CA</code>, <code>fi_FI</code>, <code>fr_FR</code>, * <code>fr_CA</code>, <code>de_DE</code>, <code>el_GR</code>, <code>it_IT</code>, * <code>nb_NO</code>, <code>pt_PT</code>, <code>es_ES</code>, <code>sv_SE</code>. * @name CKEDITOR.config.scayt_sLang * @type String * @default <code>'en_US'</code> * @example * // Sets SCAYT to German. * config.scayt_sLang = 'de_DE'; */ /** * Sets the visibility of particular tabs in the SCAYT dialog window and toolbar * button. This setting must contain a <code>1</code> (enabled) or <code>0</code> * (disabled) value for each of the following entries, in this precise order, * separated by a comma (","): "Options", "Languages", and "Dictionary". * @name CKEDITOR.config.scayt_uiTabs * @type String * @default <code>'1,1,1'</code> * @example * // Hides the "Languages" tab. * config.scayt_uiTabs = '1,0,1'; */ /** * Sets the URL to SCAYT core. Required to switch to the licensed version of SCAYT application. * Further details available at * <a href="http://wiki.webspellchecker.net/doku.php?id=migration:hosredfreetolicensedck"> * http://wiki.webspellchecker.net/doku.php?id=migration:hosredfreetolicensedck</a>. * @name CKEDITOR.config.scayt_srcUrl * @type String * @default <code>''</code> * @example * config.scayt_srcUrl = "http://my-host/spellcheck/lf/scayt/scayt.js"; */ /** * Links SCAYT to custom dictionaries. This is a string containing dictionary IDs * separared by commas (","). Available only for the licensed version. * Further details at * <a href="http://wiki.webspellchecker.net/doku.php?id=installationandconfiguration:customdictionaries:licensed"> * http://wiki.webspellchecker.net/doku.php?id=installationandconfiguration:customdictionaries:licensed</a>. * @name CKEDITOR.config.scayt_customDictionaryIds * @type String * @default <code>''</code> * @example * config.scayt_customDictionaryIds = '3021,3456,3478"'; */ /** * Makes it possible to activate a custom dictionary in SCAYT. The user * dictionary name must be used. Available only for the licensed version. * @name CKEDITOR.config.scayt_userDictionaryName * @type String * @default <code>''</code> * @example * config.scayt_userDictionaryName = 'MyDictionary'; */ /** * Defines the order SCAYT context menu items by groups. * This must be a string with one or more of the following * words separated by a pipe character ("|"): * <ul> * <li><code>suggest</code> &ndash; main suggestion word list,</li> * <li><code>moresuggest</code> &ndash; more suggestions word list,</li> * <li><code>control</code> &ndash; SCAYT commands, such as "Ignore" and "Add Word".</li> * </ul> * * @name CKEDITOR.config.scayt_contextMenuItemsOrder * @type String * @default <code>'suggest|moresuggest|control'</code> * @example * config.scayt_contextMenuItemsOrder = 'moresuggest|control|suggest'; */
10npsite
trunk/guanli/system/ckeditor/_source/plugins/scayt/plugin.js
JavaScript
asf20
29,975
a { text-decoration:none; padding: 2px 4px 4px 6px; display : block; border-width: 1px; border-style: solid; margin : 0px; } a.cke_scayt_toogle:hover, a.cke_scayt_toogle:focus, a.cke_scayt_toogle:active { border-color: #316ac5; background-color: #dff1ff; color : #000; cursor: pointer; margin : 0px; } a.cke_scayt_toogle { color : #316ac5; border-color: #fff; } .scayt_enabled a.cke_scayt_item { color : #316ac5; border-color: #fff; margin : 0px; } .scayt_disabled a.cke_scayt_item { color : gray; border-color : #fff; } .scayt_enabled a.cke_scayt_item:hover, .scayt_enabled a.cke_scayt_item:focus, .scayt_enabled a.cke_scayt_item:active { border-color: #316ac5; background-color: #dff1ff; color : #000; cursor: pointer; } .scayt_disabled a.cke_scayt_item:hover, .scayt_disabled a.cke_scayt_item:focus, .scayt_disabled a.cke_scayt_item:active { border-color: gray; background-color: #dff1ff; color : gray; cursor: no-drop; } .cke_scayt_set_on, .cke_scayt_set_off { display: none; } .scayt_enabled .cke_scayt_set_on { display: none; } .scayt_disabled .cke_scayt_set_on { display: inline; } .scayt_disabled .cke_scayt_set_off { display: none; } .scayt_enabled .cke_scayt_set_off { display: inline; }
10npsite
trunk/guanli/system/ckeditor/_source/plugins/scayt/dialogs/toolbar.css
CSS
asf20
1,302
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.dialog.add( 'scaytcheck', function( editor ) { var firstLoad = true, captions, doc = CKEDITOR.document, editorName = editor.name, tags = CKEDITOR.plugins.scayt.getUiTabs( editor ), i, contents = [], userDicActive = 0, dic_buttons = [ // [0] contains buttons for creating "dic_create_" + editorName + ",dic_restore_" + editorName, // [1] contains buton for manipulation "dic_rename_" + editorName + ",dic_delete_" + editorName ], optionsIds = [ 'mixedCase', 'mixedWithDigits', 'allCaps', 'ignoreDomainNames' ]; // common operations function getBOMAllOptions() { if (typeof document.forms["optionsbar_" + editorName] != "undefined") return document.forms["optionsbar_" + editorName]["options"]; return []; } function getBOMAllLangs() { if (typeof document.forms["languagesbar_" + editorName] != "undefined") return document.forms["languagesbar_" + editorName]["scayt_lang"]; return []; } function setCheckedValue( radioObj, newValue ) { if ( !radioObj ) return; var radioLength = radioObj.length; if ( radioLength == undefined ) { radioObj.checked = radioObj.value == newValue.toString(); return; } for ( var i = 0; i < radioLength; i++ ) { radioObj[i].checked = false; if ( radioObj[i].value == newValue.toString() ) radioObj[i].checked = true; } } var lang = editor.lang.scayt; var tags_contents = [ { id : 'options', label : lang.optionsTab, elements : [ { type : 'html', id : 'options', html : '<form name="optionsbar_' + editorName + '"><div class="inner_options">' + ' <div class="messagebox"></div>' + ' <div style="display:none;">' + ' <input type="checkbox" name="options" id="allCaps_' + editorName + '" />' + ' <label for="allCaps" id="label_allCaps_' + editorName + '"></label>' + ' </div>' + ' <div style="display:none;">' + ' <input name="options" type="checkbox" id="ignoreDomainNames_' + editorName + '" />' + ' <label for="ignoreDomainNames" id="label_ignoreDomainNames_' + editorName + '"></label>' + ' </div>' + ' <div style="display:none;">' + ' <input name="options" type="checkbox" id="mixedCase_' + editorName + '" />' + ' <label for="mixedCase" id="label_mixedCase_' + editorName + '"></label>' + ' </div>' + ' <div style="display:none;">' + ' <input name="options" type="checkbox" id="mixedWithDigits_' + editorName + '" />' + ' <label for="mixedWithDigits" id="label_mixedWithDigits_' + editorName + '"></label>' + ' </div>' + '</div></form>' } ] }, { id : 'langs', label : lang.languagesTab, elements : [ { type : 'html', id : 'langs', html : '<form name="languagesbar_' + editorName + '"><div class="inner_langs">' + ' <div class="messagebox"></div> ' + ' <div style="float:left;width:45%;margin-left:5px;" id="scayt_lcol_' + editorName + '" ></div>' + ' <div style="float:left;width:45%;margin-left:15px;" id="scayt_rcol_' + editorName + '"></div>' + '</div></form>' } ] }, { id : 'dictionaries', label : lang.dictionariesTab, elements : [ { type : 'html', style: '', id : 'dictionaries', html : '<form name="dictionarybar_' + editorName + '"><div class="inner_dictionary" style="text-align:left; white-space:normal; width:320px; overflow: hidden;">' + ' <div style="margin:5px auto; width:80%;white-space:normal; overflow:hidden;" id="dic_message_' + editorName + '"> </div>' + ' <div style="margin:5px auto; width:80%;white-space:normal;"> ' + ' <span class="cke_dialog_ui_labeled_label" >Dictionary name</span><br>'+ ' <span class="cke_dialog_ui_labeled_content" >'+ ' <div class="cke_dialog_ui_input_text">'+ ' <input id="dic_name_' + editorName + '" type="text" class="cke_dialog_ui_input_text"/>'+ ' </div></span></div>'+ ' <div style="margin:5px auto; width:80%;white-space:normal;">'+ ' <a style="display:none;" class="cke_dialog_ui_button" href="javascript:void(0)" id="dic_create_' + editorName + '">'+ ' </a>' + ' <a style="display:none;" class="cke_dialog_ui_button" href="javascript:void(0)" id="dic_delete_' + editorName + '">'+ ' </a>' + ' <a style="display:none;" class="cke_dialog_ui_button" href="javascript:void(0)" id="dic_rename_' + editorName + '">'+ ' </a>' + ' <a style="display:none;" class="cke_dialog_ui_button" href="javascript:void(0)" id="dic_restore_' + editorName + '">'+ ' </a>' + ' </div>' + ' <div style="margin:5px auto; width:95%;white-space:normal;" id="dic_info_' + editorName + '"></div>' + '</div></form>' } ] }, { id : 'about', label : lang.aboutTab, elements : [ { type : 'html', id : 'about', style : 'margin: 5px 5px;', html : '<div id="scayt_about_' + editorName + '"></div>' } ] } ]; var dialogDefiniton = { title : lang.title, minWidth : 360, minHeight : 220, onShow : function() { var dialog = this; dialog.data = editor.fire( 'scaytDialog', {} ); dialog.options = dialog.data.scayt_control.option(); dialog.chosed_lang = dialog.sLang = dialog.data.scayt_control.sLang; if ( !dialog.data || !dialog.data.scayt || !dialog.data.scayt_control ) { alert( 'Error loading application service' ); dialog.hide(); return; } var stop = 0; if ( firstLoad ) { dialog.data.scayt.getCaption( editor.langCode || 'en', function( caps ) { if ( stop++ > 0 ) // Once only return; captions = caps; init_with_captions.apply( dialog ); reload.apply( dialog ); firstLoad = false; }); } else reload.apply( dialog ); dialog.selectPage( dialog.data.tab ); }, onOk : function() { var scayt_control = this.data.scayt_control; scayt_control.option( this.options ); // Setup language if it was changed. var csLang = this.chosed_lang; scayt_control.setLang( csLang ); scayt_control.refresh(); }, onCancel: function() { var o = getBOMAllOptions(); for ( var i in o ) o[i].checked = false; setCheckedValue( getBOMAllLangs(), "" ); }, contents : contents }; var scayt_control = CKEDITOR.plugins.scayt.getScayt( editor ); for ( i = 0; i < tags.length; i++ ) { if ( tags[ i ] == 1 ) contents[ contents.length ] = tags_contents[ i ]; } if ( tags[2] == 1 ) userDicActive = 1; var init_with_captions = function() { var dialog = this, lang_list = dialog.data.scayt.getLangList(), buttonCaptions = [ 'dic_create', 'dic_delete', 'dic_rename', 'dic_restore' ], buttonIds = [], langList = [], labels = optionsIds, i; // Add buttons titles if ( userDicActive ) { for ( i = 0; i < buttonCaptions.length; i++ ) { buttonIds[ i ] = buttonCaptions[ i ] + "_" + editorName; doc.getById( buttonIds[ i ] ).setHtml( '<span class="cke_dialog_ui_button">' + captions[ 'button_' + buttonCaptions[ i ]] +'</span>' ); } doc.getById( 'dic_info_' + editorName ).setHtml( captions[ 'dic_info' ] ); } // Fill options and dictionary labels. if ( tags[0] == 1 ) { for ( i in labels ) { var labelCaption = 'label_' + labels[ i ], labelId = labelCaption + '_' + editorName, labelElement = doc.getById( labelId ); if ( 'undefined' != typeof labelElement && 'undefined' != typeof captions[ labelCaption ] && 'undefined' != typeof dialog.options[labels[ i ]] ) { labelElement.setHtml( captions[ labelCaption ] ); var labelParent = labelElement.getParent(); labelParent.$.style.display = "block"; } } } var about = '<p><img src="' + window.scayt.getAboutInfo().logoURL + '" /></p>' + '<p>' + captions[ 'version' ] + window.scayt.getAboutInfo().version.toString() + '</p>' + '<p>' + captions[ 'about_throwt_copy' ] + '</p>'; doc.getById( 'scayt_about_' + editorName ).setHtml( about ); // Create languages tab. var createOption = function( option, list ) { var label = doc.createElement( 'label' ); label.setAttribute( 'for', 'cke_option' + option ); label.setHtml( list[ option ] ); if ( dialog.sLang == option ) // Current. dialog.chosed_lang = option; var div = doc.createElement( 'div' ); var radio = CKEDITOR.dom.element.createFromHtml( '<input id="cke_option' + option + '" type="radio" ' + ( dialog.sLang == option ? 'checked="checked"' : '' ) + ' value="' + option + '" name="scayt_lang" />' ); radio.on( 'click', function() { this.$.checked = true; dialog.chosed_lang = option; }); div.append( radio ); div.append( label ); return { lang : list[ option ], code : option, radio : div }; }; if ( tags[1] ==1 ) { for ( i in lang_list.rtl ) langList[ langList.length ] = createOption( i, lang_list.ltr ); for ( i in lang_list.ltr ) langList[ langList.length ] = createOption( i, lang_list.ltr ); langList.sort( function( lang1, lang2 ) { return ( lang2.lang > lang1.lang ) ? -1 : 1 ; }); var fieldL = doc.getById( 'scayt_lcol_' + editorName ), fieldR = doc.getById( 'scayt_rcol_' + editorName ); for ( i=0; i < langList.length; i++ ) { var field = ( i < langList.length / 2 ) ? fieldL : fieldR; field.append( langList[ i ].radio ); } } // user dictionary handlers var dic = {}; dic.dic_create = function( el, dic_name , dic_buttons ) { // comma separated button's ids include repeats if exists var all_buttons = dic_buttons[0] + ',' + dic_buttons[1]; var err_massage = captions["err_dic_create"]; var suc_massage = captions["succ_dic_create"]; window.scayt.createUserDictionary( dic_name, function( arg ) { hide_dic_buttons ( all_buttons ); display_dic_buttons ( dic_buttons[1] ); suc_massage = suc_massage.replace("%s" , arg.dname ); dic_success_message (suc_massage); }, function( arg ) { err_massage = err_massage.replace("%s" ,arg.dname ); dic_error_message ( err_massage + "( "+ (arg.message || "") +")"); }); }; dic.dic_rename = function( el, dic_name ) { // // try to rename dictionary var err_massage = captions["err_dic_rename"] || ""; var suc_massage = captions["succ_dic_rename"] || ""; window.scayt.renameUserDictionary( dic_name, function( arg ) { suc_massage = suc_massage.replace("%s" , arg.dname ); set_dic_name( dic_name ); dic_success_message ( suc_massage ); }, function( arg ) { err_massage = err_massage.replace("%s" , arg.dname ); set_dic_name( dic_name ); dic_error_message( err_massage + "( " + ( arg.message || "" ) + " )" ); }); }; dic.dic_delete = function( el, dic_name , dic_buttons ) { var all_buttons = dic_buttons[0] + ',' + dic_buttons[1]; var err_massage = captions["err_dic_delete"]; var suc_massage = captions["succ_dic_delete"]; // try to delete dictionary window.scayt.deleteUserDictionary( function( arg ) { suc_massage = suc_massage.replace("%s" , arg.dname ); hide_dic_buttons ( all_buttons ); display_dic_buttons ( dic_buttons[0] ); set_dic_name( "" ); // empty input field dic_success_message( suc_massage ); }, function( arg ) { err_massage = err_massage.replace("%s" , arg.dname ); dic_error_message(err_massage); }); }; dic.dic_restore = dialog.dic_restore || function( el, dic_name , dic_buttons ) { // try to restore existing dictionary var all_buttons = dic_buttons[0] + ',' + dic_buttons[1]; var err_massage = captions["err_dic_restore"]; var suc_massage = captions["succ_dic_restore"]; window.scayt.restoreUserDictionary(dic_name, function( arg ) { suc_massage = suc_massage.replace("%s" , arg.dname ); hide_dic_buttons ( all_buttons ); display_dic_buttons(dic_buttons[1]); dic_success_message( suc_massage ); }, function( arg ) { err_massage = err_massage.replace("%s" , arg.dname ); dic_error_message( err_massage ); }); }; function onDicButtonClick( ev ) { var dic_name = doc.getById('dic_name_' + editorName).getValue(); if ( !dic_name ) { dic_error_message(" Dictionary name should not be empty. "); return false; } try{ var el = ev.data.getTarget().getParent(); var id = /(dic_\w+)_[\w\d]+/.exec(el.getId())[1]; dic[ id ].apply( null, [ el, dic_name, dic_buttons ] ); } catch(err) { dic_error_message(" Dictionary error. "); } return true; } // ** bind event listeners var arr_buttons = ( dic_buttons[0] + ',' + dic_buttons[1] ).split( ',' ), l; for ( i = 0, l = arr_buttons.length ; i < l ; i += 1 ) { var dic_button = doc.getById(arr_buttons[i]); if ( dic_button ) dic_button.on( 'click', onDicButtonClick, this ); } }; var reload = function() { var dialog = this; // for enabled options tab if ( tags[0] == 1 ){ var opto = getBOMAllOptions(); // Animate options. for ( var k=0,l = opto.length; k<l;k++ ) { var i = opto[k].id; var checkbox = doc.getById( i ); if ( checkbox ) { opto[k].checked = false; //alert (opto[k].removeAttribute) if ( dialog.options[ i.split("_")[0] ] == 1 ) { opto[k].checked = true; } // Bind events. Do it only once. if ( firstLoad ) { checkbox.on( 'click', function() { dialog.options[ this.getId().split("_")[0] ] = this.$.checked ? 1 : 0 ; }); } } } } //for enabled languages tab if ( tags[1] == 1 ) { var domLang = doc.getById("cke_option" + dialog.sLang); setCheckedValue( domLang.$,dialog.sLang ); } // * user dictionary if ( userDicActive ) { window.scayt.getNameUserDictionary( function( o ) { var dic_name = o.dname; hide_dic_buttons( dic_buttons[0] + ',' + dic_buttons[1] ); if ( dic_name ) { doc.getById( 'dic_name_' + editorName ).setValue(dic_name); display_dic_buttons( dic_buttons[1] ); } else display_dic_buttons( dic_buttons[0] ); }, function() { doc.getById( 'dic_name_' + editorName ).setValue(""); }); dic_success_message(""); } }; function dic_error_message( m ) { doc.getById('dic_message_' + editorName).setHtml('<span style="color:red;">' + m + '</span>' ); } function dic_success_message( m ) { doc.getById('dic_message_' + editorName).setHtml('<span style="color:blue;">' + m + '</span>') ; } function display_dic_buttons( sIds ) { sIds = String( sIds ); var aIds = sIds.split(','); for ( var i=0, l = aIds.length; i < l ; i+=1) doc.getById( aIds[i] ).$.style.display = "inline"; } function hide_dic_buttons( sIds ) { sIds = String( sIds ); var aIds = sIds.split(','); for ( var i = 0, l = aIds.length; i < l ; i += 1 ) doc.getById( aIds[i] ).$.style.display = "none"; } function set_dic_name( dic_name ) { doc.getById('dic_name_' + editorName).$.value= dic_name; } return dialogDefiniton; });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/scayt/dialogs/options.js
JavaScript
asf20
16,191
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.add( 'listblock', { requires : [ 'panel' ], onLoad : function() { CKEDITOR.ui.panel.prototype.addListBlock = function( name, definition ) { return this.addBlock( name, new CKEDITOR.ui.listBlock( this.getHolderElement(), definition ) ); }; CKEDITOR.ui.listBlock = CKEDITOR.tools.createClass( { base : CKEDITOR.ui.panel.block, $ : function( blockHolder, blockDefinition ) { blockDefinition = blockDefinition || {}; var attribs = blockDefinition.attributes || ( blockDefinition.attributes = {} ); ( this.multiSelect = !!blockDefinition.multiSelect ) && ( attribs[ 'aria-multiselectable' ] = true ); // Provide default role of 'listbox'. !attribs.role && ( attribs.role = 'listbox' ); // Call the base contructor. this.base.apply( this, arguments ); var keys = this.keys; keys[ 40 ] = 'next'; // ARROW-DOWN keys[ 9 ] = 'next'; // TAB keys[ 38 ] = 'prev'; // ARROW-UP keys[ CKEDITOR.SHIFT + 9 ] = 'prev'; // SHIFT + TAB keys[ 32 ] = CKEDITOR.env.ie ? 'mouseup' : 'click'; // SPACE CKEDITOR.env.ie && ( keys[ 13 ] = 'mouseup' ); // Manage ENTER, since onclick is blocked in IE (#8041). this._.pendingHtml = []; this._.items = {}; this._.groups = {}; }, _ : { close : function() { if ( this._.started ) { this._.pendingHtml.push( '</ul>' ); delete this._.started; } }, getClick : function() { if ( !this._.click ) { this._.click = CKEDITOR.tools.addFunction( function( value ) { var marked = true; if ( this.multiSelect ) marked = this.toggle( value ); else this.mark( value ); if ( this.onClick ) this.onClick( value, marked ); }, this ); } return this._.click; } }, proto : { add : function( value, html, title ) { var pendingHtml = this._.pendingHtml, id = CKEDITOR.tools.getNextId(); if ( !this._.started ) { pendingHtml.push( '<ul role="presentation" class=cke_panel_list>' ); this._.started = 1; this._.size = this._.size || 0; } this._.items[ value ] = id; pendingHtml.push( '<li id=', id, ' class=cke_panel_listItem role=presentation>' + '<a id="', id, '_option" _cke_focus=1 hidefocus=true' + ' title="', title || value, '"' + ' href="javascript:void(\'', value, '\')" ' + ( CKEDITOR.env.ie ? 'onclick="return false;" onmouseup' : 'onclick' ) + // #188 '="CKEDITOR.tools.callFunction(', this._.getClick(), ',\'', value, '\'); return false;"', ' role="option">', html || value, '</a>' + '</li>' ); }, startGroup : function( title ) { this._.close(); var id = CKEDITOR.tools.getNextId(); this._.groups[ title ] = id; this._.pendingHtml.push( '<h1 role="presentation" id=', id, ' class=cke_panel_grouptitle>', title, '</h1>' ); }, commit : function() { this._.close(); this.element.appendHtml( this._.pendingHtml.join( '' ) ); delete this._.size; this._.pendingHtml = []; }, toggle : function( value ) { var isMarked = this.isMarked( value ); if ( isMarked ) this.unmark( value ); else this.mark( value ); return !isMarked; }, hideGroup : function( groupTitle ) { var group = this.element.getDocument().getById( this._.groups[ groupTitle ] ), list = group && group.getNext(); if ( group ) { group.setStyle( 'display', 'none' ); if ( list && list.getName() == 'ul' ) list.setStyle( 'display', 'none' ); } }, hideItem : function( value ) { this.element.getDocument().getById( this._.items[ value ] ).setStyle( 'display', 'none' ); }, showAll : function() { var items = this._.items, groups = this._.groups, doc = this.element.getDocument(); for ( var value in items ) { doc.getById( items[ value ] ).setStyle( 'display', '' ); } for ( var title in groups ) { var group = doc.getById( groups[ title ] ), list = group.getNext(); group.setStyle( 'display', '' ); if ( list && list.getName() == 'ul' ) list.setStyle( 'display', '' ); } }, mark : function( value ) { if ( !this.multiSelect ) this.unmarkAll(); var itemId = this._.items[ value ], item = this.element.getDocument().getById( itemId ); item.addClass( 'cke_selected' ); this.element.getDocument().getById( itemId + '_option' ).setAttribute( 'aria-selected', true ); this.onMark && this.onMark( item ); }, unmark : function( value ) { var doc = this.element.getDocument(), itemId = this._.items[ value ], item = doc.getById( itemId ); item.removeClass( 'cke_selected' ); doc.getById( itemId + '_option' ).removeAttribute( 'aria-selected' ); this.onUnmark && this.onUnmark( item ); }, unmarkAll : function() { var items = this._.items, doc = this.element.getDocument(); for ( var value in items ) { var itemId = items[ value ]; doc.getById( itemId ).removeClass( 'cke_selected' ); doc.getById( itemId + '_option' ).removeAttribute( 'aria-selected' ); } this.onUnmark && this.onUnmark(); }, isMarked : function( value ) { return this.element.getDocument().getById( this._.items[ value ] ).hasClass( 'cke_selected' ); }, focus : function( value ) { this._.focusIndex = -1; if ( value ) { var selected = this.element.getDocument().getById( this._.items[ value ] ).getFirst(); var links = this.element.getElementsByTag( 'a' ), link, i = -1; while ( ( link = links.getItem( ++i ) ) ) { if ( link.equals( selected ) ) { this._.focusIndex = i; break; } } setTimeout( function() { selected.focus(); }, 0 ); } } } }); } });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/listblock/plugin.js
JavaScript
asf20
6,772
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @file Paste as plain text plugin */ (function() { // The pastetext command definition. var pasteTextCmd = { exec : function( editor ) { var clipboardText = CKEDITOR.tools.tryThese( function() { var clipboardText = window.clipboardData.getData( 'Text' ); if ( !clipboardText ) throw 0; return clipboardText; } // Any other approach that's working... ); if ( !clipboardText ) // Clipboard access privilege is not granted. { editor.openDialog( 'pastetext' ); return false; } else editor.fire( 'paste', { 'text' : clipboardText } ); return true; } }; // Register the plugin. CKEDITOR.plugins.add( 'pastetext', { init : function( editor ) { var commandName = 'pastetext', command = editor.addCommand( commandName, pasteTextCmd ); editor.ui.addButton( 'PasteText', { label : editor.lang.pasteText.button, command : commandName }); CKEDITOR.dialog.add( commandName, CKEDITOR.getUrl( this.path + 'dialogs/pastetext.js' ) ); if ( editor.config.forcePasteAsPlainText ) { // Intercept the default pasting process. editor.on( 'beforeCommandExec', function ( evt ) { var mode = evt.data.commandData; // Do NOT overwrite if HTML format is explicitly requested. if ( evt.data.name == 'paste' && mode != 'html' ) { editor.execCommand( 'pastetext' ); evt.cancel(); } }, null, null, 0 ); editor.on( 'beforePaste', function( evt ) { evt.data.mode = 'text'; }); } editor.on( 'pasteState', function( evt ) { editor.getCommand( 'pastetext' ).setState( evt.data ); }); }, requires : [ 'clipboard' ] }); })(); /** * Whether to force all pasting operations to insert on plain text into the * editor, loosing any formatting information possibly available in the source * text. * <strong>Note:</strong> paste from word is not affected by this configuration. * @name CKEDITOR.config.forcePasteAsPlainText * @type Boolean * @default false * @example * config.forcePasteAsPlainText = true; */
10npsite
trunk/guanli/system/ckeditor/_source/plugins/pastetext/plugin.js
JavaScript
asf20
2,362
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function() { CKEDITOR.dialog.add( 'pastetext', function( editor ) { return { title : editor.lang.pasteText.title, minWidth : CKEDITOR.env.ie && CKEDITOR.env.quirks ? 368 : 350, minHeight : 240, onShow : function(){ this.setupContent(); }, onOk : function(){ this.commitContent(); }, contents : [ { label : editor.lang.common.generalTab, id : 'general', elements : [ { type : 'html', id : 'pasteMsg', html : '<div style="white-space:normal;width:340px;">' + editor.lang.clipboard.pasteMsg + '</div>' }, { type : 'textarea', id : 'content', className : 'cke_pastetext', onLoad : function() { var label = this.getDialog().getContentElement( 'general', 'pasteMsg' ).getElement(), input = this.getElement().getElementsByTag( 'textarea' ).getItem( 0 ); input.setAttribute( 'aria-labelledby', label.$.id ); input.setStyle( 'direction', editor.config.contentsLangDirection ); }, focus : function() { this.getElement().focus(); }, setup : function() { this.setValue( '' ); }, commit : function() { var value = this.getValue(); setTimeout( function() { editor.fire( 'paste', { 'text' : value } ); }, 0 ); } } ] } ] }; }); })();
10npsite
trunk/guanli/system/ckeditor/_source/plugins/pastetext/dialogs/pastetext.js
JavaScript
asf20
1,697
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function() { var pxUnit = CKEDITOR.tools.cssLength, needsIEHacks = CKEDITOR.env.ie && ( CKEDITOR.env.ie7Compat || CKEDITOR.env.quirks || CKEDITOR.env.version < 7 ); function getWidth( el ) { return CKEDITOR.env.ie ? el.$.clientWidth : parseInt( el.getComputedStyle( 'width' ), 10 ); } function getBorderWidth( element, side ) { var computed = element.getComputedStyle( 'border-' + side + '-width' ), borderMap = { thin: '0px', medium: '1px', thick: '2px' }; if ( computed.indexOf( 'px' ) < 0 ) { // look up keywords if ( computed in borderMap && element.getComputedStyle( 'border-style' ) != 'none' ) computed = borderMap[ computed ]; else computed = 0; } return parseInt( computed, 10 ); } // Gets the table row that contains the most columns. function getMasterPillarRow( table ) { var $rows = table.$.rows, maxCells = 0, cellsCount, $elected, $tr; for ( var i = 0, len = $rows.length ; i < len; i++ ) { $tr = $rows[ i ]; cellsCount = $tr.cells.length; if ( cellsCount > maxCells ) { maxCells = cellsCount; $elected = $tr; } } return $elected; } function buildTableColumnPillars( table ) { var pillars = [], pillarIndex = -1, rtl = ( table.getComputedStyle( 'direction' ) == 'rtl' ); // Get the raw row element that cointains the most columns. var $tr = getMasterPillarRow( table ); // Get the tbody element and position, which will be used to set the // top and bottom boundaries. var tbody = new CKEDITOR.dom.element( table.$.tBodies[ 0 ] ), tbodyPosition = tbody.getDocumentPosition(); // Loop thorugh all cells, building pillars after each one of them. for ( var i = 0, len = $tr.cells.length ; i < len ; i++ ) { // Both the current cell and the successive one will be used in the // pillar size calculation. var td = new CKEDITOR.dom.element( $tr.cells[ i ] ), nextTd = $tr.cells[ i + 1 ] && new CKEDITOR.dom.element( $tr.cells[ i + 1 ] ); pillarIndex += td.$.colSpan || 1; // Calculate the pillar boundary positions. var pillarLeft, pillarRight, pillarWidth; var x = td.getDocumentPosition().x; // Calculate positions based on the current cell. rtl ? pillarRight = x + getBorderWidth( td, 'left' ) : pillarLeft = x + td.$.offsetWidth - getBorderWidth( td, 'right' ); // Calculate positions based on the next cell, if available. if ( nextTd ) { x = nextTd.getDocumentPosition().x; rtl ? pillarLeft = x + nextTd.$.offsetWidth - getBorderWidth( nextTd, 'right' ) : pillarRight = x + getBorderWidth( nextTd, 'left' ); } // Otherwise calculate positions based on the table (for last cell). else { x = table.getDocumentPosition().x; rtl ? pillarLeft = x : pillarRight = x + table.$.offsetWidth; } pillarWidth = Math.max( pillarRight - pillarLeft, 3 ); // The pillar should reflects exactly the shape of the hovered // column border line. pillars.push( { table : table, index : pillarIndex, x : pillarLeft, y : tbodyPosition.y, width : pillarWidth, height : tbody.$.offsetHeight, rtl : rtl } ); } return pillars; } function getPillarAtPosition( pillars, positionX ) { for ( var i = 0, len = pillars.length ; i < len ; i++ ) { var pillar = pillars[ i ]; if ( positionX >= pillar.x && positionX <= ( pillar.x + pillar.width ) ) return pillar; } return null; } function cancel( evt ) { ( evt.data || evt ).preventDefault(); } function columnResizer( editor ) { var pillar, document, resizer, isResizing, startOffset, currentShift; var leftSideCells, rightSideCells, leftShiftBoundary, rightShiftBoundary; function detach() { pillar = null; currentShift = 0; isResizing = 0; document.removeListener( 'mouseup', onMouseUp ); resizer.removeListener( 'mousedown', onMouseDown ); resizer.removeListener( 'mousemove', onMouseMove ); document.getBody().setStyle( 'cursor', 'auto' ); // Hide the resizer (remove it on IE7 - #5890). needsIEHacks ? resizer.remove() : resizer.hide(); } function resizeStart() { // Before starting to resize, figure out which cells to change // and the boundaries of this resizing shift. var columnIndex = pillar.index, map = CKEDITOR.tools.buildTableMap( pillar.table ), leftColumnCells = [], rightColumnCells = [], leftMinSize = Number.MAX_VALUE, rightMinSize = leftMinSize, rtl = pillar.rtl; for ( var i = 0, len = map.length ; i < len ; i++ ) { var row = map[ i ], leftCell = row[ columnIndex + ( rtl ? 1 : 0 ) ], rightCell = row[ columnIndex + ( rtl ? 0 : 1 ) ]; leftCell = leftCell && new CKEDITOR.dom.element( leftCell ); rightCell = rightCell && new CKEDITOR.dom.element( rightCell ); if ( !leftCell || !rightCell || !leftCell.equals( rightCell ) ) { leftCell && ( leftMinSize = Math.min( leftMinSize, getWidth( leftCell ) ) ); rightCell && ( rightMinSize = Math.min( rightMinSize, getWidth( rightCell ) ) ); leftColumnCells.push( leftCell ); rightColumnCells.push( rightCell ); } } // Cache the list of cells to be resized. leftSideCells = leftColumnCells; rightSideCells = rightColumnCells; // Cache the resize limit boundaries. leftShiftBoundary = pillar.x - leftMinSize; rightShiftBoundary = pillar.x + rightMinSize; resizer.setOpacity( 0.5 ); startOffset = parseInt( resizer.getStyle( 'left' ), 10 ); currentShift = 0; isResizing = 1; resizer.on( 'mousemove', onMouseMove ); // Prevent the native drag behavior otherwise 'mousemove' won't fire. document.on( 'dragstart', cancel ); } function resizeEnd() { isResizing = 0; resizer.setOpacity( 0 ); currentShift && resizeColumn(); var table = pillar.table; setTimeout( function () { table.removeCustomData( '_cke_table_pillars' ); }, 0 ); document.removeListener( 'dragstart', cancel ); } function resizeColumn() { var rtl = pillar.rtl, cellsCount = rtl ? rightSideCells.length : leftSideCells.length; // Perform the actual resize to table cells, only for those by side of the pillar. for ( var i = 0 ; i < cellsCount ; i++ ) { var leftCell = leftSideCells[ i ], rightCell = rightSideCells[ i ], table = pillar.table; // Defer the resizing to avoid any interference among cells. CKEDITOR.tools.setTimeout( function( leftCell, leftOldWidth, rightCell, rightOldWidth, tableWidth, sizeShift ) { leftCell && leftCell.setStyle( 'width', pxUnit( Math.max( leftOldWidth + sizeShift, 0 ) ) ); rightCell && rightCell.setStyle( 'width', pxUnit( Math.max( rightOldWidth - sizeShift, 0 ) ) ); // If we're in the last cell, we need to resize the table as well if ( tableWidth ) table.setStyle( 'width', pxUnit( tableWidth + sizeShift * ( rtl ? -1 : 1 ) ) ); } , 0, this, [ leftCell, leftCell && getWidth( leftCell ), rightCell, rightCell && getWidth( rightCell ), ( !leftCell || !rightCell ) && ( getWidth( table ) + getBorderWidth( table, 'left' ) + getBorderWidth( table, 'right' ) ), currentShift ] ); } } function onMouseDown( evt ) { cancel( evt ); resizeStart(); document.on( 'mouseup', onMouseUp, this ); } function onMouseUp( evt ) { evt.removeListener(); resizeEnd(); } function onMouseMove( evt ) { move( evt.data.$.clientX ); } document = editor.document; resizer = CKEDITOR.dom.element.createFromHtml( '<div data-cke-temp=1 contenteditable=false unselectable=on '+ 'style="position:absolute;cursor:col-resize;filter:alpha(opacity=0);opacity:0;' + 'padding:0;background-color:#004;background-image:none;border:0px none;z-index:10"></div>', document ); // Except on IE6/7 (#5890), place the resizer after body to prevent it // from being editable. if ( !needsIEHacks ) document.getDocumentElement().append( resizer ); this.attachTo = function( targetPillar ) { // Accept only one pillar at a time. if ( isResizing ) return; // On IE6/7, we append the resizer everytime we need it. (#5890) if ( needsIEHacks ) { document.getBody().append( resizer ); currentShift = 0; } pillar = targetPillar; resizer.setStyles( { width: pxUnit( targetPillar.width ), height : pxUnit( targetPillar.height ), left : pxUnit( targetPillar.x ), top : pxUnit( targetPillar.y ) }); // In IE6/7, it's not possible to have custom cursors for floating // elements in an editable document. Show the resizer in that case, // to give the user a visual clue. needsIEHacks && resizer.setOpacity( 0.25 ); resizer.on( 'mousedown', onMouseDown, this ); document.getBody().setStyle( 'cursor', 'col-resize' ); // Display the resizer to receive events but don't show it, // only change the cursor to resizable shape. resizer.show(); }; var move = this.move = function( posX ) { if ( !pillar ) return 0; if ( !isResizing && ( posX < pillar.x || posX > ( pillar.x + pillar.width ) ) ) { detach(); return 0; } var resizerNewPosition = posX - Math.round( resizer.$.offsetWidth / 2 ); if ( isResizing ) { if ( resizerNewPosition == leftShiftBoundary || resizerNewPosition == rightShiftBoundary ) return 1; resizerNewPosition = Math.max( resizerNewPosition, leftShiftBoundary ); resizerNewPosition = Math.min( resizerNewPosition, rightShiftBoundary ); currentShift = resizerNewPosition - startOffset; } resizer.setStyle( 'left', pxUnit( resizerNewPosition ) ); return 1; }; } function clearPillarsCache( evt ) { var target = evt.data.getTarget(); if ( evt.name == 'mouseout' ) { // Bypass interal mouse move. if ( !target.is ( 'table' ) ) return; var dest = new CKEDITOR.dom.element( evt.data.$.relatedTarget || evt.data.$.toElement ); while( dest && dest.$ && !dest.equals( target ) && !dest.is( 'body' ) ) dest = dest.getParent(); if ( !dest || dest.equals( target ) ) return; } target.getAscendant( 'table', 1 ).removeCustomData( '_cke_table_pillars' ); evt.removeListener(); } CKEDITOR.plugins.add( 'tableresize', { requires : [ 'tabletools' ], init : function( editor ) { editor.on( 'contentDom', function() { var resizer; editor.document.getBody().on( 'mousemove', function( evt ) { evt = evt.data; // If we're already attached to a pillar, simply move the // resizer. if ( resizer && resizer.move( evt.$.clientX ) ) { cancel( evt ); return; } // Considering table, tr, td, tbody but nothing else. var target = evt.getTarget(), table, pillars; if ( !target.is( 'table' ) && !target.getAscendant( 'tbody', 1 ) ) return; table = target.getAscendant( 'table', 1 ); if ( !( pillars = table.getCustomData( '_cke_table_pillars' ) ) ) { // Cache table pillars calculation result. table.setCustomData( '_cke_table_pillars', ( pillars = buildTableColumnPillars( table ) ) ); table.on( 'mouseout', clearPillarsCache ); table.on( 'mousedown', clearPillarsCache ); } var pillar = getPillarAtPosition( pillars, evt.$.clientX ); if ( pillar ) { !resizer && ( resizer = new columnResizer( editor ) ); resizer.attachTo( pillar ); } }); }); } }); })();
10npsite
trunk/guanli/system/ckeditor/_source/plugins/tableresize/plugin.js
JavaScript
asf20
12,197
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.add( 'resize', { init : function( editor ) { var config = editor.config; // Resize in the same direction of chrome, // which is identical to dir of editor element. (#6614) var resizeDir = editor.element.getDirection( 1 ); !config.resize_dir && ( config.resize_dir = 'both' ); ( config.resize_maxWidth == undefined ) && ( config.resize_maxWidth = 3000 ); ( config.resize_maxHeight == undefined ) && ( config.resize_maxHeight = 3000 ); ( config.resize_minWidth == undefined ) && ( config.resize_minWidth = 750 ); ( config.resize_minHeight == undefined ) && ( config.resize_minHeight = 250 ); if ( config.resize_enabled !== false ) { var container = null, origin, startSize, resizeHorizontal = ( config.resize_dir == 'both' || config.resize_dir == 'horizontal' ) && ( config.resize_minWidth != config.resize_maxWidth ), resizeVertical = ( config.resize_dir == 'both' || config.resize_dir == 'vertical' ) && ( config.resize_minHeight != config.resize_maxHeight ); function dragHandler( evt ) { var dx = evt.data.$.screenX - origin.x, dy = evt.data.$.screenY - origin.y, width = startSize.width, height = startSize.height, internalWidth = width + dx * ( resizeDir == 'rtl' ? -1 : 1 ), internalHeight = height + dy; if ( resizeHorizontal ) width = Math.max( config.resize_minWidth, Math.min( internalWidth, config.resize_maxWidth ) ); if ( resizeVertical ) height = Math.max( config.resize_minHeight, Math.min( internalHeight, config.resize_maxHeight ) ); // DO NOT impose fixed size with single direction resize. (#6308) editor.resize( resizeHorizontal ? width : null, height ); } function dragEndHandler ( evt ) { CKEDITOR.document.removeListener( 'mousemove', dragHandler ); CKEDITOR.document.removeListener( 'mouseup', dragEndHandler ); if ( editor.document ) { editor.document.removeListener( 'mousemove', dragHandler ); editor.document.removeListener( 'mouseup', dragEndHandler ); } } var mouseDownFn = CKEDITOR.tools.addFunction( function( $event ) { if ( !container ) container = editor.getResizable(); startSize = { width : container.$.offsetWidth || 0, height : container.$.offsetHeight || 0 }; origin = { x : $event.screenX, y : $event.screenY }; config.resize_minWidth > startSize.width && ( config.resize_minWidth = startSize.width ); config.resize_minHeight > startSize.height && ( config.resize_minHeight = startSize.height ); CKEDITOR.document.on( 'mousemove', dragHandler ); CKEDITOR.document.on( 'mouseup', dragEndHandler ); if ( editor.document ) { editor.document.on( 'mousemove', dragHandler ); editor.document.on( 'mouseup', dragEndHandler ); } }); editor.on( 'destroy', function() { CKEDITOR.tools.removeFunction( mouseDownFn ); } ); editor.on( 'themeSpace', function( event ) { if ( event.data.space == 'bottom' ) { var direction = ''; if ( resizeHorizontal && !resizeVertical ) direction = ' cke_resizer_horizontal'; if ( !resizeHorizontal && resizeVertical ) direction = ' cke_resizer_vertical'; var resizerHtml = '<div' + ' class="cke_resizer' + direction + ' cke_resizer_' + resizeDir + '"' + ' title="' + CKEDITOR.tools.htmlEncode( editor.lang.resize ) + '"' + ' onmousedown="CKEDITOR.tools.callFunction(' + mouseDownFn + ', event)"' + '></div>'; // Always sticks the corner of botttom space. resizeDir == 'ltr' && direction == 'ltr' ? event.data.html += resizerHtml : event.data.html = resizerHtml + event.data.html; } }, editor, null, 100 ); } } } ); /** * The minimum editor width, in pixels, when resizing the editor interface by using the resize handle. * Note: It falls back to editor's actual width if it is smaller than the default value. * @name CKEDITOR.config.resize_minWidth * @type Number * @default 750 * @example * config.resize_minWidth = 500; */ /** * The minimum editor height, in pixels, when resizing the editor interface by using the resize handle. * Note: It falls back to editor's actual height if it is smaller than the default value. * @name CKEDITOR.config.resize_minHeight * @type Number * @default 250 * @example * config.resize_minHeight = 600; */ /** * The maximum editor width, in pixels, when resizing the editor interface by using the resize handle. * @name CKEDITOR.config.resize_maxWidth * @type Number * @default 3000 * @example * config.resize_maxWidth = 750; */ /** * The maximum editor height, in pixels, when resizing the editor interface by using the resize handle. * @name CKEDITOR.config.resize_maxHeight * @type Number * @default 3000 * @example * config.resize_maxHeight = 600; */ /** * Whether to enable the resizing feature. If this feature is disabled, the resize handle will not be visible. * @name CKEDITOR.config.resize_enabled * @type Boolean * @default true * @example * config.resize_enabled = false; */ /** * The dimensions for which the editor resizing is enabled. Possible values * are <code>both</code>, <code>vertical</code>, and <code>horizontal</code>. * @name CKEDITOR.config.resize_dir * @type String * @default 'both' * @since 3.3 * @example * config.resize_dir = 'vertical'; */
10npsite
trunk/guanli/system/ckeditor/_source/plugins/resize/plugin.js
JavaScript
asf20
5,739
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @fileOverview The "show border" plugin. The command display visible outline * border line around all table elements if table doesn't have a none-zero 'border' attribute specified. */ (function() { var showBorderClassName = 'cke_show_border', cssStyleText, cssTemplate = // TODO: For IE6, we don't have child selector support, // where nested table cells could be incorrect. ( CKEDITOR.env.ie6Compat ? [ '.%1 table.%2,', '.%1 table.%2 td, .%1 table.%2 th', '{', 'border : #d3d3d3 1px dotted', '}' ] : [ '.%1 table.%2,', '.%1 table.%2 > tr > td, .%1 table.%2 > tr > th,', '.%1 table.%2 > tbody > tr > td, .%1 table.%2 > tbody > tr > th,', '.%1 table.%2 > thead > tr > td, .%1 table.%2 > thead > tr > th,', '.%1 table.%2 > tfoot > tr > td, .%1 table.%2 > tfoot > tr > th', '{', 'border : #d3d3d3 1px dotted', '}' ] ).join( '' ); cssStyleText = cssTemplate.replace( /%2/g, showBorderClassName ).replace( /%1/g, 'cke_show_borders ' ); var commandDefinition = { preserveState : true, editorFocus : false, readOnly: 1, exec : function ( editor ) { this.toggleState(); this.refresh( editor ); }, refresh : function( editor ) { if ( editor.document ) { var funcName = ( this.state == CKEDITOR.TRISTATE_ON ) ? 'addClass' : 'removeClass'; editor.document.getBody()[ funcName ]( 'cke_show_borders' ); } } }; CKEDITOR.plugins.add( 'showborders', { requires : [ 'wysiwygarea' ], modes : { 'wysiwyg' : 1 }, init : function( editor ) { var command = editor.addCommand( 'showborders', commandDefinition ); command.canUndo = false; if ( editor.config.startupShowBorders !== false ) command.setState( CKEDITOR.TRISTATE_ON ); editor.addCss( cssStyleText ); // Refresh the command on setData. editor.on( 'mode', function() { if ( command.state != CKEDITOR.TRISTATE_DISABLED ) command.refresh( editor ); }, null, null, 100 ); // Refresh the command on wysiwyg frame reloads. editor.on( 'contentDom', function() { if ( command.state != CKEDITOR.TRISTATE_DISABLED ) command.refresh( editor ); }); editor.on( 'removeFormatCleanup', function( evt ) { var element = evt.data; if ( editor.getCommand( 'showborders' ).state == CKEDITOR.TRISTATE_ON && element.is( 'table' ) && ( !element.hasAttribute( 'border' ) || parseInt( element.getAttribute( 'border' ), 10 ) <= 0 ) ) element.addClass( showBorderClassName ); }); }, afterInit : function( editor ) { var dataProcessor = editor.dataProcessor, dataFilter = dataProcessor && dataProcessor.dataFilter, htmlFilter = dataProcessor && dataProcessor.htmlFilter; if ( dataFilter ) { dataFilter.addRules( { elements : { 'table' : function( element ) { var attributes = element.attributes, cssClass = attributes[ 'class' ], border = parseInt( attributes.border, 10 ); if ( ( !border || border <= 0 ) && ( !cssClass || cssClass.indexOf( showBorderClassName ) == -1 ) ) attributes[ 'class' ] = ( cssClass || '' ) + ' ' + showBorderClassName; } } } ); } if ( htmlFilter ) { htmlFilter.addRules( { elements : { 'table' : function( table ) { var attributes = table.attributes, cssClass = attributes[ 'class' ]; cssClass && ( attributes[ 'class' ] = cssClass.replace( showBorderClassName, '' ) .replace( /\s{2}/, ' ' ) .replace( /^\s+|\s+$/, '' ) ); } } } ); } } }); // Table dialog must be aware of it. CKEDITOR.on( 'dialogDefinition', function( ev ) { var dialogName = ev.data.name; if ( dialogName == 'table' || dialogName == 'tableProperties' ) { var dialogDefinition = ev.data.definition, infoTab = dialogDefinition.getContents( 'info' ), borderField = infoTab.get( 'txtBorder' ), originalCommit = borderField.commit; borderField.commit = CKEDITOR.tools.override( originalCommit, function( org ) { return function( data, selectedTable ) { org.apply( this, arguments ); var value = parseInt( this.getValue(), 10 ); selectedTable[ ( !value || value <= 0 ) ? 'addClass' : 'removeClass' ]( showBorderClassName ); }; } ); var advTab = dialogDefinition.getContents( 'advanced' ), classField = advTab && advTab.get( 'advCSSClasses' ); if ( classField ) { classField.setup = CKEDITOR.tools.override( classField.setup, function( originalSetup ) { return function() { originalSetup.apply( this, arguments ); this.setValue( this.getValue().replace( /cke_show_border/, '' ) ); }; }); classField.commit = CKEDITOR.tools.override( classField.commit, function( originalCommit ) { return function( data, element ) { originalCommit.apply( this, arguments ); if ( !parseInt( element.getAttribute( 'border' ), 10 ) ) element.addClass( 'cke_show_border' ); }; }); } } }); } )(); /** * Whether to automatically enable the "show borders" command when the editor loads. * (ShowBorders in FCKeditor) * @name CKEDITOR.config.startupShowBorders * @type Boolean * @default true * @example * config.startupShowBorders = false; */
10npsite
trunk/guanli/system/ckeditor/_source/plugins/showborders/plugin.js
JavaScript
asf20
5,800
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function() { // Base HTML entities. var htmlbase = 'nbsp,gt,lt,amp'; var entities = // Latin-1 Entities 'quot,iexcl,cent,pound,curren,yen,brvbar,sect,uml,copy,ordf,laquo,' + 'not,shy,reg,macr,deg,plusmn,sup2,sup3,acute,micro,para,middot,' + 'cedil,sup1,ordm,raquo,frac14,frac12,frac34,iquest,times,divide,' + // Symbols 'fnof,bull,hellip,prime,Prime,oline,frasl,weierp,image,real,trade,' + 'alefsym,larr,uarr,rarr,darr,harr,crarr,lArr,uArr,rArr,dArr,hArr,' + 'forall,part,exist,empty,nabla,isin,notin,ni,prod,sum,minus,lowast,' + 'radic,prop,infin,ang,and,or,cap,cup,int,there4,sim,cong,asymp,ne,' + 'equiv,le,ge,sub,sup,nsub,sube,supe,oplus,otimes,perp,sdot,lceil,' + 'rceil,lfloor,rfloor,lang,rang,loz,spades,clubs,hearts,diams,' + // Other Special Characters 'circ,tilde,ensp,emsp,thinsp,zwnj,zwj,lrm,rlm,ndash,mdash,lsquo,' + 'rsquo,sbquo,ldquo,rdquo,bdquo,dagger,Dagger,permil,lsaquo,rsaquo,' + 'euro'; // Latin Letters Entities var latin = 'Agrave,Aacute,Acirc,Atilde,Auml,Aring,AElig,Ccedil,Egrave,Eacute,' + 'Ecirc,Euml,Igrave,Iacute,Icirc,Iuml,ETH,Ntilde,Ograve,Oacute,Ocirc,' + 'Otilde,Ouml,Oslash,Ugrave,Uacute,Ucirc,Uuml,Yacute,THORN,szlig,' + 'agrave,aacute,acirc,atilde,auml,aring,aelig,ccedil,egrave,eacute,' + 'ecirc,euml,igrave,iacute,icirc,iuml,eth,ntilde,ograve,oacute,ocirc,' + 'otilde,ouml,oslash,ugrave,uacute,ucirc,uuml,yacute,thorn,yuml,' + 'OElig,oelig,Scaron,scaron,Yuml'; // Greek Letters Entities. var greek = 'Alpha,Beta,Gamma,Delta,Epsilon,Zeta,Eta,Theta,Iota,Kappa,Lambda,Mu,' + 'Nu,Xi,Omicron,Pi,Rho,Sigma,Tau,Upsilon,Phi,Chi,Psi,Omega,alpha,' + 'beta,gamma,delta,epsilon,zeta,eta,theta,iota,kappa,lambda,mu,nu,xi,' + 'omicron,pi,rho,sigmaf,sigma,tau,upsilon,phi,chi,psi,omega,thetasym,' + 'upsih,piv'; /** * Create a mapping table between one character and its entity form from a list of entity names. * @param reverse {Boolean} Whether to create a reverse map from the entity string form to an actual character. */ function buildTable( entities, reverse ) { var table = {}, regex = []; // Entities that the browsers DOM don't transform to the final char // automatically. var specialTable = { nbsp : '\u00A0', // IE | FF shy : '\u00AD', // IE gt : '\u003E', // IE | FF | -- | Opera lt : '\u003C', // IE | FF | Safari | Opera amp : '\u0026', // ALL apos : '\u0027', // IE quot : '\u0022' // IE }; entities = entities.replace( /\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g, function( match, entity ) { var org = reverse ? '&' + entity + ';' : specialTable[ entity ], result = reverse ? specialTable[ entity ] : '&' + entity + ';'; table[ org ] = result; regex.push( org ); return ''; }); if ( !reverse && entities ) { // Transforms the entities string into an array. entities = entities.split( ',' ); // Put all entities inside a DOM element, transforming them to their // final chars. var div = document.createElement( 'div' ), chars; div.innerHTML = '&' + entities.join( ';&' ) + ';'; chars = div.innerHTML; div = null; // Add all chars to the table. for ( var i = 0 ; i < chars.length ; i++ ) { var charAt = chars.charAt( i ); table[ charAt ] = '&' + entities[ i ] + ';'; regex.push( charAt ); } } table.regex = regex.join( reverse ? '|' : '' ); return table; } CKEDITOR.plugins.add( 'entities', { afterInit : function( editor ) { var config = editor.config; var dataProcessor = editor.dataProcessor, htmlFilter = dataProcessor && dataProcessor.htmlFilter; if ( htmlFilter ) { // Mandatory HTML base entities. var selectedEntities = []; if ( config.basicEntities !== false ) selectedEntities.push( htmlbase ); if ( config.entities ) { if ( selectedEntities.length ) selectedEntities.push( entities ); if ( config.entities_latin ) selectedEntities.push( latin ); if ( config.entities_greek ) selectedEntities.push( greek ); if ( config.entities_additional ) selectedEntities.push( config.entities_additional ); } var entitiesTable = buildTable( selectedEntities.join( ',' ) ); // Create the Regex used to find entities in the text, leave it matches nothing if entities are empty. var entitiesRegex = entitiesTable.regex ? '[' + entitiesTable.regex + ']' : 'a^'; delete entitiesTable.regex; if ( config.entities && config.entities_processNumerical ) entitiesRegex = '[^ -~]|' + entitiesRegex ; entitiesRegex = new RegExp( entitiesRegex, 'g' ); function getEntity( character ) { return config.entities_processNumerical == 'force' || !entitiesTable[ character ] ? '&#' + character.charCodeAt(0) + ';' : entitiesTable[ character ]; } // Decode entities that the browsers has transformed // at first place. var baseEntitiesTable = buildTable( [ htmlbase, 'shy' ].join( ',' ) , true ), baseEntitiesRegex = new RegExp( baseEntitiesTable.regex, 'g' ); function getChar( character ) { return baseEntitiesTable[ character ]; } htmlFilter.addRules( { text : function( text ) { return text.replace( baseEntitiesRegex, getChar ) .replace( entitiesRegex, getEntity ); } }); } } }); })(); /** * Whether to escape basic HTML entities in the document, including: * <ul> * <li><code>nbsp</code></li> * <li><code>gt</code></li> * <li><code>lt</code></li> * <li><code>amp</code></li> * </ul> * <strong>Note:</strong> It should not be subject to change unless when outputting a non-HTML data format like BBCode. * @type Boolean * @default <code>true</code> * @example * config.basicEntities = false; */ CKEDITOR.config.basicEntities = true; /** * Whether to use HTML entities in the output. * @name CKEDITOR.config.entities * @type Boolean * @default <code>true</code> * @example * config.entities = false; */ CKEDITOR.config.entities = true; /** * Whether to convert some Latin characters (Latin alphabet No&#46; 1, ISO 8859-1) * to HTML entities. The list of entities can be found in the * <a href="http://www.w3.org/TR/html4/sgml/entities.html#h-24.2.1">W3C HTML 4.01 Specification, section 24.2.1</a>. * @name CKEDITOR.config.entities_latin * @type Boolean * @default <code>true</code> * @example * config.entities_latin = false; */ CKEDITOR.config.entities_latin = true; /** * Whether to convert some symbols, mathematical symbols, and Greek letters to * HTML entities. This may be more relevant for users typing text written in Greek. * The list of entities can be found in the * <a href="http://www.w3.org/TR/html4/sgml/entities.html#h-24.3.1">W3C HTML 4.01 Specification, section 24.3.1</a>. * @name CKEDITOR.config.entities_greek * @type Boolean * @default <code>true</code> * @example * config.entities_greek = false; */ CKEDITOR.config.entities_greek = true; /** * Whether to convert all remaining characters not included in the ASCII * character table to their relative decimal numeric representation of HTML entity. * When set to <code>force</code>, it will convert all entities into this format. * For example the phrase "This is Chinese: &#27721;&#35821;." is output * as "This is Chinese: &amp;#27721;&amp;#35821;." * @name CKEDITOR.config.entities_processNumerical * @type Boolean|String * @default <code>false</code> * @example * config.entities_processNumerical = true; * config.entities_processNumerical = 'force'; //Converts from "&nbsp;" into "&#160;"; */ /** * A comma separated list of additional entities to be used. Entity names * or numbers must be used in a form that excludes the "&amp;" prefix and the ";" ending. * @name CKEDITOR.config.entities_additional * @default <code>'#39'</code> (The single quote (') character.) * @type String * @example * config.entities_additional = '#1049'; // Adds Cyrillic capital letter Short I (&#1049;). */ CKEDITOR.config.entities_additional = '#39';
10npsite
trunk/guanli/system/ckeditor/_source/plugins/entities/plugin.js
JavaScript
asf20
8,499
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.add( 'docprops', { init : function( editor ) { var cmd = new CKEDITOR.dialogCommand( 'docProps' ); // Only applicable on full page mode. cmd.modes = { wysiwyg : editor.config.fullPage }; editor.addCommand( 'docProps', cmd ); CKEDITOR.dialog.add( 'docProps', this.path + 'dialogs/docprops.js' ); editor.ui.addButton( 'DocProps', { label : editor.lang.docprops.label, command : 'docProps' }); } });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/docprops/plugin.js
JavaScript
asf20
611
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.dialog.add( 'docProps', function( editor ) { var lang = editor.lang.docprops, langCommon = editor.lang.common, metaHash = {}; function getDialogValue( dialogName, callback ) { var onOk = function() { releaseHandlers( this ); callback( this, this._.parentDialog ); }; var releaseHandlers = function( dialog ) { dialog.removeListener( 'ok', onOk ); dialog.removeListener( 'cancel', releaseHandlers ); }; var bindToDialog = function( dialog ) { dialog.on( 'ok', onOk ); dialog.on( 'cancel', releaseHandlers ); }; editor.execCommand( dialogName ); if ( editor._.storedDialogs.colordialog ) bindToDialog( editor._.storedDialogs.colordialog ); else { CKEDITOR.on( 'dialogDefinition', function( e ) { if ( e.data.name != dialogName ) return; var definition = e.data.definition; e.removeListener(); definition.onLoad = CKEDITOR.tools.override( definition.onLoad, function( orginal ) { return function() { bindToDialog( this ); definition.onLoad = orginal; if ( typeof orginal == 'function' ) orginal.call( this ); }; }); }); } } function handleOther() { var dialog = this.getDialog(), other = dialog.getContentElement( 'general', this.id + 'Other' ); if ( !other ) return; if ( this.getValue() == 'other' ) { other.getInputElement().removeAttribute( 'readOnly' ); other.focus(); other.getElement().removeClass( 'cke_disabled' ); } else { other.getInputElement().setAttribute( 'readOnly', true ); other.getElement().addClass( 'cke_disabled' ); } } function commitMeta( name, isHttp, value ) { return function( doc, html, head ) { var hash = metaHash, val = typeof value != 'undefined' ? value : this.getValue(); if ( !val && ( name in hash ) ) hash[ name ].remove(); else if ( val && ( name in hash ) ) hash[ name ].setAttribute( 'content', val ); else if ( val ) { var meta = new CKEDITOR.dom.element( 'meta', editor.document ); meta.setAttribute( isHttp ? 'http-equiv' : 'name', name ); meta.setAttribute( 'content', val ); head.append( meta ); } }; } function setupMeta( name, ret ) { return function() { var hash = metaHash, result = ( name in hash ) ? hash[ name ].getAttribute( 'content' ) || '' : ''; if ( ret ) return result; this.setValue( result ); return null; }; } function commitMargin( name ) { return function( doc, html, head, body ) { body.removeAttribute( 'margin' + name ); var val = this.getValue(); if ( val !== '' ) body.setStyle( 'margin-' + name, CKEDITOR.tools.cssLength( val ) ); else body.removeStyle( 'margin-' + name ); }; } function createMetaHash( doc ) { var hash = {}, metas = doc.getElementsByTag( 'meta' ), count = metas.count(); for ( var i = 0; i < count; i++ ) { var meta = metas.getItem( i ); hash[ meta.getAttribute( meta.hasAttribute( 'http-equiv' ) ? 'http-equiv' : 'name' ).toLowerCase() ] = meta; } return hash; } // We cannot just remove the style from the element, as it might be affected from non-inline stylesheets. // To get the proper result, we should manually set the inline style to its default value. function resetStyle( element, prop, resetVal ) { element.removeStyle( prop ); if ( element.getComputedStyle( prop ) != resetVal ) element.setStyle( prop, resetVal ); } // Utilty to shorten the creation of color fields in the dialog. var colorField = function( id, label, fieldProps ) { return { type : 'hbox', padding : 0, widths : [ '60%', '40%' ], children : [ CKEDITOR.tools.extend( { type : 'text', id : id, label : lang[ label ] }, fieldProps || {}, 1 ), { type : 'button', id : id + 'Choose', label : lang.chooseColor, className : 'colorChooser', onClick : function() { var self = this; getDialogValue( 'colordialog', function( colorDialog ) { var dialog = self.getDialog(); dialog.getContentElement( dialog._.currentTabId, id ).setValue( colorDialog.getContentElement( 'picker', 'selectedColor' ).getValue() ); }); } } ] }; }; var previewSrc = 'javascript:' + 'void((function(){' + encodeURIComponent( 'document.open();' + ( CKEDITOR.env.isCustomDomain() ? 'document.domain=\'' + document.domain + '\';' : '' ) + 'document.write( \'<html style="background-color: #ffffff; height: 100%"><head></head><body style="width: 100%; height: 100%; margin: 0px">' + lang.previewHtml + '</body></html>\' );' + 'document.close();' ) + '})())'; return { title : lang.title, minHeight: 330, minWidth: 500, onShow : function() { var doc = editor.document, html = doc.getElementsByTag( 'html' ).getItem( 0 ), head = doc.getHead(), body = doc.getBody(); metaHash = createMetaHash( doc ); this.setupContent( doc, html, head, body ); }, onHide : function() { metaHash = {}; }, onOk : function() { var doc = editor.document, html = doc.getElementsByTag( 'html' ).getItem( 0 ), head = doc.getHead(), body = doc.getBody(); this.commitContent( doc, html, head, body ); }, contents : [ { id : 'general', label : langCommon.generalTab, elements : [ { type : 'text', id : 'title', label : lang.docTitle, setup : function( doc ) { this.setValue( doc.getElementsByTag( 'title' ).getItem( 0 ).data( 'cke-title' ) ); }, commit : function( doc, html, head, body, isPreview ) { if ( isPreview ) return; doc.getElementsByTag( 'title' ).getItem( 0 ).data( 'cke-title', this.getValue() ); } }, { type : 'hbox', children : [ { type : 'select', id : 'dir', label : langCommon.langDir, style : 'width: 100%', items : [ [ langCommon.notSet , '' ], [ langCommon.langDirLtr, 'ltr' ], [ langCommon.langDirRtl, 'rtl' ] ], setup : function( doc, html, head, body ) { this.setValue( body.getDirection() || '' ); }, commit : function( doc, html, head, body ) { var val = this.getValue(); if ( val ) body.setAttribute( 'dir', val ); else body.removeAttribute( 'dir' ); body.removeStyle( 'direction' ); } }, { type : 'text', id : 'langCode', label : langCommon.langCode, setup : function( doc, html ) { this.setValue( html.getAttribute( 'xml:lang' ) || html.getAttribute( 'lang' ) || '' ); }, commit : function( doc, html, head, body, isPreview ) { if ( isPreview ) return; var val = this.getValue(); if ( val ) html.setAttributes( { 'xml:lang' : val, lang : val } ); else html.removeAttributes( { 'xml:lang' : 1, lang : 1 } ); } } ] }, { type : 'hbox', children : [ { type : 'select', id : 'charset', label : lang.charset, style : 'width: 100%', items : [ [ langCommon.notSet, '' ], [ lang.charsetASCII, 'us-ascii' ], [ lang.charsetCE, 'iso-8859-2' ], [ lang.charsetCT, 'big5' ], [ lang.charsetCR, 'iso-8859-5' ], [ lang.charsetGR, 'iso-8859-7' ], [ lang.charsetJP, 'iso-2022-jp' ], [ lang.charsetKR, 'iso-2022-kr' ], [ lang.charsetTR, 'iso-8859-9' ], [ lang.charsetUN, 'utf-8' ], [ lang.charsetWE, 'iso-8859-1' ], [ lang.other, 'other' ] ], 'default' : '', onChange : function() { this.getDialog().selectedCharset = this.getValue() != 'other' ? this.getValue() : ''; handleOther.call( this ); }, setup : function() { this.metaCharset = ( 'charset' in metaHash ); var func = setupMeta( this.metaCharset ? 'charset' : 'content-type', 1, 1 ), val = func.call( this ); !this.metaCharset && val.match( /charset=[^=]+$/ ) && ( val = val.substring( val.indexOf( '=' ) + 1 ) ); if ( val ) { this.setValue( val.toLowerCase() ); if ( !this.getValue() ) { this.setValue( 'other' ); var other = this.getDialog().getContentElement( 'general', 'charsetOther' ); other && other.setValue( val ); } this.getDialog().selectedCharset = val; } handleOther.call( this ); }, commit : function( doc, html, head, body, isPreview ) { if ( isPreview ) return; var value = this.getValue(), other = this.getDialog().getContentElement( 'general', 'charsetOther' ); value == 'other' && ( value = other ? other.getValue() : '' ); value && !this.metaCharset && ( value = ( metaHash[ 'content-type' ] ? metaHash[ 'content-type' ].getAttribute( 'content' ).split( ';' )[0] : 'text/html' ) + '; charset=' + value ); var func = commitMeta( this.metaCharset ? 'charset' : 'content-type', 1, value ); func.call( this, doc, html, head ); } }, { type : 'text', id : 'charsetOther', label : lang.charsetOther, onChange : function(){ this.getDialog().selectedCharset = this.getValue(); } } ] }, { type : 'hbox', children : [ { type : 'select', id : 'docType', label : lang.docType, style : 'width: 100%', items : [ [ langCommon.notSet , '' ], [ 'XHTML 1.1', '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">' ], [ 'XHTML 1.0 Transitional', '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' ], [ 'XHTML 1.0 Strict', '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' ], [ 'XHTML 1.0 Frameset', '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">' ], [ 'HTML 5', '<!DOCTYPE html>' ], [ 'HTML 4.01 Transitional', '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">' ], [ 'HTML 4.01 Strict', '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">' ], [ 'HTML 4.01 Frameset', '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">' ], [ 'HTML 3.2', '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">' ], [ 'HTML 2.0', '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">' ], [ lang.other, 'other' ] ], onChange : handleOther, setup : function() { if ( editor.docType ) { this.setValue( editor.docType ); if ( !this.getValue() ) { this.setValue( 'other' ); var other = this.getDialog().getContentElement( 'general', 'docTypeOther' ); other && other.setValue( editor.docType ); } } handleOther.call( this ); }, commit : function( doc, html, head, body, isPreview ) { if ( isPreview ) return; var value = this.getValue(), other = this.getDialog().getContentElement( 'general', 'docTypeOther' ); editor.docType = value == 'other' ? ( other ? other.getValue() : '' ) : value; } }, { type : 'text', id : 'docTypeOther', label : lang.docTypeOther } ] }, { type : 'checkbox', id : 'xhtmlDec', label : lang.xhtmlDec, setup : function() { this.setValue( !!editor.xmlDeclaration ); }, commit : function( doc, html, head, body, isPreview ) { if ( isPreview ) return; if ( this.getValue() ) { editor.xmlDeclaration = '<?xml version="1.0" encoding="' + ( this.getDialog().selectedCharset || 'utf-8' )+ '"?>' ; html.setAttribute( 'xmlns', 'http://www.w3.org/1999/xhtml' ); } else { editor.xmlDeclaration = ''; html.removeAttribute( 'xmlns' ); } } } ] }, { id : 'design', label : lang.design, elements : [ { type : 'hbox', widths : [ '60%', '40%' ], children : [ { type : 'vbox', children : [ colorField( 'txtColor', 'txtColor', { setup : function( doc, html, head, body ) { this.setValue( body.getComputedStyle( 'color' ) ); }, commit : function( doc, html, head, body, isPreview ) { if ( this.isChanged() || isPreview ) { body.removeAttribute( 'text' ); var val = this.getValue(); if ( val ) body.setStyle( 'color', val ); else body.removeStyle( 'color' ); } } }), colorField( 'bgColor', 'bgColor', { setup : function( doc, html, head, body ) { var val = body.getComputedStyle( 'background-color' ) || ''; this.setValue( val == 'transparent' ? '' : val ); }, commit : function( doc, html, head, body, isPreview ) { if ( this.isChanged() || isPreview ) { body.removeAttribute( 'bgcolor' ); var val = this.getValue(); if ( val ) body.setStyle( 'background-color', val ); else resetStyle( body, 'background-color', 'transparent' ); } } }), { type : 'hbox', widths : [ '60%', '40%' ], padding : 1, children : [ { type : 'text', id : 'bgImage', label : lang.bgImage, setup : function( doc, html, head, body ) { var val = body.getComputedStyle( 'background-image' ) || ''; if ( val == 'none' ) val = ''; else { val = val.replace( /url\(\s*(["']?)\s*([^\)]*)\s*\1\s*\)/i, function( match, quote, url ) { return url; }); } this.setValue( val ); }, commit : function( doc, html, head, body ) { body.removeAttribute( 'background' ); var val = this.getValue(); if ( val ) body.setStyle( 'background-image', 'url(' + val + ')' ); else resetStyle( body, 'background-image', 'none' ); } }, { type : 'button', id : 'bgImageChoose', label : langCommon.browseServer, style : 'display:inline-block;margin-top:10px;', hidden : true, filebrowser : 'design:bgImage' } ] }, { type : 'checkbox', id : 'bgFixed', label : lang.bgFixed, setup : function( doc, html, head, body ) { this.setValue( body.getComputedStyle( 'background-attachment' ) == 'fixed' ); }, commit : function( doc, html, head, body ) { if ( this.getValue() ) body.setStyle( 'background-attachment', 'fixed' ); else resetStyle( body, 'background-attachment', 'scroll' ); } } ] }, { type : 'vbox', children : [ { type : 'html', id : 'marginTitle', html : '<div style="text-align: center; margin: 0px auto; font-weight: bold">' + lang.margin + '</div>' }, { type : 'text', id : 'marginTop', label : lang.marginTop, style : 'width: 80px; text-align: center', align : 'center', inputStyle : 'text-align: center', setup : function( doc, html, head, body ) { this.setValue( body.getStyle( 'margin-top' ) || body.getAttribute( 'margintop' ) || '' ); }, commit : commitMargin( 'top' ) }, { type : 'hbox', children : [ { type : 'text', id : 'marginLeft', label : lang.marginLeft, style : 'width: 80px; text-align: center', align : 'center', inputStyle : 'text-align: center', setup : function( doc, html, head, body ) { this.setValue( body.getStyle( 'margin-left' ) || body.getAttribute( 'marginleft' ) || '' ); }, commit : commitMargin( 'left' ) }, { type : 'text', id : 'marginRight', label : lang.marginRight, style : 'width: 80px; text-align: center', align : 'center', inputStyle : 'text-align: center', setup : function( doc, html, head, body ) { this.setValue( body.getStyle( 'margin-right' ) || body.getAttribute( 'marginright' ) || '' ); }, commit : commitMargin( 'right' ) } ] }, { type : 'text', id : 'marginBottom', label : lang.marginBottom, style : 'width: 80px; text-align: center', align : 'center', inputStyle : 'text-align: center', setup : function( doc, html, head, body ) { this.setValue( body.getStyle( 'margin-bottom' ) || body.getAttribute( 'marginbottom' ) || '' ); }, commit : commitMargin( 'bottom' ) } ] } ] } ] }, { id : 'meta', label : lang.meta, elements : [ { type : 'textarea', id : 'metaKeywords', label : lang.metaKeywords, setup : setupMeta( 'keywords' ), commit : commitMeta( 'keywords' ) }, { type : 'textarea', id : 'metaDescription', label : lang.metaDescription, setup : setupMeta( 'description' ), commit : commitMeta( 'description' ) }, { type : 'text', id : 'metaAuthor', label : lang.metaAuthor, setup : setupMeta( 'author' ), commit : commitMeta( 'author' ) }, { type : 'text', id : 'metaCopyright', label : lang.metaCopyright, setup : setupMeta( 'copyright' ), commit : commitMeta( 'copyright' ) } ] }, { id : 'preview', label : langCommon.preview, elements : [ { type : 'html', id : 'previewHtml', html : '<iframe src="' + previewSrc + '" style="width: 100%; height: 310px" hidefocus="true" frameborder="0" ' + 'id="cke_docProps_preview_iframe"></iframe>', onLoad : function() { this.getDialog().on( 'selectPage', function( ev ) { if ( ev.data.page == 'preview' ) { var self = this; setTimeout( function() { var doc = CKEDITOR.document.getById( 'cke_docProps_preview_iframe' ).getFrameDocument(), html = doc.getElementsByTag( 'html' ).getItem( 0 ), head = doc.getHead(), body = doc.getBody(); self.commitContent( doc, html, head, body, 1 ); }, 50 ); } }); CKEDITOR.document.getById( 'cke_docProps_preview_iframe' ).getAscendant( 'table' ).setStyle( 'height', '100%' ); } } ] } ] }; });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/docprops/dialogs/docprops.js
JavaScript
asf20
20,837
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @fileOverview Plugin definition for the a11yhelp, which provides a dialog * with accessibility related help. */ (function() { var pluginName = 'a11yhelp', commandName = 'a11yHelp'; CKEDITOR.plugins.add( pluginName, { requires: [ 'dialog' ], // List of available localizations. availableLangs : { cs:1, cy:1, da:1, de:1, el:1, en:1, eo:1, fa:1, fi:1, fr:1, gu:1, he:1, it:1, mk:1, nb:1, nl:1, no:1, 'pt-br':1, ro:1, tr:1, ug:1, vi:1, 'zh-cn':1 }, init : function( editor ) { var plugin = this; editor.addCommand( commandName, { exec : function() { var langCode = editor.langCode; langCode = plugin.availableLangs[ langCode ] ? langCode : 'en'; CKEDITOR.scriptLoader.load( CKEDITOR.getUrl( plugin.path + 'lang/' + langCode + '.js' ), function() { CKEDITOR.tools.extend( editor.lang, plugin.langEntries[ langCode ] ); editor.openDialog( commandName ); }); }, modes : { wysiwyg:1, source:1 }, readOnly : 1, canUndo : false }); CKEDITOR.dialog.add( commandName, this.path + 'dialogs/a11yhelp.js' ); } }); })();
10npsite
trunk/guanli/system/ckeditor/_source/plugins/a11yhelp/plugin.js
JavaScript
asf20
1,352
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'a11yhelp', 'nl', { accessibilityHelp : { title : 'Toegankelijkheidsinstructies', contents : 'Help inhoud. Druk op ESC om dit dialoog te sluiten.', legend : [ { name : 'Algemeen', items : [ { name : 'Werkbalk tekstverwerker', legend: 'Druk op ${toolbarFocus} om naar de werkbalk te navigeren. Om te schakelen naar de volgende en vorige werkbalkgroep, gebruik TAB en SHIFT+TAB. Om te schakelen naar de volgende en vorige werkbalkknop, gebruik de PIJL RECHTS en PIJL LINKS. Druk op SPATIE of ENTER om een werkbalkknop te activeren.' }, { name : 'Dialoog tekstverwerker', legend : 'In een dialoogvenster, druk op TAB om te navigeren naar het volgende veld. Druk op SHIFT+TAB om naar het vorige veld te navigeren. Druk op ENTER om het dialoogvenster te verzenden. Druk op ESC om het dialoogvenster te sluiten. Voor dialoogvensters met meerdere tabbladen, druk op ALT+F10 om naar de tabset te navigeren. Schakel naar het volgende tabblad met TAB of PIJL RECHTS. Schakel naar het vorige tabblad met SHIFT+TAB of PIJL LINKS. Druk op SPATIE of ENTER om het tabblad te selecteren.' }, { name : 'Contextmenu tekstverwerker', legend : 'Druk op ${contextMenu} of APPLICATION KEY om het contextmenu te openen. Schakel naar de volgende menuoptie met TAB of PIJL OMLAAG. Schakel naar de vorige menuoptie met SHIFT+TAB of PIJL OMHOOG. Druk op SPATIE of ENTER om een menuoptie te selecteren. Op een submenu van de huidige optie met SPATIE, ENTER of PIJL RECHTS. Ga terug naar de bovenliggende menuoptie met ESC of PIJL LINKS. Sluit het contextmenu met ESC.' }, { name : 'Keuzelijst tekstverwerker', legend : 'In een keuzelijst, schakel naar het volgende item met TAB of PIJL OMLAAG. Schakel naar het vorige item met SHIFT+TAB of PIJL OMHOOG. Druk op SPATIE of ENTER om het item te selecteren. Druk op ESC om de keuzelijst te sluiten.' }, { name : 'Elementenpad werkbalk tekstverwerker', legend : 'Druk op ${elementsPathFocus} om naar het elementenpad te navigeren. Om te schakelen naar het volgende element, gebruik TAB of PIJL RECHTS. Om te schakelen naar het vorige element, gebruik SHIFT+TAB or PIJL LINKS. Druk op SPATIE of ENTER om een element te selecteren in de tekstverwerker.' } ] }, { name : 'Opdrachten', items : [ { name : 'Ongedaan maken opdracht', legend : 'Druk op ${undo}' }, { name : 'Opnieuw uitvoeren opdracht', legend : 'Druk op ${redo}' }, { name : 'Vetgedrukt opdracht', legend : 'Druk up ${bold}' }, { name : 'Cursief opdracht', legend : 'Druk op ${italic}' }, { name : 'Onderstrepen opdracht', legend : 'Druk op ${underline}' }, { name : 'Link opdracht', legend : 'Druk op ${link}' }, { name : 'Werkbalk inklappen opdracht', legend : 'Druk op ${toolbarCollapse}' }, { name : 'Toegankelijkheidshulp', legend : 'Druk op ${a11yHelp}' } ] } ] } });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/a11yhelp/lang/nl.js
JavaScript
asf20
3,520
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'a11yhelp', 'ug', { accessibilityHelp : { title : 'قوشۇمچە چۈشەندۈرۈش', contents : 'ياردەم مەزمۇنى. بۇ سۆزلەشكۈنى ياپماقچى بولسىڭىز ESC نى بېسىڭ.', legend : [ { name : 'ئادەتتىكى', items : [ { name : 'قورال بالداق تەھرىر', legend: '${toolbarFocus} بېسىلسا قورال بالداققا يېتەكلەيدۇ، TAB ياكى SHIFT+TAB ئارقىلىق قورال بالداق گۇرۇپپىسى تاللىنىدۇ، ئوڭ سول يا ئوقتا توپچا تاللىنىدۇ، بوشلۇق ياكى Enter كۇنۇپكىسىدا تاللانغان توپچىنى قوللىنىدۇ.' }, { name : 'تەھرىرلىگۈچ سۆزلەشكۈسى', legend : 'Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page.' // MISSING }, { name : 'تەھرىرلىگۈچ تىل مۇھىت تىزىملىكى', legend : 'Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC.' // MISSING }, { name : 'تەھرىرلىگۈچ تىزىمى', legend : 'Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box.' // MISSING }, { name : 'تەھرىرلىگۈچ ئېلېمېنت يول بالداق', legend : '${elementsPathFocus} بېسىلسا ئېلېمېنت يول بالداققا يېتەكلەيدۇ، TAB ياكى ئوڭ يا ئوقتا كېيىنكى ئېلېمېنت تاللىنىدۇ، SHIFT+TAB ياكى سول يا ئوقتا ئالدىنقى ئېلېمېنت تاللىنىدۇ، بوشلۇق ياكى Enter كۇنۇپكىسىدا تەھرىرلىگۈچتىكى ئېلېمېنت تاللىنىدۇ.' } ] }, { name : 'بۇيرۇق', items : [ { name : 'بۇيرۇقتىن يېنىۋال', legend : '${undo} نى بېسىڭ' }, { name : 'قايتىلاش بۇيرۇقى', legend : '${redo} نى بېسىڭ' }, { name : 'توملىتىش بۇيرۇقى', legend : '${bold} نى بېسىڭ' }, { name : 'يانتۇ بۇيرۇقى', legend : '${italic} نى بېسىڭ' }, { name : 'ئاستى سىزىق بۇيرۇقى', legend : '${underline} نى بېسىڭ' }, { name : 'ئۇلانما بۇيرۇقى', legend : '${link} نى بېسىڭ' }, { name : 'قورال بالداق قاتلاش بۇيرۇقى', legend : '${toolbarCollapse} نى بېسىڭ' }, { name : 'توسالغۇسىز لايىھە چۈشەندۈرۈشى', legend : '${a11yHelp} نى بېسىڭ' } ] } ] } });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/a11yhelp/lang/ug.js
JavaScript
asf20
3,928
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'a11yhelp', 'it', { accessibilityHelp : { title : 'Istruzioni di Accessibilità', contents : 'Contenuti di Aiuto. Per chiudere questa finestra premi ESC.', legend : [ { name : 'Generale', items : [ { name : 'Barra degli strumenti Editor', legend: 'Premi ${toolbarFocus} per navigare fino alla barra degli strumenti. Muoviti tra i gruppi della barra degli strumenti con i tasti Tab e Maiusc-Tab. Spostati tra il successivo ed il precedente pulsante della barra degli strumenti usando le frecce direzionali Destra e Sinistra. Premi Spazio o Invio per attivare il pulsante della barra degli strumenti.' }, { name : 'Finestra Editor', legend : 'All\'interno di una finestra di dialogo, premi Tab per navigare fino al campo successivo della finestra di dialogo, premi Maiusc-Tab per tornare al campo precedente, premi Invio per inviare la finestra di dialogo, premi Esc per uscire. Per le finestre che hanno schede multiple, premi Alt+F10 per navigare nella lista delle schede. Quindi spostati alla scheda successiva con il tasto Tab oppure con la Freccia Destra. Torna alla scheda precedente con Maiusc+Tab oppure con la Freccia Sinistra. Premi Spazio o Invio per scegliere la scheda.' }, { name : 'Menù contestuale Editor', legend : 'Premi ${contextMenu} o TASTO APPLICAZIONE per aprire il menu contestuale. Dunque muoviti all\'opzione successiva del menu con il tasto TAB o con la Freccia Sotto. Muoviti all\'opzione precedente con MAIUSC+TAB o con Freccia Sopra. Premi SPAZIO o INVIO per scegliere l\'opzione di menu. Apri il sottomenu dell\'opzione corrente con SPAZIO o INVIO oppure con la Freccia Destra. Torna indietro al menu superiore con ESC oppure Freccia Sinistra. Chiudi il menu contestuale con ESC.' }, { name : 'Box Lista Editor', legend : 'Dentro un box-lista, muoviti al prossimo elemento della lista con TAB o con la Freccia direzionale giù. Spostati all\'elemento precedente con MAIUSC+TAB oppure con Freccia direzionale sopra. Premi SPAZIO o INVIO per scegliere l\'opzione della lista. Premi ESC per chiudere il box-lista.' }, { name : 'Barra percorso elementi editor', legend : 'Premi ${elementsPathFocus} per navigare tra gli elementi della barra percorso. Muoviti al prossimo pulsante di elemento con TAB o la Freccia direzionale destra. Muoviti al pulsante precedente con MAIUSC+TAB o la Freccia Direzionale Sinistra. Premi SPAZIO o INVIO per scegliere l\'elemento nell\'editor.' } ] }, { name : 'Comandi', items : [ { name : ' Annulla comando', legend : 'Premi ${undo}' }, { name : ' Ripeti comando', legend : 'Premi ${redo}' }, { name : ' Comando Grassetto', legend : 'Premi ${bold}' }, { name : ' Comando Corsivo', legend : 'Premi ${italic}' }, { name : ' Comando Sottolineato', legend : 'Premi ${underline}' }, { name : ' Comando Link', legend : 'Premi ${link}' }, { name : ' Comando riduci barra degli strumenti', legend : 'Premi ${toolbarCollapse}' }, { name : ' Aiuto Accessibilità', legend : 'Premi ${a11yHelp}' } ] } ] } });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/a11yhelp/lang/it.js
JavaScript
asf20
3,726
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'a11yhelp', 'de', { accessibilityHelp : { title : 'Barrierefreiheitinformationen', contents : 'Hilfeinhalt. Um den Dialog zu schliessen die Taste \'ESC\' drücken.', legend : [ { name : 'Allgemein', items : [ { name : 'Editor Symbolleiste', legend: 'Drücken Sie ${toolbarFocus} auf der Symbolleiste. Gehen Sie zur nächsten oder vorherigen Symbolleistengruppe mit TAB und SHIFT-TAB. Gehen Sie zur nächsten oder vorherigen Symbolleiste auf die Schaltfläche mit dem RECHTS- oder LINKS-Pfeil. Drücken Sie die Leertaste oder Eingabetaste, um die Schaltfläche in der Symbolleiste aktivieren.' }, { name : 'Editor Dialog', legend : 'Innerhalb des Dialogs drücken Sie TAB um zum nächsten Dialogfeld zu gelangen, drücken Sie SHIFT-TAG um zum vorherigen Feld zu wechseln, drücken Sie ENTER um den Dialog abzusenden und ESC um den Dialog zu abzubrechen. Um zwischen den Reitern innerhalb eines Dialogs zu wechseln drücken sie ALT-F10. Um zum nächsten Reiter zu gelangen können Sie TAB oder die rechte Pfeiltaste. Zurück gelangt man mit SHIFT-TAB oder der linken Pfeiltaste. Mit der Leertaste oder Enter kann man den Reiter auswählen.' }, { name : 'Editor Kontextmenü', legend : 'Dürcken Sie ${contextMenu} oder die Anwendungstaste um das Kontextmenü zu öffnen. Man kann die Pfeiltasten zum Wechsel benutzen. Mit der Leertaste oder der Enter-Taste kann man den Menüpunkt aufrufen. Schliessen Sie das Kontextmenü mit der ESC-Taste.' }, { name : 'Editor Listen', legend : 'Innerhalb einer Listenbox kann man mit der TAB-Taste oder den Pfeilrunter-Taste den nächsten Menüeintrag wählen. Mit der Shift-TAB Tastenkombination oder der Pfeilhoch-Taste gelangt man zum vorherigen Menüpunkt. Mit der Leertaste oder Enter kann man den Menüpunkt auswählen. Drücken Sie ESC zum Verlassen des Menüs.' }, { name : 'Editor Elementpfadleiste', legend : 'Drücken Sie ${elementsPathFocus} um sich durch die Pfadleiste zu bewegen. Um zum nächsten Element zu gelangen drücken Sie TAB oder die Pfeilrechts-Taste. Zum vorherigen Element gelangen Sie mit der SHIFT-TAB oder der Pfeillinks-Taste. Drücken Sie die Leertaste oder Enter um das Element auszuwählen.' } ] }, { name : 'Befehle', items : [ { name : 'Wiederholen Befehl', legend : 'Drücken Sie ${undo}' }, { name : 'Rückgängig Befehl', legend : 'Drücken Sie ${redo}' }, { name : 'Fettschrift Befehl', legend : 'Drücken Sie ${bold}' }, { name : 'Italic Befehl', legend : 'Drücken Sie ${italic}' }, { name : 'Unterstreichung Befehl', legend : 'Drücken Sie ${underline}' }, { name : 'Link Befehl', legend : 'Drücken Sie ${link}' }, { name : 'Symbolleiste zuammenklappen Befehl', legend : 'Drücken Sie ${toolbarCollapse}' }, { name : 'Eingabehilfen', legend : 'Drücken Sie ${a11yHelp}' } ] } ] } });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/a11yhelp/lang/de.js
JavaScript
asf20
3,531
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'a11yhelp', 'vi', { accessibilityHelp : { title : 'Accessibility Instructions', // MISSING contents : 'Nội dung Hỗ trợ. Nhấn ESC để đóng hộp thoại.', legend : [ { name : 'Chung', items : [ { name : 'Thanh công cụ soạn th', legend: 'Nhấn ${toolbarFocus} để điều hướng đến thanh công cụ. Nhấn TAB và SHIFT-TAB để chuyển đến nhóm thanh công cụ khác. Nhấn MŨI TÊN PHẢI hoặc MŨI TÊN TRÁI để chuyển sang nút khác trên thanh công cụ. Nhấn PHÍM CÁCH hoặc ENTER để kích hoạt nút trên thanh công c.' }, { name : 'Hộp thoại Biên t', legend : 'Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page.' // MISSING }, { name : 'Trình đơn Ngữ cảnh cBộ soạn thảo', legend : 'Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC.' // MISSING }, { name : 'Editor List Box', // MISSING legend : 'Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box.' // MISSING }, { name : 'Editor Element Path Bar', // MISSING legend : 'Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor.' // MISSING } ] }, { name : 'Commands', // MISSING items : [ { name : ' Undo command', // MISSING legend : 'Press ${undo}' // MISSING }, { name : ' Redo command', // MISSING legend : 'Press ${redo}' // MISSING }, { name : ' Bold command', // MISSING legend : 'Press ${bold}' // MISSING }, { name : ' Italic command', // MISSING legend : 'Press ${italic}' // MISSING }, { name : ' Underline command', // MISSING legend : 'Press ${underline}' // MISSING }, { name : ' Link command', // MISSING legend : 'Press ${link}' // MISSING }, { name : ' Toolbar Collapse command', // MISSING legend : 'Press ${toolbarCollapse}' // MISSING }, { name : ' Accessibility Help', // MISSING legend : 'Press ${a11yHelp}' // MISSING } ] } ] } });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/a11yhelp/lang/vi.js
JavaScript
asf20
3,535
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'a11yhelp', 'tr', { accessibilityHelp : { title : 'Erişilebilirlik Talimatları', contents : 'Yardım içeriği. Bu pencereyi kapatmak için ESC tuşuna basın.', legend : [ { name : 'Genel', items : [ { name : 'Araç Çubuğu Editörü', legend: 'Araç çubuğunda gezinmek için ${toolbarFocus} basın. TAB ve SHIFT-TAB ile önceki ve sonraki araç çubuğu grubuna taşıyın. SAĞ OK veya SOL OK ile önceki ve sonraki bir araç çubuğu düğmesini hareket ettirin. SPACE tuşuna basın veya araç çubuğu düğmesini etkinleştirmek için ENTER tuşna basın.' }, { name : 'Dialog Editörü', legend : 'Dialog penceresi içinde, sonraki iletişim alanına gitmek için SEKME tuşuna basın, önceki alana geçmek için SHIFT + TAB tuşuna basın, pencereyi göndermek için ENTER tuşuna basın, dialog penceresini iptal etmek için ESC tuşuna basın. Birden çok sekme sayfaları olan diyalogların, sekme listesine gitmek için ALT + F10 tuşlarına basın. Sonra TAB veya SAĞ OK sonraki sekmeye taşıyın. SHIFT + TAB veya SOL OK ile önceki sekmeye geçin. Sekme sayfayı seçmek için SPACE veya ENTER tuşuna basın.' }, { name : 'İçerik Menü Editörü', legend : 'İçerik menüsünü açmak için ${contextMenu} veya UYGULAMA TUŞU\'na basın. Daha sonra SEKME veya AŞAĞI OK ile bir sonraki menü seçeneği taşıyın. SHIFT + TAB veya YUKARI OK ile önceki seçeneğe gider. Menü seçeneğini seçmek için SPACE veya ENTER tuşuna basın. Seçili seçeneğin alt menüsünü SPACE ya da ENTER veya SAĞ OK açın. Üst menü öğesini geçmek için ESC veya SOL OK ile geri dönün. ESC ile bağlam menüsünü kapatın.' }, { name : 'Liste Kutusu Editörü', legend : 'Liste kutusu içinde, bir sonraki liste öğesine SEKME VEYA AŞAĞI OK ile taşıyın. SHIFT + TAB veya YUKARI önceki liste öğesi taşıyın. Liste seçeneği seçmek için SPACE veya ENTER tuşuna basın. Liste kutusunu kapatmak için ESC tuşuna basın.' }, { name : 'Element Yol Çubuğu Editörü', legend : 'Elementlerin yol çubuğunda gezinmek için ${ElementsPathFocus} basın. SEKME veya SAĞ OK ile sonraki element düğmesine taşıyın. SHIFT + TAB veya SOL OK önceki düğmeye hareket ettirin. Editör içindeki elementi seçmek için ENTER veya SPACE tuşuna basın.' } ] }, { name : 'Komutlar', items : [ { name : 'Komutu geri al', legend : '${undo} basın' }, { name : ' Tekrar komutu uygula', legend : '${redo} basın' }, { name : ' Kalın komut', legend : '${bold} basın' }, { name : ' İtalik komutu', legend : '${italic} basın' }, { name : ' Alttan çizgi komutu', legend : '${underline} basın' }, { name : ' Bağlantı komutu', legend : '${link} basın' }, { name : ' Araç çubuğu Toplama komutu', legend : '${toolbarCollapse} basın' }, { name : 'Erişilebilirlik Yardımı', legend : '${a11yHelp} basın' } ] } ] } });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/a11yhelp/lang/tr.js
JavaScript
asf20
3,618
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'a11yhelp', 'fr', { accessibilityHelp : { title : 'Instructions pour l\'accessibilité', contents : 'Contenu de l\'aide. Pour fermer ce dialogue, appuyez sur la touche ESC (Echappement).', legend : [ { name : 'Général', items : [ { name : 'Barre d\'outils de l\'éditeur', legend: 'Appuyer sur ${toolbarFocus} pour accéder à la barre d\'outils. Se déplacer vers les groupes suivant ou précédent de la barre d\'outil avec les touches TAB et SHIFT-TAB. Se déplacer vers les boutons suivant ou précédent de la barre d\'outils avec les touches FLECHE DROITE et FLECHE GAUCHE. Appuyer sur la barre d\'espace ou la touche ENTRER pour activer le bouton de barre d\'outils.' }, { name : 'Dialogue de léditeur', legend : 'A l\'intérieur d\'un dialogue, appuyer sur la touche TAB pour naviguer jusqu\'au champ de dalogue suivant, appuyez sur les touches SHIFT + TAB pour revenir au champ précédent, appuyez sur la touche ENTRER pour soumettre le dialogue, appuyer sur la touche ESC pour annuler le dialogue. Pour les dialogues avec plusieurs pages d\'onglets, appuyer sur ALT + F10 pour naviguer jusqu\'à la liste des onglets. Puis se déplacer vers l\'onglet suivant avec la touche TAB ou FLECHE DROITE. Se déplacer vers l\'onglet précédent avec les touches SHIFT + TAB ou FLECHE GAUCHE. Appuyer sur la barre d\'espace ou la touche ENTRER pour sélectionner la page de l\'onglet.' }, { name : 'Menu contextuel de l\'éditeur', legend : 'Appuyer sur ${contextMenu} ou entrer le RACCOURCI CLAVIER pour ouvrir le menu contextuel. Puis se déplacer vers l\'option suivante du menu avec les touches TAB ou FLECHE BAS. Se déplacer vers l\'option précédente avec les touches SHIFT+TAB ou FLECHE HAUT. appuyer sur la BARRE D\'ESPACE ou la touche ENTREE pour sélectionner l\'option du menu. Oovrir le sous-menu de l\'option courante avec la BARRE D\'ESPACE ou les touches ENTREE ou FLECHE DROITE. Revenir à l\'élément de menu parent avec les touches ESC ou FLECHE GAUCHE. Fermer le menu contextuel avec ESC.' }, { name : 'Zone de liste en menu déroulant de l\'éditeur', legend : 'A l\'intérieur d\'une liste en menu déroulant, se déplacer vers l\'élément suivant de la liste avec les touches TAB ou FLECHE BAS. Se déplacer vers l\'élément précédent de la liste avec les touches SHIFT + TAB ou FLECHE HAUT. Appuyer sur la BARRE D\'ESPACE ou sur ENTREE pour sélectionner l\'option dans la liste. Appuyer sur ESC pour fermer le menu déroulant.' }, { name : 'Barre d\'emplacement des éléments de léditeur', legend : 'Appuyer sur ${elementsPathFocus} pour naviguer vers la barre d\'emplacement des éléments de léditeur. Se déplacer vers le bouton d\'élément suivant avec les touches TAB ou FLECHE DROITE. Se déplacer vers le bouton d\'élément précédent avec les touches SHIFT+TAB ou FLECHE GAUCHE. Appuyer sur la BARRE D\'ESPACE ou sur ENTREE pour sélectionner l\'élément dans l\'éditeur.' } ] }, { name : 'Commandes', items : [ { name : ' Commande défaire', legend : 'Appuyer sur ${undo}' }, { name : ' Commande refaire', legend : 'Appuyer sur ${redo}' }, { name : ' Commande gras', legend : 'Appuyer sur ${bold}' }, { name : ' Commande italique', legend : 'Appuyer sur ${italic}' }, { name : ' Commande souligné', legend : 'Appuyer sur ${underline}' }, { name : ' Commande lien', legend : 'Appuyer sur ${link}' }, { name : ' Commande enrouler la barre d\'outils', legend : 'Appuyer sur ${toolbarCollapse}' }, { name : ' Aide Accessibilité', legend : 'Appuyer sur ${a11yHelp}' } ] } ] } });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/a11yhelp/lang/fr.js
JavaScript
asf20
4,298
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'a11yhelp', 'zh-cn', { accessibilityHelp : { title : '辅助说明', contents : '帮助内容。要关闭此对话框请按 ESC 键。', legend : [ { name : '常规', items : [ { name : '编辑器工具栏', legend: '按 ${toolbarFocus} 以导航到工具栏,使用 TAB 键或 SHIFT+TAB 组合键以选择工具栏组,使用左右箭头键以选择按钮,按空格键或回车键以应用选中的按钮。' }, { name : '编辑器对话框', legend : '在对话框内,TAB键移动到下一个字段,SHIFT + TAB 移动到上一个字段,ENTER键提交对话框,ESC键取消对话框。对于有多标签的对话框,用ALT + F10来移到标签列表。然后用TAB键或者向右箭头来移动到下一个标签;SHIFT + TAB或者向左箭头移动到上一个标签。用SPACE或者ENTER选择标签。' }, { name : '编辑器上下文菜单', legend : '用 ${contextMenu}或者 应用程序键 打开上下文菜单。然后用TAB键或者向下箭头来移动到下一个菜单项;SHIFT + TAB或者向上箭头移动到上一个菜单项。用SPACE或者ENTER选择菜单项。用SPACE,ENTER或者向右箭头打开子菜单。返回菜单用ESC键或者向左箭头。用ESC关闭上下文菜单。' }, { name : '编辑器列表框', legend : '在列表框中,移到下一列表项用TAB键或者向下箭头。移到上一列表项用SHIFT + TAB或者向上箭头,用SPACE或者ENTER选择列表项。用ESC收起列表框。' }, { name : '编辑器元素路径栏', legend : '按 ${elementsPathFocus} 以导航到元素路径栏,使用 TAB 键或右箭头键选择下一个元素,使用 SHIFT+TAB 组合键或左箭头键选择上一个元素,按空格键或回车键以选定编辑器里的元素。' } ] }, { name : '命令', items : [ { name : ' 撤消命令', legend : '按 ${undo}' }, { name : ' 重做命令', legend : '按 ${redo}' }, { name : ' 加粗命令', legend : '按 ${bold}' }, { name : ' 倾斜命令', legend : '按 ${italic}' }, { name : ' 下划线命令', legend : '按 ${underline}' }, { name : ' 链接命令', legend : '按 ${link}' }, { name : ' 工具栏折叠命令', legend : '按 ${toolbarCollapse}' }, { name : ' 无障碍设计说明', legend : '按 ${a11yHelp}' } ] } ] } });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/a11yhelp/lang/zh-cn.js
JavaScript
asf20
3,013
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'a11yhelp', 'eo', { accessibilityHelp : { title : 'Uzindikoj pri atingeblo', contents : 'Helpilenhavo. Por fermi tiun dialogon, premu la ESKAPAN klavon.', legend : [ { name : 'Ĝeneralaĵoj', items : [ { name : 'Ilbreto de la redaktilo', legend: 'Premu ${toolbarFocus} por atingi la ilbreton. Moviĝu al la sekva aŭ antaŭa grupoj de la ilbreto per la klavoj TABA kaj MAJUSKLIGA-TABA. Moviĝu al la sekva aŭ antaŭa butonoj de la ilbreto per la klavoj SAGO DEKSTREN kaj SAGO MALDEKSTREN. Premu la SPACETklavon aŭ la ENENklavon por aktivigi la ilbretbutonon.' }, { name : 'Redaktildialogo', legend : 'En dialogo, premu la TABAN klavon por navigi al la sekva dialogkampo, premu la MAJUSKLIGAN + TABAN klavojn por reveni al la antaŭa kampo, premu la ENENklavon por sendi la dialogon, premu la ESKAPAN klavon por nuligi la dialogon. Por dialogoj kun pluraj retpaĝoj sub langetoj, premu ALT + F10 por navigi al la langetlisto. Poste moviĝu al la sekva langeto per la klavo TABA aŭ SAGO DEKSTREN. Moviĝu al la antaŭa langeto per la klavoj MAJUSKLIGA + TABA aŭ SAGO MALDEKSTREN. Premu la SPACETklavon aŭ la ENENklavon por selekti la langetretpaĝon.' }, { name : 'Kunteksta menuo de la redaktilo', legend : 'Premu ${contextMenu} aŭ entajpu la KLAVKOMBINAĴON por malfermi la kuntekstan menuon. Poste moviĝu al la sekva opcio de la menuo per la klavoj TABA aŭ SAGO SUBEN. Moviĝu al la antaŭa opcio per la klavoj MAJUSKLGA + TABA aŭ SAGO SUPREN. Premu la SPACETklavon aŭ ENENklavon por selekti la menuopcion. Malfermu la submenuon de la kuranta opcio per la SPACETklavo aŭ la ENENklavo aŭ la SAGO DEKSTREN. Revenu al la elemento de la patra menuo per la klavoj ESKAPA aŭ SAGO MALDEKSTREN. Fermu la kuntekstan menuon per la ESKAPA klavo.' }, { name : 'Fallisto de la redaktilo', legend : 'En fallisto, moviĝu al la sekva listelemento per la klavoj TABA aŭ SAGO SUBEN. Moviĝu al la antaŭa listelemento per la klavoj MAJUSKLIGA + TABA aŭ SAGO SUPREN. Premu la SPACETklavon aŭ ENENklavon por selekti la opcion en la listo. Premu la ESKAPAN klavon por fermi la falmenuon.' }, { name : 'Breto indikanta la vojon al la redaktilelementoj', legend : 'Premu ${elementsPathFocus} por navigi al la breto indikanta la vojon al la redaktilelementoj. Moviĝu al la butono de la sekva elemento per la klavoj TABA aŭ SAGO DEKSTREN. Moviĝu al la butono de la antaŭa elemento per la klavoj MAJUSKLIGA + TABA aŭ SAGO MALDEKSTREN. Premu la SPACETklavon aŭ ENENklavon por selekti la elementon en la redaktilo.' } ] }, { name : 'Komandoj', items : [ { name : 'Komando malfari', legend : 'Premu ${undo}' }, { name : 'Komando refari', legend : 'Premu ${redo}' }, { name : 'Komando grasa', legend : 'Premu ${bold}' }, { name : 'Komando kursiva', legend : 'Premu ${italic}' }, { name : 'Komando substreki', legend : 'Premu ${underline}' }, { name : 'Komando ligilo', legend : 'Premu ${link}' }, { name : 'Komando faldi la ilbreton', legend : 'Premu ${toolbarCollapse}' }, { name : 'Helpilo pri atingeblo', legend : 'Premu ${a11yHelp}' } ] } ] } });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/a11yhelp/lang/eo.js
JavaScript
asf20
3,814
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'a11yhelp', 'en', { accessibilityHelp : { title : 'Accessibility Instructions', contents : 'Help Contents. To close this dialog press ESC.', legend : [ { name : 'General', items : [ { name : 'Editor Toolbar', legend: 'Press ${toolbarFocus} to navigate to the toolbar. ' + 'Move to the next and previous toolbar group with TAB and SHIFT-TAB. ' + 'Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. ' + 'Press SPACE or ENTER to activate the toolbar button.' }, { name : 'Editor Dialog', legend : 'Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. ' + 'For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. ' + 'Then move to next tab with TAB OR RIGTH ARROW. ' + 'Move to previous tab with SHIFT + TAB or LEFT ARROW. ' + 'Press SPACE or ENTER to select the tab page.' }, { name : 'Editor Context Menu', legend : 'Press ${contextMenu} or APPLICATION KEY to open context-menu. ' + 'Then move to next menu option with TAB or DOWN ARROW. ' + 'Move to previous option with SHIFT+TAB or UP ARROW. ' + 'Press SPACE or ENTER to select the menu option. ' + 'Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. ' + 'Go back to parent menu item with ESC or LEFT ARROW. ' + 'Close context menu with ESC.' }, { name : 'Editor List Box', legend : 'Inside a list-box, move to next list item with TAB OR DOWN ARROW. ' + 'Move to previous list item with SHIFT + TAB or UP ARROW. ' + 'Press SPACE or ENTER to select the list option. ' + 'Press ESC to close the list-box.' }, { name : 'Editor Element Path Bar', legend : 'Press ${elementsPathFocus} to navigate to the elements path bar. ' + 'Move to next element button with TAB or RIGHT ARROW. ' + 'Move to previous button with SHIFT+TAB or LEFT ARROW. ' + 'Press SPACE or ENTER to select the element in editor.' } ] }, { name : 'Commands', items : [ { name : ' Undo command', legend : 'Press ${undo}' }, { name : ' Redo command', legend : 'Press ${redo}' }, { name : ' Bold command', legend : 'Press ${bold}' }, { name : ' Italic command', legend : 'Press ${italic}' }, { name : ' Underline command', legend : 'Press ${underline}' }, { name : ' Link command', legend : 'Press ${link}' }, { name : ' Toolbar Collapse command', legend : 'Press ${toolbarCollapse}' }, { name : ' Accessibility Help', legend : 'Press ${a11yHelp}' } ] } ] } });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/a11yhelp/lang/en.js
JavaScript
asf20
3,414
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'a11yhelp', 'da', { accessibilityHelp : { title : 'Tilgængelighedsinstrukser', contents : 'Help Contents. To close this dialog press ESC.', // MISSING legend : [ { name : 'Generelt', items : [ { name : 'Editor værktøjslinje', legend: 'Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button.' // MISSING }, { name : 'Editor Dialog', // MISSING legend : 'Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page.' // MISSING }, { name : 'Editor Context Menu', // MISSING legend : 'Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC.' // MISSING }, { name : 'Editor List Box', // MISSING legend : 'Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box.' // MISSING }, { name : 'Editor Element Path Bar', // MISSING legend : 'Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor.' // MISSING } ] }, { name : 'Kommandoer', items : [ { name : 'Fortryd kommando', legend : 'Klik på ${undo}' }, { name : 'Gentag kommando', legend : 'Klik ${redo}' }, { name : ' Bold command', // MISSING legend : 'Klik ${bold}' }, { name : ' Italic command', // MISSING legend : 'Press ${italic}' // MISSING }, { name : ' Underline command', // MISSING legend : 'Klik ${underline}' }, { name : ' Link command', // MISSING legend : 'Klik ${link}' }, { name : ' Toolbar Collapse command', // MISSING legend : 'Press ${toolbarCollapse}' // MISSING }, { name : ' Accessibility Help', // MISSING legend : 'Kilk ${a11yHelp}' } ] } ] } });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/a11yhelp/lang/da.js
JavaScript
asf20
3,346
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'a11yhelp', 'nb', { accessibilityHelp : { title : 'Instruksjoner for tilgjengelighet', contents : 'Innhold for hjelp. Trykk ESC for å lukke denne dialogen.', legend : [ { name : 'Generelt', items : [ { name : 'Verktøylinje for editor', legend: 'Trykk ${toolbarFocus} for å navigere til verktøylinjen. Flytt til neste og forrige verktøylinjegruppe med TAB og SHIFT-TAB. Flytt til neste og forrige verktøylinjeknapp med HØYRE PILTAST og VENSTRE PILTAST. Trykk MELLOMROM eller ENTER for å aktivere verktøylinjeknappen.' }, { name : 'Dialog for editor', legend : 'Mens du er i en dialog, trykk TAB for å navigere til neste dialogfelt, press SHIFT + TAB for å flytte til forrige felt, trykk ENTER for å akseptere dialogen, trykk ESC for å avbryte dialogen. For dialoger med flere faner, trykk ALT + F10 for å navigere til listen over faner. Gå til neste fane med TAB eller HØYRE PILTAST. Gå til forrige fane med SHIFT + TAB eller VENSTRE PILTAST. Trykk MELLOMROM eller ENTER for å velge fanen.' }, { name : 'Kontekstmeny for editor', legend : 'Trykk ${contextMenu} eller MENYKNAPP for å åpne kontekstmeny. Gå til neste alternativ i menyen med TAB eller PILTAST NED. Gå til forrige alternativ med SHIFT+TAB eller PILTAST OPP. Trykk MELLOMROM eller ENTER for å velge menyalternativet. Åpne undermenyen på valgt alternativ med MELLOMROM eller ENTER eller HØYRE PILTAST. Gå tilbake til overordnet menyelement med ESC eller VENSTRE PILTAST. Lukk kontekstmenyen med ESC.' }, { name : 'Listeboks for editor', legend : 'I en listeboks, gå til neste alternativ i listen med TAB eller PILTAST NED. Gå til forrige alternativ i listen med SHIFT + TAB eller PILTAST OPP. Trykk MELLOMROM eller ENTER for å velge alternativet i listen. Trykk ESC for å lukke listeboksen.' }, { name : 'Verktøylinje for elementsti', legend : 'Trykk ${elementsPathFocus} for å navigere til verktøylinjen som viser elementsti. Gå til neste elementknapp med TAB eller HØYRE PILTAST. Gå til forrige elementknapp med SHIFT+TAB eller VENSTRE PILTAST. Trykk MELLOMROM eller ENTER for å velge elementet i editoren.' } ] }, { name : 'Kommandoer', items : [ { name : 'Angre', legend : 'Trykk ${undo}' }, { name : 'Gjør om', legend : 'Trykk ${redo}' }, { name : 'Fet tekst', legend : 'Trykk ${bold}' }, { name : 'Kursiv tekst', legend : 'Trykk ${italic}' }, { name : 'Understreking', legend : 'Trykk ${underline}' }, { name : 'Link', legend : 'Trykk ${link}' }, { name : 'Skjul verktøylinje', legend : 'Trykk ${toolbarCollapse}' }, { name : 'Hjelp for tilgjengelighet', legend : 'Trykk ${a11yHelp}' } ] } ] } });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/a11yhelp/lang/nb.js
JavaScript
asf20
3,372
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'a11yhelp', 'el', { accessibilityHelp : { title : 'Οδηγίες Προσβασιμότητας', contents : 'Περιεχόμενα Βοήθειας. Πατήστε ESC για κλείσιμο.', legend : [ { name : 'Γενικά', items : [ { name : 'Εργαλειοθήκη Επεξεργαστή', legend: 'Πατήστε ${toolbarFocus} για να περιηγηθείτε στην γραμμή εργαλείων. Μετακινηθείτε ανάμεσα στις ομάδες της γραμμής εργαλείων με TAB και Shift-TAB. Μετακινηθείτε ανάμεσα στα κουμπία εργαλείων με ΔΕΞΙ και ΑΡΙΣΤΕΡΟ ΒΕΛΑΚΙ. Πατήστε ΚΕΝΟ ή ENTER για να ενεργοποιήσετε το ενεργό κουμπί εργαλείου.' }, { name : 'Παράθυρο Διαλόγου Επεξεργαστή', legend : 'Μέσα σε ένα παράθυρο διαλόγου, πατήστε TAB για να μεταβείτε στο επόμενο πεδίο ή SHIFT + TAB για να μεταβείτε στο προηγούμενο. Πατήστε ENTER για να υποβάλετε την φόρμα. Πατήστε ESC για να ακυρώσετε την διαδικασία της φόρμας. Για παράθυρα διαλόγων που έχουν πολλές σελίδες σε καρτέλες πατήστε ALT + F10 για να μεταβείτε στην λίστα των καρτέλων. Στην συνέχεια μπορείτε να μεταβείτε στην επόμενη καρτέλα πατώντας TAB ή RIGHT ARROW. Μπορείτε να μεταβείτε στην προηγούμενη καρτέλα πατώντας SHIFT + TAB ή LEFT ARROW. Πατήστε SPACE ή ENTER για να επιλέξετε την καρτέλα για προβολή.' }, { name : 'Αναδυόμενο Μενού Επεξεργαστή', legend : 'Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC.' // MISSING }, { name : 'Editor List Box', // MISSING legend : 'Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box.' // MISSING }, { name : 'Editor Element Path Bar', // MISSING legend : 'Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor.' // MISSING } ] }, { name : 'Εντολές', items : [ { name : ' Εντολή αναίρεσης', legend : 'Πατήστε ${undo}' }, { name : ' Εντολή επανάληψης', legend : 'Πατήστε ${redo}' }, { name : ' Εντολή έντονης γραφής', legend : 'Πατήστε ${bold}' }, { name : ' Εντολή πλάγιας γραφής', legend : 'Πατήστε ${italic}' }, { name : ' Εντολή υπογράμμισης', legend : 'Πατήστε ${underline}' }, { name : ' Εντολή συνδέσμου', legend : 'Πατήστε ${link}' }, { name : ' Εντολή Σύμπτηξης Εργαλειοθήκης', legend : 'Πατήστε ${toolbarCollapse}' }, { name : ' Βοήθεια Προσβασιμότητας', legend : 'Πατήστε ${a11yHelp}' } ] } ] } });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/a11yhelp/lang/el.js
JavaScript
asf20
4,471
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'a11yhelp', 'fi', { accessibilityHelp : { title : 'Saavutettavuus ohjeet', contents : 'Ohjeen sisällöt. Sulkeaksesi tämän dialogin paina ESC.', legend : [ { name : 'Yleinen', items : [ { name : 'Editorin työkalupalkki', legend: 'Paina ${toolbarFocus} siirtyäksesi työkalupalkkiin. Siirry seuraavaan ja edelliseen työkalupalkin ryhmään TAB ja SHIFT-TAB näppäimillä. Siirry seuraavaan ja edelliseen työkalupainikkeeseen käyttämällä NUOLI OIKEALLE tai NUOLI VASEMMALLE näppäimillä. Paina VÄLILYÖNTI tai ENTER näppäintä aktivoidaksesi työkalupainikkeen.' }, { name : 'Editorin dialogi', legend : 'Dialogin sisällä, painamalla TAB siirryt seuraavaan dialogin kenttään, painamalla SHIFT+TAB siirryt aiempaan kenttään, painamalla ENTER lähetät dialogin, painamalla ESC peruutat dialogin. Dialogeille joissa on useita välilehtiä, paina ALT+F10 siirtyäksesi välillehtilistaan. Siirtyäksesi seuraavaan välilehteen paina TAB tai NUOLI OIKEALLE. Siirry edelliseen välilehteen painamalla SHIFT+TAB tai nuoli vasemmalle. Paina VÄLILYÖNTI tai ENTER valitaksesi välilehden.' }, { name : 'Editorin oheisvalikko', legend : 'Paina ${contextMenu} tai SOVELLUSPAINIKETTA avataksesi oheisvalikon. Liiku seuraavaan valikon vaihtoehtoon TAB tai NUOLI ALAS näppäimillä. Siirry edelliseen vaihtoehtoon SHIFT+TAB tai NUOLI YLÖS näppäimillä. Paina VÄLILYÖNTI tai ENTER valitaksesi valikon kohdan. Avataksesi nykyisen kohdan alivalikon paina VÄLILYÖNTI tai ENTER tai NUOLI OIKEALLE painiketta. Siirtyäksesi takaisin valikon ylemmälle tasolle paina ESC tai NUOLI vasemmalle. Oheisvalikko suljetaan ESC painikkeella.' }, { name : 'Editorin listalaatikko', legend : 'Listalaatikon sisällä siirry seuraavaan listan kohtaan TAB tai NUOLI ALAS painikkeilla. Siirry edelliseen listan kohtaan SHIFT+TAB tai NUOLI YLÖS painikkeilla. Paina VÄLILYÖNTI tai ENTER valitaksesi listan vaihtoehdon. Paina ESC sulkeaksesi listalaatikon.' }, { name : 'Editorin elementtipolun palkki', legend : 'Paina ${elementsPathFocus} siirtyäksesi elementtipolun palkkiin. Siirry seuraavaan elementtipainikkeeseen TAB tai NUOLI OIKEALLE painikkeilla. Siirry aiempaan painikkeeseen SHIFT+TAB tai NUOLI VASEMMALLE painikkeilla. Paina VÄLILYÖNTI tai ENTER valitaksesi elementin editorissa.' } ] }, { name : 'Komennot', items : [ { name : 'Peruuta komento', legend : 'Paina ${undo}' }, { name : 'Tee uudelleen komento', legend : 'Paina ${redo}' }, { name : 'Lihavoi komento', legend : 'Paina ${bold}' }, { name : 'Kursivoi komento', legend : 'Paina ${italic}' }, { name : 'Alleviivaa komento', legend : 'Paina ${underline}' }, { name : 'Linkki komento', legend : 'Paina ${link}' }, { name : 'Pienennä työkalupalkki komento', legend : 'Paina ${toolbarCollapse}' }, { name : 'Saavutettavuus ohjeet', legend : 'Paina ${a11yHelp}' } ] } ] } });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/a11yhelp/lang/fi.js
JavaScript
asf20
3,613
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'a11yhelp', 'cy', { accessibilityHelp : { title : 'Canllawiau Hygyrchedd', contents : 'Cynnwys Cymorth. I gau y deialog hwn, pwyswch ESC.', legend : [ { name : 'Cyffredinol', items : [ { name : 'Bar Offer y Golygydd', legend: 'Pwyswch $ {toolbarFocus} i fynd at y bar offer. Symudwch i\'r grŵp bar offer nesaf a blaenorol gyda TAB a SHIFT-TAB. Symudwch i\'r botwm bar offer nesaf a blaenorol gyda SAETH DDE neu SAETH CHWITH. Pwyswch SPACE neu ENTER i wneud botwm y bar offer yn weithredol.' }, { name : 'Deialog y Golygydd', legend : 'Tu mewn i\'r deialog, pwyswch TAB i fynd i\'r maes nesaf ar y deialog, pwyswch SHIFT + TAB i symud i faes blaenorol, pwyswch ENTER i gyflwyno\'r deialog, pwyswch ESC i ddiddymu\'r deialog. Ar gyfer deialogau sydd â thudalennau aml-tab, pwyswch ALT + F10 i lywio\'r tab-restr. Yna symudwch i\'r tab nesaf gyda TAB neu SAETH DDE. Symudwch i dab blaenorol gyda SHIFT + TAB neu\'r SAETH CHWITH. Pwyswch SPACE neu ENTER i ddewis y dudalen tab.' }, { name : 'Dewislen Cyd-destun y Golygydd', legend : 'Pwyswch $ {contextMenu} neu\'r ALLWEDD \'APPLICATION\' i agor y ddewislen cyd-destun. Yna symudwch i\'r opsiwn ddewislen nesaf gyda\'r TAB neu\'r SAETH I LAWR. Symudwch i\'r opsiwn blaenorol gyda SHIFT + TAB neu\'r SAETH I FYNY. Pwyswch SPACE neu ENTER i ddewis yr opsiwn ddewislen. Agorwch is-dewislen yr opsiwn cyfredol gyda SPACE neu ENTER neu SAETH DDE. Ewch yn ôl i\'r eitem ar y ddewislen uwch gydag ESC neu SAETH CHWITH. Ceuwch y ddewislen cyd-destun gydag ESC.' }, { name : 'Blwch Rhestr y Golygydd', legend : 'Tu mewn rhestr-bocs, ewch i\'r eitem rhestr nesaf gyda TAB neu\'r SAETH I LAWR. Symudwch i restr eitem flaenorol gyda SHIFT + TAB neu SAETH I FYNY. Pwyswch SPACE neu ENTER i ddewis yr opsiwn o\'r rhestr. Pwyswch ESC i gau\'r rhestr.' }, { name : 'Bar Llwybr Elfen y Golygydd', legend : 'Pwyswch $ {elementsPathFocus} i fynd i\'r elfennau llwybr bar. Symudwch i fotwm yr elfen nesaf gyda TAB neu SAETH DDE. Symudwch i fotwm blaenorol gyda SHIFT + TAB neu SAETH CHWITH. Pwyswch SPACE neu ENTER i ddewis yr elfen yn y golygydd.' } ] }, { name : 'Gorchmynion', items : [ { name : 'Gorchymyn dadwneud', legend : 'Pwyswch ${undo}' }, { name : 'Gorchymyn ailadrodd', legend : 'Pwyswch ${redo}' }, { name : 'Gorchymyn Bras', legend : 'Pwyswch ${bold}' }, { name : 'Gorchymyn italig', legend : 'Pwyswch ${italig}' }, { name : 'Gorchymyn tanlinellu', legend : 'Pwyso ${underline}' }, { name : 'Gorchymyn dolen', legend : 'Pwyswch ${link}' }, { name : 'Gorchymyn Cwympo\'r Dewislen', legend : 'Pwyswch ${toolbarCollapse}' }, { name : 'Cymorth Hygyrchedd', legend : 'Pwyswch ${a11yHelp}' } ] } ] } });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/a11yhelp/lang/cy.js
JavaScript
asf20
3,411
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'a11yhelp', 'no', { accessibilityHelp : { title : 'Instruksjoner for tilgjengelighet', contents : 'Innhold for hjelp. Trykk ESC for å lukke denne dialogen.', legend : [ { name : 'Generelt', items : [ { name : 'Verktøylinje for editor', legend: 'Trykk ${toolbarFocus} for å navigere til verktøylinjen. Flytt til neste og forrige verktøylinjegruppe med TAB og SHIFT-TAB. Flytt til neste og forrige verktøylinjeknapp med HØYRE PILTAST og VENSTRE PILTAST. Trykk MELLOMROM eller ENTER for å aktivere verktøylinjeknappen.' }, { name : 'Dialog for editor', legend : 'Mens du er i en dialog, trykk TAB for å navigere til neste dialogfelt, press SHIFT + TAB for å flytte til forrige felt, trykk ENTER for å akseptere dialogen, trykk ESC for å avbryte dialogen. For dialoger med flere faner, trykk ALT + F10 for å navigere til listen over faner. Gå til neste fane med TAB eller HØYRE PILTAST. Gå til forrige fane med SHIFT + TAB eller VENSTRE PILTAST. Trykk MELLOMROM eller ENTER for å velge fanen.' }, { name : 'Kontekstmeny for editor', legend : 'Trykk ${contextMenu} eller MENYKNAPP for å åpne kontekstmeny. Gå til neste alternativ i menyen med TAB eller PILTAST NED. Gå til forrige alternativ med SHIFT+TAB eller PILTAST OPP. Trykk MELLOMROM eller ENTER for å velge menyalternativet. Åpne undermenyen på valgt alternativ med MELLOMROM eller ENTER eller HØYRE PILTAST. Gå tilbake til overordnet menyelement med ESC eller VENSTRE PILTAST. Lukk kontekstmenyen med ESC.' }, { name : 'Listeboks for editor', legend : 'I en listeboks, gå til neste alternativ i listen med TAB eller PILTAST NED. Gå til forrige alternativ i listen med SHIFT + TAB eller PILTAST OPP. Trykk MELLOMROM eller ENTER for å velge alternativet i listen. Trykk ESC for å lukke listeboksen.' }, { name : 'Verktøylinje for elementsti', legend : 'Trykk ${elementsPathFocus} for å navigere til verktøylinjen som viser elementsti. Gå til neste elementknapp med TAB eller HØYRE PILTAST. Gå til forrige elementknapp med SHIFT+TAB eller VENSTRE PILTAST. Trykk MELLOMROM eller ENTER for å velge elementet i editoren.' } ] }, { name : 'Kommandoer', items : [ { name : 'Angre', legend : 'Trykk ${undo}' }, { name : 'Gjør om', legend : 'Trykk ${redo}' }, { name : 'Fet tekst', legend : 'Trykk ${bold}' }, { name : 'Kursiv tekst', legend : 'Trykk ${italic}' }, { name : 'Understreking', legend : 'Trykk ${underline}' }, { name : 'Link', legend : 'Trykk ${link}' }, { name : 'Skjul verktøylinje', legend : 'Trykk ${toolbarCollapse}' }, { name : 'Hjelp for tilgjengelighet', legend : 'Trykk ${a11yHelp}' } ] } ] } });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/a11yhelp/lang/no.js
JavaScript
asf20
3,372
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'a11yhelp', 'mk', { accessibilityHelp : { title : 'Инструкции за пристапност', contents : 'Содржина на делот за помош. За да го затворите овој дијалот притиснете ESC.', legend : [ { name : 'Општо', items : [ { name : 'Мени за едиторот', legend: 'Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button.' // MISSING }, { name : 'Дијалот за едиторот', legend : 'Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page.' // MISSING }, { name : 'Editor Context Menu', // MISSING legend : 'Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC.' // MISSING }, { name : 'Editor List Box', // MISSING legend : 'Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box.' // MISSING }, { name : 'Editor Element Path Bar', // MISSING legend : 'Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor.' // MISSING } ] }, { name : 'Commands', // MISSING items : [ { name : ' Undo command', // MISSING legend : 'Press ${undo}' // MISSING }, { name : ' Redo command', // MISSING legend : 'Press ${redo}' // MISSING }, { name : ' Bold command', // MISSING legend : 'Press ${bold}' // MISSING }, { name : ' Italic command', // MISSING legend : 'Press ${italic}' // MISSING }, { name : ' Underline command', // MISSING legend : 'Press ${underline}' // MISSING }, { name : ' Link command', // MISSING legend : 'Press ${link}' // MISSING }, { name : ' Toolbar Collapse command', // MISSING legend : 'Press ${toolbarCollapse}' // MISSING }, { name : ' Accessibility Help', // MISSING legend : 'Press ${a11yHelp}' // MISSING } ] } ] } });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/a11yhelp/lang/mk.js
JavaScript
asf20
3,560
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'a11yhelp', 'fa', { accessibilityHelp : { title : 'دستورالعملهای دسترسی', contents : 'راهنمای فهرست مطالب. برای بستن این کادر محاورهای ESC را فشار دهید.', legend : [ { name : 'عمومی', items : [ { name : 'نوار ابزار ویرایشگر', legend: '${toolbarFocus} را برای باز کردن نوار ابزار بفشارید. با کلید Tab و Shif-Tab در مجموعه نوار ابزار بعدی و قبلی حرکت کنید. برای حرکت در کلید نوار ابزار قبلی و بعدی با کلید جهتنمای راست و چپ جابجا شوید. کلید Space یا Enter را برای فعال کردن کلید نوار ابزار بفشارید.' }, { name : 'پنجره محاورهای ویرایشگر', legend : 'در داخل یک پنجره محاورهای، کلید Tab را بفشارید تا به پنجرهی بعدی بروید، Shift+Tab برای حرکت به فیلد قبلی، فشردن Enter برای ثبت اطلاعات پنجره، فشردن Esc برای لغو پنجره محاورهای و برای پنجرههایی که چندین برگه دارند، فشردن Alt+F10 جهت رفتن به Tab-List. در نهایت حرکت به برگه بعدی با Tab یا کلید جهتنمای راست. حرکت به برگه قبلی با Shift+Tab یا کلید جهتنمای چپ. فشردن Space یا Enter برای انتخاب یک برگه.' }, { name : 'منوی متنی ویرایشگر', legend : '${contextMenu} یا کلید برنامههای کاربردی را برای باز کردن منوی متن را بفشارید. سپس میتوانید برای حرکت به گزینه بعدی منو با کلید Tab و یا کلید جهتنمای پایین جابجا شوید. حرکت به گزینه قبلی با Shift+Tab یا کلید جهتنمای بالا. فشردن Space یا Enter برای انتخاب یک گزینه از منو. باز کردن زیر شاخه گزینه منو جاری با کلید Space یا Enter و یا کلید جهتنمای راست و چپ. بازگشت به منوی والد با کلید Esc یا کلید جهتنمای چپ. بستن منوی متن با Esc.' }, { name : 'جعبه فهرست ویرایشگر', legend : 'در داخل جعبه لیست، قلم دوم از اقلام لیست بعدی را با TAB و یا Arrow Down حرکت دهید. انتقال به قلم دوم از اقلام لیست قبلی را با SHIFT + TAB یا UP ARROW. کلید Space یا ENTER را برای انتخاب گزینه لیست بفشارید. کلید ESC را برای بستن جعبه لیست بفشارید.' }, { name : 'ویرایشگر عنصر نوار راه', legend : 'برای رفتن به مسیر عناصر ${elementsPathFocus} را بفشارید. حرکت به کلید عنصر بعدی با کلید Tab یا کلید جهتنمای راست. برگشت به کلید قبلی با Shift+Tab یا کلید جهتنمای چپ. فشردن Space یا Enter برای انتخاب یک عنصر در ویرایشگر.' } ] }, { name : 'فرمانها', items : [ { name : 'بازگشت فرمان', legend : 'فشردن ${undo}' }, { name : 'انجام مجدد فرمان', legend : 'فشردن ${redo}' }, { name : 'فرمان متن درشت', legend : 'فشردن ${bold}' }, { name : 'فرمان متن کج', legend : 'فشردن ${italic}' }, { name : 'فرمان متن زیرخطدار', legend : 'فشردن ${underline}' }, { name : 'فرمان پیوند', legend : 'فشردن ${link}' }, { name : 'بستن نوار ابزار فرمان', legend : 'فشردن ${toolbarCollapse}' }, { name : 'راهنمای دسترسی', legend : 'فشردن ${a11yHelp}' } ] } ] } });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/a11yhelp/lang/fa.js
JavaScript
asf20
4,588
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'a11yhelp', 'ro', { accessibilityHelp : { title : 'Instrucțiuni de accesibilitate', contents : 'Cuprins. Pentru a închide acest dialog, apăsați tasta ESC.', legend : [ { name : 'General', items : [ { name : 'Editează bara.', legend: 'Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button.' // MISSING }, { name : 'Dialog editor', legend : 'Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page.' // MISSING }, { name : 'Editor meniu contextual', legend : 'Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC.' // MISSING }, { name : 'Editor List Box', // MISSING legend : 'Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box.' // MISSING }, { name : 'Editor Element Path Bar', // MISSING legend : 'Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor.' // MISSING } ] }, { name : 'Commands', // MISSING items : [ { name : ' Undo command', // MISSING legend : 'Press ${undo}' // MISSING }, { name : ' Redo command', // MISSING legend : 'Press ${redo}' // MISSING }, { name : ' Bold command', // MISSING legend : 'Press ${bold}' // MISSING }, { name : ' Italic command', // MISSING legend : 'Press ${italic}' // MISSING }, { name : ' Underline command', // MISSING legend : 'Press ${underline}' // MISSING }, { name : ' Link command', // MISSING legend : 'Press ${link}' // MISSING }, { name : ' Toolbar Collapse command', // MISSING legend : 'Press ${toolbarCollapse}' // MISSING }, { name : ' Accessibility Help', // MISSING legend : 'Press ${a11yHelp}' // MISSING } ] } ] } });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/a11yhelp/lang/ro.js
JavaScript
asf20
3,423
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'a11yhelp', 'he', { accessibilityHelp : { title : 'הוראות נגישות', contents : 'הוראות נגישות. לסגירה לחץ אסקייפ (ESC).', legend : [ { name : 'כללי', items : [ { name : 'סרגל הכלים', legend: 'לחץ על ${toolbarFocus} כדי לנווט לסרגל הכלים. עבור לכפתור הבא עם מקש הטאב (TAB) או חץ שמאלי. עבור לכפתור הקודם עם מקש השיפט (SHIFT) + טאב (TAB) או חץ ימני. לחץ רווח או אנטר (ENTER) כדי להפעיל את הכפתור הנבחר.' }, { name : 'דיאלוגים (חלונות תשאול)', legend : 'בתוך דיאלוג, לחץ טאב (TAB) כדי לנווט לשדה הבא, לחץ שיפט (SHIFT) + טאב (TAB) כדי לנווט לשדה הקודם, לחץ אנטר (ENTER) כדי לשלוח את הדיאלוג, לחץ אסקייפ (ESC) כדי לבטל. בתוך דיאלוגים בעלי מספר טאבים (לשוניות), לחץ אלט (ALT) + F10 כדי לנווט לשורת הטאבים. נווט לטאב הבא עם טאב (TAB) או חץ שמאלי. עבור לטאב הקודם עם שיפט (SHIFT) + טאב (TAB) או חץ שמאלי. לחץ רווח או אנטר (ENTER) כדי להיכנס לטאב.' }, { name : 'תפריט ההקשר (Context Menu)', legend : 'לחץ ${contextMenu} או APPLICATION KEYכדי לפתוח את תפריט ההקשר. עבור לאפשרות הבאה עם טאב (TAB) או חץ למטה. עבור לאפשרות הקודמת עם שיפט (SHIFT) + טאב (TAB) או חץ למעלה. לחץ רווח או אנטר (ENTER) כדי לבחור את האפשרות. פתח את תת התפריט (Sub-menu) של האפשרות הנוכחית עם רווח או אנטר (ENTER) או חץ שמאלי. חזור לתפריט האב עם אסקייפ (ESC) או חץ שמאלי. סגור את תפריט ההקשר עם אסקייפ (ESC).' }, { name : 'תפריטים צפים (List boxes)', legend : 'בתוך תפריט צף, עבור לפריט הבא עם טאב (TAB) או חץ למטה. עבור לתפריט הקודם עם שיפט (SHIFT) + טאב (TAB) or חץ עליון. Press SPACE or ENTER to select the list option. Press ESC to close the list-box.' }, { name : 'עץ אלמנטים (Elements Path)', legend : 'לחץ ${elementsPathFocus} כדי לנווט לעץ האלמנטים. עבור לפריט הבא עם טאב (TAB) או חץ ימני. עבור לפריט הקודם עם שיפט (SHIFT) + טאב (TAB) או חץ שמאלי. לחץ רווח או אנטר (ENTER) כדי לבחור את האלמנט בעורך.' } ] }, { name : 'פקודות', items : [ { name : ' ביטול צעד אחרון', legend : 'לחץ ${undo}' }, { name : ' חזרה על צעד אחרון', legend : 'לחץ ${redo}' }, { name : ' הדגשה', legend : 'לחץ ${bold}' }, { name : ' הטייה', legend : 'לחץ ${italic}' }, { name : ' הוספת קו תחתון', legend : 'לחץ ${underline}' }, { name : ' הוספת לינק', legend : 'לחץ ${link}' }, { name : ' כיווץ סרגל הכלים', legend : 'לחץ ${toolbarCollapse}' }, { name : ' הוראות נגישות', legend : 'לחץ ${a11yHelp}' } ] } ] } });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/a11yhelp/lang/he.js
JavaScript
asf20
4,002
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'a11yhelp', 'cs', { accessibilityHelp : { title : 'Instrukce pro přístupnost', contents : 'Obsah nápovědy. Pro uzavření tohoto dialogu stiskněte klávesu ESC.', legend : [ { name : 'Obecné', items : [ { name : 'Panel nástrojů editoru', legend: 'Stiskněte${toolbarFocus} k procházení panelu nástrojů. Přejděte na další a předchozí skupiny pomocí TAB a SHIFT-TAB. Přechod na další a předchozí tlačítko panelu nástrojů je pomocí ŠIPKA VPRAVO nebo ŠIPKA VLEVO. Stisknutím mezerníku nebo klávesy ENTER tlačítko aktivujete.' }, { name : 'Dialogové okno editoru', legend : 'Uvnitř dialogového okna stiskněte TAB pro přesunutí na další pole, stiskněte SHIFT + TAB pro přesun na předchozí pole, stiskněte ENTER pro odeslání dialogu, stiskněte ESC pro jeho zrušení. Pro dialogová okna, která mají mnoho karet stiskněte ALT + F10 pr oprocházení seznamu karet. Pak se přesuňte na další kartu pomocí TAB nebo ŠIPKA VPRAVO. Pro přesun na předchozí stiskněte SHIFT + TAB nebo ŠIPKA VLEVO. Stiskněte MEZERNÍK nebo ENTER pro vybrání stránky karet.' }, { name : 'Kontextové menu editoru', legend : 'Stiskněte ${contextMenu} nebo klávesu APPLICATION k otevření kontextového menu. Pak se přesuňte na další možnost menu pomocí TAB nebo ŠIPKY DOLŮ. Přesuňte se na předchozí možnost pomocí SHIFT+TAB nebo ŠIPKY NAHORU. Stiskněte MEZERNÍK nebo ENTER pro zvolení možnosti menu. Podmenu současné možnosti otevřete pomocí MEZERNÍKU nebo ENTER či ŠIPKY DOLEVA. Kontextové menu uzavřete stiskem ESC.' }, { name : 'Rámeček seznamu editoru', legend : 'Uvnitř rámečku seznamu se přesunete na další položku menu pomocí TAB nebo ŠIPKA DOLŮ. Na předchozí položku se přesunete SHIFT + TAB nebo ŠIPKA NAHORU. Stiskněte MEZERNÍK nebo ENTER pro zvolení možnosti seznamu. Stiskněte ESC pro uzavření seznamu.' }, { name : 'Lišta cesty prvku v editoru', legend : 'Stiskněte ${elementsPathFocus} pro procházení lišty cesty prvku. Na další tlačítko prvku se přesunete pomocí TAB nebo ŠIPKA VPRAVO. Na předchozí položku se přesunete pomocí SHIFT + TAB nebo ŠIPKA VLEVO. Stiskněte MEZERNÍK nebo ENTER pro vybrání prvku v editoru.' } ] }, { name : 'Příkazy', items : [ { name : ' Příkaz Zpět', legend : 'Stiskněte ${undo}' }, { name : ' Příkaz Znovu', legend : 'Stiskněte ${redo}' }, { name : ' Příkaz Tučné', legend : 'Stiskněte ${bold}' }, { name : ' Příkaz Kurzíva', legend : 'Stiskněte ${italic}' }, { name : ' Příkaz Podtržení', legend : 'Stiskněte ${underline}' }, { name : ' Příkaz Odkaz', legend : 'Stiskněte ${link}' }, { name : ' Příkaz Skrýt panel nástrojů', legend : 'Stiskněte ${toolbarCollapse}' }, { name : ' Nápověda přístupnosti', legend : 'Stiskněte ${a11yHelp}' } ] } ] } });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/a11yhelp/lang/cs.js
JavaScript
asf20
3,614
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'a11yhelp', 'pt-br', { accessibilityHelp : { title : 'Instruções de Acessibilidade', contents : 'Conteúdo da Ajuda. Para fechar este diálogo pressione ESC.', legend : [ { name : 'Geral', items : [ { name : 'Barra de Ferramentas do Editor', legend: 'Pressione ${toolbarFocus} para navegar para a barra de ferramentas. Mova para o anterior ou próximo grupo de ferramentas com TAB e SHIFT-TAB. Mova para o anterior ou próximo botão com SETA PARA DIREITA or SETA PARA ESQUERDA. Pressione ESPAÇO ou ENTER para ativar o botão da barra de ferramentas.' }, { name : 'Diálogo do Editor', legend : 'Dentro de um diálogo, pressione TAB para navegar para o próximo campo, pressione SHIFT + TAB para mover para o campo anterior, pressione ENTER para enviar o diálogo, pressione ESC para cancelar o diálogo. Para diálogos que tem múltiplas abas, pressione ALT + F10 para navegar para a lista de abas, então mova para a próxima aba com SHIFT + TAB ou SETA PARA ESQUERDA. Pressione ESPAÇO ou ENTER para selecionar a aba.' }, { name : 'Menu de Contexto do Editor', legend : 'Pressione ${contextMenu} ou TECLA DE MENU para abrir o menu de contexto, então mova para a próxima opção com TAB ou SETA PARA BAIXO. Mova para a anterior com SHIFT+TAB ou SETA PARA CIMA. Pressione ESPAÇO ou ENTER para selecionar a opção do menu. Abra o submenu da opção atual com ESPAÇO ou ENTER ou SETA PARA DIREITA. Volte para o menu pai com ESC ou SETA PARA ESQUERDA. Feche o menu de contexto com ESC.' }, { name : 'Caixa de Lista do Editor', legend : 'Dentro de uma caixa de lista, mova para o próximo item com TAB ou SETA PARA BAIXO. Mova para o item anterior com SHIFT + TAB ou SETA PARA CIMA. Pressione ESPAÇO ou ENTER para selecionar uma opção na lista. Pressione ESC para fechar a caixa de lista.' }, { name : 'Barra de Caminho do Elementos do Editor', legend : 'Pressione ${elementsPathFocus} para a barra de caminho dos elementos. Mova para o próximo botão de elemento com TAB ou SETA PARA DIREITA. Mova para o botão anterior com SHIFT+TAB ou SETA PARA ESQUERDA. Pressione ESPAÇO ou ENTER para selecionar o elemento no editor.' } ] }, { name : 'Comandos', items : [ { name : ' Comando Desfazer', legend : 'Pressione ${undo}' }, { name : ' Comando Refazer', legend : 'Pressione ${redo}' }, { name : ' Comando Negrito', legend : 'Pressione ${bold}' }, { name : ' Comando Itálico', legend : 'Pressione ${italic}' }, { name : ' Comando Sublinhado', legend : 'Pressione ${underline}' }, { name : ' Comando Link', legend : 'Pressione ${link}' }, { name : ' Comando Fechar Barra de Ferramentas', legend : 'Pressione ${toolbarCollapse}' }, { name : ' Ajuda de Acessibilidade', legend : 'Pressione ${a11yHelp}' } ] } ] } });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/a11yhelp/lang/pt-br.js
JavaScript
asf20
3,492
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'a11yhelp', 'gu', { accessibilityHelp : { title : 'એક્ક્ષેબિલિટી ની વિગતો', contents : 'હેલ્પ. આ બંધ કરવા ESC દબાવો.', legend : [ { name : 'જનરલ', items : [ { name : 'એડિટર ટૂલબાર', legend: 'Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button.' // MISSING }, { name : 'એડિટર ડાયલોગ', legend : 'Inside a dialog, press TAB to navigate to next dialog field, press SHIFT + TAB to move to previous field, press ENTER to submit dialog, press ESC to cancel dialog. For dialogs that have multiple tab pages, press ALT + F10 to navigate to tab-list. Then move to next tab with TAB OR RIGTH ARROW. Move to previous tab with SHIFT + TAB or LEFT ARROW. Press SPACE or ENTER to select the tab page.' // MISSING }, { name : 'Editor Context Menu', // MISSING legend : 'Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC.' // MISSING }, { name : 'Editor List Box', // MISSING legend : 'Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box.' // MISSING }, { name : 'Editor Element Path Bar', // MISSING legend : 'Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor.' // MISSING } ] }, { name : 'કમાંડસ', items : [ { name : 'અન્ડું કમાંડ', legend : '$ દબાવો {undo}' }, { name : 'ફરી કરો કમાંડ', legend : '$ દબાવો {redo}' }, { name : 'બોલ્દનો કમાંડ', legend : '$ દબાવો {bold}' }, { name : ' Italic command', // MISSING legend : 'Press ${italic}' // MISSING }, { name : ' Underline command', // MISSING legend : 'Press ${underline}' // MISSING }, { name : ' Link command', // MISSING legend : 'Press ${link}' // MISSING }, { name : ' Toolbar Collapse command', // MISSING legend : 'Press ${toolbarCollapse}' // MISSING }, { name : ' Accessibility Help', // MISSING legend : 'Press ${a11yHelp}' // MISSING } ] } ] } });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/a11yhelp/lang/gu.js
JavaScript
asf20
3,542
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.dialog.add( 'a11yHelp', function( editor ) { var lang = editor.lang.accessibilityHelp, id = CKEDITOR.tools.getNextId(); // CharCode <-> KeyChar. var keyMap = { 8 : "BACKSPACE", 9 : "TAB" , 13 : "ENTER" , 16 : "SHIFT" , 17 : "CTRL" , 18 : "ALT" , 19 : "PAUSE" , 20 : "CAPSLOCK" , 27 : "ESCAPE" , 33 : "PAGE UP" , 34 : "PAGE DOWN" , 35 : "END" , 36 : "HOME" , 37 : "LEFT ARROW" , 38 : "UP ARROW" , 39 : "RIGHT ARROW" , 40 : "DOWN ARROW" , 45 : "INSERT" , 46 : "DELETE" , 91 : "LEFT WINDOW KEY" , 92 : "RIGHT WINDOW KEY" , 93 : "SELECT KEY" , 96 : "NUMPAD 0" , 97 : "NUMPAD 1" , 98 : "NUMPAD 2" , 99 : "NUMPAD 3" , 100 : "NUMPAD 4" , 101 : "NUMPAD 5" , 102 : "NUMPAD 6" , 103 : "NUMPAD 7" , 104 : "NUMPAD 8" , 105 : "NUMPAD 9" , 106 : "MULTIPLY" , 107 : "ADD" , 109 : "SUBTRACT" , 110 : "DECIMAL POINT" , 111 : "DIVIDE" , 112 : "F1" , 113 : "F2" , 114 : "F3" , 115 : "F4" , 116 : "F5" , 117 : "F6" , 118 : "F7" , 119 : "F8" , 120 : "F9" , 121 : "F10" , 122 : "F11" , 123 : "F12" , 144 : "NUM LOCK" , 145 : "SCROLL LOCK" , 186 : "SEMI-COLON" , 187 : "EQUAL SIGN" , 188 : "COMMA" , 189 : "DASH" , 190 : "PERIOD" , 191 : "FORWARD SLASH" , 192 : "GRAVE ACCENT" , 219 : "OPEN BRACKET" , 220 : "BACK SLASH" , 221 : "CLOSE BRAKET" , 222 : "SINGLE QUOTE" }; // Modifier keys override. keyMap[ CKEDITOR.ALT ] = 'ALT'; keyMap[ CKEDITOR.SHIFT ] = 'SHIFT'; keyMap[ CKEDITOR.CTRL ] = 'CTRL'; // Sort in desc. var modifiers = [ CKEDITOR.ALT, CKEDITOR.SHIFT, CKEDITOR.CTRL ]; function representKeyStroke( keystroke ) { var quotient, modifier, presentation = []; for ( var i = 0; i < modifiers.length; i++ ) { modifier = modifiers[ i ]; quotient = keystroke / modifiers[ i ]; if ( quotient > 1 && quotient <= 2 ) { keystroke -= modifier; presentation.push( keyMap[ modifier ] ); } } presentation.push( keyMap[ keystroke ] || String.fromCharCode( keystroke ) ); return presentation.join( '+' ); } var variablesPattern = /\$\{(.*?)\}/g; function replaceVariables( match, name ) { var keystrokes = editor.config.keystrokes, definition, length = keystrokes.length; for ( var i = 0; i < length; i++ ) { definition = keystrokes[ i ]; if ( definition[ 1 ] == name ) break; } return representKeyStroke( definition[ 0 ] ); } // Create the help list directly from lang file entries. function buildHelpContents() { var pageTpl = '<div class="cke_accessibility_legend" role="document" aria-labelledby="' + id + '_arialbl" tabIndex="-1">%1</div>' + '<span id="' + id + '_arialbl" class="cke_voice_label">' + lang.contents + ' </span>', sectionTpl = '<h1>%1</h1><dl>%2</dl>', itemTpl = '<dt>%1</dt><dd>%2</dd>'; var pageHtml = [], sections = lang.legend, sectionLength = sections.length; for ( var i = 0; i < sectionLength; i++ ) { var section = sections[ i ], sectionHtml = [], items = section.items, itemsLength = items.length; for ( var j = 0; j < itemsLength; j++ ) { var item = items[ j ], itemHtml; itemHtml = itemTpl.replace( '%1', item.name ). replace( '%2', item.legend.replace( variablesPattern, replaceVariables ) ); sectionHtml.push( itemHtml ); } pageHtml.push( sectionTpl.replace( '%1', section.name ).replace( '%2', sectionHtml.join( '' ) ) ); } return pageTpl.replace( '%1', pageHtml.join( '' ) ); } return { title : lang.title, minWidth : 600, minHeight : 400, contents : [ { id : 'info', label : editor.lang.common.generalTab, expand : true, elements : [ { type : 'html', id : 'legends', style : 'white-space:normal;', focus : function() {}, html : buildHelpContents() + '<style type="text/css">' + '.cke_accessibility_legend' + '{' + 'width:600px;' + 'height:400px;' + 'padding-right:5px;' + 'overflow-y:auto;' + 'overflow-x:hidden;' + '}' + // Some adjustments are to be done for IE6 and Quirks to work "properly" (#5757) '.cke_browser_quirks .cke_accessibility_legend,' + '.cke_browser_ie6 .cke_accessibility_legend' + '{' + 'height:390px' + '}' + // Override non-wrapping white-space rule in reset css. '.cke_accessibility_legend *' + '{' + 'white-space:normal;' + '}' + '.cke_accessibility_legend h1' + '{' + 'font-size: 20px;' + 'border-bottom: 1px solid #AAA;' + 'margin: 5px 0px 15px;' + '}' + '.cke_accessibility_legend dl' + '{' + 'margin-left: 5px;' + '}' + '.cke_accessibility_legend dt' + '{' + 'font-size: 13px;' + 'font-weight: bold;' + '}' + '.cke_accessibility_legend dd' + '{' + 'margin:10px' + '}' + '</style>' } ] } ], buttons : [ CKEDITOR.dialog.cancelButton ] }; });
10npsite
trunk/guanli/system/ckeditor/_source/plugins/a11yhelp/dialogs/a11yhelp.js
JavaScript
asf20
5,456
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.add( 'richcombo', { requires : [ 'floatpanel', 'listblock', 'button' ], beforeInit : function( editor ) { editor.ui.addHandler( CKEDITOR.UI_RICHCOMBO, CKEDITOR.ui.richCombo.handler ); } }); /** * Button UI element. * @constant * @example */ CKEDITOR.UI_RICHCOMBO = 'richcombo'; CKEDITOR.ui.richCombo = CKEDITOR.tools.createClass( { $ : function( definition ) { // Copy all definition properties to this object. CKEDITOR.tools.extend( this, definition, // Set defaults. { title : definition.label, modes : { wysiwyg : 1 } }); // We don't want the panel definition in this object. var panelDefinition = this.panel || {}; delete this.panel; this.id = CKEDITOR.tools.getNextNumber(); this.document = ( panelDefinition && panelDefinition.parent && panelDefinition.parent.getDocument() ) || CKEDITOR.document; panelDefinition.className = ( panelDefinition.className || '' ) + ' cke_rcombopanel'; panelDefinition.block = { multiSelect : panelDefinition.multiSelect, attributes : panelDefinition.attributes }; this._ = { panelDefinition : panelDefinition, items : {}, state : CKEDITOR.TRISTATE_OFF }; }, statics : { handler : { create : function( definition ) { return new CKEDITOR.ui.richCombo( definition ); } } }, proto : { renderHtml : function( editor ) { var output = []; this.render( editor, output ); return output.join( '' ); }, /** * Renders the combo. * @param {CKEDITOR.editor} editor The editor instance which this button is * to be used by. * @param {Array} output The output array to which append the HTML relative * to this button. * @example */ render : function( editor, output ) { var env = CKEDITOR.env; var id = 'cke_' + this.id; var clickFn = CKEDITOR.tools.addFunction( function( $element ) { var _ = this._; if ( _.state == CKEDITOR.TRISTATE_DISABLED ) return; this.createPanel( editor ); if ( _.on ) { _.panel.hide(); return; } this.commit(); var value = this.getValue(); if ( value ) _.list.mark( value ); else _.list.unmarkAll(); _.panel.showBlock( this.id, new CKEDITOR.dom.element( $element ), 4 ); }, this ); var instance = { id : id, combo : this, focus : function() { var element = CKEDITOR.document.getById( id ).getChild( 1 ); element.focus(); }, clickFn : clickFn }; function updateState() { var state = this.modes[ editor.mode ] ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED; this.setState( editor.readOnly && !this.readOnly ? CKEDITOR.TRISTATE_DISABLED : state ); this.setValue( '' ); } editor.on( 'mode', updateState, this ); // If this combo is sensitive to readOnly state, update it accordingly. !this.readOnly && editor.on( 'readOnly', updateState, this); var keyDownFn = CKEDITOR.tools.addFunction( function( ev, element ) { ev = new CKEDITOR.dom.event( ev ); var keystroke = ev.getKeystroke(); switch ( keystroke ) { case 13 : // ENTER case 32 : // SPACE case 40 : // ARROW-DOWN // Show panel CKEDITOR.tools.callFunction( clickFn, element ); break; default : // Delegate the default behavior to toolbar button key handling. instance.onkey( instance, keystroke ); } // Avoid subsequent focus grab on editor document. ev.preventDefault(); }); var focusFn = CKEDITOR.tools.addFunction( function() { instance.onfocus && instance.onfocus(); } ); // For clean up instance.keyDownFn = keyDownFn; output.push( '<span class="cke_rcombo" role="presentation">', '<span id=', id ); if ( this.className ) output.push( ' class="', this.className, ' cke_off"'); output.push( ' role="presentation">', '<span id="' + id+ '_label" class=cke_label>', this.label, '</span>', '<a hidefocus=true title="', this.title, '" tabindex="-1"', env.gecko && env.version >= 10900 && !env.hc ? '' : ' href="javascript:void(\'' + this.label + '\')"', ' role="button" aria-labelledby="', id , '_label" aria-describedby="', id, '_text" aria-haspopup="true"' ); // Some browsers don't cancel key events in the keydown but in the // keypress. // TODO: Check if really needed for Gecko+Mac. if ( CKEDITOR.env.opera || ( CKEDITOR.env.gecko && CKEDITOR.env.mac ) ) { output.push( ' onkeypress="return false;"' ); } // With Firefox, we need to force it to redraw, otherwise it // will remain in the focus state. if ( CKEDITOR.env.gecko ) { output.push( ' onblur="this.style.cssText = this.style.cssText;"' ); } output.push( ' onkeydown="CKEDITOR.tools.callFunction( ', keyDownFn, ', event, this );"' + ' onfocus="return CKEDITOR.tools.callFunction(', focusFn, ', event);" ' + ( CKEDITOR.env.ie ? 'onclick="return false;" onmouseup' : 'onclick' ) + // #188 '="CKEDITOR.tools.callFunction(', clickFn, ', this); return false;">' + '<span>' + '<span id="' + id + '_text" class="cke_text cke_inline_label">' + this.label + '</span>' + '</span>' + '<span class=cke_openbutton><span class=cke_icon>' + ( CKEDITOR.env.hc ? '&#9660;' : CKEDITOR.env.air ? '&nbsp;' : '' ) + '</span></span>' + // BLACK DOWN-POINTING TRIANGLE '</a>' + '</span>' + '</span>' ); if ( this.onRender ) this.onRender(); return instance; }, createPanel : function( editor ) { if ( this._.panel ) return; var panelDefinition = this._.panelDefinition, panelBlockDefinition = this._.panelDefinition.block, panelParentElement = panelDefinition.parent || CKEDITOR.document.getBody(), panel = new CKEDITOR.ui.floatPanel( editor, panelParentElement, panelDefinition ), list = panel.addListBlock( this.id, panelBlockDefinition ), me = this; panel.onShow = function() { if ( me.className ) this.element.getFirst().addClass( me.className + '_panel' ); me.setState( CKEDITOR.TRISTATE_ON ); list.focus( !me.multiSelect && me.getValue() ); me._.on = 1; if ( me.onOpen ) me.onOpen(); }; panel.onHide = function( preventOnClose ) { if ( me.className ) this.element.getFirst().removeClass( me.className + '_panel' ); me.setState( me.modes && me.modes[ editor.mode ] ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED ); me._.on = 0; if ( !preventOnClose && me.onClose ) me.onClose(); }; panel.onEscape = function() { panel.hide(); }; list.onClick = function( value, marked ) { // Move the focus to the main windows, otherwise it will stay // into the floating panel, even if invisible, and Safari and // Opera will go a bit crazy. me.document.getWindow().focus(); if ( me.onClick ) me.onClick.call( me, value, marked ); if ( marked ) me.setValue( value, me._.items[ value ] ); else me.setValue( '' ); panel.hide( false ); }; this._.panel = panel; this._.list = list; panel.getBlock( this.id ).onHide = function() { me._.on = 0; me.setState( CKEDITOR.TRISTATE_OFF ); }; if ( this.init ) this.init(); }, setValue : function( value, text ) { this._.value = value; var textElement = this.document.getById( 'cke_' + this.id + '_text' ); if ( textElement ) { if ( !( value || text ) ) { text = this.label; textElement.addClass( 'cke_inline_label' ); } else textElement.removeClass( 'cke_inline_label' ); textElement.setHtml( typeof text != 'undefined' ? text : value ); } }, getValue : function() { return this._.value || ''; }, unmarkAll : function() { this._.list.unmarkAll(); }, mark : function( value ) { this._.list.mark( value ); }, hideItem : function( value ) { this._.list.hideItem( value ); }, hideGroup : function( groupTitle ) { this._.list.hideGroup( groupTitle ); }, showAll : function() { this._.list.showAll(); }, add : function( value, html, text ) { this._.items[ value ] = text || value; this._.list.add( value, html, text ); }, startGroup : function( title ) { this._.list.startGroup( title ); }, commit : function() { if ( !this._.committed ) { this._.list.commit(); this._.committed = 1; CKEDITOR.ui.fire( 'ready', this ); } this._.committed = 1; }, setState : function( state ) { if ( this._.state == state ) return; this.document.getById( 'cke_' + this.id ).setState( state ); this._.state = state; } } }); CKEDITOR.ui.prototype.addRichCombo = function( name, definition ) { this.add( name, CKEDITOR.UI_RICHCOMBO, definition ); };
10npsite
trunk/guanli/system/ckeditor/_source/plugins/richcombo/plugin.js
JavaScript
asf20
9,471
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @file Print Plugin */ CKEDITOR.plugins.add( 'print', { init : function( editor ) { var pluginName = 'print'; // Register the command. var command = editor.addCommand( pluginName, CKEDITOR.plugins.print ); // Register the toolbar button. editor.ui.addButton( 'Print', { label : editor.lang.print, command : pluginName }); } } ); CKEDITOR.plugins.print = { exec : function( editor ) { if ( CKEDITOR.env.opera ) return; else if ( CKEDITOR.env.gecko ) editor.window.$.print(); else editor.document.$.execCommand( "Print" ); }, canUndo : false, readOnly : 1, modes : { wysiwyg : !( CKEDITOR.env.opera ) } // It is imposible to print the inner document in Opera. };
10npsite
trunk/guanli/system/ckeditor/_source/plugins/print/plugin.js
JavaScript
asf20
912
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.colordialog = { requires : [ 'dialog' ], init : function( editor ) { editor.addCommand( 'colordialog', new CKEDITOR.dialogCommand( 'colordialog' ) ); CKEDITOR.dialog.add( 'colordialog', this.path + 'dialogs/colordialog.js' ); } }; CKEDITOR.plugins.add( 'colordialog', CKEDITOR.plugins.colordialog );
10npsite
trunk/guanli/system/ckeditor/_source/plugins/colordialog/plugin.js
JavaScript
asf20
491
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.dialog.add( 'colordialog', function( editor ) { // Define some shorthands. var $el = CKEDITOR.dom.element, $doc = CKEDITOR.document, lang = editor.lang.colordialog; // Reference the dialog. var dialog; var spacer = { type : 'html', html : '&nbsp;' }; var selected; function clearSelected() { $doc.getById( selHiColorId ).removeStyle( 'background-color' ); dialog.getContentElement( 'picker', 'selectedColor' ).setValue( '' ); selected && selected.removeAttribute( 'aria-selected' ); selected = null; } function updateSelected( evt ) { var target = evt.data.getTarget(), color; if ( target.getName() == 'td' && ( color = target.getChild( 0 ).getHtml() ) ) { selected = target; selected.setAttribute( 'aria-selected', true ); dialog.getContentElement( 'picker', 'selectedColor' ).setValue( color ); } } // Basing black-white decision off of luma scheme using the Rec. 709 version function whiteOrBlack( color ) { color = color.replace( /^#/, '' ); for ( var i = 0, rgb = []; i <= 2; i++ ) rgb[i] = parseInt( color.substr( i * 2, 2 ), 16 ); var luma = (0.2126 * rgb[0]) + (0.7152 * rgb[1]) + (0.0722 * rgb[2]); return '#' + ( luma >= 165 ? '000' : 'fff' ); } // Distinguish focused and hover states. var focused, hovered; // Apply highlight style. function updateHighlight( event ) { // Convert to event. !event.name && ( event = new CKEDITOR.event( event ) ); var isFocus = !(/mouse/).test( event.name ), target = event.data.getTarget(), color; if ( target.getName() == 'td' && ( color = target.getChild( 0 ).getHtml() ) ) { removeHighlight( event ); isFocus ? focused = target : hovered = target; // Apply outline style to show focus. if ( isFocus ) { target.setStyle( 'border-color', whiteOrBlack( color ) ); target.setStyle( 'border-style', 'dotted' ); } $doc.getById( hicolorId ).setStyle( 'background-color', color ); $doc.getById( hicolorTextId ).setHtml( color ); } } function clearHighlight() { var color = focused.getChild( 0 ).getHtml(); focused.setStyle( 'border-color', color ); focused.setStyle( 'border-style', 'solid' ); $doc.getById( hicolorId ).removeStyle( 'background-color' ); $doc.getById( hicolorTextId ).setHtml( '&nbsp;' ); focused = null; } // Remove previously focused style. function removeHighlight( event ) { var isFocus = !(/mouse/).test( event.name ), target = isFocus && focused; if ( target ) { var color = target.getChild( 0 ).getHtml(); target.setStyle( 'border-color', color ); target.setStyle( 'border-style', 'solid' ); } if ( ! ( focused || hovered ) ) { $doc.getById( hicolorId ).removeStyle( 'background-color' ); $doc.getById( hicolorTextId ).setHtml( '&nbsp;' ); } } function onKeyStrokes( evt ) { var domEvt = evt.data; var element = domEvt.getTarget(); var relative, nodeToMove; var keystroke = domEvt.getKeystroke(), rtl = editor.lang.dir == 'rtl'; switch ( keystroke ) { // UP-ARROW case 38 : // relative is TR if ( ( relative = element.getParent().getPrevious() ) ) { nodeToMove = relative.getChild( [ element.getIndex() ] ); nodeToMove.focus(); } domEvt.preventDefault(); break; // DOWN-ARROW case 40 : // relative is TR if ( ( relative = element.getParent().getNext() ) ) { nodeToMove = relative.getChild( [ element.getIndex() ] ); if ( nodeToMove && nodeToMove.type == 1 ) { nodeToMove.focus(); } } domEvt.preventDefault(); break; // SPACE // ENTER case 32 : case 13 : updateSelected( evt ); domEvt.preventDefault(); break; // RIGHT-ARROW case rtl ? 37 : 39 : // relative is TD if ( ( nodeToMove = element.getNext() ) ) { if ( nodeToMove.type == 1 ) { nodeToMove.focus(); domEvt.preventDefault( true ); } } // relative is TR else if ( ( relative = element.getParent().getNext() ) ) { nodeToMove = relative.getChild( [ 0 ] ); if ( nodeToMove && nodeToMove.type == 1 ) { nodeToMove.focus(); domEvt.preventDefault( true ); } } break; // LEFT-ARROW case rtl ? 39 : 37 : // relative is TD if ( ( nodeToMove = element.getPrevious() ) ) { nodeToMove.focus(); domEvt.preventDefault( true ); } // relative is TR else if ( ( relative = element.getParent().getPrevious() ) ) { nodeToMove = relative.getLast(); nodeToMove.focus(); domEvt.preventDefault( true ); } break; default : // Do not stop not handled events. return; } } function createColorTable() { table = CKEDITOR.dom.element.createFromHtml ( '<table tabIndex="-1" aria-label="' + lang.options + '"' + ' role="grid" style="border-collapse:separate;" cellspacing="0">' + '<caption class="cke_voice_label">' + lang.options + '</caption>' + '<tbody role="presentation"></tbody></table>' ); table.on( 'mouseover', updateHighlight ); table.on( 'mouseout', removeHighlight ); // Create the base colors array. var aColors = [ '00', '33', '66', '99', 'cc', 'ff' ]; // This function combines two ranges of three values from the color array into a row. function appendColorRow( rangeA, rangeB ) { for ( var i = rangeA ; i < rangeA + 3 ; i++ ) { var row = new $el( table.$.insertRow( -1 ) ); row.setAttribute( 'role', 'row' ); for ( var j = rangeB ; j < rangeB + 3 ; j++ ) { for ( var n = 0 ; n < 6 ; n++ ) { appendColorCell( row.$, '#' + aColors[j] + aColors[n] + aColors[i] ); } } } } // This function create a single color cell in the color table. function appendColorCell( targetRow, color ) { var cell = new $el( targetRow.insertCell( -1 ) ); cell.setAttribute( 'class', 'ColorCell' ); cell.setAttribute( 'tabIndex', -1 ); cell.setAttribute( 'role', 'gridcell' ); cell.on( 'keydown', onKeyStrokes ); cell.on( 'click', updateSelected ); cell.on( 'focus', updateHighlight ); cell.on( 'blur', removeHighlight ); cell.setStyle( 'background-color', color ); cell.setStyle( 'border', '1px solid ' + color ); cell.setStyle( 'width', '14px' ); cell.setStyle( 'height', '14px' ); var colorLabel = numbering( 'color_table_cell' ); cell.setAttribute( 'aria-labelledby',colorLabel ); cell.append( CKEDITOR.dom.element.createFromHtml( '<span id="' + colorLabel + '" class="cke_voice_label">' + color + '</span>', CKEDITOR.document ) ); } appendColorRow( 0, 0 ); appendColorRow( 3, 0 ); appendColorRow( 0, 3 ); appendColorRow( 3, 3 ); // Create the last row. var oRow = new $el( table.$.insertRow( -1 ) ) ; oRow.setAttribute( 'role', 'row' ); // Create the gray scale colors cells. for ( var n = 0 ; n < 6 ; n++ ) { appendColorCell( oRow.$, '#' + aColors[n] + aColors[n] + aColors[n] ) ; } // Fill the row with black cells. for ( var i = 0 ; i < 12 ; i++ ) { appendColorCell( oRow.$, '#000000' ) ; } } var numbering = function( id ) { return CKEDITOR.tools.getNextId() + '_' + id; }, hicolorId = numbering( 'hicolor' ), hicolorTextId = numbering( 'hicolortext' ), selHiColorId = numbering( 'selhicolor' ), table; createColorTable(); return { title : lang.title, minWidth : 360, minHeight : 220, onLoad : function() { // Update reference. dialog = this; }, onHide : function() { clearSelected(); clearHighlight(); }, contents : [ { id : 'picker', label : lang.title, accessKey : 'I', elements : [ { type : 'hbox', padding : 0, widths : [ '70%', '10%', '30%' ], children : [ { type : 'html', html : '<div></div>', onLoad : function() { CKEDITOR.document.getById( this.domId ).append( table ); }, focus : function() { // Restore the previously focused cell, // otherwise put the initial focus on the first table cell. ( focused || this.getElement().getElementsByTag( 'td' ).getItem( 0 ) ).focus(); } }, spacer, { type : 'vbox', padding : 0, widths : [ '70%', '5%', '25%' ], children : [ { type : 'html', html : '<span>' + lang.highlight +'</span>\ <div id="' + hicolorId + '" style="border: 1px solid; height: 74px; width: 74px;"></div>\ <div id="' + hicolorTextId + '">&nbsp;</div><span>' + lang.selected + '</span>\ <div id="' + selHiColorId + '" style="border: 1px solid; height: 20px; width: 74px;"></div>' }, { type : 'text', label : lang.selected, labelStyle: 'display:none', id : 'selectedColor', style : 'width: 74px', onChange : function() { // Try to update color preview with new value. If fails, then set it no none. try { $doc.getById( selHiColorId ).setStyle( 'background-color', this.getValue() ); } catch ( e ) { clearSelected(); } } }, spacer, { type : 'button', id : 'clear', style : 'margin-top: 5px', label : lang.clear, onClick : clearSelected } ] } ] } ] } ] }; } );
10npsite
trunk/guanli/system/ckeditor/_source/plugins/colordialog/dialogs/colordialog.js
JavaScript
asf20
10,420
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @file Justify commands. */ (function() { function getAlignment( element, useComputedState ) { useComputedState = useComputedState === undefined || useComputedState; var align; if ( useComputedState ) align = element.getComputedStyle( 'text-align' ); else { while ( !element.hasAttribute || !( element.hasAttribute( 'align' ) || element.getStyle( 'text-align' ) ) ) { var parent = element.getParent(); if ( !parent ) break; element = parent; } align = element.getStyle( 'text-align' ) || element.getAttribute( 'align' ) || ''; } // Sometimes computed values doesn't tell. align && ( align = align.replace( /(?:-(?:moz|webkit)-)?(?:start|auto)/i, '' ) ); !align && useComputedState && ( align = element.getComputedStyle( 'direction' ) == 'rtl' ? 'right' : 'left' ); return align; } function onSelectionChange( evt ) { if ( evt.editor.readOnly ) return; evt.editor.getCommand( this.name ).refresh( evt.data.path ); } function justifyCommand( editor, name, value ) { this.editor = editor; this.name = name; this.value = value; var classes = editor.config.justifyClasses; if ( classes ) { switch ( value ) { case 'left' : this.cssClassName = classes[0]; break; case 'center' : this.cssClassName = classes[1]; break; case 'right' : this.cssClassName = classes[2]; break; case 'justify' : this.cssClassName = classes[3]; break; } this.cssClassRegex = new RegExp( '(?:^|\\s+)(?:' + classes.join( '|' ) + ')(?=$|\\s)' ); } } function onDirChanged( e ) { var editor = e.editor; var range = new CKEDITOR.dom.range( editor.document ); range.setStartBefore( e.data.node ); range.setEndAfter( e.data.node ); var walker = new CKEDITOR.dom.walker( range ), node; while ( ( node = walker.next() ) ) { if ( node.type == CKEDITOR.NODE_ELEMENT ) { // A child with the defined dir is to be ignored. if ( !node.equals( e.data.node ) && node.getDirection() ) { range.setStartAfter( node ); walker = new CKEDITOR.dom.walker( range ); continue; } // Switch the alignment. var classes = editor.config.justifyClasses; if ( classes ) { // The left align class. if ( node.hasClass( classes[ 0 ] ) ) { node.removeClass( classes[ 0 ] ); node.addClass( classes[ 2 ] ); } // The right align class. else if ( node.hasClass( classes[ 2 ] ) ) { node.removeClass( classes[ 2 ] ); node.addClass( classes[ 0 ] ); } } // Always switch CSS margins. var style = 'text-align'; var align = node.getStyle( style ); if ( align == 'left' ) node.setStyle( style, 'right' ); else if ( align == 'right' ) node.setStyle( style, 'left' ); } } } justifyCommand.prototype = { exec : function( editor ) { var selection = editor.getSelection(), enterMode = editor.config.enterMode; if ( !selection ) return; var bookmarks = selection.createBookmarks(), ranges = selection.getRanges( true ); var cssClassName = this.cssClassName, iterator, block; var useComputedState = editor.config.useComputedState; useComputedState = useComputedState === undefined || useComputedState; for ( var i = ranges.length - 1 ; i >= 0 ; i-- ) { iterator = ranges[ i ].createIterator(); iterator.enlargeBr = enterMode != CKEDITOR.ENTER_BR; while ( ( block = iterator.getNextParagraph( enterMode == CKEDITOR.ENTER_P ? 'p' : 'div' ) ) ) { block.removeAttribute( 'align' ); block.removeStyle( 'text-align' ); // Remove any of the alignment classes from the className. var className = cssClassName && ( block.$.className = CKEDITOR.tools.ltrim( block.$.className.replace( this.cssClassRegex, '' ) ) ); var apply = ( this.state == CKEDITOR.TRISTATE_OFF ) && ( !useComputedState || ( getAlignment( block, true ) != this.value ) ); if ( cssClassName ) { // Append the desired class name. if ( apply ) block.addClass( cssClassName ); else if ( !className ) block.removeAttribute( 'class' ); } else if ( apply ) block.setStyle( 'text-align', this.value ); } } editor.focus(); editor.forceNextSelectionCheck(); selection.selectBookmarks( bookmarks ); }, refresh : function( path ) { var firstBlock = path.block || path.blockLimit; this.setState( firstBlock.getName() != 'body' && getAlignment( firstBlock, this.editor.config.useComputedState ) == this.value ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF ); } }; CKEDITOR.plugins.add( 'justify', { init : function( editor ) { var left = new justifyCommand( editor, 'justifyleft', 'left' ), center = new justifyCommand( editor, 'justifycenter', 'center' ), right = new justifyCommand( editor, 'justifyright', 'right' ), justify = new justifyCommand( editor, 'justifyblock', 'justify' ); editor.addCommand( 'justifyleft', left ); editor.addCommand( 'justifycenter', center ); editor.addCommand( 'justifyright', right ); editor.addCommand( 'justifyblock', justify ); editor.ui.addButton( 'JustifyLeft', { label : editor.lang.justify.left, command : 'justifyleft' } ); editor.ui.addButton( 'JustifyCenter', { label : editor.lang.justify.center, command : 'justifycenter' } ); editor.ui.addButton( 'JustifyRight', { label : editor.lang.justify.right, command : 'justifyright' } ); editor.ui.addButton( 'JustifyBlock', { label : editor.lang.justify.block, command : 'justifyblock' } ); editor.on( 'selectionChange', CKEDITOR.tools.bind( onSelectionChange, left ) ); editor.on( 'selectionChange', CKEDITOR.tools.bind( onSelectionChange, right ) ); editor.on( 'selectionChange', CKEDITOR.tools.bind( onSelectionChange, center ) ); editor.on( 'selectionChange', CKEDITOR.tools.bind( onSelectionChange, justify ) ); editor.on( 'dirChanged', onDirChanged ); }, requires : [ 'domiterator' ] }); })(); /** * List of classes to use for aligning the contents. If it's null, no classes will be used * and instead the corresponding CSS values will be used. The array should contain 4 members, in the following order: left, center, right, justify. * @name CKEDITOR.config.justifyClasses * @type Array * @default null * @example * // Use the classes 'AlignLeft', 'AlignCenter', 'AlignRight', 'AlignJustify' * config.justifyClasses = [ 'AlignLeft', 'AlignCenter', 'AlignRight', 'AlignJustify' ]; */
10npsite
trunk/guanli/system/ckeditor/_source/plugins/justify/plugin.js
JavaScript
asf20
7,067
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @name CKEDITOR.theme * @class */ CKEDITOR.themes.add( 'default', (function() { var hiddenSkins = {}; function checkSharedSpace( editor, spaceName ) { var container, element; // Try to retrieve the target element from the sharedSpaces settings. element = editor.config.sharedSpaces; element = element && element[ spaceName ]; element = element && CKEDITOR.document.getById( element ); // If the element is available, we'll then create the container for // the space. if ( element ) { // Creates an HTML structure that reproduces the editor class hierarchy. var html = '<span class="cke_shared "' + ' dir="'+ editor.lang.dir + '"' + '>' + '<span class="' + editor.skinClass + ' ' + editor.id + ' cke_editor_' + editor.name + '">' + '<span class="' + CKEDITOR.env.cssClass + '">' + '<span class="cke_wrapper cke_' + editor.lang.dir + '">' + '<span class="cke_editor">' + '<div class="cke_' + spaceName + '">' + '</div></span></span></span></span></span>'; var mainContainer = element.append( CKEDITOR.dom.element.createFromHtml( html, element.getDocument() ) ); // Only the first container starts visible. Others get hidden. if ( element.getCustomData( 'cke_hasshared' ) ) mainContainer.hide(); else element.setCustomData( 'cke_hasshared', 1 ); // Get the deeper inner <div>. container = mainContainer.getChild( [0,0,0,0] ); // Save a reference to the shared space container. !editor.sharedSpaces && ( editor.sharedSpaces = {} ); editor.sharedSpaces[ spaceName ] = container; // When the editor gets focus, we show the space container, hiding others. editor.on( 'focus', function() { for ( var i = 0, sibling, children = element.getChildren() ; ( sibling = children.getItem( i ) ) ; i++ ) { if ( sibling.type == CKEDITOR.NODE_ELEMENT && !sibling.equals( mainContainer ) && sibling.hasClass( 'cke_shared' ) ) { sibling.hide(); } } mainContainer.show(); }); editor.on( 'destroy', function() { mainContainer.remove(); }); } return container; } return /** @lends CKEDITOR.theme */ { build : function( editor, themePath ) { var name = editor.name, element = editor.element, elementMode = editor.elementMode; if ( !element || elementMode == CKEDITOR.ELEMENT_MODE_NONE ) return; if ( elementMode == CKEDITOR.ELEMENT_MODE_REPLACE ) element.hide(); // Get the HTML for the predefined spaces. var topHtml = editor.fire( 'themeSpace', { space : 'top', html : '' } ).html; var contentsHtml = editor.fire( 'themeSpace', { space : 'contents', html : '' } ).html; var bottomHtml = editor.fireOnce( 'themeSpace', { space : 'bottom', html : '' } ).html; var height = contentsHtml && editor.config.height; var tabIndex = editor.config.tabIndex || editor.element.getAttribute( 'tabindex' ) || 0; // The editor height is considered only if the contents space got filled. if ( !contentsHtml ) height = 'auto'; else if ( !isNaN( height ) ) height += 'px'; var style = ''; var width = editor.config.width; if ( width ) { if ( !isNaN( width ) ) width += 'px'; style += "width: " + width + ";"; } var sharedTop = topHtml && checkSharedSpace( editor, 'top' ), sharedBottoms = checkSharedSpace( editor, 'bottom' ); sharedTop && ( sharedTop.setHtml( topHtml ) , topHtml = '' ); sharedBottoms && ( sharedBottoms.setHtml( bottomHtml ), bottomHtml = '' ); var hideSkin = '<style>.' + editor.skinClass + '{visibility:hidden;}</style>'; if ( hiddenSkins[ editor.skinClass ] ) hideSkin = ''; else hiddenSkins[ editor.skinClass ] = 1; var container = CKEDITOR.dom.element.createFromHtml( [ '<span' + ' id="cke_', name, '"' + ' class="', editor.skinClass, ' ', editor.id, ' cke_editor_', name, '"' + ' dir="', editor.lang.dir, '"' + ' title="', ( CKEDITOR.env.gecko ? ' ' : '' ), '"' + ' lang="', editor.langCode, '"' + ( CKEDITOR.env.webkit? ' tabindex="' + tabIndex + '"' : '' ) + ' role="application"' + ' aria-labelledby="cke_', name, '_arialbl"' + ( style ? ' style="' + style + '"' : '' ) + '>' + '<span id="cke_', name, '_arialbl" class="cke_voice_label">' + editor.lang.editor + '</span>' + '<span class="' , CKEDITOR.env.cssClass, '" role="presentation">' + '<span class="cke_wrapper cke_', editor.lang.dir, '" role="presentation">' + '<table class="cke_editor" border="0" cellspacing="0" cellpadding="0" role="presentation"><tbody>' + '<tr', topHtml ? '' : ' style="display:none"', ' role="presentation"><td id="cke_top_' , name, '" class="cke_top" role="presentation">' , topHtml , '</td></tr>' + '<tr', contentsHtml ? '' : ' style="display:none"', ' role="presentation"><td id="cke_contents_', name, '" class="cke_contents" style="height:', height, '" role="presentation">', contentsHtml, '</td></tr>' + '<tr', bottomHtml ? '' : ' style="display:none"', ' role="presentation"><td id="cke_bottom_' , name, '" class="cke_bottom" role="presentation">' , bottomHtml , '</td></tr>' + '</tbody></table>' + //Hide the container when loading skins, later restored by skin css. hideSkin + '</span>' + '</span>' + '</span>' ].join( '' ) ); container.getChild( [1, 0, 0, 0, 0] ).unselectable(); container.getChild( [1, 0, 0, 0, 2] ).unselectable(); if ( elementMode == CKEDITOR.ELEMENT_MODE_REPLACE ) container.insertAfter( element ); else element.append( container ); /** * The DOM element that holds the main editor interface. * @name CKEDITOR.editor.prototype.container * @type CKEDITOR.dom.element * @example * var editor = CKEDITOR.instances.editor1; * alert( <b>editor.container</b>.getName() ); "span" */ editor.container = container; // Disable browser context menu for editor's chrome. container.disableContextMenu(); // Use a class to indicate that the current selection is in different direction than the UI. editor.on( 'contentDirChanged', function( evt ) { var func = ( editor.lang.dir != evt.data ? 'add' : 'remove' ) + 'Class'; container.getChild( 1 )[ func ]( 'cke_mixed_dir_content' ); // Put the mixed direction class on the respective element also for shared spaces. var toolbarSpace = this.sharedSpaces && this.sharedSpaces[ this.config.toolbarLocation ]; toolbarSpace && toolbarSpace.getParent().getParent()[ func ]( 'cke_mixed_dir_content' ); }); editor.fireOnce( 'themeLoaded' ); editor.fireOnce( 'uiReady' ); }, buildDialog : function( editor ) { var baseIdNumber = CKEDITOR.tools.getNextNumber(); var element = CKEDITOR.dom.element.createFromHtml( [ '<div class="', editor.id, '_dialog cke_editor_', editor.name.replace('.', '\\.'), '_dialog cke_skin_', editor.skinName, '" dir="', editor.lang.dir, '"' + ' lang="', editor.langCode, '"' + ' role="dialog"' + ' aria-labelledby="%title#"' + '>' + '<table class="cke_dialog', ' ' + CKEDITOR.env.cssClass, ' cke_', editor.lang.dir, '" style="position:absolute" role="presentation">' + '<tr><td role="presentation">' + '<div class="%body" role="presentation">' + '<div id="%title#" class="%title" role="presentation"></div>' + '<a id="%close_button#" class="%close_button" href="javascript:void(0)" title="' + editor.lang.common.close+'" role="button"><span class="cke_label">X</span></a>' + '<div id="%tabs#" class="%tabs" role="tablist"></div>' + '<table class="%contents" role="presentation">' + '<tr>' + '<td id="%contents#" class="%contents" role="presentation"></td>' + '</tr>' + '<tr>' + '<td id="%footer#" class="%footer" role="presentation"></td>' + '</tr>' + '</table>' + '</div>' + '<div id="%tl#" class="%tl"></div>' + '<div id="%tc#" class="%tc"></div>' + '<div id="%tr#" class="%tr"></div>' + '<div id="%ml#" class="%ml"></div>' + '<div id="%mr#" class="%mr"></div>' + '<div id="%bl#" class="%bl"></div>' + '<div id="%bc#" class="%bc"></div>' + '<div id="%br#" class="%br"></div>' + '</td></tr>' + '</table>', //Hide the container when loading skins, later restored by skin css. ( CKEDITOR.env.ie ? '' : '<style>.cke_dialog{visibility:hidden;}</style>' ), '</div>' ].join( '' ) .replace( /#/g, '_' + baseIdNumber ) .replace( /%/g, 'cke_dialog_' ) ); var body = element.getChild( [ 0, 0, 0, 0, 0 ] ), title = body.getChild( 0 ), close = body.getChild( 1 ); // IFrame shim for dialog that masks activeX in IE. (#7619) if ( CKEDITOR.env.ie && !CKEDITOR.env.ie6Compat ) { var isCustomDomain = CKEDITOR.env.isCustomDomain(), src = 'javascript:void(function(){' + encodeURIComponent( 'document.open();' + ( isCustomDomain ? ( 'document.domain="' + document.domain + '";' ) : '' ) + 'document.close();' ) + '}())', iframe = CKEDITOR.dom.element.createFromHtml( '<iframe' + ' frameBorder="0"' + ' class="cke_iframe_shim"' + ' src="' + src + '"' + ' tabIndex="-1"' + '></iframe>' ); iframe.appendTo( body.getParent() ); } // Make the Title and Close Button unselectable. title.unselectable(); close.unselectable(); return { element : element, parts : { dialog : element.getChild( 0 ), title : title, close : close, tabs : body.getChild( 2 ), contents : body.getChild( [ 3, 0, 0, 0 ] ), footer : body.getChild( [ 3, 0, 1, 0 ] ) } }; }, destroy : function( editor ) { var container = editor.container, element = editor.element; if ( container ) { container.clearCustomData(); container.remove(); } if ( element ) { element.clearCustomData(); editor.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE && element.show(); delete editor.element; } } }; })() ); /** * Returns the DOM element that represents a theme space. The default theme defines * three spaces, namely "top", "contents" and "bottom", representing the main * blocks that compose the editor interface. * @param {String} spaceName The space name. * @returns {CKEDITOR.dom.element} The element that represents the space. * @example * // Hide the bottom space in the UI. * var bottom = editor.getThemeSpace( 'bottom' ); * bottom.setStyle( 'display', 'none' ); */ CKEDITOR.editor.prototype.getThemeSpace = function( spaceName ) { var spacePrefix = 'cke_' + spaceName; var space = this._[ spacePrefix ] || ( this._[ spacePrefix ] = CKEDITOR.document.getById( spacePrefix + '_' + this.name ) ); return space; }; /** * Resizes the editor interface. * @param {Number|String} width The new width. It can be an pixels integer or a * CSS size value. * @param {Number|String} height The new height. It can be an pixels integer or * a CSS size value. * @param {Boolean} [isContentHeight] Indicates that the provided height is to * be applied to the editor contents space, not to the entire editor * interface. Defaults to false. * @param {Boolean} [resizeInner] Indicates that the first inner interface * element must receive the size, not the outer element. The default theme * defines the interface inside a pair of span elements * (&lt;span&gt;&lt;span&gt;...&lt;/span&gt;&lt;/span&gt;). By default the * first span element receives the sizes. If this parameter is set to * true, the second span is sized instead. * @example * editor.resize( 900, 300 ); * @example * editor.resize( '100%', 450, true ); */ CKEDITOR.editor.prototype.resize = function( width, height, isContentHeight, resizeInner ) { var container = this.container, contents = CKEDITOR.document.getById( 'cke_contents_' + this.name ), contentsFrame = CKEDITOR.env.webkit && this.document && this.document.getWindow().$.frameElement, outer = resizeInner ? container.getChild( 1 ) : container; // Set as border box width. (#5353) outer.setSize( 'width', width, true ); // WebKit needs to refresh the iframe size to avoid rendering issues. (1/2) (#8348) contentsFrame && ( contentsFrame.style.width = '1%' ); // Get the height delta between the outer table and the content area. // If we're setting the content area's height, then we don't need the delta. var delta = isContentHeight ? 0 : ( outer.$.offsetHeight || 0 ) - ( contents.$.clientHeight || 0 ); contents.setStyle( 'height', Math.max( height - delta, 0 ) + 'px' ); // WebKit needs to refresh the iframe size to avoid rendering issues. (2/2) (#8348) contentsFrame && ( contentsFrame.style.width = '100%' ); // Emit a resize event. this.fire( 'resize' ); }; /** * Gets the element that can be freely used to check the editor size. This method * is mainly used by the resize plugin, which adds a UI handle that can be used * to resize the editor. * @param {Boolean} forContents Whether to return the "contents" part of the theme instead of the container. * @returns {CKEDITOR.dom.element} The resizable element. * @example */ CKEDITOR.editor.prototype.getResizable = function( forContents ) { return forContents ? CKEDITOR.document.getById( 'cke_contents_' + this.name ) : this.container; }; /** * Makes it possible to place some of the editor UI blocks, like the toolbar * and the elements path, into any element in the page. * The elements used to hold the UI blocks can be shared among several editor * instances. In that case, only the blocks of the active editor instance will * display. * @name CKEDITOR.config.sharedSpaces * @type Object * @default undefined * @example * // Place the toolbar inside the element with ID "someElementId" and the * // elements path into the element with ID "anotherId". * config.sharedSpaces = * { * top : 'someElementId', * bottom : 'anotherId' * }; * @example * // Place the toolbar inside the element with ID "someElementId". The * // elements path will remain attached to the editor UI. * config.sharedSpaces = * { * top : 'someElementId' * }; */ /** * Fired after the editor instance is resized through * the {@link CKEDITOR.editor.prototype.resize} method. * @name CKEDITOR.editor#resize * @event */
10npsite
trunk/guanli/system/ckeditor/_source/themes/default/theme.js
JavaScript
asf20
15,021
<?php /* * Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.html or http://ckeditor.com/license */ /*! \mainpage CKEditor - PHP server side intergation * \section intro_sec CKEditor * Visit <a href="http://ckeditor.com">CKEditor web site</a> to find more information about the editor. * \section install_sec Installation * \subsection step1 Include ckeditor.php in your PHP web site. * @code * <?php * include("ckeditor/ckeditor.php"); * ?> * @endcode * \subsection step2 Create CKEditor class instance and use one of available methods to insert CKEditor. * @code * <?php * $CKEditor = new CKEditor(); * $CKEditor->editor("editor1", "<p>Initial value.</p>"); * ?> * @endcode */ if ( !function_exists('version_compare') || version_compare( phpversion(), '5', '<' ) ) include_once( 'ckeditor_php4.php' ) ; else include_once( 'ckeditor_php5.php' ) ;
10npsite
trunk/guanli/system/ckeditor/ckeditor.php
PHP
asf20
956
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ body { /* Font */ font-family: Arial, Verdana, sans-serif; font-size: 12px; /* Text color */ color: #222; /* Remove the background color to make it transparent */ background-color: #fff; } ol,ul,dl { /* IE7: reset rtl list margin. (#7334) */ *margin-right:0px; /* preserved spaces for list items with text direction other than the list. (#6249,#8049)*/ padding:0 40px; }
10npsite
trunk/guanli/system/ckeditor/contents.css
CSS
asf20
559
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- == BEGIN TEXT ONLY VERSION == Software License Agreement ========================== CKEditor - The text editor for Internet - http://ckeditor.com Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/licenses/gpl.html (See Appendix A) - GNU Lesser General Public License Version 2.1 or later (the "LGPL") http://www.gnu.org/licenses/lgpl.html (See Appendix B) - Mozilla Public License Version 1.1 or later (the "MPL") http://www.mozilla.org/MPL/MPL-1.1.html (See Appendix C) You are not required to, but if you want to explicitly declare the license you have chosen to be bound to when using, reproducing, modifying and distributing this software, just include a text file titled "legal.txt" in your version of this software, indicating your license choice. Sources of Intellectual Property Included in CKEditor ===================================================== Where not otherwise indicated, all CKEditor content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, CKEditor will incorporate work done by developers outside of CKSource with their express permission. Trademarks ========== CKEditor is a trademark of CKSource - Frederico Knabben. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders. Appendix A: The GPL License =========================== GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software-to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix B: The LGPL License ============================ GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software-to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages-typically libraries-of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix C: The MPL License =========================== MOZILLA PUBLIC LICENSE Version 1.1 =============== 1. Definitions. 1.0.1. "Commercial Use" means distribution or otherwise making the Covered Code available to a third party. 1.1. "Contributor" means each entity that creates or contributes to the creation of Modifications. 1.2. "Contributor Version" means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor. 1.3. "Covered Code" means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof. 1.4. "Electronic Distribution Mechanism" means a mechanism generally accepted in the software development community for the electronic transfer of data. 1.5. "Executable" means Covered Code in any form other than Source Code. 1.6. "Initial Developer" means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A. 1.7. "Larger Work" means a work which combines Covered Code or portions thereof with code not governed by the terms of this License. 1.8. "License" means this document. 1.8.1. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. 1.9. "Modifications" means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is: A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications. B. Any new file that contains any part of the Original Code or previous Modifications. 1.10. "Original Code" means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License. 1.10.1. "Patent Claims" means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. 1.11. "Source Code" means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge. 1.12. "You" (or "Your") means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, "You" includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. 2. Source Code License. 2.1. The Initial Developer Grant. The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims: (a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, and/or as part of a Larger Work; and (b) under Patents Claims infringed by the making, using or selling of Original Code, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Code (or portions thereof). (c) the licenses granted in this Section 2.1(a) and (b) are effective on the date Initial Developer first distributes Original Code under the terms of this License. (d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) for code that You delete from the Original Code; 2) separate from the Original Code; or 3) for infringements caused by: i) the modification of the Original Code or ii) the combination of the Original Code with other software or devices. 2.2. Contributor Grant. Subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license (a) under intellectual property rights (other than patent or trademark) Licensable by Contributor, to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code and/or as part of a Larger Work; and (b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: 1) Modifications made by that Contributor (or portions thereof); and 2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). (c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first makes Commercial Use of the Covered Code. (d) Notwithstanding Section 2.2(b) above, no patent license is granted: 1) for any code that Contributor has deleted from the Contributor Version; 2) separate from the Contributor Version; 3) for infringements caused by: i) third party modifications of Contributor Version or ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or 4) under Patent Claims infringed by Covered Code in the absence of Modifications made by that Contributor. 3. Distribution Obligations. 3.1. Application of License. The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5. 3.2. Availability of Source Code. Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party. 3.3. Description of Modifications. You must cause all Covered Code to which You contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code. 3.4. Intellectual Property Matters (a) Third Party Claims. If Contributor has knowledge that a license under a third party's intellectual property rights is required to exercise the rights granted by such Contributor under Sections 2.1 or 2.2, Contributor must include a text file with the Source Code distribution titled "LEGAL" which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If Contributor obtains such knowledge after the Modification is made available as described in Section 3.2, Contributor shall promptly modify the LEGAL file in all copies Contributor makes available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained. (b) Contributor APIs. If Contributor's Modifications include an application programming interface and Contributor has knowledge of patent licenses which are reasonably necessary to implement that API, Contributor must also include this information in the LEGAL file. (c) Representations. Contributor represents that, except as disclosed pursuant to Section 3.4(a) above, Contributor believes that Contributor's Modifications are Contributor's original creation(s) and/or Contributor has sufficient rights to grant the rights conveyed by this License. 3.5. Required Notices. You must duplicate the notice in Exhibit A in each file of the Source Code. If it is not possible to put such notice in a particular Source Code file due to its structure, then You must include such notice in a location (such as a relevant directory) where a user would be likely to look for such a notice. If You created one or more Modification(s) You may add your name as a Contributor to the notice described in Exhibit A. You must also duplicate this License in any documentation for the Source Code where You describe recipients' rights or ownership rights relating to Covered Code. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. 3.6. Distribution of Executable Versions. You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients' rights relating to the Covered Code. You may distribute the Executable version of Covered Code or ownership rights under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or any Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. 3.7. Larger Works. You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code. 4. Inability to Comply Due to Statute or Regulation. If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. 5. Application of this License. This License applies to code to which the Initial Developer has attached the notice in Exhibit A and to related Covered Code. 6. Versions of the License. 6.1. New Versions. Netscape Communications Corporation ("Netscape") may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number. 6.2. Effect of New Versions. Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by Netscape. No one other than Netscape has the right to modify the terms applicable to Covered Code created under this License. 6.3. Derivative Works. If You create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), You must (a) rename Your license so that the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape", "MPL", "NPL" or any confusingly similar phrase do not appear in your license (except to note that your license differs from this License) and (b) otherwise make it clear that Your version of the license contains terms which differ from the Mozilla Public License and Netscape Public License. (Filling in the name of the Initial Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.) 7. DISCLAIMER OF WARRANTY. COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. 8. TERMINATION. 8.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. 8.2. If You initiate litigation by asserting a patent infringement claim (excluding declatory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You file such action is referred to as "Participant") alleging that: (a) such Participant's Contributor Version directly or indirectly infringes any patent, then any and all rights granted by such Participant to You under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively, unless if within 60 days after receipt of notice You either: (i) agree in writing to pay Participant a mutually agreeable reasonable royalty for Your past and future use of Modifications made by such Participant, or (ii) withdraw Your litigation claim with respect to the Contributor Version against such Participant. If within 60 days of notice, a reasonable royalty and payment arrangement are not mutually agreed upon in writing by the parties or the litigation claim is not withdrawn, the rights granted by Participant to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration of the 60 day notice period specified above. (b) any software, hardware, or device, other than such Participant's Contributor Version, directly or indirectly infringes any patent, then any rights granted to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective as of the date You first made, used, sold, distributed, or had made, Modifications made by that Participant. 8.3. If You assert a patent infringement claim against Participant alleging that such Participant's Contributor Version directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license. 8.4. In the event of termination under Sections 8.1 or 8.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or any distributor hereunder prior to termination shall survive termination. 9. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. 10. U.S. GOVERNMENT END USERS. The Covered Code is a "commercial item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial computer software documentation," as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein. 11. MISCELLANEOUS. This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by California law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of, or an entity chartered or registered to do business in the United States of America, any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California, with venue lying in Santa Clara County, California, with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys' fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. 12. RESPONSIBILITY FOR CLAIMS. As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. 13. MULTIPLE-LICENSED CODE. Initial Developer may designate portions of the Covered Code as "Multiple-Licensed". "Multiple-Licensed" means that the Initial Developer permits you to utilize portions of the Covered Code under Your choice of the NPL or the alternative licenses, if any, specified by the Initial Developer in the file described in Exhibit A. EXHIBIT A -Mozilla Public License. ``The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is ______________________________________. The Initial Developer of the Original Code is ________________________. Portions created by ______________________ are Copyright (C) ______ _______________________. All Rights Reserved. Contributor(s): ______________________________________. Alternatively, the contents of this file may be used under the terms of the _____ license (the "[___] License"), in which case the provisions of [______] License are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of the [____] License and not to allow others to use your version of this file under the MPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the [___] License. If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the [___] License." [NOTE: The text of this Exhibit A may differ slightly from the text of the notices in the Source Code files of the Original Code. You should use the text of this Exhibit A rather than the text found in the Original Code Source Code for Your Modifications.] == END TEXT ONLY VERSION == --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>License - CKEditor</title> </head> <body> <h1> Software License Agreement </h1> <p> <strong>CKEditor&trade;</strong> - The text editor for Internet&trade; - <a href="http://ckeditor.com"> http://ckeditor.com</a><br /> Copyright &copy; 2003-2012, <a href="http://cksource.com/">CKSource</a> - Frederico Knabben. All rights reserved. </p> <p> Licensed under the terms of any of the following licenses at your choice: </p> <ul> <li><a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a> Version 2 or later (the "GPL");</li> <li><a href="http://www.gnu.org/licenses/lgpl.html">GNU Lesser General Public License</a> Version 2.1 or later (the "LGPL");</li> <li><a href="http://www.mozilla.org/MPL/MPL-1.1.html">Mozilla Public License</a> Version 1.1 or later (the "MPL").</li> </ul> <p> You are not required to, but if you want to explicitly declare the license you have chosen to be bound to when using, reproducing, modifying and distributing this software, just include a text file titled "LEGAL" in your version of this software, indicating your license choice. In any case, your choice will not restrict any recipient of your version of this software to use, reproduce, modify and distribute this software under any of the above licenses. </p> <h2> Sources of Intellectual Property Included in CKEditor </h2> <p> Where not otherwise indicated, all CKEditor content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, CKEditor will incorporate work done by developers outside of CKSource with their express permission. </p> <p> <a href="http://developer.yahoo.com/yui/yuitest/">YUI Test</a>: At _source/tests/yuitest.js can be found part of the source code of YUI, which is licensed under the terms of the <a href="http://developer.yahoo.com/yui/license.txt">BSD License</a>. YUI is Copyright &copy; 2008, Yahoo! Inc. </p> <h2> Trademarks </h2> <p> CKEditor is a trademark of CKSource - Frederico Knabben. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders. </p> </body> </html>
10npsite
trunk/guanli/system/ckeditor/LICENSE.html
HTML
asf20
70,729