diff --git a/exopite-notificator/admin/exopite-simple-options/README.txt b/exopite-notificator/admin/exopite-simple-options/README.txt deleted file mode 100644 index 5b2d757..0000000 --- a/exopite-notificator/admin/exopite-simple-options/README.txt +++ /dev/null @@ -1,303 +0,0 @@ -=== Plugin Name === -Author: Joe Szalai and raoabid -Donate link: http://joe.szalai.org -Tags: comments, spam -Requires at least: 4.9 -Tested up to: 5.0.3 -Stable tag: 5.0.3 -License: GPLv3 or later -License URI: http://www.gnu.org/licenses/gpl-3.0.html -Version: 20190218 -Plugin URL: https://joe.szalai.org/exopite/exopite-simple-options-framework/ -GitHub URL: https://github.com/JoeSz/Exopite-Simple-Options-Framework - -== Note == - -The Framework still in development stage. - -Documentation is still in-progress. - -The Framework based on some CodeStar Framework, MetaBox.io code and design. The fields configs desgin also based on CodeStar Framework. -I created this framework for plugins and metaboxes. Not for Themes. For Themes I recommend CodeStar Framework. - -== IMPORTANT == -* As 2018-09-11 we have a new hooks name to meet WordPress standards. -* After multilanguage compatibility the options array did changed. - from `unique[field-id]` to `unique[current_lang][field-id]` where: - if multilang plugin installed, then the selected language, otherwise WordPress installed language. - -== Description == - -WHY? -I need someting fast, easy and lightweight to generate option page and/or metabox for my plugins and/or post types. -I also love to create/program someting new (for me) to have fun and leary every day. For my theme I use CodeStar Framework, -so I created similarly. Unfortunately CodeStar Framework based on static class, can not initialize multiple times, and -this is required for plugns. - -Lightweight -No ads, Files are loaded only when required. Minimum footprint. - -Integration -Easy to integrate with any plugin or post type (even WordPress theme, but it is not designed to do so). - -Open Source -Exopite Simple Options is free and available on Github. Feel free to submit patches or add more features. - -== Features == - -- Easy field generator for plugin options for metabox for any post type. -- All field support callback on default value, content callback for content and notice field. -- Dependency handling, also for section tabs (only in tabbed=true). -- No ads, and never will. -- Files are loaded only when required. -- Minimum footprint. -- Multilang support for WPML, Polylang, WP Multilang and qTranslate-X. -- Availability to save post meta as simple (each setting has it's own custom field) istead of an array. - -#### Why did we add options to save meta as "simple" -Simple options is stored az induvidual meta key, value pair, otherwise it is stored in an array. - -I implemented this option because it is possible to search in serialized (array) post meta: -- https://wordpress.stackexchange.com/questions/16709/meta-query-with-meta-values-as-serialize-arrays -- https://stackoverflow.com/questions/15056407/wordpress-search-serialized-meta-data-with-custom-query -- https://www.simonbattersby.com/blog/2013/03/querying-wordpress-serialized-custom-post-data/ - -but there is no way to sort them with wp_query or SQL. - -https://wordpress.stackexchange.com/questions/87265/order-by-meta-value-serialized-array/87268#87268
-> "Not in any reliable way. You can certainly ORDER BY that value but the sorting will use the whole serialized string, -> which will give * you technically accurate results but not the results you want. You can't extract part of the string -> for sorting within the query itself. Even if you wrote raw SQL, which would give you access to database functions like -> SUBSTRING, I can't think of a dependable way to do it. You'd need a MySQL function that would unserialize the value-- -> you'd have to write it yourself.
-> Basically, if you need to sort on a meta_value you can't store it serialized. Sorry." - -It is possible to get all required posts and store them in an array and then sort them as an array, but what if you want -multiple keys/value pair to be sorted? - -UPDATE
-it is maybe possible:
-http://www.russellengland.com/2012/07/how-to-unserialize-data-using-mysql.html
-but it is waaay more complicated and less documented as meta query sort and search. -It should be not an excuse to use it, but it is not as reliable as it should be. - -https://wpquestions.com/Order_by_meta_key_where_value_is_serialized/7908
-> "...meta info serialized is not a good idea. But you really are going to lose the ability to query your -> data in any efficient manner when serializing entries into the WP database. -> -> The overall performance saving and gain you think you are achieving by serialization is not going to be noticeable to -> any major extent. You might obtain a slightly smaller database size but the cost of SQL transactions is going to be -> heavy if you ever query those fields and try to compare them in any useful, meaningful manner. -> -> Instead, save serialization for data that you do not intend to query in that nature, but instead would only access in -> a passive fashion by the direct WP API call get_post_meta() - from that function you can unpack a serialized entry -> to access its array properties too." - -== Available fields: == - -- ace_field -- video (mp4/oembed) -- upload (multiple) -- attached (Attached files/images/etc... to the post -> only for Metabox, multiselect, AJAX delete) -- notice -- editor (WYSIWYG WordPress Editor) -- text -- password -- color (rgb/rgba/html5) -- image -- textarea -- switcher -- date (datepicker/html5) -- checkbox -- radio -- button_bar -- select (single/multiselect + posttype) -- panel -- content -- number -- range -- tap_list (radio/checkbox) -- image_select (radio/checkbox) - -== Requirements == - -Server - -* WordPress 4.9+ (May work with earlier versions too) -* PHP 5.6+ (Required) -* jQuery 1.9.1+ - -Browsers - -* Modern Browsers -* Firefox, Chrome, Safari, Opera, IE 10+ -* Tested on Firefox, Chrome, Edge, IE 11 - -== Installation == - -Copy to plugin/theme folder. -Hook to 'init'. - -== How to use == - -$config = array( - - 'type' => 'menu', // Required, menu or metabox - 'id' => $this->plugin_name, // Required, meta box id, unique per page, to save: get_option( id ) - 'menu' => 'plugins.php', // Required, sub page to your options page - 'submenu' => true, // Required for submenu - 'title' => 'The name', // The name of this page - 'capability' => 'manage_options', // The capability needed to view the page - 'tabbed' => false, // Separate sections to tabs - -); - -$fields[] = array( - 'name' => 'first', - 'title' => 'Section First', - 'fields' => array( - - // fields... - - array( - 'id' => 'autoload', - 'type' => 'switcher', - 'title' => 'Field title', - 'default' => 'yes', - ), - - ), -); - -$fields[] = array( - 'name' => 'second', - 'title' => 'Section Second', - 'fields' => array( - - // fields... - - array( - 'id' => 'autoload', - 'type' => 'switcher', - 'title' => 'Field title', - 'default' => 'yes', - ), - - ), -); - -$options_panel = new Exopite_Simple_Options_Framework( $config, $fields ); - -== HOOKS == - -Filters -* exopite_sof_config (config) -* exopite_sof_options (fields) -* exopite_sof_menu_get_options (options, unique) -* exopite_sof_save_options (valid, unique) -* exopite_sof_save_menu_options (valid, unique) -* exopite_sof_save_meta_options (valid, unique) -* exopite_sof_sanitize_value (value, config) -* exopite_sof_add_field (output, field, config ) -* exopite_sof_meta_get_options (meta_options, unique, post_id ) -* exopite_sof_field_value (value, unique, options, field ) - - -Actions -* exopite_sof_do_save_options (valid, unique) -* exopite_sof_do_save_menu_options (value, unique) -* exopite_sof_do_save_meta_options (valid, unique, post_id) -* exopite_sof_before_generate_field (field, config) -* exopite_sof_before_add_field (field, config) -* exopite_sof_after_generate_field (field, config) -* exopite_sof_after_add_field (field, config) -* exopite_sof_form_menu_before (unique) -* exopite_sof_form_meta_before (unique) -* exopite_sof_display_page_header (config) -* exopite_sof_display_page_footer (config) -* exopite_sof_form_menu_after (unique) -* exopite_sof_form_meta_after (unique) - -== Changelog == - -= 20190218 - 2019-02-18 = -* Include Trumbowyg localy -* Some bugfixes (New PHP, WordPress version and Gutenberg) - -= 20181122 - 2018-11-22 = -* Fix name index update on drag drop and delete in gorup field. - -= 20181026 - 2018-10-26 = -* Filter to override save methode. "exopite_sof_field_value" -* Various bugfiexes. - -= 20181015 - 2018-10-15 = -* Fix TinyMCE is undefinied error in save, if not enqueued. - -= 20181002 - 2018-10-02 = -* Fix import and delete options didn't work because minification error. - -= 20180930 - 2018-09-30 = -* Load "non multilang" options in multilang if multilang not exist and other way arround for compatibility. - -= 20180924 - 2018-09-24 = -* Fixed TinyMCE does not save. -* Fixed ACE Editor addig slashes. - -= 20180916 - 2018-09-16 = -* Code clean up -* Fix image_select and multiselect doen't save -* Import, export using JSON encoded array - -= 20180911 - 2018-09-11 = -* Multilang support for WPML, Polylang, WP Multilang and qTranslate-X -* Major refactoring to meet WordPress standard -* Option to save post meta as simple instad of array - -= 20180904 - 2018-09-04 = -* Dashes in Filter and Action names to meet WordPress standars (thanks to raoabid GitHub) - -= 20180903 - 2018-09-03 = -* Refactoring main class to include some helper functions (thanks to raoabid GitHub) - -= 20180608 - 2018-06-08 = -* Add open section with url (...?page=[plulin-slug]§ion=[the-id-of-the-section]) - -= 20180528 - 2018-05-28 = -* Fix footer displayed twice -* Add save form on CTRL+S - -= 20180511 - 2018-05-11 = -* Add loading class and hooks - -= 20180429 - 2018-04-29 = -* add Trumbowyg editor to editor field -* allow TinyMCE in group field -* improve JavaScripts - -= 20180219 - 2018-02-19 = -* Add SweetAlert (https://sweetalert.js.org/docs/) - -= 20180114 - 2018-01-14 = -* Add backup and group/repeater field. - -= 20180113 - 2018-01-13 = -* Add meta field. - -= 20180107 - 2018-01-07 = -* Add button field. - -= 20180102 - 2018-01-02 = -* Initial release. - -== License Details == - -The GPL license of Sticky anything without cloning it grants you the right to use, study, share (copy), modify and (re)distribute the software, as long as these license terms are retained. - -== Disclamer == - -NO WARRANTY OF ANY KIND! USE THIS SOFTWARES AND INFORMATIONS AT YOUR OWN RISK! -[READ DISCLAMER.TXT!](https://joe.szalai.org/disclaimer/) -License: GNU General Public License v3 - -[![forthebadge](http://forthebadge.com/images/badges/built-by-developers.svg)](http://forthebadge.com) [![forthebadge](http://forthebadge.com/images/badges/for-you.svg)](http://forthebadge.com) diff --git a/exopite-notificator/admin/exopite-simple-options/assets/chosen-sprite@2x.png b/exopite-notificator/admin/exopite-simple-options/assets/chosen-sprite@2x.png new file mode 100644 index 0000000..6b50545 Binary files /dev/null and b/exopite-notificator/admin/exopite-simple-options/assets/chosen-sprite@2x.png differ diff --git a/exopite-notificator/admin/exopite-simple-options/assets/chosen.jquery.min.js b/exopite-notificator/admin/exopite-simple-options/assets/chosen.jquery.min.js index 0675858..2770488 100644 --- a/exopite-notificator/admin/exopite-simple-options/assets/chosen.jquery.min.js +++ b/exopite-notificator/admin/exopite-simple-options/assets/chosen.jquery.min.js @@ -1,3 +1,2 @@ -/* Chosen v1.8.2 | (c) 2011-2017 by Harvest | MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md */ - -(function(){var t,e,s,i,n=function(t,e){return function(){return t.apply(e,arguments)}},r=function(t,e){function s(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return s.prototype=e.prototype,t.prototype=new s,t.__super__=e.prototype,t},o={}.hasOwnProperty;(i=function(){function t(){this.options_index=0,this.parsed=[]}return t.prototype.add_node=function(t){return"OPTGROUP"===t.nodeName.toUpperCase()?this.add_group(t):this.add_option(t)},t.prototype.add_group=function(t){var e,s,i,n,r,o;for(e=this.parsed.length,this.parsed.push({array_index:e,group:!0,label:t.label,title:t.title?t.title:void 0,children:0,disabled:t.disabled,classes:t.className}),o=[],s=0,i=(r=t.childNodes).length;s"+t.group_label+"
"+t.html:t.html},t.prototype.mouse_enter=function(){return this.mouse_on_container=!0},t.prototype.mouse_leave=function(){return this.mouse_on_container=!1},t.prototype.input_focus=function(t){if(this.is_multiple){if(!this.active_field)return setTimeout(function(t){return function(){return t.container_mousedown()}}(this),50)}else if(!this.active_field)return this.activate_field()},t.prototype.input_blur=function(t){if(!this.mouse_on_container)return this.active_field=!1,setTimeout(function(t){return function(){return t.blur_test()}}(this),100)},t.prototype.label_click_handler=function(t){return this.is_multiple?this.container_mousedown(t):this.activate_field()},t.prototype.results_option_build=function(t){var e,s,i,n,r,o,h;for(e="",h=0,n=0,r=(o=this.results_data).length;n=this.max_shown_results));n++);return e},t.prototype.result_add_option=function(t){var e,s;return t.search_match&&this.include_option_in_results(t)?(e=[],t.disabled||t.selected&&this.is_multiple||e.push("active-result"),!t.disabled||t.selected&&this.is_multiple||e.push("disabled-result"),t.selected&&e.push("result-selected"),null!=t.group_array_index&&e.push("group-option"),""!==t.classes&&e.push(t.classes),s=document.createElement("li"),s.className=e.join(" "),s.style.cssText=t.style,s.setAttribute("data-option-array-index",t.array_index),s.innerHTML=t.highlighted_html||t.html,t.title&&(s.title=t.title),this.outerHTML(s)):""},t.prototype.result_add_group=function(t){var e,s;return(t.search_match||t.group_match)&&t.active_options>0?((e=[]).push("group-result"),t.classes&&e.push(t.classes),s=document.createElement("li"),s.className=e.join(" "),s.innerHTML=t.highlighted_html||this.escape_html(t.label),t.title&&(s.title=t.title),this.outerHTML(s)):""},t.prototype.results_update_field=function(){if(this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing)return this.winnow_results()},t.prototype.reset_single_select_options=function(){var t,e,s,i,n;for(n=[],t=0,e=(s=this.results_data).length;t"+this.escape_html(e)+""+this.escape_html(d)),null!=_&&(_.group_match=!0)):null!=n.group_array_index&&this.results_data[n.group_array_index].search_match&&(n.search_match=!0)));return this.result_clear_highlight(),c<1&&o.length?(this.update_results_content(""),this.no_results(o)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},t.prototype.get_search_regex=function(t){var e,s;return s=this.search_contains?t:"(^|\\s|\\b)"+t+"[^\\s]*",this.enable_split_word_search||this.search_contains||(s="^"+s),e=this.case_sensitive_search?"":"i",new RegExp(s,e)},t.prototype.search_string_match=function(t,e){var s;return s=e.exec(t),!this.search_contains&&(null!=s?s[1]:void 0)&&(s.index+=1),s},t.prototype.choices_count=function(){var t,e,s;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,t=0,e=(s=this.form_field.options).length;t0?this.keydown_backstroke():this.pending_backstroke||(this.result_clear_highlight(),this.results_search());break;case 13:t.preventDefault(),this.results_showing&&this.result_select(t);break;case 27:this.results_showing&&this.results_hide();break;case 9:case 16:case 17:case 18:case 38:case 40:case 91:break;default:this.results_search()}},t.prototype.clipboard_event_checker=function(t){if(!this.is_disabled)return setTimeout(function(t){return function(){return t.results_search()}}(this),50)},t.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field.offsetWidth+"px"},t.prototype.include_option_in_results=function(t){return!(this.is_multiple&&!this.display_selected_options&&t.selected)&&(!(!this.display_disabled_options&&t.disabled)&&!t.empty)},t.prototype.search_results_touchstart=function(t){return this.touch_started=!0,this.search_results_mouseover(t)},t.prototype.search_results_touchmove=function(t){return this.touch_started=!1,this.search_results_mouseout(t)},t.prototype.search_results_touchend=function(t){if(this.touch_started)return this.search_results_mouseup(t)},t.prototype.outerHTML=function(t){var e;return t.outerHTML?t.outerHTML:((e=document.createElement("div")).appendChild(t),e.innerHTML)},t.prototype.get_single_html=function(){return'\n '+this.default_text+'\n
\n
\n
\n \n
    \n
    '},t.prototype.get_multi_html=function(){return'
      \n
    • \n \n
    • \n
    \n
    \n
      \n
      '},t.prototype.get_no_results_html=function(t){return'
    • \n '+this.results_none_found+" "+this.escape_html(t)+"\n
    • "},t.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!(/iP(od|hone)/i.test(window.navigator.userAgent)||/IEMobile/i.test(window.navigator.userAgent)||/Windows Phone/i.test(window.navigator.userAgent)||/BlackBerry/i.test(window.navigator.userAgent)||/BB10/i.test(window.navigator.userAgent)||/Android.*Mobile/i.test(window.navigator.userAgent))},t.default_multiple_text="Select Some Options",t.default_single_text="Select an Option",t.default_no_result_text="No results match",t}(),(t=jQuery).fn.extend({chosen:function(i){return e.browser_is_supported()?this.each(function(e){var n,r;r=(n=t(this)).data("chosen"),"destroy"!==i?r instanceof s||n.data("chosen",new s(this,i)):r instanceof s&&r.destroy()}):this}}),s=function(s){function n(){return n.__super__.constructor.apply(this,arguments)}return r(n,e),n.prototype.setup=function(){return this.form_field_jq=t(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex},n.prototype.set_up_html=function(){var e,s;return(e=["chosen-container"]).push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&e.push(this.form_field.className),this.is_rtl&&e.push("chosen-rtl"),s={"class":e.join(" "),title:this.form_field.title},this.form_field.id.length&&(s.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=t("
      ",s),this.container.width(this.container_width()),this.is_multiple?this.container.html(this.get_multi_html()):this.container.html(this.get_single_html()),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},n.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},n.prototype.register_observers=function(){return this.container.on("touchstart.chosen",function(t){return function(e){t.container_mousedown(e)}}(this)),this.container.on("touchend.chosen",function(t){return function(e){t.container_mouseup(e)}}(this)),this.container.on("mousedown.chosen",function(t){return function(e){t.container_mousedown(e)}}(this)),this.container.on("mouseup.chosen",function(t){return function(e){t.container_mouseup(e)}}(this)),this.container.on("mouseenter.chosen",function(t){return function(e){t.mouse_enter(e)}}(this)),this.container.on("mouseleave.chosen",function(t){return function(e){t.mouse_leave(e)}}(this)),this.search_results.on("mouseup.chosen",function(t){return function(e){t.search_results_mouseup(e)}}(this)),this.search_results.on("mouseover.chosen",function(t){return function(e){t.search_results_mouseover(e)}}(this)),this.search_results.on("mouseout.chosen",function(t){return function(e){t.search_results_mouseout(e)}}(this)),this.search_results.on("mousewheel.chosen DOMMouseScroll.chosen",function(t){return function(e){t.search_results_mousewheel(e)}}(this)),this.search_results.on("touchstart.chosen",function(t){return function(e){t.search_results_touchstart(e)}}(this)),this.search_results.on("touchmove.chosen",function(t){return function(e){t.search_results_touchmove(e)}}(this)),this.search_results.on("touchend.chosen",function(t){return function(e){t.search_results_touchend(e)}}(this)),this.form_field_jq.on("chosen:updated.chosen",function(t){return function(e){t.results_update_field(e)}}(this)),this.form_field_jq.on("chosen:activate.chosen",function(t){return function(e){t.activate_field(e)}}(this)),this.form_field_jq.on("chosen:open.chosen",function(t){return function(e){t.container_mousedown(e)}}(this)),this.form_field_jq.on("chosen:close.chosen",function(t){return function(e){t.close_field(e)}}(this)),this.search_field.on("blur.chosen",function(t){return function(e){t.input_blur(e)}}(this)),this.search_field.on("keyup.chosen",function(t){return function(e){t.keyup_checker(e)}}(this)),this.search_field.on("keydown.chosen",function(t){return function(e){t.keydown_checker(e)}}(this)),this.search_field.on("focus.chosen",function(t){return function(e){t.input_focus(e)}}(this)),this.search_field.on("cut.chosen",function(t){return function(e){t.clipboard_event_checker(e)}}(this)),this.search_field.on("paste.chosen",function(t){return function(e){t.clipboard_event_checker(e)}}(this)),this.is_multiple?this.search_choices.on("click.chosen",function(t){return function(e){t.choices_click(e)}}(this)):this.container.on("click.chosen",function(t){t.preventDefault()})},n.prototype.destroy=function(){return t(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.form_field_label.length>0&&this.form_field_label.off("click.chosen"),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},n.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field.disabled||this.form_field_jq.parents("fieldset").is(":disabled"),this.container.toggleClass("chosen-disabled",this.is_disabled),this.search_field[0].disabled=this.is_disabled,this.is_multiple||this.selected_item.off("focus.chosen",this.activate_field),this.is_disabled?this.close_field():this.is_multiple?void 0:this.selected_item.on("focus.chosen",this.activate_field)},n.prototype.container_mousedown=function(e){var s;if(!this.is_disabled)return!e||"mousedown"!==(s=e.type)&&"touchstart"!==s||this.results_showing||e.preventDefault(),null!=e&&t(e.target).hasClass("search-choice-close")?void 0:(this.active_field?this.is_multiple||!e||t(e.target)[0]!==this.selected_item[0]&&!t(e.target).parents("a.chosen-single").length||(e.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),t(this.container[0].ownerDocument).on("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},n.prototype.container_mouseup=function(t){if("ABBR"===t.target.nodeName&&!this.is_disabled)return this.results_reset(t)},n.prototype.search_results_mousewheel=function(t){var e;if(t.originalEvent&&(e=t.originalEvent.deltaY||-t.originalEvent.wheelDelta||t.originalEvent.detail),null!=e)return t.preventDefault(),"DOMMouseScroll"===t.type&&(e*=40),this.search_results.scrollTop(e+this.search_results.scrollTop())},n.prototype.blur_test=function(t){if(!this.active_field&&this.container.hasClass("chosen-container-active"))return this.close_field()},n.prototype.close_field=function(){return t(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale(),this.search_field.blur()},n.prototype.activate_field=function(){if(!this.is_disabled)return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},n.prototype.test_active_click=function(e){var s;return(s=t(e.target).closest(".chosen-container")).length&&this.container[0]===s[0]?this.active_field=!0:this.close_field()},n.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=i.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},n.prototype.result_do_highlight=function(t){var e,s,i,n,r;if(t.length){if(this.result_clear_highlight(),this.result_highlight=t,this.result_highlight.addClass("highlighted"),i=parseInt(this.search_results.css("maxHeight"),10),r=this.search_results.scrollTop(),n=i+r,s=this.result_highlight.position().top+this.search_results.scrollTop(),(e=s+this.result_highlight.outerHeight())>=n)return this.search_results.scrollTop(e-i>0?e-i:0);if(s0)return this.form_field_label.on("click.chosen",this.label_click_handler)},n.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},n.prototype.search_results_mouseup=function(e){var s;if((s=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first()).length)return this.result_highlight=s,this.result_select(e),this.search_field.focus()},n.prototype.search_results_mouseover=function(e){var s;if(s=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first())return this.result_do_highlight(s)},n.prototype.search_results_mouseout=function(e){if(t(e.target).hasClass("active-result")||t(e.target).parents(".active-result").first())return this.result_clear_highlight()},n.prototype.choice_build=function(e){var s,i;return s=t("
    • ",{"class":"search-choice"}).html(""+this.choice_label(e)+""),e.disabled?s.addClass("search-choice-disabled"):((i=t("",{"class":"search-choice-close","data-option-array-index":e.array_index})).on("click.chosen",function(t){return function(e){return t.choice_destroy_link_click(e)}}(this)),s.append(i)),this.search_container.before(s)},n.prototype.choice_destroy_link_click=function(e){if(e.preventDefault(),e.stopPropagation(),!this.is_disabled)return this.choice_destroy(t(e.target))},n.prototype.choice_destroy=function(t){if(this.result_deselect(t[0].getAttribute("data-option-array-index")))return this.active_field?this.search_field.focus():this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.get_search_field_value().length<1&&this.results_hide(),t.parents("li").first().remove(),this.search_field_scale()},n.prototype.results_reset=function(){if(this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.trigger_form_field_change(),this.active_field)return this.results_hide()},n.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},n.prototype.result_select=function(t){var e,s;if(this.result_highlight)return e=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?e.removeClass("active-result"):this.reset_single_select_options(),e.addClass("result-selected"),s=this.results_data[e[0].getAttribute("data-option-array-index")],s.selected=!0,this.form_field.options[s.options_index].selected=!0,this.selected_option_count=null,this.search_field.val(""),this.is_multiple?this.choice_build(s):this.single_set_selected_text(this.choice_label(s)),this.is_multiple&&(!this.hide_results_on_select||t.metaKey||t.ctrlKey)?this.winnow_results():(this.results_hide(),this.show_search_field_default()),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.trigger_form_field_change({selected:this.form_field.options[s.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,t.preventDefault(),this.search_field_scale())},n.prototype.single_set_selected_text=function(t){return null==t&&(t=this.default_text),t===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(t)},n.prototype.result_deselect=function(t){var e;return e=this.results_data[t],!this.form_field.options[e.options_index].disabled&&(e.selected=!1,this.form_field.options[e.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.trigger_form_field_change({deselected:this.form_field.options[e.options_index].value}),this.search_field_scale(),!0)},n.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return this.selected_item.find("abbr").length||this.selected_item.find("span").first().after(''),this.selected_item.addClass("chosen-single-with-deselect")},n.prototype.get_search_field_value=function(){return this.search_field.val()},n.prototype.get_search_text=function(){return t.trim(this.get_search_field_value())},n.prototype.escape_html=function(e){return t("
      ").text(e).html()},n.prototype.winnow_results_set_highlight=function(){var t,e;if(e=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),null!=(t=e.length?e.first():this.search_results.find(".active-result").first()))return this.result_do_highlight(t)},n.prototype.no_results=function(t){var e;return e=this.get_no_results_html(t),this.search_results.append(e),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},n.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},n.prototype.keydown_arrow=function(){var t;return this.results_showing&&this.result_highlight?(t=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(t):void 0:this.results_show()},n.prototype.keyup_arrow=function(){var t;return this.results_showing||this.is_multiple?this.result_highlight?(t=this.result_highlight.prevAll("li.active-result")).length?this.result_do_highlight(t.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight()):void 0:this.results_show()},n.prototype.keydown_backstroke=function(){var t;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(t=this.search_container.siblings("li.search-choice").last()).length&&!t.hasClass("search-choice-disabled")?(this.pending_backstroke=t,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0},n.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},n.prototype.search_field_scale=function(){var e,s,i,n,r,o,h;if(this.is_multiple){for(r={position:"absolute",left:"-1000px",top:"-1000px",display:"none",whiteSpace:"pre"},s=0,i=(o=["fontSize","fontStyle","fontWeight","fontFamily","lineHeight","textTransform","letterSpacing"]).length;s").css(r)).text(this.get_search_field_value()),t("body").append(e),h=e.width()+25,e.remove(),this.container.is(":visible")&&(h=Math.min(this.container.outerWidth()-10,h)),this.search_field.width(h)}},n.prototype.trigger_form_field_change=function(t){return this.form_field_jq.trigger("input",t),this.form_field_jq.trigger("change",t)},n}()}).call(this); +/* Chosen v1.8.7 | (c) 2011-2018 by Harvest | MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md */ +(function(){var t,e,s,i,r=function(t,e){return function(){return t.apply(e,arguments)}},n={}.hasOwnProperty;(i=function(){function t(){this.options_index=0,this.parsed=[]}return t.prototype.add_node=function(t){return"OPTGROUP"===t.nodeName.toUpperCase()?this.add_group(t):this.add_option(t)},t.prototype.add_group=function(t){var e,s,i,r,n,o;for(e=this.parsed.length,this.parsed.push({array_index:e,group:!0,label:t.label,title:t.title?t.title:void 0,children:0,disabled:t.disabled,classes:t.className}),o=[],s=0,i=(n=t.childNodes).length;s"+this.escape_html(t.group_label)+""+t.html:t.html},t.prototype.mouse_enter=function(){return this.mouse_on_container=!0},t.prototype.mouse_leave=function(){return this.mouse_on_container=!1},t.prototype.input_focus=function(t){if(this.is_multiple){if(!this.active_field)return setTimeout((e=this,function(){return e.container_mousedown()}),50)}else if(!this.active_field)return this.activate_field();var e},t.prototype.input_blur=function(t){if(!this.mouse_on_container)return this.active_field=!1,setTimeout((e=this,function(){return e.blur_test()}),100);var e},t.prototype.label_click_handler=function(t){return this.is_multiple?this.container_mousedown(t):this.activate_field()},t.prototype.results_option_build=function(t){var e,s,i,r,n,o,h;for(e="",h=0,r=0,n=(o=this.results_data).length;r=this.max_shown_results));r++);return e},t.prototype.result_add_option=function(t){var e,s;return t.search_match&&this.include_option_in_results(t)?(e=[],t.disabled||t.selected&&this.is_multiple||e.push("active-result"),!t.disabled||t.selected&&this.is_multiple||e.push("disabled-result"),t.selected&&e.push("result-selected"),null!=t.group_array_index&&e.push("group-option"),""!==t.classes&&e.push(t.classes),(s=document.createElement("li")).className=e.join(" "),t.style&&(s.style.cssText=t.style),s.setAttribute("data-option-array-index",t.array_index),s.innerHTML=t.highlighted_html||t.html,t.title&&(s.title=t.title),this.outerHTML(s)):""},t.prototype.result_add_group=function(t){var e,s;return(t.search_match||t.group_match)&&t.active_options>0?((e=[]).push("group-result"),t.classes&&e.push(t.classes),(s=document.createElement("li")).className=e.join(" "),s.innerHTML=t.highlighted_html||this.escape_html(t.label),t.title&&(s.title=t.title),this.outerHTML(s)):""},t.prototype.results_update_field=function(){if(this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing)return this.winnow_results()},t.prototype.reset_single_select_options=function(){var t,e,s,i,r;for(r=[],t=0,e=(s=this.results_data).length;t"+this.escape_html(s)+""+this.escape_html(p)),null!=a&&(a.group_match=!0)):null!=n.group_array_index&&this.results_data[n.group_array_index].search_match&&(n.search_match=!0)));return this.result_clear_highlight(),_<1&&h.length?(this.update_results_content(""),this.no_results(h)):(this.update_results_content(this.results_option_build()),(null!=t?t.skip_highlight:void 0)?void 0:this.winnow_results_set_highlight())},t.prototype.get_search_regex=function(t){var e,s;return s=this.search_contains?t:"(^|\\s|\\b)"+t+"[^\\s]*",this.enable_split_word_search||this.search_contains||(s="^"+s),e=this.case_sensitive_search?"":"i",new RegExp(s,e)},t.prototype.search_string_match=function(t,e){var s;return s=e.exec(t),!this.search_contains&&(null!=s?s[1]:void 0)&&(s.index+=1),s},t.prototype.choices_count=function(){var t,e,s;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,t=0,e=(s=this.form_field.options).length;t0?this.keydown_backstroke():this.pending_backstroke||(this.result_clear_highlight(),this.results_search());break;case 13:t.preventDefault(),this.results_showing&&this.result_select(t);break;case 27:this.results_showing&&this.results_hide();break;case 9:case 16:case 17:case 18:case 38:case 40:case 91:break;default:this.results_search()}},t.prototype.clipboard_event_checker=function(t){var e;if(!this.is_disabled)return setTimeout((e=this,function(){return e.results_search()}),50)},t.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field.offsetWidth+"px"},t.prototype.include_option_in_results=function(t){return!(this.is_multiple&&!this.display_selected_options&&t.selected)&&(!(!this.display_disabled_options&&t.disabled)&&!t.empty)},t.prototype.search_results_touchstart=function(t){return this.touch_started=!0,this.search_results_mouseover(t)},t.prototype.search_results_touchmove=function(t){return this.touch_started=!1,this.search_results_mouseout(t)},t.prototype.search_results_touchend=function(t){if(this.touch_started)return this.search_results_mouseup(t)},t.prototype.outerHTML=function(t){var e;return t.outerHTML?t.outerHTML:((e=document.createElement("div")).appendChild(t),e.innerHTML)},t.prototype.get_single_html=function(){return'\n '+this.default_text+'\n
      \n
      \n
      \n \n
        \n
        '},t.prototype.get_multi_html=function(){return'
          \n
        • \n \n
        • \n
        \n
        \n
          \n
          '},t.prototype.get_no_results_html=function(t){return'
        • \n '+this.results_none_found+" "+this.escape_html(t)+"\n
        • "},t.browser_is_supported=function(){return"Microsoft Internet Explorer"!==window.navigator.appName||document.documentMode>=8},t.default_multiple_text="Select Some Options",t.default_single_text="Select an Option",t.default_no_result_text="No results match",t}(),(t=jQuery).fn.extend({chosen:function(i){return e.browser_is_supported()?this.each(function(e){var r,n;n=(r=t(this)).data("chosen"),"destroy"!==i?n instanceof s||r.data("chosen",new s(this,i)):n instanceof s&&n.destroy()}):this}}),s=function(s){function r(){return r.__super__.constructor.apply(this,arguments)}return function(t,e){for(var s in e)n.call(e,s)&&(t[s]=e[s]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(r,e),r.prototype.setup=function(){return this.form_field_jq=t(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex},r.prototype.set_up_html=function(){var e,s;return(e=["chosen-container"]).push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&e.push(this.form_field.className),this.is_rtl&&e.push("chosen-rtl"),s={class:e.join(" "),title:this.form_field.title},this.form_field.id.length&&(s.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=t("
          ",s),this.container.width(this.container_width()),this.is_multiple?this.container.html(this.get_multi_html()):this.container.html(this.get_single_html()),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},r.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},r.prototype.register_observers=function(){var t;return this.container.on("touchstart.chosen",(t=this,function(e){t.container_mousedown(e)})),this.container.on("touchend.chosen",function(t){return function(e){t.container_mouseup(e)}}(this)),this.container.on("mousedown.chosen",function(t){return function(e){t.container_mousedown(e)}}(this)),this.container.on("mouseup.chosen",function(t){return function(e){t.container_mouseup(e)}}(this)),this.container.on("mouseenter.chosen",function(t){return function(e){t.mouse_enter(e)}}(this)),this.container.on("mouseleave.chosen",function(t){return function(e){t.mouse_leave(e)}}(this)),this.search_results.on("mouseup.chosen",function(t){return function(e){t.search_results_mouseup(e)}}(this)),this.search_results.on("mouseover.chosen",function(t){return function(e){t.search_results_mouseover(e)}}(this)),this.search_results.on("mouseout.chosen",function(t){return function(e){t.search_results_mouseout(e)}}(this)),this.search_results.on("mousewheel.chosen DOMMouseScroll.chosen",function(t){return function(e){t.search_results_mousewheel(e)}}(this)),this.search_results.on("touchstart.chosen",function(t){return function(e){t.search_results_touchstart(e)}}(this)),this.search_results.on("touchmove.chosen",function(t){return function(e){t.search_results_touchmove(e)}}(this)),this.search_results.on("touchend.chosen",function(t){return function(e){t.search_results_touchend(e)}}(this)),this.form_field_jq.on("chosen:updated.chosen",function(t){return function(e){t.results_update_field(e)}}(this)),this.form_field_jq.on("chosen:activate.chosen",function(t){return function(e){t.activate_field(e)}}(this)),this.form_field_jq.on("chosen:open.chosen",function(t){return function(e){t.container_mousedown(e)}}(this)),this.form_field_jq.on("chosen:close.chosen",function(t){return function(e){t.close_field(e)}}(this)),this.search_field.on("blur.chosen",function(t){return function(e){t.input_blur(e)}}(this)),this.search_field.on("keyup.chosen",function(t){return function(e){t.keyup_checker(e)}}(this)),this.search_field.on("keydown.chosen",function(t){return function(e){t.keydown_checker(e)}}(this)),this.search_field.on("focus.chosen",function(t){return function(e){t.input_focus(e)}}(this)),this.search_field.on("cut.chosen",function(t){return function(e){t.clipboard_event_checker(e)}}(this)),this.search_field.on("paste.chosen",function(t){return function(e){t.clipboard_event_checker(e)}}(this)),this.is_multiple?this.search_choices.on("click.chosen",function(t){return function(e){t.choices_click(e)}}(this)):this.container.on("click.chosen",function(t){t.preventDefault()})},r.prototype.destroy=function(){return t(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.form_field_label.length>0&&this.form_field_label.off("click.chosen"),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},r.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field.disabled||this.form_field_jq.parents("fieldset").is(":disabled"),this.container.toggleClass("chosen-disabled",this.is_disabled),this.search_field[0].disabled=this.is_disabled,this.is_multiple||this.selected_item.off("focus.chosen",this.activate_field),this.is_disabled?this.close_field():this.is_multiple?void 0:this.selected_item.on("focus.chosen",this.activate_field)},r.prototype.container_mousedown=function(e){var s;if(!this.is_disabled)return!e||"mousedown"!==(s=e.type)&&"touchstart"!==s||this.results_showing||e.preventDefault(),null!=e&&t(e.target).hasClass("search-choice-close")?void 0:(this.active_field?this.is_multiple||!e||t(e.target)[0]!==this.selected_item[0]&&!t(e.target).parents("a.chosen-single").length||(e.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),t(this.container[0].ownerDocument).on("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},r.prototype.container_mouseup=function(t){if("ABBR"===t.target.nodeName&&!this.is_disabled)return this.results_reset(t)},r.prototype.search_results_mousewheel=function(t){var e;if(t.originalEvent&&(e=t.originalEvent.deltaY||-t.originalEvent.wheelDelta||t.originalEvent.detail),null!=e)return t.preventDefault(),"DOMMouseScroll"===t.type&&(e*=40),this.search_results.scrollTop(e+this.search_results.scrollTop())},r.prototype.blur_test=function(t){if(!this.active_field&&this.container.hasClass("chosen-container-active"))return this.close_field()},r.prototype.close_field=function(){return t(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale(),this.search_field.blur()},r.prototype.activate_field=function(){if(!this.is_disabled)return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},r.prototype.test_active_click=function(e){var s;return(s=t(e.target).closest(".chosen-container")).length&&this.container[0]===s[0]?this.active_field=!0:this.close_field()},r.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=i.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},r.prototype.result_do_highlight=function(t){var e,s,i,r,n;if(t.length){if(this.result_clear_highlight(),this.result_highlight=t,this.result_highlight.addClass("highlighted"),r=(i=parseInt(this.search_results.css("maxHeight"),10))+(n=this.search_results.scrollTop()),(e=(s=this.result_highlight.position().top+this.search_results.scrollTop())+this.result_highlight.outerHeight())>=r)return this.search_results.scrollTop(e-i>0?e-i:0);if(s0)return this.form_field_label.on("click.chosen",this.label_click_handler)},r.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},r.prototype.search_results_mouseup=function(e){var s;if((s=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first()).length)return this.result_highlight=s,this.result_select(e),this.search_field.focus()},r.prototype.search_results_mouseover=function(e){var s;if(s=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first())return this.result_do_highlight(s)},r.prototype.search_results_mouseout=function(e){if(t(e.target).hasClass("active-result")||t(e.target).parents(".active-result").first())return this.result_clear_highlight()},r.prototype.choice_build=function(e){var s,i,r;return s=t("
        • ",{class:"search-choice"}).html(""+this.choice_label(e)+""),e.disabled?s.addClass("search-choice-disabled"):((i=t("",{class:"search-choice-close","data-option-array-index":e.array_index})).on("click.chosen",(r=this,function(t){return r.choice_destroy_link_click(t)})),s.append(i)),this.search_container.before(s)},r.prototype.choice_destroy_link_click=function(e){if(e.preventDefault(),e.stopPropagation(),!this.is_disabled)return this.choice_destroy(t(e.target))},r.prototype.choice_destroy=function(t){if(this.result_deselect(t[0].getAttribute("data-option-array-index")))return this.active_field?this.search_field.focus():this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.get_search_field_value().length<1&&this.results_hide(),t.parents("li").first().remove(),this.search_field_scale()},r.prototype.results_reset=function(){if(this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.trigger_form_field_change(),this.active_field)return this.results_hide()},r.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},r.prototype.result_select=function(t){var e,s;if(this.result_highlight)return e=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?e.removeClass("active-result"):this.reset_single_select_options(),e.addClass("result-selected"),(s=this.results_data[e[0].getAttribute("data-option-array-index")]).selected=!0,this.form_field.options[s.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(s):this.single_set_selected_text(this.choice_label(s)),this.is_multiple&&(!this.hide_results_on_select||t.metaKey||t.ctrlKey)?t.metaKey||t.ctrlKey?this.winnow_results({skip_highlight:!0}):(this.search_field.val(""),this.winnow_results()):(this.results_hide(),this.show_search_field_default()),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.trigger_form_field_change({selected:this.form_field.options[s.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,t.preventDefault(),this.search_field_scale())},r.prototype.single_set_selected_text=function(t){return null==t&&(t=this.default_text),t===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(t)},r.prototype.result_deselect=function(t){var e;return e=this.results_data[t],!this.form_field.options[e.options_index].disabled&&(e.selected=!1,this.form_field.options[e.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.trigger_form_field_change({deselected:this.form_field.options[e.options_index].value}),this.search_field_scale(),!0)},r.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return this.selected_item.find("abbr").length||this.selected_item.find("span").first().after(''),this.selected_item.addClass("chosen-single-with-deselect")},r.prototype.get_search_field_value=function(){return this.search_field.val()},r.prototype.get_search_text=function(){return t.trim(this.get_search_field_value())},r.prototype.escape_html=function(e){return t("
          ").text(e).html()},r.prototype.winnow_results_set_highlight=function(){var t,e;if(null!=(t=(e=this.is_multiple?[]:this.search_results.find(".result-selected.active-result")).length?e.first():this.search_results.find(".active-result").first()))return this.result_do_highlight(t)},r.prototype.no_results=function(t){var e;return e=this.get_no_results_html(t),this.search_results.append(e),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},r.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},r.prototype.keydown_arrow=function(){var t;return this.results_showing&&this.result_highlight?(t=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(t):void 0:this.results_show()},r.prototype.keyup_arrow=function(){var t;return this.results_showing||this.is_multiple?this.result_highlight?(t=this.result_highlight.prevAll("li.active-result")).length?this.result_do_highlight(t.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight()):void 0:this.results_show()},r.prototype.keydown_backstroke=function(){var t;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(t=this.search_container.siblings("li.search-choice").last()).length&&!t.hasClass("search-choice-disabled")?(this.pending_backstroke=t,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0},r.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},r.prototype.search_field_scale=function(){var e,s,i,r,n,o,h;if(this.is_multiple){for(n={position:"absolute",left:"-1000px",top:"-1000px",display:"none",whiteSpace:"pre"},s=0,i=(o=["fontSize","fontStyle","fontWeight","fontFamily","lineHeight","textTransform","letterSpacing"]).length;s").css(n)).text(this.get_search_field_value()),t("body").append(e),h=e.width()+25,e.remove(),this.container.is(":visible")&&(h=Math.min(this.container.outerWidth()-10,h)),this.search_field.width(h)}},r.prototype.trigger_form_field_change=function(t){return this.form_field_jq.trigger("input",t),this.form_field_jq.trigger("change",t)},r}()}).call(this); \ No newline at end of file diff --git a/exopite-notificator/admin/exopite-simple-options/assets/dev/chosen.jquery.js b/exopite-notificator/admin/exopite-simple-options/assets/dev/chosen.jquery.js index b8e20eb..0e9c3c3 100644 --- a/exopite-notificator/admin/exopite-simple-options/assets/dev/chosen.jquery.js +++ b/exopite-notificator/admin/exopite-simple-options/assets/dev/chosen.jquery.js @@ -2,14 +2,13 @@ Chosen, a Select Box Enhancer for jQuery and Prototype by Patrick Filler for Harvest, http://getharvest.com -Version 1.8.2 +Version 1.8.7 Full source at https://github.com/harvesthq/chosen Copyright (c) 2011-2017 Harvest http://getharvest.com MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md This file is generated by `grunt build`, do not edit it by hand. */ - (function() { var $, AbstractChosen, Chosen, SelectParser, bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, @@ -161,7 +160,7 @@ This file is generated by `grunt build`, do not edit it by hand. AbstractChosen.prototype.choice_label = function(item) { if (this.include_group_label_in_selected && (item.group_label != null)) { - return "" + item.group_label + "" + item.html; + return "" + (this.escape_html(item.group_label)) + "" + item.html; } else { return item.html; } @@ -267,7 +266,9 @@ This file is generated by `grunt build`, do not edit it by hand. } option_el = document.createElement("li"); option_el.className = classes.join(" "); - option_el.style.cssText = option.style; + if (option.style) { + option_el.style.cssText = option.style; + } option_el.setAttribute("data-option-array-index", option.array_index); option_el.innerHTML = option.highlighted_html || option.html; if (option.title) { @@ -341,7 +342,7 @@ This file is generated by `grunt build`, do not edit it by hand. } }; - AbstractChosen.prototype.winnow_results = function() { + AbstractChosen.prototype.winnow_results = function(options) { var escapedQuery, fix, i, len, option, prefix, query, ref, regex, results, results_group, search_match, startpos, suffix, text; this.no_results_clear(); results = 0; @@ -397,7 +398,9 @@ This file is generated by `grunt build`, do not edit it by hand. return this.no_results(query); } else { this.update_results_content(this.results_option_build()); - return this.winnow_results_set_highlight(); + if (!(options != null ? options.skip_highlight : void 0)) { + return this.winnow_results_set_highlight(); + } } }; @@ -599,9 +602,9 @@ This file is generated by `grunt build`, do not edit it by hand. if ("Microsoft Internet Explorer" === window.navigator.appName) { return document.documentMode >= 8; } - if (/iP(od|hone)/i.test(window.navigator.userAgent) || /IEMobile/i.test(window.navigator.userAgent) || /Windows Phone/i.test(window.navigator.userAgent) || /BlackBerry/i.test(window.navigator.userAgent) || /BB10/i.test(window.navigator.userAgent) || /Android.*Mobile/i.test(window.navigator.userAgent)) { - return false; - } + // if (/iP(od|hone)/i.test(window.navigator.userAgent) || /IEMobile/i.test(window.navigator.userAgent) || /Windows Phone/i.test(window.navigator.userAgent) || /BlackBerry/i.test(window.navigator.userAgent) || /BB10/i.test(window.navigator.userAgent) || /Android.*Mobile/i.test(window.navigator.userAgent)) { + // return false; + // } return true; }; @@ -941,7 +944,7 @@ This file is generated by `grunt build`, do not edit it by hand. this.results_data = SelectParser.select_to_array(this.form_field); if (this.is_multiple) { this.search_choices.find("li.search-choice").remove(); - } else if (!this.is_multiple) { + } else { this.single_set_selected_text(); if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) { this.search_field[0].readOnly = true; @@ -1154,14 +1157,20 @@ This file is generated by `grunt build`, do not edit it by hand. item.selected = true; this.form_field.options[item.options_index].selected = true; this.selected_option_count = null; - this.search_field.val(""); if (this.is_multiple) { this.choice_build(item); } else { this.single_set_selected_text(this.choice_label(item)); } if (this.is_multiple && (!this.hide_results_on_select || (evt.metaKey || evt.ctrlKey))) { - this.winnow_results(); + if (evt.metaKey || evt.ctrlKey) { + this.winnow_results({ + skip_highlight: true + }); + } else { + this.search_field.val(""); + this.winnow_results(); + } } else { this.results_hide(); this.show_search_field_default(); @@ -1347,3 +1356,4 @@ This file is generated by `grunt build`, do not edit it by hand. })(AbstractChosen); }).call(this); + diff --git a/exopite-notificator/admin/exopite-simple-options/assets/dev/jquery.minicolors.css b/exopite-notificator/admin/exopite-simple-options/assets/dev/jquery.minicolors.css new file mode 100644 index 0000000..b438a58 --- /dev/null +++ b/exopite-notificator/admin/exopite-simple-options/assets/dev/jquery.minicolors.css @@ -0,0 +1,432 @@ +.minicolors { + position: relative; +} + +.minicolors-sprite { + background-image: url(jquery.minicolors.png); +} + +.minicolors-swatch { + position: absolute; + vertical-align: middle; + background-position: -80px 0; + border: solid 1px #ccc; + cursor: text; + padding: 0; + margin: 0; + display: inline-block; +} + +.minicolors-swatch-color { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; +} + +.minicolors input[type=hidden] + .minicolors-swatch { + width: 28px; + position: static; + cursor: pointer; +} + +.minicolors input[type=hidden][disabled] + .minicolors-swatch { + cursor: default; +} + +/* Panel */ +.minicolors-panel { + position: absolute; + width: 173px; + background: white; + border: solid 1px #CCC; + box-shadow: 0 0 20px rgba(0, 0, 0, .2); + z-index: 99999; + box-sizing: content-box; + display: none; +} + +.minicolors-panel.minicolors-visible { + display: block; +} + +/* Panel positioning */ +.minicolors-position-top .minicolors-panel { + top: -154px; +} + +.minicolors-position-right .minicolors-panel { + right: 0; +} + +.minicolors-position-bottom .minicolors-panel { + top: auto; +} + +.minicolors-position-left .minicolors-panel { + left: 0; +} + +.minicolors-with-opacity .minicolors-panel { + width: 194px; +} + +.minicolors .minicolors-grid { + position: relative; + top: 1px; + left: 1px; /* LTR */ + width: 150px; + height: 150px; + margin-bottom: 2px; + background-position: -120px 0; + cursor: crosshair; +} +[dir=rtl] .minicolors .minicolors-grid { + right: 1px; +} + +.minicolors .minicolors-grid-inner { + position: absolute; + top: 0; + left: 0; + width: 150px; + height: 150px; +} + +.minicolors-slider-saturation .minicolors-grid { + background-position: -420px 0; +} + +.minicolors-slider-saturation .minicolors-grid-inner { + background-position: -270px 0; + background-image: inherit; +} + +.minicolors-slider-brightness .minicolors-grid { + background-position: -570px 0; +} + +.minicolors-slider-brightness .minicolors-grid-inner { + background-color: black; +} + +.minicolors-slider-wheel .minicolors-grid { + background-position: -720px 0; +} + +.minicolors-slider, +.minicolors-opacity-slider { + position: absolute; + top: 1px; + left: 152px; /* LTR */ + width: 20px; + height: 150px; + background-color: white; + background-position: 0 0; + cursor: row-resize; +} +[dir=rtl] .minicolors-slider, +[dir=rtl] .minicolors-opacity-slider { + right: 152px; +} + +.minicolors-slider-saturation .minicolors-slider { + background-position: -60px 0; +} + +.minicolors-slider-brightness .minicolors-slider { + background-position: -20px 0; +} + +.minicolors-slider-wheel .minicolors-slider { + background-position: -20px 0; +} + +.minicolors-opacity-slider { + left: 173px; /* LTR */ + background-position: -40px 0; + display: none; +} +[dir=rtl] .minicolors-opacity-slider { + right: 173px; +} + +.minicolors-with-opacity .minicolors-opacity-slider { + display: block; +} + +/* Pickers */ +.minicolors-grid .minicolors-picker { + position: absolute; + top: 70px; + left: 70px; + width: 12px; + height: 12px; + border: solid 1px black; + border-radius: 10px; + margin-top: -6px; + margin-left: -6px; + background: none; +} + +.minicolors-grid .minicolors-picker > div { + position: absolute; + top: 0; + left: 0; + width: 8px; + height: 8px; + border-radius: 8px; + border: solid 2px white; + box-sizing: content-box; +} + +.minicolors-picker { + position: absolute; + top: 0; + left: 0; + width: 18px; + height: 2px; + background: white; + border: solid 1px black; + margin-top: -2px; + box-sizing: content-box; +} + +/* Swatches */ +.minicolors-swatches, +.minicolors-swatches li { + margin: 5px 0 3px 5px; /* LTR */ + padding: 0; + list-style: none; + overflow: hidden; +} +[dir=rtl] .minicolors-swatches, +[dir=rtl] .minicolors-swatches li { + margin: 5px 5px 3px 0; +} + +.minicolors-swatches .minicolors-swatch { + position: relative; + float: left; /* LTR */ + cursor: pointer; + margin:0 4px 0 0; /* LTR */ +} +[dir=rtl] .minicolors-swatches .minicolors-swatch { + float: right; + margin:0 0 0 4px; +} + +.minicolors-with-opacity .minicolors-swatches .minicolors-swatch { + margin-right: 7px; /* LTR */ +} +[dir=rtl] .minicolors-with-opacity .minicolors-swatches .minicolors-swatch { + margin-right: 0; + margin-left: 7px; +} + +.minicolors-swatch.selected { + border-color: #000; +} + +/* Inline controls */ +.minicolors-inline { + display: inline-block; +} + +.minicolors-inline .minicolors-input { + display: none !important; +} + +.minicolors-inline .minicolors-panel { + position: relative; + top: auto; + left: auto; /* LTR */ + box-shadow: none; + z-index: auto; + display: inline-block; +} +[dir=rtl] .minicolors-inline .minicolors-panel { + right: auto; +} + +/* Default theme */ +.minicolors-theme-default .minicolors-swatch { + top: 5px; + left: 5px; /* LTR */ + width: 18px; + height: 18px; +} +[dir=rtl] .minicolors-theme-default .minicolors-swatch { + right: 5px; +} +.minicolors-theme-default .minicolors-swatches .minicolors-swatch { + margin-bottom: 2px; + top: 0; + left: 0; /* LTR */ + width: 18px; + height: 18px; +} +[dir=rtl] .minicolors-theme-default .minicolors-swatches .minicolors-swatch { + right: 0; +} +.minicolors-theme-default.minicolors-position-right .minicolors-swatch { + left: auto; /* LTR */ + right: 5px; /* LTR */ +} +[dir=rtl] .minicolors-theme-default.minicolors-position-left .minicolors-swatch { + right: auto; + left: 5px; +} +.minicolors-theme-default.minicolors { + width: auto; + display: inline-block; +} +.minicolors-theme-default .minicolors-input { + height: 20px; + width: auto; + display: inline-block; + padding-left: 26px; /* LTR */ +} +[dir=rtl] .minicolors-theme-default .minicolors-input { + text-align: right; + unicode-bidi: plaintext; + padding-left: 1px; + padding-right: 26px; +} +.minicolors-theme-default.minicolors-position-right .minicolors-input { + padding-right: 26px; /* LTR */ + padding-left: inherit; /* LTR */ +} +[dir=rtl] .minicolors-theme-default.minicolors-position-left .minicolors-input { + padding-right: inherit; + padding-left: 26px; +} + +/* Bootstrap theme */ +.minicolors-theme-bootstrap .minicolors-swatch { + z-index: 2; + top: 3px; + left: 3px; /* LTR */ + width: 28px; + height: 28px; + border-radius: 3px; +} +[dir=rtl] .minicolors-theme-bootstrap .minicolors-swatch { + right: 3px; +} +.minicolors-theme-bootstrap .minicolors-swatches .minicolors-swatch { + margin-bottom: 2px; + top: 0; + left: 0; /* LTR */ + width: 20px; + height: 20px; +} +[dir=rtl] .minicolors-theme-bootstrap .minicolors-swatches .minicolors-swatch { + right: 0; +} +.minicolors-theme-bootstrap .minicolors-swatch-color { + border-radius: inherit; +} +.minicolors-theme-bootstrap.minicolors-position-right > .minicolors-swatch { + left: auto; /* LTR */ + right: 3px; /* LTR */ +} +[dir=rtl] .minicolors-theme-bootstrap.minicolors-position-left > .minicolors-swatch { + right: auto; + left: 3px; +} +.minicolors-theme-bootstrap .minicolors-input { + float: none; + padding-left: 44px; /* LTR */ +} +[dir=rtl] .minicolors-theme-bootstrap .minicolors-input { + text-align: right; + unicode-bidi: plaintext; + padding-left: 12px; + padding-right: 44px; +} +.minicolors-theme-bootstrap.minicolors-position-right .minicolors-input { + padding-right: 44px; /* LTR */ + padding-left: 12px; /* LTR */ +} +[dir=rtl] .minicolors-theme-bootstrap.minicolors-position-left .minicolors-input { + padding-right: 12px; + padding-left: 44px; +} +.minicolors-theme-bootstrap .minicolors-input.input-lg + .minicolors-swatch { + top: 4px; + left: 4px; /* LTR */ + width: 37px; + height: 37px; + border-radius: 5px; +} +[dir=rtl] .minicolors-theme-bootstrap .minicolors-input.input-lg + .minicolors-swatch { + right: 4px; +} +.minicolors-theme-bootstrap .minicolors-input.input-sm + .minicolors-swatch { + width: 24px; + height: 24px; +} +.minicolors-theme-bootstrap .minicolors-input.input-xs + .minicolors-swatch { + width: 18px; + height: 18px; +} +.input-group .minicolors-theme-bootstrap:not(:first-child) .minicolors-input { + border-top-left-radius: 0; /* LTR */ + border-bottom-left-radius: 0; /* LTR */ +} +[dir=rtl] .input-group .minicolors-theme-bootstrap .minicolors-input { + border-radius: 4px; +} +[dir=rtl] .input-group .minicolors-theme-bootstrap:not(:first-child) .minicolors-input { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +[dir=rtl] .input-group .minicolors-theme-bootstrap:not(:last-child) .minicolors-input { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +/* bootstrap input-group rtl override */ +[dir=rtl] .input-group .form-control, +[dir=rtl] .input-group-addon, +[dir=rtl] .input-group-btn > .btn, +[dir=rtl] .input-group-btn > .btn-group > .btn, +[dir=rtl] .input-group-btn > .dropdown-toggle { + border: 1px solid #ccc; + border-radius: 4px; +} +[dir=rtl] .input-group .form-control:first-child, +[dir=rtl] .input-group-addon:first-child, +[dir=rtl] .input-group-btn:first-child > .btn, +[dir=rtl] .input-group-btn:first-child > .btn-group > .btn, +[dir=rtl] .input-group-btn:first-child > .dropdown-toggle, +[dir=rtl] .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle), +[dir=rtl] .input-group-btn:last-child > .btn-group:not(:last-child) > .btn { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + border-left: 0; +} +[dir=rtl] .input-group .form-control:last-child, +[dir=rtl] .input-group-addon:last-child, +[dir=rtl] .input-group-btn:last-child > .btn, +[dir=rtl] .input-group-btn:last-child > .btn-group > .btn, +[dir=rtl] .input-group-btn:last-child > .dropdown-toggle, +[dir=rtl] .input-group-btn:first-child > .btn:not(:first-child), +[dir=rtl] .input-group-btn:first-child > .btn-group:not(:first-child) > .btn { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} + +/* Semantic Ui theme */ +.minicolors-theme-semanticui .minicolors-swatch { + top: 0; + left: 0; /* LTR */ + padding: 18px; +} +[dir=rtl] .minicolors-theme-semanticui .minicolors-swatch { + right: 0; +} +.minicolors-theme-semanticui input { + text-indent: 30px; +} diff --git a/exopite-notificator/admin/exopite-simple-options/assets/dev/jquery.minicolors.js b/exopite-notificator/admin/exopite-simple-options/assets/dev/jquery.minicolors.js new file mode 100644 index 0000000..6c5284a --- /dev/null +++ b/exopite-notificator/admin/exopite-simple-options/assets/dev/jquery.minicolors.js @@ -0,0 +1,1127 @@ +// +// jQuery MiniColors: A tiny color picker built on jQuery +// +// Developed by Cory LaViska for A Beautiful Site, LLC +// +// Licensed under the MIT license: http://opensource.org/licenses/MIT +// +(function (factory) { + if(typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['jquery'], factory); + } else if(typeof exports === 'object') { + // Node/CommonJS + module.exports = factory(require('jquery')); + } else { + // Browser globals + factory(jQuery); + } +}(function ($) { + 'use strict'; + + // Defaults + $.minicolors = { + defaults: { + animationSpeed: 50, + animationEasing: 'swing', + change: null, + changeDelay: 0, + control: 'hue', + defaultValue: '', + format: 'hex', + hide: null, + hideSpeed: 100, + inline: false, + keywords: '', + letterCase: 'lowercase', + opacity: false, + position: 'bottom', + show: null, + showSpeed: 100, + theme: 'default', + swatches: [] + } + }; + + // Public methods + $.extend($.fn, { + minicolors: function(method, data) { + + switch(method) { + // Destroy the control + case 'destroy': + $(this).each(function() { + destroy($(this)); + }); + return $(this); + + // Hide the color picker + case 'hide': + hide(); + return $(this); + + // Get/set opacity + case 'opacity': + // Getter + if(data === undefined) { + // Getter + return $(this).attr('data-opacity'); + } else { + // Setter + $(this).each(function() { + updateFromInput($(this).attr('data-opacity', data)); + }); + } + return $(this); + + // Get an RGB(A) object based on the current color/opacity + case 'rgbObject': + return rgbObject($(this), method === 'rgbaObject'); + + // Get an RGB(A) string based on the current color/opacity + case 'rgbString': + case 'rgbaString': + return rgbString($(this), method === 'rgbaString'); + + // Get/set settings on the fly + case 'settings': + if(data === undefined) { + return $(this).data('minicolors-settings'); + } else { + // Setter + $(this).each(function() { + var settings = $(this).data('minicolors-settings') || {}; + destroy($(this)); + $(this).minicolors($.extend(true, settings, data)); + }); + } + return $(this); + + // Show the color picker + case 'show': + show($(this).eq(0)); + return $(this); + + // Get/set the hex color value + case 'value': + if(data === undefined) { + // Getter + return $(this).val(); + } else { + // Setter + $(this).each(function() { + if(typeof(data) === 'object' && data !== null) { + if(data.opacity !== undefined) { + $(this).attr('data-opacity', keepWithin(data.opacity, 0, 1)); + } + if(data.color) { + $(this).val(data.color); + } + } else { + $(this).val(data); + } + updateFromInput($(this)); + }); + } + return $(this); + + // Initializes the control + default: + if(method !== 'create') data = method; + $(this).each(function() { + init($(this), data); + }); + return $(this); + + } + + } + }); + + // Initialize input elements + function init(input, settings) { + var minicolors = $('
          '); + var defaults = $.minicolors.defaults; + var name; + var size; + var swatches; + var swatch; + var swatchString; + var panel; + var i; + + // Do nothing if already initialized + if(input.data('minicolors-initialized')) return; + + // Handle settings + settings = $.extend(true, {}, defaults, settings); + + // The wrapper + minicolors + .addClass('minicolors-theme-' + settings.theme) + .toggleClass('minicolors-with-opacity', settings.opacity); + + // Custom positioning + if(settings.position !== undefined) { + $.each(settings.position.split(' '), function() { + minicolors.addClass('minicolors-position-' + this); + }); + } + + // Input size + if(settings.format === 'rgb') { + size = settings.opacity ? '25' : '20'; + } else { + size = settings.keywords ? '11' : '7'; + } + + // The input + input + .addClass('minicolors-input') + .data('minicolors-initialized', false) + .data('minicolors-settings', settings) + .prop('size', size) + .wrap(minicolors) + .after( + '
          ' + + '
          ' + + '
          ' + + '
          ' + + '
          ' + + '
          ' + + '
          ' + + '
          ' + + '
          ' + + '
          ' + + '
          ' + + '
          ' + ); + + // The swatch + if(!settings.inline) { + input.after(''); + input.next('.minicolors-input-swatch').on('click', function(event) { + event.preventDefault(); + input.focus(); + }); + } + + // Prevent text selection in IE + panel = input.parent().find('.minicolors-panel'); + panel.on('selectstart', function() { return false; }).end(); + + // Swatches + if(settings.swatches && settings.swatches.length !== 0) { + panel.addClass('minicolors-with-swatches'); + swatches = $('
            ') + .appendTo(panel); + for(i = 0; i < settings.swatches.length; ++i) { + // allow for custom objects as swatches + if($.type(settings.swatches[i]) === 'object') { + name = settings.swatches[i].name; + swatch = settings.swatches[i].color; + } else { + name = ''; + swatch = settings.swatches[i]; + } + swatchString = swatch; + swatch = isRgb(swatch) ? parseRgb(swatch, true) : hex2rgb(parseHex(swatch, true)); + $('
          • ') + .appendTo(swatches) + .data('swatch-color', swatchString) + .find('.minicolors-swatch-color') + .css({ + backgroundColor: rgb2hex(swatch), + opacity: swatch.a + }); + settings.swatches[i] = swatch; + } + } + + // Inline controls + if(settings.inline) input.parent().addClass('minicolors-inline'); + + updateFromInput(input, false); + + input.data('minicolors-initialized', true); + } + + // Returns the input back to its original state + function destroy(input) { + var minicolors = input.parent(); + + // Revert the input element + input + .removeData('minicolors-initialized') + .removeData('minicolors-settings') + .removeProp('size') + .removeClass('minicolors-input'); + + // Remove the wrap and destroy whatever remains + minicolors.before(input).remove(); + } + + // Shows the specified dropdown panel + function show(input) { + var minicolors = input.parent(); + var panel = minicolors.find('.minicolors-panel'); + var settings = input.data('minicolors-settings'); + + // Do nothing if uninitialized, disabled, inline, or already open + if( + !input.data('minicolors-initialized') || + input.prop('disabled') || + minicolors.hasClass('minicolors-inline') || + minicolors.hasClass('minicolors-focus') + ) return; + + hide(); + + minicolors.addClass('minicolors-focus'); + if (panel.animate) { + panel + .stop(true, true) + .fadeIn(settings.showSpeed, function () { + if (settings.show) settings.show.call(input.get(0)); + }); + } else { + panel.show(); + if (settings.show) settings.show.call(input.get(0)); + } + } + + // Hides all dropdown panels + function hide() { + $('.minicolors-focus').each(function() { + var minicolors = $(this); + var input = minicolors.find('.minicolors-input'); + var panel = minicolors.find('.minicolors-panel'); + var settings = input.data('minicolors-settings'); + + if (panel.animate) { + panel.fadeOut(settings.hideSpeed, function () { + if (settings.hide) settings.hide.call(input.get(0)); + minicolors.removeClass('minicolors-focus'); + }); + } else { + panel.hide(); + if (settings.hide) settings.hide.call(input.get(0)); + minicolors.removeClass('minicolors-focus'); + } + }); + } + + // Moves the selected picker + function move(target, event, animate) { + var input = target.parents('.minicolors').find('.minicolors-input'); + var settings = input.data('minicolors-settings'); + var picker = target.find('[class$=-picker]'); + var offsetX = target.offset().left; + var offsetY = target.offset().top; + var x = Math.round(event.pageX - offsetX); + var y = Math.round(event.pageY - offsetY); + var duration = animate ? settings.animationSpeed : 0; + var wx, wy, r, phi, styles; + + // Touch support + if(event.originalEvent.changedTouches) { + x = event.originalEvent.changedTouches[0].pageX - offsetX; + y = event.originalEvent.changedTouches[0].pageY - offsetY; + } + + // Constrain picker to its container + if(x < 0) x = 0; + if(y < 0) y = 0; + if(x > target.width()) x = target.width(); + if(y > target.height()) y = target.height(); + + // Constrain color wheel values to the wheel + if(target.parent().is('.minicolors-slider-wheel') && picker.parent().is('.minicolors-grid')) { + wx = 75 - x; + wy = 75 - y; + r = Math.sqrt(wx * wx + wy * wy); + phi = Math.atan2(wy, wx); + if(phi < 0) phi += Math.PI * 2; + if(r > 75) { + r = 75; + x = 75 - (75 * Math.cos(phi)); + y = 75 - (75 * Math.sin(phi)); + } + x = Math.round(x); + y = Math.round(y); + } + + // Move the picker + styles = { + top: y + 'px' + }; + if(target.is('.minicolors-grid')) { + styles.left = x + 'px'; + } + if (picker.animate) { + picker + .stop(true) + .animate(styles, duration, settings.animationEasing, function() { + updateFromControl(input, target); + }); + } else { + picker + .css(styles); + updateFromControl(input, target); + } + } + + // Sets the input based on the color picker values + function updateFromControl(input, target) { + + function getCoords(picker, container) { + var left, top; + if(!picker.length || !container) return null; + left = picker.offset().left; + top = picker.offset().top; + + return { + x: left - container.offset().left + (picker.outerWidth() / 2), + y: top - container.offset().top + (picker.outerHeight() / 2) + }; + } + + var hue, saturation, brightness, x, y, r, phi; + var hex = input.val(); + var opacity = input.attr('data-opacity'); + + // Helpful references + var minicolors = input.parent(); + var settings = input.data('minicolors-settings'); + var swatch = minicolors.find('.minicolors-input-swatch'); + + // Panel objects + var grid = minicolors.find('.minicolors-grid'); + var slider = minicolors.find('.minicolors-slider'); + var opacitySlider = minicolors.find('.minicolors-opacity-slider'); + + // Picker objects + var gridPicker = grid.find('[class$=-picker]'); + var sliderPicker = slider.find('[class$=-picker]'); + var opacityPicker = opacitySlider.find('[class$=-picker]'); + + // Picker positions + var gridPos = getCoords(gridPicker, grid); + var sliderPos = getCoords(sliderPicker, slider); + var opacityPos = getCoords(opacityPicker, opacitySlider); + + // Handle colors + if(target.is('.minicolors-grid, .minicolors-slider, .minicolors-opacity-slider')) { + + // Determine HSB values + switch(settings.control) { + case 'wheel': + // Calculate hue, saturation, and brightness + x = (grid.width() / 2) - gridPos.x; + y = (grid.height() / 2) - gridPos.y; + r = Math.sqrt(x * x + y * y); + phi = Math.atan2(y, x); + if(phi < 0) phi += Math.PI * 2; + if(r > 75) { + r = 75; + gridPos.x = 69 - (75 * Math.cos(phi)); + gridPos.y = 69 - (75 * Math.sin(phi)); + } + saturation = keepWithin(r / 0.75, 0, 100); + hue = keepWithin(phi * 180 / Math.PI, 0, 360); + brightness = keepWithin(100 - Math.floor(sliderPos.y * (100 / slider.height())), 0, 100); + hex = hsb2hex({ + h: hue, + s: saturation, + b: brightness + }); + + // Update UI + slider.css('backgroundColor', hsb2hex({ h: hue, s: saturation, b: 100 })); + break; + + case 'saturation': + // Calculate hue, saturation, and brightness + hue = keepWithin(parseInt(gridPos.x * (360 / grid.width()), 10), 0, 360); + saturation = keepWithin(100 - Math.floor(sliderPos.y * (100 / slider.height())), 0, 100); + brightness = keepWithin(100 - Math.floor(gridPos.y * (100 / grid.height())), 0, 100); + hex = hsb2hex({ + h: hue, + s: saturation, + b: brightness + }); + + // Update UI + slider.css('backgroundColor', hsb2hex({ h: hue, s: 100, b: brightness })); + minicolors.find('.minicolors-grid-inner').css('opacity', saturation / 100); + break; + + case 'brightness': + // Calculate hue, saturation, and brightness + hue = keepWithin(parseInt(gridPos.x * (360 / grid.width()), 10), 0, 360); + saturation = keepWithin(100 - Math.floor(gridPos.y * (100 / grid.height())), 0, 100); + brightness = keepWithin(100 - Math.floor(sliderPos.y * (100 / slider.height())), 0, 100); + hex = hsb2hex({ + h: hue, + s: saturation, + b: brightness + }); + + // Update UI + slider.css('backgroundColor', hsb2hex({ h: hue, s: saturation, b: 100 })); + minicolors.find('.minicolors-grid-inner').css('opacity', 1 - (brightness / 100)); + break; + + default: + // Calculate hue, saturation, and brightness + hue = keepWithin(360 - parseInt(sliderPos.y * (360 / slider.height()), 10), 0, 360); + saturation = keepWithin(Math.floor(gridPos.x * (100 / grid.width())), 0, 100); + brightness = keepWithin(100 - Math.floor(gridPos.y * (100 / grid.height())), 0, 100); + hex = hsb2hex({ + h: hue, + s: saturation, + b: brightness + }); + + // Update UI + grid.css('backgroundColor', hsb2hex({ h: hue, s: 100, b: 100 })); + break; + } + + // Handle opacity + if(settings.opacity) { + opacity = parseFloat(1 - (opacityPos.y / opacitySlider.height())).toFixed(2); + } else { + opacity = 1; + } + + updateInput(input, hex, opacity); + } + else { + // Set swatch color + swatch.find('span').css({ + backgroundColor: hex, + opacity: opacity + }); + + // Handle change event + doChange(input, hex, opacity); + } + } + + // Sets the value of the input and does the appropriate conversions + // to respect settings, also updates the swatch + function updateInput(input, value, opacity) { + var rgb; + + // Helpful references + var minicolors = input.parent(); + var settings = input.data('minicolors-settings'); + var swatch = minicolors.find('.minicolors-input-swatch'); + + if(settings.opacity) input.attr('data-opacity', opacity); + + // Set color string + if(settings.format === 'rgb') { + // Returns RGB(A) string + + // Checks for input format and does the conversion + if(isRgb(value)) { + rgb = parseRgb(value, true); + } + else { + rgb = hex2rgb(parseHex(value, true)); + } + + opacity = input.attr('data-opacity') === '' ? 1 : keepWithin(parseFloat(input.attr('data-opacity')).toFixed(2), 0, 1); + if(isNaN(opacity) || !settings.opacity) opacity = 1; + + if(input.minicolors('rgbObject').a <= 1 && rgb && settings.opacity) { + // Set RGBA string if alpha + value = 'rgba(' + rgb.r + ', ' + rgb.g + ', ' + rgb.b + ', ' + parseFloat(opacity) + ')'; + } else { + // Set RGB string (alpha = 1) + value = 'rgb(' + rgb.r + ', ' + rgb.g + ', ' + rgb.b + ')'; + } + } else { + // Returns hex color + + // Checks for input format and does the conversion + if(isRgb(value)) { + value = rgbString2hex(value); + } + + value = convertCase(value, settings.letterCase); + } + + // Update value from picker + input.val(value); + + // Set swatch color + swatch.find('span').css({ + backgroundColor: value, + opacity: opacity + }); + + // Handle change event + doChange(input, value, opacity); + } + + // Sets the color picker values from the input + function updateFromInput(input, preserveInputValue) { + var hex, hsb, opacity, keywords, alpha, value, x, y, r, phi; + + // Helpful references + var minicolors = input.parent(); + var settings = input.data('minicolors-settings'); + var swatch = minicolors.find('.minicolors-input-swatch'); + + // Panel objects + var grid = minicolors.find('.minicolors-grid'); + var slider = minicolors.find('.minicolors-slider'); + var opacitySlider = minicolors.find('.minicolors-opacity-slider'); + + // Picker objects + var gridPicker = grid.find('[class$=-picker]'); + var sliderPicker = slider.find('[class$=-picker]'); + var opacityPicker = opacitySlider.find('[class$=-picker]'); + + // Determine hex/HSB values + if(isRgb(input.val())) { + // If input value is a rgb(a) string, convert it to hex color and update opacity + hex = rgbString2hex(input.val()); + alpha = keepWithin(parseFloat(getAlpha(input.val())).toFixed(2), 0, 1); + if(alpha) { + input.attr('data-opacity', alpha); + } + } else { + hex = convertCase(parseHex(input.val(), true), settings.letterCase); + } + + if(!hex){ + hex = convertCase(parseInput(settings.defaultValue, true), settings.letterCase); + } + hsb = hex2hsb(hex); + + // Get array of lowercase keywords + keywords = !settings.keywords ? [] : $.map(settings.keywords.split(','), function(a) { + return $.trim(a.toLowerCase()); + }); + + // Set color string + if(input.val() !== '' && $.inArray(input.val().toLowerCase(), keywords) > -1) { + value = convertCase(input.val()); + } else { + value = isRgb(input.val()) ? parseRgb(input.val()) : hex; + } + + // Update input value + if(!preserveInputValue) input.val(value); + + // Determine opacity value + if(settings.opacity) { + // Get from data-opacity attribute and keep within 0-1 range + opacity = input.attr('data-opacity') === '' ? 1 : keepWithin(parseFloat(input.attr('data-opacity')).toFixed(2), 0, 1); + if(isNaN(opacity)) opacity = 1; + input.attr('data-opacity', opacity); + swatch.find('span').css('opacity', opacity); + + // Set opacity picker position + y = keepWithin(opacitySlider.height() - (opacitySlider.height() * opacity), 0, opacitySlider.height()); + opacityPicker.css('top', y + 'px'); + } + + // Set opacity to zero if input value is transparent + if(input.val().toLowerCase() === 'transparent') { + swatch.find('span').css('opacity', 0); + } + + // Update swatch + swatch.find('span').css('backgroundColor', hex); + + // Determine picker locations + switch(settings.control) { + case 'wheel': + // Set grid position + r = keepWithin(Math.ceil(hsb.s * 0.75), 0, grid.height() / 2); + phi = hsb.h * Math.PI / 180; + x = keepWithin(75 - Math.cos(phi) * r, 0, grid.width()); + y = keepWithin(75 - Math.sin(phi) * r, 0, grid.height()); + gridPicker.css({ + top: y + 'px', + left: x + 'px' + }); + + // Set slider position + y = 150 - (hsb.b / (100 / grid.height())); + if(hex === '') y = 0; + sliderPicker.css('top', y + 'px'); + + // Update panel color + slider.css('backgroundColor', hsb2hex({ h: hsb.h, s: hsb.s, b: 100 })); + break; + + case 'saturation': + // Set grid position + x = keepWithin((5 * hsb.h) / 12, 0, 150); + y = keepWithin(grid.height() - Math.ceil(hsb.b / (100 / grid.height())), 0, grid.height()); + gridPicker.css({ + top: y + 'px', + left: x + 'px' + }); + + // Set slider position + y = keepWithin(slider.height() - (hsb.s * (slider.height() / 100)), 0, slider.height()); + sliderPicker.css('top', y + 'px'); + + // Update UI + slider.css('backgroundColor', hsb2hex({ h: hsb.h, s: 100, b: hsb.b })); + minicolors.find('.minicolors-grid-inner').css('opacity', hsb.s / 100); + break; + + case 'brightness': + // Set grid position + x = keepWithin((5 * hsb.h) / 12, 0, 150); + y = keepWithin(grid.height() - Math.ceil(hsb.s / (100 / grid.height())), 0, grid.height()); + gridPicker.css({ + top: y + 'px', + left: x + 'px' + }); + + // Set slider position + y = keepWithin(slider.height() - (hsb.b * (slider.height() / 100)), 0, slider.height()); + sliderPicker.css('top', y + 'px'); + + // Update UI + slider.css('backgroundColor', hsb2hex({ h: hsb.h, s: hsb.s, b: 100 })); + minicolors.find('.minicolors-grid-inner').css('opacity', 1 - (hsb.b / 100)); + break; + + default: + // Set grid position + x = keepWithin(Math.ceil(hsb.s / (100 / grid.width())), 0, grid.width()); + y = keepWithin(grid.height() - Math.ceil(hsb.b / (100 / grid.height())), 0, grid.height()); + gridPicker.css({ + top: y + 'px', + left: x + 'px' + }); + + // Set slider position + y = keepWithin(slider.height() - (hsb.h / (360 / slider.height())), 0, slider.height()); + sliderPicker.css('top', y + 'px'); + + // Update panel color + grid.css('backgroundColor', hsb2hex({ h: hsb.h, s: 100, b: 100 })); + break; + } + + // Fire change event, but only if minicolors is fully initialized + if(input.data('minicolors-initialized')) { + doChange(input, value, opacity); + } + } + + // Runs the change and changeDelay callbacks + function doChange(input, value, opacity) { + var settings = input.data('minicolors-settings'); + var lastChange = input.data('minicolors-lastChange'); + var obj, sel, i; + + // Only run if it actually changed + if(!lastChange || lastChange.value !== value || lastChange.opacity !== opacity) { + + // Remember last-changed value + input.data('minicolors-lastChange', { + value: value, + opacity: opacity + }); + + // Check and select applicable swatch + if(settings.swatches && settings.swatches.length !== 0) { + if(!isRgb(value)) { + obj = hex2rgb(value); + } + else { + obj = parseRgb(value, true); + } + sel = -1; + for(i = 0; i < settings.swatches.length; ++i) { + if(obj.r === settings.swatches[i].r && obj.g === settings.swatches[i].g && obj.b === settings.swatches[i].b && obj.a === settings.swatches[i].a) { + sel = i; + break; + } + } + + input.parent().find('.minicolors-swatches .minicolors-swatch').removeClass('selected'); + if(sel !== -1) { + input.parent().find('.minicolors-swatches .minicolors-swatch').eq(i).addClass('selected'); + } + } + + // Fire change event + if(settings.change) { + if(settings.changeDelay) { + // Call after a delay + clearTimeout(input.data('minicolors-changeTimeout')); + input.data('minicolors-changeTimeout', setTimeout(function() { + settings.change.call(input.get(0), value, opacity); + }, settings.changeDelay)); + } else { + // Call immediately + settings.change.call(input.get(0), value, opacity); + } + } + input.trigger('change').trigger('input'); + } + } + + // Generates an RGB(A) object based on the input's value + function rgbObject(input) { + var rgb, + opacity = $(input).attr('data-opacity'); + if( isRgb($(input).val()) ) { + rgb = parseRgb($(input).val(), true); + } else { + var hex = parseHex($(input).val(), true); + rgb = hex2rgb(hex); + } + if( !rgb ) return null; + if( opacity !== undefined ) $.extend(rgb, { a: parseFloat(opacity) }); + return rgb; + } + + // Generates an RGB(A) string based on the input's value + function rgbString(input, alpha) { + var rgb, + opacity = $(input).attr('data-opacity'); + if( isRgb($(input).val()) ) { + rgb = parseRgb($(input).val(), true); + } else { + var hex = parseHex($(input).val(), true); + rgb = hex2rgb(hex); + } + if( !rgb ) return null; + if( opacity === undefined ) opacity = 1; + if( alpha ) { + return 'rgba(' + rgb.r + ', ' + rgb.g + ', ' + rgb.b + ', ' + parseFloat(opacity) + ')'; + } else { + return 'rgb(' + rgb.r + ', ' + rgb.g + ', ' + rgb.b + ')'; + } + } + + // Converts to the letter case specified in settings + function convertCase(string, letterCase) { + return letterCase === 'uppercase' ? string.toUpperCase() : string.toLowerCase(); + } + + // Parses a string and returns a valid hex string when possible + function parseHex(string, expand) { + string = string.replace(/^#/g, ''); + if(!string.match(/^[A-F0-9]{3,6}/ig)) return ''; + if(string.length !== 3 && string.length !== 6) return ''; + if(string.length === 3 && expand) { + string = string[0] + string[0] + string[1] + string[1] + string[2] + string[2]; + } + return '#' + string; + } + + // Parses a string and returns a valid RGB(A) string when possible + function parseRgb(string, obj) { + var values = string.replace(/[^\d,.]/g, ''); + var rgba = values.split(','); + + rgba[0] = keepWithin(parseInt(rgba[0], 10), 0, 255); + rgba[1] = keepWithin(parseInt(rgba[1], 10), 0, 255); + rgba[2] = keepWithin(parseInt(rgba[2], 10), 0, 255); + if(rgba[3] !== undefined) { + rgba[3] = keepWithin(parseFloat(rgba[3], 10), 0, 1); + } + + // Return RGBA object + if( obj ) { + if (rgba[3] !== undefined) { + return { + r: rgba[0], + g: rgba[1], + b: rgba[2], + a: rgba[3] + }; + } else { + return { + r: rgba[0], + g: rgba[1], + b: rgba[2] + }; + } + } + + // Return RGBA string + if(typeof(rgba[3]) !== 'undefined' && rgba[3] <= 1) { + return 'rgba(' + rgba[0] + ', ' + rgba[1] + ', ' + rgba[2] + ', ' + rgba[3] + ')'; + } else { + return 'rgb(' + rgba[0] + ', ' + rgba[1] + ', ' + rgba[2] + ')'; + } + + } + + // Parses a string and returns a valid color string when possible + function parseInput(string, expand) { + if(isRgb(string)) { + // Returns a valid rgb(a) string + return parseRgb(string); + } else { + return parseHex(string, expand); + } + } + + // Keeps value within min and max + function keepWithin(value, min, max) { + if(value < min) value = min; + if(value > max) value = max; + return value; + } + + // Checks if a string is a valid RGB(A) string + function isRgb(string) { + var rgb = string.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i); + return (rgb && rgb.length === 4) ? true : false; + } + + // Function to get alpha from a RGB(A) string + function getAlpha(rgba) { + rgba = rgba.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+(\.\d{1,2})?|\.\d{1,2})[\s+]?/i); + return (rgba && rgba.length === 6) ? rgba[4] : '1'; + } + + // Converts an HSB object to an RGB object + function hsb2rgb(hsb) { + var rgb = {}; + var h = Math.round(hsb.h); + var s = Math.round(hsb.s * 255 / 100); + var v = Math.round(hsb.b * 255 / 100); + if(s === 0) { + rgb.r = rgb.g = rgb.b = v; + } else { + var t1 = v; + var t2 = (255 - s) * v / 255; + var t3 = (t1 - t2) * (h % 60) / 60; + if(h === 360) h = 0; + if(h < 60) { rgb.r = t1; rgb.b = t2; rgb.g = t2 + t3; } + else if(h < 120) {rgb.g = t1; rgb.b = t2; rgb.r = t1 - t3; } + else if(h < 180) {rgb.g = t1; rgb.r = t2; rgb.b = t2 + t3; } + else if(h < 240) {rgb.b = t1; rgb.r = t2; rgb.g = t1 - t3; } + else if(h < 300) {rgb.b = t1; rgb.g = t2; rgb.r = t2 + t3; } + else if(h < 360) {rgb.r = t1; rgb.g = t2; rgb.b = t1 - t3; } + else { rgb.r = 0; rgb.g = 0; rgb.b = 0; } + } + return { + r: Math.round(rgb.r), + g: Math.round(rgb.g), + b: Math.round(rgb.b) + }; + } + + // Converts an RGB string to a hex string + function rgbString2hex(rgb){ + rgb = rgb.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i); + return (rgb && rgb.length === 4) ? '#' + + ('0' + parseInt(rgb[1],10).toString(16)).slice(-2) + + ('0' + parseInt(rgb[2],10).toString(16)).slice(-2) + + ('0' + parseInt(rgb[3],10).toString(16)).slice(-2) : ''; + } + + // Converts an RGB object to a hex string + function rgb2hex(rgb) { + var hex = [ + rgb.r.toString(16), + rgb.g.toString(16), + rgb.b.toString(16) + ]; + $.each(hex, function(nr, val) { + if(val.length === 1) hex[nr] = '0' + val; + }); + return '#' + hex.join(''); + } + + // Converts an HSB object to a hex string + function hsb2hex(hsb) { + return rgb2hex(hsb2rgb(hsb)); + } + + // Converts a hex string to an HSB object + function hex2hsb(hex) { + var hsb = rgb2hsb(hex2rgb(hex)); + if(hsb.s === 0) hsb.h = 360; + return hsb; + } + + // Converts an RGB object to an HSB object + function rgb2hsb(rgb) { + var hsb = { h: 0, s: 0, b: 0 }; + var min = Math.min(rgb.r, rgb.g, rgb.b); + var max = Math.max(rgb.r, rgb.g, rgb.b); + var delta = max - min; + hsb.b = max; + hsb.s = max !== 0 ? 255 * delta / max : 0; + if(hsb.s !== 0) { + if(rgb.r === max) { + hsb.h = (rgb.g - rgb.b) / delta; + } else if(rgb.g === max) { + hsb.h = 2 + (rgb.b - rgb.r) / delta; + } else { + hsb.h = 4 + (rgb.r - rgb.g) / delta; + } + } else { + hsb.h = -1; + } + hsb.h *= 60; + if(hsb.h < 0) { + hsb.h += 360; + } + hsb.s *= 100/255; + hsb.b *= 100/255; + return hsb; + } + + // Converts a hex string to an RGB object + function hex2rgb(hex) { + hex = parseInt(((hex.indexOf('#') > -1) ? hex.substring(1) : hex), 16); + return { + r: hex >> 16, + g: (hex & 0x00FF00) >> 8, + b: (hex & 0x0000FF) + }; + } + + // Handle events + $([document]) + // Hide on clicks outside of the control + .on('mousedown.minicolors touchstart.minicolors', function(event) { + if(!$(event.target).parents().add(event.target).hasClass('minicolors')) { + hide(); + } + }) + // Start moving + .on('mousedown.minicolors touchstart.minicolors', '.minicolors-grid, .minicolors-slider, .minicolors-opacity-slider', function(event) { + var target = $(this); + event.preventDefault(); + $(event.delegateTarget).data('minicolors-target', target); + move(target, event, true); + }) + // Move pickers + .on('mousemove.minicolors touchmove.minicolors', function(event) { + var target = $(event.delegateTarget).data('minicolors-target'); + if(target) move(target, event); + }) + // Stop moving + .on('mouseup.minicolors touchend.minicolors', function() { + $(this).removeData('minicolors-target'); + }) + // Selected a swatch + .on('click.minicolors', '.minicolors-swatches li', function(event) { + event.preventDefault(); + var target = $(this), input = target.parents('.minicolors').find('.minicolors-input'), color = target.data('swatch-color'); + updateInput(input, color, getAlpha(color)); + updateFromInput(input); + }) + // Show panel when swatch is clicked + .on('mousedown.minicolors touchstart.minicolors', '.minicolors-input-swatch', function(event) { + var input = $(this).parent().find('.minicolors-input'); + event.preventDefault(); + show(input); + }) + // Show on focus + .on('focus.minicolors', '.minicolors-input', function() { + var input = $(this); + if(!input.data('minicolors-initialized')) return; + show(input); + }) + // Update value on blur + .on('blur.minicolors', '.minicolors-input', function() { + var input = $(this); + var settings = input.data('minicolors-settings'); + var keywords; + var hex; + var rgba; + var swatchOpacity; + var value; + + if(!input.data('minicolors-initialized')) return; + + // Get array of lowercase keywords + keywords = !settings.keywords ? [] : $.map(settings.keywords.split(','), function(a) { + return $.trim(a.toLowerCase()); + }); + + // Set color string + if(input.val() !== '' && $.inArray(input.val().toLowerCase(), keywords) > -1) { + value = input.val(); + } else { + // Get RGBA values for easy conversion + if(isRgb(input.val())) { + rgba = parseRgb(input.val(), true); + } else { + hex = parseHex(input.val(), true); + rgba = hex ? hex2rgb(hex) : null; + } + + // Convert to format + if(rgba === null) { + value = settings.defaultValue; + } else if(settings.format === 'rgb') { + value = settings.opacity ? + parseRgb('rgba(' + rgba.r + ',' + rgba.g + ',' + rgba.b + ',' + input.attr('data-opacity') + ')') : + parseRgb('rgb(' + rgba.r + ',' + rgba.g + ',' + rgba.b + ')'); + } else { + value = rgb2hex(rgba); + } + } + + // Update swatch opacity + swatchOpacity = settings.opacity ? input.attr('data-opacity') : 1; + if(value.toLowerCase() === 'transparent') swatchOpacity = 0; + input + .closest('.minicolors') + .find('.minicolors-input-swatch > span') + .css('opacity', swatchOpacity); + + // Set input value + input.val(value); + + // Is it blank? + if(input.val() === '') input.val(parseInput(settings.defaultValue, true)); + + // Adjust case + input.val(convertCase(input.val(), settings.letterCase)); + + }) + // Handle keypresses + .on('keydown.minicolors', '.minicolors-input', function(event) { + var input = $(this); + if(!input.data('minicolors-initialized')) return; + switch(event.which) { + case 9: // tab + hide(); + break; + case 13: // enter + case 27: // esc + hide(); + input.blur(); + break; + } + }) + // Update on keyup + .on('keyup.minicolors', '.minicolors-input', function() { + var input = $(this); + if(!input.data('minicolors-initialized')) return; + updateFromInput(input, true); + }) + // Update on paste + .on('paste.minicolors', '.minicolors-input', function() { + var input = $(this); + if(!input.data('minicolors-initialized')) return; + setTimeout(function() { + updateFromInput(input, true); + }, 1); + }); +})); diff --git a/exopite-notificator/admin/exopite-simple-options/assets/dev/loader-color-picker.js b/exopite-notificator/admin/exopite-simple-options/assets/dev/loader-color-picker.js index c062918..c524bb0 100644 --- a/exopite-notificator/admin/exopite-simple-options/assets/dev/loader-color-picker.js +++ b/exopite-notificator/admin/exopite-simple-options/assets/dev/loader-color-picker.js @@ -1,22 +1,94 @@ -;(function( $ ) { - "use strict"; - $( document ).ready(function() { - - $( '.colorpicker' ).wpColorPicker({ - /** - * @param {Event} event - standard jQuery event, produced by whichever - * control was changed. - * @param {Object} ui - standard jQuery UI object, with a color member - * containing a Color.js object. - */ - change: function (event, ui) { - var color = ui.color.toString(); - if ($(this).hasClass('font-color-js')) { - $(this).parents('.exopite-sof-font-field').find('.exopite-sof-font-preview').css({'color': color}); - } - }, +/** + * Exopite Simple Options Framework Trumbowyg + */ +; (function ($, window, document, undefined) { + + var pluginName = "exopiteSOFColorpicker"; + + // The actual plugin constructor + function Plugin(element, options) { + + this.element = element; + this._name = pluginName; + this.$element = $(element); + this.init(); + + } + + Plugin.prototype = { + + init: function () { + + var plugin = this; + + plugin.$element.find('.colorpicker').each(function (index, el) { + + if ($(el).closest('.exopite-sof-cloneable__item').hasClass('exopite-sof-cloneable__muster')) return; + if ($(el).hasClass('disabled')) return; + + $(el).wpColorPicker({ + /** + * @param {Event} event - standard jQuery event, produced by whichever + * control was changed. + * @param {Object} ui - standard jQuery UI object, with a color member + * containing a Color.js object. + */ + change: function (event, ui) { + plugin.change(event, ui, $(this)); + }, + }); + + }); + + plugin.$element.closest('.exopite-sof-wrapper').on('exopite-sof-field-group-item-added-after', function (event, $cloned) { + + $cloned.find('.colorpicker').each(function (index, el) { + + if ($(el).closest('.exopite-sof-cloneable__item').hasClass('exopite-sof-cloneable__muster')) return; + if ($(el).hasClass('disabled')) return; + + $(el).wpColorPicker({ + change: function (event, ui) { + plugin.change(event, ui, $(this)); + }, + }); + + }); + + console.log('color picker clone'); + + }); + + }, + + change: function (event, ui, $this) { + var color = ui.color.toString(); + if ($this.hasClass('font-color-js')) { + console.log('has font-color'); + $this.parents('.exopite-sof-font-field').find('.exopite-sof-font-preview').css({ 'color': color }); + } + }, + + }; + + $.fn[pluginName] = function (options) { + return this.each(function () { + if (!$.data(this, "plugin_" + pluginName)) { + $.data(this, "plugin_" + pluginName, + new Plugin(this, options)); + } }); + }; + +})(jQuery, window, document); + +; (function ($) { + "use strict"; + + $(document).ready(function () { + + $('.exopite-sof-field').exopiteSOFColorpicker(); }); diff --git a/exopite-notificator/admin/exopite-simple-options/assets/dev/loader-datepicker.js b/exopite-notificator/admin/exopite-simple-options/assets/dev/loader-datepicker.js index 6fd1848..ebb92d3 100644 --- a/exopite-notificator/admin/exopite-simple-options/assets/dev/loader-datepicker.js +++ b/exopite-notificator/admin/exopite-simple-options/assets/dev/loader-datepicker.js @@ -1,13 +1,79 @@ -;(function( $ ) { - "use strict"; - $( document ).ready(function() { +/** + * Exopite Simple Options Framework Trumbowyg + */ +; (function ($, window, document, undefined) { + + var pluginName = "exopiteSOFDatepicker"; + + // The actual plugin constructor + function Plugin(element, options) { + + this.element = element; + this._name = pluginName; + this.$element = $(element); + this.init(); + + } + + Plugin.prototype = { + + init: function () { + + var plugin = this; + + plugin.$element.find('.datepicker').each(function (index, el) { + if ($(el).parents('.exopite-sof-cloneable__muster').length) return; + if ($(el).hasClass('.disabled')) return; + var dateFormat = $(el).data('format'); + $(el).datepicker({ 'dateFormat': dateFormat }); + }); + + plugin.$element.closest('.exopite-sof-wrapper').on('exopite-sof-field-group-item-added-after', function (event, $cloned) { + + $cloned.find('.datepicker').each(function (index, el) { + + /** + * For some reason, datepicker will be attached to muster. + * Check if exist before added, if yes, firs tremove it. + */ + if ($(el).closest('.exopite-sof-cloneable__item').hasClass('exopite-sof-cloneable__muster')) return; + if ($(el).hasClass('disabled')) return; - $( '.datepicker' ).each(function(index, el) { - if ( $( el ).parents( '.exopite-sof-cloneable__muster' ).length ) return; - var dateFormat = $( el ).data( 'format' ); - $( el ).datepicker( { 'dateFormat': dateFormat } ); + if ($(el).hasClass('hasDatepicker')) { + $(el).datepicker("destroy"); + $(el).removeClass("hasDatepicker").removeAttr('id'); + } + + var dateFormat = $(el).data('format'); + $(el).datepicker({ 'dateFormat': dateFormat }); + + + }); + + }); + + }, + + }; + + $.fn[pluginName] = function (options) { + return this.each(function () { + if (!$.data(this, "plugin_" + pluginName)) { + $.data(this, "plugin_" + pluginName, + new Plugin(this, options)); + } }); + }; + +})(jQuery, window, document); + +; (function ($) { + "use strict"; + + $(document).ready(function () { + + $('.exopite-sof-field-date').exopiteSOFDatepicker(); }); diff --git a/exopite-notificator/admin/exopite-simple-options/assets/dev/loader-jquery-trumbowyg.js b/exopite-notificator/admin/exopite-simple-options/assets/dev/loader-jquery-trumbowyg.js index 65a2f93..38c593c 100644 --- a/exopite-notificator/admin/exopite-simple-options/assets/dev/loader-jquery-trumbowyg.js +++ b/exopite-notificator/admin/exopite-simple-options/assets/dev/loader-jquery-trumbowyg.js @@ -46,13 +46,16 @@ ['fullscreen'] ]; + // plugin.$element.find('.trumbowyg-js').not('.disabled').trumbowyg(plugin.trumbowygOptions); plugin.$element.find('.trumbowyg-js').not(':disabled').trumbowyg(plugin.trumbowygOptions); - var $group = plugin.$element.parents('.exopite-sof-field-group'); + var $group = plugin.$element.closest('.exopite-sof-group'); + // $group.on('exopite-sof-field-group-item-added-after', function (event, $cloned) { plugin.$element.on('exopite-sof-field-group-item-added-after', function (event, $cloned) { - $cloned.find('.trumbowyg-js').trumbowyg(plugin.trumbowygOptions); + console.log('test exopite-sof-field-group-item-added-after'); + $cloned.find('.trumbowyg-js').not(':disabled').trumbowyg(plugin.trumbowygOptions); }); diff --git a/exopite-notificator/admin/exopite-simple-options/assets/dev/loader-minicolors.js b/exopite-notificator/admin/exopite-simple-options/assets/dev/loader-minicolors.js new file mode 100644 index 0000000..2f026e4 --- /dev/null +++ b/exopite-notificator/admin/exopite-simple-options/assets/dev/loader-minicolors.js @@ -0,0 +1,114 @@ + +/** + * Exopite Simple Options Framework Color Picker + * + * https://tovic.github.io/color-picker/#section:extend + * https://bgrins.github.io/spectrum/ + * https://www.jqueryscript.net/other/Color-Picker-Plugin-jQuery-MiniColors.html + * - https://www.jqueryscript.net/demo/Color-Picker-Plugin-jQuery-MiniColors/ + * https://www.jqueryscript.net/other/Color-Picker-Plugin-jQuery-ChromoSelector.html + */ +; (function ($, window, document, undefined) { + + var pluginName = "exopiteSOFMinicolors"; + + // The actual plugin constructor + function Plugin(element, options) { + + this.element = element; + this._name = pluginName; + this.$element = $(element); + this.init(); + + } + + Plugin.prototype = { + + init: function () { + + var plugin = this; + + plugin.minicolorOptions = { + theme: 'default', + swatches: '#000|#fff|#f00|#dd9933|#eeee22|#81d742|#1e73be|#8224e3|#2196f3|#4caf50|#ffeb3b|#ff9800|#795548|rgba(0, 0, 0, 0)'.split('|'), + change: function(value, opacity) { + plugin.change(value, opacity, $(this)); + if( !value ) return; + }, + hide : function() { + let color = $(this).val(); + $(this).val( plugin.rgb2hex(color) ); + } + }; + + plugin.$element.find('.minicolor').each(function (index, el) { + + if ($(el).closest('.exopite-sof-cloneable__item').hasClass('exopite-sof-cloneable__muster')) return; + if ($(el).hasClass('disabled')) return; + + plugin.minicolorOptions.opacity = $(el).attr('data-opacity') || false; + plugin.minicolorOptions.control = $(el).attr('data-control') || 'saturation'; + plugin.minicolorOptions.format = $(el).attr('data-format') || 'rgb'; + + $(el).minicolors(plugin.minicolorOptions); + + }); + + plugin.$element.closest('.exopite-sof-wrapper').on('exopite-sof-field-group-item-added-after', function (event, $cloned) { + + $cloned.find('.minicolor').each(function (index, el) { + + if ($(el).closest('.exopite-sof-cloneable__item').hasClass('exopite-sof-cloneable__muster')) return; + if ($(el).hasClass('disabled')) return; + + $(el).minicolors(plugin.minicolorOptions); + + }); + + }); + + }, + rgb2hex: function (rgb){ + var plugin = this; + rgba = rgb.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?1[\s+]?\)/i); + console.log('rgba: ' + rgba); + if (rgba === null) return rgb; + return (rgba && rgba.length === 4) ? "#" + + ("0" + parseInt(rgba[1],10).toString(16)).slice(-2) + + ("0" + parseInt(rgba[2],10).toString(16)).slice(-2) + + ("0" + parseInt(rgba[3],10).toString(16)).slice(-2) : ''; + }, + change: function (value, opacity, $this) { + var plugin = this; + var color = value; + if ($this.hasClass('font-color-js')) { + console.log('has font-color'); + $this.parents('.exopite-sof-font-field').find('.exopite-sof-font-preview').css({ 'color': color }); + } + + $this.val( plugin.rgb2hex(color) ); + }, + + }; + + $.fn[pluginName] = function (options) { + return this.each(function () { + if (!$.data(this, "plugin_" + pluginName)) { + $.data(this, "plugin_" + pluginName, + new Plugin(this, options)); + } + }); + }; + +})(jQuery, window, document); + +; (function ($) { + "use strict"; + + $(document).ready(function () { + + $('.exopite-sof-field').exopiteSOFMinicolors(); + + }); + +}(jQuery)); diff --git a/exopite-notificator/admin/exopite-simple-options/assets/dev/scripts.js b/exopite-notificator/admin/exopite-simple-options/assets/dev/scripts.js index cbf5070..5fc29b8 100644 --- a/exopite-notificator/admin/exopite-simple-options/assets/dev/scripts.js +++ b/exopite-notificator/admin/exopite-simple-options/assets/dev/scripts.js @@ -23,6 +23,19 @@ if (typeof throttle !== "function") { } } +// https://stackoverflow.com/questions/24159478/skip-recursion-in-jquery-find-for-a-selector/24215566?noredirect=1#comment37410122_24215566 +jQuery.fn.findExclude = function (selector, mask, result) { + result = typeof result !== 'undefined' ? result : new jQuery(); + this.children().each(function () { + var thisObject = jQuery(this); + if (thisObject.is(selector)) + result.push(this); + if (!thisObject.is(mask)) + thisObject.findExclude(selector, mask, result); + }); + return result; +} + /** * Get url parameter in jQuery * @link https://stackoverflow.com/questions/19491336/get-url-parameter-jquery-or-how-to-get-query-string-values-in-js/25359264#25359264 @@ -51,7 +64,7 @@ if (typeof throttle !== "function") { */ ; (function ($, window, document, undefined) { 'use strict'; - /* + /** * Dependency System * * Codestar Framework @@ -121,8 +134,8 @@ if (typeof throttle !== "function") { })(jQuery, window, document); -/* - * Exopite Save Options with AJAX +/** + * Exopite SOF Save Options with AJAX */ ; (function ($, window, document, undefined) { @@ -202,6 +215,14 @@ if (typeof throttle !== "function") { }, + /** + * https://thoughtbot.com/blog/ridiculously-simple-ajax-uploads-with-formdata + * https://stackoverflow.com/questions/17066875/how-to-inspect-formdata + * https://developer.mozilla.org/en-US/docs/Web/API/FormData/FormData + * https://developer.mozilla.org/en-US/docs/Web/API/FormData + * https://stackoverflow.com/questions/2019608/pass-entire-form-as-data-in-jquery-ajax-function + * https://stackoverflow.com/questions/33487360/formdata-and-checkboxes + */ submitOptions: function (event) { event.preventDefault(); @@ -216,12 +237,46 @@ if (typeof throttle !== "function") { tinyMCE.triggerSave(); } + var formElement = $(this)[0]; + var formData = new FormData(formElement); + + var formName = $('.exopite-sof-form-js').attr('name'); + /** - * Ajax save submit - * - * @link https://www.wpoptimus.com/434/save-plugin-theme-setting-options-ajax-wordpress/ + * 2.) Via ajaxSubmit */ + var $that = $(this); $(this).ajaxSubmit({ + beforeSubmit: function(arr, $form, options) { + // The array of form data takes the following form: + // [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ] + // https://jsonformatter.curiousconcept.com/ + + $that.find('[name]').not(':disabled').each(function (index, el) { + if ($(el).prop('nodeName') == 'INPUT' && $(el).attr('type') == 'checkbox' && !$(el).is(":checked") && !$(el).attr('name').endsWith('[]')) { + // not checked checkbox + var element = { + "name": $(el).attr('name'), + "value": "no", + "type": "checkbox", + // "required":false + }; + arr.push(element); + } + if ($(el).prop('nodeName') == 'SELECT' && $(el).val() == null) { + // multiselect is empty + var element = { + "name": $(el).attr('name'), + "value": "", + "type": "select", + // "required":false + }; + arr.push(element); + } + }); + + // return false to cancel submit + }, success: function () { $submitButtons.val(currentButtonString).attr('disabled', false); $ajaxMessage.html(savedButtonString).addClass('success show'); @@ -237,6 +292,7 @@ if (typeof throttle !== "function") { $ajaxMessage.html('Error! See console!').addClass('error show'); }, }); + return false; } @@ -254,8 +310,8 @@ if (typeof throttle !== "function") { })(jQuery, window, document); -/* - * Exopite Media Uploader +/** + * Exopite SOF Media Uploader */ ; (function ($, window, document, undefined) { @@ -385,12 +441,12 @@ if (typeof throttle !== "function") { })(jQuery, window, document); -/* - * Exopite Options Navigation +/** + * Exopite SOF Options Navigation */ ; (function ($, window, document, undefined) { - /* + /** * A jQuery Plugin Boilerplate * * https://github.com/johndugan/jquery-plugin-boilerplate/blob/master/jquery.plugin-boilerplate.js @@ -502,274 +558,7 @@ if (typeof throttle !== "function") { })(jQuery, window, document); /** - * Exopite SOF Repeater - */ -; (function ($, window, document, undefined) { - - /** - * A jQuery Plugin Boilerplate - * - * https://github.com/johndugan/jquery-plugin-boilerplate/blob/master/jquery.plugin-boilerplate.js - * https://john-dugan.com/jquery-plugin-boilerplate-explained/ - */ - - var pluginName = "exopiteSOFRepeater"; - - // The actual plugin constructor - function Plugin(element, options) { - - this.element = element; - this._name = pluginName; - this.$element = $(element); - this.init(); - - } - - Plugin.prototype = { - - init: function () { - - this.bindEvents(); - this.updateTitle(); - - }, - - // Bind events that trigger methods - bindEvents: function () { - var plugin = this; - - plugin.$element.find('.exopite-sof-cloneable--add').off().on('click' + '.' + plugin._name, function (e) { - - e.preventDefault(); - if ($(this).is(":disabled")) return; - plugin.addNew.call(plugin, $(this)); - - }); - - plugin.$element.on('click' + '.' + plugin._name, '.exopite-sof-cloneable--remove:not(.disabled)', function (e) { - - e.preventDefault(); - plugin.remove.call(plugin, $(this)); - - }); - - plugin.$element.on('click' + '.' + plugin._name, '.exopite-sof-cloneable--clone:not(.disabled)', function (e) { - - e.preventDefault(); - plugin.addNew.call(plugin, $(this)); - - }); - - plugin.$element.find('.exopite-sof-cloneable__item').on('input change blur', '[data-title=title]', function (event) { - - plugin.updateTitle(); - - }); - - }, - - // Unbind events that trigger methods - unbindEvents: function () { - this.$element.off('.' + this._name); - }, - - remove: function ($button) { - - $button.parents('.exopite-sof-cloneable__item').remove(); - this.checkAmount(); - this.updateNameIndex(); - $button.trigger('exopite-sof-field-group-item-removed'); - }, - - checkAmount: function () { - - var numItems = this.$element.find('.exopite-sof-cloneable__wrapper').children('.exopite-sof-cloneable__item').length; - var maxItems = this.$element.data('limit'); - - if (maxItems <= numItems) { - this.$element.find('.exopite-sof-cloneable--add').attr("disabled", true); - return false; - } else { - this.$element.find('.exopite-sof-cloneable--add').attr("disabled", false); - return true; - } - - - }, - - updateTitle: function () { - - this.$element.find('.exopite-sof-cloneable__wrapper').find('.exopite-sof-cloneable__item').each(function (index, el) { - var title = $(el).find('[data-title=title]').val(); - $(el).find('.exopite-sof-cloneable__text').text(title); - $(el).trigger('exopite-sof-field-group-item-title-updated'); - }); - - }, - updateNameIndex: function () { - - var fieldParentName = this.$element.find('.exopite-sof-cloneable__wrapper').data('name').replace("[REPLACEME]", ""); - // test if multilang (and option stored in array) - var regex_multilang_select = new RegExp(/\[(.*?)\]\[(.*?)\]\[(.*?)\]\[(.*?)\[(.*?)\]/, "i"); - var regex_multilang = new RegExp(/\[(.*?)\]\[(.*?)\]\[(.*?)\]\[(.*?)\]/, "i"); - // test if not multilang (and option stored in array) - var regex_array = new RegExp(/\[(.*?)\]\[(.*?)\]\[(.*?)\]/, "i"); - // test if metabox and option stored in separate meta values - var regex_simple = new RegExp(/\[(.*?)\]\[(.*?)\]/, "i"); - - this.$element.find('.exopite-sof-cloneable__wrapper').find('.exopite-sof-cloneable__item').each(function (index, el) { - - $(el).find('[name^="' + fieldParentName + '"]').attr('name', function () { - - if (regex_multilang_select.test(this.name)) { - return this.name.replace(regex_multilang, function ($0, $1, $2, $3, $4, $5) { - // options[en][group][0][field][] - /* - var index_item_second = $2; - var index_item_third = $3; - if ($2 == 'REPLACEME') { - index_item_second = index; - } - if ($3 == 'REPLACEME') { - index_item_third = index; - } - var index_item = ($3 == 'REPLACEME') ? index : $3; - */ - return '[' + $1 + '][' + $2 + '][' + index + '][' + $4 + '][' + $5 + ']'; - }); - } - - if (regex_multilang.test(this.name)) { - return this.name.replace(regex_multilang, function ($0, $1, $2, $3, $4) { - // options[en][group][0][field] - // options[group][0][field][] (options array no multilang and select) - var index_item_second = $2; - var index_item_third = $3; - /* - if ($2 == 'REPLACEME') { - index_item_second = index; - } - if ($3 == 'REPLACEME') { - index_item_third = index; - } - // var index_item = ($3 == 'REPLACEME') ? index : $3; - */ - if (!$4 || 0 === $4.length) { - index_item_second = index; - } else { - index_item_third = index; - } - return '[' + $1 + '][' + index_item_second + '][' + index_item_third + '][' + $4 + ']'; - }); - } - if (regex_array.test(this.name)) { - return this.name.replace(regex_array, function ($0, $1, $2, $3) { - // options[group][0][field] - // group[0][emails_group_callback][] (simple and select) - var index_item_first = $1; - var index_item_second = $2; - if (!$3 || 0 === $3.length) { - index_item_first = index; - } else { - index_item_second = index; - } - // if ($1 == 'REPLACEME') { - // index_item_first = index; - // } - // if ($2 == 'REPLACEME') { - // index_item_second = index; - // } - // var index_item = ($2 == 'REPLACEME') ? index : $2; - return '[' + index_item_first + '][' + index_item_second + '][' + $3 + ']'; - }); - } - if (regex_simple.test(this.name)) { - return this.name.replace(regex_simple, function ($0, $1, $2) { - //options[0][field] - // var index_item = ($1 == 'REPLACEME') ? index : $1; - return '[' + index + '][' + $2 + ']'; - }); - } - - - }); - - }); - - }, - - addNew: function ($element) { - - var $group = this.$element.parents('.exopite-sof-field-group'); - - if ($.fn.chosen) $group.find("select.chosen").chosen("destroy"); - - var is_cloned = false; - var $cloned = null; - if ($element.hasClass('exopite-sof-cloneable--clone')) { - $cloned = $element.parents('.exopite-sof-cloneable__item').clone(true); - is_cloned = true; - } else { - var $muster = this.$element.find('.exopite-sof-cloneable__muster'); - $cloned = $muster.clone(true); - } - - /** - * Get hidden "muster" element and clone it. Remove hidden muster classes. - * Add trigger before and after (for various programs, like TinyMCE, Trumbowyg, etc...) - * Finaly append to group. - */ - $cloned.find('.exopite-sof-cloneable--remove').removeClass('disabled'); - $cloned.find('.exopite-sof-cloneable--clone').removeClass('disabled'); - $cloned.removeClass('exopite-sof-cloneable__muster'); - $cloned.removeClass('exopite-sof-cloneable__muster--hidden'); - $cloned.removeClass('exopite-sof-accordion--hidden'); - $cloned.find('[disabled]').attr('disabled', false); - - this.$element.trigger('exopite-sof-field-group-item-added-before', [$cloned, $group]); - - if (is_cloned) { - $cloned.insertAfter($element.parents('.exopite-sof-cloneable__item')); - } else { - $group.find('.exopite-sof-cloneable__wrapper').append($cloned); - } - - $cloned.insertAfter($element.parents('.exopite-sof-cloneable__item') ); - - this.checkAmount(); - this.updateNameIndex(); - - // If has choosen, initilize it. - if ($.fn.chosen) $group.find("select.chosen").chosen({ width: "375px" }); - - // If has date picker, initilize it. - $cloned.find('.datepicker').each(function (index, el) { - var dateFormat = $(el).data('format'); - $(el).removeClass('hasDatepicker').datepicker({ 'dateFormat': dateFormat }); - }); - - // Handle dependencies. - $cloned.exopiteSofManageDependencies('sub'); - $cloned.find('.exopite-sof-cloneable__content').removeAttr("style").show(); - - this.$element.trigger('exopite-sof-field-group-item-added-after', [$cloned, $group]); - }, - - }; - - $.fn[pluginName] = function (options) { - return this.each(function () { - if (!$.data(this, "plugin_" + pluginName)) { - $.data(this, "plugin_" + pluginName, - new Plugin(this, options)); - } - }); - }; - -})(jQuery, window, document); - -/* - * Exopite Save Options with AJAX + * Exopite SOF Handle TinyMCE */ ; (function ($, window, document, undefined) { @@ -818,11 +607,22 @@ if (typeof throttle !== "function") { var $group = plugin.$element.parents('.exopite-sof-field-group'); - plugin.$element.on('exopite-sof-field-group-item-added-after', function (event, $cloned) { + plugin.$element.on('exopite-sof-field-group-item-inserted-after', function (event, $cloned) { + $cloned.find('.tinymce-js').each(function (index, el) { + var nextEditorID = plugin.musterID + (parseInt($group.find('.tinymce-js').not(':disabled').length) - 1); + $(el).attr('id', nextEditorID); + tinyMCE.execCommand('mceAddEditor', true, nextEditorID); + }); + + }); + + plugin.$element.on('exopite-sof-field-group-item-cloned-after', function (event, $cloned) { $cloned.find('.tinymce-js').each(function (index, el) { var nextEditorID = plugin.musterID + (parseInt($group.find('.tinymce-js').not(':disabled').length) - 1); $(el).attr('id', nextEditorID); + $(el).show(); + $(el).prev('.mce-tinymce').remove(); tinyMCE.execCommand('mceAddEditor', true, nextEditorID); }); @@ -859,11 +659,11 @@ if (typeof throttle !== "function") { })(jQuery, window, document); /** - * Exopite SOF Accordion + * Exopite SOF Font Field Preview */ ; (function ($, window, document, undefined) { - var pluginName = "exopiteSOFAccordion"; + var pluginName = "exopiteFontPreview"; // The actual plugin constructor function Plugin(element, options) { @@ -871,8 +671,8 @@ if (typeof throttle !== "function") { this.element = element; this._name = pluginName; this.$element = $(element); - this.$container = $(element).find('.exopite-sof-accordion__wrapper').first(); - this.isSortableCalled = false; + this.$nav = this.$element.find('.exopite-sof-nav'); + this.init(); } @@ -880,27 +680,24 @@ if (typeof throttle !== "function") { Plugin.prototype = { init: function () { + var plugin = this; - this.bindEvents(); + var $sizeHeightWrapper = this.$element.children('.exopite-sof-typography-size-height'); + var $colorWrapper = this.$element.children('.exopite-sof-typography-color'); + plugin.preview = this.$element.children('.exopite-sof-font-preview'); + plugin.fontColor = $colorWrapper.find('.font-color-js').first(); + plugin.fontSize = $sizeHeightWrapper.children('span').children('.font-size-js'); + plugin.lineHeight = $sizeHeightWrapper.children('span').children('.line-height-js'); + // plugin.lineHeight = this.$element.find( '.line-height-js' ); + plugin.fontFamily = this.$element.children('.exopite-sof-typography-family').children('.exopite-sof-typo-family'); + plugin.fontWeight = this.$element.children('.exopite-sof-typography-variant').children('.exopite-sof-typo-variant'); - if (this.$container.data('sortable')) { + // Set current values to preview + this.loadGoogleFont(); + this.updatePreview(); + this.setColorOnStart(); - /** - * Make accordion items sortable. - * - * https://jqueryui.com/sortable/ - * http://api.jqueryui.com/sortable/ - */ - this.$container.sortable({ - axis: "y", - cursor: "move", - handle: '.exopite-sof-accordion__title', - tolerance: "pointer", - distance: 5, - opacity: 0.5, - }); - // this.$element.disableSelection(); - } + this.bindEvents(); }, @@ -908,101 +705,158 @@ if (typeof throttle !== "function") { bindEvents: function () { var plugin = this; - plugin.$container.off().on('click' + '.' + plugin._name, '.exopite-sof-accordion__title', function (e) { + plugin.$element.on('change' + '.' + plugin._name, '.font-size-js, .line-height-js, .font-color-js, .exopite-sof-typo-variant', function (e) { e.preventDefault(); - if (!$(e.target).hasClass('exopite-sof-cloneable--clone')) { - plugin.toggleAccordion.call(plugin, $(this)); - } + plugin.updatePreview(); }); - /** - * Need to "reorder" name elements for metabox, - * so it is saved in the order of displayed. - */ - // Call function if sorting is stopped - plugin.$container.on('sortstart' + '.' + plugin._name, function () { - - plugin.$element.trigger('exopite-sof-accordion-sortstart', [plugin.$container]); - + plugin.$element.on('change' + '.' + plugin._name, '.exopite-sof-typo-family', function (e) { + e.preventDefault(); + plugin.loadGoogleFont(); }); - plugin.$container.on('sortstop' + '.' + plugin._name, function () { - - // Need to reorder name index, make sure, saved in the wanted order in meta - plugin.$container.find('.exopite-sof-accordion__item').each(function (index_item) { - var $name_prefix = plugin.$container.data('name'); - var $name_prefix = $name_prefix.replace('[REPLACEME]', ''); - $(this).find('[name^="' + $name_prefix + '"]').each(function () { - var $this_name = $(this).attr('name'); - // Escape square brackets - $name_prefix_item = $name_prefix.replace(/\[/g, '\\[').replace(/]/g, '\\]'); - var regex = new RegExp($name_prefix_item + '\\[\\d+\\]'); - // Generate name to replace based on the parent item - var $this_name_updated = $this_name.replace(regex, $name_prefix + '\[' + index_item + '\]'); - // Update - $(this).attr('name', $this_name_updated); - }); - }); - - plugin.$element.trigger('exopite-sof-accordion-sortstop', [plugin.$container]); - - // Stop next click after reorder - // @link https://stackoverflow.com/questions/947195/jquery-ui-sortable-how-can-i-cancel-the-click-event-on-an-item-thats-dragged/19858331#19858331 - // - plugin.isSortableCalled = true; - - }); }, // Unbind events that trigger methods unbindEvents: function () { - this.$container.off('.' + this._name); + this.$element.off('.' + this._name); }, - - toggleAccordion: function ($header) { - - var $this = $header.parent('.exopite-sof-accordion__item'); - - // To prevent unwanted click trigger after sort (drag and drop) - if (this.isSortableCalled) { - this.isSortableCalled = false; - return; - } - - if ($this.hasClass('exopite-sof-accordion--hidden')) { - $this.find('.exopite-sof-accordion__content').slideDown(350, function () { - $this.removeClass('exopite-sof-accordion--hidden'); - }); - } else { - $this.find('.exopite-sof-accordion__content').slideUp(350, function () { - $this.addClass('exopite-sof-accordion--hidden'); - }); - - } - + // Remove plugin instance completely + destroy: function() { + this.unbindEvents(); + this.$element.removeData('plugin_' + this._name); + // this.element.removeData(); + this.element = null; + this.$element = null; }, - - }; - - $.fn[pluginName] = function (options) { - return this.each(function () { - if (!$.data(this, "plugin_" + pluginName)) { - $.data(this, "plugin_" + pluginName, - new Plugin(this, options)); - } - }); + setColorOnStart: function() { + var plugin = this; + var color = plugin.fontColor.val(); + plugin.preview.css({ 'color': color }); + }, + updatePreview: function () { + var plugin = this; + var fontWeightStyle = plugin.calculateFontWeight(plugin.fontWeight.find(':selected').text()); + // Update preiew + plugin.preview.css({ + 'font-size': plugin.fontSize.val() + 'px', + 'line-height': plugin.lineHeight.val() + 'px', + 'font-weight': fontWeightStyle.fontWeightValue, + 'font-style': fontWeightStyle.fontStyleValue + }); + }, + updateVariants: function (variants) { + var plugin = this; + var variantsArray = variants.split('|'); + var selected = plugin.fontWeight.children('option:selected').val(); + plugin.fontWeight.empty(); + $.each(variantsArray, function (key, value) { + var $option = $("").attr("value", value).text(value); + plugin.fontWeight.append($option); + if (value == selected) { + $option.attr('selected', 'selected'); + } + }); + plugin.fontWeight.trigger("chosen:updated"); + }, + loadGoogleFont: function () { + var plugin = this; + var variants = plugin.fontFamily.find(":selected").data('variants'); + + plugin.updateVariants(variants); + + var font = plugin.fontFamily.val(); + if (!font) return; + var href = '//fonts.googleapis.com/css?family=' + font + ':' + variants.replace(/\|/g, ','); + var parentName = plugin.$element.find('.exopite-sof-font-field-js').data('id'); + var html = ''; + + if ($('.cs-font-preview-' + parentName).length > 0) { + $('.cs-font-preview-' + parentName).attr('href', href).load(); + } else { + $('head').append(html).load(); + } + + // Update preiew + plugin.preview.css('font-family', font).css('font-weight', '400'); + + }, + calculateFontWeight: function (fontWeight) { + var fontWeightValue = '400'; + var fontStyleValue = 'normal'; + + switch (fontWeight) { + case '100': + fontWeightValue = '100'; + break; + case '100italic': + fontWeightValue = '100'; + fontStyleValue = 'italic'; + break; + case '300': + fontWeightValue = '300'; + break; + case '300italic': + fontWeightValue = '300'; + fontStyleValue = 'italic'; + break; + case '500': + fontWeightValue = '500'; + break; + case '500italic': + fontWeightValue = '500'; + fontStyleValue = 'italic'; + break; + case '700': + fontWeightValue = '700'; + break; + case '700italic': + fontWeightValue = '700'; + fontStyleValue = 'italic'; + break; + case '900': + fontWeightValue = '900'; + break; + case '900italic': + fontWeightValue = '900'; + fontStyleValue = 'italic'; + break; + case 'italic': + fontStyleValue = 'italic'; + break; + } + + return { fontWeightValue, fontStyleValue }; + }, + + }; -})(jQuery, window, document); + $.fn[pluginName] = function (options) { + return this.each(function () { + if (!$.data(this, "plugin_" + pluginName)) { + $.data(this, "plugin_" + pluginName, + new Plugin(this, options)); + } + }); + }; +})(jQuery, window, document); /** - * Exopite SOF Search + * Exopite SOF Repeater */ ; (function ($, window, document, undefined) { - var pluginName = "exopiteSofSearch"; + /** + * A jQuery Plugin Boilerplate + * + * https://github.com/johndugan/jquery-plugin-boilerplate/blob/master/jquery.plugin-boilerplate.js + * https://john-dugan.com/jquery-plugin-boilerplate-explained/ + */ + + var pluginName = "exopiteSOFRepeater"; // The actual plugin constructor function Plugin(element, options) { @@ -1010,10 +864,10 @@ if (typeof throttle !== "function") { this.element = element; this._name = pluginName; this.$element = $(element); - this.$nav = this.$element.find('.exopite-sof-nav'); - // this.$wrapper = $searchField.parents('.exopite-sof-wrapper'); - // this.$container = $(element).find('.exopite-sof-accordion__wrapper').first(); - this.isSortableCalled = false; + this.$sortableWrapper = this.$element.children('.exopite-sof-cloneable__wrapper'); + this.$container = $(element).children('.exopite-sof-accordion__wrapper').first(); + this.sortable = null; + this.init(); } @@ -1022,11 +876,29 @@ if (typeof throttle !== "function") { init: function () { - $.expr[':'].containsIgnoreCase = function (n, i, m) { - return jQuery(n).text().toUpperCase().indexOf(m[3].toUpperCase()) >= 0; - }; - + this.isSortable = (this.$container.data('is-sortable')); this.bindEvents(); + this.updateTitle(); + this.setMusterDisabled(); + this.sortableInit(); + + /** + * Access other plugin functions and variables + */ + // this.$element.data('plugin_exopiteSOFAccordion').showYorself('test') + // console.log('options: ' + JSON.stringify(this.$element.data('plugin_exopiteSOFAccordion').sortableOptions)); + + }, + + sortableInit: function() { + + if (this.isSortable) { + + //https://github.com/lukasoppermann/html5sortable + sortable('.exopite-sof-cloneable__wrapper', { + handle: '.exopite-sof-cloneable__title', + }); + } }, @@ -1034,19 +906,61 @@ if (typeof throttle !== "function") { bindEvents: function () { var plugin = this; - plugin.$element.on('keyup' + '.' + plugin._name, '.exopite-sof-search', function (e) { + // Predefinied + plugin.$element.find('.exopite-sof-cloneable--add').off().on('click' + '.' + plugin._name, function (e) { e.preventDefault(); - plugin.doSearch.call(plugin, $(this)); + if ($(this).is(":disabled")) return; + plugin.addNew.call(plugin, $(this)); + }); - plugin.$element.on('click' + '.' + plugin._name, '.exopite-sof-section-header', function (e) { + // Dynamically added + plugin.$element.on('click' + '.' + plugin._name, '.exopite-sof-cloneable--remove:not(.disabled)', function (e) { + + if (e.target != this) return false; e.preventDefault(); - plugin.selectSection.call(plugin, $(this)); + plugin.remove($(this)); + }); - plugin.$element.on('click' + '.' + plugin._name, '.exopite-sof-nav.search', function (e) { + plugin.$element.on('click' + '.' + plugin._name, '.exopite-sof-cloneable--clone:not(.disabled)', function (e) { + + // Match only on clicked element + if (e.target != this) return false; + e.preventDefault(); - plugin.clearSearch.call(plugin, $(this)); + + // Stop event bubbling + e.stopPropagation(); + + plugin.addNew($(this)); + + }); + + plugin.$element.find('.exopite-sof-cloneable__item').on('input change blur', '[data-title=title]', function (event) { + + plugin.updateTitleElement($(this)); + + }); + + /** + * Need to "reorder" name elements for metabox, + * so it is saved in the order of displayed. + */ + // Call function if sorting is stopped + plugin.$container.on('sortstart' + '.' + plugin._name, function () { + + plugin.$element.trigger('exopite-sof-accordion-sortstart', [plugin.$container]); + + }); + + + plugin.$container.on('sortstop' + '.' + plugin._name, function (event, ui) { + + event.stopPropagation(); + + plugin.updateName($(this)); + }); }, @@ -1055,56 +969,232 @@ if (typeof throttle !== "function") { unbindEvents: function () { this.$element.off('.' + this._name); }, - clearSearch: function ($clickedElement) { + + updateName: function( $element ) { var plugin = this; - plugin.$element.find('.exopite-sof-search').val('').blur(); - plugin.$element.find('.exopite-sof-nav').removeClass('search'); - plugin.$element.find('.exopite-sof-section-header').hide(); - plugin.$element.find('.exopite-sof-field h4').closest('.exopite-sof-field').not('.hidden').removeAttr('style'); - plugin.$element.find('.exopite-sof-field-card').removeAttr('style'); - var activeElement = plugin.$nav.find("ul li.active").data('section'); - plugin.$element.find('.exopite-sof-sections .exopite-sof-section-' + activeElement).removeClass('hide'); + + var text = $element.closest('.exopite-sof-group').children('.exopite-sof-cloneable--add').text(); + + var $wrapper = $element.closest('.exopite-sof-cloneable__wrapper'); + var wrapperName = $wrapper.attr('data-name'); + var baseName = wrapperName.replace(/\[REPLACEME\]$/, ''); + var baseNameRegex = plugin.escapeRegExp(baseName); + var regexGroupName = new RegExp(baseNameRegex + "\\[(.*?)\\]", "i"); + + $wrapper.findExclude('.exopite-sof-cloneable__item', '.exopite-sof-group').each(function(index, el){ + + /** + * Update data-name for muster element (set parent indexes for cloning) + */ + $(el).find('[data-name^="' + baseName + '"]').each(function(indexName, elDataName){ + var elementName = $(elDataName).attr('data-name'); + + var relpacedName = elementName.replace(regexGroupName, function ($0, $1) { + // options[en][group][0][field][] + + return baseName + '[' + index + ']'; + }); + + $(elDataName).attr('data-name', relpacedName); + + }); + + /** + * Update element names (only this parent index) from current level to the last level + */ + $(el).find('[name^="' + baseName + '"]').each(function(indexName, elName){ + + var elementName = $(elName).attr('name'); + var relpacedName = elementName.replace(regexGroupName, function ($0, $1) { + // options[en][group][0][field][] + + return baseName + '[' + index + ']'; + }); + + $(elName).attr('name', relpacedName); + + }); + + + }); + }, - activateSection: function (activeElement) { - var plugin = this; - if (plugin.$nav.length > 0) { - plugin.$element.find('.exopite-sof-section-header').hide(); - plugin.$element.find('.exopite-sof-nav li[data-section="' + activeElement + '"]').addClass('active'); - plugin.$element.find('.exopite-sof-nav').removeClass('search'); + + remove: function ($button) { + + $wrapper = $button.closest('.exopite-sof-cloneable__wrapper'); + $button.closest('.exopite-sof-cloneable__item').remove(); + this.updateName($wrapper); + this.checkAmount($wrapper); + + $button.trigger('exopite-sof-field-group-item-removed'); + + }, + + checkAmount: function ($wrapper) { + + var numItems = $wrapper.children('.exopite-sof-cloneable__item').length; + var maxItems = $wrapper.data('limit'); + + if (typeof maxItems !== 'undefined') { + return numItems; } - plugin.$element.find('.exopite-sof-sections .exopite-sof-section').addClass('hide'); - plugin.$element.find('.exopite-sof-sections .exopite-sof-section-' + activeElement).removeClass('hide'); - plugin.$element.find('.exopite-sof-field h4').closest('.exopite-sof-field').not('.hidden').removeAttr('style'); - plugin.$element.find('.exopite-sof-field-card').removeAttr('style'); + + /** + * Fixme: + * - This apply to all child, wrong! + */ + if (maxItems <= numItems) { + this.$element.find('.exopite-sof-cloneable--add').attr("disabled", true); + return false; + } else { + this.$element.find('.exopite-sof-cloneable--add').attr("disabled", false); + return numItems; + } + + }, - selectSection: function ($sectionHeader) { - var plugin = this; - plugin.$element.find('.exopite-sof-search').val('').blur(); - var activeElement = $sectionHeader.data('section'); - plugin.activateSection(activeElement); + + setMusterDisabled: function () { + + /** + * Mainly for nested elements (in our case: tab) + * This will prevent dinamically added muster elements to save. + */ + this.$element.find('.exopite-sof-cloneable__muster').find('[name]').prop('disabled', true).addClass('disabled'); + }, - doSearch: function ($searchField) { + + updateTitleElement: function ($element) { + + var $item = $element.closest('.exopite-sof-cloneable__item'); + var title = $item.find('[data-title=title]').first().val(); + $item.children('.exopite-sof-cloneable__title').children('.exopite-sof-cloneable__text').text(title); + $item.trigger('exopite-sof-field-group-item-title-updated'); + + }, + + updateTitle: function () { + + this.$element.find('.exopite-sof-cloneable__wrapper').find('.exopite-sof-cloneable__item').find('[data-title=title]').each(function (index, el) { + var title = $(el).val(); + if (title) { + $(el).closest('.exopite-sof-cloneable__item').children('.exopite-sof-cloneable__title').children('.exopite-sof-cloneable__text').text(title); + } + + $(el).trigger('exopite-sof-field-group-item-title-updated'); + }); + + }, + + escapeRegExp: function (stringToGoIntoTheRegex) { + // https://stackoverflow.com/questions/17885855/use-dynamic-variable-string-as-regex-pattern-in-javascript/17886301#17886301 + return stringToGoIntoTheRegex.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); + }, + + removeIfNested: function(index) { + // this is the corrent DOM element + var $this = $(this), + return_value = false; + + $.each($this.attr('class').split(/\s+/), function(index) { + if ($this.parents("." + this).length > 0) { + return_value = default_value || true; + } + }); + + return return_value; + }, + + addNew: function ($element) { + var plugin = this; - var searchValue = $searchField.val(); - var activeElement = this.$nav.find("ul li.active").data('section'); - if (typeof this.$element.data('section') === 'undefined') { - this.$element.data('section', activeElement); + + var $group = $element.closest('.exopite-sof-group'); + + if ($.fn.chosen) $group.find("select.chosen").chosen("destroy"); + + var is_cloned = false; + var $cloned = null; + + // Decide which element need to clone: the clicked or the muster? + if ($element.hasClass('exopite-sof-cloneable--clone')) { + $cloned = $element.parent().parent().parent('.exopite-sof-cloneable__item').clone(true); + is_cloned = true; + } else { + var $muster = $element.parent().children('.exopite-sof-cloneable__muster'); + $cloned = $muster.clone(true); } - if (searchValue) { - if (this.$nav.length > 0) { - this.$element.find('.exopite-sof-nav-list-item').removeClass('active'); - this.$element.find('.exopite-sof-nav').addClass('search'); + /** + * Get hidden "muster" element and clone it. Remove hidden muster classes. + * Add trigger before and after (for various programs, like TinyMCE, Trumbowyg, etc...) + * Finaly append to group. + */ + $cloned.find('.exopite-sof-cloneable--remove').removeClass('disabled'); + $cloned.find('.exopite-sof-cloneable--clone').removeClass('disabled'); + $cloned.removeClass('exopite-sof-cloneable__muster'); + $cloned.removeClass('exopite-sof-cloneable__muster--hidden'); + $cloned.removeClass('exopite-sof-accordion--hidden'); + $cloned.findExclude('[disabled]', '.exopite-sof-cloneable__muster').attr('disabled', false).removeClass('disabled');; + + plugin.$element.trigger('exopite-sof-field-group-item-added-before', [$cloned, $group]); + + if (is_cloned) { + + // Remove font preview plugin + $cloned.find('.exopite-sof-font-field').unbind().removeData('plugin_exopiteFontPreview'); + + if ($.fn.chosen) $cloned.find('select.chosen').unbind().removeData().next().remove(); + + // Insert after clicked element + $cloned.insertAfter($element.closest('.exopite-sof-cloneable__item')); + $wrapper = $element.closest('.exopite-sof-cloneable__wrapper'); + } else { + // Insert after all elements + $group.children('.exopite-sof-cloneable__wrapper').first().append($cloned); + $wrapper = $element.closest('.exopite-sof-group').children('.exopite-sof-cloneable__wrapper'); + } + + var numItem = plugin.checkAmount($wrapper); + if (! numItem) { + return; + } + + plugin.setMusterDisabled(); + plugin.updateName($wrapper); + + if ($.fn.chosen) $group.find("select.chosen").chosen({ width: "375px" }); + + // If has date picker, initilize it. + $cloned.find('.datepicker').each(function (index, el) { + var dateFormat = $(el).data('format'); + $(el).removeClass('hasDatepicker').datepicker({ 'dateFormat': dateFormat }); + }); + + plugin.sortableInit(); + + // Handle dependencies. + $cloned.exopiteSofManageDependencies('sub'); + $cloned.find('.exopite-sof-cloneable__content').removeAttr("style").show(); + + $cloned.find('.exopite-sof-font-field').each(function(index,el){ + + if (!$(el).children('label').children('select').is(":disabled")) { + $(el).exopiteFontPreview(); } - this.$element.find('.exopite-sof-section-header').show(); - this.$element.find('.exopite-sof-section').removeClass('hide'); - this.$element.find('.exopite-sof-field h4').closest('.exopite-sof-field').not('.hidden').hide(); - this.$element.find('.exopite-sof-field-card').hide(); - this.$element.find('.exopite-sof-field h4:containsIgnoreCase(' + searchValue + ')').closest('.exopite-sof-field').not('.hidden').show(); + + }); + + sortable('.exopite-sof-gallery', { + forcePlaceholderSize: true, + }); + + plugin.$element.trigger('exopite-sof-field-group-item-added-after', [$cloned, $group]); + if (is_cloned) { + plugin.$element.trigger('exopite-sof-field-group-item-cloned-after', [$cloned, $group]); } else { - activeElement = this.$element.data('section'); - this.$element.removeData('section'); - plugin.activateSection(activeElement); + plugin.$element.trigger('exopite-sof-field-group-item-inserted-after', [$cloned, $group]); } }, @@ -1123,11 +1213,11 @@ if (typeof throttle !== "function") { })(jQuery, window, document); /** - * Exopite SOF Search + * Exopite SOF Accordion */ ; (function ($, window, document, undefined) { - var pluginName = "exopiteFontPreview"; + var pluginName = "exopiteSOFAccordion"; // The actual plugin constructor function Plugin(element, options) { @@ -1135,10 +1225,8 @@ if (typeof throttle !== "function") { this.element = element; this._name = pluginName; this.$element = $(element); - this.$nav = this.$element.find('.exopite-sof-nav'); - // this.$wrapper = $searchField.parents('.exopite-sof-wrapper'); - // this.$container = $(element).find('.exopite-sof-accordion__wrapper').first(); - this.isSortableCalled = false; + this.$container = $(element).children('.exopite-sof-accordion__wrapper').first(); + this.allOpen = (this.$container.data('all-open') || typeof this.$container.data('all-open') == 'undefined'); this.init(); } @@ -1146,18 +1234,118 @@ if (typeof throttle !== "function") { Plugin.prototype = { init: function () { + + this.bindEvents(); + + }, + + // showYorself: function(somevar){ + // console.log('Yeah baby it is me: ' + somevar); + // }, + + // Bind events that trigger methods + bindEvents: function () { var plugin = this; - // var parentName = jQuery( this ).attr( 'data-id' ); - plugin.preview = this.$element.find('.exopite-sof-font-preview'); - plugin.fontColor = this.$element.find( '.font-color-js' ); - plugin.fontSize = this.$element.find( '.font-size-js' ); - plugin.lineHeight = this.$element.find( '.line-height-js' ); - plugin.fontFamily = this.$element.find( '.exopite-sof-typo-family' ); - plugin.fontWeight = this.$element.find( '.exopite-sof-typo-variant' ); - // Set current values to preview - this.updatePreview(); - this.loadGoogleFont(); + plugin.$container.off().on('click' + '.' + plugin._name, '.exopite-sof-accordion__title', function (e) { + e.preventDefault(); + + if (!$(e.target).hasClass('exopite-sof-cloneable--clone') && !$(this).closest('.exopite-sof-accordion__wrapper').hasClass('exopite-sof-group-compact')) { + plugin.toggleAccordion.call(plugin, $(this)); + } + + }); + + }, + + // Unbind events that trigger methods + unbindEvents: function () { + this.$container.off('.' + this._name); + }, + + slideUp: function ($element) { + $element.children('.exopite-sof-accordion__content').slideUp(350, function () { + $element.addClass('exopite-sof-accordion--hidden'); + }); + }, + + slideDown: function ($element) { + $element.children('.exopite-sof-accordion__content').slideDown(350, function () { + $element.removeClass('exopite-sof-accordion--hidden'); + }); + }, + + toggleAccordion: function ($header) { + var plugin = this; + var $this = $header.parent('.exopite-sof-accordion__item'); + + /** + * This is for the accordion field. + */ + if (!this.allOpen) { + + this.$container.findExclude('.exopite-sof-accordion__item', '.exopite-sof-accordion').each(function (index, el) { + + if ($(el).is($this)) { + plugin.slideDown($this); + } else { + plugin.slideUp($(el)); + } + + }); + + } else { + + if ($this.hasClass('exopite-sof-accordion--hidden')) { + plugin.slideDown($this); + } else { + plugin.slideUp($this); + } + + } + + }, + + }; + + $.fn[pluginName] = function (options) { + return this.each(function () { + if (!$.data(this, "plugin_" + pluginName)) { + $.data(this, "plugin_" + pluginName, + new Plugin(this, options)); + } + }); + }; + +})(jQuery, window, document); + + +/** + * Exopite SOF Search In Options + */ +; (function ($, window, document, undefined) { + + var pluginName = "exopiteSofSearch"; + + // The actual plugin constructor + function Plugin(element, options) { + + this.element = element; + this._name = pluginName; + this.$element = $(element); + this.$nav = this.$element.find('.exopite-sof-nav'); + + this.init(); + + } + + Plugin.prototype = { + + init: function () { + + $.expr[':'].containsIgnoreCase = function (n, i, m) { + return jQuery(n).text().toUpperCase().indexOf(m[3].toUpperCase()) >= 0; + }; this.bindEvents(); @@ -1167,16 +1355,20 @@ if (typeof throttle !== "function") { bindEvents: function () { var plugin = this; - plugin.$element.on('change' + '.' + plugin._name, '.font-size-js, .line-height-js, .font-color-js, .exopite-sof-typo-variant', function (e) { + plugin.$element.on('keyup' + '.' + plugin._name, '.exopite-sof-search', function (e) { e.preventDefault(); - plugin.updatePreview(); + plugin.doSearch.call(plugin, $(this)); }); - plugin.$element.on('change' + '.' + plugin._name, '.exopite-sof-typo-family', function (e) { + plugin.$element.on('click' + '.' + plugin._name, '.exopite-sof-section-header', function (e) { e.preventDefault(); - plugin.loadGoogleFont(); + plugin.selectSection.call(plugin, $(this)); }); + plugin.$element.on('click' + '.' + plugin._name, '.exopite-sof-nav.search', function (e) { + e.preventDefault(); + plugin.clearSearch.call(plugin, $(this)); + }); }, @@ -1184,98 +1376,66 @@ if (typeof throttle !== "function") { unbindEvents: function () { this.$element.off('.' + this._name); }, - updatePreview: function () { - var plugin = this; - var fontWeightStyle = plugin.calculateFontWeight(plugin.fontWeight.find(':selected').text()); - // Update preiew - plugin.preview.css({ - 'font-size': plugin.fontSize.val() + 'px', - 'line-height': plugin.lineHeight.val() + 'px', - 'font-weight': fontWeightStyle.fontWeightValue, - 'font-style': fontWeightStyle.fontStyleValue - }); - }, - updateVariants: function (variants) { + clearSearch: function ($clickedElement) { var plugin = this; - var variantsArray = variants.split('|'); - plugin.fontWeight.empty(); - $.each(variantsArray, function (key, value) { - plugin.fontWeight.append($("").attr("value", value).text(value)); - }); - plugin.fontWeight.val('regular'); - plugin.fontWeight.trigger("chosen:updated"); + plugin.$element.find('.exopite-sof-search').val('').blur(); + plugin.$element.find('.exopite-sof-nav').removeClass('search'); + plugin.$element.find('.exopite-sof-section-header').hide(); + plugin.$element.find('.exopite-sof-field h4').closest('.exopite-sof-field').not('.hidden').removeAttr('style'); + plugin.$element.find('.exopite-sof-field-card').removeAttr('style'); + var activeElement = plugin.$nav.find("ul li.active").data('section'); + plugin.$element.find('.exopite-sof-sections .exopite-sof-section-' + activeElement).removeClass('hide'); }, - loadGoogleFont: function () { + activateSection: function (activeElement) { var plugin = this; - var variants = plugin.fontFamily.find(":selected").data('variants'); - - plugin.updateVariants(variants); - - var font = plugin.fontFamily.val(); - if (!font) return; - var href = '//fonts.googleapis.com/css?family=' + font + ':' + variants.replace(/\|/g, ','); - var parentName = plugin.$element.find('.exopite-sof-font-field-js').data('id'); - var html = ''; - - if ( $( '.cs-font-preview-' + parentName ).length > 0 ) { - $( '.cs-font-preview-' + parentName ).attr( 'href', href ).load(); - } else { - $('head').append( html ).load(); + if (plugin.$nav.length > 0) { + plugin.$element.find('.exopite-sof-section-header').hide(); + var $activeElement = plugin.$element.find('.exopite-sof-nav li[data-section="' + activeElement + '"]'); + $activeElement.addClass('active'); + if ( $activeElement.parents('.exopite-sof-nav-list-parent-item').length > 0 && + ! $activeElement.parents('.exopite-sof-nav-list-parent-item').hasClass('active') ) { + $activeElement.parents('.exopite-sof-nav-list-parent-item').addClass('active').find('ul').slideToggle(200);; + } + plugin.$element.find('.exopite-sof-nav').removeClass('search'); } - - // Update preiew - plugin.preview.css('font-family', font).css('font-weight', '400'); + plugin.$element.find('.exopite-sof-sections .exopite-sof-section').addClass('hide'); + plugin.$element.find('.exopite-sof-sections .exopite-sof-section-' + activeElement).removeClass('hide'); + plugin.$element.find('.exopite-sof-field h4').closest('.exopite-sof-field').not('.hidden').removeAttr('style'); + plugin.$element.find('.exopite-sof-field-card').removeAttr('style'); }, - calculateFontWeight: function ( fontWeight ) { - var fontWeightValue = '400'; - var fontStyleValue = 'normal'; + selectSection: function ($sectionHeader) { + var plugin = this; + plugin.$element.find('.exopite-sof-search').val('').blur(); + var activeElement = $sectionHeader.data('section'); + plugin.activateSection(activeElement); + }, + doSearch: function ($searchField) { + var plugin = this; + var searchValue = $searchField.val(); + var activeElement = this.$nav.find("ul li.active").data('section'); + if (typeof this.$element.data('section') === 'undefined') { + this.$element.data('section', activeElement); + } - switch( fontWeight ) { - case '100': - fontWeightValue = '100'; - break; - case '100italic': - fontWeightValue = '100'; - fontStyleValue = 'italic'; - break; - case '300': - fontWeightValue = '300'; - break; - case '300italic': - fontWeightValue = '300'; - fontStyleValue = 'italic'; - break; - case '500': - fontWeightValue = '500'; - break; - case '500italic': - fontWeightValue = '500'; - fontStyleValue = 'italic'; - break; - case '700': - fontWeightValue = '700'; - break; - case '700italic': - fontWeightValue = '700'; - fontStyleValue = 'italic'; - break; - case '900': - fontWeightValue = '900'; - break; - case '900italic': - fontWeightValue = '900'; - fontStyleValue = 'italic'; - break; - case 'italic': - fontStyleValue = 'italic'; - break; + if (searchValue) { + if (this.$nav.length > 0) { + this.$element.find('.exopite-sof-nav-list-item').removeClass('active'); + this.$element.find('.exopite-sof-nav').addClass('search'); + } + this.$element.find('.exopite-sof-section-header').show(); + this.$element.find('.exopite-sof-section').removeClass('hide'); + this.$element.find('.exopite-sof-field h4').closest('.exopite-sof-field').not('.hidden').hide(); + this.$element.find('.exopite-sof-field-card').hide(); + this.$element.find('.exopite-sof-field h4:containsIgnoreCase(' + searchValue + ')').closest('.exopite-sof-field').not('.hidden').show(); + } else { + activeElement = this.$element.data('section'); + this.$element.removeData('section'); + plugin.activateSection(activeElement); } - return { fontWeightValue, fontStyleValue }; }, - }; $.fn[pluginName] = function (options) { @@ -1290,7 +1450,7 @@ if (typeof throttle !== "function") { })(jQuery, window, document); /** - * Exopite Save Options with AJAX + * Exopite SOF Import/Export Options with AJAX */ ; (function ($, window, document, undefined) { @@ -1473,6 +1633,325 @@ if (typeof throttle !== "function") { })(jQuery, window, document); +/** + * Exopite SOF Tab Navigation + */ +; (function ($, window, document, undefined) { + + var pluginName = "exopiteTabs"; + + // The actual plugin constructor + function Plugin(element, options) { + + this.element = element; + this._name = pluginName; + this.$element = $(element); + this.init(); + + } + + Plugin.prototype = { + + init: function () { + + this.bindEvents(); + + }, + + /** + * Looks a little bit strange, but some readon this is the only way + * what I find, to make this work in group field. + */ + // Bind events that trigger methods + bindEvents: function () { + var plugin = this; + plugin.$tabLinks = plugin.$element.children('.exopite-sof-tab-header').children('.exopite-sof-tab-link'); + plugin.$tabContents = plugin.$element.children('.exopite-sof-tab-content'); + plugin.mobileHeader = plugin.$tabContents.children('.exopite-sof-tab-mobile-header'); + + plugin.$tabLinks.off().on('click' + '.' + plugin._name, function (event) { + + plugin.changeTabs(event, this); + + }); + + plugin.mobileHeader.off().on('click' + '.' + plugin._name, function (event) { + + var index = $(this).parent().index() - 1; + var that = this; + + // tabLinks + var $tabLinks = $(that).parent().parent().children('.exopite-sof-tab-header').children('.exopite-sof-tab-link'); + var $tabContents = $(that).parent().parent().children('.exopite-sof-tab-content'); + + $tabLinks.removeClass('active'); + $tabLinks.eq(index).addClass('active'); + $tabContents.removeClass('active'); + $(that).parent().addClass('active'); + + }); + + }, + + // Unbind events that trigger methods + unbindEvents: function () { + this.$element.off('.' + this._name); + }, + + changeTabs: function (event, that, index) { + var plugin = this; + var index = $(that).index(); + + $(that).parent().children('.exopite-sof-tab-link').removeClass('active'); + $(that).parent().parent().children('.exopite-sof-tab-content').removeClass('active'); + $(that).addClass('active'); + $(that).parent().parent().children('.exopite-sof-tab-content').eq(index).addClass('active'); + + }, + + }; + + $.fn[pluginName] = function (options) { + return this.each(function () { + if (!$.data(this, "plugin_" + pluginName)) { + $.data(this, "plugin_" + pluginName, + new Plugin(this, options)); + } + }); + }; + +})(jQuery, window, document); + +; (function ($, window, document, undefined) { + + "use strict"; + + var pluginName = "exopiteSOFGallery"; + + function Plugin(element, options) { + this.element = element; + this._name = pluginName; + this.meta_gallery_frame = null; + this.$container = $(element).children('.exopite-sof-gallery').first(); + + this.buildCache(); + this.init(); + } + + $.extend(Plugin.prototype, { + init: function () { + var plugin = this; + + plugin.bindEvents(); + plugin.sortableInit(); + + }, + sortableInit: function () { + var plugin = this; + + sortable('.exopite-sof-gallery', { + forcePlaceholderSize: true, + }); + + // From documentation, not working with dinamically added elements. + // sortable('.exopite-sof-gallery', { + // forcePlaceholderSize: true, + // })[0].addEventListener('sortstop', function(e) { + + // console.log('gallery sortstop 0'); + + // }); + + /** + * html5sortable - sortupdate event is not triggered on dynamic elements + * @link https://stackoverflow.com/questions/46211700/html5sortable-sortupdate-event-is-not-triggered-on-dynamic-elements/46212177#46212177 + */ + // if( sortable('.exopite-sof-gallery').length > 0) { + // sortable('.exopite-sof-gallery')[sortable('.exopite-sof-gallery').length-1].addEventListener('sortstop', function (e) { + + // plugin.updateIDs( $(this) ); + // console.log('gallery sortstop 1'); + + // }); + // } + + // plugin.$galleryList.sortable({ + // tolerance: "pointer", + // cursor: "grabbing", + // stop: function( event, ui ) { + // console.log('test stop'); + // let imageIDs = []; + // plugin.$galleryList.children('li').each(function( index, el ){ + // imageIDs.push( $(el).children('img').attr('id') ); + // }); + // plugin.$imageIDs.val( imageIDs.join(',') ); + // } + // }); + }, + bindEvents: function () { + var plugin = this; + + plugin.$element.on('click' + '.' + plugin._name, '> .exopite-sof-gallery-add', function (e) { + e.preventDefault(); + + plugin.manageMediaFrame.call( plugin, $(this) ); + + }); + + plugin.$element.on('click' + '.' + plugin._name, '.exopite-sof-image-delete', function (e) { + e.preventDefault(); + + plugin.deleteImage.call( plugin, $(this) ); + + }); + + plugin.$container.on('sortstop' + '.' + plugin._name, function (event, ui) { + + // console.log('gallery sortstop 2'); + + plugin.updateIDs( $(this) ); + + }); + + }, + updateIDs: function ( $element ) { + + let imageIDs = []; + $element.children('span').each(function( index, el ){ + imageIDs.push( $(el).children('img').attr('id') ); + }); + $element.closest('.exopite-sof-gallery').prev().val( imageIDs.join(',') ); + + }, + deleteImage: function ($button) { + var plugin = this; + if (confirm('Are you sure you want to remove this image?')) { + + let $imageIDs = $button.closest('.exopite-sof-gallery').prev(); + var removedImage = $button.next().attr('id'); + var galleryIds = $imageIDs.val().split(","); + galleryIds = $( galleryIds ).not([removedImage]).get(); + $imageIDs.val( galleryIds ); + $button.parent().remove(); + plugin.sortableInit(); + + } + }, + manageMediaFrame: function ( $button ) { + var plugin = this; + + let $imageIDs = $button.prev().prev(); + let $galleryWrapper = $button.prev(); + + // If the frame already exists, re-open it. + plugin.meta_gallery_frame = null; + + let title = plugin.$element.data('media-frame-title') || 'Select Images'; + let button = plugin.$element.data('media-frame-button') || 'Add'; + let image = plugin.$element.data('media-frame-type') || 'image'; + + // Sets up the media library frame + plugin.meta_gallery_frame = wp.media.frames.meta_gallery_frame = wp.media({ + title: title, + button: { + text: button + }, + library: { + type: image + }, + multiple: true + }); + + // Create Featured Gallery state. This is essentially the Gallery state, but selection behavior is altered. + plugin.meta_gallery_frame.states.add([ + new wp.media.controller.Library({ + title: title, + priority: 20, + toolbar: 'main-gallery', + filterable: 'uploaded', + library: wp.media.query(plugin.meta_gallery_frame.options.library), + multiple: plugin.meta_gallery_frame.options.multiple ? 'reset' : false, + editable: true, + allowLocalEdits: true, + displaySettings: true, + displayUserSettings: true + }), + ]); + + plugin.meta_gallery_frame.on('open', function () { + var selection = plugin.meta_gallery_frame.state().get('selection'); + + var library = plugin.meta_gallery_frame.state('gallery-edit').get('library'); + var ids = $imageIDs.val(); + if (ids) { + let idsArray = ids.split(','); + idsArray.forEach(function (id) { + let attachment = wp.media.attachment(id); + attachment.fetch(); + selection.add(attachment ? [attachment] : []); + }); + } + }); + + // When an image is selected, run a callback. + plugin.meta_gallery_frame.on('select', function () { + var imageIDArray = []; + var imageHTML = ''; + var metadataString = ''; + var images; + images = plugin.meta_gallery_frame.state().get('selection'); + images.each(function (attachment) { + imageIDArray.push(attachment.attributes.id); + imageHTML += ''; + }); + metadataString = imageIDArray.join(","); + if (metadataString) { + $imageIDs.val( metadataString ); + $galleryWrapper.html( imageHTML ); + plugin.sortableInit(); + } + }); + + // Finally, open the modal + plugin.meta_gallery_frame.open(); + + }, + destroy: function () { + this.unbindEvents(); + this.$element.removeData(); + }, + unbindEvents: function () { + this.$element.off('.' + this._name); + }, + buildCache: function () { + this.$element = $(this.element); + this.$imageIDs = this.$element.children('[data-control="gallery-ids"]'); + this.$galleryList = this.$element.children('.exopite-sof-gallery'); + }, + }); + + $.fn[pluginName] = function (options) { + return this.each(function () { + if (!$.data(this, "plugin_" + pluginName)) { + $.data(this, "plugin_" + pluginName, new Plugin(this, options)); + } + }); + }; + +})(jQuery, window, document); + +/** + * ToDos: + * - sortable only if data-is-sortable is 1 || true + * - maybe move sortable to a separate plugin? + * - clean up + * - fix name generation (if added or cloned) <- drag&drop is working az expected + * - replace color picker ( + * https://acko.net/blog/farbtastic-jquery-color-picker-plug-in/ + * https://www.jqueryscript.net/other/Color-Picker-Plugin-jQuery-MiniColors.html + * https://www.jquery-az.com/a-bootstrap-jquery-color-picker-with-7-demos/ + * )? + */ ; (function ($) { "use strict"; @@ -1491,11 +1970,19 @@ if (typeof throttle !== "function") { }); $('.exopite-sof-content-js').exopiteOptionsNavigation(); - $('.exopite-sof-font-field').exopiteFontPreview(); + $('.exopite-sof-wrapper').find('.exopite-sof-font-field').each(function(index,el){ + + if (!$(el).children('label').children('select').is(":disabled")) { + $(el).exopiteFontPreview(); + } + + }); $('.exopite-sof-group').exopiteSOFTinyMCE(); $('.exopite-sof-accordion').exopiteSOFAccordion(); $('.exopite-sof-group').exopiteSOFRepeater(); $('.exopite-sof-field-backup').exopiteImportExportAJAX(); + $('.exopite-sof-tabs').exopiteTabs(); + $('.exopite-sof-gallery-field').exopiteSOFGallery(); }); diff --git a/exopite-notificator/admin/exopite-simple-options/assets/dev/styles.dev.css b/exopite-notificator/admin/exopite-simple-options/assets/dev/styles.css similarity index 90% rename from exopite-notificator/admin/exopite-simple-options/assets/dev/styles.dev.css rename to exopite-notificator/admin/exopite-simple-options/assets/dev/styles.css index f1c1196..6bfd626 100644 --- a/exopite-notificator/admin/exopite-simple-options/assets/dev/styles.dev.css +++ b/exopite-notificator/admin/exopite-simple-options/assets/dev/styles.css @@ -480,13 +480,26 @@ } .exopite-sof-field-image-selector-horizontal label { display: inline-block; - margin: 5px; + margin-right: 10px; + margin-bottom: 10px; } .exopite-sof-field-image-selector-horizontal label:first-child { - margin-left: 0; + /* margin-left: 0; */ +} +@media screen and (max-width: 782px) { + #wpbody .exopite-sof-font-field select { + margin-bottom: 8px; + } + #wpbody .exopite-sof-field select { + height: 31px; + padding: 5px 12px; + font-size: 14px; + line-height: 16px; + } } .exopite-sof-field-image-selector-vertical label { display: block; + margin-bottom: 10px; } .exopite-sof-field-image_select label img { max-width: 100%; @@ -2228,8 +2241,91 @@ input:disabled + .switch__toggle { border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; } */ + /* Tabs */ .exopite-sof-tabs { + width: 100%; + margin: 0; + max-width: 100%; +} +.exopite-sof-tab-header { + margin: 0px; + padding: 0px; + list-style: none; + display: flex; +} +.exopite-sof-tab-header > li{ + background: none; + padding: 10px 15px; + cursor: pointer; +} + +.exopite-sof-tab-mobile-header, +.exopite-sof-tab-header > li { + background: #ededed; + margin-bottom: -1px; + border: 1px solid #e5e5e5; +} +.exopite-sof-tab-header > li { + margin-left: 1px; + margin-right: 1px; +} +.exopite-sof-tab-header.equal-width > li { + flex-grow: 1; + flex-basis: 0; +} +.exopite-sof-tab-header > li:first-of-type { + margin-left: 0; +} +.exopite-sof-tab-header > li:last-of-type { + margin-right: 0; +} +.active > .exopite-sof-tab-mobile-header, +.exopite-sof-tab-header li.active { + border: 1px solid #e5e5e5; + border-bottom-color: #fff; + background: #fff; + +} +.exopite-sof-tab-content { + display: none; +} +.exopite-sof-tab-content-body-inner { + border: 1px solid #e5e5e5; + padding: 15px; +} +.exopite-sof-tab-mobile-header { + padding: 15px; + display: none; +} +.exopite-sof-tab-content.active{ + display: inherit; +} + +@media only screen and (max-width: 500px) { + .exopite-sof-tab-mobile-header { + display: block; + cursor: pointer; + } + .exopite-sof-tab-header { + display: none; + } + .exopite-sof-tab-content { + display: block; + } + .exopite-sof-tab-content-body { + max-height: 0; + overflow: hidden; + transition-property: all; + transition-duration: .3s; + transition-timing-function: cubic-bezier(0.5, 1, 0.1, 1); + } + .active > .exopite-sof-tab-content-body { + max-height: 1000px; + overflow-y: auto; + } +} +/* .exopite-sof-tabs { display: flex; flex-wrap: wrap; } @@ -2256,7 +2352,7 @@ input:disabled + .switch__toggle { flex-grow: 1; width: 100%; display: none; - /* padding: 1rem; */ + background: #fff; } .exopite-sof-tabs input[type="radio"] { @@ -2290,7 +2386,7 @@ input:disabled + .switch__toggle { margin-right: 0; margin-top: 0.2rem; } -} +} */ /* STYLE 2 */ /* Color Picker */ @@ -2379,7 +2475,8 @@ input:disabled + .switch__toggle { .exopite-sof-fieldset input[type="email"], .exopite-sof-fieldset input[type="password"], .exopite-sof-fieldset input[type="text"] { - min-width: 375px; + max-width: 375px; + width: 100%; } .exopite-sof-field-date .exopite-sof-fieldset .datepicker, .exopite-sof-fieldset input[type="text"].chosen-search-input { @@ -2618,4 +2715,245 @@ input[type="color"] { } .exopite-sof-media input { margin-right: 1px; +} +.search + .exopite-sof-sections h2 { + cursor: pointer; +} +.sortable-placeholder { + background: rgb(255, 252, 244); + height: 42px; + margin-bottom: 5px; + border: 1px dashed #e1e5e9; +} +.exopite-sof-cloneable--helper .fa-arrows-v { + padding: 0 6px; + cursor: move; +} +.exopite-sof-form-field-input input[type="text"] { + flex: 1 1 auto; + width: 1%; +} +.width-150 + .chosen-container { + max-width: 150px !important; +} +.width-150 + .chosen-container { + max-width: 200px !important; +} +/* Fieldset */ +.container { + width: 100%; + padding-right: 15px; + padding-left: 15px; + margin-right: auto; + margin-left: auto; + box-sizing: border-box; +} +.row { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + margin-right: -15px; + margin-left: -15px; + box-sizing: border-box; +} +.col, .col-xl-12, .col-xl-1, .col-xl-10, .col-xl-11, .col-xl-12, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6, .col-xl-7, .col-xl-8, .col-xl-9 { + position: relative; + width: 100%; + min-height: 1px; + padding-right: 15px; + padding-left: 15px; + box-sizing: border-box; + +} +.col { + -ms-flex-preferred-size: 0; + flex-basis: 0; + -ms-flex-positive: 1; + flex-grow: 1; + max-width: 100%; +} +.col-xs-12 { + -ms-flex: 0 0 100%; + flex: 0 0 100%; + max-width: 100%; +} +@media (min-width: 992px) { + .col-lg { + -ms-flex-preferred-size: 0; + flex-basis: 0; + -ms-flex-positive: 1; + flex-grow: 1; + max-width: 100%; + } + .col-lg-auto { + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: auto; + max-width: 100%; + } + .col-lg-1 { + -ms-flex: 0 0 8.333333%; + flex: 0 0 8.333333%; + max-width: 8.333333%; + } + .col-lg-2 { + -ms-flex: 0 0 16.666667%; + flex: 0 0 16.666667%; + max-width: 16.666667%; + } + .col-lg-3 { + -ms-flex: 0 0 25%; + flex: 0 0 25%; + max-width: 25%; + } + .col-lg-4 { + -ms-flex: 0 0 33.333333%; + flex: 0 0 33.333333%; + max-width: 33.333333%; + } + .col-lg-5 { + -ms-flex: 0 0 41.666667%; + flex: 0 0 41.666667%; + max-width: 41.666667%; + } + .col-lg-6 { + -ms-flex: 0 0 50%; + flex: 0 0 50%; + max-width: 50%; + } +} +.col-xs-12 .exopite-sof-field { + padding-left: 0; + padding-right: 0; + padding-top: 0; +} +.col-xs-12.exopite-sof-col-lg .exopite-sof-field .exopite-sof-fieldset { + margin-left: 0; +} +.col-xs-12.exopite-sof-col-lg .exopite-sof-field .exopite-sof-title { + position: relative; + width: 100%; + float: none; +} +.exopite-sof-group .exopite-sof-field:not(:last-child) { + padding-bottom: 0; +} +/* Group compact */ +.exopite-sof-group-compact .exopite-sof-cloneable__content > .exopite-sof-field, +.exopite-sof-group-compact .exopite-sof-cloneable__content, +.exopite-sof-group-compact .exopite-sof-cloneable--helper, +.exopite-sof-group-compact .exopite-sof-cloneable__item, +.exopite-sof-group-compact .exopite-sof-cloneable__title { + display: flex; +} +.exopite-sof-group-compact .exopite-sof-cloneable__title { + width: 9%; + min-width: 55px; + order: 2; + padding: 0; + align-items: center; + border-bottom: none; + border-left: 1px solid #e5e5e5; + justify-content: center; +} +.exopite-sof-group-compact .exopite-sof-cloneable__text { + display: none; +} +.exopite-sof-group-compact .exopite-sof-cloneable--helper { + align-items: center; + justify-content: center; +} +.exopite-sof-group-compact .exopite-sof-cloneable__content { + flex: 1; + flex-direction: column; +} +.exopite-sof-group-compact .exopite-sof-cloneable__content > .exopite-sof-field .exopite-sof-fieldset { + margin-left: 0; +} +.exopite-sof-group-compact .exopite-sof-cloneable__content > .exopite-sof-field { + flex-direction: column; + flex: 1; + padding: 5px 15px; +} +.exopite-sof-fieldset .exopite-sof-group-compact select, +.exopite-sof-fieldset .exopite-sof-group-compact input[type="email"], +.exopite-sof-fieldset .exopite-sof-group-compact input[type="password"], +.exopite-sof-fieldset .exopite-sof-group-compact input[type="text"] { + max-width: 100%; +} +.exopite-sof-cloneable--helper { + font-size: 14px; + color: #888; +} +.exopite-sof-cloneable--helper i:hover { + color: #444; +} +.exopite-sof-wrapper input[type="text"].minicolor { + padding-left: 40px; +} +.exopite-sof-wrapper .minicolors-theme-default .minicolors-swatch { + top: 0; + left: 0; + width: 29px; + height: 29px; +} +.exopite-sof-typography-color { + margin-bottom: 8px; +} +/* Gallery */ +.exopite-sof-gallery { + list-style: none; +} +.exopite-sof-gallery > span { + position: relative; + display: inline-block; + margin-right: 6px; + margin-bottom: 6px; + cursor: grab; +} +.exopite-sof-image-delete::before { + content: '×'; +} +.exopite-sof-image-delete { + font-size: 20px; + position: absolute; + top: 5px; + right: 5px; + line-height: 16px; + padding: 0 2px 3px 2px; + background: red; + color: #fff; + display: inline-block; + box-sizing: border-box; + cursor: pointer; +} +.exopite-sof-gallery { + line-height: 0; +} +.exopite-sof-gallery img { + float: left; +} +.exopite-sof-gallery-add { + cursor: pointer; +} +.exopite-sof-gallery .sortable-placeholder { + width: 80px; + /* border: 3px dashed #ccc; */ + margin-bottom: 6px; + margin-right: 6px; + box-sizing: border-box; + height: initial; + display: inline-block; +} +.edit-post-sidebar .exopite-sof-field-color input.minicolor { + border-radius: 0; + height: 31px; + border-color: #e5e5e5; + background: #f4f4f4; +} +.edit-post-sidebar .exopite-sof-field-color input.minicolor, +.edit-post-sidebar .exopite-sof-field-color .minicolors-swatch { + border-color: #e5e5e5; } \ No newline at end of file diff --git a/exopite-notificator/admin/exopite-simple-options/assets/html5sortable.min.js b/exopite-notificator/admin/exopite-simple-options/assets/html5sortable.min.js new file mode 100644 index 0000000..53d5fed --- /dev/null +++ b/exopite-notificator/admin/exopite-simple-options/assets/html5sortable.min.js @@ -0,0 +1,2 @@ +var sortable=function(){"use strict";function d(e,t,n){if(void 0===n)return e&&e.h5s&&e.h5s.data&&e.h5s.data[t];e.h5s=e.h5s||{},e.h5s.data=e.h5s.data||{},e.h5s.data[t]=n}function u(e,t){if(!(e instanceof NodeList||e instanceof HTMLCollection||e instanceof Array))throw new Error("You must provide a nodeList/HTMLCollection/Array of elements to be filtered.");return"string"!=typeof t?Array.from(e):Array.from(e).filter(function(e){return 1===e.nodeType&&e.matches(t)})}var p=new Map,t=function(){function e(){this._config=new Map,this._placeholder=void 0,this._data=new Map}return Object.defineProperty(e.prototype,"config",{get:function(){var n={};return this._config.forEach(function(e,t){n[t]=e}),n},set:function(e){if("object"!=typeof e)throw new Error("You must provide a valid configuration object to the config setter.");var t=Object.assign({},e);this._config=new Map(Object.entries(t))},enumerable:!0,configurable:!0}),e.prototype.setConfig=function(e,t){if(!this._config.has(e))throw new Error("Trying to set invalid configuration item: "+e);this._config.set(e,t)},e.prototype.getConfig=function(e){if(!this._config.has(e))throw new Error("Invalid configuration item requested: "+e);return this._config.get(e)},Object.defineProperty(e.prototype,"placeholder",{get:function(){return this._placeholder},set:function(e){if(!(e instanceof HTMLElement)&&null!==e)throw new Error("A placeholder must be an html element or null.");this._placeholder=e},enumerable:!0,configurable:!0}),e.prototype.setData=function(e,t){if("string"!=typeof e)throw new Error("The key must be a string.");this._data.set(e,t)},e.prototype.getData=function(e){if("string"!=typeof e)throw new Error("The key must be a string.");return this._data.get(e)},e.prototype.deleteData=function(e){if("string"!=typeof e)throw new Error("The key must be a string.");return this._data.delete(e)},e}();function m(e){if(!(e instanceof HTMLElement))throw new Error("Please provide a sortable to the store function.");return p.has(e)||p.set(e,new t),p.get(e)}function h(e,t,n){if(e instanceof Array)for(var r=0;r':t=document.createElement("div")),"string"==typeof n&&(r=t.classList).add.apply(r,n.split(" ")),t;var r}(s,e,f.placeholderClass),d(s,"items",f.items),f.acceptFrom?d(s,"acceptFrom",f.acceptFrom):f.connectWith&&d(s,"connectWith",f.connectWith),j(s),g(t,"role","option"),g(t,"aria-grabbed","false"),P(s,!0),h(s,"dragstart",function(e){var t=L(e);if(!0!==t.isSortable&&(e.stopImmediatePropagation(),(!f.handle||t.matches(f.handle))&&"false"!==t.getAttribute("draggable"))){var n=F(t,e),r=N(n,t);S=u(n.children,f.items),D=S.indexOf(r),I=y(r,n.children),A=n,function(e,t,n){if(!(e instanceof Event))throw new Error("setDragImage requires a DragEvent as the first argument.");if(!(t instanceof HTMLElement))throw new Error("setDragImage requires the dragged element as the second argument.");if(n||(n=C),e.dataTransfer&&e.dataTransfer.setDragImage){var r=n(t,v(t),e);if(!(r.element instanceof HTMLElement)||"number"!=typeof r.posX||"number"!=typeof r.posY)throw new Error("The customDragImage function you provided must return and object with the properties element[string], posX[integer], posY[integer].");e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setData("text/plain",L(e).id),e.dataTransfer.setDragImage(r.element,r.posX,r.posY)}}(e,r,f.customDragImage),H=T(r),r.classList.add(f.draggingClass),g(x=W(r,n),"aria-grabbed","true"),n.dispatchEvent(new CustomEvent("sortstart",{detail:{origin:{elementIndex:I,index:D,container:A},item:x,originalTarget:t}}))}}),h(s,"dragenter",function(e){var t=L(e),n=F(t,e);n&&n!==Y&&(O=u(n.children,d(n,"items")).filter(function(e){return e!==m(s).placeholder}),n.dispatchEvent(new CustomEvent("sortenter",{detail:{origin:{elementIndex:I,index:D,container:A},destination:{container:n,itemsBeforeUpdate:O},item:x,originalTarget:t}}))),Y=n}),h(s,"dragend",function(e){if(x){x.classList.remove(f.draggingClass),g(x,"aria-grabbed","false"),"true"===x.getAttribute("aria-copied")&&"true"!==d(x,"dropped")&&x.remove(),x.style.display=x.oldDisplay,delete x.oldDisplay;var t=Array.from(p.values()).map(function(e){return e.placeholder}).filter(function(e){return e instanceof HTMLElement}).filter(E)[0];t&&t.remove(),s.dispatchEvent(new CustomEvent("sortstop",{detail:{origin:{elementIndex:I,index:D,container:A},item:x}})),H=x=Y=null}}),h(s,"drop",function(e){if(M(s,x.parentElement)){e.preventDefault(),e.stopPropagation(),d(x,"dropped","true");var t=Array.from(p.values()).map(function(e){return e.placeholder}).filter(function(e){return e instanceof HTMLElement}).filter(E)[0];b(t,x),t.remove(),s.dispatchEvent(new CustomEvent("sortstop",{detail:{origin:{elementIndex:I,index:D,container:A},item:x}}));var n=m(s).placeholder,r=u(A.children,f.items).filter(function(e){return e!==n}),o=!0===this.isSortable?this:this.parentElement,i=u(o.children,d(o,"items")).filter(function(e){return e!==n}),a=y(x,Array.from(x.parentElement.children).filter(function(e){return e!==n})),l=y(x,i);I===a&&A===o||s.dispatchEvent(new CustomEvent("sortupdate",{detail:{origin:{elementIndex:I,index:D,container:A,itemsBeforeUpdate:S,items:r},destination:{index:l,elementIndex:a,container:o,itemsBeforeUpdate:O,items:i},item:x}}))}});var r,o,i,a=(r=function(t,e,n){if(x)if(f.forcePlaceholderSize&&(m(t).placeholder.style.height=H+"px"),-1=parseInt(r.maxItems)&&x.parentElement!==n||(e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect=!0===m(n).getConfig("copy")?"copy":"move",a(n,t,e.pageY))}};h(t.concat(s),"dragover",l),h(t.concat(s),"dragenter",l)}),e)}return z.destroy=function(e){r(e)},z.enable=function(e){j(e)},z.disable=function(e){var t,n,r;n=d(t=e,"opts"),r=c(u(t.children,n.items),n.handle),g(t,"aria-dropeffect","none"),d(t,"_disabled","true"),g(r,"draggable","false"),l(r,"mousedown")},z}(); +//# sourceMappingURL=html5sortable.min.js.map diff --git a/exopite-notificator/admin/exopite-simple-options/assets/jquery.minicolors.css b/exopite-notificator/admin/exopite-simple-options/assets/jquery.minicolors.css new file mode 100644 index 0000000..8bc54cf --- /dev/null +++ b/exopite-notificator/admin/exopite-simple-options/assets/jquery.minicolors.css @@ -0,0 +1 @@ +.minicolors{position:relative}.minicolors-sprite{background-image:url(jquery.minicolors.png)}.minicolors-swatch{position:absolute;vertical-align:middle;background-position:-80px 0;border:solid 1px #ccc;cursor:text;padding:0;margin:0;display:inline-block}.minicolors-swatch-color{position:absolute;top:0;left:0;right:0;bottom:0}.minicolors input[type=hidden]+.minicolors-swatch{width:28px;position:static;cursor:pointer}.minicolors input[type=hidden][disabled]+.minicolors-swatch{cursor:default}.minicolors-panel{position:absolute;width:173px;background:#fff;border:solid 1px #ccc;box-shadow:0 0 20px rgba(0,0,0,.2);z-index:99999;box-sizing:content-box;display:none}.minicolors-panel.minicolors-visible{display:block}.minicolors-position-top .minicolors-panel{top:-154px}.minicolors-position-right .minicolors-panel{right:0}.minicolors-position-bottom .minicolors-panel{top:auto}.minicolors-position-left .minicolors-panel{left:0}.minicolors-with-opacity .minicolors-panel{width:194px}.minicolors .minicolors-grid{position:relative;top:1px;left:1px;width:150px;height:150px;margin-bottom:2px;background-position:-120px 0;cursor:crosshair}[dir=rtl] .minicolors .minicolors-grid{right:1px}.minicolors .minicolors-grid-inner{position:absolute;top:0;left:0;width:150px;height:150px}.minicolors-slider-saturation .minicolors-grid{background-position:-420px 0}.minicolors-slider-saturation .minicolors-grid-inner{background-position:-270px 0;background-image:inherit}.minicolors-slider-brightness .minicolors-grid{background-position:-570px 0}.minicolors-slider-brightness .minicolors-grid-inner{background-color:#000}.minicolors-slider-wheel .minicolors-grid{background-position:-720px 0}.minicolors-opacity-slider,.minicolors-slider{position:absolute;top:1px;left:152px;width:20px;height:150px;background-color:#fff;background-position:0 0;cursor:row-resize}[dir=rtl] .minicolors-opacity-slider,[dir=rtl] .minicolors-slider{right:152px}.minicolors-slider-saturation .minicolors-slider{background-position:-60px 0}.minicolors-slider-brightness .minicolors-slider{background-position:-20px 0}.minicolors-slider-wheel .minicolors-slider{background-position:-20px 0}.minicolors-opacity-slider{left:173px;background-position:-40px 0;display:none}[dir=rtl] .minicolors-opacity-slider{right:173px}.minicolors-with-opacity .minicolors-opacity-slider{display:block}.minicolors-grid .minicolors-picker{position:absolute;top:70px;left:70px;width:12px;height:12px;border:solid 1px #000;border-radius:10px;margin-top:-6px;margin-left:-6px;background:0 0}.minicolors-grid .minicolors-picker>div{position:absolute;top:0;left:0;width:8px;height:8px;border-radius:8px;border:solid 2px #fff;box-sizing:content-box}.minicolors-picker{position:absolute;top:0;left:0;width:18px;height:2px;background:#fff;border:solid 1px #000;margin-top:-2px;box-sizing:content-box}.minicolors-swatches,.minicolors-swatches li{margin:5px 0 3px 5px;padding:0;list-style:none;overflow:hidden}[dir=rtl] .minicolors-swatches,[dir=rtl] .minicolors-swatches li{margin:5px 5px 3px 0}.minicolors-swatches .minicolors-swatch{position:relative;float:left;cursor:pointer;margin:0 4px 0 0}[dir=rtl] .minicolors-swatches .minicolors-swatch{float:right;margin:0 0 0 4px}.minicolors-with-opacity .minicolors-swatches .minicolors-swatch{margin-right:7px}[dir=rtl] .minicolors-with-opacity .minicolors-swatches .minicolors-swatch{margin-right:0;margin-left:7px}.minicolors-swatch.selected{border-color:#000}.minicolors-inline{display:inline-block}.minicolors-inline .minicolors-input{display:none!important}.minicolors-inline .minicolors-panel{position:relative;top:auto;left:auto;box-shadow:none;z-index:auto;display:inline-block}[dir=rtl] .minicolors-inline .minicolors-panel{right:auto}.minicolors-theme-default .minicolors-swatch{top:5px;left:5px;width:18px;height:18px}[dir=rtl] .minicolors-theme-default .minicolors-swatch{right:5px}.minicolors-theme-default .minicolors-swatches .minicolors-swatch{margin-bottom:2px;top:0;left:0;width:18px;height:18px}[dir=rtl] .minicolors-theme-default .minicolors-swatches .minicolors-swatch{right:0}.minicolors-theme-default.minicolors-position-right .minicolors-swatch{left:auto;right:5px}[dir=rtl] .minicolors-theme-default.minicolors-position-left .minicolors-swatch{right:auto;left:5px}.minicolors-theme-default.minicolors{width:auto;display:inline-block}.minicolors-theme-default .minicolors-input{height:20px;width:auto;display:inline-block;padding-left:26px}[dir=rtl] .minicolors-theme-default .minicolors-input{text-align:right;unicode-bidi:plaintext;padding-left:1px;padding-right:26px}.minicolors-theme-default.minicolors-position-right .minicolors-input{padding-right:26px;padding-left:inherit}[dir=rtl] .minicolors-theme-default.minicolors-position-left .minicolors-input{padding-right:inherit;padding-left:26px}.minicolors-theme-bootstrap .minicolors-swatch{z-index:2;top:3px;left:3px;width:28px;height:28px;border-radius:3px}[dir=rtl] .minicolors-theme-bootstrap .minicolors-swatch{right:3px}.minicolors-theme-bootstrap .minicolors-swatches .minicolors-swatch{margin-bottom:2px;top:0;left:0;width:20px;height:20px}[dir=rtl] .minicolors-theme-bootstrap .minicolors-swatches .minicolors-swatch{right:0}.minicolors-theme-bootstrap .minicolors-swatch-color{border-radius:inherit}.minicolors-theme-bootstrap.minicolors-position-right>.minicolors-swatch{left:auto;right:3px}[dir=rtl] .minicolors-theme-bootstrap.minicolors-position-left>.minicolors-swatch{right:auto;left:3px}.minicolors-theme-bootstrap .minicolors-input{float:none;padding-left:44px}[dir=rtl] .minicolors-theme-bootstrap .minicolors-input{text-align:right;unicode-bidi:plaintext;padding-left:12px;padding-right:44px}.minicolors-theme-bootstrap.minicolors-position-right .minicolors-input{padding-right:44px;padding-left:12px}[dir=rtl] .minicolors-theme-bootstrap.minicolors-position-left .minicolors-input{padding-right:12px;padding-left:44px}.minicolors-theme-bootstrap .minicolors-input.input-lg+.minicolors-swatch{top:4px;left:4px;width:37px;height:37px;border-radius:5px}[dir=rtl] .minicolors-theme-bootstrap .minicolors-input.input-lg+.minicolors-swatch{right:4px}.minicolors-theme-bootstrap .minicolors-input.input-sm+.minicolors-swatch{width:24px;height:24px}.minicolors-theme-bootstrap .minicolors-input.input-xs+.minicolors-swatch{width:18px;height:18px}.input-group .minicolors-theme-bootstrap:not(:first-child) .minicolors-input{border-top-left-radius:0;border-bottom-left-radius:0}[dir=rtl] .input-group .minicolors-theme-bootstrap .minicolors-input{border-radius:4px}[dir=rtl] .input-group .minicolors-theme-bootstrap:not(:first-child) .minicolors-input{border-top-right-radius:0;border-bottom-right-radius:0}[dir=rtl] .input-group .minicolors-theme-bootstrap:not(:last-child) .minicolors-input{border-top-left-radius:0;border-bottom-left-radius:0}[dir=rtl] .input-group .form-control,[dir=rtl] .input-group-addon,[dir=rtl] .input-group-btn>.btn,[dir=rtl] .input-group-btn>.btn-group>.btn,[dir=rtl] .input-group-btn>.dropdown-toggle{border:1px solid #ccc;border-radius:4px}[dir=rtl] .input-group .form-control:first-child,[dir=rtl] .input-group-addon:first-child,[dir=rtl] .input-group-btn:first-child>.btn,[dir=rtl] .input-group-btn:first-child>.btn-group>.btn,[dir=rtl] .input-group-btn:first-child>.dropdown-toggle,[dir=rtl] .input-group-btn:last-child>.btn-group:not(:last-child)>.btn,[dir=rtl] .input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-left-radius:0;border-bottom-left-radius:0;border-left:0}[dir=rtl] .input-group .form-control:last-child,[dir=rtl] .input-group-addon:last-child,[dir=rtl] .input-group-btn:first-child>.btn-group:not(:first-child)>.btn,[dir=rtl] .input-group-btn:first-child>.btn:not(:first-child),[dir=rtl] .input-group-btn:last-child>.btn,[dir=rtl] .input-group-btn:last-child>.btn-group>.btn,[dir=rtl] .input-group-btn:last-child>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.minicolors-theme-semanticui .minicolors-swatch{top:0;left:0;padding:18px}[dir=rtl] .minicolors-theme-semanticui .minicolors-swatch{right:0}.minicolors-theme-semanticui input{text-indent:30px} \ No newline at end of file diff --git a/exopite-notificator/admin/exopite-simple-options/assets/jquery.minicolors.js b/exopite-notificator/admin/exopite-simple-options/assets/jquery.minicolors.js new file mode 100644 index 0000000..dc82eba --- /dev/null +++ b/exopite-notificator/admin/exopite-simple-options/assets/jquery.minicolors.js @@ -0,0 +1 @@ +!function(i){"function"==typeof define&&define.amd?define(["jquery"],i):"object"==typeof exports?module.exports=i(require("jquery")):i(jQuery)}(function(i){"use strict";function t(i){var t=i.parent();i.removeData("minicolors-initialized").removeData("minicolors-settings").removeProp("size").removeClass("minicolors-input"),t.before(i).remove()}function o(i){var t=i.parent(),o=t.find(".minicolors-panel"),a=i.data("minicolors-settings");!i.data("minicolors-initialized")||i.prop("disabled")||t.hasClass("minicolors-inline")||t.hasClass("minicolors-focus")||(s(),t.addClass("minicolors-focus"),o.animate?o.stop(!0,!0).fadeIn(a.showSpeed,function(){a.show&&a.show.call(i.get(0))}):(o.show(),a.show&&a.show.call(i.get(0))))}function s(){i(".minicolors-focus").each(function(){var t=i(this),o=t.find(".minicolors-input"),s=t.find(".minicolors-panel"),a=o.data("minicolors-settings");s.animate?s.fadeOut(a.hideSpeed,function(){a.hide&&a.hide.call(o.get(0)),t.removeClass("minicolors-focus")}):(s.hide(),a.hide&&a.hide.call(o.get(0)),t.removeClass("minicolors-focus"))})}function a(i,t,o){var s,a,e,r,c,l=i.parents(".minicolors").find(".minicolors-input"),h=l.data("minicolors-settings"),d=i.find("[class$=-picker]"),p=i.offset().left,u=i.offset().top,g=Math.round(t.pageX-p),m=Math.round(t.pageY-u),f=o?h.animationSpeed:0;t.originalEvent.changedTouches&&(g=t.originalEvent.changedTouches[0].pageX-p,m=t.originalEvent.changedTouches[0].pageY-u),g<0&&(g=0),m<0&&(m=0),g>i.width()&&(g=i.width()),m>i.height()&&(m=i.height()),i.parent().is(".minicolors-slider-wheel")&&d.parent().is(".minicolors-grid")&&(s=75-g,a=75-m,e=Math.sqrt(s*s+a*a),(r=Math.atan2(a,s))<0&&(r+=2*Math.PI),e>75&&(e=75,g=75-75*Math.cos(r),m=75-75*Math.sin(r)),g=Math.round(g),m=Math.round(m)),c={top:m+"px"},i.is(".minicolors-grid")&&(c.left=g+"px"),d.animate?d.stop(!0).animate(c,f,h.animationEasing,function(){n(l,i)}):(d.css(c),n(l,i))}function n(i,t){function o(i,t){var o,s;return i.length&&t?(o=i.offset().left,s=i.offset().top,{x:o-t.offset().left+i.outerWidth()/2,y:s-t.offset().top+i.outerHeight()/2}):null}var s,a,n,r,l,h,d,p=i.val(),g=i.attr("data-opacity"),m=i.parent(),f=i.data("minicolors-settings"),v=m.find(".minicolors-input-swatch"),w=m.find(".minicolors-grid"),y=m.find(".minicolors-slider"),C=m.find(".minicolors-opacity-slider"),k=w.find("[class$=-picker]"),M=y.find("[class$=-picker]"),x=C.find("[class$=-picker]"),I=o(k,w),S=o(M,y),z=o(x,C);if(t.is(".minicolors-grid, .minicolors-slider, .minicolors-opacity-slider")){switch(f.control){case"wheel":r=w.width()/2-I.x,l=w.height()/2-I.y,h=Math.sqrt(r*r+l*l),(d=Math.atan2(l,r))<0&&(d+=2*Math.PI),h>75&&(h=75,I.x=69-75*Math.cos(d),I.y=69-75*Math.sin(d)),a=u(h/.75,0,100),p=b({h:s=u(180*d/Math.PI,0,360),s:a,b:n=u(100-Math.floor(S.y*(100/y.height())),0,100)}),y.css("backgroundColor",b({h:s,s:a,b:100}));break;case"saturation":p=b({h:s=u(parseInt(I.x*(360/w.width()),10),0,360),s:a=u(100-Math.floor(S.y*(100/y.height())),0,100),b:n=u(100-Math.floor(I.y*(100/w.height())),0,100)}),y.css("backgroundColor",b({h:s,s:100,b:n})),m.find(".minicolors-grid-inner").css("opacity",a/100);break;case"brightness":p=b({h:s=u(parseInt(I.x*(360/w.width()),10),0,360),s:a=u(100-Math.floor(I.y*(100/w.height())),0,100),b:n=u(100-Math.floor(S.y*(100/y.height())),0,100)}),y.css("backgroundColor",b({h:s,s:a,b:100})),m.find(".minicolors-grid-inner").css("opacity",1-n/100);break;default:p=b({h:s=u(360-parseInt(S.y*(360/y.height()),10),0,360),s:a=u(Math.floor(I.x*(100/w.width())),0,100),b:n=u(100-Math.floor(I.y*(100/w.height())),0,100)}),w.css("backgroundColor",b({h:s,s:100,b:100}))}e(i,p,g=f.opacity?parseFloat(1-z.y/C.height()).toFixed(2):1)}else v.find("span").css({backgroundColor:p,opacity:g}),c(i,p,g)}function e(i,t,o){var s,a=i.parent(),n=i.data("minicolors-settings"),e=a.find(".minicolors-input-swatch");n.opacity&&i.attr("data-opacity",o),"rgb"===n.format?(s=g(t)?d(t,!0):w(h(t,!0)),o=""===i.attr("data-opacity")?1:u(parseFloat(i.attr("data-opacity")).toFixed(2),0,1),!isNaN(o)&&n.opacity||(o=1),t=i.minicolors("rgbObject").a<=1&&s&&n.opacity?"rgba("+s.r+", "+s.g+", "+s.b+", "+parseFloat(o)+")":"rgb("+s.r+", "+s.g+", "+s.b+")"):(g(t)&&(t=f(t)),t=l(t,n.letterCase)),i.val(t),e.find("span").css({backgroundColor:t,opacity:o}),c(i,t,o)}function r(t,o){var s,a,n,e,r,v,y,C,k,M,x=t.parent(),I=t.data("minicolors-settings"),S=x.find(".minicolors-input-swatch"),z=x.find(".minicolors-grid"),F=x.find(".minicolors-slider"),T=x.find(".minicolors-opacity-slider"),D=z.find("[class$=-picker]"),j=F.find("[class$=-picker]"),q=T.find("[class$=-picker]");switch(g(t.val())?(s=f(t.val()),(r=u(parseFloat(m(t.val())).toFixed(2),0,1))&&t.attr("data-opacity",r)):s=l(h(t.val(),!0),I.letterCase),s||(s=l(p(I.defaultValue,!0),I.letterCase)),a=function(i){var t=function(i){var t={h:0,s:0,b:0},o=Math.min(i.r,i.g,i.b),s=Math.max(i.r,i.g,i.b),a=s-o;t.b=s,t.s=0!==s?255*a/s:0,0!==t.s?i.r===s?t.h=(i.g-i.b)/a:i.g===s?t.h=2+(i.b-i.r)/a:t.h=4+(i.r-i.g)/a:t.h=-1;t.h*=60,t.h<0&&(t.h+=360);return t.s*=100/255,t.b*=100/255,t}(w(i));0===t.s&&(t.h=360);return t}(s),e=I.keywords?i.map(I.keywords.split(","),function(t){return i.trim(t.toLowerCase())}):[],v=""!==t.val()&&i.inArray(t.val().toLowerCase(),e)>-1?l(t.val()):g(t.val())?d(t.val()):s,o||t.val(v),I.opacity&&(n=""===t.attr("data-opacity")?1:u(parseFloat(t.attr("data-opacity")).toFixed(2),0,1),isNaN(n)&&(n=1),t.attr("data-opacity",n),S.find("span").css("opacity",n),C=u(T.height()-T.height()*n,0,T.height()),q.css("top",C+"px")),"transparent"===t.val().toLowerCase()&&S.find("span").css("opacity",0),S.find("span").css("backgroundColor",s),I.control){case"wheel":k=u(Math.ceil(.75*a.s),0,z.height()/2),M=a.h*Math.PI/180,y=u(75-Math.cos(M)*k,0,z.width()),C=u(75-Math.sin(M)*k,0,z.height()),D.css({top:C+"px",left:y+"px"}),C=150-a.b/(100/z.height()),""===s&&(C=0),j.css("top",C+"px"),F.css("backgroundColor",b({h:a.h,s:a.s,b:100}));break;case"saturation":y=u(5*a.h/12,0,150),C=u(z.height()-Math.ceil(a.b/(100/z.height())),0,z.height()),D.css({top:C+"px",left:y+"px"}),C=u(F.height()-a.s*(F.height()/100),0,F.height()),j.css("top",C+"px"),F.css("backgroundColor",b({h:a.h,s:100,b:a.b})),x.find(".minicolors-grid-inner").css("opacity",a.s/100);break;case"brightness":y=u(5*a.h/12,0,150),C=u(z.height()-Math.ceil(a.s/(100/z.height())),0,z.height()),D.css({top:C+"px",left:y+"px"}),C=u(F.height()-a.b*(F.height()/100),0,F.height()),j.css("top",C+"px"),F.css("backgroundColor",b({h:a.h,s:a.s,b:100})),x.find(".minicolors-grid-inner").css("opacity",1-a.b/100);break;default:y=u(Math.ceil(a.s/(100/z.width())),0,z.width()),C=u(z.height()-Math.ceil(a.b/(100/z.height())),0,z.height()),D.css({top:C+"px",left:y+"px"}),C=u(F.height()-a.h/(360/F.height()),0,F.height()),j.css("top",C+"px"),z.css("backgroundColor",b({h:a.h,s:100,b:100}))}t.data("minicolors-initialized")&&c(t,v,n)}function c(i,t,o){var s,a,n,e=i.data("minicolors-settings"),r=i.data("minicolors-lastChange");if(!r||r.value!==t||r.opacity!==o){if(i.data("minicolors-lastChange",{value:t,opacity:o}),e.swatches&&0!==e.swatches.length){for(s=g(t)?d(t,!0):w(t),a=-1,n=0;no&&(i=o),i}function g(i){var t=i.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);return!(!t||4!==t.length)}function m(i){return(i=i.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+(\.\d{1,2})?|\.\d{1,2})[\s+]?/i))&&6===i.length?i[4]:"1"}function f(i){return(i=i.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===i.length?"#"+("0"+parseInt(i[1],10).toString(16)).slice(-2)+("0"+parseInt(i[2],10).toString(16)).slice(-2)+("0"+parseInt(i[3],10).toString(16)).slice(-2):""}function v(t){var o=[t.r.toString(16),t.g.toString(16),t.b.toString(16)];return i.each(o,function(i,t){1===t.length&&(o[i]="0"+t)}),"#"+o.join("")}function b(i){return v(function(i){var t={},o=Math.round(i.h),s=Math.round(255*i.s/100),a=Math.round(255*i.b/100);if(0===s)t.r=t.g=t.b=a;else{var n=a,e=(255-s)*a/255,r=o%60*(n-e)/60;360===o&&(o=0),o<60?(t.r=n,t.b=e,t.g=e+r):o<120?(t.g=n,t.b=e,t.r=n-r):o<180?(t.g=n,t.r=e,t.b=e+r):o<240?(t.b=n,t.r=e,t.g=n-r):o<300?(t.b=n,t.g=e,t.r=e+r):o<360?(t.r=n,t.g=e,t.b=n-r):(t.r=0,t.g=0,t.b=0)}return{r:Math.round(t.r),g:Math.round(t.g),b:Math.round(t.b)}}(i))}function w(i){return{r:(i=parseInt(i.indexOf("#")>-1?i.substring(1):i,16))>>16,g:(65280&i)>>8,b:255&i}}i.minicolors={defaults:{animationSpeed:50,animationEasing:"swing",change:null,changeDelay:0,control:"hue",defaultValue:"",format:"hex",hide:null,hideSpeed:100,inline:!1,keywords:"",letterCase:"lowercase",opacity:!1,position:"bottom",show:null,showSpeed:100,theme:"default",swatches:[]}},i.extend(i.fn,{minicolors:function(a,n){switch(a){case"destroy":return i(this).each(function(){t(i(this))}),i(this);case"hide":return s(),i(this);case"opacity":return void 0===n?i(this).attr("data-opacity"):(i(this).each(function(){r(i(this).attr("data-opacity",n))}),i(this));case"rgbObject":return function(t){var o,s=i(t).attr("data-opacity");if(g(i(t).val()))o=d(i(t).val(),!0);else{var a=h(i(t).val(),!0);o=w(a)}if(!o)return null;void 0!==s&&i.extend(o,{a:parseFloat(s)});return o}(i(this));case"rgbString":case"rgbaString":return function(t,o){var s,a=i(t).attr("data-opacity");if(g(i(t).val()))s=d(i(t).val(),!0);else{var n=h(i(t).val(),!0);s=w(n)}if(!s)return null;void 0===a&&(a=1);return o?"rgba("+s.r+", "+s.g+", "+s.b+", "+parseFloat(a)+")":"rgb("+s.r+", "+s.g+", "+s.b+")"}(i(this),"rgbaString"===a);case"settings":return void 0===n?i(this).data("minicolors-settings"):(i(this).each(function(){var o=i(this).data("minicolors-settings")||{};t(i(this)),i(this).minicolors(i.extend(!0,o,n))}),i(this));case"show":return o(i(this).eq(0)),i(this);case"value":return void 0===n?i(this).val():(i(this).each(function(){"object"==typeof n&&null!==n?(void 0!==n.opacity&&i(this).attr("data-opacity",u(n.opacity,0,1)),n.color&&i(this).val(n.color)):i(this).val(n),r(i(this))}),i(this));default:return"create"!==a&&(n=a),i(this).each(function(){!function(t,o){var s,a,n,e,c,l,p,u=i('
            '),m=i.minicolors.defaults;if(t.data("minicolors-initialized"))return;o=i.extend(!0,{},m,o),u.addClass("minicolors-theme-"+o.theme).toggleClass("minicolors-with-opacity",o.opacity),void 0!==o.position&&i.each(o.position.split(" "),function(){u.addClass("minicolors-position-"+this)});a="rgb"===o.format?o.opacity?"25":"20":o.keywords?"11":"7";t.addClass("minicolors-input").data("minicolors-initialized",!1).data("minicolors-settings",o).prop("size",a).wrap(u).after('
            '),o.inline||(t.after(''),t.next(".minicolors-input-swatch").on("click",function(i){i.preventDefault(),t.focus()}));if((l=t.parent().find(".minicolors-panel")).on("selectstart",function(){return!1}).end(),o.swatches&&0!==o.swatches.length)for(l.addClass("minicolors-with-swatches"),n=i('
              ').appendTo(l),p=0;p').appendTo(n).data("swatch-color",c).find(".minicolors-swatch-color").css({backgroundColor:v(e),opacity:e.a}),o.swatches[p]=e;o.inline&&t.parent().addClass("minicolors-inline");r(t,!1),t.data("minicolors-initialized",!0)}(i(this),n)}),i(this)}}}),i([document]).on("mousedown.minicolors touchstart.minicolors",function(t){i(t.target).parents().add(t.target).hasClass("minicolors")||s()}).on("mousedown.minicolors touchstart.minicolors",".minicolors-grid, .minicolors-slider, .minicolors-opacity-slider",function(t){var o=i(this);t.preventDefault(),i(t.delegateTarget).data("minicolors-target",o),a(o,t,!0)}).on("mousemove.minicolors touchmove.minicolors",function(t){var o=i(t.delegateTarget).data("minicolors-target");o&&a(o,t)}).on("mouseup.minicolors touchend.minicolors",function(){i(this).removeData("minicolors-target")}).on("click.minicolors",".minicolors-swatches li",function(t){t.preventDefault();var o=i(this),s=o.parents(".minicolors").find(".minicolors-input"),a=o.data("swatch-color");e(s,a,m(a)),r(s)}).on("mousedown.minicolors touchstart.minicolors",".minicolors-input-swatch",function(t){var s=i(this).parent().find(".minicolors-input");t.preventDefault(),o(s)}).on("focus.minicolors",".minicolors-input",function(){var t=i(this);t.data("minicolors-initialized")&&o(t)}).on("blur.minicolors",".minicolors-input",function(){var t,o,s,a,n,e=i(this),r=e.data("minicolors-settings");e.data("minicolors-initialized")&&(t=r.keywords?i.map(r.keywords.split(","),function(t){return i.trim(t.toLowerCase())}):[],n=""!==e.val()&&i.inArray(e.val().toLowerCase(),t)>-1?e.val():null===(s=g(e.val())?d(e.val(),!0):(o=h(e.val(),!0))?w(o):null)?r.defaultValue:"rgb"===r.format?r.opacity?d("rgba("+s.r+","+s.g+","+s.b+","+e.attr("data-opacity")+")"):d("rgb("+s.r+","+s.g+","+s.b+")"):v(s),a=r.opacity?e.attr("data-opacity"):1,"transparent"===n.toLowerCase()&&(a=0),e.closest(".minicolors").find(".minicolors-input-swatch > span").css("opacity",a),e.val(n),""===e.val()&&e.val(p(r.defaultValue,!0)),e.val(l(e.val(),r.letterCase)))}).on("keydown.minicolors",".minicolors-input",function(t){var o=i(this);if(o.data("minicolors-initialized"))switch(t.which){case 9:s();break;case 13:case 27:s(),o.blur()}}).on("keyup.minicolors",".minicolors-input",function(){var t=i(this);t.data("minicolors-initialized")&&r(t,!0)}).on("paste.minicolors",".minicolors-input",function(){var t=i(this);t.data("minicolors-initialized")&&setTimeout(function(){r(t,!0)},1)})}); \ No newline at end of file diff --git a/exopite-notificator/admin/exopite-simple-options/assets/jquery.minicolors.png b/exopite-notificator/admin/exopite-simple-options/assets/jquery.minicolors.png new file mode 100644 index 0000000..bccc201 Binary files /dev/null and b/exopite-notificator/admin/exopite-simple-options/assets/jquery.minicolors.png differ diff --git a/exopite-notificator/admin/exopite-simple-options/assets/loader-color-picker.min.js b/exopite-notificator/admin/exopite-simple-options/assets/loader-color-picker.min.js index 1aad5a2..bc89a1f 100644 --- a/exopite-notificator/admin/exopite-simple-options/assets/loader-color-picker.min.js +++ b/exopite-notificator/admin/exopite-simple-options/assets/loader-color-picker.min.js @@ -1 +1 @@ -!function(o){"use strict";o(document).ready(function(){o(".colorpicker").wpColorPicker({change:function(t,e){var i=e.color.toString();o(this).hasClass("font-color-js")&&o(this).parents(".exopite-sof-font-field").find(".exopite-sof-font-preview").css({color:i})}})})}(jQuery); \ No newline at end of file +!function(e,o,t,i){var n="exopiteSOFColorpicker";function s(o,t){this.element=o,this._name=n,this.$element=e(o),this.init()}s.prototype={init:function(){var o=this;o.$element.find(".colorpicker").each(function(t,i){e(i).closest(".exopite-sof-cloneable__item").hasClass("exopite-sof-cloneable__muster")||e(i).hasClass("disabled")||e(i).wpColorPicker({change:function(t,i){o.change(t,i,e(this))}})}),o.$element.closest(".exopite-sof-wrapper").on("exopite-sof-field-group-item-added-after",function(t,i){i.find(".colorpicker").each(function(t,i){e(i).closest(".exopite-sof-cloneable__item").hasClass("exopite-sof-cloneable__muster")||e(i).hasClass("disabled")||e(i).wpColorPicker({change:function(t,i){o.change(t,i,e(this))}})}),console.log("color picker clone")})},change:function(e,o,t){var i=o.color.toString();t.hasClass("font-color-js")&&(console.log("has font-color"),t.parents(".exopite-sof-font-field").find(".exopite-sof-font-preview").css({color:i}))}},e.fn[n]=function(o){return this.each(function(){e.data(this,"plugin_"+n)||e.data(this,"plugin_"+n,new s(this,o))})}}(jQuery,window,document),function(e){"use strict";e(document).ready(function(){e(".exopite-sof-field").exopiteSOFColorpicker()})}(jQuery); \ No newline at end of file diff --git a/exopite-notificator/admin/exopite-simple-options/assets/loader-datepicker.min.js b/exopite-notificator/admin/exopite-simple-options/assets/loader-datepicker.min.js index a7e4e8c..72cb8ad 100644 --- a/exopite-notificator/admin/exopite-simple-options/assets/loader-datepicker.min.js +++ b/exopite-notificator/admin/exopite-simple-options/assets/loader-datepicker.min.js @@ -1 +1 @@ -(function($){"use strict";$(document).ready(function(){$('.datepicker').each(function(index,el){if($(el).parents('.exopite-sof-cloneable__muster').length)return;var dateFormat=$(el).data('format');$(el).datepicker({'dateFormat':dateFormat})})})}(jQuery)) +!function(e,t,i,a){var s="exopiteSOFDatepicker";function n(t,i){this.element=t,this._name=s,this.$element=e(t),this.init()}n.prototype={init:function(){this.$element.find(".datepicker").each(function(t,i){if(!e(i).parents(".exopite-sof-cloneable__muster").length&&!e(i).hasClass(".disabled")){var a=e(i).data("format");e(i).datepicker({dateFormat:a})}}),this.$element.closest(".exopite-sof-wrapper").on("exopite-sof-field-group-item-added-after",function(t,i){i.find(".datepicker").each(function(t,i){if(!e(i).closest(".exopite-sof-cloneable__item").hasClass("exopite-sof-cloneable__muster")&&!e(i).hasClass("disabled")){e(i).hasClass("hasDatepicker")&&(e(i).datepicker("destroy"),e(i).removeClass("hasDatepicker").removeAttr("id"));var a=e(i).data("format");e(i).datepicker({dateFormat:a})}})})}},e.fn[s]=function(t){return this.each(function(){e.data(this,"plugin_"+s)||e.data(this,"plugin_"+s,new n(this,t))})}}(jQuery,window,document),function(e){"use strict";e(document).ready(function(){e(".exopite-sof-field-date").exopiteSOFDatepicker()})}(jQuery); \ No newline at end of file diff --git a/exopite-notificator/admin/exopite-simple-options/assets/loader-jquery-trumbowyg.min.js b/exopite-notificator/admin/exopite-simple-options/assets/loader-jquery-trumbowyg.min.js index 2937671..24fe74c 100644 --- a/exopite-notificator/admin/exopite-simple-options/assets/loader-jquery-trumbowyg.min.js +++ b/exopite-notificator/admin/exopite-simple-options/assets/loader-jquery-trumbowyg.min.js @@ -1 +1 @@ -(function (a) { function e(g) { this.element = g, this._name = f, this.$element = a(g), this.init() } var f = 'exopiteSOFTrumbowyg'; e.prototype = { init: function () { var g = this; g.trumbowygOptions = {}, g.trumbowygOptions.svgPath = g.$element.find('.trumbowyg-js').data('icon-path'), g.trumbowygOptions.btnsDef = { image: { dropdown: ['insertImage', 'base64'], ico: 'insertImage' } }, g.trumbowygOptions.btns = [['viewHTML'], ['undo', 'redo'], ['formatting'], ['strong', 'em'], ['link'], ['image'], ['unorderedList', 'orderedList'], ['foreColor', 'backColor'], ['preformatted'], ['fullscreen']], g.$element.find('.trumbowyg-js').not(':disabled').trumbowyg(g.trumbowygOptions); g.$element.parents('.exopite-sof-field-group'); g.$element.on('exopite-sof-field-group-item-added-after', function (i, j) { j.find('.trumbowyg-js').trumbowyg(g.trumbowygOptions) }) } }, a.fn[f] = function (g) { return this.each(function () { a.data(this, 'plugin_' + f) || a.data(this, 'plugin_' + f, new e(this, g)) }) } })(jQuery, window, document); (function (a) { 'use strict'; a(document).ready(function () { a('.exopite-sof-wrapper').exopiteSOFTrumbowyg() }) })(jQuery); \ No newline at end of file +!function(t,e,o,n){var i="exopiteSOFTrumbowyg";function r(e,o){this.element=e,this._name=i,this.$element=t(e),this.init()}r.prototype={init:function(){var t=this;t.trumbowygOptions=new Object,t.trumbowygOptions.svgPath=t.$element.find(".trumbowyg-js").data("icon-path"),t.trumbowygOptions.btnsDef={image:{dropdown:["insertImage","base64"],ico:"insertImage"}},t.trumbowygOptions.btns=[["viewHTML"],["undo","redo"],["formatting"],["strong","em"],["link"],["image"],["unorderedList","orderedList"],["foreColor","backColor"],["preformatted"],["fullscreen"]],t.$element.find(".trumbowyg-js").not(":disabled").trumbowyg(t.trumbowygOptions);t.$element.closest(".exopite-sof-group");t.$element.on("exopite-sof-field-group-item-added-after",function(e,o){console.log("test exopite-sof-field-group-item-added-after"),o.find(".trumbowyg-js").not(":disabled").trumbowyg(t.trumbowygOptions)})}},t.fn[i]=function(e){return this.each(function(){t.data(this,"plugin_"+i)||t.data(this,"plugin_"+i,new r(this,e))})}}(jQuery,window,document),function(t){"use strict";t(document).ready(function(){t(".exopite-sof-wrapper").exopiteSOFTrumbowyg()})}(jQuery); \ No newline at end of file diff --git a/exopite-notificator/admin/exopite-simple-options/assets/loader-minicolors.js b/exopite-notificator/admin/exopite-simple-options/assets/loader-minicolors.js new file mode 100644 index 0000000..bacbe40 --- /dev/null +++ b/exopite-notificator/admin/exopite-simple-options/assets/loader-minicolors.js @@ -0,0 +1 @@ +!function(t,o,e,i){var n="exopiteSOFMinicolors";function s(o,e){this.element=o,this._name=n,this.$element=t(o),this.init()}s.prototype={init:function(){var o=this;o.minicolorOptions={theme:"default",swatches:"#000|#fff|#f00|#dd9933|#eeee22|#81d742|#1e73be|#8224e3|#2196f3|#4caf50|#ffeb3b|#ff9800|#795548|rgba(0, 0, 0, 0)".split("|"),change:function(e,i){o.change(e,i,t(this))},hide:function(){let e=t(this).val();t(this).val(o.rgb2hex(e))}},o.$element.find(".minicolor").each(function(e,i){t(i).closest(".exopite-sof-cloneable__item").hasClass("exopite-sof-cloneable__muster")||t(i).hasClass("disabled")||(o.minicolorOptions.opacity=t(i).attr("data-opacity")||!1,o.minicolorOptions.control=t(i).attr("data-control")||"saturation",o.minicolorOptions.format=t(i).attr("data-format")||"rgb",t(i).minicolors(o.minicolorOptions))}),o.$element.closest(".exopite-sof-wrapper").on("exopite-sof-field-group-item-added-after",function(e,i){i.find(".minicolor").each(function(e,i){t(i).closest(".exopite-sof-cloneable__item").hasClass("exopite-sof-cloneable__muster")||t(i).hasClass("disabled")||t(i).minicolors(o.minicolorOptions)})})},rgb2hex:function(t){return rgba=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?1[\s+]?\)/i),console.log("rgba: "+rgba),null===rgba?t:rgba&&4===rgba.length?"#"+("0"+parseInt(rgba[1],10).toString(16)).slice(-2)+("0"+parseInt(rgba[2],10).toString(16)).slice(-2)+("0"+parseInt(rgba[3],10).toString(16)).slice(-2):""},change:function(t,o,e){var i=t;e.hasClass("font-color-js")&&(console.log("has font-color"),e.parents(".exopite-sof-font-field").find(".exopite-sof-font-preview").css({color:i})),e.val(this.rgb2hex(i))}},t.fn[n]=function(o){return this.each(function(){t.data(this,"plugin_"+n)||t.data(this,"plugin_"+n,new s(this,o))})}}(jQuery,window,document),function(t){"use strict";t(document).ready(function(){t(".exopite-sof-field").exopiteSOFMinicolors()})}(jQuery); \ No newline at end of file diff --git a/exopite-notificator/admin/exopite-simple-options/assets/scripts.min.js b/exopite-notificator/admin/exopite-simple-options/assets/scripts.min.js index bd82083..17ef616 100644 --- a/exopite-notificator/admin/exopite-simple-options/assets/scripts.min.js +++ b/exopite-notificator/admin/exopite-simple-options/assets/scripts.min.js @@ -1 +1 @@ -function updateRangeInput(e){jQuery(e).next().val(jQuery(e).val())}function updateInputRange(e){jQuery(e).prev().val(jQuery(e).val())}if("function"!=typeof throttle)function throttle(e,t,i){var n=!1;return function(){n&&jQuery(window).scrollTop()>0||(e.call(void 0,i),n=!0,setTimeout(function(){n=!1},t))}}!function(e,t,i,n){e.urlParam=function(e){var i=new RegExp("[?&]"+e+"=([^&#]*)").exec(t.location.href);return null==i?null:decodeURI(i[1])||0}}(jQuery,window,document),function(e,t,i,n){"use strict";e.fn.exopiteSofManageDependencies=function(t){return this.each(function(){var i=this,n=e(this);i.init=function(){i.ruleset=e.deps.createRuleset(),i.param=void 0!==t?i.param=t+"-":"";i.dep(),e.deps.enable(n,i.ruleset,{show:function(e){e.removeClass("hidden")},hide:function(e){e.addClass("hidden")},log:!1,checkTargets:!1})},i.dep=function(){n.each(function(){e(this).find("[data-"+i.param+"controller]").each(function(){var t=e(this),n=t.data(i.param+"controller").split("|"),o=t.data(i.param+"condition").split("|"),s=t.data(i.param+"value").toString().split("|"),a=i.ruleset;e.each(n,function(e,n){var l=s[e]||"",r=o[e]||o[0];(a=a.createRule("[data-"+i.param+'depend-id="'+n+'"]',r,l)).include(t)})})})},i.init()})}}(jQuery,window,document),function(e,t,i,n){var o="exopiteSaveOptionsAJAX";function s(t,i){this.element=t,this._name=o,this.$element=e(t),this.init()}s.prototype={init:function(){this.bindEvents()},bindEvents:function(){var i=this;i.$element.find(".exopite-sof-form-js").on("submit."+i._name,function(e){i.submitOptions.call(this,e)}),e(t).on("keydown."+i._name,function(e){if(i.$element.find(".exopite-sof-form-js").length&&(e.ctrlKey||e.metaKey))switch(String.fromCharCode(e.which).toLowerCase()){case"s":e.preventDefault();var t=i.$element.find(".exopite-sof-form-js");i.submitOptions.call(t,e)}}),e(t).on("scroll."+i._name,throttle(i.checkFixed,100,""))},unbindEvents:function(){this.$element.off("."+this._name)},checkFixed:function(){var n=e(".exopite-sof-form-js").outerWidth(),o=0;o=e(t).scrollTop()>e(".exopite-sof-header-js").position().top+e(".exopite-sof-header-js").outerHeight(!0)&&e(t).scrollTop()+e(t).height() .exopite-sof-nav-list-item-title").on("click."+t._name,function(){t.toggleSubMenu.call(t,e(this))})},unbindEvents:function(){this.$element.off("."+this._name)},toggleSubMenu:function(e){e.parents(".exopite-sof-nav-list-parent-item").toggleClass("active").find("ul").slideToggle(200)},changeTab:function(e){if(!e.hasClass("active")){var t=".exopite-sof-section-"+e.data("section");this.$element.find(".exopite-sof-nav-list-item.active").removeClass("active"),e.addClass("active"),this.$element.find(".exopite-sof-section").addClass("hide"),this.$element.find(t).removeClass("hide")}},onLoad:function(){var t=encodeURIComponent(e.urlParam("section"));if(!this.$element.find(".exopite-sof-section-"+t).length)return!1;var i=this.$element.find(".exopite-sof-nav-list-item");this.$element.find(".exopite-sof-section").addClass("hide"),this.$element.find(".exopite-sof-section-"+t).removeClass("hide"),i.removeClass("active"),i.each(function(i,n){e(n).data("section")==t&&e(n).addClass("active")})}},e.fn[o]=function(t){return this.each(function(){e.data(this,"plugin_"+o)||e.data(this,"plugin_"+o,new s(this,t))})}}(jQuery,window,document),function(e,t,i,n){var o="exopiteSOFRepeater";function s(t,i){this.element=t,this._name=o,this.$element=e(t),this.init()}s.prototype={init:function(){this.bindEvents(),this.updateTitle()},bindEvents:function(){var t=this;t.$element.find(".exopite-sof-cloneable--add").off().on("click."+t._name,function(i){i.preventDefault(),e(this).is(":disabled")||t.addNew.call(t,e(this))}),t.$element.on("click."+t._name,".exopite-sof-cloneable--remove:not(.disabled)",function(i){i.preventDefault(),t.remove.call(t,e(this))}),t.$element.on("click."+t._name,".exopite-sof-cloneable--clone:not(.disabled)",function(i){i.preventDefault(),t.addNew.call(t,e(this))}),t.$element.find(".exopite-sof-cloneable__item").on("input change blur","[data-title=title]",function(e){t.updateTitle()})},unbindEvents:function(){this.$element.off("."+this._name)},remove:function(e){e.parents(".exopite-sof-cloneable__item").remove(),this.checkAmount(),this.updateNameIndex(),e.trigger("exopite-sof-field-group-item-removed")},checkAmount:function(){var e=this.$element.find(".exopite-sof-cloneable__wrapper").children(".exopite-sof-cloneable__item").length;return this.$element.data("limit")<=e?(this.$element.find(".exopite-sof-cloneable--add").attr("disabled",!0),!1):(this.$element.find(".exopite-sof-cloneable--add").attr("disabled",!1),!0)},updateTitle:function(){this.$element.find(".exopite-sof-cloneable__wrapper").find(".exopite-sof-cloneable__item").each(function(t,i){var n=e(i).find("[data-title=title]").val();e(i).find(".exopite-sof-cloneable__text").text(n),e(i).trigger("exopite-sof-field-group-item-title-updated")})},updateNameIndex:function(){var t=this.$element.find(".exopite-sof-cloneable__wrapper").data("name").replace("[REPLACEME]",""),i=new RegExp(/\[(.*?)\]\[(.*?)\]\[(.*?)\]\[(.*?)\[(.*?)\]/,"i"),n=new RegExp(/\[(.*?)\]\[(.*?)\]\[(.*?)\]\[(.*?)\]/,"i"),o=new RegExp(/\[(.*?)\]\[(.*?)\]\[(.*?)\]/,"i"),s=new RegExp(/\[(.*?)\]\[(.*?)\]/,"i");this.$element.find(".exopite-sof-cloneable__wrapper").find(".exopite-sof-cloneable__item").each(function(a,l){e(l).find('[name^="'+t+'"]').attr("name",function(){return i.test(this.name)?this.name.replace(n,function(e,t,i,n,o,s){return"["+t+"]["+i+"]["+a+"]["+o+"]["+s+"]"}):n.test(this.name)?this.name.replace(n,function(e,t,i,n,o){var s=i,l=n;return o&&0!==o.length?l=a:s=a,"["+t+"]["+s+"]["+l+"]["+o+"]"}):o.test(this.name)?this.name.replace(o,function(e,t,i,n){var o=t,s=i;return n&&0!==n.length?s=a:o=a,"["+o+"]["+s+"]["+n+"]"}):s.test(this.name)?this.name.replace(s,function(e,t,i){return"["+a+"]["+i+"]"}):void 0})})},addNew:function(t){var i=this.$element.parents(".exopite-sof-field-group");e.fn.chosen&&i.find("select.chosen").chosen("destroy");var n=!1,o=null;t.hasClass("exopite-sof-cloneable--clone")?(o=t.parents(".exopite-sof-cloneable__item").clone(!0),n=!0):o=this.$element.find(".exopite-sof-cloneable__muster").clone(!0);o.find(".exopite-sof-cloneable--remove").removeClass("disabled"),o.find(".exopite-sof-cloneable--clone").removeClass("disabled"),o.removeClass("exopite-sof-cloneable__muster"),o.removeClass("exopite-sof-cloneable__muster--hidden"),o.removeClass("exopite-sof-accordion--hidden"),o.find("[disabled]").attr("disabled",!1),this.$element.trigger("exopite-sof-field-group-item-added-before",[o,i]),n?o.insertAfter(t.parents(".exopite-sof-cloneable__item")):i.find(".exopite-sof-cloneable__wrapper").append(o),o.insertAfter(t.parents(".exopite-sof-cloneable__item")),this.checkAmount(),this.updateNameIndex(),e.fn.chosen&&i.find("select.chosen").chosen({width:"375px"}),o.find(".datepicker").each(function(t,i){var n=e(i).data("format");e(i).removeClass("hasDatepicker").datepicker({dateFormat:n})}),o.exopiteSofManageDependencies("sub"),o.find(".exopite-sof-cloneable__content").removeAttr("style").show(),this.$element.trigger("exopite-sof-field-group-item-added-after",[o,i])}},e.fn[o]=function(t){return this.each(function(){e.data(this,"plugin_"+o)||e.data(this,"plugin_"+o,new s(this,t))})}}(jQuery,window,document),function(e,t,i,n){var o="exopiteSOFTinyMCE";function s(t,i){"undefined"!=typeof tinyMCE&&(this.element=t,this._name=o,this.$element=e(t),this.init())}s.prototype={init:function(){var t=this;tinyMCE.init({theme:"modern",plugins:"charmap,colorpicker,hr,lists,media,paste,tabfocus,textcolor,fullscreen,wordpress,wpautoresize,wpeditimage,wpemoji,wpgallery,wplink,wpdialogs,wptextpattern,wpview",quicktags:!0,tinymce:!0,branding:!1,media_buttons:!0}),t.initTinyMCE(),t.$element.on("exopite-sof-accordion-sortstart",function(t,i){i.find(".tinymce-js").not(":disabled").each(function(){tinyMCE.execCommand("mceRemoveEditor",!1,e(this).attr("id"))})}),t.$element.on("exopite-sof-accordion-sortstop",function(t,i){i.find(".tinymce-js").not(":disabled").each(function(){tinyMCE.execCommand("mceAddEditor",!0,e(this).attr("id"))})});var i=t.$element.parents(".exopite-sof-field-group");t.$element.on("exopite-sof-field-group-item-added-after",function(n,o){o.find(".tinymce-js").each(function(n,o){var s=t.musterID+(parseInt(i.find(".tinymce-js").not(":disabled").length)-1);e(o).attr("id",s),tinyMCE.execCommand("mceAddEditor",!0,s)})})},initTinyMCE:function(){var t=this;t.musterID=t.$element.find(".exopite-sof-cloneable__muster .tinymce-js").first().attr("id")+"-",t.$element.find(".tinymce-js").not(":disabled").each(function(i,n){e(this).attr("id",t.musterID+i);var o=e(this).attr("id");tinyMCE.execCommand("mceAddEditor",!0,o)})}},e.fn[o]=function(t){return this.each(function(){e.data(this,"plugin_"+o)||e.data(this,"plugin_"+o,new s(this,t))})}}(jQuery,window,document),function(e,t,i,n){var o="exopiteSOFAccordion";function s(t,i){this.element=t,this._name=o,this.$element=e(t),this.$container=e(t).find(".exopite-sof-accordion__wrapper").first(),this.isSortableCalled=!1,this.init()}s.prototype={init:function(){this.bindEvents(),this.$container.data("sortable")&&this.$container.sortable({axis:"y",cursor:"move",handle:".exopite-sof-accordion__title",tolerance:"pointer",distance:5,opacity:.5})},bindEvents:function(){var t=this;t.$container.off().on("click."+t._name,".exopite-sof-accordion__title",function(i){i.preventDefault(),e(i.target).hasClass("exopite-sof-cloneable--clone")||t.toggleAccordion.call(t,e(this))}),t.$container.on("sortstart."+t._name,function(){t.$element.trigger("exopite-sof-accordion-sortstart",[t.$container])}),t.$container.on("sortstop."+t._name,function(){t.$container.find(".exopite-sof-accordion__item").each(function(i){var n=(n=t.$container.data("name")).replace("[REPLACEME]","");e(this).find('[name^="'+n+'"]').each(function(){var t=e(this).attr("name");$name_prefix_item=n.replace(/\[/g,"\\[").replace(/]/g,"\\]");var o=new RegExp($name_prefix_item+"\\[\\d+\\]"),s=t.replace(o,n+"["+i+"]");e(this).attr("name",s)})}),t.$element.trigger("exopite-sof-accordion-sortstop",[t.$container]),t.isSortableCalled=!0})},unbindEvents:function(){this.$container.off("."+this._name)},toggleAccordion:function(e){var t=e.parent(".exopite-sof-accordion__item");this.isSortableCalled?this.isSortableCalled=!1:t.hasClass("exopite-sof-accordion--hidden")?t.find(".exopite-sof-accordion__content").slideDown(350,function(){t.removeClass("exopite-sof-accordion--hidden")}):t.find(".exopite-sof-accordion__content").slideUp(350,function(){t.addClass("exopite-sof-accordion--hidden")})}},e.fn[o]=function(t){return this.each(function(){e.data(this,"plugin_"+o)||e.data(this,"plugin_"+o,new s(this,t))})}}(jQuery,window,document),function(e,t,i,n){var o="exopiteSofSearch";function s(t,i){this.element=t,this._name=o,this.$element=e(t),this.$nav=this.$element.find(".exopite-sof-nav"),this.isSortableCalled=!1,this.init()}s.prototype={init:function(){e.expr[":"].containsIgnoreCase=function(e,t,i){return jQuery(e).text().toUpperCase().indexOf(i[3].toUpperCase())>=0},this.bindEvents()},bindEvents:function(){var t=this;t.$element.on("keyup."+t._name,".exopite-sof-search",function(i){i.preventDefault(),t.doSearch.call(t,e(this))}),t.$element.on("click."+t._name,".exopite-sof-section-header",function(i){i.preventDefault(),t.selectSection.call(t,e(this))}),t.$element.on("click."+t._name,".exopite-sof-nav.search",function(i){i.preventDefault(),t.clearSearch.call(t,e(this))})},unbindEvents:function(){this.$element.off("."+this._name)},clearSearch:function(e){this.$element.find(".exopite-sof-search").val("").blur(),this.$element.find(".exopite-sof-nav").removeClass("search"),this.$element.find(".exopite-sof-section-header").hide(),this.$element.find(".exopite-sof-field h4").closest(".exopite-sof-field").not(".hidden").removeAttr("style"),this.$element.find(".exopite-sof-field-card").removeAttr("style");var t=this.$nav.find("ul li.active").data("section");this.$element.find(".exopite-sof-sections .exopite-sof-section-"+t).removeClass("hide")},activateSection:function(e){this.$nav.length>0&&(this.$element.find(".exopite-sof-section-header").hide(),this.$element.find('.exopite-sof-nav li[data-section="'+e+'"]').addClass("active"),this.$element.find(".exopite-sof-nav").removeClass("search")),this.$element.find(".exopite-sof-sections .exopite-sof-section").addClass("hide"),this.$element.find(".exopite-sof-sections .exopite-sof-section-"+e).removeClass("hide"),this.$element.find(".exopite-sof-field h4").closest(".exopite-sof-field").not(".hidden").removeAttr("style"),this.$element.find(".exopite-sof-field-card").removeAttr("style")},selectSection:function(e){this.$element.find(".exopite-sof-search").val("").blur();var t=e.data("section");this.activateSection(t)},doSearch:function(e){var t=e.val(),i=this.$nav.find("ul li.active").data("section");void 0===this.$element.data("section")&&this.$element.data("section",i),t?(this.$nav.length>0&&(this.$element.find(".exopite-sof-nav-list-item").removeClass("active"),this.$element.find(".exopite-sof-nav").addClass("search")),this.$element.find(".exopite-sof-section-header").show(),this.$element.find(".exopite-sof-section").removeClass("hide"),this.$element.find(".exopite-sof-field h4").closest(".exopite-sof-field").not(".hidden").hide(),this.$element.find(".exopite-sof-field-card").hide(),this.$element.find(".exopite-sof-field h4:containsIgnoreCase("+t+")").closest(".exopite-sof-field").not(".hidden").show()):(i=this.$element.data("section"),this.$element.removeData("section"),this.activateSection(i))}},e.fn[o]=function(t){return this.each(function(){e.data(this,"plugin_"+o)||e.data(this,"plugin_"+o,new s(this,t))})}}(jQuery,window,document),function(e,t,i,n){var o="exopiteFontPreview";function s(t,i){this.element=t,this._name=o,this.$element=e(t),this.$nav=this.$element.find(".exopite-sof-nav"),this.isSortableCalled=!1,this.init()}s.prototype={init:function(){this.preview=this.$element.find(".exopite-sof-font-preview"),this.fontColor=this.$element.find(".font-color-js"),this.fontSize=this.$element.find(".font-size-js"),this.lineHeight=this.$element.find(".line-height-js"),this.fontFamily=this.$element.find(".exopite-sof-typo-family"),this.fontWeight=this.$element.find(".exopite-sof-typo-variant"),this.updatePreview(),this.loadGoogleFont(),this.bindEvents()},bindEvents:function(){var e=this;e.$element.on("change."+e._name,".font-size-js, .line-height-js, .font-color-js, .exopite-sof-typo-variant",function(t){t.preventDefault(),e.updatePreview()}),e.$element.on("change."+e._name,".exopite-sof-typo-family",function(t){t.preventDefault(),e.loadGoogleFont()})},unbindEvents:function(){this.$element.off("."+this._name)},updatePreview:function(){var e=this.calculateFontWeight(this.fontWeight.find(":selected").text());this.preview.css({"font-size":this.fontSize.val()+"px","line-height":this.lineHeight.val()+"px","font-weight":e.fontWeightValue,"font-style":e.fontStyleValue})},updateVariants:function(t){var i=this,n=t.split("|");i.fontWeight.empty(),e.each(n,function(t,n){i.fontWeight.append(e("").attr("value",n).text(n))}),i.fontWeight.val("regular"),i.fontWeight.trigger("chosen:updated")},loadGoogleFont:function(){var t=this.fontFamily.find(":selected").data("variants");this.updateVariants(t);var i=this.fontFamily.val();if(i){var n="//fonts.googleapis.com/css?family="+i+":"+t.replace(/\|/g,","),o=this.$element.find(".exopite-sof-font-field-js").data("id"),s='';e(".cs-font-preview-"+o).length>0?e(".cs-font-preview-"+o).attr("href",n).load():e("head").append(s).load(),this.preview.css("font-family",i).css("font-weight","400")}},calculateFontWeight:function(e){var t="400",i="normal";switch(e){case"100":t="100";break;case"100italic":t="100",i="italic";break;case"300":t="300";break;case"300italic":t="300",i="italic";break;case"500":t="500";break;case"500italic":t="500",i="italic";break;case"700":t="700";break;case"700italic":t="700",i="italic";break;case"900":t="900";break;case"900italic":t="900",i="italic";break;case"italic":i="italic"}return{fontWeightValue:t,fontStyleValue:i}}},e.fn[o]=function(t){return this.each(function(){e.data(this,"plugin_"+o)||e.data(this,"plugin_"+o,new s(this,t))})}}(jQuery,window,document),function(e,t,i,n){var o="exopiteImportExportAJAX";function s(t,i){this.element=t,this._name=o,this.$element=e(t),this.init()}s.prototype={init:function(){this.bindEvents()},bindEvents:function(){var t=this;t.$element.find(".exopite-sof-import-js").off().on("click."+t._name,function(i){i.preventDefault(),e(this).hasClass("loading")||swal({text:e(this).data("confirm"),icon:"warning",buttons:!0,dangerMode:!0}).then(n=>{n&&(e(this).addClass("loading"),e(this).prop("disabled",!0),this.disabled=!0,t.importOptions.call(this,i,t))})}),t.$element.find(".exopite-sof-reset-js").off().on("click."+t._name,function(i){i.preventDefault(),swal({text:e(this).data("confirm"),icon:"warning",buttons:!0,dangerMode:!0}).then(n=>{n&&(e(this).addClass("loading"),e(this).prop("disabled",!0),t.resetOptions.call(this,i,t))})})},unbindEvents:function(){this.$element.off("."+this._name)},importOptions:function(t,i){var n=i.$element.find(".exopite-sof--data");return e.ajax({url:n.data("admin"),type:"post",data:{action:"exopite-sof-import-options",unique:n.data("unique"),value:i.$element.find(".exopite-sof__import").val(),wpnonce:n.data("wpnonce")},success:function(e){"success"==e&&(i.$element.find(".exopite-sof__import").val(""),swal({icon:"success"}),location.reload())},error:function(e,t,i){console.log("Status: "+e.status),console.log("Error: "+e.responseText),swal("Error!","Check console for more info!","error")}}),!1},resetOptions:function(t,i){var n=i.$element.find(".exopite-sof--data");return e.ajax({url:n.data("admin"),type:"post",data:{action:"exopite-sof-reset-options",unique:n.data("unique"),wpnonce:n.data("wpnonce")},success:function(e){"success"==e&&(swal({icon:"success"}),location.reload())},error:function(e,t,i){console.log("Status: "+e.status),console.log("Error: "+e.responseText),swal("Error!","Check console for more info!","error")}}),!1}},e.fn[o]=function(t){return this.each(function(){e.data(this,"plugin_"+o)||e.data(this,"plugin_"+o,new s(this,t))})}}(jQuery,window,document),function(e){"use strict";e(document).ready(function(){e(".exopite-sof-wrapper").exopiteSofManageDependencies(),e(".exopite-sof-wrapper").exopiteSofSearch(),e(".exopite-sof-sub-dependencies").exopiteSofManageDependencies("sub"),e(".exopite-sof-wrapper-menu").exopiteSaveOptionsAJAX(),e(".exopite-sof-media").exopiteMediaUploader({input:"input",preview:".exopite-sof-image-preview",remove:".exopite-sof-image-remove"}),e(".exopite-sof-content-js").exopiteOptionsNavigation(),e(".exopite-sof-font-field").exopiteFontPreview(),e(".exopite-sof-group").exopiteSOFTinyMCE(),e(".exopite-sof-accordion").exopiteSOFAccordion(),e(".exopite-sof-group").exopiteSOFRepeater(),e(".exopite-sof-field-backup").exopiteImportExportAJAX()})}(jQuery); \ No newline at end of file +function updateRangeInput(e){jQuery(e).next().val(jQuery(e).val())}function updateInputRange(e){jQuery(e).prev().val(jQuery(e).val())}if("function"!=typeof throttle)function throttle(e,t,i){var n=!1;return function(){n&&jQuery(window).scrollTop()>0||(e.call(void 0,i),n=!0,setTimeout(function(){n=!1},t))}}jQuery.fn.findExclude=function(e,t,i){return i=void 0!==i?i:new jQuery,this.children().each(function(){var n=jQuery(this);n.is(e)&&i.push(this),n.is(t)||n.findExclude(e,t,i)}),i},function(e,t,i,n){e.urlParam=function(e){var i=new RegExp("[?&]"+e+"=([^&#]*)").exec(t.location.href);return null==i?null:decodeURI(i[1])||0}}(jQuery,window,document),function(e,t,i,n){"use strict";e.fn.exopiteSofManageDependencies=function(t){return this.each(function(){var i=this,n=e(this);i.init=function(){i.ruleset=e.deps.createRuleset(),i.param=void 0!==t?i.param=t+"-":"";i.dep(),e.deps.enable(n,i.ruleset,{show:function(e){e.removeClass("hidden")},hide:function(e){e.addClass("hidden")},log:!1,checkTargets:!1})},i.dep=function(){n.each(function(){e(this).find("[data-"+i.param+"controller]").each(function(){var t=e(this),n=t.data(i.param+"controller").split("|"),o=t.data(i.param+"condition").split("|"),a=t.data(i.param+"value").toString().split("|"),s=i.ruleset;e.each(n,function(e,n){var l=a[e]||"",r=o[e]||o[0];(s=s.createRule("[data-"+i.param+'depend-id="'+n+'"]',r,l)).include(t)})})})},i.init()})}}(jQuery,window,document),function(e,t,i,n){var o="exopiteSaveOptionsAJAX";function a(t,i){this.element=t,this._name=o,this.$element=e(t),this.init()}a.prototype={init:function(){this.bindEvents()},bindEvents:function(){var i=this;i.$element.find(".exopite-sof-form-js").on("submit."+i._name,function(e){i.submitOptions.call(this,e)}),e(t).on("keydown."+i._name,function(e){if(i.$element.find(".exopite-sof-form-js").length&&(e.ctrlKey||e.metaKey))switch(String.fromCharCode(e.which).toLowerCase()){case"s":e.preventDefault();var t=i.$element.find(".exopite-sof-form-js");i.submitOptions.call(t,e)}}),e(t).on("scroll."+i._name,throttle(i.checkFixed,100,""))},unbindEvents:function(){this.$element.off("."+this._name)},checkFixed:function(){var n=e(".exopite-sof-form-js").outerWidth(),o=0;o=e(t).scrollTop()>e(".exopite-sof-header-js").position().top+e(".exopite-sof-header-js").outerHeight(!0)&&e(t).scrollTop()+e(t).height() .exopite-sof-nav-list-item-title").on("click."+t._name,function(){t.toggleSubMenu.call(t,e(this))})},unbindEvents:function(){this.$element.off("."+this._name)},toggleSubMenu:function(e){e.parents(".exopite-sof-nav-list-parent-item").toggleClass("active").find("ul").slideToggle(200)},changeTab:function(e){if(!e.hasClass("active")){var t=".exopite-sof-section-"+e.data("section");this.$element.find(".exopite-sof-nav-list-item.active").removeClass("active"),e.addClass("active"),this.$element.find(".exopite-sof-section").addClass("hide"),this.$element.find(t).removeClass("hide")}},onLoad:function(){var t=encodeURIComponent(e.urlParam("section"));if(!this.$element.find(".exopite-sof-section-"+t).length)return!1;var i=this.$element.find(".exopite-sof-nav-list-item");this.$element.find(".exopite-sof-section").addClass("hide"),this.$element.find(".exopite-sof-section-"+t).removeClass("hide"),i.removeClass("active"),i.each(function(i,n){e(n).data("section")==t&&e(n).addClass("active")})}},e.fn[o]=function(t){return this.each(function(){e.data(this,"plugin_"+o)||e.data(this,"plugin_"+o,new a(this,t))})}}(jQuery,window,document),function(e,t,i,n){var o="exopiteSOFTinyMCE";function a(t,i){"undefined"!=typeof tinyMCE&&(this.element=t,this._name=o,this.$element=e(t),this.init())}a.prototype={init:function(){var t=this;tinyMCE.init({theme:"modern",plugins:"charmap,colorpicker,hr,lists,media,paste,tabfocus,textcolor,fullscreen,wordpress,wpautoresize,wpeditimage,wpemoji,wpgallery,wplink,wpdialogs,wptextpattern,wpview",quicktags:!0,tinymce:!0,branding:!1,media_buttons:!0}),t.initTinyMCE(),t.$element.on("exopite-sof-accordion-sortstart",function(t,i){i.find(".tinymce-js").not(":disabled").each(function(){tinyMCE.execCommand("mceRemoveEditor",!1,e(this).attr("id"))})}),t.$element.on("exopite-sof-accordion-sortstop",function(t,i){i.find(".tinymce-js").not(":disabled").each(function(){tinyMCE.execCommand("mceAddEditor",!0,e(this).attr("id"))})});var i=t.$element.parents(".exopite-sof-field-group");t.$element.on("exopite-sof-field-group-item-inserted-after",function(n,o){o.find(".tinymce-js").each(function(n,o){var a=t.musterID+(parseInt(i.find(".tinymce-js").not(":disabled").length)-1);e(o).attr("id",a),tinyMCE.execCommand("mceAddEditor",!0,a)})}),t.$element.on("exopite-sof-field-group-item-cloned-after",function(n,o){o.find(".tinymce-js").each(function(n,o){var a=t.musterID+(parseInt(i.find(".tinymce-js").not(":disabled").length)-1);e(o).attr("id",a),e(o).show(),e(o).prev(".mce-tinymce").remove(),tinyMCE.execCommand("mceAddEditor",!0,a)})})},initTinyMCE:function(){var t=this;t.musterID=t.$element.find(".exopite-sof-cloneable__muster .tinymce-js").first().attr("id")+"-",t.$element.find(".tinymce-js").not(":disabled").each(function(i,n){e(this).attr("id",t.musterID+i);var o=e(this).attr("id");tinyMCE.execCommand("mceAddEditor",!0,o)})}},e.fn[o]=function(t){return this.each(function(){e.data(this,"plugin_"+o)||e.data(this,"plugin_"+o,new a(this,t))})}}(jQuery,window,document),function(e,t,i,n){var o="exopiteFontPreview";function a(t,i){this.element=t,this._name=o,this.$element=e(t),this.$nav=this.$element.find(".exopite-sof-nav"),this.init()}a.prototype={init:function(){var e=this.$element.children(".exopite-sof-typography-size-height"),t=this.$element.children(".exopite-sof-typography-color");this.preview=this.$element.children(".exopite-sof-font-preview"),this.fontColor=t.find(".font-color-js").first(),this.fontSize=e.children("span").children(".font-size-js"),this.lineHeight=e.children("span").children(".line-height-js"),this.fontFamily=this.$element.children(".exopite-sof-typography-family").children(".exopite-sof-typo-family"),this.fontWeight=this.$element.children(".exopite-sof-typography-variant").children(".exopite-sof-typo-variant"),this.loadGoogleFont(),this.updatePreview(),this.setColorOnStart(),this.bindEvents()},bindEvents:function(){var e=this;e.$element.on("change."+e._name,".font-size-js, .line-height-js, .font-color-js, .exopite-sof-typo-variant",function(t){t.preventDefault(),e.updatePreview()}),e.$element.on("change."+e._name,".exopite-sof-typo-family",function(t){t.preventDefault(),e.loadGoogleFont()})},unbindEvents:function(){this.$element.off("."+this._name)},destroy:function(){this.unbindEvents(),this.$element.removeData("plugin_"+this._name),this.element=null,this.$element=null},setColorOnStart:function(){var e=this.fontColor.val();this.preview.css({color:e})},updatePreview:function(){var e=this.calculateFontWeight(this.fontWeight.find(":selected").text());this.preview.css({"font-size":this.fontSize.val()+"px","line-height":this.lineHeight.val()+"px","font-weight":e.fontWeightValue,"font-style":e.fontStyleValue})},updateVariants:function(t){var i=this,n=t.split("|"),o=i.fontWeight.children("option:selected").val();i.fontWeight.empty(),e.each(n,function(t,n){var a=e("").attr("value",n).text(n);i.fontWeight.append(a),n==o&&a.attr("selected","selected")}),i.fontWeight.trigger("chosen:updated")},loadGoogleFont:function(){var t=this.fontFamily.find(":selected").data("variants");this.updateVariants(t);var i=this.fontFamily.val();if(i){var n="//fonts.googleapis.com/css?family="+i+":"+t.replace(/\|/g,","),o=this.$element.find(".exopite-sof-font-field-js").data("id"),a='';e(".cs-font-preview-"+o).length>0?e(".cs-font-preview-"+o).attr("href",n).load():e("head").append(a).load(),this.preview.css("font-family",i).css("font-weight","400")}},calculateFontWeight:function(e){var t="400",i="normal";switch(e){case"100":t="100";break;case"100italic":t="100",i="italic";break;case"300":t="300";break;case"300italic":t="300",i="italic";break;case"500":t="500";break;case"500italic":t="500",i="italic";break;case"700":t="700";break;case"700italic":t="700",i="italic";break;case"900":t="900";break;case"900italic":t="900",i="italic";break;case"italic":i="italic"}return{fontWeightValue:t,fontStyleValue:i}}},e.fn[o]=function(t){return this.each(function(){e.data(this,"plugin_"+o)||e.data(this,"plugin_"+o,new a(this,t))})}}(jQuery,window,document),function(e,t,i,n){var o="exopiteSOFRepeater";function a(t,i){this.element=t,this._name=o,this.$element=e(t),this.$sortableWrapper=this.$element.children(".exopite-sof-cloneable__wrapper"),this.$container=e(t).children(".exopite-sof-accordion__wrapper").first(),this.sortable=null,this.init()}a.prototype={init:function(){this.isSortable=this.$container.data("is-sortable"),this.bindEvents(),this.updateTitle(),this.setMusterDisabled(),this.sortableInit()},sortableInit:function(){this.isSortable&&sortable(".exopite-sof-cloneable__wrapper",{handle:".exopite-sof-cloneable__title"})},bindEvents:function(){var t=this;t.$element.find(".exopite-sof-cloneable--add").off().on("click."+t._name,function(i){i.preventDefault(),e(this).is(":disabled")||t.addNew.call(t,e(this))}),t.$element.on("click."+t._name,".exopite-sof-cloneable--remove:not(.disabled)",function(i){if(i.target!=this)return!1;i.preventDefault(),t.remove(e(this))}),t.$element.on("click."+t._name,".exopite-sof-cloneable--clone:not(.disabled)",function(i){if(i.target!=this)return!1;i.preventDefault(),i.stopPropagation(),t.addNew(e(this))}),t.$element.find(".exopite-sof-cloneable__item").on("input change blur","[data-title=title]",function(i){t.updateTitleElement(e(this))}),t.$container.on("sortstart."+t._name,function(){t.$element.trigger("exopite-sof-accordion-sortstart",[t.$container])}),t.$container.on("sortstop."+t._name,function(i,n){i.stopPropagation(),t.updateName(e(this))})},unbindEvents:function(){this.$element.off("."+this._name)},updateName:function(t){t.closest(".exopite-sof-group").children(".exopite-sof-cloneable--add").text();var i=t.closest(".exopite-sof-cloneable__wrapper"),n=i.attr("data-name").replace(/\[REPLACEME\]$/,""),o=this.escapeRegExp(n),a=new RegExp(o+"\\[(.*?)\\]","i");i.findExclude(".exopite-sof-cloneable__item",".exopite-sof-group").each(function(t,i){e(i).find('[data-name^="'+n+'"]').each(function(i,o){var s=e(o).attr("data-name").replace(a,function(e,i){return n+"["+t+"]"});e(o).attr("data-name",s)}),e(i).find('[name^="'+n+'"]').each(function(i,o){var s=e(o).attr("name").replace(a,function(e,i){return n+"["+t+"]"});e(o).attr("name",s)})})},remove:function(e){$wrapper=e.closest(".exopite-sof-cloneable__wrapper"),e.closest(".exopite-sof-cloneable__item").remove(),this.updateName($wrapper),this.checkAmount($wrapper),e.trigger("exopite-sof-field-group-item-removed")},checkAmount:function(e){var t=e.children(".exopite-sof-cloneable__item").length,i=e.data("limit");return void 0!==i?t:i<=t?(this.$element.find(".exopite-sof-cloneable--add").attr("disabled",!0),!1):(this.$element.find(".exopite-sof-cloneable--add").attr("disabled",!1),t)},setMusterDisabled:function(){this.$element.find(".exopite-sof-cloneable__muster").find("[name]").prop("disabled",!0).addClass("disabled")},updateTitleElement:function(e){var t=e.closest(".exopite-sof-cloneable__item"),i=t.find("[data-title=title]").first().val();t.children(".exopite-sof-cloneable__title").children(".exopite-sof-cloneable__text").text(i),t.trigger("exopite-sof-field-group-item-title-updated")},updateTitle:function(){this.$element.find(".exopite-sof-cloneable__wrapper").find(".exopite-sof-cloneable__item").find("[data-title=title]").each(function(t,i){var n=e(i).val();n&&e(i).closest(".exopite-sof-cloneable__item").children(".exopite-sof-cloneable__title").children(".exopite-sof-cloneable__text").text(n),e(i).trigger("exopite-sof-field-group-item-title-updated")})},escapeRegExp:function(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},removeIfNested:function(t){var i=e(this),n=!1;return e.each(i.attr("class").split(/\s+/),function(e){i.parents("."+this).length>0&&(n=default_value||!0)}),n},addNew:function(t){var i=t.closest(".exopite-sof-group");e.fn.chosen&&i.find("select.chosen").chosen("destroy");var n=!1,o=null;t.hasClass("exopite-sof-cloneable--clone")?(o=t.parent().parent().parent(".exopite-sof-cloneable__item").clone(!0),n=!0):o=t.parent().children(".exopite-sof-cloneable__muster").clone(!0);o.find(".exopite-sof-cloneable--remove").removeClass("disabled"),o.find(".exopite-sof-cloneable--clone").removeClass("disabled"),o.removeClass("exopite-sof-cloneable__muster"),o.removeClass("exopite-sof-cloneable__muster--hidden"),o.removeClass("exopite-sof-accordion--hidden"),o.findExclude("[disabled]",".exopite-sof-cloneable__muster").attr("disabled",!1).removeClass("disabled"),this.$element.trigger("exopite-sof-field-group-item-added-before",[o,i]),n?(o.find(".exopite-sof-font-field").unbind().removeData("plugin_exopiteFontPreview"),e.fn.chosen&&o.find("select.chosen").unbind().removeData().next().remove(),o.insertAfter(t.closest(".exopite-sof-cloneable__item")),$wrapper=t.closest(".exopite-sof-cloneable__wrapper")):(i.children(".exopite-sof-cloneable__wrapper").first().append(o),$wrapper=t.closest(".exopite-sof-group").children(".exopite-sof-cloneable__wrapper")),this.checkAmount($wrapper)&&(this.setMusterDisabled(),this.updateName($wrapper),e.fn.chosen&&i.find("select.chosen").chosen({width:"375px"}),o.find(".datepicker").each(function(t,i){var n=e(i).data("format");e(i).removeClass("hasDatepicker").datepicker({dateFormat:n})}),this.sortableInit(),o.exopiteSofManageDependencies("sub"),o.find(".exopite-sof-cloneable__content").removeAttr("style").show(),o.find(".exopite-sof-font-field").each(function(t,i){e(i).children("label").children("select").is(":disabled")||e(i).exopiteFontPreview()}),sortable(".exopite-sof-gallery",{forcePlaceholderSize:!0}),this.$element.trigger("exopite-sof-field-group-item-added-after",[o,i]),n?this.$element.trigger("exopite-sof-field-group-item-cloned-after",[o,i]):this.$element.trigger("exopite-sof-field-group-item-inserted-after",[o,i]))}},e.fn[o]=function(t){return this.each(function(){e.data(this,"plugin_"+o)||e.data(this,"plugin_"+o,new a(this,t))})}}(jQuery,window,document),function(e,t,i,n){var o="exopiteSOFAccordion";function a(t,i){this.element=t,this._name=o,this.$element=e(t),this.$container=e(t).children(".exopite-sof-accordion__wrapper").first(),this.allOpen=this.$container.data("all-open")||void 0===this.$container.data("all-open"),this.init()}a.prototype={init:function(){this.bindEvents()},bindEvents:function(){var t=this;t.$container.off().on("click."+t._name,".exopite-sof-accordion__title",function(i){i.preventDefault(),e(i.target).hasClass("exopite-sof-cloneable--clone")||e(this).closest(".exopite-sof-accordion__wrapper").hasClass("exopite-sof-group-compact")||t.toggleAccordion.call(t,e(this))})},unbindEvents:function(){this.$container.off("."+this._name)},slideUp:function(e){e.children(".exopite-sof-accordion__content").slideUp(350,function(){e.addClass("exopite-sof-accordion--hidden")})},slideDown:function(e){e.children(".exopite-sof-accordion__content").slideDown(350,function(){e.removeClass("exopite-sof-accordion--hidden")})},toggleAccordion:function(t){var i=this,n=t.parent(".exopite-sof-accordion__item");this.allOpen?n.hasClass("exopite-sof-accordion--hidden")?i.slideDown(n):i.slideUp(n):this.$container.findExclude(".exopite-sof-accordion__item",".exopite-sof-accordion").each(function(t,o){e(o).is(n)?i.slideDown(n):i.slideUp(e(o))})}},e.fn[o]=function(t){return this.each(function(){e.data(this,"plugin_"+o)||e.data(this,"plugin_"+o,new a(this,t))})}}(jQuery,window,document),function(e,t,i,n){var o="exopiteSofSearch";function a(t,i){this.element=t,this._name=o,this.$element=e(t),this.$nav=this.$element.find(".exopite-sof-nav"),this.init()}a.prototype={init:function(){e.expr[":"].containsIgnoreCase=function(e,t,i){return jQuery(e).text().toUpperCase().indexOf(i[3].toUpperCase())>=0},this.bindEvents()},bindEvents:function(){var t=this;t.$element.on("keyup."+t._name,".exopite-sof-search",function(i){i.preventDefault(),t.doSearch.call(t,e(this))}),t.$element.on("click."+t._name,".exopite-sof-section-header",function(i){i.preventDefault(),t.selectSection.call(t,e(this))}),t.$element.on("click."+t._name,".exopite-sof-nav.search",function(i){i.preventDefault(),t.clearSearch.call(t,e(this))})},unbindEvents:function(){this.$element.off("."+this._name)},clearSearch:function(e){this.$element.find(".exopite-sof-search").val("").blur(),this.$element.find(".exopite-sof-nav").removeClass("search"),this.$element.find(".exopite-sof-section-header").hide(),this.$element.find(".exopite-sof-field h4").closest(".exopite-sof-field").not(".hidden").removeAttr("style"),this.$element.find(".exopite-sof-field-card").removeAttr("style");var t=this.$nav.find("ul li.active").data("section");this.$element.find(".exopite-sof-sections .exopite-sof-section-"+t).removeClass("hide")},activateSection:function(e){if(this.$nav.length>0){this.$element.find(".exopite-sof-section-header").hide();var t=this.$element.find('.exopite-sof-nav li[data-section="'+e+'"]');t.addClass("active"),t.parents(".exopite-sof-nav-list-parent-item").length>0&&!t.parents(".exopite-sof-nav-list-parent-item").hasClass("active")&&t.parents(".exopite-sof-nav-list-parent-item").addClass("active").find("ul").slideToggle(200),this.$element.find(".exopite-sof-nav").removeClass("search")}this.$element.find(".exopite-sof-sections .exopite-sof-section").addClass("hide"),this.$element.find(".exopite-sof-sections .exopite-sof-section-"+e).removeClass("hide"),this.$element.find(".exopite-sof-field h4").closest(".exopite-sof-field").not(".hidden").removeAttr("style"),this.$element.find(".exopite-sof-field-card").removeAttr("style")},selectSection:function(e){this.$element.find(".exopite-sof-search").val("").blur();var t=e.data("section");this.activateSection(t)},doSearch:function(e){var t=e.val(),i=this.$nav.find("ul li.active").data("section");void 0===this.$element.data("section")&&this.$element.data("section",i),t?(this.$nav.length>0&&(this.$element.find(".exopite-sof-nav-list-item").removeClass("active"),this.$element.find(".exopite-sof-nav").addClass("search")),this.$element.find(".exopite-sof-section-header").show(),this.$element.find(".exopite-sof-section").removeClass("hide"),this.$element.find(".exopite-sof-field h4").closest(".exopite-sof-field").not(".hidden").hide(),this.$element.find(".exopite-sof-field-card").hide(),this.$element.find(".exopite-sof-field h4:containsIgnoreCase("+t+")").closest(".exopite-sof-field").not(".hidden").show()):(i=this.$element.data("section"),this.$element.removeData("section"),this.activateSection(i))}},e.fn[o]=function(t){return this.each(function(){e.data(this,"plugin_"+o)||e.data(this,"plugin_"+o,new a(this,t))})}}(jQuery,window,document),function(e,t,i,n){var o="exopiteImportExportAJAX";function a(t,i){this.element=t,this._name=o,this.$element=e(t),this.init()}a.prototype={init:function(){this.bindEvents()},bindEvents:function(){var t=this;t.$element.find(".exopite-sof-import-js").off().on("click."+t._name,function(i){i.preventDefault(),e(this).hasClass("loading")||swal({text:e(this).data("confirm"),icon:"warning",buttons:!0,dangerMode:!0}).then(n=>{n&&(e(this).addClass("loading"),e(this).prop("disabled",!0),this.disabled=!0,t.importOptions.call(this,i,t))})}),t.$element.find(".exopite-sof-reset-js").off().on("click."+t._name,function(i){i.preventDefault(),swal({text:e(this).data("confirm"),icon:"warning",buttons:!0,dangerMode:!0}).then(n=>{n&&(e(this).addClass("loading"),e(this).prop("disabled",!0),t.resetOptions.call(this,i,t))})})},unbindEvents:function(){this.$element.off("."+this._name)},importOptions:function(t,i){var n=i.$element.find(".exopite-sof--data");return e.ajax({url:n.data("admin"),type:"post",data:{action:"exopite-sof-import-options",unique:n.data("unique"),value:i.$element.find(".exopite-sof__import").val(),wpnonce:n.data("wpnonce")},success:function(e){"success"==e&&(i.$element.find(".exopite-sof__import").val(""),swal({icon:"success"}),location.reload())},error:function(e,t,i){console.log("Status: "+e.status),console.log("Error: "+e.responseText),swal("Error!","Check console for more info!","error")}}),!1},resetOptions:function(t,i){var n=i.$element.find(".exopite-sof--data");return e.ajax({url:n.data("admin"),type:"post",data:{action:"exopite-sof-reset-options",unique:n.data("unique"),wpnonce:n.data("wpnonce")},success:function(e){"success"==e&&(swal({icon:"success"}),location.reload())},error:function(e,t,i){console.log("Status: "+e.status),console.log("Error: "+e.responseText),swal("Error!","Check console for more info!","error")}}),!1}},e.fn[o]=function(t){return this.each(function(){e.data(this,"plugin_"+o)||e.data(this,"plugin_"+o,new a(this,t))})}}(jQuery,window,document),function(e,t,i,n){var o="exopiteTabs";function a(t,i){this.element=t,this._name=o,this.$element=e(t),this.init()}a.prototype={init:function(){this.bindEvents()},bindEvents:function(){var t=this;t.$tabLinks=t.$element.children(".exopite-sof-tab-header").children(".exopite-sof-tab-link"),t.$tabContents=t.$element.children(".exopite-sof-tab-content"),t.mobileHeader=t.$tabContents.children(".exopite-sof-tab-mobile-header"),t.$tabLinks.off().on("click."+t._name,function(e){t.changeTabs(e,this)}),t.mobileHeader.off().on("click."+t._name,function(t){var i=e(this).parent().index()-1,n=e(this).parent().parent().children(".exopite-sof-tab-header").children(".exopite-sof-tab-link"),o=e(this).parent().parent().children(".exopite-sof-tab-content");n.removeClass("active"),n.eq(i).addClass("active"),o.removeClass("active"),e(this).parent().addClass("active")})},unbindEvents:function(){this.$element.off("."+this._name)},changeTabs:function(t,i,n){n=e(i).index();e(i).parent().children(".exopite-sof-tab-link").removeClass("active"),e(i).parent().parent().children(".exopite-sof-tab-content").removeClass("active"),e(i).addClass("active"),e(i).parent().parent().children(".exopite-sof-tab-content").eq(n).addClass("active")}},e.fn[o]=function(t){return this.each(function(){e.data(this,"plugin_"+o)||e.data(this,"plugin_"+o,new a(this,t))})}}(jQuery,window,document),function(e,t,i,n){"use strict";var o="exopiteSOFGallery";function a(t,i){this.element=t,this._name=o,this.meta_gallery_frame=null,this.$container=e(t).children(".exopite-sof-gallery").first(),this.buildCache(),this.init()}e.extend(a.prototype,{init:function(){this.bindEvents(),this.sortableInit()},sortableInit:function(){sortable(".exopite-sof-gallery",{forcePlaceholderSize:!0})},bindEvents:function(){var t=this;t.$element.on("click."+t._name,"> .exopite-sof-gallery-add",function(i){i.preventDefault(),t.manageMediaFrame.call(t,e(this))}),t.$element.on("click."+t._name,".exopite-sof-image-delete",function(i){i.preventDefault(),t.deleteImage.call(t,e(this))}),t.$container.on("sortstop."+t._name,function(i,n){t.updateIDs(e(this))})},updateIDs:function(t){let i=[];t.children("span").each(function(t,n){i.push(e(n).children("img").attr("id"))}),t.closest(".exopite-sof-gallery").prev().val(i.join(","))},deleteImage:function(t){if(confirm("Are you sure you want to remove this image?")){let o=t.closest(".exopite-sof-gallery").prev();var i=t.next().attr("id"),n=o.val().split(",");n=e(n).not([i]).get(),o.val(n),t.parent().remove(),this.sortableInit()}},manageMediaFrame:function(e){var t=this;let i=e.prev().prev(),n=e.prev();t.meta_gallery_frame=null;let o=t.$element.data("media-frame-title")||"Select Images",a=t.$element.data("media-frame-button")||"Add",s=t.$element.data("media-frame-type")||"image";t.meta_gallery_frame=wp.media.frames.meta_gallery_frame=wp.media({title:o,button:{text:a},library:{type:s},multiple:!0}),t.meta_gallery_frame.states.add([new wp.media.controller.Library({title:o,priority:20,toolbar:"main-gallery",filterable:"uploaded",library:wp.media.query(t.meta_gallery_frame.options.library),multiple:!!t.meta_gallery_frame.options.multiple&&"reset",editable:!0,allowLocalEdits:!0,displaySettings:!0,displayUserSettings:!0})]),t.meta_gallery_frame.on("open",function(){var e=t.meta_gallery_frame.state().get("selection"),n=(t.meta_gallery_frame.state("gallery-edit").get("library"),i.val());if(n){n.split(",").forEach(function(t){let i=wp.media.attachment(t);i.fetch(),e.add(i?[i]:[])})}}),t.meta_gallery_frame.on("select",function(){var e,o=[],a="";t.meta_gallery_frame.state().get("selection").each(function(e){o.push(e.attributes.id),a+=''}),(e=o.join(","))&&(i.val(e),n.html(a),t.sortableInit())}),t.meta_gallery_frame.open()},destroy:function(){this.unbindEvents(),this.$element.removeData()},unbindEvents:function(){this.$element.off("."+this._name)},buildCache:function(){this.$element=e(this.element),this.$imageIDs=this.$element.children('[data-control="gallery-ids"]'),this.$galleryList=this.$element.children(".exopite-sof-gallery")}}),e.fn[o]=function(t){return this.each(function(){e.data(this,"plugin_"+o)||e.data(this,"plugin_"+o,new a(this,t))})}}(jQuery,window,document),function(e){"use strict";e(document).ready(function(){e(".exopite-sof-wrapper").exopiteSofManageDependencies(),e(".exopite-sof-wrapper").exopiteSofSearch(),e(".exopite-sof-sub-dependencies").exopiteSofManageDependencies("sub"),e(".exopite-sof-wrapper-menu").exopiteSaveOptionsAJAX(),e(".exopite-sof-media").exopiteMediaUploader({input:"input",preview:".exopite-sof-image-preview",remove:".exopite-sof-image-remove"}),e(".exopite-sof-content-js").exopiteOptionsNavigation(),e(".exopite-sof-wrapper").find(".exopite-sof-font-field").each(function(t,i){e(i).children("label").children("select").is(":disabled")||e(i).exopiteFontPreview()}),e(".exopite-sof-group").exopiteSOFTinyMCE(),e(".exopite-sof-accordion").exopiteSOFAccordion(),e(".exopite-sof-group").exopiteSOFRepeater(),e(".exopite-sof-field-backup").exopiteImportExportAJAX(),e(".exopite-sof-tabs").exopiteTabs(),e(".exopite-sof-gallery-field").exopiteSOFGallery()})}(jQuery); \ No newline at end of file diff --git a/exopite-notificator/admin/exopite-simple-options/assets/styles.css b/exopite-notificator/admin/exopite-simple-options/assets/styles.css index c86c35e..1e6f959 100644 --- a/exopite-notificator/admin/exopite-simple-options/assets/styles.css +++ b/exopite-notificator/admin/exopite-simple-options/assets/styles.css @@ -1 +1 @@ -.exopite-sof-video-container{max-width:100%}.video-wrap{height:0;overflow:hidden;padding-bottom:56.25%;position:relative;background:#000}.video-wrap iframe,.video-wrap object,.video-wrap embed,.video-wrap video{height:100%;left:0;position:absolute;top:0;width:100%}.exopite-sof-video-input{padding-top:10px}.exopite-sof-attachment-media{display:inline-block;position:relative;border:2px solid transparent}.exopite-sof-attachment-media.selected{border-color:#80a9d4}.exopite-sof-attachment-media.selected .exopite-sof-attachment-media-delete-overlay{position:absolute;top:0;left:0;bottom:0;right:0;background:rgba(128,169,212,.3)}.exopite-sof-attachment-media-delete{display:none;position:absolute;top:3px;right:3px;background:rgba(255,0,0,.6);padding:2px 5px 4px 5px;color:#fff;border-radius:3px;line-height:14px;font-size:14px;cursor:pointer}.exopite-sof-attachment-media.selected .exopite-sof-attachment-media-delete{display:block}.exopite-sof-attachment-media img{float:left}.exopite-sof-field-upload .exopite-sof-fieldset input[type="text"],.qq-upload-list-selector.qq-upload-list input{width:1px}.exopite-sof-field-upload .exopite-sof-fieldset .qq-edit-filename-selector.qq-edit-filename{width:auto}.exopite-sof-field-upload .exopite-sof-fieldset{position:relative}.exopite-sof-field-upload .qq-template-info{text-align:center;color:#ccc;padding-top:10px}.exopite-sof-field-upload .qq-template{z-index:1;position:relative}.exopite-sof-field-upload .qq-uploader{border-radius:0;border:3px dashed #ccc;background:transparent}.exopite-sof-field .qq-template .exopite-sof-btn{margin-right:8px}.exopite-sof-field-upload .qq-uploader::before{content:"\f0ee";position:absolute;font-size:6rem;left:0;width:100%;text-align:center;top:50%;opacity:.25;font-family:fontAwesome;z-index:-1}.qq-template .qq-upload-button{margin-right:15px}.qq-template .buttons{width:36%;display:flex}.qq-template .qq-uploader .qq-total-progress-bar-container{width:60%}.exopite-sof-ace-editor{border:1px solid #e5e5e5}.exopite-sof-wrapper-menu{margin-right:15px;margin-top:22px}.exopite-sof-header{padding:10px;background:#345}.exopite-sof-header h1,.exopite-sof-wrapper fieldset{display:block;text-align:center;margin:0;color:#fff;font-weight:400;line-height:1em}.exopite-sof-header h1{font-size:1.7em}@media only screen and (min-width:600px){.exopite-sof-wrapper fieldset{display:inline-block;float:right}.exopite-sof-header input,.exopite-sof-header h1{display:inline-block;text-align:right;margin:0}}.exopite-sof-header input{float:right}.exopite-sof-footer{padding:6px 15px;background:#345;position:fixed;bottom:-48px;z-index:999;transition:all .4s ease 0s;opacity:.9}.exopite-sof-footer:hover{opacity:1}.exopite-sof-form-js{margin-bottom:50px}.exopite-sof-help{cursor:help}.hidden{display:none}.exopite-sof-nav{display:none}.exopite-sof-sections{background-color:#fff}@media only screen and (max-width:899px){.exopite-sof-fieldset .color-alpha{width:40px!important;height:30px!important}}@media only screen and (min-width:900px){.exopite-sof-content-nav{position:relative;background-color:#23282d}.exopite-sof-nav-list-item.active{background-color:#0073aa;color:#fff}.exopite-sof-nav-icon{padding-right:10px}.exopite-sof-nav{display:none;position:relative;z-index:10;width:200px;background-color:#23282d}.exopite-sof-content-nav .exopite-sof-nav{display:inline-block;vertical-align:top}.exopite-sof-content-nav .exopite-sof-sections{position:relative;display:inline-block;width:calc(100% - 200px)}.exopite-sof-nav-list{margin:0}.exopite-sof-nav-list-parent-item{margin-bottom:0}.exopite-sof-nav-list-parent-item>span{display:block}.exopite-sof-nav-list-parent-item>span,.exopite-sof-nav-list-item{color:#999;padding:13px 15px;margin:0;cursor:pointer;font-size:14px;border-bottom:1px solid #2f2f2f;position:relative}.exopite-sof-nav-list-parent-item ul li{padding-left:25px;background-color:#181818;font-size:13px;padding-top:11px;padding-bottom:11px}.exopite-sof-nav-list-parent-item>span:hover,.exopite-sof-nav-list-item:hover{color:#fff}.exopite-sof-nav-list-item.active:after{content:" ";position:absolute;right:0;top:50%;height:0;width:0;pointer-events:none;border:solid transparent;border-right-color:#fff;border-width:4px;margin-top:-4px}.exopite-sof-content-nav .hide,.exopite-sof-content-nav .exopite-sof-section-header{display:none}.exopite-sof-nav-list-parent-item>.exopite-sof-nav-list-item-title::after{content:"\f054";display:inline-block;font-family:"FontAwesome";font-size:9px;line-height:1;position:absolute;right:10px;top:50%;margin-top:-4px;-moz-transform:rotate(0);-ms-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0);-moz-transition:-moz-transform 0.2s;-o-transition:-o-transform 0.2s;-webkit-transition:-webkit-transform 0.2s;transition:transform 0.2s}.exopite-sof-nav-list-parent-item.active>.exopite-sof-nav-list-item-title::after{-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-webkit-transform:rotate(90deg);transform:rotate(90deg)}}.exopite-sof-wrapper-metabox{margin:-6px -12px -12px -12px}.block-editor-page .exopite-sof-wrapper-metabox{margin:0}.exopite-sof-image-preview img{max-width:150px}.exopite-sof-image-inner{display:inline-block;position:relative}.exopite-sof-image-remove{position:absolute;top:3px;right:3px;background:rgba(255,0,0,.6);color:#fff;padding:3px 5px 4px;cursor:pointer;border-radius:3px}.exopite-sof-media .exopite-sof-button{margin-top:3px;margin-left:10px}.exopite-sof-fieldset .exopite-sof-image input[type="text"]{width:calc(100% - 100px);max-width:calc(100% - 100px)}.exopite-sof-ajax-message{padding:7px 13px;border-radius:3px;display:none;margin-right:10px;color:#fff;display:inline-block;opacity:0;transition:all .4s ease 0s}.exopite-sof-ajax-message.success{background-color:#27ae60}.exopite-sof-ajax-message.error{background-color:#ae2c27}.exopite-sof-ajax-message.show{opacity:1}.exopite-sof-field .exopite-sof-title{float:none;width:100%}.exopite-sof-field .exopite-sof-fieldset{margin-left:0}.exopite-sof-field-notice .exopite-sof-title{padding-top:15px;padding-left:30px;padding-bottom:15px}@media only screen and (min-width:786px){.exopite-sof-field .exopite-sof-title{position:relative;width:25%;float:left}.exopite-sof-field .exopite-sof-fieldset{margin-left:30%}}@media only screen and (min-width:900px){.exopite-sof-content.exopite-sof-content-nav{display:flex}}@media only screen and (min-width:1000px){.exopite-sof-field .exopite-sof-title{position:relative;width:25%;float:left}.exopite-sof-field .exopite-sof-fieldset{margin-left:27%}.exopite-sof-field-notice .exopite-sof-fieldset{margin-left:calc(25% - 10px)}}.exopite-sof-field::after,.exopite-sof-field::before{content:" ";display:table;clear:both}.exopite-sof-field{position:relative;padding:15px 30px}.exopite-sof-section>.exopite-sof-field{border-bottom:1px solid #eee}.exopite-sof-content{position:relative}.exopite-sof-content,.exopite-sof-content .checkbox{font-size:13px}.exopite-sof-section-header .dashicons-before{padding-right:20px}.exopite-sof-section-header{padding:8px 32px 10px 32px;background:#ccc;color:#fff;font-size:24px;line-height:24px;margin:0}.exopite-sof-fieldset ul,.exopite-sof-title{margin:0}.exopite-sof-field-image_select input{display:none}.exopite-sof-field-image_select input:checked~img{border-color:#333;opacity:1}.exopite-sof-field-image-selector-horizontal label{display:inline-block;margin:5px}.exopite-sof-field-image-selector-horizontal label:first-child{margin-left:0}.exopite-sof-field-image-selector-vertical label{display:block}.exopite-sof-field-image_select label img{max-width:100%;vertical-align:bottom;background-color:#fff;border:2px solid #ccc;opacity:.75;-moz-transition:all 0.15s ease-out;-o-transition:all 0.15s ease-out;-webkit-transition:all 0.15s ease-out;transition:all 0.15s ease-out}.exopite-sof-field-switcher label{display:inline-block}.exopite-sof-field-switcher .exopite-sof-text-desc{margin-left:5px;margin-top:0;padding-top:.4em;font-size:1em;display:inline-block}.exopite-sof-description,.exopite-sof-content .text-muted,.exopite-sof-text-desc{font-weight:400;margin-top:10px;color:#999}.exopite-sof-content .text-muted,.exopite-sof-text-desc{font-style:italic}.exopite-sof-fieldset textarea,.exopite-sof-fieldset select,.exopite-sof-fieldset input[type="number"],.exopite-sof-fieldset input[type="date"],.exopite-sof-fieldset input[type="email"],.exopite-sof-fieldset input[type="password"],.exopite-sof-fieldset input[type="text"]{padding:6px 12px;max-width:100%;border:1px solid #ccc;border-radius:3px}.exopite-sof-fieldset input[type="text"].colorpicker{width:88px;padding-top:5px;padding-bottom:2px;font-size:1em}.checkbox__switch,.checkbox__switch:after{display:block;height:2em;border:2px solid #f5c6cb;border-radius:2em}.checkbox__switch,.checkbox__switch::after{border-radius:0}.checkbox__input{display:none!important}.checkbox__input:checked + .checkbox__switch:after{left:1em}.checkbox__input:checked + .checkbox__switch:before{left:0}.checkbox__input:checked + .checkbox__switch{border-color:#c3e6cb;background-color:#c3e6cb}.checkbox__switch{-webkit-transition:0.2s cubic-bezier(.95,.05,.795,.035);transition:0.2s cubic-bezier(.95,.05,.795,.035);position:relative;width:3em;background-color:#f5c6cb;cursor:pointer}.checkbox__switch:after{content:"";-webkit-transition:0.2s cubic-bezier(.95,.05,.795,.035);transition:0.2s cubic-bezier(.95,.05,.795,.035);content:"";width:2em;background-color:white;border:none;position:absolute;box-shadow:0 3px 4px rgba(0,0,0,.4),0 0 2px rgba(0,0,0,.4);top:0;left:0}.checkbox__switch:after{box-shadow:0 1px 3px rgba(0,0,0,.3),0 0 0 rgba(0,0,0,.3)}.unknown{padding:20px 10px;font-size:18px;text-align:center;border-style:solid;border-width:1px}.exopite-sof-field .exopite-sof-notice{position:relative;padding:1rem 1.5rem;border:1px solid transparent;border-radius:0}.exopite-sof-field.exopite-sof-field-notice{padding:0;border-bottom:none}.exopite-sof-content .info{color:#0c5460;background-color:#d1ecf1;border-color:#bee5eb}.exopite-sof-content .primary{color:#004085;background-color:#cce5ff;border-color:#b8daff}.exopite-sof-content .secondary{color:#464a4e;background-color:#e7e8ea;border-color:#dddfe2}.exopite-sof-content .success{color:#155724;background-color:#d4edda;border-color:#c3e6cb}.exopite-sof-content .danger{color:#721c24;background-color:#f8d7da;border-color:#f5c6cb}.exopite-sof-content .warning{color:#856404;background-color:#fff3cd;border-color:#ffeeba}.exopite-sof-content .card{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-width:0;word-wrap:break-word;background-color:#fff;background-clip:border-box;border:1px solid rgba(0,0,0,.125);padding:0;width:100%;max-width:100%;margin-top:0}.exopite-sof-content .card-body{-ms-flex:1 1 auto;flex:1 1 auto;padding:1.25rem}.exopite-sof-content .card-footer:last-child{border-radius:0 0 calc(.25rem - 1px) calc(.25rem - 1px)}.exopite-sof-content .card{border-radius:0;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border:1px solid #e5e5e5}.exopite-sof-content .card-header{padding:.75rem 1.25rem;margin-bottom:0;background-color:rgba(0,0,0,.015);border-bottom:1px solid #e5e5e5}.exopite-sof-content .card-footer{padding:.75rem 1.25rem;background-color:rgba(0,0,0,.015);border-top:1px solid #e5e5e5}.range{padding:0;margin:0;font:inherit;color:inherit;background:transparent;border:none;line-height:normal;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-background-clip:padding-box;background-clip:padding-box;vertical-align:top;outline:none;line-height:1;-webkit-appearance:none;border:none;height:2px;-webkit-border-radius:3px;border-radius:3px;background-image:-webkit-gradient(linear,left top,left bottom,from(#ccc),to(#ccc));background-image:-webkit-linear-gradient(#ccc,#ccc);background-image:-moz-linear-gradient(#ccc,#ccc);background-image:-o-linear-gradient(#ccc,#ccc);background-image:linear-gradient(#ccc,#ccc);background-position:left center;-webkit-background-size:100% 2px;background-size:100% 2px;background-repeat:no-repeat;overflow:hidden;height:31px;max-width:100%;width:375px}.range::-moz-range-track{position:relative;border:none;background-color:#ccc;height:2px;border-radius:30px;box-shadow:none;top:0;margin:0;padding:0}.range::-ms-track{position:relative;border:none;background-color:#ccc;height:0;border-radius:30px}.range::-webkit-slider-thumb{cursor:pointer;position:relative;height:2em;width:2em;background-color:#fff;border:1px solid #ccc;-webkit-border-radius:30px;border-radius:30px;-webkit-box-shadow:none;box-shadow:none;margin:0;padding:0;-webkit-appearance:none;top:0}.range::-moz-range-thumb{cursor:pointer;position:relative;height:2em;width:2em;background-color:#fff;border:1px solid #ccc;border-radius:30px;box-shadow:none;margin:0;padding:0}.range::-ms-thumb{cursor:pointer;position:relative;height:2em;width:2em;background-color:#fff;border:1px solid #ccc;border-radius:30px;box-shadow:none;margin:0;padding:0;top:0}.range::-ms-fill-lower{height:2px;background-color:rgba(24,103,194,.81)}.range::-ms-tooltip{display:none}.range:disabled{opacity:.3;cursor:default;pointer-events:none}.range__left{position:relative;top:17px;height:2px;width:0;background-color:rgba(24,103,194,.81);pointer-events:none}[disabled]>.range__left,.range--material:disabled + .range__left{visibility:hidden}.exopite-sof-field-range input[type="number"]{width:74px;margin-left:7px;height:32px}.button-bar{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:17px;display:table;table-layout:fixed;white-space:nowrap;margin:0;padding:0;position:relative;margin:0;border:none}.button-bar__item{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:17px;display:table-cell;width:auto;-webkit-border-radius:0;border-radius:0;position:relative;position:relative;overflow:hidden;padding:0;position:relative;overflow:hidden}.button-bar__item>input{position:absolute;overflow:hidden;right:0;top:0;left:0;bottom:0;padding:0;border:0;opacity:.001;z-index:1;vertical-align:top;outline:none;width:100%;height:100%;margin:0;-webkit-appearance:none;appearance:none}.button-bar__button{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:17px;-webkit-border-radius:inherit;border-radius:inherit;background-color:#fff;font-weight:400;padding:1px 12px 0 12px;font-size:13px;width:100%;-webkit-transition:background-color 0.2s linear,color 0.2s linear;-moz-transition:background-color 0.2s linear,color 0.2s linear;-o-transition:background-color 0.2s linear,color 0.2s linear;transition:background-color 0.2s linear,color 0.2s linear;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;min-width:80px}.button-bar__item:first-child>.button-bar__button{-webkit-border-top-left-radius:0;border-top-left-radius:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0}.button-bar__item:last-child>.button-bar__button{-webkit-border-top-right-radius:0;border-top-right-radius:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0}.button-bar__button,.button-bar__button:active,:active + .button-bar__button{height:30px;line-height:28px}.button-bar__item.active>.button-bar__button,:checked + .button-bar__button,.button-bar__button:active,:active + .button-bar__button{background-color:#80a9d4}.button-bar__button{color:#5e93cb}.button-bar__item:first-child>.button-bar__button{border-left:1px solid #80a9d4;border-right:1px solid #80a9d4}.button-bar__item:last-child>.button-bar__button{border-right:1px solid #80a9d4}.button-bar__button,.button-bar__button:active,:active + .button-bar__button{border:0 solid #80a9d4;border-top:1px solid #80a9d4;border-bottom:1px solid #80a9d4;border-right:1px solid #80a9d4}.button-bar__button:active,:active + .button-bar__button{font-size:13px;width:100%;-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.button-bar__item.active>.button-bar__button,:checked + .button-bar__button{color:#fff;-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.button-bar__button:disabled{opacity:.3;cursor:default;pointer-events:none}.button-bar__button:hover{-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.button-bar__button:focus{outline:0}.radio-button__input{position:absolute;overflow:hidden;right:0;top:0;left:0;bottom:0;padding:0;border:0;opacity:.001;z-index:1;vertical-align:top;outline:none;width:100%;height:100%;margin:0;-webkit-appearance:none;appearance:none}.radio-button__input:active,.radio-button__input:focus{outline:0;-webkit-tap-highlight-color:rgba(0,0,0,0)}.radio-button__input:checked + .radio-button__checkmark:after{opacity:1}.radio-button__input:checked + .radio-button__checkmark:before{background:transparent;border:none}.radio-button{position:relative;display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;overflow:hidden;line-height:24px;text-align:left}.radio-button__checkmark:before{content:'';position:absolute;-webkit-border-radius:100%;border-radius:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-background-clip:padding-box;background-clip:padding-box;width:24px;height:24px;background:transparent;border:none;-webkit-border-radius:16px;border-radius:16px;left:0}.radio-button__checkmark{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-background-clip:padding-box;background-clip:padding-box;position:relative;display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:17px;position:relative;overflow:hidden;position:relative;width:24px;height:24px;background:transparent;pointer-events:none}.radio-button__input:checked + .radio-button__checkmark{background:rgba(0,0,0,0)}.radio-button__checkmark:after{content:'';position:absolute;-webkit-border-radius:100%;border-radius:100%;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);-o-transform:translate(-50%,-50%);transform:translate(-50%,-50%);top:6px;left:5px;opacity:0;width:12px;height:6px;background:transparent;border:3px solid #337ab7;border-width:2px;border-top:none;border-right:none;-webkit-border-radius:0;border-radius:0;-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}.radio-button__input:disabled + .radio-button__checkmark{opacity:.3;cursor:default;pointer-events:none}.switch{position:relative;display:inline-block;vertical-align:top;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-background-clip:padding-box;background-clip:padding-box;position:relative;overflow:hidden;min-width:51px;font-size:17px;padding:0 20px;border:none;overflow:visible;width:51px;height:32px;z-index:0;text-align:left}.switch__input{position:absolute;overflow:hidden;right:0;top:0;left:0;bottom:0;padding:0;border:0;opacity:.001;z-index:1;vertical-align:top;outline:none;width:100%;height:100%;margin:0;-webkit-appearance:none;appearance:none;z-index:-1}.switch__toggle{background-color:#fff;position:absolute;top:0;left:0;right:0;bottom:0;-webkit-border-radius:30px;border-radius:30px;-webkit-transition-property:all;-moz-transition-property:all;-o-transition-property:all;transition-property:all;-webkit-transition-duration:0.35s;-moz-transition-duration:0.35s;-o-transition-duration:0.35s;transition-duration:0.35s;-webkit-transition-timing-function:ease-out;-moz-transition-timing-function:ease-out;-o-transition-timing-function:ease-out;transition-timing-function:ease-out;-webkit-box-shadow:inset 0 0 0 2px #e5e5e5;box-shadow:inset 0 0 0 2px #e5e5e5}.switch__handle{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-background-clip:padding-box;background-clip:padding-box;position:absolute;content:'';-webkit-border-radius:28px;border-radius:28px;height:28px;width:28px;background-color:#fff;left:1px;top:2px;-webkit-transition-property:all;-moz-transition-property:all;-o-transition-property:all;transition-property:all;-webkit-transition-duration:0.35s;-moz-transition-duration:0.35s;-o-transition-duration:0.35s;transition-duration:0.35s;-webkit-transition-timing-function:cubic-bezier(.59,.01,.5,.99);-moz-transition-timing-function:cubic-bezier(.59,.01,.5,.99);-o-transition-timing-function:cubic-bezier(.59,.01,.5,.99);transition-timing-function:cubic-bezier(.59,.01,.5,.99);-webkit-box-shadow:0 0 0 1px #e4e4e4,0 3px 2px rgba(0,0,0,.25);box-shadow:0 0 0 1px #e4e4e4,0 3px 2px rgba(0,0,0,.25)}.switch--active .switch__handle{-webkit-transition-duration:0s;-moz-transition-duration:0s;-o-transition-duration:0s;transition-duration:0s}input:checked + .switch__toggle{-webkit-box-shadow:inset 0 0 0 2px #5198db;box-shadow:inset 0 0 0 2px #5198db;background-color:#5198db}input:checked + .switch__toggle .switch__handle{left:21px;-webkit-box-shadow:0 3px 2px rgba(0,0,0,.25);box-shadow:0 3px 2px rgba(0,0,0,.25)}input:disabled + .switch__toggle{opacity:.3;cursor:default;pointer-events:none}.switch__touch{position:absolute;top:-5px;bottom:-5px;left:-10px;right:-10px}.checkbox{position:relative;display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:17px;line-height:24px;cursor:pointer}.checkbox__checkmark{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-background-clip:padding-box;background-clip:padding-box;position:relative;display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:17px;position:relative;overflow:hidden;height:24px;pointer-events:none}.checkbox__input{position:absolute;overflow:hidden;right:0;top:0;left:0;bottom:0;padding:0;border:0;opacity:.001;z-index:1;vertical-align:top;outline:none;width:100%;height:100%;margin:0;-webkit-appearance:none;appearance:none}.checkbox__input:checked{background:rgba(24,103,194,.81)}.checkbox__input:checked + .checkbox__checkmark:before{background:#80a9d4;border:1px solid #80a9d4}.checkbox__input:checked + .checkbox__checkmark:after{opacity:1}.checkbox__checkmark::before{content:'';position:absolute;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-background-clip:padding-box;background-clip:padding-box;width:24px;height:24px;background:#fff;border:1px solid #ccc;-webkit-border-radius:16px;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;left:0}.checkbox__checkmark{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-background-clip:padding-box;background-clip:padding-box;position:relative;display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:17px;position:relative;overflow:hidden;width:24px;height:24px;margin-right:10px}.checkbox__checkmark:after{content:'';position:absolute;top:6px;left:5px;width:12px;height:6px;background:transparent;border:3px solid #fff;border-width:2px;border-top:none;border-right:none;-webkit-border-radius:0;border-radius:0;-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}.checkbox__input:focus + .checkbox__checkmark:before{-webkit-box-shadow:none;box-shadow:none}.checkbox__input:disabled + .checkbox__checkmark{opacity:.3;cursor:default;pointer-events:none}.checkbox__input:disabled:active + .checkbox__checkmark:before{background:transparent;-webkit-box-shadow:none;box-shadow:none}.checkbox--noborder__input{position:absolute;overflow:hidden;right:0;top:0;left:0;bottom:0;padding:0;border:0;opacity:.001;z-index:1;vertical-align:top;outline:none;width:100%;height:100%;margin:0;-webkit-appearance:none;appearance:none}.checkbox--noborder{position:relative;display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:17px;line-height:24px;position:relative;overflow:hidden}.checkbox--noborder__checkmark{position:relative;display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-background-clip:padding-box;background-clip:padding-box;height:24px;background:transparent}.checkbox--noborder__input{position:absolute;overflow:hidden;right:0;top:0;left:0;bottom:0;padding:0;border:0;opacity:.001;z-index:1;vertical-align:top;outline:none;width:100%;height:100%;margin:0;-webkit-appearance:none;appearance:none}.checkbox--noborder__input:checked + .checkbox--noborder__checkmark:before{background:transparent;border:none}.checkbox--noborder__input:checked + .checkbox--noborder__checkmark:after{opacity:1}.checkbox--noborder__checkmark:before{content:'';position:absolute;width:24px;height:24px;background:transparent;border:none;-webkit-border-radius:16px;border-radius:16px;left:0}.checkbox--noborder__checkmark{position:relative;display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-background-clip:padding-box;background-clip:padding-box;width:24px;height:24px;border:none}.checkbox--noborder__checkmark:after{content:'';position:absolute;top:6px;left:5px;opacity:0;width:12px;height:6px;background:transparent;border:3px solid rgba(24,103,194,.81);border-width:2px;border-top:none;border-right:none;-webkit-border-radius:0;border-radius:0;-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}.checkbox--noborder__input:focus + .checkbox--noborder__checkmark:before{border:none;-webkit-box-shadow:none;box-shadow:none}.checkbox--noborder__input:disabled + .checkbox--noborder__checkmark{opacity:.3;cursor:default;pointer-events:none}.checkbox--noborder__input:disabled:active + .checkbox--noborder__checkmark:before{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:none}.exopite-sof-content .list__item__left{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;padding:12px 14px 12px 0;-webkit-box-ordinal-group:1;-webkit-order:0;-moz-box-ordinal-group:1;-ms-flex-order:0;order:0;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;-webkit-align-self:stretch;-ms-flex-item-align:stretch;align-self:stretch;line-height:1.2em;min-height:44px}.exopite-sof-content .list__item__left:empty{width:0;min-width:0;padding:0;margin:0}.exopite-sof-content .list__item__center{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex-grow:1;-moz-box-flex:1;-ms-flex-positive:1;flex-grow:1;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-moz-box-orient:horizontal;-moz-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-ordinal-group:2;-webkit-order:1;-moz-box-ordinal-group:2;-ms-flex-order:1;order:1;margin-right:auto;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;-webkit-align-self:stretch;-ms-flex-item-align:stretch;align-self:stretch;margin-left:0;border-bottom:none;-webkit-background-size:100% 1px;background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:-webkit-linear-gradient(90deg,#ccc,#ccc 100%);background-image:-moz-linear-gradient(90deg,#ccc,#ccc 100%);background-image:-o-linear-gradient(90deg,#ccc,#ccc 100%);background-image:linear-gradient(0deg,#ccc,#ccc 100%);padding:12px 6px 12px 0;line-height:1.2em;min-height:44px;margin-right:15px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.exopite-sof-content .list__item__center{background-image:-webkit-linear-gradient(90deg,#ccc,#ccc 50%,transparent 50%);background-image:-moz-linear-gradient(90deg,#ccc,#ccc 50%,transparent 50%);background-image:-o-linear-gradient(90deg,#ccc,#ccc 50%,transparent 50%);background-image:linear-gradient(0deg,#ccc,#ccc 50%,transparent 50%)}}.exopite-sof-content .list__item__right{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;margin-left:auto;padding:12px 12px 12px 0;-webkit-box-ordinal-group:3;-webkit-order:2;-moz-box-ordinal-group:3;-ms-flex-order:2;order:2;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;-webkit-align-self:stretch;-ms-flex-item-align:stretch;align-self:stretch;border-bottom:none;-webkit-background-size:100% 1px;background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:-webkit-linear-gradient(90deg,#ccc,#ccc 100%);background-image:-moz-linear-gradient(90deg,#ccc,#ccc 100%);background-image:-o-linear-gradient(90deg,#ccc,#ccc 100%);background-image:linear-gradient(0deg,#ccc,#ccc 100%);line-height:1.2em;min-height:44px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.exopite-sof-content .list__item__right{background-image:-webkit-linear-gradient(90deg,#ccc,#ccc 50%,transparent 50%);background-image:-moz-linear-gradient(90deg,#ccc,#ccc 50%,transparent 50%);background-image:-o-linear-gradient(90deg,#ccc,#ccc 50%,transparent 50%);background-image:linear-gradient(0deg,#ccc,#ccc 50%,transparent 50%)}}.exopite-sof-content .list__header{margin:0;padding:0;list-style:none;text-align:left;display:block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:20px 0 0 15px;font-size:12px;font-weight:500;color:#1f1f21;text-shadow:none;border-top:none;border-bottom:1px solid #ccc;-webkit-box-shadow:0 1px 0 0 #fff;box-shadow:0 1px 0 0 #fff;min-height:24px;line-height:24px;margin-top:-1px;text-transform:uppercase;position:relative}.exopite-sof-content .list__header:not(:first-of-type){border-top:1px solid #ccc}.exopite-sof-content .list{padding:0;margin:0;font:inherit;color:inherit;background:transparent;border:none;line-height:normal;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:17px;padding:0;margin:0;list-style-type:none;text-align:left;overflow:auto;display:block;-webkit-overflow-scrolling:touch;overflow:hidden;border:1px solid #ccc;max-width:500px;border-radius:3px}.exopite-sof-content .list__item{margin:0;padding:0;width:100%;position:relative;list-style:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-moz-box-orient:horizontal;-moz-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-webkit-justify-content:flex-start;-moz-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;padding:0 0 0 14px;margin:1px 0 -1px 0;color:#1f1f21;background-color:#fff}.exopite-sof-content .list__item:first-child{margin-top:0}.exopite-sof-content .list__item_active:active{background-color:#d9d9d9;-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.exopite-sof-content .list__item--tappable:active{background-color:#d9d9d9}.exopite-sof-field-radio .radio-button__checkmark::before{width:24px;height:24px;background:#fff;border:1px solid #ccc;cursor:pointer}.exopite-sof-field-radio .radio-button__input:checked + .radio-button__checkmark::before{border:1px solid #80a9d4}.exopite-sof-field-radio .radio-button__checkmark::after{top:5px;left:5px;opacity:0;width:14px;height:14px;background:#80a9d4;border:none;transform:none;border-radius:50%}.exopite-sof-field-radio .radio-button__checkmark{margin-right:10px}.exopite-sof-cloneable__title{border-bottom:1px solid #e5e5e5;background:#fafafa;padding:12px 30px;cursor:pointer;position:relative;margin:0}.exopite-sof-cloneable__title{border-bottom:1px solid #e5e5e5;padding:11px 30px}.exopite-sof-cloneable__item{border:1px solid #e5e5e5;margin-bottom:5px}.exopite-sof-cloneable--helper{float:right}.exopite-sof-cloneable__muster--hidden{display:none}.exopite-sof-accordion--hidden .exopite-sof-accordion__content{display:none}.exopite-sof-cloneable__item mute{font-size:89%;font-style:italic;color:#aaa}.chosen-container{max-width:100%}.exopite-sof-info--small{display:block;color:#777;font-style:italic}.exopite-sof-info--warning{color:red}.wp-core-ui .button-warning:focus,.wp-core-ui .button-warning:hover,.wp-core-ui .button-warning:active,.wp-core-ui .button-warning{background:#de0000;border-color:#c00000;box-shadow:0 1px 0 red;text-shadow:0 -1px 1px #b40000,1px 0 1px #b40000,0 1px 1px #b40000,-1px 0 1px #b40000;color:#fff}.button.loading,.button.loading:active,.button.loading:focus,.button.loading:hover{background:#aaa;border-color:#aaa;box-shadow:none;color:#666;text-shadow:none;cursor:default}.exopite-sof-fieldset input[type=text].colorpicker.wp-color-picker{display:inline-block;background:#fff;position:relative}.ui-datepicker .ui-datepicker-next span,.ui-datepicker .ui-datepicker-prev span{background-image:url(data:image/png;base64,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);background-position:-32px 0;margin-top:0;top:0;font-weight:400}.ui-icon{width:16px;height:16px;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-datepicker *{padding:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;font-family:"Open Sans",sans-serif;border-radius:0}.ui-datepicker{background:#f1f1f1;padding:0;border:1px solid #e5e5e5;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;width:17em;display:none;font-family:"Open Sans",sans-serif;-webkit-box-shadow:2px 2px 6px 0 rgba(0,0,0,.2);-moz-box-shadow:2px 2px 6px 0 rgba(0,0,0,.2);box-shadow:2px 2px 6px 0 rgba(0,0,0,.2)}.ui-datepicker .ui-datepicker-header{border:none;background:#23282d;color:#fff;font-weight:400;position:relative;padding:.2em 0;text-align:center}.ui-datepicker .ui-datepicker-title{margin-top:.4em;margin-bottom:.3em;color:#fff;font-size:14px}.ui-datepicker .ui-datepicker-next,.ui-datepicker .ui-datepicker-next-hover,.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-prev-hover{height:1em;top:.9em;border:none}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-next,.ui-datepicker .ui-datepicker-prev{position:absolute;width:1.8em}.ui-datepicker .ui-datepicker-next span,.ui-datepicker .ui-datepicker-prev span{display:block;position:absolute;left:50%;margin-left:-8px}.ui-datepicker .ui-datepicker-prev span{background-position:-96px 0}.ui-datepicker table{font-size:13px;margin:0;width:100%;border-collapse:collapse}.ui-datepicker thead{background:#23282d;color:#fff}.ui-datepicker th{padding:.3em 0;color:#fff;font-weight:400;border:none;text-align:center;border-top:1px solid #32373c;font-size:11px}.ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #d3d3d3;font-weight:400;color:#555}.ui-datepicker td{padding:0}.ui-datepicker td a,.ui-datepicker td span{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-widget-content a{color:#23282d}.ui-datepicker td .ui-state-default{background:0 0;border:none;text-align:center;padding:.5em;margin:0;font-weight:400;color:#23282d}.ui-datepicker td .ui-state-default.ui-state-highlight{background:#65badd;color:#fff}.ui-datepicker td .ui-state-active,.ui-datepicker td .ui-state-default.ui-state-highlight.ui-state-hover,.ui-datepicker td .ui-state-hover{background:#0073aa;color:#fff}.exopite-sof-accordion__title{min-height:19px}#side-sortables .exopite-sof-field .exopite-sof-title{position:relative;width:100%;float:none}#side-sortables .exopite-sof-field .exopite-sof-fieldset{margin-left:0;padding-top:5px}#side-sortables .exopite-sof-content-nav{background-color:#fff}#side-sortables .exopite-sof-nav{display:none}#side-sortables .exopite-sof-content-nav .exopite-sof-sections{width:100%}#side-sortables .exopite-sof-content-nav .exopite-sof-section-header,#side-sortables .exopite-sof-content-nav .hide{display:block}#side-sortables .exopite-sof-field{padding:7px 7px;border-bottom:none}#side-sortables .exopite-sof-sections h4{font-size:1.3em;padding:6px 0}#side-sortables .exopite-sof-sections .exopite-sof-cloneable__title{border-bottom:none;padding:7px 10px;cursor:pointer;font-size:.8rem;font-weight:400}#side-sortables .exopite-sof-sections .exopite-sof-field .exopite-sof-title{font-size:13px}#poststuff .exopite-sof-sections h2{font-size:18px;padding:8px 6px}#side-sortables .exopite-sof-section-header .dashicons-before{padding-right:14px}.exopite-sof-field .loading{z-index:0}.exopite-sof-field .loading::before{position:absolute;content:'';top:0;left:0;right:0;bottom:0;background:rgba(255,255,255,.7);z-index:1}.exopite-sof-field .loading::after{content:url(/wp-includes/images/spinner-2x.gif);position:absolute;top:calc(50% - 20px);left:calc(50% - 20px);z-index:2}.exopite-sof-field.no-padding-top{padding-top:0}.exopite-sof-field.no-padding-bottom{padding-bottom:0}.exopite-sof-section>.exopite-sof-field.no-border-bottom{border-bottom:none}.exopite-sof-group .exopite-sof-tinymce-editor .exopite-sof-fieldset{border:1px solid #e5e5e5}.exopite-sof-header .exopite-sof-search{float:none;margin-left:10px;vertical-align:bottom;padding-right:20px;border:none;text-align:left;color:#fff;background:rgba(255,255,255,.2)}.exopite-sof-search-wrapper{display:inline-block;position:relative}.exopite-sof-search-wrapper::after{content:'\f002';position:absolute;right:6px;top:4px;font-family:FontAwesome}.exopite-sof-header{padding:15px 10px;background-image:url(images/exopite-sof-title-bg.jpg);background-size:cover;box-shadow:inset 0 0 0 1000px rgba(48,64,75,.83)}.exopite-sof-font-preview{border:1px solid #e5e5e5;padding:6px 10px;background:#fbfbfb}.exopite-sof-typography-family .chosen-container{width:280px!important}.exopite-sof-typography-variant .chosen-container{width:100px!important}.exopite-sof-font-field input,.exopite-sof-font-field label{vertical-align:bottom}.exopite-sof-font-field .wp-picker-container{display:inline-block}.exopite-sof-wrapper .dashicons,.exopite-sof-wrapper .dashicons-before::before{width:16px;height:16px;font-size:16px;line-height:18px}.exopite-sof-wrapper .exopite-sof-section-header span::before{line-height:27px;height:24px}.exopite-sof-wrapper .exopite-sof-section-header .fa-before::before{padding-right:20px;vertical-align:bottom}.exopite-sof-wrapper .exopite-sof-section-header .dashicons-before::before{font-size:18px;line-height:27px;height:24px}.exopite-sof-wrapper .fa-before::before{width:16px;height:16px;display:inline-block;text-align:center;font-size:15px}.exopite-sof-cloneable--clone{margin-right:5px}.exopite-sof-nav.search .exopite-sof-nav-list-parent-item>span,.exopite-sof-nav.search .exopite-sof-nav-list-item,.exopite-sof-nav.search li{color:#555}.exopite-sof-font-field .wp-color-result-text{line-height:22px}.exopite-sof-tabs{display:flex;flex-wrap:wrap}.exopite-sof-tabs .tab{border:1px solid #e5e5e5}.exopite-sof-tabs label{order:1;display:block;padding:10px 32px;margin-left:1px;margin-right:1px;cursor:pointer;font-weight:700;transition:background ease 0.2s;border:1px solid #e5e5e5;border-top-width:4px;margin-bottom:-1px;background:#fff;z-index:1}.exopite-sof-tabs .tab{order:99;flex-grow:1;width:100%;display:none;background:#fff}.exopite-sof-tabs input[type="radio"]{display:none}.exopite-sof-tabs input[type="radio"]:checked + label{border-top-color:#80a9d4;border-bottom-color:#fff}.exopite-sof-tabs input[type="radio"]:checked + label + .tab{display:block}@media (min-width:46em){.exopite-sof-tabs label:first-of-type{margin-left:0}.exopite-sof-tabs label:last-of-type{margin-right:0}.exopite-sof-tabs label.equal-width{flex:1}}@media (max-width:45em){.exopite-sof-tabs .tab,.exopite-sof-tabs label{order:initial}.exopite-sof-tabs label{width:100%;margin-right:0;margin-top:.2rem}}.exopite-sof-wrapper .exopite-sof-field .wp-color-result{border-radius:0!important;-moz-border-radius:0!important;-webkit-border-radius:0!important;border-bottom-left-radius:0!important;border-bottom-right-radius:0!important;border-top-left-radius:0!important;border-top-right-radius:0!important;box-shadow:none!important;-webkit-box-shadow:none!important}.exopite-sof-wrapper .exopite-sof-field .button.wp-color-result{border-color:#e5e5e5!important}.exopite-sof-wrapper .exopite-sof-field .wp-picker-container .wp-color-result.button{height:31px}.exopite-sof-wrapper .exopite-sof-field .button .wp-color-result-text{height:100%;line-height:30px;border-radius:0}.exopite-sof-fieldset .color-alpha{border-radius:0!important;height:29px!important}.exopite-sof-fieldset .wp-color-result-text{border-left:1px solid #ddd}.iris-picker .iris-square,.iris-picker .iris-slider,.iris-picker .iris-square-inner,.iris-picker .iris-palette{border-radius:0}.exopite-sof-fieldset .button.button-small.wp-picker-clear,.exopite-sof-fieldset input[type="text"].colorpicker,.exopite-sof-fieldset textarea,.exopite-sof-fieldset select,.exopite-sof-fieldset input[type="number"],.exopite-sof-fieldset input[type="date"],.exopite-sof-fieldset input[type="email"],.exopite-sof-fieldset input[type="password"],.exopite-sof-fieldset input[type="text"]{padding:5px 12px;border-radius:0;line-height:18px;box-shadow:none;background:#f4f4f4}.exopite-sof-fieldset select{padding:4px 12px 5px 12px}.exopite-sof-fieldset .chosen-container-multi .chosen-choices li.search-choice,.exopite-sof-fieldset .chosen-container-active .chosen-single,.exopite-sof-fieldset .chosen-container-single .chosen-single,.exopite-sof-fieldset .chosen-container-multi .chosen-choices,.exopite-sof-fieldset .button.button-small.wp-picker-clear,.exopite-sof-fieldset input[type="text"].colorpicker,.exopite-sof-fieldset textarea,.exopite-sof-fieldset select,.exopite-sof-fieldset input[type="number"],.exopite-sof-fieldset input[type="date"],.exopite-sof-fieldset input[type="email"],.exopite-sof-fieldset input[type="password"],.exopite-sof-fieldset input[type="text"]{border:1px solid #e5e5e5}.exopite-sof-fieldset .button.button-small.wp-picker-clear,.exopite-sof-fieldset input[type="text"].colorpicker,.exopite-sof-fieldset select,.exopite-sof-wrapper .exopite-sof-fieldset select,.exopite-sof-fieldset input[type="number"],.exopite-sof-fieldset input[type="email"],.exopite-sof-fieldset input[type="password"],.exopite-sof-fieldset input[type="text"]{height:31px}.exopite-sof-fieldset select,.exopite-sof-fieldset input[type="email"],.exopite-sof-fieldset input[type="password"],.exopite-sof-fieldset input[type="text"]{min-width:375px}.exopite-sof-field-date .exopite-sof-fieldset .datepicker,.exopite-sof-fieldset input[type="text"].chosen-search-input{min-width:initial}.exopite-sof-fieldset input[type="date"],.exopite-sof-field-date input[type="text"]{width:160px;line-height:1em;padding-top:9px;padding-bottom:9px}.exopite-sof-fieldset input[type="number"]{padding:5px 5px 5px 12px}.exopite-sof-fieldset textarea{width:100%;height:150px}.wp-editor-container textarea.wp-editor-area{border:0;background:#fff}.exopite-sof-field-number .text-muted,.exopite-sof-field-range .text-muted{padding-top:0;margin-top:5px;display:inline-block;margin-left:10px}.checkbox__checkmark::before{border-radius:0}.exopite-sof-fieldset .chosen-container-single .chosen-single{height:31px}.exopite-sof-fieldset .chosen-container-multi .chosen-choices{padding:0 3px;border-radius:0}.exopite-sof-fieldset .chosen-container-multi .chosen-choices{background-image:none}.exopite-sof-fieldset .chosen-container-multi .chosen-choices li.search-choice{background-image:none;border-radius:0;background-color:#f5f5f5;margin:3px 3px 3px 0;padding:4px 20px 4px 5px}.exopite-sof-fieldset .chosen-container-multi .chosen-choices li.search-choice .search-choice-close{top:6px}.exopite-sof-fieldset .chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 0 0 8px;border-radius:0;background:#f5f5f5;box-shadow:none;color:#444;text-decoration:none;white-space:nowrap;line-height:28px}.exopite-sof-fieldset .chosen-container-single .chosen-single div{position:absolute;top:3px}.exopite-sof-fieldset .chosen-container-active .chosen-single{box-shadow:none}.exopite-sof-field-typography .exopite-sof-btn,.exopite-sof-field-typography .exopite-sof-fieldset .chosen-container,.exopite-sof-field-typography .exopite-sof-form-field{margin-bottom:8px;margin-right:8px}.exopite-sof-fieldset .chosen-container-active.chosen-with-drop .chosen-single{border:1px solid #ddd;background-image:none;box-shadow:none}.exopite-sof-fieldset .exopite-sof-fieldset .chosen-container-single .chosen-single{background:#fff}.exopite-sof-fieldset .chosen-container-single .chosen-search input[type="text"]{border:1px solid #ddd;min-width:100%}.exopite-sof-fieldset .chosen-container-single .chosen-drop{border-radius:0}.exopite-sof-fieldset .chosen-container .chosen-drop{border:1px solid #ddd;box-shadow:none}.exopite-sof-help{cursor:help;border:1px solid #ddd;height:29px;display:inline-block;vertical-align:top;line-height:27px;width:29px;background:#fff;text-align:center;display:inline-flex;align-items:center;justify-content:center}input[type="color"]{height:31px;border-color:#ddd;padding:0}.exopite-sof-field .exopite-sof-btn,.exopite-sof-field .button.button-primary{margin:0;background:#80a9d4;border:1px solid #80a9d4;border-radius:0;height:31px;line-height:29px;box-shadow:none;text-shadow:none;vertical-align:baseline;padding:0 10px;color:#fff;text-decoration:none;display:inline-block;white-space:nowrap;box-sizing:border-box}.exopite-sof-field button.insert-media{box-shadow:none;border-radius:0;border-color:#ddd}.exopite-sof-content .list{border:1px solid #ddd;border-radius:0}.exopite-sof-content .list__item__center{background-image:-webkit-linear-gradient(90deg,#ddd,#ddd 100%);background-image:-moz-linear-gradient(90deg,#ddd,#ddd 100%);background-image:-o-linear-gradient(90deg,#ddd,#ddd 100%);background-image:linear-gradient(0deg,#ddd,#ddd 100%)}.exopite-sof-content .trumbowyg-button-pane{background:#f4f4f4}.exopite-sof-fieldset input[type="date"],.exopite-sof-field-date input[type="text"]{width:160px;line-height:1em;padding-top:7px;padding-bottom:6px}.exopite-sof-fieldset input[type="text"].colorpicker{min-width:initial}.exopite-sof-form-field{display:inline-flex;height:31px;white-space:nowrap}.exopite-sof-form-field input{margin:0}.exopite-sof-form-field .input-append,.exopite-sof-form-field .input-prepend{height:29px;min-width:20px;border:1px solid #e5e5e5;text-align:center;color:#888;padding:0 5px;display:flex;align-items:center;justify-content:center}.exopite-sof-form-field .input-prepend{border-right:none}.exopite-sof-form-field .input-append{border-left:none}.exopite-sof-fieldset input.disabled,.exopite-sof-fieldset input:disabled,.exopite-sof-fieldset select.disabled,.exopite-sof-fieldset select:disabled,.exopite-sof-fieldset textarea.disabled,.exopite-sof-fieldset textarea:disabled{background:#ddd}.exopite-sof-wrapper input,.exopite-sof-wrapper select{margin:0}.exopite-sof-media input{margin-right:1px} \ No newline at end of file +.exopite-sof-video-container{max-width:100%}.video-wrap{height:0;overflow:hidden;padding-bottom:56.25%;position:relative;background:#000}.video-wrap embed,.video-wrap iframe,.video-wrap object,.video-wrap video{height:100%;left:0;position:absolute;top:0;width:100%}.exopite-sof-video-input{padding-top:10px}.exopite-sof-attachment-media{display:inline-block;position:relative;border:2px solid transparent}.exopite-sof-attachment-media.selected{border-color:#80a9d4}.exopite-sof-attachment-media.selected .exopite-sof-attachment-media-delete-overlay{position:absolute;top:0;left:0;bottom:0;right:0;background:rgba(128,169,212,.3)}.exopite-sof-attachment-media-delete{display:none;position:absolute;top:3px;right:3px;background:rgba(255,0,0,.6);padding:2px 5px 4px 5px;color:#fff;border-radius:3px;line-height:14px;font-size:14px;cursor:pointer}.exopite-sof-attachment-media.selected .exopite-sof-attachment-media-delete{display:block}.exopite-sof-attachment-media img{float:left}.exopite-sof-field-upload .exopite-sof-fieldset input[type=text],.qq-upload-list-selector.qq-upload-list input{width:1px}.exopite-sof-field-upload .exopite-sof-fieldset .qq-edit-filename-selector.qq-edit-filename{width:auto}.exopite-sof-field-upload .exopite-sof-fieldset{position:relative}.exopite-sof-field-upload .qq-template-info{text-align:center;color:#ccc;padding-top:10px}.exopite-sof-field-upload .qq-template{z-index:1;position:relative}.exopite-sof-field-upload .qq-uploader{border-radius:0;border:3px dashed #ccc;background:0 0}.exopite-sof-field .qq-template .exopite-sof-btn{margin-right:8px}.exopite-sof-field-upload .qq-uploader::before{content:"\f0ee";position:absolute;font-size:6rem;left:0;width:100%;text-align:center;top:50%;opacity:.25;font-family:fontAwesome;z-index:-1}.qq-template .qq-upload-button{margin-right:15px}.qq-template .buttons{width:36%;display:flex}.qq-template .qq-uploader .qq-total-progress-bar-container{width:60%}.exopite-sof-ace-editor{border:1px solid #e5e5e5}.exopite-sof-wrapper-menu{margin-right:15px;margin-top:22px}.exopite-sof-header{padding:10px;background:#345}.exopite-sof-header h1,.exopite-sof-wrapper fieldset{display:block;text-align:center;margin:0;color:#fff;font-weight:400;line-height:1em}.exopite-sof-header h1{font-size:1.7em}@media only screen and (min-width:600px){.exopite-sof-wrapper fieldset{display:inline-block;float:right}.exopite-sof-header h1,.exopite-sof-header input{display:inline-block;text-align:right;margin:0}}.exopite-sof-header input{float:right}.exopite-sof-footer{padding:6px 15px;background:#345;position:fixed;bottom:-48px;z-index:999;transition:all .4s ease 0s;opacity:.9}.exopite-sof-footer:hover{opacity:1}.exopite-sof-form-js{margin-bottom:50px}.exopite-sof-help{cursor:help}.hidden{display:none}.exopite-sof-nav{display:none}.exopite-sof-sections{background-color:#fff}@media only screen and (max-width:899px){.exopite-sof-fieldset .color-alpha{width:40px!important;height:30px!important}}@media only screen and (min-width:900px){.exopite-sof-content-nav{position:relative;background-color:#23282d}.exopite-sof-nav-list-item.active{background-color:#0073aa;color:#fff}.exopite-sof-nav-icon{padding-right:10px}.exopite-sof-nav{display:none;position:relative;z-index:10;width:200px;background-color:#23282d}.exopite-sof-content-nav .exopite-sof-nav{display:inline-block;vertical-align:top}.exopite-sof-content-nav .exopite-sof-sections{position:relative;display:inline-block;width:calc(100% - 200px)}.exopite-sof-nav-list{margin:0}.exopite-sof-nav-list-parent-item{margin-bottom:0}.exopite-sof-nav-list-parent-item>span{display:block}.exopite-sof-nav-list-item,.exopite-sof-nav-list-parent-item>span{color:#999;padding:13px 15px;margin:0;cursor:pointer;font-size:14px;border-bottom:1px solid #2f2f2f;position:relative}.exopite-sof-nav-list-parent-item ul li{padding-left:25px;background-color:#181818;font-size:13px;padding-top:11px;padding-bottom:11px}.exopite-sof-nav-list-item:hover,.exopite-sof-nav-list-parent-item>span:hover{color:#fff}.exopite-sof-nav-list-item.active:after{content:" ";position:absolute;right:0;top:50%;height:0;width:0;pointer-events:none;border:solid transparent;border-right-color:#fff;border-width:4px;margin-top:-4px}.exopite-sof-content-nav .exopite-sof-section-header,.exopite-sof-content-nav .hide{display:none}.exopite-sof-nav-list-parent-item>.exopite-sof-nav-list-item-title::after{content:"\f054";display:inline-block;font-family:FontAwesome;font-size:9px;line-height:1;position:absolute;right:10px;top:50%;margin-top:-4px;-moz-transform:rotate(0);-ms-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0);-moz-transition:-moz-transform .2s;-o-transition:-o-transform .2s;-webkit-transition:-webkit-transform .2s;transition:transform .2s}.exopite-sof-nav-list-parent-item.active>.exopite-sof-nav-list-item-title::after{-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-webkit-transform:rotate(90deg);transform:rotate(90deg)}}.exopite-sof-wrapper-metabox{margin:-6px -12px -12px -12px}.block-editor-page .exopite-sof-wrapper-metabox{margin:0}.exopite-sof-image-preview img{max-width:150px}.exopite-sof-image-inner{display:inline-block;position:relative}.exopite-sof-image-remove{position:absolute;top:3px;right:3px;background:rgba(255,0 ,0 ,.6);color:#fff;padding:3px 5px 4px;cursor:pointer;border-radius:3px}.exopite-sof-media .exopite-sof-button{margin-top:3px;margin-left:10px}.exopite-sof-fieldset .exopite-sof-image input[type=text]{width:calc(100% - 100px);max-width:calc(100% - 100px)}.exopite-sof-ajax-message{padding:7px 13px;border-radius:3px;display:none;margin-right:10px;color:#fff;display:inline-block;opacity:0;transition:all .4s ease 0s}.exopite-sof-ajax-message.success{background-color:#27ae60}.exopite-sof-ajax-message.error{background-color:#ae2c27}.exopite-sof-ajax-message.show{opacity:1}.exopite-sof-field .exopite-sof-title{float:none;width:100%}.exopite-sof-field .exopite-sof-fieldset{margin-left:0}.exopite-sof-field-notice .exopite-sof-title{padding-top:15px;padding-left:30px;padding-bottom:15px}@media only screen and (min-width:786px){.exopite-sof-field .exopite-sof-title{position:relative;width:25%;float:left}.exopite-sof-field .exopite-sof-fieldset{margin-left:30%}}@media only screen and (min-width:900px){.exopite-sof-content.exopite-sof-content-nav{display:flex}}@media only screen and (min-width:1000px){.exopite-sof-field .exopite-sof-title{position:relative;width:25%;float:left}.exopite-sof-field .exopite-sof-fieldset{margin-left:27%}.exopite-sof-field-notice .exopite-sof-fieldset{margin-left:calc(25% - 10px)}}.exopite-sof-field::after,.exopite-sof-field::before{content:" ";display:table;clear:both}.exopite-sof-field{position:relative;padding:15px 30px}.exopite-sof-section>.exopite-sof-field{border-bottom:1px solid #eee}.exopite-sof-content{position:relative}.exopite-sof-content,.exopite-sof-content .checkbox{font-size:13px}.exopite-sof-section-header .dashicons-before{padding-right:20px}.exopite-sof-section-header{padding:8px 32px 10px 32px;background:#ccc;color:#fff;font-size:24px;line-height:24px;margin:0}.exopite-sof-fieldset ul,.exopite-sof-title{margin:0}.exopite-sof-field-image_select input{display:none}.exopite-sof-field-image_select input:checked~img{border-color:#333;opacity:1}.exopite-sof-field-image-selector-horizontal label{display:inline-block;margin-right:10px;margin-bottom:10px}@media screen and (max-width:782px){#wpbody .exopite-sof-font-field select{margin-bottom:8px}#wpbody .exopite-sof-field select{height:31px;padding:5px 12px;font-size:14px;line-height:16px}}.exopite-sof-field-image-selector-vertical label{display:block;margin-bottom:10px}.exopite-sof-field-image_select label img{max-width:100%;vertical-align:bottom;background-color:#fff;border:2px solid #ccc;opacity:.75;-moz-transition:all .15s ease-out;-o-transition:all .15s ease-out;-webkit-transition:all .15s ease-out;transition:all .15s ease-out}.exopite-sof-field-switcher label{display:inline-block}.exopite-sof-field-switcher .exopite-sof-text-desc{margin-left:5px;margin-top:0;padding-top:.4em;font-size:1em;display:inline-block}.exopite-sof-content .text-muted,.exopite-sof-description,.exopite-sof-text-desc{font-weight:400;margin-top:10px;color:#999}.exopite-sof-content .text-muted,.exopite-sof-text-desc{font-style:italic}.exopite-sof-fieldset input[type=date],.exopite-sof-fieldset input[type=email],.exopite-sof-fieldset input[type=number],.exopite-sof-fieldset input[type=password],.exopite-sof-fieldset input[type=text],.exopite-sof-fieldset select,.exopite-sof-fieldset textarea{padding:6px 12px;max-width:100%;border:1px solid #ccc;border-radius:3px}.exopite-sof-fieldset input[type=text].colorpicker{width:88px;padding-top:5px;padding-bottom:2px;font-size:1em}.checkbox__switch,.checkbox__switch:after{display:block;height:2em;border:2px solid #f5c6cb;border-radius:2em}.checkbox__switch,.checkbox__switch::after{border-radius:0}.checkbox__input{display:none!important}.checkbox__input:checked+.checkbox__switch:after{left:1em}.checkbox__input:checked+.checkbox__switch:before{left:0}.checkbox__input:checked+.checkbox__switch{border-color:#c3e6cb;background-color:#c3e6cb}.checkbox__switch{-webkit-transition:.2s cubic-bezier(.95,.05,.795,.035);transition:.2s cubic-bezier(.95,.05,.795,.035);position:relative;width:3em;background-color:#f5c6cb;cursor:pointer}.checkbox__switch:after{content:"";-webkit-transition:.2s cubic-bezier(.95,.05,.795,.035);transition:.2s cubic-bezier(.95,.05,.795,.035);content:"";width:2em;background-color:#fff;border:none;position:absolute;box-shadow:0 3px 4px rgba(0,0,0,.4),0 0 2px rgba(0,0,0,.4);top:0;left:0}.checkbox__switch:after{box-shadow:0 1px 3px rgba(0,0,0,.3),0 0 0 rgba(0,0,0,.3)}.unknown{padding:20px 10px;font-size:18px;text-align:center;border-style:solid;border-width:1px}.exopite-sof-field .exopite-sof-notice{position:relative;padding:1rem 1.5rem;border:1px solid transparent;border-radius:0}.exopite-sof-field.exopite-sof-field-notice{padding:0;border-bottom:none}.exopite-sof-content .info{color:#0c5460;background-color:#d1ecf1;border-color:#bee5eb}.exopite-sof-content .primary{color:#004085;background-color:#cce5ff;border-color:#b8daff}.exopite-sof-content .secondary{color:#464a4e;background-color:#e7e8ea;border-color:#dddfe2}.exopite-sof-content .success{color:#155724;background-color:#d4edda;border-color:#c3e6cb}.exopite-sof-content .danger{color:#721c24;background-color:#f8d7da;border-color:#f5c6cb}.exopite-sof-content .warning{color:#856404;background-color:#fff3cd;border-color:#ffeeba}.exopite-sof-content .card{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-width:0;word-wrap:break-word;background-color:#fff;background-clip:border-box;border:1px solid rgba(0,0,0,.125);padding:0;width:100%;max-width:100%;margin-top:0}.exopite-sof-content .card-body{-ms-flex:1 1 auto;flex:1 1 auto;padding:1.25rem}.exopite-sof-content .card-footer:last-child{border-radius:0 0 calc(.25rem - 1px) calc(.25rem - 1px)}.exopite-sof-content .card{border-radius:0;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border:1px solid #e5e5e5}.exopite-sof-content .card-header{padding:.75rem 1.25rem;margin-bottom:0;background-color:rgba(0,0,0,.015);border-bottom:1px solid #e5e5e5}.exopite-sof-content .card-footer{padding:.75rem 1.25rem;background-color:rgba(0,0,0,.015);border-top:1px solid #e5e5e5}.range{padding:0;margin:0;font:inherit;color:inherit;background:0 0;border:none;line-height:normal;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-background-clip:padding-box;background-clip:padding-box;vertical-align:top;outline:0;line-height:1;-webkit-appearance:none;border:none;height:2px;-webkit-border-radius:3px;border-radius:3px;background-image:-webkit-gradient(linear,left top,left bottom,from(#ccc),to(#ccc));background-image:-webkit-linear-gradient(#ccc,#ccc);background-image:-moz-linear-gradient(#ccc,#ccc);background-image:-o-linear-gradient(#ccc,#ccc);background-image:linear-gradient(#ccc,#ccc);background-position:left center;-webkit-background-size:100% 2px;background-size:100% 2px;background-repeat:no-repeat;overflow:hidden;height:31px;max-width:100%;width:375px}.range::-moz-range-track{position:relative;border:none;background-color:#ccc;height:2px;border-radius:30px;box-shadow:none;top:0;margin:0;padding:0}.range::-ms-track{position:relative;border:none;background-color:#ccc;height:0;border-radius:30px}.range::-webkit-slider-thumb{cursor:pointer;position:relative;height:2em;width:2em;background-color:#fff;border:1px solid #ccc;-webkit-border-radius:30px;border-radius:30px;-webkit-box-shadow:none;box-shadow:none;margin:0;padding:0;-webkit-appearance:none;top:0}.range::-moz-range-thumb{cursor:pointer;position:relative;height:2em;width:2em;background-color:#fff;border:1px solid #ccc;border-radius:30px;box-shadow:none;margin:0;padding:0}.range::-ms-thumb{cursor:pointer;position:relative;height:2em;width:2em;background-color:#fff;border:1px solid #ccc;border-radius:30px;box-shadow:none;margin:0;padding:0;top:0}.range::-ms-fill-lower{height:2px;background-color:rgba(24,103,194,.81)}.range::-ms-tooltip{display:none}.range:disabled{opacity:.3;cursor:default;pointer-events:none}.range__left{position:relative;top:17px;height:2px;width:0;background-color:rgba(24,103,194,.81);pointer-events:none}.range--material:disabled+.range__left,[disabled]>.range__left{visibility:hidden}.exopite-sof-field-range input[type=number]{width:74px;margin-left:7px;height:32px}.button-bar{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:17px;display:table;table-layout:fixed;white-space:nowrap;margin:0;padding:0;position:relative;margin:0;border:none}.button-bar__item{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:17px;display:table-cell;width:auto;-webkit-border-radius:0;border-radius:0;position:relative;position:relative;overflow:hidden;padding:0;position:relative;overflow:hidden}.button-bar__item>input{position:absolute;overflow:hidden;right:0;top:0;left:0;bottom:0;padding:0;border:0;opacity:.001;z-index:1;vertical-align:top;outline:0;width:100%;height:100%;margin:0;-webkit-appearance:none;appearance:none}.button-bar__button{font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:17px;-webkit-border-radius:inherit;border-radius:inherit;background-color:#fff;font-weight:400;padding:1px 12px 0 12px;font-size:13px;width:100%;-webkit-transition:background-color .2s linear,color .2s linear;-moz-transition:background-color .2s linear,color .2s linear;-o-transition:background-color .2s linear,color .2s linear;transition:background-color .2s linear,color .2s linear;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;min-width:80px}.button-bar__item:first-child>.button-bar__button{-webkit-border-top-left-radius:0;border-top-left-radius:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0}.button-bar__item:last-child>.button-bar__button{-webkit-border-top-right-radius:0;border-top-right-radius:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0}.button-bar__button,.button-bar__button:active,:active+.button-bar__button{height:30px;line-height:28px}.button-bar__button:active,.button-bar__item.active>.button-bar__button,:active+.button-bar__button,:checked+.button-bar__button{background-color:#80a9d4}.button-bar__button{color:#5e93cb}.button-bar__item:first-child>.button-bar__button{border-left:1px solid #80a9d4;border-right:1px solid #80a9d4}.button-bar__item:last-child>.button-bar__button{border-right:1px solid #80a9d4}.button-bar__button,.button-bar__button:active,:active+.button-bar__button{border:0 solid #80a9d4;border-top:1px solid #80a9d4;border-bottom:1px solid #80a9d4;border-right:1px solid #80a9d4}.button-bar__button:active,:active+.button-bar__button{font-size:13px;width:100%;-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.button-bar__item.active>.button-bar__button,:checked+.button-bar__button{color:#fff;-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.button-bar__button:disabled{opacity:.3;cursor:default;pointer-events:none}.button-bar__button:hover{-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.button-bar__button:focus{outline:0}.radio-button__input{position:absolute;overflow:hidden;right:0;top:0;left:0;bottom:0;padding:0;border:0;opacity:.001;z-index:1;vertical-align:top;outline:0;width:100%;height:100%;margin:0;-webkit-appearance:none;appearance:none}.radio-button__input:active,.radio-button__input:focus{outline:0;-webkit-tap-highlight-color:transparent}.radio-button__input:checked+.radio-button__checkmark:after{opacity:1}.radio-button__input:checked+.radio-button__checkmark:before{background:0 0;border:none}.radio-button{position:relative;display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;overflow:hidden;line-height:24px;text-align:left}.radio-button__checkmark:before{content:'';position:absolute;-webkit-border-radius:100%;border-radius:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-background-clip:padding-box;background-clip:padding-box;width:24px;height:24px;background:0 0;border:none;-webkit-border-radius:16px;border-radius:16px;left:0}.radio-button__checkmark{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-background-clip:padding-box;background-clip:padding-box;position:relative;display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:17px;position:relative;overflow:hidden;position:relative;width:24px;height:24px;background:0 0;pointer-events:none}.radio-button__input:checked+.radio-button__checkmark{background:rgba(0,0,0,0)}.radio-button__checkmark:after{content:'';position:absolute;-webkit-border-radius:100%;border-radius:100%;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);-o-transform:translate(-50%,-50%);transform:translate(-50%,-50%);top:6px;left:5px;opacity:0;width:12px;height:6px;background:0 0;border:3px solid #337ab7;border-width:2px;border-top:none;border-right:none;-webkit-border-radius:0;border-radius:0;-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}.radio-button__input:disabled+.radio-button__checkmark{opacity:.3;cursor:default;pointer-events:none}.switch{position:relative;display:inline-block;vertical-align:top;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-background-clip:padding-box;background-clip:padding-box;position:relative;overflow:hidden;min-width:51px;font-size:17px;padding:0 20px;border:none;overflow:visible;width:51px;height:32px;z-index:0;text-align:left}.switch__input{position:absolute;overflow:hidden;right:0;top:0;left:0;bottom:0;padding:0;border:0;opacity:.001;z-index:1;vertical-align:top;outline:0;width:100%;height:100%;margin:0;-webkit-appearance:none;appearance:none;z-index:-1}.switch__toggle{background-color:#fff;position:absolute;top:0;left:0;right:0;bottom:0;-webkit-border-radius:30px;border-radius:30px;-webkit-transition-property:all;-moz-transition-property:all;-o-transition-property:all;transition-property:all;-webkit-transition-duration:.35s;-moz-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-timing-function:ease-out;-moz-transition-timing-function:ease-out;-o-transition-timing-function:ease-out;transition-timing-function:ease-out;-webkit-box-shadow:inset 0 0 0 2px #e5e5e5;box-shadow:inset 0 0 0 2px #e5e5e5}.switch__handle{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-background-clip:padding-box;background-clip:padding-box;position:absolute;content:'';-webkit-border-radius:28px;border-radius:28px;height:28px;width:28px;background-color:#fff;left:1px;top:2px;-webkit-transition-property:all;-moz-transition-property:all;-o-transition-property:all;transition-property:all;-webkit-transition-duration:.35s;-moz-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-timing-function:cubic-bezier(.59,.01,.5,.99);-moz-transition-timing-function:cubic-bezier(.59,.01,.5,.99);-o-transition-timing-function:cubic-bezier(.59,.01,.5,.99);transition-timing-function:cubic-bezier(.59,.01,.5,.99);-webkit-box-shadow:0 0 0 1px #e4e4e4,0 3px 2px rgba(0,0,0,.25);box-shadow:0 0 0 1px #e4e4e4,0 3px 2px rgba(0,0,0,.25)}.switch--active .switch__handle{-webkit-transition-duration:0s;-moz-transition-duration:0s;-o-transition-duration:0s;transition-duration:0s}input:checked+.switch__toggle{-webkit-box-shadow:inset 0 0 0 2px #5198db;box-shadow:inset 0 0 0 2px #5198db;background-color:#5198db}input:checked+.switch__toggle .switch__handle{left:21px;-webkit-box-shadow:0 3px 2px rgba(0,0,0,.25);box-shadow:0 3px 2px rgba(0,0,0,.25)}input:disabled+.switch__toggle{opacity:.3;cursor:default;pointer-events:none}.switch__touch{position:absolute;top:-5px;bottom:-5px;left:-10px;right:-10px}.checkbox{position:relative;display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:17px;line-height:24px;cursor:pointer}.checkbox__checkmark{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-background-clip:padding-box;background-clip:padding-box;position:relative;display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:17px;position:relative;overflow:hidden;height:24px;pointer-events:none}.checkbox__input{position:absolute;overflow:hidden;right:0;top:0;left:0;bottom:0;padding:0;border:0;opacity:.001;z-index:1;vertical-align:top;outline:0;width:100%;height:100%;margin:0;-webkit-appearance:none;appearance:none}.checkbox__input:checked{background:rgba(24,103,194,.81)}.checkbox__input:checked+.checkbox__checkmark:before{background:#80a9d4;border:1px solid #80a9d4}.checkbox__input:checked+.checkbox__checkmark:after{opacity:1}.checkbox__checkmark::before{content:'';position:absolute;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-background-clip:padding-box;background-clip:padding-box;width:24px;height:24px;background:#fff;border:1px solid #ccc;-webkit-border-radius:16px;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;left:0}.checkbox__checkmark{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-background-clip:padding-box;background-clip:padding-box;position:relative;display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:17px;position:relative;overflow:hidden;width:24px;height:24px;margin-right:10px}.checkbox__checkmark:after{content:'';position:absolute;top:6px;left:5px;width:12px;height:6px;background:0 0;border:3px solid #fff;border-width:2px;border-top:none;border-right:none;-webkit-border-radius:0;border-radius:0;-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}.checkbox__input:focus+.checkbox__checkmark:before{-webkit-box-shadow:none;box-shadow:none}.checkbox__input:disabled+.checkbox__checkmark{opacity:.3;cursor:default;pointer-events:none}.checkbox__input:disabled:active+.checkbox__checkmark:before{background:0 0;-webkit-box-shadow:none;box-shadow:none}.checkbox--noborder__input{position:absolute;overflow:hidden;right:0;top:0;left:0;bottom:0;padding:0;border:0;opacity:.001;z-index:1;vertical-align:top;outline:0;width:100%;height:100%;margin:0;-webkit-appearance:none;appearance:none}.checkbox--noborder{position:relative;display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:17px;line-height:24px;position:relative;overflow:hidden}.checkbox--noborder__checkmark{position:relative;display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-background-clip:padding-box;background-clip:padding-box;height:24px;background:0 0}.checkbox--noborder__input{position:absolute;overflow:hidden;right:0;top:0;left:0;bottom:0;padding:0;border:0;opacity:.001;z-index:1;vertical-align:top;outline:0;width:100%;height:100%;margin:0;-webkit-appearance:none;appearance:none}.checkbox--noborder__input:checked+.checkbox--noborder__checkmark:before{background:0 0;border:none}.checkbox--noborder__input:checked+.checkbox--noborder__checkmark:after{opacity:1}.checkbox--noborder__checkmark:before{content:'';position:absolute;width:24px;height:24px;background:0 0;border:none;-webkit-border-radius:16px;border-radius:16px;left:0}.checkbox--noborder__checkmark{position:relative;display:inline-block;vertical-align:top;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-background-clip:padding-box;background-clip:padding-box;width:24px;height:24px;border:none}.checkbox--noborder__checkmark:after{content:'';position:absolute;top:6px;left:5px;opacity:0;width:12px;height:6px;background:0 0;border:3px solid rgba(24,103,194,.81);border-width:2px;border-top:none;border-right:none;-webkit-border-radius:0;border-radius:0;-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}.checkbox--noborder__input:focus+.checkbox--noborder__checkmark:before{border:none;-webkit-box-shadow:none;box-shadow:none}.checkbox--noborder__input:disabled+.checkbox--noborder__checkmark{opacity:.3;cursor:default;pointer-events:none}.checkbox--noborder__input:disabled:active+.checkbox--noborder__checkmark:before{background:0 0;-webkit-box-shadow:none;box-shadow:none;border:none}.exopite-sof-content .list__item__left{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;padding:12px 14px 12px 0;-webkit-box-ordinal-group:1;-webkit-order:0;-moz-box-ordinal-group:1;-ms-flex-order:0;order:0;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;-webkit-align-self:stretch;-ms-flex-item-align:stretch;align-self:stretch;line-height:1.2em;min-height:44px}.exopite-sof-content .list__item__left:empty{width:0;min-width:0;padding:0;margin:0}.exopite-sof-content .list__item__center{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex-grow:1;-moz-box-flex:1;-ms-flex-positive:1;flex-grow:1;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-moz-box-orient:horizontal;-moz-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-ordinal-group:2;-webkit-order:1;-moz-box-ordinal-group:2;-ms-flex-order:1;order:1;margin-right:auto;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;-webkit-align-self:stretch;-ms-flex-item-align:stretch;align-self:stretch;margin-left:0;border-bottom:none;-webkit-background-size:100% 1px;background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:-webkit-linear-gradient(90deg,#ccc,#ccc 100%);background-image:-moz-linear-gradient(90deg,#ccc,#ccc 100%);background-image:-o-linear-gradient(90deg,#ccc,#ccc 100%);background-image:linear-gradient(0deg,#ccc,#ccc 100%);padding:12px 6px 12px 0;line-height:1.2em;min-height:44px;margin-right:15px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.exopite-sof-content .list__item__center{background-image:-webkit-linear-gradient(90deg,#ccc,#ccc 50%,transparent 50%);background-image:-moz-linear-gradient(90deg,#ccc,#ccc 50%,transparent 50%);background-image:-o-linear-gradient(90deg,#ccc,#ccc 50%,transparent 50%);background-image:linear-gradient(0deg,#ccc,#ccc 50%,transparent 50%)}}.exopite-sof-content .list__item__right{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;margin-left:auto;padding:12px 12px 12px 0;-webkit-box-ordinal-group:3;-webkit-order:2;-moz-box-ordinal-group:3;-ms-flex-order:2;order:2;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;-webkit-align-self:stretch;-ms-flex-item-align:stretch;align-self:stretch;border-bottom:none;-webkit-background-size:100% 1px;background-size:100% 1px;background-repeat:no-repeat;background-position:bottom;background-image:-webkit-linear-gradient(90deg,#ccc,#ccc 100%);background-image:-moz-linear-gradient(90deg,#ccc,#ccc 100%);background-image:-o-linear-gradient(90deg,#ccc,#ccc 100%);background-image:linear-gradient(0deg,#ccc,#ccc 100%);line-height:1.2em;min-height:44px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.exopite-sof-content .list__item__right{background-image:-webkit-linear-gradient(90deg,#ccc,#ccc 50%,transparent 50%);background-image:-moz-linear-gradient(90deg,#ccc,#ccc 50%,transparent 50%);background-image:-o-linear-gradient(90deg,#ccc,#ccc 50%,transparent 50%);background-image:linear-gradient(0deg,#ccc,#ccc 50%,transparent 50%)}}.exopite-sof-content .list__header{margin:0;padding:0;list-style:none;text-align:left;display:block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:20px 0 0 15px;font-size:12px;font-weight:500;color:#1f1f21;text-shadow:none;border-top:none;border-bottom:1px solid #ccc;-webkit-box-shadow:0 1px 0 0 #fff;box-shadow:0 1px 0 0 #fff;min-height:24px;line-height:24px;margin-top:-1px;text-transform:uppercase;position:relative}.exopite-sof-content .list__header:not(:first-of-type){border-top:1px solid #ccc}.exopite-sof-content .list{padding:0;margin:0;font:inherit;color:inherit;background:0 0;border:none;line-height:normal;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:-apple-system,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:17px;padding:0;margin:0;list-style-type:none;text-align:left;overflow:auto;display:block;-webkit-overflow-scrolling:touch;overflow:hidden;border:1px solid #ccc;max-width:500px;border-radius:3px}.exopite-sof-content .list__item{margin:0;padding:0;width:100%;position:relative;list-style:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-moz-box-orient:horizontal;-moz-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-webkit-justify-content:flex-start;-moz-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;padding:0 0 0 14px;margin:1px 0 -1px 0;color:#1f1f21;background-color:#fff}.exopite-sof-content .list__item:first-child{margin-top:0}.exopite-sof-content .list__item_active:active{background-color:#d9d9d9;-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.exopite-sof-content .list__item--tappable:active{background-color:#d9d9d9}.exopite-sof-field-radio .radio-button__checkmark::before{width:24px;height:24px;background:#fff;border:1px solid #ccc;cursor:pointer}.exopite-sof-field-radio .radio-button__input:checked+.radio-button__checkmark::before{border:1px solid #80a9d4}.exopite-sof-field-radio .radio-button__checkmark::after{top:5px;left:5px;opacity:0;width:14px;height:14px;background:#80a9d4;border:none;transform:none;border-radius:50%}.exopite-sof-field-radio .radio-button__checkmark{margin-right:10px}.exopite-sof-cloneable__title{border-bottom:1px solid #e5e5e5;background:#fafafa;padding:12px 30px;cursor:pointer;position:relative;margin:0}.exopite-sof-cloneable__title{border-bottom:1px solid #e5e5e5;padding:11px 30px}.exopite-sof-cloneable__item{border:1px solid #e5e5e5;margin-bottom:5px}.exopite-sof-cloneable--helper{float:right}.exopite-sof-cloneable__muster--hidden{display:none}.exopite-sof-accordion--hidden .exopite-sof-accordion__content{display:none}.exopite-sof-cloneable__item mute{font-size:89%;font-style:italic;color:#aaa}.chosen-container{max-width:100%}.exopite-sof-info--small{display:block;color:#777;font-style:italic}.exopite-sof-info--warning{color:red}.wp-core-ui .button-warning,.wp-core-ui .button-warning:active,.wp-core-ui .button-warning:focus,.wp-core-ui .button-warning:hover{background:#de0000;border-color:#c00000;box-shadow:0 1px 0 red;text-shadow:0 -1px 1px #b40000,1px 0 1px #b40000,0 1px 1px #b40000,-1px 0 1px #b40000;color:#fff}.button.loading,.button.loading:active,.button.loading:focus,.button.loading:hover{background:#aaa;border-color:#aaa;box-shadow:none;color:#666;text-shadow:none;cursor:default}.exopite-sof-fieldset input[type=text].colorpicker.wp-color-picker{display:inline-block;background:#fff;position:relative}.ui-datepicker .ui-datepicker-next span,.ui-datepicker .ui-datepicker-prev span{background-image:url(data:image/png;base64,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);background-position:-32px 0;margin-top:0;top:0;font-weight:400}.ui-icon{width:16px;height:16px;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-datepicker *{padding:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;font-family:"Open Sans",sans-serif;border-radius:0}.ui-datepicker{background:#f1f1f1;padding:0;border:1px solid #e5e5e5;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;width:17em;display:none;font-family:"Open Sans",sans-serif;-webkit-box-shadow:2px 2px 6px 0 rgba(0,0,0,.2);-moz-box-shadow:2px 2px 6px 0 rgba(0,0,0,.2);box-shadow:2px 2px 6px 0 rgba(0,0,0,.2)}.ui-datepicker .ui-datepicker-header{border:none;background:#23282d;color:#fff;font-weight:400;position:relative;padding:.2em 0;text-align:center}.ui-datepicker .ui-datepicker-title{margin-top:.4em;margin-bottom:.3em;color:#fff;font-size:14px}.ui-datepicker .ui-datepicker-next,.ui-datepicker .ui-datepicker-next-hover,.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-prev-hover{height:1em;top:.9em;border:none}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-next,.ui-datepicker .ui-datepicker-prev{position:absolute;width:1.8em}.ui-datepicker .ui-datepicker-next span,.ui-datepicker .ui-datepicker-prev span{display:block;position:absolute;left:50%;margin-left:-8px}.ui-datepicker .ui-datepicker-prev span{background-position:-96px 0}.ui-datepicker table{font-size:13px;margin:0;width:100%;border-collapse:collapse}.ui-datepicker thead{background:#23282d;color:#fff}.ui-datepicker th{padding:.3em 0;color:#fff;font-weight:400;border:none;text-align:center;border-top:1px solid #32373c;font-size:11px}.ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #d3d3d3;font-weight:400;color:#555}.ui-datepicker td{padding:0}.ui-datepicker td a,.ui-datepicker td span{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-widget-content a{color:#23282d}.ui-datepicker td .ui-state-default{background:0 0;border:none;text-align:center;padding:.5em;margin:0;font-weight:400;color:#23282d}.ui-datepicker td .ui-state-default.ui-state-highlight{background:#65badd;color:#fff}.ui-datepicker td .ui-state-active,.ui-datepicker td .ui-state-default.ui-state-highlight.ui-state-hover,.ui-datepicker td .ui-state-hover{background:#0073aa;color:#fff}.exopite-sof-accordion__title{min-height:19px}#side-sortables .exopite-sof-field .exopite-sof-title{position:relative;width:100%;float:none}#side-sortables .exopite-sof-field .exopite-sof-fieldset{margin-left:0;padding-top:5px}#side-sortables .exopite-sof-content-nav{background-color:#fff}#side-sortables .exopite-sof-nav{display:none}#side-sortables .exopite-sof-content-nav .exopite-sof-sections{width:100%}#side-sortables .exopite-sof-content-nav .exopite-sof-section-header,#side-sortables .exopite-sof-content-nav .hide{display:block}#side-sortables .exopite-sof-field{padding:7px 7px;border-bottom:none}#side-sortables .exopite-sof-sections h4{font-size:1.3em;padding:6px 0}#side-sortables .exopite-sof-sections .exopite-sof-cloneable__title{border-bottom:none;padding:7px 10px;cursor:pointer;font-size:.8rem;font-weight:400}#side-sortables .exopite-sof-sections .exopite-sof-field .exopite-sof-title{font-size:13px}#poststuff .exopite-sof-sections h2{font-size:18px;padding:8px 6px}#side-sortables .exopite-sof-section-header .dashicons-before{padding-right:14px}.exopite-sof-field .loading{z-index:0}.exopite-sof-field .loading::before{position:absolute;content:'';top:0;left:0;right:0;bottom:0;background:rgba(255,255,255,.7);z-index:1}.exopite-sof-field .loading::after{content:url(/wp-includes/images/spinner-2x.gif);position:absolute;top:calc(50% - 20px);left:calc(50% - 20px);z-index:2}.exopite-sof-field.no-padding-top{padding-top:0}.exopite-sof-field.no-padding-bottom{padding-bottom:0}.exopite-sof-section>.exopite-sof-field.no-border-bottom{border-bottom:none}.exopite-sof-group .exopite-sof-tinymce-editor .exopite-sof-fieldset{border:1px solid #e5e5e5}.exopite-sof-header .exopite-sof-search{float:none;margin-left:10px;vertical-align:bottom;padding-right:20px;border:none;text-align:left;color:#fff;background:rgba(255,255,255,.2)}.exopite-sof-search-wrapper{display:inline-block;position:relative}.exopite-sof-search-wrapper::after{content:'\f002';position:absolute;right:6px;top:4px;font-family:FontAwesome}.exopite-sof-header{padding:15px 10px;background-image:url(images/exopite-sof-title-bg.jpg);background-size:cover;box-shadow:inset 0 0 0 1000px rgba(48,64,75,.83)}.exopite-sof-font-preview{border:1px solid #e5e5e5;padding:6px 10px;background:#fbfbfb}.exopite-sof-typography-family .chosen-container{width:280px!important}.exopite-sof-typography-variant .chosen-container{width:100px!important}.exopite-sof-font-field input,.exopite-sof-font-field label{vertical-align:bottom}.exopite-sof-font-field .wp-picker-container{display:inline-block}.exopite-sof-wrapper .dashicons,.exopite-sof-wrapper .dashicons-before::before{width:16px;height:16px;font-size:16px;line-height:18px}.exopite-sof-wrapper .exopite-sof-section-header span::before{line-height:27px;height:24px}.exopite-sof-wrapper .exopite-sof-section-header .fa-before::before{padding-right:20px;vertical-align:bottom}.exopite-sof-wrapper .exopite-sof-section-header .dashicons-before::before{font-size:18px;line-height:27px;height:24px}.exopite-sof-wrapper .fa-before::before{width:16px;height:16px;display:inline-block;text-align:center;font-size:15px}.exopite-sof-cloneable--clone{margin-right:5px}.exopite-sof-nav.search .exopite-sof-nav-list-item,.exopite-sof-nav.search .exopite-sof-nav-list-parent-item>span,.exopite-sof-nav.search li{color:#555}.exopite-sof-font-field .wp-color-result-text{line-height:22px}.exopite-sof-tabs{width:100%;margin:0;max-width:100%}.exopite-sof-tab-header{margin:0;padding:0;list-style:none;display:flex}.exopite-sof-tab-header>li{background:0 0;padding:10px 15px;cursor:pointer}.exopite-sof-tab-header>li,.exopite-sof-tab-mobile-header{background:#ededed;margin-bottom:-1px;border:1px solid #e5e5e5}.exopite-sof-tab-header>li{margin-left:1px;margin-right:1px}.exopite-sof-tab-header.equal-width>li{flex-grow:1;flex-basis:0}.exopite-sof-tab-header>li:first-of-type{margin-left:0}.exopite-sof-tab-header>li:last-of-type{margin-right:0}.active>.exopite-sof-tab-mobile-header,.exopite-sof-tab-header li.active{border:1px solid #e5e5e5;border-bottom-color:#fff;background:#fff}.exopite-sof-tab-content{display:none}.exopite-sof-tab-content-body-inner{border:1px solid #e5e5e5;padding:15px}.exopite-sof-tab-mobile-header{padding:15px;display:none}.exopite-sof-tab-content.active{display:inherit}@media only screen and (max-width:500px){.exopite-sof-tab-mobile-header{display:block;cursor:pointer}.exopite-sof-tab-header{display:none}.exopite-sof-tab-content{display:block}.exopite-sof-tab-content-body{max-height:0;overflow:hidden;transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.5,1,.1,1)}.active>.exopite-sof-tab-content-body{max-height:1000px;overflow-y:auto}}.exopite-sof-wrapper .exopite-sof-field .wp-color-result{border-radius:0!important;-moz-border-radius:0!important;-webkit-border-radius:0!important;border-bottom-left-radius:0!important;border-bottom-right-radius:0!important;border-top-left-radius:0!important;border-top-right-radius:0!important;box-shadow:none!important;-webkit-box-shadow:none!important}.exopite-sof-wrapper .exopite-sof-field .button.wp-color-result{border-color:#e5e5e5!important}.exopite-sof-wrapper .exopite-sof-field .wp-picker-container .wp-color-result.button{height:31px}.exopite-sof-wrapper .exopite-sof-field .button .wp-color-result-text{height:100%;line-height:30px;border-radius:0}.exopite-sof-fieldset .color-alpha{border-radius:0!important;height:29px!important}.exopite-sof-fieldset .wp-color-result-text{border-left:1px solid #ddd}.iris-picker .iris-palette,.iris-picker .iris-slider,.iris-picker .iris-square,.iris-picker .iris-square-inner{border-radius:0}.exopite-sof-fieldset .button.button-small.wp-picker-clear,.exopite-sof-fieldset input[type=date],.exopite-sof-fieldset input[type=email],.exopite-sof-fieldset input[type=number],.exopite-sof-fieldset input[type=password],.exopite-sof-fieldset input[type=text],.exopite-sof-fieldset input[type=text].colorpicker,.exopite-sof-fieldset select,.exopite-sof-fieldset textarea{padding:5px 12px;border-radius:0;line-height:18px;box-shadow:none;background:#f4f4f4}.exopite-sof-fieldset select{padding:4px 12px 5px 12px}.exopite-sof-fieldset .button.button-small.wp-picker-clear,.exopite-sof-fieldset .chosen-container-active .chosen-single,.exopite-sof-fieldset .chosen-container-multi .chosen-choices,.exopite-sof-fieldset .chosen-container-multi .chosen-choices li.search-choice,.exopite-sof-fieldset .chosen-container-single .chosen-single,.exopite-sof-fieldset input[type=date],.exopite-sof-fieldset input[type=email],.exopite-sof-fieldset input[type=number],.exopite-sof-fieldset input[type=password],.exopite-sof-fieldset input[type=text],.exopite-sof-fieldset input[type=text].colorpicker,.exopite-sof-fieldset select,.exopite-sof-fieldset textarea{border:1px solid #e5e5e5}.exopite-sof-fieldset .button.button-small.wp-picker-clear,.exopite-sof-fieldset input[type=email],.exopite-sof-fieldset input[type=number],.exopite-sof-fieldset input[type=password],.exopite-sof-fieldset input[type=text],.exopite-sof-fieldset input[type=text].colorpicker,.exopite-sof-fieldset select,.exopite-sof-wrapper .exopite-sof-fieldset select{height:31px}.exopite-sof-fieldset input[type=email],.exopite-sof-fieldset input[type=password],.exopite-sof-fieldset input[type=text],.exopite-sof-fieldset select{max-width:375px;width:100%}.exopite-sof-field-date .exopite-sof-fieldset .datepicker,.exopite-sof-fieldset input[type=text].chosen-search-input{min-width:initial}.exopite-sof-field-date input[type=text],.exopite-sof-fieldset input[type=date]{width:160px;line-height:1em;padding-top:9px;padding-bottom:9px}.exopite-sof-fieldset input[type=number]{padding:5px 5px 5px 12px}.exopite-sof-fieldset textarea{width:100%;height:150px}.wp-editor-container textarea.wp-editor-area{border:0;background:#fff}.exopite-sof-field-number .text-muted,.exopite-sof-field-range .text-muted{padding-top:0;margin-top:5px;display:inline-block;margin-left:10px}.checkbox__checkmark::before{border-radius:0}.exopite-sof-fieldset .chosen-container-single .chosen-single{height:31px}.exopite-sof-fieldset .chosen-container-multi .chosen-choices{padding:0 3px;border-radius:0}.exopite-sof-fieldset .chosen-container-multi .chosen-choices{background-image:none}.exopite-sof-fieldset .chosen-container-multi .chosen-choices li.search-choice{background-image:none;border-radius:0;background-color:#f5f5f5;margin:3px 3px 3px 0;padding:4px 20px 4px 5px}.exopite-sof-fieldset .chosen-container-multi .chosen-choices li.search-choice .search-choice-close{top:6px}.exopite-sof-fieldset .chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 0 0 8px;border-radius:0;background:#f5f5f5;box-shadow:none;color:#444;text-decoration:none;white-space:nowrap;line-height:28px}.exopite-sof-fieldset .chosen-container-single .chosen-single div{position:absolute;top:3px}.exopite-sof-fieldset .chosen-container-active .chosen-single{box-shadow:none}.exopite-sof-field-typography .exopite-sof-btn,.exopite-sof-field-typography .exopite-sof-fieldset .chosen-container,.exopite-sof-field-typography .exopite-sof-form-field{margin-bottom:8px;margin-right:8px}.exopite-sof-fieldset .chosen-container-active.chosen-with-drop .chosen-single{border:1px solid #ddd;background-image:none;box-shadow:none}.exopite-sof-fieldset .exopite-sof-fieldset .chosen-container-single .chosen-single{background:#fff}.exopite-sof-fieldset .chosen-container-single .chosen-search input[type=text]{border:1px solid #ddd;min-width:100%}.exopite-sof-fieldset .chosen-container-single .chosen-drop{border-radius:0}.exopite-sof-fieldset .chosen-container .chosen-drop{border:1px solid #ddd;box-shadow:none}.exopite-sof-help{cursor:help;border:1px solid #ddd;height:29px;display:inline-block;vertical-align:top;line-height:27px;width:29px;background:#fff;text-align:center;display:inline-flex;align-items:center;justify-content:center}input[type=color]{height:31px;border-color:#ddd;padding:0}.exopite-sof-field .button.button-primary,.exopite-sof-field .exopite-sof-btn{margin:0;background:#80a9d4;border:1px solid #80a9d4;border-radius:0;height:31px;line-height:29px;box-shadow:none;text-shadow:none;vertical-align:baseline;padding:0 10px;color:#fff;text-decoration:none;display:inline-block;white-space:nowrap;box-sizing:border-box}.exopite-sof-field button.insert-media{box-shadow:none;border-radius:0;border-color:#ddd}.exopite-sof-content .list{border:1px solid #ddd;border-radius:0}.exopite-sof-content .list__item__center{background-image:-webkit-linear-gradient(90deg,#ddd,#ddd 100%);background-image:-moz-linear-gradient(90deg,#ddd,#ddd 100%);background-image:-o-linear-gradient(90deg,#ddd,#ddd 100%);background-image:linear-gradient(0deg,#ddd,#ddd 100%)}.exopite-sof-content .trumbowyg-button-pane{background:#f4f4f4}.exopite-sof-field-date input[type=text],.exopite-sof-fieldset input[type=date]{width:160px;line-height:1em;padding-top:7px;padding-bottom:6px}.exopite-sof-fieldset input[type=text].colorpicker{min-width:initial}.exopite-sof-form-field{display:inline-flex;height:31px;white-space:nowrap}.exopite-sof-form-field input{margin:0}.exopite-sof-form-field .input-append,.exopite-sof-form-field .input-prepend{height:29px;min-width:20px;border:1px solid #e5e5e5;text-align:center;color:#888;padding:0 5px;display:flex;align-items:center;justify-content:center}.exopite-sof-form-field .input-prepend{border-right:none}.exopite-sof-form-field .input-append{border-left:none}.exopite-sof-fieldset input.disabled,.exopite-sof-fieldset input:disabled,.exopite-sof-fieldset select.disabled,.exopite-sof-fieldset select:disabled,.exopite-sof-fieldset textarea.disabled,.exopite-sof-fieldset textarea:disabled{background:#ddd}.exopite-sof-wrapper input,.exopite-sof-wrapper select{margin:0}.exopite-sof-media input{margin-right:1px}.search+.exopite-sof-sections h2{cursor:pointer}.sortable-placeholder{background:#fffcf4;height:42px;margin-bottom:5px;border:1px dashed #e1e5e9}.exopite-sof-cloneable--helper .fa-arrows-v{padding:0 6px;cursor:move}.exopite-sof-form-field-input input[type=text]{flex:1 1 auto;width:1%}.width-150+.chosen-container{max-width:150px!important}.width-150+.chosen-container{max-width:200px!important}.container{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto;box-sizing:border-box}.row{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-15px;margin-left:-15px;box-sizing:border-box}.col,.col-xl-1,.col-xl-10,.col-xl-11,.col-xl-12,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9{position:relative;width:100%;min-height:1px;padding-right:15px;padding-left:15px;box-sizing:border-box}.col{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-xs-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}@media (min-width:992px){.col-lg{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-lg-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-lg-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-lg-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-lg-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-lg-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-lg-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-lg-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}}.col-xs-12 .exopite-sof-field{padding-left:0;padding-right:0;padding-top:0}.col-xs-12.exopite-sof-col-lg .exopite-sof-field .exopite-sof-fieldset{margin-left:0}.col-xs-12.exopite-sof-col-lg .exopite-sof-field .exopite-sof-title{position:relative;width:100%;float:none}.exopite-sof-group .exopite-sof-field:not(:last-child){padding-bottom:0}.exopite-sof-group-compact .exopite-sof-cloneable--helper,.exopite-sof-group-compact .exopite-sof-cloneable__content,.exopite-sof-group-compact .exopite-sof-cloneable__content>.exopite-sof-field,.exopite-sof-group-compact .exopite-sof-cloneable__item,.exopite-sof-group-compact .exopite-sof-cloneable__title{display:flex}.exopite-sof-group-compact .exopite-sof-cloneable__title{width:9%;min-width:55px;order:2;padding:0;align-items:center;border-bottom:none;border-left:1px solid #e5e5e5;justify-content:center}.exopite-sof-group-compact .exopite-sof-cloneable__text{display:none}.exopite-sof-group-compact .exopite-sof-cloneable--helper{align-items:center;justify-content:center}.exopite-sof-group-compact .exopite-sof-cloneable__content{flex:1;flex-direction:column}.exopite-sof-group-compact .exopite-sof-cloneable__content>.exopite-sof-field .exopite-sof-fieldset{margin-left:0}.exopite-sof-group-compact .exopite-sof-cloneable__content>.exopite-sof-field{flex-direction:column;flex:1;padding:5px 15px}.exopite-sof-fieldset .exopite-sof-group-compact input[type=email],.exopite-sof-fieldset .exopite-sof-group-compact input[type=password],.exopite-sof-fieldset .exopite-sof-group-compact input[type=text],.exopite-sof-fieldset .exopite-sof-group-compact select{max-width:100%}.exopite-sof-cloneable--helper{font-size:14px;color:#888}.exopite-sof-cloneable--helper i:hover{color:#444}.exopite-sof-wrapper input[type=text].minicolor{padding-left:40px}.exopite-sof-wrapper .minicolors-theme-default .minicolors-swatch{top:0;left:0;width:29px;height:29px}.exopite-sof-typography-color{margin-bottom:8px}.exopite-sof-gallery{list-style:none}.exopite-sof-gallery>span{position:relative;display:inline-block;margin-right:6px;margin-bottom:6px;cursor:grab}.exopite-sof-image-delete::before{content:'×'}.exopite-sof-image-delete{font-size:20px;position:absolute;top:5px;right:5px;line-height:16px;padding:0 2px 3px 2px;background:red;color:#fff;display:inline-block;box-sizing:border-box;cursor:pointer}.exopite-sof-gallery{line-height:0}.exopite-sof-gallery img{float:left}.exopite-sof-gallery-add{cursor:pointer}.exopite-sof-gallery .sortable-placeholder{width:80px;margin-bottom:6px;margin-right:6px;box-sizing:border-box;height:initial;display:inline-block}.edit-post-sidebar .exopite-sof-field-color input.minicolor{border-radius:0;height:31px;border-color:#e5e5e5;background:#f4f4f4}.edit-post-sidebar .exopite-sof-field-color .minicolors-swatch,.edit-post-sidebar .exopite-sof-field-color input.minicolor{border-color:#e5e5e5} \ No newline at end of file diff --git a/exopite-notificator/admin/exopite-simple-options/exopite-simple-options-framework-class.php b/exopite-notificator/admin/exopite-simple-options/exopite-simple-options-framework-class.php index 85c6cd5..809cdc1 100644 --- a/exopite-notificator/admin/exopite-simple-options/exopite-simple-options-framework-class.php +++ b/exopite-notificator/admin/exopite-simple-options/exopite-simple-options-framework-class.php @@ -2,12 +2,16 @@ die; } // Cannot access pages directly. /** - * Last edit: 2019-02-18 + * Last edit: 2019-04-07 * * INFOS AND TODOS: + * - fix: typography not working in group + * - fix: typography font-weight not save/restore + * - fix: if no group title, then take parents * - * - IDEAS - * - import options from file + * IDEAS + * - import options from file + * - chunk upload */ /** * ToDos: @@ -26,6 +30,7 @@ * - content * - date * - editor + * - gallery * - group/accordion item * - hidden * - image @@ -162,7 +167,7 @@ public function __construct( $config, $elements ) { return; } - $this->version = '20190218'; + $this->version = '20190407'; // TODO: Do sanitize $config['id'] $this->unique = $config['id']; @@ -191,9 +196,7 @@ public function __construct( $config, $elements ) { $this->define_shared_hooks(); - $this->define_menu_hooks(); - - $this->define_metabox_hooks(); + $this->define_hooks(); } @@ -328,34 +331,6 @@ public function is_special_multilang_active() { } - public function get_array_nested_value( array $main_array, array $keys_array, $default_value = null ) { - - $length = count( $keys_array ); - - for ( $i = 0; $i < $length; $i ++ ) { - - $is_set = ( isset( $main_array[ $keys_array[ $i ] ] ) ) ? true : false; - - if ( ! $is_set ) { - // if the array key is not set, we break out of loop and return $$default_value - break; - } else { - // Reset the $main_array to the sub array that we know exit - $main_array = $main_array[ $keys_array[ $i ] ]; - - if ( $i === $length - 1 ) { // We are at the last item of array - // $main_array is now the required value / array - return $main_array; - } - - } - - } // end for loop - - return $default_value; - - } - public function display_error() { add_action( 'admin_notices', array( $this, 'display_admin_error' ) ); } @@ -397,6 +372,20 @@ protected function define_shared_hooks() { }//define_shared_hooks() + protected function define_hooks() { + + if ( $this->is_menu() ) { + + $this->define_menu_hooks(); + + } elseif ( $this->is_metabox() ) { + + $this->define_metabox_hooks(); + + } + + } + /** * Register all of the hooks related to 'menu' functionality * @@ -404,27 +393,26 @@ protected function define_shared_hooks() { */ protected function define_menu_hooks() { - if ( $this->is_menu() ) { - /** - * Load options only if menu - * on metabox, page id is not yet available - */ - $this->db_options = apply_filters( 'exopite_sof_menu_get_options', get_option( $this->unique ), $this->unique ); + /** + * Load options only if menu + * on metabox, page id is not yet available + */ + $this->db_options = apply_filters( 'exopite_sof_menu_get_options', get_option( $this->unique ), $this->unique ); - add_action( 'admin_init', array( $this, 'register_setting' ) ); - add_action( 'admin_menu', array( $this, 'add_admin_menu' ) ); - add_action( 'wp_ajax_exopite-sof-export-options', array( $this, 'export_options' ) ); - add_action( 'wp_ajax_exopite-sof-import-options', array( $this, 'import_options' ) ); - add_action( 'wp_ajax_exopite-sof-reset-options', array( $this, 'reset_options' ) ); + add_action( 'admin_init', array( $this, 'register_setting' ) ); + add_action( 'admin_menu', array( $this, 'add_admin_menu' ) ); + add_action( 'wp_ajax_exopite-sof-export-options', array( $this, 'export_options' ) ); + add_action( 'wp_ajax_exopite-sof-import-options', array( $this, 'import_options' ) ); + add_action( 'wp_ajax_exopite-sof-reset-options', array( $this, 'reset_options' ) ); - if ( isset( $this->config['plugin_basename'] ) && ! empty( $this->config['plugin_basename'] ) ) { - add_filter( 'plugin_action_links_' . $this->config['plugin_basename'], array( - $this, - 'plugin_action_links' - ) ); - } + if ( isset( $this->config['plugin_basename'] ) && ! empty( $this->config['plugin_basename'] ) ) { + add_filter( 'plugin_action_links_' . $this->config['plugin_basename'], array( + $this, + 'plugin_action_links' + ) ); } + } /** @@ -434,17 +422,13 @@ protected function define_menu_hooks() { */ protected function define_metabox_hooks() { - if ( $this->is_metabox() ) { - - /** - * Add metabox and register custom fields - * - * @link https://code.tutsplus.com/articles/rock-solid-wordpress-30-themes-using-custom-post-types--net-12093 - */ - add_action( 'admin_init', array( $this, 'add_meta_box' ) ); - add_action( 'save_post', array( $this, 'save' ) ); - - } + /** + * Add metabox and register custom fields + * + * @link https://code.tutsplus.com/articles/rock-solid-wordpress-30-themes-using-custom-post-types--net-12093 + */ + add_action( 'admin_init', array( $this, 'add_meta_box' ) ); + add_action( 'save_post', array( $this, 'save' ) ); } @@ -575,9 +559,6 @@ public function import_options() { $option_key = sanitize_key( $_POST['unique'] ); - // Using base_64_decode - // $value = unserialize( gzuncompress( stripslashes( call_user_func( 'base' . '64' . '_decode', rtrim( strtr( $_POST['value'], '-_', '+/' ), '=' ) ) ) ) ); - //Using json_decode $value = json_decode( stripslashes( $_POST['value'] ), true ); @@ -606,10 +587,6 @@ public function export_options() { header( 'Pragma: no-cache' ); header( 'Expires: 0' ); - // Using base64_encode - // echo rtrim( strtr( call_user_func( 'base' . '64' . '_encode', addslashes( gzcompress( serialize( get_option( $option_key ) ), 9 ) ) ), '+/', '-_' ), '=' ); - // Why we are using base64_encode to hide the options? We should use the standard json to transfer/save settings between . It is suspicious always. - // Using json_encode() echo json_encode( get_option( $option_key ) ); @@ -641,6 +618,7 @@ public function load_classes() { require_once 'multilang-class.php'; require_once 'fields-class.php'; require_once 'upload-class.php'; + require_once 'sanitize-class.php'; } @@ -785,25 +763,6 @@ public function plugin_action_links( $links ) { } - /** - * Get default config for group type field - * @return array $default - */ - public function get_config_default_group_options() { - - $default = array( - // - 'repeater' => true, - 'accordion' => true, - 'button_title' => __( 'Add New', 'exopite-options-framework' ), - 'accordion_title' => __( 'Accordion Title', 'exopite-options-framework' ), - 'limit' => 50, - 'sortable' => true, - ); - - return apply_filters( 'exopite_sof_filter_config_default_group_array', $default ); - } - /** * Get default config for menu * @return array $default @@ -980,7 +939,7 @@ public function load_scripts_styles( $hook ) { // Add the date picker script wp_enqueue_script( 'jquery-ui-datepicker' ); - wp_enqueue_script( 'jquery-ui-sortable' ); + // wp_enqueue_script( 'jquery-ui-sortable' ); $scripts_styles = array( array( @@ -992,6 +951,13 @@ public function load_scripts_styles( $hook ) { 'wp-color-picker' ), ), + array( + 'name' => 'jquery.sortable', + 'fn' => 'html5sortable.min.js', + 'dep' => array( + 'jquery', + ), + ), array( 'name' => 'exopite-simple-options-framework-js', 'fn' => 'scripts.min.js', @@ -1029,8 +995,6 @@ public function load_scripts_styles( $hook ) { */ public function save( $posted_data ) { - // $this->write_log( 'posted_post', var_export( $_POST, true ) . PHP_EOL . PHP_EOL ); - // Is user has ability to save? if ( ! current_user_can( $this->config['capability'] ) ) { return null; @@ -1137,39 +1101,11 @@ public function save( $posted_data ) { } } - /** - * Loop all fields (from $config fields array ) and update values from $_POST - * - * for both menu and meta - * - * Sanitization order: - * - save - * - get_sanitized_fields_values - * - get_sanitized_field_value_from_global_post - * - sanitize - * - get_sanitized_field_value_by_type - */ - $section_fields_current_lang = array(); - - foreach ( $this->fields as $section ) { - - // Make sure we have $fields array and get sanitized Values - if ( isset( $section['fields'] ) && is_array( $section['fields'] ) ) { - - $section_fields_current_lang = array_merge( - $section_fields_current_lang, // Value we currently have in the array - $this->get_sanitized_fields_values( $section['fields'], $posted_data ) // sanitized array we are getting - ); - - } - - } - - // update $section_fields_with_values with $section_fields_current_lang + $sanitizer = new Exopite_Simple_Options_Framework_Sanitize( $this->is_multilang(), $this->lang_current, $this->config, $this->fields ); if ( $this->is_multilang() ) { - $section_fields_with_values[ $this->lang_current ] = $section_fields_current_lang; + $section_fields_with_values[ $this->lang_current ] = $sanitizer->get_sanitized_values( $this->fields, $posted_data[$this->lang_current] ); } else { - $section_fields_with_values = $section_fields_current_lang; + $section_fields_with_values = $sanitizer->get_sanitized_values( $this->fields, $posted_data ); } /** @@ -1203,7 +1139,6 @@ public function save( $posted_data ) { if ( $this->is_options_simple() ) { foreach ( $valid as $key => $value ) { -// $meta_key = $this->unique . '_' . $key; update_post_meta( $post_id, $key, $value ); @@ -1224,316 +1159,11 @@ public function save( $posted_data ) { public function write_log( $type, $log_line ) { $hash = ''; - $fn = plugin_dir_path( __FILE__ ) . '/' . $type . '-' . $hash . '.log'; + $fn = plugin_dir_path( __FILE__ ) . '/' . $type . $hash . '.log'; $log_in_file = file_put_contents( $fn, date( 'Y-m-d H:i:s' ) . ' - ' . $log_line . PHP_EOL, FILE_APPEND ); } - - public function get_sanitized_fields_values( $fields, $posted_data ) { - - $sanitized_fields_data = array(); - foreach ( $fields as $index => $field ) : - - $field_type = ( isset( $field['type'] ) ) ? $field['type'] : false; - $field_id = ( isset( $field['id'] ) ) ? $field['id'] : false; - - // if do not have $field_id or $field_type, we continue to next field - if ( ! $field_id || ! $field_type ) { - continue; - } - - // if field is not a group - if ( $field_type !== 'group' ) { - - $sanitized_fields_data[ $field['id'] ] = $this->get_sanitized_field_value_from_global_post( $field, $posted_data ); - - } // ( $field_type !== 'group' ) - - // If the field is group - if ( $field_type === 'group' ) { - - $group = $field; - - $group_id = ( isset( $field['id'] ) ) ? $field['id'] : false; - - $group_fields = isset( $field['fields'] ) && is_array( $field['fields'] ) ? $field['fields'] : false; - - // We are not processing if group_id is not there - if ( $group_id && $group_fields ): - - // Normalise the group options (so we dont need to check for isset() - $default_group_options = $this->get_config_default_group_options(); - $group_options = ( isset( $group['options'] ) ) ? $group['options'] : $default_group_options; - $group['options'] = $group_options = wp_parse_args( $group_options, $default_group_options ); - - $is_repeater = ( isset( $group['options']['repeater'] ) ) ? (bool) $group['options']['repeater'] : false; - - // If the group is NOT a repeater - if ( ! $is_repeater ) : - - foreach ( $group_fields as $sub_field ) : - - $sub_field_id = ( isset( $sub_field['id'] ) ) ? $sub_field['id'] : false; - - $sanitized_fields_data[ $group_id ][ $sub_field_id ] = $this->get_sanitized_field_value_from_global_post( $sub_field, $posted_data, $group_id ); - - endforeach; - - endif; // ( ! $is_repeater ) // If the group is NOT a repeater - - // If the group is a repeater - if ( $is_repeater ): - - $repeater_count = 0; - - if ( $this->is_multilang() ) { - // How many times $_POST has this - - $repeater_count = ( isset( $posted_data[ $this->lang_current ][ $group_id ] ) && is_array( $posted_data[ $this->lang_current ][ $group_id ] ) ) ? count( $posted_data[ $this->lang_current ][ $group_id ] ) : 0; - - } // $this->is_multilang() - - /** - * ToDos: - * - On simple options NEED to disable multilang! (if meta) - */ - if ( ! $this->is_multilang() ) { - - $repeater_count = ( isset( $posted_data[ $group_id ] ) && is_array( $posted_data[ $group_id ] ) ) ? count( $posted_data[ $group_id ] ) : 0; - - } - - for ( $i = 0; $i < $repeater_count; $i ++ ) { - - foreach ( $group_fields as $sub_field ) : - - $sub_field_id = ( isset( $sub_field['id'] ) ) ? $sub_field['id'] : false; - - // sub field id is required - if ( ! $sub_field_id ) { - continue; - } - - $sanitized_fields_data[ $group_id ][ $i ][ $sub_field_id ] = $this->get_sanitized_field_value_from_global_post( $sub_field, $posted_data, $group_id, $i ); - - endforeach; // $group_fields - } - - endif; // ( $is_repeater ) - - endif; // ( ! $group_id ) - - } // ( $field_type === 'group' ) - - endforeach; // $fields array - - return $sanitized_fields_data; - - } // get_sanitized_fields_values - - /** - * Get the clean value from single field - * - * @param array $field - * - * @return mixed $clean_value - */ - public function get_sanitized_field_value_from_global_post( $field, $posted_data = array(), $group_id = null, $group_field_index = null ) { - - if ( ! isset( $field['id'] ) || ! isset( $field['type'] ) ) { - return ''; - } else { - $field_id = $field['id']; - $field_type = $field['type']; - } - - // Initialize array - $keys_array = array(); - - // Adding elements to $keys_array - // order matters!!! - - if ( $this->is_multilang() ) { - $keys_array[] = $this->lang_current; - } - - if ( $group_id !== null ) { - $keys_array[] = $group_id; - } - - if ( $group_field_index !== null ) { - $keys_array[] = $group_field_index; - } - - $keys_array[] = $field_id; - - // Get $dirty_value from global $_POST - $dirty_value = $this->get_array_nested_value( $posted_data, $keys_array, '' ); - - $clean_value = $this->sanitize( $field, $dirty_value ); - - return $clean_value; - - } - - /** - * Validate and sanitize values - * - * @param $field - * @param $value - * - * @return mixed - */ - public function sanitize( $field, $dirty_value ) { - - $dirty_value = isset( $dirty_value ) ? $dirty_value : ''; - - // if $config array has sanitize function, then call it - if ( isset( $field['sanitize'] ) && ! empty( $field['sanitize'] ) && function_exists( $field['sanitize'] ) ) { - - // TODO: in future, we can allow for sanitize functions array as well - $sanitize_func_name = $field['sanitize']; - - $clean_value = call_user_func( $sanitize_func_name, $dirty_value ); - - } else { - - // if $config array doe not have sanitize function, do sanitize on field type basis - $clean_value = $this->get_sanitized_field_value_by_type( $field, $dirty_value ); - - } - - return apply_filters( 'exopite_sof_sanitize_value', $clean_value, $dirty_value, $field, $this->config ); - - } - - /** - * Pass the field and value to run sanitization by type of field - * - * @param array $field - * @param mixed $value - * - * $return mixed $value after sanitization - */ - public function get_sanitized_field_value_by_type( $field, $value ) { - - $field_type = ( isset( $field['type'] ) ) ? $field['type'] : ''; - - switch ( $field_type ) { - - case 'panel': - // no break - case 'notice': - /** - * This fields has nothing to send - */ - break; - case 'image_select': - // no break - case 'select': - // no break - case 'typography': - // no break - case 'tab': - // no break - case 'tap_list': - /** - * Need to check array values. - */ - // if( ! is_array( $value ) ) { - // maybe_unserialize( $value ); - // } - if ( is_array( $value ) ) { - foreach( $value as &$item ) { - $item = sanitize_text_field( $item ); - } - } - - break; - case 'editor': - // no break - case 'textarea': - /** - * HTML excepted accept