knitkit 2.0.5 → 2.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/knitkit/erp_app/desktop/app_controller.rb +5 -8
- data/app/controllers/knitkit/erp_app/desktop/articles_controller.rb +11 -8
- data/app/controllers/knitkit/erp_app/desktop/content_controller.rb +26 -4
- data/app/controllers/knitkit/erp_app/desktop/file_assets_controller.rb +49 -35
- data/app/controllers/knitkit/erp_app/desktop/image_assets_controller.rb +30 -21
- data/app/controllers/knitkit/erp_app/desktop/theme_controller.rb +41 -32
- data/app/controllers/knitkit/erp_app/desktop/website_controller.rb +0 -6
- data/app/controllers/knitkit/erp_app/desktop/website_section_controller.rb +42 -6
- data/app/{models → mailers}/website_inquiry_mailer.rb +0 -0
- data/app/models/article.rb +4 -0
- data/app/models/content.rb +0 -4
- data/app/models/theme.rb +3 -3
- data/app/models/website.rb +44 -17
- data/app/views/knitkit/website_sections/index.html.erb +1 -1
- data/app/views/layouts/knitkit/base.html.erb +6 -0
- data/app/views/shared/knitkit/_footer.html.erb +2 -2
- data/app/widgets/signup/base.rb +0 -2
- data/db/data_migrations/20120809020508_update_website_and_configuration.rb +77 -0
- data/lib/knitkit/engine.rb +4 -0
- data/lib/knitkit/extensions.rb +4 -1
- data/lib/knitkit/extensions/action_controller/theme_support/acts_as_themed_controller.rb +36 -33
- data/lib/knitkit/extensions/action_mailer/theme_support/acts_as_themed_mailer.rb +60 -0
- data/lib/knitkit/extensions/active_record/acts_as_commentable.rb +9 -4
- data/lib/knitkit/extensions/active_record/acts_as_document.rb +1 -1
- data/lib/knitkit/extensions/compass_ae/widgets/base.rb +21 -1
- data/lib/knitkit/extensions/compass_ae/widgets/widget_proxy_controller.rb +26 -0
- data/lib/knitkit/extensions/railties/action_view/base.rb +11 -0
- data/lib/knitkit/extensions/railties/action_view/helpers/blog_helper.rb +62 -0
- data/lib/knitkit/extensions/railties/action_view/helpers/content_helper.rb +83 -0
- data/lib/knitkit/extensions/railties/action_view/helpers/knitkit_helper.rb +67 -0
- data/lib/knitkit/extensions/railties/action_view/helpers/menu_helper.rb +71 -0
- data/lib/knitkit/version.rb +1 -1
- data/public/images/knitkit/close.png +0 -0
- data/public/javascripts/erp_app/desktop/applications/knitkit/articles_grid_panel.js +150 -400
- data/public/javascripts/erp_app/desktop/applications/knitkit/center_region.js +687 -593
- data/public/javascripts/erp_app/desktop/applications/knitkit/east_region.js +1 -2
- data/public/javascripts/erp_app/desktop/applications/knitkit/file_assets_panel.js +39 -15
- data/public/javascripts/erp_app/desktop/applications/knitkit/image_assets_data_view.js +1 -1
- data/public/javascripts/erp_app/desktop/applications/knitkit/image_assets_panel.js +65 -126
- data/public/javascripts/erp_app/desktop/applications/knitkit/module.js +65 -1
- data/public/javascripts/erp_app/desktop/applications/knitkit/section_articles_grid_panel.js +265 -183
- data/public/javascripts/erp_app/desktop/applications/knitkit/themes_tree_panel.js +24 -9
- data/public/javascripts/erp_app/desktop/applications/knitkit/versions_grid_panel.js +631 -595
- data/public/javascripts/erp_app/desktop/applications/knitkit/west_region/helpers/document.js +265 -0
- data/public/javascripts/erp_app/desktop/applications/knitkit/west_region/helpers/host.js +133 -0
- data/public/javascripts/erp_app/desktop/applications/knitkit/west_region/helpers/menu.js +174 -0
- data/public/javascripts/erp_app/desktop/applications/knitkit/west_region/helpers/section.js +399 -0
- data/public/javascripts/erp_app/desktop/applications/knitkit/west_region/helpers/website.js +165 -0
- data/public/javascripts/erp_app/desktop/applications/knitkit/west_region/helpers/website_nav_items.js +266 -0
- data/public/javascripts/erp_app/desktop/applications/knitkit/west_region/west_region.js +1224 -0
- data/public/javascripts/knitkit/inline_editing.js +136 -0
- data/public/stylesheets/extjs/resources/css/knitkit_extjs_4.css +1 -2
- data/public/stylesheets/knitkit/inline_editing.css +88 -0
- data/public/stylesheets/knitkit/style.css +1 -1
- metadata +47 -31
- data/lib/knitkit/extensions/railties/action_view.rb +0 -199
- data/public/javascripts/erp_app/desktop/applications/knitkit/west_region.js +0 -2725
data/lib/knitkit/version.rb
CHANGED
Binary file
|
@@ -7,9 +7,7 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.ArticlesGridPanel",{
|
|
7
7
|
Ext.Ajax.request({
|
8
8
|
url: '/knitkit/erp_app/desktop/articles/delete',
|
9
9
|
method: 'POST',
|
10
|
-
params:{
|
11
|
-
id:id
|
12
|
-
},
|
10
|
+
params:{id:id},
|
13
11
|
success: function(response) {
|
14
12
|
var obj = Ext.decode(response.responseText);
|
15
13
|
if(obj.success){
|
@@ -28,363 +26,131 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.ArticlesGridPanel",{
|
|
28
26
|
});
|
29
27
|
},
|
30
28
|
|
31
|
-
// shouldnt need this anymore
|
32
|
-
deleteAttribute : function(id){
|
33
|
-
var self = this;
|
34
|
-
this.initialConfig['centerRegion'].setWindowStatus('Deleting...');
|
35
|
-
var conn = new Ext.data.Connection();
|
36
|
-
conn.request({
|
37
|
-
url: '/knitkit/erp_app/desktop/articles/delete_attribute',
|
38
|
-
method: 'POST',
|
39
|
-
params:{
|
40
|
-
id:id
|
41
|
-
},
|
42
|
-
success: function(response) {
|
43
|
-
var obj = Ext.decode(response.responseText);
|
44
|
-
if(obj.success){
|
45
|
-
self.initialConfig['centerRegion'].clearWindowStatus();
|
46
|
-
Ext.getCmp('editGlobalArticleAttributesWindowGrid').getStore().load();
|
47
|
-
}
|
48
|
-
else{
|
49
|
-
Ext.Msg.alert('Error', 'Error deleting Article');
|
50
|
-
self.initialConfig['centerRegion'].clearWindowStatus();
|
51
|
-
}
|
52
|
-
},
|
53
|
-
failure: function(response) {
|
54
|
-
self.initialConfig['centerRegion'].clearWindowStatus();
|
55
|
-
Ext.Msg.alert('Error', 'Error deleting Article');
|
56
|
-
}
|
57
|
-
});
|
58
|
-
},
|
59
|
-
|
60
|
-
// shouldnt need this
|
61
|
-
editAttributes :function(record) {
|
62
|
-
var self = this;
|
63
|
-
|
64
|
-
var attributesStore = Ext.create('Ext.data.Store', {
|
65
|
-
proxy: {
|
66
|
-
type: 'ajax',
|
67
|
-
url:'/knitkit/erp_app/desktop/articles/article_attributes/',
|
68
|
-
extraParams:{
|
69
|
-
article_id:record.get('id')
|
70
|
-
},
|
71
|
-
reader: {
|
72
|
-
type: 'json',
|
73
|
-
root: 'data'
|
74
|
-
}
|
75
|
-
},
|
76
|
-
remoteSort: true,
|
77
|
-
fields:[
|
78
|
-
{
|
79
|
-
name:'id'
|
80
|
-
},
|
81
|
-
{
|
82
|
-
name:'description'
|
83
|
-
},
|
84
|
-
{
|
85
|
-
name:'data_type'
|
86
|
-
},
|
87
|
-
{
|
88
|
-
name:'value'
|
89
|
-
}
|
90
|
-
]
|
91
|
-
});
|
92
|
-
|
93
|
-
var editArticleAttributesWindow = Ext.create("Ext.window.Window",{
|
94
|
-
layout:'fit',
|
95
|
-
width:375,
|
96
|
-
height:253,
|
97
|
-
title:'Edit Attributes',
|
98
|
-
plain: true,
|
99
|
-
buttonAlign:'center',
|
100
|
-
items: {
|
101
|
-
xtype: 'grid',
|
102
|
-
id: 'editGlobalArticleAttributesWindowGrid',
|
103
|
-
border:false,
|
104
|
-
frame:false,
|
105
|
-
store: attributesStore,
|
106
|
-
columns: [
|
107
|
-
{
|
108
|
-
header: "id",
|
109
|
-
width: 30,
|
110
|
-
dataIndex: 'id',
|
111
|
-
sortable: true,
|
112
|
-
hidden:true
|
113
|
-
},
|
114
|
-
{
|
115
|
-
id: 'description',
|
116
|
-
header: "Name",
|
117
|
-
width: 151,
|
118
|
-
dataIndex: 'description',
|
119
|
-
sortable: true
|
120
|
-
},
|
121
|
-
{
|
122
|
-
id: 'data_type',
|
123
|
-
header: "Data_Type",
|
124
|
-
width: 70,
|
125
|
-
dataIndex: 'data_type',
|
126
|
-
sortable: true
|
127
|
-
},
|
128
|
-
{
|
129
|
-
id: 'value',
|
130
|
-
header: "Value",
|
131
|
-
width: 100,
|
132
|
-
dataIndex: 'value',
|
133
|
-
sortable: true
|
134
|
-
},
|
135
|
-
{
|
136
|
-
menuDisabled:true,
|
137
|
-
resizable:false,
|
138
|
-
xtype:'actioncolumn',
|
139
|
-
header:'Delete',
|
140
|
-
align:'center',
|
141
|
-
width:40,
|
142
|
-
items:[{
|
143
|
-
icon:'/images/icons/delete/delete_16x16.png',
|
144
|
-
tooltip:'Delete',
|
145
|
-
handler :function(grid, rowIndex, colIndex){
|
146
|
-
var rec = grid.getStore().getAt(rowIndex);
|
147
|
-
var id = rec.get('id');
|
148
|
-
var messageBox = Ext.MessageBox.confirm(
|
149
|
-
'Confirm', 'Are you sure?',
|
150
|
-
function(btn){
|
151
|
-
if (btn == 'yes'){
|
152
|
-
self.deleteAttribute(id);
|
153
|
-
}
|
154
|
-
}
|
155
|
-
);
|
156
|
-
}
|
157
|
-
}]
|
158
|
-
}],
|
159
|
-
tbar: [{
|
160
|
-
text: 'Add Attribute',
|
161
|
-
iconCls: 'icon-add',
|
162
|
-
handler : function(){
|
163
|
-
var addAttributeWindow = new Ext.Window({
|
164
|
-
layout:'fit',
|
165
|
-
width:375,
|
166
|
-
title:'New Attribute',
|
167
|
-
plain: true,
|
168
|
-
buttonAlign:'center',
|
169
|
-
items: new Ext.FormPanel({
|
170
|
-
labelWidth: 110,
|
171
|
-
frame:false,
|
172
|
-
bodyStyle:'padding:5px 5px 0',
|
173
|
-
width: 425,
|
174
|
-
url:'/knitkit/erp_app/desktop/articles/new_attribute/',
|
175
|
-
defaults: {
|
176
|
-
width: 257
|
177
|
-
},
|
178
|
-
items:[
|
179
|
-
{
|
180
|
-
xtype:'hidden',
|
181
|
-
name:'article_id',
|
182
|
-
value:record.get('id')
|
183
|
-
},
|
184
|
-
{
|
185
|
-
xtype:'textfield',
|
186
|
-
fieldLabel:'Name',
|
187
|
-
allowBlank:false,
|
188
|
-
name:'description'
|
189
|
-
},
|
190
|
-
{
|
191
|
-
xtype:'combo',
|
192
|
-
fieldLabel:'Data_type',
|
193
|
-
forceSelection:true,
|
194
|
-
store:[
|
195
|
-
['Text','Text'],
|
196
|
-
['Date', 'Date'],
|
197
|
-
['Boolean', 'Boolean'],
|
198
|
-
['Integer', 'Integer'],
|
199
|
-
['Float', 'Float']
|
200
|
-
],
|
201
|
-
value:'Text',
|
202
|
-
name:'data_type',
|
203
|
-
allowBlank: false,
|
204
|
-
triggerAction:'all'
|
205
|
-
},
|
206
|
-
{
|
207
|
-
xtype:'textfield',
|
208
|
-
fieldLabel:'Value',
|
209
|
-
allowBlank:false,
|
210
|
-
name:'value'
|
211
|
-
}]
|
212
|
-
}),
|
213
|
-
buttons: [{
|
214
|
-
text:'Submit',
|
215
|
-
listeners:{
|
216
|
-
'click':function(button){
|
217
|
-
var window = button.findParentByType('window');
|
218
|
-
var formPanel = window.query('form')[0];
|
219
|
-
self.initialConfig['centerRegion'].setWindowStatus('Creating attribute...');
|
220
|
-
formPanel.getForm().submit({
|
221
|
-
reset:true,
|
222
|
-
success:function(form, action){
|
223
|
-
self.initialConfig['centerRegion'].clearWindowStatus();
|
224
|
-
var obj = Ext.decode(action.response.responseText);
|
225
|
-
if(obj.success){
|
226
|
-
Ext.getCmp('editGlobalArticleAttributesWindowGrid').getStore().load()
|
227
|
-
}
|
228
|
-
else{
|
229
|
-
Ext.Msg.alert("Error", obj.msg);
|
230
|
-
}
|
231
|
-
addAttributeWindow.close();
|
232
|
-
|
233
|
-
},
|
234
|
-
failure:function(form, action){
|
235
|
-
self.initialConfig['centerRegion'].clearWindowStatus();
|
236
|
-
Ext.Msg.alert("Error", "Error creating attribute");
|
237
|
-
}
|
238
|
-
});
|
239
|
-
}
|
240
|
-
}
|
241
|
-
},{
|
242
|
-
text: 'Close',
|
243
|
-
handler: function(){
|
244
|
-
addAttributeWindow.close();
|
245
|
-
}
|
246
|
-
}]
|
247
|
-
});
|
248
|
-
addAttributeWindow.show();
|
249
|
-
}
|
250
|
-
}],
|
251
|
-
bbar: new Ext.PagingToolbar({
|
252
|
-
pageSize: 5,
|
253
|
-
store: attributesStore,
|
254
|
-
displayInfo: true,
|
255
|
-
displayMsg: '{0} - {1} of {2}',
|
256
|
-
emptyMsg: "Empty"
|
257
|
-
}),
|
258
|
-
renderTo: Ext.getBody(),
|
259
|
-
autoscroll: true,
|
260
|
-
loadMask: true
|
261
|
-
}
|
262
|
-
});
|
263
|
-
attributesStore.loadPage(1);
|
264
|
-
editArticleAttributesWindow.show();
|
265
|
-
},
|
266
|
-
|
267
29
|
editArticle : function(record){
|
268
30
|
var self = this;
|
269
|
-
|
270
|
-
var editArticleWindow = Ext.
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
allowBlank:false,
|
291
|
-
name:'title',
|
292
|
-
value: record.get('title')
|
293
|
-
},
|
294
|
-
{
|
295
|
-
xtype:'radiogroup',
|
296
|
-
fieldLabel:'Display title?',
|
297
|
-
name:'display_title',
|
298
|
-
columns:2,
|
299
|
-
items:[
|
31
|
+
var itemId = 'editArticle-'+record.get('id');
|
32
|
+
var editArticleWindow = Ext.ComponentQuery.query('#'+itemId).first();
|
33
|
+
|
34
|
+
if(Compass.ErpApp.Utility.isBlank(editArticleWindow)){
|
35
|
+
var editArticleWindow = Ext.create("Ext.window.Window",{
|
36
|
+
layout:'fit',
|
37
|
+
width:375,
|
38
|
+
title:'Edit Article',
|
39
|
+
itemId:itemId,
|
40
|
+
// minimizable:true,
|
41
|
+
plain: true,
|
42
|
+
buttonAlign:'center',
|
43
|
+
items: {
|
44
|
+
xtype: 'form',
|
45
|
+
labelWidth: 110,
|
46
|
+
frame:false,
|
47
|
+
bodyStyle:'padding:5px 5px 0',
|
48
|
+
width: 425,
|
49
|
+
url:'/knitkit/erp_app/desktop/articles/update/',
|
50
|
+
defaults: {width: 225},
|
51
|
+
items: [
|
300
52
|
{
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
53
|
+
xtype:'textfield',
|
54
|
+
fieldLabel:'Title',
|
55
|
+
allowBlank:false,
|
56
|
+
name:'title',
|
57
|
+
value: record.data.title
|
305
58
|
},
|
306
|
-
|
307
59
|
{
|
308
|
-
|
60
|
+
xtype:'radiogroup',
|
61
|
+
fieldLabel:'Display title?',
|
309
62
|
name:'display_title',
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
63
|
+
columns:2,
|
64
|
+
items:[
|
65
|
+
{
|
66
|
+
boxLabel:'Yes',
|
67
|
+
name:'display_title',
|
68
|
+
inputValue: 'yes',
|
69
|
+
checked:record.data.display_title
|
70
|
+
},
|
71
|
+
|
72
|
+
{
|
73
|
+
boxLabel:'No',
|
74
|
+
name:'display_title',
|
75
|
+
inputValue:'no',
|
76
|
+
checked:!record.data.display_title
|
77
|
+
}]
|
78
|
+
},
|
79
|
+
{
|
80
|
+
xtype:'textfield',
|
81
|
+
fieldLabel:'Unique Name',
|
82
|
+
allowBlank:true,
|
83
|
+
name:'internal_identifier',
|
84
|
+
value: record.data.internal_identifier
|
85
|
+
},
|
86
|
+
{
|
87
|
+
xtype:'textfield',
|
88
|
+
fieldLabel:'Tags',
|
89
|
+
allowBlank:true,
|
90
|
+
name:'tags',
|
91
|
+
itemId: 'tag_list',
|
92
|
+
value: record.data.tag_list
|
93
|
+
},
|
94
|
+
{
|
95
|
+
xtype: 'displayfield',
|
96
|
+
fieldLabel: 'Created At',
|
97
|
+
name: 'created_at',
|
98
|
+
value: record.data.created_at
|
99
|
+
},
|
100
|
+
{
|
101
|
+
xtype: 'displayfield',
|
102
|
+
fieldLabel: 'Updated At',
|
103
|
+
name: 'updated_at',
|
104
|
+
value: record.data.updated_at
|
105
|
+
},
|
106
|
+
{
|
107
|
+
xtype:'hidden',
|
108
|
+
allowBlank:false,
|
109
|
+
name:'id',
|
110
|
+
itemId: 'record_id',
|
111
|
+
value: record.data.id
|
112
|
+
}
|
113
|
+
]
|
334
114
|
},
|
335
|
-
{
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
var window = button.findParentByType('window');
|
355
|
-
var formPanel = window.query('form')[0];
|
356
|
-
self.initialConfig['centerRegion'].setWindowStatus('Updating article...');
|
357
|
-
formPanel.getForm().submit({
|
358
|
-
reset:false,
|
359
|
-
success:function(form, action){
|
360
|
-
self.initialConfig['centerRegion'].clearWindowStatus();
|
361
|
-
var obj = Ext.decode(action.response.responseText);
|
362
|
-
if(obj.success){
|
363
|
-
self.getStore().load();
|
364
|
-
if(formPanel.getForm().findField('tag_list')){
|
365
|
-
var tag_list = formPanel.getForm().findField('tag_list').getValue();
|
366
|
-
record.set('tag_list', tag_list);
|
115
|
+
buttons: [{
|
116
|
+
text:'Submit',
|
117
|
+
listeners:{
|
118
|
+
'click':function(button){
|
119
|
+
var window = button.findParentByType('window');
|
120
|
+
var formPanel = window.query('form')[0];
|
121
|
+
self.initialConfig['centerRegion'].setWindowStatus('Updating article...');
|
122
|
+
formPanel.getForm().submit({
|
123
|
+
reset:false,
|
124
|
+
success:function(form, action){
|
125
|
+
self.initialConfig['centerRegion'].clearWindowStatus();
|
126
|
+
var obj = Ext.decode(action.response.responseText);
|
127
|
+
if(obj.success){
|
128
|
+
self.getStore().load();
|
129
|
+
if(formPanel.getForm().findField('tag_list')){
|
130
|
+
var tag_list = formPanel.getForm().findField('tag_list').getValue();
|
131
|
+
record.set('tag_list', tag_list);
|
132
|
+
}
|
133
|
+
editArticleWindow.close();
|
367
134
|
}
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
135
|
+
else{
|
136
|
+
Ext.Msg.alert("Error", obj.msg);
|
137
|
+
}
|
138
|
+
},
|
139
|
+
failure:function(form, action){
|
140
|
+
self.initialConfig['centerRegion'].clearWindowStatus();
|
141
|
+
Ext.Msg.alert("Error", "Error updating article");
|
372
142
|
}
|
373
|
-
}
|
374
|
-
|
375
|
-
self.initialConfig['centerRegion'].clearWindowStatus();
|
376
|
-
Ext.Msg.alert("Error", "Error updating article");
|
377
|
-
}
|
378
|
-
});
|
143
|
+
});
|
144
|
+
}
|
379
145
|
}
|
380
|
-
}
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
}
|
386
|
-
}
|
387
|
-
}
|
146
|
+
},{
|
147
|
+
text: 'Close',
|
148
|
+
handler: function(){
|
149
|
+
editArticleWindow.close();
|
150
|
+
}
|
151
|
+
}]
|
152
|
+
});
|
153
|
+
}
|
388
154
|
editArticleWindow.show();
|
389
155
|
},
|
390
156
|
|
@@ -402,43 +168,20 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.ArticlesGridPanel",{
|
|
402
168
|
proxy: {
|
403
169
|
type: 'ajax',
|
404
170
|
url:'/knitkit/erp_app/desktop/articles/all/',
|
405
|
-
reader: {
|
406
|
-
type: 'json',
|
407
|
-
root: 'data'
|
408
|
-
}
|
171
|
+
reader: {type: 'json', root: 'data'}
|
409
172
|
},
|
410
173
|
remoteSort: true,
|
411
174
|
fields:[
|
412
|
-
|
413
|
-
name:'
|
414
|
-
|
415
|
-
|
416
|
-
name:'
|
417
|
-
|
418
|
-
|
419
|
-
name:'
|
420
|
-
|
421
|
-
|
422
|
-
name:'excerpt_html'
|
423
|
-
},
|
424
|
-
{
|
425
|
-
name:'body_html'
|
426
|
-
},
|
427
|
-
{
|
428
|
-
name:'sections'
|
429
|
-
},
|
430
|
-
{
|
431
|
-
name:'internal_identifier'
|
432
|
-
},
|
433
|
-
{
|
434
|
-
name:'display_title'
|
435
|
-
},
|
436
|
-
{
|
437
|
-
name:'created_at'
|
438
|
-
},
|
439
|
-
{
|
440
|
-
name:'updated_at'
|
441
|
-
}
|
175
|
+
{name:'id'},
|
176
|
+
{name:'title'},
|
177
|
+
{name:'tag_list'},
|
178
|
+
{name:'excerpt_html'},
|
179
|
+
{name:'body_html'},
|
180
|
+
{name:'sections'},
|
181
|
+
{name:'internal_identifier'},
|
182
|
+
{name:'display_title'},
|
183
|
+
{name:'created_at'},
|
184
|
+
{name:'updated_at'}
|
442
185
|
]
|
443
186
|
});
|
444
187
|
|
@@ -460,6 +203,7 @@ var columnItems = [];
|
|
460
203
|
align:'center',
|
461
204
|
width:50,
|
462
205
|
items:[{
|
206
|
+
iconCls:'actioncolumn_hover',
|
463
207
|
getClass: function(v, meta, rec) { // Or return a class from a function
|
464
208
|
this.items[0].tooltip = rec.get('sections');
|
465
209
|
return 'info-col';
|
@@ -486,6 +230,7 @@ var columnItems = [];
|
|
486
230
|
width:40,
|
487
231
|
items:[{
|
488
232
|
icon:'/images/icons/edit/edit_16x16.png',
|
233
|
+
iconCls:'actioncolumn_hover',
|
489
234
|
tooltip:'Edit',
|
490
235
|
handler :function(grid, rowIndex, colIndex){
|
491
236
|
var rec = grid.getStore().getAt(rowIndex);
|
@@ -505,6 +250,7 @@ var columnItems = [];
|
|
505
250
|
width:60,
|
506
251
|
items:[{
|
507
252
|
icon:'/images/icons/document_text/document_text_16x16.png',
|
253
|
+
iconCls:'actioncolumn_hover',
|
508
254
|
tooltip:'Comments',
|
509
255
|
handler :function(grid, rowIndex, colIndex){
|
510
256
|
var rec = grid.getStore().getAt(rowIndex);
|
@@ -529,6 +275,7 @@ var columnItems = [];
|
|
529
275
|
width:50,
|
530
276
|
items:[{
|
531
277
|
icon:'/images/icons/edit/edit_16x16.png',
|
278
|
+
iconCls:'actioncolumn_hover',
|
532
279
|
tooltip:'Edit Excerpt',
|
533
280
|
handler :function(grid, rowIndex, colIndex){
|
534
281
|
var rec = grid.getStore().getAt(rowIndex);
|
@@ -548,6 +295,7 @@ var columnItems = [];
|
|
548
295
|
width:40,
|
549
296
|
items:[{
|
550
297
|
icon:'/images/icons/edit/edit_16x16.png',
|
298
|
+
iconCls:'actioncolumn_hover',
|
551
299
|
tooltip:'Edit Content',
|
552
300
|
handler :function(grid, rowIndex, colIndex){
|
553
301
|
var rec = grid.getStore().getAt(rowIndex);
|
@@ -572,6 +320,7 @@ var columnItems = [];
|
|
572
320
|
width:40,
|
573
321
|
items:[{
|
574
322
|
icon:'/images/icons/delete/delete_16x16.png',
|
323
|
+
iconCls:'actioncolumn_hover',
|
575
324
|
tooltip:'Delete',
|
576
325
|
handler :function(grid, rowIndex, colIndex){
|
577
326
|
var rec = grid.getStore().getAt(rowIndex);
|
@@ -615,9 +364,7 @@ var columnItems = [];
|
|
615
364
|
bodyStyle:'padding:5px 5px 0',
|
616
365
|
width: 425,
|
617
366
|
url:'/knitkit/erp_app/desktop/articles/new/',
|
618
|
-
defaults: {
|
619
|
-
width: 257
|
620
|
-
},
|
367
|
+
defaults: {width: 257},
|
621
368
|
items:[
|
622
369
|
{
|
623
370
|
xtype:'textfield',
|
@@ -654,8 +401,8 @@ var columnItems = [];
|
|
654
401
|
xtype:'textfield',
|
655
402
|
fieldLabel:'Tags',
|
656
403
|
allowBlank:true,
|
657
|
-
name:'tags'
|
658
|
-
id: 'tag_list'
|
404
|
+
name:'tags'
|
405
|
+
// id: 'tag_list'
|
659
406
|
}]
|
660
407
|
}),
|
661
408
|
buttons: [{
|
@@ -710,7 +457,7 @@ var columnItems = [];
|
|
710
457
|
iconCls: 'icon-search',
|
711
458
|
handler: function(button) {
|
712
459
|
var iid = Ext.getCmp('global_article_search_field').getValue();
|
713
|
-
store.setProxy({
|
460
|
+
store.setProxy({
|
714
461
|
type: 'ajax',
|
715
462
|
url: '/knitkit/erp_app/desktop/articles/all/',
|
716
463
|
reader: {
|
@@ -719,9 +466,7 @@ var columnItems = [];
|
|
719
466
|
idProperty: 'id',
|
720
467
|
totalProperty:'total'
|
721
468
|
},
|
722
|
-
extraParams:{
|
723
|
-
iid:iid,
|
724
|
-
}
|
469
|
+
extraParams:{iid:iid}
|
725
470
|
});
|
726
471
|
store.load();
|
727
472
|
}
|
@@ -741,9 +486,7 @@ var columnItems = [];
|
|
741
486
|
frame:false,
|
742
487
|
bodyStyle:'padding:5px 5px 0',
|
743
488
|
width: 425,
|
744
|
-
defaults: {
|
745
|
-
width: 257
|
746
|
-
},
|
489
|
+
defaults: {width: 257},
|
747
490
|
items:[
|
748
491
|
{
|
749
492
|
xtype:'textfield',
|
@@ -752,6 +495,13 @@ var columnItems = [];
|
|
752
495
|
name:'title',
|
753
496
|
id:'global_article_advanced_search_title'
|
754
497
|
},
|
498
|
+
{
|
499
|
+
xtype:'textfield',
|
500
|
+
fieldLabel:'Content',
|
501
|
+
allowBlank:true,
|
502
|
+
name:'content',
|
503
|
+
id:'global_article_advanced_search_content'
|
504
|
+
},
|
755
505
|
{
|
756
506
|
xtype:'fieldset',
|
757
507
|
border: false,
|
@@ -874,7 +624,8 @@ var columnItems = [];
|
|
874
624
|
text:'Submit',
|
875
625
|
listeners:{
|
876
626
|
'click':function(button){
|
877
|
-
var
|
627
|
+
var title = Ext.getCmp('global_article_advanced_search_title').getValue();
|
628
|
+
var content = Ext.getCmp('global_article_advanced_search_content').getValue();
|
878
629
|
var created_start_date = Ext.getCmp('global_article_advanced_search_created_start_date').getValue();
|
879
630
|
var created_end_date = Ext.getCmp('global_article_advanced_search_created_end_date').getValue();
|
880
631
|
var updated_start_date = Ext.getCmp('global_article_advanced_search_updated_start_date').getValue();
|
@@ -894,7 +645,8 @@ var columnItems = [];
|
|
894
645
|
totalProperty:'total'
|
895
646
|
},
|
896
647
|
extraParams:{
|
897
|
-
|
648
|
+
title:title,
|
649
|
+
content:content,
|
898
650
|
created_start_date:created_start_date,
|
899
651
|
created_end_date:created_end_date,
|
900
652
|
updated_start_date:updated_start_date,
|
@@ -942,5 +694,3 @@ var columnItems = [];
|
|
942
694
|
this.callParent([config]);
|
943
695
|
}
|
944
696
|
});
|
945
|
-
|
946
|
-
|