Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading the demo app to use Extjs 4.1 and Rails 3.2 #13

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
source 'http://rubygems.org'

gem 'rails', '3.0.9'
gem 'rails'

gem 'mysql2', '~>0.2.0'
gem 'mysql2'

gem 'haml'

gem 'coderay'
gem 'faker'

gem 'netzke-core', :path => File.expand_path('../vendor/gems/netzke-core', __FILE__)
gem 'netzke-basepack', :path => File.expand_path('../vendor/gems/netzke-basepack', __FILE__)
gem 'netzke-persistence', :path => File.expand_path('../vendor/gems/netzke-persistence', __FILE__)
gem 'netzke-core', :git => 'https://github.com/nomadcoder/netzke-core.git'
gem 'netzke-basepack', :git => 'https://github.com/nomadcoder/netzke-basepack.git'
gem 'netzke-persistence', :git => 'https://github.com/nomadcoder/netzke-persistence.git'

gem 'carrierwave'

gem 'inploy'

group :profiling do
gem 'rack-perftools_profiler', '~> 0.1', :require => 'rack/perftools_profiler'
end
# gem 'rack-perftools_profiler', '~> 0.1', :require => 'rack/perftools_profiler'
gem 'rack-perftools_profiler', :require => 'rack/perftools_profiler'
end

gem 'squeel'
193 changes: 103 additions & 90 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,111 +1,123 @@
PATH
remote: vendor/gems/netzke-basepack
GIT
remote: https://github.com/nomadcoder/netzke-basepack.git
revision: be3024fd9f179b3fff1f476b9825427f6eb76a5a
specs:
netzke-basepack (0.7.0)
acts_as_list (~> 0.1.4)
meta_where (~> 1.0.0)
netzke-core (~> 0.7.0)
will_paginate (~> 3.0.0)
netzke-basepack (0.7.6)
netzke-core (~> 0.7.6)

PATH
remote: vendor/gems/netzke-core
GIT
remote: https://github.com/nomadcoder/netzke-core.git
revision: 97543cee380d8d7aac420d4e20665b0ea9619d56
specs:
netzke-core (0.7.1)
activesupport (~> 3.0.0)
netzke-core (0.7.6)
activesupport (>= 3.0.0)

PATH
remote: vendor/gems/netzke-persistence
GIT
remote: https://github.com/nomadcoder/netzke-persistence.git
revision: 9ec27e397661989cff0d765b5849452c77ca0036
specs:
netzke-persistence (0.2.0)
netzke-persistence (0.1.1)

