community_engine 2.3.2 → 3.0.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.
- checksums.yaml +13 -5
- data/.travis.yml +5 -4
- data/CHANGELOG +43 -5
- data/Gemfile +1 -16
- data/README.markdown +22 -19
- data/UPGRADING.markdown +10 -0
- data/about.yml +1 -1
- data/app/assets/javascripts/community_engine.js +187 -18
- data/app/assets/javascripts/cropper.js +86 -565
- data/app/assets/javascripts/forum.js +26 -71
- data/app/assets/javascripts/jquery.migrate.js +521 -0
- data/app/assets/stylesheets/_colors.css.scss +100 -0
- data/app/assets/stylesheets/_font.css.scss +17 -0
- data/app/assets/stylesheets/_forms.css.scss +20 -0
- data/app/assets/stylesheets/_forum.css.scss +0 -0
- data/app/assets/stylesheets/_grid.css.scss +7 -0
- data/app/assets/stylesheets/_layers.css.scss +7 -0
- data/app/assets/stylesheets/_layout.css.scss +28 -0
- data/app/assets/stylesheets/community_engine.css.scss +18 -0
- data/app/assets/stylesheets/cropper.css +6 -182
- data/app/controllers/activities_controller.rb +10 -10
- data/app/controllers/admin_controller.rb +23 -23
- data/app/controllers/ads_controller.rb +16 -5
- data/app/controllers/albums_controller.rb +11 -5
- data/app/controllers/base_controller.rb +5 -8
- data/app/controllers/categories_controller.rb +31 -31
- data/app/controllers/clippings_controller.rb +18 -12
- data/app/controllers/comments_controller.rb +17 -8
- data/app/controllers/events_controller.rb +25 -21
- data/app/controllers/favorites_controller.rb +12 -12
- data/app/controllers/forums_controller.rb +20 -9
- data/app/controllers/friendships_controller.rb +41 -48
- data/app/controllers/homepage_features_controller.rb +11 -5
- data/app/controllers/invitations_controller.rb +15 -9
- data/app/controllers/messages_controller.rb +25 -19
- data/app/controllers/metro_areas_controller.rb +9 -3
- data/app/controllers/moderators_controller.rb +1 -1
- data/app/controllers/monitorships_controller.rb +2 -2
- data/app/controllers/pages_controller.rb +16 -4
- data/app/controllers/password_resets_controller.rb +0 -1
- data/app/controllers/photos_controller.rb +32 -30
- data/app/controllers/posts_controller.rb +33 -17
- data/app/controllers/rsvps_controller.rb +8 -4
- data/app/controllers/sb_posts_controller.rb +22 -18
- data/app/controllers/sessions_controller.rb +2 -1
- data/app/controllers/sitemap_controller.rb +8 -8
- data/app/controllers/statistics_controller.rb +9 -8
- data/app/controllers/tags_controller.rb +26 -24
- data/app/controllers/topics_controller.rb +10 -6
- data/app/controllers/users_controller.rb +63 -34
- data/app/helpers/base_helper.rb +119 -29
- data/app/helpers/friendships_helper.rb +3 -3
- data/app/helpers/posts_helper.rb +5 -7
- data/app/models/acts_as_taggable_on/tag.rb +12 -13
- data/app/models/ad.rb +2 -5
- data/app/models/album.rb +0 -2
- data/app/models/category.rb +6 -7
- data/app/models/clipping.rb +2 -5
- data/app/models/clipping_image.rb +5 -5
- data/app/models/comment.rb +4 -5
- data/app/models/country.rb +2 -4
- data/app/models/event.rb +1 -2
- data/app/models/favorite.rb +5 -10
- data/app/models/forum.rb +0 -2
- data/app/models/friendship.rb +3 -5
- data/app/models/friendship_status.rb +0 -2
- data/app/models/homepage_feature.rb +4 -6
- data/app/models/invitation.rb +6 -8
- data/app/models/message.rb +25 -26
- data/app/models/message_thread.rb +1 -1
- data/app/models/metro_area.rb +0 -2
- data/app/models/page.rb +0 -2
- data/app/models/photo.rb +8 -8
- data/app/models/poll.rb +7 -9
- data/app/models/post.rb +11 -15
- data/app/models/role.rb +1 -2
- data/app/models/rsvp.rb +0 -3
- data/app/models/sb_post.rb +14 -9
- data/app/models/state.rb +0 -2
- data/app/models/topic.rb +5 -6
- data/app/models/user.rb +50 -63
- data/app/models/vote.rb +1 -1
- data/app/views/activities/_activity.html.haml +9 -9
- data/app/views/activities/destroy.js.erb +1 -0
- data/app/views/activities/index.html.haml +13 -13
- data/app/views/activities/network.html.haml +10 -13
- data/app/views/admin/comments.html.haml +48 -70
- data/app/views/admin/events.html.haml +20 -27
- data/app/views/admin/messages.html.haml +2 -3
- data/app/views/admin/update.js.erb +1 -0
- data/app/views/admin/users.html.haml +51 -66
- data/app/views/ads/_form.html.haml +21 -0
- data/app/views/ads/edit.html.haml +6 -46
- data/app/views/ads/index.html.haml +25 -39
- data/app/views/ads/new.html.haml +4 -43
- data/app/views/ads/show.html.haml +18 -35
- data/app/views/albums/_form.html.haml +17 -12
- data/app/views/albums/edit.html.haml +12 -14
- data/app/views/albums/new.html.haml +8 -13
- data/app/views/albums/show.html.haml +25 -32
- data/app/views/base/_homepage_banner_message.html.haml +5 -19
- data/app/views/base/advertise.html.haml +5 -8
- data/app/views/base/site_index.html.haml +25 -27
- data/app/views/categories/_form.html.haml +8 -0
- data/app/views/categories/_menu_item.html.haml +13 -0
- data/app/views/categories/_tips.html.haml +2 -2
- data/app/views/categories/edit.html.haml +3 -33
- data/app/views/categories/index.html.haml +18 -28
- data/app/views/categories/new.html.haml +3 -8
- data/app/views/categories/show.html.haml +33 -36
- data/app/views/clippings/_clipping.html.haml +10 -17
- data/app/views/clippings/_favorite.html.haml +14 -0
- data/app/views/clippings/_form.html.haml +15 -0
- data/app/views/clippings/_images.html.haml +1 -1
- data/app/views/clippings/_menu_item.html.haml +6 -0
- data/app/views/clippings/edit.html.haml +12 -23
- data/app/views/clippings/index.html.haml +29 -30
- data/app/views/clippings/load_images_from_uri.js.erb +1 -0
- data/app/views/clippings/new.html.haml +9 -26
- data/app/views/clippings/new_clipping.html.haml +30 -77
- data/app/views/clippings/show.html.haml +48 -53
- data/app/views/clippings/site_index.html.haml +19 -32
- data/app/views/comments/_comment.html.haml +40 -40
- data/app/views/comments/_comment_form.html.haml +22 -46
- data/app/views/comments/_edit_form.html.haml +13 -28
- data/app/views/comments/create.js.erb +25 -0
- data/app/views/comments/destroy.js.erb +3 -0
- data/app/views/comments/edit.js.erb +11 -0
- data/app/views/comments/index.html.haml +12 -22
- data/app/views/comments/update.js.erb +14 -0
- data/app/views/events/_event.html.haml +26 -24
- data/app/views/events/_form.html.haml +18 -0
- data/app/views/events/_menu_item.html.haml +6 -0
- data/app/views/events/_subscribe.html.haml +1 -1
- data/app/views/events/edit.html.haml +7 -32
- data/app/views/events/index.html.haml +11 -19
- data/app/views/events/new.html.haml +2 -31
- data/app/views/events/show.html.haml +54 -24
- data/app/views/favorites/create.js.erb +10 -0
- data/app/views/favorites/destroy.js.erb +6 -0
- data/app/views/favorites/index.html.haml +6 -8
- data/app/views/forums/_form.html.haml +10 -20
- data/app/views/forums/_menu_item.html.haml +6 -0
- data/app/views/forums/edit.html.haml +8 -10
- data/app/views/forums/index.html.haml +56 -64
- data/app/views/forums/new.html.haml +5 -8
- data/app/views/forums/show.html.haml +65 -72
- data/app/views/friendships/_friendship.html.haml +14 -16
- data/app/views/friendships/accepted.html.haml +7 -11
- data/app/views/friendships/create.js.haml +1 -0
- data/app/views/friendships/denied.html.haml +4 -8
- data/app/views/friendships/pending.html.haml +4 -6
- data/app/views/friendships/show.html.haml +10 -11
- data/app/views/homepage_features/_form.html.haml +6 -0
- data/app/views/homepage_features/edit.html.haml +5 -30
- data/app/views/homepage_features/index.html.haml +22 -28
- data/app/views/homepage_features/new.html.haml +2 -30
- data/app/views/homepage_features/show.html.haml +27 -29
- data/app/views/invitations/index.html.haml +8 -0
- data/app/views/invitations/new.html.haml +21 -30
- data/app/views/kaminari/bootstrap/_first_page.html.erb +13 -0
- data/app/views/kaminari/bootstrap/_gap.html.erb +8 -0
- data/app/views/kaminari/bootstrap/_last_page.html.erb +13 -0
- data/app/views/kaminari/bootstrap/_next_page.html.erb +13 -0
- data/app/views/kaminari/bootstrap/_page.html.erb +12 -0
- data/app/views/kaminari/bootstrap/_paginator.html.erb +25 -0
- data/app/views/kaminari/bootstrap/_prev_page.html.erb +13 -0
- data/app/views/layouts/application.html.haml +26 -37
- data/app/views/messages/_form.html.haml +6 -12
- data/app/views/messages/_inbox.html.haml +34 -39
- data/app/views/messages/_menu_item.html.haml +11 -0
- data/app/views/messages/_sent.html.haml +22 -33
- data/app/views/messages/_sidebar_nav.html.haml +12 -9
- data/app/views/messages/index.html.haml +2 -2
- data/app/views/messages/new.html.haml +2 -9
- data/app/views/messages/show.html.haml +28 -36
- data/app/views/metro_areas/_form.html.haml +6 -0
- data/app/views/metro_areas/edit.html.haml +6 -14
- data/app/views/metro_areas/index.html.haml +19 -26
- data/app/views/metro_areas/new.html.haml +4 -14
- data/app/views/metro_areas/show.html.haml +13 -21
- data/app/views/moderators/_toggle.html.haml +6 -0
- data/app/views/moderators/create.js.erb +5 -0
- data/app/views/moderators/destroy.js.erb +1 -0
- data/app/views/monitorships/create.js.erb +1 -0
- data/app/views/monitorships/destroy.js.erb +1 -0
- data/app/views/pages/_form.html.haml +16 -23
- data/app/views/pages/edit.html.haml +2 -14
- data/app/views/pages/index.html.haml +32 -32
- data/app/views/pages/new.html.haml +5 -12
- data/app/views/pages/show.html.haml +4 -8
- data/app/views/password_resets/edit.html.haml +6 -14
- data/app/views/password_resets/new.html.haml +7 -11
- data/app/views/photo_manager/index.html.haml +45 -43
- data/app/views/photos/_form.html.haml +24 -0
- data/app/views/photos/_manage_photos.html.haml +14 -6
- data/app/views/photos/_show_image_list.html.haml +2 -2
- data/app/views/photos/create.js.erb +1 -0
- data/app/views/photos/edit.html.haml +10 -38
- data/app/views/photos/index.html.haml +20 -20
- data/app/views/photos/manage_photos.js.erb +5 -0
- data/app/views/photos/new.html.haml +11 -49
- data/app/views/photos/recent.html.haml +6 -6
- data/app/views/photos/show.html.haml +48 -52
- data/app/views/polls/_edit.html.haml +6 -10
- data/app/views/polls/_excerpt.html.haml +3 -4
- data/app/views/polls/_new.html.haml +10 -9
- data/app/views/polls/_poll_ui.html.haml +30 -34
- data/app/views/posts/_author_profile.html.haml +12 -11
- data/app/views/posts/_favorited_post.html.haml +8 -10
- data/app/views/posts/_form.html.haml +40 -0
- data/app/views/posts/_menu_item.html.haml +6 -0
- data/app/views/posts/_post.html.haml +27 -24
- data/app/views/posts/_send_to_friend.html.haml +26 -0
- data/app/views/posts/edit.html.haml +11 -48
- data/app/views/posts/featured.html.haml +7 -12
- data/app/views/posts/index.html.haml +14 -18
- data/app/views/posts/manage.html.haml +44 -59
- data/app/views/posts/new.html.haml +9 -64
- data/app/views/posts/popular.html.haml +25 -30
- data/app/views/posts/preview.html.haml +27 -26
- data/app/views/posts/recent.html.haml +20 -27
- data/app/views/posts/send_to_friend.js.erb +3 -0
- data/app/views/posts/show.html.haml +67 -76
- data/app/views/rsvps/_form.html.haml +3 -0
- data/app/views/rsvps/edit.html.haml +3 -9
- data/app/views/rsvps/new.html.haml +3 -9
- data/app/views/sb_posts/_dummy_forum_post.html.haml +13 -0
- data/app/views/sb_posts/_edit.html.haml +6 -0
- data/app/views/sb_posts/_edit_script.js.erb +14 -0
- data/app/views/sb_posts/_reply_form.html.haml +14 -35
- data/app/views/sb_posts/_reply_script.js.erb +13 -0
- data/app/views/sb_posts/_sb_post.html.haml +31 -33
- data/app/views/sb_posts/create.js.erb +30 -0
- data/app/views/sb_posts/destroy.js.erb +2 -0
- data/app/views/sb_posts/edit.html.erb +4 -4
- data/app/views/sb_posts/edit.js.erb +14 -0
- data/app/views/sb_posts/index.html.haml +3 -16
- data/app/views/sb_posts/monitored.html.erb +3 -9
- data/app/views/sb_posts/update.js.erb +11 -0
- data/app/views/sessions/_menu_item.html.haml +28 -0
- data/app/views/sessions/new.html.haml +19 -24
- data/app/views/shared/_add_friend_link.html.haml +9 -0
- data/app/views/shared/_admin_nav.html.haml +6 -8
- data/app/views/shared/_contact.html.haml +1 -1
- data/app/views/shared/_end_javascript.html.haml +4 -4
- data/app/views/shared/_explore.html.haml +7 -6
- data/app/views/shared/_footer_content.html.haml +12 -10
- data/app/views/shared/_footer_links.html.haml +18 -0
- data/app/views/shared/_friend_link.html.haml +25 -0
- data/app/views/shared/_header.html.haml +22 -42
- data/app/views/shared/_jumbotron.html.haml +3 -0
- data/app/views/shared/_load_tinymce.js.erb +15 -0
- data/app/views/shared/_location_chooser.html.haml +26 -17
- data/app/views/shared/_login_sidebar.html.haml +6 -5
- data/app/views/shared/_messages.html.haml +6 -8
- data/app/views/shared/_scripts_and_styles.html.haml +1 -2
- data/app/views/shared/_sidebar.html.haml +1 -0
- data/app/views/shared/_tag_auto_complete.html.haml +19 -0
- data/app/views/shared/_widget.html.haml +3 -0
- data/app/views/sitemap/index.html.haml +15 -20
- data/app/views/statistics/index.html.haml +32 -40
- data/app/views/tags/edit.html.haml +12 -19
- data/app/views/tags/index.html.haml +16 -25
- data/app/views/tags/manage.html.haml +24 -33
- data/app/views/tags/show.html.haml +52 -58
- data/app/views/topics/_form.html.haml +23 -25
- data/app/views/topics/_recent_topics_sidebar.haml +1 -1
- data/app/views/topics/edit.html.haml +7 -9
- data/app/views/topics/new.html.haml +6 -21
- data/app/views/topics/show.html.haml +48 -106
- data/app/views/user_notifier/follow_up_comment_notice.text.erb +1 -1
- data/app/views/user_notifier/message_notification.text.erb +1 -1
- data/app/views/user_notifier/new_forum_post_notice.text.erb +1 -1
- data/app/views/users/_dashboard_nav.html.haml +36 -39
- data/app/views/users/_menu_item.html.haml +6 -0
- data/app/views/users/_omniauth_connect.html.haml +4 -4
- data/app/views/users/_profile_completeness.html.haml +3 -3
- data/app/views/users/_profile_user_info_sidebar.html.haml +40 -43
- data/app/views/users/_search_options.html.haml +9 -7
- data/app/views/users/_sidebar_user.html.haml +1 -1
- data/app/views/users/_user.html.haml +27 -28
- data/app/views/users/crop_profile_photo.html.haml +30 -37
- data/app/views/users/dashboard.html.haml +37 -41
- data/app/views/users/edit.html.haml +53 -71
- data/app/views/users/edit_account.html.haml +44 -64
- data/app/views/users/forgot_username.html.haml +6 -12
- data/app/views/users/index.html.haml +4 -14
- data/app/views/users/invite.html.haml +14 -25
- data/app/views/users/new.html.haml +27 -48
- data/app/views/users/resend_activation.html.haml +7 -12
- data/app/views/users/show.html.haml +88 -90
- data/app/views/users/signup_completed.html.haml +7 -7
- data/app/views/users/statistics.html.haml +17 -18
- data/app/views/users/update.js.erb +1 -0
- data/app/views/users/upload_profile_photo.html.haml +10 -15
- data/app/views/users/welcome_about.html.haml +54 -61
- data/app/views/users/welcome_invite.html.haml +16 -25
- data/app/views/users/welcome_photo.html.haml +18 -27
- data/app/views/votes/create.js.erb +5 -0
- data/community_engine.gemspec +49 -41
- data/config/application_config.rb +13 -16
- data/config/initializers/mce_options.rb +9 -32
- data/config/initializers/recaptcha_constants.rb +2 -2
- data/config/locales/de-DE.yml +1 -17
- data/config/locales/en.yml +18 -32
- data/config/locales/es-AR.yml +2 -14
- data/config/locales/es-ES.yml +0 -6
- data/config/locales/es-MX.yml +1 -9
- data/config/locales/fr-FR.yml +3 -17
- data/config/locales/ja-JP.yml +2 -18
- data/config/locales/ru-RU.yml +3 -21
- data/config/locales/sr-CP.yml +0 -4
- data/config/locales/sv-SE.yml +3 -20
- data/config/routes.rb +37 -42
- data/db/migrate/016_add_metro_areas.rb +2 -2
- data/db/migrate/039_create_activities_table.rb +2 -2
- data/db/migrate/056_create_roles.rb +8 -6
- data/db/migrate/069_create_pages.rb +3 -3
- data/db/migrate/081_upgrade_to_friendly_id_5x.rb +25 -0
- data/db/migrate/082_upgrade_to_acts_as_commentable_4x.rb +29 -0
- data/lib/activity_tracker.rb +3 -0
- data/{vendor/plugins/activity_tracker/lib → lib/activity_tracker}/activity.rb +6 -6
- data/{vendor/plugins/activity_tracker/lib → lib/activity_tracker}/activity_tracker.rb +0 -0
- data/{vendor/plugins/acts_as_publishable/init.rb → lib/acts_as_publishable.rb} +1 -1
- data/{vendor/plugins/acts_as_publishable/lib → lib/acts_as_publishable}/acts_as_publishable.rb +3 -3
- data/lib/community_engine.rb +31 -9
- data/lib/community_engine/engine.rb +17 -1
- data/lib/community_engine/engines_extensions.rb +1 -3
- data/lib/community_engine/version.rb +3 -3
- data/{config/initializers → lib/paperclip_processors}/cropper.rb +3 -3
- data/lib/resource_feeder.rb +3 -0
- data/{vendor/plugins/resource_feeder/lib → lib}/resource_feeder/atom.rb +0 -0
- data/{vendor/plugins/resource_feeder/lib → lib}/resource_feeder/rss.rb +0 -0
- data/{vendor/plugins/white_list/init.rb → lib/white_list.rb} +1 -1
- data/{vendor/plugins/white_list/lib → lib/white_list}/white_list_helper.rb +0 -0
- data/test/fixtures/messages.yml +2 -2
- data/test/functional/admin_controller_test.rb +11 -11
- data/test/functional/ads_controller_test.rb +11 -11
- data/test/functional/albums_controller_test.rb +4 -4
- data/test/functional/categories_controller_test.rb +4 -4
- data/test/functional/clippings_controller_test.rb +4 -4
- data/test/functional/comments_controller_test.rb +20 -16
- data/test/functional/events_controller_test.rb +6 -6
- data/test/functional/forums_controller_test.rb +8 -8
- data/test/functional/friendships_controller_test.rb +13 -18
- data/test/functional/homepage_features_controller_test.rb +5 -5
- data/test/functional/messages_controller_test.rb +6 -2
- data/test/functional/metro_areas_controller_test.rb +7 -7
- data/test/functional/moderators_controller_test.rb +1 -1
- data/test/functional/pages_controller_test.rb +2 -2
- data/test/functional/password_reset_controller_test.rb +2 -2
- data/test/functional/photos_controller_test.rb +16 -15
- data/test/functional/posts_controller_test.rb +4 -4
- data/test/functional/rsvps_controller_test.rb +6 -6
- data/test/functional/sb_posts_controller_test.rb +53 -50
- data/test/functional/sessions_controller_test.rb +4 -1
- data/test/functional/tags_controller_test.rb +1 -1
- data/test/functional/topics_controller_test.rb +10 -10
- data/test/functional/users_controller_test.rb +32 -19
- data/test/functional/votes_controller_test.rb +1 -1
- data/test/test_helper.rb +3 -1
- data/test/testapp/config/application.rb +1 -9
- data/test/testapp/config/environments/development.rb +1 -2
- data/test/testapp/config/environments/production.rb +2 -0
- data/test/testapp/config/environments/test.rb +1 -2
- data/test/testapp/config/initializers/omniauth.rb +3 -3
- data/test/testapp/config/initializers/secret_token.rb +1 -0
- data/test/testapp/db/schema.rb +143 -152
- data/test/unit/category_test.rb +2 -2
- data/test/unit/comment_test.rb +64 -53
- data/test/unit/event_test.rb +4 -4
- data/test/unit/forum_test.rb +1 -1
- data/test/unit/message_test.rb +7 -1
- data/test/unit/page_test.rb +2 -2
- data/test/unit/post_test.rb +47 -47
- data/test/unit/sb_post_test.rb +24 -20
- data/test/unit/topic_test.rb +7 -6
- data/test/unit/user_test.rb +75 -52
- data/vendor/assets/javascripts/.gitkeep +0 -0
- data/vendor/assets/javascripts/jcrop/jquery.Jcrop.js +1699 -0
- data/vendor/assets/javascripts/jcrop/jquery.color.js +661 -0
- data/vendor/assets/javascripts/tag-it/tag-it.js +597 -0
- data/vendor/assets/stylesheets/.gitkeep +0 -0
- data/vendor/assets/stylesheets/jcrop/Jcrop.gif +0 -0
- data/vendor/assets/stylesheets/jcrop/jquery.Jcrop.min.css +28 -0
- data/vendor/assets/stylesheets/tag-it/tag-it.css +69 -0
- data/vendor/assets/stylesheets/tag-it/tagit.ui-zendesk.css +107 -0
- data/vendor/{plugins → converted2.3plugins_to_lib_leftovers}/acts_as_publishable/README +0 -0
- data/vendor/{plugins → converted2.3plugins_to_lib_leftovers}/acts_as_publishable/Rakefile +0 -0
- data/vendor/{plugins → converted2.3plugins_to_lib_leftovers}/acts_as_publishable/generators/publishing/publishing_generator.rb +0 -0
- data/vendor/{plugins → converted2.3plugins_to_lib_leftovers}/acts_as_publishable/generators/publishing/templates/migration.rb +0 -0
- data/vendor/{plugins → converted2.3plugins_to_lib_leftovers}/acts_as_publishable/install.rb +0 -0
- data/vendor/{plugins → converted2.3plugins_to_lib_leftovers}/acts_as_publishable/test/acts_as_publishable_test.rb +0 -0
- data/vendor/{plugins/activity_tracker → converted2.3plugins_to_lib_leftovers/acts_as_publishable}/uninstall.rb +0 -0
- data/vendor/{plugins → converted2.3plugins_to_lib_leftovers}/resource_feeder/README +0 -0
- data/vendor/{plugins → converted2.3plugins_to_lib_leftovers}/resource_feeder/Rakefile +0 -0
- data/vendor/{plugins → converted2.3plugins_to_lib_leftovers}/resource_feeder/test/atom_feed_test.rb +0 -0
- data/vendor/{plugins → converted2.3plugins_to_lib_leftovers}/resource_feeder/test/rss_feed_test.rb +0 -0
- data/vendor/{plugins → converted2.3plugins_to_lib_leftovers}/resource_feeder/test/test_helper.rb +0 -0
- data/vendor/{plugins → converted2.3plugins_to_lib_leftovers}/white_list/README +0 -0
- data/vendor/{plugins → converted2.3plugins_to_lib_leftovers}/white_list/Rakefile +0 -0
- data/vendor/{plugins → converted2.3plugins_to_lib_leftovers}/white_list/test/white_list_test.rb +0 -0
- metadata +348 -302
- data/app/assets/images/bg_h6btn.gif +0 -0
- data/app/assets/images/bg_navbar.gif +0 -0
- data/app/assets/images/clearbits/bg_rounded.gif +0 -0
- data/app/assets/images/clearbits/comment.gif +0 -0
- data/app/assets/images/clearbits/lock.gif +0 -0
- data/app/assets/images/clearbits/smile.gif +0 -0
- data/app/assets/images/close.gif +0 -0
- data/app/assets/images/cropper/marqueeHoriz.gif +0 -0
- data/app/assets/images/cropper/marqueeVert.gif +0 -0
- data/app/assets/images/feed.png +0 -0
- data/app/assets/images/icons/31.png +0 -0
- data/app/assets/images/icons/52.png +0 -0
- data/app/assets/images/icons/accept.png +0 -0
- data/app/assets/images/icons/activity_default.png +0 -0
- data/app/assets/images/icons/add.png +0 -0
- data/app/assets/images/icons/book.png +0 -0
- data/app/assets/images/icons/bullet_arrow_down.png +0 -0
- data/app/assets/images/icons/bullet_arrow_down_50.png +0 -0
- data/app/assets/images/icons/clipping.png +0 -0
- data/app/assets/images/icons/comment.png +0 -0
- data/app/assets/images/icons/comments.png +0 -0
- data/app/assets/images/icons/date.png +0 -0
- data/app/assets/images/icons/delete.png +0 -0
- data/app/assets/images/icons/email.png +0 -0
- data/app/assets/images/icons/email_edit.png +0 -0
- data/app/assets/images/icons/email_go.png +0 -0
- data/app/assets/images/icons/email_open.png +0 -0
- data/app/assets/images/icons/group_go.png +0 -0
- data/app/assets/images/icons/heart.png +0 -0
- data/app/assets/images/icons/heart_add.png +0 -0
- data/app/assets/images/icons/heart_off.png +0 -0
- data/app/assets/images/icons/page_white.png +0 -0
- data/app/assets/images/icons/page_white_magnify.png +0 -0
- data/app/assets/images/icons/picture.png +0 -0
- data/app/assets/images/icons/poll.png +0 -0
- data/app/assets/images/icons/post.png +0 -0
- data/app/assets/images/icons/printer.png +0 -0
- data/app/assets/images/icons/rss.png +0 -0
- data/app/assets/images/icons/slides.png +0 -0
- data/app/assets/images/icons/tag_blue.png +0 -0
- data/app/assets/images/icons/user.png +0 -0
- data/app/assets/images/icons/user_add.png +0 -0
- data/app/assets/images/icons/user_edit.png +0 -0
- data/app/assets/images/icons/user_go.png +0 -0
- data/app/assets/images/icons/vote.png +0 -0
- data/app/assets/images/icons/world.png +0 -0
- data/app/assets/images/icons/wrench.png +0 -0
- data/app/assets/images/logo.gif +0 -0
- data/app/assets/images/reply_background.png +0 -0
- data/app/assets/images/search.gif +0 -0
- data/app/assets/images/thumb.gif +0 -0
- data/app/assets/javascripts/builder.js +0 -136
- data/app/assets/javascripts/calendarview.js +0 -839
- data/app/assets/javascripts/lightbox.js +0 -151
- data/app/assets/javascripts/prototip-min.js +0 -27
- data/app/assets/javascripts/rails.js +0 -202
- data/app/assets/javascripts/tinymce/plugins/curblyadvimage/css/advimage.css +0 -84
- data/app/assets/javascripts/tinymce/plugins/curblyadvimage/editor_plugin.js +0 -52
- data/app/assets/javascripts/tinymce/plugins/curblyadvimage/editor_plugin_src.js +0 -45
- data/app/assets/javascripts/tinymce/plugins/curblyadvimage/image.htm +0 -180
- data/app/assets/javascripts/tinymce/plugins/curblyadvimage/img/sample.gif +0 -0
- data/app/assets/javascripts/tinymce/plugins/curblyadvimage/js/functions.js +0 -508
- data/app/assets/javascripts/tinymce/plugins/curblyadvimage/langs/en.js +0 -3
- data/app/assets/javascripts/tinymce/plugins/curblyadvimage/langs/en_dlg.js +0 -43
- data/app/assets/javascripts/tinymce/plugins/tinyautosave/editor_plugin.js +0 -8
- data/app/assets/javascripts/tinymce/plugins/tinyautosave/editor_plugin_src.js +0 -1001
- data/app/assets/javascripts/tinymce/plugins/tinyautosave/images/progress.gif +0 -0
- data/app/assets/javascripts/tinymce/plugins/tinyautosave/images/progress10.gif +0 -0
- data/app/assets/javascripts/tinymce/plugins/tinyautosave/images/progress11.gif +0 -0
- data/app/assets/javascripts/tinymce/plugins/tinyautosave/images/progress12.gif +0 -0
- data/app/assets/javascripts/tinymce/plugins/tinyautosave/images/progress2.gif +0 -0
- data/app/assets/javascripts/tinymce/plugins/tinyautosave/images/progress3.gif +0 -0
- data/app/assets/javascripts/tinymce/plugins/tinyautosave/images/progress4.gif +0 -0
- data/app/assets/javascripts/tinymce/plugins/tinyautosave/images/progress5.gif +0 -0
- data/app/assets/javascripts/tinymce/plugins/tinyautosave/images/progress6.gif +0 -0
- data/app/assets/javascripts/tinymce/plugins/tinyautosave/images/progress7.gif +0 -0
- data/app/assets/javascripts/tinymce/plugins/tinyautosave/images/progress8.gif +0 -0
- data/app/assets/javascripts/tinymce/plugins/tinyautosave/images/progress9.gif +0 -0
- data/app/assets/javascripts/tinymce/plugins/tinyautosave/images/restore.gif +0 -0
- data/app/assets/javascripts/tinymce/plugins/tinyautosave/images/restore.png +0 -0
- data/app/assets/javascripts/tinymce/plugins/tinyautosave/langs/da.js +0 -5
- data/app/assets/javascripts/tinymce/plugins/tinyautosave/langs/en.js +0 -5
- data/app/assets/stylesheets/community_engine.css +0 -6
- data/app/assets/stylesheets/forum.css +0 -605
- data/app/assets/stylesheets/prototip.css +0 -73
- data/app/assets/stylesheets/reset-fonts-grids.css +0 -8
- data/app/assets/stylesheets/screen.css +0 -977
- data/app/helpers/monitorships_helper.rb +0 -2
- data/app/views/activities/_icon.html.haml +0 -14
- data/app/views/activities/destroy.js.rjs +0 -1
- data/app/views/clippings/_meta.html.haml +0 -26
- data/app/views/clippings/load_images_from_uri.js.rjs +0 -1
- data/app/views/comments/create.js.rjs +0 -20
- data/app/views/comments/edit.js.rjs +0 -7
- data/app/views/comments/update.js.rjs +0 -9
- data/app/views/favorites/create.js.rjs +0 -17
- data/app/views/favorites/destroy.js.rjs +0 -14
- data/app/views/favorites/show.html.haml +0 -13
- data/app/views/friendships/_friendships.html.erb +0 -14
- data/app/views/friendships/index.html.erb +0 -3
- data/app/views/friendships/index.xml.builder +0 -29
- data/app/views/invitations/index.html.erb +0 -16
- data/app/views/moderators/_toggle.html.erb +0 -14
- data/app/views/moderators/create.js.rjs +0 -5
- data/app/views/moderators/destroy.js.rjs +0 -1
- data/app/views/monitorships/create.js.rjs +0 -4
- data/app/views/monitorships/destroy.js.rjs +0 -4
- data/app/views/photos/manage_photos.js.rjs +0 -5
- data/app/views/polls/_polls_sidebar.html.haml +0 -8
- data/app/views/posts/_send_to_friend.html.erb +0 -29
- data/app/views/sb_posts/_dummy_forum_post.html.erb +0 -13
- data/app/views/sb_posts/_edit.html.erb +0 -31
- data/app/views/sb_posts/create.js.rjs +0 -16
- data/app/views/sb_posts/edit.js.rjs +0 -6
- data/app/views/sb_posts/update.js.rjs +0 -5
- data/app/views/shared/_user_menu.html.haml +0 -21
- data/app/views/votes/create.js.rjs +0 -6
- data/db/migrate/090_add_comment_role.rb +0 -15
- data/vendor/plugins/activity_tracker/README +0 -4
- data/vendor/plugins/activity_tracker/Rakefile +0 -22
- data/vendor/plugins/activity_tracker/generators/activity_migration/USAGE +0 -13
- data/vendor/plugins/activity_tracker/generators/activity_migration/activity_migration_generator.rb +0 -11
- data/vendor/plugins/activity_tracker/generators/activity_migration/templates/migration.rb +0 -17
- data/vendor/plugins/activity_tracker/init.rb +0 -1
- data/vendor/plugins/activity_tracker/install.rb +0 -1
- data/vendor/plugins/activity_tracker/tasks/activity_tracker_tasks.rake +0 -4
- data/vendor/plugins/activity_tracker/test/abstract_unit.rb +0 -47
- data/vendor/plugins/activity_tracker/test/activity_tracker_test.rb +0 -48
- data/vendor/plugins/activity_tracker/test/database.yml +0 -18
- data/vendor/plugins/activity_tracker/test/debug.log +0 -3329
- data/vendor/plugins/activity_tracker/test/fixtures/test_post.rb +0 -5
- data/vendor/plugins/activity_tracker/test/fixtures/test_posts.yml +0 -3
- data/vendor/plugins/activity_tracker/test/fixtures/test_user.rb +0 -4
- data/vendor/plugins/activity_tracker/test/fixtures/test_users.yml +0 -6
- data/vendor/plugins/activity_tracker/test/schema.rb +0 -21
- data/vendor/plugins/acts_as_list/README +0 -23
- data/vendor/plugins/acts_as_list/init.rb +0 -3
- data/vendor/plugins/acts_as_list/lib/active_record/acts/list.rb +0 -256
- data/vendor/plugins/acts_as_list/test/list_test.rb +0 -332
- data/vendor/plugins/acts_as_publishable/uninstall.rb +0 -1
- data/vendor/plugins/auto_complete/README +0 -23
- data/vendor/plugins/auto_complete/Rakefile +0 -22
- data/vendor/plugins/auto_complete/init.rb +0 -2
- data/vendor/plugins/auto_complete/lib/auto_complete.rb +0 -47
- data/vendor/plugins/auto_complete/lib/auto_complete_macros_helper.rb +0 -143
- data/vendor/plugins/auto_complete/test/auto_complete_test.rb +0 -67
- data/vendor/plugins/enumerations_mixin/.gitignore +0 -1
- data/vendor/plugins/enumerations_mixin/Gemfile +0 -1
- data/vendor/plugins/enumerations_mixin/LICENSE +0 -20
- data/vendor/plugins/enumerations_mixin/README.md +0 -120
- data/vendor/plugins/enumerations_mixin/README_ENUMERATIONS +0 -163
- data/vendor/plugins/enumerations_mixin/Rakefile +0 -14
- data/vendor/plugins/enumerations_mixin/VERSION +0 -1
- data/vendor/plugins/enumerations_mixin/enumerations_mixin.gemspec +0 -44
- data/vendor/plugins/enumerations_mixin/examples/virtual_enumerations_sample.rb +0 -76
- data/vendor/plugins/enumerations_mixin/init.rb +0 -21
- data/vendor/plugins/enumerations_mixin/lib/active_record/acts/enumerated.rb +0 -180
- data/vendor/plugins/enumerations_mixin/lib/active_record/aggregations/has_enumerated.rb +0 -60
- data/vendor/plugins/enumerations_mixin/lib/active_record/virtual_enumerations.rb +0 -68
- data/vendor/plugins/enumerations_mixin/lib/enumerations_mixin.rb +0 -12
- data/vendor/plugins/enumerations_mixin/virtual_enumerations_sample.rb +0 -76
- data/vendor/plugins/prototype_legacy_helper/README.markdown +0 -13
- data/vendor/plugins/prototype_legacy_helper/init.rb +0 -1
- data/vendor/plugins/prototype_legacy_helper/lib/prototype_legacy_helper.rb +0 -432
- data/vendor/plugins/prototype_legacy_helper/test/test_prototype_helper.rb +0 -297
- data/vendor/plugins/resource_feeder/init.rb +0 -2
- data/vendor/plugins/resource_feeder/lib/resource_feeder.rb +0 -2
- data/vendor/plugins/respond_to_parent/MIT-LICENSE +0 -20
- data/vendor/plugins/respond_to_parent/README +0 -47
- data/vendor/plugins/respond_to_parent/Rakefile +0 -22
- data/vendor/plugins/respond_to_parent/init.rb +0 -1
- data/vendor/plugins/respond_to_parent/install.rb +0 -1
- data/vendor/plugins/respond_to_parent/lib/responds_to_parent.rb +0 -70
- data/vendor/plugins/respond_to_parent/test/responds_to_parent_test.rb +0 -10
- data/vendor/plugins/respond_to_parent/test/test_helper.rb +0 -6
- data/vendor/plugins/respond_to_parent/uninstall.rb +0 -1
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* $Id: editor_plugin_src.js 520 2008-01-07 16:30:32Z spocke $
|
|
3
|
-
*
|
|
4
|
-
* @author Moxiecode
|
|
5
|
-
* @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
(function() {
|
|
9
|
-
// Load plugin specific language pack
|
|
10
|
-
tinymce.PluginManager.requireLangPack('curblyadvimage');
|
|
11
|
-
|
|
12
|
-
tinymce.create('tinymce.plugins.CurblyAdvancedImagePlugin', {
|
|
13
|
-
init : function(ed, url) {
|
|
14
|
-
// Register commands
|
|
15
|
-
ed.addCommand('mceCurblyAdvImage', function() {
|
|
16
|
-
var e = ed.selection.getNode();
|
|
17
|
-
|
|
18
|
-
// Internal image object like a flash placeholder
|
|
19
|
-
if (ed.dom.getAttrib(e, 'class').indexOf('mceItem') != -1)
|
|
20
|
-
return;
|
|
21
|
-
|
|
22
|
-
ed.windowManager.open({
|
|
23
|
-
file : url + '/image.htm',
|
|
24
|
-
width : 480 + parseInt(ed.getLang('curblyadvimage.delta_width', 0)),
|
|
25
|
-
height : 385 + parseInt(ed.getLang('curblyadvimage.delta_height', 0)),
|
|
26
|
-
inline : 1
|
|
27
|
-
}, {
|
|
28
|
-
plugin_url : url
|
|
29
|
-
});
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
// Register buttons
|
|
33
|
-
ed.addButton('image', {
|
|
34
|
-
title : 'curblyadvimage.image_desc',
|
|
35
|
-
cmd : 'mceCurblyAdvImage'
|
|
36
|
-
});
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
getInfo : function() {
|
|
40
|
-
return {
|
|
41
|
-
longname : 'Curbly Advanced image',
|
|
42
|
-
author : 'Moxiecode Systems AB',
|
|
43
|
-
authorurl : 'http://tinymce.moxiecode.com',
|
|
44
|
-
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage',
|
|
45
|
-
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
// Register plugin
|
|
51
|
-
tinymce.PluginManager.add('curblyadvimage', tinymce.plugins.CurblyAdvancedImagePlugin);
|
|
52
|
-
})();
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
(function() {
|
|
2
|
-
// Load plugin specific language pack
|
|
3
|
-
tinymce.PluginManager.requireLangPack('curblyadvimage');
|
|
4
|
-
|
|
5
|
-
tinymce.create('tinymce.plugins.CurblyAdvancedImagePlugin', {
|
|
6
|
-
init : function(ed, url) {
|
|
7
|
-
// Register commands
|
|
8
|
-
ed.addCommand('mceCurblyAdvImage', function() {
|
|
9
|
-
var e = ed.selection.getNode();
|
|
10
|
-
|
|
11
|
-
// Internal image object like a flash placeholder
|
|
12
|
-
if (ed.dom.getAttrib(e, 'class').indexOf('mceItem') != -1)
|
|
13
|
-
return;
|
|
14
|
-
|
|
15
|
-
ed.windowManager.open({
|
|
16
|
-
file : url + '/image.htm',
|
|
17
|
-
width : 480 + parseInt(ed.getLang('curblyadvimage.delta_width', 0)),
|
|
18
|
-
height : 385 + parseInt(ed.getLang('curblyadvimage.delta_height', 0)),
|
|
19
|
-
inline : 1
|
|
20
|
-
}, {
|
|
21
|
-
plugin_url : url
|
|
22
|
-
});
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
// Register buttons
|
|
26
|
-
ed.addButton('image', {
|
|
27
|
-
title : 'curblyadvimage.image_desc',
|
|
28
|
-
cmd : 'mceCurblyAdvImage'
|
|
29
|
-
});
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
getInfo : function() {
|
|
33
|
-
return {
|
|
34
|
-
longname : 'Curbly Advanced image',
|
|
35
|
-
author : 'Moxiecode Systems AB',
|
|
36
|
-
authorurl : 'http://tinymce.moxiecode.com',
|
|
37
|
-
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage',
|
|
38
|
-
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
// Register plugin
|
|
44
|
-
tinymce.PluginManager.add('curblyadvimage', tinymce.plugins.CurblyAdvancedImagePlugin);
|
|
45
|
-
})();
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
2
|
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
3
|
-
<head>
|
|
4
|
-
<title>{#advimage_dlg.dialog_title}</title>
|
|
5
|
-
<script language="javascript" type="text/javascript" src="../../../prototype.js"></script>
|
|
6
|
-
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
|
7
|
-
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
|
8
|
-
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
|
9
|
-
<script type="text/javascript" src="../../utils/validate.js"></script>
|
|
10
|
-
<script type="text/javascript" src="js/functions.js"></script>
|
|
11
|
-
<link href="css/advimage.css" rel="stylesheet" type="text/css" />
|
|
12
|
-
<base target="_self" />
|
|
13
|
-
</head>
|
|
14
|
-
<body id="advimage" style="display: none">
|
|
15
|
-
|
|
16
|
-
<div id="image-upload">
|
|
17
|
-
<fieldset>
|
|
18
|
-
<legend>Upload New Image</legend>
|
|
19
|
-
<form id='image_upload_form' enctype="multipart/form-data" method="post" onsubmit="ts_onload(); return true;" target="html_editor_image_upload_frame">
|
|
20
|
-
<input class="input-file" id="image_uploaded_data" name="photo[photo]" size="30" type="file"/>
|
|
21
|
-
<input class="submit" name="commit" type="submit" value="Upload"/>
|
|
22
|
-
</form>
|
|
23
|
-
</fieldset>
|
|
24
|
-
</div>
|
|
25
|
-
|
|
26
|
-
<br />
|
|
27
|
-
|
|
28
|
-
<form onsubmit="ImageDialog.insert();return false;" action="#">
|
|
29
|
-
<div class="tabs">
|
|
30
|
-
<ul>
|
|
31
|
-
|
|
32
|
-
<li id="dynamic_select_tab" class="current"><span><a href="javascript:mcTabs.displayTab('dynamic_select_tab','dynamic_select_panel');" onmousedown="return false;">Uploaded Images</a></span></li>
|
|
33
|
-
<li id="general_tab"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advimage_dlg.tab_general}</a></span></li>
|
|
34
|
-
<li id="appearance_tab"><span><a href="javascript:mcTabs.displayTab('appearance_tab','appearance_panel');" onmousedown="return false;">{#advimage_dlg.tab_appearance}</a></span></li>
|
|
35
|
-
<!-- <li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#advimage_dlg.tab_advanced}</a></span></li> -->
|
|
36
|
-
</ul>
|
|
37
|
-
</div>
|
|
38
|
-
|
|
39
|
-
<div class="panel_wrapper">
|
|
40
|
-
|
|
41
|
-
<div id="dynamic_select_panel" class="panel current" style='overflow:auto'>
|
|
42
|
-
<fieldset>
|
|
43
|
-
<legend>Available Images</legend>
|
|
44
|
-
<script type="text/javascript">//<![CDATA[
|
|
45
|
-
new Ajax.Request("/manage_photos",
|
|
46
|
-
{asynchronous:true, evalScripts:true, method:'get'});
|
|
47
|
-
//]]></script>
|
|
48
|
-
|
|
49
|
-
<div id='dynamic_images_list'>
|
|
50
|
-
Loading Images...<br />
|
|
51
|
-
<img src='/assets/spinner.gif'>
|
|
52
|
-
</div>
|
|
53
|
-
</fieldset>
|
|
54
|
-
</div>
|
|
55
|
-
<div id="general_panel" class="panel">
|
|
56
|
-
<fieldset>
|
|
57
|
-
<legend>{#advimage_dlg.general}</legend>
|
|
58
|
-
|
|
59
|
-
<table class="properties">
|
|
60
|
-
<tr>
|
|
61
|
-
<td class="column1"><label id="srclabel" for="src">{#advimage_dlg.src}</label></td>
|
|
62
|
-
<td colspan="2"><table border="0" cellspacing="0" cellpadding="0">
|
|
63
|
-
<tr>
|
|
64
|
-
<td><input name="src" type="text" id="src" value="" onchange="ImageDialog.showPreviewImage(this.value);" /></td>
|
|
65
|
-
<td id="srcbrowsercontainer"> </td>
|
|
66
|
-
</tr>
|
|
67
|
-
</table></td>
|
|
68
|
-
</tr>
|
|
69
|
-
<tr>
|
|
70
|
-
<td><label for="src_list">{#advimage_dlg.image_list}</label></td>
|
|
71
|
-
<td><select id="src_list" name="src_list" onchange="document.getElementById('src').value=this.options[this.selectedIndex].value;document.getElementById('alt').value=this.options[this.selectedIndex].text;document.getElementById('title').value=this.options[this.selectedIndex].text;ImageDialog.showPreviewImage(this.options[this.selectedIndex].value);"></select></td>
|
|
72
|
-
</tr>
|
|
73
|
-
<tr>
|
|
74
|
-
<td class="column1"><label id="altlabel" for="alt">{#advimage_dlg.alt}</label></td>
|
|
75
|
-
<td colspan="2"><input id="alt" name="alt" type="text" value="" /></td>
|
|
76
|
-
</tr>
|
|
77
|
-
<tr>
|
|
78
|
-
<td class="column1"><label id="titlelabel" for="title">{#advimage_dlg.title}</label></td>
|
|
79
|
-
<td colspan="2"><input id="title" name="title" type="text" value="" /></td>
|
|
80
|
-
</tr>
|
|
81
|
-
</table>
|
|
82
|
-
</fieldset>
|
|
83
|
-
|
|
84
|
-
<fieldset>
|
|
85
|
-
<legend>{#advimage_dlg.preview}</legend>
|
|
86
|
-
<div id="prev"></div>
|
|
87
|
-
</fieldset>
|
|
88
|
-
</div>
|
|
89
|
-
|
|
90
|
-
<div id="appearance_panel" class="panel">
|
|
91
|
-
<fieldset>
|
|
92
|
-
<legend>{#advimage_dlg.tab_appearance}</legend>
|
|
93
|
-
|
|
94
|
-
<table border="0" cellpadding="4" cellspacing="0">
|
|
95
|
-
<tr>
|
|
96
|
-
<td class="column1"><label id="alignlabel" for="align">{#advimage_dlg.align}</label></td>
|
|
97
|
-
<td><select id="align" name="align" onchange="ImageDialog.updateStyle('align');ImageDialog.changeAppearance();">
|
|
98
|
-
<option value="">{#not_set}</option>
|
|
99
|
-
<option value="baseline">{#advimage_dlg.align_baseline}</option>
|
|
100
|
-
<option value="top">{#advimage_dlg.align_top}</option>
|
|
101
|
-
<option value="middle">{#advimage_dlg.align_middle}</option>
|
|
102
|
-
<option value="bottom">{#advimage_dlg.align_bottom}</option>
|
|
103
|
-
<option value="text-top">{#advimage_dlg.align_texttop}</option>
|
|
104
|
-
<option value="text-bottom">{#advimage_dlg.align_textbottom}</option>
|
|
105
|
-
<option value="left">{#advimage_dlg.align_left}</option>
|
|
106
|
-
<option value="right">{#advimage_dlg.align_right}</option>
|
|
107
|
-
</select>
|
|
108
|
-
</td>
|
|
109
|
-
<td rowspan="6" valign="top">
|
|
110
|
-
<div class="alignPreview">
|
|
111
|
-
<img id="alignSampleImg" src="img/sample.gif" alt="{#advimage_dlg.example_img}" />
|
|
112
|
-
Lorem ipsum, Dolor sit amet, consectetuer adipiscing loreum ipsum edipiscing elit, sed diam
|
|
113
|
-
nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.Loreum ipsum
|
|
114
|
-
edipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam
|
|
115
|
-
erat volutpat.
|
|
116
|
-
</div>
|
|
117
|
-
</td>
|
|
118
|
-
</tr>
|
|
119
|
-
|
|
120
|
-
<tr>
|
|
121
|
-
<td class="column1"><label id="widthlabel" for="width">{#advimage_dlg.dimensions}</label></td>
|
|
122
|
-
<td nowrap="nowrap">
|
|
123
|
-
<input name="width" type="text" id="width" value="" size="5" maxlength="5" class="size" onchange="ImageDialog.changeHeight();" /> x
|
|
124
|
-
<input name="height" type="text" id="height" value="" size="5" maxlength="5" class="size" onchange="ImageDialog.changeWidth();" /> px
|
|
125
|
-
</td>
|
|
126
|
-
</tr>
|
|
127
|
-
|
|
128
|
-
<tr>
|
|
129
|
-
<td> </td>
|
|
130
|
-
<td><table border="0" cellpadding="0" cellspacing="0">
|
|
131
|
-
<tr>
|
|
132
|
-
<td><input id="constrain" type="checkbox" name="constrain" class="checkbox" /></td>
|
|
133
|
-
<td><label id="constrainlabel" for="constrain">{#advimage_dlg.constrain_proportions}</label></td>
|
|
134
|
-
</tr>
|
|
135
|
-
</table></td>
|
|
136
|
-
</tr>
|
|
137
|
-
|
|
138
|
-
<tr>
|
|
139
|
-
<td class="column1"><label id="vspacelabel" for="vspace">{#advimage_dlg.vspace}</label></td>
|
|
140
|
-
<td><input name="vspace" type="text" id="vspace" value="" size="3" maxlength="3" class="number" onchange="ImageDialog.updateStyle('vspace');ImageDialog.changeAppearance();" onblur="ImageDialog.updateStyle('vspace');ImageDialog.changeAppearance();" />
|
|
141
|
-
</td>
|
|
142
|
-
</tr>
|
|
143
|
-
|
|
144
|
-
<tr>
|
|
145
|
-
<td class="column1"><label id="hspacelabel" for="hspace">{#advimage_dlg.hspace}</label></td>
|
|
146
|
-
<td><input name="hspace" type="text" id="hspace" value="" size="3" maxlength="3" class="number" onchange="ImageDialog.updateStyle('hspace');ImageDialog.changeAppearance();" onblur="ImageDialog.updateStyle('hspace');ImageDialog.changeAppearance();" /></td>
|
|
147
|
-
</tr>
|
|
148
|
-
|
|
149
|
-
<tr>
|
|
150
|
-
<td class="column1"><label id="borderlabel" for="border">{#advimage_dlg.border}</label></td>
|
|
151
|
-
<td><input id="border" name="border" type="text" value="" size="3" maxlength="3" class="number" onchange="ImageDialog.updateStyle('border');ImageDialog.changeAppearance();" onblur="ImageDialog.updateStyle('border');ImageDialog.changeAppearance();" /></td>
|
|
152
|
-
</tr>
|
|
153
|
-
|
|
154
|
-
<tr>
|
|
155
|
-
<td><label for="class_list">{#class_name}</label></td>
|
|
156
|
-
<td><select id="class_list" name="class_list"></select></td>
|
|
157
|
-
</tr>
|
|
158
|
-
|
|
159
|
-
<tr>
|
|
160
|
-
<td class="column1"><label id="stylelabel" for="style">{#advimage_dlg.style}</label></td>
|
|
161
|
-
<td colspan="2"><input id="style" name="style" type="text" value="" onchange="ImageDialog.changeAppearance();" /></td>
|
|
162
|
-
</tr>
|
|
163
|
-
|
|
164
|
-
</table>
|
|
165
|
-
</fieldset>
|
|
166
|
-
</div>
|
|
167
|
-
</div>
|
|
168
|
-
|
|
169
|
-
<div class="mceActionPanel">
|
|
170
|
-
<div style="float: left">
|
|
171
|
-
<input type="button" id="insert" name="insert" value="{#insert}" onclick="ImageDialog.insert();" />
|
|
172
|
-
</div>
|
|
173
|
-
|
|
174
|
-
<div style="float: right">
|
|
175
|
-
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
|
176
|
-
</div>
|
|
177
|
-
</div>
|
|
178
|
-
</form>
|
|
179
|
-
</body>
|
|
180
|
-
</html>
|
|
Binary file
|
|
@@ -1,508 +0,0 @@
|
|
|
1
|
-
function select_image(element){
|
|
2
|
-
element = $(element);
|
|
3
|
-
element.up('ul').select('li').invoke("removeClassName", "selected");
|
|
4
|
-
element.up('li').addClassName('selected');
|
|
5
|
-
}
|
|
6
|
-
function select_thumb(event) {
|
|
7
|
-
element = Event.element(event);
|
|
8
|
-
src = element.getAttribute('href');
|
|
9
|
-
curbly_insert_image(src, element.getAttribute('alt') );
|
|
10
|
-
Event.stop(event);
|
|
11
|
-
return false;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function upload_image_callback(url, alt_text, photo_id){
|
|
15
|
-
$('image_uploaded_data').clear();
|
|
16
|
-
new Ajax.Request("/manage_photos?photo_id="+photo_id, {asynchronous:true, evalScripts:true, method:'get'});
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function curbly_insert_image(url, alt_text){
|
|
20
|
-
var formObj = formElement();
|
|
21
|
-
formObj.src.value = url;
|
|
22
|
-
formObj.alt.value = alt_text;
|
|
23
|
-
mcTabs.displayTab('general_tab','general_panel');
|
|
24
|
-
ImageDialog.showPreviewImage(url);
|
|
25
|
-
}
|
|
26
|
-
function formElement() {
|
|
27
|
-
return document.forms[1];
|
|
28
|
-
}
|
|
29
|
-
function ts_onload(){
|
|
30
|
-
$('dynamic_images_list').update("Uploading...<br /><img src='/assets/spinner.gif'>");
|
|
31
|
-
mcTabs.displayTab('dynamic_select_tab','dynamic_select_panel');
|
|
32
|
-
|
|
33
|
-
var iframe1=ts_ce('iframe','html_editor_image_upload_frame');
|
|
34
|
-
iframe1.setAttribute('src','about:blank');
|
|
35
|
-
iframe1.style.border="0px none";
|
|
36
|
-
iframe1.style.position="absolute";
|
|
37
|
-
iframe1.style.width="1px";
|
|
38
|
-
iframe1.style.height="1px";
|
|
39
|
-
iframe1.style.visibility="hidden";
|
|
40
|
-
iframe1.setAttribute('id','html_editor_image_upload_frame');
|
|
41
|
-
$('image-upload').appendChild(iframe1);
|
|
42
|
-
$('image_upload_form').setAttribute("action", ts_upload_image_path());
|
|
43
|
-
}
|
|
44
|
-
function ts_upload_image_path() {
|
|
45
|
-
// path_prefix = window.parent.location.pathname.split("/")[1];
|
|
46
|
-
// to_path = "/" + path_prefix + "/photos.js";
|
|
47
|
-
// to_path = "/manage_photos.js";
|
|
48
|
-
return '/create_photo.js';
|
|
49
|
-
}
|
|
50
|
-
function ts_ce(tag,name){
|
|
51
|
-
if (name && window.ActiveXObject){
|
|
52
|
-
element = document.createElement('<'+tag+' name="'+name+'">');
|
|
53
|
-
}else{
|
|
54
|
-
element = document.createElement(tag);
|
|
55
|
-
element.setAttribute('name',name);
|
|
56
|
-
}
|
|
57
|
-
return element;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
var ImageDialog = {
|
|
62
|
-
preInit : function() {
|
|
63
|
-
var url;
|
|
64
|
-
|
|
65
|
-
tinyMCEPopup.requireLangPack();
|
|
66
|
-
|
|
67
|
-
if (url = tinyMCEPopup.getParam("external_image_list_url"))
|
|
68
|
-
document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
init : function(ed) {
|
|
72
|
-
var f = formElement(), nl = f.elements, ed = tinyMCEPopup.editor, dom = ed.dom, n = ed.selection.getNode();
|
|
73
|
-
|
|
74
|
-
tinyMCEPopup.resizeToInnerSize();
|
|
75
|
-
this.fillClassList('class_list');
|
|
76
|
-
this.fillFileList('src_list', 'tinyMCEImageList');
|
|
77
|
-
this.fillFileList('over_list', 'tinyMCEImageList');
|
|
78
|
-
this.fillFileList('out_list', 'tinyMCEImageList');
|
|
79
|
-
|
|
80
|
-
if (n.nodeName == 'IMG') {
|
|
81
|
-
nl.src.value = dom.getAttrib(n, 'src');
|
|
82
|
-
nl.width.value = dom.getAttrib(n, 'width');
|
|
83
|
-
nl.height.value = dom.getAttrib(n, 'height');
|
|
84
|
-
nl.alt.value = dom.getAttrib(n, 'alt');
|
|
85
|
-
nl.title.value = dom.getAttrib(n, 'title');
|
|
86
|
-
nl.vspace.value = this.getAttrib(n, 'vspace');
|
|
87
|
-
nl.hspace.value = this.getAttrib(n, 'hspace');
|
|
88
|
-
nl.border.value = this.getAttrib(n, 'border');
|
|
89
|
-
selectByValue(f, 'align', this.getAttrib(n, 'align'));
|
|
90
|
-
selectByValue(f, 'class_list', dom.getAttrib(n, 'class'));
|
|
91
|
-
nl.style.value = dom.getAttrib(n, 'style');
|
|
92
|
-
nl.id.value = dom.getAttrib(n, 'id');
|
|
93
|
-
nl.dir.value = dom.getAttrib(n, 'dir');
|
|
94
|
-
nl.lang.value = dom.getAttrib(n, 'lang');
|
|
95
|
-
nl.usemap.value = dom.getAttrib(n, 'usemap');
|
|
96
|
-
nl.longdesc.value = dom.getAttrib(n, 'longdesc');
|
|
97
|
-
nl.insert.value = ed.getLang('update');
|
|
98
|
-
|
|
99
|
-
if (/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/.test(dom.getAttrib(n, 'onmouseover')))
|
|
100
|
-
nl.onmouseoversrc.value = dom.getAttrib(n, 'onmouseover').replace(/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/, '$1');
|
|
101
|
-
|
|
102
|
-
if (/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/.test(dom.getAttrib(n, 'onmouseout')))
|
|
103
|
-
nl.onmouseoutsrc.value = dom.getAttrib(n, 'onmouseout').replace(/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/, '$1');
|
|
104
|
-
|
|
105
|
-
if (ed.settings.inline_styles) {
|
|
106
|
-
// Move attribs to styles
|
|
107
|
-
if (dom.getAttrib(n, 'align'))
|
|
108
|
-
this.updateStyle('align');
|
|
109
|
-
|
|
110
|
-
if (dom.getAttrib(n, 'hspace'))
|
|
111
|
-
this.updateStyle('hspace');
|
|
112
|
-
|
|
113
|
-
if (dom.getAttrib(n, 'border'))
|
|
114
|
-
this.updateStyle('border');
|
|
115
|
-
|
|
116
|
-
if (dom.getAttrib(n, 'vspace'))
|
|
117
|
-
this.updateStyle('vspace');
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
// Setup browse button
|
|
122
|
-
document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image');
|
|
123
|
-
if (isVisible('srcbrowser'))
|
|
124
|
-
document.getElementById('src').style.width = '260px';
|
|
125
|
-
|
|
126
|
-
// Setup browse button
|
|
127
|
-
// document.getElementById('onmouseoversrccontainer').innerHTML = getBrowserHTML('overbrowser','onmouseoversrc','image','theme_advanced_image');
|
|
128
|
-
// if (isVisible('overbrowser'))
|
|
129
|
-
// document.getElementById('onmouseoversrc').style.width = '260px';
|
|
130
|
-
//
|
|
131
|
-
// // Setup browse button
|
|
132
|
-
// document.getElementById('onmouseoutsrccontainer').innerHTML = getBrowserHTML('outbrowser','onmouseoutsrc','image','theme_advanced_image');
|
|
133
|
-
// if (isVisible('outbrowser'))
|
|
134
|
-
// document.getElementById('onmouseoutsrc').style.width = '260px';
|
|
135
|
-
|
|
136
|
-
// If option enabled default contrain proportions to checked
|
|
137
|
-
if (ed.getParam("advimage_constrain_proportions", true))
|
|
138
|
-
f.constrain.checked = true;
|
|
139
|
-
|
|
140
|
-
// Check swap image if valid data
|
|
141
|
-
// if (nl.onmouseoversrc.value || nl.onmouseoutsrc.value)
|
|
142
|
-
// this.setSwapImage(true);
|
|
143
|
-
// else
|
|
144
|
-
// this.setSwapImage(false);
|
|
145
|
-
|
|
146
|
-
this.changeAppearance();
|
|
147
|
-
this.showPreviewImage(nl.src.value, 1);
|
|
148
|
-
},
|
|
149
|
-
|
|
150
|
-
insert : function(file, title) {
|
|
151
|
-
var ed = tinyMCEPopup.editor, t = this, f = formElement();
|
|
152
|
-
|
|
153
|
-
if (f.src.value === '') {
|
|
154
|
-
if (ed.selection.getNode().nodeName == 'IMG') {
|
|
155
|
-
ed.dom.remove(ed.selection.getNode());
|
|
156
|
-
ed.execCommand('mceRepaint');
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
tinyMCEPopup.close();
|
|
160
|
-
return;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
if (tinyMCEPopup.getParam("accessibility_warnings", 1)) {
|
|
164
|
-
if (!f.alt.value) {
|
|
165
|
-
tinyMCEPopup.editor.windowManager.confirm(tinyMCEPopup.getLang('advimage_dlg.missing_alt'), function(s) {
|
|
166
|
-
if (s)
|
|
167
|
-
t.insertAndClose();
|
|
168
|
-
});
|
|
169
|
-
|
|
170
|
-
return;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
t.insertAndClose();
|
|
175
|
-
},
|
|
176
|
-
|
|
177
|
-
insertAndClose : function() {
|
|
178
|
-
var ed = tinyMCEPopup.editor, f = formElement(), nl = f.elements, v, args = {}, el;
|
|
179
|
-
|
|
180
|
-
// Fixes crash in Safari
|
|
181
|
-
if (tinymce.isWebKit)
|
|
182
|
-
ed.getWin().focus();
|
|
183
|
-
|
|
184
|
-
if (!ed.settings.inline_styles) {
|
|
185
|
-
args = {
|
|
186
|
-
vspace : nl.vspace.value,
|
|
187
|
-
hspace : nl.hspace.value,
|
|
188
|
-
border : nl.border.value,
|
|
189
|
-
align : getSelectValue(f, 'align')
|
|
190
|
-
};
|
|
191
|
-
} else {
|
|
192
|
-
// Remove deprecated values
|
|
193
|
-
args = {
|
|
194
|
-
vspace : '',
|
|
195
|
-
hspace : '',
|
|
196
|
-
border : '',
|
|
197
|
-
align : ''
|
|
198
|
-
};
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
tinymce.extend(args, {
|
|
202
|
-
src : nl.src.value,
|
|
203
|
-
width : nl.width.value,
|
|
204
|
-
height : nl.height.value,
|
|
205
|
-
alt : nl.alt.value,
|
|
206
|
-
title : nl.title.value,
|
|
207
|
-
'class' : getSelectValue(f, 'class_list'),
|
|
208
|
-
style : nl.style.value
|
|
209
|
-
// id : nl.id.value,
|
|
210
|
-
// dir : nl.dir.value,
|
|
211
|
-
// lang : nl.lang.value,
|
|
212
|
-
// usemap : nl.usemap.value,
|
|
213
|
-
// longdesc : nl.longdesc.value
|
|
214
|
-
});
|
|
215
|
-
|
|
216
|
-
// args.onmouseover = args.onmouseout = '';
|
|
217
|
-
|
|
218
|
-
// if (f.onmousemovecheck.checked) {
|
|
219
|
-
// if (nl.onmouseoversrc.value)
|
|
220
|
-
// args.onmouseover = "this.src='" + nl.onmouseoversrc.value + "';";
|
|
221
|
-
//
|
|
222
|
-
// if (nl.onmouseoutsrc.value)
|
|
223
|
-
// args.onmouseout = "this.src='" + nl.onmouseoutsrc.value + "';";
|
|
224
|
-
// }
|
|
225
|
-
|
|
226
|
-
el = ed.selection.getNode();
|
|
227
|
-
|
|
228
|
-
if (el && el.nodeName == 'IMG') {
|
|
229
|
-
ed.dom.setAttribs(el, args);
|
|
230
|
-
} else {
|
|
231
|
-
|
|
232
|
-
tinymce.each(args, function(value, name) {
|
|
233
|
-
if (value === "") {
|
|
234
|
-
delete args[name];
|
|
235
|
-
}
|
|
236
|
-
});
|
|
237
|
-
|
|
238
|
-
ed.execCommand('mceInsertContent', false, tinyMCEPopup.editor.dom.createHTML('img', args), {skip_undo : 1});
|
|
239
|
-
ed.undoManager.add();
|
|
240
|
-
|
|
241
|
-
// ed.execCommand('mceInsertContent', false, '<img id="__mce_tmp" />', {skip_undo : 1});
|
|
242
|
-
// ed.dom.setAttribs('__mce_tmp', args);
|
|
243
|
-
// ed.dom.setAttrib('__mce_tmp', 'id', '');
|
|
244
|
-
// ed.undoManager.add();
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
tinyMCEPopup.close();
|
|
248
|
-
},
|
|
249
|
-
|
|
250
|
-
getAttrib : function(e, at) {
|
|
251
|
-
var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2;
|
|
252
|
-
|
|
253
|
-
if (ed.settings.inline_styles) {
|
|
254
|
-
switch (at) {
|
|
255
|
-
case 'align':
|
|
256
|
-
if (v = dom.getStyle(e, 'float'))
|
|
257
|
-
return v;
|
|
258
|
-
|
|
259
|
-
if (v = dom.getStyle(e, 'vertical-align'))
|
|
260
|
-
return v;
|
|
261
|
-
|
|
262
|
-
break;
|
|
263
|
-
|
|
264
|
-
case 'hspace':
|
|
265
|
-
v = dom.getStyle(e, 'margin-left')
|
|
266
|
-
v2 = dom.getStyle(e, 'margin-right');
|
|
267
|
-
|
|
268
|
-
if (v && v == v2)
|
|
269
|
-
return parseInt(v.replace(/[^0-9]/g, ''));
|
|
270
|
-
|
|
271
|
-
break;
|
|
272
|
-
|
|
273
|
-
case 'vspace':
|
|
274
|
-
v = dom.getStyle(e, 'margin-top')
|
|
275
|
-
v2 = dom.getStyle(e, 'margin-bottom');
|
|
276
|
-
if (v && v == v2)
|
|
277
|
-
return parseInt(v.replace(/[^0-9]/g, ''));
|
|
278
|
-
|
|
279
|
-
break;
|
|
280
|
-
|
|
281
|
-
case 'border':
|
|
282
|
-
v = 0;
|
|
283
|
-
|
|
284
|
-
tinymce.each(['top', 'right', 'bottom', 'left'], function(sv) {
|
|
285
|
-
sv = dom.getStyle(e, 'border-' + sv + '-width');
|
|
286
|
-
|
|
287
|
-
// False or not the same as prev
|
|
288
|
-
if (!sv || (sv != v && v !== 0)) {
|
|
289
|
-
v = 0;
|
|
290
|
-
return false;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
if (sv)
|
|
294
|
-
v = sv;
|
|
295
|
-
});
|
|
296
|
-
|
|
297
|
-
if (v)
|
|
298
|
-
return parseInt(v.replace(/[^0-9]/g, ''));
|
|
299
|
-
|
|
300
|
-
break;
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
if (v = dom.getAttrib(e, at))
|
|
305
|
-
return v;
|
|
306
|
-
|
|
307
|
-
return '';
|
|
308
|
-
},
|
|
309
|
-
|
|
310
|
-
setSwapImage : function(st) {
|
|
311
|
-
var f = formElement();
|
|
312
|
-
|
|
313
|
-
f.onmousemovecheck.checked = st;
|
|
314
|
-
setBrowserDisabled('overbrowser', !st);
|
|
315
|
-
setBrowserDisabled('outbrowser', !st);
|
|
316
|
-
|
|
317
|
-
if (f.over_list)
|
|
318
|
-
f.over_list.disabled = !st;
|
|
319
|
-
|
|
320
|
-
if (f.out_list)
|
|
321
|
-
f.out_list.disabled = !st;
|
|
322
|
-
|
|
323
|
-
f.onmouseoversrc.disabled = !st;
|
|
324
|
-
f.onmouseoutsrc.disabled = !st;
|
|
325
|
-
},
|
|
326
|
-
|
|
327
|
-
fillClassList : function(id) {
|
|
328
|
-
var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
|
|
329
|
-
|
|
330
|
-
if (v = tinyMCEPopup.getParam('theme_advanced_styles')) {
|
|
331
|
-
cl = [];
|
|
332
|
-
|
|
333
|
-
tinymce.each(v.split(';'), function(v) {
|
|
334
|
-
var p = v.split('=');
|
|
335
|
-
|
|
336
|
-
cl.push({'title' : p[0], 'class' : p[1]});
|
|
337
|
-
});
|
|
338
|
-
} else
|
|
339
|
-
cl = tinyMCEPopup.editor.dom.getClasses();
|
|
340
|
-
|
|
341
|
-
if (cl.length > 0) {
|
|
342
|
-
lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), '');
|
|
343
|
-
|
|
344
|
-
tinymce.each(cl, function(o) {
|
|
345
|
-
lst.options[lst.options.length] = new Option(o.title || o['class'], o['class']);
|
|
346
|
-
});
|
|
347
|
-
} else
|
|
348
|
-
dom.remove(dom.getParent(id, 'tr'));
|
|
349
|
-
},
|
|
350
|
-
|
|
351
|
-
fillFileList : function(id, l) {
|
|
352
|
-
var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
|
|
353
|
-
|
|
354
|
-
l = window[l];
|
|
355
|
-
|
|
356
|
-
if (l && l.length > 0) {
|
|
357
|
-
lst.options[lst.options.length] = new Option('', '');
|
|
358
|
-
|
|
359
|
-
tinymce.each(l, function(o) {
|
|
360
|
-
lst.options[lst.options.length] = new Option(o[0], o[1]);
|
|
361
|
-
});
|
|
362
|
-
} else
|
|
363
|
-
dom.remove(dom.getParent(id, 'tr'));
|
|
364
|
-
},
|
|
365
|
-
|
|
366
|
-
resetImageData : function() {
|
|
367
|
-
var f = formElement();
|
|
368
|
-
|
|
369
|
-
f.elements.width.value = f.elements.height.value = '';
|
|
370
|
-
},
|
|
371
|
-
|
|
372
|
-
updateImageData : function(img, st) {
|
|
373
|
-
var f = formElement();
|
|
374
|
-
|
|
375
|
-
if (!st) {
|
|
376
|
-
f.elements.width.value = img.width;
|
|
377
|
-
f.elements.height.value = img.height;
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
this.preloadImg = img;
|
|
381
|
-
},
|
|
382
|
-
|
|
383
|
-
changeAppearance : function() {
|
|
384
|
-
var ed = tinyMCEPopup.editor, f = formElement(), img = document.getElementById('alignSampleImg');
|
|
385
|
-
|
|
386
|
-
if (img) {
|
|
387
|
-
if (ed.getParam('inline_styles')) {
|
|
388
|
-
ed.dom.setAttrib(img, 'style', f.style.value);
|
|
389
|
-
} else {
|
|
390
|
-
img.align = f.align.value;
|
|
391
|
-
img.border = f.border.value;
|
|
392
|
-
img.hspace = f.hspace.value;
|
|
393
|
-
img.vspace = f.vspace.value;
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
},
|
|
397
|
-
|
|
398
|
-
changeHeight : function() {
|
|
399
|
-
var f = formElement(), tp, t = this;
|
|
400
|
-
|
|
401
|
-
if (!f.constrain.checked || !t.preloadImg) {
|
|
402
|
-
return;
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
if (f.width.value == "" || f.height.value == "")
|
|
406
|
-
return;
|
|
407
|
-
|
|
408
|
-
tp = (parseInt(f.width.value) / parseInt(t.preloadImg.width)) * t.preloadImg.height;
|
|
409
|
-
f.height.value = tp.toFixed(0);
|
|
410
|
-
},
|
|
411
|
-
|
|
412
|
-
changeWidth : function() {
|
|
413
|
-
var f = formElement(), tp, t = this;
|
|
414
|
-
|
|
415
|
-
if (!f.constrain.checked || !t.preloadImg) {
|
|
416
|
-
return;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
if (f.width.value == "" || f.height.value == "")
|
|
420
|
-
return;
|
|
421
|
-
|
|
422
|
-
tp = (parseInt(f.height.value) / parseInt(t.preloadImg.height)) * t.preloadImg.width;
|
|
423
|
-
f.width.value = tp.toFixed(0);
|
|
424
|
-
},
|
|
425
|
-
|
|
426
|
-
updateStyle : function(ty) {
|
|
427
|
-
var dom = tinyMCEPopup.dom, st, v, f = formElement(), img = dom.create('img', {style : dom.get('style').value});
|
|
428
|
-
|
|
429
|
-
if (tinyMCEPopup.editor.settings.inline_styles) {
|
|
430
|
-
// Handle align
|
|
431
|
-
if (ty == 'align') {
|
|
432
|
-
dom.setStyle(img, 'float', '');
|
|
433
|
-
dom.setStyle(img, 'vertical-align', '');
|
|
434
|
-
|
|
435
|
-
v = getSelectValue(f, 'align');
|
|
436
|
-
if (v) {
|
|
437
|
-
if (v == 'left' || v == 'right')
|
|
438
|
-
dom.setStyle(img, 'float', v);
|
|
439
|
-
else
|
|
440
|
-
img.style.verticalAlign = v;
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
// Handle border
|
|
445
|
-
if (ty == 'border') {
|
|
446
|
-
dom.setStyle(img, 'border', '');
|
|
447
|
-
|
|
448
|
-
v = f.border.value;
|
|
449
|
-
if (v || v == '0') {
|
|
450
|
-
if (v == '0')
|
|
451
|
-
img.style.border = '';
|
|
452
|
-
else
|
|
453
|
-
img.style.border = v + 'px solid black';
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
// Handle hspace
|
|
458
|
-
if (ty == 'hspace') {
|
|
459
|
-
dom.setStyle(img, 'marginLeft', '');
|
|
460
|
-
dom.setStyle(img, 'marginRight', '');
|
|
461
|
-
|
|
462
|
-
v = f.hspace.value;
|
|
463
|
-
if (v) {
|
|
464
|
-
img.style.marginLeft = v + 'px';
|
|
465
|
-
img.style.marginRight = v + 'px';
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
// Handle vspace
|
|
470
|
-
if (ty == 'vspace') {
|
|
471
|
-
dom.setStyle(img, 'marginTop', '');
|
|
472
|
-
dom.setStyle(img, 'marginBottom', '');
|
|
473
|
-
|
|
474
|
-
v = f.vspace.value;
|
|
475
|
-
if (v) {
|
|
476
|
-
img.style.marginTop = v + 'px';
|
|
477
|
-
img.style.marginBottom = v + 'px';
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
// Merge
|
|
482
|
-
dom.get('style').value = dom.serializeStyle(dom.parseStyle(img.style.cssText));
|
|
483
|
-
}
|
|
484
|
-
},
|
|
485
|
-
|
|
486
|
-
changeMouseMove : function() {
|
|
487
|
-
},
|
|
488
|
-
|
|
489
|
-
showPreviewImage : function(u, st) {
|
|
490
|
-
if (!u) {
|
|
491
|
-
tinyMCEPopup.dom.setHTML('prev', '');
|
|
492
|
-
return;
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
if (!st && tinyMCEPopup.getParam("advimage_update_dimensions_onchange", true))
|
|
496
|
-
this.resetImageData();
|
|
497
|
-
|
|
498
|
-
u = tinyMCEPopup.editor.documentBaseURI.toAbsolute(u);
|
|
499
|
-
|
|
500
|
-
if (!st)
|
|
501
|
-
tinyMCEPopup.dom.setHTML('prev', '<img id="previewImg" src="' + u + '" border="0" onload="ImageDialog.updateImageData(this);" onerror="ImageDialog.resetImageData();" />');
|
|
502
|
-
else
|
|
503
|
-
tinyMCEPopup.dom.setHTML('prev', '<img id="previewImg" src="' + u + '" border="0" onload="ImageDialog.updateImageData(this, 1);" />');
|
|
504
|
-
}
|
|
505
|
-
};
|
|
506
|
-
|
|
507
|
-
ImageDialog.preInit();
|
|
508
|
-
tinyMCEPopup.onInit.add(ImageDialog.init, ImageDialog);
|