netzke-core 0.2.6 → 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ v0.2.7
2
+ QuickTips get initialized now, as otherwise Ext 2.2.1 doesn't properly destroy() BoxComponents for me.
3
+
1
4
  v0.2.6
2
5
  FeedackGhost is now capable of displaying multiple flash messages.
3
6
  Dependencies slightly refactored.
data/javascripts/core.js CHANGED
@@ -2,6 +2,8 @@ Ext.BLANK_IMAGE_URL = "/extjs/resources/images/default/s.gif";
2
2
  Ext.namespace('Ext.netzke');
3
3
  Ext.netzke.cache = {};
4
4
 
5
+ Ext.QuickTips.init(); // seems obligatory in Ext v2.2.1, otherwise destroy() stops working properly
6
+
5
7
  // to comply with Rails' forgery protection
6
8
  Ext.Ajax.extraParams = {
7
9
  'authenticity_token': Ext.authenticityToken
@@ -108,8 +110,7 @@ Ext.override(Ext.Panel, {
108
110
  loadWidget: function(url, params){
109
111
  if (!params) params = {}
110
112
 
111
- // FIXME: a nasty bug: with autoDestroy set to true, it stops working in Ext 2.2.1!
112
- this.remove(this.getWidget(), false); // first delete previous widget
113
+ this.remove(this.getWidget()); // first delete previous widget
113
114
 
114
115
  if (!url) return false; // don't load any widget if the url is null
115
116
 
data/lib/netzke/base.rb CHANGED
@@ -36,6 +36,10 @@ module Netzke
36
36
  layout_manager_class && layout_manager_class.user = user
37
37
  end
38
38
 
39
+ def user_has_role?(role)
40
+ user.login == 'sergei' && role.to_s == 'configurator'
41
+ end
42
+
39
43
  #
40
44
  # Use this class method to declare connection points between client side of a widget and its server side. A method in a widget class with the same name will be (magically) called by the client side of the widget. See Grid widget for an example
41
45
  #
@@ -111,6 +111,7 @@ module Netzke
111
111
  # default config that gets merged with Base#js_config
112
112
  def js_default_config
113
113
  {
114
+ # :header => user_has_role?(:configurator) ? true : nil,
114
115
  :title => "config.id.humanize()".l,
115
116
  :listeners => js_listeners,
116
117
  :tools => "config.tools".l,
data/netzke-core.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{netzke-core}
5
- s.version = "0.2.6"
5
+ s.version = "0.2.7"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Sergei Kozlov"]
9
- s.date = %q{2009-02-12}
9
+ s.date = %q{2009-02-13}
10
10
  s.description = %q{Build ExtJS/Rails widgets with minimum effort}
11
11
  s.email = %q{sergei@writelesscode.com}
12
12
  s.extra_rdoc_files = ["CHANGELOG", "lib/app/controllers/netzke_controller.rb", "lib/app/models/netzke_layout.rb", "lib/app/models/netzke_preference.rb", "lib/netzke/action_view_ext.rb", "lib/netzke/base.rb", "lib/netzke/base_extras/interface.rb", "lib/netzke/base_extras/js_builder.rb", "lib/netzke/controller_extensions.rb", "lib/netzke/core_ext.rb", "lib/netzke/feedback_ghost.rb", "lib/netzke/routing.rb", "lib/netzke-core.rb", "lib/vendor/facets/hash/recursive_merge.rb", "LICENSE", "README.mdown", "tasks/netzke_core_tasks.rake"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: netzke-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergei Kozlov
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-02-12 00:00:00 +01:00
12
+ date: 2009-02-13 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies: []
15
15