abstracted 0.0.6 → 0.0.14
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 +4 -4
- data/Gemfile +1 -1
- data/Gemfile.lock +11 -8
- data/app/assets/javascripts/abstract_resources.js +29 -25
- data/app/assets/javascripts/crud.js.coffee +174 -29
- data/app/assets/javascripts/initializers.js.coffee +403 -58
- data/app/assets/javascripts/pagescrolling.js.coffee +92 -0
- data/app/assets/stylesheets/abstract_resources.css +5 -0
- data/app/assets/stylesheets/scaffold.css +4 -2
- data/app/assets/stylesheets/selectize.css.scss +0 -0
- data/app/controllers/abstract_resources_controller.rb +473 -134
- data/app/controllers/application_controller.rb +22 -7
- data/app/helpers/abstract_resources_helper.rb +515 -9
- data/app/helpers/fab_button_helper.rb +82 -0
- data/app/models/abstract_resource.rb +141 -89
- data/app/models/ancestry_abstract_resource.rb +27 -0
- data/app/models/concerns/roleable.rb +1 -1
- data/app/policies/abstract_resource_policy.rb +25 -0
- data/app/views/abstract_resources/_title.html.haml +2 -0
- data/app/views/abstract_resources/activate.html.haml +5 -0
- data/app/views/abstract_resources/attach.html.haml +6 -0
- data/app/views/abstract_resources/deactivate.html.haml +5 -0
- data/app/views/abstract_resources/defer.html.haml +5 -0
- data/app/views/abstract_resources/destroy.js.haml +2 -1
- data/app/views/abstract_resources/detach.html.haml +5 -0
- data/app/views/abstract_resources/edit.html.haml +4 -9
- data/app/views/abstract_resources/error.html.haml +2 -0
- data/app/views/abstract_resources/error.js.haml +2 -0
- data/app/views/abstract_resources/index.html.haml +27 -0
- data/app/views/abstract_resources/index.js.haml +2 -0
- data/app/views/abstract_resources/new.html.haml +4 -10
- data/app/views/abstract_resources/prefer.html.haml +5 -0
- data/app/views/abstract_resources/print.html.haml +2 -0
- data/app/views/abstract_resources/print.js.haml +2 -0
- data/app/views/abstract_resources/show.html.haml +5 -11
- data/app/views/layouts/_messages.html.haml +1 -0
- data/app/views/layouts/_navigation.html.haml +13 -0
- data/bower.json +34 -0
- data/config/initializers/exception.rb +19 -0
- data/config/initializers/pundit.rb +22 -0
- data/config/routes.rb +24 -0
- data/lib/abstracted.rb +3 -0
- data/lib/abstracted/version.rb +1 -1
- data/lib/abstracted_responder.rb +1 -0
- data/lib/exceptions.rb +61 -0
- data/vendor/assets/components/jquery/.bower.json +38 -0
- data/vendor/assets/components/jquery/MIT-LICENSE.txt +21 -0
- data/vendor/assets/components/jquery/bower.json +28 -0
- data/vendor/assets/components/jquery/dist/jquery.js +9210 -0
- data/vendor/assets/components/jquery/dist/jquery.min.js +5 -0
- data/vendor/assets/components/jquery/dist/jquery.min.map +1 -0
- data/vendor/assets/components/jquery/src/ajax.js +786 -0
- data/vendor/assets/components/jquery/src/ajax/jsonp.js +89 -0
- data/vendor/assets/components/jquery/src/ajax/load.js +75 -0
- data/vendor/assets/components/jquery/src/ajax/parseJSON.js +13 -0
- data/vendor/assets/components/jquery/src/ajax/parseXML.js +28 -0
- data/vendor/assets/components/jquery/src/ajax/script.js +64 -0
- data/vendor/assets/components/jquery/src/ajax/var/nonce.js +5 -0
- data/vendor/assets/components/jquery/src/ajax/var/rquery.js +3 -0
- data/vendor/assets/components/jquery/src/ajax/xhr.js +136 -0
- data/vendor/assets/components/jquery/src/attributes.js +11 -0
- data/vendor/assets/components/jquery/src/attributes/attr.js +141 -0
- data/vendor/assets/components/jquery/src/attributes/classes.js +158 -0
- data/vendor/assets/components/jquery/src/attributes/prop.js +94 -0
- data/vendor/assets/components/jquery/src/attributes/support.js +35 -0
- data/vendor/assets/components/jquery/src/attributes/val.js +161 -0
- data/vendor/assets/components/jquery/src/callbacks.js +205 -0
- data/vendor/assets/components/jquery/src/core.js +502 -0
- data/vendor/assets/components/jquery/src/core/access.js +60 -0
- data/vendor/assets/components/jquery/src/core/init.js +123 -0
- data/vendor/assets/components/jquery/src/core/parseHTML.js +39 -0
- data/vendor/assets/components/jquery/src/core/ready.js +97 -0
- data/vendor/assets/components/jquery/src/core/var/rsingleTag.js +4 -0
- data/vendor/assets/components/jquery/src/css.js +450 -0
- data/vendor/assets/components/jquery/src/css/addGetHookIf.js +22 -0
- data/vendor/assets/components/jquery/src/css/curCSS.js +57 -0
- data/vendor/assets/components/jquery/src/css/defaultDisplay.js +70 -0
- data/vendor/assets/components/jquery/src/css/hiddenVisibleSelectors.js +15 -0
- data/vendor/assets/components/jquery/src/css/support.js +96 -0
- data/vendor/assets/components/jquery/src/css/swap.js +28 -0
- data/vendor/assets/components/jquery/src/css/var/cssExpand.js +3 -0
- data/vendor/assets/components/jquery/src/css/var/getStyles.js +12 -0
- data/vendor/assets/components/jquery/src/css/var/isHidden.js +13 -0
- data/vendor/assets/components/jquery/src/css/var/rmargin.js +3 -0
- data/vendor/assets/components/jquery/src/css/var/rnumnonpx.js +5 -0
- data/vendor/assets/components/jquery/src/data.js +178 -0
- data/vendor/assets/components/jquery/src/data/Data.js +181 -0
- data/vendor/assets/components/jquery/src/data/accepts.js +20 -0
- data/vendor/assets/components/jquery/src/data/var/data_priv.js +5 -0
- data/vendor/assets/components/jquery/src/data/var/data_user.js +5 -0
- data/vendor/assets/components/jquery/src/deferred.js +149 -0
- data/vendor/assets/components/jquery/src/deprecated.js +13 -0
- data/vendor/assets/components/jquery/src/dimensions.js +50 -0
- data/vendor/assets/components/jquery/src/effects.js +648 -0
- data/vendor/assets/components/jquery/src/effects/Tween.js +114 -0
- data/vendor/assets/components/jquery/src/effects/animatedSelector.js +13 -0
- data/vendor/assets/components/jquery/src/event.js +868 -0
- data/vendor/assets/components/jquery/src/event/ajax.js +13 -0
- data/vendor/assets/components/jquery/src/event/alias.js +39 -0
- data/vendor/assets/components/jquery/src/event/support.js +9 -0
- data/vendor/assets/components/jquery/src/exports/amd.js +24 -0
- data/vendor/assets/components/jquery/src/exports/global.js +32 -0
- data/vendor/assets/components/jquery/src/intro.js +44 -0
- data/vendor/assets/components/jquery/src/jquery.js +37 -0
- data/vendor/assets/components/jquery/src/manipulation.js +580 -0
- data/vendor/assets/components/jquery/src/manipulation/_evalUrl.js +18 -0
- data/vendor/assets/components/jquery/src/manipulation/support.js +32 -0
- data/vendor/assets/components/jquery/src/manipulation/var/rcheckableType.js +3 -0
- data/vendor/assets/components/jquery/src/offset.js +207 -0
- data/vendor/assets/components/jquery/src/outro.js +1 -0
- data/vendor/assets/components/jquery/src/queue.js +142 -0
- data/vendor/assets/components/jquery/src/queue/delay.js +22 -0
- data/vendor/assets/components/jquery/src/selector-native.js +172 -0
- data/vendor/assets/components/jquery/src/selector-sizzle.js +14 -0
- data/vendor/assets/components/jquery/src/selector.js +1 -0
- data/vendor/assets/components/jquery/src/serialize.js +111 -0
- data/vendor/assets/components/jquery/src/sizzle/dist/sizzle.js +2067 -0
- data/vendor/assets/components/jquery/src/sizzle/dist/sizzle.min.js +3 -0
- data/vendor/assets/components/jquery/src/sizzle/dist/sizzle.min.map +1 -0
- data/vendor/assets/components/jquery/src/traversing.js +199 -0
- data/vendor/assets/components/jquery/src/traversing/findFilter.js +100 -0
- data/vendor/assets/components/jquery/src/traversing/var/rneedsContext.js +6 -0
- data/vendor/assets/components/jquery/src/var/arr.js +3 -0
- data/vendor/assets/components/jquery/src/var/class2type.js +4 -0
- data/vendor/assets/components/jquery/src/var/concat.js +5 -0
- data/vendor/assets/components/jquery/src/var/hasOwn.js +5 -0
- data/vendor/assets/components/jquery/src/var/indexOf.js +5 -0
- data/vendor/assets/components/jquery/src/var/pnum.js +3 -0
- data/vendor/assets/components/jquery/src/var/push.js +5 -0
- data/vendor/assets/components/jquery/src/var/rnotwhite.js +3 -0
- data/vendor/assets/components/jquery/src/var/slice.js +5 -0
- data/vendor/assets/components/jquery/src/var/strundefined.js +3 -0
- data/vendor/assets/components/jquery/src/var/support.js +4 -0
- data/vendor/assets/components/jquery/src/var/toString.js +5 -0
- data/vendor/assets/components/jquery/src/wrap.js +79 -0
- data/vendor/assets/components/microplugin/.bower.json +38 -0
- data/vendor/assets/components/microplugin/.gitignore +2 -0
- data/vendor/assets/components/microplugin/.npmignore +3 -0
- data/vendor/assets/components/microplugin/README.md +115 -0
- data/vendor/assets/components/microplugin/bower.json +22 -0
- data/vendor/assets/components/microplugin/package.json +15 -0
- data/vendor/assets/components/microplugin/src/microplugin.js +135 -0
- data/vendor/assets/components/selectize/.bower.json +60 -0
- data/vendor/assets/components/selectize/.gitignore +5 -0
- data/vendor/assets/components/selectize/LICENSE +202 -0
- data/vendor/assets/components/selectize/README.md +105 -0
- data/vendor/assets/components/selectize/bower.json +40 -0
- data/vendor/assets/components/selectize/dist/css/selectize.bootstrap2.css +487 -0
- data/vendor/assets/components/selectize/dist/css/selectize.bootstrap3.css +401 -0
- data/vendor/assets/components/selectize/dist/css/selectize.css +317 -0
- data/vendor/assets/components/selectize/dist/css/selectize.default.css +387 -0
- data/vendor/assets/components/selectize/dist/css/selectize.legacy.css +364 -0
- data/vendor/assets/components/selectize/dist/js/selectize.js +3058 -0
- data/vendor/assets/components/selectize/dist/js/selectize.min.js +3 -0
- data/vendor/assets/components/selectize/dist/js/standalone/selectize.js +3667 -0
- data/vendor/assets/components/selectize/dist/js/standalone/selectize.min.js +3 -0
- data/vendor/assets/components/selectize/dist/less/plugins/drag_drop.less +16 -0
- data/vendor/assets/components/selectize/dist/less/plugins/dropdown_header.less +20 -0
- data/vendor/assets/components/selectize/dist/less/plugins/optgroup_columns.less +17 -0
- data/vendor/assets/components/selectize/dist/less/plugins/remove_button.less +37 -0
- data/vendor/assets/components/selectize/dist/less/selectize.bootstrap2.less +161 -0
- data/vendor/assets/components/selectize/dist/less/selectize.bootstrap3.less +150 -0
- data/vendor/assets/components/selectize/dist/less/selectize.default.less +84 -0
- data/vendor/assets/components/selectize/dist/less/selectize.legacy.less +75 -0
- data/vendor/assets/components/selectize/dist/less/selectize.less +295 -0
- data/vendor/assets/components/selectize/karma.conf.js +107 -0
- data/vendor/assets/components/sifter/.bower.json +44 -0
- data/vendor/assets/components/sifter/.gitignore +3 -0
- data/vendor/assets/components/sifter/.npmignore +4 -0
- data/vendor/assets/components/sifter/README.md +149 -0
- data/vendor/assets/components/sifter/bower.json +23 -0
- data/vendor/assets/components/sifter/package.json +48 -0
- data/vendor/assets/components/sifter/sifter.js +471 -0
- data/vendor/assets/components/sifter/sifter.min.js +2 -0
- data/vendor/assets/components/sweetalert/.bower.json +36 -0
- data/vendor/assets/components/sweetalert/.editorconfig +11 -0
- data/vendor/assets/components/sweetalert/.gitignore +5 -0
- data/vendor/assets/components/sweetalert/.jshintrc +11 -0
- data/vendor/assets/components/sweetalert/.travis.yml +6 -0
- data/vendor/assets/components/sweetalert/LICENSE +22 -0
- data/vendor/assets/components/sweetalert/README.md +157 -0
- data/vendor/assets/components/sweetalert/bower.json +25 -0
- data/vendor/assets/components/sweetalert/dev/gulpfile-wrap-template.js +18 -0
- data/vendor/assets/components/sweetalert/dev/ie9.css +23 -0
- data/vendor/assets/components/sweetalert/dev/loader-animation.css +209 -0
- data/vendor/assets/components/sweetalert/dev/modules/default-params.js +26 -0
- data/vendor/assets/components/sweetalert/dev/modules/handle-click.js +128 -0
- data/vendor/assets/components/sweetalert/dev/modules/handle-dom.js +161 -0
- data/vendor/assets/components/sweetalert/dev/modules/handle-key.js +73 -0
- data/vendor/assets/components/sweetalert/dev/modules/handle-swal-dom.js +148 -0
- data/vendor/assets/components/sweetalert/dev/modules/injected-html.js +69 -0
- data/vendor/assets/components/sweetalert/dev/modules/set-params.js +221 -0
- data/vendor/assets/components/sweetalert/dev/modules/utils.js +71 -0
- data/vendor/assets/components/sweetalert/dev/sweetalert.es6.js +311 -0
- data/vendor/assets/components/sweetalert/dev/sweetalert.scss +648 -0
- data/vendor/assets/components/sweetalert/dist/sweetalert-dev.js +1281 -0
- data/vendor/assets/components/sweetalert/dist/sweetalert.css +932 -0
- data/vendor/assets/components/sweetalert/dist/sweetalert.min.js +1 -0
- data/vendor/assets/components/sweetalert/example/example.css +442 -0
- data/vendor/assets/components/sweetalert/example/example.scss +580 -0
- data/vendor/assets/components/sweetalert/example/images/logo_big.png +0 -0
- data/vendor/assets/components/sweetalert/example/images/logo_big@2x.png +0 -0
- data/vendor/assets/components/sweetalert/example/images/logo_small.png +0 -0
- data/vendor/assets/components/sweetalert/example/images/logo_small@2x.png +0 -0
- data/vendor/assets/components/sweetalert/example/images/te-logo-small.svg +12 -0
- data/vendor/assets/components/sweetalert/example/images/thumbs-up.jpg +0 -0
- data/vendor/assets/components/sweetalert/example/images/vs_icon.png +0 -0
- data/vendor/assets/components/sweetalert/example/images/vs_icon@2x.png +0 -0
- data/vendor/assets/components/sweetalert/gulpfile.js +97 -0
- data/vendor/assets/components/sweetalert/index.html +584 -0
- data/vendor/assets/components/sweetalert/package.json +45 -0
- data/vendor/assets/components/sweetalert/sweetalert.gif +0 -0
- data/vendor/assets/components/sweetalert/test/index.html +20 -0
- data/vendor/assets/components/sweetalert/test/tests.js +143 -0
- data/vendor/assets/components/sweetalert/themes/facebook/facebook.css +111 -0
- data/vendor/assets/components/sweetalert/themes/facebook/facebook.scss +146 -0
- data/vendor/assets/components/sweetalert/themes/google/google.css +115 -0
- data/vendor/assets/components/sweetalert/themes/google/google.scss +148 -0
- data/vendor/assets/components/sweetalert/themes/twitter/twitter.css +140 -0
- data/vendor/assets/components/sweetalert/themes/twitter/twitter.scss +177 -0
- metadata +214 -5
- data/abstracted-0.0.4.gem +0 -0
- data/abstracted.gemspec +0 -51
- data/app/views/abstract_resources/index.html.erb +0 -1
@@ -0,0 +1,75 @@
|
|
1
|
+
/**
|
2
|
+
* selectize.legacy.css (v0.12.1) - Default Theme
|
3
|
+
* Copyright (c) 2013–2015 Brian Reavis & contributors
|
4
|
+
*
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
|
6
|
+
* file except in compliance with the License. You may obtain a copy of the License at:
|
7
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
*
|
9
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
10
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
11
|
+
* ANY KIND, either express or implied. See the License for the specific language
|
12
|
+
* governing permissions and limitations under the License.
|
13
|
+
*
|
14
|
+
* @author Brian Reavis <brian@thirdroute.com>
|
15
|
+
*/
|
16
|
+
|
17
|
+
@import "selectize";
|
18
|
+
|
19
|
+
@selectize-font-size: 13px;
|
20
|
+
@selectize-line-height: 20px;
|
21
|
+
|
22
|
+
@selectize-color-input-full: #f2f2f2;
|
23
|
+
@selectize-color-item: #b8e76f;
|
24
|
+
@selectize-color-item-text: #3d5d18;
|
25
|
+
@selectize-color-item-border: #74b21e;
|
26
|
+
@selectize-color-item-active: #92c836;
|
27
|
+
@selectize-color-item-active-border: #6f9839;
|
28
|
+
@selectize-color-highlight: rgba(255,237,40,0.4);
|
29
|
+
@selectize-color-dropdown-item-active: #fffceb;
|
30
|
+
@selectize-color-dropdown-item-active-text: @selectize-color-text;
|
31
|
+
@selectize-color-optgroup: #f8f8f8;
|
32
|
+
@selectize-color-optgroup-text: @selectize-color-text;
|
33
|
+
@selectize-width-item-border: 1px;
|
34
|
+
|
35
|
+
@selectize-padding-x: 10px;
|
36
|
+
@selectize-padding-y: 10px;
|
37
|
+
@selectize-padding-item-x: 5px;
|
38
|
+
@selectize-padding-item-y: 1px;
|
39
|
+
@selectize-padding-dropdown-item-x: 10px;
|
40
|
+
@selectize-padding-dropdown-item-y: 7px;
|
41
|
+
@selectize-margin-item-x: 4px;
|
42
|
+
@selectize-margin-item-y: 4px;
|
43
|
+
|
44
|
+
.selectize-control {
|
45
|
+
&.multi {
|
46
|
+
.selectize-input [data-value] {
|
47
|
+
text-shadow: 0 1px 0 rgba(255,255,255,0.1);
|
48
|
+
.selectize-border-radius(3px);
|
49
|
+
.selectize-vertical-gradient(#b8e76f, #a9e25c);
|
50
|
+
.selectize-box-shadow(0 1px 1px rgba(0,0,0,0.1));
|
51
|
+
&.active {
|
52
|
+
.selectize-vertical-gradient(#92c836, #7abc2c);
|
53
|
+
}
|
54
|
+
}
|
55
|
+
}
|
56
|
+
&.single {
|
57
|
+
.selectize-input {
|
58
|
+
.selectize-box-shadow(~"inset 0 1px 0 rgba(255,255,255,0.8), 0 2px 0 #e0e0e0, 0 3px 0 #c8c8c8, 0 4px 1px rgba(0,0,0,0.1)");
|
59
|
+
.selectize-vertical-gradient(#f5f5f5, #efefef);
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
63
|
+
|
64
|
+
.selectize-control.single .selectize-input, .selectize-dropdown.single {
|
65
|
+
border-color: #b8b8b8;
|
66
|
+
}
|
67
|
+
|
68
|
+
.selectize-dropdown {
|
69
|
+
.optgroup-header {
|
70
|
+
font-weight: bold;
|
71
|
+
font-size: 0.8em;
|
72
|
+
border-bottom: 1px solid @selectize-color-dropdown-border-top;
|
73
|
+
border-top: 1px solid @selectize-color-dropdown-border-top;
|
74
|
+
}
|
75
|
+
}
|
@@ -0,0 +1,295 @@
|
|
1
|
+
@import "plugins/drag_drop";
|
2
|
+
@import "plugins/dropdown_header";
|
3
|
+
@import "plugins/optgroup_columns";
|
4
|
+
@import "plugins/remove_button";
|
5
|
+
|
6
|
+
// base styles
|
7
|
+
|
8
|
+
@selectize-font-family: inherit;
|
9
|
+
@selectize-font-smoothing: inherit;
|
10
|
+
@selectize-font-size: 13px;
|
11
|
+
@selectize-line-height: 18px;
|
12
|
+
|
13
|
+
@selectize-color-text: #303030;
|
14
|
+
@selectize-color-border: #d0d0d0;
|
15
|
+
@selectize-color-highlight: rgba(125,168,208,0.2);
|
16
|
+
@selectize-color-input: #fff;
|
17
|
+
@selectize-color-input-full: @selectize-color-input;
|
18
|
+
@selectize-color-disabled: #fafafa;
|
19
|
+
@selectize-color-item: #f2f2f2;
|
20
|
+
@selectize-color-item-text: @selectize-color-text;
|
21
|
+
@selectize-color-item-border: #d0d0d0;
|
22
|
+
@selectize-color-item-active: #e8e8e8;
|
23
|
+
@selectize-color-item-active-text: @selectize-color-text;
|
24
|
+
@selectize-color-item-active-border: #cacaca;
|
25
|
+
@selectize-color-dropdown: #fff;
|
26
|
+
@selectize-color-dropdown-border: @selectize-color-border;
|
27
|
+
@selectize-color-dropdown-border-top: #f0f0f0;
|
28
|
+
@selectize-color-dropdown-item-active: #f5fafd;
|
29
|
+
@selectize-color-dropdown-item-active-text: #495c68;
|
30
|
+
@selectize-color-dropdown-item-create-text: rgba(red(@selectize-color-text), green(@selectize-color-text), blue(@selectize-color-text), 0.5);
|
31
|
+
@selectize-color-dropdown-item-create-active-text: @selectize-color-dropdown-item-active-text;
|
32
|
+
@selectize-color-optgroup: @selectize-color-dropdown;
|
33
|
+
@selectize-color-optgroup-text: @selectize-color-text;
|
34
|
+
@selectize-lighten-disabled-item: 30%;
|
35
|
+
@selectize-lighten-disabled-item-text: 30%;
|
36
|
+
@selectize-lighten-disabled-item-border: 30%;
|
37
|
+
@selectize-opacity-disabled: 0.5;
|
38
|
+
|
39
|
+
@selectize-shadow-input: inset 0 1px 1px rgba(0,0,0,0.1);
|
40
|
+
@selectize-shadow-input-focus: inset 0 1px 2px rgba(0,0,0,0.15);
|
41
|
+
@selectize-border: 1px solid @selectize-color-border;
|
42
|
+
@selectize-dropdown-border: 1px solid @selectize-color-dropdown-border;
|
43
|
+
@selectize-border-radius: 3px;
|
44
|
+
|
45
|
+
@selectize-width-item-border: 0;
|
46
|
+
@selectize-max-height-dropdown: 200px;
|
47
|
+
|
48
|
+
@selectize-padding-x: 8px;
|
49
|
+
@selectize-padding-y: 8px;
|
50
|
+
@selectize-padding-item-x: 6px;
|
51
|
+
@selectize-padding-item-y: 2px;
|
52
|
+
@selectize-padding-dropdown-item-x: @selectize-padding-x;
|
53
|
+
@selectize-padding-dropdown-item-y: 5px;
|
54
|
+
@selectize-margin-item-x: 3px;
|
55
|
+
@selectize-margin-item-y: 3px;
|
56
|
+
|
57
|
+
@selectize-arrow-size: 5px;
|
58
|
+
@selectize-arrow-color: #808080;
|
59
|
+
@selectize-arrow-offset: 15px;
|
60
|
+
|
61
|
+
@selectize-caret-margin: 0 2px 0 0;
|
62
|
+
@selectize-caret-margin-rtl: 0 4px 0 -2px;
|
63
|
+
|
64
|
+
.selectize-border-radius (@radii) {
|
65
|
+
-webkit-border-radius: @radii;
|
66
|
+
-moz-border-radius: @radii;
|
67
|
+
border-radius: @radii;
|
68
|
+
}
|
69
|
+
.selectize-unselectable () {
|
70
|
+
-webkit-user-select: none;
|
71
|
+
-moz-user-select: none;
|
72
|
+
-ms-user-select: none;
|
73
|
+
user-select: none;
|
74
|
+
}
|
75
|
+
.selectize-box-shadow (@shadow) {
|
76
|
+
-webkit-box-shadow: @shadow;
|
77
|
+
box-shadow: @shadow;
|
78
|
+
}
|
79
|
+
.selectize-box-sizing (@type: border-box) {
|
80
|
+
-webkit-box-sizing: @type;
|
81
|
+
-moz-box-sizing: @type;
|
82
|
+
box-sizing: @type;
|
83
|
+
}
|
84
|
+
.selectize-vertical-gradient (@color-top, @color-bottom) {
|
85
|
+
background-color: mix(@color-top, @color-bottom, 60%);
|
86
|
+
background-image: -moz-linear-gradient(top, @color-top, @color-bottom); // FF 3.6+
|
87
|
+
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@color-top), to(@color-bottom)); // Safari 4+, Chrome 2+
|
88
|
+
background-image: -webkit-linear-gradient(top, @color-top, @color-bottom); // Safari 5.1+, Chrome 10+
|
89
|
+
background-image: -o-linear-gradient(top, @color-top, @color-bottom); // Opera 11.10
|
90
|
+
background-image: linear-gradient(to bottom, @color-top, @color-bottom); // Standard, IE10
|
91
|
+
background-repeat: repeat-x;
|
92
|
+
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@color-top),argb(@color-bottom))); // IE9 and down
|
93
|
+
}
|
94
|
+
|
95
|
+
.selectize-control {
|
96
|
+
position: relative;
|
97
|
+
}
|
98
|
+
|
99
|
+
.selectize-dropdown, .selectize-input, .selectize-input input {
|
100
|
+
color: @selectize-color-text;
|
101
|
+
font-family: @selectize-font-family;
|
102
|
+
font-size: @selectize-font-size;
|
103
|
+
line-height: @selectize-line-height;
|
104
|
+
-webkit-font-smoothing: @selectize-font-smoothing;
|
105
|
+
}
|
106
|
+
|
107
|
+
.selectize-input, .selectize-control.single .selectize-input.input-active {
|
108
|
+
background: @selectize-color-input;
|
109
|
+
cursor: text;
|
110
|
+
display: inline-block;
|
111
|
+
}
|
112
|
+
|
113
|
+
.selectize-input {
|
114
|
+
border: @selectize-border;
|
115
|
+
padding: @selectize-padding-y @selectize-padding-x;
|
116
|
+
display: inline-block;
|
117
|
+
width: 100%;
|
118
|
+
overflow: hidden;
|
119
|
+
position: relative;
|
120
|
+
z-index: 1;
|
121
|
+
.selectize-box-sizing(border-box);
|
122
|
+
.selectize-box-shadow(@selectize-shadow-input);
|
123
|
+
.selectize-border-radius(@selectize-border-radius);
|
124
|
+
|
125
|
+
.selectize-control.multi &.has-items {
|
126
|
+
@padding-x: @selectize-padding-x;
|
127
|
+
@padding-top: @selectize-padding-y - @selectize-padding-item-y - @selectize-width-item-border;
|
128
|
+
@padding-bottom: @selectize-padding-y - @selectize-padding-item-y - @selectize-margin-item-y - @selectize-width-item-border;
|
129
|
+
padding: @padding-top @padding-x @padding-bottom;
|
130
|
+
}
|
131
|
+
|
132
|
+
&.full {
|
133
|
+
background-color: @selectize-color-input-full;
|
134
|
+
}
|
135
|
+
&.disabled, &.disabled * {
|
136
|
+
cursor: default !important;
|
137
|
+
}
|
138
|
+
&.focus {
|
139
|
+
.selectize-box-shadow(@selectize-shadow-input-focus);
|
140
|
+
}
|
141
|
+
&.dropdown-active {
|
142
|
+
.selectize-border-radius(@selectize-border-radius @selectize-border-radius 0 0);
|
143
|
+
}
|
144
|
+
|
145
|
+
> * {
|
146
|
+
vertical-align: baseline;
|
147
|
+
display: -moz-inline-stack;
|
148
|
+
display: inline-block;
|
149
|
+
zoom: 1;
|
150
|
+
*display: inline;
|
151
|
+
}
|
152
|
+
.selectize-control.multi & > div {
|
153
|
+
cursor: pointer;
|
154
|
+
margin: 0 @selectize-margin-item-x @selectize-margin-item-y 0;
|
155
|
+
padding: @selectize-padding-item-y @selectize-padding-item-x;
|
156
|
+
background: @selectize-color-item;
|
157
|
+
color: @selectize-color-item-text;
|
158
|
+
border: @selectize-width-item-border solid @selectize-color-item-border;
|
159
|
+
|
160
|
+
&.active {
|
161
|
+
background: @selectize-color-item-active;
|
162
|
+
color: @selectize-color-item-active-text;
|
163
|
+
border: @selectize-width-item-border solid @selectize-color-item-active-border;
|
164
|
+
}
|
165
|
+
}
|
166
|
+
.selectize-control.multi &.disabled > div {
|
167
|
+
&, &.active {
|
168
|
+
color: lighten(desaturate(@selectize-color-item-text, 100%), @selectize-lighten-disabled-item-text);
|
169
|
+
background: lighten(desaturate(@selectize-color-item, 100%), @selectize-lighten-disabled-item);
|
170
|
+
border: @selectize-width-item-border solid lighten(desaturate(@selectize-color-item-border, 100%), @selectize-lighten-disabled-item-border);
|
171
|
+
}
|
172
|
+
}
|
173
|
+
> input {
|
174
|
+
&::-ms-clear {
|
175
|
+
display: none;
|
176
|
+
}
|
177
|
+
display: inline-block !important;
|
178
|
+
padding: 0 !important;
|
179
|
+
min-height: 0 !important;
|
180
|
+
max-height: none !important;
|
181
|
+
max-width: 100% !important;
|
182
|
+
margin: @selectize-caret-margin !important;
|
183
|
+
text-indent: 0 !important;
|
184
|
+
border: 0 none !important;
|
185
|
+
background: none !important;
|
186
|
+
line-height: inherit !important;
|
187
|
+
-webkit-user-select: auto !important;
|
188
|
+
.selectize-box-shadow(none) !important;
|
189
|
+
&:focus { outline: none !important; }
|
190
|
+
}
|
191
|
+
}
|
192
|
+
|
193
|
+
.selectize-input::after {
|
194
|
+
content: ' ';
|
195
|
+
display: block;
|
196
|
+
clear: left;
|
197
|
+
}
|
198
|
+
|
199
|
+
.selectize-input.dropdown-active::before {
|
200
|
+
content: ' ';
|
201
|
+
display: block;
|
202
|
+
position: absolute;
|
203
|
+
background: @selectize-color-dropdown-border-top;
|
204
|
+
height: 1px;
|
205
|
+
bottom: 0;
|
206
|
+
left: 0;
|
207
|
+
right: 0;
|
208
|
+
}
|
209
|
+
|
210
|
+
.selectize-dropdown {
|
211
|
+
position: absolute;
|
212
|
+
z-index: 10;
|
213
|
+
border: @selectize-dropdown-border;
|
214
|
+
background: @selectize-color-dropdown;
|
215
|
+
margin: -1px 0 0 0;
|
216
|
+
border-top: 0 none;
|
217
|
+
.selectize-box-sizing(border-box);
|
218
|
+
.selectize-box-shadow(0 1px 3px rgba(0,0,0,0.1));
|
219
|
+
.selectize-border-radius(0 0 @selectize-border-radius @selectize-border-radius);
|
220
|
+
|
221
|
+
[data-selectable] {
|
222
|
+
cursor: pointer;
|
223
|
+
overflow: hidden;
|
224
|
+
.highlight {
|
225
|
+
background: @selectize-color-highlight;
|
226
|
+
.selectize-border-radius(1px);
|
227
|
+
}
|
228
|
+
}
|
229
|
+
[data-selectable], .optgroup-header {
|
230
|
+
padding: @selectize-padding-dropdown-item-y @selectize-padding-dropdown-item-x;
|
231
|
+
}
|
232
|
+
.optgroup:first-child .optgroup-header {
|
233
|
+
border-top: 0 none;
|
234
|
+
}
|
235
|
+
.optgroup-header {
|
236
|
+
color: @selectize-color-optgroup-text;
|
237
|
+
background: @selectize-color-optgroup;
|
238
|
+
cursor: default;
|
239
|
+
}
|
240
|
+
.active {
|
241
|
+
background-color: @selectize-color-dropdown-item-active;
|
242
|
+
color: @selectize-color-dropdown-item-active-text;
|
243
|
+
&.create {
|
244
|
+
color: @selectize-color-dropdown-item-create-active-text;
|
245
|
+
}
|
246
|
+
}
|
247
|
+
.create {
|
248
|
+
color: @selectize-color-dropdown-item-create-text;
|
249
|
+
}
|
250
|
+
}
|
251
|
+
|
252
|
+
.selectize-dropdown-content {
|
253
|
+
overflow-y: auto;
|
254
|
+
overflow-x: hidden;
|
255
|
+
max-height: @selectize-max-height-dropdown;
|
256
|
+
}
|
257
|
+
|
258
|
+
.selectize-control.single .selectize-input {
|
259
|
+
&, input { cursor: pointer; }
|
260
|
+
&.input-active, &.input-active input { cursor: text; }
|
261
|
+
|
262
|
+
&:after {
|
263
|
+
content: ' ';
|
264
|
+
display: block;
|
265
|
+
position: absolute;
|
266
|
+
top: 50%;
|
267
|
+
right: @selectize-arrow-offset;
|
268
|
+
margin-top: round((-1 * @selectize-arrow-size / 2));
|
269
|
+
width: 0;
|
270
|
+
height: 0;
|
271
|
+
border-style: solid;
|
272
|
+
border-width: @selectize-arrow-size @selectize-arrow-size 0 @selectize-arrow-size;
|
273
|
+
border-color: @selectize-arrow-color transparent transparent transparent;
|
274
|
+
}
|
275
|
+
&.dropdown-active:after {
|
276
|
+
margin-top: @selectize-arrow-size * -0.8;
|
277
|
+
border-width: 0 @selectize-arrow-size @selectize-arrow-size @selectize-arrow-size;
|
278
|
+
border-color: transparent transparent @selectize-arrow-color transparent;
|
279
|
+
}
|
280
|
+
}
|
281
|
+
|
282
|
+
.selectize-control.rtl {
|
283
|
+
&.single .selectize-input:after {
|
284
|
+
left: @selectize-arrow-offset;
|
285
|
+
right: auto;
|
286
|
+
}
|
287
|
+
.selectize-input > input {
|
288
|
+
margin: @selectize-caret-margin-rtl !important;
|
289
|
+
}
|
290
|
+
}
|
291
|
+
|
292
|
+
.selectize-control .selectize-input.disabled {
|
293
|
+
opacity: @selectize-opacity-disabled;
|
294
|
+
background-color: @selectize-color-disabled;
|
295
|
+
}
|
@@ -0,0 +1,107 @@
|
|
1
|
+
module.exports = function(config) {
|
2
|
+
// workaround for https://github.com/karma-runner/karma-sauce-launcher/issues/40
|
3
|
+
var saucelabsBatchID = Number(process.env.SAUCELABS_BATCH) - 1;
|
4
|
+
var saucelabsConcurrency = 4;
|
5
|
+
var saucelabsBrowsers = [
|
6
|
+
// mobile
|
7
|
+
{platform: 'OS X 10.10', browserName: 'iPhone', version: '8.1'},
|
8
|
+
//{platform: 'OS X 10.10 ', browserName: 'iPhone', version: '6.0'},
|
9
|
+
{platform: 'OS X 10.10', browserName: 'iPad', version: '8.1'},
|
10
|
+
//{platform: 'OS X 10.10', browserName: 'iPad', version: '6.0'},
|
11
|
+
{platform: 'Linux', browserName: 'android', version: '4.4'},
|
12
|
+
{platform: 'Linux', browserName: 'android', version: '4.3'},
|
13
|
+
// desktop (safari)
|
14
|
+
{platform: 'OS X 10.8', browserName: 'safari', version: 6},
|
15
|
+
{platform: 'OS X 10.9', browserName: 'safari', version: 7},
|
16
|
+
{platform: 'OS X 10.10', browserName: 'safari', version: 8},
|
17
|
+
// desktop (chrome)
|
18
|
+
{platform: 'OS X 10.10', browserName: 'chrome', version: 39},
|
19
|
+
{platform: 'OS X 10.10', browserName: 'chrome', version: 38},
|
20
|
+
{platform: 'OS X 10.10', browserName: 'chrome', version: 37},
|
21
|
+
{platform: 'Windows 7', browserName: 'chrome', version: 39},
|
22
|
+
{platform: 'Windows 7', browserName: 'chrome', version: 38},
|
23
|
+
{platform: 'Windows 7', browserName: 'chrome', version: 37},
|
24
|
+
// desktop (firefox)
|
25
|
+
{platform: 'Windows 7', browserName: 'firefox', version: 35},
|
26
|
+
{platform: 'Windows 8', browserName: 'firefox', version: 35},
|
27
|
+
{platform: 'OS X 10.10', browserName: 'firefox', version: 34},
|
28
|
+
{platform: 'OS X 10.10', browserName: 'firefox', version: 33},
|
29
|
+
{platform: 'OS X 10.10', browserName: 'firefox', version: 32},
|
30
|
+
// desktop (internet explorer)
|
31
|
+
{platform: 'Windows 8', browserName: 'iexplore', version: 10},
|
32
|
+
{platform: 'Windows 8.1', browserName: 'iexplore', version: 11},
|
33
|
+
{platform: 'Windows 7', browserName: 'iexplore', version: 9}
|
34
|
+
];
|
35
|
+
|
36
|
+
if (process.env.TARGET === 'saucelabs') {
|
37
|
+
saucelabsBrowsers = saucelabsBrowsers.slice(saucelabsBatchID * saucelabsConcurrency, saucelabsBatchID * saucelabsConcurrency + saucelabsConcurrency);
|
38
|
+
if (!saucelabsBrowsers.length) process.exit(0);
|
39
|
+
}
|
40
|
+
|
41
|
+
var customLaunchers = {};
|
42
|
+
saucelabsBrowsers.forEach(function(browser, i) {
|
43
|
+
browser.base = 'SauceLabs';
|
44
|
+
customLaunchers['SL_' + i] = browser;
|
45
|
+
});
|
46
|
+
|
47
|
+
var targets = {
|
48
|
+
'saucelabs': Object.keys(customLaunchers),
|
49
|
+
'phantomjs': ['PhantomJS']
|
50
|
+
};
|
51
|
+
|
52
|
+
var reporters = ['mocha'];
|
53
|
+
if (process.env.TRAVIS_CI) {
|
54
|
+
reporters = process.env.TARGET === 'saucelabs'
|
55
|
+
? ['saucelabs', 'mocha']
|
56
|
+
: ['mocha', 'coverage', 'coveralls']
|
57
|
+
}
|
58
|
+
|
59
|
+
var browsers = targets[process.env.TARGET || 'phantomjs'];
|
60
|
+
if (process.env.BROWSERS) {
|
61
|
+
browsers = process.env.BROWSERS.split(',');
|
62
|
+
}
|
63
|
+
|
64
|
+
config.set({
|
65
|
+
frameworks: ['mocha', 'chai'],
|
66
|
+
files: [
|
67
|
+
'dist/css/selectize.default.css',
|
68
|
+
'bower_components/jquery/jquery.js',
|
69
|
+
'bower_components/microplugin/src/microplugin.js',
|
70
|
+
'bower_components/sifter/sifter.js',
|
71
|
+
'test/support/*.js',
|
72
|
+
'src/contrib/*.js',
|
73
|
+
'src/constants.js',
|
74
|
+
'src/utils.js',
|
75
|
+
'src/selectize.js',
|
76
|
+
'src/defaults.js',
|
77
|
+
'src/selectize.jquery.js',
|
78
|
+
'test/*.js'
|
79
|
+
],
|
80
|
+
preprocessors: {
|
81
|
+
'src/*.js': ['coverage']
|
82
|
+
},
|
83
|
+
coverageReporter: {
|
84
|
+
type: process.env.TRAVIS_CI && process.env.TARGET === 'phantomjs' ? 'lcov' : 'text-summary',
|
85
|
+
dir: 'coverage/'
|
86
|
+
},
|
87
|
+
sauceLabs: {
|
88
|
+
recordVideo: false,
|
89
|
+
startConnect: true,
|
90
|
+
tunnelIdentifier: process.env.TRAVIS_JOB_NUMBER,
|
91
|
+
build: process.env.TRAVIS_BUILD_NUMBER,
|
92
|
+
testName: process.env.COMMIT_MESSAGE,
|
93
|
+
tags: ['selectize', 'test']
|
94
|
+
},
|
95
|
+
customLaunchers: customLaunchers,
|
96
|
+
reporters: reporters,
|
97
|
+
port: 8888,
|
98
|
+
colors: true,
|
99
|
+
captureTimeout: 0,
|
100
|
+
logLevel: config.LOG_INFO,
|
101
|
+
browsers: browsers,
|
102
|
+
browserDisconnectTolerance: 2,
|
103
|
+
browserDisconnectTimeout: 10000,
|
104
|
+
browserNoActivityTimeout: 120000,
|
105
|
+
singleRun: true
|
106
|
+
});
|
107
|
+
};
|