a||a+h.$window.height()>h.$document.height()||0>b||b+h.$window.width()>h.$document.width()||h.$originalHeader.css({top:h.topOffset-(h.isWindowScrolling?0:a),left:h.leftOffset-(h.isWindowScrolling?0:b)})},0),h.updateWidth=h.debounce(function(){if(h.isSticky){h.$originalHeaderCells||(h.$originalHeaderCells=a("th,td",h.$originalHeader)),h.$clonedHeaderCells||(h.$clonedHeaderCells=a("th,td",h.$clonedHeader));var b=h.getWidth(h.$clonedHeaderCells);h.setWidth(b,h.$clonedHeaderCells,h.$originalHeaderCells),h.$originalHeader.css("width",h.$clonedHeader.width()),h.options.cacheHeaderHeight&&(h.cachedHeaderHeight=h.$clonedHeader.height())}},0),h.getWidth=function(c){var d=[];return c.each(function(c){var e,f=a(this);if("border-box"===f.css("box-sizing")){var g=f[0].getBoundingClientRect();e=g.width?g.width:g.right-g.left}else{var i=a("th",h.$originalHeader);if("collapse"===i.css("border-collapse"))if(b.getComputedStyle)e=parseFloat(b.getComputedStyle(this,null).width);else{var j=parseFloat(f.css("padding-left")),k=parseFloat(f.css("padding-right")),l=parseFloat(f.css("border-width"));e=f.outerWidth()-j-k-l}else e=f.width()}d[c]=e}),d},h.setWidth=function(a,b,c){b.each(function(b){var d=a[b];c.eq(b).css({"min-width":d,"max-width":d})})},h.resetWidth=function(b,c){b.each(function(b){var d=a(this);c.eq(b).css({"min-width":d.css("min-width"),"max-width":d.css("max-width")})})},h.setOptions=function(b){h.options=a.extend({},f,b),h.$window=a(h.options.objWindow),h.$head=a(h.options.objHead),h.$document=a(h.options.objDocument),h.$scrollableArea=a(h.options.scrollableArea),h.isWindowScrolling=h.$scrollableArea[0]===h.$window[0]},h.updateOptions=function(a){h.setOptions(a),h.unbind(),h.bind(),h.updateWidth(),h.toggleHeaders()},h.init()}var d="stickyTableHeaders",e=0,f={fixedOffset:0,leftOffset:0,marginTop:0,objDocument:document,objHead:"head",objWindow:b,scrollableArea:b,cacheHeaderHeight:!1};a.fn[d]=function(b){return this.each(function(){var e=a.data(this,"plugin_"+d);e?"string"==typeof b?e[b].apply(e):e.updateOptions(b):"destroy"!==b&&a.data(this,"plugin_"+d,new c(this,b))})}}(jQuery,window);
--------------------------------------------------------------------------------
/support/multiselect-select2/README.md:
--------------------------------------------------------------------------------
1 | Select2
2 | =======
3 |
4 | Select2 is a jQuery-based replacement for select boxes. It supports searching, remote data sets, and infinite scrolling of results.
5 |
6 | To get started, checkout examples and documentation at http://select2.github.io/select2/
7 |
8 | Use cases
9 | ---------
10 |
11 | * Enhancing native selects with search.
12 | * Enhancing native selects with a better multi-select interface.
13 | * Loading data from JavaScript: easily load items via ajax and have them searchable.
14 | * Nesting optgroups: native selects only support one level of nested. Select2 does not have this restriction.
15 | * Tagging: ability to add new items on the fly.
16 | * Working with large, remote datasets: ability to partially load a dataset based on the search term.
17 | * Paging of large datasets: easy support for loading more pages when the results are scrolled to the end.
18 | * Templating: support for custom rendering of results and selections.
19 |
20 | Browser compatibility
21 | ---------------------
22 | * IE 8+
23 | * Chrome 8+
24 | * Firefox 10+
25 | * Safari 3+
26 | * Opera 10.6+
27 |
28 | Usage
29 | -----
30 | You can source Select2 directly from a CDN like [jsDelivr](http://www.jsdelivr.com/#!select2) or [CDNJS](http://www.cdnjs.com/libraries/select2), [download it from this GitHub repo](https://github.com/select2/select2/tags), or use one of the integrations below.
31 |
32 | Integrations
33 | ------------
34 |
35 | * [Wicket-Select2](https://github.com/ivaynberg/wicket-select2) (Java / [Apache Wicket](http://wicket.apache.org))
36 | * [select2-rails](https://github.com/argerim/select2-rails) (Ruby on Rails)
37 | * [AngularUI](http://angular-ui.github.io/#ui-select) ([AngularJS](https://angularjs.org/))
38 | * [Django](https://github.com/applegrew/django-select2)
39 | * [Symfony](https://github.com/19Gerhard85/sfSelect2WidgetsPlugin)
40 | * [Symfony2](https://github.com/avocode/FormExtensions)
41 | * [Bootstrap 2](https://github.com/t0m/select2-bootstrap-css) and [Bootstrap 3](https://github.com/t0m/select2-bootstrap-css/tree/bootstrap3) (CSS skins)
42 | * [Meteor](https://github.com/nate-strauser/meteor-select2) (modern reactive JavaScript framework; + [Bootstrap 3 skin](https://github.com/esperadomedia/meteor-select2-bootstrap3-css/))
43 | * [Meteor](https://jquery-select2.meteor.com)
44 | * [Yii 2.x](http://demos.krajee.com/widgets#select2)
45 | * [Yii 1.x](https://github.com/tonybolzan/yii-select2)
46 | * [AtmosphereJS](https://atmospherejs.com/package/jquery-select2)
47 | * [EmberJS](https://github.com/iStefo/ember-select-2)
48 |
49 | ### Example Integrations
50 |
51 | * [Knockout.js](https://github.com/ivaynberg/select2/wiki/Knockout.js-Integration)
52 | * [Socket.IO](https://github.com/ivaynberg/select2/wiki/Socket.IO-Integration)
53 | * [PHP](https://github.com/ivaynberg/select2/wiki/PHP-Example)
54 | * [.Net MVC] (https://github.com/ivaynberg/select2/wiki/.Net-MVC-Example)
55 |
56 | Internationalization (i18n)
57 | ---------------------------
58 |
59 | Select2 supports multiple languages by simply including the right language JS
60 | file (`select2_locale_it.js`, `select2_locale_nl.js`, etc.) after `select2.js`.
61 |
62 | Missing a language? Just copy `select2_locale_en.js.template`, translate
63 | it, and make a pull request back to Select2 here on GitHub.
64 |
65 | Documentation
66 | -------------
67 |
68 | The documentation for Select2 is available [through GitHub Pages](http://select2.github.io/select2/) and is located within this repository in the [`gh-pages` branch](https://github.com/ivaynberg/select2/tree/gh-pages).
69 |
70 | Community
71 | ---------
72 |
73 | ### Bug tracker
74 |
75 | Have a bug? Please create an issue here on GitHub!
76 |
77 | https://github.com/ivaynberg/select2/issues
78 |
79 | ### Mailing list
80 |
81 | Have a question? Ask on our mailing list!
82 |
83 | select2@googlegroups.com
84 |
85 | https://groups.google.com/d/forum/select2
86 |
87 | ### IRC channel
88 |
89 | Need help implementing Select2 in your project? Ask in our IRC channel!
90 |
91 | **Network:** [Freenode](https://freenode.net/) (`chat.freenode.net`)
92 |
93 | **Channel:** `#select2`
94 |
95 | **Web access:** https://webchat.freenode.net/?channels=select2
96 |
97 | Copyright and license
98 | ---------------------
99 |
100 | Copyright 2015 Igor Vaynberg
101 |
102 | This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
103 | General Public License version 2 (the "GPL License"). You may choose either license to govern your
104 | use of this software only upon the condition that you accept all of the terms of either the Apache
105 | License or the GPL License.
106 |
107 | You may obtain a copy of the Apache License and the GPL License in the LICENSE file, or at:
108 |
109 | http://www.apache.org/licenses/LICENSE-2.0
110 | http://www.gnu.org/licenses/gpl-2.0.html
111 |
112 | Unless required by applicable law or agreed to in writing, software distributed under the Apache License
113 | or the GPL License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
114 | either express or implied. See the Apache License and the GPL License for the specific language governing
115 | permissions and limitations under the Apache License and the GPL License.
116 |
--------------------------------------------------------------------------------
/support/multiselect-select2/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | Contributing to Select2
2 | =======================
3 | Looking to contribute something to Select2? **Here's how you can help.**
4 |
5 | Please take a moment to review this document in order to make the contribution
6 | process easy and effective for everyone involved.
7 |
8 | Following these guidelines helps to communicate that you respect the time of
9 | the developers managing and developing this open source project. In return,
10 | they should reciprocate that respect in addressing your issue or assessing
11 | patches and features.
12 |
13 | Using the issue tracker
14 | -----------------------
15 | When [reporting bugs][reporting-bugs] or
16 | [requesting features][requesting-features], the
17 | [issue tracker on GitHub][issue-tracker] is the recommended channel to use.
18 |
19 | The issue tracker **is not** a place for support requests. The
20 | [mailing list][mailing-list] or [IRC channel][irc-channel] are better places to
21 | get help.
22 |
23 | Reporting bugs with Select2
24 | ---------------------------
25 | We really appreciate clear bug reports that _consistently_ show an issue
26 | _within Select2_.
27 |
28 | The ideal bug report follows these guidelines:
29 |
30 | 1. **Use the [GitHub issue search][issue-search]** — Check if the issue
31 | has already been reported.
32 | 2. **Check if the issue has been fixed** — Try to reproduce the problem
33 | using the code in the `master` branch.
34 | 3. **Isolate the problem** — Try to create an
35 | [isolated test case][isolated-case] that consistently reproduces the problem.
36 |
37 | Please try to be as detailed as possible in your bug report, especially if an
38 | isolated test case cannot be made. Some useful questions to include the answer
39 | to are:
40 |
41 | - What steps can be used to reproduce the issue?
42 | - What is the bug and what is the expected outcome?
43 | - What browser(s) and Operating System have you tested with?
44 | - Does the bug happen consistently across all tested browsers?
45 | - What version of jQuery are you using? And what version of Select2?
46 | - Are you using Select2 with other plugins?
47 |
48 | All of these questions will help people fix and identify any potential bugs.
49 |
50 | Requesting features in Select2
51 | ------------------------------
52 | Select2 is a large library that carries with it a lot of functionality. Because
53 | of this, many feature requests will not be implemented in the core library.
54 |
55 | Before starting work on a major feature for Select2, **contact the
56 | [community][community] first** or you may risk spending a considerable amount of
57 | time on something which the project developers are not interested in bringing
58 | into the project.
59 |
60 | ### Select2 4.0
61 |
62 | Many feature requests will be closed off until 4.0, where Select2 plans to adopt
63 | a more flexible API. If you are interested in helping with the development of
64 | the next major Select2 release, please send a message to the
65 | [mailing list][mailing-list] or [irc channel][irc-channel] for more information.
66 |
67 | Triaging issues and pull requests
68 | ---------------------------------
69 | Anyone can help the project maintainers triage issues and review pull requests.
70 |
71 | ### Handling new issues
72 |
73 | Select2 regularly receives new issues which need to be tested and organized.
74 |
75 | When a new issue that comes in that is similar to another existing issue, it
76 | should be checked to make sure it is not a duplicate. Duplicates issues should
77 | be marked by replying to the issue with "Duplicate of #[issue number]" where
78 | `[issue number]` is the url or issue number for the existing issue. This will
79 | allow the project maintainers to quickly close off additional issues and keep
80 | the discussion focused within a single issue.
81 |
82 | If you can test issues that are reported to Select2 that contain test cases and
83 | confirm under what conditions bugs happen, that will allow others to identify
84 | what causes a bug quicker.
85 |
86 | ### Reviewing pull requests
87 |
88 | It is very common for pull requests to be opened for issues that contain a clear
89 | solution to the problem. These pull requests should be rigorously reviewed by
90 | the community before being accepted. If you are not sure about a piece of
91 | submitted code, or know of a better way to do something, do not hesitate to make
92 | a comment on the pull request.
93 |
94 | It should also be made clear that **all code contributed to Select** must be
95 | licensable under the [Apache 2 or GPL 2 licenses][licensing]. Code that cannot
96 | be released under either of these licenses **cannot be accepted** into the
97 | project.
98 |
99 | [community]: https://github.com/ivaynberg/select2#community
100 | [reporting-bugs]: #reporting-bugs-with-select2
101 | [requesting-features]: #requesting-features-in-select2
102 | [issue-tracker]: https://github.com/ivaynberg/select2/issues
103 | [mailing-list]: https://github.com/ivaynberg/select2#mailing-list
104 | [irc-channel]: https://github.com/ivaynberg/select2#irc-channel
105 | [issue-search]: https://github.com/ivaynberg/select2/search?q=&type=Issues
106 | [isolated-case]: http://css-tricks.com/6263-reduced-test-cases/
107 | [licensing]: https://github.com/ivaynberg/select2#copyright-and-license
108 |
--------------------------------------------------------------------------------
/support/view_print_layout.php:
--------------------------------------------------------------------------------
1 |
20 |
21 |
32 |
66 |
77 |
78 |
95 |
96 | $val)
98 | {
99 | if ($val != "" || !$compact)
100 | {
101 | ?>
102 | | \n", htmlspecialchars($val)) : $val); ?> |
103 |
107 |
108 |
121 | \n", htmlspecialchars($field["value"])) : $field["value"]); ?>
122 |
150 |
151 |
152 |
153 | @TITLE@
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 | @CONTENT@
166 |
167 |
168 |
169 |
170 |
171 |
172 | @MENU@', "", $bb_page_layout);
177 | ?>
--------------------------------------------------------------------------------
/support/multiselect-widget/jquery.multiselect.filter.js:
--------------------------------------------------------------------------------
1 | /* jshint forin:true, noarg:true, noempty:true, eqeqeq:true, boss:true, undef:true, curly:true, browser:true, jquery:true */
2 | /*
3 | * jQuery MultiSelect UI Widget Filtering Plugin 2.0.0
4 | * Copyright (c) 2012 Eric Hynds
5 | *
6 | * http://www.erichynds.com/jquery/jquery-ui-multiselect-widget/
7 | *
8 | * Depends:
9 | * - jQuery UI MultiSelect widget
10 | *
11 | * Dual licensed under the MIT and GPL licenses:
12 | * http://www.opensource.org/licenses/mit-license.php
13 | * http://www.gnu.org/licenses/gpl.html
14 | *
15 | */
16 | (function($) {
17 | var rEscape = /[\-\[\]{}()*+?.,\\\^$|#\s]/g;
18 |
19 | //Courtesy of underscore.js
20 | function debounce(func, wait, immediate) {
21 | var timeout;
22 | return function() {
23 | var context = this, args = arguments;
24 | var later = function() {
25 | timeout = null;
26 | if (!immediate) {
27 | func.apply(context, args);
28 | }
29 | };
30 | var callNow = immediate && !timeout;
31 | clearTimeout(timeout);
32 | timeout = setTimeout(later, wait);
33 | if (callNow) {
34 | func.apply(context, args);
35 | }
36 | };
37 | }
38 |
39 | $.widget('ech.multiselectfilter', {
40 |
41 | options: {
42 | label: 'Filter:',
43 | width: null, /* override default width set in css file (px). null will inherit */
44 | placeholder: 'Enter keywords',
45 | autoReset: false,
46 | debounceMS: 250
47 | },
48 |
49 | _create: function() {
50 | var opts = this.options;
51 | var elem = $(this.element);
52 |
53 | // get the multiselect instance
54 | this.instance = elem.multiselect('instance');
55 |
56 | // store header; add filter class so the close/check all/uncheck all links can be positioned correctly
57 | this.header = this.instance.menu.find('.ui-multiselect-header').addClass('ui-multiselect-hasfilter');
58 |
59 | // wrapper elem
60 | this.input = $("").attr({
61 | placeholder: opts.placeholder,
62 | type: "search"
63 | }).css({
64 | width: (/\d/.test(opts.width) ? opts.width + 'px' : null)
65 | }).bind({
66 | keydown: function(e) {
67 | // prevent the enter key from submitting the form / closing the widget
68 | if(e.which === 13) {
69 | e.preventDefault();
70 | } else if(e.which === 27) {
71 | elem.multiselect('close');
72 | e.preventDefault();
73 | } else if(e.which === 9 && e.shiftKey) {
74 | elem.multiselect('close');
75 | e.preventDefault();
76 | } else if(e.altKey) {
77 | switch(e.which) {
78 | case 82:
79 | e.preventDefault();
80 | $(this).val('').trigger('input', '');
81 | break;
82 | case 65:
83 | elem.multiselect('checkAll');
84 | break;
85 | case 85:
86 | elem.multiselect('uncheckAll');
87 | break;
88 | case 76:
89 | elem.multiselect('instance').labels.first().trigger("mouseenter");
90 | break;
91 | }
92 | }
93 | },
94 | input: $.proxy(debounce(this._handler, opts.debounceMS), this),
95 | search: $.proxy(this._handler, this)
96 | });
97 | // automatically reset the widget on close?
98 | if(this.options.autoReset) {
99 | elem.bind('multiselectclose', $.proxy(this._reset, this));
100 | }
101 | // rebuild cache when multiselect is updated
102 | elem.bind('multiselectrefresh', $.proxy(function() {
103 | this.updateCache();
104 | this._handler();
105 | }, this));
106 | this.wrapper = $("").addClass("ui-multiselect-filter").text(opts.label).append(this.input).prependTo(this.header);
107 |
108 | // reference to the actual inputs
109 | this.inputs = this.instance.menu.find('input[type="checkbox"], input[type="radio"]');
110 |
111 | // cache input values for searching
112 | this.updateCache();
113 |
114 | // rewrite internal _toggleChecked fn so that when checkAll/uncheckAll is fired,
115 | // only the currently filtered elements are checked
116 | this.instance._toggleChecked = function(flag, group) {
117 | var $inputs = (group && group.length) ? group : this.labels.find('input');
118 | var _self = this;
119 |
120 | // do not include hidden elems if the menu isn't open.
121 | var selector = _self._isOpen ? ':disabled, :hidden' : ':disabled';
122 |
123 | $inputs = $inputs
124 | .not(selector)
125 | .each(this._toggleState('checked', flag));
126 |
127 | // update text
128 | this.update();
129 |
130 | // gather an array of the values that actually changed
131 | var values = {};
132 | $inputs.each(function() {
133 | values[this.value] = true;
134 | });
135 |
136 | // select option tags
137 | this.element.find('option').filter(function() {
138 | if(!this.disabled && values[this.value]) {
139 | _self._toggleState('selected', flag).call(this);
140 | }
141 | });
142 |
143 | // trigger the change event on the select
144 | if($inputs.length) {
145 | this.element.trigger('change');
146 | }
147 | };
148 | },
149 |
150 | // thx for the logic here ben alman
151 | _handler: function(e) {
152 | var term = $.trim(this.input[0].value.toLowerCase()),
153 |
154 | // speed up lookups
155 | rows = this.rows, inputs = this.inputs, cache = this.cache;
156 | var $groups = this.instance.menu.find(".ui-multiselect-optgroup");
157 | $groups.show();
158 | if(!term) {
159 | rows.show();
160 | } else {
161 | rows.hide();
162 |
163 | var regex = new RegExp(term.replace(rEscape, "\\$&"), 'gi');
164 |
165 | this._trigger("filter", e, $.map(cache, function(v, i) {
166 | if(v.search(regex) !== -1) {
167 | rows.eq(i).show();
168 | return inputs.get(i);
169 | }
170 |
171 | return null;
172 | }));
173 | }
174 |
175 | // show/hide optgroups
176 | $groups.each(function() {
177 | var $this = $(this);
178 | if(!$this.children("li:visible").length) {
179 | $this.hide();
180 | }
181 | });
182 | this.instance._setMenuHeight();
183 | },
184 |
185 | _reset: function() {
186 | this.input.val('').trigger('input', '');
187 | },
188 |
189 | updateCache: function() {
190 | // each list item
191 | this.rows = this.instance.labels.parent();
192 |
193 | // cache
194 | this.cache = this.element.children().map(function() {
195 | var elem = $(this);
196 |
197 | // account for optgroups
198 | if(this.tagName.toLowerCase() === "optgroup") {
199 | elem = elem.children();
200 | }
201 |
202 | return elem.map(function() {
203 | return this.innerHTML.toLowerCase();
204 | }).get();
205 | }).get();
206 | },
207 |
208 | widget: function() {
209 | return this.wrapper;
210 | },
211 |
212 | destroy: function() {
213 | $.Widget.prototype.destroy.call(this);
214 | this.input.val('').trigger("keyup");
215 | this.wrapper.remove();
216 | }
217 | });
218 |
219 | })(jQuery);
220 |
--------------------------------------------------------------------------------
/support/jquery.tablecards.js:
--------------------------------------------------------------------------------
1 | // jQuery plugin to convert tables to responsive cards via templates.
2 | // (C) 2017 CubicleSoft. All Rights Reserved.
3 |
4 | (function($) {
5 | $.fn.TableCards = function(options) {
6 | // Reset TableCards (e.g. card template changes).
7 | this.each(function() {
8 | var $this = $(this);
9 |
10 | $this.removeClass('tablecards');
11 | $this.removeClass('tablecard-show');
12 | $this.children('thead, tbody, tfoot').children('tr').children('th, td').each(function() {
13 | $this2 = $(this);
14 |
15 | if ($this2.hasClass('tablecard-col')) $this2.remove();
16 | else $this2.removeClass('tablecard-mode-card');
17 | });
18 |
19 | $this.off('tablecards:resize');
20 | $this.off('tablecards:datachanged');
21 | });
22 |
23 | if (typeof(options) === 'string' && options === 'destroy') return this;
24 |
25 | var settings = $.extend({}, $.fn.TableCards.defaults, options);
26 |
27 | // Allows rotation through input templates per row.
28 | if (typeof(settings.head) === 'string') settings.head = [settings.head];
29 | if (typeof(settings.body) === 'string') settings.body = [settings.body];
30 | if (typeof(settings.foot) === 'string') settings.foot = [settings.foot];
31 |
32 | // Tokenize the templates.
33 | var ParseTemplate = function(templatestr) {
34 | if (typeof(templatestr) === 'function') return templatestr;
35 |
36 | var template = [];
37 | var tokens = templatestr.split(settings.tokenstart);
38 | template.push(tokens.shift());
39 | var zero = '0'.charCodeAt(0);
40 | var nine = '9'.charCodeAt(0);
41 | for (var x = 0; x < tokens.length; x++)
42 | {
43 | var str = tokens[x];
44 |
45 | if (str.length == 0) template.push(settings.tokenstart);
46 | else
47 | {
48 | var x2;
49 | for (x2 = 0; x2 < str.length && str.charCodeAt(x2) >= zero && str.charCodeAt(x2) <= nine; x2++)
50 | {
51 | }
52 |
53 | if (x2 > 0) template.push(parseInt(str.substr(0, x2), 10));
54 |
55 | template.push(str.substr(x2));
56 | }
57 | }
58 |
59 | return template;
60 | };
61 |
62 | var ParseTemplates = function(templates) {
63 | var result = [];
64 |
65 | for (var x = 0; x < templates.length; x++) result.push(ParseTemplate(templates[x]));
66 |
67 | return result;
68 | };
69 |
70 | // Apply a template to one or more rows of data and generate card columns.
71 | var ApplyTemplates = function(trs, templates, tag, mainbody) {
72 | var num = 0;
73 |
74 | trs.each(function() {
75 | var template = templates[num];
76 |
77 | num++;
78 | if (num >= templates.length) num = 0;
79 |
80 | var html = '';
81 |
82 | if (typeof(template) === 'function') html += template();
83 | else
84 | {
85 | var children = $(this).children('th, td');
86 |
87 | for (var x = 0; x < template.length; x++)
88 | {
89 | if (typeof(template[x]) === 'string') html += template[x];
90 | else if (template[x] > 0 && template[x] <= children.length) html += $(children.get(template[x] - 1)).html();
91 | }
92 | }
93 |
94 | $(this).append('<' + tag + ' class="tablecard-col' + (mainbody ? ' tablecard-mode-card' : '') + '">' + html + '' + tag + '>');
95 | });
96 | };
97 |
98 | // Add a class to always show specified columns when in card mode.
99 | var AddCardClass = function(trs) {
100 | if (settings.extracols.length)
101 | {
102 | trs.first().children('th.tablecard-col, td.tablecard-col').addClass('tablecard-mode-card');
103 |
104 | for (var x = 0; x < settings.extracols.length; x++)
105 | {
106 | var col = settings.extracols[x];
107 | if (typeof(col) !== 'number') continue;
108 |
109 | if (col > 0)
110 | {
111 | trs.each(function() {
112 | $(this).children('th, td').slice(col - 1, col).addClass('tablecard-mode-card');
113 | });
114 | }
115 | }
116 | }
117 | };
118 |
119 | var headtemplates = null, bodytemplates, foottemplates;
120 |
121 | var Init = function($this) {
122 | if (!headtemplates)
123 | {
124 | headtemplates = ParseTemplates(settings.head);
125 | bodytemplates = ParseTemplates(settings.body);
126 | foottemplates = ParseTemplates(settings.foot);
127 | }
128 |
129 | // Add a class so that CSS can make any necessary adjustments.
130 | $this.addClass('tablecards');
131 |
132 | // Alter table header.
133 | var theads = $this.children('thead');
134 | if (!theads.length)
135 | {
136 | $this.prepend('
');
137 | theads = $this.children('thead');
138 | }
139 | var headtrs = theads.children('tr');
140 | ApplyTemplates(headtrs, headtemplates, 'th', false);
141 | AddCardClass(headtrs);
142 |
143 | // Alter table body.
144 | var tbodys = $this.children('tbody');
145 | var bodytrs = tbodys.children('tr');
146 | ApplyTemplates(bodytrs, bodytemplates, 'td', true);
147 | AddCardClass(bodytrs);
148 |
149 | // Alter table footer (if any).
150 | var tfoots = $this.children('tfoot');
151 | var foottrs = tfoots.children('tr');
152 | ApplyTemplates(foottrs, foottemplates, 'td', false);
153 | AddCardClass(foottrs);
154 | };
155 |
156 | return this.each(function() {
157 | var $this = $(this);
158 | var minwidth = settings.width;
159 | var resetminwidth = false;
160 | var currmode = 'table';
161 | var initialized = false;
162 |
163 | var HandleResize = function(e) {
164 | var tablewidth = $this.outerWidth();
165 | if (tablewidth < 1) return;
166 |
167 | var parentwidth = $this.parent().innerWidth();
168 |
169 | if (!minwidth && currmode === 'table')
170 | {
171 | if (tablewidth > parentwidth + 1) minwidth = tablewidth;
172 | }
173 |
174 | if (minwidth)
175 | {
176 | if ((parentwidth < minwidth || tablewidth > parentwidth + 1) && currmode === 'table')
177 | {
178 | if (!initialized)
179 | {
180 | Init($this);
181 | initialized = true;
182 | }
183 |
184 | $this.addClass('tablecard-show');
185 | if (!settings.extracols.length) $this.addClass('tablecard-show-nohead');
186 | currmode = 'card';
187 |
188 | //console.log('mode = ' + currmode + ', parentwidth = ' + parentwidth + ', minwidth = ' + minwidth + ', tablewidth = ' + tablewidth);
189 |
190 | setTimeout(function() { $this.trigger('tablecards:mode', currmode); }, 0);
191 | }
192 | else if (parentwidth > minwidth + 1 && currmode === 'card')
193 | {
194 | $this.removeClass('tablecard-show');
195 | if (!settings.extracols.length) $this.removeClass('tablecard-show-nohead');
196 | currmode = 'table';
197 |
198 | //console.log('mode = ' + currmode + ', parentwidth = ' + parentwidth + ', minwidth = ' + minwidth + ', tablewidth = ' + tablewidth);
199 |
200 | if (resetminwidth)
201 | {
202 | minwidth = settings.width;
203 | resetminwidth = false;
204 |
205 | setTimeout(HandleResize, 20);
206 | }
207 |
208 | setTimeout(function() { $this.trigger('tablecards:mode', currmode); }, 0);
209 | }
210 | }
211 | };
212 |
213 | $this.on('tablecards:resize', HandleResize);
214 | setTimeout(HandleResize, 0);
215 |
216 | $this.on('tablecards:datachanged', function() {
217 | if (currmode === 'card') resetminwidth = true;
218 | else
219 | {
220 | minwidth = settings.width;
221 | setTimeout(HandleResize, 0);
222 | }
223 | });
224 |
225 | if (settings.postinit) settings.postinit(this, settings);
226 | });
227 | };
228 |
229 | $.fn.TableCards.defaults = {
230 | 'width' : null,
231 | 'extracols' : [],
232 | 'tokenstart' : '%',
233 | 'head' : ' ',
234 | 'body' : ' ',
235 | 'foot' : ' ',
236 | 'postinit' : null
237 | };
238 | }(jQuery));
239 |
--------------------------------------------------------------------------------
/support/admin_view.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | padding: 0;
4 | border: 0;
5 | font-family: Verdana, Arial, Helvetica, sans-serif;
6 | max-width: 800px;
7 | margin: 0 auto;
8 | }
9 |
10 | .pagewrap {
11 | margin: 0 5px 5px 5px;
12 | }
13 |
14 | .pagewrap .headerwrap {
15 | text-align: center;
16 | font-weight: bold;
17 | font-size: 1.7em;
18 | border-left: 1px solid #BBBBBB;
19 | border-right: 1px solid #BBBBBB;
20 | border-bottom: 1px solid #BBBBBB;
21 | background-color: #F5F5F5;
22 | padding: 0.1em;
23 | border-bottom-right-radius: 3px;
24 | border-bottom-left-radius: 3px;
25 | -moz-border-radius-bottomright: 3px;
26 | -moz-border-radius-bottomleft: 3px;
27 | -webkitborder-bottom-right-radius: 3px;
28 | -webkitborder-bottom-left-radius: 3px;
29 | }
30 |
31 | .pagewrap .contentwrap {
32 | margin-top: 10px;
33 | }
34 |
35 | .pagewrap .menuwrap {
36 | margin-top: 7px;
37 | border-top: 1px solid #CCCCCC;
38 | padding: 25px 0 10px;
39 | }
40 |
41 | /* Basic styles for elements. */
42 | img {
43 | border: 0px none;
44 | margin: 0px;
45 | }
46 |
47 | form {
48 | border: 0px none;
49 | margin: 0px;
50 | }
51 |
52 | a {
53 | color: #035488;
54 | text-decoration: none;
55 | }
56 |
57 | a:hover {
58 | color: #444444;
59 | text-decoration: underline;
60 | }
61 |
62 | /* Optional message styles. */
63 | .message {
64 | margin: 10px 7px;
65 | font-weight: bold;
66 | padding: 7px 15px;
67 | border-radius: 3px;
68 | -moz-border-radius: 3px;
69 | -webkit-border-radius: 3px;
70 | }
71 |
72 | .message .success {
73 | background-color: #E8FCDC;
74 | border: 1px solid #008800;
75 | color: #008800;
76 | }
77 |
78 | .message .error {
79 | background-color: #FCDCDC;
80 | border: 1px solid #880000;
81 | color: #880000;
82 | }
83 |
84 | .message .info {
85 | background-color: #DCDCDC;
86 | border: 1px solid #333333;
87 | color: #333333;
88 | }
89 |
90 | .maincontent {
91 | }
92 |
93 | .maincontent .proptitle {
94 | font-weight: bold;
95 | font-size: 1.3em;
96 | color: #1F1F1F;
97 | }
98 |
99 | .maincontent .propdesc {
100 | margin-top: 5px;
101 | padding: 10px 7px;
102 | border-top: 1px solid #CCCCCC;
103 | color: #333333;
104 | font-size: 1.0em;
105 | }
106 |
107 | .maincontent .propinfo {
108 | }
109 |
110 | .maincontent .propmain {
111 | margin: 0px 7px;
112 | }
113 |
114 | .maincontent .propmain .formfields {
115 | font-size: 0.9em;
116 | }
117 |
118 | .maincontent .propmain .formfields .formaccordionwrap.ui-accordion {
119 | margin-bottom: 7px;
120 | }
121 |
122 | .maincontent .propmain .formfields .formaccordionwrap.ui-accordion h3.ui-accordion-header {
123 | margin-top: 7px;
124 | }
125 |
126 | .maincontent .propmain .formfields .formaccordionwrap.ui-accordion h3.ui-state-active {
127 | background: url("jquery_ui_themes/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png") repeat-x scroll 50% 50% #E6E6E6;
128 | }
129 |
130 | .maincontent .propmain .formfields .formaccordionwrap.ui-accordion .formaccordionitems.ui-accordion-content {
131 | padding: 0 14px;
132 | background: none;
133 | background-color: #FEFEFE;
134 | }
135 |
136 | .maincontent .propmain .formfields .formaccordionwrap.ui-accordion .formaccordionitems.ui-widget-content a {
137 | color: #035488;
138 | }
139 |
140 | .maincontent .propmain .formfields .formaccordionwrap.ui-accordion .formaccordionitems.ui-accordion-content .formitem {
141 | margin-top: 6px;
142 | border-top: 1px dotted #CCCCCC;
143 | padding-top: 6px;
144 | }
145 |
146 | .maincontent .propmain .formfields .formaccordionwrap.ui-accordion .formaccordionitems.ui-accordion-content .formitem.firstitem {
147 | border-top: 0;
148 | }
149 |
150 | .maincontent .propmain .formfields .formitem {
151 | margin: 0.9em 0 0.5em;
152 | }
153 |
154 | .maincontent .propmain .formfields .formitem .formitemtitle {
155 | font-weight: bold;
156 | margin-bottom: 2px;
157 | }
158 |
159 | .maincontent .propmain .formfields .formitem .staticwrap, .maincontent .propmain .formfields .formitem .static {
160 | margin-left: 7px;
161 | width: 95%;
162 | font-size: 0.95em;
163 | color: #333333;
164 | }
165 |
166 | .maincontent .propmain .formfields .formitem input.text {
167 | padding: 0.5em;
168 | width: 95%;
169 | border: 1px solid #BBBBBB;
170 | }
171 |
172 | .maincontent .propmain .formfields .formitem input.text:hover {
173 | border: 1px solid #888888;
174 | }
175 |
176 | .maincontent .propmain .formfields .formitem input.text:focus {
177 | border: 1px solid #888888;
178 | }
179 |
180 | .maincontent .propmain .formfields .formitem input.date {
181 | padding: 0.5em;
182 | max-width: 20em;
183 | width: 95%;
184 | border: 1px solid #BBBBBB;
185 | }
186 |
187 | .maincontent .propmain .formfields .formitem input.date:hover {
188 | border: 1px solid #888888;
189 | }
190 |
191 | .maincontent .propmain .formfields .formitem input.date:focus {
192 | border: 1px solid #888888;
193 | }
194 |
195 | .maincontent .propmain .formfields .formitem .textareawrap {
196 | width: 95%;
197 | }
198 |
199 | .maincontent .propmain .formfields .formitem textarea.text {
200 | padding: 0.3em;
201 | width: 100%;
202 | border: 1px solid #BBBBBB;
203 | }
204 |
205 | .maincontent .propmain .formfields .formitem textarea.text:hover {
206 | border: 1px solid #888888;
207 | }
208 |
209 | .maincontent .propmain .formfields .formitem textarea.text:focus {
210 | border: 1px solid #888888;
211 | }
212 |
213 | .maincontent .propmain .formfields .formitem input.checkbox {
214 | border: 1px solid #BBBBBB;
215 | }
216 |
217 | .maincontent .propmain .formfields .formitem select {
218 | padding: 0.3em;
219 | width: 95%;
220 | max-width: 750px;
221 | border: 1px solid #BBBBBB;
222 | }
223 |
224 | .maincontent .propmain .formfields .formitem select:hover {
225 | border: 1px solid #888888;
226 | }
227 |
228 | .maincontent .propmain .formfields .formitem select:focus {
229 | border: 1px solid #888888;
230 | }
231 |
232 | .maincontent .propmain .formfields .formitem table.viewtable td {
233 | vertical-align: top;
234 | }
235 |
236 | .maincontent .propmain .formfields .formitem table.viewtable td.datakey {
237 | padding-right: 2.0em;
238 | font-weight: bold;
239 | white-space: nowrap;
240 | }
241 |
242 | .maincontent .propmain .formfields .formitem .formitemdesc {
243 | margin-left: 7px;
244 | font-size: 0.9em;
245 | color: #333333;
246 | }
247 |
248 | .maincontent .propmain .formsubmit {
249 | margin: 15px auto;
250 | text-align: center;
251 | }
252 |
253 | .maincontent .propmain .formsubmit input.submit {
254 | color: #1F1F1F;
255 | font-size: 0.9em;
256 | font-weight: bold;
257 | padding: 0.2em 0.5em;
258 | }
259 |
260 | .maincontent .propmain hr {
261 | margin-top: 0.7em;
262 | border: none 0;
263 | border-top: 1px dashed #AAAAAA;
264 | height: 1px;
265 | }
266 |
267 | .maincontent .propmain .nontablewrap {
268 | border-left: 1px solid #CCCCCC;
269 | border-right: 1px solid #CCCCCC;
270 | border-bottom: 1px solid #CCCCCC;
271 | color: #333333;
272 | }
273 |
274 | .maincontent .propmain .nontable_row {
275 | background-color: #F5F5F5;
276 | border-top: 1px dashed #CCCCCC;
277 | padding: 0.5em;
278 | }
279 |
280 | .maincontent .propmain .nontable_row.firstrow {
281 | border-top: 1px solid #CCCCCC;
282 | }
283 |
284 | .maincontent .propmain .nontable_row.altrow {
285 | background-color: #FEFEFE;
286 | }
287 |
288 | .maincontent .propmain .nontable_th {
289 | margin-top: 0.4em;
290 | font-weight: bold;
291 | }
292 |
293 | .maincontent .propmain .nontable_th.firstcol {
294 | margin-top: 0;
295 | }
296 |
297 | .maincontent .propmain .nontable_td {
298 | margin-left: 7px;
299 | color: #444444;
300 | }
301 |
302 | .maincontent .propmain .mediawrap {
303 | float: right;
304 | margin-left: 2.0em;
305 | max-width: 45%;
306 | margin-bottom: 0.5em;
307 | }
308 |
309 | @media (max-width: 600px) {
310 | .maincontent .propmain .mediawrap {
311 | float: none;
312 | margin-left: 0;
313 | max-width: none;
314 | }
315 | }
316 |
317 | .maincontent .propmain .mediawrap .mediaitemtitle {
318 | font-weight: bold;
319 | margin-bottom: 0.3em;
320 | }
321 |
322 | .maincontent .propmain .mediawrap .mediaitem {
323 | max-width: 100%;
324 | }
325 |
326 | .maincontent .propmain .mediawrap .mediaitemdesc {
327 | font-size: 0.9em;
328 | color: #333333;
329 | }
330 |
331 | /* Optional menu navigation styles. */
332 | .menuwrap {
333 | }
334 |
335 | .menuwrap .menu {
336 | font-size: 0.7em;
337 | border: 1px solid #BBBBBB;
338 | background-color: #F5F5F5;
339 | margin-top: 7px;
340 | padding: 5px;
341 | }
342 |
343 | .menuwrap .menu .titlewrap {
344 | font-weight: bold;
345 | padding-bottom: 6px;
346 | }
347 |
348 | .menuwrap .menu a {
349 | display: block;
350 | border-top: 1px solid #CCCCCC;
351 | padding: 12px 15px;
352 | }
353 |
354 | .menuwrap .menu a:hover {
355 | background-color: #EAEAEA;
356 | text-decoration: none;
357 | }
358 |
359 | /* Floating navigation menu styles. */
360 | .maincontent .proptitle #navbutton {
361 | display: none;
362 | }
363 |
364 | .maincontent .proptitle #navdropdown {
365 | display: none;
366 | }
367 |
--------------------------------------------------------------------------------
/support/jquery.tablednd.min.js:
--------------------------------------------------------------------------------
1 | !function(t,e,a,n){var i="ontouchstart"in a.documentElement,r="touchstart mousedown",l="touchmove mousemove",o="touchend mouseup";i&&t.each("touchstart touchmove touchend".split(" "),function(e,a){try{t.event.fixHooks[a]=t.event.mouseHooks}catch(n){}}),t(a).ready(function(){function e(t){for(var e={},a=t.match(/([^;:]+)/g)||[];a.length;)e[a.shift()]=a.shift().trim();return e}t("table").each(function(){"dnd"==t(this).data("table")&&t(this).tableDnD({onDragStyle:t(this).data("ondragstyle")&&e(t(this).data("ondragstyle"))||null,onDropStyle:t(this).data("ondropstyle")&&e(t(this).data("ondropstyle"))||null,onDragClass:t(this).data("ondragclass")==n&&"tDnD_whileDrag"||t(this).data("ondragclass"),onDrop:t(this).data("ondrop")&&new Function("table","row",t(this).data("ondrop")),onDragStart:t(this).data("ondragstart")&&new Function("table","row",t(this).data("ondragstart")),onDragStop:t(this).data("ondragstop")&&new Function("table","row",t(this).data("ondragstop")),scrollAmount:t(this).data("scrollamount")||5,sensitivity:t(this).data("sensitivity")||10,hierarchyLevel:t(this).data("hierarchylevel")||0,indentArtifact:t(this).data("indentartifact")||'
',autoWidthAdjust:t(this).data("autowidthadjust")||!0,autoCleanRelations:t(this).data("autocleanrelations")||!0,jsonPretifySeparator:t(this).data("jsonpretifyseparator")||" ",serializeRegexp:t(this).data("serializeregexp")&&new RegExp(t(this).data("serializeregexp"))||/[^\-]*$/,serializeParamName:t(this).data("serializeparamname")||!1,dragHandle:t(this).data("draghandle")||null})})}),jQuery.tableDnD={currentTable:null,dragObject:null,mouseOffset:null,oldX:0,oldY:0,build:function(e){return this.each(function(){this.tableDnDConfig=t.extend({onDragStyle:null,onDropStyle:null,onDragClass:"tDnD_whileDrag",onDrop:null,onDragStart:null,onDragStop:null,scrollAmount:5,sensitivity:10,hierarchyLevel:0,indentArtifact:'
',autoWidthAdjust:!0,autoCleanRelations:!0,jsonPretifySeparator:" ",serializeRegexp:/[^\-]*$/,serializeParamName:!1,dragHandle:null},e||{}),t.tableDnD.makeDraggable(this),this.tableDnDConfig.hierarchyLevel&&t.tableDnD.makeIndented(this)}),this},makeIndented:function(e){var a,n,i=e.tableDnDConfig,r=e.rows,l=t(r).first().find("td:first")[0],o=0,s=0;if(t(e).hasClass("indtd"))return null;n=t(e).addClass("indtd").attr("style"),t(e).css({whiteSpace:"nowrap"});for(var d=0;dt.vertical&&this.dragObject.parentNode.insertBefore(this.dragObject,e.nextSibling)||00&&t(a).find("td:first").children(":first").remove()&&t(a).data("level",--n),void(0>e.horizontal&&n=n&&t(a).children(":first").prepend(i.indentArtifact)&&t(a).data("level",++n))):null},mousemove:function(e){var a,n,i,r,l,o=t(t.tableDnD.dragObject),s=t.tableDnD.currentTable.tableDnDConfig;return e&&e.preventDefault(),t.tableDnD.dragObject?("touchmove"==e.type&&event.preventDefault(),s.onDragClass&&o.addClass(s.onDragClass)||o.css(s.onDragStyle),n=t.tableDnD.mouseCoords(e),r=n.x-t.tableDnD.mouseOffset.x,l=n.y-t.tableDnD.mouseOffset.y,t.tableDnD.autoScroll(n),a=t.tableDnD.findDropTargetRow(o,l),i=t.tableDnD.findDragDirection(r,l),t.tableDnD.moveVerticle(i,a),t.tableDnD.moveHorizontal(i,a),!1):!1},findDragDirection:function(t,e){var a=this.currentTable.tableDnDConfig.sensitivity,n=this.oldX,i=this.oldY,r=n-a,l=n+a,o=i-a,s=i+a,d={horizontal:t>=r&&l>=t?0:t>n?-1:1,vertical:e>=o&&s>=e?0:e>i?-1:1};return 0!=d.horizontal&&(this.oldX=t),0!=d.vertical&&(this.oldY=e),d},findDropTargetRow:function(e,a){for(var n=0,i=this.currentTable.rows,r=this.currentTable.tableDnDConfig,l=0,o=null,s=0;sl-n&&l+n>a)return e.is(o)||r.onAllowDrop&&!r.onAllowDrop(e,o)||t(o).hasClass("nodrop")?null:o;return null},processMouseup:function(){if(!this.currentTable||!this.dragObject)return null;var e=this.currentTable.tableDnDConfig,n=this.dragObject,i=0,r=0;t(a).unbind(l,this.mousemove).unbind(o,this.mouseup),e.hierarchyLevel&&e.autoCleanRelations&&t(this.currentTable.rows).first().find("td:first").children().each(function(){r=t(this).parents("tr:first").data("level"),r&&t(this).parents("tr:first").data("level",--r)&&t(this).remove()})&&e.hierarchyLevel>1&&t(this.currentTable.rows).each(function(){if(r=t(this).data("level"),r>1)for(i=t(this).prev().data("level");r>i+1;)t(this).find("td:first").children(":first").remove(),t(this).data("level",--r)}),e.onDragClass&&t(n).removeClass(e.onDragClass)||t(n).css(e.onDropStyle),this.dragObject=null,e.onDrop&&this.originalOrder!=this.currentOrder()&&t(n).hide().fadeIn("fast")&&e.onDrop(this.currentTable,n),e.onDragStop&&e.onDragStop(this.currentTable,n),this.currentTable=null},mouseup:function(e){return e&&e.preventDefault(),t.tableDnD.processMouseup(),!1},jsonize:function(t){var e=this.currentTable;return t?JSON.stringify(this.tableData(e),null,e.tableDnDConfig.jsonPretifySeparator):JSON.stringify(this.tableData(e))},serialize:function(){return t.param(this.tableData(this.currentTable))},serializeTable:function(t){for(var e="",a=t.tableDnDConfig.serializeParamName||t.id,n=t.rows,i=0;i0&&(e+="&");var r=n[i].id;r&&t.tableDnDConfig&&t.tableDnDConfig.serializeRegexp&&(r=r.match(t.tableDnDConfig.serializeRegexp)[0],e+=a+"[]="+r)}return e},serializeTables:function(){var e=[];return t("table").each(function(){this.id&&e.push(t.param(this.tableData(this)))}),e.join("&")},tableData:function(e){var a,n,i,r,l=e.tableDnDConfig,o=[],s=0,d=0,h=null,u={};if(e||(e=this.currentTable),!(e&&e.id&&e.rows&&e.rows.length))return{error:{code:500,message:"Not a valid table, no serializable unique id provided."}};r=l.autoCleanRelations&&e.rows||t.makeArray(e.rows),n=l.serializeParamName||e.id,i=n,a=function(t){return t&&l&&l.serializeRegexp?t.match(l.serializeRegexp)[0]:t},u[i]=[],!l.autoCleanRelations&&t(r[0]).data("level")&&r.unshift({id:"undefined"});for(var c=0;cs)o.push([i,s]),i=a(r[c-1].id);else if(s>d)for(var f=0;f=s&&(o[f][1]=0);s=d,t.isArray(u[i])||(u[i]=[]),h=a(r[c].id),h&&u[i].push(h)}else h=a(r[c].id),h&&u[i].push(h);return u}},jQuery.fn.extend({tableDnD:t.tableDnD.build,tableDnDUpdate:t.tableDnD.updateTables,tableDnDSerialize:t.proxy(t.tableDnD.serialize,t.tableDnD),tableDnDSerializeAll:t.tableDnD.serializeTables,tableDnDData:t.proxy(t.tableDnD.tableData,t.tableDnD)})}(jQuery,window,window.document);
--------------------------------------------------------------------------------
/support/jquery.tablebodyscroll.js:
--------------------------------------------------------------------------------
1 | // jQuery plugin to scroll the body of long tables so the table fits on a single screen.
2 | // (C) 2017 CubicleSoft. All Rights Reserved.
3 |
4 | (function($) {
5 | var debounce = function(func, wait) {
6 | var timeout = null;
7 |
8 | return function() {
9 | var context = this, args = arguments;
10 | var later = function() {
11 | timeout = null;
12 |
13 | func.apply(context, args);
14 | };
15 |
16 | if (timeout) clearTimeout(timeout);
17 | timeout = setTimeout(later, wait);
18 | };
19 | };
20 |
21 | var debounce2 = function(func, wait, wait2) {
22 | var timeout = null, timeout2 = null;
23 |
24 | return function() {
25 | var context = this, args = arguments;
26 | var later = function() {
27 | clearTimeout(timeout);
28 | timeout = null;
29 |
30 | clearTimeout(timeout2);
31 | timeout2 = null;
32 |
33 | func.apply(context, args);
34 | };
35 |
36 | if (timeout) clearTimeout(timeout);
37 | timeout = setTimeout(later, wait);
38 |
39 | if (!timeout2) timeout2 = setTimeout(later, wait2);
40 | };
41 | };
42 |
43 | $.fn.TableBodyScroll = function(options) {
44 | this.each(function() {
45 | var $this = $(this);
46 |
47 | if ($this.parent().hasClass('tablebodyscroll-scroller3'))
48 | {
49 | var scroller3 = $this.parent();
50 | var scroller2 = scroller3.parent();
51 | var scroller = scroller2.parent();
52 | var wrapper = scroller.parent();
53 | var origparent = wrapper.parent();
54 |
55 | // Remove event handlers.
56 | scroller2.off('scroll.tablebodyscroll');
57 | scroller2.off('mousemove.tablebodyscroll');
58 | scroller2.off('keypress.tablebodyscroll');
59 | $this.off('tablebodyscroll:resize');
60 | $this.off('tablebodyscroll:columnschanged');
61 |
62 | // Move the table back to its original parent in the DOM.
63 | wrapper.insertBefore($this);
64 | wrapper.remove();
65 |
66 | // Clean up modified header/footer cells.
67 | $this.children('thead, tfoot').children('tr').children('th, td').each(function() {
68 | if ($(this).hasClass('tablebodyscroll-body-hide-cell'))
69 | {
70 | $(this).removeClass('tablebodyscroll-body-hide-cell');
71 |
72 | var div = $(this).children('.tablebodyscroll-body-hide-cell');
73 | div.insertBefore(div.contents()).remove();
74 | }
75 | });
76 | }
77 | });
78 |
79 | if (typeof(options) === 'string' && options === 'destroy') return this;
80 |
81 | var settings = $.extend({}, $.fn.TableBodyScroll.defaults, options);
82 |
83 | return this.each(function() {
84 | var $this = $(this);
85 |
86 | // Wrap the table.
87 | var origparent = $this.parent();
88 | var scrollerindicator = $('').addClass('tablebodyscroll-scroller-indicator').addClass('tablebodyscroll-scroller-indicator-hide');
89 | var scrollershadowtop = $('').addClass('tablebodyscroll-scroller-shadow-top');
90 | var scrollershadowbottom = $('').addClass('tablebodyscroll-scroller-shadow-bottom');
91 | var scroller3 = $('').addClass('tablebodyscroll-scroller3').insertBefore($this).append($this);
92 | var scroller2 = $('').addClass('tablebodyscroll-scroller2').insertBefore(scroller3).append(scroller3);
93 | var scroller = $('').addClass('tablebodyscroll-scroller').insertBefore(scroller2).append(scroller2).append(scrollerindicator).append(scrollershadowtop).append(scrollershadowbottom);
94 | var wrapper = $('').addClass('tablebodyscroll').insertBefore(scroller).append(scroller);
95 |
96 | // Generate header and footer tables.
97 | // Cloning has several mostly minor unresolveable issues but there is no other way to accurately make just the body of the table scroll.
98 | var origtheads = null;
99 | var newheadtable = null, newtheadcells = null, origtheadcells = null;
100 |
101 | var origtfoots = null;
102 | var newfoottable = null, newtfootcells = null, origtfootcells = null;
103 |
104 | var CloneHeadFoot = function() {
105 | origtheads = $this.children('thead');
106 | origtheadcells = origtheads.children('tr').children('th, td');
107 | if (origtheads.length)
108 | {
109 | origtheadcells.each(function() {
110 | if (!$(this).hasClass('tablebodyscroll-body-hide-cell'))
111 | {
112 | $(this).addClass('tablebodyscroll-body-hide-cell').append($('').append($(this).contents()));
113 | }
114 | });
115 |
116 | if (newheadtable) newheadtable.remove();
117 | var newtheads = origtheads.clone(true, true);
118 | newtheads.find('id').removeAttr('id');
119 | newheadtable = $('').attr('class', $this.attr('class')).addClass('tablebodyscroll-head').insertBefore(scroller).append(newtheads);
120 | wrapper.addClass('tablebodyscroll-has-head');
121 | newtheadcells = newtheads.children('tr').children('th, td');
122 | }
123 | else
124 | {
125 | wrapper.removeClass('tablebodyscroll-has-head');
126 | }
127 |
128 | origtfoots = $this.children('tfoot');
129 | origtfootcells = origtfoots.children('tr').children('th, td');
130 | if (origtfoots.length)
131 | {
132 | origtfootcells.each(function() {
133 | if (!$(this).hasClass('tablebodyscroll-body-hide-cell'))
134 | {
135 | $(this).addClass('tablebodyscroll-body-hide-cell').append($('').append($(this).contents()));
136 | }
137 | });
138 |
139 | if (newfoottable) newfoottable.remove();
140 | var newtfoots = origtfoots.clone(true, true);
141 | newtfoots.find('id').removeAttr('id');
142 | newfoottable = $('').attr('class', $this.attr('class')).addClass('tablebodyscroll-foot').insertAfter(scroller).append(newtfoots);
143 | wrapper.addClass('tablebodyscroll-has-foot');
144 | newtfootcells = newtfoots.children('tr').children('th, td');
145 | }
146 | else
147 | {
148 | wrapper.removeClass('tablebodyscroll-has-foot');
149 | }
150 | };
151 |
152 | var scrollbarheight = 17;
153 |
154 | var HandleScroll = function() {
155 | var tempheight = $this.outerHeight();
156 | if (tempheight < 1) return;
157 |
158 | // Calculate new shadow.
159 | var currshadow = scroller.attr('data-tablebodyscroll-shadow') || 'shadow-none';
160 | var currpos = scroller2.scrollTop();
161 | var scrollerheight = scroller2.height();
162 |
163 | var newshadow;
164 | if (currpos > 1 && currpos + scrollerheight - scrollbarheight < tempheight - 1) newshadow = 'shadow-both';
165 | else if (currpos > 1) newshadow = 'shadow-top';
166 | else if (currpos + scrollerheight - scrollbarheight < tempheight - 1) newshadow = 'shadow-bottom';
167 | else newshadow = 'shadow-none';
168 |
169 | //console.log('currshadow = ' + currshadow + ', newshadow = ' + newshadow + ', currpos = ' + currpos + ', scrollerheight = ' + scrollerheight + ', scrollbarheight = ' + scrollbarheight + ', total = ' + (currpos + scrollerheight - scrollbarheight) + ', table height = ' + tempheight);
170 |
171 | if (currshadow !== newshadow) scroller.removeClass('tablebodyscroll-' + currshadow).addClass('tablebodyscroll-' + newshadow).attr('data-tablebodyscroll-shadow', newshadow);
172 |
173 | // Adjust scroll indicator.
174 | var child = scrollerindicator.get(0);
175 |
176 | child.style.top = ((currpos / (tempheight - scrollerheight + scrollbarheight)) * (scrollerheight - scrollbarheight - scrollerindicator.height())) + 'px';
177 | }
178 |
179 | var lastparentwidth = 0, lasttablewidth = 0;
180 |
181 | var HandleResize = function() {
182 | var currpos = scroller2.scrollTop();
183 | var tempheight = $this.outerHeight();
184 |
185 | var maxheight = (settings.heightunit == '%' ? Math.floor($(settings.percentelem).height() * settings.height / 100) + 'px' : settings.height + settings.heightunit);
186 | scroller.css('height', maxheight);
187 | maxheight = scroller.height();
188 |
189 | if (maxheight > tempheight) scroller.height(tempheight);
190 |
191 | // Move the table back to its original parent in the DOM, measure the width, and move it back.
192 | origparent.append($this);
193 | var tempwidth = $this.outerWidth();
194 | scroller3.append($this);
195 |
196 | // Set the width of the scroller to the width of the table so that the inset shadows show properly and horizontal scrolling is correct.
197 | scroller.width(tempwidth);
198 | var origparentwidth = origparent.width();
199 | var newparentwidth = (origparentwidth < tempwidth ? origparentwidth : tempwidth);
200 | scroller3.width(newparentwidth);
201 |
202 | //console.log('table height = ' + tempheight + ', max height = ' + maxheight + ', width = ' + tempwidth + ', origparentwidth = ' + origparentwidth);
203 |
204 | // Notify listeners.
205 | if (lastparentwidth != newparentwidth || lasttablewidth != tempwidth)
206 | {
207 | lastparentwidth = newparentwidth;
208 | lasttablewidth = tempwidth;
209 |
210 | setTimeout(function() { $this.trigger('tablebodyscroll:sizechanged'); }, 0);
211 | }
212 |
213 | // Resize thead and tfoot elements.
214 | if (origtheads.length)
215 | {
216 | for (var x = 0; x < origtheadcells.length; x++)
217 | {
218 | var origcell = origtheadcells.get(x);
219 | var newcell = newtheadcells.get(x);
220 |
221 | if (origcell && newcell)
222 | {
223 | var tempwidth2;
224 |
225 | // Deals with Google Chrome(!) + jQuery off-by-one errors.
226 | if (origcell.currentStyle) tempwidth2 = origcell.currentStyle.margin;
227 | else if (window.getComputedStyle) tempwidth2 = window.getComputedStyle(origcell, null).getPropertyValue('width');
228 | else tempwidth2 = $(origcell).width();
229 |
230 | $(newcell).css({ 'min-width': tempwidth2 });
231 | }
232 | }
233 | }
234 |
235 | if (origtfoots.length)
236 | {
237 | for (var x = 0; x < origtfootcells.length; x++)
238 | {
239 | var origcell = origtfootcells.get(x);
240 | var newcell = newtfootcells.get(x);
241 |
242 | if (origcell && newcell)
243 | {
244 | var tempwidth2;
245 |
246 | // Deals with Google Chrome(!) + jQuery off-by-one errors.
247 | if (window.getComputedStyle) tempwidth2 = window.getComputedStyle(origcell, null).getPropertyValue('width');
248 | else if (origcell.currentStyle) tempwidth2 = origcell.currentStyle.margin;
249 | else tempwidth2 = $(origcell).width();
250 |
251 | $(newcell).css({ 'min-width': tempwidth2 });
252 | }
253 | }
254 | }
255 |
256 | // Adjust scroller offsets.
257 | var parent = scroller.get(0);
258 | var child = scroller2.get(0);
259 | scrollbarheight = (child.offsetHeight - child.clientHeight);
260 | child.style.bottom = -scrollbarheight + "px";
261 |
262 | var dir = (window.getComputedStyle ? window.getComputedStyle(parent, null).getPropertyValue('direction') : parent.currentStyle.direction);
263 |
264 | if (dir == 'ltr') child.style.right = -(child.offsetWidth - child.clientWidth) + "px";
265 | else
266 | {
267 | child.style.left = -(child.offsetWidth - child.clientWidth) + "px";
268 | child.style.right = '0px';
269 | }
270 |
271 | // Update the scroller's shadows.
272 | scroller2.scrollTop(currpos);
273 | HandleScroll();
274 | };
275 |
276 | CloneHeadFoot();
277 |
278 | var showingindicator = false;
279 |
280 | var DelayHideIndicator = debounce(function() {
281 | scrollerindicator.addClass('tablebodyscroll-scroller-indicator-hide');
282 | scrollerindicator.removeClass('tablebodyscroll-scroller-indicator-show');
283 |
284 | showingindicator = false;
285 | }, 1500);
286 |
287 | var ShowIndicator = function() {
288 | if (!showingindicator)
289 | {
290 | var currshadow = scroller.attr('data-tablebodyscroll-shadow') || 'shadow-none';
291 |
292 | if (currshadow !== 'shadow-none')
293 | {
294 | scrollerindicator.addClass('tablebodyscroll-scroller-indicator-show');
295 | scrollerindicator.removeClass('tablebodyscroll-scroller-indicator-hide');
296 |
297 | showingindicator = true;
298 | }
299 | }
300 |
301 | if (showingindicator) DelayHideIndicator();
302 | };
303 |
304 | scroller2.on('scroll.tablebodyscroll', debounce2(function() {
305 | HandleScroll();
306 |
307 | ShowIndicator();
308 | }, 20, 50));
309 |
310 | scroller2.on('mousemove.tablebodyscroll', debounce2(function() {
311 | ShowIndicator();
312 | }, 20, 50));
313 |
314 | scroller2.on('keypress.tablebodyscroll', debounce2(function() {
315 | ShowIndicator();
316 | }, 20, 50));
317 |
318 | $this.on('tablebodyscroll:resize', debounce2(function() {
319 | HandleResize();
320 | }, 20, 100));
321 |
322 | setTimeout(HandleResize, 0);
323 |
324 | $this.on('tablebodyscroll:columnschanged', function() {
325 | // Rebuild header and footer tables and resize.
326 | CloneHeadFoot();
327 |
328 | HandleResize();
329 | });
330 |
331 | if (settings.postinit) settings.postinit(this, settings);
332 | });
333 | }
334 |
335 | $.fn.TableBodyScroll.defaults = {
336 | 'height' : 60,
337 | 'heightunit' : '%',
338 | 'percentelem' : window,
339 | 'postinit' : null
340 | };
341 | }(jQuery));
342 |
--------------------------------------------------------------------------------
/support/admin.css:
--------------------------------------------------------------------------------
1 | html, body { height: 100%; margin: 0px; padding: 0px; overflow: hidden; background-color: #FFFFFF; }
2 | body { font-family: Verdana, Arial, Helvetica, sans-serif; position: relative; color: #222222; }
3 |
4 | #contentwrap { height: 100%; overflow: auto; outline: none; }
5 | #contentwrap .proptitlewrap { background-color: #222222; color: #FAFAFA; padding: 0.85em; box-shadow: 0px 3px 3px 0px rgba(0,0,0,0.15); }
6 | #contentwrap .proptitle { max-width: 800px; margin-left: auto; margin-right: auto; font-weight: bold; font-size: 1.3em; }
7 | #contentwrap #navbutton { vertical-align: middle; display: none; padding: 0.23em 0; border: 1px solid #CCCCCC; border-radius: 5px; cursor: pointer; }
8 | #contentwrap #navbutton .navbuttonline { display: block; margin: 0.23em 0.4em; width: 1.0em; height: 2px; background-color: #FAFAFA; border-radius: 2px; }
9 | #contentwrap #navbutton:hover { color: #FFFFFF; border: 1px solid #E0E0E0; background-color: #2A2A2A; }
10 | #contentwrap #navbutton:hover .navbuttonline { background-color: #FFFFFF; }
11 |
12 | #contentwrap .propmessagewrap { border-top: 1px solid transparent; border-bottom: 1px solid transparent; padding: 0.5em 1.0em; box-shadow: 0px 3px 3px 0px rgba(0,0,0,0.15); }
13 | #contentwrap .propmessage { max-width: 800px; margin-left: auto; margin-right: auto; }
14 | #contentwrap .propmessagesuccess { border-color: #B2DBA1; background-color: #DFF0D8; background-repeat: repeat-x; color: #3C763D; }
15 | #contentwrap .propmessageerror { border-color: #DCA7A7; background-color: #F2DEDE; background-repeat: repeat-x; color: #A94442; }
16 | #contentwrap .propmessageinfo { border-color: #9ACFEA; background-color: #D9EDF7; background-repeat: repeat-x; color: #31708F; }
17 |
18 | #contentwrap .propdescwrap { padding: 1.0em 1.0em 0; }
19 | #contentwrap .propdesc { max-width: 800px; margin-left: auto; margin-right: auto; }
20 | #contentwrap .propmainwrap { padding: 1.0em; }
21 | #contentwrap .propmain { max-width: 800px; margin-left: auto; margin-right: auto; }
22 |
23 | #menuwrap { float: left; width: 250px; min-width: 200px; max-width: 15%; height: 100%; overflow: auto; border-right: 1px solid #CCCCCC; font-size: 0.9em; background-color: #222222; color: #FAFAFA; display: flex; flex-direction: column; }
24 | #menuwrap .logo { text-align: center; user-select: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; cursor: default; }
25 | #menuwrap .logo:last-child { flex-grow: 1; display: flex; }
26 | #menuwrap .logo > * { display: inline-block; margin: auto auto 0 auto; padding-top: 1.0em; border-right: 1px solid transparent; }
27 | #menuwrap .logo img { max-width: 100%; display: inline-block; }
28 | #menuwrap .logo + .menu { margin-top: 0; }
29 | #menuwrap .menu { margin-top: 1.0em; border-top: 1px solid #444444; padding-top: 1.2em; }
30 | #menuwrap .menu:first-child { margin-top: 0; border-top: 0 none; padding-top: 1.0em; }
31 | #menuwrap .menu .titlewrap { margin: 0 1.0em 0.85em; }
32 | #menuwrap .menu .title { font-size: 1.2em; font-weight: bold; padding-bottom: 0.2em; border-bottom: 2px solid #888888; }
33 | #menuwrap .menu a { display: block; padding: 0.5em 1.0em; color: #FAFAFA; text-decoration: none; }
34 | #menuwrap .menu a:hover { background-color: #444444; color :#FFFFFF; }
35 |
36 | #contentwrap.showmenu { white-space: nowrap; }
37 | #contentwrap.showmenu #navbutton { display: table-cell; }
38 | #contentwrap.showmenu .proptitletext { padding-left: 1.0em; }
39 | #contentwrap #navoverflowwrap { display: none; }
40 | #contentwrap.showmenu { overflow: hidden; }
41 | #contentwrap.showmenu #navoverflowwrap { display: block; position: absolute; width: 100%; height: 100%; z-index: 10000; cursor: pointer; background-color: #000000; opacity: 0.25; }
42 |
43 | #contentwrap:not(.nomenu) .proptitle { max-width: none; margin-left: 0; margin-right: 0; display: table-row; }
44 | #contentwrap:not(.nomenu) .proptitletext { display: table-cell; vertical-align: middle; }
45 | #contentwrap:not(.nomenu) .propmessage, #contentwrap:not(.nomenu) .propdesc, #contentwrap:not(.nomenu) .propmain { max-width: none; margin-left: 0; margin-right: 0; }
46 |
47 | @media (max-width: 1000px) {
48 | #menuwrap { display: none; }
49 | #menuwrap.showmenu { display: flex; }
50 | #contentwrap:not(.nomenu) #navbutton { display: table-cell; }
51 | #contentwrap:not(.nomenu) .proptitletext { padding-left: 1.0em; }
52 | }
53 |
54 | a { color: #4E88C2; text-decoration: none; }
55 | a:hover { color: #297ACC; text-decoration: underline; }
56 |
57 | .formitem { margin-top: 1.0em; }
58 | .formitem:first-child { margin-top: 0; }
59 |
60 | .formitemtitle { margin-bottom: 0.2em; font-weight: bold; }
61 |
62 | .formitemdata { position: relative; }
63 |
64 | .formitemdata table.formitemtable { border-collapse: collapse; }
65 | .formitemdata table.formitemtable > thead > tr > th, .formitemdata table.formitemtable > tbody > tr > td { padding: 0.3em 0.5em; border-left: 1px solid #CCCCCC; border-right: 1px solid #CCCCCC; vertical-align: top; }
66 | .formitemdata table.formitemtable > thead > tr > th { background-color: #222222; color: #FAFAFA; font-weight: normal; }
67 | .formitemdata table.formitemtable > thead > tr > th:first-child { border-left: 1px solid #222222; }
68 | .formitemdata table.formitemtable > thead > tr > th:last-child { border-right: 1px solid #222222; }
69 | .formitemdata table.formitemtable > tbody > tr:first-child > td { border-top: none; }
70 | .formitemdata table.formitemtable > tbody > tr:nth-child(even) { background-color: #F6F6F6; }
71 | .formitemdata table.formitemtable > tbody > tr:last-child { border-bottom: 1px solid #CCCCCC; }
72 | .formitemdata table.formitemtable > tbody > tr > td.nowrap { white-space: nowrap; }
73 |
74 | .formitemdata .textitemwrap > input { outline: none; }
75 | .formitemdata .textitemwrap > input.text { box-sizing: border-box; width: 100%; font-size: 0.9em; padding: 0.3em; border: 1px solid #BBBBBB; }
76 | .formitemdata .textitemwrap > input.text:focus, .formitemdata .textitemwrap > input.text:hover { border: 1px solid #888888; }
77 |
78 | .formitemdata .textareawrap > textarea { box-sizing: border-box; width: 100%; font-size: 0.9em; padding: 0.3em; border: 1px solid #BBBBBB; outline: none; }
79 | .formitemdata .textareawrap > textarea:focus, .formitemdata .textareawrap > textarea:hover { border: 1px solid #888888; }
80 |
81 | .formitemdata .selectitemwrap > select { box-sizing: border-box; width: 100%; font-size: 0.9em; padding: 0.3em; border: 1px solid #BBBBBB; outline: none; }
82 | .formitemdata .selectitemwrap > select:focus, .formitemdata .selectitemwrap > select:hover { border: 1px solid #888888; }
83 |
84 | .formitemdata .radioitemwrap, .formitemdata .checkboxitemwrap { margin-left: 1.7em; text-indent: -1.7em; }
85 |
86 | .formitemdata .staticwrap { font-size: 0.9em; }
87 |
88 | .fieldtablewrap { margin-top: 1.0em; }
89 | .fieldtablewrap > table.rowwrap { border-collapse: collapse; width: 100%; }
90 | .fieldtablewrap > table.rowwrap > tbody > tr > td { padding: 1.0em 1.0em 0 0; vertical-align: top; }
91 | .fieldtablewrap > table.rowwrap > tbody > tr:first-child > td { padding-top: 0; }
92 | .formfieldsresponsive .fieldtablewrap > table.rowwrap > tbody > tr > td:nth-last-child(2) { padding-right: 0; }
93 | .fieldtablewrap > table.rowwrap > tbody > tr > td:last-child { padding-right: 0; }
94 | .fieldtablewrap .formitemtitle { white-space: nowrap; }
95 |
96 | hr { margin: 1.0em 0 0 0; border: none; border-top: 1px solid #CCCCCC; }
97 |
98 | .formitemdesc { color: #333333; margin-top: 0.1em; margin-left: 0.5em; font-size: 0.9em; }
99 |
100 | .formitemresult { margin-left: 0.5em; font-size: 0.9em; }
101 | .formitemresult .formitemerror { background: url('flex_forms_error.png') 0 0.1em no-repeat; padding-left: 25px; color: #A94442; font-weight: bold; }
102 |
103 | form.ff_form .formsubmit { margin-top: 1.2em; margin-right: 1.0em; }
104 | form.ff_form .formsubmit input { margin-right: 1.0em; padding: 0.3em 1.0em; font-weight: bold; font-size: 1.0em; background-color: #222222; color: #FAFAFA; border: 1px solid #222222; }
105 | form.ff_form .formsubmit input:hover { background-color: #444444; color :#FFFFFF; }
106 |
107 | @media (max-width: 420px) {
108 | .fieldtablewrap { margin-top: 0; }
109 | .fieldtablewrap > table.rowwrap { display: block; }
110 | .fieldtablewrap > table.rowwrap > tbody { display: block; }
111 | .fieldtablewrap > table.rowwrap > tbody > tr { display: block; }
112 | .fieldtablewrap > table.rowwrap > tbody > tr > td { display: block; padding: 0; margin-top: 1.0em; max-width: 100%; }
113 | .formfieldsresponsive .fieldtablewrap > table.rowwrap > tbody > tr > td:last-child { display: none; }
114 | }
115 |
116 |
117 | /* FlexForms Extras styles for Admin Pack */
118 |
119 | .formaccordionwrap.ui-accordion h3.ui-accordion-header { margin-top: 1.0em; border: 1px solid #CCCCCC; background: #F6F6F6; font-weight: bold; color: #222222; }
120 | .formaccordionwrap.ui-accordion:first-child h3.ui-accordion-header:first-child { margin-top: 0; }
121 | .formaccordionwrap.ui-accordion h3.ui-accordion-header.ui-state-hover { border: 1px solid #C5C5C5; background: #F0F0F0; font-weight: bold; color: #222222; }
122 | .formaccordionwrap.ui-accordion h3.ui-accordion-header .ui-icon { background-image: url("jquery_ui_themes/adminpack/images/ui-icons_333333_256x240.png"); }
123 | .formaccordionwrap.ui-accordion h3.ui-accordion-header.ui-state-active { border: 1px solid #444444; background: #222222; font-weight: bold; color: #ffffff; }
124 | .formaccordionwrap.ui-accordion h3.ui-accordion-header.ui-state-active .ui-icon { background-image: url("jquery_ui_themes/adminpack/images/ui-icons_fafafa_256x240.png"); }
125 | .formaccordionwrap.ui-accordion h3.ui-accordion-header.ui-state-active.ui-state-hover { border: 1px solid #444444; background: #333333; font-weight: bold; color: #ffffff; }
126 |
127 | .formaccordionwrap.ui-accordion .ui-helper-reset { line-height: normal; }
128 | .formaccordionwrap.ui-accordion .formaccordionitems.ui-widget-content a { color: #4E88C2; text-decoration: none; }
129 | .formaccordionwrap.ui-accordion .formaccordionitems.ui-widget-content a:hover { color: #297ACC; text-decoration: underline; }
130 | .formaccordionwrap.ui-accordion .formaccordionitems.ui-accordion-content { padding: 0 1.5em 1.0em; }
131 | .formaccordionwrap.ui-accordion .formaccordionitems.ui-accordion-content > .formitem:first-child { margin-top: 1.0em; }
132 |
133 | .formitemdata input.date { box-sizing: border-box; width: 100%; font-size: 0.9em; padding: 0.3em; border: 1px solid #BBBBBB; }
134 | .formitemdata input.date:focus, .formitemdata input.date:hover { border: 1px solid #888888; }
135 |
136 | .ui-state-default.ui-state-highlight, .ui-widget-content .ui-state-default.ui-state-highlight { border: 1px solid #c5c5c5; background: #f6f6f6; color: #454545; }
137 | .ui-state-active.ui-state-highlight, .ui-widget-content .ui-state-active.ui-state-highlight { border: 1px solid #444444; background: #222222; color: #ffffff; }
138 | .ui-state-hover.ui-state-highlight, .ui-widget-content .ui-state-hover.ui-state-highlight { border: 1px solid #444444; background: #333333; color: #ffffff; }
139 |
140 | .formitemdata .uix-multiselect .ui-widget-header div.header-text { white-space: normal; }
141 | .formitemdata .uix-multiselect .ui-widget-header { padding-top: 0.3em; padding-bottom: 0.3em; }
142 | .formitemdata .uix-multiselect .ui-widget-header .uix-control-right { padding-top: 0.8em; }
143 |
144 | .formitemdata .ui-multiselect { padding: 0.3em; }
145 | .formitemdata .ui-multiselect.ui-widget.ui-state-default { border: 1px solid #444444; background: #333333; color: #ffffff; }
146 | .formitemdata .ui-multiselect.ui-widget.ui-state-default span.ui-icon { background-image: url("jquery_ui_themes/adminpack/images/ui-icons_ffffff_256x240.png"); }
147 | .formitemdata .ui-multiselect.ui-widget.ui-state-active { border: 1px solid #444444; background: #222222; color: #ffffff; }
148 | .formitemdata .ui-multiselect.ui-widget.ui-state-hover { border: 1px solid #444444; background: #222222; color: #ffffff; }
149 | .formitemdata .ui-multiselect span.ui-icon { margin-top: 0.2em; }
150 |
151 | .formitemdata .select2-container { display: block; }
152 | .formitemdata .select2-container-multi .select2-choices .select2-search-choice { line-height: 17px; }
153 | .formitemdata .select2-search-choice-close { top: 5px; }
154 | .select2-results .select2-highlighted { background-color: #444444 !important; }
155 |
156 | .formitemdata .draghandle { cursor: move; }
157 | .formitemdata .dragactive { background-color: #E3E3E3; }
158 |
159 | .formitemdata table.tablecards > thead > th:nth-last-child(2) { border-right: 1px solid #222222; }
160 | .formitemdata table.tablecards.tablecard-show > thead > th:nth-last-child(2) { border-right: 1px solid #CCCCCC; }
161 | .formitemdata table.tablecard-show { width: 100%; }
162 | .formitemdata table.tablecard-show-nohead > tbody > tr:first-child > td { border-top: 1px solid #CCCCCC; }
163 |
164 | .formitemdata .tablebodyscroll-scroller3 > table.tablecard-show-nohead > thead > tr { display: none; }
165 |
166 | .formitemdata .tablebodyscroll-shadow-top .tablebodyscroll-scroller-shadow-top, .formitemdata .tablebodyscroll-shadow-both .tablebodyscroll-scroller-shadow-top { border-top: 1px solid #CCCCCC; }
167 |
168 |
169 | /* FlexForms Modules styles for Admin Pack */
170 |
171 | .formitemdata table.tablecard-show .calendar_day_of_week { margin-top: 0.5em; border-top: 1px solid #E0E0E0; padding-top: 0.5em; font-weight: bold; }
172 | .formitemdata table.tablecard-show .calendar_day_of_week:first-child { margin-top: 0; border-top: none; padding-top: 0; }
173 |
174 | .formitemdata .tablefiltersearchwrap { margin-bottom: 0.5em; }
175 | .formitemdata table.ff_tablefilter > tbody > tr.visible { background-color: #FFFFFF; }
176 | .formitemdata table.ff_tablefilter > tbody > tr.visible.altrow { background-color: #F6F6F6; }
177 | .formitemdata table.ff_tablefilter > tbody > tr.visible.lastrow { border-bottom: 1px solid #CCCCCC; }
178 |
--------------------------------------------------------------------------------
/support/multiselect-widget/jquery.multiselect.min.js:
--------------------------------------------------------------------------------
1 | /* jshint forin:true, noarg:true, noempty:true, eqeqeq:true, boss:true, undef:true, curly:true, browser:true, jquery:true */
2 | /*
3 | * jQuery MultiSelect UI Widget 2.0.0
4 | * Copyright (c) 2012 Eric Hynds
5 | *
6 | * http://www.erichynds.com/jquery/jquery-ui-multiselect-widget/
7 | *
8 | * Depends:
9 | * - jQuery 1.4.2+
10 | * - jQuery UI 1.8 widget factory
11 | *
12 | * Optional:
13 | * - jQuery UI effects
14 | * - jQuery UI position utility
15 | *
16 | * Dual licensed under the MIT and GPL licenses:
17 | * http://www.opensource.org/licenses/mit-license.php
18 | * http://www.gnu.org/licenses/gpl.html
19 | *
20 | */
21 | (function($,undefined){var multiselectID=0;var $doc=$(document);$.widget("ech.multiselect",{options:{header:true,height:175,minWidth:225,classes:"",checkAllText:"Check all",uncheckAllText:"Uncheck all",noneSelectedText:"Select options",showCheckAll:true,showUncheckAll:true,selectedText:"# selected",selectedList:0,closeIcon:"ui-icon-circle-close",show:null,hide:null,autoOpen:false,multiple:true,position:{},appendTo:null,menuWidth:null,selectedListSeparator:", ",disableInputsOnToggle:true,groupColumns:false},_getAppendEl:function(){var element=this.options.appendTo;if(element){element=element.jquery||element.nodeType?$(element):this.document.find(element).eq(0)}if(!element||!element[0]){element=this.element.closest(".ui-front, dialog")}if(!element.length){element=this.document[0].body}return element},_create:function(){var el=this.element;var o=this.options;this.speed=$.fx.speeds._default;this._isOpen=false;this.inputIdCounter=0;this._namespaceID=this.eventNamespace||"multiselect"+multiselectID;var button=(this.button=$('')).addClass("ui-multiselect ui-widget ui-state-default ui-corner-all").addClass(o.classes).attr({title:el.attr("title"),tabIndex:el.attr("tabIndex"),id:el.attr("id")?el.attr("id")+"_ms":null}).prop("aria-haspopup",true).insertAfter(el);this.buttonlabel=$("").html(o.noneSelectedText).appendTo(button);this.menu=$("").addClass("ui-multiselect-menu ui-widget ui-widget-content ui-corner-all").addClass(o.classes).appendTo(this._getAppendEl());this.header=$("").addClass("ui-widget-header ui-corner-all ui-multiselect-header ui-helper-clearfix").appendTo(this.menu);this.headerLinkContainer=$("").addClass("ui-helper-reset").html(function(){if(o.header===true){var header_lis="";if(o.showCheckAll){header_lis=''+o.checkAllText+""}if(o.showUncheckAll){header_lis+=''+o.uncheckAllText+""}return header_lis}else if(typeof o.header==="string"){return""+o.header+""}else{return""}}).append('').appendTo(this.header);var checkboxContainer=(this.checkboxContainer=$("")).addClass("ui-multiselect-checkboxes ui-helper-reset").appendTo(this.menu);this._bindEvents();this.refresh(true);if(!o.multiple){this.menu.addClass("ui-multiselect-single")}multiselectID++;el.hide()},_init:function(){if(this.options.header===false){this.header.hide()}if(!this.options.multiple){this.headerLinkContainer.find(".ui-multiselect-all, .ui-multiselect-none").hide()}else{this.headerLinkContainer.find(".ui-multiselect-all, .ui-multiselect-none").show()}if(this.options.autoOpen){this.open()}if(this.element.is(":disabled")){this.disable()}},_makeOption:function(option){var title=option.title?option.title:null;var value=option.value;var id=this.element.attr("id")||multiselectID;var inputID="ui-multiselect-"+multiselectID+"-"+(option.id||id+"-option-"+this.inputIdCounter++);var isDisabled=option.disabled;var isSelected=option.selected;var labelClasses=["ui-corner-all"];var liClasses=[];var o=this.options;if(isDisabled){liClasses.push("ui-multiselect-disabled");labelClasses.push("ui-state-disabled")}if(option.className){liClasses.push(option.className)}if(isSelected&&!o.multiple){labelClasses.push("ui-state-active")}var $item=$("").addClass(liClasses.join(" "));var $label=$("").attr({"for":inputID,title:title}).addClass(labelClasses.join(" ")).appendTo($item);var $input=$("").attr({name:"multiselect_"+id,type:o.multiple?"checkbox":"radio",value:value,title:title,id:inputID,checked:isSelected?"checked":null,"aria-selected":isSelected?"true":null,disabled:isDisabled?"disabled":null,"aria-disabled":isDisabled?"true":null}).data($(option).data()).appendTo($label);$("").text($(option).text()).appendTo($label);return $item},_buildOptionList:function(element,$appendTo){var self=this;element.children().each(function(){var $this=$(this);if(this.tagName==="OPTGROUP"){var $optionGroup=$("").addClass("ui-multiselect-optgroup "+this.className).appendTo($appendTo);if(self.options.groupColumns){$optionGroup.addClass("ui-multiselect-columns")}$("").text(this.getAttribute("label")).appendTo($optionGroup);self._buildOptionList($this,$optionGroup)}else{var $listItem=self._makeOption(this).appendTo($appendTo)}})},refresh:function(init){var self=this;var el=this.element;var o=this.options;var menu=this.menu;var checkboxContainer=this.checkboxContainer;var html="";var $dropdown=$("").addClass("ui-multiselect-checkboxes ui-helper-reset");this.inputIdCounter=0;if(this.options.header){if(!this.options.multiple){this.headerLinkContainer.find(".ui-multiselect-all, .ui-multiselect-none").hide()}else{this.headerLinkContainer.find(".ui-multiselect-all, .ui-multiselect-none").show()}}this._buildOptionList(el,$dropdown);this.menu.find(".ui-multiselect-checkboxes").remove();this.menu.append($dropdown);this.labels=menu.find("label");this.inputs=this.labels.children("input");this._setButtonWidth();this.button[0].defaultValue=this.update();if(!init){this._trigger("refresh")}},update:function(){var o=this.options;var $inputs=this.inputs;var $checked=$inputs.filter(":checked");var numChecked=$checked.length;var value;if(numChecked===0){value=o.noneSelectedText}else{if($.isFunction(o.selectedText)){value=o.selectedText.call(this,numChecked,$inputs.length,$checked.get())}else if(/\d/.test(o.selectedList)&&o.selectedList>0&&numChecked<=o.selectedList){value=$checked.map(function(){return $(this).next().text()}).get().join(o.selectedListSeparator)}else{value=o.selectedText.replace("#",numChecked).replace("#",$inputs.length)}}this._setButtonValue(value);return value},_setButtonValue:function(value){this.buttonlabel.text(value)},_bindButtonEvents:function(){var self=this;var button=this.button;function clickHandler(){self[self._isOpen?"close":"open"]();return false}button.find("span").bind("click.multiselect",clickHandler);button.bind({click:clickHandler,keypress:function(e){switch(e.which){case 27:case 38:case 37:self.close();break;case 39:case 40:self.open();break}},mouseenter:function(){if(!button.hasClass("ui-state-disabled")){$(this).addClass("ui-state-hover")}},mouseleave:function(){$(this).removeClass("ui-state-hover")},focus:function(){if(!button.hasClass("ui-state-disabled")){$(this).addClass("ui-state-focus")}},blur:function(){$(this).removeClass("ui-state-focus")}})},_bindMenuEvents:function(){var self=this;this.menu.delegate(".ui-multiselect-optgroup a","click.multiselect",function(e){e.preventDefault();var $this=$(this);var $inputs=$this.parent().find("input:visible:not(:disabled)");var nodes=$inputs.get();var label=$this.text();if(self._trigger("beforeoptgrouptoggle",e,{inputs:nodes,label:label})===false){return}self._toggleChecked($inputs.filter(":checked").length!==$inputs.length,$inputs);self._trigger("optgrouptoggle",e,{inputs:nodes,label:label,checked:nodes.length?nodes[0].checked:null})}).delegate("label","mouseenter.multiselect",function(){if(!$(this).hasClass("ui-state-disabled")){self.labels.removeClass("ui-state-hover");$(this).addClass("ui-state-hover").find("input").focus()}}).delegate("label","keydown.multiselect",function(e){if(e.which===82){return}if(e.which>111&&e.which<124){return}e.preventDefault();switch(e.which){case 9:if(e.shiftKey){self.menu.find(".ui-state-hover").removeClass("ui-state-hover");self.header.find("li").last().find("a").focus()}else{self.close()}break;case 27:self.close();break;case 38:case 40:case 37:case 39:self._traverse(e.which,this);break;case 13:case 32:$(this).find("input")[0].click();break;case 65:if(e.altKey){self.checkAll()}break;case 85:if(e.altKey){self.uncheckAll()}break}}).delegate('input[type="checkbox"], input[type="radio"]',"click.multiselect",function(e){var $this=$(this);var val=this.value;var optionText=$this.parent().find("span").text();var checked=this.checked;var tags=self.element.find("option");if(this.disabled||self._trigger("click",e,{value:val,text:optionText,checked:checked})===false){e.preventDefault();return}$this.focus();$this.prop("aria-selected",checked);tags.each(function(){if(this.value===val){this.selected=checked}else if(!self.options.multiple){this.selected=false}});if(!self.options.multiple){self.labels.removeClass("ui-state-active");$this.closest("label").toggleClass("ui-state-active",checked);self.close()}self.element.trigger("change");setTimeout($.proxy(self.update,self),10)})},_bindHeaderEvents:function(){var self=this;this.header.delegate("a","click.multiselect",function(e){var $this=$(this);if($this.hasClass("ui-multiselect-close")){self.close()}else if($this.hasClass("ui-multiselect-all")){self.checkAll()}else if($this.hasClass("ui-multiselect-none")){self.uncheckAll()}e.preventDefault()}).delegate("a","keydown.multiselect",function(e){switch(e.which){case 27:self.close();break;case 9:var $target=$(e.target);if(e.shiftKey&&!$target.parent().prev().length&&!self.header.find(".ui-multiselect-filter").length||!$target.parent().next().length&&!self.labels.length&&!e.shiftKey){self.close();e.preventDefault()}break}})},_bindEvents:function(){var self=this;this._bindButtonEvents();this._bindMenuEvents();this._bindHeaderEvents();$doc.bind("mousedown."+self._namespaceID,function(event){var target=event.target;if(self._isOpen&&target!==self.button[0]&&target!==self.menu[0]&&!$.contains(self.menu[0],target)&&!$.contains(self.button[0],target)){self.close()}});$(this.element[0].form).bind("reset."+this._namespaceID,function(){setTimeout($.proxy(self.refresh,self),10)})},_getMinWidth:function(){var minVal=this.options.minWidth;var width=0;switch(typeof minVal){case"number":width=minVal;break;case"string":var lastChar=minVal[minVal.length-1];width=minVal.match(/\d+/);if(lastChar==="%"){width=this.element.parent().outerWidth()*(width/100)}else{width=parseInt(minVal,10)}break}return width},_setButtonWidth:function(){var width=this.element.outerWidth();var minVal=this._getMinWidth();if(widththis.options.height){this.menu.children(".ui-multiselect-checkboxes").css("overflow","auto");ulHeight=this.options.height}else{this.menu.children(".ui-multiselect-checkboxes").css("overflow","hidden")}this.menu.children(".ui-multiselect-checkboxes").height(ulHeight);this.menu.height(ulHeight+headerHeight)},_resizeMenu:function(){this._setMenuWidth();this._setMenuHeight()},_traverse:function(which,start){var $start=$(start);var moveToLast=which===38||which===37;var $next=$start.parent()[moveToLast?"prevAll":"nextAll"]("li:not(.ui-multiselect-disabled, .ui-multiselect-optgroup):visible").first();if(!$next.length){$next=$start.parents(".ui-multiselect-optgroup")[moveToLast?"prev":"next"]()}if(!$next.length){var $container=this.menu.find("ul").last();this.menu.find("label:visible")[moveToLast?"last":"first"]().trigger("mouseover");$container.scrollTop(moveToLast?$container.height():0)}else{$next.find("label:visible")[moveToLast?"last":"first"]().trigger("mouseover")}},_toggleState:function(prop,flag){return function(){if(!this.disabled){this[prop]=flag}if(flag){this.setAttribute("aria-selected",true)}else{this.removeAttribute("aria-selected")}}},_toggleChecked:function(flag,group){var $inputs=group&&group.length?group:this.inputs;var self=this;$inputs.each(this._toggleState("checked",flag));$inputs.eq(0).focus();this.update();var values={};$inputs.each(function(){values[this.value]=true});this.element.find("option").each(function(){if(!this.disabled&&values[this.value]){self._toggleState("selected",flag).call(this)}});if($inputs.length){this.element.trigger("change")}},_toggleDisabled:function(flag){this.button.prop({disabled:flag,"aria-disabled":flag})[flag?"addClass":"removeClass"]("ui-state-disabled");if(this.options.disableInputsOnToggle){var checkboxes=this.menu.find(".ui-multiselect-checkboxes").get(0);var matchedInputs=[];var key="ech-multiselect-disabled";var i=0;if(flag){matchedInputs=checkboxes.querySelectorAll("input:enabled");for(i=0;i").attr(attributes).text(text);var optionNode=$option.get(0);if(groupLabel){this.element.children("OPTGROUP").filter(function(){return $(this).prop("label")===groupLabel}).append($option);this.menu.find(".ui-multiselect-optgroup").filter(function(){return $(this).find("a").text()===groupLabel}).append(this._makeOption(optionNode))}else{this.element.append($option);this.menu.find(".ui-multiselect-checkboxes").append(this._makeOption(optionNode))}this.labels=this.menu.find("label");this.inputs=this.labels.children("input")},removeOption:function(value){if(!value){return}this.element.find("option[value="+value+"]").remove();this.labels.find("input[value="+value+"]").parents("li").remove();this.labels=this.menu.find("label");this.inputs=this.labels.children("input")},position:function(){var pos={my:"top",at:"bottom",of:this.button};if(!$.isEmptyObject(this.options.position)){pos.my=this.options.position.my||pos.my;pos.at=this.options.position.at||pos.at;pos.of=this.options.position.of||pos.of}if($.ui&&$.ui.position){this.menu.position(pos)}else{pos=this.button.position();pos.top+=this.button.outerHeight(false);this.menu.offset(pos)}},_setOption:function(key,value){var menu=this.menu;switch(key){case"header":if(typeof value==="boolean"){this.header[value?"show":"hide"]()}else if(typeof value==="string"){this.headerLinkContainer.children("li:not(:last-child)").remove();this.headerLinkContainer.prepend(""+value+"")}break;case"checkAllText":menu.find("a.ui-multiselect-all span").eq(-1).text(value);break;case"uncheckAllText":menu.find("a.ui-multiselect-none span").eq(-1).text(value);break;case"height":this.options[key]=value;this._setMenuHeight();break;case"minWidth":case"menuWidth":this.options[key]=value;this._setButtonWidth();this._setMenuWidth();break;case"selectedText":case"selectedList":case"noneSelectedText":this.options[key]=value;this.update();break;case"classes":menu.add(this.button).removeClass(this.options.classes).addClass(value);break;case"multiple":menu.toggleClass("ui-multiselect-single",!value);this.options.multiple=value;this.element[0].multiple=value;this.uncheckAll();this.refresh();break;case"position":this.position();break;case"selectedListSeparator":this.options[key]=value;this.button[0].defaultValue=this.update();break}$.Widget.prototype._setOption.apply(this,arguments)}})})(jQuery);
22 |
--------------------------------------------------------------------------------