|
@@ -1,41 +1,41 @@
|
|
openerp.custom_project = function(instance) {
|
|
openerp.custom_project = function(instance) {
|
|
var QWeb = instance.web.qweb;
|
|
var QWeb = instance.web.qweb;
|
|
|
|
|
|
- instance.web_calendar.CalendarView = instance.web_calendar.CalendarView.extend({
|
|
+
|
|
- remove_event: function(id) {
|
|
+
|
|
- var self = this;
|
|
+
|
|
-
|
|
+
|
|
- function do_it() {
|
|
+
|
|
- return $.when(self.dataset.unlink([Number(id)])).then(function() {
|
|
+
|
|
- self.$calendar.fullCalendar('removeEvents', id);
|
|
+
|
|
- });
|
|
+
|
|
- }
|
|
+
|
|
-
|
|
+
|
|
- if (this.options.confirm_on_delete) {
|
|
+
|
|
- if (confirm(_t("Está seguro que desea eliminar esta actividad?"))) {
|
|
+
|
|
- return do_it();
|
|
+
|
|
- }
|
|
+
|
|
- } else
|
|
+
|
|
- return do_it();
|
|
+
|
|
- },
|
|
+
|
|
- event_data_transform: function(event) {
|
|
+
|
|
- var res = this._super.apply(this, arguments);
|
|
+
|
|
-
|
|
+
|
|
- if (res && res.hasOwnProperty('className')) {
|
|
+
|
|
-
|
|
+
|
|
-
|
|
+
|
|
-
|
|
+
|
|
- if (res.title.indexOf('false') > -1) {
|
|
+
|
|
- res.title = res.title.substring(0, res.title.indexOf(','));
|
|
+
|
|
- }
|
|
+
|
|
- }
|
|
+
|
|
- if (event.hex_value && res.title) {
|
|
+
|
|
- res.backgroundColor = event.hex_value;
|
|
+
|
|
- res.title = res.title.substring(0, res.title.indexOf(', ' + event.hex_value));
|
|
+
|
|
- }
|
|
+
|
|
- return res;
|
|
+
|
|
- }
|
|
+
|
|
- });
|
|
+
|
|
|
|
|
|
instance.web_kanban.KanbanRecord = instance.web_kanban.KanbanRecord.extend({
|
|
instance.web_kanban.KanbanRecord = instance.web_kanban.KanbanRecord.extend({
|
|
on_card_clicked: function() {
|
|
on_card_clicked: function() {
|