GEM
remote: http://rubygems.org/
specs:
abstract (1.0.0)
actionmailer (3.0.9)
actionpack (= 3.0.9)
mail (~> 2.2.19)
actionpack (3.0.9)
activemodel (= 3.0.9)
activesupport (= 3.0.9)
builder (~> 2.1.2)
erubis (~> 2.6.6)
i18n (~> 0.5.0)
rack (~> 1.2.1)
rack-mount (~> 0.6.14)
rack-test (~> 0.5.7)
tzinfo (~> 0.3.23)
activemodel (3.0.9)
activesupport (= 3.0.9)
builder (~> 2.1.2)
i18n (~> 0.5.0)
activerecord (3.0.9)
activemodel (= 3.0.9)
activesupport (= 3.0.9)
arel (~> 2.0.10)
tzinfo (~> 0.3.23)
activeresource (3.0.9)
activemodel (= 3.0.9)
activesupport (= 3.0.9)
activesupport (3.0.9)
acts_as_list (0.1.4)
arel (2.0.10)
builder (2.1.2)
carrierwave (0.5.6)
activesupport (~> 3.0)
coderay (0.9.8)
erubis (2.6.6)
abstract (>= 1.0.0)
faker (0.9.5)
i18n (~> 0.4)
haml (3.1.2)
i18n (0.5.0)
inploy (1.9.3)
mail (2.2.19)
activesupport (>= 2.3.6)
actionmailer (3.2.8)
actionpack (= 3.2.8)
mail (~> 2.4.4)
actionpack (3.2.8)
activemodel (= 3.2.8)
activesupport (= 3.2.8)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.4)
rack (~> 1.4.0)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.1.3)
activemodel (3.2.8)
activesupport (= 3.2.8)
builder (~> 3.0.0)
activerecord (3.2.8)
activemodel (= 3.2.8)
activesupport (= 3.2.8)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.2.8)
activemodel (= 3.2.8)
activesupport (= 3.2.8)
activesupport (3.2.8)
i18n (~> 0.6)
multi_json (~> 1.0)
arel (3.0.2)
builder (3.0.3)
carrierwave (0.6.2)
activemodel (>= 3.2.0)
activesupport (>= 3.2.0)
coderay (1.0.7)
erubis (2.7.0)
faker (1.1.1)
i18n (~> 0.5)
haml (3.1.7)
hike (1.2.1)
i18n (0.6.1)
inploy (1.9.5)
journey (1.0.4)
json (1.7.5)
mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
meta_where (1.0.4)
activerecord (~> 3.0.0)
activesupport (~> 3.0.0)
arel (~> 2.0.7)
mime-types (1.16)
mysql2 (0.2.11)
open4 (1.1.0)
perftools.rb (0.5.6)
polyglot (0.3.2)
rack (1.2.3)
rack-mount (0.6.14)
rack (>= 1.0.0)
rack-perftools_profiler (0.5.0)
mime-types (1.19)
multi_json (1.3.6)
mysql2 (0.3.11)
open4 (1.3.0)
perftools.rb (2.0.0)
polyamorous (0.5.0)
activerecord (~> 3.0)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
rack (>= 0.4)
rack-perftools_profiler (0.6.0)
open4 (~> 1.0)
perftools.rb (~> 0.5.6)
perftools.rb (~> 2.0.0)
rack (~> 1.0)
rack-test (0.5.7)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
rack (>= 1.0)
rails (3.0.9)
actionmailer (= 3.0.9)
actionpack (= 3.0.9)
activerecord (= 3.0.9)
activeresource (= 3.0.9)
activesupport (= 3.0.9)
rails (3.2.8)
actionmailer (= 3.2.8)
actionpack (= 3.2.8)
activerecord (= 3.2.8)
activeresource (= 3.2.8)
activesupport (= 3.2.8)
bundler (~> 1.0)
railties (= 3.0.9)
railties (3.0.9)
actionpack (= 3.0.9)
activesupport (= 3.0.9)
railties (= 3.2.8)
railties (3.2.8)
actionpack (= 3.2.8)
activesupport (= 3.2.8)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.4)
rake (0.9.2)
rdoc (3.9.1)
thor (0.14.6)
thor (>= 0.14.6, < 2.0)
rake (0.9.2.2)
rdoc (3.12)
json (~> 1.4)
sprockets (2.1.3)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
squeel (1.0.11)
activerecord (~> 3.0)
activesupport (~> 3.0)
polyamorous (~> 0.5.0)
thor (0.16.0)
tilt (1.3.3)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.29)
will_paginate (3.0.0)
tzinfo (0.3.33)

PLATFORMS
ruby
Expand All @@ -116,9 +128,10 @@ DEPENDENCIES
faker
haml
inploy
mysql2 (~> 0.2.0)
mysql2
netzke-basepack!
netzke-core!
netzke-persistence!
rack-perftools_profiler (~> 0.1)
rails (= 3.0.9)
rack-perftools_profiler
rails
squeel
2 changes: 1 addition & 1 deletion app/components/bosses_and_clerks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def configuration

