ppc_logic 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.rspec +1 -0
- data/Capfile +4 -0
- data/Gemfile +31 -0
- data/Rakefile +32 -0
- data/VERSION +1 -0
- data/app/controllers/admin/ads_controller.rb +43 -0
- data/app/controllers/admin/branches_controller.rb +48 -0
- data/app/controllers/admin/campaigns_controller.rb +67 -0
- data/app/controllers/admin/landing_pages_controller.rb +63 -0
- data/app/controllers/admin/local_offers_controller.rb +44 -0
- data/app/controllers/admin/ppc_controller.rb +6 -0
- data/app/controllers/application_controller.rb +4 -0
- data/app/controllers/landing_pages_controller.rb +16 -0
- data/app/helpers/application_helper.rb +19 -0
- data/app/helpers/layout_helper.rb +18 -0
- data/app/models/ad.rb +49 -0
- data/app/models/branch.rb +35 -0
- data/app/models/campaign.rb +59 -0
- data/app/models/landing_page.rb +174 -0
- data/app/models/landing_page_report.rb +132 -0
- data/app/models/landing_page_stat.rb +43 -0
- data/app/models/local_offer.rb +38 -0
- data/app/views/admin/ads/_form.html.erb +215 -0
- data/app/views/admin/ads/edit.html.erb +5 -0
- data/app/views/admin/ads/index.html.erb +27 -0
- data/app/views/admin/ads/new.html.erb +5 -0
- data/app/views/admin/ads/show.html.erb +23 -0
- data/app/views/admin/branches/_form.html.erb +37 -0
- data/app/views/admin/branches/edit.html.erb +5 -0
- data/app/views/admin/branches/index.html.erb +25 -0
- data/app/views/admin/branches/new.html.erb +5 -0
- data/app/views/admin/branches/show.html.erb +23 -0
- data/app/views/admin/campaigns/_form.html.erb +95 -0
- data/app/views/admin/campaigns/_locale_select.html.erb +12 -0
- data/app/views/admin/campaigns/_targeting.html.erb +11 -0
- data/app/views/admin/campaigns/edit.html.erb +5 -0
- data/app/views/admin/campaigns/index.html.erb +35 -0
- data/app/views/admin/campaigns/new.html.erb +5 -0
- data/app/views/admin/campaigns/show.html.erb +23 -0
- data/app/views/admin/landing_pages/_form.html.erb +52 -0
- data/app/views/admin/landing_pages/_landing_page.html.erb +21 -0
- data/app/views/admin/landing_pages/edit.html.erb +5 -0
- data/app/views/admin/landing_pages/index.html.erb +30 -0
- data/app/views/admin/landing_pages/landing_page_report.html.erb +126 -0
- data/app/views/admin/landing_pages/new.html.erb +5 -0
- data/app/views/admin/landing_pages/show.html.erb +39 -0
- data/app/views/admin/local_offers/_form.html.erb +40 -0
- data/app/views/admin/local_offers/edit.html.erb +5 -0
- data/app/views/admin/local_offers/index.html.erb +31 -0
- data/app/views/admin/local_offers/new.html.erb +5 -0
- data/app/views/admin/local_offers/show.html.erb +22 -0
- data/app/views/admin/ppc/index.html.erb +15 -0
- data/app/views/landing_pages/show.html.erb +2 -0
- data/app/views/layouts/application.html.erb +52 -0
- data/config.ru +2 -0
- data/config/application.rb +11 -0
- data/config/boot.rb +3 -0
- data/config/cucumber.yml +10 -0
- data/config/environment.rb +3 -0
- data/config/environments/development.rb +12 -0
- data/config/environments/production.rb +9 -0
- data/config/environments/test.rb +15 -0
- data/config/initializers/campfire_logic.rb +10 -0
- data/config/initializers/formats.rb +19 -0
- data/config/initializers/metric_fu.rb +9 -0
- data/config/initializers/ppc_logic.rb +9 -0
- data/config/initializers/secret_token.rb +1 -0
- data/config/initializers/session_store.rb +1 -0
- data/config/mongoid.yml +18 -0
- data/config/routes.rb +23 -0
- data/features/manage_landing_pages.feature +47 -0
- data/features/manage_local_offers.feature +47 -0
- data/features/step_definitions/general_steps.rb +7 -0
- data/features/step_definitions/landing_page_steps.rb +7 -0
- data/features/step_definitions/site_steps.rb +19 -0
- data/features/step_definitions/web_steps.rb +219 -0
- data/features/support/env.rb +33 -0
- data/features/support/hooks.rb +4 -0
- data/features/support/paths.rb +33 -0
- data/init.rb +1 -0
- data/lib/.DS_Store +0 -0
- data/lib/madmen.rb +9 -0
- data/lib/madmen/google.rb +97 -0
- data/lib/madmen/google/ad.rb +177 -0
- data/lib/madmen/google/ad_group.rb +209 -0
- data/lib/madmen/google/campaign.rb +307 -0
- data/lib/madmen/google/keyword.rb +123 -0
- data/lib/ppc_logic.rb +19 -0
- data/lib/ppc_logic/engine.rb +7 -0
- data/lib/ppc_logic/railtie.rb +10 -0
- data/lib/tasks/cucumber.rake +53 -0
- data/lib/tasks/rcov.rake +76 -0
- data/ppc_logic.gemspec +939 -0
- data/public/404.html +26 -0
- data/public/422.html +26 -0
- data/public/500.html +26 -0
- data/public/favicon.ico +0 -0
- data/public/images/icons/add.png +0 -0
- data/public/images/icons/checkmark.gif +0 -0
- data/public/images/icons/collapsed.gif +0 -0
- data/public/images/icons/delete.png +0 -0
- data/public/images/icons/drag.png +0 -0
- data/public/images/icons/edit.png +0 -0
- data/public/images/icons/expanded.gif +0 -0
- data/public/images/icons/help_icon.png +0 -0
- data/public/images/icons/link_icon.png +0 -0
- data/public/images/icons/move.png +0 -0
- data/public/images/icons/move_white.png +0 -0
- data/public/images/icons/note.png +0 -0
- data/public/images/icons/note_white.png +0 -0
- data/public/images/icons/notification_icon_sprite.png +0 -0
- data/public/images/icons/spinner.gif +0 -0
- data/public/images/icons/view.png +0 -0
- data/public/images/icons/warning.png +0 -0
- data/public/images/icons/warning_2.png +0 -0
- data/public/images/icons/warning_box.png +0 -0
- data/public/images/icons/warning_icon.png +0 -0
- data/public/images/icons/warning_white.png +0 -0
- data/public/images/layout/arrow_asc.png +0 -0
- data/public/images/layout/arrow_desc.png +0 -0
- data/public/images/layout/back.png +0 -0
- data/public/images/layout/black_bar.png +0 -0
- data/public/images/layout/branding.png +0 -0
- data/public/images/layout/breadcrumb_bg.png +0 -0
- data/public/images/layout/button_bg.png +0 -0
- data/public/images/layout/content_left_bg.png +0 -0
- data/public/images/layout/content_right_bg.png +0 -0
- data/public/images/layout/footer_bg.png +0 -0
- data/public/images/layout/h1_bg.png +0 -0
- data/public/images/layout/h2_bg.png +0 -0
- data/public/images/layout/h2_bg_for_table.png +0 -0
- data/public/images/layout/header_bg_grey.png +0 -0
- data/public/images/layout/header_bg_purple.png +0 -0
- data/public/images/layout/legend_bg.png +0 -0
- data/public/images/layout/menu_box_bg.png +0 -0
- data/public/images/layout/shadow_border.png +0 -0
- data/public/images/layout/shadow_border_2.png +0 -0
- data/public/images/layout/shadow_border_3.png +0 -0
- data/public/images/layout/shadow_border_4.png +0 -0
- data/public/images/layout/tab.png +0 -0
- data/public/images/layout/tab_active.png +0 -0
- data/public/images/layout/table_header.png +0 -0
- data/public/images/layout/text_field_bg.jpg +0 -0
- data/public/images/layout/text_field_error_bg.png +0 -0
- data/public/images/layout/th_bg.png +0 -0
- data/public/images/layout/th_bg_selected.png +0 -0
- data/public/images/menu_icons/account.png +0 -0
- data/public/images/menu_icons/affiliates.png +0 -0
- data/public/images/menu_icons/banner_ad.png +0 -0
- data/public/images/menu_icons/banner_ad_disabled.png +0 -0
- data/public/images/menu_icons/banner_ad_on.png +0 -0
- data/public/images/menu_icons/banner_ads_disabled.png +0 -0
- data/public/images/menu_icons/billing.png +0 -0
- data/public/images/menu_icons/campaigns.png +0 -0
- data/public/images/menu_icons/campaigns_disabled.png +0 -0
- data/public/images/menu_icons/campaigns_on.png +0 -0
- data/public/images/menu_icons/categories.png +0 -0
- data/public/images/menu_icons/clients.png +0 -0
- data/public/images/menu_icons/clients_on.png +0 -0
- data/public/images/menu_icons/contact.png +0 -0
- data/public/images/menu_icons/directories.png +0 -0
- data/public/images/menu_icons/document.png +0 -0
- data/public/images/menu_icons/document_on.png +0 -0
- data/public/images/menu_icons/help.png +0 -0
- data/public/images/menu_icons/images.png +0 -0
- data/public/images/menu_icons/images_on.png +0 -0
- data/public/images/menu_icons/keywords.png +0 -0
- data/public/images/menu_icons/landing_pages.png +0 -0
- data/public/images/menu_icons/landing_pages_disabled.png +0 -0
- data/public/images/menu_icons/landing_pages_on.png +0 -0
- data/public/images/menu_icons/library.png +0 -0
- data/public/images/menu_icons/library_on.png +0 -0
- data/public/images/menu_icons/local_site.png +0 -0
- data/public/images/menu_icons/local_site_on.png +0 -0
- data/public/images/menu_icons/locations.png +0 -0
- data/public/images/menu_icons/locations_on.png +0 -0
- data/public/images/menu_icons/messages.png +0 -0
- data/public/images/menu_icons/messages_on.png +0 -0
- data/public/images/menu_icons/ppc_ads.png +0 -0
- data/public/images/menu_icons/ppc_ads_disabled.png +0 -0
- data/public/images/menu_icons/ppc_ads_on.png +0 -0
- data/public/images/menu_icons/print_collaterals.png +0 -0
- data/public/images/menu_icons/print_collaterals_disabled.png +0 -0
- data/public/images/menu_icons/print_collaterals_on.png +0 -0
- data/public/images/menu_icons/reports.png +0 -0
- data/public/images/menu_icons/reports_on.png +0 -0
- data/public/images/menu_icons/services.png +0 -0
- data/public/images/menu_icons/services_on.png +0 -0
- data/public/images/menu_icons/settings.png +0 -0
- data/public/images/menu_icons/site_template.png +0 -0
- data/public/images/menu_icons/site_template_on.png +0 -0
- data/public/images/menu_icons/survey.png +0 -0
- data/public/images/menu_icons/survey_on.png +0 -0
- data/public/images/menu_icons/users.png +0 -0
- data/public/images/menu_icons/users_on.png +0 -0
- data/public/images/menu_icons/video.png +0 -0
- data/public/images/menu_icons/video_on.png +0 -0
- data/public/index.html +9 -0
- data/public/javascripts/application.js +2 -0
- data/public/javascripts/ckeditor/.htaccess +24 -0
- data/public/javascripts/ckeditor/CHANGES.html +993 -0
- data/public/javascripts/ckeditor/INSTALL.html +92 -0
- data/public/javascripts/ckeditor/LICENSE.html +1334 -0
- data/public/javascripts/ckeditor/_samples/ajax.html +87 -0
- data/public/javascripts/ckeditor/_samples/api.html +152 -0
- data/public/javascripts/ckeditor/_samples/api_dialog.html +188 -0
- data/public/javascripts/ckeditor/_samples/api_dialog/my_dialog.js +28 -0
- data/public/javascripts/ckeditor/_samples/asp/advanced.asp +105 -0
- data/public/javascripts/ckeditor/_samples/asp/events.asp +136 -0
- data/public/javascripts/ckeditor/_samples/asp/index.html +103 -0
- data/public/javascripts/ckeditor/_samples/asp/replace.asp +72 -0
- data/public/javascripts/ckeditor/_samples/asp/replaceall.asp +77 -0
- data/public/javascripts/ckeditor/_samples/asp/sample_posteddata.asp +46 -0
- data/public/javascripts/ckeditor/_samples/asp/standalone.asp +72 -0
- data/public/javascripts/ckeditor/_samples/assets/output_for_flash.fla +0 -0
- data/public/javascripts/ckeditor/_samples/assets/output_for_flash.swf +0 -0
- data/public/javascripts/ckeditor/_samples/assets/output_xhtml.css +204 -0
- data/public/javascripts/ckeditor/_samples/assets/swfobject.js +18 -0
- data/public/javascripts/ckeditor/_samples/autogrow.html +75 -0
- data/public/javascripts/ckeditor/_samples/divreplace.html +137 -0
- data/public/javascripts/ckeditor/_samples/enterkey.html +88 -0
- data/public/javascripts/ckeditor/_samples/fullpage.html +62 -0
- data/public/javascripts/ckeditor/_samples/index.html +57 -0
- data/public/javascripts/ckeditor/_samples/jqueryadapter.html +73 -0
- data/public/javascripts/ckeditor/_samples/output_for_flash.html +257 -0
- data/public/javascripts/ckeditor/_samples/output_html.html +259 -0
- data/public/javascripts/ckeditor/_samples/output_xhtml.html +159 -0
- data/public/javascripts/ckeditor/_samples/php/advanced.php +93 -0
- data/public/javascripts/ckeditor/_samples/php/events.php +130 -0
- data/public/javascripts/ckeditor/_samples/php/replace.php +63 -0
- data/public/javascripts/ckeditor/_samples/php/replaceall.php +68 -0
- data/public/javascripts/ckeditor/_samples/php/standalone.php +64 -0
- data/public/javascripts/ckeditor/_samples/replacebyclass.html +49 -0
- data/public/javascripts/ckeditor/_samples/replacebycode.html +80 -0
- data/public/javascripts/ckeditor/_samples/sample.css +81 -0
- data/public/javascripts/ckeditor/_samples/sample.js +65 -0
- data/public/javascripts/ckeditor/_samples/sample_posteddata.php +59 -0
- data/public/javascripts/ckeditor/_samples/sharedspaces.html +131 -0
- data/public/javascripts/ckeditor/_samples/skins.html +83 -0
- data/public/javascripts/ckeditor/_samples/ui_color.html +87 -0
- data/public/javascripts/ckeditor/_samples/ui_languages.html +103 -0
- data/public/javascripts/ckeditor/_source/adapters/jquery.js +297 -0
- data/public/javascripts/ckeditor/_source/core/_bootstrap.js +96 -0
- data/public/javascripts/ckeditor/_source/core/ajax.js +142 -0
- data/public/javascripts/ckeditor/_source/core/ckeditor.js +133 -0
- data/public/javascripts/ckeditor/_source/core/ckeditor_base.js +196 -0
- data/public/javascripts/ckeditor/_source/core/ckeditor_basic.js +239 -0
- data/public/javascripts/ckeditor/_source/core/command.js +209 -0
- data/public/javascripts/ckeditor/_source/core/commanddefinition.js +129 -0
- data/public/javascripts/ckeditor/_source/core/config.js +430 -0
- data/public/javascripts/ckeditor/_source/core/dataprocessor.js +65 -0
- data/public/javascripts/ckeditor/_source/core/dom.js +20 -0
- data/public/javascripts/ckeditor/_source/core/dom/comment.js +32 -0
- data/public/javascripts/ckeditor/_source/core/dom/document.js +224 -0
- data/public/javascripts/ckeditor/_source/core/dom/documentfragment.js +49 -0
- data/public/javascripts/ckeditor/_source/core/dom/domobject.js +255 -0
- data/public/javascripts/ckeditor/_source/core/dom/element.js +1564 -0
- data/public/javascripts/ckeditor/_source/core/dom/elementpath.js +119 -0
- data/public/javascripts/ckeditor/_source/core/dom/event.js +142 -0
- data/public/javascripts/ckeditor/_source/core/dom/node.js +683 -0
- data/public/javascripts/ckeditor/_source/core/dom/nodelist.js +26 -0
- data/public/javascripts/ckeditor/_source/core/dom/range.js +1883 -0
- data/public/javascripts/ckeditor/_source/core/dom/rangelist.js +214 -0
- data/public/javascripts/ckeditor/_source/core/dom/text.js +123 -0
- data/public/javascripts/ckeditor/_source/core/dom/walker.js +445 -0
- data/public/javascripts/ckeditor/_source/core/dom/window.js +96 -0
- data/public/javascripts/ckeditor/_source/core/dtd.js +238 -0
- data/public/javascripts/ckeditor/_source/core/editor.js +924 -0
- data/public/javascripts/ckeditor/_source/core/editor_basic.js +182 -0
- data/public/javascripts/ckeditor/_source/core/env.js +270 -0
- data/public/javascripts/ckeditor/_source/core/event.js +342 -0
- data/public/javascripts/ckeditor/_source/core/eventInfo.js +120 -0
- data/public/javascripts/ckeditor/_source/core/focusmanager.js +152 -0
- data/public/javascripts/ckeditor/_source/core/htmlparser.js +224 -0
- data/public/javascripts/ckeditor/_source/core/htmlparser/basicwriter.js +145 -0
- data/public/javascripts/ckeditor/_source/core/htmlparser/cdata.js +43 -0
- data/public/javascripts/ckeditor/_source/core/htmlparser/comment.js +60 -0
- data/public/javascripts/ckeditor/_source/core/htmlparser/element.js +240 -0
- data/public/javascripts/ckeditor/_source/core/htmlparser/filter.js +288 -0
- data/public/javascripts/ckeditor/_source/core/htmlparser/fragment.js +504 -0
- data/public/javascripts/ckeditor/_source/core/htmlparser/text.js +55 -0
- data/public/javascripts/ckeditor/_source/core/imagecacher.js +80 -0
- data/public/javascripts/ckeditor/_source/core/lang.js +156 -0
- data/public/javascripts/ckeditor/_source/core/loader.js +243 -0
- data/public/javascripts/ckeditor/_source/core/plugindefinition.js +66 -0
- data/public/javascripts/ckeditor/_source/core/plugins.js +85 -0
- data/public/javascripts/ckeditor/_source/core/resourcemanager.js +238 -0
- data/public/javascripts/ckeditor/_source/core/scriptloader.js +200 -0
- data/public/javascripts/ckeditor/_source/core/skins.js +212 -0
- data/public/javascripts/ckeditor/_source/core/themes.js +19 -0
- data/public/javascripts/ckeditor/_source/core/tools.js +734 -0
- data/public/javascripts/ckeditor/_source/core/ui.js +116 -0
- data/public/javascripts/ckeditor/_source/core/xml.js +165 -0
- data/public/javascripts/ckeditor/_source/lang/_languages.js +83 -0
- data/public/javascripts/ckeditor/_source/lang/_translationstatus.txt +60 -0
- data/public/javascripts/ckeditor/_source/lang/af.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/ar.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/bg.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/bn.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/bs.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/ca.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/cs.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/cy.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/da.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/de.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/el.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/en-au.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/en-ca.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/en-gb.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/en.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/eo.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/es.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/et.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/eu.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/fa.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/fi.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/fo.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/fr-ca.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/fr.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/gl.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/gu.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/he.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/hi.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/hr.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/hu.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/is.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/it.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/ja.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/km.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/ko.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/lt.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/lv.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/mn.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/ms.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/nb.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/nl.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/no.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/pl.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/pt-br.js +757 -0
- data/public/javascripts/ckeditor/_source/lang/pt.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/ro.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/ru.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/sk.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/sl.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/sr-latn.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/sr.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/sv.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/th.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/tr.js +757 -0
- data/public/javascripts/ckeditor/_source/lang/uk.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/vi.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/zh-cn.js +758 -0
- data/public/javascripts/ckeditor/_source/lang/zh.js +758 -0
- data/public/javascripts/ckeditor/_source/plugins/a11yhelp/dialogs/a11yhelp.js +211 -0
- data/public/javascripts/ckeditor/_source/plugins/a11yhelp/lang/en.js +108 -0
- data/public/javascripts/ckeditor/_source/plugins/a11yhelp/lang/he.js +216 -0
- data/public/javascripts/ckeditor/_source/plugins/a11yhelp/plugin.js +46 -0
- data/public/javascripts/ckeditor/_source/plugins/about/dialogs/about.js +73 -0
- data/public/javascripts/ckeditor/_source/plugins/about/dialogs/logo_ckeditor.png +0 -0
- data/public/javascripts/ckeditor/_source/plugins/about/plugin.js +23 -0
- data/public/javascripts/ckeditor/_source/plugins/ajax_save/plugin.js +44 -0
- data/public/javascripts/ckeditor/_source/plugins/attachment/dialogs/attachment.js +384 -0
- data/public/javascripts/ckeditor/_source/plugins/attachment/images/attachment.png +0 -0
- data/public/javascripts/ckeditor/_source/plugins/attachment/lang/en.js +10 -0
- data/public/javascripts/ckeditor/_source/plugins/attachment/lang/ru.js +10 -0
- data/public/javascripts/ckeditor/_source/plugins/attachment/lang/uk.js +10 -0
- data/public/javascripts/ckeditor/_source/plugins/attachment/plugin.js +44 -0
- data/public/javascripts/ckeditor/_source/plugins/autogrow/plugin.js +86 -0
- data/public/javascripts/ckeditor/_source/plugins/basicstyles/plugin.js +101 -0
- data/public/javascripts/ckeditor/_source/plugins/bidi/plugin.js +259 -0
- data/public/javascripts/ckeditor/_source/plugins/blockquote/plugin.js +301 -0
- data/public/javascripts/ckeditor/_source/plugins/button/plugin.js +277 -0
- data/public/javascripts/ckeditor/_source/plugins/clipboard/dialogs/paste.js +205 -0
- data/public/javascripts/ckeditor/_source/plugins/clipboard/plugin.js +412 -0
- data/public/javascripts/ckeditor/_source/plugins/colorbutton/plugin.js +250 -0
- data/public/javascripts/ckeditor/_source/plugins/colordialog/dialogs/colordialog.js +336 -0
- data/public/javascripts/ckeditor/_source/plugins/colordialog/plugin.js +13 -0
- data/public/javascripts/ckeditor/_source/plugins/contextmenu/plugin.js +290 -0
- data/public/javascripts/ckeditor/_source/plugins/dialog/dialogDefinition.js +315 -0
- data/public/javascripts/ckeditor/_source/plugins/dialog/plugin.js +3015 -0
- data/public/javascripts/ckeditor/_source/plugins/dialogadvtab/plugin.js +213 -0
- data/public/javascripts/ckeditor/_source/plugins/dialogui/plugin.js +1523 -0
- data/public/javascripts/ckeditor/_source/plugins/div/dialogs/div.js +535 -0
- data/public/javascripts/ckeditor/_source/plugins/div/plugin.js +121 -0
- data/public/javascripts/ckeditor/_source/plugins/domiterator/plugin.js +356 -0
- data/public/javascripts/ckeditor/_source/plugins/editingblock/plugin.js +229 -0
- data/public/javascripts/ckeditor/_source/plugins/elementspath/plugin.js +206 -0
- data/public/javascripts/ckeditor/_source/plugins/embed/dialogs/embed.js +65 -0
- data/public/javascripts/ckeditor/_source/plugins/embed/images/embed.png +0 -0
- data/public/javascripts/ckeditor/_source/plugins/embed/lang/en.js +9 -0
- data/public/javascripts/ckeditor/_source/plugins/embed/lang/ru.js +9 -0
- data/public/javascripts/ckeditor/_source/plugins/embed/lang/uk.js +9 -0
- data/public/javascripts/ckeditor/_source/plugins/embed/plugin.js +44 -0
- data/public/javascripts/ckeditor/_source/plugins/enterkey/plugin.js +363 -0
- data/public/javascripts/ckeditor/_source/plugins/entities/plugin.js +226 -0
- data/public/javascripts/ckeditor/_source/plugins/fakeobjects/plugin.js +122 -0
- data/public/javascripts/ckeditor/_source/plugins/filebrowser/plugin.js +501 -0
- data/public/javascripts/ckeditor/_source/plugins/find/dialogs/find.js +890 -0
- data/public/javascripts/ckeditor/_source/plugins/find/plugin.js +46 -0
- data/public/javascripts/ckeditor/_source/plugins/flash/dialogs/flash.js +698 -0
- data/public/javascripts/ckeditor/_source/plugins/flash/images/placeholder.png +0 -0
- data/public/javascripts/ckeditor/_source/plugins/flash/plugin.js +168 -0
- data/public/javascripts/ckeditor/_source/plugins/floatpanel/plugin.js +402 -0
- data/public/javascripts/ckeditor/_source/plugins/font/plugin.js +234 -0
- data/public/javascripts/ckeditor/_source/plugins/format/plugin.js +194 -0
- data/public/javascripts/ckeditor/_source/plugins/forms/dialogs/button.js +135 -0
- data/public/javascripts/ckeditor/_source/plugins/forms/dialogs/checkbox.js +153 -0
- data/public/javascripts/ckeditor/_source/plugins/forms/dialogs/form.js +177 -0
- data/public/javascripts/ckeditor/_source/plugins/forms/dialogs/hiddenfield.js +98 -0
- data/public/javascripts/ckeditor/_source/plugins/forms/dialogs/radio.js +135 -0
- data/public/javascripts/ckeditor/_source/plugins/forms/dialogs/select.js +556 -0
- data/public/javascripts/ckeditor/_source/plugins/forms/dialogs/textarea.js +114 -0
- data/public/javascripts/ckeditor/_source/plugins/forms/dialogs/textfield.js +199 -0
- data/public/javascripts/ckeditor/_source/plugins/forms/images/hiddenfield.gif +0 -0
- data/public/javascripts/ckeditor/_source/plugins/forms/plugin.js +284 -0
- data/public/javascripts/ckeditor/_source/plugins/horizontalrule/plugin.js +36 -0
- data/public/javascripts/ckeditor/_source/plugins/htmldataprocessor/plugin.js +502 -0
- data/public/javascripts/ckeditor/_source/plugins/htmlwriter/plugin.js +319 -0
- data/public/javascripts/ckeditor/_source/plugins/iframedialog/plugin.js +136 -0
- data/public/javascripts/ckeditor/_source/plugins/image/dialogs/image.js +1396 -0
- data/public/javascripts/ckeditor/_source/plugins/image/plugin.js +81 -0
- data/public/javascripts/ckeditor/_source/plugins/indent/plugin.js +455 -0
- data/public/javascripts/ckeditor/_source/plugins/justify/plugin.js +221 -0
- data/public/javascripts/ckeditor/_source/plugins/keystrokes/plugin.js +225 -0
- data/public/javascripts/ckeditor/_source/plugins/link/dialogs/anchor.js +99 -0
- data/public/javascripts/ckeditor/_source/plugins/link/dialogs/link.js +1424 -0
- data/public/javascripts/ckeditor/_source/plugins/link/images/anchor.gif +0 -0
- data/public/javascripts/ckeditor/_source/plugins/link/plugin.js +238 -0
- data/public/javascripts/ckeditor/_source/plugins/list/plugin.js +710 -0
- data/public/javascripts/ckeditor/_source/plugins/listblock/plugin.js +257 -0
- data/public/javascripts/ckeditor/_source/plugins/liststyle/dialogs/liststyle.js +204 -0
- data/public/javascripts/ckeditor/_source/plugins/liststyle/plugin.js +66 -0
- data/public/javascripts/ckeditor/_source/plugins/maximize/plugin.js +350 -0
- data/public/javascripts/ckeditor/_source/plugins/menu/plugin.js +408 -0
- data/public/javascripts/ckeditor/_source/plugins/menubutton/plugin.js +94 -0
- data/public/javascripts/ckeditor/_source/plugins/newpage/plugin.js +53 -0
- data/public/javascripts/ckeditor/_source/plugins/pagebreak/images/pagebreak.gif +0 -0
- data/public/javascripts/ckeditor/_source/plugins/pagebreak/plugin.js +121 -0
- data/public/javascripts/ckeditor/_source/plugins/panel/plugin.js +399 -0
- data/public/javascripts/ckeditor/_source/plugins/panelbutton/plugin.js +147 -0
- data/public/javascripts/ckeditor/_source/plugins/pastefromword/filter/default.js +1170 -0
- data/public/javascripts/ckeditor/_source/plugins/pastefromword/plugin.js +122 -0
- data/public/javascripts/ckeditor/_source/plugins/pastetext/dialogs/pastetext.js +70 -0
- data/public/javascripts/ckeditor/_source/plugins/pastetext/plugin.js +145 -0
- data/public/javascripts/ckeditor/_source/plugins/popup/plugin.js +64 -0
- data/public/javascripts/ckeditor/_source/plugins/preview/plugin.js +108 -0
- data/public/javascripts/ckeditor/_source/plugins/print/plugin.js +41 -0
- data/public/javascripts/ckeditor/_source/plugins/removeformat/plugin.js +184 -0
- data/public/javascripts/ckeditor/_source/plugins/resize/plugin.js +157 -0
- data/public/javascripts/ckeditor/_source/plugins/richcombo/plugin.js +370 -0
- data/public/javascripts/ckeditor/_source/plugins/save/plugin.js +55 -0
- data/public/javascripts/ckeditor/_source/plugins/scayt/dialogs/options.js +534 -0
- data/public/javascripts/ckeditor/_source/plugins/scayt/dialogs/toolbar.css +71 -0
- data/public/javascripts/ckeditor/_source/plugins/scayt/plugin.js +945 -0
- data/public/javascripts/ckeditor/_source/plugins/selection/plugin.js +1375 -0
- data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_address.png +0 -0
- data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_blockquote.png +0 -0
- data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_div.png +0 -0
- data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_h1.png +0 -0
- data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_h2.png +0 -0
- data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_h3.png +0 -0
- data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_h4.png +0 -0
- data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_h5.png +0 -0
- data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_h6.png +0 -0
- data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_p.png +0 -0
- data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_pre.png +0 -0
- data/public/javascripts/ckeditor/_source/plugins/showblocks/plugin.js +155 -0
- data/public/javascripts/ckeditor/_source/plugins/showborders/plugin.js +201 -0
- data/public/javascripts/ckeditor/_source/plugins/smiley/dialogs/smiley.js +218 -0
- data/public/javascripts/ckeditor/_source/plugins/smiley/images/angel_smile.gif +0 -0
- data/public/javascripts/ckeditor/_source/plugins/smiley/images/angry_smile.gif +0 -0
- data/public/javascripts/ckeditor/_source/plugins/smiley/images/broken_heart.gif +0 -0
- data/public/javascripts/ckeditor/_source/plugins/smiley/images/confused_smile.gif +0 -0
- data/public/javascripts/ckeditor/_source/plugins/smiley/images/cry_smile.gif +0 -0
- data/public/javascripts/ckeditor/_source/plugins/smiley/images/devil_smile.gif +0 -0
- data/public/javascripts/ckeditor/_source/plugins/smiley/images/embaressed_smile.gif +0 -0
- data/public/javascripts/ckeditor/_source/plugins/smiley/images/envelope.gif +0 -0
- data/public/javascripts/ckeditor/_source/plugins/smiley/images/heart.gif +0 -0
- data/public/javascripts/ckeditor/_source/plugins/smiley/images/kiss.gif +0 -0
- data/public/javascripts/ckeditor/_source/plugins/smiley/images/lightbulb.gif +0 -0
- data/public/javascripts/ckeditor/_source/plugins/smiley/images/omg_smile.gif +0 -0
- data/public/javascripts/ckeditor/_source/plugins/smiley/images/regular_smile.gif +0 -0
- data/public/javascripts/ckeditor/_source/plugins/smiley/images/sad_smile.gif +0 -0
- data/public/javascripts/ckeditor/_source/plugins/smiley/images/shades_smile.gif +0 -0
- data/public/javascripts/ckeditor/_source/plugins/smiley/images/teeth_smile.gif +0 -0
- data/public/javascripts/ckeditor/_source/plugins/smiley/images/thumbs_down.gif +0 -0
- data/public/javascripts/ckeditor/_source/plugins/smiley/images/thumbs_up.gif +0 -0
- data/public/javascripts/ckeditor/_source/plugins/smiley/images/tounge_smile.gif +0 -0
- data/public/javascripts/ckeditor/_source/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
- data/public/javascripts/ckeditor/_source/plugins/smiley/images/wink_smile.gif +0 -0
- data/public/javascripts/ckeditor/_source/plugins/smiley/plugin.js +94 -0
- data/public/javascripts/ckeditor/_source/plugins/sourcearea/plugin.js +207 -0
- data/public/javascripts/ckeditor/_source/plugins/specialchar/dialogs/specialchar.js +409 -0
- data/public/javascripts/ckeditor/_source/plugins/specialchar/plugin.js +29 -0
- data/public/javascripts/ckeditor/_source/plugins/styles/plugin.js +1479 -0
- data/public/javascripts/ckeditor/_source/plugins/styles/styles/default.js +88 -0
- data/public/javascripts/ckeditor/_source/plugins/stylescombo/plugin.js +206 -0
- data/public/javascripts/ckeditor/_source/plugins/tab/plugin.js +367 -0
- data/public/javascripts/ckeditor/_source/plugins/table/dialogs/table.js +672 -0
- data/public/javascripts/ckeditor/_source/plugins/table/plugin.js +78 -0
- data/public/javascripts/ckeditor/_source/plugins/tableresize/plugin.js +450 -0
- data/public/javascripts/ckeditor/_source/plugins/tabletools/dialogs/tableCell.js +533 -0
- data/public/javascripts/ckeditor/_source/plugins/tabletools/plugin.js +1120 -0
- data/public/javascripts/ckeditor/_source/plugins/templates/dialogs/templates.js +233 -0
- data/public/javascripts/ckeditor/_source/plugins/templates/plugin.js +99 -0
- data/public/javascripts/ckeditor/_source/plugins/templates/templates/default.js +94 -0
- data/public/javascripts/ckeditor/_source/plugins/templates/templates/images/template1.gif +0 -0
- data/public/javascripts/ckeditor/_source/plugins/templates/templates/images/template2.gif +0 -0
- data/public/javascripts/ckeditor/_source/plugins/templates/templates/images/template3.gif +0 -0
- data/public/javascripts/ckeditor/_source/plugins/toolbar/plugin.js +481 -0
- data/public/javascripts/ckeditor/_source/plugins/uicolor/dialogs/uicolor.js +205 -0
- data/public/javascripts/ckeditor/_source/plugins/uicolor/lang/en.js +15 -0
- data/public/javascripts/ckeditor/_source/plugins/uicolor/lang/he.js +15 -0
- data/public/javascripts/ckeditor/_source/plugins/uicolor/plugin.js +37 -0
- data/public/javascripts/ckeditor/_source/plugins/uicolor/uicolor.gif +0 -0
- data/public/javascripts/ckeditor/_source/plugins/uicolor/yui/assets/hue_bg.png +0 -0
- data/public/javascripts/ckeditor/_source/plugins/uicolor/yui/assets/hue_thumb.png +0 -0
- data/public/javascripts/ckeditor/_source/plugins/uicolor/yui/assets/picker_mask.png +0 -0
- data/public/javascripts/ckeditor/_source/plugins/uicolor/yui/assets/picker_thumb.png +0 -0
- data/public/javascripts/ckeditor/_source/plugins/uicolor/yui/assets/yui.css +15 -0
- data/public/javascripts/ckeditor/_source/plugins/uicolor/yui/yui.js +71 -0
- data/public/javascripts/ckeditor/_source/plugins/undo/plugin.js +554 -0
- data/public/javascripts/ckeditor/_source/plugins/wsc/dialogs/ciframe.html +49 -0
- data/public/javascripts/ckeditor/_source/plugins/wsc/dialogs/tmpFrameset.html +52 -0
- data/public/javascripts/ckeditor/_source/plugins/wsc/dialogs/wsc.css +82 -0
- data/public/javascripts/ckeditor/_source/plugins/wsc/dialogs/wsc.js +176 -0
- data/public/javascripts/ckeditor/_source/plugins/wsc/plugin.js +33 -0
- data/public/javascripts/ckeditor/_source/plugins/wysiwygarea/plugin.js +1146 -0
- data/public/javascripts/ckeditor/_source/skins/kama/dialog.css +882 -0
- data/public/javascripts/ckeditor/_source/skins/kama/editor.css +25 -0
- data/public/javascripts/ckeditor/_source/skins/kama/elementspath.css +73 -0
- data/public/javascripts/ckeditor/_source/skins/kama/icons.css +357 -0
- data/public/javascripts/ckeditor/_source/skins/kama/icons.png +0 -0
- data/public/javascripts/ckeditor/_source/skins/kama/icons_rtl.png +0 -0
- data/public/javascripts/ckeditor/_source/skins/kama/images/dialog_sides.gif +0 -0
- data/public/javascripts/ckeditor/_source/skins/kama/images/dialog_sides.png +0 -0
- data/public/javascripts/ckeditor/_source/skins/kama/images/dialog_sides_rtl.png +0 -0
- data/public/javascripts/ckeditor/_source/skins/kama/images/mini.gif +0 -0
- data/public/javascripts/ckeditor/_source/skins/kama/images/noimage.png +0 -0
- data/public/javascripts/ckeditor/_source/skins/kama/images/sprites.png +0 -0
- data/public/javascripts/ckeditor/_source/skins/kama/images/sprites_ie6.png +0 -0
- data/public/javascripts/ckeditor/_source/skins/kama/images/toolbar_start.gif +0 -0
- data/public/javascripts/ckeditor/_source/skins/kama/mainui.css +195 -0
- data/public/javascripts/ckeditor/_source/skins/kama/menu.css +216 -0
- data/public/javascripts/ckeditor/_source/skins/kama/panel.css +217 -0
- data/public/javascripts/ckeditor/_source/skins/kama/presets.css +49 -0
- data/public/javascripts/ckeditor/_source/skins/kama/reset.css +84 -0
- data/public/javascripts/ckeditor/_source/skins/kama/richcombo.css +277 -0
- data/public/javascripts/ckeditor/_source/skins/kama/skin.js +268 -0
- data/public/javascripts/ckeditor/_source/skins/kama/templates.css +88 -0
- data/public/javascripts/ckeditor/_source/skins/kama/toolbar.css +409 -0
- data/public/javascripts/ckeditor/_source/skins/office2003/dialog.css +785 -0
- data/public/javascripts/ckeditor/_source/skins/office2003/editor.css +25 -0
- data/public/javascripts/ckeditor/_source/skins/office2003/elementspath.css +74 -0
- data/public/javascripts/ckeditor/_source/skins/office2003/icons.css +354 -0
- data/public/javascripts/ckeditor/_source/skins/office2003/icons.png +0 -0
- data/public/javascripts/ckeditor/_source/skins/office2003/icons_rtl.png +0 -0
- data/public/javascripts/ckeditor/_source/skins/office2003/images/dialog_sides.gif +0 -0
- data/public/javascripts/ckeditor/_source/skins/office2003/images/dialog_sides.png +0 -0
- data/public/javascripts/ckeditor/_source/skins/office2003/images/dialog_sides_rtl.png +0 -0
- data/public/javascripts/ckeditor/_source/skins/office2003/images/mini.gif +0 -0
- data/public/javascripts/ckeditor/_source/skins/office2003/images/noimage.png +0 -0
- data/public/javascripts/ckeditor/_source/skins/office2003/images/sprites.png +0 -0
- data/public/javascripts/ckeditor/_source/skins/office2003/images/sprites_ie6.png +0 -0
- data/public/javascripts/ckeditor/_source/skins/office2003/mainui.css +145 -0
- data/public/javascripts/ckeditor/_source/skins/office2003/menu.css +213 -0
- data/public/javascripts/ckeditor/_source/skins/office2003/panel.css +212 -0
- data/public/javascripts/ckeditor/_source/skins/office2003/presets.css +49 -0
- data/public/javascripts/ckeditor/_source/skins/office2003/reset.css +84 -0
- data/public/javascripts/ckeditor/_source/skins/office2003/richcombo.css +297 -0
- data/public/javascripts/ckeditor/_source/skins/office2003/skin.js +81 -0
- data/public/javascripts/ckeditor/_source/skins/office2003/templates.css +87 -0
- data/public/javascripts/ckeditor/_source/skins/office2003/toolbar.css +470 -0
- data/public/javascripts/ckeditor/_source/skins/v2/dialog.css +800 -0
- data/public/javascripts/ckeditor/_source/skins/v2/editor.css +25 -0
- data/public/javascripts/ckeditor/_source/skins/v2/elementspath.css +74 -0
- data/public/javascripts/ckeditor/_source/skins/v2/icons.css +354 -0
- data/public/javascripts/ckeditor/_source/skins/v2/icons.png +0 -0
- data/public/javascripts/ckeditor/_source/skins/v2/icons_rtl.png +0 -0
- data/public/javascripts/ckeditor/_source/skins/v2/images/dialog_sides.gif +0 -0
- data/public/javascripts/ckeditor/_source/skins/v2/images/dialog_sides.png +0 -0
- data/public/javascripts/ckeditor/_source/skins/v2/images/dialog_sides_rtl.png +0 -0
- data/public/javascripts/ckeditor/_source/skins/v2/images/mini.gif +0 -0
- data/public/javascripts/ckeditor/_source/skins/v2/images/noimage.png +0 -0
- data/public/javascripts/ckeditor/_source/skins/v2/images/sprites.png +0 -0
- data/public/javascripts/ckeditor/_source/skins/v2/images/sprites_ie6.png +0 -0
- data/public/javascripts/ckeditor/_source/skins/v2/images/toolbar_start.gif +0 -0
- data/public/javascripts/ckeditor/_source/skins/v2/mainui.css +154 -0
- data/public/javascripts/ckeditor/_source/skins/v2/menu.css +215 -0
- data/public/javascripts/ckeditor/_source/skins/v2/panel.css +212 -0
- data/public/javascripts/ckeditor/_source/skins/v2/presets.css +50 -0
- data/public/javascripts/ckeditor/_source/skins/v2/reset.css +84 -0
- data/public/javascripts/ckeditor/_source/skins/v2/richcombo.css +297 -0
- data/public/javascripts/ckeditor/_source/skins/v2/skin.js +77 -0
- data/public/javascripts/ckeditor/_source/skins/v2/templates.css +87 -0
- data/public/javascripts/ckeditor/_source/skins/v2/toolbar.css +423 -0
- data/public/javascripts/ckeditor/_source/themes/default/theme.js +361 -0
- data/public/javascripts/ckeditor/adapters/jquery.js +6 -0
- data/public/javascripts/ckeditor/ckeditor.js +137 -0
- data/public/javascripts/ckeditor/ckeditor.pack +211 -0
- data/public/javascripts/ckeditor/ckeditor_basic.js +8 -0
- data/public/javascripts/ckeditor/ckeditor_basic_source.js +20 -0
- data/public/javascripts/ckeditor/ckeditor_source.js +25 -0
- data/public/javascripts/ckeditor/config.js +43 -0
- data/public/javascripts/ckeditor/contents.css +39 -0
- data/public/javascripts/ckeditor/css/ckfinder.css +299 -0
- data/public/javascripts/ckeditor/css/fck_dialog.css +119 -0
- data/public/javascripts/ckeditor/css/fck_editor.css +448 -0
- data/public/javascripts/ckeditor/css/swfupload.css +94 -0
- data/public/javascripts/ckeditor/images/add.gif +0 -0
- data/public/javascripts/ckeditor/images/cancelbutton.gif +0 -0
- data/public/javascripts/ckeditor/images/ckfnothumb.gif +0 -0
- data/public/javascripts/ckeditor/images/doc.gif +0 -0
- data/public/javascripts/ckeditor/images/mp3.gif +0 -0
- data/public/javascripts/ckeditor/images/pdf.gif +0 -0
- data/public/javascripts/ckeditor/images/rar.gif +0 -0
- data/public/javascripts/ckeditor/images/refresh.gif +0 -0
- data/public/javascripts/ckeditor/images/select_files.png +0 -0
- data/public/javascripts/ckeditor/images/spacer.gif +0 -0
- data/public/javascripts/ckeditor/images/swf.gif +0 -0
- data/public/javascripts/ckeditor/images/toolbar.start.gif +0 -0
- data/public/javascripts/ckeditor/images/xls.gif +0 -0
- data/public/javascripts/ckeditor/lang/_languages.js +6 -0
- data/public/javascripts/ckeditor/lang/_translationstatus.txt +60 -0
- data/public/javascripts/ckeditor/lang/af.js +6 -0
- data/public/javascripts/ckeditor/lang/ar.js +6 -0
- data/public/javascripts/ckeditor/lang/bg.js +6 -0
- data/public/javascripts/ckeditor/lang/bn.js +6 -0
- data/public/javascripts/ckeditor/lang/bs.js +6 -0
- data/public/javascripts/ckeditor/lang/ca.js +6 -0
- data/public/javascripts/ckeditor/lang/cs.js +6 -0
- data/public/javascripts/ckeditor/lang/cy.js +6 -0
- data/public/javascripts/ckeditor/lang/da.js +6 -0
- data/public/javascripts/ckeditor/lang/de.js +6 -0
- data/public/javascripts/ckeditor/lang/el.js +6 -0
- data/public/javascripts/ckeditor/lang/en-au.js +6 -0
- data/public/javascripts/ckeditor/lang/en-ca.js +6 -0
- data/public/javascripts/ckeditor/lang/en-gb.js +6 -0
- data/public/javascripts/ckeditor/lang/en.js +6 -0
- data/public/javascripts/ckeditor/lang/eo.js +6 -0
- data/public/javascripts/ckeditor/lang/es.js +6 -0
- data/public/javascripts/ckeditor/lang/et.js +6 -0
- data/public/javascripts/ckeditor/lang/eu.js +6 -0
- data/public/javascripts/ckeditor/lang/fa.js +6 -0
- data/public/javascripts/ckeditor/lang/fi.js +6 -0
- data/public/javascripts/ckeditor/lang/fo.js +6 -0
- data/public/javascripts/ckeditor/lang/fr-ca.js +6 -0
- data/public/javascripts/ckeditor/lang/fr.js +6 -0
- data/public/javascripts/ckeditor/lang/gl.js +6 -0
- data/public/javascripts/ckeditor/lang/gu.js +6 -0
- data/public/javascripts/ckeditor/lang/he.js +6 -0
- data/public/javascripts/ckeditor/lang/hi.js +6 -0
- data/public/javascripts/ckeditor/lang/hr.js +6 -0
- data/public/javascripts/ckeditor/lang/hu.js +6 -0
- data/public/javascripts/ckeditor/lang/is.js +6 -0
- data/public/javascripts/ckeditor/lang/it.js +6 -0
- data/public/javascripts/ckeditor/lang/ja.js +6 -0
- data/public/javascripts/ckeditor/lang/km.js +6 -0
- data/public/javascripts/ckeditor/lang/ko.js +6 -0
- data/public/javascripts/ckeditor/lang/lt.js +6 -0
- data/public/javascripts/ckeditor/lang/lv.js +6 -0
- data/public/javascripts/ckeditor/lang/mn.js +6 -0
- data/public/javascripts/ckeditor/lang/ms.js +6 -0
- data/public/javascripts/ckeditor/lang/nb.js +6 -0
- data/public/javascripts/ckeditor/lang/nl.js +6 -0
- data/public/javascripts/ckeditor/lang/no.js +6 -0
- data/public/javascripts/ckeditor/lang/pl.js +6 -0
- data/public/javascripts/ckeditor/lang/pt-br.js +6 -0
- data/public/javascripts/ckeditor/lang/pt.js +6 -0
- data/public/javascripts/ckeditor/lang/ro.js +6 -0
- data/public/javascripts/ckeditor/lang/ru.js +6 -0
- data/public/javascripts/ckeditor/lang/sk.js +6 -0
- data/public/javascripts/ckeditor/lang/sl.js +6 -0
- data/public/javascripts/ckeditor/lang/sr-latn.js +6 -0
- data/public/javascripts/ckeditor/lang/sr.js +6 -0
- data/public/javascripts/ckeditor/lang/sv.js +6 -0
- data/public/javascripts/ckeditor/lang/th.js +6 -0
- data/public/javascripts/ckeditor/lang/tr.js +6 -0
- data/public/javascripts/ckeditor/lang/uk.js +6 -0
- data/public/javascripts/ckeditor/lang/vi.js +6 -0
- data/public/javascripts/ckeditor/lang/zh-cn.js +6 -0
- data/public/javascripts/ckeditor/lang/zh.js +6 -0
- data/public/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +7 -0
- data/public/javascripts/ckeditor/plugins/a11yhelp/lang/en.js +6 -0
- data/public/javascripts/ckeditor/plugins/a11yhelp/lang/he.js +6 -0
- data/public/javascripts/ckeditor/plugins/about/dialogs/about.js +6 -0
- data/public/javascripts/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
- data/public/javascripts/ckeditor/plugins/ajax_save/plugin.js +1 -0
- data/public/javascripts/ckeditor/plugins/attachment/dialogs/attachment.js +1 -0
- data/public/javascripts/ckeditor/plugins/attachment/images/attachment.png +0 -0
- data/public/javascripts/ckeditor/plugins/attachment/lang/en.js +10 -0
- data/public/javascripts/ckeditor/plugins/attachment/lang/ru.js +10 -0
- data/public/javascripts/ckeditor/plugins/attachment/lang/uk.js +10 -0
- data/public/javascripts/ckeditor/plugins/attachment/plugin.js +1 -0
- data/public/javascripts/ckeditor/plugins/autogrow/plugin.js +6 -0
- data/public/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +7 -0
- data/public/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +7 -0
- data/public/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +4 -0
- data/public/javascripts/ckeditor/plugins/div/dialogs/div.js +8 -0
- data/public/javascripts/ckeditor/plugins/embed/dialogs/embed.js +1 -0
- data/public/javascripts/ckeditor/plugins/embed/images/embed.png +0 -0
- data/public/javascripts/ckeditor/plugins/embed/lang/en.js +9 -0
- data/public/javascripts/ckeditor/plugins/embed/lang/ru.js +9 -0
- data/public/javascripts/ckeditor/plugins/embed/lang/uk.js +9 -0
- data/public/javascripts/ckeditor/plugins/embed/plugin.js +1 -0
- data/public/javascripts/ckeditor/plugins/find/dialogs/find.js +9 -0
- data/public/javascripts/ckeditor/plugins/flash/dialogs/flash.js +9 -0
- data/public/javascripts/ckeditor/plugins/flash/images/placeholder.png +0 -0
- data/public/javascripts/ckeditor/plugins/forms/dialogs/button.js +6 -0
- data/public/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +6 -0
- data/public/javascripts/ckeditor/plugins/forms/dialogs/form.js +6 -0
- data/public/javascripts/ckeditor/plugins/forms/dialogs/hiddenfield.js +6 -0
- data/public/javascripts/ckeditor/plugins/forms/dialogs/radio.js +6 -0
- data/public/javascripts/ckeditor/plugins/forms/dialogs/select.js +9 -0
- data/public/javascripts/ckeditor/plugins/forms/dialogs/textarea.js +6 -0
- data/public/javascripts/ckeditor/plugins/forms/dialogs/textfield.js +7 -0
- data/public/javascripts/ckeditor/plugins/forms/images/hiddenfield.gif +0 -0
- data/public/javascripts/ckeditor/plugins/iframedialog/plugin.js +6 -0
- data/public/javascripts/ckeditor/plugins/image/dialogs/image.js +13 -0
- data/public/javascripts/ckeditor/plugins/link/dialogs/anchor.js +6 -0
- data/public/javascripts/ckeditor/plugins/link/dialogs/link.js +11 -0
- data/public/javascripts/ckeditor/plugins/link/images/anchor.gif +0 -0
- data/public/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +6 -0
- data/public/javascripts/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
- data/public/javascripts/ckeditor/plugins/pastefromword/filter/default.js +10 -0
- data/public/javascripts/ckeditor/plugins/pastetext/dialogs/pastetext.js +6 -0
- data/public/javascripts/ckeditor/plugins/scayt/dialogs/options.js +8 -0
- data/public/javascripts/ckeditor/plugins/scayt/dialogs/toolbar.css +6 -0
- data/public/javascripts/ckeditor/plugins/showblocks/images/block_address.png +0 -0
- data/public/javascripts/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
- data/public/javascripts/ckeditor/plugins/showblocks/images/block_div.png +0 -0
- data/public/javascripts/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
- data/public/javascripts/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
- data/public/javascripts/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
- data/public/javascripts/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
- data/public/javascripts/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
- data/public/javascripts/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
- data/public/javascripts/ckeditor/plugins/showblocks/images/block_p.png +0 -0
- data/public/javascripts/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
- data/public/javascripts/ckeditor/plugins/smiley/dialogs/smiley.js +7 -0
- data/public/javascripts/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
- data/public/javascripts/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
- data/public/javascripts/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
- data/public/javascripts/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
- data/public/javascripts/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
- data/public/javascripts/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
- data/public/javascripts/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
- data/public/javascripts/ckeditor/plugins/smiley/images/envelope.gif +0 -0
- data/public/javascripts/ckeditor/plugins/smiley/images/heart.gif +0 -0
- data/public/javascripts/ckeditor/plugins/smiley/images/kiss.gif +0 -0
- data/public/javascripts/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
- data/public/javascripts/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
- data/public/javascripts/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
- data/public/javascripts/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
- data/public/javascripts/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
- data/public/javascripts/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
- data/public/javascripts/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
- data/public/javascripts/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
- data/public/javascripts/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
- data/public/javascripts/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
- data/public/javascripts/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
- data/public/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +7 -0
- data/public/javascripts/ckeditor/plugins/styles/styles/default.js +6 -0
- data/public/javascripts/ckeditor/plugins/table/dialogs/table.js +9 -0
- data/public/javascripts/ckeditor/plugins/tableresize/plugin.js +7 -0
- data/public/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +8 -0
- data/public/javascripts/ckeditor/plugins/templates/dialogs/templates.js +7 -0
- data/public/javascripts/ckeditor/plugins/templates/templates/default.js +6 -0
- data/public/javascripts/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
- data/public/javascripts/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
- data/public/javascripts/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
- data/public/javascripts/ckeditor/plugins/uicolor/dialogs/uicolor.js +7 -0
- data/public/javascripts/ckeditor/plugins/uicolor/lang/en.js +6 -0
- data/public/javascripts/ckeditor/plugins/uicolor/lang/he.js +6 -0
- data/public/javascripts/ckeditor/plugins/uicolor/plugin.js +6 -0
- data/public/javascripts/ckeditor/plugins/uicolor/uicolor.gif +0 -0
- data/public/javascripts/ckeditor/plugins/uicolor/yui/assets/hue_bg.png +0 -0
- data/public/javascripts/ckeditor/plugins/uicolor/yui/assets/hue_thumb.png +0 -0
- data/public/javascripts/ckeditor/plugins/uicolor/yui/assets/picker_mask.png +0 -0
- data/public/javascripts/ckeditor/plugins/uicolor/yui/assets/picker_thumb.png +0 -0
- data/public/javascripts/ckeditor/plugins/uicolor/yui/assets/yui.css +6 -0
- data/public/javascripts/ckeditor/plugins/uicolor/yui/yui.js +76 -0
- data/public/javascripts/ckeditor/plugins/wsc/dialogs/ciframe.html +49 -0
- data/public/javascripts/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +52 -0
- data/public/javascripts/ckeditor/plugins/wsc/dialogs/wsc.css +6 -0
- data/public/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +7 -0
- data/public/javascripts/ckeditor/skins/kama/dialog.css +9 -0
- data/public/javascripts/ckeditor/skins/kama/editor.css +12 -0
- data/public/javascripts/ckeditor/skins/kama/icons.png +0 -0
- data/public/javascripts/ckeditor/skins/kama/icons_rtl.png +0 -0
- data/public/javascripts/ckeditor/skins/kama/images/dialog_sides.gif +0 -0
- data/public/javascripts/ckeditor/skins/kama/images/dialog_sides.png +0 -0
- data/public/javascripts/ckeditor/skins/kama/images/dialog_sides_rtl.png +0 -0
- data/public/javascripts/ckeditor/skins/kama/images/mini.gif +0 -0
- data/public/javascripts/ckeditor/skins/kama/images/noimage.png +0 -0
- data/public/javascripts/ckeditor/skins/kama/images/sprites.png +0 -0
- data/public/javascripts/ckeditor/skins/kama/images/sprites_ie6.png +0 -0
- data/public/javascripts/ckeditor/skins/kama/images/toolbar_start.gif +0 -0
- data/public/javascripts/ckeditor/skins/kama/skin.js +7 -0
- data/public/javascripts/ckeditor/skins/kama/templates.css +6 -0
- data/public/javascripts/ckeditor/skins/office2003/dialog.css +9 -0
- data/public/javascripts/ckeditor/skins/office2003/editor.css +13 -0
- data/public/javascripts/ckeditor/skins/office2003/icons.png +0 -0
- data/public/javascripts/ckeditor/skins/office2003/icons_rtl.png +0 -0
- data/public/javascripts/ckeditor/skins/office2003/images/dialog_sides.gif +0 -0
- data/public/javascripts/ckeditor/skins/office2003/images/dialog_sides.png +0 -0
- data/public/javascripts/ckeditor/skins/office2003/images/dialog_sides_rtl.png +0 -0
- data/public/javascripts/ckeditor/skins/office2003/images/mini.gif +0 -0
- data/public/javascripts/ckeditor/skins/office2003/images/noimage.png +0 -0
- data/public/javascripts/ckeditor/skins/office2003/images/sprites.png +0 -0
- data/public/javascripts/ckeditor/skins/office2003/images/sprites_ie6.png +0 -0
- data/public/javascripts/ckeditor/skins/office2003/skin.js +6 -0
- data/public/javascripts/ckeditor/skins/office2003/templates.css +6 -0
- data/public/javascripts/ckeditor/skins/v2/dialog.css +9 -0
- data/public/javascripts/ckeditor/skins/v2/editor.css +12 -0
- data/public/javascripts/ckeditor/skins/v2/icons.png +0 -0
- data/public/javascripts/ckeditor/skins/v2/icons_rtl.png +0 -0
- data/public/javascripts/ckeditor/skins/v2/images/dialog_sides.gif +0 -0
- data/public/javascripts/ckeditor/skins/v2/images/dialog_sides.png +0 -0
- data/public/javascripts/ckeditor/skins/v2/images/dialog_sides_rtl.png +0 -0
- data/public/javascripts/ckeditor/skins/v2/images/mini.gif +0 -0
- data/public/javascripts/ckeditor/skins/v2/images/noimage.png +0 -0
- data/public/javascripts/ckeditor/skins/v2/images/sprites.png +0 -0
- data/public/javascripts/ckeditor/skins/v2/images/sprites_ie6.png +0 -0
- data/public/javascripts/ckeditor/skins/v2/images/toolbar_start.gif +0 -0
- data/public/javascripts/ckeditor/skins/v2/skin.js +6 -0
- data/public/javascripts/ckeditor/skins/v2/templates.css +6 -0
- data/public/javascripts/ckeditor/swfupload/fileprogress.js +275 -0
- data/public/javascripts/ckeditor/swfupload/handlers.js +170 -0
- data/public/javascripts/ckeditor/swfupload/mootools-1.2.3-core-yc.js +356 -0
- data/public/javascripts/ckeditor/swfupload/querystring.js +40 -0
- data/public/javascripts/ckeditor/swfupload/swfupload.js +1 -0
- data/public/javascripts/ckeditor/swfupload/swfupload.queue.js +1 -0
- data/public/javascripts/ckeditor/swfupload/swfupload.swf +0 -0
- data/public/javascripts/ckeditor/swfupload/swfupload.swfobject.js +111 -0
- data/public/javascripts/ckeditor/themes/default/theme.js +8 -0
- data/public/javascripts/controls.js +965 -0
- data/public/javascripts/dragdrop.js +974 -0
- data/public/javascripts/effects.js +1123 -0
- data/public/javascripts/link_obfuscator.js +31 -0
- data/public/javascripts/prototype.js +6001 -0
- data/public/javascripts/rails.js +175 -0
- data/public/robots.txt +5 -0
- data/public/stylesheets/.gitkeep +0 -0
- data/public/stylesheets/application.css +882 -0
- data/public/stylesheets/core.css +1147 -0
- data/public/stylesheets/core_ie.css +52 -0
- data/public/stylesheets/csshover3.htc +14 -0
- data/public/stylesheets/ppc_logic.css +98 -0
- data/script/rails +6 -0
- data/spec/blueprints.rb +25 -0
- data/spec/controllers/ads_controller_spec.rb +60 -0
- data/spec/controllers/branches_controller_spec.rb +60 -0
- data/spec/controllers/campaigns_controller_spec.rb +60 -0
- data/spec/controllers/landing_pages_controller_spec.rb +60 -0
- data/spec/controllers/local_offers_controller_spec.rb +60 -0
- data/spec/lib/madmen/google/ad_spec.rb +115 -0
- data/spec/lib/madmen/google/adgroup_spec.rb +106 -0
- data/spec/lib/madmen/google/campaign_spec.rb +171 -0
- data/spec/lib/madmen/google/keyword_spec.rb +105 -0
- data/spec/models/ad_spec.rb +26 -0
- data/spec/models/branch_spec.rb +4 -0
- data/spec/models/campaign_spec.rb +8 -0
- data/spec/models/landing_page_spec.rb +103 -0
- data/spec/models/local_offer_spec.rb +7 -0
- data/spec/spec_helper.rb +10 -0
- data/tasks/ppc_logic.rake +27 -0
- data/vendor/plugins/.gitkeep +0 -0
- metadata +1120 -0
@@ -0,0 +1,40 @@
|
|
1
|
+
/* Client-side access to querystring name=value pairs
|
2
|
+
Version 1.3
|
3
|
+
28 May 2008
|
4
|
+
|
5
|
+
License (Simplified BSD):
|
6
|
+
http://adamv.com/dev/javascript/qslicense.txt
|
7
|
+
*/
|
8
|
+
function Querystring(qs) { // optionally pass a querystring to parse
|
9
|
+
this.params = {};
|
10
|
+
|
11
|
+
if (qs == null) qs = location.search.substring(1, location.search.length);
|
12
|
+
if (qs.length == 0) return;
|
13
|
+
|
14
|
+
// Turn <plus> back to <space>
|
15
|
+
// See: http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13.4.1
|
16
|
+
qs = qs.replace(/\+/g, ' ');
|
17
|
+
var args = qs.split('&'); // parse out name/value pairs separated via &
|
18
|
+
|
19
|
+
// split out each name=value pair
|
20
|
+
for (var i = 0; i < args.length; i++) {
|
21
|
+
var pair = args[i].split('=');
|
22
|
+
var name = decodeURIComponent(pair[0]);
|
23
|
+
|
24
|
+
var value = (pair.length==2)
|
25
|
+
? decodeURIComponent(pair[1])
|
26
|
+
: name;
|
27
|
+
|
28
|
+
this.params[name] = value;
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
32
|
+
Querystring.prototype.get = function(key, default_) {
|
33
|
+
var value = this.params[key];
|
34
|
+
return (value != null) ? value : default_;
|
35
|
+
}
|
36
|
+
|
37
|
+
Querystring.prototype.contains = function(key) {
|
38
|
+
var value = this.params[key];
|
39
|
+
return (value != null);
|
40
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
var SWFUpload;if(SWFUpload==undefined){SWFUpload=function(settings){this.initSWFUpload(settings)}}SWFUpload.prototype.initSWFUpload=function(settings){try{this.customSettings={};this.settings=settings;this.eventQueue=[];this.movieName="SWFUpload_"+SWFUpload.movieCount++;this.movieElement=null;SWFUpload.instances[this.movieName]=this;this.initSettings();this.loadFlash();this.displayDebugInfo()}catch(ex){delete SWFUpload.instances[this.movieName];throw ex;}};SWFUpload.instances={};SWFUpload.movieCount=0;SWFUpload.version="2.2.0 2009-03-25";SWFUpload.QUEUE_ERROR={QUEUE_LIMIT_EXCEEDED:-100,FILE_EXCEEDS_SIZE_LIMIT:-110,ZERO_BYTE_FILE:-120,INVALID_FILETYPE:-130};SWFUpload.UPLOAD_ERROR={HTTP_ERROR:-200,MISSING_UPLOAD_URL:-210,IO_ERROR:-220,SECURITY_ERROR:-230,UPLOAD_LIMIT_EXCEEDED:-240,UPLOAD_FAILED:-250,SPECIFIED_FILE_ID_NOT_FOUND:-260,FILE_VALIDATION_FAILED:-270,FILE_CANCELLED:-280,UPLOAD_STOPPED:-290};SWFUpload.FILE_STATUS={QUEUED:-1,IN_PROGRESS:-2,ERROR:-3,COMPLETE:-4,CANCELLED:-5};SWFUpload.BUTTON_ACTION={SELECT_FILE:-100,SELECT_FILES:-110,START_UPLOAD:-120};SWFUpload.CURSOR={ARROW:-1,HAND:-2};SWFUpload.WINDOW_MODE={WINDOW:"window",TRANSPARENT:"transparent",OPAQUE:"opaque"};SWFUpload.completeURL=function(url){if(typeof(url)!=="string"||url.match(/^https?:\/\//i)||url.match(/^\//)){return url}var currentURL=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"");var indexSlash=window.location.pathname.lastIndexOf("/");if(indexSlash<=0){path="/"}else{path=window.location.pathname.substr(0,indexSlash)+"/"}return path+url};SWFUpload.prototype.initSettings=function(){this.ensureDefault=function(settingName,defaultValue){this.settings[settingName]=(this.settings[settingName]==undefined)?defaultValue:this.settings[settingName]};this.ensureDefault("upload_url","");this.ensureDefault("preserve_relative_urls",false);this.ensureDefault("file_post_name","Filedata");this.ensureDefault("post_params",{});this.ensureDefault("use_query_string",false);this.ensureDefault("requeue_on_error",false);this.ensureDefault("http_success",[]);this.ensureDefault("assume_success_timeout",0);this.ensureDefault("file_types","*.*");this.ensureDefault("file_types_description","All Files");this.ensureDefault("file_size_limit",0);this.ensureDefault("file_upload_limit",0);this.ensureDefault("file_queue_limit",0);this.ensureDefault("flash_url","swfupload.swf");this.ensureDefault("prevent_swf_caching",true);this.ensureDefault("button_image_url","");this.ensureDefault("button_width",1);this.ensureDefault("button_height",1);this.ensureDefault("button_text","");this.ensureDefault("button_text_style","color: #000000; font-size: 16pt;");this.ensureDefault("button_text_top_padding",0);this.ensureDefault("button_text_left_padding",0);this.ensureDefault("button_action",SWFUpload.BUTTON_ACTION.SELECT_FILES);this.ensureDefault("button_disabled",false);this.ensureDefault("button_placeholder_id","");this.ensureDefault("button_placeholder",null);this.ensureDefault("button_cursor",SWFUpload.CURSOR.ARROW);this.ensureDefault("button_window_mode",SWFUpload.WINDOW_MODE.WINDOW);this.ensureDefault("debug",false);this.settings.debug_enabled=this.settings.debug;this.settings.return_upload_start_handler=this.returnUploadStart;this.ensureDefault("swfupload_loaded_handler",null);this.ensureDefault("file_dialog_start_handler",null);this.ensureDefault("file_queued_handler",null);this.ensureDefault("file_queue_error_handler",null);this.ensureDefault("file_dialog_complete_handler",null);this.ensureDefault("upload_start_handler",null);this.ensureDefault("upload_progress_handler",null);this.ensureDefault("upload_error_handler",null);this.ensureDefault("upload_success_handler",null);this.ensureDefault("upload_complete_handler",null);this.ensureDefault("debug_handler",this.debugMessage);this.ensureDefault("custom_settings",{});this.customSettings=this.settings.custom_settings;if(!!this.settings.prevent_swf_caching){this.settings.flash_url=this.settings.flash_url+(this.settings.flash_url.indexOf("?")<0?"?":"&")+"preventswfcaching="+new Date().getTime()}if(!this.settings.preserve_relative_urls){this.settings.upload_url=SWFUpload.completeURL(this.settings.upload_url);this.settings.button_image_url=SWFUpload.completeURL(this.settings.button_image_url)}delete this.ensureDefault};SWFUpload.prototype.loadFlash=function(){var targetElement,tempParent;if(document.getElementById(this.movieName)!==null){throw"ID "+this.movieName+" is already in use. The Flash Object could not be added";}targetElement=document.getElementById(this.settings.button_placeholder_id)||this.settings.button_placeholder;if(targetElement==undefined){throw"Could not find the placeholder element: "+this.settings.button_placeholder_id;}tempParent=document.createElement("div");tempParent.innerHTML=this.getFlashHTML();targetElement.parentNode.replaceChild(tempParent.firstChild,targetElement);if(window[this.movieName]==undefined){window[this.movieName]=this.getMovieElement()}};SWFUpload.prototype.getFlashHTML=function(){return['<object id="',this.movieName,'" type="application/x-shockwave-flash" data="',this.settings.flash_url,'" width="',this.settings.button_width,'" height="',this.settings.button_height,'" class="swfupload">','<param name="wmode" value="',this.settings.button_window_mode,'" />','<param name="movie" value="',this.settings.flash_url,'" />','<param name="quality" value="high" />','<param name="menu" value="false" />','<param name="allowScriptAccess" value="always" />','<param name="flashvars" value="'+this.getFlashVars()+'" />','</object>'].join("")};SWFUpload.prototype.getFlashVars=function(){var paramString=this.buildParamString();var httpSuccessString=this.settings.http_success.join(",");return["movieName=",encodeURIComponent(this.movieName),"&uploadURL=",encodeURIComponent(this.settings.upload_url),"&useQueryString=",encodeURIComponent(this.settings.use_query_string),"&requeueOnError=",encodeURIComponent(this.settings.requeue_on_error),"&httpSuccess=",encodeURIComponent(httpSuccessString),"&assumeSuccessTimeout=",encodeURIComponent(this.settings.assume_success_timeout),"&params=",encodeURIComponent(paramString),"&filePostName=",encodeURIComponent(this.settings.file_post_name),"&fileTypes=",encodeURIComponent(this.settings.file_types),"&fileTypesDescription=",encodeURIComponent(this.settings.file_types_description),"&fileSizeLimit=",encodeURIComponent(this.settings.file_size_limit),"&fileUploadLimit=",encodeURIComponent(this.settings.file_upload_limit),"&fileQueueLimit=",encodeURIComponent(this.settings.file_queue_limit),"&debugEnabled=",encodeURIComponent(this.settings.debug_enabled),"&buttonImageURL=",encodeURIComponent(this.settings.button_image_url),"&buttonWidth=",encodeURIComponent(this.settings.button_width),"&buttonHeight=",encodeURIComponent(this.settings.button_height),"&buttonText=",encodeURIComponent(this.settings.button_text),"&buttonTextTopPadding=",encodeURIComponent(this.settings.button_text_top_padding),"&buttonTextLeftPadding=",encodeURIComponent(this.settings.button_text_left_padding),"&buttonTextStyle=",encodeURIComponent(this.settings.button_text_style),"&buttonAction=",encodeURIComponent(this.settings.button_action),"&buttonDisabled=",encodeURIComponent(this.settings.button_disabled),"&buttonCursor=",encodeURIComponent(this.settings.button_cursor)].join("")};SWFUpload.prototype.getMovieElement=function(){if(this.movieElement==undefined){this.movieElement=document.getElementById(this.movieName)}if(this.movieElement===null){throw"Could not find Flash element";}return this.movieElement};SWFUpload.prototype.buildParamString=function(){var postParams=this.settings.post_params;var paramStringPairs=[];if(typeof(postParams)==="object"){for(var name in postParams){if(postParams.hasOwnProperty(name)){paramStringPairs.push(encodeURIComponent(name.toString())+"="+encodeURIComponent(postParams[name].toString()))}}}return paramStringPairs.join("&")};SWFUpload.prototype.destroy=function(){try{this.cancelUpload(null,false);var movieElement=null;movieElement=this.getMovieElement();if(movieElement&&typeof(movieElement.CallFunction)==="unknown"){for(var i in movieElement){try{if(typeof(movieElement[i])==="function"){movieElement[i]=null}}catch(ex1){}}try{movieElement.parentNode.removeChild(movieElement)}catch(ex){}}window[this.movieName]=null;SWFUpload.instances[this.movieName]=null;delete SWFUpload.instances[this.movieName];this.movieElement=null;this.settings=null;this.customSettings=null;this.eventQueue=null;this.movieName=null;return true}catch(ex2){return false}};SWFUpload.prototype.displayDebugInfo=function(){this.debug(["---SWFUpload Instance Info---\n","Version: ",SWFUpload.version,"\n","Movie Name: ",this.movieName,"\n","Settings:\n","\t","upload_url: ",this.settings.upload_url,"\n","\t","flash_url: ",this.settings.flash_url,"\n","\t","use_query_string: ",this.settings.use_query_string.toString(),"\n","\t","requeue_on_error: ",this.settings.requeue_on_error.toString(),"\n","\t","http_success: ",this.settings.http_success.join(", "),"\n","\t","assume_success_timeout: ",this.settings.assume_success_timeout,"\n","\t","file_post_name: ",this.settings.file_post_name,"\n","\t","post_params: ",this.settings.post_params.toString(),"\n","\t","file_types: ",this.settings.file_types,"\n","\t","file_types_description: ",this.settings.file_types_description,"\n","\t","file_size_limit: ",this.settings.file_size_limit,"\n","\t","file_upload_limit: ",this.settings.file_upload_limit,"\n","\t","file_queue_limit: ",this.settings.file_queue_limit,"\n","\t","debug: ",this.settings.debug.toString(),"\n","\t","prevent_swf_caching: ",this.settings.prevent_swf_caching.toString(),"\n","\t","button_placeholder_id: ",this.settings.button_placeholder_id.toString(),"\n","\t","button_placeholder: ",(this.settings.button_placeholder?"Set":"Not Set"),"\n","\t","button_image_url: ",this.settings.button_image_url.toString(),"\n","\t","button_width: ",this.settings.button_width.toString(),"\n","\t","button_height: ",this.settings.button_height.toString(),"\n","\t","button_text: ",this.settings.button_text.toString(),"\n","\t","button_text_style: ",this.settings.button_text_style.toString(),"\n","\t","button_text_top_padding: ",this.settings.button_text_top_padding.toString(),"\n","\t","button_text_left_padding: ",this.settings.button_text_left_padding.toString(),"\n","\t","button_action: ",this.settings.button_action.toString(),"\n","\t","button_disabled: ",this.settings.button_disabled.toString(),"\n","\t","custom_settings: ",this.settings.custom_settings.toString(),"\n","Event Handlers:\n","\t","swfupload_loaded_handler assigned: ",(typeof this.settings.swfupload_loaded_handler==="function").toString(),"\n","\t","file_dialog_start_handler assigned: ",(typeof this.settings.file_dialog_start_handler==="function").toString(),"\n","\t","file_queued_handler assigned: ",(typeof this.settings.file_queued_handler==="function").toString(),"\n","\t","file_queue_error_handler assigned: ",(typeof this.settings.file_queue_error_handler==="function").toString(),"\n","\t","upload_start_handler assigned: ",(typeof this.settings.upload_start_handler==="function").toString(),"\n","\t","upload_progress_handler assigned: ",(typeof this.settings.upload_progress_handler==="function").toString(),"\n","\t","upload_error_handler assigned: ",(typeof this.settings.upload_error_handler==="function").toString(),"\n","\t","upload_success_handler assigned: ",(typeof this.settings.upload_success_handler==="function").toString(),"\n","\t","upload_complete_handler assigned: ",(typeof this.settings.upload_complete_handler==="function").toString(),"\n","\t","debug_handler assigned: ",(typeof this.settings.debug_handler==="function").toString(),"\n"].join(""))};SWFUpload.prototype.addSetting=function(name,value,default_value){if(value==undefined){return(this.settings[name]=default_value)}else{return(this.settings[name]=value)}};SWFUpload.prototype.getSetting=function(name){if(this.settings[name]!=undefined){return this.settings[name]}return""};SWFUpload.prototype.callFlash=function(functionName,argumentArray){argumentArray=argumentArray||[];var movieElement=this.getMovieElement();var returnValue,returnString;try{returnString=movieElement.CallFunction('<invoke name="'+functionName+'" returntype="javascript">'+__flash__argumentsToXML(argumentArray,0)+'</invoke>');returnValue=eval(returnString)}catch(ex){throw"Call to "+functionName+" failed";}if(returnValue!=undefined&&typeof returnValue.post==="object"){returnValue=this.unescapeFilePostParams(returnValue)}return returnValue};SWFUpload.prototype.selectFile=function(){this.callFlash("SelectFile")};SWFUpload.prototype.selectFiles=function(){this.callFlash("SelectFiles")};SWFUpload.prototype.startUpload=function(fileID){this.callFlash("StartUpload",[fileID])};SWFUpload.prototype.cancelUpload=function(fileID,triggerErrorEvent){if(triggerErrorEvent!==false){triggerErrorEvent=true}this.callFlash("CancelUpload",[fileID,triggerErrorEvent])};SWFUpload.prototype.stopUpload=function(){this.callFlash("StopUpload")};SWFUpload.prototype.getStats=function(){return this.callFlash("GetStats")};SWFUpload.prototype.setStats=function(statsObject){this.callFlash("SetStats",[statsObject])};SWFUpload.prototype.getFile=function(fileID){if(typeof(fileID)==="number"){return this.callFlash("GetFileByIndex",[fileID])}else{return this.callFlash("GetFile",[fileID])}};SWFUpload.prototype.addFileParam=function(fileID,name,value){return this.callFlash("AddFileParam",[fileID,name,value])};SWFUpload.prototype.removeFileParam=function(fileID,name){this.callFlash("RemoveFileParam",[fileID,name])};SWFUpload.prototype.setUploadURL=function(url){this.settings.upload_url=url.toString();this.callFlash("SetUploadURL",[url])};SWFUpload.prototype.setPostParams=function(paramsObject){this.settings.post_params=paramsObject;this.callFlash("SetPostParams",[paramsObject])};SWFUpload.prototype.addPostParam=function(name,value){this.settings.post_params[name]=value;this.callFlash("SetPostParams",[this.settings.post_params])};SWFUpload.prototype.removePostParam=function(name){delete this.settings.post_params[name];this.callFlash("SetPostParams",[this.settings.post_params])};SWFUpload.prototype.setFileTypes=function(types,description){this.settings.file_types=types;this.settings.file_types_description=description;this.callFlash("SetFileTypes",[types,description])};SWFUpload.prototype.setFileSizeLimit=function(fileSizeLimit){this.settings.file_size_limit=fileSizeLimit;this.callFlash("SetFileSizeLimit",[fileSizeLimit])};SWFUpload.prototype.setFileUploadLimit=function(fileUploadLimit){this.settings.file_upload_limit=fileUploadLimit;this.callFlash("SetFileUploadLimit",[fileUploadLimit])};SWFUpload.prototype.setFileQueueLimit=function(fileQueueLimit){this.settings.file_queue_limit=fileQueueLimit;this.callFlash("SetFileQueueLimit",[fileQueueLimit])};SWFUpload.prototype.setFilePostName=function(filePostName){this.settings.file_post_name=filePostName;this.callFlash("SetFilePostName",[filePostName])};SWFUpload.prototype.setUseQueryString=function(useQueryString){this.settings.use_query_string=useQueryString;this.callFlash("SetUseQueryString",[useQueryString])};SWFUpload.prototype.setRequeueOnError=function(requeueOnError){this.settings.requeue_on_error=requeueOnError;this.callFlash("SetRequeueOnError",[requeueOnError])};SWFUpload.prototype.setHTTPSuccess=function(http_status_codes){if(typeof http_status_codes==="string"){http_status_codes=http_status_codes.replace(" ","").split(",")}this.settings.http_success=http_status_codes;this.callFlash("SetHTTPSuccess",[http_status_codes])};SWFUpload.prototype.setAssumeSuccessTimeout=function(timeout_seconds){this.settings.assume_success_timeout=timeout_seconds;this.callFlash("SetAssumeSuccessTimeout",[timeout_seconds])};SWFUpload.prototype.setDebugEnabled=function(debugEnabled){this.settings.debug_enabled=debugEnabled;this.callFlash("SetDebugEnabled",[debugEnabled])};SWFUpload.prototype.setButtonImageURL=function(buttonImageURL){if(buttonImageURL==undefined){buttonImageURL=""}this.settings.button_image_url=buttonImageURL;this.callFlash("SetButtonImageURL",[buttonImageURL])};SWFUpload.prototype.setButtonDimensions=function(width,height){this.settings.button_width=width;this.settings.button_height=height;var movie=this.getMovieElement();if(movie!=undefined){movie.style.width=width+"px";movie.style.height=height+"px"}this.callFlash("SetButtonDimensions",[width,height])};SWFUpload.prototype.setButtonText=function(html){this.settings.button_text=html;this.callFlash("SetButtonText",[html])};SWFUpload.prototype.setButtonTextPadding=function(left,top){this.settings.button_text_top_padding=top;this.settings.button_text_left_padding=left;this.callFlash("SetButtonTextPadding",[left,top])};SWFUpload.prototype.setButtonTextStyle=function(css){this.settings.button_text_style=css;this.callFlash("SetButtonTextStyle",[css])};SWFUpload.prototype.setButtonDisabled=function(isDisabled){this.settings.button_disabled=isDisabled;this.callFlash("SetButtonDisabled",[isDisabled])};SWFUpload.prototype.setButtonAction=function(buttonAction){this.settings.button_action=buttonAction;this.callFlash("SetButtonAction",[buttonAction])};SWFUpload.prototype.setButtonCursor=function(cursor){this.settings.button_cursor=cursor;this.callFlash("SetButtonCursor",[cursor])};SWFUpload.prototype.queueEvent=function(handlerName,argumentArray){if(argumentArray==undefined){argumentArray=[]}else if(!(argumentArray instanceof Array)){argumentArray=[argumentArray]}var self=this;if(typeof this.settings[handlerName]==="function"){this.eventQueue.push(function(){this.settings[handlerName].apply(this,argumentArray)});setTimeout(function(){self.executeNextEvent()},0)}else if(this.settings[handlerName]!==null){throw"Event handler "+handlerName+" is unknown or is not a function";}};SWFUpload.prototype.executeNextEvent=function(){var f=this.eventQueue?this.eventQueue.shift():null;if(typeof(f)==="function"){f.apply(this)}};SWFUpload.prototype.unescapeFilePostParams=function(file){var reg=/[$]([0-9a-f]{4})/i;var unescapedPost={};var uk;if(file!=undefined){for(var k in file.post){if(file.post.hasOwnProperty(k)){uk=k;var match;while((match=reg.exec(uk))!==null){uk=uk.replace(match[0],String.fromCharCode(parseInt("0x"+match[1],16)))}unescapedPost[uk]=file.post[k]}}file.post=unescapedPost}return file};SWFUpload.prototype.testExternalInterface=function(){try{return this.callFlash("TestExternalInterface")}catch(ex){return false}};SWFUpload.prototype.flashReady=function(){var movieElement=this.getMovieElement();if(!movieElement){this.debug("Flash called back ready but the flash movie can't be found.");return}this.cleanUp(movieElement);this.queueEvent("swfupload_loaded_handler")};SWFUpload.prototype.cleanUp=function(movieElement){try{if(this.movieElement&&typeof(movieElement.CallFunction)==="unknown"){this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");for(var key in movieElement){try{if(typeof(movieElement[key])==="function"){movieElement[key]=null}}catch(ex){}}}}catch(ex1){}window["__flash__removeCallback"]=function(instance,name){try{if(instance){instance[name]=null}}catch(flashEx){}}};SWFUpload.prototype.fileDialogStart=function(){this.queueEvent("file_dialog_start_handler")};SWFUpload.prototype.fileQueued=function(file){file=this.unescapeFilePostParams(file);this.queueEvent("file_queued_handler",file)};SWFUpload.prototype.fileQueueError=function(file,errorCode,message){file=this.unescapeFilePostParams(file);this.queueEvent("file_queue_error_handler",[file,errorCode,message])};SWFUpload.prototype.fileDialogComplete=function(numFilesSelected,numFilesQueued,numFilesInQueue){this.queueEvent("file_dialog_complete_handler",[numFilesSelected,numFilesQueued,numFilesInQueue])};SWFUpload.prototype.uploadStart=function(file){file=this.unescapeFilePostParams(file);this.queueEvent("return_upload_start_handler",file)};SWFUpload.prototype.returnUploadStart=function(file){var returnValue;if(typeof this.settings.upload_start_handler==="function"){file=this.unescapeFilePostParams(file);returnValue=this.settings.upload_start_handler.call(this,file)}else if(this.settings.upload_start_handler!=undefined){throw"upload_start_handler must be a function";}if(returnValue===undefined){returnValue=true}returnValue=!!returnValue;this.callFlash("ReturnUploadStart",[returnValue])};SWFUpload.prototype.uploadProgress=function(file,bytesComplete,bytesTotal){file=this.unescapeFilePostParams(file);this.queueEvent("upload_progress_handler",[file,bytesComplete,bytesTotal])};SWFUpload.prototype.uploadError=function(file,errorCode,message){file=this.unescapeFilePostParams(file);this.queueEvent("upload_error_handler",[file,errorCode,message])};SWFUpload.prototype.uploadSuccess=function(file,serverData,responseReceived){file=this.unescapeFilePostParams(file);this.queueEvent("upload_success_handler",[file,serverData,responseReceived])};SWFUpload.prototype.uploadComplete=function(file){file=this.unescapeFilePostParams(file);this.queueEvent("upload_complete_handler",file)};SWFUpload.prototype.debug=function(message){this.queueEvent("debug_handler",message)};SWFUpload.prototype.debugMessage=function(message){if(this.settings.debug){var exceptionMessage,exceptionValues=[];if(typeof message==="object"&&typeof message.name==="string"&&typeof message.message==="string"){for(var key in message){if(message.hasOwnProperty(key)){exceptionValues.push(key+": "+message[key])}}exceptionMessage=exceptionValues.join("\n")||"";exceptionValues=exceptionMessage.split("\n");exceptionMessage="EXCEPTION: "+exceptionValues.join("\nEXCEPTION: ");SWFUpload.Console.writeLine(exceptionMessage)}else{SWFUpload.Console.writeLine(message)}}};SWFUpload.Console={};SWFUpload.Console.writeLine=function(message){var console,documentForm;try{console=document.getElementById("SWFUpload_Console");if(!console){documentForm=document.createElement("form");document.getElementsByTagName("body")[0].appendChild(documentForm);console=document.createElement("textarea");console.id="SWFUpload_Console";console.style.fontFamily="monospace";console.setAttribute("wrap","off");console.wrap="off";console.style.overflow="auto";console.style.width="700px";console.style.height="350px";console.style.margin="5px";documentForm.appendChild(console)}console.value+=message+"\n";console.scrollTop=console.scrollHeight-console.clientHeight}catch(ex){alert("Exception: "+ex.name+" Message: "+ex.message)}};
|
@@ -0,0 +1 @@
|
|
1
|
+
var SWFUpload;if(typeof(SWFUpload)==="function"){SWFUpload.queue={};SWFUpload.prototype.initSettings=(function(oldInitSettings){return function(){if(typeof(oldInitSettings)==="function"){oldInitSettings.call(this)}this.queueSettings={};this.queueSettings.queue_cancelled_flag=false;this.queueSettings.queue_upload_count=0;this.queueSettings.user_upload_complete_handler=this.settings.upload_complete_handler;this.queueSettings.user_upload_start_handler=this.settings.upload_start_handler;this.settings.upload_complete_handler=SWFUpload.queue.uploadCompleteHandler;this.settings.upload_start_handler=SWFUpload.queue.uploadStartHandler;this.settings.queue_complete_handler=this.settings.queue_complete_handler||null}})(SWFUpload.prototype.initSettings);SWFUpload.prototype.startUpload=function(fileID){this.queueSettings.queue_cancelled_flag=false;this.callFlash("StartUpload",[fileID])};SWFUpload.prototype.cancelQueue=function(){this.queueSettings.queue_cancelled_flag=true;this.stopUpload();var stats=this.getStats();while(stats.files_queued>0){this.cancelUpload();stats=this.getStats()}};SWFUpload.queue.uploadStartHandler=function(file){var returnValue;if(typeof(this.queueSettings.user_upload_start_handler)==="function"){returnValue=this.queueSettings.user_upload_start_handler.call(this,file)}returnValue=(returnValue===false)?false:true;this.queueSettings.queue_cancelled_flag=!returnValue;return returnValue};SWFUpload.queue.uploadCompleteHandler=function(file){var user_upload_complete_handler=this.queueSettings.user_upload_complete_handler;var continueUpload;if(file.filestatus===SWFUpload.FILE_STATUS.COMPLETE){this.queueSettings.queue_upload_count++}if(typeof(user_upload_complete_handler)==="function"){continueUpload=(user_upload_complete_handler.call(this,file)===false)?false:true}else if(file.filestatus===SWFUpload.FILE_STATUS.QUEUED){continueUpload=false}else{continueUpload=true}if(continueUpload){var stats=this.getStats();if(stats.files_queued>0&&this.queueSettings.queue_cancelled_flag===false){this.startUpload()}else if(this.queueSettings.queue_cancelled_flag===false){this.queueEvent("queue_complete_handler",[this.queueSettings.queue_upload_count]);this.queueSettings.queue_upload_count=0}else{this.queueSettings.queue_cancelled_flag=false;this.queueSettings.queue_upload_count=0}}}}
|
Binary file
|
@@ -0,0 +1,111 @@
|
|
1
|
+
/*
|
2
|
+
SWFUpload.SWFObject Plugin
|
3
|
+
|
4
|
+
Summary:
|
5
|
+
This plugin uses SWFObject to embed SWFUpload dynamically in the page. SWFObject provides accurate Flash Player detection and DOM Ready loading.
|
6
|
+
This plugin replaces the Graceful Degradation plugin.
|
7
|
+
|
8
|
+
Features:
|
9
|
+
* swfupload_load_failed_hander event
|
10
|
+
* swfupload_pre_load_handler event
|
11
|
+
* minimum_flash_version setting (default: "9.0.28")
|
12
|
+
* SWFUpload.onload event for early loading
|
13
|
+
|
14
|
+
Usage:
|
15
|
+
Provide handlers and settings as needed. When using the SWFUpload.SWFObject plugin you should initialize SWFUploading
|
16
|
+
in SWFUpload.onload rather than in window.onload. When initialized this way SWFUpload can load earlier preventing the UI flicker
|
17
|
+
that was seen using the Graceful Degradation plugin.
|
18
|
+
|
19
|
+
<script type="text/javascript">
|
20
|
+
var swfu;
|
21
|
+
SWFUpload.onload = function () {
|
22
|
+
swfu = new SWFUpload({
|
23
|
+
minimum_flash_version: "9.0.28",
|
24
|
+
swfupload_pre_load_handler: swfuploadPreLoad,
|
25
|
+
swfupload_load_failed_handler: swfuploadLoadFailed
|
26
|
+
});
|
27
|
+
};
|
28
|
+
</script>
|
29
|
+
|
30
|
+
Notes:
|
31
|
+
You must provide set minimum_flash_version setting to "8" if you are using SWFUpload for Flash Player 8.
|
32
|
+
The swfuploadLoadFailed event is only fired if the minimum version of Flash Player is not met. Other issues such as missing SWF files, browser bugs
|
33
|
+
or corrupt Flash Player installations will not trigger this event.
|
34
|
+
The swfuploadPreLoad event is fired as soon as the minimum version of Flash Player is found. It does not wait for SWFUpload to load and can
|
35
|
+
be used to prepare the SWFUploadUI and hide alternate content.
|
36
|
+
swfobject's onDomReady event is cross-browser safe but will default to the window.onload event when DOMReady is not supported by the browser.
|
37
|
+
Early DOM Loading is supported in major modern browsers but cannot be guaranteed for every browser ever made.
|
38
|
+
*/
|
39
|
+
|
40
|
+
|
41
|
+
/* SWFObject v2.1 <http://code.google.com/p/swfobject/>
|
42
|
+
Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
|
43
|
+
This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
|
44
|
+
*/
|
45
|
+
var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S)}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E()}},10)}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null)}R(E)}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E()}}function E(){if(e){return }if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u)}catch(w){return }}e=true;if(Z){clearInterval(Z);Z=null}var q=o.length;for(var r=0;r<q;r++){o[r]()}}function f(q){if(e){q()}else{o[o.length]=q}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false)}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false)}else{if(typeof j.attachEvent!=b){I(j,"onload",r)}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r()}}else{j.onload=r}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r)}W(u,true)}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q])}else{O(r)}}}}else{W(u,true)}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue)}else{w.setAttribute(y[u].nodeName,y[u].nodeValue)}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"))}}}t.parentNode.replaceChild(w,t)}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId}}else{M=G(u)}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310"}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137"}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u)};I(j,"onload",v)}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x)}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t)};I(j,"onload",q)}else{t.parentNode.replaceChild(G(t),t)}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true))}}}}}return u}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB]}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"'}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"'}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />'}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id)}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z])}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z])}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z])}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y])}}}v.parentNode.replaceChild(AC,v);q=AC}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x])}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x])}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w])}}v.parentNode.replaceChild(u,v);q=u}}}return q}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u)}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r)}else{j.attachEvent("onload",function(){B(r)})}}else{q.parentNode.removeChild(q)}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null}}r.parentNode.removeChild(r)}}function C(t){var q=null;try{q=K.getElementById(t)}catch(r){}return q}function a(q){return K.createElement(q)}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r]}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false}function V(v,r){if(h.ie&&h.mac){return }var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"))}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r)}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r}else{V("#"+t,"visibility:"+r)}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2])}var t=i.length;for(var u=0;u<t;u++){X(i[u])}for(var r in h){h[r]=null}h=null;for(var q in swfobject){swfobject[q]=null}swfobject=null})}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return }var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false)},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t}else{if(typeof u.SetVariable!=b){q=u}}}}return q},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return }AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v]}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u]}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t]}else{y.flashvars=t+"="+r[t]}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true)}})}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF)})}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]}},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q)}else{return undefined}},removeSWF:function(q){if(h.w3cdom){X(q)}},createCSS:function(r,q){if(h.w3cdom){V(r,q)}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u)}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block"}}M=null;l=null;A=false}}}}}();
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
var SWFUpload;
|
50
|
+
if (typeof(SWFUpload) === "function") {
|
51
|
+
SWFUpload.onload = function () {};
|
52
|
+
|
53
|
+
swfobject.addDomLoadEvent(function () {
|
54
|
+
if (typeof(SWFUpload.onload) === "function") {
|
55
|
+
SWFUpload.onload.call(window);
|
56
|
+
}
|
57
|
+
});
|
58
|
+
|
59
|
+
SWFUpload.prototype.initSettings = (function (oldInitSettings) {
|
60
|
+
return function () {
|
61
|
+
if (typeof(oldInitSettings) === "function") {
|
62
|
+
oldInitSettings.call(this);
|
63
|
+
}
|
64
|
+
|
65
|
+
this.ensureDefault = function (settingName, defaultValue) {
|
66
|
+
this.settings[settingName] = (this.settings[settingName] == undefined) ? defaultValue : this.settings[settingName];
|
67
|
+
};
|
68
|
+
|
69
|
+
this.ensureDefault("minimum_flash_version", "9.0.28");
|
70
|
+
this.ensureDefault("swfupload_pre_load_handler", null);
|
71
|
+
this.ensureDefault("swfupload_load_failed_handler", null);
|
72
|
+
|
73
|
+
delete this.ensureDefault;
|
74
|
+
|
75
|
+
};
|
76
|
+
})(SWFUpload.prototype.initSettings);
|
77
|
+
|
78
|
+
|
79
|
+
SWFUpload.prototype.loadFlash = function (oldLoadFlash) {
|
80
|
+
return function () {
|
81
|
+
var hasFlash = swfobject.hasFlashPlayerVersion(this.settings.minimum_flash_version);
|
82
|
+
|
83
|
+
if (hasFlash) {
|
84
|
+
this.queueEvent("swfupload_pre_load_handler");
|
85
|
+
if (typeof(oldLoadFlash) === "function") {
|
86
|
+
oldLoadFlash.call(this);
|
87
|
+
}
|
88
|
+
} else {
|
89
|
+
this.queueEvent("swfupload_load_failed_handler");
|
90
|
+
}
|
91
|
+
};
|
92
|
+
|
93
|
+
}(SWFUpload.prototype.loadFlash);
|
94
|
+
|
95
|
+
SWFUpload.prototype.displayDebugInfo = function (oldDisplayDebugInfo) {
|
96
|
+
return function () {
|
97
|
+
if (typeof(oldDisplayDebugInfo) === "function") {
|
98
|
+
oldDisplayDebugInfo.call(this);
|
99
|
+
}
|
100
|
+
|
101
|
+
this.debug(
|
102
|
+
[
|
103
|
+
"SWFUpload.SWFObject Plugin settings:", "\n",
|
104
|
+
"\t", "minimum_flash_version: ", this.settings.minimum_flash_version, "\n",
|
105
|
+
"\t", "swfupload_pre_load_handler assigned: ", (typeof(this.settings.swfupload_pre_load_handler) === "function").toString(), "\n",
|
106
|
+
"\t", "swfupload_load_failed_handler assigned: ", (typeof(this.settings.swfupload_load_failed_handler) === "function").toString(), "\n",
|
107
|
+
].join("")
|
108
|
+
);
|
109
|
+
};
|
110
|
+
}(SWFUpload.prototype.displayDebugInfo);
|
111
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
|
6
|
+
CKEDITOR.themes.add('default',(function(){function a(b,c){var d,e;e=b.config.sharedSpaces;e=e&&e[c];e=e&&CKEDITOR.document.getById(e);if(e){var f='<span class="cke_shared"><span class="'+b.skinClass+' '+b.id+' cke_editor_'+b.name+'">'+'<span class="'+CKEDITOR.env.cssClass+'">'+'<span class="cke_wrapper cke_'+b.lang.dir+'">'+'<span class="cke_editor">'+'<div class="cke_'+c+'">'+'</div></span></span></span></span></span>',g=e.append(CKEDITOR.dom.element.createFromHtml(f,e.getDocument()));if(e.getCustomData('cke_hasshared'))g.hide();else e.setCustomData('cke_hasshared',1);d=g.getChild([0,0,0,0]);b.on('focus',function(){for(var h=0,i,j=e.getChildren();i=j.getItem(h);h++){if(i.type==CKEDITOR.NODE_ELEMENT&&!i.equals(g)&&i.hasClass('cke_shared'))i.hide();}g.show();});b.on('destroy',function(){g.remove();});}return d;};return{build:function(b,c){var d=b.name,e=b.element,f=b.elementMode;if(!e||f==CKEDITOR.ELEMENT_MODE_NONE)return;if(f==CKEDITOR.ELEMENT_MODE_REPLACE)e.hide();var g=b.fire('themeSpace',{space:'top',html:''}).html,h=b.fire('themeSpace',{space:'contents',html:''}).html,i=b.fireOnce('themeSpace',{space:'bottom',html:''}).html,j=h&&b.config.height,k=b.config.tabIndex||b.element.getAttribute('tabindex')||0;if(!h)j='auto';else if(!isNaN(j))j+='px';var l='',m=b.config.width;if(m){if(!isNaN(m))m+='px';l+='width: '+m+';';}var n=g&&a(b,'top'),o=a(b,'bottom');n&&(n.setHtml(g),g='');o&&(o.setHtml(i),i='');var p=CKEDITOR.dom.element.createFromHtml(['<span id="cke_',d,'" onmousedown="return false;" class="',b.skinClass,' ',b.id,' cke_editor_',d,'" dir="',b.lang.dir,'" title="',CKEDITOR.env.gecko?' ':'','" lang="',b.langCode,'"'+(CKEDITOR.env.webkit?' tabindex="'+k+'"':'')+' role="application"'+' aria-labelledby="cke_',d,'_arialbl"'+(l?' style="'+l+'"':'')+'>'+'<span id="cke_',d,'_arialbl" class="cke_voice_label">'+b.lang.editor+'</span>'+'<span class="',CKEDITOR.env.cssClass,'" role="presentation"><span class="cke_wrapper cke_',b.lang.dir,'" role="presentation"><table class="cke_editor" border="0" cellspacing="0" cellpadding="0" role="presentation"><tbody><tr',g?'':' style="display:none"',' role="presentation"><td id="cke_top_',d,'" class="cke_top" role="presentation">',g,'</td></tr><tr',h?'':' style="display:none"',' role="presentation"><td id="cke_contents_',d,'" class="cke_contents" style="height:',j,'" role="presentation">',h,'</td></tr><tr',i?'':' style="display:none"',' role="presentation"><td id="cke_bottom_',d,'" class="cke_bottom" role="presentation">',i,'</td></tr></tbody></table><style>.',b.skinClass,'{visibility:hidden;}</style></span></span></span>'].join(''));
|
7
|
+
p.getChild([1,0,0,0,0]).unselectable();p.getChild([1,0,0,0,2]).unselectable();if(f==CKEDITOR.ELEMENT_MODE_REPLACE)p.insertAfter(e);else e.append(p);b.container=p;p.disableContextMenu();b.fireOnce('themeLoaded');b.fireOnce('uiReady');},buildDialog:function(b){var c=CKEDITOR.tools.getNextNumber(),d=CKEDITOR.dom.element.createFromHtml(['<div class="',b.id,'_dialog cke_editor_',b.name.replace('.','\\.'),'_dialog cke_skin_',b.skinName,'" dir="',b.lang.dir,'" lang="',b.langCode,'" role="dialog" aria-labelledby="%title#"><table class="cke_dialog',' '+CKEDITOR.env.cssClass,' cke_',b.lang.dir,'" style="position:absolute" role="presentation"><tr><td role="presentation"><div class="%body" role="presentation"><div id="%title#" class="%title" role="presentation"></div><a id="%close_button#" class="%close_button" href="javascript:void(0)" title="'+b.lang.common.close+'" role="button"><span class="cke_label">X</span></a>'+'<div id="%tabs#" class="%tabs" role="tablist"></div>'+'<table class="%contents" role="presentation"><tr>'+'<td id="%contents#" class="%contents" role="presentation"></td>'+'</tr></table>'+'<div id="%footer#" class="%footer" role="presentation"></div>'+'</div>'+'<div id="%tl#" class="%tl"></div>'+'<div id="%tc#" class="%tc"></div>'+'<div id="%tr#" class="%tr"></div>'+'<div id="%ml#" class="%ml"></div>'+'<div id="%mr#" class="%mr"></div>'+'<div id="%bl#" class="%bl"></div>'+'<div id="%bc#" class="%bc"></div>'+'<div id="%br#" class="%br"></div>'+'</td></tr>'+'</table>',CKEDITOR.env.ie?'':'<style>.cke_dialog{visibility:hidden;}</style>','</div>'].join('').replace(/#/g,'_'+c).replace(/%/g,'cke_dialog_')),e=d.getChild([0,0,0,0,0]),f=e.getChild(0),g=e.getChild(1);f.unselectable();g.unselectable();return{element:d,parts:{dialog:d.getChild(0),title:f,close:g,tabs:e.getChild(2),contents:e.getChild([3,0,0,0]),footer:e.getChild(4)}};},destroy:function(b){var c=b.container;c.clearCustomData();b.element.clearCustomData();if(c)c.remove();if(b.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE)b.element.show();delete b.element;}};})());CKEDITOR.editor.prototype.getThemeSpace=function(a){var b='cke_'+a,c=this._[b]||(this._[b]=CKEDITOR.document.getById(b+'_'+this.name));return c;};CKEDITOR.editor.prototype.resize=function(a,b,c,d){var e=this.container,f=CKEDITOR.document.getById('cke_contents_'+this.name),g=d?e.getChild(1):e;CKEDITOR.env.webkit&&g.setStyle('display','none');g.setSize('width',a,true);if(CKEDITOR.env.webkit){g.$.offsetWidth;g.setStyle('display','');}var h=c?0:(g.$.offsetHeight||0)-(f.$.clientHeight||0);
|
8
|
+
f.setStyle('height',Math.max(b-h,0)+'px');this.fire('resize');};CKEDITOR.editor.prototype.getResizable=function(){return this.container.getChild(1);};
|
@@ -0,0 +1,965 @@
|
|
1
|
+
// script.aculo.us controls.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009
|
2
|
+
|
3
|
+
// Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
|
4
|
+
// (c) 2005-2009 Ivan Krstic (http://blogs.law.harvard.edu/ivan)
|
5
|
+
// (c) 2005-2009 Jon Tirsen (http://www.tirsen.com)
|
6
|
+
// Contributors:
|
7
|
+
// Richard Livsey
|
8
|
+
// Rahul Bhargava
|
9
|
+
// Rob Wills
|
10
|
+
//
|
11
|
+
// script.aculo.us is freely distributable under the terms of an MIT-style license.
|
12
|
+
// For details, see the script.aculo.us web site: http://script.aculo.us/
|
13
|
+
|
14
|
+
// Autocompleter.Base handles all the autocompletion functionality
|
15
|
+
// that's independent of the data source for autocompletion. This
|
16
|
+
// includes drawing the autocompletion menu, observing keyboard
|
17
|
+
// and mouse events, and similar.
|
18
|
+
//
|
19
|
+
// Specific autocompleters need to provide, at the very least,
|
20
|
+
// a getUpdatedChoices function that will be invoked every time
|
21
|
+
// the text inside the monitored textbox changes. This method
|
22
|
+
// should get the text for which to provide autocompletion by
|
23
|
+
// invoking this.getToken(), NOT by directly accessing
|
24
|
+
// this.element.value. This is to allow incremental tokenized
|
25
|
+
// autocompletion. Specific auto-completion logic (AJAX, etc)
|
26
|
+
// belongs in getUpdatedChoices.
|
27
|
+
//
|
28
|
+
// Tokenized incremental autocompletion is enabled automatically
|
29
|
+
// when an autocompleter is instantiated with the 'tokens' option
|
30
|
+
// in the options parameter, e.g.:
|
31
|
+
// new Ajax.Autocompleter('id','upd', '/url/', { tokens: ',' });
|
32
|
+
// will incrementally autocomplete with a comma as the token.
|
33
|
+
// Additionally, ',' in the above example can be replaced with
|
34
|
+
// a token array, e.g. { tokens: [',', '\n'] } which
|
35
|
+
// enables autocompletion on multiple tokens. This is most
|
36
|
+
// useful when one of the tokens is \n (a newline), as it
|
37
|
+
// allows smart autocompletion after linebreaks.
|
38
|
+
|
39
|
+
if(typeof Effect == 'undefined')
|
40
|
+
throw("controls.js requires including script.aculo.us' effects.js library");
|
41
|
+
|
42
|
+
var Autocompleter = { };
|
43
|
+
Autocompleter.Base = Class.create({
|
44
|
+
baseInitialize: function(element, update, options) {
|
45
|
+
element = $(element);
|
46
|
+
this.element = element;
|
47
|
+
this.update = $(update);
|
48
|
+
this.hasFocus = false;
|
49
|
+
this.changed = false;
|
50
|
+
this.active = false;
|
51
|
+
this.index = 0;
|
52
|
+
this.entryCount = 0;
|
53
|
+
this.oldElementValue = this.element.value;
|
54
|
+
|
55
|
+
if(this.setOptions)
|
56
|
+
this.setOptions(options);
|
57
|
+
else
|
58
|
+
this.options = options || { };
|
59
|
+
|
60
|
+
this.options.paramName = this.options.paramName || this.element.name;
|
61
|
+
this.options.tokens = this.options.tokens || [];
|
62
|
+
this.options.frequency = this.options.frequency || 0.4;
|
63
|
+
this.options.minChars = this.options.minChars || 1;
|
64
|
+
this.options.onShow = this.options.onShow ||
|
65
|
+
function(element, update){
|
66
|
+
if(!update.style.position || update.style.position=='absolute') {
|
67
|
+
update.style.position = 'absolute';
|
68
|
+
Position.clone(element, update, {
|
69
|
+
setHeight: false,
|
70
|
+
offsetTop: element.offsetHeight
|
71
|
+
});
|
72
|
+
}
|
73
|
+
Effect.Appear(update,{duration:0.15});
|
74
|
+
};
|
75
|
+
this.options.onHide = this.options.onHide ||
|
76
|
+
function(element, update){ new Effect.Fade(update,{duration:0.15}) };
|
77
|
+
|
78
|
+
if(typeof(this.options.tokens) == 'string')
|
79
|
+
this.options.tokens = new Array(this.options.tokens);
|
80
|
+
// Force carriage returns as token delimiters anyway
|
81
|
+
if (!this.options.tokens.include('\n'))
|
82
|
+
this.options.tokens.push('\n');
|
83
|
+
|
84
|
+
this.observer = null;
|
85
|
+
|
86
|
+
this.element.setAttribute('autocomplete','off');
|
87
|
+
|
88
|
+
Element.hide(this.update);
|
89
|
+
|
90
|
+
Event.observe(this.element, 'blur', this.onBlur.bindAsEventListener(this));
|
91
|
+
Event.observe(this.element, 'keydown', this.onKeyPress.bindAsEventListener(this));
|
92
|
+
},
|
93
|
+
|
94
|
+
show: function() {
|
95
|
+
if(Element.getStyle(this.update, 'display')=='none') this.options.onShow(this.element, this.update);
|
96
|
+
if(!this.iefix &&
|
97
|
+
(Prototype.Browser.IE) &&
|
98
|
+
(Element.getStyle(this.update, 'position')=='absolute')) {
|
99
|
+
new Insertion.After(this.update,
|
100
|
+
'<iframe id="' + this.update.id + '_iefix" '+
|
101
|
+
'style="display:none;position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);" ' +
|
102
|
+
'src="javascript:false;" frameborder="0" scrolling="no"></iframe>');
|
103
|
+
this.iefix = $(this.update.id+'_iefix');
|
104
|
+
}
|
105
|
+
if(this.iefix) setTimeout(this.fixIEOverlapping.bind(this), 50);
|
106
|
+
},
|
107
|
+
|
108
|
+
fixIEOverlapping: function() {
|
109
|
+
Position.clone(this.update, this.iefix, {setTop:(!this.update.style.height)});
|
110
|
+
this.iefix.style.zIndex = 1;
|
111
|
+
this.update.style.zIndex = 2;
|
112
|
+
Element.show(this.iefix);
|
113
|
+
},
|
114
|
+
|
115
|
+
hide: function() {
|
116
|
+
this.stopIndicator();
|
117
|
+
if(Element.getStyle(this.update, 'display')!='none') this.options.onHide(this.element, this.update);
|
118
|
+
if(this.iefix) Element.hide(this.iefix);
|
119
|
+
},
|
120
|
+
|
121
|
+
startIndicator: function() {
|
122
|
+
if(this.options.indicator) Element.show(this.options.indicator);
|
123
|
+
},
|
124
|
+
|
125
|
+
stopIndicator: function() {
|
126
|
+
if(this.options.indicator) Element.hide(this.options.indicator);
|
127
|
+
},
|
128
|
+
|
129
|
+
onKeyPress: function(event) {
|
130
|
+
if(this.active)
|
131
|
+
switch(event.keyCode) {
|
132
|
+
case Event.KEY_TAB:
|
133
|
+
case Event.KEY_RETURN:
|
134
|
+
this.selectEntry();
|
135
|
+
Event.stop(event);
|
136
|
+
case Event.KEY_ESC:
|
137
|
+
this.hide();
|
138
|
+
this.active = false;
|
139
|
+
Event.stop(event);
|
140
|
+
return;
|
141
|
+
case Event.KEY_LEFT:
|
142
|
+
case Event.KEY_RIGHT:
|
143
|
+
return;
|
144
|
+
case Event.KEY_UP:
|
145
|
+
this.markPrevious();
|
146
|
+
this.render();
|
147
|
+
Event.stop(event);
|
148
|
+
return;
|
149
|
+
case Event.KEY_DOWN:
|
150
|
+
this.markNext();
|
151
|
+
this.render();
|
152
|
+
Event.stop(event);
|
153
|
+
return;
|
154
|
+
}
|
155
|
+
else
|
156
|
+
if(event.keyCode==Event.KEY_TAB || event.keyCode==Event.KEY_RETURN ||
|
157
|
+
(Prototype.Browser.WebKit > 0 && event.keyCode == 0)) return;
|
158
|
+
|
159
|
+
this.changed = true;
|
160
|
+
this.hasFocus = true;
|
161
|
+
|
162
|
+
if(this.observer) clearTimeout(this.observer);
|
163
|
+
this.observer =
|
164
|
+
setTimeout(this.onObserverEvent.bind(this), this.options.frequency*1000);
|
165
|
+
},
|
166
|
+
|
167
|
+
activate: function() {
|
168
|
+
this.changed = false;
|
169
|
+
this.hasFocus = true;
|
170
|
+
this.getUpdatedChoices();
|
171
|
+
},
|
172
|
+
|
173
|
+
onHover: function(event) {
|
174
|
+
var element = Event.findElement(event, 'LI');
|
175
|
+
if(this.index != element.autocompleteIndex)
|
176
|
+
{
|
177
|
+
this.index = element.autocompleteIndex;
|
178
|
+
this.render();
|
179
|
+
}
|
180
|
+
Event.stop(event);
|
181
|
+
},
|
182
|
+
|
183
|
+
onClick: function(event) {
|
184
|
+
var element = Event.findElement(event, 'LI');
|
185
|
+
this.index = element.autocompleteIndex;
|
186
|
+
this.selectEntry();
|
187
|
+
this.hide();
|
188
|
+
},
|
189
|
+
|
190
|
+
onBlur: function(event) {
|
191
|
+
// needed to make click events working
|
192
|
+
setTimeout(this.hide.bind(this), 250);
|
193
|
+
this.hasFocus = false;
|
194
|
+
this.active = false;
|
195
|
+
},
|
196
|
+
|
197
|
+
render: function() {
|
198
|
+
if(this.entryCount > 0) {
|
199
|
+
for (var i = 0; i < this.entryCount; i++)
|
200
|
+
this.index==i ?
|
201
|
+
Element.addClassName(this.getEntry(i),"selected") :
|
202
|
+
Element.removeClassName(this.getEntry(i),"selected");
|
203
|
+
if(this.hasFocus) {
|
204
|
+
this.show();
|
205
|
+
this.active = true;
|
206
|
+
}
|
207
|
+
} else {
|
208
|
+
this.active = false;
|
209
|
+
this.hide();
|
210
|
+
}
|
211
|
+
},
|
212
|
+
|
213
|
+
markPrevious: function() {
|
214
|
+
if(this.index > 0) this.index--;
|
215
|
+
else this.index = this.entryCount-1;
|
216
|
+
this.getEntry(this.index).scrollIntoView(true);
|
217
|
+
},
|
218
|
+
|
219
|
+
markNext: function() {
|
220
|
+
if(this.index < this.entryCount-1) this.index++;
|
221
|
+
else this.index = 0;
|
222
|
+
this.getEntry(this.index).scrollIntoView(false);
|
223
|
+
},
|
224
|
+
|
225
|
+
getEntry: function(index) {
|
226
|
+
return this.update.firstChild.childNodes[index];
|
227
|
+
},
|
228
|
+
|
229
|
+
getCurrentEntry: function() {
|
230
|
+
return this.getEntry(this.index);
|
231
|
+
},
|
232
|
+
|
233
|
+
selectEntry: function() {
|
234
|
+
this.active = false;
|
235
|
+
this.updateElement(this.getCurrentEntry());
|
236
|
+
},
|
237
|
+
|
238
|
+
updateElement: function(selectedElement) {
|
239
|
+
if (this.options.updateElement) {
|
240
|
+
this.options.updateElement(selectedElement);
|
241
|
+
return;
|
242
|
+
}
|
243
|
+
var value = '';
|
244
|
+
if (this.options.select) {
|
245
|
+
var nodes = $(selectedElement).select('.' + this.options.select) || [];
|
246
|
+
if(nodes.length>0) value = Element.collectTextNodes(nodes[0], this.options.select);
|
247
|
+
} else
|
248
|
+
value = Element.collectTextNodesIgnoreClass(selectedElement, 'informal');
|
249
|
+
|
250
|
+
var bounds = this.getTokenBounds();
|
251
|
+
if (bounds[0] != -1) {
|
252
|
+
var newValue = this.element.value.substr(0, bounds[0]);
|
253
|
+
var whitespace = this.element.value.substr(bounds[0]).match(/^\s+/);
|
254
|
+
if (whitespace)
|
255
|
+
newValue += whitespace[0];
|
256
|
+
this.element.value = newValue + value + this.element.value.substr(bounds[1]);
|
257
|
+
} else {
|
258
|
+
this.element.value = value;
|
259
|
+
}
|
260
|
+
this.oldElementValue = this.element.value;
|
261
|
+
this.element.focus();
|
262
|
+
|
263
|
+
if (this.options.afterUpdateElement)
|
264
|
+
this.options.afterUpdateElement(this.element, selectedElement);
|
265
|
+
},
|
266
|
+
|
267
|
+
updateChoices: function(choices) {
|
268
|
+
if(!this.changed && this.hasFocus) {
|
269
|
+
this.update.innerHTML = choices;
|
270
|
+
Element.cleanWhitespace(this.update);
|
271
|
+
Element.cleanWhitespace(this.update.down());
|
272
|
+
|
273
|
+
if(this.update.firstChild && this.update.down().childNodes) {
|
274
|
+
this.entryCount =
|
275
|
+
this.update.down().childNodes.length;
|
276
|
+
for (var i = 0; i < this.entryCount; i++) {
|
277
|
+
var entry = this.getEntry(i);
|
278
|
+
entry.autocompleteIndex = i;
|
279
|
+
this.addObservers(entry);
|
280
|
+
}
|
281
|
+
} else {
|
282
|
+
this.entryCount = 0;
|
283
|
+
}
|
284
|
+
|
285
|
+
this.stopIndicator();
|
286
|
+
this.index = 0;
|
287
|
+
|
288
|
+
if(this.entryCount==1 && this.options.autoSelect) {
|
289
|
+
this.selectEntry();
|
290
|
+
this.hide();
|
291
|
+
} else {
|
292
|
+
this.render();
|
293
|
+
}
|
294
|
+
}
|
295
|
+
},
|
296
|
+
|
297
|
+
addObservers: function(element) {
|
298
|
+
Event.observe(element, "mouseover", this.onHover.bindAsEventListener(this));
|
299
|
+
Event.observe(element, "click", this.onClick.bindAsEventListener(this));
|
300
|
+
},
|
301
|
+
|
302
|
+
onObserverEvent: function() {
|
303
|
+
this.changed = false;
|
304
|
+
this.tokenBounds = null;
|
305
|
+
if(this.getToken().length>=this.options.minChars) {
|
306
|
+
this.getUpdatedChoices();
|
307
|
+
} else {
|
308
|
+
this.active = false;
|
309
|
+
this.hide();
|
310
|
+
}
|
311
|
+
this.oldElementValue = this.element.value;
|
312
|
+
},
|
313
|
+
|
314
|
+
getToken: function() {
|
315
|
+
var bounds = this.getTokenBounds();
|
316
|
+
return this.element.value.substring(bounds[0], bounds[1]).strip();
|
317
|
+
},
|
318
|
+
|
319
|
+
getTokenBounds: function() {
|
320
|
+
if (null != this.tokenBounds) return this.tokenBounds;
|
321
|
+
var value = this.element.value;
|
322
|
+
if (value.strip().empty()) return [-1, 0];
|
323
|
+
var diff = arguments.callee.getFirstDifferencePos(value, this.oldElementValue);
|
324
|
+
var offset = (diff == this.oldElementValue.length ? 1 : 0);
|
325
|
+
var prevTokenPos = -1, nextTokenPos = value.length;
|
326
|
+
var tp;
|
327
|
+
for (var index = 0, l = this.options.tokens.length; index < l; ++index) {
|
328
|
+
tp = value.lastIndexOf(this.options.tokens[index], diff + offset - 1);
|
329
|
+
if (tp > prevTokenPos) prevTokenPos = tp;
|
330
|
+
tp = value.indexOf(this.options.tokens[index], diff + offset);
|
331
|
+
if (-1 != tp && tp < nextTokenPos) nextTokenPos = tp;
|
332
|
+
}
|
333
|
+
return (this.tokenBounds = [prevTokenPos + 1, nextTokenPos]);
|
334
|
+
}
|
335
|
+
});
|
336
|
+
|
337
|
+
Autocompleter.Base.prototype.getTokenBounds.getFirstDifferencePos = function(newS, oldS) {
|
338
|
+
var boundary = Math.min(newS.length, oldS.length);
|
339
|
+
for (var index = 0; index < boundary; ++index)
|
340
|
+
if (newS[index] != oldS[index])
|
341
|
+
return index;
|
342
|
+
return boundary;
|
343
|
+
};
|
344
|
+
|
345
|
+
Ajax.Autocompleter = Class.create(Autocompleter.Base, {
|
346
|
+
initialize: function(element, update, url, options) {
|
347
|
+
this.baseInitialize(element, update, options);
|
348
|
+
this.options.asynchronous = true;
|
349
|
+
this.options.onComplete = this.onComplete.bind(this);
|
350
|
+
this.options.defaultParams = this.options.parameters || null;
|
351
|
+
this.url = url;
|
352
|
+
},
|
353
|
+
|
354
|
+
getUpdatedChoices: function() {
|
355
|
+
this.startIndicator();
|
356
|
+
|
357
|
+
var entry = encodeURIComponent(this.options.paramName) + '=' +
|
358
|
+
encodeURIComponent(this.getToken());
|
359
|
+
|
360
|
+
this.options.parameters = this.options.callback ?
|
361
|
+
this.options.callback(this.element, entry) : entry;
|
362
|
+
|
363
|
+
if(this.options.defaultParams)
|
364
|
+
this.options.parameters += '&' + this.options.defaultParams;
|
365
|
+
|
366
|
+
new Ajax.Request(this.url, this.options);
|
367
|
+
},
|
368
|
+
|
369
|
+
onComplete: function(request) {
|
370
|
+
this.updateChoices(request.responseText);
|
371
|
+
}
|
372
|
+
});
|
373
|
+
|
374
|
+
// The local array autocompleter. Used when you'd prefer to
|
375
|
+
// inject an array of autocompletion options into the page, rather
|
376
|
+
// than sending out Ajax queries, which can be quite slow sometimes.
|
377
|
+
//
|
378
|
+
// The constructor takes four parameters. The first two are, as usual,
|
379
|
+
// the id of the monitored textbox, and id of the autocompletion menu.
|
380
|
+
// The third is the array you want to autocomplete from, and the fourth
|
381
|
+
// is the options block.
|
382
|
+
//
|
383
|
+
// Extra local autocompletion options:
|
384
|
+
// - choices - How many autocompletion choices to offer
|
385
|
+
//
|
386
|
+
// - partialSearch - If false, the autocompleter will match entered
|
387
|
+
// text only at the beginning of strings in the
|
388
|
+
// autocomplete array. Defaults to true, which will
|
389
|
+
// match text at the beginning of any *word* in the
|
390
|
+
// strings in the autocomplete array. If you want to
|
391
|
+
// search anywhere in the string, additionally set
|
392
|
+
// the option fullSearch to true (default: off).
|
393
|
+
//
|
394
|
+
// - fullSsearch - Search anywhere in autocomplete array strings.
|
395
|
+
//
|
396
|
+
// - partialChars - How many characters to enter before triggering
|
397
|
+
// a partial match (unlike minChars, which defines
|
398
|
+
// how many characters are required to do any match
|
399
|
+
// at all). Defaults to 2.
|
400
|
+
//
|
401
|
+
// - ignoreCase - Whether to ignore case when autocompleting.
|
402
|
+
// Defaults to true.
|
403
|
+
//
|
404
|
+
// It's possible to pass in a custom function as the 'selector'
|
405
|
+
// option, if you prefer to write your own autocompletion logic.
|
406
|
+
// In that case, the other options above will not apply unless
|
407
|
+
// you support them.
|
408
|
+
|
409
|
+
Autocompleter.Local = Class.create(Autocompleter.Base, {
|
410
|
+
initialize: function(element, update, array, options) {
|
411
|
+
this.baseInitialize(element, update, options);
|
412
|
+
this.options.array = array;
|
413
|
+
},
|
414
|
+
|
415
|
+
getUpdatedChoices: function() {
|
416
|
+
this.updateChoices(this.options.selector(this));
|
417
|
+
},
|
418
|
+
|
419
|
+
setOptions: function(options) {
|
420
|
+
this.options = Object.extend({
|
421
|
+
choices: 10,
|
422
|
+
partialSearch: true,
|
423
|
+
partialChars: 2,
|
424
|
+
ignoreCase: true,
|
425
|
+
fullSearch: false,
|
426
|
+
selector: function(instance) {
|
427
|
+
var ret = []; // Beginning matches
|
428
|
+
var partial = []; // Inside matches
|
429
|
+
var entry = instance.getToken();
|
430
|
+
var count = 0;
|
431
|
+
|
432
|
+
for (var i = 0; i < instance.options.array.length &&
|
433
|
+
ret.length < instance.options.choices ; i++) {
|
434
|
+
|
435
|
+
var elem = instance.options.array[i];
|
436
|
+
var foundPos = instance.options.ignoreCase ?
|
437
|
+
elem.toLowerCase().indexOf(entry.toLowerCase()) :
|
438
|
+
elem.indexOf(entry);
|
439
|
+
|
440
|
+
while (foundPos != -1) {
|
441
|
+
if (foundPos == 0 && elem.length != entry.length) {
|
442
|
+
ret.push("<li><strong>" + elem.substr(0, entry.length) + "</strong>" +
|
443
|
+
elem.substr(entry.length) + "</li>");
|
444
|
+
break;
|
445
|
+
} else if (entry.length >= instance.options.partialChars &&
|
446
|
+
instance.options.partialSearch && foundPos != -1) {
|
447
|
+
if (instance.options.fullSearch || /\s/.test(elem.substr(foundPos-1,1))) {
|
448
|
+
partial.push("<li>" + elem.substr(0, foundPos) + "<strong>" +
|
449
|
+
elem.substr(foundPos, entry.length) + "</strong>" + elem.substr(
|
450
|
+
foundPos + entry.length) + "</li>");
|
451
|
+
break;
|
452
|
+
}
|
453
|
+
}
|
454
|
+
|
455
|
+
foundPos = instance.options.ignoreCase ?
|
456
|
+
elem.toLowerCase().indexOf(entry.toLowerCase(), foundPos + 1) :
|
457
|
+
elem.indexOf(entry, foundPos + 1);
|
458
|
+
|
459
|
+
}
|
460
|
+
}
|
461
|
+
if (partial.length)
|
462
|
+
ret = ret.concat(partial.slice(0, instance.options.choices - ret.length));
|
463
|
+
return "<ul>" + ret.join('') + "</ul>";
|
464
|
+
}
|
465
|
+
}, options || { });
|
466
|
+
}
|
467
|
+
});
|
468
|
+
|
469
|
+
// AJAX in-place editor and collection editor
|
470
|
+
// Full rewrite by Christophe Porteneuve <tdd@tddsworld.com> (April 2007).
|
471
|
+
|
472
|
+
// Use this if you notice weird scrolling problems on some browsers,
|
473
|
+
// the DOM might be a bit confused when this gets called so do this
|
474
|
+
// waits 1 ms (with setTimeout) until it does the activation
|
475
|
+
Field.scrollFreeActivate = function(field) {
|
476
|
+
setTimeout(function() {
|
477
|
+
Field.activate(field);
|
478
|
+
}, 1);
|
479
|
+
};
|
480
|
+
|
481
|
+
Ajax.InPlaceEditor = Class.create({
|
482
|
+
initialize: function(element, url, options) {
|
483
|
+
this.url = url;
|
484
|
+
this.element = element = $(element);
|
485
|
+
this.prepareOptions();
|
486
|
+
this._controls = { };
|
487
|
+
arguments.callee.dealWithDeprecatedOptions(options); // DEPRECATION LAYER!!!
|
488
|
+
Object.extend(this.options, options || { });
|
489
|
+
if (!this.options.formId && this.element.id) {
|
490
|
+
this.options.formId = this.element.id + '-inplaceeditor';
|
491
|
+
if ($(this.options.formId))
|
492
|
+
this.options.formId = '';
|
493
|
+
}
|
494
|
+
if (this.options.externalControl)
|
495
|
+
this.options.externalControl = $(this.options.externalControl);
|
496
|
+
if (!this.options.externalControl)
|
497
|
+
this.options.externalControlOnly = false;
|
498
|
+
this._originalBackground = this.element.getStyle('background-color') || 'transparent';
|
499
|
+
this.element.title = this.options.clickToEditText;
|
500
|
+
this._boundCancelHandler = this.handleFormCancellation.bind(this);
|
501
|
+
this._boundComplete = (this.options.onComplete || Prototype.emptyFunction).bind(this);
|
502
|
+
this._boundFailureHandler = this.handleAJAXFailure.bind(this);
|
503
|
+
this._boundSubmitHandler = this.handleFormSubmission.bind(this);
|
504
|
+
this._boundWrapperHandler = this.wrapUp.bind(this);
|
505
|
+
this.registerListeners();
|
506
|
+
},
|
507
|
+
checkForEscapeOrReturn: function(e) {
|
508
|
+
if (!this._editing || e.ctrlKey || e.altKey || e.shiftKey) return;
|
509
|
+
if (Event.KEY_ESC == e.keyCode)
|
510
|
+
this.handleFormCancellation(e);
|
511
|
+
else if (Event.KEY_RETURN == e.keyCode)
|
512
|
+
this.handleFormSubmission(e);
|
513
|
+
},
|
514
|
+
createControl: function(mode, handler, extraClasses) {
|
515
|
+
var control = this.options[mode + 'Control'];
|
516
|
+
var text = this.options[mode + 'Text'];
|
517
|
+
if ('button' == control) {
|
518
|
+
var btn = document.createElement('input');
|
519
|
+
btn.type = 'submit';
|
520
|
+
btn.value = text;
|
521
|
+
btn.className = 'editor_' + mode + '_button';
|
522
|
+
if ('cancel' == mode)
|
523
|
+
btn.onclick = this._boundCancelHandler;
|
524
|
+
this._form.appendChild(btn);
|
525
|
+
this._controls[mode] = btn;
|
526
|
+
} else if ('link' == control) {
|
527
|
+
var link = document.createElement('a');
|
528
|
+
link.href = '#';
|
529
|
+
link.appendChild(document.createTextNode(text));
|
530
|
+
link.onclick = 'cancel' == mode ? this._boundCancelHandler : this._boundSubmitHandler;
|
531
|
+
link.className = 'editor_' + mode + '_link';
|
532
|
+
if (extraClasses)
|
533
|
+
link.className += ' ' + extraClasses;
|
534
|
+
this._form.appendChild(link);
|
535
|
+
this._controls[mode] = link;
|
536
|
+
}
|
537
|
+
},
|
538
|
+
createEditField: function() {
|
539
|
+
var text = (this.options.loadTextURL ? this.options.loadingText : this.getText());
|
540
|
+
var fld;
|
541
|
+
if (1 >= this.options.rows && !/\r|\n/.test(this.getText())) {
|
542
|
+
fld = document.createElement('input');
|
543
|
+
fld.type = 'text';
|
544
|
+
var size = this.options.size || this.options.cols || 0;
|
545
|
+
if (0 < size) fld.size = size;
|
546
|
+
} else {
|
547
|
+
fld = document.createElement('textarea');
|
548
|
+
fld.rows = (1 >= this.options.rows ? this.options.autoRows : this.options.rows);
|
549
|
+
fld.cols = this.options.cols || 40;
|
550
|
+
}
|
551
|
+
fld.name = this.options.paramName;
|
552
|
+
fld.value = text; // No HTML breaks conversion anymore
|
553
|
+
fld.className = 'editor_field';
|
554
|
+
if (this.options.submitOnBlur)
|
555
|
+
fld.onblur = this._boundSubmitHandler;
|
556
|
+
this._controls.editor = fld;
|
557
|
+
if (this.options.loadTextURL)
|
558
|
+
this.loadExternalText();
|
559
|
+
this._form.appendChild(this._controls.editor);
|
560
|
+
},
|
561
|
+
createForm: function() {
|
562
|
+
var ipe = this;
|
563
|
+
function addText(mode, condition) {
|
564
|
+
var text = ipe.options['text' + mode + 'Controls'];
|
565
|
+
if (!text || condition === false) return;
|
566
|
+
ipe._form.appendChild(document.createTextNode(text));
|
567
|
+
};
|
568
|
+
this._form = $(document.createElement('form'));
|
569
|
+
this._form.id = this.options.formId;
|
570
|
+
this._form.addClassName(this.options.formClassName);
|
571
|
+
this._form.onsubmit = this._boundSubmitHandler;
|
572
|
+
this.createEditField();
|
573
|
+
if ('textarea' == this._controls.editor.tagName.toLowerCase())
|
574
|
+
this._form.appendChild(document.createElement('br'));
|
575
|
+
if (this.options.onFormCustomization)
|
576
|
+
this.options.onFormCustomization(this, this._form);
|
577
|
+
addText('Before', this.options.okControl || this.options.cancelControl);
|
578
|
+
this.createControl('ok', this._boundSubmitHandler);
|
579
|
+
addText('Between', this.options.okControl && this.options.cancelControl);
|
580
|
+
this.createControl('cancel', this._boundCancelHandler, 'editor_cancel');
|
581
|
+
addText('After', this.options.okControl || this.options.cancelControl);
|
582
|
+
},
|
583
|
+
destroy: function() {
|
584
|
+
if (this._oldInnerHTML)
|
585
|
+
this.element.innerHTML = this._oldInnerHTML;
|
586
|
+
this.leaveEditMode();
|
587
|
+
this.unregisterListeners();
|
588
|
+
},
|
589
|
+
enterEditMode: function(e) {
|
590
|
+
if (this._saving || this._editing) return;
|
591
|
+
this._editing = true;
|
592
|
+
this.triggerCallback('onEnterEditMode');
|
593
|
+
if (this.options.externalControl)
|
594
|
+
this.options.externalControl.hide();
|
595
|
+
this.element.hide();
|
596
|
+
this.createForm();
|
597
|
+
this.element.parentNode.insertBefore(this._form, this.element);
|
598
|
+
if (!this.options.loadTextURL)
|
599
|
+
this.postProcessEditField();
|
600
|
+
if (e) Event.stop(e);
|
601
|
+
},
|
602
|
+
enterHover: function(e) {
|
603
|
+
if (this.options.hoverClassName)
|
604
|
+
this.element.addClassName(this.options.hoverClassName);
|
605
|
+
if (this._saving) return;
|
606
|
+
this.triggerCallback('onEnterHover');
|
607
|
+
},
|
608
|
+
getText: function() {
|
609
|
+
return this.element.innerHTML.unescapeHTML();
|
610
|
+
},
|
611
|
+
handleAJAXFailure: function(transport) {
|
612
|
+
this.triggerCallback('onFailure', transport);
|
613
|
+
if (this._oldInnerHTML) {
|
614
|
+
this.element.innerHTML = this._oldInnerHTML;
|
615
|
+
this._oldInnerHTML = null;
|
616
|
+
}
|
617
|
+
},
|
618
|
+
handleFormCancellation: function(e) {
|
619
|
+
this.wrapUp();
|
620
|
+
if (e) Event.stop(e);
|
621
|
+
},
|
622
|
+
handleFormSubmission: function(e) {
|
623
|
+
var form = this._form;
|
624
|
+
var value = $F(this._controls.editor);
|
625
|
+
this.prepareSubmission();
|
626
|
+
var params = this.options.callback(form, value) || '';
|
627
|
+
if (Object.isString(params))
|
628
|
+
params = params.toQueryParams();
|
629
|
+
params.editorId = this.element.id;
|
630
|
+
if (this.options.htmlResponse) {
|
631
|
+
var options = Object.extend({ evalScripts: true }, this.options.ajaxOptions);
|
632
|
+
Object.extend(options, {
|
633
|
+
parameters: params,
|
634
|
+
onComplete: this._boundWrapperHandler,
|
635
|
+
onFailure: this._boundFailureHandler
|
636
|
+
});
|
637
|
+
new Ajax.Updater({ success: this.element }, this.url, options);
|
638
|
+
} else {
|
639
|
+
var options = Object.extend({ method: 'get' }, this.options.ajaxOptions);
|
640
|
+
Object.extend(options, {
|
641
|
+
parameters: params,
|
642
|
+
onComplete: this._boundWrapperHandler,
|
643
|
+
onFailure: this._boundFailureHandler
|
644
|
+
});
|
645
|
+
new Ajax.Request(this.url, options);
|
646
|
+
}
|
647
|
+
if (e) Event.stop(e);
|
648
|
+
},
|
649
|
+
leaveEditMode: function() {
|
650
|
+
this.element.removeClassName(this.options.savingClassName);
|
651
|
+
this.removeForm();
|
652
|
+
this.leaveHover();
|
653
|
+
this.element.style.backgroundColor = this._originalBackground;
|
654
|
+
this.element.show();
|
655
|
+
if (this.options.externalControl)
|
656
|
+
this.options.externalControl.show();
|
657
|
+
this._saving = false;
|
658
|
+
this._editing = false;
|
659
|
+
this._oldInnerHTML = null;
|
660
|
+
this.triggerCallback('onLeaveEditMode');
|
661
|
+
},
|
662
|
+
leaveHover: function(e) {
|
663
|
+
if (this.options.hoverClassName)
|
664
|
+
this.element.removeClassName(this.options.hoverClassName);
|
665
|
+
if (this._saving) return;
|
666
|
+
this.triggerCallback('onLeaveHover');
|
667
|
+
},
|
668
|
+
loadExternalText: function() {
|
669
|
+
this._form.addClassName(this.options.loadingClassName);
|
670
|
+
this._controls.editor.disabled = true;
|
671
|
+
var options = Object.extend({ method: 'get' }, this.options.ajaxOptions);
|
672
|
+
Object.extend(options, {
|
673
|
+
parameters: 'editorId=' + encodeURIComponent(this.element.id),
|
674
|
+
onComplete: Prototype.emptyFunction,
|
675
|
+
onSuccess: function(transport) {
|
676
|
+
this._form.removeClassName(this.options.loadingClassName);
|
677
|
+
var text = transport.responseText;
|
678
|
+
if (this.options.stripLoadedTextTags)
|
679
|
+
text = text.stripTags();
|
680
|
+
this._controls.editor.value = text;
|
681
|
+
this._controls.editor.disabled = false;
|
682
|
+
this.postProcessEditField();
|
683
|
+
}.bind(this),
|
684
|
+
onFailure: this._boundFailureHandler
|
685
|
+
});
|
686
|
+
new Ajax.Request(this.options.loadTextURL, options);
|
687
|
+
},
|
688
|
+
postProcessEditField: function() {
|
689
|
+
var fpc = this.options.fieldPostCreation;
|
690
|
+
if (fpc)
|
691
|
+
$(this._controls.editor)['focus' == fpc ? 'focus' : 'activate']();
|
692
|
+
},
|
693
|
+
prepareOptions: function() {
|
694
|
+
this.options = Object.clone(Ajax.InPlaceEditor.DefaultOptions);
|
695
|
+
Object.extend(this.options, Ajax.InPlaceEditor.DefaultCallbacks);
|
696
|
+
[this._extraDefaultOptions].flatten().compact().each(function(defs) {
|
697
|
+
Object.extend(this.options, defs);
|
698
|
+
}.bind(this));
|
699
|
+
},
|
700
|
+
prepareSubmission: function() {
|
701
|
+
this._saving = true;
|
702
|
+
this.removeForm();
|
703
|
+
this.leaveHover();
|
704
|
+
this.showSaving();
|
705
|
+
},
|
706
|
+
registerListeners: function() {
|
707
|
+
this._listeners = { };
|
708
|
+
var listener;
|
709
|
+
$H(Ajax.InPlaceEditor.Listeners).each(function(pair) {
|
710
|
+
listener = this[pair.value].bind(this);
|
711
|
+
this._listeners[pair.key] = listener;
|
712
|
+
if (!this.options.externalControlOnly)
|
713
|
+
this.element.observe(pair.key, listener);
|
714
|
+
if (this.options.externalControl)
|
715
|
+
this.options.externalControl.observe(pair.key, listener);
|
716
|
+
}.bind(this));
|
717
|
+
},
|
718
|
+
removeForm: function() {
|
719
|
+
if (!this._form) return;
|
720
|
+
this._form.remove();
|
721
|
+
this._form = null;
|
722
|
+
this._controls = { };
|
723
|
+
},
|
724
|
+
showSaving: function() {
|
725
|
+
this._oldInnerHTML = this.element.innerHTML;
|
726
|
+
this.element.innerHTML = this.options.savingText;
|
727
|
+
this.element.addClassName(this.options.savingClassName);
|
728
|
+
this.element.style.backgroundColor = this._originalBackground;
|
729
|
+
this.element.show();
|
730
|
+
},
|
731
|
+
triggerCallback: function(cbName, arg) {
|
732
|
+
if ('function' == typeof this.options[cbName]) {
|
733
|
+
this.options[cbName](this, arg);
|
734
|
+
}
|
735
|
+
},
|
736
|
+
unregisterListeners: function() {
|
737
|
+
$H(this._listeners).each(function(pair) {
|
738
|
+
if (!this.options.externalControlOnly)
|
739
|
+
this.element.stopObserving(pair.key, pair.value);
|
740
|
+
if (this.options.externalControl)
|
741
|
+
this.options.externalControl.stopObserving(pair.key, pair.value);
|
742
|
+
}.bind(this));
|
743
|
+
},
|
744
|
+
wrapUp: function(transport) {
|
745
|
+
this.leaveEditMode();
|
746
|
+
// Can't use triggerCallback due to backward compatibility: requires
|
747
|
+
// binding + direct element
|
748
|
+
this._boundComplete(transport, this.element);
|
749
|
+
}
|
750
|
+
});
|
751
|
+
|
752
|
+
Object.extend(Ajax.InPlaceEditor.prototype, {
|
753
|
+
dispose: Ajax.InPlaceEditor.prototype.destroy
|
754
|
+
});
|
755
|
+
|
756
|
+
Ajax.InPlaceCollectionEditor = Class.create(Ajax.InPlaceEditor, {
|
757
|
+
initialize: function($super, element, url, options) {
|
758
|
+
this._extraDefaultOptions = Ajax.InPlaceCollectionEditor.DefaultOptions;
|
759
|
+
$super(element, url, options);
|
760
|
+
},
|
761
|
+
|
762
|
+
createEditField: function() {
|
763
|
+
var list = document.createElement('select');
|
764
|
+
list.name = this.options.paramName;
|
765
|
+
list.size = 1;
|
766
|
+
this._controls.editor = list;
|
767
|
+
this._collection = this.options.collection || [];
|
768
|
+
if (this.options.loadCollectionURL)
|
769
|
+
this.loadCollection();
|
770
|
+
else
|
771
|
+
this.checkForExternalText();
|
772
|
+
this._form.appendChild(this._controls.editor);
|
773
|
+
},
|
774
|
+
|
775
|
+
loadCollection: function() {
|
776
|
+
this._form.addClassName(this.options.loadingClassName);
|
777
|
+
this.showLoadingText(this.options.loadingCollectionText);
|
778
|
+
var options = Object.extend({ method: 'get' }, this.options.ajaxOptions);
|
779
|
+
Object.extend(options, {
|
780
|
+
parameters: 'editorId=' + encodeURIComponent(this.element.id),
|
781
|
+
onComplete: Prototype.emptyFunction,
|
782
|
+
onSuccess: function(transport) {
|
783
|
+
var js = transport.responseText.strip();
|
784
|
+
if (!/^\[.*\]$/.test(js)) // TODO: improve sanity check
|
785
|
+
throw('Server returned an invalid collection representation.');
|
786
|
+
this._collection = eval(js);
|
787
|
+
this.checkForExternalText();
|
788
|
+
}.bind(this),
|
789
|
+
onFailure: this.onFailure
|
790
|
+
});
|
791
|
+
new Ajax.Request(this.options.loadCollectionURL, options);
|
792
|
+
},
|
793
|
+
|
794
|
+
showLoadingText: function(text) {
|
795
|
+
this._controls.editor.disabled = true;
|
796
|
+
var tempOption = this._controls.editor.firstChild;
|
797
|
+
if (!tempOption) {
|
798
|
+
tempOption = document.createElement('option');
|
799
|
+
tempOption.value = '';
|
800
|
+
this._controls.editor.appendChild(tempOption);
|
801
|
+
tempOption.selected = true;
|
802
|
+
}
|
803
|
+
tempOption.update((text || '').stripScripts().stripTags());
|
804
|
+
},
|
805
|
+
|
806
|
+
checkForExternalText: function() {
|
807
|
+
this._text = this.getText();
|
808
|
+
if (this.options.loadTextURL)
|
809
|
+
this.loadExternalText();
|
810
|
+
else
|
811
|
+
this.buildOptionList();
|
812
|
+
},
|
813
|
+
|
814
|
+
loadExternalText: function() {
|
815
|
+
this.showLoadingText(this.options.loadingText);
|
816
|
+
var options = Object.extend({ method: 'get' }, this.options.ajaxOptions);
|
817
|
+
Object.extend(options, {
|
818
|
+
parameters: 'editorId=' + encodeURIComponent(this.element.id),
|
819
|
+
onComplete: Prototype.emptyFunction,
|
820
|
+
onSuccess: function(transport) {
|
821
|
+
this._text = transport.responseText.strip();
|
822
|
+
this.buildOptionList();
|
823
|
+
}.bind(this),
|
824
|
+
onFailure: this.onFailure
|
825
|
+
});
|
826
|
+
new Ajax.Request(this.options.loadTextURL, options);
|
827
|
+
},
|
828
|
+
|
829
|
+
buildOptionList: function() {
|
830
|
+
this._form.removeClassName(this.options.loadingClassName);
|
831
|
+
this._collection = this._collection.map(function(entry) {
|
832
|
+
return 2 === entry.length ? entry : [entry, entry].flatten();
|
833
|
+
});
|
834
|
+
var marker = ('value' in this.options) ? this.options.value : this._text;
|
835
|
+
var textFound = this._collection.any(function(entry) {
|
836
|
+
return entry[0] == marker;
|
837
|
+
}.bind(this));
|
838
|
+
this._controls.editor.update('');
|
839
|
+
var option;
|
840
|
+
this._collection.each(function(entry, index) {
|
841
|
+
option = document.createElement('option');
|
842
|
+
option.value = entry[0];
|
843
|
+
option.selected = textFound ? entry[0] == marker : 0 == index;
|
844
|
+
option.appendChild(document.createTextNode(entry[1]));
|
845
|
+
this._controls.editor.appendChild(option);
|
846
|
+
}.bind(this));
|
847
|
+
this._controls.editor.disabled = false;
|
848
|
+
Field.scrollFreeActivate(this._controls.editor);
|
849
|
+
}
|
850
|
+
});
|
851
|
+
|
852
|
+
//**** DEPRECATION LAYER FOR InPlace[Collection]Editor! ****
|
853
|
+
//**** This only exists for a while, in order to let ****
|
854
|
+
//**** users adapt to the new API. Read up on the new ****
|
855
|
+
//**** API and convert your code to it ASAP! ****
|
856
|
+
|
857
|
+
Ajax.InPlaceEditor.prototype.initialize.dealWithDeprecatedOptions = function(options) {
|
858
|
+
if (!options) return;
|
859
|
+
function fallback(name, expr) {
|
860
|
+
if (name in options || expr === undefined) return;
|
861
|
+
options[name] = expr;
|
862
|
+
};
|
863
|
+
fallback('cancelControl', (options.cancelLink ? 'link' : (options.cancelButton ? 'button' :
|
864
|
+
options.cancelLink == options.cancelButton == false ? false : undefined)));
|
865
|
+
fallback('okControl', (options.okLink ? 'link' : (options.okButton ? 'button' :
|
866
|
+
options.okLink == options.okButton == false ? false : undefined)));
|
867
|
+
fallback('highlightColor', options.highlightcolor);
|
868
|
+
fallback('highlightEndColor', options.highlightendcolor);
|
869
|
+
};
|
870
|
+
|
871
|
+
Object.extend(Ajax.InPlaceEditor, {
|
872
|
+
DefaultOptions: {
|
873
|
+
ajaxOptions: { },
|
874
|
+
autoRows: 3, // Use when multi-line w/ rows == 1
|
875
|
+
cancelControl: 'link', // 'link'|'button'|false
|
876
|
+
cancelText: 'cancel',
|
877
|
+
clickToEditText: 'Click to edit',
|
878
|
+
externalControl: null, // id|elt
|
879
|
+
externalControlOnly: false,
|
880
|
+
fieldPostCreation: 'activate', // 'activate'|'focus'|false
|
881
|
+
formClassName: 'inplaceeditor-form',
|
882
|
+
formId: null, // id|elt
|
883
|
+
highlightColor: '#ffff99',
|
884
|
+
highlightEndColor: '#ffffff',
|
885
|
+
hoverClassName: '',
|
886
|
+
htmlResponse: true,
|
887
|
+
loadingClassName: 'inplaceeditor-loading',
|
888
|
+
loadingText: 'Loading...',
|
889
|
+
okControl: 'button', // 'link'|'button'|false
|
890
|
+
okText: 'ok',
|
891
|
+
paramName: 'value',
|
892
|
+
rows: 1, // If 1 and multi-line, uses autoRows
|
893
|
+
savingClassName: 'inplaceeditor-saving',
|
894
|
+
savingText: 'Saving...',
|
895
|
+
size: 0,
|
896
|
+
stripLoadedTextTags: false,
|
897
|
+
submitOnBlur: false,
|
898
|
+
textAfterControls: '',
|
899
|
+
textBeforeControls: '',
|
900
|
+
textBetweenControls: ''
|
901
|
+
},
|
902
|
+
DefaultCallbacks: {
|
903
|
+
callback: function(form) {
|
904
|
+
return Form.serialize(form);
|
905
|
+
},
|
906
|
+
onComplete: function(transport, element) {
|
907
|
+
// For backward compatibility, this one is bound to the IPE, and passes
|
908
|
+
// the element directly. It was too often customized, so we don't break it.
|
909
|
+
new Effect.Highlight(element, {
|
910
|
+
startcolor: this.options.highlightColor, keepBackgroundImage: true });
|
911
|
+
},
|
912
|
+
onEnterEditMode: null,
|
913
|
+
onEnterHover: function(ipe) {
|
914
|
+
ipe.element.style.backgroundColor = ipe.options.highlightColor;
|
915
|
+
if (ipe._effect)
|
916
|
+
ipe._effect.cancel();
|
917
|
+
},
|
918
|
+
onFailure: function(transport, ipe) {
|
919
|
+
alert('Error communication with the server: ' + transport.responseText.stripTags());
|
920
|
+
},
|
921
|
+
onFormCustomization: null, // Takes the IPE and its generated form, after editor, before controls.
|
922
|
+
onLeaveEditMode: null,
|
923
|
+
onLeaveHover: function(ipe) {
|
924
|
+
ipe._effect = new Effect.Highlight(ipe.element, {
|
925
|
+
startcolor: ipe.options.highlightColor, endcolor: ipe.options.highlightEndColor,
|
926
|
+
restorecolor: ipe._originalBackground, keepBackgroundImage: true
|
927
|
+
});
|
928
|
+
}
|
929
|
+
},
|
930
|
+
Listeners: {
|
931
|
+
click: 'enterEditMode',
|
932
|
+
keydown: 'checkForEscapeOrReturn',
|
933
|
+
mouseover: 'enterHover',
|
934
|
+
mouseout: 'leaveHover'
|
935
|
+
}
|
936
|
+
});
|
937
|
+
|
938
|
+
Ajax.InPlaceCollectionEditor.DefaultOptions = {
|
939
|
+
loadingCollectionText: 'Loading options...'
|
940
|
+
};
|
941
|
+
|
942
|
+
// Delayed observer, like Form.Element.Observer,
|
943
|
+
// but waits for delay after last key input
|
944
|
+
// Ideal for live-search fields
|
945
|
+
|
946
|
+
Form.Element.DelayedObserver = Class.create({
|
947
|
+
initialize: function(element, delay, callback) {
|
948
|
+
this.delay = delay || 0.5;
|
949
|
+
this.element = $(element);
|
950
|
+
this.callback = callback;
|
951
|
+
this.timer = null;
|
952
|
+
this.lastValue = $F(this.element);
|
953
|
+
Event.observe(this.element,'keyup',this.delayedListener.bindAsEventListener(this));
|
954
|
+
},
|
955
|
+
delayedListener: function(event) {
|
956
|
+
if(this.lastValue == $F(this.element)) return;
|
957
|
+
if(this.timer) clearTimeout(this.timer);
|
958
|
+
this.timer = setTimeout(this.onTimerEvent.bind(this), this.delay * 1000);
|
959
|
+
this.lastValue = $F(this.element);
|
960
|
+
},
|
961
|
+
onTimerEvent: function() {
|
962
|
+
this.timer = null;
|
963
|
+
this.callback(this.element, $F(this.element));
|
964
|
+
}
|
965
|
+
});
|