skozlov-netzke-basepack 0.1.1.2 → 0.5.0
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/.autotest +1 -0
 - data/.gitignore +5 -0
 - data/LICENSE +2 -19
 - data/README.rdoc +87 -0
 - data/Rakefile +28 -12
 - data/TODO.rdoc +7 -0
 - data/VERSION +1 -0
 - data/autotest/discover.rb +3 -0
 - data/init.rb +0 -1
 - data/javascripts/basepack.js +839 -49
 - data/lib/app/models/netzke_auto_column.rb +56 -0
 - data/lib/netzke/accordion_panel.rb +113 -0
 - data/lib/netzke/active_record/basepack.rb +104 -0
 - data/lib/netzke/active_record/data_accessor.rb +21 -0
 - data/lib/netzke/basic_app.rb +325 -0
 - data/lib/netzke/border_layout_panel.rb +128 -0
 - data/lib/netzke/configuration_panel.rb +24 -0
 - data/lib/netzke/data_accessor.rb +71 -0
 - data/lib/netzke/ext.rb +6 -0
 - data/lib/netzke/field_model.rb +131 -0
 - data/lib/netzke/fields_configurator.rb +95 -0
 - data/lib/netzke/form_panel.rb +214 -0
 - data/lib/netzke/form_panel_api.rb +74 -0
 - data/lib/netzke/form_panel_extras/javascripts/xcheckbox.js +82 -0
 - data/lib/netzke/form_panel_js.rb +129 -0
 - data/lib/netzke/grid_panel.rb +442 -0
 - data/lib/netzke/grid_panel_api.rb +352 -0
 - data/lib/netzke/grid_panel_extras/javascripts/check-column.js +33 -0
 - data/{javascripts → lib/netzke/grid_panel_extras/javascripts}/filters.js +0 -0
 - data/lib/netzke/grid_panel_extras/javascripts/rows-dd.js +280 -0
 - data/lib/netzke/grid_panel_js.rb +721 -0
 - data/lib/netzke/panel.rb +13 -0
 - data/lib/netzke/plugins/configuration_tool.rb +121 -0
 - data/lib/netzke/property_editor.rb +105 -0
 - data/lib/netzke/property_editor_extras/helper_model.rb +126 -0
 - data/lib/netzke/search_panel.rb +62 -0
 - data/lib/netzke/tab_panel.rb +160 -0
 - data/lib/netzke/table_editor.rb +118 -0
 - data/lib/netzke/tree_panel.rb +73 -0
 - data/lib/netzke/wrapper.rb +42 -0
 - data/lib/netzke-basepack.rb +9 -15
 - data/netzke-basepack.gemspec +147 -20
 - data/stylesheets/basepack.css +26 -0
 - data/test/app_root/app/models/book.rb +1 -1
 - data/test/app_root/config/environment.rb +1 -0
 - data/test/app_root/db/migrate/20081222033440_create_genres.rb +1 -0
 - data/test/app_root/db/migrate/20081222035855_create_netzke_preferences.rb +1 -1
 - data/test/app_root/db/migrate/20090102223630_create_netzke_layouts.rb +14 -0
 - data/test/app_root/vendor/plugins/acts_as_list/README +23 -0
 - data/test/app_root/vendor/plugins/acts_as_list/init.rb +3 -0
 - data/test/app_root/vendor/plugins/acts_as_list/lib/active_record/acts/list.rb +256 -0
 - data/test/test_helper.rb +1 -2
 - data/test/unit/accordion_panel_test.rb +20 -0
 - data/test/unit/active_record_basepack_test.rb +54 -0
 - data/test/unit/grid_panel_test.rb +43 -0
 - data/test/unit/helper_model_test.rb +30 -0
 - data/test/unit/netzke_basepack_test.rb +4 -0
 - data/test/unit/tab_panel_test.rb +21 -0
 - metadata +96 -72
 - data/CHANGELOG +0 -14
 - data/Manifest +0 -65
 - data/README.mdown +0 -18
 - data/generators/netzke_basepack/USAGE +0 -8
 - data/generators/netzke_basepack/netzke_basepack_generator.rb +0 -8
 - data/generators/netzke_basepack/netzke_grid_generator.rb +0 -7
 - data/generators/netzke_basepack/templates/create_netzke_grid_columns.rb +0 -21
 - data/lib/app/models/netzke_grid_column.rb +0 -23
 - data/lib/netzke/accordion.rb +0 -11
 - data/lib/netzke/ar_ext.rb +0 -163
 - data/lib/netzke/column.rb +0 -43
 - data/lib/netzke/container.rb +0 -81
 - data/lib/netzke/grid.rb +0 -120
 - data/lib/netzke/grid_interface.rb +0 -156
 - data/lib/netzke/grid_js_builder.rb +0 -276
 - data/lib/netzke/preference_grid.rb +0 -43
 - data/lib/netzke/properties_tool.rb +0 -66
 - data/lib/netzke/property_grid.rb +0 -60
 - data/test/ar_ext_test.rb +0 -39
 - data/test/column_test.rb +0 -27
 - data/test/grid_test.rb +0 -43
 - data/test/netzke_basepack_test.rb +0 -8
 
| 
         @@ -0,0 +1,118 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            module Netzke
         
     | 
| 
      
 2 
     | 
    
         
            +
              # == TableEditor CURRENTLY NOT SUPPORTED AND MAY BE BROKEN. Instead, use GridPanel's adding/editing records in form.
         
     | 
| 
      
 3 
     | 
    
         
            +
              # 
         
     | 
| 
      
 4 
     | 
    
         
            +
              # A widget used for editing a DB table. It contains a grid and a form which may display different DB fields,
         
     | 
| 
      
 5 
     | 
    
         
            +
              # configured by grid_columns and form_fields configuration options respectively
         
     | 
| 
      
 6 
     | 
    
         
            +
              class TableEditor < BorderLayoutPanel
         
     | 
| 
      
 7 
     | 
    
         
            +
                
         
     | 
| 
      
 8 
     | 
    
         
            +
                def self.js_extend_properties
         
     | 