component :bosses do
{
:class_name => "Basepack::GridPanel",
:class_name => "Netzke::Basepack::GridPanel",
:model => "Boss"
}
end
Expand Down
2 changes: 1 addition & 1 deletion app/components/custom_action_grid.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def default_context_menu
js_method :on_show_details, <<-JS
function(){
var tmpl = new Ext.Template("<b>{0}</b>: {1}<br/>"), html = "";
Ext.iterate(this.getSelectionModel().getSelected().data, function(key, value){
Ext.iterate(this.getSelectionModel().getSelection()[0].data, function(key, value){
html += tmpl.apply([key.humanize(), value]);
}, this);

Expand Down
6 changes: 3 additions & 3 deletions app/components/some_simple_app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,14 @@ def configuration

# Components
component :bosses,
:class_name => "Basepack::GridPanel",
:class_name => "Netzke::Basepack::GridPanel",
:model => "Boss",
:lazy_loading => true,
:title => "Bosses",
:persistence => true

component :clerks,
:class_name => "Basepack::GridPanel",
:class_name => "Netzke::Basepack::GridPanel",
:model => "Clerk",
:lazy_loading => true,
:title => "Clerks",
Expand Down Expand Up @@ -157,7 +157,7 @@ def configuration

# A simple panel thit will render a page with links to different Rails views that have embedded widgets in them
component :embedded,
:class_name => "Basepack::Panel",
:class_name => "Netzke::Basepack::Panel",
:auto_load => "demo/embedded",
:body_padding => 15,
:title => "Components embedded into Rails views",
Expand Down
1 change: 0 additions & 1 deletion app/controllers/border_layout_panel_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
require 'meta_where'
class BorderLayoutPanelController < ApplicationController
end
20 changes: 10 additions & 10 deletions app/views/accordion_panel/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
<h2>Example 1: an accordion with two GridPanels as panels</h2>
<p>An accordion with 2 panels, each containing a (preloaded) GridPanel.</p>
<%= netzke :two_grid_panels,
:class_name => "Basepack::AccordionPanel",
:class_name => "Netzke::Basepack::AccordionPanel",
:items => [{
:class_name => "Basepack::GridPanel",
:class_name => "Netzke::Basepack::GridPanel",
:model => "Boss",
:title => "Bosses"
},{
:class_name => "Basepack::GridPanel",
:class_name => "Netzke::Basepack::GridPanel",
:model => "Clerk",
:title => "Clerks"
}],
Expand All @@ -28,13 +28,13 @@
<h2>Example 2: second GridPanel loads dynamically</h2>
<p>Same as before, but the second grid gets first loaded at the moment its tab panel gets expanded.</p>
<%= netzke :with_dynamic_loading,
:class_name => "Basepack::AccordionPanel",
:class_name => "Netzke::Basepack::AccordionPanel",
:items => [{
:class_name => "Basepack::GridPanel",
:class_name => "Netzke::Basepack::GridPanel",
:model => "Boss",
:title => "Bosses"
},{
:class_name => "Basepack::GridPanel",
:class_name => "Netzke::Basepack::GridPanel",
:model => "Clerk",
:title => "Clerks",
:lazy_loading => true # this is what makes a component load dynamically
Expand All @@ -48,26 +48,26 @@
<p>The first panel is a simple Ext.Panel. The second panel is a BorderLayoutPanel with two nested Netzke components - a grid and a form</p>

<%= netzke :border_layout_panel_active,
:class_name => "Basepack::AccordionPanel",
:class_name => "Netzke::Basepack::AccordionPanel",
:items => [{
:html => "Some content",
:title => "A simple Ext panel"
},{
:class_name => "Basepack::BorderLayoutPanel",
:class_name => "Netzke::Basepack::BorderLayoutPanel",
:title => "A compound component",
:header => false,
:lazy_loading => true,
:items => [{
:region => :center,
:title => "A grid",
:class_name => "Basepack::GridPanel",
:class_name => "Netzke::Basepack::GridPanel",
:model => "Boss",
:columns => [:name, :salary]
},{
:region => :east,
:title => "A form",
:split => true,
:class_name => "Basepack::FormPanel",
:class_name => "Netzke::Basepack::FormPanel",
:model => "Clerk",
:record_id => Clerk.first.id,
:width => 350
Expand Down
2 changes: 1 addition & 1 deletion app/views/demo/embedded.haml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ It's possible to embed Netzke components straight into Rails views. Here are som
%h2 GridPanel

%p
Basepack::GridPanel is the most powerful and most used component of Netzke::Basepack.
Netzke::Basepack::GridPanel is the most powerful and most used component of Netzke::Basepack.
%br
= new_window_link_to "Demo/tutorial", :controller => "grid_panel"
\.
Expand Down
Loading