alchemy 1.0.3 → 8.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +24 -17
- data/README.md +538 -4
- data/lib/alchemy.rb +3 -2
- metadata +61 -223
- data/Rakefile +0 -21
- data/app/assets/fonts/alchemy/LiberationSans-Bold-webfont.eot +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Bold-webfont.svg +0 -154
- data/app/assets/fonts/alchemy/LiberationSans-Bold-webfont.ttf +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Bold-webfont.woff +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-BoldItalic-webfont.eot +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-BoldItalic-webfont.svg +0 -154
- data/app/assets/fonts/alchemy/LiberationSans-BoldItalic-webfont.ttf +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-BoldItalic-webfont.woff +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Italic-webfont.eot +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Italic-webfont.svg +0 -154
- data/app/assets/fonts/alchemy/LiberationSans-Italic-webfont.ttf +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Italic-webfont.woff +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Regular-webfont.eot +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Regular-webfont.svg +0 -154
- data/app/assets/fonts/alchemy/LiberationSans-Regular-webfont.ttf +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Regular-webfont.woff +0 -0
- data/app/assets/fonts/alchemy/Red Hat Liberation License.txt +0 -78
- data/app/assets/fonts/alchemy/overpass_bold-web.eot +0 -0
- data/app/assets/fonts/alchemy/overpass_bold-web.svg +0 -470
- data/app/assets/fonts/alchemy/overpass_bold-web.ttf +0 -0
- data/app/assets/fonts/alchemy/overpass_bold-web.woff +0 -0
- data/app/assets/fonts/alchemy/overpass_regular-web.eot +0 -0
- data/app/assets/fonts/alchemy/overpass_regular-web.svg +0 -470
- data/app/assets/fonts/alchemy/overpass_regular-web.ttf +0 -0
- data/app/assets/fonts/alchemy/overpass_regular-web.woff +0 -0
- data/app/assets/images/alchemy/icons/action-icons.png +0 -0
- data/app/assets/images/alchemy/icons/arrow_icon.png +0 -0
- data/app/assets/images/alchemy/icons/chosen-sprite.png +0 -0
- data/app/assets/images/alchemy/icons/error_icon.png +0 -0
- data/app/assets/images/alchemy/icons/objects.png +0 -0
- data/app/assets/images/alchemy/icons/spinner.gif +0 -0
- data/app/assets/images/alchemy/icons/spinner_head.gif +0 -0
- data/app/assets/images/alchemy/icons/success_icon.png +0 -0
- data/app/assets/images/alchemy/icons/warning_icon.png +0 -0
- data/app/assets/javascripts/alchemy/flash_messages.js +0 -12
- data/app/assets/javascripts/alchemy/forms.js +0 -25
- data/app/assets/javascripts/alchemy/i18n.js +0 -36
- data/app/assets/javascripts/alchemy/login.js +0 -130
- data/app/assets/javascripts/alchemy/password.js +0 -99
- data/app/assets/stylesheets/alchemy/components/_chosen.scss +0 -423
- data/app/assets/stylesheets/alchemy/components/_content.scss +0 -58
- data/app/assets/stylesheets/alchemy/components/_helpers.scss +0 -38
- data/app/assets/stylesheets/alchemy/components/_media.scss +0 -49
- data/app/assets/stylesheets/alchemy/components/_media_object.scss +0 -22
- data/app/assets/stylesheets/alchemy/components/_normalize.scss +0 -396
- data/app/assets/stylesheets/alchemy/components/_shared.scss +0 -18
- data/app/assets/stylesheets/alchemy/components/buttons/_buttons.scss +0 -278
- data/app/assets/stylesheets/alchemy/components/buttons/_buttons_vars.scss +0 -11
- data/app/assets/stylesheets/alchemy/components/flash_messages/_flash_messages.scss +0 -93
- data/app/assets/stylesheets/alchemy/components/flash_messages/_flash_messages_vars.scss +0 -3
- data/app/assets/stylesheets/alchemy/components/fonts/_liberation.scss +0 -44
- data/app/assets/stylesheets/alchemy/components/fonts/_overpass.scss +0 -24
- data/app/assets/stylesheets/alchemy/components/footer/_footer.scss +0 -53
- data/app/assets/stylesheets/alchemy/components/footer/_footer_vars.scss +0 -4
- data/app/assets/stylesheets/alchemy/components/forms/_forms.scss +0 -552
- data/app/assets/stylesheets/alchemy/components/forms/_forms_ie.scss +0 -45
- data/app/assets/stylesheets/alchemy/components/forms/_forms_mixins.scss +0 -18
- data/app/assets/stylesheets/alchemy/components/forms/_forms_responsive.scss +0 -167
- data/app/assets/stylesheets/alchemy/components/forms/_forms_vars.scss +0 -25
- data/app/assets/stylesheets/alchemy/components/header/_header.scss +0 -216
- data/app/assets/stylesheets/alchemy/components/header/_header_vars.scss +0 -11
- data/app/assets/stylesheets/alchemy/components/login/_login.scss +0 -173
- data/app/assets/stylesheets/alchemy/components/login/_login_mixins.scss +0 -7
- data/app/assets/stylesheets/alchemy/components/login/_login_vars.scss +0 -19
- data/app/assets/stylesheets/alchemy/components/sprites/_sprites.scss +0 -110
- data/app/assets/stylesheets/alchemy/components/sprites/_sprites_mixins.scss +0 -9
- data/app/assets/stylesheets/alchemy/components/text/_text.scss +0 -30
- data/app/assets/stylesheets/alchemy/components/text/_text_vars.scss +0 -1
- data/app/assets/stylesheets/alchemy/composites/content_elements.scss +0 -6
- data/app/assets/stylesheets/alchemy/composites/login.scss +0 -9
- data/app/assets/stylesheets/alchemy/composites/shell.scss +0 -4
- data/app/assets/stylesheets/alchemy/partials/_base.scss +0 -8
- data/app/assets/stylesheets/alchemy/partials/_colors.scss +0 -99
- data/app/assets/stylesheets/alchemy/partials/_mixins.scss +0 -24
- data/app/assets/stylesheets/alchemy/partials/_vars.scss +0 -31
- data/app/helpers/alchemy/gettext_translations.rb +0 -28
- data/app/helpers/alchemy/layout_helper.rb +0 -35
- data/app/helpers/alchemy/rails_translations.rb +0 -21
- data/app/helpers/alchemy/translation_helper.rb +0 -19
- data/app/views/alchemy/layouts/_change_password_layout.html.haml +0 -20
- data/app/views/alchemy/layouts/_common_i18n.haml +0 -4
- data/app/views/alchemy/layouts/_header_layout.haml +0 -13
- data/app/views/alchemy/layouts/_login_layout.html.haml +0 -58
- data/app/views/alchemy/layouts/_user_session_layout.haml +0 -17
- data/app/views/alchemy/layouts/base.html.haml +0 -20
- data/app/views/alchemy/layouts/shell_layout.haml +0 -10
- data/lib/alchemy/engine.rb +0 -8
- data/lib/alchemy/version.rb +0 -3
- data/test/alchemy_test.rb +0 -7
- data/test/test_helper.rb +0 -9
- data/vendor/assets/javascripts/alchemy/handlebars.js +0 -2201
- data/vendor/assets/javascripts/alchemy/html5shiv.js +0 -298
- data/vendor/assets/javascripts/alchemy/jquery/jquery-1.6.2.js +0 -8981
- data/vendor/assets/javascripts/alchemy/jquery/plugins/chosen.jquery.js +0 -1003
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/excanvas.js +0 -1427
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/excanvas.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.colorhelpers.js +0 -179
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.colorhelpers.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.crosshair.js +0 -167
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.crosshair.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.fillbetween.js +0 -183
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.fillbetween.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.image.js +0 -238
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.image.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.js +0 -2599
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.min.js +0 -6
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.navigate.js +0 -336
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.navigate.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.pie.js +0 -750
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.pie.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.resize.js +0 -60
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.resize.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.selection.js +0 -344
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.selection.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.stack.js +0 -184
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.stack.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.symbol.js +0 -70
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.symbol.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.threshold.js +0 -103
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.threshold.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/blank.svg +0 -3
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/custom_test.js +0 -67
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svg.css +0 -9
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svg.js +0 -1101
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svg.min.js +0 -7
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svg.pack.js +0 -7
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svgfilter.js +0 -396
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svgfilter.min.js +0 -7
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svgfilter.pack.js +0 -7
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svggraph.js +0 -1337
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svggraph.min.js +0 -7
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svggraph.pack.js +0 -7
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/lion.svg +0 -161
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/test.js +0 -714
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.ajaxfileupload.js +0 -205
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.ba-bbq.js +0 -1137
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.ba-resize.js +0 -246
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.cookie.js +0 -92
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.easing.1.3.js +0 -205
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.fancyqueries.js +0 -106
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.flash.js +0 -288
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.form.js +0 -964
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.hoverIntent.js +0 -106
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.jeditable.ajaxupload.js +0 -62
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.jeditable.js +0 -556
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.jnotify.js +0 -210
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.jscrollpane.js +0 -1390
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.jscrollpane.min.js +0 -11
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.linkHover.js +0 -89
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.loadmask.min.js +0 -10
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.mousewheel.js +0 -78
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.multiselect.filter.js +0 -176
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.multiselect.js +0 -668
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.pack.js +0 -11
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.periodicalupdater.js +0 -175
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.sortElements.js +0 -75
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.sparkline.min.js +0 -94
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.text-overflow.js +0 -60
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.timepickr.js +0 -214
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.timers.js +0 -142
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.tipsy.js +0 -358
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.treeTable.js +0 -226
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.trunk8.js +0 -203
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.ui.multiselect.js +0 -338
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.ui.totop.js +0 -58
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.uitablefilter.js +0 -95
- data/vendor/assets/javascripts/alchemy/jquery/plugins/ui.spinner.js +0 -683
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_highlight-hard_75_dadada_1x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_highlight-hard_75_e6e6e6_1x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_highlight-hard_95_ffffff_1x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_highlight-soft_80_e0e0e0_1x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_inset-hard_65_ffffff_1x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_inset-soft_95_fef1ec_1x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-icons_8f8f8f_256x240.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-icons_97baed_256x240.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/jquery-ui-1.8.11.custom.css +0 -573
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/js/jquery-1.5.1.min.js +0 -16
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/js/jquery-ui-1.8.11.custom.min.js +0 -783
- data/vendor/assets/javascripts/alchemy/rails.js +0 -331
- data/vendor/assets/javascripts/alchemy/underscore-1.3.1.js +0 -999
|
@@ -1,288 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Flash (http://jquery.lukelutman.com/plugins/flash)
|
|
3
|
-
* A jQuery plugin for embedding Flash movies.
|
|
4
|
-
*
|
|
5
|
-
* Version 1.0
|
|
6
|
-
* November 9th, 2006
|
|
7
|
-
*
|
|
8
|
-
* Copyright (c) 2006 Luke Lutman (http://www.lukelutman.com)
|
|
9
|
-
* Dual licensed under the MIT and GPL licenses.
|
|
10
|
-
* http://www.opensource.org/licenses/mit-license.php
|
|
11
|
-
* http://www.opensource.org/licenses/gpl-license.php
|
|
12
|
-
*
|
|
13
|
-
* Inspired by:
|
|
14
|
-
* SWFObject (http://blog.deconcept.com/swfobject/)
|
|
15
|
-
* UFO (http://www.bobbyvandersluis.com/ufo/)
|
|
16
|
-
* sIFR (http://www.mikeindustries.com/sifr/)
|
|
17
|
-
*
|
|
18
|
-
* IMPORTANT:
|
|
19
|
-
* The packed version of jQuery breaks ActiveX control
|
|
20
|
-
* activation in Internet Explorer. Use JSMin to minifiy
|
|
21
|
-
* jQuery (see: http://jquery.lukelutman.com/plugins/flash#activex).
|
|
22
|
-
*
|
|
23
|
-
**/
|
|
24
|
-
;(function(){
|
|
25
|
-
|
|
26
|
-
var $$;
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
*
|
|
30
|
-
* @desc Replace matching elements with a flash movie.
|
|
31
|
-
* @author Luke Lutman
|
|
32
|
-
* @version 1.0.1
|
|
33
|
-
*
|
|
34
|
-
* @name flash
|
|
35
|
-
* @param Hash htmlOptions Options for the embed/object tag.
|
|
36
|
-
* @param Hash pluginOptions Options for detecting/updating the Flash plugin (optional).
|
|
37
|
-
* @param Function replace Custom block called for each matched element if flash is installed (optional).
|
|
38
|
-
* @param Function update Custom block called for each matched if flash isn't installed (optional).
|
|
39
|
-
* @type jQuery
|
|
40
|
-
*
|
|
41
|
-
* @cat plugins/flash
|
|
42
|
-
*
|
|
43
|
-
* @example $('#hello').flash({ src: 'hello.swf' });
|
|
44
|
-
* @desc Embed a Flash movie.
|
|
45
|
-
*
|
|
46
|
-
* @example $('#hello').flash({ src: 'hello.swf' }, { version: 8 });
|
|
47
|
-
* @desc Embed a Flash 8 movie.
|
|
48
|
-
*
|
|
49
|
-
* @example $('#hello').flash({ src: 'hello.swf' }, { expressInstall: true });
|
|
50
|
-
* @desc Embed a Flash movie using Express Install if flash isn't installed.
|
|
51
|
-
*
|
|
52
|
-
* @example $('#hello').flash({ src: 'hello.swf' }, { update: false });
|
|
53
|
-
* @desc Embed a Flash movie, don't show an update message if Flash isn't installed.
|
|
54
|
-
*
|
|
55
|
-
**/
|
|
56
|
-
$$ = jQuery.fn.flash = function(htmlOptions, pluginOptions, replace, update) {
|
|
57
|
-
|
|
58
|
-
// Set the default block.
|
|
59
|
-
var block = replace || $$.replace;
|
|
60
|
-
|
|
61
|
-
// Merge the default and passed plugin options.
|
|
62
|
-
pluginOptions = $$.copy($$.pluginOptions, pluginOptions);
|
|
63
|
-
|
|
64
|
-
// Detect Flash.
|
|
65
|
-
if(!$$.hasFlash(pluginOptions.version)) {
|
|
66
|
-
// Use Express Install (if specified and Flash plugin 6,0,65 or higher is installed).
|
|
67
|
-
if(pluginOptions.expressInstall && $$.hasFlash(6,0,65)) {
|
|
68
|
-
// Add the necessary flashvars (merged later).
|
|
69
|
-
var expressInstallOptions = {
|
|
70
|
-
flashvars: {
|
|
71
|
-
MMredirectURL: location,
|
|
72
|
-
MMplayerType: 'PlugIn',
|
|
73
|
-
MMdoctitle: jQuery('title').text()
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
// Ask the user to update (if specified).
|
|
77
|
-
} else if (pluginOptions.update) {
|
|
78
|
-
// Change the block to insert the update message instead of the flash movie.
|
|
79
|
-
block = update || $$.update;
|
|
80
|
-
// Fail
|
|
81
|
-
} else {
|
|
82
|
-
// The required version of flash isn't installed.
|
|
83
|
-
// Express Install is turned off, or flash 6,0,65 isn't installed.
|
|
84
|
-
// Update is turned off.
|
|
85
|
-
// Return without doing anything.
|
|
86
|
-
return this;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
// Merge the default, express install and passed html options.
|
|
91
|
-
htmlOptions = $$.copy($$.htmlOptions, expressInstallOptions, htmlOptions);
|
|
92
|
-
|
|
93
|
-
// Invoke $block (with a copy of the merged html options) for each element.
|
|
94
|
-
return this.each(function(){
|
|
95
|
-
block.call(this, $$.copy(htmlOptions));
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
};
|
|
99
|
-
/**
|
|
100
|
-
*
|
|
101
|
-
* @name flash.copy
|
|
102
|
-
* @desc Copy an arbitrary number of objects into a new object.
|
|
103
|
-
* @type Object
|
|
104
|
-
*
|
|
105
|
-
* @example $$.copy({ foo: 1 }, { bar: 2 });
|
|
106
|
-
* @result { foo: 1, bar: 2 };
|
|
107
|
-
*
|
|
108
|
-
**/
|
|
109
|
-
$$.copy = function() {
|
|
110
|
-
var options = {}, flashvars = {};
|
|
111
|
-
for(var i = 0; i < arguments.length; i++) {
|
|
112
|
-
var arg = arguments[i];
|
|
113
|
-
if(arg == undefined) continue;
|
|
114
|
-
jQuery.extend(options, arg);
|
|
115
|
-
// don't clobber one flash vars object with another
|
|
116
|
-
// merge them instead
|
|
117
|
-
if(arg.flashvars == undefined) continue;
|
|
118
|
-
jQuery.extend(flashvars, arg.flashvars);
|
|
119
|
-
}
|
|
120
|
-
options.flashvars = flashvars;
|
|
121
|
-
return options;
|
|
122
|
-
};
|
|
123
|
-
/*
|
|
124
|
-
* @name flash.hasFlash
|
|
125
|
-
* @desc Check if a specific version of the Flash plugin is installed
|
|
126
|
-
* @type Boolean
|
|
127
|
-
*
|
|
128
|
-
**/
|
|
129
|
-
$$.hasFlash = function() {
|
|
130
|
-
// look for a flag in the query string to bypass flash detection
|
|
131
|
-
if(/hasFlash\=true/.test(location)) return true;
|
|
132
|
-
if(/hasFlash\=false/.test(location)) return false;
|
|
133
|
-
var pv = $$.hasFlash.playerVersion().match(/\d+/g);
|
|
134
|
-
var rv = String([arguments[0], arguments[1], arguments[2]]).match(/\d+/g) || String($$.pluginOptions.version).match(/\d+/g);
|
|
135
|
-
for(var i = 0; i < 3; i++) {
|
|
136
|
-
pv[i] = parseInt(pv[i] || 0);
|
|
137
|
-
rv[i] = parseInt(rv[i] || 0);
|
|
138
|
-
// player is less than required
|
|
139
|
-
if(pv[i] < rv[i]) return false;
|
|
140
|
-
// player is greater than required
|
|
141
|
-
if(pv[i] > rv[i]) return true;
|
|
142
|
-
}
|
|
143
|
-
// major version, minor version and revision match exactly
|
|
144
|
-
return true;
|
|
145
|
-
};
|
|
146
|
-
/**
|
|
147
|
-
*
|
|
148
|
-
* @name flash.hasFlash.playerVersion
|
|
149
|
-
* @desc Get the version of the installed Flash plugin.
|
|
150
|
-
* @type String
|
|
151
|
-
*
|
|
152
|
-
**/
|
|
153
|
-
$$.hasFlash.playerVersion = function() {
|
|
154
|
-
// ie
|
|
155
|
-
try {
|
|
156
|
-
try {
|
|
157
|
-
// avoid fp6 minor version lookup issues
|
|
158
|
-
// see: http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
|
|
159
|
-
var axo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6');
|
|
160
|
-
try { axo.AllowScriptAccess = 'always'; }
|
|
161
|
-
catch(e) { return '6,0,0'; }
|
|
162
|
-
} catch(e) {}
|
|
163
|
-
return new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\D+/g, ',').match(/^,?(.+),?$/)[1];
|
|
164
|
-
// other browsers
|
|
165
|
-
} catch(e) {
|
|
166
|
-
try {
|
|
167
|
-
if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){
|
|
168
|
-
return (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g, ",").match(/^,?(.+),?$/)[1];
|
|
169
|
-
}
|
|
170
|
-
} catch(e) {}
|
|
171
|
-
}
|
|
172
|
-
return '0,0,0';
|
|
173
|
-
};
|
|
174
|
-
/**
|
|
175
|
-
*
|
|
176
|
-
* @name flash.htmlOptions
|
|
177
|
-
* @desc The default set of options for the object or embed tag.
|
|
178
|
-
*
|
|
179
|
-
**/
|
|
180
|
-
$$.htmlOptions = {
|
|
181
|
-
height: 240,
|
|
182
|
-
flashvars: {},
|
|
183
|
-
pluginspage: 'http://www.adobe.com/go/getflashplayer',
|
|
184
|
-
src: '#',
|
|
185
|
-
type: 'application/x-shockwave-flash',
|
|
186
|
-
width: 320
|
|
187
|
-
};
|
|
188
|
-
/**
|
|
189
|
-
*
|
|
190
|
-
* @name flash.pluginOptions
|
|
191
|
-
* @desc The default set of options for checking/updating the flash Plugin.
|
|
192
|
-
*
|
|
193
|
-
**/
|
|
194
|
-
$$.pluginOptions = {
|
|
195
|
-
expressInstall: false,
|
|
196
|
-
update: true,
|
|
197
|
-
version: '6.0.65'
|
|
198
|
-
};
|
|
199
|
-
/**
|
|
200
|
-
*
|
|
201
|
-
* @name flash.replace
|
|
202
|
-
* @desc The default method for replacing an element with a Flash movie.
|
|
203
|
-
*
|
|
204
|
-
**/
|
|
205
|
-
$$.replace = function(htmlOptions) {
|
|
206
|
-
this.innerHTML = '<div class="alt">'+this.innerHTML+'</div>';
|
|
207
|
-
jQuery(this)
|
|
208
|
-
.addClass('flash-replaced')
|
|
209
|
-
.prepend($$.transform(htmlOptions));
|
|
210
|
-
};
|
|
211
|
-
/**
|
|
212
|
-
*
|
|
213
|
-
* @name flash.update
|
|
214
|
-
* @desc The default method for replacing an element with an update message.
|
|
215
|
-
*
|
|
216
|
-
**/
|
|
217
|
-
$$.update = function(htmlOptions) {
|
|
218
|
-
var url = String(location).split('?');
|
|
219
|
-
url.splice(1,0,'?hasFlash=true&');
|
|
220
|
-
url = url.join('');
|
|
221
|
-
var msg = '<p>This content requires the Flash Player. <a href="http://www.adobe.com/go/getflashplayer">Download Flash Player</a>. Already have Flash Player? <a href="'+url+'">Click here.</a></p>';
|
|
222
|
-
this.innerHTML = '<span class="alt">'+this.innerHTML+'</span>';
|
|
223
|
-
jQuery(this)
|
|
224
|
-
.addClass('flash-update')
|
|
225
|
-
.prepend(msg);
|
|
226
|
-
};
|
|
227
|
-
/**
|
|
228
|
-
*
|
|
229
|
-
* @desc Convert a hash of html options to a string of attributes, using Function.apply().
|
|
230
|
-
* @example toAttributeString.apply(htmlOptions)
|
|
231
|
-
* @result foo="bar" foo="bar"
|
|
232
|
-
*
|
|
233
|
-
**/
|
|
234
|
-
function toAttributeString() {
|
|
235
|
-
var s = '';
|
|
236
|
-
for(var key in this)
|
|
237
|
-
if(typeof this[key] != 'function')
|
|
238
|
-
s += key+'="'+this[key]+'" ';
|
|
239
|
-
return s;
|
|
240
|
-
};
|
|
241
|
-
/**
|
|
242
|
-
*
|
|
243
|
-
* @desc Convert a hash of flashvars to a url-encoded string, using Function.apply().
|
|
244
|
-
* @example toFlashvarsString.apply(flashvarsObject)
|
|
245
|
-
* @result foo=bar&foo=bar
|
|
246
|
-
*
|
|
247
|
-
**/
|
|
248
|
-
function toFlashvarsString() {
|
|
249
|
-
var s = '';
|
|
250
|
-
for(var key in this)
|
|
251
|
-
if(typeof this[key] != 'function')
|
|
252
|
-
s += key+'='+encodeURIComponent(this[key])+'&';
|
|
253
|
-
return s.replace(/&$/, '');
|
|
254
|
-
};
|
|
255
|
-
/**
|
|
256
|
-
*
|
|
257
|
-
* @name flash.transform
|
|
258
|
-
* @desc Transform a set of html options into an embed tag.
|
|
259
|
-
* @type String
|
|
260
|
-
*
|
|
261
|
-
* @example $$.transform(htmlOptions)
|
|
262
|
-
* @result <embed src="foo.swf" ... />
|
|
263
|
-
*
|
|
264
|
-
* Note: The embed tag is NOT standards-compliant, but it
|
|
265
|
-
* works in all current browsers. flash.transform can be
|
|
266
|
-
* overwritten with a custom function to generate more
|
|
267
|
-
* standards-compliant markup.
|
|
268
|
-
*
|
|
269
|
-
**/
|
|
270
|
-
$$.transform = function(htmlOptions) {
|
|
271
|
-
htmlOptions.toString = toAttributeString;
|
|
272
|
-
if(htmlOptions.flashvars) htmlOptions.flashvars.toString = toFlashvarsString;
|
|
273
|
-
return '<embed ' + String(htmlOptions) + '/>';
|
|
274
|
-
};
|
|
275
|
-
|
|
276
|
-
/**
|
|
277
|
-
*
|
|
278
|
-
* Flash Player 9 Fix (http://blog.deconcept.com/2006/07/28/swfobject-143-released/)
|
|
279
|
-
*
|
|
280
|
-
**/
|
|
281
|
-
if (window.attachEvent) {
|
|
282
|
-
window.attachEvent("onbeforeunload", function(){
|
|
283
|
-
__flash_unloadHandler = function() {};
|
|
284
|
-
__flash_savedUnloadHandler = function() {};
|
|
285
|
-
});
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
})();
|