task-manager 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -123,7 +123,7 @@ Ext.define('TM.controller.Plans', {
123
123
  Ext.create('TM.model.Plan');
124
124
 
125
125
  if(attrs.autocompletable == "on") {
126
- delete attrs["callables_attributes"];
126
+ attrs.callables_attributes = [];
127
127
  }
128
128
  attrs.autocompletable = attrs.autocompletable ? true: false;
129
129
  record.set(attrs);
@@ -53,7 +53,7 @@ Ext.define('TM.controller.Tasks', {
53
53
 
54
54
  var selected = btn.up('task_grid').getSelectionModel().getSelection();
55
55
  Ext.each(selected, function(s){
56
- this.callParent(arguments);
56
+ s.destroy();
57
57
 
58
58
  if(this.store) this.store.remove(this);
59
59
  });
@@ -1,148 +1,147 @@
1
- Ext.define('TM.view.task.Search', {
2
- extend: 'Ext.form.Panel',
3
- xtype: 'task_search',
4
-
5
- border: 0,
6
- bodyPadding: '5 5 0',
7
-
8
- items: [{
9
- xtype: 'fieldset',
10
- id: 'fieldset',
11
- title: '查询',
12
-
13
- layout: {
14
- type: 'form',
15
- border: 0,
16
- margin: 2
17
- },
18
- items: [{
19
- border: 0,
20
- items: [{
21
- layout: 'column',
22
- border: 0,
23
- defaults: {
24
- xtype: 'textfield',
25
- id: 'textfield',
26
- labelAlign: 'right',
27
- width: 300,
28
- labelWidth: 130
29
- },
30
- items: [{
31
- fieldLabel: '名称',
32
- name: 'q[name_cont]'
33
- }, {
34
- fieldLabel: '周期',
35
- editable: false,
36
- xtype: 'combo',
37
- id: 'types',
38
- store: 'TM.store.Types',
39
- valueField: 'value',
40
- name: 'q[task_type_eq]'
41
- }, {
42
- fieldLabel: '状态',
43
- xtype: 'combo',
44
- editable: false,
45
- valueField: 'value',
46
- store: 'TM.store.Statuses',
47
- name: 'q[status_eq]'
48
- }]
49
- }, {
50
- layout: 'column',
51
- border: 0,
52
- defaults: {
53
- border: 0,
54
- labelAlign: 'right',
55
- width: 300,
56
- labelWidth: 130
57
- },
58
- items: [{
59
- layout: 'column',
60
- border: 0,
61
- defaults: {
62
- xtype: 'datefield',
63
- id: 'datefield',
64
- labelAlign: 'right',
65
- width: 300,
66
- labelWidth: 130
67
- },
68
- items: [{
69
- fieldLabel: '完成时间 从',
70
- format: 'Y-m-d',
71
- editable: false,
72
- name: 'q[finished_at_gteq]',
73
- id: 'last_task'
74
- }, {
75
- fieldLabel: '截至时间 从',
76
- format: 'Y-m-d',
77
- xtype: 'datefield',
78
- editable: false,
79
- name: 'q[deadline_gteq]'
80
- }]
81
- }, {
82
- layout: 'column',
83
- border: 0,
84
- defaults: {
85
- xtype: 'datefield',
86
- labelAlign: 'right',
87
- width: 300,
88
- labelWidth: 130
89
- },
90
- items: [{
91
- fieldLabel: '',
92
- format: 'Y-m-d',
93
- editable: false,
94
- name: 'q[finished_at_lteq]'
95
- }, {
96
- fieldLabel: '',
97
- format: 'Y-m-d',
98
- xtype: 'datefield',
99
- editable: false,
100
- name: 'q[deadline_lteq]'
101
- }]
102
- }, {
103
- layout: 'hbox',
104
- margin: '20 0 0 60',
105
- items: [{
106
- xtype: 'button',
107
- formBind: true,
108
- width: 60,
109
- text: '查询',
110
- action: 'query'
111
- }, {
112
- xtype: 'button',
113
- margin: '0 0 0 20',
114
- width: 60,
115
- text: '重置',
116
- action: 'reset'
117
- }]
118
- }]
119
- }],
120
- }]
121
- }],
122
-
123
- // buttons: [{
124
- // formBind: true,
125
- // width: 60,
126
- // text: '查询',
127
- // action: 'query'
128
- // }, {
129
- // margin: '0 0 0 20',
130
- // width: 60,
131
- // text: '重置',
132
- // action: 'reset'
133
- // }],
134
-
135
- hasQueryParams: function() {
136
- var hasParams = false;
137
- Ext.Object.each(this.getValues(), function(key, value) {
138
- if(value) {
139
- hasParams = true;
140
-
141
- // Break each
142
- return false;
143
- }
144
- });
145
-
146
- return hasParams;
147
- }
148
- });
1
+ Ext.define('TM.view.task.Search', {
2
+ extend: 'Ext.form.Panel',
3
+ xtype: 'task_search',
4
+
5
+ border: 0,
6
+ bodyPadding: '5 5 0',
7
+
8
+ items: [{
9
+ xtype: 'fieldset',
10
+ id: 'fieldset',
11
+ title: '查询',
12
+
13
+ layout: {
14
+ type: 'form',
15
+ border: 0,
16
+ margin: 2
17
+ },
18
+ items: [{
19
+ border: 0,
20
+ items: [{
21
+ layout: 'column',
22
+ border: 0,
23
+ defaults: {
24
+ xtype: 'textfield',
25
+ labelAlign: 'right',
26
+ width: 300,
27
+ labelWidth: 130
28
+ },
29
+ items: [{
30
+ fieldLabel: '名称',
31
+ name: 'q[name_cont]'
32
+ }, {
33
+ fieldLabel: '周期',
34
+ editable: false,
35
+ xtype: 'combo',
36
+ id: 'types',
37
+ store: 'TM.store.Types',
38
+ valueField: 'value',
39
+ name: 'q[task_type_eq]'
40
+ }, {
41
+ fieldLabel: '状态',
42
+ xtype: 'combo',
43
+ editable: false,
44
+ valueField: 'value',
45
+ store: 'TM.store.Statuses',
46
+ name: 'q[status_eq]'
47
+ }]
48
+ }, {
49
+ layout: 'column',
50
+ border: 0,
51
+ defaults: {
52
+ border: 0,
53
+ labelAlign: 'right',
54
+ width: 300,
55
+ labelWidth: 130
56
+ },
57
+ items: [{
58
+ layout: 'column',
59
+ border: 0,
60
+ defaults: {
61
+ xtype: 'datefield',
62
+ id: 'datefield',
63
+ labelAlign: 'right',
64
+ width: 300,
65
+ labelWidth: 130
66
+ },
67
+ items: [{
68
+ fieldLabel: '完成时间 从',
69
+ format: 'Y-m-d',
70
+ editable: false,
71
+ name: 'q[finished_at_gteq]',
72
+ id: 'last_task'
73
+ }, {
74
+ fieldLabel: '截止时间 从',
75
+ format: 'Y-m-d',
76
+ xtype: 'datefield',
77
+ editable: false,
78
+ name: 'q[deadline_gteq]'
79
+ }]
80
+ }, {
81
+ layout: 'column',
82
+ border: 0,
83
+ defaults: {
84
+ xtype: 'datefield',
85
+ labelAlign: 'right',
86
+ width: 300,
87
+ labelWidth: 130
88
+ },
89
+ items: [{
90
+ fieldLabel: '至',
91
+ format: 'Y-m-d',
92
+ editable: false,
93
+ name: 'q[finished_at_lteq]'
94
+ }, {
95
+ fieldLabel: '至',
96
+ format: 'Y-m-d',
97
+ xtype: 'datefield',
98
+ editable: false,
99
+ name: 'q[deadline_lteq]'
100
+ }]
101
+ }, {
102
+ layout: 'hbox',
103
+ margin: '20 0 0 60',
104
+ items: [{
105
+ xtype: 'button',
106
+ formBind: true,
107
+ width: 60,
108
+ text: '查询',
109
+ action: 'query'
110
+ }, {
111
+ xtype: 'button',
112
+ margin: '0 0 0 20',
113
+ width: 60,
114
+ text: '重置',
115
+ action: 'reset'
116
+ }]
117
+ }]
118
+ }],
119
+ }]
120
+ }],
121
+
122
+ // buttons: [{
123
+ // formBind: true,
124
+ // width: 60,
125
+ // text: '查询',
126
+ // action: 'query'
127
+ // }, {
128
+ // margin: '0 0 0 20',
129
+ // width: 60,
130
+ // text: '重置',
131
+ // action: 'reset'
132
+ // }],
133
+
134
+ hasQueryParams: function() {
135
+ var hasParams = false;
136
+ Ext.Object.each(this.getValues(), function(key, value) {
137
+ if(value) {
138
+ hasParams = true;
139
+
140
+ // Break each
141
+ return false;
142
+ }
143
+ });
144
+
145
+ return hasParams;
146
+ }
147
+ });
@@ -67,7 +67,11 @@ module TaskManager
67
67
  assignee_id: a.assignee_id,
68
68
  assignee_type: a.assignee_type,
69
69
  )
70
- t.callables = callables
70
+ #t.callables = callables
71
+ t.callables = []
72
+ callables.each do |c|
73
+ t.callables << Callable.create!(callback_id: c.callback_id, callback_type: c.callback_type)
74
+ end
71
75
  end
72
76
  end
73
77
 
@@ -1,3 +1,3 @@
1
1
  module TaskManager
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: task-manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-13 00:00:00.000000000 Z
12
+ date: 2013-04-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -324,7 +324,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
324
324
  version: '0'
325
325
  segments:
326
326
  - 0
327
- hash: 3025342267253612574
327
+ hash: 2365895014508148631
328
328
  required_rubygems_version: !ruby/object:Gem::Requirement
329
329
  none: false
330
330
  requirements:
@@ -333,10 +333,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
333
333
  version: '0'
334
334
  segments:
335
335
  - 0
336
- hash: 3025342267253612574
336
+ hash: 2365895014508148631
337
337
  requirements: []
338
338
  rubyforge_project:
339
- rubygems_version: 1.8.24
339
+ rubygems_version: 1.8.25
340
340
  signing_key:
341
341
  specification_version: 3
342
342
  summary: With TaskManager, you can manage and trace your routine tasks.