knitkit 2.1.2 → 2.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. data/app/controllers/knitkit/comments_controller.rb +1 -1
  2. data/app/controllers/knitkit/erp_app/desktop/app_controller.rb +5 -0
  3. data/app/controllers/knitkit/erp_app/desktop/articles_controller.rb +0 -4
  4. data/app/controllers/knitkit/erp_app/desktop/content_controller.rb +0 -2
  5. data/app/controllers/knitkit/erp_app/desktop/theme_controller.rb +13 -0
  6. data/app/controllers/knitkit/erp_app/desktop/website_section_controller.rb +37 -29
  7. data/app/controllers/knitkit/online_document_sections_controller.rb +1 -1
  8. data/app/models/website_section.rb +2 -3
  9. data/app/views/knitkit/blogs/_add_comment.html.erb +2 -1
  10. data/app/views/knitkit/online_document_sections/index.html.erb +143 -136
  11. data/app/views/layouts/knitkit/online_document_sections.html.erb +2 -2
  12. data/app/widgets/contact_us/javascript/contact_us.js +3 -1
  13. data/app/widgets/dynamic_forms/javascript/dynamic_forms.js +91 -92
  14. data/app/widgets/dynamic_grid/base.rb +7 -7
  15. data/app/widgets/dynamic_grid/javascript/dynamic_grid.js +111 -112
  16. data/app/widgets/dynamic_grid/views/index.html.erb +1 -1
  17. data/app/widgets/google_map/javascript/google_map.js +132 -119
  18. data/app/widgets/google_map/views/index.html.erb +1 -1
  19. data/app/widgets/login/javascript/login.js +160 -155
  20. data/app/widgets/manage_profile/javascript/manage_profile.js +3 -1
  21. data/app/widgets/reset_password/javascript/reset_password.js +3 -1
  22. data/app/widgets/scaffold/base.rb +8 -4
  23. data/app/widgets/scaffold/javascript/scaffold.js +218 -220
  24. data/app/widgets/scaffold/views/index.html.erb +1 -1
  25. data/app/widgets/search/javascript/search.js +21 -21
  26. data/app/widgets/signup/javascript/signup.js +2 -1
  27. data/config/routes.rb +1 -1
  28. data/lib/knitkit/extensions/railties/action_view/helpers/blog_helper.rb +3 -3
  29. data/lib/knitkit/extensions/railties/action_view/helpers/knitkit_helper.rb +0 -2
  30. data/lib/knitkit/version.rb +1 -1
  31. data/public/javascripts/erp_app/desktop/applications/knitkit/center_region.js +6 -7
  32. data/public/javascripts/erp_app/desktop/applications/knitkit/publish_window.js +3 -3
  33. data/public/javascripts/erp_app/desktop/applications/knitkit/select_roles_window.js +103 -0
  34. data/public/javascripts/erp_app/desktop/applications/knitkit/west_region/helpers/section.js +4 -4
  35. data/public/javascripts/erp_app/desktop/applications/knitkit/west_region/west_region.js +32 -21
  36. metadata +3 -2
@@ -2,7 +2,7 @@ module Widgets
2
2
  module Scaffold
3
3
  class Base < ErpApp::Widgets::Base
4
4
  def index
5
- @model = params[:model]
5
+ @model_name = params[:model_name]
6
6
  @title = params[:grid][:title] || params[:model].pluralize
7
7
  @width = params[:grid][:width] || '100%'
8
8
  @height = params[:grid][:height] || 500
@@ -10,7 +10,7 @@ module Widgets
10
10
  @page_size = params[:grid][:page_size] || 10
11
11
  @display_msg = params[:grid][:display_msg] || 'Displaying {0} - {1} of {2}'
12
12
  @empty_msg = params[:grid][:empty_msg] || 'Empty'
13
- @editable = params[:grid][:editable] || false
13
+ @editable = params[:editable] || false
14
14
 
15
15
  render :view => :index
16
16
  end
@@ -50,7 +50,7 @@ module Widgets
50
50
 
51
51
  def setup_active_ext_core
52
52
  model_id = session[:widgets][self.uuid][:model].pluralize.singularize
