typus 0.9.28 → 0.9.29

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.
Files changed (78) hide show
  1. data/README.rdoc +25 -14
  2. data/VERSION +1 -1
  3. data/app/helpers/admin/form_helper.rb +16 -146
  4. data/app/helpers/admin/master_helper.rb +1 -1
  5. data/app/helpers/admin/table_helper.rb +3 -3
  6. data/app/helpers/typus_helper.rb +1 -9
  7. data/app/views/admin/resources/show.html.erb +5 -2
  8. data/app/views/admin/templates/_boolean.html.erb +8 -0
  9. data/app/views/admin/templates/_date.html.erb +2 -0
  10. data/app/views/admin/templates/_datetime.html.erb +2 -0
  11. data/app/views/admin/templates/_file.html.erb +44 -0
  12. data/app/views/admin/templates/_password.html.erb +2 -0
  13. data/app/views/admin/templates/_selector.html.erb +21 -0
  14. data/app/views/admin/templates/_string.html.erb +21 -0
  15. data/app/views/admin/templates/_text.html.erb +2 -0
  16. data/app/views/admin/templates/_time.html.erb +2 -0
  17. data/app/views/admin/templates/_tiny_mce.html.erb +2 -0
  18. data/app/views/layouts/admin.html.erb +1 -1
  19. data/config/locales/ru.yml +2 -2
  20. data/generators/typus/templates/config/initializers/typus.rb +2 -1
  21. data/generators/typus/templates/public/images/admin/{fancyzoom/closebox.png → fancybox/fancy_closebox.png} +0 -0
  22. data/generators/typus/templates/public/images/admin/fancybox/fancy_left.png +0 -0
  23. data/generators/typus/templates/public/images/admin/fancybox/fancy_progress.png +0 -0
  24. data/generators/typus/templates/public/images/admin/fancybox/fancy_right.png +0 -0
  25. data/generators/typus/templates/public/images/admin/fancybox/fancy_shadow_e.png +0 -0
  26. data/generators/typus/templates/public/images/admin/fancybox/fancy_shadow_n.png +0 -0
  27. data/generators/typus/templates/public/images/admin/fancybox/fancy_shadow_ne.png +0 -0
  28. data/generators/typus/templates/public/images/admin/fancybox/fancy_shadow_nw.png +0 -0
  29. data/generators/typus/templates/public/images/admin/fancybox/fancy_shadow_s.png +0 -0
  30. data/generators/typus/templates/public/images/admin/fancybox/fancy_shadow_se.png +0 -0
  31. data/generators/typus/templates/public/images/admin/fancybox/fancy_shadow_sw.png +0 -0
  32. data/generators/typus/templates/public/images/admin/fancybox/fancy_shadow_w.png +0 -0
  33. data/generators/typus/templates/public/images/admin/fancybox/fancy_title_left.png +0 -0
  34. data/generators/typus/templates/public/images/admin/fancybox/fancy_title_main.png +0 -0
  35. data/generators/typus/templates/public/images/admin/fancybox/fancy_title_right.png +0 -0
  36. data/generators/typus/templates/public/javascripts/admin/jquery-1.3.2.min.js +19 -0
  37. data/generators/typus/templates/public/javascripts/admin/jquery.fancybox-1.2.1.min.js +9 -0
  38. data/generators/typus/templates/public/stylesheets/admin/jquery.fancybox.css +315 -0
  39. data/generators/typus/templates/public/stylesheets/admin/screen.css +75 -89
  40. data/generators/typus/typus_generator.rb +6 -5
  41. data/lib/typus.rb +0 -15
  42. data/lib/typus/active_record.rb +8 -14
  43. data/lib/typus/configuration.rb +2 -2
  44. data/lib/typus/preview.rb +2 -1
  45. data/lib/typus/reloader.rb +0 -1
  46. data/tasks/typus_tasks.rake +2 -0
  47. data/test/helpers/typus_helper_test.rb +0 -10
  48. data/test/lib/active_record_test.rb +0 -10
  49. data/test/lib/configuration_test.rb +2 -1
  50. data/typus.gemspec +30 -30
  51. metadata +30 -30
  52. data/generators/typus/templates/public/images/admin/fancyzoom/bl.gif +0 -0
  53. data/generators/typus/templates/public/images/admin/fancyzoom/bl.png +0 -0
  54. data/generators/typus/templates/public/images/admin/fancyzoom/bm.gif +0 -0
  55. data/generators/typus/templates/public/images/admin/fancyzoom/bm.png +0 -0
  56. data/generators/typus/templates/public/images/admin/fancyzoom/br.gif +0 -0
  57. data/generators/typus/templates/public/images/admin/fancyzoom/br.png +0 -0
  58. data/generators/typus/templates/public/images/admin/fancyzoom/closebox.gif +0 -0
  59. data/generators/typus/templates/public/images/admin/fancyzoom/ml.gif +0 -0
  60. data/generators/typus/templates/public/images/admin/fancyzoom/ml.png +0 -0
  61. data/generators/typus/templates/public/images/admin/fancyzoom/mr.gif +0 -0
  62. data/generators/typus/templates/public/images/admin/fancyzoom/mr.png +0 -0
  63. data/generators/typus/templates/public/images/admin/fancyzoom/tl.gif +0 -0
  64. data/generators/typus/templates/public/images/admin/fancyzoom/tl.png +0 -0
  65. data/generators/typus/templates/public/images/admin/fancyzoom/tm.gif +0 -0
  66. data/generators/typus/templates/public/images/admin/fancyzoom/tm.png +0 -0
  67. data/generators/typus/templates/public/images/admin/fancyzoom/tr.gif +0 -0
  68. data/generators/typus/templates/public/images/admin/fancyzoom/tr.png +0 -0
  69. data/generators/typus/templates/public/javascripts/admin/builder.js +0 -136
  70. data/generators/typus/templates/public/javascripts/admin/controls.js +0 -963
  71. data/generators/typus/templates/public/javascripts/admin/dragdrop.js +0 -973
  72. data/generators/typus/templates/public/javascripts/admin/effects.js +0 -1128
  73. data/generators/typus/templates/public/javascripts/admin/fancyzoom.js +0 -221
  74. data/generators/typus/templates/public/javascripts/admin/prototype.js +0 -4320
  75. data/generators/typus/templates/public/javascripts/admin/scriptaculous.js +0 -58
  76. data/generators/typus/templates/public/javascripts/admin/slider.js +0 -275
  77. data/generators/typus/templates/public/javascripts/admin/sound.js +0 -55
  78. data/lib/typus/locale.rb +0 -0
