2010-09-02 23:03:20 +00:00
/ *
* jQuery JavaScript Library v1 . 4.2
* http : //jquery.com/
*
* Copyright 2010 , John Resig
* Dual licensed under the MIT or GPL Version 2 licenses .
* http : //jquery.org/license
*
* Includes Sizzle . js
* http : //sizzlejs.com/
* Copyright 2010 , The Dojo Foundation
* Released under the MIT , BSD , and GPL Licenses .
*
* Date : Sat Feb 13 22 : 33 : 48 2010 - 0500
* /
( function ( window , undefined ) { var jQuery = function ( selector , context ) { return new jQuery . fn . init ( selector , context ) } , _jQuery = window . jQuery , _$ = window . $ , document = window . document , rootjQuery , quickExpr = /^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/ , isSimple = /^.[^:#\[\.,]*$/ , rnotwhite = /\S/ , rtrim = /^(\s|\u00A0)+|(\s|\u00A0)+$/g , rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/ , userAgent = navigator . userAgent , browserMatch , readyBound = false , readyList = [ ] , DOMContentLoaded , toString = Object . prototype . toString , hasOwnProperty = Object . prototype . hasOwnProperty , push = Array . prototype . push , slice = Array . prototype . slice , indexOf = Array . prototype . indexOf ; jQuery . fn = jQuery . prototype = { init : function ( selector , context ) { var match , elem , ret , doc ; if ( ! selector ) { return this } if ( selector . nodeType ) { this . context = this [ 0 ] = selector ; this . length = 1 ; return this } if ( selector === "body" && ! context ) { this . context = document ; this [ 0 ] = document . body ; this . selector = "body" ; this . length = 1 ; return this } if ( typeof selector === "string" ) { match = quickExpr . exec ( selector ) ; if ( match && ( match [ 1 ] || ! context ) ) { if ( match [ 1 ] ) { doc = ( context ? context . ownerDocument || context : document ) ; ret = rsingleTag . exec ( selector ) ; if ( ret ) { if ( jQuery . isPlainObject ( context ) ) { selector = [ document . createElement ( ret [ 1 ] ) ] ; jQuery . fn . attr . call ( selector , context , true ) } else { selector = [ doc . createElement ( ret [ 1 ] ) ] } } else { ret = buildFragment ( [ match [ 1 ] ] , [ doc ] ) ; selector = ( ret . cacheable ? ret . fragment . cloneNode ( true ) : ret . fragment ) . childNodes } return jQuery . merge ( this , selector ) } else { elem = document . getElementById ( match [ 2 ] ) ; if ( elem ) { if ( elem . id !== match [ 2 ] ) { return rootjQuery . find ( selector ) } this . length = 1 ; this [ 0 ] = elem } this . context = document ; this . selector = selector ; return this } } else { if ( ! context && /^\w+$/ . test ( selector ) ) { this . selector = selector ; this . context = document ; selector = document . getElementsByTagName ( selector ) ; return jQuery . merge ( this , selector ) } else { if ( ! context || context . jquery ) { return ( context || rootjQuery ) . find ( selector ) } else { return jQuery ( context ) . find ( selector ) } } } } else { if ( jQuery . isFunction ( selector ) ) { return rootjQuery . ready ( selector ) } } if ( selector . selector !== undefined ) { this . selector = selector . selector ; this . context = selector . context } return jQuery . makeArray ( selector , this ) } , selector : "" , jquery : "1.4.2" , length : 0 , size : function ( ) { return this . length } , toArray : function ( ) { return slice . call ( this , 0 ) } , get : function ( num ) { return num == null ? this . toArray ( ) : ( num < 0 ? this . slice ( num ) [ 0 ] : this [ num ] ) } , pushStack : function ( elems , name , selector ) { var ret = jQuery ( ) ; if ( jQuery . isArray ( elems ) ) { push . apply ( ret , elems ) } else { jQuery . merge ( ret , elems ) } ret . prevObject = this ; ret . context = this . context ; if ( name === "find" ) { ret . selector = this . selector + ( this . selector ? " " : "" ) + selector } else { if ( name ) { ret . selector = this . selector + "." + name + "(" + selector + ")" } } return ret } , each : function ( callback , args ) { return jQuery . each ( this , callback , args ) } , ready : function ( fn ) { jQuery . bindReady ( ) ; if ( jQuery . isReady ) { fn . call ( document , jQuery ) } else { if ( readyList ) { readyList . push ( fn ) } } return this } , eq : function ( i ) { return i === - 1 ? this . slice ( i ) : this . slice ( i , + i + 1 ) } , first : function ( ) { return this . eq ( 0 ) } , last : function ( ) { return this . eq ( - 1 ) } , slice : function ( ) { return this . pushStack ( slice . apply ( this , arguments ) , "slice" , slice . call ( arguments ) . join ( "," ) ) } , map : function ( callback ) { return this . pushStack ( jQuery . map ( this , function ( elem , i ) { return callback . call ( elem , i , elem ) } ) ) } , end : function ( ) { return this . prevObject || jQuery ( null ) } , push : push , sort : [ ] . sort , splice : [ ] . splice } ; jQuery . fn . init . prototype = jQuery . fn ; jQuery . extend = jQuery . fn . extend = function ( ) { var target = arguments [ 0 ] || { } , i = 1 , length = arguments . length , deep = false , options , name , src , copy ; if ( typeof target === "boolean" ) { deep = target ; target = arguments [ 1 ] || { } ; i = 2 } if ( typeof target !== "object" && ! jQuery . isFunction ( target ) ) { target = { } } if ( length === i ) { target = this ; -- i } for ( ; i < length ; i ++ ) { if ( ( options = arguments [ i ] ) != null ) { for ( name in options ) { src = target [ name ] ; copy = options [ name ] ; if ( target === copy ) { continue } if ( deep && copy && ( jQuery . isPlainObject ( copy ) || jQuery . isArray ( copy ) ) ) { var clone = src && ( jQuery . isPlainObject ( src ) || jQuery . isArray ( src ) ) ? src : jQuery . isArray ( copy ) ? [ ] : { } ; target [ name ] = jQuery . extend ( deep , clone , copy ) } else { if ( copy !== undefined ) { target [ name ] = copy } } } } } return target } ; jQuery . extend ( { noConflict : funct
/ *
* Sizzle CSS Selector Engine - v1 . 0
* Copyright 2009 , The Dojo Foundation
* Released under the MIT , BSD , and GPL Licenses .
* More information : http : //sizzlejs.com/
* /
} ( function ( ) { var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g , done = 0 , toString = Object . prototype . toString , hasDuplicate = false , baseHasDuplicate = true ; [ 0 , 0 ] . sort ( function ( ) { baseHasDuplicate = false ; return 0 } ) ; var Sizzle = function ( selector , context , results , seed ) { results = results || [ ] ; var origContext = context = context || document ; if ( context . nodeType !== 1 && context . nodeType !== 9 ) { return [ ] } if ( ! selector || typeof selector !== "string" ) { return results } var parts = [ ] , m , set , checkSet , extra , prune = true , contextXML = isXML ( context ) , soFar = selector ; while ( ( chunker . exec ( "" ) , m = chunker . exec ( soFar ) ) !== null ) { soFar = m [ 3 ] ; parts . push ( m [ 1 ] ) ; if ( m [ 2 ] ) { extra = m [ 3 ] ; break } } if ( parts . length > 1 && origPOS . exec ( selector ) ) { if ( parts . length === 2 && Expr . relative [ parts [ 0 ] ] ) { set = posProcess ( parts [ 0 ] + parts [ 1 ] , context ) } else { set = Expr . relative [ parts [ 0 ] ] ? [ context ] : Sizzle ( parts . shift ( ) , context ) ; while ( parts . length ) { selector = parts . shift ( ) ; if ( Expr . relative [ selector ] ) { selector += parts . shift ( ) } set = posProcess ( selector , set ) } } } else { if ( ! seed && parts . length > 1 && context . nodeType === 9 && ! contextXML && Expr . match . ID . test ( parts [ 0 ] ) && ! Expr . match . ID . test ( parts [ parts . length - 1 ] ) ) { var ret = Sizzle . find ( parts . shift ( ) , context , contextXML ) ; context = ret . expr ? Sizzle . filter ( ret . expr , ret . set ) [ 0 ] : ret . set [ 0 ] } if ( context ) { var ret = seed ? { expr : parts . pop ( ) , set : makeArray ( seed ) } : Sizzle . find ( parts . pop ( ) , parts . length === 1 && ( parts [ 0 ] === "~" || parts [ 0 ] === "+" ) && context . parentNode ? context . parentNode : context , contextXML ) ; set = ret . expr ? Sizzle . filter ( ret . expr , ret . set ) : ret . set ; if ( parts . length > 0 ) { checkSet = makeArray ( set ) } else { prune = false } while ( parts . length ) { var cur = parts . pop ( ) , pop = cur ; if ( ! Expr . relative [ cur ] ) { cur = "" } else { pop = parts . pop ( ) } if ( pop == null ) { pop = context } Expr . relative [ cur ] ( checkSet , pop , contextXML ) } } else { checkSet = parts = [ ] } } if ( ! checkSet ) { checkSet = set } if ( ! checkSet ) { Sizzle . error ( cur || selector ) } if ( toString . call ( checkSet ) === "[object Array]" ) { if ( ! prune ) { results . push . apply ( results , checkSet ) } else { if ( context && context . nodeType === 1 ) { for ( var i = 0 ; checkSet [ i ] != null ; i ++ ) { if ( checkSet [ i ] && ( checkSet [ i ] === true || checkSet [ i ] . nodeType === 1 && contains ( context , checkSet [ i ] ) ) ) { results . push ( set [ i ] ) } } } else { for ( var i = 0 ; checkSet [ i ] != null ; i ++ ) { if ( checkSet [ i ] && checkSet [ i ] . nodeType === 1 ) { results . push ( set [ i ] ) } } } } } else { makeArray ( checkSet , results ) } if ( extra ) { Sizzle ( extra , origContext , results , seed ) ; Sizzle . uniqueSort ( results ) } return results } ; Sizzle . uniqueSort = function ( results ) { if ( sortOrder ) { hasDuplicate = baseHasDuplicate ; results . sort ( sortOrder ) ; if ( hasDuplicate ) { for ( var i = 1 ; i < results . length ; i ++ ) { if ( results [ i ] === results [ i - 1 ] ) { results . splice ( i -- , 1 ) } } } } return results } ; Sizzle . matches = function ( expr , set ) { return Sizzle ( expr , null , null , set ) } ; Sizzle . find = function ( expr , context , isXML ) { var set , match ; if ( ! expr ) { return [ ] } for ( var i = 0 , l = Expr . order . length ; i < l ; i ++ ) { var type = Expr . order [ i ] , match ; if ( ( match = Expr . leftMatch [ type ] . exec ( expr ) ) ) { var left = match [ 1 ] ; match . splice ( 1 , 1 ) ; if ( left . substr ( left . length - 1 ) !== "\\" ) { match [ 1 ] = ( match [ 1 ] || "" ) . replace ( /\\/g , "" ) ; set = Expr . find [ type ] ( match , context , isXML ) ; if ( set != null ) { expr = expr . replace ( Expr . match [ type ] , "" ) ; break } } } } if ( ! set ) { set = context . getElementsByTagName ( "*" ) } return { set : set , expr : expr } } ; Sizzle . filter = function ( expr , set , inplace , not ) { var old = expr , result = [ ] , curLoop = set , match , anyFound , isXMLFilter = set && set [ 0 ] && isXML ( set [ 0 ] ) ; while ( expr && set . length ) { for ( var type in Expr . filter ) { if ( ( match = Expr . leftMatch [ type ] . exec ( expr ) ) != null && match [ 2 ] ) { var filter = Expr . filter [ type ] , found , item , left = match [ 1 ] ; anyFound = false ; match . splice ( 1 , 1 ) ; if ( left . substr ( left . length - 1 ) === "\\" ) { continue } if ( curLoop === result ) { result = [ ] } if ( Expr . preFilter [ type ] ) { match = Expr . preFilter [ type ] ( match , curLoop , inplace , result , not , isXMLFilter ) ; if ( ! match ) { anyFound = found = true } else { if ( match === true ) { continue } } } if ( match ) { for ( var i = 0 ; ( item = curLoop [ i ] ) != null ; i ++ ) { if ( item ) { found = filter ( item , match , i , curLoop ) ; var pass = not ^ ! ! found ; if ( inplace && found != null ) { if ( pass ) { anyFound = true } else { curLoop [ i ] = false } } else { if ( pass ) { result . push ( item ) ; anyFound = true } } } } } if ( found !== undefined ) { if ( ! inplace ) { curLoop = result } expr = expr . replace ( Expr . match [ type ] , "" ) ; if ( ! anyFound ) { return
/ *
* Ext JS Library 3.2 . 1
* Copyright ( c ) 2006 - 2010 Ext JS , Inc .
* licensing @ extjs . com
* http : //www.extjs.com/license
* /
window . undefined = window . undefined ; Ext = { version : "3.2.1" , versionDetail : { major : 3 , minor : 2 , patch : 1 } } ; Ext . apply = function ( o , c , defaults ) { if ( defaults ) { Ext . apply ( o , defaults ) } if ( o && c && typeof c == "object" ) { for ( var p in c ) { o [ p ] = c [ p ] } } return o } ; ( function ( ) { var idSeed = 0 , toString = Object . prototype . toString , ua = navigator . userAgent . toLowerCase ( ) , check = function ( r ) { return r . test ( ua ) } , DOC = document , isStrict = DOC . compatMode == "CSS1Compat" , isOpera = check ( /opera/ ) , isChrome = check ( /\bchrome\b/ ) , isWebKit = check ( /webkit/ ) , isSafari = ! isChrome && check ( /safari/ ) , isSafari2 = isSafari && check ( /applewebkit\/4/ ) , isSafari3 = isSafari && check ( /version\/3/ ) , isSafari4 = isSafari && check ( /version\/4/ ) , isIE = ! isOpera && check ( /msie/ ) , isIE7 = isIE && check ( /msie 7/ ) , isIE8 = isIE && check ( /msie 8/ ) , isIE6 = isIE && ! isIE7 && ! isIE8 , isGecko = ! isWebKit && check ( /gecko/ ) , isGecko2 = isGecko && check ( /rv:1\.8/ ) , isGecko3 = isGecko && check ( /rv:1\.9/ ) , isBorderBox = isIE && ! isStrict , isWindows = check ( /windows|win32/ ) , isMac = check ( /macintosh|mac os x/ ) , isAir = check ( /adobeair/ ) , isLinux = check ( /linux/ ) , isSecure = /^https/i . test ( window . location . protocol ) ; if ( isIE6 ) { try { DOC . execCommand ( "BackgroundImageCache" , false , true ) } catch ( e ) { } } Ext . apply ( Ext , { SSL _SECURE _URL : isSecure && isIE ? 'javascript:""' : "about:blank" , isStrict : isStrict , isSecure : isSecure , isReady : false , enableGarbageCollector : true , enableListenerCollection : false , enableNestedListenerRemoval : false , USE _NATIVE _JSON : false , applyIf : function ( o , c ) { if ( o ) { for ( var p in c ) { if ( ! Ext . isDefined ( o [ p ] ) ) { o [ p ] = c [ p ] } } } return o } , id : function ( el , prefix ) { el = Ext . getDom ( el , true ) || { } ; if ( ! el . id ) { el . id = ( prefix || "ext-gen" ) + ( ++ idSeed ) } return el . id } , extend : function ( ) { var io = function ( o ) { for ( var m in o ) { this [ m ] = o [ m ] } } ; var oc = Object . prototype . constructor ; return function ( sb , sp , overrides ) { if ( typeof sp == "object" ) { overrides = sp ; sp = sb ; sb = overrides . constructor != oc ? overrides . constructor : function ( ) { sp . apply ( this , arguments ) } } var F = function ( ) { } , sbp , spp = sp . prototype ; F . prototype = spp ; sbp = sb . prototype = new F ( ) ; sbp . constructor = sb ; sb . superclass = spp ; if ( spp . constructor == oc ) { spp . constructor = sp } sb . override = function ( o ) { Ext . override ( sb , o ) } ; sbp . superclass = sbp . supr = ( function ( ) { return spp } ) ; sbp . override = io ; Ext . override ( sb , overrides ) ; sb . extend = function ( o ) { return Ext . extend ( sb , o ) } ; return sb } } ( ) , override : function ( origclass , overrides ) { if ( overrides ) { var p = origclass . prototype ; Ext . apply ( p , overrides ) ; if ( Ext . isIE && overrides . hasOwnProperty ( "toString" ) ) { p . toString = overrides . toString } } } , namespace : function ( ) { var o , d ; Ext . each ( arguments , function ( v ) { d = v . split ( "." ) ; o = window [ d [ 0 ] ] = window [ d [ 0 ] ] || { } ; Ext . each ( d . slice ( 1 ) , function ( v2 ) { o = o [ v2 ] = o [ v2 ] || { } } ) } ) ; return o } , urlEncode : function ( o , pre ) { var empty , buf = [ ] , e = encodeURIComponent ; Ext . iterate ( o , function ( key , item ) { empty = Ext . isEmpty ( item ) ; Ext . each ( empty ? key : item , function ( val ) { buf . push ( "&" , e ( key ) , "=" , ( ! Ext . isEmpty ( val ) && ( val != key || ! empty ) ) ? ( Ext . isDate ( val ) ? Ext . encode ( val ) . replace ( /"/g , "" ) : e ( val ) ) : "" ) } ) } ) ; if ( ! pre ) { buf . shift ( ) ; pre = "" } return pre + buf . join ( "" ) } , urlDecode : function ( string , overwrite ) { if ( Ext . isEmpty ( string ) ) { return { } } var obj = { } , pairs = string . split ( "&" ) , d = decodeURIComponent , name , value ; Ext . each ( pairs , function ( pair ) { pair = pair . split ( "=" ) ; name = d ( pair [ 0 ] ) ; value = d ( pair [ 1 ] ) ; obj [ name ] = overwrite || ! obj [ name ] ? value : [ ] . concat ( obj [ name ] ) . concat ( value ) } ) ; return obj } , urlAppend : function ( url , s ) { if ( ! Ext . isEmpty ( s ) ) { return url + ( url . indexOf ( "?" ) === - 1 ? "?" : "&" ) + s } return url } , toArray : function ( ) { return isIE ? function ( a , i , j , res ) { res = [ ] ; for ( var x = 0 , len = a . length ; x < len ; x ++ ) { res . push ( a [ x ] ) } return res . slice ( i || 0 , j || res . length ) } : function ( a , i , j ) { return Array . prototype . slice . call ( a , i || 0 , j || a . length ) } } ( ) , isIterable : function ( v ) { if ( Ext . isArray ( v ) || v . callee ) { return true } if ( /NodeList|HTMLCollection/ . test ( toString . call ( v ) ) ) { return true } return ( ( typeof v . nextNode != "undefined" || v . item ) && Ext . isNumber ( v . length ) ) } , each : function ( array , fn , scope ) { if ( Ext . isEmpty ( array , true ) ) { return } if ( ! Ext . isIterable ( array ) || Ext . isPrimitive ( array ) ) { array = [ array ] } for ( var i = 0 , len = array . length ; i < len ; i ++ ) { if ( fn . call ( scope || array [ i ] , array [ i ] , i , array ) === false ) { return i } } } , iterate : function ( obj , fn , scope ) { if ( Ext . isEmpty ( obj ) ) { return } if ( Ext . isIterable ( obj ) ) { Ext . each ( obj , fn , scope ) ; return } else { i
/ *
* Ext JS Library 3.2 . 1
* Copyright ( c ) 2006 - 2010 Ext JS , Inc .
* licensing @ extjs . com
* http : //www.extjs.com/license
* /
Ext . DomHelper = function ( ) { var tempTableEl = null , emptyTags = /^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i , tableRe = /^table|tbody|tr|td$/i , confRe = /tag|children|cn|html$/i , tableElRe = /td|tr|tbody/i , cssRe = /([a-z0-9-]+)\s*:\s*([^;\s]+(?:\s*[^;\s]+)*);?/gi , endRe = /end/i , pub , afterbegin = "afterbegin" , afterend = "afterend" , beforebegin = "beforebegin" , beforeend = "beforeend" , ts = "<table>" , te = "</table>" , tbs = ts + "<tbody>" , tbe = "</tbody>" + te , trs = tbs + "<tr>" , tre = "</tr>" + tbe ; function doInsert ( el , o , returnElement , pos , sibling , append ) { var newNode = pub . insertHtml ( pos , Ext . getDom ( el ) , createHtml ( o ) ) ; return returnElement ? Ext . get ( newNode , true ) : newNode } function createHtml ( o ) { var b = "" , attr , val , key , keyVal , cn ; if ( typeof o == "string" ) { b = o } else { if ( Ext . isArray ( o ) ) { for ( var i = 0 ; i < o . length ; i ++ ) { if ( o [ i ] ) { b += createHtml ( o [ i ] ) } } } else { b += "<" + ( o . tag = o . tag || "div" ) ; for ( attr in o ) { val = o [ attr ] ; if ( ! confRe . test ( attr ) ) { if ( typeof val == "object" ) { b += " " + attr + '="' ; for ( key in val ) { b += key + ":" + val [ key ] + ";" } b += '"' } else { b += " " + ( { cls : "class" , htmlFor : "for" } [ attr ] || attr ) + '="' + val + '"' } } } if ( emptyTags . test ( o . tag ) ) { b += "/>" } else { b += ">" ; if ( ( cn = o . children || o . cn ) ) { b += createHtml ( cn ) } else { if ( o . html ) { b += o . html } } b += "</" + o . tag + ">" } } } return b } function ieTable ( depth , s , h , e ) { tempTableEl . innerHTML = [ s , h , e ] . join ( "" ) ; var i = - 1 , el = tempTableEl , ns ; while ( ++ i < depth ) { el = el . firstChild } if ( ns = el . nextSibling ) { var df = document . createDocumentFragment ( ) ; while ( el ) { ns = el . nextSibling ; df . appendChild ( el ) ; el = ns } el = df } return el } function insertIntoTable ( tag , where , el , html ) { var node , before ; tempTableEl = tempTableEl || document . createElement ( "div" ) ; if ( tag == "td" && ( where == afterbegin || where == beforeend ) || ! tableElRe . test ( tag ) && ( where == beforebegin || where == afterend ) ) { return } before = where == beforebegin ? el : where == afterend ? el . nextSibling : where == afterbegin ? el . firstChild : null ; if ( where == beforebegin || where == afterend ) { el = el . parentNode } if ( tag == "td" || ( tag == "tr" && ( where == beforeend || where == afterbegin ) ) ) { node = ieTable ( 4 , trs , html , tre ) } else { if ( ( tag == "tbody" && ( where == beforeend || where == afterbegin ) ) || ( tag == "tr" && ( where == beforebegin || where == afterend ) ) ) { node = ieTable ( 3 , tbs , html , tbe ) } else { node = ieTable ( 2 , ts , html , te ) } } el . insertBefore ( node , before ) ; return node } pub = { markup : function ( o ) { return createHtml ( o ) } , applyStyles : function ( el , styles ) { if ( styles ) { var i = 0 , len , style , matches ; el = Ext . fly ( el ) ; if ( typeof styles == "function" ) { styles = styles . call ( ) } if ( typeof styles == "string" ) { while ( ( matches = cssRe . exec ( styles ) ) ) { el . setStyle ( matches [ 1 ] , matches [ 2 ] ) } } else { if ( typeof styles == "object" ) { el . setStyle ( styles ) } } } } , insertHtml : function ( where , el , html ) { var hash = { } , hashVal , setStart , range , frag , rangeEl , rs ; where = where . toLowerCase ( ) ; hash [ beforebegin ] = [ "BeforeBegin" , "previousSibling" ] ; hash [ afterend ] = [ "AfterEnd" , "nextSibling" ] ; if ( el . insertAdjacentHTML ) { if ( tableRe . test ( el . tagName ) && ( rs = insertIntoTable ( el . tagName . toLowerCase ( ) , where , el , html ) ) ) { return rs } hash [ afterbegin ] = [ "AfterBegin" , "firstChild" ] ; hash [ beforeend ] = [ "BeforeEnd" , "lastChild" ] ; if ( ( hashVal = hash [ where ] ) ) { el . insertAdjacentHTML ( hashVal [ 0 ] , html ) ; return el [ hashVal [ 1 ] ] } } else { range = el . ownerDocument . createRange ( ) ; setStart = "setStart" + ( endRe . test ( where ) ? "After" : "Before" ) ; if ( hash [ where ] ) { range [ setStart ] ( el ) ; frag = range . createContextualFragment ( html ) ; el . parentNode . insertBefore ( frag , where == beforebegin ? el : el . nextSibling ) ; return el [ ( where == beforebegin ? "previous" : "next" ) + "Sibling" ] } else { rangeEl = ( where == afterbegin ? "first" : "last" ) + "Child" ; if ( el . firstChild ) { range [ setStart ] ( el [ rangeEl ] ) ; frag = range . createContextualFragment ( html ) ; if ( where == afterbegin ) { el . insertBefore ( frag , el . firstChild ) } else { el . appendChild ( frag ) } } else { el . innerHTML = html } return el [ rangeEl ] } } throw 'Illegal insertion point -> "' + where + '"' } , insertBefore : function ( el , o , returnElement ) { return doInsert ( el , o , returnElement , beforebegin ) } , insertAfter : function ( el , o , returnElement ) { return doInsert ( el , o , returnElement , afterend , "nextSibling" ) } , insertFirst : function ( el , o , returnElement ) { return doInsert ( el , o , returnElement , afterbegin , "firstChild" ) } , append : function ( el , o , returnElement ) { return doInsert ( el , o , returnElement , beforeend , "" , true ) } , overwrite : function ( el , o , returnElement ) { el = Ext . getDom ( el ) ; el . innerHTML = create
/ *
* Ext JS Library 3.2 . 1
* Copyright ( c ) 2006 - 2010 Ext JS , Inc .
* licensing @ extjs . com
* http : //www.extjs.com/license
* /
Ext . ComponentMgr = function ( ) { var all = new Ext . util . MixedCollection ( ) ; var types = { } ; var ptypes = { } ; return { register : function ( c ) { all . add ( c ) } , unregister : function ( c ) { all . remove ( c ) } , get : function ( id ) { return all . get ( id ) } , onAvailable : function ( id , fn , scope ) { all . on ( "add" , function ( index , o ) { if ( o . id == id ) { fn . call ( scope || o , o ) ; all . un ( "add" , fn , scope ) } } ) } , all : all , types : types , ptypes : ptypes , isRegistered : function ( xtype ) { return types [ xtype ] !== undefined } , isPluginRegistered : function ( ptype ) { return ptypes [ ptype ] !== undefined } , registerType : function ( xtype , cls ) { types [ xtype ] = cls ; cls . xtype = xtype } , create : function ( config , defaultType ) { return config . render ? config : new types [ config . xtype || defaultType ] ( config ) } , registerPlugin : function ( ptype , cls ) { ptypes [ ptype ] = cls ; cls . ptype = ptype } , createPlugin : function ( config , defaultType ) { var PluginCls = ptypes [ config . ptype || defaultType ] ; if ( PluginCls . init ) { return PluginCls } else { return new PluginCls ( config ) } } } } ( ) ; Ext . reg = Ext . ComponentMgr . registerType ; Ext . preg = Ext . ComponentMgr . registerPlugin ; Ext . create = Ext . ComponentMgr . create ; Ext . Component = function ( config ) { config = config || { } ; if ( config . initialConfig ) { if ( config . isAction ) { this . baseAction = config } config = config . initialConfig } else { if ( config . tagName || config . dom || Ext . isString ( config ) ) { config = { applyTo : config , id : config . id || config } } } this . initialConfig = config ; Ext . apply ( this , config ) ; this . addEvents ( "added" , "disable" , "enable" , "beforeshow" , "show" , "beforehide" , "hide" , "removed" , "beforerender" , "render" , "afterrender" , "beforedestroy" , "destroy" , "beforestaterestore" , "staterestore" , "beforestatesave" , "statesave" ) ; this . getId ( ) ; Ext . ComponentMgr . register ( this ) ; Ext . Component . superclass . constructor . call ( this ) ; if ( this . baseAction ) { this . baseAction . addComponent ( this ) } this . initComponent ( ) ; if ( this . plugins ) { if ( Ext . isArray ( this . plugins ) ) { for ( var i = 0 , len = this . plugins . length ; i < len ; i ++ ) { this . plugins [ i ] = this . initPlugin ( this . plugins [ i ] ) } } else { this . plugins = this . initPlugin ( this . plugins ) } } if ( this . stateful !== false ) { this . initState ( ) } if ( this . applyTo ) { this . applyToMarkup ( this . applyTo ) ; delete this . applyTo } else { if ( this . renderTo ) { this . render ( this . renderTo ) ; delete this . renderTo } } } ; Ext . Component . AUTO _ID = 1000 ; Ext . extend ( Ext . Component , Ext . util . Observable , { disabled : false , hidden : false , autoEl : "div" , disabledClass : "x-item-disabled" , allowDomMove : true , autoShow : false , hideMode : "display" , hideParent : false , rendered : false , tplWriteMode : "overwrite" , bubbleEvents : [ ] , ctype : "Ext.Component" , actionMode : "el" , getActionEl : function ( ) { return this [ this . actionMode ] } , initPlugin : function ( p ) { if ( p . ptype && ! Ext . isFunction ( p . init ) ) { p = Ext . ComponentMgr . createPlugin ( p ) } else { if ( Ext . isString ( p ) ) { p = Ext . ComponentMgr . createPlugin ( { ptype : p } ) } } p . init ( this ) ; return p } , initComponent : function ( ) { if ( this . listeners ) { this . on ( this . listeners ) ; delete this . listeners } this . enableBubble ( this . bubbleEvents ) } , render : function ( container , position ) { if ( ! this . rendered && this . fireEvent ( "beforerender" , this ) !== false ) { if ( ! container && this . el ) { this . el = Ext . get ( this . el ) ; container = this . el . dom . parentNode ; this . allowDomMove = false } this . container = Ext . get ( container ) ; if ( this . ctCls ) { this . container . addClass ( this . ctCls ) } this . rendered = true ; if ( position !== undefined ) { if ( Ext . isNumber ( position ) ) { position = this . container . dom . childNodes [ position ] } else { position = Ext . getDom ( position ) } } this . onRender ( this . container , position || null ) ; if ( this . autoShow ) { this . el . removeClass ( [ "x-hidden" , "x-hide-" + this . hideMode ] ) } if ( this . cls ) { this . el . addClass ( this . cls ) ; delete this . cls } if ( this . style ) { this . el . applyStyles ( this . style ) ; delete this . style } if ( this . overCls ) { this . el . addClassOnOver ( this . overCls ) } this . fireEvent ( "render" , this ) ; var contentTarget = this . getContentTarget ( ) ; if ( this . html ) { contentTarget . update ( Ext . DomHelper . markup ( this . html ) ) ; delete this . html } if ( this . contentEl ) { var ce = Ext . getDom ( this . contentEl ) ; Ext . fly ( ce ) . removeClass ( [ "x-hidden" , "x-hide-display" ] ) ; contentTarget . appendChild ( ce ) } if ( this . tpl ) { if ( ! this . tpl . compile ) { this . tpl = new Ext . XTemplate ( this . tpl ) } if ( this . data ) { this . tpl [ this . tplWriteMode ] ( contentTarget , this . data ) ; delete this . data } } this . afterRender ( this . container ) ; if ( this . hidden ) { this . doHide ( ) } if ( this . disabled ) { this . disable ( true ) } if ( this . stateful !== false ) { t
/ *
* Ext JS Library 3.2 . 1
* Copyright ( c ) 2006 - 2010 Ext JS , Inc .
* licensing @ extjs . com
* http : //www.extjs.com/license
* /
( function ( ) { var Event = Ext . EventManager ; var Dom = Ext . lib . Dom ; Ext . dd . DragDrop = function ( id , sGroup , config ) { if ( id ) { this . init ( id , sGroup , config ) } } ; Ext . dd . DragDrop . prototype = { id : null , config : null , dragElId : null , handleElId : null , invalidHandleTypes : null , invalidHandleIds : null , invalidHandleClasses : null , startPageX : 0 , startPageY : 0 , groups : null , locked : false , lock : function ( ) { this . locked = true } , moveOnly : false , unlock : function ( ) { this . locked = false } , isTarget : true , padding : null , _domRef : null , _ _ygDragDrop : true , constrainX : false , constrainY : false , minX : 0 , maxX : 0 , minY : 0 , maxY : 0 , maintainOffset : false , xTicks : null , yTicks : null , primaryButtonOnly : true , available : false , hasOuterHandles : false , b4StartDrag : function ( x , y ) { } , startDrag : function ( x , y ) { } , b4Drag : function ( e ) { } , onDrag : function ( e ) { } , onDragEnter : function ( e , id ) { } , b4DragOver : function ( e ) { } , onDragOver : function ( e , id ) { } , b4DragOut : function ( e ) { } , onDragOut : function ( e , id ) { } , b4DragDrop : function ( e ) { } , onDragDrop : function ( e , id ) { } , onInvalidDrop : function ( e ) { } , b4EndDrag : function ( e ) { } , endDrag : function ( e ) { } , b4MouseDown : function ( e ) { } , onMouseDown : function ( e ) { } , onMouseUp : function ( e ) { } , onAvailable : function ( ) { } , defaultPadding : { left : 0 , right : 0 , top : 0 , bottom : 0 } , constrainTo : function ( constrainTo , pad , inContent ) { if ( Ext . isNumber ( pad ) ) { pad = { left : pad , right : pad , top : pad , bottom : pad } } pad = pad || this . defaultPadding ; var b = Ext . get ( this . getEl ( ) ) . getBox ( ) , ce = Ext . get ( constrainTo ) , s = ce . getScroll ( ) , c , cd = ce . dom ; if ( cd == document . body ) { c = { x : s . left , y : s . top , width : Ext . lib . Dom . getViewWidth ( ) , height : Ext . lib . Dom . getViewHeight ( ) } } else { var xy = ce . getXY ( ) ; c = { x : xy [ 0 ] , y : xy [ 1 ] , width : cd . clientWidth , height : cd . clientHeight } } var topSpace = b . y - c . y , leftSpace = b . x - c . x ; this . resetConstraints ( ) ; this . setXConstraint ( leftSpace - ( pad . left || 0 ) , c . width - leftSpace - b . width - ( pad . right || 0 ) , this . xTickSize ) ; this . setYConstraint ( topSpace - ( pad . top || 0 ) , c . height - topSpace - b . height - ( pad . bottom || 0 ) , this . yTickSize ) } , getEl : function ( ) { if ( ! this . _domRef ) { this . _domRef = Ext . getDom ( this . id ) } return this . _domRef } , getDragEl : function ( ) { return Ext . getDom ( this . dragElId ) } , init : function ( id , sGroup , config ) { this . initTarget ( id , sGroup , config ) ; Event . on ( this . id , "mousedown" , this . handleMouseDown , this ) } , initTarget : function ( id , sGroup , config ) { this . config = config || { } ; this . DDM = Ext . dd . DDM ; this . groups = { } ; if ( typeof id !== "string" ) { id = Ext . id ( id ) } this . id = id ; this . addToGroup ( ( sGroup ) ? sGroup : "default" ) ; this . handleElId = id ; this . setDragElId ( id ) ; this . invalidHandleTypes = { A : "A" } ; this . invalidHandleIds = { } ; this . invalidHandleClasses = [ ] ; this . applyConfig ( ) ; this . handleOnAvailable ( ) } , applyConfig : function ( ) { this . padding = this . config . padding || [ 0 , 0 , 0 , 0 ] ; this . isTarget = ( this . config . isTarget !== false ) ; this . maintainOffset = ( this . config . maintainOffset ) ; this . primaryButtonOnly = ( this . config . primaryButtonOnly !== false ) } , handleOnAvailable : function ( ) { this . available = true ; this . resetConstraints ( ) ; this . onAvailable ( ) } , setPadding : function ( iTop , iRight , iBot , iLeft ) { if ( ! iRight && 0 !== iRight ) { this . padding = [ iTop , iTop , iTop , iTop ] } else { if ( ! iBot && 0 !== iBot ) { this . padding = [ iTop , iRight , iTop , iRight ] } else { this . padding = [ iTop , iRight , iBot , iLeft ] } } } , setInitPosition : function ( diffX , diffY ) { var el = this . getEl ( ) ; if ( ! this . DDM . verifyEl ( el ) ) { return } var dx = diffX || 0 ; var dy = diffY || 0 ; var p = Dom . getXY ( el ) ; this . initPageX = p [ 0 ] - dx ; this . initPageY = p [ 1 ] - dy ; this . lastPageX = p [ 0 ] ; this . lastPageY = p [ 1 ] ; this . setStartPosition ( p ) } , setStartPosition : function ( pos ) { var p = pos || Dom . getXY ( this . getEl ( ) ) ; this . deltaSetXY = null ; this . startPageX = p [ 0 ] ; this . startPageY = p [ 1 ] } , addToGroup : function ( sGroup ) { this . groups [ sGroup ] = true ; this . DDM . regDragDrop ( this , sGroup ) } , removeFromGroup : function ( sGroup ) { if ( this . groups [ sGroup ] ) { delete this . groups [ sGroup ] } this . DDM . removeDDFromGroup ( this , sGroup ) } , setDragElId : function ( id ) { this . dragElId = id } , setHandleElId : function ( id ) { if ( typeof id !== "string" ) { id = Ext . id ( id ) } this . handleElId = id ; this . DDM . regHandle ( this . id , id ) } , setOuterHandleElId : function ( id ) { if ( typeof id !== "string" ) { id = Ext . id ( id ) } Event . on ( id , "mousedown" , this . handleMouseDown , this ) ; this . setHandleElId ( id ) ; this . hasOuterHandles = true } , unreg : function ( ) { Event . un ( this . id , "mousedown" , this . handleMouseDown ) ; this . _domRef = null ; this . DDM . _remove ( this ) } , destroy : function ( ) { this . unreg ( ) } , isLocked : fu
/ *
* Ext JS Library 3.2 . 1
* Copyright ( c ) 2006 - 2010 Ext JS , Inc .
* licensing @ extjs . com
* http : //www.extjs.com/license
* /
Ext . Window = Ext . extend ( Ext . Panel , { baseCls : "x-window" , resizable : true , draggable : true , closable : true , closeAction : "close" , constrain : false , constrainHeader : false , plain : false , minimizable : false , maximizable : false , minHeight : 100 , minWidth : 200 , expandOnShow : true , collapsible : false , initHidden : undefined , hidden : true , elements : "header,body" , frame : true , floating : true , initComponent : function ( ) { this . initTools ( ) ; Ext . Window . superclass . initComponent . call ( this ) ; this . addEvents ( "resize" , "maximize" , "minimize" , "restore" ) ; if ( Ext . isDefined ( this . initHidden ) ) { this . hidden = this . initHidden } if ( this . hidden === false ) { this . hidden = true ; this . show ( ) } } , getState : function ( ) { return Ext . apply ( Ext . Window . superclass . getState . call ( this ) || { } , this . getBox ( true ) ) } , onRender : function ( ct , position ) { Ext . Window . superclass . onRender . call ( this , ct , position ) ; if ( this . plain ) { this . el . addClass ( "x-window-plain" ) } this . focusEl = this . el . createChild ( { tag : "a" , href : "#" , cls : "x-dlg-focus" , tabIndex : "-1" , html : " " } ) ; this . focusEl . swallowEvent ( "click" , true ) ; this . proxy = this . el . createProxy ( "x-window-proxy" ) ; this . proxy . enableDisplayMode ( "block" ) ; if ( this . modal ) { this . mask = this . container . createChild ( { cls : "ext-el-mask" } , this . el . dom ) ; this . mask . enableDisplayMode ( "block" ) ; this . mask . hide ( ) ; this . mon ( this . mask , "click" , this . focus , this ) } if ( this . maximizable ) { this . mon ( this . header , "dblclick" , this . toggleMaximize , this ) } } , initEvents : function ( ) { Ext . Window . superclass . initEvents . call ( this ) ; if ( this . animateTarget ) { this . setAnimateTarget ( this . animateTarget ) } if ( this . resizable ) { this . resizer = new Ext . Resizable ( this . el , { minWidth : this . minWidth , minHeight : this . minHeight , handles : this . resizeHandles || "all" , pinned : true , resizeElement : this . resizerAction , handleCls : "x-window-handle" } ) ; this . resizer . window = this ; this . mon ( this . resizer , "beforeresize" , this . beforeResize , this ) } if ( this . draggable ) { this . header . addClass ( "x-window-draggable" ) } this . mon ( this . el , "mousedown" , this . toFront , this ) ; this . manager = this . manager || Ext . WindowMgr ; this . manager . register ( this ) ; if ( this . maximized ) { this . maximized = false ; this . maximize ( ) } if ( this . closable ) { var km = this . getKeyMap ( ) ; km . on ( 27 , this . onEsc , this ) ; km . disable ( ) } } , initDraggable : function ( ) { this . dd = new Ext . Window . DD ( this ) } , onEsc : function ( k , e ) { e . stopEvent ( ) ; this [ this . closeAction ] ( ) } , beforeDestroy : function ( ) { if ( this . rendered ) { this . hide ( ) ; this . clearAnchor ( ) ; Ext . destroy ( this . focusEl , this . resizer , this . dd , this . proxy , this . mask ) } Ext . Window . superclass . beforeDestroy . call ( this ) } , onDestroy : function ( ) { if ( this . manager ) { this . manager . unregister ( this ) } Ext . Window . superclass . onDestroy . call ( this ) } , initTools : function ( ) { if ( this . minimizable ) { this . addTool ( { id : "minimize" , handler : this . minimize . createDelegate ( this , [ ] ) } ) } if ( this . maximizable ) { this . addTool ( { id : "maximize" , handler : this . maximize . createDelegate ( this , [ ] ) } ) ; this . addTool ( { id : "restore" , handler : this . restore . createDelegate ( this , [ ] ) , hidden : true } ) } if ( this . closable ) { this . addTool ( { id : "close" , handler : this [ this . closeAction ] . createDelegate ( this , [ ] ) } ) } } , resizerAction : function ( ) { var box = this . proxy . getBox ( ) ; this . proxy . hide ( ) ; this . window . handleResize ( box ) ; return box } , beforeResize : function ( ) { this . resizer . minHeight = Math . max ( this . minHeight , this . getFrameHeight ( ) + 40 ) ; this . resizer . minWidth = Math . max ( this . minWidth , this . getFrameWidth ( ) + 40 ) ; this . resizeBox = this . el . getBox ( ) } , updateHandles : function ( ) { if ( Ext . isIE && this . resizer ) { this . resizer . syncHandleHeight ( ) ; this . el . repaint ( ) } } , handleResize : function ( box ) { var rz = this . resizeBox ; if ( rz . x != box . x || rz . y != box . y ) { this . updateBox ( box ) } else { this . setSize ( box ) ; if ( Ext . isIE6 && Ext . isStrict ) { this . doLayout ( ) } } this . focus ( ) ; this . updateHandles ( ) ; this . saveState ( ) } , focus : function ( ) { var f = this . focusEl , db = this . defaultButton , t = typeof db , el , ct ; if ( Ext . isDefined ( db ) ) { if ( Ext . isNumber ( db ) && this . fbar ) { f = this . fbar . items . get ( db ) } else { if ( Ext . isString ( db ) ) { f = Ext . getCmp ( db ) } else { f = db } } el = f . getEl ( ) ; ct = Ext . getDom ( this . container ) ; if ( el && ct ) { if ( ! Ext . lib . Region . getRegion ( ct ) . contains ( Ext . lib . Region . getRegion ( el . dom ) ) ) { return } } } f = f || this . focusEl ; f . focus . defer ( 10 , f ) } , setAnimateTarget : function ( el ) { el = Ext . get ( el ) ; this . animateTarget = el } , beforeShow : function ( ) { delete this . el . lastXY ; delete this . el . lastLT ; if ( this . x === undefined || th
/ *
* Ext JS Library 3.2 . 1
* Copyright ( c ) 2006 - 2010 Ext JS , Inc .
* licensing @ extjs . com
* http : //www.extjs.com/license
* /
Ext . Button = Ext . extend ( Ext . BoxComponent , { hidden : false , disabled : false , pressed : false , enableToggle : false , menuAlign : "tl-bl?" , type : "button" , menuClassTarget : "tr:nth(2)" , clickEvent : "click" , handleMouseEvents : true , tooltipType : "qtip" , buttonSelector : "button:first-child" , scale : "small" , iconAlign : "left" , arrowAlign : "right" , initComponent : function ( ) { Ext . Button . superclass . initComponent . call ( this ) ; this . addEvents ( "click" , "toggle" , "mouseover" , "mouseout" , "menushow" , "menuhide" , "menutriggerover" , "menutriggerout" ) ; if ( this . menu ) { this . menu = Ext . menu . MenuMgr . get ( this . menu ) } if ( Ext . isString ( this . toggleGroup ) ) { this . enableToggle = true } } , getTemplateArgs : function ( ) { return [ this . type , "x-btn-" + this . scale + " x-btn-icon-" + this . scale + "-" + this . iconAlign , this . getMenuClass ( ) , this . cls , this . id ] } , setButtonClass : function ( ) { if ( this . useSetClass ) { if ( ! Ext . isEmpty ( this . oldCls ) ) { this . el . removeClass ( [ this . oldCls , "x-btn-pressed" ] ) } this . oldCls = ( this . iconCls || this . icon ) ? ( this . text ? "x-btn-text-icon" : "x-btn-icon" ) : "x-btn-noicon" ; this . el . addClass ( [ this . oldCls , this . pressed ? "x-btn-pressed" : null ] ) } } , getMenuClass : function ( ) { return this . menu ? ( this . arrowAlign != "bottom" ? "x-btn-arrow" : "x-btn-arrow-bottom" ) : "" } , onRender : function ( ct , position ) { if ( ! this . template ) { if ( ! Ext . Button . buttonTemplate ) { Ext . Button . buttonTemplate = new Ext . Template ( '<table id="{4}" cellspacing="0" class="x-btn {3}"><tbody class="{1}">' , '<tr><td class="x-btn-tl"><i> </i></td><td class="x-btn-tc"></td><td class="x-btn-tr"><i> </i></td></tr>' , '<tr><td class="x-btn-ml"><i> </i></td><td class="x-btn-mc"><em class="{2}" unselectable="on"><button type="{0}"></button></em></td><td class="x-btn-mr"><i> </i></td></tr>' , '<tr><td class="x-btn-bl"><i> </i></td><td class="x-btn-bc"></td><td class="x-btn-br"><i> </i></td></tr>' , "</tbody></table>" ) ; Ext . Button . buttonTemplate . compile ( ) } this . template = Ext . Button . buttonTemplate } var btn , targs = this . getTemplateArgs ( ) ; if ( position ) { btn = this . template . insertBefore ( position , targs , true ) } else { btn = this . template . append ( ct , targs , true ) } this . btnEl = btn . child ( this . buttonSelector ) ; this . mon ( this . btnEl , { scope : this , focus : this . onFocus , blur : this . onBlur } ) ; this . initButtonEl ( btn , this . btnEl ) ; Ext . ButtonToggleMgr . register ( this ) } , initButtonEl : function ( btn , btnEl ) { this . el = btn ; this . setIcon ( this . icon ) ; this . setText ( this . text ) ; this . setIconClass ( this . iconCls ) ; if ( Ext . isDefined ( this . tabIndex ) ) { btnEl . dom . tabIndex = this . tabIndex } if ( this . tooltip ) { this . setTooltip ( this . tooltip , true ) } if ( this . handleMouseEvents ) { this . mon ( btn , { scope : this , mouseover : this . onMouseOver , mousedown : this . onMouseDown } ) } if ( this . menu ) { this . mon ( this . menu , { scope : this , show : this . onMenuShow , hide : this . onMenuHide } ) } if ( this . repeat ) { var repeater = new Ext . util . ClickRepeater ( btn , Ext . isObject ( this . repeat ) ? this . repeat : { } ) ; this . mon ( repeater , "click" , this . onClick , this ) } this . mon ( btn , this . clickEvent , this . onClick , this ) } , afterRender : function ( ) { Ext . Button . superclass . afterRender . call ( this ) ; this . useSetClass = true ; this . setButtonClass ( ) ; this . doc = Ext . getDoc ( ) ; this . doAutoWidth ( ) } , setIconClass : function ( cls ) { this . iconCls = cls ; if ( this . el ) { this . btnEl . dom . className = "" ; this . btnEl . addClass ( [ "x-btn-text" , cls || "" ] ) ; this . setButtonClass ( ) } return this } , setTooltip : function ( tooltip , initial ) { if ( this . rendered ) { if ( ! initial ) { this . clearTip ( ) } if ( Ext . isObject ( tooltip ) ) { Ext . QuickTips . register ( Ext . apply ( { target : this . btnEl . id } , tooltip ) ) ; this . tooltip = tooltip } else { this . btnEl . dom [ this . tooltipType ] = tooltip } } else { this . tooltip = tooltip } return this } , clearTip : function ( ) { if ( Ext . isObject ( this . tooltip ) ) { Ext . QuickTips . unregister ( this . btnEl ) } } , beforeDestroy : function ( ) { if ( this . rendered ) { this . clearTip ( ) } if ( this . menu && this . destroyMenu !== false ) { Ext . destroy ( this . menu ) } Ext . destroy ( this . repeater ) } , onDestroy : function ( ) { if ( this . rendered ) { this . doc . un ( "mouseover" , this . monitorMouseOver , this ) ; this . doc . un ( "mouseup" , this . onMouseUp , this ) ; delete this . doc ; delete this . btnEl ; Ext . ButtonToggleMgr . unregister ( this ) } Ext . Button . superclass . onDestroy . call ( this ) } , doAutoWidth : function ( ) { if ( this . autoWidth !== false && this . el && this . text && this . width === undefined ) { this . el . setWidth ( "auto" ) ; if ( Ext . isIE7 && Ext . isStrict ) { var ib = this . btnEl ; if ( ib && ib . g
/ *
* Ext JS Library 3.2 . 1
* Copyright ( c ) 2006 - 2010 Ext JS , Inc .
* licensing @ extjs . com
* http : //www.extjs.com/license
* /
Ext . TabPanel = Ext . extend ( Ext . Panel , { deferredRender : true , tabWidth : 120 , minTabWidth : 30 , resizeTabs : false , enableTabScroll : false , scrollIncrement : 0 , scrollRepeatInterval : 400 , scrollDuration : 0.35 , animScroll : true , tabPosition : "top" , baseCls : "x-tab-panel" , autoTabs : false , autoTabSelector : "div.x-tab" , activeTab : undefined , tabMargin : 2 , plain : false , wheelIncrement : 20 , idDelimiter : "__" , itemCls : "x-tab-item" , elements : "body" , headerAsText : false , frame : false , hideBorders : true , initComponent : function ( ) { this . frame = false ; Ext . TabPanel . superclass . initComponent . call ( this ) ; this . addEvents ( "beforetabchange" , "tabchange" , "contextmenu" ) ; this . setLayout ( new Ext . layout . CardLayout ( Ext . apply ( { layoutOnCardChange : this . layoutOnTabChange , deferredRender : this . deferredRender } , this . layoutConfig ) ) ) ; if ( this . tabPosition == "top" ) { this . elements += ",header" ; this . stripTarget = "header" } else { this . elements += ",footer" ; this . stripTarget = "footer" } if ( ! this . stack ) { this . stack = Ext . TabPanel . AccessStack ( ) } this . initItems ( ) } , onRender : function ( ct , position ) { Ext . TabPanel . superclass . onRender . call ( this , ct , position ) ; if ( this . plain ) { var pos = this . tabPosition == "top" ? "header" : "footer" ; this [ pos ] . addClass ( "x-tab-panel-" + pos + "-plain" ) } var st = this [ this . stripTarget ] ; this . stripWrap = st . createChild ( { cls : "x-tab-strip-wrap" , cn : { tag : "ul" , cls : "x-tab-strip x-tab-strip-" + this . tabPosition } } ) ; var beforeEl = ( this . tabPosition == "bottom" ? this . stripWrap : null ) ; st . createChild ( { cls : "x-tab-strip-spacer" } , beforeEl ) ; this . strip = new Ext . Element ( this . stripWrap . dom . firstChild ) ; this . edge = this . strip . createChild ( { tag : "li" , cls : "x-tab-edge" , cn : [ { tag : "span" , cls : "x-tab-strip-text" , cn : " " } ] } ) ; this . strip . createChild ( { cls : "x-clear" } ) ; this . body . addClass ( "x-tab-panel-body-" + this . tabPosition ) ; if ( ! this . itemTpl ) { var tt = new Ext . Template ( '<li class="{cls}" id="{id}"><a class="x-tab-strip-close"></a>' , '<a class="x-tab-right" href="#"><em class="x-tab-left">' , '<span class="x-tab-strip-inner"><span class="x-tab-strip-text {iconCls}">{text}</span></span>' , "</em></a></li>" ) ; tt . disableFormats = true ; tt . compile ( ) ; Ext . TabPanel . prototype . itemTpl = tt } this . items . each ( this . initTab , this ) } , afterRender : function ( ) { Ext . TabPanel . superclass . afterRender . call ( this ) ; if ( this . autoTabs ) { this . readTabs ( false ) } if ( this . activeTab !== undefined ) { var item = Ext . isObject ( this . activeTab ) ? this . activeTab : this . items . get ( this . activeTab ) ; delete this . activeTab ; this . setActiveTab ( item ) } } , initEvents : function ( ) { Ext . TabPanel . superclass . initEvents . call ( this ) ; this . mon ( this . strip , { scope : this , mousedown : this . onStripMouseDown , contextmenu : this . onStripContextMenu } ) ; if ( this . enableTabScroll ) { this . mon ( this . strip , "mousewheel" , this . onWheel , this ) } } , findTargets : function ( e ) { var item = null , itemEl = e . getTarget ( "li:not(.x-tab-edge)" , this . strip ) ; if ( itemEl ) { item = this . getComponent ( itemEl . id . split ( this . idDelimiter ) [ 1 ] ) ; if ( item . disabled ) { return { close : null , item : null , el : null } } } return { close : e . getTarget ( ".x-tab-strip-close" , this . strip ) , item : item , el : itemEl } } , onStripMouseDown : function ( e ) { if ( e . button !== 0 ) { return } e . preventDefault ( ) ; var t = this . findTargets ( e ) ; if ( t . close ) { if ( t . item . fireEvent ( "beforeclose" , t . item ) !== false ) { t . item . fireEvent ( "close" , t . item ) ; this . remove ( t . item ) } return } if ( t . item && t . item != this . activeTab ) { this . setActiveTab ( t . item ) } } , onStripContextMenu : function ( e ) { e . preventDefault ( ) ; var t = this . findTargets ( e ) ; if ( t . item ) { this . fireEvent ( "contextmenu" , this , t . item , e ) } } , readTabs : function ( removeExisting ) { if ( removeExisting === true ) { this . items . each ( function ( item ) { this . remove ( item ) } , this ) } var tabs = this . el . query ( this . autoTabSelector ) ; for ( var i = 0 , len = tabs . length ; i < len ; i ++ ) { var tab = tabs [ i ] , title = tab . getAttribute ( "title" ) ; tab . removeAttribute ( "title" ) ; this . add ( { title : title , contentEl : tab } ) } } , initTab : function ( item , index ) { var before = this . strip . dom . childNodes [ index ] , p = this . getTemplateArgs ( item ) , el = before ? this . itemTpl . insertBefore ( before , p ) : this . itemTpl . append ( this . strip , p ) , cls = "x-tab-strip-over" , tabEl = Ext . get ( el ) ; tabEl . hover ( function ( ) { if ( ! item . disabled ) { tabEl . addClass ( cls ) } } , function ( ) { tabEl . removeClass ( cls ) } ) ; if ( item . tabTip ) { tabEl . child ( "span.x-tab-strip-text" , true ) . qtip = item . tabTip } item . tabEl = el ; tabEl . select ( "a" ) . on ( "click" , function ( e ) { if ( ! e . getPageX (
/ *
* Ext JS Library 3.2 . 1
* Copyright ( c ) 2006 - 2010 Ext JS , Inc .
* licensing @ extjs . com
* http : //www.extjs.com/license
* /
Ext . Tip = Ext . extend ( Ext . Panel , { minWidth : 40 , maxWidth : 300 , shadow : "sides" , defaultAlign : "tl-bl?" , autoRender : true , quickShowInterval : 250 , frame : true , hidden : true , baseCls : "x-tip" , floating : { shadow : true , shim : true , useDisplay : true , constrain : false } , autoHeight : true , closeAction : "hide" , initComponent : function ( ) { Ext . Tip . superclass . initComponent . call ( this ) ; if ( this . closable && ! this . title ) { this . elements += ",header" } } , afterRender : function ( ) { Ext . Tip . superclass . afterRender . call ( this ) ; if ( this . closable ) { this . addTool ( { id : "close" , handler : this [ this . closeAction ] , scope : this } ) } } , showAt : function ( xy ) { Ext . Tip . superclass . show . call ( this ) ; if ( this . measureWidth !== false && ( ! this . initialConfig || typeof this . initialConfig . width != "number" ) ) { this . doAutoWidth ( ) } if ( this . constrainPosition ) { xy = this . el . adjustForConstraints ( xy ) } this . setPagePosition ( xy [ 0 ] , xy [ 1 ] ) } , doAutoWidth : function ( adjust ) { adjust = adjust || 0 ; var bw = this . body . getTextWidth ( ) ; if ( this . title ) { bw = Math . max ( bw , this . header . child ( "span" ) . getTextWidth ( this . title ) ) } bw += this . getFrameWidth ( ) + ( this . closable ? 20 : 0 ) + this . body . getPadding ( "lr" ) + adjust ; this . setWidth ( bw . constrain ( this . minWidth , this . maxWidth ) ) ; if ( Ext . isIE7 && ! this . repainted ) { this . el . repaint ( ) ; this . repainted = true } } , showBy : function ( el , pos ) { if ( ! this . rendered ) { this . render ( Ext . getBody ( ) ) } this . showAt ( this . el . getAlignToXY ( el , pos || this . defaultAlign ) ) } , initDraggable : function ( ) { this . dd = new Ext . Tip . DD ( this , typeof this . draggable == "boolean" ? null : this . draggable ) ; this . header . addClass ( "x-tip-draggable" ) } } ) ; Ext . reg ( "tip" , Ext . Tip ) ; Ext . Tip . DD = function ( tip , config ) { Ext . apply ( this , config ) ; this . tip = tip ; Ext . Tip . DD . superclass . constructor . call ( this , tip . el . id , "WindowDD-" + tip . id ) ; this . setHandleElId ( tip . header . id ) ; this . scroll = false } ; Ext . extend ( Ext . Tip . DD , Ext . dd . DD , { moveOnly : true , scroll : false , headerOffsets : [ 100 , 25 ] , startDrag : function ( ) { this . tip . el . disableShadow ( ) } , endDrag : function ( e ) { this . tip . el . enableShadow ( true ) } } ) ; Ext . ToolTip = Ext . extend ( Ext . Tip , { showDelay : 500 , hideDelay : 200 , dismissDelay : 5000 , trackMouse : false , anchorToTarget : true , anchorOffset : 0 , targetCounter : 0 , constrainPosition : false , initComponent : function ( ) { Ext . ToolTip . superclass . initComponent . call ( this ) ; this . lastActive = new Date ( ) ; this . initTarget ( this . target ) ; this . origAnchor = this . anchor } , onRender : function ( ct , position ) { Ext . ToolTip . superclass . onRender . call ( this , ct , position ) ; this . anchorCls = "x-tip-anchor-" + this . getAnchorPosition ( ) ; this . anchorEl = this . el . createChild ( { cls : "x-tip-anchor " + this . anchorCls } ) } , afterRender : function ( ) { Ext . ToolTip . superclass . afterRender . call ( this ) ; this . anchorEl . setStyle ( "z-index" , this . el . getZIndex ( ) + 1 ) } , initTarget : function ( target ) { var t ; if ( ( t = Ext . get ( target ) ) ) { if ( this . target ) { var tg = Ext . get ( this . target ) ; this . mun ( tg , "mouseover" , this . onTargetOver , this ) ; this . mun ( tg , "mouseout" , this . onTargetOut , this ) ; this . mun ( tg , "mousemove" , this . onMouseMove , this ) } this . mon ( t , { mouseover : this . onTargetOver , mouseout : this . onTargetOut , mousemove : this . onMouseMove , scope : this } ) ; this . target = t } if ( this . anchor ) { this . anchorTarget = this . target } } , onMouseMove : function ( e ) { var t = this . delegate ? e . getTarget ( this . delegate ) : this . triggerElement = true ; if ( t ) { this . targetXY = e . getXY ( ) ; if ( t === this . triggerElement ) { if ( ! this . hidden && this . trackMouse ) { this . setPagePosition ( this . getTargetXY ( ) ) } } else { this . hide ( ) ; this . lastActive = new Date ( 0 ) ; this . onTargetOver ( e ) } } else { if ( ! this . closable && this . isVisible ( ) ) { this . hide ( ) } } } , getTargetXY : function ( ) { if ( this . delegate ) { this . anchorTarget = this . triggerElement } if ( this . anchor ) { this . targetCounter ++ ; var offsets = this . getOffsets ( ) , xy = ( this . anchorToTarget && ! this . trackMouse ) ? this . el . getAlignToXY ( this . anchorTarget , this . getAnchorAlign ( ) ) : this . targetXY , dw = Ext . lib . Dom . getViewWidth ( ) - 5 , dh = Ext . lib . Dom . getViewHeight ( ) - 5 , de = document . documentElement , bd = document . body , scrollX = ( de . scrollLeft || bd . scrollLeft || 0 ) + 5 , scrollY = ( de . scrollTop || bd . scrollTop || 0 ) + 5 , axy = [ xy [ 0 ] + offsets [ 0 ] , xy [ 1 ] + offsets [ 1 ] ] , sz = this . getSize ( ) ; this . anchorEl . removeClass ( this . anchorCls ) ; if ( this . targetCounter < 2 ) { if ( axy [ 0 ] < scrollX ) { if ( this . anchorToTarget ) { this . defaultAlign = "l-r" ; if ( this . mouseOffset ) { this . mouseOffset [ 0 ] *= - 1 } } this . anchor = "left" ; return this . getTargetXY ( ) } if ( axy [ 0 ] + sz . width > dw ) { if ( this . anchorToTarge
/ *
* Ext JS Library 3.2 . 1
* Copyright ( c ) 2006 - 2010 Ext JS , Inc .
* licensing @ extjs . com
* http : //www.extjs.com/license
* /
Ext . Toolbar = function ( config ) { if ( Ext . isArray ( config ) ) { config = { items : config , layout : "toolbar" } } else { config = Ext . apply ( { layout : "toolbar" } , config ) ; if ( config . buttons ) { config . items = config . buttons } } Ext . Toolbar . superclass . constructor . call ( this , config ) } ; ( function ( ) { var T = Ext . Toolbar ; Ext . extend ( T , Ext . Container , { defaultType : "button" , enableOverflow : false , trackMenus : true , internalDefaults : { removeMode : "container" , hideParent : true } , toolbarCls : "x-toolbar" , initComponent : function ( ) { T . superclass . initComponent . call ( this ) ; this . addEvents ( "overflowchange" ) } , onRender : function ( ct , position ) { if ( ! this . el ) { if ( ! this . autoCreate ) { this . autoCreate = { cls : this . toolbarCls + " x-small-editor" } } this . el = ct . createChild ( Ext . apply ( { id : this . id } , this . autoCreate ) , position ) ; Ext . Toolbar . superclass . onRender . apply ( this , arguments ) } } , lookupComponent : function ( c ) { if ( Ext . isString ( c ) ) { if ( c == "-" ) { c = new T . Separator ( ) } else { if ( c == " " ) { c = new T . Spacer ( ) } else { if ( c == "->" ) { c = new T . Fill ( ) } else { c = new T . TextItem ( c ) } } } this . applyDefaults ( c ) } else { if ( c . isFormField || c . render ) { c = this . createComponent ( c ) } else { if ( c . tag ) { c = new T . Item ( { autoEl : c } ) } else { if ( c . tagName ) { c = new T . Item ( { el : c } ) } else { if ( Ext . isObject ( c ) ) { c = c . xtype ? this . createComponent ( c ) : this . constructButton ( c ) } } } } } return c } , applyDefaults : function ( c ) { if ( ! Ext . isString ( c ) ) { c = Ext . Toolbar . superclass . applyDefaults . call ( this , c ) ; var d = this . internalDefaults ; if ( c . events ) { Ext . applyIf ( c . initialConfig , d ) ; Ext . apply ( c , d ) } else { Ext . applyIf ( c , d ) } } return c } , addSeparator : function ( ) { return this . add ( new T . Separator ( ) ) } , addSpacer : function ( ) { return this . add ( new T . Spacer ( ) ) } , addFill : function ( ) { this . add ( new T . Fill ( ) ) } , addElement : function ( el ) { return this . addItem ( new T . Item ( { el : el } ) ) } , addItem : function ( item ) { return this . add . apply ( this , arguments ) } , addButton : function ( config ) { if ( Ext . isArray ( config ) ) { var buttons = [ ] ; for ( var i = 0 , len = config . length ; i < len ; i ++ ) { buttons . push ( this . addButton ( config [ i ] ) ) } return buttons } return this . add ( this . constructButton ( config ) ) } , addText : function ( text ) { return this . addItem ( new T . TextItem ( text ) ) } , addDom : function ( config ) { return this . add ( new T . Item ( { autoEl : config } ) ) } , addField : function ( field ) { return this . add ( field ) } , insertButton : function ( index , item ) { if ( Ext . isArray ( item ) ) { var buttons = [ ] ; for ( var i = 0 , len = item . length ; i < len ; i ++ ) { buttons . push ( this . insertButton ( index + i , item [ i ] ) ) } return buttons } return Ext . Toolbar . superclass . insert . call ( this , index , item ) } , trackMenu : function ( item , remove ) { if ( this . trackMenus && item . menu ) { var method = remove ? "mun" : "mon" ; this [ method ] ( item , "menutriggerover" , this . onButtonTriggerOver , this ) ; this [ method ] ( item , "menushow" , this . onButtonMenuShow , this ) ; this [ method ] ( item , "menuhide" , this . onButtonMenuHide , this ) } } , constructButton : function ( item ) { var b = item . events ? item : this . createComponent ( item , item . split ? "splitbutton" : this . defaultType ) ; return b } , onAdd : function ( c ) { Ext . Toolbar . superclass . onAdd . call ( this ) ; this . trackMenu ( c ) ; if ( this . disabled ) { c . disable ( ) } } , onRemove : function ( c ) { Ext . Toolbar . superclass . onRemove . call ( this ) ; this . trackMenu ( c , true ) } , onDisable : function ( ) { this . items . each ( function ( item ) { if ( item . disable ) { item . disable ( ) } } ) } , onEnable : function ( ) { this . items . each ( function ( item ) { if ( item . enable ) { item . enable ( ) } } ) } , onButtonTriggerOver : function ( btn ) { if ( this . activeMenuBtn && this . activeMenuBtn != btn ) { this . activeMenuBtn . hideMenu ( ) ; btn . showMenu ( ) ; this . activeMenuBtn = btn } } , onButtonMenuShow : function ( btn ) { this . activeMenuBtn = btn } , onButtonMenuHide : function ( btn ) { delete this . activeMenuBtn } } ) ; Ext . reg ( "toolbar" , Ext . Toolbar ) ; T . Item = Ext . extend ( Ext . BoxComponent , { hideParent : true , enable : Ext . emptyFn , disable : Ext . emptyFn , focus : Ext . emptyFn } ) ; Ext . reg ( "tbitem" , T . Item ) ; T . Separator = Ext . extend ( T . Item , { onRender : function ( ct , position ) { this . el = ct . createChild ( { tag : "span" , cls : "xtb-sep" } , position ) } } ) ; Ext . reg ( "tbseparator" , T . Separator ) ; T . Spacer = Ext . extend ( T . Item , { onRender : function ( ct , position ) { this . el = ct . createChild ( { tag : "div" , cls : "xtb-spacer" , style : this . width ? "width:" + this . width + "px" : "" } , position ) } } ) ; Ext . reg ( "tbspacer" , T . Spacer ) ; T . Fill = Ext . extend ( T . Item , { render : Ext . emptyFn , isFill : true } ) ; Ext . reg ( "tbfill" , T . Fill ) ; T . TextItem = Ext . extend ( T . Item , { constructor : function ( config ) { T . TextItem . superclass . constructor .
/ *
* Ext JS Library 3.2 . 1
* Copyright ( c ) 2006 - 2010 Ext JS , Inc .
* licensing @ extjs . com
* http : //www.extjs.com/license
* /
Ext . menu . Menu = Ext . extend ( Ext . Container , { minWidth : 120 , shadow : "sides" , subMenuAlign : "tl-tr?" , defaultAlign : "tl-bl?" , allowOtherMenus : false , ignoreParentClicks : false , enableScrolling : true , maxHeight : null , scrollIncrement : 24 , showSeparator : true , defaultOffsets : [ 0 , 0 ] , plain : false , floating : true , zIndex : 15000 , hidden : true , layout : "menu" , hideMode : "offsets" , scrollerHeight : 8 , autoLayout : true , defaultType : "menuitem" , bufferResize : false , initComponent : function ( ) { if ( Ext . isArray ( this . initialConfig ) ) { Ext . apply ( this , { items : this . initialConfig } ) } this . addEvents ( "click" , "mouseover" , "mouseout" , "itemclick" ) ; Ext . menu . MenuMgr . register ( this ) ; if ( this . floating ) { Ext . EventManager . onWindowResize ( this . hide , this ) } else { if ( this . initialConfig . hidden !== false ) { this . hidden = false } this . internalDefaults = { hideOnClick : false } } Ext . menu . Menu . superclass . initComponent . call ( this ) ; if ( this . autoLayout ) { var fn = this . doLayout . createDelegate ( this , [ ] ) ; this . on ( { add : fn , remove : fn } ) } } , getLayoutTarget : function ( ) { return this . ul } , onRender : function ( ct , position ) { if ( ! ct ) { ct = Ext . getBody ( ) } var dh = { id : this . getId ( ) , cls : "x-menu " + ( ( this . floating ) ? "x-menu-floating x-layer " : "" ) + ( this . cls || "" ) + ( this . plain ? " x-menu-plain" : "" ) + ( this . showSeparator ? "" : " x-menu-nosep" ) , style : this . style , cn : [ { tag : "a" , cls : "x-menu-focus" , href : "#" , onclick : "return false;" , tabIndex : "-1" } , { tag : "ul" , cls : "x-menu-list" } ] } ; if ( this . floating ) { this . el = new Ext . Layer ( { shadow : this . shadow , dh : dh , constrain : false , parentEl : ct , zindex : this . zIndex } ) } else { this . el = ct . createChild ( dh ) } Ext . menu . Menu . superclass . onRender . call ( this , ct , position ) ; if ( ! this . keyNav ) { this . keyNav = new Ext . menu . MenuNav ( this ) } this . focusEl = this . el . child ( "a.x-menu-focus" ) ; this . ul = this . el . child ( "ul.x-menu-list" ) ; this . mon ( this . ul , { scope : this , click : this . onClick , mouseover : this . onMouseOver , mouseout : this . onMouseOut } ) ; if ( this . enableScrolling ) { this . mon ( this . el , { scope : this , delegate : ".x-menu-scroller" , click : this . onScroll , mouseover : this . deactivateActive } ) } } , findTargetItem : function ( e ) { var t = e . getTarget ( ".x-menu-list-item" , this . ul , true ) ; if ( t && t . menuItemId ) { return this . items . get ( t . menuItemId ) } } , onClick : function ( e ) { var t = this . findTargetItem ( e ) ; if ( t ) { if ( t . isFormField ) { this . setActiveItem ( t ) } else { if ( t instanceof Ext . menu . BaseItem ) { if ( t . menu && this . ignoreParentClicks ) { t . expandMenu ( ) ; e . preventDefault ( ) } else { if ( t . onClick ) { t . onClick ( e ) ; this . fireEvent ( "click" , this , t , e ) } } } } } } , setActiveItem : function ( item , autoExpand ) { if ( item != this . activeItem ) { this . deactivateActive ( ) ; if ( ( this . activeItem = item ) . isFormField ) { item . focus ( ) } else { item . activate ( autoExpand ) } } else { if ( autoExpand ) { item . expandMenu ( ) } } } , deactivateActive : function ( ) { var a = this . activeItem ; if ( a ) { if ( a . isFormField ) { if ( a . collapse ) { a . collapse ( ) } } else { a . deactivate ( ) } delete this . activeItem } } , tryActivate : function ( start , step ) { var items = this . items ; for ( var i = start , len = items . length ; i >= 0 && i < len ; i += step ) { var item = items . get ( i ) ; if ( ! item . disabled && ( item . canActivate || item . isFormField ) ) { this . setActiveItem ( item , false ) ; return item } } return false } , onMouseOver : function ( e ) { var t = this . findTargetItem ( e ) ; if ( t ) { if ( t . canActivate && ! t . disabled ) { this . setActiveItem ( t , true ) } } this . over = true ; this . fireEvent ( "mouseover" , this , e , t ) } , onMouseOut : function ( e ) { var t = this . findTargetItem ( e ) ; if ( t ) { if ( t == this . activeItem && t . shouldDeactivate && t . shouldDeactivate ( e ) ) { this . activeItem . deactivate ( ) ; delete this . activeItem } } this . over = false ; this . fireEvent ( "mouseout" , this , e , t ) } , onScroll : function ( e , t ) { if ( e ) { e . stopEvent ( ) } var ul = this . ul . dom , top = Ext . fly ( t ) . is ( ".x-menu-scroller-top" ) ; ul . scrollTop += this . scrollIncrement * ( top ? - 1 : 1 ) ; if ( top ? ul . scrollTop <= 0 : ul . scrollTop + this . activeMax >= ul . scrollHeight ) { this . onScrollerOut ( null , t ) } } , onScrollerIn : function ( e , t ) { var ul = this . ul . dom , top = Ext . fly ( t ) . is ( ".x-menu-scroller-top" ) ; if ( top ? ul . scrollTop > 0 : ul . scrollTop + this . activeMax < ul . scrollHeight ) { Ext . fly ( t ) . addClass ( [ "x-menu-item-active" , "x-menu-scroller-active" ] ) } } , onScrollerOut : function ( e , t ) { Ext . fly ( t ) . removeClass ( [ "x-menu-item-active" , "x-menu-scroller-active" ] ) } , show : function ( el , pos , parentMenu ) { if ( this . floating ) { this . parentMenu = parentMenu ; if ( ! this . el ) { this . render ( ) ; this . doLayout ( false , true ) } this . showAt ( this . el . getAlignToXY ( el , pos || this . defaultAlign , t
/ *
* Aloha Editor
* Author & Copyright ( c ) 2010 Gentics Software GmbH
* aloha - sales @ gentics . com
* Licensed unter the terms of http : //www.aloha-editor.com/license.html
* /
jQuery . fn . between = function ( content , offset ) { if ( this [ 0 ] . nodeType !== 3 ) { if ( offset > this . children ( ) . size ( ) ) { offset = this . children ( ) . size ( ) } if ( offset <= 0 ) { this . prepend ( content ) } else { this . children ( ) . eq ( offset - 1 ) . after ( content ) } } else { if ( offset <= 0 ) { this . before ( content ) } else { if ( offset >= this [ 0 ] . length ) { this . after ( content ) } else { var fullText = this [ 0 ] . data ; this [ 0 ] . data = fullText . substring ( 0 , offset ) ; this . after ( fullText . substring ( offset , fullText . length ) ) ; this . after ( content ) } } } } ;
/ *
* Aloha Editor
* Author & Copyright ( c ) 2010 Gentics Software GmbH
* aloha - sales @ gentics . com
* Licensed unter the terms of http : //www.aloha-editor.com/license.html
* /
if ( typeof GENTICS == "undefined" || ! GENTICS ) { var GENTICS = { } } if ( typeof GENTICS . Utils == "undefined" || ! GENTICS ) { GENTICS . Utils = { } } GENTICS . Utils . applyProperties = function ( target , properties ) { var name ; for ( name in properties ) { if ( properties . hasOwnProperty ( name ) ) { target [ name ] = properties [ name ] } } } ;
/ *
* Aloha Editor
* Author & Copyright ( c ) 2010 Gentics Software GmbH
* aloha - sales @ gentics . com
* Licensed unter the terms of http : //www.aloha-editor.com/license.html
* /
if ( typeof GENTICS == "undefined" || ! GENTICS ) { var GENTICS = { } } if ( typeof GENTICS . Utils == "undefined" || ! GENTICS ) { GENTICS . Utils = { } } GENTICS . Utils . RangeObject = function ( param ) { this . startContainer ; this . startOffset ; this . endContainer ; this . endOffset ; this . startParents = [ ] ; this . endParents = [ ] ; this . rangeTree = [ ] ; if ( typeof param === "object" ) { if ( param . startContainer !== undefined ) { this . startContainer = param . startContainer } if ( param . startOffset !== undefined ) { this . startOffset = param . startOffset } if ( param . endContainer !== undefined ) { this . endContainer = param . endContainer } if ( param . endOffset !== undefined ) { this . endOffset = param . endOffset } } else { if ( param === true ) { this . initializeFromUserSelection ( ) } } } ; GENTICS . Utils . RangeObject . prototype . log = function ( message , obj ) { if ( GENTICS && GENTICS . Aloha && GENTICS . Aloha . Log ) { GENTICS . Aloha . Log . debug ( this , message ) ; return false } if ( console ) { console . log ( message ) ; if ( obj ) { console . log ( obj ) } } } ; GENTICS . Utils . RangeObject . prototype . isCollapsed = function ( ) { return ( ! this . endContainer || ( this . startContainer === this . endContainer && this . startOffset === this . endOffset ) ) } ; GENTICS . Utils . RangeObject . prototype . getCommonAncestorContainer = function ( ) { if ( this . commonAncestorContainer ) { return this . commonAncestorContainer } this . updateCommonAncestorContainer ( ) ; return this . commonAncestorContainer } ; GENTICS . Utils . RangeObject . prototype . getContainerParents = function ( limit , fromEnd ) { var container = fromEnd ? this . endContainer : this . startContainer ; var parentStore = fromEnd ? this . endParents : this . startParents ; if ( ! container ) { return false } if ( typeof limit == "undefined" ) { limit = jQuery ( "body" ) } if ( ! parentStore [ limit . get ( 0 ) ] ) { var parents ; if ( container . nodeType == 3 ) { parents = jQuery ( container ) . parents ( ) } else { parents = jQuery ( container ) . parents ( ) ; for ( var i = parents . length ; i > 0 ; -- i ) { parents [ i ] = parents [ i - 1 ] } parents [ 0 ] = container } var limitIndex = parents . index ( limit ) ; if ( limitIndex >= 0 ) { parents = parents . slice ( 0 , limitIndex ) } parentStore [ limit . get ( 0 ) ] = parents } return parentStore [ limit . get ( 0 ) ] } ; GENTICS . Utils . RangeObject . prototype . getStartContainerParents = function ( limit ) { return this . getContainerParents ( limit , false ) } ; GENTICS . Utils . RangeObject . prototype . getEndContainerParents = function ( limit ) { return this . getContainerParents ( limit , true ) } ; GENTICS . Utils . RangeObject . prototype . updateCommonAncestorContainer = function ( commonAncestorContainer ) { var parentsStartContainer = this . getStartContainerParents ( ) ; var parentsEndContainer = this . getEndContainerParents ( ) ; if ( ! commonAncestorContainer ) { if ( ! ( parentsStartContainer . length > 0 && parentsEndContainer . length > 0 ) ) { GENTICS . Utils . RangeObject . prototype . log ( "could not find commonAncestorContainer" ) ; return false } for ( var i = 0 ; i < parentsStartContainer . length ; i ++ ) { if ( parentsEndContainer . index ( parentsStartContainer [ i ] ) != - 1 ) { this . commonAncestorContainer = parentsStartContainer [ i ] ; break } } } else { this . commonAncestorContainer = commonAncestorContainer } GENTICS . Utils . RangeObject . prototype . log ( commonAncestorContainer ? "commonAncestorContainer was set successfully" : "commonAncestorContainer was calculated successfully" ) ; return true } ; GENTICS . Utils . RangeObject . prototype . getCollapsedIERange = function ( container , offset ) { var ieRange = document . body . createTextRange ( ) ; var left = this . searchElementToLeft ( container , offset ) ; if ( left . element ) { var tmpRange = document . body . createTextRange ( ) ; tmpRange . moveToElementText ( left . element ) ; ieRange . setEndPoint ( "StartToEnd" , tmpRange ) ; if ( left . characters != 0 ) { ieRange . moveStart ( "character" , left . characters ) } else { ieRange . moveStart ( "character" , 1 ) ; ieRange . moveStart ( "character" , - 1 ) } } else { var right = this . searchElementToRight ( container , offset ) ; if ( false && right . element ) { var tmpRange = document . body . createTextRange ( ) ; tmpRange . moveToElementText ( right . element ) ; ieRange . setEndPoint ( "StartToStart" , tmpRange ) ; if ( right . characters != 0 ) { ieRange . moveStart ( "character" , - right . characters ) } else { ieRange . moveStart ( "character" , - 1 ) ; ieRange . moveStart ( "character" , 1 ) } } else { var parent = container . nodeType == 3 ? container . parentNode : container ; var tmpRange = document . body . createTextRange ( ) ; tmpRange . moveToElementText ( parent ) ; ieRange . setEndPoint ( "StartToStart" , tmpRange ) ; if ( left . characters != 0 ) { ieRange . moveStart ( "character" , left . characters ) } } } ieRange . collapse ( ) ; r
/ *
* Aloha Editor
* Author & Copyright ( c ) 2010 Gentics Software GmbH
* aloha - sales @ gentics . com
* Licensed unter the terms of http : //www.aloha-editor.com/license.html
* /
if ( typeof GENTICS == "undefined" || ! GENTICS ) { var GENTICS = { } } if ( typeof GENTICS . Utils == "undefined" || ! GENTICS ) { GENTICS . Utils = { } } GENTICS . Utils . Position = { } ; GENTICS . Utils . Position . w = jQuery ( window ) ; GENTICS . Utils . Position . Scroll = { top : 0 , left : 0 , isScrolling : false } ; GENTICS . Utils . Position . Mouse = { x : 0 , y : 0 , oldX : 0 , oldY : 0 , isMoving : false , triggeredMouseStop : true } ; GENTICS . Utils . Position . mouseStopCallbacks = new Array ( ) ; GENTICS . Utils . Position . mouseMoveCallbacks = new Array ( ) ; GENTICS . Utils . Position . update = function ( ) { var st = this . w . scrollTop ( ) ; var sl = this . w . scrollLeft ( ) ; if ( this . Scroll . isScrolling ) { if ( this . Scroll . top == st && this . Scroll . left == sl ) { this . Scroll . isScrolling = false } } else { if ( this . Scroll . top != st || this . Scroll . left != sl ) { this . Scroll . isScrolling = true } } this . Scroll . top = st ; this . Scroll . left = sl ; if ( this . Mouse . x == this . Mouse . oldX && this . Mouse . y == this . Mouse . oldY ) { this . Mouse . isMoving = false ; if ( ! this . Mouse . triggeredMouseStop ) { this . Mouse . triggeredMouseStop = true ; for ( var i = 0 ; i < this . mouseStopCallbacks . length ; i ++ ) { this . mouseStopCallbacks [ i ] . call ( ) } } } else { this . Mouse . isMoving = true ; this . Mouse . triggeredMouseStop = false ; for ( var i = 0 ; i < this . mouseMoveCallbacks . length ; i ++ ) { this . mouseMoveCallbacks [ i ] . call ( ) } } this . Mouse . oldX = this . Mouse . x ; this . Mouse . oldY = this . Mouse . y } ; GENTICS . Utils . Position . addMouseStopCallback = function ( callback ) { this . mouseStopCallbacks . push ( callback ) ; return ( this . mouseStopCallbacks . length - 1 ) } ; GENTICS . Utils . Position . addMouseMoveCallback = function ( callback ) { this . mouseMoveCallbacks . push ( callback ) ; return ( this . mouseMoveCallbacks . length - 1 ) } ; setInterval ( "GENTICS.Utils.Position.update()" , 500 ) ; jQuery ( "html" ) . mousemove ( function ( e ) { GENTICS . Utils . Position . Mouse . x = e . pageX ; GENTICS . Utils . Position . Mouse . y = e . pageY } ) ;
/ *
* Aloha Editor
* Author & Copyright ( c ) 2010 Gentics Software GmbH
* aloha - sales @ gentics . com
* Licensed unter the terms of http : //www.aloha-editor.com/license.html
* /
2010-09-05 22:50:05 +00:00
if ( typeof GENTICS == "undefined" || ! GENTICS ) { var GENTICS = { } } if ( typeof GENTICS . Utils == "undefined" || ! GENTICS . Utils ) { GENTICS . Utils = { } } if ( typeof GENTICS . Utils . Dom == "undefined" || ! GENTICS . Utils . Dom ) { GENTICS . Utils . Dom = function ( ) { } } GENTICS . Utils . Dom . prototype . mergeableTags = [ "a" , "b" , "span" , "code" , "del" , "em" , "i" , "ins" , "strong" , "sub" , "sup" , "#text" ] ; GENTICS . Utils . Dom . prototype . nonWordBoundaryTags = [ "a" , "b" , "span" , "code" , "del" , "em" , "i" , "ins" , "span" , "strong" , "sub" , "sup" , "#text" ] ; GENTICS . Utils . Dom . prototype . nonEmptyTags = [ "br" ] ; GENTICS . Utils . Dom . prototype . tags = { flow : [ "a" , "abbr" , "address" , "area" , "article" , "aside" , "audio" , "b" , "bdo" , "blockquote" , "br" , "button" , "canvas" , "cite" , "code" , "command" , "datalist" , "del" , "details" , "dfn" , "div" , "dl" , "em" , "embed" , "fieldset" , "figure" , "footer" , "form" , "h1" , "h2" , "h3" , "h4" , "h5" , "h6" , "header" , "hgroup" , "hr" , "i" , "iframe" , "img" , "input" , "ins" , "kbd" , "keygen" , "label" , "map" , "mark" , "math" , "menu" , "meter" , "nav" , "noscript" , "object" , "ol" , "output" , "p" , "pre" , "progress" , "q" , "ruby" , "samp" , "script" , "section" , "select" , "small" , "span" , "strong" , "style" , "sub" , "sup" , "svg" , "table" , "textarea" , "time" , "ul" , "var" , "video" , "wbr" , "#text" ] , phrasing : [ "a" , "abbr" , "area" , "audio" , "b" , "bdo" , "br" , "button" , "canvas" , "cite" , "code" , "command" , "datalist" , "del" , "dfn" , "em" , "embed" , "i" , "iframe" , "img" , "input" , "ins" , "kbd" , "keygen" , "label" , "map" , "mark" , "math" , "meter" , "noscript" , "object" , "output" , "progress" , "q" , "ruby" , "samp" , "script" , "select" , "small" , "span" , "strong" , "sub" , "sup" , "svg" , "textarea" , "time" , "var" , "video" , "wbr" , "#text" ] } ; GENTICS . Utils . Dom . prototype . children = { a : "phrasing" , b : "phrasing" , blockquote : "flow" , br : "empty" , caption : "flow" , cite : "phrasing" , code : "phrasing" , col : "empty" , colgroup : "col" , del : "phrasing" , div : "flow" , h1 : "phrasing" , h2 : "phrasing" , h3 : "phrasing" , h4 : "phrasing" , h5 : "phrasing" , h6 : "phrasing" , hr : "empty" , i : "phrasing" , img : "empty" , ins : "phrasing" , li : "flow" , ol : "li" , p : "phrasing" , pre : "phrasing" , small : "phrasing" , span : "phrasing" , strong : "phrasing" , sub : "phrasing" , sup : "phrasing" , table : [ "caption" , "colgroup" , "thead" , "tbody" , "tfoot" , "tr" ] , tbody : "tr" , td : "flow" , tfoot : "tr" , th : "phrasing" , thead : "tr" , tr : [ "th" , "td" ] , ul : "li" } ; GENTICS . Utils . Dom . prototype . blockLevelElements = [ "p" , "h1" , "h2" , "h3" , "h4" , "h5" , "h6" , "blockquote" , "div" , "pre" ] ; GENTICS . Utils . Dom . prototype . listElements = [ "li" , "ol" , "ul" ] ; GENTICS . Utils . Dom . prototype . split = function ( range , limit , atEnd ) { var splitElement = jQuery ( range . startContainer ) ; var splitPosition = range . startOffset ; if ( atEnd ) { splitElement = jQuery ( range . endContainer ) ; splitPosition = range . endOffset } if ( limit . length < 1 ) { limit = jQuery ( document . body ) } var updateRange = ( ! range . isCollapsed ( ) && ! atEnd ) ; var path ; var parents = splitElement . parents ( ) . get ( ) ; parents . unshift ( splitElement . get ( 0 ) ) ; jQuery . each ( parents , function ( index , element ) { var isLimit = limit . filter ( function ( ) { return this == element } ) . length ; if ( isLimit ) { if ( index > 0 ) { path = parents . slice ( 0 , index ) } return false } } ) ; if ( ! path ) { return } path = path . reverse ( ) ; var newDom ; var insertElement ; for ( var i = 0 ; i < path . length ; i ++ ) { var element = path [ i ] ; if ( i === path . length - 1 ) { var secondPart ; if ( element . nodeType === 3 ) { secondPart = document . createTextNode ( element . data . substring ( splitPosition , element . data . length ) ) ; element . data = element . data . substring ( 0 , splitPosition ) } else { var newElement = jQuery ( element ) . clone ( false ) . empty ( ) ; var children = jQuery ( element ) . contents ( ) ; secondPart = newElement . append ( children . slice ( splitPosition , children . length ) ) . get ( 0 ) } if ( updateRange && range . endContainer === element ) { range . endContainer = secondPart ; range . endOffset -= splitPosition ; range . clearCaches ( ) } if ( insertElement ) { insertElement . prepend ( secondPart ) } else { jQuery ( element ) . after ( secondPart ) } } else { var newElement = jQuery ( element ) . clone ( false ) . empty ( ) ; if ( ! newDom ) { newDom = newElement ; insertElement = newElement } else { insertElement . prepend ( newElement ) ; insertElement = newElement } var next ; while ( next = path [ i + 1 ] . nextSibling ) { insertElement . append ( next ) } if ( updateRange && range . endContainer === element ) { range . endContainer = newElement . get ( 0 ) ; var prev = path [ i + 1 ] ; var offset = 0 ; while ( prev = prev . previousSibling ) { offset ++ } range . endOffset -= offset ; range . clearCaches ( ) } } } jQuery ( path [ 0 ] ) . after ( newDom ) ; return jQuery ( [ path [ 0 ] , newDom ? newDom .
2010-09-02 23:03:20 +00:00
/ *
* Aloha Editor
* Author & Copyright ( c ) 2010 Gentics Software GmbH
* aloha - sales @ gentics . com
* Licensed unter the terms of http : //www.aloha-editor.com/license.html
* /
if ( typeof GENTICS == "undefined" || ! GENTICS ) {
/ *
* The GENTICS global namespace object . If GENTICS is already defined , the
* existing GENTICS object will not be overwritten so that defined
* namespaces are preserved .
* /
var GENTICS = { } } GENTICS . Aloha = function ( ) { } ; GENTICS . Aloha . setAutobase = function ( ) { var scriptTags = document . getElementsByTagName ( "script" ) ; var path = scriptTags [ scriptTags . length - 1 ] . src . split ( "?" ) [ 0 ] ; path = path . split ( "/" ) ; var substitute = 1 ; if ( "core" === path [ path . length - 2 ] ) { substitute = 2 } GENTICS . Aloha . prototype . autobase = path . slice ( 0 , substitute * - 1 ) . join ( "/" ) + "/" } ; GENTICS . Aloha . setAutobase ( ) ; GENTICS . Aloha . prototype . version = "nightly" ; GENTICS . Aloha . prototype . editables = new Array ( ) ; GENTICS . Aloha . prototype . activeEditable = null ; GENTICS . Aloha . prototype . ready = false ; GENTICS . Aloha . prototype . dictionaries = { } ; GENTICS . Aloha . prototype . settings = { } ; GENTICS . Aloha . prototype . OSName = "Unknown" ; GENTICS . Aloha . prototype . init = function ( ) { var that = this ; jQuery ( "html" ) . mousedown ( function ( ) { if ( that . activeEditable && ! that . isMessageVisible ( ) ) { that . activeEditable . blur ( ) ; that . FloatingMenu . setScope ( "GENTICS.Aloha.empty" ) ; that . activeEditable = null } } ) ; if ( typeof this . settings . base == "undefined" || ! this . settings . base ) { this . settings . base = GENTICS . Aloha . autobase ; if ( typeof GENTICS _Aloha _base != "undefined" ) { this . settings . base = GENTICS _Aloha _base } } this . Log . init ( ) ; if ( ! ( this . settings . errorhandling == false ) ) { window . onerror = function ( msg , url , linenumber ) { GENTICS . Aloha . Log . error ( GENTICS . Aloha , "Error message: " + msg + "\nURL: " + url + "\nLine Number: " + linenumber ) ; return true } } if ( navigator . appVersion . indexOf ( "Win" ) != - 1 ) { this . OSName = "Win" } if ( navigator . appVersion . indexOf ( "Mac" ) != - 1 ) { this . OSName = "Mac" } if ( navigator . appVersion . indexOf ( "X11" ) != - 1 ) { this . OSName = "Unix" } if ( navigator . appVersion . indexOf ( "Linux" ) != - 1 ) { this . OSName = "Linux" } this . initI18n ( ) ; this . PluginRegistry . init ( ) ; this . Ribbon . init ( ) ; this . FloatingMenu . init ( ) ; Ext . MessageBox . buttonText . yes = GENTICS . Aloha . i18n ( this , "yes" ) ; Ext . MessageBox . buttonText . no = GENTICS . Aloha . i18n ( this , "no" ) ; Ext . MessageBox . buttonText . cancel = GENTICS . Aloha . i18n ( this , "cancel" ) ; this . ready = true ; for ( var i = 0 ; i < this . editables . length ; i ++ ) { this . editables [ i ] . init ( ) } } ; GENTICS . Aloha . prototype . activateEditable = function ( editable ) { for ( var i = 0 ; i < this . editables . length ; i ++ ) { if ( this . editables [ i ] != editable && this . editables [ i ] . isActive ) { var oldActive = this . editables [ i ] ; this . editables [ i ] . blur ( ) } } this . activeEditable = editable } ; GENTICS . Aloha . prototype . getActiveEditable = function ( ) { return this . activeEditable } ; GENTICS . Aloha . prototype . deactivateEditable = function ( ) { if ( typeof this . activeEditable == "undefined" || this . activeEditable == null ) { return } this . activeEditable . blur ( ) ; this . FloatingMenu . setScope ( "GENTICS.Aloha.empty" ) ; this . activeEditable = null } ; GENTICS . Aloha . prototype . log = function ( level , component , message ) { GENTICS . Aloha . Log . log ( level , component , message ) } ; GENTICS . Aloha . prototype . identStr = function ( object ) { if ( object instanceof jQuery ) { object = object [ 0 ] } if ( ! ( object instanceof HTMLElement ) ) { GENTICS . Aloha . Log . warn ( this , "{" + object . toString ( ) + "} provided is not an HTML element" ) ; return object . toString ( ) } var out = object . tagName . toLowerCase ( ) ; if ( object . id ) { return out + "#" + object . id } if ( object . className ) { return out + "." + object . className } return out } ; GENTICS . Aloha . prototype . trim = function ( str ) { str = str . replace ( /^\s+/ , "" ) ; for ( var i = str . length - 1 ; i >= 0 ; i -- ) { if ( /\S/ . test ( str . charAt ( i ) ) ) { str = str . substring ( 0 , i + 1 ) ; break } } return str } ; GENTICS . Aloha . prototype . initI18n = function ( ) { if ( typeof this . settings . i18n == "undefined" || ! this . settings . i18n ) { this . settings . i18n = { } } if ( typeof this . settings . i18n . available == "undefined" || ! this . settings . i18n . available || ! this . settings . i18n . available instanceof Array ) { this . settings . i18n . available = [ "en" , "de" , "fr" , "eo" , "fi" , "ru" , "it" ] } if ( ( typeof this . settings . i18n . current == "undefined" || ! this . settings . i18n . current ) && typeof this . settings . i18n . acceptLanguage == "string" ) { var acceptLanguage = [ ] ; var preferredLanugage = this . settings . i18n . acceptLanguage . split ( "," ) ; for ( i = 0 ; i < preferredLanugage . length ; i ++ ) { var lang = preferredLanugage [ i ] . split ( ";" ) ; if ( typeof lang [ 1 ] == "undefined" || ! lang [ 1 ] ) { lang [ 1 ] = 1 } else { lang [ 1 ] = parseFloat ( lang [ 1 ] . substring ( 2 , lang [ 1 ] . length ) ) } acceptLanguage . push ( lang ) } acceptLanguage . sort ( function ( a , b ) { return b [ 1 ] - a [ 1 ] } ) ; for ( i = 0 ; i < acceptLanguage . length ; i ++ ) { if ( jQuery . inArray ( acceptLanguage [ i ] [ 0 ] , this . settings . i18n . available )
/ *
* Aloha Editor
* Author & Copyright ( c ) 2010 Gentics Software GmbH
* aloha - sales @ gentics . com
* Licensed unter the terms of http : //www.aloha-editor.com/license.html
* /
if ( typeof GENTICS . Aloha . ui == "undefined" ) { GENTICS . Aloha . ui = function ( ) { } } GENTICS . Aloha . ui . Button = function ( properties ) { this . label ; this . iconClass ; this . icon ; this . onclick ; this . menu ; this . toggle ; this . pressed = false ; this . visible = true ; this . enabled = true ; this . tooltip ; this . extButton ; GENTICS . Utils . applyProperties ( this , properties ) ; this . id = this . generateId ( ) } ; GENTICS . Aloha . ui . Button . idCounter = 0 ; GENTICS . Aloha . ui . Button . prototype . generateId = function ( ) { GENTICS . Aloha . ui . Button . idCounter = GENTICS . Aloha . ui . Button . idCounter + 1 ; return "GENTICS_Aloha_ui_Button_" + GENTICS . Aloha . ui . Button . idCounter } ; GENTICS . Aloha . ui . Button . prototype . setPressed = function ( pressed ) { if ( this . toggle ) { this . pressed = pressed ; if ( typeof this . extButton == "object" && this . extButton . pressed != pressed ) { this . extButton . toggle ( this . pressed ) } } } ; GENTICS . Aloha . ui . Button . prototype . isPressed = function ( ) { if ( this . toggle ) { return this . pressed } else { return false } } ; GENTICS . Aloha . ui . Button . prototype . show = function ( ) { this . visible = true } ; GENTICS . Aloha . ui . Button . prototype . hide = function ( ) { this . visible = false } ; GENTICS . Aloha . ui . Button . prototype . isVisible = function ( ) { return this . visible } ; GENTICS . Aloha . ui . Button . prototype . enable = function ( ) { this . enabled = true ; if ( typeof this . extButton == "object" ) { this . extButton . enable ( ) } } ; GENTICS . Aloha . ui . Button . prototype . disable = function ( ) { this . enabled = false ; if ( typeof this . extButton == "object" ) { this . extButton . disable ( ) } } ; GENTICS . Aloha . ui . Button . prototype . isEnabled = function ( ) { return this . enabled } ; GENTICS . Aloha . ui . Button . prototype . getExtMenu = function ( ) { if ( typeof this . menu === "object" ) { var menu = new Ext . menu . Menu ( ) ; for ( var i = 0 ; i < this . menu . length ; ++ i ) { var entry = this . menu [ i ] ; menu . addItem ( new Ext . menu . Item ( entry . getExtMenuConfigProperties ( ) ) ) } } return menu } ; GENTICS . Aloha . ui . Button . prototype . getExtMenuConfigProperties = function ( ) { var that = this ; var submenu = this . getExtMenu ( ) ; return { text : this . label , icon : this . icon , iconCls : this . iconClass , handler : function ( ) { if ( typeof that . onclick == "function" ) { that . onclick ( ) } } , menu : submenu } } ; GENTICS . Aloha . ui . Button . prototype . getExtConfigProperties = function ( ) { var that = this ; var menu = this . getExtMenu ( ) ; var buttonConfig = { text : this . label , enableToggle : this . toggle , pressed : this . pressed , icon : this . icon , iconCls : this . iconClass , scale : this . size , rowspan : ( this . size == "large" || this . size == "medium" ) ? 2 : 1 , menu : menu , handler : function ( element , event ) { if ( typeof that . onclick === "function" ) { that . onclick . apply ( that , [ element , event ] ) } that . pressed = ! that . pressed } , xtype : ( menu && typeof this . onclick == "function" ) ? "splitbutton" : "button" , tooltipType : "qtip" , tooltip : this . tooltip , id : this . id , arrowAlign : this . size == "large" || this . size == "small" ? "right" : "bottom" } ; return buttonConfig } ; Ext . ux . GENTICSMultiSplitButton = Ext . extend ( Ext . Component , { autoEl : { cls : "GENTICS_multisplit-wrapper" } , ulObj : null , panelButton : null , wrapper : null , panelOpened : false , onRender : function ( ) { Ext . ux . GENTICSMultiSplitButton . superclass . onRender . apply ( this , arguments ) ; this . wrapper = jQuery ( this . el . dom ) ; var item ; var html = '<ul class="GENTICS_multisplit">' ; for ( var i = 0 ; i < this . items . length ; i ++ ) { item = this . items [ i ] ; if ( item . visible == undefined ) { item . visible = true } if ( item . wide ) { continue } html += '<li><button xmlns:ext="http://www.extjs.com/" class="' + item . iconClass + '" ext:qtip="' + item . tooltip + '" gtxmultisplititem="' + i + '"> </button></li>' } for ( var i = 0 ; i < this . items . length ; i ++ ) { item = this . items [ i ] ; if ( ! item . wide ) { continue } html += '<li><button xmlns:ext="http://www.extjs.com/" class="GENTICS_multisplit-wide ' + item . iconClass + '" ext:qtip="' + item . tooltip + '" gtxmultisplititem="' + i + '">' + item . text + "</button></li>" } html += "</ul>" ; var that = this ; GENTICS . Aloha . FloatingMenu . extTabPanel . on ( "move" , function ( ) { that . closePanel ( ) } ) ; GENTICS . Aloha . FloatingMenu . extTabPanel . on ( "tabchange" , function ( ) { that . closePanel ( ) } ) ; this . ulObj = jQuery ( this . el . createChild ( html ) . dom ) ; this . ulObj . click ( function ( event ) { that . onClick ( event ) } ) ; this . panelButton = jQuery ( this . el . createChild ( '<button class="GENTICS_multisplit_toggle GENTICS_multisplit_toggle_open"> </button>' ) . dom ) ; this . panelButton . click ( function ( ) { that . togglePanel ( ) } ) } , onClick : function ( event ) { if ( ! event . target . attributes . gtxmultisplititem ) { return } var el = jQuer
/ *
* Aloha Editor
* Author & Copyright ( c ) 2010 Gentics Software GmbH
* aloha - sales @ gentics . com
* Licensed unter the terms of http : //www.aloha-editor.com/license.html
* /
GENTICS . Aloha . Editable = function ( obj ) { this . obj = obj ; this . ready = false ; GENTICS . Aloha . registerEditable ( this ) ; this . init ( ) } ; GENTICS . Aloha . Editable . prototype . isActive = false ; GENTICS . Aloha . Editable . prototype . originalContent = null ; GENTICS . Aloha . Editable . prototype . range = undefined ; GENTICS . Aloha . Editable . prototype . init = function ( ) { var that = this ; if ( GENTICS . Aloha . ready ) { this . obj . addClass ( "GENTICS_editable" ) ; this . obj . attr ( "contenteditable" , true ) ; this . obj . mousedown ( function ( e ) { that . activate ( e ) ; e . stopPropagation ( ) } ) ; this . obj . focus ( function ( e ) { that . activate ( e ) } ) ; this . obj . keydown ( function ( event ) { return GENTICS . Aloha . Markup . preProcessKeyStrokes ( event ) } ) ; this . obj . keyup ( function ( event ) { if ( event . keyCode == 27 ) { GENTICS . Aloha . deactivateEditable ( ) ; return false } } ) ; this . obj . GENTICS _contentEditableSelectionChange ( function ( event ) { GENTICS . Aloha . Selection . onChange ( that . obj , event ) ; return that . obj } ) ; GENTICS . Aloha . EventRegistry . trigger ( new GENTICS . Aloha . Event ( "editableCreated" , GENTICS . Aloha , [ this ] ) ) ; this . setUnmodified ( ) ; this . ready = true } } ; GENTICS . Aloha . Editable . prototype . destroy = function ( ) { var that = this ; this . blur ( ) ; this . ready = false ; this . obj . removeClass ( "GENTICS_editable" ) ; this . obj . removeAttr ( "contenteditable" ) ; this . obj . unbind ( "mousedown" ) ; this . obj . unbind ( "focus" ) ; this . obj . unbind ( "keydown" ) ; this . obj . unbind ( "keyup" ) ; GENTICS . Aloha . EventRegistry . trigger ( new GENTICS . Aloha . Event ( "editableDestroyed" , GENTICS . Aloha , [ this ] ) ) ; GENTICS . Aloha . unregisterEditable ( this ) } ; GENTICS . Aloha . Editable . prototype . setUnmodified = function ( ) { this . originalContent = this . getContents ( ) } ; GENTICS . Aloha . Editable . prototype . isModified = function ( ) { if ( this . originalContent != this . getContents ( ) ) { return true } else { return false } } ; GENTICS . Aloha . Editable . prototype . toString = function ( ) { return "GENTICS.Aloha.Editable" } ; GENTICS . Aloha . Editable . prototype . activate = function ( e ) { if ( this . isActive ) { return } var oldActive = GENTICS . Aloha . getActiveEditable ( ) ; GENTICS . Aloha . activateEditable ( this ) ; if ( document . selection && document . selection . createRange ) { this . obj . mouseup ( ) } this . isActive = true ; GENTICS . Aloha . EventRegistry . trigger ( new GENTICS . Aloha . Event ( "editableActivated" , GENTICS . Aloha , { oldActive : oldActive , editable : this } ) ) ; GENTICS . Aloha . EventRegistry . trigger ( new GENTICS . Aloha . Event ( "editableActivated" , this , { oldActive : GENTICS . Aloha . getActiveEditable ( ) } ) ) } ; GENTICS . Aloha . Editable . prototype . blur = function ( ) { this . obj . blur ( ) ; this . isActive = false ; GENTICS . Aloha . EventRegistry . trigger ( new GENTICS . Aloha . Event ( "editableDeactivated" , GENTICS . Aloha , { editable : this } ) ) ; GENTICS . Aloha . EventRegistry . trigger ( new GENTICS . Aloha . Event ( "editableDeactivated" , this ) ) } ; GENTICS . Aloha . Editable . prototype . empty = function ( str ) { if ( null === str ) { return true } return ( GENTICS . Aloha . trim ( str ) == "" || str == "<br>" ) } ; GENTICS . Aloha . Editable . prototype . getContents = function ( ) { var clonedObj = this . obj . clone ( true ) ; GENTICS . Aloha . PluginRegistry . makeClean ( clonedObj ) ; return clonedObj . html ( ) } ; GENTICS . Aloha . Editable . prototype . getId = function ( ) { return this . obj . attr ( "id" ) } ;
/ *
* Aloha Editor
* Author & Copyright ( c ) 2010 Gentics Software GmbH
* aloha - sales @ gentics . com
* Licensed unter the terms of http : //www.aloha-editor.com/license.html
* /
GENTICS . Aloha . Ribbon = function ( ) { var that = this ; this . toolbar = new Ext . Toolbar ( { height : 30 , cls : "GENTICS_ribbon ext-root" } ) ; this . toolbar . add ( new Ext . Toolbar . Spacer ( { width : "5" } ) ) ; this . icon = new Ext . Toolbar . Spacer ( ) ; this . toolbar . add ( this . icon ) ; this . toolbar . add ( new Ext . Toolbar . Fill ( ) ) ; this . toolbar . add ( new Ext . Toolbar . Separator ( ) ) ; var fadeButton = new Ext . Button ( { iconCls : "GENTICS_fade_out" , handler : function ( button ) { var toolbar = jQuery ( that . toolbar . getEl ( ) . dom ) ; if ( button . iconCls == "GENTICS_fade_out" ) { toolbar . css ( "marginLeft" , "34px" ) ; toolbar . animate ( { left : "-100%" } ) ; jQuery ( "body" ) . animate ( { paddingTop : 0 } ) ; button . setIconClass ( "GENTICS_fade_in" ) } else { toolbar . css ( "marginLeft" , "0px" ) ; toolbar . animate ( { left : "0%" } ) ; jQuery ( "body" ) . animate ( { paddingTop : 30 } ) ; button . setIconClass ( "GENTICS_fade_out" ) } that . toolbar . doLayout ( ) } } ) ; this . toolbar . add ( fadeButton ) ; this . toolbar . add ( new Ext . Toolbar . Spacer ( { width : "5" } ) ) } ; GENTICS . Aloha . Ribbon . prototype . setIcon = function ( iconClass ) { if ( typeof this . icon . cls != "undefined" ) { this . icon . removeClass ( this . icon . cls ) } this . icon . addClass ( iconClass ) } ; GENTICS . Aloha . Ribbon . prototype . addButton = function ( button ) { if ( typeof button . menu === "object" ) { var menu = new Ext . menu . Menu ( ) ; jQuery . each ( button . menu , function ( index , entry ) { menu . addItem ( new Ext . menu . Item ( { text : entry . label , icon : entry . icon , iconCls : entry . iconClass , handler : function ( ) { entry . onclick . apply ( entry ) } } ) ) } ) } var buttonConfig = { text : button . label , enableToggle : button . toggle , icon : button . icon , pressed : button . pressed , iconCls : button . iconClass , menu : menu , handler : function ( ) { if ( typeof button . onclick === "function" ) { button . onclick . apply ( button ) } button . pressed = ! button . pressed } } ; var extButton ; if ( menu && typeof button . onclick == "function" ) { extButton = new Ext . SplitButton ( buttonConfig ) } else { extButton = new Ext . Button ( buttonConfig ) } this . toolbar . insert ( this . toolbar . items . getCount ( ) - 3 , extButton ) } ; GENTICS . Aloha . Ribbon . prototype . addSeparator = function ( ) { this . toolbar . insert ( this . toolbar . items . getCount ( ) - 3 , new Ext . Toolbar . Separator ( ) ) } ; GENTICS . Aloha . Ribbon . prototype . init = function ( ) { this . toolbar . render ( document . body , 0 ) ; if ( GENTICS . Aloha . settings . ribbon !== false ) { jQuery ( "body" ) . css ( "paddingTop" , "30px !important" ) ; this . show ( ) } } ; GENTICS . Aloha . Ribbon . prototype . hide = function ( ) { jQuery ( ".GENTICS_ribbon" ) . fadeOut ( ) } ; GENTICS . Aloha . Ribbon . prototype . show = function ( ) { jQuery ( ".GENTICS_ribbon" ) . fadeIn ( ) } ; GENTICS . Aloha . Ribbon = new GENTICS . Aloha . Ribbon ( ) ;
/ *
* Aloha Editor
* Author & Copyright ( c ) 2010 Gentics Software GmbH
* aloha - sales @ gentics . com
* Licensed unter the terms of http : //www.aloha-editor.com/license.html
* /
GENTICS . Aloha . Event = function ( eventName , eventSource , properties ) { this . name = eventName ; if ( eventSource ) { this . source = eventSource } else { this . source = GENTICS . Aloha } this . properties = properties } ; GENTICS . Aloha . EventRegistry = function ( ) { } ; GENTICS . Aloha . EventRegistry . prototype . subscribe = function ( eventSource , eventName , handleMethod ) { jQuery ( eventSource ) . bind ( eventName , handleMethod ) } ; GENTICS . Aloha . EventRegistry . prototype . trigger = function ( event ) { jQuery ( event . source ) . trigger ( event . name , event . properties ) } ; GENTICS . Aloha . EventRegistry = new GENTICS . Aloha . EventRegistry ( ) ;
/ *
* Aloha Editor
* Author & Copyright ( c ) 2010 Gentics Software GmbH
* aloha - sales @ gentics . com
* Licensed unter the terms of http : //www.aloha-editor.com/license.html
* /
GENTICS . Aloha . FloatingMenu = { } ; GENTICS . Aloha . FloatingMenu . scopes = { "GENTICS.Aloha.empty" : { name : "GENTICS.Aloha.empty" , extendedScopes : [ ] , buttons : [ ] } , "GENTICS.Aloha.global" : { name : "GENTICS.Aloha.global" , extendedScopes : [ "GENTICS.Aloha.empty" ] , buttons : [ ] } , "GENTICS.Aloha.continuoustext" : { name : "GENTICS.Aloha.continuoustext" , extendedScopes : [ "GENTICS.Aloha.global" ] , buttons : [ ] } } ; GENTICS . Aloha . FloatingMenu . tabs = new Array ( ) ; GENTICS . Aloha . FloatingMenu . tabMap = { } ; GENTICS . Aloha . FloatingMenu . initialized = false ; GENTICS . Aloha . FloatingMenu . allButtons = new Array ( ) ; GENTICS . Aloha . FloatingMenu . top = 100 ; GENTICS . Aloha . FloatingMenu . left = 100 ; GENTICS . Aloha . FloatingMenu . pinned = false ; GENTICS . Aloha . FloatingMenu . init = function ( ) { this . currentScope = "GENTICS.Aloha.global" ; var that = this ; jQuery ( window ) . unload ( function ( ) { if ( that . pinned ) { jQuery . cookie ( "GENTICS.Aloha.FloatingMenu.pinned" , "true" ) ; jQuery . cookie ( "GENTICS.Aloha.FloatingMenu.top" , that . obj . offset ( ) . top ) ; jQuery . cookie ( "GENTICS.Aloha.FloatingMenu.left" , that . obj . offset ( ) . left ) ; if ( GENTICS . Aloha . Log . isInfoEnabled ( ) ) { GENTICS . Aloha . Log . info ( this , "stored FloatingMenu pinned position {" + that . obj . offset ( ) . left + ", " + that . obj . offset ( ) . top + "}" ) } } else { jQuery . cookie ( "GENTICS.Aloha.FloatingMenu.pinned" , null ) ; jQuery . cookie ( "GENTICS.Aloha.FloatingMenu.top" , null ) ; jQuery . cookie ( "GENTICS.Aloha.FloatingMenu.left" , null ) } if ( that . userActivatedTab ) { jQuery . cookie ( "GENTICS.Aloha.FloatingMenu.activeTab" , that . userActivatedTab ) } } ) . resize ( function ( ) { var target = that . calcFloatTarget ( GENTICS . Aloha . Selection . getRangeObject ( ) ) ; if ( target ) { that . floatTo ( target ) } } ) ; this . generateComponent ( ) ; this . initialized = true } ; GENTICS . Aloha . FloatingMenu . obj = null ; GENTICS . Aloha . FloatingMenu . shadow = null ; GENTICS . Aloha . FloatingMenu . panelBody = null ; GENTICS . Aloha . FloatingMenu . generateComponent = function ( ) { var that = this ; Ext . QuickTips . init ( ) ; Ext . apply ( Ext . QuickTips . getQuickTip ( ) , { minWidth : 10 } ) ; if ( this . extTabPanel ) { } this . extTabPanel = new Ext . TabPanel ( { activeTab : 0 , width : 400 , plain : false , draggable : { insertProxy : false , onDrag : function ( e ) { var pel = this . proxy . getEl ( ) ; this . x = pel . getLeft ( true ) ; this . y = pel . getTop ( true ) ; GENTICS . Aloha . FloatingMenu . shadow . hide ( ) } , endDrag : function ( e ) { if ( GENTICS . Aloha . FloatingMenu . pinned ) { var top = this . y - jQuery ( document ) . scrollTop ( ) } else { var top = this . y } that . left = this . x ; that . top = top ; this . panel . setPosition ( this . x , top ) ; GENTICS . Aloha . FloatingMenu . refreshShadow ( ) ; GENTICS . Aloha . FloatingMenu . shadow . show ( ) } } , floating : true , defaults : { autoScroll : true } , layoutOnTabChange : true , shadow : false , cls : "GENTICS_floatingmenu ext-root" , listeners : { tabchange : { fn : function ( tabPanel , tab ) { if ( tab . title != that . autoActivatedTab ) { if ( GENTICS . Aloha . Log . isDebugEnabled ( ) ) { GENTICS . Aloha . Log . debug ( that , "User selected tab " + tab . title ) } that . userActivatedTab = tab . title } else { if ( GENTICS . Aloha . Log . isDebugEnabled ( ) ) { GENTICS . Aloha . Log . debug ( that , "Tab " + tab . title + " was activated automatically" ) } } that . autoActivatedTab = undefined ; jQuery . each ( that . allButtons , function ( index , buttonInfo ) { if ( typeof buttonInfo . button != "undefined" && typeof buttonInfo . button . extButton != "undefined" && typeof buttonInfo . button . extButton . setActiveDOMElement == "function" ) { if ( typeof buttonInfo . button . extButton . activeDOMElement != "undefined" ) { buttonInfo . button . extButton . setActiveDOMElement ( buttonInfo . button . extButton . activeDOMElement ) } } } ) ; GENTICS . Aloha . FloatingMenu . shadow . show ( ) ; GENTICS . Aloha . FloatingMenu . refreshShadow ( ) } } } , enableTabScroll : true } ) ; jQuery . each ( this . tabs , function ( index , tab ) { that . extTabPanel . add ( tab . getExtComponent ( ) ) } ) ; jQuery ( "body" ) . append ( '<div id="GENTICS_floatingmenu_shadow" class="GENTICS_shadow"> </div>' ) ; this . shadow = jQuery ( "#GENTICS_floatingmenu_shadow" ) ; var pinTab = this . extTabPanel . add ( { title : " " } ) ; this . extTabPanel . render ( document . body ) ; jQuery ( pinTab . tabEl ) . addClass ( "GENTICS_floatingmenu_pin" ) . html ( " " ) . mousedown ( function ( e ) { that . togglePin ( ) ; e . stopPropagation ( ) } ) ; this . panelBody = jQuery ( ".GENTICS_floatingmenu .x-tab-panel-bwrap" ) ; this . doLayout ( ) ; this . obj = jQuery ( this . extTabPanel . getEl ( ) . dom ) ; if ( jQuery . cookie ( "GENTICS.Aloha.FloatingMenu.pinned" ) == "true" ) { this . togglePin ( ) ; this . top = parseInt ( jQuery . cookie ( " GENTICS . Aloha
/ *
* Aloha Editor
* Author & Copyright ( c ) 2010 Gentics Software GmbH
* aloha - sales @ gentics . com
* Licensed unter the terms of http : //www.aloha-editor.com/license.html
* /
} jQuery . fn . aloha = function ( ) { return this . each ( function ( ) { new GENTICS . Aloha . Editable ( jQuery ( this ) ) } ) } ; jQuery . fn . GENTICS _aloha = function ( ) { return this . each ( function ( ) { new GENTICS . Aloha . Editable ( jQuery ( this ) ) } ) } ; jQuery . fn . mahalo = function ( ) { return this . each ( function ( ) { if ( jQuery ( this ) . hasClass ( "GENTICS_editable" ) ) { for ( var i = 0 ; i < GENTICS . Aloha . editables . length ; i ++ ) { if ( GENTICS . Aloha . editables [ i ] . obj . get ( 0 ) === this ) { GENTICS . Aloha . editables [ i ] . destroy ( ) } } } } ) } ; jQuery . fn . GENTICS _mahalo = function ( ) { return this . each ( function ( ) { var that = this } ) } ; jQuery . fn . GENTICS _contentEditableSelectionChange = function ( callback ) { var that = this ; this . keyup ( function ( event ) { var rangeObject = GENTICS . Aloha . Selection . getRangeObject ( ) ; callback ( event ) } ) ; this . dblclick ( function ( event ) { callback ( event ) } ) ; this . mousedown ( function ( event ) { that . selectionStarted = true } ) ; jQuery ( document ) . mouseup ( function ( event ) { GENTICS . Aloha . Selection . eventOriginalTarget = that ; if ( that . selectionStarted ) { callback ( event ) } GENTICS . Aloha . Selection . eventOriginalTarget = false ; that . selectionStarted = false } ) ; return this } ; jQuery . fn . outerHTML = function ( s ) { if ( s ) { return this . before ( s ) . remove ( ) } else { return jQuery ( "<p>" ) . append ( this . eq ( 0 ) . clone ( ) ) . html ( ) } } ;
/ *
* Aloha Editor
* Author & Copyright ( c ) 2010 Gentics Software GmbH
* aloha - sales @ gentics . com
* Licensed unter the terms of http : //www.aloha-editor.com/license.html
* /
GENTICS . Aloha . Log = function ( ) { } ; GENTICS . Aloha . Log . prototype . logHistory = null ; GENTICS . Aloha . Log . prototype . highWaterMarkReached = false ; GENTICS . Aloha . Log . prototype . init = function ( ) { if ( typeof GENTICS . Aloha . settings . logLevels == "undefined" || ! GENTICS . Aloha . settings . logLevels ) { GENTICS . Aloha . settings . logLevels = { error : true , warn : true } } if ( typeof GENTICS . Aloha . settings . logHistory == "undefined" || ! GENTICS . Aloha . settings . logHistory ) { GENTICS . Aloha . settings . logHistory = { } } if ( ! GENTICS . Aloha . settings . logHistory . maxEntries ) { GENTICS . Aloha . settings . logHistory . maxEntries = 100 } if ( ! GENTICS . Aloha . settings . logHistory . highWaterMark ) { GENTICS . Aloha . settings . logHistory . highWaterMark = 90 } if ( ! GENTICS . Aloha . settings . logHistory . levels ) { GENTICS . Aloha . settings . logHistory . levels = { error : true , warn : true } } this . flushLogHistory ( ) } ; GENTICS . Aloha . Log . prototype . log = function ( level , component , message ) { if ( typeof level == "undefined" || ! level ) { level = "error" } level = level . toLowerCase ( ) ; if ( ! GENTICS . Aloha . settings . logLevels [ level ] ) { return } this . addToLogHistory ( { level : level , component : component . toString ( ) , message : message , date : new Date ( ) } ) ; switch ( level ) { case "error" : if ( window . console && console . error ) { console . error ( component . toString ( ) + ": " + message ) } break ; case "warn" : if ( window . console && console . warn ) { console . warn ( component . toString ( ) + ": " + message ) } break ; case "info" : if ( window . console && console . info ) { console . info ( component . toString ( ) + ": " + message ) } break ; case "debug" : if ( window . console && console . log ) { console . log ( component . toString ( ) + " [" + level + "]: " + message ) } break ; default : if ( window . console && console . log ) { console . log ( component . toString ( ) + " [" + level + "]: " + message ) } break } } ; GENTICS . Aloha . Log . prototype . error = function ( component , message ) { this . log ( "error" , component , message ) } ; GENTICS . Aloha . Log . prototype . warn = function ( component , message ) { this . log ( "warn" , component , message ) } ; GENTICS . Aloha . Log . prototype . info = function ( component , message ) { this . log ( "info" , component , message ) } ; GENTICS . Aloha . Log . prototype . debug = function ( component , message ) { this . log ( "debug" , component , message ) } ; GENTICS . Aloha . Log . prototype . isLogLevelEnabled = function ( level ) { return GENTICS . Aloha . settings && GENTICS . Aloha . settings . logLevels && ( GENTICS . Aloha . settings . logLevels [ level ] == true ) } ; GENTICS . Aloha . Log . prototype . isErrorEnabled = function ( ) { return this . isLogLevelEnabled ( "error" ) } ; GENTICS . Aloha . Log . prototype . isWarnEnabled = function ( ) { return this . isLogLevelEnabled ( "warn" ) } ; GENTICS . Aloha . Log . prototype . isInfoEnabled = function ( ) { return this . isLogLevelEnabled ( "info" ) } ; GENTICS . Aloha . Log . prototype . isDebugEnabled = function ( ) { return this . isLogLevelEnabled ( "debug" ) } ; GENTICS . Aloha . Log . prototype . addToLogHistory = function ( entry ) { if ( GENTICS . Aloha . settings . logHistory . maxEntries <= 0 ) { return } if ( ! GENTICS . Aloha . settings . logHistory . levels [ entry . level ] ) { return } this . logHistory . push ( entry ) ; if ( this . highWaterMarkReached == false ) { if ( this . logHistory . length >= GENTICS . Aloha . settings . logHistory . maxEntries * GENTICS . Aloha . settings . logHistory . highWaterMark / 100 ) { GENTICS . Aloha . EventRegistry . trigger ( new GENTICS . Aloha . Event ( "logFull" , GENTICS . Aloha . Log ) ) ; this . highWaterMarkReached = true } } while ( this . logHistory . length > GENTICS . Aloha . settings . logHistory . maxEntries ) { this . logHistory . shift ( ) } } ; GENTICS . Aloha . Log . prototype . getLogHistory = function ( ) { return this . logHistory } ; GENTICS . Aloha . Log . prototype . flushLogHistory = function ( ) { this . logHistory = new Array ( ) ; this . highWaterMarkReached = false } ; GENTICS . Aloha . Log = new GENTICS . Aloha . Log ( ) ;
/ *
* Aloha Editor
* Author & Copyright ( c ) 2010 Gentics Software GmbH
* aloha - sales @ gentics . com
* Licensed unter the terms of http : //www.aloha-editor.com/license.html
* /
GENTICS . Aloha . Markup = function ( ) { } ; GENTICS . Aloha . Markup . prototype . keyHandlers = { } ; GENTICS . Aloha . Markup . prototype . addKeyHandler = function ( keyCode , handler ) { if ( ! this . keyHandlers [ keyCode ] ) { this . keyHandlers [ keyCode ] = [ ] } this . keyHandlers [ keyCode ] . push ( handler ) } ; GENTICS . Aloha . Markup . prototype . insertBreak = function ( ) { var range = GENTICS . Aloha . Selection . rangeObject ; if ( ! range . isCollapsed ( ) ) { this . removeSelectedMarkup ( ) } var newBreak = jQuery ( "<br/>" ) ; GENTICS . Utils . Dom . insertIntoDOM ( newBreak , range , GENTICS . Aloha . activeEditable . obj ) ; var nextTextNode = GENTICS . Utils . Dom . searchAdjacentTextNode ( newBreak . parent ( ) . get ( 0 ) , GENTICS . Utils . Dom . getIndexInParent ( newBreak . get ( 0 ) ) + 1 , false ) ; if ( nextTextNode ) { var nonWSIndex = nextTextNode . data . search ( /\S/ ) ; if ( nonWSIndex > 0 ) { nextTextNode . data = nextTextNode . data . substring ( nonWSIndex ) } } range . startContainer = range . endContainer = newBreak . get ( 0 ) . parentNode ; range . startOffset = range . endOffset = GENTICS . Utils . Dom . getIndexInParent ( newBreak . get ( 0 ) ) + 1 ; range . correctRange ( ) ; range . clearCaches ( ) ; range . select ( ) } ; GENTICS . Aloha . Markup . prototype . preProcessKeyStrokes = function ( event ) { if ( event . type != "keydown" ) { return false } var rangeObject = GENTICS . Aloha . Selection . rangeObject ; if ( this . keyHandlers [ event . keyCode ] ) { var handlers = this . keyHandlers [ event . keyCode ] ; for ( var i = 0 ; i < handlers . length ; ++ i ) { if ( ! handlers [ i ] ( event ) ) { return false } } } switch ( event . keyCode ) { case 13 : if ( event . shiftKey ) { GENTICS . Aloha . Log . debug ( this , "... got a smoking Shift+Enter, Cowboy" ) ; if ( ! rangeObject . isCollapsed ( ) ) { this . removeSelectedMarkup ( ) } GENTICS . Aloha . Selection . updateSelection ( false , true ) ; this . processShiftEnter ( rangeObject ) ; return false } else { GENTICS . Aloha . Log . debug ( this , "... got a lonely Enter, Mum" ) ; if ( ! rangeObject . isCollapsed ( ) ) { this . removeSelectedMarkup ( ) } GENTICS . Aloha . Selection . updateSelection ( false , true ) ; this . processEnter ( rangeObject ) ; return false } break } return true } ; GENTICS . Aloha . Markup . prototype . processShiftEnter = function ( rangeObject ) { this . insertHTMLBreak ( rangeObject . getSelectionTree ( ) , rangeObject ) } ; GENTICS . Aloha . Markup . prototype . processEnter = function ( rangeObject ) { if ( rangeObject . splitObject ) { if ( jQuery . browser . msie && GENTICS . Utils . Dom . isListElement ( rangeObject . splitObject ) ) { jQuery ( rangeObject . splitObject ) . append ( jQuery ( document . createTextNode ( "" ) ) ) } this . splitRangeObject ( rangeObject ) } else { this . insertHTMLBreak ( rangeObject . getSelectionTree ( ) , rangeObject ) } } ; GENTICS . Aloha . Markup . prototype . insertHTMLCode = function ( html ) { var rangeObject = GENTICS . Aloha . Selection . rangeObject ; this . insertHTMLBreak ( rangeObject . getSelectionTree ( ) , rangeObject , jQuery ( html ) ) } ; GENTICS . Aloha . Markup . prototype . insertHTMLBreak = function ( selectionTree , rangeObject , inBetweenMarkup ) { inBetweenMarkup = inBetweenMarkup ? inBetweenMarkup : jQuery ( "<br />" ) ; for ( var i = 0 ; i < selectionTree . length ; i ++ ) { var el = selectionTree [ i ] ; var jqEl = el . domobj ? jQuery ( el . domobj ) : undefined ; if ( el . selection !== "none" ) { if ( el . selection == "collapsed" ) { if ( i > 0 ) { var jqElBefore = jQuery ( selectionTree [ i - 1 ] . domobj ) ; jqElBefore . after ( inBetweenMarkup ) } else { var jqElAfter = jQuery ( selectionTree [ 1 ] . domobj ) ; jqElAfter . before ( inBetweenMarkup ) } rangeObject . startContainer = rangeObject . endContainer = inBetweenMarkup [ 0 ] . parentNode ; rangeObject . startOffset = rangeObject . endOffset = GENTICS . Utils . Dom . getIndexInParent ( inBetweenMarkup [ 0 ] ) + 1 ; rangeObject . correctRange ( ) } else { if ( el . domobj && el . domobj . nodeType === 3 ) { if ( el . domobj . nextSibling && el . domobj . nextSibling . nodeType == 1 && GENTICS . Aloha . Selection . replacingElements [ el . domobj . nextSibling . nodeName . toLowerCase ( ) ] ) { jqEl . after ( "<br/>" ) } var checkObj = el . domobj ; while ( checkObj ) { if ( checkObj . nextSibling ) { checkObj = false } else { checkObj = checkObj . parentNode ; if ( checkObj === rangeObject . limitObject ) { checkObj = false } if ( GENTICS . Utils . Dom . isBlockLevelElement ( checkObj ) ) { break } } } if ( checkObj ) { jQuery ( checkObj ) . append ( "<br/>" ) } jqEl . between ( inBetweenMarkup , el . startOffset ) ; var offset = 0 ; var tmpObject = inBetweenMarkup [ 0 ] ; while ( tmpObject ) { tmpObject = tmpObject . previousSibling ; offset ++ } rangeObject . startContainer = inBetweenMarkup [ 0 ] . parentNode ; rangeObject . endContainer = inBetweenMarkup [ 0 ] . parentNode ; rangeObject . startOffset = offset ; rangeObject . endOffset = offset ; rangeObject . correctRange ( ) } else { if (
/ *
* Aloha Editor
* Author & Copyright ( c ) 2010 Gentics Software GmbH
* aloha - sales @ gentics . com
* Licensed unter the terms of http : //www.aloha-editor.com/license.html
* /
GENTICS . Aloha . Message = function ( data ) { this . title = data . title ; this . text = data . text ; this . type = data . type ; this . callback = data . callback } ; GENTICS . Aloha . Message . Type = { CONFIRM : "confirm" , ALERT : "alert" , WAIT : "wait" } ; GENTICS . Aloha . Message . prototype . toString = function ( ) { return this . type + ": " + this . message } ; GENTICS . Aloha . MessageLine = function ( ) { this . messages = new Array ( ) } ; GENTICS . Aloha . MessageLine . prototype . add = function ( message ) { this . messages [ this . messages . length ] = message ; while ( this . messages . length > 4 ) { this . messages . shift ( ) } jQuery ( "#gtx_aloha_messageline" ) . html ( "" ) ; for ( var i = 0 ; i < this . messages . length ; i ++ ) { jQuery ( "#gtx_aloha_messageline" ) . append ( ( this . messages [ i ] . toString ( ) + "<br/>" ) ) } } ; GENTICS . Aloha . MessageLine = new GENTICS . Aloha . MessageLine ( ) ;
/ *
* Aloha Editor
* Author & Copyright ( c ) 2010 Gentics Software GmbH
* aloha - sales @ gentics . com
* Licensed unter the terms of http : //www.aloha-editor.com/license.html
* /
GENTICS . Aloha . PluginRegistry = function ( ) { this . plugins = new Array ( ) } ; GENTICS . Aloha . PluginRegistry . prototype . register = function ( plugin ) { if ( plugin instanceof GENTICS . Aloha . Plugin ) { this . plugins . push ( plugin ) } } ; GENTICS . Aloha . PluginRegistry . prototype . init = function ( ) { for ( var i = 0 ; i < this . plugins . length ; i ++ ) { var plugin = this . plugins [ i ] ; if ( GENTICS . Aloha . settings . plugins == undefined ) { GENTICS . Aloha . settings . plugins = { } } plugin . settings = GENTICS . Aloha . settings . plugins [ plugin . prefix ] ; if ( plugin . settings == undefined ) { plugin . settings = { } } if ( plugin . settings . enabled == undefined ) { plugin . settings . enabled = true } var actualLanguage = plugin . languages ? GENTICS . Aloha . getLanguage ( GENTICS . Aloha . settings . i18n . current , plugin . languages ) : null ; if ( ! actualLanguage ) { GENTICS . Aloha . Log . warn ( this , "Could not determine actual language, no languages available for plugin " + plugin ) } else { var fileUrl = GENTICS . Aloha . settings . base + "plugins/" + plugin . basePath + "/i18n/" + actualLanguage + ".dict" ; GENTICS . Aloha . loadI18nFile ( fileUrl , plugin ) } if ( plugin . settings . enabled == true ) { this . plugins [ i ] . init ( ) } } } ; GENTICS . Aloha . PluginRegistry . prototype . makeClean = function ( obj ) { for ( var i = 0 ; i < this . plugins . length ; i ++ ) { var plugin = this . plugins [ i ] ; if ( GENTICS . Aloha . Log . isDebugEnabled ( ) ) { GENTICS . Aloha . Log . debug ( this , "Passing contents of HTML Element with id { " + obj . attr ( "id" ) + " } for cleaning to plugin { " + plugin . prefix + " }" ) } plugin . makeClean ( obj ) } } ; GENTICS . Aloha . PluginRegistry = new GENTICS . Aloha . PluginRegistry ( ) ; GENTICS . Aloha . PluginRegistry . toString = function ( ) { return "com.gentics.aloha.PluginRegistry" } ; GENTICS . Aloha . Plugin = function ( pluginPrefix , basePath ) { this . prefix = pluginPrefix ; this . basePath = basePath ? basePath : pluginPrefix ; GENTICS . Aloha . PluginRegistry . register ( this ) } ; GENTICS . Aloha . Plugin . prototype . settings = null ; GENTICS . Aloha . Plugin . prototype . init = function ( ) { } ; GENTICS . Aloha . Plugin . prototype . getEditableConfig = function ( obj ) { var config = [ ] ; var configSpecified = false ; if ( this . settings . editables ) { jQuery . each ( this . settings . editables , function ( selector , selectorConfig ) { if ( obj . is ( selector ) ) { configSpecified = true ; config = jQuery . merge ( config , selectorConfig ) } } ) } if ( ! configSpecified ) { if ( this . settings . config == "undefined" || ! this . settings . config ) { config = this . config } else { config = this . settings . config } } return config } ; GENTICS . Aloha . Plugin . prototype . makeClean = function ( obj ) { } ; GENTICS . Aloha . Plugin . prototype . getUID = function ( id ) { return this . prefix + "." + id } ; GENTICS . Aloha . Plugin . prototype . i18n = function ( key , replacements ) { return GENTICS . Aloha . i18n ( this , key , replacements ) } ; GENTICS . Aloha . Plugin . prototype . toString = function ( ) { return this . prefix } ; GENTICS . Aloha . Plugin . prototype . log = function ( level , message ) { GENTICS . Aloha . Log . log ( level , this , message ) } ;
/ *
* Aloha Editor
* Author & Copyright ( c ) 2010 Gentics Software GmbH
* aloha - sales @ gentics . com
* Licensed unter the terms of http : //www.aloha-editor.com/license.html
* /
jQuery . fn . zap = function ( ) { return this . each ( function ( ) { jQuery ( this . childNodes ) . insertBefore ( this ) } ) . remove ( ) } ; jQuery . fn . textNodes = function ( excludeBreaks , includeEmptyTextNodes ) { var ret = [ ] ; ( function ( el ) { if ( ( el . nodeType == 3 && jQuery . trim ( el . data ) != "" && ! includeEmptyTextNodes ) || ( el . nodeType == 3 && includeEmptyTextNodes ) || ( el . nodeName == "BR" && ! excludeBreaks ) ) { ret . push ( el ) } else { for ( var i = 0 ; i < el . childNodes . length ; ++ i ) { arguments . callee ( el . childNodes [ i ] ) } } } ) ( this [ 0 ] ) ; return jQuery ( ret ) } ; GENTICS . Aloha . Selection = function ( ) { this . rangeObject = new Object ( ) ; this . tagHierarchy = { textNode : [ ] , abbr : [ "textNode" ] , b : [ "textNode" , "b" , "i" , "em" , "sup" , "sub" , "br" , "span" , "img" , "a" , "del" , "ins" , "u" , "cite" , "q" , "code" , "abbr" , "strong" ] , pre : [ "textNode" , "b" , "i" , "em" , "sup" , "sub" , "br" , "span" , "img" , "a" , "del" , "ins" , "u" , "cite" , "q" , "code" , "abbr" , "code" ] , blockquote : [ "textNode" , "b" , "i" , "em" , "sup" , "sub" , "br" , "span" , "img" , "a" , "del" , "ins" , "u" , "cite" , "q" , "code" , "abbr" , "p" , "h1" , "h2" , "h3" , "h4" , "h5" , "h6" ] , ins : [ "textNode" , "b" , "i" , "em" , "sup" , "sub" , "br" , "span" , "img" , "a" , "u" , "p" , "h1" , "h2" , "h3" , "h4" , "h5" , "h6" ] , ul : [ "li" ] , ol : [ "li" ] , li : [ "textNode" , "b" , "i" , "em" , "sup" , "sub" , "br" , "span" , "img" , "ul" , "ol" , "h1" , "h2" , "h3" , "h4" , "h5" , "h6" , "del" , "ins" , "u" ] , tr : [ "td" , "th" ] , table : [ "tr" ] , div : [ "textNode" , "b" , "i" , "em" , "sup" , "sub" , "br" , "span" , "img" , "ul" , "ol" , "table" , "h1" , "h2" , "h3" , "h4" , "h5" , "h6" , "del" , "ins" , "u" , "p" , "div" , "pre" , "blockquote" ] , h1 : [ "textNode" , "b" , "i" , "em" , "sup" , "sub" , "br" , "span" , "img" , "a" , "del" , "ins" , "u" ] } ; this . tagHierarchy = { textNode : this . tagHierarchy . textNode , abbr : this . tagHierarchy . abbr , br : this . tagHierarchy . textNode , img : this . tagHierarchy . textNode , b : this . tagHierarchy . b , strong : this . tagHierarchy . b , code : this . tagHierarchy . b , q : this . tagHierarchy . b , blockquote : this . tagHierarchy . blockquote , cite : this . tagHierarchy . b , i : this . tagHierarchy . b , em : this . tagHierarchy . b , sup : this . tagHierarchy . b , sub : this . tagHierarchy . b , span : this . tagHierarchy . b , del : this . tagHierarchy . del , ins : this . tagHierarchy . ins , u : this . tagHierarchy . b , p : this . tagHierarchy . b , pre : this . tagHierarchy . pre , a : this . tagHierarchy . b , ul : this . tagHierarchy . ul , ol : this . tagHierarchy . ol , li : this . tagHierarchy . li , td : this . tagHierarchy . li , div : this . tagHierarchy . div , h1 : this . tagHierarchy . h1 , h2 : this . tagHierarchy . h1 , h3 : this . tagHierarchy . h1 , h4 : this . tagHierarchy . h1 , h5 : this . tagHierarchy . h1 , h6 : this . tagHierarchy . h1 , table : this . tagHierarchy . table } ; this . replacingElements = { h1 : [ "p" , "h1" , "h2" , "h3" , "h4" , "h5" , "h6" , "pre" ] , blockquote : [ "blockquote" ] } ; this . replacingElements = { h1 : this . replacingElements . h1 , h2 : this . replacingElements . h1 , h3 : this . replacingElements . h1 , h4 : this . replacingElements . h1 , h5 : this . replacingElements . h1 , h6 : this . replacingElements . h1 , pre : this . replacingElements . h1 , p : this . replacingElements . h1 , blockquote : this . replacingElements . blockquote } ; this . allowedToStealElements = { h1 : [ "textNode" ] } ; this . allowedToStealElements = { h1 : this . allowedToStealElements . h1 , h2 : this . allowedToStealElements . h1 , h3 : this . allowedToStealElements . h1 , h4 : this . allowedToStealElements . h1 , h5 : this . allowedToStealElements . h1 , h6 : this . allowedToStealElements . h1 , p : this . tagHierarchy . b } } ; GENTICS . Aloha . Selection . prototype . SelectionTree = function ( ) { this . domobj = new Object ( ) ; this . selection ; this . children = new Array ( ) } ; GENTICS . Aloha . Selection . prototype . onChange = function ( objectClicked , event ) { if ( this . updateSelectionTimeout ) { window . clearTimeout ( this . updateSelectionTimeout ) ; this . updateSelectionTimeout = undefined } this . updateSelectionTimeout = window . setTimeout ( function ( ) { GENTICS . Aloha . Selection . updateSelection ( event ) } , 5 ) } ; GENTICS . Aloha . Selection . prototype . updateSelection = function ( event ) { var rangeObject = this . rangeObject = new GENTICS . Aloha . Selection . SelectionRange ( true ) ; rangeObject . update ( ) ; GENTICS . Aloha . FloatingMenu . setScope ( "GENTICS.Aloha.continuoustext" ) ; GENTICS . Aloha . EventRegistry . trigger ( new GENTICS . Aloha . Event ( "selectionChanged" , GENTICS . Aloha , [ rangeObject , event ] ) ) ; return true } ; GENTICS . Aloha . Selection . prototype . getSelectionTree = function ( rangeObject ) { if ( ! rangeObject ) { return this . rangeObject . getSelectionTree ( ) } if ( ! rangeObject . commonAncestorContainer ) { GENTICS . Aloha . Log . error ( this , "the rangeObject is missing the commonAncestorContainer" ) ; return false } this . ins
/ *
* Aloha Editor
* Author & Copyright ( c ) 2010 Gentics Software GmbH
* aloha - sales @ gentics . com
* Licensed unter the terms of http : //www.aloha-editor.com/license.html
* /
GENTICS . Aloha . Sidebar = function ( ) { } ; GENTICS . Aloha . Sidebar . prototype . add = function ( panel ) { } ; GENTICS . Aloha . Sidebar . prototype . render = function ( ) { } ; GENTICS . Aloha . Sidebar . prototype . openPanel = function ( panel ) { } ; GENTICS . Aloha . Sidebar . prototype . closePanel = function ( panel ) { } ; GENTICS . Aloha . Sidebar . prototype . togglePinPanel = function ( panel ) { } ; GENTICS . Aloha . SidebarRight = new GENTICS . Aloha . Sidebar ( ) ; GENTICS . Aloha . SidebarLeft = new GENTICS . Aloha . Sidebar ( ) ; GENTICS . Aloha . Sidebar . Panel = function ( ) { } ; GENTICS . Aloha . Sidebar . Panel . prototype . render = function ( ) { } ; ( function ( $ ) { $ . fn . extend ( { autocomplete : function ( urlOrData , options ) { var isUrl = typeof urlOrData == "string" ; options = $ . extend ( { } , $ . Autocompleter . defaults , { url : isUrl ? urlOrData : null , data : isUrl ? null : urlOrData , delay : isUrl ? $ . Autocompleter . defaults . delay : 10 , max : options && ! options . scroll ? 10 : 150 } , options ) ; options . highlight = options . highlight || function ( value ) { return value } ; options . formatMatch = options . formatMatch || options . formatItem ; return this . each ( function ( ) { new $ . Autocompleter ( this , options ) } ) } , result : function ( handler ) { return this . bind ( "result" , handler ) } , search : function ( handler ) { return this . trigger ( "search" , [ handler ] ) } , flushCache : function ( ) { return this . trigger ( "flushCache" ) } , setOptions : function ( options ) { return this . trigger ( "setOptions" , [ options ] ) } , unautocomplete : function ( ) { return this . trigger ( "unautocomplete" ) } } ) ; $ . Autocompleter = function ( input , options ) { var KEY = { UP : 38 , DOWN : 40 , DEL : 46 , TAB : 9 , RETURN : 13 , ESC : 27 , COMMA : 188 , PAGEUP : 33 , PAGEDOWN : 34 , BACKSPACE : 8 } ; var $input = $ ( input ) . attr ( "autocomplete" , "off" ) . addClass ( options . inputClass ) ; var timeout ; var previousValue = "" ; var cache = $ . Autocompleter . Cache ( options ) ; var hasFocus = 0 ; var lastKeyPressCode ; var config = { mouseDownOnSelect : false } ; var select = $ . Autocompleter . Select ( options , input , selectCurrent , config ) ; var blockSubmit ; $ . browser . opera && $ ( input . form ) . bind ( "submit.autocomplete" , function ( ) { if ( blockSubmit ) { blockSubmit = false ; return false } } ) ; $input . bind ( ( $ . browser . opera ? "keypress" : "keydown" ) + ".autocomplete" , function ( event ) { hasFocus = 1 ; lastKeyPressCode = event . keyCode ; switch ( event . keyCode ) { case KEY . UP : event . preventDefault ( ) ; if ( select . visible ( ) ) { select . prev ( ) } else { onChange ( 0 , true ) } break ; case KEY . DOWN : event . preventDefault ( ) ; if ( select . visible ( ) ) { select . next ( ) } else { onChange ( 0 , true ) } break ; case KEY . PAGEUP : event . preventDefault ( ) ; if ( select . visible ( ) ) { select . pageUp ( ) } else { onChange ( 0 , true ) } break ; case KEY . PAGEDOWN : event . preventDefault ( ) ; if ( select . visible ( ) ) { select . pageDown ( ) } else { onChange ( 0 , true ) } break ; case options . multiple && $ . trim ( options . multipleSeparator ) == "," && KEY . COMMA : case KEY . TAB : case KEY . RETURN : if ( selectCurrent ( ) ) { event . preventDefault ( ) ; blockSubmit = true ; return false } break ; case KEY . ESC : select . hide ( ) ; break ; default : clearTimeout ( timeout ) ; timeout = setTimeout ( onChange , options . delay ) ; break } } ) . focus ( function ( ) { hasFocus ++ } ) . blur ( function ( ) { hasFocus = 0 ; if ( ! config . mouseDownOnSelect ) { hideResults ( ) } } ) . click ( function ( ) { if ( hasFocus ++ > 1 && ! select . visible ( ) ) { onChange ( 0 , true ) } } ) . bind ( "search" , function ( ) { var fn = ( arguments . length > 1 ) ? arguments [ 1 ] : null ; function findValueCallback ( q , data ) { var result ; if ( data && data . length ) { for ( var i = 0 ; i < data . length ; i ++ ) { if ( data [ i ] . result . toLowerCase ( ) == q . toLowerCase ( ) ) { result = data [ i ] ; break } } } if ( typeof fn == "function" ) { fn ( result ) } else { $input . trigger ( "result" , result && [ result . data , result . value ] ) } } $ . each ( trimWords ( $input . val ( ) ) , function ( i , value ) { request ( value , findValueCallback , findValueCallback ) } ) } ) . bind ( "flushCache" , function ( ) { cache . flush ( ) } ) . bind ( "setOptions" , function ( ) { $ . extend ( options , arguments [ 1 ] ) ; if ( "data" in arguments [ 1 ] ) { cache . populate ( ) } } ) . bind ( "unautocomplete" , function ( ) { select . unbind ( ) ; $input . unbind ( ) ; $ ( input . form ) . unbind ( ".autocomplete" ) } ) ; function selectCurrent ( ) { var selected = select . selected ( ) ; if ( ! selected ) { return false } var v = selected . result ; previousValue = v ; if ( options . multiple ) { var words = trimWords ( $input . val ( ) ) ; if ( words . length > 1 ) { var seperator = options . multipleSeparator . length ; var cursorAt = $ ( input ) . selection ( ) . start ; var wordAt , progress = 0 ; $ . each ( words , function ( i , word ) { progress += word . length ; if ( cursorAt <= progress ) { wordAt = i ; return false } progress += seperator } ) ; words [ wordAt ] = v ; v = words .
/ *
* Aloha Editor
* Author & Copyright ( c ) 2010 Gentics Software GmbH
* aloha - sales @ gentics . com
* Licensed unter the terms of http : //www.aloha-editor.com/license.html
* /
GENTICS . Aloha . RessourceRegistry = function ( ) { this . ressources = new Array ( ) } ; GENTICS . Aloha . RessourceRegistry . prototype . register = function ( ressource ) { if ( ressource instanceof GENTICS . Aloha . Ressource ) { this . ressources . push ( ressource ) } } ; GENTICS . Aloha . RessourceRegistry . prototype . init = function ( ) { for ( var i = 0 ; i < this . ressources . length ; i ++ ) { var ressource = this . ressources [ i ] ; if ( GENTICS . Aloha . settings . ressources == undefined ) { GENTICS . Aloha . settings . ressources = { } } ressource . settings = GENTICS . Aloha . settings . ressources [ ressource . prefix ] ; if ( ressource . settings == undefined ) { ressource . settings = { } } if ( ressource . settings . enabled == undefined ) { ressource . settings . enabled = true } if ( ressource . settings . enabled == true ) { this . ressources [ i ] . init ( ) } } } ; GENTICS . Aloha . RessourceRegistry . toString = function ( ) { return "com.gentics.aloha.RessourceRegistry" } ; GENTICS . Aloha . RessourceRegistry = new GENTICS . Aloha . RessourceRegistry ( ) ; GENTICS . Aloha . Ressources = { } ;
/ *
* Aloha Editor
* Author & Copyright ( c ) 2010 Gentics Software GmbH
* aloha - sales @ gentics . com
* Licensed unter the terms of http : //www.aloha-editor.com/license.html
* /
GENTICS . Aloha . Ressource = function ( ressourcePrefix , basePath ) { this . prefix = ressourcePrefix ; this . basePath = basePath ? basePath : ressourcePrefix ; GENTICS . Aloha . RessourceRegistry . register ( this ) } ; GENTICS . Aloha . Ressource . prototype . settings = null ; GENTICS . Aloha . Ressource . prototype . init = function ( ) { } ; GENTICS . Aloha . Ressource . prototype . query = function ( attrs ) { return null } ; GENTICS . Aloha . Ressource . prototype . resolveRessource = function ( obj ) { return null } ;
/ *
* Aloha Editor
* Author & Copyright ( c ) 2010 Gentics Software GmbH
* aloha - sales @ gentics . com
* Licensed unter the terms of http : //www.aloha-editor.com/license.html
* /
GENTICS . Aloha . Ressources . Dummy = new GENTICS . Aloha . Ressource ( "com.gentics.aloha.resources.Dummy" ) ; GENTICS . Aloha . Ressources . Dummy . init = function ( ) { var data = [ { id : 1 , text : "Link A" , url : "/page1" } , { id : 2 , text : "Link B" , url : "/page2" } , { id : 3 , text : "Link C" , url : "/page3" } , { id : 4 , text : "Link D" , url : "/page4" } ] } ; GENTICS . Aloha . Ressources . Dummy . query = function ( attrs ) { return this . data } ; GENTICS . Aloha . Ressources . Dummy . resolve = function ( obj ) { return null } ;