knitkit 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -29,7 +29,7 @@ module Knitkit
29
29
  module InstanceMethods
30
30
  def current_themes
31
31
  # the lambda broke in rails 3.2, changing this to an instance variable
32
- @current_themes ||= self.website.themes.collect{|t| t if t.active } rescue []
32
+ @current_themes ||= self.website.themes.collect{|t| t if t.active == 1}.compact rescue []
33
33
  # @current_themes ||= case accessor = self.class.read_inheritable_attribute(:current_themes)
34
34
  # when Symbol then accessor == :current_themes ? raise("screwed") : send(accessor)
35
35
  # when Proc then accessor.call(self)
@@ -6,11 +6,10 @@ module Knitkit
6
6
  module MenuHelper
7
7
 
8
8
  def menu_item_selected(menu_item)
9
- result = false
10
- result = request.path == menu_item.path
9
+ result = request.env['REQUEST_PATH'] == menu_item.path
11
10
  unless result
12
11
  menu_item.descendants.each do |child|
13
- result = request.path == child.path
12
+ result = request.env['REQUEST_PATH'] == child.path
14
13
  break if result
15
14
  end
16
15
  end
@@ -2,7 +2,7 @@ module Knitkit
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 2
4
4
  MINOR = 1
5
- TINY = 0
5
+ TINY = 1
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].compact.join('.')
8
8
  end
@@ -93,6 +93,11 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.CenterRegion", {
93
93
  title:sectionName + ' - Layout',
94
94
  tbarItems:tbarItems,
95
95
  disableSave:true,
96
+ listeners:{
97
+ save:function (comp, content) {
98
+ self.saveSectionLayout(websiteSectionId, content);
99
+ }
100
+ },
96
101
  xtype:'codemirror',
97
102
  parser:'erb',
98
103
  region:'center',
@@ -168,6 +173,11 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.CenterRegion", {
168
173
  tbarItems:tbarItems,
169
174
  disableSave:true,
170
175
  xtype:'codemirror',
176
+ listeners:{
177
+ save:function (comp, content) {
178
+ self.saveTemplateFile(node.data.id, content);
179
+ }
180
+ },
171
181
  parser:fileType,
172
182
  sourceCode:content
173
183
  }
@@ -227,6 +237,13 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.CenterRegion", {
227
237
  ckEditorConfig:{
228
238
  extraPlugins:'jwplayer',
229
239
  toolbar:self.ckEditorToolbar
240
+ },
241
+ listeners:{
242
+ save:function (comp, content) {
243
+ self.saveExcerpt(id, content, siteId);
244
+ if (contentGridStore)
245
+ contentGridStore.load();
246
+ }
230
247
  }
231
248
  });
232
249
 
@@ -393,6 +410,13 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.CenterRegion", {
393
410
  ckEditorConfig:{
394
411
  extraPlugins:'jwplayer',
395
412
  toolbar:self.ckEditorToolbar
413
+ },
414
+ listeners:{
415
+ save:function (comp, content) {
416
+ self.saveContent(id, content, contentType, siteId);
417
+ if (contentGridStore)
418
+ contentGridStore.load();
419
+ }
396
420
  }
397
421
  });
398
422
 
@@ -439,7 +463,7 @@ Ext.define("Compass.ErpApp.Desktop.Applications.Knitkit.CenterRegion", {
439
463
  closable:true,
440
464
  items:items,
441
465
  save:function (comp) {
442
- if (currentUser.hasCapability('edit_html','Content')) {
466
+ if (currentUser.hasCapability('edit_html', 'Content')) {
443
467
  var content = comp.down('ckeditor').getValue();
444
468
  self.saveContent(id, content, contentType, siteId);
445
469
  if (contentGridStore) {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knitkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
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-11 00:00:00.000000000 Z
12
+ date: 2013-02-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: erp_forms
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: '2.1'
21
+ version: '3.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
- version: '2.1'
29
+ version: '3.0'
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: erp_dev_svcs
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -239,6 +239,16 @@ files:
239
239
  - app/widgets/contact_us/views/index.html.erb
240
240
  - app/widgets/contact_us/views/layouts/base.html.erb
241
241
  - app/widgets/contact_us/views/success.html.erb
242
+ - app/widgets/dynamic_forms/base.rb
243
+ - app/widgets/dynamic_forms/javascript/dynamic_forms.js
244
+ - app/widgets/dynamic_forms/views/error.html.erb
245
+ - app/widgets/dynamic_forms/views/index.html.erb
246
+ - app/widgets/dynamic_forms/views/success.html.erb
247
+ - app/widgets/dynamic_grid/base.rb
248
+ - app/widgets/dynamic_grid/helpers/controller/dynamic_grid_controller_helper.rb
249
+ - app/widgets/dynamic_grid/helpers/view/dynamic_grid_view_helper.rb
250
+ - app/widgets/dynamic_grid/javascript/dynamic_grid.js
251
+ - app/widgets/dynamic_grid/views/index.html.erb
242
252
  - app/widgets/google_map/base.rb
243
253
  - app/widgets/google_map/javascript/google_map.js
244
254
  - app/widgets/google_map/views/index.html.erb
@@ -260,6 +270,11 @@ files:
260
270
  - app/widgets/reset_password/javascript/reset_password.js
261
271
  - app/widgets/reset_password/views/index.html.erb
262
272
  - app/widgets/reset_password/views/layouts/base.html.erb
273
+ - app/widgets/scaffold/base.rb
274
+ - app/widgets/scaffold/helpers/controller/scaffold_controller_helper.rb
275
+ - app/widgets/scaffold/helpers/view/scaffold_view_helper.rb
276
+ - app/widgets/scaffold/javascript/scaffold.js
277
+ - app/widgets/scaffold/views/index.html.erb
263
278
  - app/widgets/search/base.rb
264
279
  - app/widgets/search/javascript/search.js
265
280
  - app/widgets/search/views/_search.html.erb
@@ -433,18 +448,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
433
448
  - - ! '>='
434
449
  - !ruby/object:Gem::Version
435
450
  version: '0'
436
- segments:
437
- - 0
438
- hash: -2635721742671855384
439
451
  required_rubygems_version: !ruby/object:Gem::Requirement
440
452
  none: false
441
453
  requirements:
442
454
  - - ! '>='
443
455
  - !ruby/object:Gem::Version
444
456
  version: '0'
445
- segments:
446
- - 0
447
- hash: -2635721742671855384
448
457
  requirements: []
449
458
  rubyforge_project:
450
459
  rubygems_version: 1.8.24