@@ -100,20 +100,21 @@ class TypusGenerator < Rails::Generator::Base
100
100
  [ 'public/stylesheets/admin',
101
101
  'public/javascripts/admin',
102
102
  'public/images/admin',
103
- 'public/images/admin/fancyzoom' ].each { |f| Dir.mkdir(f) unless File.directory?(f) }
103
+ 'public/images/admin/fancybox' ].each { |f| Dir.mkdir(f) unless File.directory?(f) }
104
104
 
105
105
  [ 'public/stylesheets/admin/screen.css',
106
106
  'public/stylesheets/admin/reset.css',
107
+ 'public/stylesheets/admin/jquery.fancybox.css',
107
108
  'public/images/admin/ui-icons.png' ].each { |f| m.file f, f }
108
109
 
109
- %w( application builder controls dragdrop effects fancyzoom prototype scriptaculous slider sound ).each do |f|
110
+ %w( application jquery-1.3.2.min jquery.fancybox-1.2.1.min ).each do |f|
110
111
  file = "public/javascripts/admin/#{f}.js"
111
112
  m.file file, file
112
113
  end
113
114
 
114
- %w( bl bm br closebox ml mr tl tm tr ).each do |image|
115
- file = "public/images/admin/fancyzoom/#{image}"
116
- %w( gif png ).each { |e| m.file "#{file}.#{e}", "#{file}.#{e}" }
115
+ %w( closebox left progress right shadow_e shadow_n shadow_ne shadow_nw shadow_s shadow_se shadow_sw shadow_w title_left title_main title_right ).each do |image|
116
+ file = "public/images/admin/fancybox/fancy_#{image}.png"
117
+ m.file file, file
117
118
  end
118
119
 