| 
      
 9 
     | 
    
         
            +
                  {
         
     | 
| 
      
 10 
     | 
    
         
            +
                    :init_component => <<-END_OF_JAVASCRIPT.l,
         
     | 
| 
      
 11 
     | 
    
         
            +
                      function(){
         
     | 
| 
      
 12 
     | 
    
         
            +
                        Ext.netzke.cache.#{short_widget_class_name}.superclass.initComponent.call(this);
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
                        var setCentralWidgetEvents = function(){
         
     | 
| 
      
 15 
     | 
    
         
            +
                          this.getCenterWidget().on('addclick', function(){
         
     | 
| 
      
 16 
     | 
    
         
            +
                            this.getFormWidget().getForm().reset();
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
                            var firstEditableField = null;
         
     | 
| 
      
 19 
     | 
    
         
            +
                            this.getFormWidget().getForm().items.each(function(f){
         
     | 
| 
      
 20 
     | 
    
         
            +
                              if (!f.hidden && !f.disabled){
         
     | 
| 
      
 21 
     | 
    
         
            +
                                firstEditableField = f;
         
     | 
| 
      
 22 
     | 
    
         
            +
                                return false; // break the loop
         
     | 
| 
      
 23 
     | 
    
         
            +
                              }
         
     | 
| 
      
 24 
     | 
    
         
            +
                            })
         
     | 
| 
      
 25 
     | 
    
         
            +
                            if (firstEditableField) firstEditableField.focus();
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
                            this.getFormWidget().ownerCt.expand();
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
                            this.getCenterWidget().getSelectionModel().clearSelections();
         
     | 
| 
      
 30 
     | 
    
         
            +
                            this.lastSelectedRow = null;
         
     | 
| 
      
 31 
     | 
    
         
            +
                            return false;
         
     | 
| 
      
 32 
     | 
    
         
            +
                          }, this)
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
                          this.getCenterWidget().on('rowclick', this.onRowClick, this);
         
     | 
| 
      
 35 
     | 
    
         
            +
                        };
         
     | 
| 
      
 36 
     | 
    
         
            +
             
     | 
| 
      
 37 
     | 
    
         
            +
                        this.getCenterWidget().ownerCt.on('add', setCentralWidgetEvents, this);
         
     | 
| 
      
 38 
     | 
    
         
            +
                        setCentralWidgetEvents.call(this);
         
     | 
| 
      
 39 
     | 
    
         
            +
                        
         
     | 
| 
      
 40 
     | 
    
         
            +
                      }
         
     | 
| 
      
 41 
     | 
    
         
            +
                    END_OF_JAVASCRIPT
         
     | 
| 
      
 42 
     | 
    
         
            +
                    
         
     | 
| 
      
 43 
     | 
    
         
            +
                    
         
     | 
| 
      
 44 
     | 
    
         
            +
                    :get_form_widget => <<-END_OF_JAVASCRIPT.l,
         
     | 
| 
      
 45 
     | 
    
         
            +
                      function(){
         
     | 
| 
      
 46 
     | 
    
         
            +
                        return this.getRegionWidget(this.region);
         
     | 
| 
      
 47 
     | 
    
         
            +
                      }
         
     | 
| 
      
 48 
     | 
    
         
            +
                    END_OF_JAVASCRIPT
         
     | 
| 
      
 49 
     | 
    
         
            +
                    
         
     | 
| 
      
 50 
     | 
    
         
            +
                    # a grid row clicked
         
     | 
| 
      
 51 
     | 
    
         
            +
                    :on_row_click => <<-END_OF_JAVASCRIPT.l,
         
     | 
| 
      
 52 
     | 
    
         
            +
                      function(grid, index, e){
         
     | 
| 
      
 53 
     | 
    
         
            +
                        // don't react if the selection hasn't changed
         
     | 
| 
      
 54 
     | 
    
         
            +
                    		if (index == this.lastSelectedRow) return false;
         
     | 
| 
      
 55 
     | 
    
         
            +
                    		this.lastSelectedRow = index;
         
     | 
| 
      
 56 
     | 
    
         
            +
                    		
         
     | 
| 
      
 57 
     | 
    
         
            +
                    		// get id of the record
         
     | 
| 
      
 58 
     | 
    
         
            +
                        var recordId = this.getCenterWidget().getStore().getAt(index).get('id');
         
     | 
| 
      
 59 
     | 
    
         
            +
                        
         
     | 
| 
      
 60 
     | 
    
         
            +
                        // load the form with the record id
         
     | 
| 
      
 61 
     | 
    
         
            +
                        this.getRegionWidget(this.region).loadRecord(recordId);
         
     | 
| 
      
 62 
     | 
    
         
            +
                      }
         
     | 
| 
      
 63 
     | 
    
         
            +
                    END_OF_JAVASCRIPT
         
     | 
| 
      
 64 
     | 
    
         
            +
                    
         
     | 
| 
      
 65 
     | 
    
         
            +
                    # after the form is submitted, reload the grid
         
     | 
| 
      
 66 
     | 
    
         
            +
                    :on_form_actioncomplete => <<-END_OF_JAVASCRIPT.l
         
     | 
| 
      
 67 
     | 
    
         
            +
                      function(grid, index, e){
         
     | 
| 
      
 68 
     | 
    
         
            +
                        this.getRegionWidget('center').store.load()
         
     | 
| 
      
 69 
     | 
    
         
            +
                      }
         
     | 
| 
      
 70 
     | 
    
         
            +
                    END_OF_JAVASCRIPT
         
     | 
| 
      
 71 
     | 
    
         
            +
                  }
         
     | 
| 
      
 72 
     | 
    
         
            +
                end
         
     | 
| 
      
 73 
     | 
    
         
            +
             
     | 
| 
      
 74 
     | 
    
         
            +
                def default_config
         
     | 
| 
      
 75 
     | 
    
         
            +
                  # don't show the title on the top level
         
     | 
| 
      
 76 
     | 
    
         
            +
                  super.merge!({:ext_config => {:title => false}})
         
     | 
| 
      
 77 
     | 
    
         
            +
                end
         
     | 
| 
      
 78 
     | 
    
         
            +
             
     | 
| 
      
 79 
     | 
    
         
            +
                def js_config
         
     | 
| 
      
 80 
     | 
    
         
            +
                  # the client side of the widget wants to know which region it uses
         
     | 
| 
      
 81 
     | 
    
         
            +
                  super.merge({
         
     | 
| 
      
 82 
     | 
    
         
            +
                    :region => config[:split_region]
         
     | 
| 
      
 83 
     | 
    
         
            +
                  })
         
     | 
| 
      
 84 
     | 
    
         
            +
                end
         
     | 
