details:   https://code.openbravo.com/erp/devel/pi/rev/95784ec9fa26
changeset: 19728:95784ec9fa26
user:      David Baz Fayos <david.baz <at> openbravo.com>
date:      Tue Feb 19 21:10:02 2013 +0100
summary:   [calendar] Added capabilities to show or not the event delete icon

details:   https://code.openbravo.com/erp/devel/pi/rev/18f28cfb6df8
changeset: 19729:18f28cfb6df8
user:      David Baz Fayos <david.baz <at> openbravo.com>
date:      Tue Feb 19 21:10:30 2013 +0100
summary:   [calendar] Added capabilties to show the eventDialog on event delete

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/calendar/ob-calendar.js
               |  17 ++++++++-
 
modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/isomorphic/ISC_Combined.js
 |   2 +-
 2 files changed, 16 insertions(+), 3 deletions(-)

diffs (39 lines):

diff -r 358d2a5b008d -r 18f28cfb6df8 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/calendar/ob-calendar.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/calendar/ob-calendar.js
  Tue Feb 19 19:52:45 2013 +0100
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/calendar/ob-calendar.js
  Tue Feb 19 21:10:30 2013 +0100
@@ -252,8 +252,21 @@
       return this.Super('eventMoved', arguments);
     }
   },
-  eventRemoved: function (event) {
-    return this.Super('eventRemoved', arguments);
+  eventRemoveClick: function (event) {
+    if (this.showEventDialogOnEventDelete) {
+      this.eventDialog.event = event;
+      this.eventDialog.currentStart = event[this.startDateField];
+      this.eventDialog.currentEnd = event[this.endDateField];
+      this.eventDialog.calendar = this;
+      try {
+        //To avoid js error due to conflicts with Smartclient default 
EventDialog
+        this.eventDialog.show();
+      } catch (e) {
+      }
+      return false;
+    } else {
+      return this.Super('eventRemoveClick', arguments);
+    }
   },
   showOBEventDialog: function () {
     var dialog = isc.OBPopup.create({});
diff -r 358d2a5b008d -r 18f28cfb6df8 
modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/isomorphic/ISC_Combined.js
--- 
a/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/isomorphic/ISC_Combined.js
    Tue Feb 19 19:52:45 2013 +0100
+++ 
b/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/isomorphic/ISC_Combined.js
    Tue Feb 19 21:10:30 2013 +0100
@@ -18628,7 +18628,7 @@
 ,isc.A.$40z=function 
isc_Calendar__shouldRefreshWeek(_1,_2){if(!this.weekView)return false;var 
_3=this.chosenWeekEnd.duplicate();_3.setMinutes(_3.getMinutes()+1);if(this.weekView.body&&this.chosenWeekStart.getTime()<=_1.getTime()&&_3.getTime()>=_2.getTime()){return
 true}else return false}
 ,isc.A.$400=function 
isc_Calendar__shouldRefreshMonth(_1,_2){if(!this.monthView)return false;var 
_3=new Date(this.year,this.month,-7);var _4=new 
Date(this.year,this.month,37);if(_3.getTime()<=_1.getTime()&&_4.getTime()>=_2.getTime()){return
 true}else return false}
 ,isc.A.$401=function 
isc_Calendar__shouldRefreshTimelineView(_1,_2){if(this.showTimelineView)return 
true;else return false}
-,isc.A.$402=function isc_Calendar__getNewEventWindow(_1){var 
_2=this.canEditEvent(_1);var 
_3=this.canDeleteEvents==null?_2:this.canDeleteEvents;var 
_4=_1[this.eventWindowStyleField]||this.eventWindowStyle;return 
this.createAutoChild("eventWindow",{calendar:this,className:_4,baseStyle:_4,canDragReposition:_2,canDragResize:_2,_redrawWithParent:false,showCloseButton:_3,event:_1,descriptionText:_1[this.descriptionField]},isc.EventWindow)}
+,isc.A.$402=function isc_Calendar__getNewEventWindow(_1){var 
_2=this.canEditEvent(_1);var 
_3=this.canDeleteEvents==null?_2:this.canDeleteEvents;if(_1&&_1.canDelete===false){_3=false;}var
 _4=_1[this.eventWindowStyleField]||this.eventWindowStyle;return 
this.createAutoChild("eventWindow",{calendar:this,className:_4,baseStyle:_4,canDragReposition:_2,canDragResize:_2,_redrawWithParent:false,showCloseButton:_3,event:_1,descriptionText:_1[this.descriptionField]},isc.EventWindow)}
 ,isc.A.$403=function isc_Calendar__getEventsInRange(_1,_2){var _3=[];var 
_4=Date.getWeekendDays();for(var i=0;i<this.data.getLength();i++){var 
_6=this.data.get(i);if(!_6||!_6[this.startDateField])return[];if(_6[this.startDateField].getTime()>=_1.getTime()&&_6[this.startDateField].getTime()<=_2.getTime()&&(this.showWeekends||!_4.contains(_6[this.startDateField].getDay()))){_3.add(_6)}}
 return _3}
 ,isc.A.$404=function isc_Calendar__getEventsTouchingRange(_1,_2,_3){var 
_4=[],_5=Date.getWeekendDays(),_6=_1.getTime(),_7=this.getDayEnd(_1),_8=_2.getHours()!=0?_2.getTime():_7.getTime(),_9=_6,_10=_8,_11=false;var
 _12=(_2.getHours()==0||Date.compareDates(_1,_2)<0)?_7:_2;while(!_11){for(var 
i=0;i<this.data.getLength();i++){var _14=this.data.get(i);var 
_15=_14[this.startDateField],_16=_14[this.endDateField];if(_16.getHours()==0||_16<_15){_16=_7}

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to