119
120
  # Migration file
@@ -68,10 +68,6 @@ module Typus
68
68
  Rails.env.test? && Dir.pwd == "#{Rails.root}/vendor/plugins/typus"
69
69
  end
70
70
 
71
- def plugin?
72
- File.exist?("#{Rails.root}/vendor/plugins/typus")
73
- end
74
-
75
71
  def boot!
76
72
 
77
73
  # return unless File.exists?("#{Rails.root}/config/initializers/typus.rb") || testing?
@@ -90,11 +86,6 @@ module Typus
90
86
  Typus::Configuration.config!
91
87
  Typus::Configuration.roles!
92
88
 
93
- # Load translation files from the plugin or the gem.
94
- unless plugin?
95
- Gem.path.each { |g| I18n.load_path += Dir[File.join("#{g}/gems/typus-#{version}/config/locales/*.{rb,yml}")] }
96
- end
97
-
98
89
  # Require the test/models on when testing.
99
90
  require File.dirname(__FILE__) + '/../test/models' if testing?
100
91
 
@@ -117,12 +108,6 @@ module Typus
117
108
  require 'vendor/paginator'
118
109
  require 'vendor/rss_parser'
119
110
 
120
- # Gems.
121
- begin
122
- require 'Rdiscount'
123
- rescue LoadError
124
- end
125
-
126
111
  # Run controllers generator ...
127
112
  generator unless testing? || Rails.env.production?
128
113
 
@@ -167,11 +167,14 @@ module Typus
167
167
  def typus_order_by
168
168
 
169
169
  fields = typus_defaults_for(:order_by)
170
- return "#{table_name}.id ASC" if fields.empty?
171
170
 
172
- order = fields.map do |field|
173
- (field.include?('-')) ? "#{table_name}.#{field.delete('-')} DESC" : "#{table_name}.#{field} ASC"
174
- end.join(', ')
171
+ order = if fields.empty?
172
+ "#{table_name}.id ASC"
173
+ else
174
+ fields.map do |field|
175
+ field.include?('-') ? "#{table_name}.#{field.delete('-')} DESC" : "#{table_name}.#{field} ASC"
176
+ end.join(', ')
177
+ end
175
178
 
176
179
  return order
177
180
 
@@ -200,16 +203,7 @@ module Typus
200
203
  # We are able to define how to display dates on Typus
201
204
  def typus_date_format(attribute = :default)
202
205
  date_format = Typus::Configuration.config[name]['fields']['options']['date_formats'][attribute.to_s].to_sym rescue nil
203
- date_format = :db if date_format.nil?
204
- return date_format
205
- end
206
-
207
- # We are able to define which template to use to render the attribute
208
- # within the form
209
- def typus_template(attribute)
210
- Typus::Configuration.config[name]['fields']['options']['templates'][attribute.to_s]
211
- rescue
212
- nil
206
+ return !date_format.nil? ? date_format : :db
213
207
  end
214
208
 
215
209
  def build_conditions(params)
@@ -7,12 +7,12 @@ module Typus
7
7
  :config_folder => 'config/typus',
8
8
  :default_locale => :en,
9
9
  :email => 'admin@example.com',
10
- :image_preview_size => 'typus',
10
+ :file_preview => :typus_preview,
11
+ :file_thumbnail => :typus_thumbnail,
11
12
  :recover_password => false,
12
13
  :relationship => 'typus_users',
13
14
  :root => 'admin',
14
15
  :ssl => false,
15
- :templates_folder => 'admin/templates',
16
16
  :user_class_name => 'TypusUser',
17
17
  :user_fk => 'typus_user_id' }
18
18
 
@@ -3,7 +3,8 @@ module Typus
3
3
  module InstanceMethods
4
4
 
5
5
  def typus_preview(attachment)
6
- return "<img src=\"#{send(attachment).url(:typus_preview)}\" />"
6
+ file_preview = Typus::Configuration.options[:file_preview]
7
+ return "<img src=\"#{send(attachment).url(file_preview)}\" />"
7
8
  end
8
9
 
9
10
  end
@@ -5,7 +5,6 @@ module Typus
5
5
  # Reload config and roles when app is running in development.
