Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

A few places updated for 0-8

  • Loading branch information...
commit 9803fc4fd4efeb5771d76b232b1a948553097759 1 parent 264bd0b
Denis Gorin authored
View
9 Gemfile
@@ -1,9 +1,6 @@
source 'http://rubygems.org'
-gem 'rails', '3.2.3'
-
-# Bundle edge Rails instead:
-# gem 'rails', :git => 'git://github.com/rails/rails.git'
+gem 'rails', '3.2.7'
gem 'sqlite3'
@@ -11,8 +8,8 @@ gem 'sqlite3'
#gem 'netzke-basepack'
#gem 'netzke-communitypack'
-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-core', :path => File.expand_path('../vendor/gems/netzke-core', __FILE__)
+gem 'netzke-basepack', :path => File.expand_path('../vendor/gems/netzke-basepack', __FILE__)
gem 'netzke-communitypack', :path => File.expand_path('../vendor/gems/netzke-communitypack', __FILE__)
View
74 Gemfile.lock
@@ -20,34 +20,34 @@ PATH
GEM
remote: http://rubygems.org/
specs:
- actionmailer (3.2.3)
- actionpack (= 3.2.3)
+ actionmailer (3.2.7)
+ actionpack (= 3.2.7)
mail (~> 2.4.4)
- actionpack (3.2.3)
- activemodel (= 3.2.3)
- activesupport (= 3.2.3)
+ actionpack (3.2.7)
+ activemodel (= 3.2.7)
+ activesupport (= 3.2.7)
builder (~> 3.0.0)
erubis (~> 2.7.0)
- journey (~> 1.0.1)
+ journey (~> 1.0.4)
rack (~> 1.4.0)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
- sprockets (~> 2.1.2)
- activemodel (3.2.3)
- activesupport (= 3.2.3)
+ sprockets (~> 2.1.3)
+ activemodel (3.2.7)
+ activesupport (= 3.2.7)
builder (~> 3.0.0)
- activerecord (3.2.3)
- activemodel (= 3.2.3)
- activesupport (= 3.2.3)
+ activerecord (3.2.7)
+ activemodel (= 3.2.7)
+ activesupport (= 3.2.7)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
- activeresource (3.2.3)
- activemodel (= 3.2.3)
- activesupport (= 3.2.3)
- activesupport (3.2.3)
+ activeresource (3.2.7)
+ activemodel (= 3.2.7)
+ activesupport (= 3.2.7)
+ activesupport (3.2.7)
i18n (~> 0.6)
multi_json (~> 1.0)
- ansi (1.4.2)
+ ansi (1.4.3)
arel (3.0.2)
builder (3.0.0)
erubis (2.7.0)
@@ -56,15 +56,15 @@ GEM
forgery (0.5.0)
hike (1.2.1)
i18n (0.6.0)
- journey (1.0.3)
- json (1.6.6)
+ journey (1.0.4)
+ json (1.7.4)
mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
- mime-types (1.18)
- multi_json (1.3.2)
- pg (0.13.2)
+ mime-types (1.19)
+ multi_json (1.3.6)
+ pg (0.14.0)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
@@ -73,35 +73,35 @@ GEM
rack
rack-test (0.6.1)
rack (>= 1.0)
- rails (3.2.3)
- actionmailer (= 3.2.3)
- actionpack (= 3.2.3)
- activerecord (= 3.2.3)
- activeresource (= 3.2.3)
- activesupport (= 3.2.3)
+ rails (3.2.7)
+ actionmailer (= 3.2.7)
+ actionpack (= 3.2.7)
+ activerecord (= 3.2.7)
+ activeresource (= 3.2.7)
+ activesupport (= 3.2.7)
bundler (~> 1.0)
- railties (= 3.2.3)
- railties (3.2.3)
- actionpack (= 3.2.3)
- activesupport (= 3.2.3)
+ railties (= 3.2.7)
+ railties (3.2.7)
+ actionpack (= 3.2.7)
+ activesupport (= 3.2.7)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
- thor (~> 0.14.6)
+ thor (>= 0.14.6, < 2.0)
rake (0.9.2.2)
rdoc (3.12)
json (~> 1.4)
- sprockets (2.1.2)
+ sprockets (2.1.3)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.6)
- thor (0.14.6)
+ thor (0.15.4)
tilt (1.3.3)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
- turn (0.9.5)
+ turn (0.9.6)
ansi
tzinfo (0.3.33)
@@ -115,6 +115,6 @@ DEPENDENCIES
netzke-communitypack!
netzke-core!
pg
- rails (= 3.2.3)
+ rails (= 3.2.7)
sqlite3
turn
View
20 app/components/application.rb
@@ -1,15 +1,22 @@
# Our top-level Application component
class Application < Netzke::Base
- js_base_class "Ext.container.Viewport"
- js_property :layout, :border
- js_property :padding, 5
-
include Netzke::Basepack::ItemsPersistence
HEADER_HTML = "<b>Yanit</a> | RubyShift 2011 | <a href='http://github.com/skozlov/yanit'>Source code</a> | <a href='http://netzke.org'>netzke.org</a> | <a href='http://twitter.com/nomadcoder'>@nomadcoder</a></b>"
- def items
- [
+ js_configure do |c|
+ c.extend = "Ext.container.Viewport"
+ c.layout = :border
+ c.padding = 5
+ end
+
+ # In Ext 4.1 calling `render` on a viewport causes an error
+ def js_component_render
+ ""
+ end
+
+ def configure(c)
+ c.items = [
# Top header
{
region: :north,
@@ -25,6 +32,7 @@ def items
# Workspace
{netzke_component: :workspace, region: :center, title: "Workspace"}
]
+ super
end
#
View
2  app/components/issue_form.rb
@@ -21,4 +21,4 @@ class IssueForm < Netzke::Basepack::FormPanel
},
{name: :description, hide_label: true}
]
-end
+end
View
21 app/components/navigator.rb
@@ -1,16 +1,19 @@
# This component drows a tree that represents a menu. Clicking on a tree node makes a specific component to open in the Workspace component, the id to which must be passed as the :workspace_id parameter (see the Application component).
class Navigator < Netzke::Base
- js_base_class "Ext.tree.Panel"
+ js_configure do |c|
+ c.extend = "Ext.tree.Panel"
- # Mix in the javascript object on class level from navigator/javascripts/navigator.js
- js_mixin
+ # Mix in the javascript object on class level from navigator/javascripts/navigator.js
+ c.mixin
+ end
+ css_configure do |c|
# Include custom stylesheets from navigator/stylesheets/navigator.css
- css_include :navigator
+ c.include
+ end
- def configure
- super
- config.store = {
+ def configure(c)
+ c.store = {
root: {
expanded: true,
children: [{
@@ -47,7 +50,9 @@ def configure
}
}
- config.bbar = [:close_all_tabs]
+ c.bbar = [:close_all_tabs]
+
+ super
end
# Handler for this action (onCloseAllTabs) is defined in navigator/javascripts/navigator.js
View
24 app/components/project_grid.rb
@@ -3,11 +3,25 @@ class ProjectGrid < Netzke::Basepack::GridPanel
model "Project"
# columns customizations (these are optional)
- override_column :name, width: 200
- override_column :description, flex: 1
- override_column :actions, width: 20
- override_column :created_at, read_only: true
- override_column :updated_at, read_only: true
+ column :name do |c|
+ c.width = 200
+ end
+
+ column :description do |c|
+ c.flex = 1
+ end
+
+ column :actions do |c|
+ c.width = 20
+ end
+
+ column :created_at do |c|
+ c.read_only = true
+ end
+
+ column :updated_at do |c|
+ c.read_only = true
+ end
# The inspect action (and column)
include Netzke::Yanit::Inspectable
View
25 app/components/user_grid.rb
@@ -2,11 +2,26 @@
class UserGrid < Netzke::Basepack::GridPanel
model "User"
- override_column :name, width: 200, flex: 1
- override_column :email, width: 200
- override_column :actions, width: 20
- override_column :created_at, read_only: true
- override_column :updated_at, read_only: true
+ column :name do |c|
+ c.width = 200
+ c.flex = 1
+ end
+
+ column :email do |c|
+ c.width = 200
+ end
+
+ column :actions do |c|
+ c.width = 20
+ end
+
+ column :created_at do |c|
+ c.read_only = true
+ end
+
+ column :updated_at do |c|
+ c.read_only = true
+ end
include Netzke::Yanit::Inspectable
end
View
28 app/components/user_issue_explorer.rb
@@ -4,11 +4,27 @@ class UserIssueExplorer < Netzke::Communitypack::OneToManyExplorer
association :assignee # association that binds users and issues
- container_config class_name: "UserGrid", # our custom UserGrid as container grid
- region: :north, # we want it on top
- split: true
+ #container_config class_name: "UserGrid", # our custom UserGrid as container grid
+ #region: :north, # we want it on top
+ #split: true
+
+ #collection_config class_name: "IssueGrid", override_columns: {
+ #assignee__name: {included: false} # we don'n need this column in ProjectIssueExplorer
+ #}
+
+ def container_component(c)
+ super
+ c.klass = UserGrid
+ c.region = :north
+ c.split = true
+ end
+
+ def collection_component(c)
+ super
+ c.klass = IssueGrid
+ c.override_columns: {
+ assignee__name: {included: false} # we don'n need this column in ProjectIssueExplorer
+ }
+ end
- collection_config class_name: "IssueGrid", override_columns: {
- assignee__name: {included: false} # we don'n need this column in ProjectIssueExplorer
- }
end
View
4 config/application.rb
@@ -46,7 +46,7 @@ class Application < Rails::Application
# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'
- config.netzke.basepack.grid_panel.default_instance_config.persistence = true
- config.netzke.basepack.border_layout_panel.default_instance_config.persistence = true
+ # config.netzke.basepack.grid_panel.default_instance_config.persistence = true
+ # config.netzke.basepack.border_layout_panel.default_instance_config.persistence = true
end
end
View
20 lib/netzke/yanit/inspectable.rb
@@ -4,17 +4,19 @@ module Inspectable
extend ActiveSupport::Concern
included do |base|
- include Netzke::Basepack::ActionColumn
+ # include Netzke::Basepack::ActionColumn
- column_action :inspect, :icon => "/images/icons/page_white_go.png"
+ # column_action :inspect, :icon => "/images/icons/page_white_go.png"
- js_method :on_inspect, <<-JS
- function(record){
- var workspace = Ext.ComponentManager.get('application__workspace');
- workspace.loadChild("#{name.sub("Grid", "Inspector")}", {config: {record_id: record.get('id')}, newTab: true});
- }
- JS
+ js_configure do |c|
+ c.on_inspect = <<-JS
+ function(record){
+ var workspace = Ext.ComponentManager.get('application__workspace');
+ workspace.loadChild("#{name.sub("Grid", "Inspector")}", {config: {record_id: record.get('id')}, newTab: true});
+ }
+ JS
+ end
end
end
end
-end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.