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,338 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* jQuery UI Multiselect
|
|
3
|
-
*
|
|
4
|
-
* Authors:
|
|
5
|
-
* Michael Aufreiter (quasipartikel.at)
|
|
6
|
-
* Yanick Rochon (yanick.rochon[at]gmail[dot]com)
|
|
7
|
-
*
|
|
8
|
-
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
|
9
|
-
* and GPL (GPL-LICENSE.txt) licenses.
|
|
10
|
-
*
|
|
11
|
-
* http://www.quasipartikel.at/multiselect/
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* Depends:
|
|
15
|
-
* ui.core.js
|
|
16
|
-
* ui.sortable.js
|
|
17
|
-
*
|
|
18
|
-
* Optional:
|
|
19
|
-
* localization (http://plugins.jquery.com/project/localisation)
|
|
20
|
-
* scrollTo (http://plugins.jquery.com/project/ScrollTo)
|
|
21
|
-
*
|
|
22
|
-
* Todo:
|
|
23
|
-
* Make batch actions faster
|
|
24
|
-
* Implement dynamic insertion through remote calls
|
|
25
|
-
*/
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
(function($) {
|
|
29
|
-
|
|
30
|
-
$.widget("ui.multiselect", {
|
|
31
|
-
options: {
|
|
32
|
-
sortable: true,
|
|
33
|
-
searchable: true,
|
|
34
|
-
doubleClickable: true,
|
|
35
|
-
animated: 'fast',
|
|
36
|
-
show: 'slideDown',
|
|
37
|
-
hide: 'slideUp',
|
|
38
|
-
dividerLocation: 0.6,
|
|
39
|
-
nodeComparator: function(node1,node2) {
|
|
40
|
-
var text1 = node1.text(),
|
|
41
|
-
text2 = node2.text();
|
|
42
|
-
return text1 == text2 ? 0 : (text1 < text2 ? -1 : 1);
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
_create: function() {
|
|
46
|
-
this.id = this.element.attr("id");
|
|
47
|
-
// alert("select[id=" + this.id + "]" + "," + $("select[id=" + this.id + "]").id);
|
|
48
|
-
this.element.hide();
|
|
49
|
-
this.container = $('<div class="ui-multiselect ui-helper-clearfix ui-widget"></div>').insertAfter(this.element);
|
|
50
|
-
this.count = 0; // number of currently selected options
|
|
51
|
-
this.availableContainer = $('<div class="available"></div>').appendTo(this.container);
|
|
52
|
-
this.selectedContainer = $('<div class="selected"></div>').appendTo(this.container);
|
|
53
|
-
this.selectedActions = $('<div class="multi-actions ui-widget-header ui-helper-clearfix"><span class="count">0 '+$.ui.multiselect.locale.itemsCount+'</span><a href="#" class="remove-all">'+$.ui.multiselect.locale.removeAll+'</a></div>').appendTo(this.selectedContainer);
|
|
54
|
-
this.availableActions = $('<div class="multi-actions ui-widget-header ui-helper-clearfix"><input type="text" class="search empty ui-widget-content ui-corner-all"/><a href="#" class="add-all">'+$.ui.multiselect.locale.addAll+'</a></div>').appendTo(this.availableContainer);
|
|
55
|
-
this.selectedList = $('<ul class="selected connected-list"><li class="ui-helper-hidden-accessible"></li></ul>').bind('selectstart', function(){return false;}).appendTo(this.selectedContainer);
|
|
56
|
-
this.availableList = $('<ul class="available connected-list"><li class="ui-helper-hidden-accessible"></li></ul>').bind('selectstart', function(){return false;}).appendTo(this.availableContainer);
|
|
57
|
-
|
|
58
|
-
var that = this;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
// set dimensions
|
|
62
|
-
this.container.width(this.element.width()+1);
|
|
63
|
-
this.selectedContainer.width(Math.floor(this.element.width()*this.options.dividerLocation));
|
|
64
|
-
this.availableContainer.width(Math.floor(this.element.width()*(1-this.options.dividerLocation)));
|
|
65
|
-
|
|
66
|
-
// fix list height to match <option> depending on their individual header's heights
|
|
67
|
-
this.selectedList.height(Math.max(this.element.height()-this.selectedActions.height(),1));
|
|
68
|
-
this.availableList.height(Math.max(this.element.height()-this.availableActions.height(),1));
|
|
69
|
-
|
|
70
|
-
if ( !this.options.animated ) {
|
|
71
|
-
this.options.show = 'show';
|
|
72
|
-
this.options.hide = 'hide';
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
// init lists
|
|
76
|
-
this._populateLists(this.element.find('option'));
|
|
77
|
-
|
|
78
|
-
// make selection sortable
|
|
79
|
-
if (this.options.sortable) {
|
|
80
|
-
this.selectedList.sortable({
|
|
81
|
-
placeholder: 'ui-state-highlight',
|
|
82
|
-
axis: 'y',
|
|
83
|
-
update: function(event, ui) {
|
|
84
|
-
// apply the new sort order to the original selectbox
|
|
85
|
-
that.selectedList.find('li').each(function() {
|
|
86
|
-
if ($(this).data('optionLink'))
|
|
87
|
-
$(this).data('optionLink').remove().appendTo(that.element);
|
|
88
|
-
});
|
|
89
|
-
},
|
|
90
|
-
receive: function(event, ui) {
|
|
91
|
-
ui.item.data('optionLink').attr('selected', true);
|
|
92
|
-
// increment count
|
|
93
|
-
that.count += 1;
|
|
94
|
-
that._updateCount();
|
|
95
|
-
// workaround, because there's no way to reference
|
|
96
|
-
// the new element, see http://dev.jqueryui.com/ticket/4303
|
|
97
|
-
that.selectedList.children('.ui-draggable').each(function() {
|
|
98
|
-
$(this).removeClass('ui-draggable');
|
|
99
|
-
$(this).data('optionLink', ui.item.data('optionLink'));
|
|
100
|
-
$(this).data('idx', ui.item.data('idx'));
|
|
101
|
-
that._applyItemState($(this), true);
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
// workaround according to http://dev.jqueryui.com/ticket/4088
|
|
105
|
-
setTimeout(function() { ui.item.remove(); }, 1);
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
// set up livesearch
|
|
111
|
-
if (this.options.searchable) {
|
|
112
|
-
this._registerSearchEvents(this.availableContainer.find('input.search'));
|
|
113
|
-
} else {
|
|
114
|
-
$('.search').hide();
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
// batch actions
|
|
118
|
-
this.container.find(".remove-all").click(function() {
|
|
119
|
-
that._populateLists(that.element.find('option').removeAttr('selected'));
|
|
120
|
-
return false;
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
this.container.find(".add-all").click(function() {
|
|
124
|
-
var options = that.element.find('option').not(":selected");
|
|
125
|
-
if (that.availableList.children('li:hidden').length > 1) {
|
|
126
|
-
that.availableList.children('li').each(function(i) {
|
|
127
|
-
if ($(this).is(":visible")) $(options[i-1]).attr('selected', 'selected');
|
|
128
|
-
});
|
|
129
|
-
} else {
|
|
130
|
-
options.attr('selected', 'selected');
|
|
131
|
-
}
|
|
132
|
-
that._populateLists(that.element.find('option'));
|
|
133
|
-
return false;
|
|
134
|
-
});
|
|
135
|
-
},
|
|
136
|
-
destroy: function() {
|
|
137
|
-
this.element.show();
|
|
138
|
-
this.container.remove();
|
|
139
|
-
|
|
140
|
-
$.Widget.prototype.destroy.apply(this, arguments);
|
|
141
|
-
},
|
|
142
|
-
_populateLists: function(options) {
|
|
143
|
-
this.selectedList.children('.ui-element').remove();
|
|
144
|
-
this.availableList.children('.ui-element').remove();
|
|
145
|
-
this.count = 0;
|
|
146
|
-
|
|
147
|
-
var that = this;
|
|
148
|
-
var items = $(options.map(function(i) {
|
|
149
|
-
var item = that._getOptionNode(this).appendTo(this.selected ? that.selectedList : that.availableList).show();
|
|
150
|
-
|
|
151
|
-
if (this.selected) that.count += 1;
|
|
152
|
-
that._applyItemState(item, this.selected);
|
|
153
|
-
item.data('idx', i);
|
|
154
|
-
return item[0];
|
|
155
|
-
}));
|
|
156
|
-
|
|
157
|
-
// update count
|
|
158
|
-
this._updateCount();
|
|
159
|
-
that._filter.apply(this.availableContainer.find('input.search'), [that.availableList]);
|
|
160
|
-
},
|
|
161
|
-
_updateCount: function() {
|
|
162
|
-
this.selectedContainer.find('span.count').text(this.count+" "+$.ui.multiselect.locale.itemsCount);
|
|
163
|
-
},
|
|
164
|
-
_getOptionNode: function(option) {
|
|
165
|
-
option = $(option);
|
|
166
|
-
var node = $('<li class="ui-state-default ui-element" title="'+option.text()+'"><span class="ui-icon"/>'+option.text()+'<a href="#" class="multi-action"><span class="ui-corner-all ui-icon"/></a></li>').hide();
|
|
167
|
-
node.data('optionLink', option);
|
|
168
|
-
return node;
|
|
169
|
-
},
|
|
170
|
-
// clones an item with associated data
|
|
171
|
-
// didn't find a smarter away around this
|
|
172
|
-
_cloneWithData: function(clonee) {
|
|
173
|
-
var clone = clonee.clone(false,false);
|
|
174
|
-
clone.data('optionLink', clonee.data('optionLink'));
|
|
175
|
-
clone.data('idx', clonee.data('idx'));
|
|
176
|
-
return clone;
|
|
177
|
-
},
|
|
178
|
-
_setSelected: function(item, selected) {
|
|
179
|
-
item.data('optionLink').attr('selected', selected);
|
|
180
|
-
|
|
181
|
-
if (selected) {
|
|
182
|
-
var selectedItem = this._cloneWithData(item);
|
|
183
|
-
item[this.options.hide](this.options.animated, function() { $(this).remove(); });
|
|
184
|
-
selectedItem.appendTo(this.selectedList).hide()[this.options.show](this.options.animated);
|
|
185
|
-
|
|
186
|
-
this._applyItemState(selectedItem, true);
|
|
187
|
-
return selectedItem;
|
|
188
|
-
} else {
|
|
189
|
-
|
|
190
|
-
// look for successor based on initial option index
|
|
191
|
-
var items = this.availableList.find('li'), comparator = this.options.nodeComparator;
|
|
192
|
-
var succ = null, i = item.data('idx'), direction = comparator(item, $(items[i]));
|
|
193
|
-
|
|
194
|
-
// TODO: test needed for dynamic list populating
|
|
195
|
-
if ( direction ) {
|
|
196
|
-
while (i>=0 && i<items.length) {
|
|
197
|
-
direction > 0 ? i++ : i--;
|
|
198
|
-
if ( direction != comparator(item, $(items[i])) ) {
|
|
199
|
-
// going up, go back one item down, otherwise leave as is
|
|
200
|
-
succ = items[direction > 0 ? i : i+1];
|
|
201
|
-
break;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
} else {
|
|
205
|
-
succ = items[i];
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
var availableItem = this._cloneWithData(item);
|
|
209
|
-
succ ? availableItem.insertBefore($(succ)) : availableItem.appendTo(this.availableList);
|
|
210
|
-
item[this.options.hide](this.options.animated, function() { $(this).remove(); });
|
|
211
|
-
availableItem.hide()[this.options.show](this.options.animated);
|
|
212
|
-
|
|
213
|
-
this._applyItemState(availableItem, false);
|
|
214
|
-
return availableItem;
|
|
215
|
-
}
|
|
216
|
-
},
|
|
217
|
-
_applyItemState: function(item, selected) {
|
|
218
|
-
if (selected) {
|
|
219
|
-
if (this.options.sortable)
|
|
220
|
-
item.children('span').addClass('ui-icon-arrowthick-2-n-s').removeClass('ui-helper-hidden').addClass('ui-icon');
|
|
221
|
-
else
|
|
222
|
-
item.children('span').removeClass('ui-icon-arrowthick-2-n-s').addClass('ui-helper-hidden').removeClass('ui-icon');
|
|
223
|
-
item.find('a.multi-action span').addClass('ui-icon-minus').removeClass('ui-icon-plus');
|
|
224
|
-
this._registerRemoveEvents(item.find('a.multi-action'));
|
|
225
|
-
|
|
226
|
-
} else {
|
|
227
|
-
item.children('span').removeClass('ui-icon-arrowthick-2-n-s').addClass('ui-helper-hidden').removeClass('ui-icon');
|
|
228
|
-
item.find('a.multi-action span').addClass('ui-icon-plus').removeClass('ui-icon-minus');
|
|
229
|
-
this._registerAddEvents(item.find('a.multi-action'));
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
this._registerDoubleClickEvents(item);
|
|
233
|
-
this._registerHoverEvents(item);
|
|
234
|
-
},
|
|
235
|
-
// taken from John Resig's liveUpdate script
|
|
236
|
-
_filter: function(list) {
|
|
237
|
-
var input = $(this);
|
|
238
|
-
var rows = list.children('li'),
|
|
239
|
-
cache = rows.map(function(){
|
|
240
|
-
|
|
241
|
-
return $(this).text().toLowerCase();
|
|
242
|
-
});
|
|
243
|
-
|
|
244
|
-
var term = $.trim(input.val().toLowerCase()), scores = [];
|
|
245
|
-
|
|
246
|
-
if (!term) {
|
|
247
|
-
rows.show();
|
|
248
|
-
} else {
|
|
249
|
-
rows.hide();
|
|
250
|
-
|
|
251
|
-
cache.each(function(i) {
|
|
252
|
-
if (this.indexOf(term)>-1) { scores.push(i); }
|
|
253
|
-
});
|
|
254
|
-
|
|
255
|
-
$.each(scores, function() {
|
|
256
|
-
$(rows[this]).show();
|
|
257
|
-
});
|
|
258
|
-
}
|
|
259
|
-
},
|
|
260
|
-
_registerDoubleClickEvents: function(elements) {
|
|
261
|
-
if (!this.options.doubleClickable) return;
|
|
262
|
-
elements.dblclick(function() {
|
|
263
|
-
elements.find('a.multi-action').click();
|
|
264
|
-
});
|
|
265
|
-
},
|
|
266
|
-
_registerHoverEvents: function(elements) {
|
|
267
|
-
elements.removeClass('ui-state-hover');
|
|
268
|
-
elements.mouseover(function() {
|
|
269
|
-
$(this).addClass('ui-state-hover');
|
|
270
|
-
});
|
|
271
|
-
elements.mouseout(function() {
|
|
272
|
-
$(this).removeClass('ui-state-hover');
|
|
273
|
-
});
|
|
274
|
-
},
|
|
275
|
-
_registerAddEvents: function(elements) {
|
|
276
|
-
var that = this;
|
|
277
|
-
elements.click(function() {
|
|
278
|
-
var item = that._setSelected($(this).parent(), true);
|
|
279
|
-
that.count += 1;
|
|
280
|
-
that._updateCount();
|
|
281
|
-
return false;
|
|
282
|
-
});
|
|
283
|
-
|
|
284
|
-
// make draggable
|
|
285
|
-
if (this.options.sortable) {
|
|
286
|
-
elements.each(function() {
|
|
287
|
-
$(this).parent().draggable({
|
|
288
|
-
connectToSortable: that.selectedList,
|
|
289
|
-
helper: function() {
|
|
290
|
-
var selectedItem = that._cloneWithData($(this)).width($(this).width() - 50);
|
|
291
|
-
selectedItem.width($(this).width());
|
|
292
|
-
return selectedItem;
|
|
293
|
-
},
|
|
294
|
-
appendTo: that.container,
|
|
295
|
-
containment: that.container,
|
|
296
|
-
revert: 'invalid'
|
|
297
|
-
});
|
|
298
|
-
});
|
|
299
|
-
}
|
|
300
|
-
},
|
|
301
|
-
_registerRemoveEvents: function(elements) {
|
|
302
|
-
var that = this;
|
|
303
|
-
elements.click(function() {
|
|
304
|
-
that._setSelected($(this).parent(), false);
|
|
305
|
-
that.count -= 1;
|
|
306
|
-
that._updateCount();
|
|
307
|
-
return false;
|
|
308
|
-
});
|
|
309
|
-
},
|
|
310
|
-
_registerSearchEvents: function(input) {
|
|
311
|
-
var that = this;
|
|
312
|
-
|
|
313
|
-
input.focus(function() {
|
|
314
|
-
$(this).addClass('ui-state-active');
|
|
315
|
-
})
|
|
316
|
-
.blur(function() {
|
|
317
|
-
$(this).removeClass('ui-state-active');
|
|
318
|
-
})
|
|
319
|
-
.keypress(function(e) {
|
|
320
|
-
if (e.keyCode == 13)
|
|
321
|
-
return false;
|
|
322
|
-
})
|
|
323
|
-
.keyup(function() {
|
|
324
|
-
that._filter.apply(this, [that.availableList]);
|
|
325
|
-
});
|
|
326
|
-
}
|
|
327
|
-
});
|
|
328
|
-
|
|
329
|
-
$.extend($.ui.multiselect, {
|
|
330
|
-
locale: {
|
|
331
|
-
addAll:i18n.add_all,
|
|
332
|
-
removeAll:i18n.remove_all,
|
|
333
|
-
itemsCount:i18n.items_selected
|
|
334
|
-
}
|
|
335
|
-
});
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
})(jQuery);
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
|--------------------------------------------------------------------------
|
|
3
|
-
| UItoTop jQuery Plugin 1.1
|
|
4
|
-
| http://www.mattvarone.com/web-design/uitotop-jquery-plugin/
|
|
5
|
-
|--------------------------------------------------------------------------
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
(function($){
|
|
9
|
-
$.fn.UItoTop = function(options) {
|
|
10
|
-
|
|
11
|
-
var defaults = {
|
|
12
|
-
text: 'To Top',
|
|
13
|
-
min: 200,
|
|
14
|
-
inDelay:600,
|
|
15
|
-
outDelay:400,
|
|
16
|
-
containerID: 'toTop',
|
|
17
|
-
containerHoverID: 'toTopHover',
|
|
18
|
-
scrollSpeed: 1200,
|
|
19
|
-
easingType: 'linear'
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
var settings = $.extend(defaults, options);
|
|
23
|
-
var containerIDhash = '#' + settings.containerID;
|
|
24
|
-
var containerHoverIDHash = '#'+settings.containerHoverID;
|
|
25
|
-
|
|
26
|
-
$('body').append('<a href="#" id="'+settings.containerID+'">'+settings.text+'</a>');
|
|
27
|
-
$(containerIDhash).hide().click(function(){
|
|
28
|
-
$('html, body').animate({scrollTop:0}, settings.scrollSpeed, settings.easingType);
|
|
29
|
-
$('#'+settings.containerHoverID, this).stop().animate({'opacity': 0 }, settings.inDelay, settings.easingType);
|
|
30
|
-
return false;
|
|
31
|
-
})
|
|
32
|
-
.prepend('<span id="'+settings.containerHoverID+'"></span>')
|
|
33
|
-
.hover(function() {
|
|
34
|
-
$(containerHoverIDHash, this).stop().animate({
|
|
35
|
-
'opacity': 1
|
|
36
|
-
}, 600, 'linear');
|
|
37
|
-
}, function() {
|
|
38
|
-
$(containerHoverIDHash, this).stop().animate({
|
|
39
|
-
'opacity': 0
|
|
40
|
-
}, 700, 'linear');
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
$(window).scroll(function() {
|
|
44
|
-
var sd = $(window).scrollTop();
|
|
45
|
-
if(typeof document.body.style.maxHeight === "undefined") {
|
|
46
|
-
$(containerIDhash).css({
|
|
47
|
-
'position': 'absolute',
|
|
48
|
-
'top': $(window).scrollTop() + $(window).height() - 50
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
if ( sd > settings.min )
|
|
52
|
-
$(containerIDhash).fadeIn(settings.inDelay);
|
|
53
|
-
else
|
|
54
|
-
$(containerIDhash).fadeOut(settings.Outdelay);
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
};
|
|
58
|
-
})(jQuery);
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2008 Greg Weber greg at gregweber.info
|
|
3
|
-
* Dual licensed under the MIT and GPLv2 licenses just as jQuery is:
|
|
4
|
-
* http://jquery.org/license
|
|
5
|
-
*
|
|
6
|
-
* documentation at http://gregweber.info/projects/uitablefilter
|
|
7
|
-
*
|
|
8
|
-
* allows table rows to be filtered (made invisible)
|
|
9
|
-
* <code>
|
|
10
|
-
* t = $('table')
|
|
11
|
-
* $.uiTableFilter( t, phrase )
|
|
12
|
-
* </code>
|
|
13
|
-
* arguments:
|
|
14
|
-
* jQuery object containing table rows
|
|
15
|
-
* phrase to search for
|
|
16
|
-
* optional arguments:
|
|
17
|
-
* column to limit search too (the column title in the table header)
|
|
18
|
-
* ifHidden - callback to execute if one or more elements was hidden
|
|
19
|
-
*
|
|
20
|
-
* If a user has a table where certain rows should not be filtered,
|
|
21
|
-
* simply add a class of 'not_filtered' to those rows and they will
|
|
22
|
-
* be skipped during filtering.
|
|
23
|
-
*/
|
|
24
|
-
(function($) {
|
|
25
|
-
$.uiTableFilter = function(jq, phrase, column, ifHidden){
|
|
26
|
-
var new_hidden = false;
|
|
27
|
-
if( this.last_phrase === phrase ) return false;
|
|
28
|
-
|
|
29
|
-
var phrase_length = phrase.length;
|
|
30
|
-
var words = phrase.toLowerCase().split(" ");
|
|
31
|
-
|
|
32
|
-
// these function pointers may change
|
|
33
|
-
var matches = function(elem) { elem.show() }
|
|
34
|
-
var noMatch = function(elem) { elem.hide(); new_hidden = true }
|
|
35
|
-
var getText = function(elem) { return elem.text() }
|
|
36
|
-
|
|
37
|
-
if( column ) {
|
|
38
|
-
var index = null;
|
|
39
|
-
jq.find("thead > tr:last > th").each( function(i){
|
|
40
|
-
if( $.trim($(this).text()) == column ){
|
|
41
|
-
index = i; return false;
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
if( index == null ) throw("given column: " + column + " not found")
|
|
45
|
-
|
|
46
|
-
getText = function(elem){ return $(elem.find(
|
|
47
|
-
("td:eq(" + index + ")") )).text()
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// if added one letter to last time,
|
|
52
|
-
// just check newest word and only need to hide
|
|
53
|
-
if( (words.size > 1) && (phrase.substr(0, phrase_length - 1) ===
|
|
54
|
-
this.last_phrase) ) {
|
|
55
|
-
|
|
56
|
-
if( phrase[-1] === " " )
|
|
57
|
-
{ this.last_phrase = phrase; return false; }
|
|
58
|
-
|
|
59
|
-
var words = words[-1]; // just search for the newest word
|
|
60
|
-
|
|
61
|
-
// only hide visible rows
|
|
62
|
-
matches = function(elem) {;}
|
|
63
|
-
var elems = jq.find("tbody:first > tr:visible").not(".not_filtered")
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
new_hidden = true;
|
|
67
|
-
var elems = jq.find("tbody:first > tr").not(".not_filtered")
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
elems.each(function(){
|
|
71
|
-
var elem = $(this);
|
|
72
|
-
$.uiTableFilter.has_words( getText(elem), words, false ) ?
|
|
73
|
-
matches(elem) : noMatch(elem);
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
last_phrase = phrase;
|
|
77
|
-
if( ifHidden && new_hidden ) ifHidden();
|
|
78
|
-
return jq;
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
// caching for speedup
|
|
82
|
-
$.uiTableFilter.last_phrase = ""
|
|
83
|
-
|
|
84
|
-
// not jQuery dependent
|
|
85
|
-
// "" [""] -> Boolean
|
|
86
|
-
// "" [""] Boolean -> Boolean
|
|
87
|
-
$.uiTableFilter.has_words = function( str, words, caseSensitive )
|
|
88
|
-
{
|
|
89
|
-
var text = caseSensitive ? str : str.toLowerCase();
|
|
90
|
-
for (var i=0; i < words.length; i++) {
|
|
91
|
-
if (text.indexOf(words[i]) === -1) return false;
|
|
92
|
-
}
|
|
93
|
-
return true;
|
|
94
|
-
}
|
|
95
|
-
}) (jQuery);
|