6
6
  def reload_config_et_roles
7
7
  return if Rails.env.production?
8
- logger.info "=> [typus] Configuration files have been reloaded."
9
8
  Typus::Configuration.roles!
10
9
  Typus::Configuration.config!
11
10
  end
@@ -1,3 +1,5 @@
1
+ # require 'spec/tasks/rails'
2
+
1
3
  namespace :typus do
2
4
 
3
5
  desc 'Install acts_as_list, acts_as_tree and paperclip.'
@@ -91,14 +91,4 @@ class TypusHelperTest < ActiveSupport::TestCase
91
91
 
92
92
  end
93
93
 
94
- def test_typus_message
95
- output = typus_message('chunky bacon', 'yay')
96
- expected = <<-HTML
97
- <div id="flash" class="yay">
98
- <p>chunky bacon</p>
99
- </div>
100
- HTML
101
- assert_equal expected, output
102
- end
103
-
104
94
  end
@@ -369,16 +369,6 @@ class ActiveRecordTest < ActiveSupport::TestCase
369
369
 
370
370
  end
371
371
 
372
- def test_should_verify_typus_template_is_working_properly
373
-
374
- assert_equal 'datepicker', Post.typus_template('published_at')
375
- assert_equal 'datepicker', Post.typus_template(:published_at)
376
-
377
- assert_nil Post.typus_template('created_at')
378
- assert_nil Post.typus_template('unknown')
379
-
380
- end
381
-
382
372
  def test_should_verify_typus_user_id
383
373
  assert Post.typus_user_id?
384
374
  assert !TypusUser.typus_user_id?
@@ -13,11 +13,12 @@ class ConfigurationTest < ActiveSupport::TestCase
13
13
  assert_equal 'vendor/plugins/typus/test/config/working', Typus::Configuration.options[:config_folder]
14
14
  assert_equal :en, Typus::Configuration.options[:default_locale]
15
15
  assert_equal 'admin@example.com', Typus::Configuration.options[:email]
16
+ assert_equal :typus_preview, Typus::Configuration.options[:file_preview]
17
+ assert_equal :typus_thumbnail, Typus::Configuration.options[:file_thumbnail]
16
18
  assert_equal false, Typus::Configuration.options[:recover_password]
17
19
  assert_equal 'typus_users', Typus::Configuration.options[:relationship]
18
20
  assert_equal 'admin', Typus::Configuration.options[:root]
19
21
  assert_equal false, Typus::Configuration.options[:ssl]
20
- assert_equal 'admin/templates', Typus::Configuration.options[:templates_folder]
21
22
  assert_equal 'TypusUser', Typus::Configuration.options[:user_class_name]
22
23
  assert_equal 'typus_user_id', Typus::Configuration.options[:user_fk]
23
24
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{typus}
8
- s.version = "0.9.28"
8
+ s.version = "0.9.29"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Francesc Esplugas"]
12
- s.date = %q{2009-09-10}
12
+ s.date = %q{2009-09-13}
13
13
  s.description = %q{Effortless backend interface for Ruby on Rails applications. (Admin scaffold generator.)}
14
14
  s.email = %q{francesc@intraducibles.com}