53
- default_options = {
53
+ options = {
54
54
  :inline_edit => true,
55
55
  :use_ext_forms => false,
56
56
  :ignore_associations => true,
@@ -59,7 +59,11 @@ module Widgets
59
59
  :only => nil
60
60
  }
61
61
 
62
- options = default_options.merge(session[:widgets][self.uuid][:scaffold])
62
+ #merge in passed widget options
63
+ options.each do |key, value|
64
+ options[key] = session[:widgets][self.uuid][key] unless session[:widgets][self.uuid][key].blank?
65
+ end
66
+
63
67
  ActiveExt::Core.new(model_id,options)
64
68
  end
65
69
 
@@ -1,49 +1,81 @@
1
1
  Compass.ErpApp.Widgets.Scaffold = {
2
- addScaffoldWidget:function () {
2
+ template: new Ext.XTemplate("<%= render_widget :scaffold, :params => {:model => '{model}',\n",
3
+ " :scaffold => {\n",
4
+ " :ignore_associations => {ignoreAssociations:this.toBoolean},\n",
5
+ " :show_id => {showId:this.toBoolean},\n",
6
+ " :show_timestamps => {showTimestamps:this.toBoolean},\n",
7
+ " :only => [\n",
8
+ '<tpl for="columns">',
9
+ " {:{name} => {:required => {required:this.toBoolean}, :readonly => {readonly:this.toBoolean}}},\n",
10
+ '</tpl>',
11
+ " ]\n",
12
+ " },\n",
13
+ " :grid => {\n",
14
+ " :editable => {editiable:this.toBoolean},\n",
15
+ " :title => '{title}',\n",
16
+ " :width => {width},\n",
17
+ " :height => {height},\n",
18
+ " :page => {page_results:this.toBoolean},\n",
19
+ " :page_size => {pageSize},\n",
20
+ " :display_msg => '{displayMsg}',\n",
21
+ " :empty_msg => '{emptyMsg}'\n",
22
+ " }\n",
23
+ "} %>",
24
+ {
25
+ toBoolean: function (value) {
26
+ var result = 'false';
27
+ if (value == 'y') {
28
+ result = 'true';
29
+ }
30
+ return result;
31
+ }
32
+ }),
33
+
34
+ addScaffoldWidget: function () {
3
35
  var sm = Ext.create('Ext.selection.CheckboxModel');
4
36
 
5
37
  Ext.create("Ext.window.Window", {
6
- layout:'fit',
7
- title:'Add Scaffold',
8
- autoScroll:true,
9
- plain:true,
10
- buttonAlign:'center',
11
- items:Ext.create("Ext.form.Panel", {
12
- autoScroll:true,
13
- width:420,
14
- height:500,
15
- frame:false,
16
- bodyStyle:'padding:5px 5px 0',
17
- items:[
38
+ layout: 'fit',
39
+ title: 'Add Scaffold',
40
+ autoScroll: true,
41
+ plain: true,
42
+ buttonAlign: 'center',
43
+ items: Ext.create("Ext.form.Panel", {
44
+ autoScroll: true,
45
+ width: 420,
46
+ height: 500,
47
+ frame: false,
48
+ bodyStyle: 'padding:5px 5px 0',
49
+ items: [
18
50
  {
19
- xtype:'combo',
20
- forceSelection:true,
21
- store:{
22
- model:'ScaffoldModelName',
23
- proxy:{
24
- url:'/erp_app/desktop/scaffold/get_models',
25
- type:'ajax',
26
- reader:{
27
- type:'json',
28
- root:'names'
51
+ xtype: 'combo',
52
+ forceSelection: true,
53
+ store: {
54
+ model: 'ScaffoldModelName',
55
+ proxy: {
56
+ url: '/erp_app/desktop/scaffold/get_models',
57
+ type: 'ajax',
58
+ reader: {
59
+ type: 'json',
60
+ root: 'names'
29
61
  }
30
62
  },
31
- fields:[
32
- {name:'name', type:'string'}
63
+ fields: [
64
+ {name: 'name', type: 'string'}
33
65
  ]
34
66
  },
35
- displayField:'name',
36
- valueField:'name',
37
- labelWidth:125,
38
- fieldLabel:'CompassAE Model',
39
- value:':Party',
40
- name:'model',
41
- allowBlank:false,
42
- triggerAction:'all',
43
- listeners:{
44
- select:function (combo, records) {
67
+ displayField: 'name',
68
+ valueField: 'name',
69
+ labelWidth: 125,
70
+ fieldLabel: 'CompassAE Model',
71
+ value: ':Party',
72
+ name: 'model',
73
+ allowBlank: false,
74
+ triggerAction: 'all',
75
+ listeners: {
76
+ select: function (combo, records) {
45
77
  var form = combo.up('form'), grid = form.down('grid');
46
- grid.getStore().load({params:{model:records[0].get('name')}});
78
+ grid.getStore().load({params: {model: records[0].get('name')}});
47
79
  grid.enable();
48
80
  form.down('#scaffoldOptions').enable();
49
81
  form.down('#gridOptions').enable();
@@ -51,206 +83,206 @@ Compass.ErpApp.Widgets.Scaffold = {
51
83
  }
52
84
  },
53
85
  {
54
- xtype:'fieldset',
55
- style:'padding:5px',
56
- title:'Columns',
57
- items:[
86
+ xtype: 'fieldset',
87
+ style: 'padding:5px',
88
+ title: 'Columns',
89
+ items: [
58
90
  {
59
- xtype:'grid',
60
- selModel:sm,
61
- loadMask:true,
62
- disabled:true,
63
- autoScroll:true,
64
- columns:[
65
- {text:"Column Name", width:200, dataIndex:'name'},
91
+ xtype: 'grid',
92
+ selModel: sm,
93
+ loadMask: true,
94
+ disabled: true,
95
+ autoScroll: true,
96
+ columns: [
97
+ {text: "Column Name", width: 200, dataIndex: 'name'},
66
98
  {
67
- xtype:'checkcolumn',
68
- header:'Required?',
69
- dataIndex:'required',
70
- width:70,
71
- stopSelection:true
99
+ xtype: 'checkcolumn',
100
+ header: 'Required?',
101
+ dataIndex: 'required',
102
+ width: 70,
103
+ stopSelection: true
72
104
  },
73
105
  {
74
- xtype:'checkcolumn',
75
- header:'Readonly?',
76
- dataIndex:'readonly',
77
- width:70,
78
- stopSelection:true
106
+ xtype: 'checkcolumn',
107
+ header: 'Readonly?',
108
+ dataIndex: 'readonly',
109
+ width: 70,
110
+ stopSelection: true
79
111
  }
80
112
  ],
81
- store:{
82
- model:'ScaffoldColumn',
83
- proxy:{
84
- url:'/erp_app/desktop/scaffold/get_columns',
85
- type:'ajax',
86
- reader:{
87
- type:'json',
88
- root:'columns'
113
+ store: {
114
+ model: 'ScaffoldColumn',
115
+ proxy: {
116
+ url: '/erp_app/desktop/scaffold/get_columns',
117
+ type: 'ajax',
118
+ reader: {
119
+ type: 'json',
120
+ root: 'columns'
89
121
  }
90
122
  },
91
- fields:[
92
- {name:'name', type:'string'},
93
- {name:'readonly', type:'boolean', default:false},
94
- {name:'required', type:'boolean', default:false}
123
+ fields: [
124
+ {name: 'name', type: 'string'},
125
+ {name: 'readonly', type: 'boolean', default: false},
126
+ {name: 'required', type: 'boolean', default: false}
95
127
  ]
96
128
  },
97
- columnLines:true,
98
- height:150,
99
- frame:true
129
+ columnLines: true,
130
+ height: 150,
131
+ frame: true
100
132
  }
101
133
  ]
102
134
  },
103
135
  {
104
- xtype:'fieldset',
105
- title:'Scaffold Options',
106
- itemId:'scaffoldOptions',
107
- disabled:true,
108
- defaults:{
109
- xtype:'fieldcontainer',
110
- defaultType:'radiofield',
111
- width:200,
112
- defaults:{
113
- flex:1
136
+ xtype: 'fieldset',
137
+ title: 'Scaffold Options',
138
+ itemId: 'scaffoldOptions',
139
+ disabled: true,
140
+ defaults: {
141
+ xtype: 'fieldcontainer',
142
+ defaultType: 'radiofield',
143
+ width: 200,
144
+ defaults: {
145
+ flex: 1
114
146
  },
115
- layout:'hbox'
147
+ layout: 'hbox'
116
148
  },
117
- items:[
149
+ items: [
118
150
  {
119
- fieldLabel:'Ignore Associations',
120
- items:[
151
+ fieldLabel: 'Ignore Associations',
152
+ items: [
121
153
  {
122
- boxLabel:'Yes',
123
- name:'ignoreAssociations',
124
- checked:true,
125
- inputValue:'y'
154
+ boxLabel: 'Yes',
155
+ name: 'ignoreAssociations',
156
+ checked: true,
157
+ inputValue: 'y'
126
158
  },
127
159
  {
128
- boxLabel:'No',
129
- name:'ignoreAssociations',
130
- inputValue:'n'
160
+ boxLabel: 'No',
161
+ name: 'ignoreAssociations',
162
+ inputValue: 'n'
131
163
  }
132
164
  ]
133
165
  },
134
166
  {
135
- fieldLabel:'Show ID',
136
- items:[
167
+ fieldLabel: 'Show ID',
168
+ items: [
137
169
  {
138
- boxLabel:'Yes',
139
- name:'showId',
140
- checked:true,
141
- inputValue:'y'
170
+ boxLabel: 'Yes',
171
+ name: 'showId',
172
+ checked: true,
173
+ inputValue: 'y'
142
174
  },
143
175
  {
144
- boxLabel:'No',
145
- name:'showId',
146
- inputValue:'n'
176
+ boxLabel: 'No',
177
+ name: 'showId',
178
+ inputValue: 'n'
147
179
  }
148
180
  ]
149
181
  },
150
182
  {
151
- fieldLabel:'Show Timestamps',
152
- items:[
183
+ fieldLabel: 'Show Timestamps',
184
+ items: [
153
185
  {
154
- boxLabel:'Yes',
155
- name:'showTimestamps',
156
- checked:true,
157
- inputValue:'y'
186
+ boxLabel: 'Yes',
187
+ name: 'showTimestamps',
188
+ checked: true,
189
+ inputValue: 'y'
158
190
  },
159
191
  {
160
- boxLabel:'No',
161
- name:'showTimestamps',
162
- inputValue:'n'
192
+ boxLabel: 'No',
193
+ name: 'showTimestamps',
194
+ inputValue: 'n'
163
195
  }
164
196
  ]
165
197
  }
166
198
  ]
167
199
  },
168
200
  {
169
- xtype:'fieldset',
170
- title:'Grid Options',
171
- itemId:'gridOptions',
172
- disabled:true,
173
- items:[
201
+ xtype: 'fieldset',
202
+ title: 'Grid Options',
203
+ itemId: 'gridOptions',
204
+ disabled: true,
205
+ items: [
174
206
  {
175
- xtype:'textfield',
176
- name:'title',
177
- fieldLabel:'Title'
207
+ xtype: 'textfield',
208
+ name: 'title',
209
+ fieldLabel: 'Title'
178
210
  },
179
211
  {
180
- xtype:'textfield',
181
- name:'width',
182
- value:500,
183
- fieldLabel:'Width'
212
+ xtype: 'textfield',
213
+ name: 'width',
214
+ value: 500,
215
+ fieldLabel: 'Width'
184
216
  },
185
217
  {
186
- xtype:'textfield',
187
- name:'height',
188
- value:500,
189
- fieldLabel:'Height'
218
+ xtype: 'textfield',
219
+ name: 'height',
220
+ value: 500,
221
+ fieldLabel: 'Height'
190
222
  },
191
223
  {
192
- xtype:'fieldcontainer',
193
- defaultType:'radiofield',
194
- width:200,
195
- defaults:{
196
- flex:1
224
+ xtype: 'fieldcontainer',
225
+ defaultType: 'radiofield',
226
+ width: 200,
227
+ defaults: {
228
+ flex: 1
197
229
  },
198
- layout:'hbox',
199
- fieldLabel:'Page Results',
200
- toolTip:'Page results.',
201
- items:[
230
+ layout: 'hbox',
231
+ fieldLabel: 'Page Results',
232
+ toolTip: 'Page results.',
233
+ items: [
202
234
  {
203
- boxLabel:'Yes',
204
- name:'page_results',
205
- checked:true,
206
- inputValue:'y'
235
+ boxLabel: 'Yes',
236
+ name: 'page_results',
237
+ checked: true,
238
+ inputValue: 'y'
207
239
  },
208
240
  {
209
- boxLabel:'No',
210
- name:'page_results',
211
- inputValue:'n'
241
+ boxLabel: 'No',
242
+ name: 'page_results',
243
+ inputValue: 'n'
212
244
  }
213
245
  ]
214
246
  },
215
247
  {
216
- xtype:'textfield',
217
- name:'pageSize',
218
- value:20,
219
- fieldLabel:'Rows per Page'
248
+ xtype: 'textfield',
249
+ name: 'pageSize',
250
+ value: 20,
251
+ fieldLabel: 'Rows per Page'
220
252
  },
221
253
  {
222
- xtype:'textfield',
223
- name:'displayMsg',
224
- value:'Displaying {0} - {1} of {2}',
225
- fieldLabel:'Paging Display Message'
254
+ xtype: 'textfield',
255
+ name: 'displayMsg',
256
+ value: 'Displaying {0} - {1} of {2}',
257
+ fieldLabel: 'Paging Display Message'
226
258
  },
227
259
  {
228
- xtype:'textfield',
229
- name:'emptyMsg',
230
- value:'Empty',
231
- fieldLabel:'Empty Message'
260
+ xtype: 'textfield',
261
+ name: 'emptyMsg',
262
+ value: 'Empty',
263
+ fieldLabel: 'Empty Message'
232
264
  },
233
265
  {
234
- xtype:'fieldcontainer',
235
- defaultType:'radiofield',
236
- width:200,
237
- defaults:{
238
- flex:1
266
+ xtype: 'fieldcontainer',
267
+ defaultType: 'radiofield',
268
+ width: 200,
269
+ defaults: {
270
+ flex: 1
239
271
  },
240
- layout:'hbox',
241
- fieldLabel:'Allow Edits',
242
- toolTip:'Allow users to edit data.',
243
- items:[
272
+ layout: 'hbox',
273
+ fieldLabel: 'Allow Edits',
274
+ toolTip: 'Allow users to edit data.',
275
+ items: [
244
276
  {
245
- boxLabel:'Yes',
246
- name:'editiable',
247
- checked:true,
248
- inputValue:'y'
277
+ boxLabel: 'Yes',
278
+ name: 'editiable',
279
+ checked: true,
280
+ inputValue: 'y'
249
281
  },
250
282
  {
251
- boxLabel:'No',
252
- name:'editiable',
253
- inputValue:'n'
283
+ boxLabel: 'No',
284
+ name: 'editiable',
285
+ inputValue: 'n'
254
286
  }
255
287
  ]
256
288
  }
@@ -258,44 +290,12 @@ Compass.ErpApp.Widgets.Scaffold = {
258
290
  }
259
291
  ]
260
292
  }),
261
- buttons:[
293
+ buttons: [
262
294
  {
263
- text:'Submit',
264
- listeners:{
265
- 'click':function (button) {
266
- var tpl = new Ext.XTemplate("<%= render_widget :scaffold, :params => {:model => '{model}',\n",
267
- " :scaffold => {\n",
268
- " :ignore_associations => {ignoreAssociations:this.toBoolean},\n",
269
- " :show_id => {showId:this.toBoolean},\n",
270
- " :show_timestamps => {showTimestamps:this.toBoolean},\n",
271
- " :only => [\n",
272
- '<tpl for="columns">',
273
- " {:{name} => {:required => {required:this.toBoolean}, :readonly => {readonly:this.toBoolean}}},\n",
274
- '</tpl>',
275
- " ]\n",
276
- " },\n",
277
- " :grid => {\n",
278
- " :editable => {editiable:this.toBoolean},\n",
279
- " :title => '{title}',\n",
280
- " :width => {width},\n",
281
- " :height => {height},\n",
282
- " :page => {page_results:this.toBoolean},\n",
283
- " :page_size => {pageSize},\n",
284
- " :display_msg => '{displayMsg}',\n",
285
- " :empty_msg => '{emptyMsg}'\n",
286
- " }\n",
287
- "} %>",
288
- {
289
- toBoolean:function (value) {
290
- var result = 'false';
291
- if (value == 'y') {
292
- result = 'true';
293
- }
294
- return result;
295
- }
296
- }),
297
- content = null,
298
- window = button.findParentByType('window'),
295
+ text: 'Submit',
296
+ listeners: {
297
+ 'click': function (button) {
298
+ var window = button.findParentByType('window'),
299
299
  formPanel = window.query('form')[0],
300
300
  grid = formPanel.down('grid'),
301
301
  basicForm = formPanel.getForm(),
@@ -306,23 +306,21 @@ Compass.ErpApp.Widgets.Scaffold = {
306
306
 
307
307
  var columns = Ext.each(grid.getSelectionModel().getSelection(), function (record) {
308
308
  data['columns'].push({
309
- name:record.get('name'),
310
- readonly:record.get('readonly'),
311
- required:record.get('required')
309
+ name: record.get('name'),
310
+ readonly: record.get('readonly'),
311
+ required: record.get('required')
312
312
  });
313
313
  });
314
314
 
315
- content = tpl.apply(data);
316
-
317
315
  //add rendered template to center region editor
318
- Ext.getCmp('knitkitCenterRegion').addContentToActiveCodeMirror(content);
316
+ Ext.getCmp('knitkitCenterRegion').addContentToActiveCodeMirror(Compass.ErpApp.Widgets.Scaffold.template.apply(data));
319
317
  button.up('window').close();
320
318
  }
321
319
  }
322
320
  },
323
321
  {
324
- text:'Close',
325
- handler:function (btn) {
322
+ text: 'Close',
323
+ handler: function (btn) {
326
324
  btn.up('window').close();
327
325
  }
328
326
  }
@@ -332,8 +330,8 @@ Compass.ErpApp.Widgets.Scaffold = {
332
330
  }
333
331
 
334
332
  Compass.ErpApp.Widgets.AvailableWidgets.push({
335
- name:'CompassAE Scaffold',
336
- iconUrl:'/images/icons/grid/grid_48x48.png',
337
- onClick:Compass.ErpApp.Widgets.Scaffold.addScaffoldWidget,
338
- about:'Scaffold a CompassAE model'
333
+ name: 'CompassAE Scaffold',
334
+ iconUrl: '/images/icons/grid/grid_48x48.png',
335
+ onClick: Compass.ErpApp.Widgets.Scaffold.addScaffoldWidget,
336
+ about: 'Scaffold a CompassAE model'
339
337
  });
@@ -7,7 +7,7 @@
7
7
  :dataUrl => build_widget_url('data', nil, {:model => @model}),
8
8
  :width => @width,
9
9
  :height => @height,
10
- :page => @page,
10
+ :page => @page_results,
11
11
  :pageSize => @page_size,
12
12
  :displayMsg => @display_msg,
13
13
  :editable => @editable,
@@ -1,26 +1,26 @@
1
- widgetTpl = new Ext.Template(
2
- "<% #Optional Parameters:\n",
3
- " # content_type: Leave blank to search all section types, set to Blog to only search Blog articles\n",
4
- " # section_permalink: This is the permalink value for the section \n",
5
- " # Useful if you only want to search articles within a single Blog section\n",
6
- " # results_permalink: How do you want your results to display? via ajax? or on a new page?\n",
7
- " # Leave blank if you want results to display via ajax on the same page as the search form\n",
8
- " # Enter the permalink of results page if you want the search results to display on a new page\n",
9
- " # per_page: Number of results per page \n",
10
- " # class: CSS class for the form %>\n",
11
- "<%= render_widget :search, \n",
12
- " :action => get_widget_action,\n",
13
- " :params => set_widget_params({\n",
14
- " :content_type => '',\n",
15
- " :section_permalink => '',\n",
16
- " :results_permalink => '',\n",
17
- " :per_page => 20,\n",
18
- " :class => ''}) %>\n"
19
- );
20
-
21
1
  Compass.ErpApp.Widgets.Search = {
2
+ template: new Ext.Template(
3
+ "<% #Optional Parameters:\n",
4
+ " # content_type: Leave blank to search all section types, set to Blog to only search Blog articles\n",
5
+ " # section_permalink: This is the permalink value for the section \n",
6
+ " # Useful if you only want to search articles within a single Blog section\n",
7
+ " # results_permalink: How do you want your results to display? via ajax? or on a new page?\n",
8
+ " # Leave blank if you want results to display via ajax on the same page as the search form\n",
9
+ " # Enter the permalink of results page if you want the search results to display on a new page\n",
10
+ " # per_page: Number of results per page \n",
11
+ " # class: CSS class for the form %>\n",
12
+ "<%= render_widget :search, \n",
13
+ " :action => get_widget_action,\n",
14
+ " :params => set_widget_params({\n",
15
+ " :content_type => '',\n",
16
+ " :section_permalink => '',\n",
17
+ " :results_permalink => '',\n",
18
+ " :per_page => 20,\n",
19
+ " :class => ''}) %>\n"
20
+ ),
21
+
22
22
  addSearch:function(){
23
- Ext.getCmp('knitkitCenterRegion').addContentToActiveCodeMirror(widgetTpl.apply({}));
23
+ Ext.getCmp('knitkitCenterRegion').addContentToActiveCodeMirror(Compass.ErpApp.Widgets.Search.template.apply());
24
24
  }
25
25
  }
26
26