| 
      
 85 
     | 
    
         
            +
             
     | 
| 
      
 86 
     | 
    
         
            +
                def initial_aggregatees
         
     | 
| 
      
 87 
     | 
    
         
            +
                  split_region  = config[:split_region] || :east
         
     | 
| 
      
 88 
     | 
    
         
            +
                  split_size    = config[:split_size] || 200
         
     | 
| 
      
 89 
     | 
    
         
            +
                  {
         
     | 
| 
      
 90 
     | 
    
         
            +
                    :center => {
         
     | 
| 
      
 91 
     | 
    
         
            +
                      :widget_class_name    => "GridPanel", 
         
     | 
| 
      
 92 
     | 
    
         
            +
                      :data_class_name      => config[:data_class_name], 
         
     | 
| 
      
 93 
     | 
    
         
            +
                      :ext_config           => {
         
     | 
| 
      
 94 
     | 
    
         
            +
                        :title        => config[:grid_title] || config[:data_class_name].pluralize
         
     | 
| 
      
 95 
     | 
    
         
            +
                      }
         
     | 
| 
      
 96 
     | 
    
         
            +
                    }.deep_merge(config[:grid_config] || {}),
         
     | 
| 
      
 97 
     | 
    
         
            +
                    
         
     | 
| 
      
 98 
     | 
    
         
            +
                    split_region => {
         
     | 
| 
      
 99 
     | 
    
         
            +
                      :widget_class_name    => "FormPanel", 
         
     | 
| 
      
 100 
     | 
    
         
            +
                      :data_class_name      => config[:data_class_name], 
         
     | 
| 
      
 101 
     | 
    
         
            +
                      :region_config        => {
         
     | 
| 
      
 102 
     | 
    
         
            +
                        :width  => split_size, 
         
     | 
| 
      
 103 
     | 
    
         
            +
                        :height => split_size, 
         
     | 
| 
      
 104 
     | 
    
         
            +
                        :split  => true,
         
     | 
| 
      
 105 
     | 
    
         
            +
                        :collapsible => true
         
     | 
| 
      
 106 
     | 
    
         
            +
                      },
         
     | 
| 
      
 107 
     | 
    
         
            +
                      :ext_config => {
         
     | 
| 
      
 108 
     | 
    
         
            +
                        :title        => config[:form_title] || "#{config[:data_class_name]} details",
         
     | 
| 
      
 109 
     | 
    
         
            +
                        :listeners    => {:actioncomplete => {
         
     | 
| 
      
 110 
     | 
    
         
            +
                          :fn => "function(f, a){this.ownerCt.ownerCt.onFormActioncomplete(f,a)}".l
         
     | 
| 
      
 111 
     | 
    
         
            +
                        }}
         
     | 
| 
      
 112 
     | 
    
         
            +
                      }
         
     | 
| 
      
 113 
     | 
    
         
            +
                    }.deep_merge(config[:form_config] || {})
         
     | 
| 
      
 114 
     | 
    
         
            +
                  }
         
     | 
| 
      
 115 
     | 
    
         
            +
                end
         
     | 
| 
      
 116 
     | 
    
         
            +
             
     | 
| 
      
 117 
     | 
    
         
            +
              end
         
     | 
| 
      
 118 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,73 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            class Netzke::TreePanel < Netzke::Base
         
     | 
| 
      
 2 
     | 
    
         
            +
              api :get_children
         
     | 
| 
      
 3 
     | 
    
         
            +
              
         
     | 
| 
      
 4 
     | 
    
         
            +
              def self.js_base_class
         
     | 
| 
      
 5 
     | 
    
         
            +
                "Ext.tree.TreePanel"
         
     | 
| 
      
 6 
     | 
    
         
            +
              end
         
     | 
| 
      
 7 
     | 
    
         
            +
              
         
     | 
| 
      
 8 
     | 
    
         
            +
              def self.js_common_config_for_constructor
         
     | 
| 
      
 9 
     | 
    
         
            +
                super.merge({
         
     | 
| 
      
 10 
     | 
    
         
            +
                  :root => {:text => '/', :id => 'source'},
         
     | 
| 
      
 11 
     | 
    
         
            +
                  :loader => {:data_url => "config.api.getChildren".l}
         
     | 
| 
      
 12 
     | 
    
         
            +
                })
         
     | 
| 
      
 13 
     | 
    
         
            +
              end
         
     | 
| 
      
 14 
     | 
    
         
            +
              
         
     | 
| 
      
 15 
     | 
    
         
            +
              def self.js_extend_properties
         
     | 
| 
      
 16 
     | 
    
         
            +
                {
         
     | 
| 
      
 17 
     | 
    
         
            +
                  :refresh_handler => <<-END_OF_JAVASCRIPT.l,
         
     | 
| 
      
 18 
     | 
    
         
            +
                    function(){
         
     | 
| 
      
 19 
     | 
    
         
            +
                      console.info('refresh!');
         
     | 
| 
      
 20 
     | 
    
         
            +
                    }
         
     | 
| 
      
 21 
     | 
    
         
            +
                  END_OF_JAVASCRIPT
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
                  :add_handler => <<-END_OF_JAVASCRIPT.l,
         
     | 
| 
      
 24 
     | 
    
         
            +
                    function(e){
         
     | 
| 
      
 25 
     | 
    
         
            +
                      console.info(e);
         
     | 
| 
      
 26 
     | 
    
         
            +
                    }
         
     | 
| 
      
 27 
     | 
    
         
            +
                  END_OF_JAVASCRIPT
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
                  :edit_handler => <<-END_OF_JAVASCRIPT.l,
         
     | 
| 
      
 30 
     | 
    
         
            +
                    function(e){
         
     | 
| 
      
 31 
     | 
    
         
            +
                      console.info(e);
         
     | 
| 
      
 32 
     | 
    
         
            +
                    
         
     | 
| 
      
 33 
     | 
    
         
            +
                    }
         
     | 
| 
      
 34 
     | 
    
         
            +
                  END_OF_JAVASCRIPT
         
     | 
| 
      
 35 
     | 
    
         
            +
             
     | 
| 
      
 36 
     | 
    
         
            +
                  :delete_handler => <<-END_OF_JAVASCRIPT.l
         
     | 
| 
      
 37 
     | 
    
         
            +
                    function(e){
         
     | 
| 
      
 38 
     | 
    
         
            +
                      console.info(e);
         
     | 
| 
      
 39 
     | 
    
         
            +
                    
         
     | 
| 
      
 40 
     | 
    
         
            +
                    }
         
     | 
| 
      
 41 
     | 
    
         
            +
                  END_OF_JAVASCRIPT
         
     | 
| 
      
 42 
     | 
    
         
            +
                }
         
     | 