15
15
  s.extra_rdoc_files = [
@@ -38,6 +38,16 @@ Gem::Specification.new do |s|
38
38
  "app/views/admin/resources/show.html.erb",
39
39
  "app/views/admin/shared/_footer.html.erb",
40
40
  "app/views/admin/shared/_pagination.html.erb",
41
+ "app/views/admin/templates/_boolean.html.erb",
42
+ "app/views/admin/templates/_date.html.erb",
43
+ "app/views/admin/templates/_datetime.html.erb",
44
+ "app/views/admin/templates/_file.html.erb",
45
+ "app/views/admin/templates/_password.html.erb",
46
+ "app/views/admin/templates/_selector.html.erb",
47
+ "app/views/admin/templates/_string.html.erb",
48
+ "app/views/admin/templates/_text.html.erb",
49
+ "app/views/admin/templates/_time.html.erb",
50
+ "app/views/admin/templates/_tiny_mce.html.erb",
41
51
  "app/views/layouts/admin.html.erb",
42
52
  "app/views/layouts/typus.html.erb",
43
53
  "app/views/typus/dashboard.html.erb",
@@ -60,35 +70,26 @@ Gem::Specification.new do |s|
60
70
  "generators/typus/templates/config/typus/typus.yml",
61
71
  "generators/typus/templates/config/typus/typus_roles.yml",
62
72
  "generators/typus/templates/db/create_typus_users.rb",
63
- "generators/typus/templates/public/images/admin/fancyzoom/bl.gif",
64
- "generators/typus/templates/public/images/admin/fancyzoom/bl.png",
65
- "generators/typus/templates/public/images/admin/fancyzoom/bm.gif",
66
- "generators/typus/templates/public/images/admin/fancyzoom/bm.png",
67
- "generators/typus/templates/public/images/admin/fancyzoom/br.gif",
68
- "generators/typus/templates/public/images/admin/fancyzoom/br.png",
69
- "generators/typus/templates/public/images/admin/fancyzoom/closebox.gif",
70
- "generators/typus/templates/public/images/admin/fancyzoom/closebox.png",
71
- "generators/typus/templates/public/images/admin/fancyzoom/ml.gif",
72
- "generators/typus/templates/public/images/admin/fancyzoom/ml.png",
73
- "generators/typus/templates/public/images/admin/fancyzoom/mr.gif",
74
- "generators/typus/templates/public/images/admin/fancyzoom/mr.png",
75
- "generators/typus/templates/public/images/admin/fancyzoom/tl.gif",
76
- "generators/typus/templates/public/images/admin/fancyzoom/tl.png",
77
- "generators/typus/templates/public/images/admin/fancyzoom/tm.gif",
78
- "generators/typus/templates/public/images/admin/fancyzoom/tm.png",
79
- "generators/typus/templates/public/images/admin/fancyzoom/tr.gif",
80
- "generators/typus/templates/public/images/admin/fancyzoom/tr.png",
73
+ "generators/typus/templates/public/images/admin/fancybox/fancy_closebox.png",
74
+ "generators/typus/templates/public/images/admin/fancybox/fancy_left.png",
75
+ "generators/typus/templates/public/images/admin/fancybox/fancy_progress.png",
76
+ "generators/typus/templates/public/images/admin/fancybox/fancy_right.png",
77
+ "generators/typus/templates/public/images/admin/fancybox/fancy_shadow_e.png",
78
+ "generators/typus/templates/public/images/admin/fancybox/fancy_shadow_n.png",
79
+ "generators/typus/templates/public/images/admin/fancybox/fancy_shadow_ne.png",
80
+ "generators/typus/templates/public/images/admin/fancybox/fancy_shadow_nw.png",
81
+ "generators/typus/templates/public/images/admin/fancybox/fancy_shadow_s.png",
82
+ "generators/typus/templates/public/images/admin/fancybox/fancy_shadow_se.png",
83
+ "generators/typus/templates/public/images/admin/fancybox/fancy_shadow_sw.png",
84
+ "generators/typus/templates/public/images/admin/fancybox/fancy_shadow_w.png",
85
+ "generators/typus/templates/public/images/admin/fancybox/fancy_title_left.png",
86
+ "generators/typus/templates/public/images/admin/fancybox/fancy_title_main.png",
87
+ "generators/typus/templates/public/images/admin/fancybox/fancy_title_right.png",
81
88
  "generators/typus/templates/public/images/admin/ui-icons.png",
82
89
  "generators/typus/templates/public/javascripts/admin/application.js",
83
- "generators/typus/templates/public/javascripts/admin/builder.js",
84
- "generators/typus/templates/public/javascripts/admin/controls.js",
85
- "generators/typus/templates/public/javascripts/admin/dragdrop.js",
86
- "generators/typus/templates/public/javascripts/admin/effects.js",
87
- "generators/typus/templates/public/javascripts/admin/fancyzoom.js",
88
- "generators/typus/templates/public/javascripts/admin/prototype.js",
89
- "generators/typus/templates/public/javascripts/admin/scriptaculous.js",
90
- "generators/typus/templates/public/javascripts/admin/slider.js",
91
- "generators/typus/templates/public/javascripts/admin/sound.js",
90
+ "generators/typus/templates/public/javascripts/admin/jquery-1.3.2.min.js",
91
+ "generators/typus/templates/public/javascripts/admin/jquery.fancybox-1.2.1.min.js",
92
+ "generators/typus/templates/public/stylesheets/admin/jquery.fancybox.css",
92
93
  "generators/typus/templates/public/stylesheets/admin/reset.css",
93
94
  "generators/typus/templates/public/stylesheets/admin/screen.css",
94
95
  "generators/typus/typus_generator.rb",
@@ -106,7 +107,6 @@ Gem::Specification.new do |s|
106
107
  "lib/typus/format.rb",
107
108
  "lib/typus/generator.rb",
108
109
  "lib/typus/hash.rb",
109
- "lib/typus/locale.rb",
110
110
  "lib/typus/object.rb",
111
111
  "lib/typus/preferences.rb",
112
112
  "lib/typus/preview.rb",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: typus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.28
4
+ version: 0.9.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francesc Esplugas
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-09-10 00:00:00 +02:00
12
+ date: 2009-09-13 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -44,6 +44,16 @@ files:
44
44
  - app/views/admin/resources/show.html.erb
45
45
  - app/views/admin/shared/_footer.html.erb
46
46
  - app/views/admin/shared/_pagination.html.erb
47
+ - app/views/admin/templates/_boolean.html.erb
48
+ - app/views/admin/templates/_date.html.erb
49
+ - app/views/admin/templates/_datetime.html.erb
50
+ - app/views/admin/templates/_file.html.erb
51
+ - app/views/admin/templates/_password.html.erb
52
+ - app/views/admin/templates/_selector.html.erb
53
+ - app/views/admin/templates/_string.html.erb
54
+ - app/views/admin/templates/_text.html.erb
55
+ - app/views/admin/templates/_time.html.erb
56
+ - app/views/admin/templates/_tiny_mce.html.erb
47
57
  - app/views/layouts/admin.html.erb
48
58
  - app/views/layouts/typus.html.erb
49
59
  - app/views/typus/dashboard.html.erb
@@ -66,35 +76,26 @@ files:
66
76
  - generators/typus/templates/config/typus/typus.yml
67
77
  - generators/typus/templates/config/typus/typus_roles.yml
68
78
  - generators/typus/templates/db/create_typus_users.rb
69
- - generators/typus/templates/public/images/admin/fancyzoom/bl.gif
70
- - generators/typus/templates/public/images/admin/fancyzoom/bl.png
71
- - generators/typus/templates/public/images/admin/fancyzoom/bm.gif
72
- - generators/typus/templates/public/images/admin/fancyzoom/bm.png
73
- - generators/typus/templates/public/images/admin/fancyzoom/br.gif
74
- - generators/typus/templates/public/images/admin/fancyzoom/br.png
75
- - generators/typus/templates/public/images/admin/fancyzoom/closebox.gif
76
- - generators/typus/templates/public/images/admin/fancyzoom/closebox.png
77
- - generators/typus/templates/public/images/admin/fancyzoom/ml.gif
78
- - generators/typus/templates/public/images/admin/fancyzoom/ml.png
79
- - generators/typus/templates/public/images/admin/fancyzoom/mr.gif
80
- - generators/typus/templates/public/images/admin/fancyzoom/mr.png
81
- - generators/typus/templates/public/images/admin/fancyzoom/tl.gif
82
- - generators/typus/templates/public/images/admin/fancyzoom/tl.png
83
- - generators/typus/templates/public/images/admin/fancyzoom/tm.gif
84
- - generators/typus/templates/public/images/admin/fancyzoom/tm.png
85
- - generators/typus/templates/public/images/admin/fancyzoom/tr.gif
86
- - generators/typus/templates/public/images/admin/fancyzoom/tr.png
79
+ - generators/typus/templates/public/images/admin/fancybox/fancy_closebox.png
80
+ - generators/typus/templates/public/images/admin/fancybox/fancy_left.png
81
+ - generators/typus/templates/public/images/admin/fancybox/fancy_progress.png
82
+ - generators/typus/templates/public/images/admin/fancybox/fancy_right.png
83
+ - generators/typus/templates/public/images/admin/fancybox/fancy_shadow_e.png
84
+ - generators/typus/templates/public/images/admin/fancybox/fancy_shadow_n.png
85
+ - generators/typus/templates/public/images/admin/fancybox/fancy_shadow_ne.png
86
+ - generators/typus/templates/public/images/admin/fancybox/fancy_shadow_nw.png
87
+ - generators/typus/templates/public/images/admin/fancybox/fancy_shadow_s.png
88
+ - generators/typus/templates/public/images/admin/fancybox/fancy_shadow_se.png
89
+ - generators/typus/templates/public/images/admin/fancybox/fancy_shadow_sw.png
90
+ - generators/typus/templates/public/images/admin/fancybox/fancy_shadow_w.png
91
+ - generators/typus/templates/public/images/admin/fancybox/fancy_title_left.png
92
+ - generators/typus/templates/public/images/admin/fancybox/fancy_title_main.png
93
+ - generators/typus/templates/public/images/admin/fancybox/fancy_title_right.png
87
94
  - generators/typus/templates/public/images/admin/ui-icons.png
88
95
  - generators/typus/templates/public/javascripts/admin/application.js
89
- - generators/typus/templates/public/javascripts/admin/builder.js
90
- - generators/typus/templates/public/javascripts/admin/controls.js
91
- - generators/typus/templates/public/javascripts/admin/dragdrop.js
92
- - generators/typus/templates/public/javascripts/admin/effects.js
93
- - generators/typus/templates/public/javascripts/admin/fancyzoom.js
94
- - generators/typus/templates/public/javascripts/admin/prototype.js
95
- - generators/typus/templates/public/javascripts/admin/scriptaculous.js
96
- - generators/typus/templates/public/javascripts/admin/slider.js
97
- - generators/typus/templates/public/javascripts/admin/sound.js
96
+ - generators/typus/templates/public/javascripts/admin/jquery-1.3.2.min.js
97
+ - generators/typus/templates/public/javascripts/admin/jquery.fancybox-1.2.1.min.js
98
+ - generators/typus/templates/public/stylesheets/admin/jquery.fancybox.css
98
99
  - generators/typus/templates/public/stylesheets/admin/reset.css
99
100
  - generators/typus/templates/public/stylesheets/admin/screen.css
100
101
  - generators/typus/typus_generator.rb
@@ -112,7 +113,6 @@ files:
112
113
  - lib/typus/format.rb
113
114
  - lib/typus/generator.rb
114
115
  - lib/typus/hash.rb
115
- - lib/typus/locale.rb
116
116
  - lib/typus/object.rb
117
117
  - lib/typus/preferences.rb
118
118
  - lib/typus/preview.rb
@@ -1,136 +0,0 @@
1
- // script.aculo.us builder.js v1.8.2, Tue Nov 18 18:30:58 +0100 2008
2
-
3
- // Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
4
- //
5
- // script.aculo.us is freely distributable under the terms of an MIT-style license.
6
- // For details, see the script.aculo.us web site: http://script.aculo.us/
7
-
8
- var Builder = {
9
- NODEMAP: {
10
- AREA: 'map',
11
- CAPTION: 'table',
12
- COL: 'table',
13
- COLGROUP: 'table',
14
- LEGEND: 'fieldset',
15
- OPTGROUP: 'select',
16
- OPTION: 'select',
17
- PARAM: 'object',
18
- TBODY: 'table',
19
- TD: 'table',
20
- TFOOT: 'table',
21
- TH: 'table',
22
- THEAD: 'table',
23
- TR: 'table'
24
- },
25
- // note: For Firefox < 1.5, OPTION and OPTGROUP tags are currently broken,
26
- // due to a Firefox bug
27
- node: function(elementName) {
28
- elementName = elementName.toUpperCase();
29
-
30
- // try innerHTML approach
31
- var parentTag = this.NODEMAP[elementName] || 'div';
32
- var parentElement = document.createElement(parentTag);
33
- try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707
34
- parentElement.innerHTML = "<" + elementName + "></" + elementName + ">";
35
- } catch(e) {}
36
- var element = parentElement.firstChild || null;
37
-
38
- // see if browser added wrapping tags
39
- if(element && (element.tagName.toUpperCase() != elementName))
40
- element = element.getElementsByTagName(elementName)[0];
41
-
42
- // fallback to createElement approach
43
- if(!element) element = document.createElement(elementName);
44
-
45
- // abort if nothing could be created
46
- if(!element) return;
47
-
48
- // attributes (or text)
49
- if(arguments[1])
50
- if(this._isStringOrNumber(arguments[1]) ||
51
- (arguments[1] instanceof Array) ||
52
- arguments[1].tagName) {
53
- this._children(element, arguments[1]);
54
- } else {
55
- var attrs = this._attributes(arguments[1]);
56
- if(attrs.length) {
57
- try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707
58
- parentElement.innerHTML = "<" +elementName + " " +
59
- attrs + "></" + elementName + ">";
60
- } catch(e) {}
61
- element = parentElement.firstChild || null;
62
- // workaround firefox 1.0.X bug
63
- if(!element) {
64
- element = document.createElement(elementName);
65
- for(attr in arguments[1])
66
- element[attr == 'class' ? 'className' : attr] = arguments[1][attr];
67
- }
68
- if(element.tagName.toUpperCase() != elementName)
69
- element = parentElement.getElementsByTagName(elementName)[0];
70
- }
71
- }
72
-
73
- // text, or array of children
74
- if(arguments[2])
75
- this._children(element, arguments[2]);
76
-
77
- return $(element);
78
- },
79
- _text: function(text) {
80
- return document.createTextNode(text);
81
- },
82
-
83
- ATTR_MAP: {
84
- 'className': 'class',
85
- 'htmlFor': 'for'
86
- },
87
-
88
- _attributes: function(attributes) {
89
- var attrs = [];
90
- for(attribute in attributes)
91
- attrs.push((attribute in this.ATTR_MAP ? this.ATTR_MAP[attribute] : attribute) +
92
- '="' + attributes[attribute].toString().escapeHTML().gsub(/"/,'&quot;') + '"');
93
- return attrs.join(" ");
94
- },
95
- _children: function(element, children) {
96
- if(children.tagName) {
97
- element.appendChild(children);
98
- return;
99
- }
100
- if(typeof children=='object') { // array can hold nodes and text
101
- children.flatten().each( function(e) {
102
- if(typeof e=='object')
103
- element.appendChild(e);
104
- else
105
- if(Builder._isStringOrNumber(e))
106
- element.appendChild(Builder._text(e));
107
- });
108
- } else
109
- if(Builder._isStringOrNumber(children))
110
- element.appendChild(Builder._text(children));
111
- },
112
- _isStringOrNumber: function(param) {
113
- return(typeof param=='string' || typeof param=='number');
114
- },
115
- build: function(html) {
116
- var element = this.node('div');
117
- $(element).update(html.strip());
118
- return element.down();
119
- },
120
- dump: function(scope) {
121
- if(typeof scope != 'object' && typeof scope != 'function') scope = window; //global scope
122
-
123
- var tags = ("A ABBR ACRONYM ADDRESS APPLET AREA B BASE BASEFONT BDO BIG BLOCKQUOTE BODY " +
124
- "BR BUTTON CAPTION CENTER CITE CODE COL COLGROUP DD DEL DFN DIR DIV DL DT EM FIELDSET " +
125
- "FONT FORM FRAME FRAMESET H1 H2 H3 H4 H5 H6 HEAD HR HTML I IFRAME IMG INPUT INS ISINDEX "+
126
- "KBD LABEL LEGEND LI LINK MAP MENU META NOFRAMES NOSCRIPT OBJECT OL OPTGROUP OPTION P "+
127
- "PARAM PRE Q S SAMP SCRIPT SELECT SMALL SPAN STRIKE STRONG STYLE SUB SUP TABLE TBODY TD "+
128
- "TEXTAREA TFOOT TH THEAD TITLE TR TT U UL VAR").split(/\s+/);
129
-
130
- tags.each( function(tag){
131
- scope[tag] = function() {
132
- return Builder.node.apply(Builder, [tag].concat($A(arguments)));
133
- };
134
- });
135
- }
136
- };