Revision: 2575
Author: seba.wagner
Date: Mon Nov 2 13:43:40 2009
Log: Fix Problem with Calendar Drag N Drop
http://code.google.com/p/openmeetings/source/detail?r=2575
Modified:
/trunk/singlewebapp/WebContent/openmeetings/modules/lzcalendar/cal-data.lzx
/trunk/singlewebapp/WebContent/openmeetings/modules/lzcalendar/day.lzx
/trunk/singlewebapp/WebContent/openmeetings/modules/lzcalendar/dayname.lzx
/trunk/singlewebapp/WebContent/openmeetings/modules/lzcalendar/event.lzx
/trunk/singlewebapp/WebContent/openmeetings/modules/lzcalendar/eventselector.lzx
/trunk/singlewebapp/WebContent/openmeetings/modules/lzcalendar/gridsliderlayout.lzx
=======================================
---
/trunk/singlewebapp/WebContent/openmeetings/modules/lzcalendar/cal-data.lzx
Mon Nov 2 12:40:59 2009
+++
/trunk/singlewebapp/WebContent/openmeetings/modules/lzcalendar/cal-data.lzx
Mon Nov 2 13:43:40 2009
@@ -556,8 +556,3 @@
</node>
</library>
-<!-- * X_LZ_COPYRIGHT_BEGIN
***************************************************
-* Copyright 2001-2008 Laszlo Systems, Inc. All Rights
Reserved. *
-* Use is subject to license
terms. *
-* X_LZ_COPYRIGHT_END
****************************************************** -->
-<!-- @LZX_VERSION@
-->
=======================================
--- /trunk/singlewebapp/WebContent/openmeetings/modules/lzcalendar/day.lzx
Mon Nov 2 04:34:03 2009
+++ /trunk/singlewebapp/WebContent/openmeetings/modules/lzcalendar/day.lzx
Mon Nov 2 13:43:40 2009
@@ -3,11 +3,6 @@
<!-- CLASS: CALENDAR DAY =============================================
-->
<!-- =================================================================
-->
-
- <!--
- bgcolor="0x7A949E"
- -->
-
<class name="calendar_day"
width="3" bgcolor="$once{ canvas.baseMousecolorizer }"
height="10"
@@ -251,8 +246,3 @@
</class>
</library>
-<!-- * X_LZ_COPYRIGHT_BEGIN
***************************************************
-* Copyright 2001-2008 Laszlo Systems, Inc. All Rights
Reserved. *
-* Use is subject to license
terms. *
-* X_LZ_COPYRIGHT_END
****************************************************** -->
-<!-- @LZX_VERSION@
-->
=======================================
---
/trunk/singlewebapp/WebContent/openmeetings/modules/lzcalendar/dayname.lzx
Sat Oct 31 06:17:07 2009
+++
/trunk/singlewebapp/WebContent/openmeetings/modules/lzcalendar/dayname.lzx
Mon Nov 2 13:43:40 2009
@@ -2,8 +2,3 @@
<class name="dayname" width="63">
</class>
</library>
-<!-- * X_LZ_COPYRIGHT_BEGIN
***************************************************
-* Copyright 2001-2006 Laszlo Systems, Inc. All Rights
Reserved. *
-* Use is subject to license
terms. *
-* X_LZ_COPYRIGHT_END
****************************************************** -->
-<!-- @LZX_VERSION@
-->
=======================================
---
/trunk/singlewebapp/WebContent/openmeetings/modules/lzcalendar/event.lzx
Mon Nov 2 12:40:59 2009
+++
/trunk/singlewebapp/WebContent/openmeetings/modules/lzcalendar/event.lzx
Mon Nov 2 13:43:40 2009
@@ -215,8 +215,3 @@
</library>
-<!-- * X_LZ_COPYRIGHT_BEGIN
***************************************************
-* Copyright 2001-2008 Laszlo Systems, Inc. All Rights
Reserved. *
-* Use is subject to license
terms. *
-* X_LZ_COPYRIGHT_END
****************************************************** -->
-<!-- @LZX_VERSION@
-->
=======================================
---
/trunk/singlewebapp/WebContent/openmeetings/modules/lzcalendar/eventselector.lzx
Mon Nov 2 04:34:03 2009
+++
/trunk/singlewebapp/WebContent/openmeetings/modules/lzcalendar/eventselector.lzx
Mon Nov 2 13:43:40 2009
@@ -16,13 +16,19 @@
bgcolor="white" opacity=".5"-->
<!-- INSTANCE NAME: ID="eventselector" -->
- <attribute name="dragging" value="false"/>
- <attribute name="freedragging" value="false"/>
- <attribute name="clipping" value="false"/>
+ <attribute name="dragging" value="false" type="boolean"/>
+ <attribute name="freedragging" value="false" type="boolean"/>
+ <attribute name="clipping" value="false" type="boolean"/>
<attribute name="xoff" type="number" value="0"/>
<attribute name="yoff" type="number" value="0"/>
<attribute name="origx" type="number" value="0"/>
<attribute name="obarx" type="number" value="0"/>
+
+
+ <attribute name="clipdel" value="null" />
+ <attribute name="hidedel" value="null" />
+ <attribute name="mdel" value="null" />
+ <attribute name="startDragDel" value="null" />
<view name="bar" pixellock="false" bgcolor="white" visible="false"
onmousedown="parent.domousedown()"
@@ -217,8 +223,8 @@
this.clipSizing.remove();
this.clipping = false;
// this.setAttributeRelative( 'y' , calgrid); // [bshine
9.28.06] TODO beware this in legals
- this.setAttribute('y', this.getAttributeRelative('y',
calgrid) );
- this.setAttribute( 'height' , calgrid.height);
+ this.setAttribute('y', this.getAttributeRelative('y',
parent.calgrid) );
+ this.setAttribute( 'height' , parent.calgrid.height);
}]]>
</handler>
@@ -246,6 +252,7 @@
<method name="domousedowndel" args="v">
this.domousedown();
</method>
+
<method name="domousedown"><![CDATA[
//wait 150ms before starting drag; prevents moving the
//event selector on a click -- 150ms is empirical
@@ -258,29 +265,49 @@
]]>
</method>
- <method name="startDrag" args="v"> <![CDATA[
- this.mdel.register( lz.Idle, "onidle" );
- this.bar.followstate.remove();
-
this.setAttribute('freedragging', !this['followview'].classroot.opened );
- this.setAttribute('dragging',true);
- parent.calgrid.gridlayout.startTrack(); ]]>
+ <method name="startDrag" args="v">
+ <![CDATA[
+
+ if ($debug)
Debug.write("startDrag ",this['followview'].classroot.opened,v);
+
+ //if (this['followview'].classroot.opened) {
+ // if ($debug) Debug.warn("Do Not Drag Allow when
opened?!");
+ // return;
+ //}
+
+ this.mdel.register( lz.Idle, "onidle" );
+
+ this.setAttribute('dragging',true);
+
+ this.bar.followstate.remove();
+
+
this.setAttribute('freedragging', !this['followview'].classroot.opened );
+
+ parent.calgrid.gridlayout.startTrack();
+
+ ]]>
</method>
<handler name="onmouseup" method="domouseup"/>
- <method name="domouseup" args="v"><![CDATA[
- if ( this.dragging ){
- this.mdel.unregisterAll( );
- this.setAttribute('dragging',false);
- parent.calgrid.gridlayout.stopTrack();
- //this may be already applied, but it can't hurt
- this.bar.followstate.apply();
-
- if ($debug) Debug.warn("ON MOUSE UP => Update Cal
Event ",this['followview']);
-
-
this.setAttribute('freedragging', !this['followview'].classroot.opened );
- } else {
- lz.Timer.removeTimer( this.startDragDel );
- } ]]>
+ <method name="domouseup" args="v">
+ <![CDATA[
+ if ( this.dragging ){
+
+ if ($debug) Debug.write("Remove Drag State");
+
+ this.mdel.unregisterAll( );
+ this.setAttribute('dragging',false);
+ parent.calgrid.gridlayout.stopTrack();
+ //this may be already applied, but it can't hurt
+ this.bar.followstate.apply();
+
+ if ($debug) Debug.warn("ON MOUSE UP => Update Cal
Event ",this['followview']);
+
+
this.setAttribute('freedragging', !this['followview'].classroot.opened );
+ } else {
+ lz.Timer.removeTimer( this.startDragDel );
+ }
+ ]]>
</method>
<method name="updateEventTime" args="d">
@@ -438,8 +465,3 @@
</class>
</library>
-<!-- * X_LZ_COPYRIGHT_BEGIN
***************************************************
-* Copyright 2001-2008 Laszlo Systems, Inc. All Rights
Reserved. *
-* Use is subject to license
terms. *
-* X_LZ_COPYRIGHT_END
****************************************************** -->
-<!-- @LZX_VERSION@
-->
=======================================
---
/trunk/singlewebapp/WebContent/openmeetings/modules/lzcalendar/gridsliderlayout.lzx
Sat Oct 31 02:43:46 2009
+++
/trunk/singlewebapp/WebContent/openmeetings/modules/lzcalendar/gridsliderlayout.lzx
Mon Nov 2 13:43:40 2009
@@ -1,6 +1,14 @@
<library>
<class name="gridsliderlayout" extends="layout" >
+ <!--
+
+
+ERROR @modules/lzcalendar/eventselector.lzx#226: reference to undefined
variable 'calgrid'
+
+
+ -->
+
<!-- ATTRIBUTES -->
<attribute name="spacing" value="0"
setter="this.spacing = spacing" />
@@ -52,34 +60,42 @@
<attribute name="cellwidth" type="number" value="0"/>
<attribute name="cellheight" type="number" value="0"/>
- <attribute name="lastsel" value="${null}"/>
-
- <handler name="oninit" > <![CDATA[
- // Create delegates used by the update method.
- this.doupdateDelegate = new LzDelegate(this, "doupdate");
- this.doupdateDelegate.register( immediateparent, "onwidth");
- this.doupdateDelegate.register( immediateparent, "onheight");
- this.resetvisDL = new LzDelegate(this,'resetVisibility');
- ]]> </handler>
+ <attribute name="lastsel" value="${null}" />
+
+ <attribute name="positiondel" value="null" />
+
+ <handler name="oninit" >
+ <![CDATA[
+ // Create delegates used by the update method.
+ this.doupdateDelegate = new LzDelegate(this, "doupdate");
+ this.doupdateDelegate.register( immediateparent, "onwidth");
+ this.doupdateDelegate.register( immediateparent, "onheight");
+ this.resetvisDL = new LzDelegate(this,'resetVisibility');
+ ]]>
+ </handler>
<!-- METHOD: addSubview -->
<!-- As subviews are added to this layout store their row and col.
This adds the layout's data in an internal spot in the view, which
is not great OOP, but it's fast. We could use
v.setOption( 'col', ...
for this -->
- <method name="addSubview" args="v"> <![CDATA[
+ <method name="addSubview" args="v">
+ <![CDATA[
super.addSubview(v);
v.col = (this.subviews.length - 1) % 7;
v.row = Math.floor((this.subviews.length - 1)/ 7);
- ]]> </method>
+ ]]>
+ </method>
- <method name="set_rows" args="r"> <![CDATA[
+ <method name="set_rows" args="r">
+ <![CDATA[
if (this['rows'] != r) {
this.rows = r;
this.doupdate(null);
}
- ]]> </method>
+ ]]>
+ </method>
<!-- OPEN METHODS -->
@@ -415,7 +431,7 @@
is dragged. These methods appear here because the layout has all
the
position information about the grid. -->
<method name="startTrack" >
- if ( ! this[ 'positiondel' ] ){
+ if ( this.positiondel == null ){
this.positiondel = new LzDelegate( this , "checkMousePosition"
);
}
this.positiondel.register( lz.Idle , "onidle" );
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"OpenMeetings developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/openmeetings-dev?hl=en
-~----------~----~----~----~------~----~------~--~---