github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

skozlov / netzke-basepack

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 25
    • 2
  • Source
  • Commits
  • Network (2)
  • Issues (0)
  • Downloads (3)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (2)
    • gh-pages
    • master ✓
  • Tags (3)
    • v0.5.1
    • 0.5.5.1
    • 0.5.5
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Pre-built Netzke widgets for your RIA — Read more

  cancel

http://blog.writelesscode.com

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Regression: column config for GridPanel again accepts a renderer along 
with its parameters (as array, where the first element is the renderers 
name, the second - the parameters passed to the renderer, e.g.: :renderer 
=> ["date", "y-m-d"]) 
skozlov (author)
Mon Jan 25 13:41:21 -0800 2010
commit  0f6b1218f19b8da55daa963320a79090c6b7f7b0
tree    81fcbce28c14d4f3d9d9009209919ab0f00a8ca9
parent  61521b8834a0b56b3991bf4ff3233483cbc64299
netzke-basepack /
name age
history
message
file .autotest Wed Apr 29 15:30:31 -0700 2009 column/field preferences moved to NetzkePrefere... [Sergei Kozlov]
file .gitignore Tue Oct 13 10:09:49 -0700 2009 Compatibility with latest netzke-core [Sergei Kozlov]
file CHANGELOG.rdoc Mon Jan 25 13:41:21 -0800 2010 Regression: column config for GridPanel again a... [skozlov]
file LICENSE Mon Oct 12 14:51:45 -0700 2009 LICENSE update [Sergei Kozlov]
file README.rdoc Wed Dec 09 18:32:35 -0800 2009 Depr: :data_class_name option is deprecated, us... [skozlov]
file Rakefile Thu Jan 21 07:04:24 -0800 2010 0.5.6 [skozlov]
file TODO.rdoc Tue Nov 24 10:41:47 -0800 2009 TODO update [skozlov]
directory autotest/ Wed Apr 29 15:30:31 -0700 2009 column/field preferences moved to NetzkePrefere... [Sergei Kozlov]
file init.rb Fri Jan 02 19:01:16 -0800 2009 v0.1.4.1 [Sergei Kozlov]
file install.rb Sat Dec 20 19:23:39 -0800 2008 initial [Sergei Kozlov]
directory javascripts/ Sun Jan 10 10:53:32 -0800 2010 Ext 3.1 compatibility [skozlov]
directory lib/ Mon Jan 25 13:41:21 -0800 2010 Regression: column config for GridPanel again a... [skozlov]
directory stylesheets/ Tue Sep 29 12:50:14 -0700 2009 ext 3.0 compatibility [Sergei Kozlov]
directory tasks/ Sat Dec 27 13:54:06 -0800 2008 init [Sergei Kozlov]
directory test/ Tue Nov 17 08:32:52 -0800 2009 making tests pass [skozlov]
file uninstall.rb Sat Dec 20 19:23:39 -0800 2008 initial [Sergei Kozlov]
README.rdoc

netzke-basepack

A pack of basic Rails/ExtJS widgets as a part of the Netzke framework. Live demo/tutorials on blog.writelesscode.com. Introduction to the Netzke framework and the Wiki: github.com/skozlov/netzke

Prerequisites

  1. Rails >= 2.2
  2. ExtJS = 3.0.3. Its root by default must be accessible as RAILS_ROOT/public/extjs. You may symlink your Ext JS library here like this (from your app folder):
     cd public && ln -s ~/Developer/extjs/ext-3.0.3 extjs
    
  3. acts_as_list plugin:
     ./script/plugin install git://github.com/rails/acts_as_list.git
    
  4. netzke-core gem or plugin. Gem:
     gem install netzke-core
    

Plugin (for the "edge" stuff, recommended):

    ./script/plugin install git://github.com/skozlov/netzke-core.git

Installation

For the "edge" stuff, install as plugin (recommended):

    ./script/plugin install git://github.com/skozlov/netzke-basepack.git

Otherwise install as gem. The gem is hosted on gemcutter. If you haven’t yet enabled gemcutter, run the following:

    sudo gem install gemcutter && gem tumble

Install the gem:

    gem install netzke-basepack

Usage

If using as gem, include it into environment.rb:

    config.gem "netzke-basepack"

Include mapping for Netzke controller providing Netzke javascripts and styles (in routes.rb):

    map.netzke

To be able to use persistent on-the-fly configuration of widgets, run netzke-core generators to have the necessary migrations:

    ./script/generate netzke_core

… then run the migrations:

    rake db:migrate

Embedding widgets into Rails’ view

To enable Netzke widgets in Rails’ views, you need to add the following helper into your layout template, inside the "head" tag:

    <%= netzke_init %>

This will include both ExtJS-related files (JavaScript and styles), and Netzke-related files.

Now let’s embed a widget into a view. The following example will provide you with a grid-based scaffold for ActiveRecord-model called Book. You may generate it like this:

    ./script/generate model Book title:string amount:integer

(don’t forget to re-run the migrations after it)

Now embed a widget into a view like this:

  <%= netzke :books, :class_name => 'GridPanel', :model => 'Book' %>

Dynamic loading of widgets

TODO: this part will be covered later

Credentials

Testing done with the help of github.com/pluginaweek/plugin_test_helper

Copyright © 2008-2009 Sergei Kozlov, released under the MIT license

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server