| 
      
 43 
     | 
    
         
            +
              end
         
     | 
| 
      
 44 
     | 
    
         
            +
              
         
     | 
| 
      
 45 
     | 
    
         
            +
              def actions
         
     | 
| 
      
 46 
     | 
    
         
            +
                { :add    => {:text => 'Add'},
         
     | 
| 
      
 47 
     | 
    
         
            +
                  :edit   => {:text => 'Edit'},
         
     | 
| 
      
 48 
     | 
    
         
            +
                  :del => {:text => 'Delete', :disabled => true}
         
     | 
| 
      
 49 
     | 
    
         
            +
                }
         
     | 
| 
      
 50 
     | 
    
         
            +
              end
         
     | 
| 
      
 51 
     | 
    
         
            +
              
         
     | 
| 
      
 52 
     | 
    
         
            +
              def bbar
         
     | 
| 
      
 53 
     | 
    
         
            +
                persistent_config[:bbar] ||= config[:bbar] == false ? nil : config[:bbar] || %w{ add edit delete }
         
     | 
| 
      
 54 
     | 
    
         
            +
              end
         
     | 
| 
      
 55 
     | 
    
         
            +
              
         
     | 
| 
      
 56 
     | 
    
         
            +
              def tools
         
     | 
| 
      
 57 
     | 
    
         
            +
                persistent_config[:tools] ||= config[:tools] == false ? nil : config[:tools] #|| %w{ gear refresh }
         
     | 
| 
      
 58 
     | 
    
         
            +
              end
         
     | 
| 
      
 59 
     | 
    
         
            +
              
         
     | 
| 
      
 60 
     | 
    
         
            +
              def tbar
         
     | 
| 
      
 61 
     | 
    
         
            +
                persistent_config[:tbar] ||= config[:tbar] == false ? nil : config[:tbar]
         
     | 
| 
      
 62 
     | 
    
         
            +
              end
         
     | 
| 
      
 63 
     | 
    
         
            +
             
     | 
| 
      
 64 
     | 
    
         
            +
              def menu
         
     | 
| 
      
 65 
     | 
    
         
            +
                persistent_config[:menu] ||= config[:menu] == false ? nil : config[:menu] # || [{:text => 'Button', :menu => ['edit', {:text => 'Submenu', :menu => ['delete']}]}]
         
     | 
| 
      
 66 
     | 
    
         
            +
              end
         
     | 
| 
      
 67 
     | 
    
         
            +
              
         
     | 
| 
      
 68 
     | 
    
         
            +
              def get_children(params)
         
     | 
| 
      
 69 
     | 
    
         
            +
                klass = config[:data_class_name].constantize
         
     | 
| 
      
 70 
     | 
    
         
            +
                node = params[:node] == 'source' ? klass.find_by_parent_id(nil) : klass.find(params[:node].to_i)
         
     | 
| 
      
 71 
     | 
    
         
            +
                node.children.map{|n| {:text => n.name, :id => n.id}}
         
     | 
| 
      
 72 
     | 
    
         
            +
              end
         
     | 
| 
      
 73 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,42 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            module Netzke
         
     | 
| 
      
 2 
     | 
    
         
            +
              # = Wrapper
         
     | 
| 
      
 3 
     | 
    
         
            +
              # 
         
     | 
| 
      
 4 
     | 
    
         
            +
              # Simple Ext.Panel with layout 'fit' that wraps up another Netzke widget. Can be useful in HTML pages where
         
     | 
| 
      
 5 
     | 
    
         
            +
              # a widget should be dynamically configured, to not reload the entire page after configuration (Wrapper 
         
     | 
| 
      
 6 
     | 
    
         
            +
              # will reload the widget automatically).
         
     | 
| 
      
 7 
     | 
    
         
            +
              # 
         
     | 
| 
      
 8 
     | 
    
         
            +
              # == Configuration
         
     | 
| 
      
 9 
     | 
    
         
            +
              # * <tt>:item</tt> - configuration hash for wrapped widget
         
     | 
| 
      
 10 
     | 
    
         
            +
              # 
         
     | 
| 
      
 11 
     | 
    
         
            +
              # Example:
         
     | 
| 
      
 12 
     | 
    
         
            +
              # 
         
     | 
| 
      
 13 
     | 
    
         
            +
              #   netzke :wrapper, :item => {
         
     | 
| 
      
 14 
     | 
    
         
            +
              #     :widget_class_name => "FormPanel",
         
     | 
| 
      
 15 
     | 
    
         
            +
              #     :data_class_name => "User"
         
     | 
| 
      
 16 
     | 
    
         
            +
              #   }
         
     | 
| 
      
 17 
     | 
    
         
            +
              class Wrapper < Base
         
     | 
| 
      
 18 
     | 
    
         
            +
                def self.js_extend_properties
         
     | 
| 
      
 19 
     | 
    
         
            +
                  super.merge({
         
     | 
| 
      
 20 
     | 
    
         
            +
                    :layout => 'fit',
         
     | 
| 
      
 21 
     | 
    
         
            +
                    
         
     | 
| 
      
 22 
     | 
    
         
            +
                    # invisible
         
     | 
| 
      
 23 
     | 
    
         
            +
                    :header => false,
         
     | 
| 
      
 24 
     | 
    
         
            +
                    :border => false,
         
     | 
| 
      
 25 
     | 
    
         
            +
                    
         
     | 
| 
      
 26 
     | 
    
         
            +
                    :init_component => <<-END_OF_JAVASCRIPT.l,
         
     | 
| 
      
 27 
     | 
    
         
            +
                      function(){
         
     | 
| 
      
 28 
     | 
    
         
            +
                        Ext.netzke.cache.#{short_widget_class_name}.superclass.initComponent.call(this);
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
                        // instantiate the item
         
     | 
| 
      
 31 
     | 
    
         
            +
                        this.instantiateChild(this.itemConfig);
         
     | 
| 
      
 32 
     | 
    
         
            +
                      }
         
     | 
| 
      
 33 
     | 
    
         
            +
                    END_OF_JAVASCRIPT
         
     | 
| 
      
 34 
     | 
    
         
            +
                  })
         
     | 
