Merge lp:~openerp-dev/openerp-web/trunk-improve-calendar-dragdrop-bth into lp:openerp-web
- trunk-improve-calendar-dragdrop-bth
- Merge into trunk
Status: | Needs review |
---|---|
Proposed branch: | lp:~openerp-dev/openerp-web/trunk-improve-calendar-dragdrop-bth |
Merge into: | lp:openerp-web |
Diff against target: |
322 lines (+120/-20) 5 files modified
addons/web/static/src/css/base.css (+5/-0) addons/web/static/src/css/base.sass (+4/-0) addons/web_calendar/static/src/js/calendar.js (+109/-20) addons/web_kanban/static/src/css/kanban.css (+1/-0) addons/web_kanban/static/src/css/kanban.sass (+1/-0) |
To merge this branch: | bzr merge lp:~openerp-dev/openerp-web/trunk-improve-calendar-dragdrop-bth |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
OpenERP R&D Web Team | Pending | ||
Review via email: mp+169200@code.launchpad.net |
Commit message
Description of the change
- 3758. By Jignesh Rathod(OpenERP)
-
Merge with latest web.
- 3759. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge lp:openerp-web.
- 3760. By Amit Bhavsar (Open ERP)
-
[MERGE] merge with latest trunk
- 3761. By Bhumi Thakkar (Open ERP)
-
[IMP]Get readonly modifiers from py file of date_start field of calendar view and set value of true or false to date_start field.
- 3762. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge lp:openerp-web.
- 3763. By Bhumi Thakkar (Open ERP)
-
[IMP]Get attrs of start_date field from calendar view.
- 3764. By Bhumi Thakkar (Open ERP)
-
[IMP]ON date_start field drag & drop will work and improved code.
- 3765. By Bhumi Thakkar (Open ERP)
-
[IMP]Improved code to remove exist data from object.
- 3766. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge lp:openerp-web.
- 3767. By Bhumi Thakkar (Open ERP)
-
[MERGE]Fixed issue of traceback on calendar view.
- 3768. By Bhumi Thakkar (Open ERP)
-
[IMP]Improved code for resize stop_date based on attribute of stop_date.
- 3769. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge lp:openerp-web.
- 3770. By Bhumi Thakkar (Open ERP)
-
[IMP]Improved code to pop up existing value and push updated value.
- 3771. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge lp:openerp-web.
- 3772. By Bhumi Thakkar (Open ERP)
-
[IMP]Improved code for reload dataset when create or update record.
- 3773. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge lp:openerp-web.
- 3774. By Bhumi Thakkar (Open ERP)
-
[IMP]Code Optimization.
- 3775. By Bhumi Thakkar (Open ERP)
-
[IMP]Code Optimization.
- 3776. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge lp:openerp-web.
- 3777. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge trunk.
- 3778. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge trunk.
Unmerged revisions
- 3778. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge trunk.
- 3777. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge trunk.
- 3776. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge lp:openerp-web.
- 3775. By Bhumi Thakkar (Open ERP)
-
[IMP]Code Optimization.
- 3774. By Bhumi Thakkar (Open ERP)
-
[IMP]Code Optimization.
- 3773. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge lp:openerp-web.
- 3772. By Bhumi Thakkar (Open ERP)
-
[IMP]Improved code for reload dataset when create or update record.
- 3771. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge lp:openerp-web.
- 3770. By Bhumi Thakkar (Open ERP)
-
[IMP]Improved code to pop up existing value and push updated value.
- 3769. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge lp:openerp-web.
Preview Diff
1 | === modified file 'addons/web/static/src/css/base.css' | |||
2 | --- addons/web/static/src/css/base.css 2013-10-18 12:32:53 +0000 | |||
3 | +++ addons/web/static/src/css/base.css 2013-11-08 10:26:02 +0000 | |||
4 | @@ -1440,6 +1440,11 @@ | |||
5 | 1440 | white-space: nowrap; | 1440 | white-space: nowrap; |
6 | 1441 | text-overflow: ellipsis; | 1441 | text-overflow: ellipsis; |
7 | 1442 | } | 1442 | } |
8 | 1443 | .openerp .oe_application .oe_breadcrumb_item:last-child { | ||
9 | 1444 | max-width: 17em; | ||
10 | 1445 | white-space: nowrap; | ||
11 | 1446 | text-overflow: ellipsis; | ||
12 | 1447 | } | ||
13 | 1443 | .openerp .oe_application .oe_breadcrumb_title > * { | 1448 | .openerp .oe_application .oe_breadcrumb_title > * { |
14 | 1444 | display: inline-block; | 1449 | display: inline-block; |
15 | 1445 | overflow: hidden; | 1450 | overflow: hidden; |
16 | 1446 | 1451 | ||
17 | === modified file 'addons/web/static/src/css/base.sass' | |||
18 | --- addons/web/static/src/css/base.sass 2013-10-18 12:32:53 +0000 | |||
19 | +++ addons/web/static/src/css/base.sass 2013-11-08 10:26:02 +0000 | |||
20 | @@ -1157,6 +1157,10 @@ | |||
21 | 1157 | max-width: 7em | 1157 | max-width: 7em |
22 | 1158 | white-space: nowrap | 1158 | white-space: nowrap |
23 | 1159 | text-overflow: ellipsis | 1159 | text-overflow: ellipsis |
24 | 1160 | .oe_breadcrumb_item:last-child | ||
25 | 1161 | max-width: 17em | ||
26 | 1162 | white-space: nowrap | ||
27 | 1163 | text-overflow: ellipsis | ||
28 | 1160 | .oe_breadcrumb_title > * | 1164 | .oe_breadcrumb_title > * |
29 | 1161 | display: inline-block | 1165 | display: inline-block |
30 | 1162 | overflow: hidden | 1166 | overflow: hidden |
31 | 1163 | 1167 | ||
32 | === modified file 'addons/web_calendar/static/src/js/calendar.js' | |||
33 | --- addons/web_calendar/static/src/js/calendar.js 2013-08-28 16:58:15 +0000 | |||
34 | +++ addons/web_calendar/static/src/js/calendar.js 2013-11-08 10:26:02 +0000 | |||
35 | @@ -66,12 +66,15 @@ | |||
36 | 66 | this._super(); | 66 | this._super(); |
37 | 67 | }, | 67 | }, |
38 | 68 | load_calendar: function(data) { | 68 | load_calendar: function(data) { |
39 | 69 | var self = this; | ||
40 | 69 | this.fields_view = data; | 70 | this.fields_view = data; |
41 | 70 | this.$el.addClass(this.fields_view.arch.attrs['class']); | 71 | this.$el.addClass(this.fields_view.arch.attrs['class']); |
42 | 71 | this.calendar_fields = {}; | 72 | this.calendar_fields = {}; |
43 | 73 | this.res_event = []; | ||
44 | 72 | this.ids = this.dataset.ids; | 74 | this.ids = this.dataset.ids; |
45 | 73 | this.color_values = []; | 75 | this.color_values = []; |
46 | 74 | this.info_fields = []; | 76 | this.info_fields = []; |
47 | 77 | this.field_modifiers = []; | ||
48 | 75 | 78 | ||
49 | 76 | this.name = this.fields_view.name || this.fields_view.arch.attrs.string; | 79 | this.name = this.fields_view.name || this.fields_view.arch.attrs.string; |
50 | 77 | this.view_id = this.fields_view.view_id; | 80 | this.view_id = this.fields_view.view_id; |
51 | @@ -83,7 +86,7 @@ | |||
52 | 83 | this.date_start = this.fields_view.arch.attrs.date_start; | 86 | this.date_start = this.fields_view.arch.attrs.date_start; |
53 | 84 | this.date_delay = this.fields_view.arch.attrs.date_delay; | 87 | this.date_delay = this.fields_view.arch.attrs.date_delay; |
54 | 85 | this.date_stop = this.fields_view.arch.attrs.date_stop; | 88 | this.date_stop = this.fields_view.arch.attrs.date_stop; |
56 | 86 | 89 | ||
57 | 87 | this.day_length = this.fields_view.arch.attrs.day_length || 8; | 90 | this.day_length = this.fields_view.arch.attrs.day_length || 8; |
58 | 88 | this.color_field = this.fields_view.arch.attrs.color; | 91 | this.color_field = this.fields_view.arch.attrs.color; |
59 | 89 | this.color_string = this.fields_view.fields[this.color_field] ? | 92 | this.color_string = this.fields_view.fields[this.color_field] ? |
60 | @@ -96,7 +99,6 @@ | |||
61 | 96 | } | 99 | } |
62 | 97 | } | 100 | } |
63 | 98 | this.fields = this.fields_view.fields; | 101 | this.fields = this.fields_view.fields; |
64 | 99 | |||
65 | 100 | if (!this.date_start) { | 102 | if (!this.date_start) { |
66 | 101 | throw new Error(_t("Calendar view has not defined 'date_start' attribute.")); | 103 | throw new Error(_t("Calendar view has not defined 'date_start' attribute.")); |
67 | 102 | } | 104 | } |
68 | @@ -117,7 +119,17 @@ | |||
69 | 117 | for (var fld = 0; fld < this.fields_view.arch.children.length; fld++) { | 119 | for (var fld = 0; fld < this.fields_view.arch.children.length; fld++) { |
70 | 118 | this.info_fields.push(this.fields_view.arch.children[fld].attrs.name); | 120 | this.info_fields.push(this.fields_view.arch.children[fld].attrs.name); |
71 | 119 | } | 121 | } |
73 | 120 | 122 | var modifiers = [], modifiers_stop = []; | |
74 | 123 | this.field_attrs_modifiers = []; | ||
75 | 124 | _.each(this.fields_view.arch.children, function(r) { | ||
76 | 125 | if (r.attrs.attrs) { | ||
77 | 126 | modifier = JSON.parse(r.attrs.modifiers || '{}') | ||
78 | 127 | if (r.attrs.name == self.date_start) | ||
79 | 128 | self.field_attrs_modifiers = modifier['readonly']; | ||
80 | 129 | if (r.attrs.name == self.date_stop) | ||
81 | 130 | self.field_stop_modifiers = modifier['readonly']; | ||
82 | 131 | } | ||
83 | 132 | }); | ||
84 | 121 | this.init_scheduler(); | 133 | this.init_scheduler(); |
85 | 122 | 134 | ||
86 | 123 | if (!this.sidebar && this.options.$sidebar) { | 135 | if (!this.sidebar && this.options.$sidebar) { |
87 | @@ -125,6 +137,7 @@ | |||
88 | 125 | this.has_been_loaded.then(this.sidebar.appendTo(this.$el.find('.oe_calendar_sidebar_container'))); | 137 | this.has_been_loaded.then(this.sidebar.appendTo(this.$el.find('.oe_calendar_sidebar_container'))); |
89 | 126 | } | 138 | } |
90 | 127 | this.trigger('calendar_view_loaded', data); | 139 | this.trigger('calendar_view_loaded', data); |
91 | 140 | |||
92 | 128 | return this.has_been_loaded.resolve(); | 141 | return this.has_been_loaded.resolve(); |
93 | 129 | }, | 142 | }, |
94 | 130 | init_scheduler: function() { | 143 | init_scheduler: function() { |
95 | @@ -231,7 +244,30 @@ | |||
96 | 231 | } | 244 | } |
97 | 232 | return false; | 245 | return false; |
98 | 233 | }); | 246 | }); |
100 | 234 | 247 | scheduler.attachEvent('onBeforeDrag', function(event_id,mode,event) { | |
101 | 248 | if (mode == "create") { | ||
102 | 249 | e = event || window.event; //e || | ||
103 | 250 | scheduler.callEvent("onEmptyClick",[scheduler.getActionData(e).date, e]); | ||
104 | 251 | } | ||
105 | 252 | else{ | ||
106 | 253 | for (i=0; i < self.res_event.length; i++) { | ||
107 | 254 | if (self.res_event[i].id == event_id) { | ||
108 | 255 | if (mode == "move") { | ||
109 | 256 | result = (self.res_event[i].readonly==true || self.res_event[i].readonly==1) ? false : true; | ||
110 | 257 | return result; | ||
111 | 258 | } else if (mode == "resize") { | ||
112 | 259 | var compute_domain = instance.web.form.compute_domain; | ||
113 | 260 | var res = []; | ||
114 | 261 | _.each(self.dataset_events[i], function(d, k){ | ||
115 | 262 | res[k] = {'value': d}; | ||
116 | 263 | }); | ||
117 | 264 | result = (compute_domain(self.field_stop_modifiers, res) == true) ? false : true; | ||
118 | 265 | return result; | ||
119 | 266 | } | ||
120 | 267 | } | ||
121 | 268 | } | ||
122 | 269 | } | ||
123 | 270 | }); | ||
124 | 235 | this.refresh_scheduler(); | 271 | this.refresh_scheduler(); |
125 | 236 | 272 | ||
126 | 237 | // Remove hard coded style attributes from dhtmlx scheduler | 273 | // Remove hard coded style attributes from dhtmlx scheduler |
127 | @@ -256,7 +292,12 @@ | |||
128 | 256 | scheduler.setCurrentView(scheduler._date); | 292 | scheduler.setCurrentView(scheduler._date); |
129 | 257 | }, | 293 | }, |
130 | 258 | reload_event: function(id) { | 294 | reload_event: function(id) { |
132 | 259 | this.dataset.read_ids([id], _.keys(this.fields)).done(this.proxy('events_loaded')); | 295 | var self = this; |
133 | 296 | this.id = id; | ||
134 | 297 | this.dataset.read_ids([id], _.keys(this.fields)).done(function(events) { | ||
135 | 298 | _.each(events, function(event){self.dataset_events.push(event);}); | ||
136 | 299 | self.events_loaded(events, false, true); | ||
137 | 300 | }); | ||
138 | 260 | }, | 301 | }, |
139 | 261 | get_color: function(key) { | 302 | get_color: function(key) { |
140 | 262 | if (this.color_map[key]) { | 303 | if (this.color_map[key]) { |
141 | @@ -280,6 +321,16 @@ | |||
142 | 280 | selection_label[value[0]] = value[1]; | 321 | selection_label[value[0]] = value[1]; |
143 | 281 | }); | 322 | }); |
144 | 282 | } | 323 | } |
145 | 324 | if (this.fields[this.date_start].states) { | ||
146 | 325 | var states = []; | ||
147 | 326 | var res = ""; | ||
148 | 327 | _.each (this.fields[this.date_start].states, function(modifier, state) { | ||
149 | 328 | if (modifier[0][0] == "readonly") | ||
150 | 329 | states.push(state); | ||
151 | 330 | res = (modifier[0][1] == false) ? ['state', 'not in', states] : ['state', 'in', states]; | ||
152 | 331 | }); | ||
153 | 332 | this.field_modifiers.push(res); | ||
154 | 333 | } | ||
155 | 283 | for (var e = 0; e < events.length; e++) { | 334 | for (var e = 0; e < events.length; e++) { |
156 | 284 | var evt = events[e]; | 335 | var evt = events[e]; |
157 | 285 | if (!evt[this.date_start]) { | 336 | if (!evt[this.date_start]) { |
158 | @@ -313,14 +364,28 @@ | |||
159 | 313 | evt.textColor = '#000000'; | 364 | evt.textColor = '#000000'; |
160 | 314 | } | 365 | } |
161 | 315 | } | 366 | } |
164 | 316 | 367 | if (this.fields[this.date_start]['type'] == 'date' || this.fields[this.date_start]['type'] == 'datetime') { | |
163 | 317 | if (this.fields[this.date_start]['type'] == 'date') { | ||
165 | 318 | evt[this.date_start] = instance.web.auto_str_to_date(evt[this.date_start]).set({hour: 9}).toString('yyyy-MM-dd HH:mm:ss'); | 368 | evt[this.date_start] = instance.web.auto_str_to_date(evt[this.date_start]).set({hour: 9}).toString('yyyy-MM-dd HH:mm:ss'); |
166 | 319 | } | 369 | } |
167 | 320 | if (this.date_stop && evt[this.date_stop] && this.fields[this.date_stop]['type'] == 'date') { | 370 | if (this.date_stop && evt[this.date_stop] && this.fields[this.date_stop]['type'] == 'date') { |
168 | 321 | evt[this.date_stop] = instance.web.auto_str_to_date(evt[this.date_stop]).set({hour: 17}).toString('yyyy-MM-dd HH:mm:ss'); | 371 | evt[this.date_stop] = instance.web.auto_str_to_date(evt[this.date_stop]).set({hour: 17}).toString('yyyy-MM-dd HH:mm:ss'); |
169 | 322 | } | 372 | } |
171 | 323 | res_events.push(this.convert_event(evt)); | 373 | var converted_data = this.convert_event(evt); |
172 | 374 | res_events.push(converted_data); | ||
173 | 375 | |||
174 | 376 | if (events.length == 1) { | ||
175 | 377 | for (i=0; i<this.res_event.length; i++) { | ||
176 | 378 | if (this.res_event[i].id == evt.id) { | ||
177 | 379 | this.res_event.pop(this.res_event[i].id); | ||
178 | 380 | } | ||
179 | 381 | } | ||
180 | 382 | } | ||
181 | 383 | if (events.length != this.res_event.length) { | ||
182 | 384 | this.res_event.push(converted_data); | ||
183 | 385 | } | ||
184 | 386 | } | ||
185 | 387 | if(events.length == this.res_event.length) { | ||
186 | 388 | this.res_event = res_events; | ||
187 | 324 | } | 389 | } |
188 | 325 | scheduler.parse(res_events, 'json'); | 390 | scheduler.parse(res_events, 'json'); |
189 | 326 | this.refresh_scheduler(); | 391 | this.refresh_scheduler(); |
190 | @@ -332,8 +397,8 @@ | |||
191 | 332 | var date_start = instance.web.str_to_datetime(evt[this.date_start]), | 397 | var date_start = instance.web.str_to_datetime(evt[this.date_start]), |
192 | 333 | date_stop = this.date_stop ? instance.web.str_to_datetime(evt[this.date_stop]) : null, | 398 | date_stop = this.date_stop ? instance.web.str_to_datetime(evt[this.date_stop]) : null, |
193 | 334 | date_delay = evt[this.date_delay] || 1.0, | 399 | date_delay = evt[this.date_delay] || 1.0, |
194 | 400 | readonly = this.process_modifiers(evt), | ||
195 | 335 | res_text = ''; | 401 | res_text = ''; |
196 | 336 | |||
197 | 337 | if (this.info_fields) { | 402 | if (this.info_fields) { |
198 | 338 | res_text = _.map(this.info_fields, function(fld) { | 403 | res_text = _.map(this.info_fields, function(fld) { |
199 | 339 | if(evt[fld] instanceof Array) | 404 | if(evt[fld] instanceof Array) |
200 | @@ -348,7 +413,8 @@ | |||
201 | 348 | 'start_date': date_start.toString('yyyy-MM-dd HH:mm:ss'), | 413 | 'start_date': date_start.toString('yyyy-MM-dd HH:mm:ss'), |
202 | 349 | 'end_date': date_stop.toString('yyyy-MM-dd HH:mm:ss'), | 414 | 'end_date': date_stop.toString('yyyy-MM-dd HH:mm:ss'), |
203 | 350 | 'text': res_text.join(', '), | 415 | 'text': res_text.join(', '), |
205 | 351 | 'id': evt.id | 416 | 'id': evt.id, |
206 | 417 | 'readonly': readonly | ||
207 | 352 | }; | 418 | }; |
208 | 353 | if (evt.color) { | 419 | if (evt.color) { |
209 | 354 | r.color = evt.color; | 420 | r.color = evt.color; |
210 | @@ -424,7 +490,6 @@ | |||
211 | 424 | current_mode: function() { | 490 | current_mode: function() { |
212 | 425 | return scheduler.getState().mode; | 491 | return scheduler.getState().mode; |
213 | 426 | }, | 492 | }, |
214 | 427 | |||
215 | 428 | quick_save: function(event_id, event_obj) { | 493 | quick_save: function(event_id, event_obj) { |
216 | 429 | var self = this; | 494 | var self = this; |
217 | 430 | var data = this.get_event_data(event_obj); | 495 | var data = this.get_event_data(event_obj); |
218 | @@ -464,6 +529,7 @@ | |||
219 | 464 | }, | 529 | }, |
220 | 465 | slow_create: function(event_id, event_obj) { | 530 | slow_create: function(event_id, event_obj) { |
221 | 466 | var self = this; | 531 | var self = this; |
222 | 532 | var def = $.Deferred(); | ||
223 | 467 | if (this.current_mode() === 'month') { | 533 | if (this.current_mode() === 'month') { |
224 | 468 | event_obj['start_date'].addHours(8); | 534 | event_obj['start_date'].addHours(8); |
225 | 469 | if (event_obj._length === 1) { | 535 | if (event_obj._length === 1) { |
226 | @@ -477,7 +543,7 @@ | |||
227 | 477 | _.each(this.get_event_data(event_obj), function(val, field_name) { | 543 | _.each(this.get_event_data(event_obj), function(val, field_name) { |
228 | 478 | defaults['default_' + field_name] = val; | 544 | defaults['default_' + field_name] = val; |
229 | 479 | }); | 545 | }); |
231 | 480 | var something_saved = false; | 546 | var something_saved = false, reload = false, created_id = null; |
232 | 481 | var pop = new instance.web.form.FormOpenPopup(this); | 547 | var pop = new instance.web.form.FormOpenPopup(this); |
233 | 482 | var pop_infos = this.get_form_popup_infos(); | 548 | var pop_infos = this.get_form_popup_infos(); |
234 | 483 | pop.show_element(this.dataset.model, null, this.dataset.get_context(defaults), { | 549 | pop.show_element(this.dataset.model, null, this.dataset.get_context(defaults), { |
235 | @@ -485,16 +551,24 @@ | |||
236 | 485 | disable_multiple_selection: true, | 551 | disable_multiple_selection: true, |
237 | 486 | view_id: pop_infos.view_id, | 552 | view_id: pop_infos.view_id, |
238 | 487 | }); | 553 | }); |
239 | 488 | pop.on('closed', self, function() { | ||
240 | 489 | if (!something_saved) { | ||
241 | 490 | scheduler.deleteEvent(event_id); | ||
242 | 491 | } | ||
243 | 492 | }); | ||
244 | 493 | pop.on('create_completed', self, function(id) { | 554 | pop.on('create_completed', self, function(id) { |
245 | 494 | something_saved = true; | 555 | something_saved = true; |
246 | 556 | def.resolve(id).promise(); | ||
247 | 495 | self.dataset.ids.push(id); | 557 | self.dataset.ids.push(id); |
248 | 558 | created_id = id; | ||
249 | 496 | scheduler.changeEventId(event_id, id); | 559 | scheduler.changeEventId(event_id, id); |
251 | 497 | self.reload_event(id); | 560 | }); |
252 | 561 | pop.on('closed', self, function(id) { | ||
253 | 562 | $.when(def).then(function(id) { | ||
254 | 563 | if (something_saved) { | ||
255 | 564 | reload = true; | ||
256 | 565 | something_saved = false; | ||
257 | 566 | } | ||
258 | 567 | }); | ||
259 | 568 | if (reload) { | ||
260 | 569 | self.reload_event(created_id); | ||
261 | 570 | reload = false; | ||
262 | 571 | } | ||
263 | 498 | }); | 572 | }); |
264 | 499 | }, | 573 | }, |
265 | 500 | open_event: function(event_id) { | 574 | open_event: function(event_id) { |
266 | @@ -521,8 +595,12 @@ | |||
267 | 521 | title: _.str.sprintf(_t("Edit: %s"), pop_infos.title), | 595 | title: _.str.sprintf(_t("Edit: %s"), pop_infos.title), |
268 | 522 | view_id: pop_infos.view_id, | 596 | view_id: pop_infos.view_id, |
269 | 523 | }); | 597 | }); |
272 | 524 | pop.on('write_completed', self, function(){ | 598 | var reload = false; |
273 | 525 | self.reload_event(id_from_dataset); | 599 | pop.on('closed', self, function() { |
274 | 600 | if(!reload){ | ||
275 | 601 | self.reload_event(id_from_dataset); | ||
276 | 602 | reload = true; | ||
277 | 603 | } | ||
278 | 526 | }); | 604 | }); |
279 | 527 | } | 605 | } |
280 | 528 | }, | 606 | }, |
281 | @@ -535,6 +613,17 @@ | |||
282 | 535 | this.dataset.unlink(this.dataset.ids[index]); | 613 | this.dataset.unlink(this.dataset.ids[index]); |
283 | 536 | } | 614 | } |
284 | 537 | }, | 615 | }, |
285 | 616 | process_modifiers: function(field){ | ||
286 | 617 | var compute_domain = instance.web.form.compute_domain; | ||
287 | 618 | var res = []; | ||
288 | 619 | _.each(field, function(d, k){ | ||
289 | 620 | res[k] = {'value': d}; | ||
290 | 621 | }); | ||
291 | 622 | var result = false; | ||
292 | 623 | if (this.field_attrs_modifiers.length) result = compute_domain(this.field_attrs_modifiers, res); | ||
293 | 624 | else if (this.field_modifiers.length) result = compute_domain(this.field_modifiers, res); | ||
294 | 625 | return result; | ||
295 | 626 | }, | ||
296 | 538 | }); | 627 | }); |
297 | 539 | 628 | ||
298 | 540 | instance.web_calendar.Sidebar = instance.web.Widget.extend({ | 629 | instance.web_calendar.Sidebar = instance.web.Widget.extend({ |
299 | 541 | 630 | ||
300 | === modified file 'addons/web_kanban/static/src/css/kanban.css' | |||
301 | --- addons/web_kanban/static/src/css/kanban.css 2013-10-02 09:37:30 +0000 | |||
302 | +++ addons/web_kanban/static/src/css/kanban.css 2013-11-08 10:26:02 +0000 | |||
303 | @@ -198,6 +198,7 @@ | |||
304 | 198 | } | 198 | } |
305 | 199 | .openerp .oe_kanban_view .oe_kanban_add { | 199 | .openerp .oe_kanban_view .oe_kanban_add { |
306 | 200 | top: -8px; | 200 | top: -8px; |
307 | 201 | z-index: 1; | ||
308 | 201 | } | 202 | } |
309 | 202 | .openerp .oe_kanban_view .oe_kanban_header .oe_dropdown_toggle { | 203 | .openerp .oe_kanban_view .oe_kanban_header .oe_dropdown_toggle { |
310 | 203 | top: -2px; | 204 | top: -2px; |
311 | 204 | 205 | ||
312 | === modified file 'addons/web_kanban/static/src/css/kanban.sass' | |||
313 | --- addons/web_kanban/static/src/css/kanban.sass 2013-10-02 09:37:30 +0000 | |||
314 | +++ addons/web_kanban/static/src/css/kanban.sass 2013-11-08 10:26:02 +0000 | |||
315 | @@ -213,6 +213,7 @@ | |||
316 | 213 | position: relative | 213 | position: relative |
317 | 214 | .oe_kanban_add | 214 | .oe_kanban_add |
318 | 215 | top: -8px | 215 | top: -8px |
319 | 216 | z-index: 1 | ||
320 | 216 | .oe_kanban_header .oe_dropdown_toggle | 217 | .oe_kanban_header .oe_dropdown_toggle |
321 | 217 | top: -2px | 218 | top: -2px |
322 | 218 | height: 14px | 219 | height: 14px |