Dec 04, 2009, 3:53 AM
1.0 generic plugin
i have just updated from svn and this still exists
i have this dataview with a generic plugin
<div role="listitem" class="errorTitle focusRow subLogRow ">missing ; before statement
<div role="listitem" class="errorSourceBox errorSource-syntax focusRow subLogRow ">[img]chrome://firebug/content/blank.gif[/img]<a class="errorSource a11yFocus ">ataView.DragSelector({})new Ext.menu.Men...Event.confirmRequest({formProxyArg: "form
and when you look at the generated html part of the script is this
</a>this.uchrcaPublicQS_GenericPlugin1=new Ext.DataView.DragSelector({})new Ext.menu.Menu(......
perhaps the error is cause by this part
new Ext.DataView.DragSelector({})new Ext.menu.Menu(......
no ";" generated after the plugin code
<a class="errorSource a11yFocus ">
this is the plugin code
i have this dataview with a generic plugin
<Plugins>
<ext:GenericPlugin ID="GenericPlugin1" runat="server" InstanceName="Ext.DataView.DragSelector" />
</Plugins>
but when the page loads i'm getting this error<div role="listitem" class="errorTitle focusRow subLogRow ">missing ; before statement
<div role="listitem" class="errorSourceBox errorSource-syntax focusRow subLogRow ">[img]chrome://firebug/content/blank.gif[/img]<a class="errorSource a11yFocus ">ataView.DragSelector({})new Ext.menu.Men...Event.confirmRequest({formProxyArg: "form
and when you look at the generated html part of the script is this
</a>this.uchrcaPublicQS_GenericPlugin1=new Ext.DataView.DragSelector({})new Ext.menu.Menu(......
perhaps the error is cause by this part
new Ext.DataView.DragSelector({})new Ext.menu.Menu(......
no ";" generated after the plugin code
<a class="errorSource a11yFocus ">
this is the plugin code
Ext.DataView.DragSelector = function(cfg){
cfg = cfg || {};
var view, regions, proxy, tracker;
var rs, bodyRegion, dragRegion = new Ext.lib.Region(0,0,0,0);
var dragSafe = cfg.dragSafe === true;
this.init = function(dataView){
view = dataView;
view.on('render', onRender);
};
function fillRegions(){
rs = [];
view.all.each(function(el){
rs[rs.length] = el.getRegion();
});
bodyRegion = view.el.getRegion();
}
function cancelClick(){
return false;
}
function onBeforeStart(e){
return !dragSafe || e.target == view.el.dom;
}
function onStart(e){
view.on('containerclick', cancelClick, view, {single:true});
if(!proxy){
proxy = view.el.createChild({cls:'x-view-selector'});
}else{
proxy.setDisplayed('block');
}
fillRegions();
view.clearSelections();
}
function onDrag(e){
var startXY = tracker.startXY;
var xy = tracker.getXY();
var x = Math.min(startXY[0], xy[0]);
var y = Math.min(startXY[1], xy[1]);
var w = Math.abs(startXY[0] - xy[0]);
var h = Math.abs(startXY[1] - xy[1]);
dragRegion.left = x;
dragRegion.top = y;
dragRegion.right = x+w;
dragRegion.bottom = y+h;
dragRegion.constrainTo(bodyRegion);
proxy.setRegion(dragRegion);
for(var i = 0, len = rs.length; i < len; i++){
var r = rs[i], sel = dragRegion.intersect(r);
if(sel && !r.selected){
r.selected = true;
view.select(i, true);
}else if(!sel && r.selected){
r.selected = false;
view.deselect(i);
}
}
}
function onEnd(e){
if(proxy){
proxy.setDisplayed(false);
}
}
function onRender(view){
tracker = new Ext.dd.DragTracker({
onBeforeStart: onBeforeStart,
onStart: onStart,
onDrag: onDrag,
onEnd: onEnd
});
tracker.initEl(view.el);
}
};
</a>