| 
      
 35 
     | 
    
         
            +
                end
         
     | 
| 
      
 36 
     | 
    
         
            +
             
     | 
| 
      
 37 
     | 
    
         
            +
                def initial_aggregatees
         
     | 
| 
      
 38 
     | 
    
         
            +
                  {:item => config[:item]}
         
     | 
| 
      
 39 
     | 
    
         
            +
                end
         
     | 
| 
      
 40 
     | 
    
         
            +
                
         
     | 
| 
      
 41 
     | 
    
         
            +
              end
         
     | 
| 
      
 42 
     | 
    
         
            +
            end
         
     | 
    
        data/lib/netzke-basepack.rb
    CHANGED
    
    | 
         @@ -1,8 +1,10 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # External dependencies
         
     | 
| 
       2 
2 
     | 
    
         
             
            require 'netzke-core'
         
     | 
| 
       3 
3 
     | 
    
         
             
            require 'searchlogic'
         
     | 
| 
      
 4 
     | 
    
         
            +
            require 'will_paginate'
         
     | 
| 
       4 
5 
     | 
    
         | 
| 
       5 
     | 
    
         
            -
            require 'netzke/ 
     | 
| 
      
 6 
     | 
    
         
            +
            require 'netzke/active_record/basepack'
         
     | 
| 
      
 7 
     | 
    
         
            +
            require 'netzke/ext'
         
     | 
| 
       6 
8 
     | 
    
         | 
| 
       7 
9 
     | 
    
         
             
            %w{ models }.each do |dir|
         
     | 
| 
       8 
10 
     | 
    
         
             
              path = File.join(File.dirname(__FILE__), 'app', dir)
         
     | 
| 
         @@ -11,18 +13,10 @@ require 'netzke/ar_ext' 
     | 
|
| 
       11 
13 
     | 
    
         
             
              ActiveSupport::Dependencies.load_once_paths.delete(path)
         
     | 
| 
       12 
14 
     | 
    
         
             
            end
         
     | 
| 
       13 
15 
     | 
    
         | 
| 
       14 
     | 
    
         
            -
            #  
     | 
| 
       15 
     | 
    
         
            -
            Netzke::Base.config[:javascripts] << "#{File.dirname(__FILE__)}/../javascripts/basepack.js"
         
     | 
| 
       16 
     | 
    
         
            -
             
     | 
| 
       17 
     | 
    
         
            -
            # TODO: implement configurable loading of JS, to spare the traffic at the initial loading
         
     | 
| 
       18 
     | 
    
         
            -
            extjs_dir = "#{File.dirname(RAILS_ROOT)}/netzke_tutorial/public/extjs"
         
     | 
| 
       19 
     | 
    
         
            -
            Netzke::Base.config[:javascripts] << "#{extjs_dir}/examples/grid-filtering/menu/EditableItem.js"
         
     | 
| 
       20 
     | 
    
         
            -
            Netzke::Base.config[:javascripts] << "#{extjs_dir}/examples/grid-filtering/menu/RangeMenu.js"
         
     | 
| 
       21 
     | 
    
         
            -
            Netzke::Base.config[:javascripts] << "#{extjs_dir}/examples/grid-filtering/grid/GridFilters.js"
         
     | 
| 
       22 
     | 
    
         
            -
            %w{Boolean Date List Numeric String}.unshift("").each do |f|
         
     | 
| 
       23 
     | 
    
         
            -
              Netzke::Base.config[:javascripts] << "#{extjs_dir}/examples/grid-filtering/grid/filter/#{f}Filter.js"
         
     | 
| 
       24 
     | 
    
         
            -
            end
         
     | 
| 
       25 
     | 
    
         
            -
            Netzke::Base.config[:javascripts] << "#{File.dirname(__FILE__)}/../javascripts/filters.js"
         
     | 
| 
       26 
     | 
    
         
            -
             
     | 
| 
       27 
     | 
    
         
            -
            # Make this plugin reloadable for easier development
         
     | 
| 
      
 16 
     | 
    
         
            +
            # Make this plugin reloadable at app restart for easier development
         
     | 
| 
       28 
17 
     | 
    
         
             
            ActiveSupport::Dependencies.load_once_paths.delete(File.join(File.dirname(__FILE__)))
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
            # Include javascript & styles required by all basepack widgets. 
         
     | 
| 
      
 20 
     | 
    
         
            +
            # These files will get loaded at the initial load of the framework (along with Ext and Netzke-core).
         
     | 
| 
      
 21 
     | 
    
         
            +
            Netzke::Base.config[:javascripts] << "#{File.dirname(__FILE__)}/../javascripts/basepack.js"
         
     | 
| 
      
 22 
     | 
    
         
            +
            Netzke::Base.config[:stylesheets] << "#{File.dirname(__FILE__)}/../stylesheets/basepack.css"
         
     | 
    
        data/netzke-basepack.gemspec
    CHANGED
    
    | 
         @@ -1,38 +1,165 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # Generated by jeweler
         
     | 
| 
      
 2 
     | 
    
         
            +
            # DO NOT EDIT THIS FILE
         
     | 
| 
      
 3 
     | 
    
         
            +
            # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
         
     | 
| 
       1 
4 
     | 
    
         
             
            # -*- encoding: utf-8 -*-
         
     | 
| 
       2 
5 
     | 
    
         | 
| 
       3 
6 
     | 
    
         
             
            Gem::Specification.new do |s|
         
     | 
| 
       4 
7 
     | 
    
         
             
              s.name = %q{netzke-basepack}
         
     | 
| 
       5 
     | 
    
         
            -
              s.version = "0. 
     | 
| 
      
 8 
     | 
    
         
            +
              s.version = "0.5.0"
         
     | 
| 
       6 
9 
     | 
    
         | 
