netzke-communitypack 0.1.0.beta

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/.gitignore ADDED
@@ -0,0 +1,3 @@
1
+ pkg/*
2
+ *.gem
3
+ .bundle
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source :gemcutter
2
+
3
+ # Specify your gem's dependencies in netzke-communitypack.gemspec
4
+ gemspec
data/README.rdoc ADDED
File without changes
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
@@ -0,0 +1,46 @@
1
+ # The LiveSearchGridPanel provides a search field in the toolbar of the GridPanel. While the content
2
+ # of the search field is changeing, the data in the grid gets reloaded and the filter string is given
3
+ # to a scope on the configured model. The scope name by default is :live_search but it can be reconfigured
4
+ # by the configuration option :live_search_scope.
5
+ #
6
+ # Options:
7
+ # * +live_search_scope+ - The scope name for filtering the results by the live search (default: :live_search)
8
+ #
9
+ class Netzke::Communitypack::LiveSearchGridPanel < ::Netzke::Basepack::GridPanel
10
+ config :tbar => ['->', {
11
+ :xtype => 'textfield',
12
+ :id => 'live_search_field',
13
+ :enable_key_events => true,
14
+ :ref => '../live_search_field',
15
+ :empty_text => 'Search'
16
+ }]
17
+
18
+ js_method :init_component, <<-JS
19
+ function() {
20
+ #{js_full_class_name}.superclass.initComponent.call(this);
21
+
22
+ this.liveSearchBuffer = '';
23
+ this.live_search_field.on('keydown', function() { this.onLiveSearch(); }, this, { buffer: 500 });
24
+ this.live_search_field.on('blur', function() { this.onLiveSearch(); }, this, { buffer: 500 });
25
+ }
26
+ JS
27
+
28
+ js_method :on_live_search, <<-JS
29
+ function() {
30
+ var search_text = this.getTopToolbar().get('live_search_field').getValue();
31
+ if (search_text == this.liveSearchBuffer) return;
32
+ this.liveSearchBuffer = search_text;
33
+ this.getStore().setBaseParam('live_search', search_text);
34
+ this.getStore().load();
35
+ }
36
+ JS
37
+
38
+ def get_data(*args)
39
+ params = args.first
40
+ search_scope = config[:live_search_scope] || :live_search
41
+ data_class.send(search_scope, params && params[:live_search] || '').scoping do
42
+ super
43
+ end
44
+ end
45
+
46
+ end
@@ -0,0 +1,11 @@
1
+ module Netzke
2
+ module Communitypack
3
+ MAJOR = 0
4
+ MINOR = 1
5
+ PATCH = 0
6
+ BUILD = 'beta'
7
+
8
+ STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
9
+ VERSION = STRING
10
+ end
11
+ end
@@ -0,0 +1,5 @@
1
+ module Netzke
2
+ module Communitypack
3
+ # Your code goes here...
4
+ end
5
+ end
@@ -0,0 +1,24 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path("../lib/netzke-communitypack/version", __FILE__)
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = "netzke-communitypack"
6
+ s.version = Netzke::Communitypack::VERSION
7
+ s.platform = Gem::Platform::RUBY
8
+ s.authors = ['Paul Spieker']
9
+ s.email = ['p.spieker@duenos.de']
10
+ s.homepage = "http://github.com/skozlov/netzke-communitypack"
11
+ s.summary = "Components for Netzke created by the community"
12
+ s.description = "The community pack for netzke contains components for Netzke which are provided by the company"
13
+
14
+ s.required_rubygems_version = ">= 1.3.6"
15
+ s.rubyforge_project = "netzke-communitypack"
16
+
17
+ s.add_development_dependency "bundler", ">= 1.0.0"
18
+
19
+ s.files = `git ls-files`.split("\n")
20
+ s.executables = `git ls-files`.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact
21
+ s.require_paths = ['lib']
22
+
23
+ s.rdoc_options = ["--charset=UTF-8"]
24
+ end
metadata ADDED
@@ -0,0 +1,89 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: netzke-communitypack
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: true
5
+ segments:
6
+ - 0
7
+ - 1
8
+ - 0
9
+ - beta
10
+ version: 0.1.0.beta
11
+ platform: ruby
12
+ authors:
13
+ - Paul Spieker
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-10-21 00:00:00 +02:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: bundler
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ segments:
30
+ - 1
31
+ - 0
32
+ - 0
33
+ version: 1.0.0
34
+ type: :development
35
+ version_requirements: *id001
36
+ description: The community pack for netzke contains components for Netzke which are provided by the company
37
+ email:
38
+ - p.spieker@duenos.de
39
+ executables: []
40
+
41
+ extensions: []
42
+
43
+ extra_rdoc_files: []
44
+
45
+ files:
46
+ - .gitignore
47
+ - Gemfile
48
+ - README.rdoc
49
+ - Rakefile
50
+ - app/components/netzke/communitypack/live_search_grid_panel.rb
51
+ - lib/netzke-communitypack.rb
52
+ - lib/netzke-communitypack/version.rb
53
+ - netzke-communitypack.gemspec
54
+ has_rdoc: true
55
+ homepage: http://github.com/skozlov/netzke-communitypack
56
+ licenses: []
57
+
58
+ post_install_message:
59
+ rdoc_options:
60
+ - --charset=UTF-8
61
+ require_paths:
62
+ - lib
63
+ required_ruby_version: !ruby/object:Gem::Requirement
64
+ none: false
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ segments:
69
+ - 0
70
+ version: "0"
71
+ required_rubygems_version: !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ segments:
77
+ - 1
78
+ - 3
79
+ - 6
80
+ version: 1.3.6
81
+ requirements: []
82
+
83
+ rubyforge_project: netzke-communitypack
84
+ rubygems_version: 1.3.7
85
+ signing_key:
86
+ specification_version: 3
87
+ summary: Components for Netzke created by the community
88
+ test_files: []
89
+