Catalyst-Controller-POD
view release on metacpan or search on metacpan
share/ext/ext-all-debug.js view on Meta::CPAN
initSwf : function(){
this.onSwfReady(!!this.isInitialized);
this.isInitialized = true;
this.fireEvent('initialize', this);
},
beforeDestroy: function(){
if(this.rendered){
swfobject.removeSWF(this.swf.id);
}
Ext.FlashComponent.superclass.beforeDestroy.call(this);
},
onSwfReady : Ext.emptyFn
});
Ext.FlashComponent.EXPRESS_INSTALL_URL = 'http:/' + '/swfobject.googlecode.com/svn/trunk/swfobject/expressInstall.swf';
Ext.reg('flash', Ext.FlashComponent);
Ext.FlashEventProxy = {
onEvent : function(id, e){
var fp = Ext.getCmp(id);
if(fp){
fp.onFlashEvent(e);
}else{
arguments.callee.defer(10, this, [id, e]);
}
}
};
Ext.chart.Chart = Ext.extend(Ext.FlashComponent, {
refreshBuffer: 100,
chartStyle: {
padding: 10,
animationEnabled: true,
font: {
name: 'Tahoma',
color: 0x444444,
size: 11
},
dataTip: {
padding: 5,
border: {
color: 0x99bbe8,
size:1
},
background: {
color: 0xDAE7F6,
alpha: .9
},
font: {
name: 'Tahoma',
color: 0x15428B,
size: 10,
bold: true
}
}
},
extraStyle: null,
seriesStyles: null,
disableCaching: Ext.isIE || Ext.isOpera,
disableCacheParam: '_dc',
initComponent : function(){
Ext.chart.Chart.superclass.initComponent.call(this);
if(!this.url){
this.url = Ext.chart.Chart.CHART_URL;
}
if(this.disableCaching){
this.url = Ext.urlAppend(this.url, String.format('{0}={1}', this.disableCacheParam, new Date().getTime()));
}
this.addEvents(
'itemmouseover',
'itemmouseout',
'itemclick',
'itemdoubleclick',
'itemdragstart',
'itemdrag',
'itemdragend',
'beforerefresh',
'refresh'
);
this.store = Ext.StoreMgr.lookup(this.store);
},
setStyle: function(name, value){
this.swf.setStyle(name, Ext.encode(value));
},
setStyles: function(styles){
this.swf.setStyles(Ext.encode(styles));
},
setSeriesStyles: function(styles){
this.seriesStyles = styles;
var s = [];
Ext.each(styles, function(style){
s.push(Ext.encode(style));
});
this.swf.setSeriesStyles(s);
},
share/ext/ext-all-debug.js view on Meta::CPAN
'editmodechange'
);
Ext.form.HtmlEditor.superclass.initComponent.call(this);
},
createFontOptions : function(){
var buf = [], fs = this.fontFamilies, ff, lc;
for(var i = 0, len = fs.length; i< len; i++){
ff = fs[i];
lc = ff.toLowerCase();
buf.push(
'<option value="',lc,'" style="font-family:',ff,';"',
(this.defaultFont == lc ? ' selected="true">' : '>'),
ff,
'</option>'
);
}
return buf.join('');
},
createToolbar : function(editor){
var items = [];
var tipsEnabled = Ext.QuickTips && Ext.QuickTips.isEnabled();
function btn(id, toggle, handler){
return {
itemId : id,
cls : 'x-btn-icon',
iconCls: 'x-edit-'+id,
enableToggle:toggle !== false,
scope: editor,
handler:handler||editor.relayBtnCmd,
clickEvent:'mousedown',
tooltip: tipsEnabled ? editor.buttonTips[id] || undefined : undefined,
overflowText: editor.buttonTips[id].title || undefined,
tabIndex:-1
};
}
if(this.enableFont && !Ext.isSafari2){
var fontSelectItem = new Ext.Toolbar.Item({
autoEl: {
tag:'select',
cls:'x-font-select',
html: this.createFontOptions()
}
});
items.push(
fontSelectItem,
'-'
);
}
if(this.enableFormat){
items.push(
btn('bold'),
btn('italic'),
btn('underline')
);
}
if(this.enableFontSize){
items.push(
'-',
btn('increasefontsize', false, this.adjustFont),
btn('decreasefontsize', false, this.adjustFont)
);
}
if(this.enableColors){
items.push(
'-', {
itemId:'forecolor',
cls:'x-btn-icon',
iconCls: 'x-edit-forecolor',
clickEvent:'mousedown',
tooltip: tipsEnabled ? editor.buttonTips.forecolor || undefined : undefined,
tabIndex:-1,
menu : new Ext.menu.ColorMenu({
allowReselect: true,
focus: Ext.emptyFn,
value:'000000',
plain:true,
listeners: {
scope: this,
select: function(cp, color){
this.execCmd('forecolor', Ext.isWebKit || Ext.isIE ? '#'+color : color);
this.deferFocus();
}
},
clickEvent:'mousedown'
})
}, {
itemId:'backcolor',
cls:'x-btn-icon',
iconCls: 'x-edit-backcolor',
clickEvent:'mousedown',
tooltip: tipsEnabled ? editor.buttonTips.backcolor || undefined : undefined,
tabIndex:-1,
menu : new Ext.menu.ColorMenu({
focus: Ext.emptyFn,
value:'FFFFFF',
plain:true,
allowReselect: true,
listeners: {
scope: this,
select: function(cp, color){
if(Ext.isGecko){
this.execCmd('useCSS', false);
this.execCmd('hilitecolor', color);
this.execCmd('useCSS', true);
this.deferFocus();
}else{
this.execCmd(Ext.isOpera ? 'hilitecolor' : 'backcolor', Ext.isWebKit || Ext.isIE ? '#'+color : color);
this.deferFocus();
}
share/ext/ext-all-debug.js view on Meta::CPAN
adjustFont: function(btn){
var adjust = btn.getItemId() == 'increasefontsize' ? 1 : -1,
doc = this.getDoc(),
v = parseInt(doc.queryCommandValue('FontSize') || 2, 10);
if((Ext.isSafari && !Ext.isSafari2) || Ext.isChrome || Ext.isAir){
if(v <= 10){
v = 1 + adjust;
}else if(v <= 13){
v = 2 + adjust;
}else if(v <= 16){
v = 3 + adjust;
}else if(v <= 18){
v = 4 + adjust;
}else if(v <= 24){
v = 5 + adjust;
}else {
v = 6 + adjust;
}
v = v.constrain(1, 6);
}else{
if(Ext.isSafari){
adjust *= 2;
}
v = Math.max(1, v+adjust) + (Ext.isSafari ? 'px' : 0);
}
this.execCmd('FontSize', v);
},
onEditorEvent : function(e){
this.updateToolbar();
},
updateToolbar: function(){
if(this.readOnly){
return;
}
if(!this.activated){
this.onFirstFocus();
return;
}
var btns = this.tb.items.map,
doc = this.getDoc();
if(this.enableFont && !Ext.isSafari2){
var name = (doc.queryCommandValue('FontName')||this.defaultFont).toLowerCase();
if(name != this.fontSelect.dom.value){
this.fontSelect.dom.value = name;
}
}
if(this.enableFormat){
btns.bold.toggle(doc.queryCommandState('bold'));
btns.italic.toggle(doc.queryCommandState('italic'));
btns.underline.toggle(doc.queryCommandState('underline'));
}
if(this.enableAlignments){
btns.justifyleft.toggle(doc.queryCommandState('justifyleft'));
btns.justifycenter.toggle(doc.queryCommandState('justifycenter'));
btns.justifyright.toggle(doc.queryCommandState('justifyright'));
}
if(!Ext.isSafari2 && this.enableLists){
btns.insertorderedlist.toggle(doc.queryCommandState('insertorderedlist'));
btns.insertunorderedlist.toggle(doc.queryCommandState('insertunorderedlist'));
}
Ext.menu.MenuMgr.hideAll();
this.syncValue();
},
relayBtnCmd : function(btn){
this.relayCmd(btn.getItemId());
},
relayCmd : function(cmd, value){
(function(){
this.focus();
this.execCmd(cmd, value);
this.updateToolbar();
}).defer(10, this);
},
execCmd : function(cmd, value){
var doc = this.getDoc();
doc.execCommand(cmd, false, value === undefined ? null : value);
this.syncValue();
},
applyCommand : function(e){
if(e.ctrlKey){
var c = e.getCharCode(), cmd;
if(c > 0){
c = String.fromCharCode(c);
switch(c){
case 'b':
cmd = 'bold';
break;
case 'i':
cmd = 'italic';
break;
case 'u':
cmd = 'underline';
break;
}
if(cmd){
this.win.focus();
this.execCmd(cmd);
this.deferFocus();
e.preventDefault();
}
}
}
},
insertAtCursor : function(text){
if(!this.activated){
return;
}
if(Ext.isIE){
this.win.focus();
var doc = this.getDoc(),
r = doc.selection.createRange();
if(r){
r.pasteHTML(text);
this.syncValue();
this.deferFocus();
}
}else{
this.win.focus();
this.execCmd('InsertHTML', text);
this.deferFocus();
}
},
fixKeys : function(){
if(Ext.isIE){
return function(e){
var k = e.getKey(),
doc = this.getDoc(),
r;
if(k == e.TAB){
e.stopEvent();
r = doc.selection.createRange();
if(r){
r.collapse(true);
r.pasteHTML(' ');
this.deferFocus();
}
}else if(k == e.ENTER){
r = doc.selection.createRange();
if(r){
var target = r.parentElement();
if(!target || target.tagName.toLowerCase() != 'li'){
e.stopEvent();
r.pasteHTML('<br />');
r.collapse(false);
r.select();
}
}
}
};
}else if(Ext.isOpera){
return function(e){
var k = e.getKey();
if(k == e.TAB){
e.stopEvent();
this.win.focus();
this.execCmd('InsertHTML',' ');
this.deferFocus();
}
};
}else if(Ext.isWebKit){
return function(e){
var k = e.getKey();
if(k == e.TAB){
e.stopEvent();
this.execCmd('InsertText','\t');
this.deferFocus();
}else if(k == e.ENTER){
e.stopEvent();
this.execCmd('InsertHtml','<br /><br />');
this.deferFocus();
}
};
}
}(),
getToolbar : function(){
return this.tb;
},
buttonTips : {
bold : {
title: 'Bold (Ctrl+B)',
text: 'Make the selected text bold.',
cls: 'x-html-editor-tip'
},
italic : {
title: 'Italic (Ctrl+I)',
text: 'Make the selected text italic.',
cls: 'x-html-editor-tip'
},
underline : {
title: 'Underline (Ctrl+U)',
text: 'Underline the selected text.',
cls: 'x-html-editor-tip'
},
increasefontsize : {
title: 'Grow Text',
text: 'Increase the font size.',
cls: 'x-html-editor-tip'
},
decreasefontsize : {
title: 'Shrink Text',
text: 'Decrease the font size.',
cls: 'x-html-editor-tip'
},
backcolor : {
title: 'Text Highlight Color',
text: 'Change the background color of the selected text.',
cls: 'x-html-editor-tip'
},
forecolor : {
title: 'Font Color',
text: 'Change the color of the selected text.',
cls: 'x-html-editor-tip'
},
justifyleft : {
title: 'Align Text Left',
text: 'Align text to the left.',
cls: 'x-html-editor-tip'
},
justifycenter : {
title: 'Center Text',
text: 'Center text in the editor.',
cls: 'x-html-editor-tip'
},
justifyright : {
title: 'Align Text Right',
text: 'Align text to the right.',
cls: 'x-html-editor-tip'
},
insertunorderedlist : {
title: 'Bullet List',
text: 'Start a bulleted list.',
cls: 'x-html-editor-tip'
},
insertorderedlist : {
title: 'Numbered List',
text: 'Start a numbered list.',
cls: 'x-html-editor-tip'
},
createlink : {
title: 'Hyperlink',
text: 'Make the selected text a hyperlink.',
( run in 0.518 second using v1.01-cache-2.11-cpan-39bf76dae61 )