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,106 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* hoverIntent is similar to jQuery's built-in "hover" function except that
|
|
3
|
-
* instead of firing the onMouseOver event immediately, hoverIntent checks
|
|
4
|
-
* to see if the user's mouse has slowed down (beneath the sensitivity
|
|
5
|
-
* threshold) before firing the onMouseOver event.
|
|
6
|
-
*
|
|
7
|
-
* hoverIntent r6 // 2011.02.26 // jQuery 1.5.1+
|
|
8
|
-
* <http://cherne.net/brian/resources/jquery.hoverIntent.html>
|
|
9
|
-
*
|
|
10
|
-
* hoverIntent is currently available for use in all personal or commercial
|
|
11
|
-
* projects under both MIT and GPL licenses. This means that you can choose
|
|
12
|
-
* the license that best suits your project, and use it accordingly.
|
|
13
|
-
*
|
|
14
|
-
* // basic usage (just like .hover) receives onMouseOver and onMouseOut functions
|
|
15
|
-
* $("ul li").hoverIntent( showNav , hideNav );
|
|
16
|
-
*
|
|
17
|
-
* // advanced usage receives configuration object only
|
|
18
|
-
* $("ul li").hoverIntent({
|
|
19
|
-
* sensitivity: 7, // number = sensitivity threshold (must be 1 or higher)
|
|
20
|
-
* interval: 100, // number = milliseconds of polling interval
|
|
21
|
-
* over: showNav, // function = onMouseOver callback (required)
|
|
22
|
-
* timeout: 0, // number = milliseconds delay before onMouseOut function call
|
|
23
|
-
* out: hideNav // function = onMouseOut callback (required)
|
|
24
|
-
* });
|
|
25
|
-
*
|
|
26
|
-
* @param f onMouseOver function || An object with configuration options
|
|
27
|
-
* @param g onMouseOut function || Nothing (use configuration options object)
|
|
28
|
-
* @author Brian Cherne brian(at)cherne(dot)net
|
|
29
|
-
*/
|
|
30
|
-
(function($) {
|
|
31
|
-
$.fn.hoverIntent = function(f,g) {
|
|
32
|
-
// default configuration options
|
|
33
|
-
var cfg = {
|
|
34
|
-
sensitivity: 7,
|
|
35
|
-
interval: 100,
|
|
36
|
-
timeout: 0
|
|
37
|
-
};
|
|
38
|
-
// override configuration options with user supplied object
|
|
39
|
-
cfg = $.extend(cfg, g ? { over: f, out: g } : f );
|
|
40
|
-
|
|
41
|
-
// instantiate variables
|
|
42
|
-
// cX, cY = current X and Y position of mouse, updated by mousemove event
|
|
43
|
-
// pX, pY = previous X and Y position of mouse, set by mouseover and polling interval
|
|
44
|
-
var cX, cY, pX, pY;
|
|
45
|
-
|
|
46
|
-
// A private function for getting mouse position
|
|
47
|
-
var track = function(ev) {
|
|
48
|
-
cX = ev.pageX;
|
|
49
|
-
cY = ev.pageY;
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
// A private function for comparing current and previous mouse position
|
|
53
|
-
var compare = function(ev,ob) {
|
|
54
|
-
ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t);
|
|
55
|
-
// compare mouse positions to see if they've crossed the threshold
|
|
56
|
-
if ( ( Math.abs(pX-cX) + Math.abs(pY-cY) ) < cfg.sensitivity ) {
|
|
57
|
-
$(ob).unbind("mousemove",track);
|
|
58
|
-
// set hoverIntent state to true (so mouseOut can be called)
|
|
59
|
-
ob.hoverIntent_s = 1;
|
|
60
|
-
return cfg.over.apply(ob,[ev]);
|
|
61
|
-
} else {
|
|
62
|
-
// set previous coordinates for next time
|
|
63
|
-
pX = cX; pY = cY;
|
|
64
|
-
// use self-calling timeout, guarantees intervals are spaced out properly (avoids JavaScript timer bugs)
|
|
65
|
-
ob.hoverIntent_t = setTimeout( function(){compare(ev, ob);} , cfg.interval );
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
// A private function for delaying the mouseOut function
|
|
70
|
-
var delay = function(ev,ob) {
|
|
71
|
-
ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t);
|
|
72
|
-
ob.hoverIntent_s = 0;
|
|
73
|
-
return cfg.out.apply(ob,[ev]);
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
// A private function for handling mouse 'hovering'
|
|
77
|
-
var handleHover = function(e) {
|
|
78
|
-
// copy objects to be passed into t (required for event object to be passed in IE)
|
|
79
|
-
var ev = jQuery.extend({},e);
|
|
80
|
-
var ob = this;
|
|
81
|
-
|
|
82
|
-
// cancel hoverIntent timer if it exists
|
|
83
|
-
if (ob.hoverIntent_t) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); }
|
|
84
|
-
|
|
85
|
-
// if e.type == "mouseenter"
|
|
86
|
-
if (e.type == "mouseenter") {
|
|
87
|
-
// set "previous" X and Y position based on initial entry point
|
|
88
|
-
pX = ev.pageX; pY = ev.pageY;
|
|
89
|
-
// update "current" X and Y position based on mousemove
|
|
90
|
-
$(ob).bind("mousemove",track);
|
|
91
|
-
// start polling interval (self-calling timeout) to compare mouse coordinates over time
|
|
92
|
-
if (ob.hoverIntent_s != 1) { ob.hoverIntent_t = setTimeout( function(){compare(ev,ob);} , cfg.interval );}
|
|
93
|
-
|
|
94
|
-
// else e.type == "mouseleave"
|
|
95
|
-
} else {
|
|
96
|
-
// unbind expensive mousemove event
|
|
97
|
-
$(ob).unbind("mousemove",track);
|
|
98
|
-
// if hoverIntent state is true, then call the mouseOut function after the specified delay
|
|
99
|
-
if (ob.hoverIntent_s == 1) { ob.hoverIntent_t = setTimeout( function(){delay(ev,ob);} , cfg.timeout );}
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
// bind the function to the two event listeners
|
|
104
|
-
return this.bind('mouseenter',handleHover).bind('mouseleave',handleHover);
|
|
105
|
-
};
|
|
106
|
-
})(jQuery);
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Ajaxupload for Jeditable
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2008-2009 Mika Tuupola
|
|
5
|
-
*
|
|
6
|
-
* Licensed under the MIT license:
|
|
7
|
-
* http://www.opensource.org/licenses/mit-license.php
|
|
8
|
-
*
|
|
9
|
-
* Depends on Ajax fileupload jQuery plugin by PHPLetter guys:
|
|
10
|
-
* http://www.phpletter.com/Our-Projects/AjaxFileUpload/
|
|
11
|
-
*
|
|
12
|
-
* Project home:
|
|
13
|
-
* http://www.appelsiini.net/projects/jeditable
|
|
14
|
-
*
|
|
15
|
-
* Revision: $Id$
|
|
16
|
-
*
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
$.editable.addInputType('ajaxupload', {
|
|
20
|
-
/* create input element */
|
|
21
|
-
element : function(settings) {
|
|
22
|
-
settings.onblur = 'ignore';
|
|
23
|
-
var input = $('<input type="file" id="upload" name="upload" />');
|
|
24
|
-
$(this).append(input);
|
|
25
|
-
return(input);
|
|
26
|
-
},
|
|
27
|
-
content : function(string, settings, original) {
|
|
28
|
-
/* do nothing */
|
|
29
|
-
},
|
|
30
|
-
plugin : function(settings, original) {
|
|
31
|
-
var form = this;
|
|
32
|
-
form.attr("enctype", "multipart/form-data");
|
|
33
|
-
$("button:submit", form).bind('click', function() {
|
|
34
|
-
//$(".message").show();
|
|
35
|
-
$.ajaxFileUpload({
|
|
36
|
-
type : 'POST',
|
|
37
|
-
url: settings.target,
|
|
38
|
-
secureuri:false,
|
|
39
|
-
fileElementId: 'upload',
|
|
40
|
-
dataType: 'html',
|
|
41
|
-
success: function (data, status) {
|
|
42
|
-
if (data.indexOf("div id=\"notification\"") > 0) {
|
|
43
|
-
// the request resulted in an error...
|
|
44
|
-
$("#notification").replaceWith(data);
|
|
45
|
-
$(original).html(settings.placeholder);
|
|
46
|
-
} else {
|
|
47
|
-
$(original).html(data);
|
|
48
|
-
if (!$.trim($(original).html())) {
|
|
49
|
-
$(original).html(settings.placeholder);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
original.editing = false;
|
|
53
|
-
},
|
|
54
|
-
error: function (data, status, e) {
|
|
55
|
-
alert(e);
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
return(false);
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
|