| 
       7 
     | 
    
         
            -
              s.required_rubygems_version = Gem::Requirement.new(">=  
     | 
| 
      
 10 
     | 
    
         
            +
              s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
         
     | 
| 
       8 
11 
     | 
    
         
             
              s.authors = ["Sergei Kozlov"]
         
     | 
| 
       9 
     | 
    
         
            -
              s.date = %q{ 
     | 
| 
       10 
     | 
    
         
            -
              s.description = %q{ 
     | 
| 
       11 
     | 
    
         
            -
              s.email = %q{sergei@ 
     | 
| 
       12 
     | 
    
         
            -
              s.extra_rdoc_files = [ 
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
     | 
    
         
            -
               
     | 
| 
       16 
     | 
    
         
            -
              s. 
     | 
| 
      
 12 
     | 
    
         
            +
              s.date = %q{2009-09-06}
         
     | 
| 
      
 13 
     | 
    
         
            +
              s.description = %q{Pre-built Netzke widgets for your RIA}
         
     | 
| 
      
 14 
     | 
    
         
            +
              s.email = %q{sergei@playcode.nl}
         
     | 
| 
      
 15 
     | 
    
         
            +
              s.extra_rdoc_files = [
         
     | 
| 
      
 16 
     | 
    
         
            +
                "LICENSE",
         
     | 
| 
      
 17 
     | 
    
         
            +
                 "README.rdoc"
         
     | 
| 
      
 18 
     | 
    
         
            +
              ]
         
     | 
| 
      
 19 
     | 
    
         
            +
              s.files = [
         
     | 
| 
      
 20 
     | 
    
         
            +
                ".autotest",
         
     | 
| 
      
 21 
     | 
    
         
            +
                 ".gitignore",
         
     | 
| 
      
 22 
     | 
    
         
            +
                 "LICENSE",
         
     | 
| 
      
 23 
     | 
    
         
            +
                 "README.rdoc",
         
     | 
| 
      
 24 
     | 
    
         
            +
                 "Rakefile",
         
     | 
| 
      
 25 
     | 
    
         
            +
                 "TODO.rdoc",
         
     | 
| 
      
 26 
     | 
    
         
            +
                 "VERSION",
         
     | 
| 
      
 27 
     | 
    
         
            +
                 "autotest/discover.rb",
         
     | 
| 
      
 28 
     | 
    
         
            +
                 "init.rb",
         
     | 
| 
      
 29 
     | 
    
         
            +
                 "install.rb",
         
     | 
| 
      
 30 
     | 
    
         
            +
                 "javascripts/basepack.js",
         
     | 
| 
      
 31 
     | 
    
         
            +
                 "lib/app/models/netzke_auto_column.rb",
         
     | 
| 
      
 32 
     | 
    
         
            +
                 "lib/netzke-basepack.rb",
         
     | 
| 
      
 33 
     | 
    
         
            +
                 "lib/netzke/accordion_panel.rb",
         
     | 
| 
      
 34 
     | 
    
         
            +
                 "lib/netzke/active_record/basepack.rb",
         
     | 
| 
      
 35 
     | 
    
         
            +
                 "lib/netzke/active_record/data_accessor.rb",
         
     | 
| 
      
 36 
     | 
    
         
            +
                 "lib/netzke/basic_app.rb",
         
     | 
| 
      
 37 
     | 
    
         
            +
                 "lib/netzke/border_layout_panel.rb",
         
     | 
| 
      
 38 
     | 
    
         
            +
                 "lib/netzke/configuration_panel.rb",
         
     | 
| 
      
 39 
     | 
    
         
            +
                 "lib/netzke/data_accessor.rb",
         
     | 
| 
      
 40 
     | 
    
         
            +
                 "lib/netzke/ext.rb",
         
     | 
| 
      
 41 
     | 
    
         
            +
                 "lib/netzke/field_model.rb",
         
     | 
| 
      
 42 
     | 
    
         
            +
                 "lib/netzke/fields_configurator.rb",
         
     | 
| 
      
 43 
     | 
    
         
            +
                 "lib/netzke/form_panel.rb",
         
     | 
| 
      
 44 
     | 
    
         
            +
                 "lib/netzke/form_panel_api.rb",
         
     | 
| 
      
 45 
     | 
    
         
            +
                 "lib/netzke/form_panel_extras/javascripts/xcheckbox.js",
         
     | 
| 
      
 46 
     | 
    
         
            +
                 "lib/netzke/form_panel_js.rb",
         
     | 
| 
      
 47 
     | 
    
         
            +
                 "lib/netzke/grid_panel.rb",
         
     | 
| 
      
 48 
     | 
    
         
            +
                 "lib/netzke/grid_panel_api.rb",
         
     | 
| 
      
 49 
     | 
    
         
            +
                 "lib/netzke/grid_panel_extras/javascripts/check-column.js",
         
     | 
| 
      
 50 
     | 
    
         
            +
                 "lib/netzke/grid_panel_extras/javascripts/filters.js",
         
     | 
| 
      
 51 
     | 
    
         
            +
                 "lib/netzke/grid_panel_extras/javascripts/rows-dd.js",
         
     | 
| 
      
 52 
     | 
    
         
            +
                 "lib/netzke/grid_panel_js.rb",
         
     | 
| 
      
 53 
     | 
    
         
            +
                 "lib/netzke/panel.rb",
         
     | 
| 
      
 54 
     | 
    
         
            +
                 "lib/netzke/plugins/configuration_tool.rb",
         
     | 
| 
      
 55 
     | 
    
         
            +
                 "lib/netzke/property_editor.rb",
         
     | 
| 
      
 56 
     | 
    
         
            +
                 "lib/netzke/property_editor_extras/helper_model.rb",
         
     | 
| 
      
 57 
     | 
    
         
            +
                 "lib/netzke/search_panel.rb",
         
     | 
| 
      
 58 
     | 
    
         
            +
                 "lib/netzke/tab_panel.rb",
         
     | 
| 
      
 59 
     | 
    
         
            +
                 "lib/netzke/table_editor.rb",
         
     | 
| 
      
 60 
     | 
    
         
            +
                 "lib/netzke/tree_panel.rb",
         
     | 
| 
      
 61 
     | 
    
         
            +
                 "lib/netzke/wrapper.rb",
         
     | 
| 
      
 62 
     | 
    
         
            +
                 "netzke-basepack.gemspec",
         
     | 
| 
      
 63 
     | 
    
         
            +
                 "stylesheets/basepack.css",
         
     | 
| 
      
 64 
     | 
    
         
            +
                 "tasks/netzke_basepack_tasks.rake",
         
     | 
| 
      
 65 
     | 
    
         
            +
                 "test/app_root/app/controllers/application.rb",
         
     | 
| 
      
 66 
     | 
    
         
            +
                 "test/app_root/app/models/book.rb",
         
     | 
| 
      
 67 
     | 
    
         
            +
                 "test/app_root/app/models/category.rb",
         
     | 
| 
      
 68 
     | 
    
         
            +
                 "test/app_root/app/models/city.rb",
         
     | 
| 
      
 69 
     | 
    
         
            +
                 "test/app_root/app/models/continent.rb",
         
     | 
| 
      
 70 
     | 
    
         
            +
                 "test/app_root/app/models/country.rb",
         
     | 
| 
      
 71 
     | 
    
         
            +
                 "test/app_root/app/models/genre.rb",
         
     | 
| 
      
 72 
     | 
    
         
            +
                 "test/app_root/config/boot.rb",
         
     | 
| 
      
 73 
     | 
    
         
            +
                 "test/app_root/config/database.yml",
         
     | 
| 
      
 74 
     | 
    
         
            +
                 "test/app_root/config/environment.rb",
         
     | 
| 
      
 75 
     | 
    
         
            +
                 "test/app_root/config/environments/in_memory.rb",
         
     | 
| 
      
 76 
     | 
    
         
            +
                 "test/app_root/config/environments/mysql.rb",
         
     | 
| 
      
 77 
     | 
    
         
            +
                 "test/app_root/config/environments/postgresql.rb",
         
     | 
| 
      
 78 
     | 
    
         
            +
                 "test/app_root/config/environments/sqlite.rb",
         
     | 
| 
      
 79 
     | 
    
         
            +
                 "test/app_root/config/environments/sqlite3.rb",
         
     | 
| 
      
 80 
     | 
    
         
            +
                 "test/app_root/config/routes.rb",
         
     | 
| 
      
 81 
     | 
    
         
            +
                 "test/app_root/db/migrate/20081222033343_create_books.rb",
         
     | 
| 
      
 82 
     | 
    
         
            +
                 "test/app_root/db/migrate/20081222033440_create_genres.rb",
         
     | 
| 
      
 83 
     | 
    
         
            +
                 "test/app_root/db/migrate/20081222035855_create_netzke_preferences.rb",
         
     | 
| 
      
 84 
     | 
    
         
            +
                 "test/app_root/db/migrate/20081223024935_create_categories.rb",
         
     | 
| 
      
 85 
     | 
    
         
            +
                 "test/app_root/db/migrate/20081223025635_create_countries.rb",
         
     | 
| 
      
 86 
     | 
    
         
            +
                 "test/app_root/db/migrate/20081223025653_create_continents.rb",
         
     | 
| 
      
 87 
     | 
    
         
            +
                 "test/app_root/db/migrate/20081223025732_create_cities.rb",
         
     | 
| 
      
 88 
     | 
    
         
            +
                 "test/app_root/db/migrate/20090102223630_create_netzke_layouts.rb",
         
     | 
| 
      
 89 
     | 
    
         
            +
                 "test/app_root/script/console",
         
     | 
| 
      
 90 
     | 
    
         
            +
                 "test/app_root/vendor/plugins/acts_as_list/README",
         
     | 
| 
      
 91 
     | 
    
         
            +
                 "test/app_root/vendor/plugins/acts_as_list/init.rb",
         
     | 
| 
      
 92 
     | 
    
         
            +
                 "test/app_root/vendor/plugins/acts_as_list/lib/active_record/acts/list.rb",
         
     | 
| 
      
 93 
     | 
    
         
            +
                 "test/console_with_fixtures.rb",
         
     | 
| 
      
 94 
     | 
    
         
            +
                 "test/fixtures/books.yml",
         
     | 
| 
      
 95 
     | 
    
         
            +
                 "test/fixtures/categories.yml",
         
     | 
| 
      
 96 
     | 
    
         
            +
                 "test/fixtures/cities.yml",
         
     | 
| 
      
 97 
     | 
    
         
            +
                 "test/fixtures/continents.yml",
         
     | 
| 
      
 98 
     | 
    
         
            +
                 "test/fixtures/countries.yml",
         
     | 
| 
      
 99 
     | 
    
         
            +
                 "test/fixtures/genres.yml",
         
     | 
| 
      
 100 
     | 
    
         
            +
                 "test/schema.rb",
         
     | 
| 
      
 101 
     | 
    
         
            +
                 "test/test_helper.rb",
         
     | 
| 
      
 102 
     | 
    
         
            +
                 "test/unit/accordion_panel_test.rb",
         
     | 
| 
      
 103 
     | 
    
         
            +
                 "test/unit/active_record_basepack_test.rb",
         
     | 
| 
      
 104 
     | 
    
         
            +
                 "test/unit/grid_panel_test.rb",
         
     | 
| 
      
 105 
     | 
    
         
            +
                 "test/unit/helper_model_test.rb",
         
     | 
| 
      
 106 
     | 
    
         
            +
                 "test/unit/netzke_basepack_test.rb",
         
     | 
| 
      
 107 
     | 
    
         
            +
                 "test/unit/tab_panel_test.rb",
         
     | 
| 
      
 108 
     | 
    
         
            +
                 "uninstall.rb"
         
     | 
| 
      
 109 
     | 
    
         
            +
              ]
         
     | 
| 
      
 110 
     | 
    
         
            +
              s.homepage = %q{http://github.com/skozlov/netzke-basepack}
         
     | 
| 
      
 111 
     | 
    
         
            +
              s.rdoc_options = ["--charset=UTF-8"]
         
     | 
| 
       17 
112 
     | 
    
         
             
              s.require_paths = ["lib"]
         
     | 
| 
       18 
113 
     | 
    
         
             
              s.rubyforge_project = %q{netzke-basepack}
         
     | 
| 
       19 
     | 
    
         
            -
              s.rubygems_version = %q{1.3. 
     | 
| 
       20 
     | 
    
         
            -
              s.summary = %q{ 
     | 
| 
       21 
     | 
    
         
            -
              s.test_files = [ 
     | 
| 
      
 114 
     | 
    
         
            +
              s.rubygems_version = %q{1.3.4}
         
     | 
| 
      
 115 
     | 
    
         
            +
              s.summary = %q{Pre-built Netzke widgets for your RIA}
         
     | 
| 
      
 116 
     | 
    
         
            +
              s.test_files = [
         
     | 
| 
      
 117 
     | 
    
         
            +
                "test/app_root/app/controllers/application.rb",
         
     | 
| 
      
 118 
     | 
    
         
            +
                 "test/app_root/app/models/book.rb",
         
     | 
| 
      
 119 
     | 
    
         
            +
                 "test/app_root/app/models/category.rb",
         
     | 
| 
      
 120 
     | 
    
         
            +
                 "test/app_root/app/models/city.rb",
         
     | 
| 
      
 121 
     | 
    
         
            +
                 "test/app_root/app/models/continent.rb",
         
     | 
| 
      
 122 
     | 
    
         
            +
                 "test/app_root/app/models/country.rb",
         
     | 
| 
      
 123 
     | 
    
         
            +
                 "test/app_root/app/models/genre.rb",
         
     | 
| 
      
 124 
     | 
    
         
            +
                 "test/app_root/config/boot.rb",
         
     | 
| 
      
 125 
     | 
    
         
            +
                 "test/app_root/config/environment.rb",
         
     | 
| 
      
 126 
     | 
    
         
            +
                 "test/app_root/config/environments/in_memory.rb",
         
     | 
| 
      
 127 
     | 
    
         
            +
                 "test/app_root/config/environments/mysql.rb",
         
     | 
| 
      
 128 
     | 
    
         
            +
                 "test/app_root/config/environments/postgresql.rb",
         
     | 
| 
      
 129 
     | 
    
         
            +
                 "test/app_root/config/environments/sqlite.rb",
         
     | 
| 
      
 130 
     | 
    
         
            +
                 "test/app_root/config/environments/sqlite3.rb",
         
     | 
| 
      
 131 
     | 
    
         
            +
                 "test/app_root/config/routes.rb",
         
     | 
| 
      
 132 
     | 
    
         
            +
                 "test/app_root/db/migrate/20081222033343_create_books.rb",
         
     | 
| 
      
 133 
     | 
    
         
            +
                 "test/app_root/db/migrate/20081222033440_create_genres.rb",
         
     | 
| 
      
 134 
     | 
    
         
            +
                 "test/app_root/db/migrate/20081222035855_create_netzke_preferences.rb",
         
     | 
| 
      
 135 
     | 
    
         
            +
                 "test/app_root/db/migrate/20081223024935_create_categories.rb",
         
     | 
| 
      
 136 
     | 
    
         
            +
                 "test/app_root/db/migrate/20081223025635_create_countries.rb",
         
     | 
| 
      
 137 
     | 
    
         
            +
                 "test/app_root/db/migrate/20081223025653_create_continents.rb",
         
     | 
| 
      
 138 
     | 
    
         
            +
                 "test/app_root/db/migrate/20081223025732_create_cities.rb",
         
     | 
| 
      
 139 
     | 
    
         
            +
                 "test/app_root/db/migrate/20090102223630_create_netzke_layouts.rb",
         
     | 
| 
      
 140 
     | 
    
         
            +
                 "test/app_root/vendor/plugins/acts_as_list/init.rb",
         
     | 
| 
      
 141 
     | 
    
         
            +
                 "test/app_root/vendor/plugins/acts_as_list/lib/active_record/acts/list.rb",
         
     | 
| 
      
 142 
     | 
    
         
            +
                 "test/console_with_fixtures.rb",
         
     | 
| 
      
 143 
     | 
    
         
            +
                 "test/schema.rb",
         
     | 
| 
      
 144 
     | 
    
         
            +
                 "test/test_helper.rb",
         
     | 
| 
      
 145 
     | 
    
         
            +
                 "test/unit/accordion_panel_test.rb",
         
     | 
| 
      
 146 
     | 
    
         
            +
                 "test/unit/active_record_basepack_test.rb",
         
     | 
| 
      
 147 
     | 
    
         
            +
                 "test/unit/grid_panel_test.rb",
         
     | 
| 
      
 148 
     | 
    
         
            +
                 "test/unit/helper_model_test.rb",
         
     | 
| 
      
 149 
     | 
    
         
            +
                 "test/unit/netzke_basepack_test.rb",
         
     | 
| 
      
 150 
     | 
    
         
            +
                 "test/unit/tab_panel_test.rb"
         
     | 
| 
      
 151 
     | 
    
         
            +
              ]
         
     | 
| 
       22 
152 
     | 
    
         | 
| 
       23 
153 
     | 
    
         
             
              if s.respond_to? :specification_version then
         
     | 
| 
       24 
154 
     | 
    
         
             
                current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
         
     | 
| 
       25 
     | 
    
         
            -
                s.specification_version =  
     | 
| 
      
 155 
     | 
    
         
            +
                s.specification_version = 3
         
     | 
| 
       26 
156 
     | 
    
         | 
| 
       27 
157 
     | 
    
         
             
                if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
         
     | 
| 
       28 
     | 
    
         
            -
                  s.add_runtime_dependency(%q< 
     | 
| 
       29 
     | 
    
         
            -
                  s.add_runtime_dependency(%q<skozlov-netzke-core>, [">= 0", "= 0.1.0.2"])
         
     | 
| 
      
 158 
     | 
    
         
            +
                  s.add_runtime_dependency(%q<skozlov-netzke-core>, [">= 0.4.0"])
         
     | 
| 
       30 
159 
     | 
    
         
             
                else
         
     | 
| 
       31 
     | 
    
         
            -
                  s.add_dependency(%q< 
     | 
| 
       32 
     | 
    
         
            -
                  s.add_dependency(%q<skozlov-netzke-core>, [">= 0", "= 0.1.0.2"])
         
     | 
| 
      
 160 
     | 
    
         
            +
                  s.add_dependency(%q<skozlov-netzke-core>, [">= 0.4.0"])
         
     | 
| 
       33 
161 
     | 
    
         
             
                end
         
     | 
| 
       34 
162 
     | 
    
         
             
              else
         
     | 
| 
       35 
     | 
    
         
            -
                s.add_dependency(%q< 
     | 
| 
       36 
     | 
    
         
            -
                s.add_dependency(%q<skozlov-netzke-core>, [">= 0", "= 0.1.0.2"])
         
     | 
| 
      
 163 
     | 
    
         
            +
                s.add_dependency(%q<skozlov-netzke-core>, [">= 0.4.0"])
         
     | 
| 
       37 
164 
     | 
    
         
             
              end
         
     | 
| 
       38 
165 
     | 
    
         
             
            end
         
     |