spotlight-frontend 3.5.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +13 -0
- package/README.md +114 -0
- package/app/assets/images/blacklight/arrow-alt-circle-left.svg +1 -0
- package/app/assets/images/blacklight/arrow-alt-circle-right.svg +1 -0
- package/app/assets/images/blacklight/arrow_back_ios.svg +1 -0
- package/app/assets/images/blacklight/arrow_forward_ios.svg +1 -0
- package/app/assets/images/blacklight/check.svg +1 -0
- package/app/assets/images/blacklight/check_circle.svg +1 -0
- package/app/assets/images/blacklight/chevron_right.svg +1 -0
- package/app/assets/images/blacklight/close.svg +1 -0
- package/app/assets/images/blacklight/edit.svg +1 -0
- package/app/assets/images/blacklight/error.svg +1 -0
- package/app/assets/images/blacklight/highlight_off.svg +1 -0
- package/app/assets/images/blacklight/info.svg +1 -0
- package/app/assets/images/blacklight/warning.svg +1 -0
- package/app/assets/images/blacklight/zoom_in.svg +1 -0
- package/app/assets/images/blacklight/zoom_out.svg +1 -0
- package/app/assets/images/spotlight/.keep +0 -0
- package/app/assets/images/spotlight/blocks/sir-trevor-icons.svg +320 -0
- package/app/assets/images/spotlight/default_browse_thumbnail.jpg +0 -0
- package/app/assets/images/spotlight/default_thumbnail.jpg +0 -0
- package/app/assets/images/spotlight/fallback/default.png +0 -0
- package/app/assets/javascripts/spotlight/admin/add_another.js +22 -0
- package/app/assets/javascripts/spotlight/admin/add_new_button.js +81 -0
- package/app/assets/javascripts/spotlight/admin/appearance.js +24 -0
- package/app/assets/javascripts/spotlight/admin/attachments.js +2 -0
- package/app/assets/javascripts/spotlight/admin/blacklight_configuration.js +63 -0
- package/app/assets/javascripts/spotlight/admin/block_mixins/autocompleteable.js +72 -0
- package/app/assets/javascripts/spotlight/admin/block_mixins/formable.js +78 -0
- package/app/assets/javascripts/spotlight/admin/block_mixins/plustextable.js +57 -0
- package/app/assets/javascripts/spotlight/admin/blocks/block.js +23 -0
- package/app/assets/javascripts/spotlight/admin/blocks/browse_block.js +87 -0
- package/app/assets/javascripts/spotlight/admin/blocks/browse_group_categories_block.js +88 -0
- package/app/assets/javascripts/spotlight/admin/blocks/iframe_block.js +34 -0
- package/app/assets/javascripts/spotlight/admin/blocks/link_to_search_block.js +16 -0
- package/app/assets/javascripts/spotlight/admin/blocks/oembed_block.js +40 -0
- package/app/assets/javascripts/spotlight/admin/blocks/pages_block.js +22 -0
- package/app/assets/javascripts/spotlight/admin/blocks/resources_block.js +145 -0
- package/app/assets/javascripts/spotlight/admin/blocks/rule_block.js +25 -0
- package/app/assets/javascripts/spotlight/admin/blocks/search_result_block.js +44 -0
- package/app/assets/javascripts/spotlight/admin/blocks/solr_documents_base_block.js +108 -0
- package/app/assets/javascripts/spotlight/admin/blocks/solr_documents_block.js +25 -0
- package/app/assets/javascripts/spotlight/admin/blocks/solr_documents_carousel_block.js +103 -0
- package/app/assets/javascripts/spotlight/admin/blocks/solr_documents_embed_block.js +17 -0
- package/app/assets/javascripts/spotlight/admin/blocks/solr_documents_features_block.js +41 -0
- package/app/assets/javascripts/spotlight/admin/blocks/solr_documents_grid_block.js +14 -0
- package/app/assets/javascripts/spotlight/admin/blocks/uploaded_items_block.js +145 -0
- package/app/assets/javascripts/spotlight/admin/catalog_edit.js +16 -0
- package/app/assets/javascripts/spotlight/admin/copy_email_addresses.js +9 -0
- package/app/assets/javascripts/spotlight/admin/crop.es6 +310 -0
- package/app/assets/javascripts/spotlight/admin/croppable.js +25 -0
- package/app/assets/javascripts/spotlight/admin/edit_in_place.js +54 -0
- package/app/assets/javascripts/spotlight/admin/exhibit_tag_autocomplete.js +37 -0
- package/app/assets/javascripts/spotlight/admin/exhibits.js +58 -0
- package/app/assets/javascripts/spotlight/admin/form_observer.js +86 -0
- package/app/assets/javascripts/spotlight/admin/iiif.es6 +54 -0
- package/app/assets/javascripts/spotlight/admin/index.js +16 -0
- package/app/assets/javascripts/spotlight/admin/locks.js +12 -0
- package/app/assets/javascripts/spotlight/admin/multi_image_selector.js +158 -0
- package/app/assets/javascripts/spotlight/admin/pages.js.erb +40 -0
- package/app/assets/javascripts/spotlight/admin/progress_monitor.js +148 -0
- package/app/assets/javascripts/spotlight/admin/readonly_checkbox.js +6 -0
- package/app/assets/javascripts/spotlight/admin/search_typeahead.js +108 -0
- package/app/assets/javascripts/spotlight/admin/select_related_input.js +34 -0
- package/app/assets/javascripts/spotlight/admin/sir-trevor/block_controls.js +120 -0
- package/app/assets/javascripts/spotlight/admin/sir-trevor/block_limits.js +37 -0
- package/app/assets/javascripts/spotlight/admin/sir-trevor/locales.js +120 -0
- package/app/assets/javascripts/spotlight/admin/spotlight_nestable.js +72 -0
- package/app/assets/javascripts/spotlight/admin/tabs.js +6 -0
- package/app/assets/javascripts/spotlight/admin/translation_progress.js +23 -0
- package/app/assets/javascripts/spotlight/admin/users.js +79 -0
- package/app/assets/javascripts/spotlight/application.js +14 -0
- package/app/assets/javascripts/spotlight/spotlight.js +23 -0
- package/app/assets/javascripts/spotlight/user/analytics.js +9 -0
- package/app/assets/javascripts/spotlight/user/browse_group_categories.js +59 -0
- package/app/assets/javascripts/spotlight/user/carousel.js +3 -0
- package/app/assets/javascripts/spotlight/user/clear_form_button.js +27 -0
- package/app/assets/javascripts/spotlight/user/index.js +8 -0
- package/app/assets/javascripts/spotlight/user/report_a_problem.js +39 -0
- package/app/assets/javascripts/spotlight/user/zpr_links.js.erb +45 -0
- package/app/assets/stylesheets/spotlight/_accessibility.scss +8 -0
- package/app/assets/stylesheets/spotlight/_attachments.css +4 -0
- package/app/assets/stylesheets/spotlight/_blacklight_configuration.scss +82 -0
- package/app/assets/stylesheets/spotlight/_blacklight_overrides.scss +21 -0
- package/app/assets/stylesheets/spotlight/_bootstrap_overrides.scss +105 -0
- package/app/assets/stylesheets/spotlight/_breadcrumbs.scss +6 -0
- package/app/assets/stylesheets/spotlight/_browse.scss +158 -0
- package/app/assets/stylesheets/spotlight/_catalog.scss +161 -0
- package/app/assets/stylesheets/spotlight/_collapse_toggle.scss +14 -0
- package/app/assets/stylesheets/spotlight/_croppable.scss +4 -0
- package/app/assets/stylesheets/spotlight/_curation.scss +224 -0
- package/app/assets/stylesheets/spotlight/_edit_in_place.scss +9 -0
- package/app/assets/stylesheets/spotlight/_exhibit_admin.scss +81 -0
- package/app/assets/stylesheets/spotlight/_exhibit_navbar.scss +10 -0
- package/app/assets/stylesheets/spotlight/_exhibits_index.scss +147 -0
- package/app/assets/stylesheets/spotlight/_featured_browse_categories_block.scss +269 -0
- package/app/assets/stylesheets/spotlight/_footer.scss +12 -0
- package/app/assets/stylesheets/spotlight/_header.scss +155 -0
- package/app/assets/stylesheets/spotlight/_item_text_block.scss +50 -0
- package/app/assets/stylesheets/spotlight/_mixins.scss +17 -0
- package/app/assets/stylesheets/spotlight/_modals.scss +3 -0
- package/app/assets/stylesheets/spotlight/_multi_image_selector.scss +22 -0
- package/app/assets/stylesheets/spotlight/_multi_up_item_grid.scss +63 -0
- package/app/assets/stylesheets/spotlight/_nestable.scss +124 -0
- package/app/assets/stylesheets/spotlight/_pages.scss +282 -0
- package/app/assets/stylesheets/spotlight/_report_a_problem.scss +14 -0
- package/app/assets/stylesheets/spotlight/_sir-trevor_overrides.scss +87 -0
- package/app/assets/stylesheets/spotlight/_slideshow_block.scss +87 -0
- package/app/assets/stylesheets/spotlight/_spotlight.scss +49 -0
- package/app/assets/stylesheets/spotlight/_translations.scss +86 -0
- package/app/assets/stylesheets/spotlight/_upload.scss +0 -0
- package/app/assets/stylesheets/spotlight/_uploaded_items_block.scss +7 -0
- package/app/assets/stylesheets/spotlight/_utilities.scss +7 -0
- package/app/assets/stylesheets/spotlight/_variables.scss +42 -0
- package/app/assets/stylesheets/spotlight/_variables_bootstrap.scss +7 -0
- package/app/assets/stylesheets/spotlight/_view_larger.scss +22 -0
- package/app/assets/stylesheets/spotlight/browse_group_categories_block.scss +92 -0
- package/app/assets/stylesheets/spotlight/typeahead.css +77 -0
- package/package.json +29 -0
- package/vendor/assets/images/sir-trevor-icons.svg +263 -0
- package/vendor/assets/javascripts/Leaflet.Editable.js +1917 -0
- package/vendor/assets/javascripts/MutationObserver.js +625 -0
- package/vendor/assets/javascripts/Path.Drag.js +137 -0
- package/vendor/assets/javascripts/bootstrap-tagsinput.js +530 -0
- package/vendor/assets/javascripts/eventable.js +205 -0
- package/vendor/assets/javascripts/jquery.serializejson.js +234 -0
- package/vendor/assets/javascripts/jquery.waitforimages.min.js +2 -0
- package/vendor/assets/javascripts/leaflet-iiif.js +323 -0
- package/vendor/assets/javascripts/nestable.js +645 -0
- package/vendor/assets/javascripts/parameterize.js +137 -0
- package/vendor/assets/javascripts/polyfill.min.js +4 -0
- package/vendor/assets/javascripts/sir-trevor.js +21639 -0
- package/vendor/assets/javascripts/tiny-slider.js +3218 -0
- package/vendor/assets/javascripts/typeahead.bundle.min.js +7 -0
- package/vendor/assets/stylesheets/bootstrap-tagsinput.css +46 -0
- package/vendor/assets/stylesheets/leaflet-areaselect.css +15 -0
- package/vendor/assets/stylesheets/sir-trevor/_icons.scss +6 -0
- package/vendor/assets/stylesheets/sir-trevor/_variables.scss +22 -0
- package/vendor/assets/stylesheets/sir-trevor/base.scss +17 -0
- package/vendor/assets/stylesheets/sir-trevor/block-addition-top.scss +95 -0
- package/vendor/assets/stylesheets/sir-trevor/block-addition.scss +72 -0
- package/vendor/assets/stylesheets/sir-trevor/block-controls.scss +34 -0
- package/vendor/assets/stylesheets/sir-trevor/block-positioner.scss +34 -0
- package/vendor/assets/stylesheets/sir-trevor/block-replacer.scss +43 -0
- package/vendor/assets/stylesheets/sir-trevor/block-ui.scss +120 -0
- package/vendor/assets/stylesheets/sir-trevor/block.scss +300 -0
- package/vendor/assets/stylesheets/sir-trevor/errors.scss +21 -0
- package/vendor/assets/stylesheets/sir-trevor/format-bar.scss +65 -0
- package/vendor/assets/stylesheets/sir-trevor/inputs.scss +45 -0
- package/vendor/assets/stylesheets/sir-trevor/main.scss +24 -0
- package/vendor/assets/stylesheets/sir-trevor/patterns/ui-popup.scss +38 -0
- package/vendor/assets/stylesheets/sir-trevor/utils.scss +10 -0
- package/vendor/assets/stylesheets/tiny-slider.css +1 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* typeahead.js 0.10.2
|
|
3
|
+
* https://github.com/twitter/typeahead.js
|
|
4
|
+
* Copyright 2013-2014 Twitter, Inc. and other contributors; Licensed MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
!function(a){var b={isMsie:function(){return/(msie|trident)/i.test(navigator.userAgent)?navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]:!1},isBlankString:function(a){return!a||/^\s*$/.test(a)},escapeRegExChars:function(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(a){return"string"==typeof a},isNumber:function(a){return"number"==typeof a},isArray:a.isArray,isFunction:a.isFunction,isObject:a.isPlainObject,isUndefined:function(a){return"undefined"==typeof a},bind:a.proxy,each:function(b,c){function d(a,b){return c(b,a)}a.each(b,d)},map:a.map,filter:a.grep,every:function(b,c){var d=!0;return b?(a.each(b,function(a,e){return(d=c.call(null,e,a,b))?void 0:!1}),!!d):d},some:function(b,c){var d=!1;return b?(a.each(b,function(a,e){return(d=c.call(null,e,a,b))?!1:void 0}),!!d):d},mixin:a.extend,getUniqueId:function(){var a=0;return function(){return a++}}(),templatify:function(b){function c(){return String(b)}return a.isFunction(b)?b:c},defer:function(a){setTimeout(a,0)},debounce:function(a,b,c){var d,e;return function(){var f,g,h=this,i=arguments;return f=function(){d=null,c||(e=a.apply(h,i))},g=c&&!d,clearTimeout(d),d=setTimeout(f,b),g&&(e=a.apply(h,i)),e}},throttle:function(a,b){var c,d,e,f,g,h;return g=0,h=function(){g=new Date,e=null,f=a.apply(c,d)},function(){var i=new Date,j=b-(i-g);return c=this,d=arguments,0>=j?(clearTimeout(e),e=null,g=i,f=a.apply(c,d)):e||(e=setTimeout(h,j)),f}},noop:function(){}},c="0.10.2",d=function(){function a(a){return a.split(/\s+/)}function b(a){return a.split(/\W+/)}function c(a){return function(b){return function(c){return a(c[b])}}}return{nonword:b,whitespace:a,obj:{nonword:c(b),whitespace:c(a)}}}(),e=function(){function a(a){this.maxSize=a||100,this.size=0,this.hash={},this.list=new c}function c(){this.head=this.tail=null}function d(a,b){this.key=a,this.val=b,this.prev=this.next=null}return b.mixin(a.prototype,{set:function(a,b){var c,e=this.list.tail;this.size>=this.maxSize&&(this.list.remove(e),delete this.hash[e.key]),(c=this.hash[a])?(c.val=b,this.list.moveToFront(c)):(c=new d(a,b),this.list.add(c),this.hash[a]=c,this.size++)},get:function(a){var b=this.hash[a];return b?(this.list.moveToFront(b),b.val):void 0}}),b.mixin(c.prototype,{add:function(a){this.head&&(a.next=this.head,this.head.prev=a),this.head=a,this.tail=this.tail||a},remove:function(a){a.prev?a.prev.next=a.next:this.head=a.next,a.next?a.next.prev=a.prev:this.tail=a.prev},moveToFront:function(a){this.remove(a),this.add(a)}}),a}(),f=function(){function a(a){this.prefix=["__",a,"__"].join(""),this.ttlKey="__ttl__",this.keyMatcher=new RegExp("^"+this.prefix)}function c(){return(new Date).getTime()}function d(a){return JSON.stringify(b.isUndefined(a)?null:a)}function e(a){return JSON.parse(a)}var f,g;try{f=window.localStorage,f.setItem("~~~","!"),f.removeItem("~~~")}catch(h){f=null}return g=f&&window.JSON?{_prefix:function(a){return this.prefix+a},_ttlKey:function(a){return this._prefix(a)+this.ttlKey},get:function(a){return this.isExpired(a)&&this.remove(a),e(f.getItem(this._prefix(a)))},set:function(a,e,g){return b.isNumber(g)?f.setItem(this._ttlKey(a),d(c()+g)):f.removeItem(this._ttlKey(a)),f.setItem(this._prefix(a),d(e))},remove:function(a){return f.removeItem(this._ttlKey(a)),f.removeItem(this._prefix(a)),this},clear:function(){var a,b,c=[],d=f.length;for(a=0;d>a;a++)(b=f.key(a)).match(this.keyMatcher)&&c.push(b.replace(this.keyMatcher,""));for(a=c.length;a--;)this.remove(c[a]);return this},isExpired:function(a){var d=e(f.getItem(this._ttlKey(a)));return b.isNumber(d)&&c()>d?!0:!1}}:{get:b.noop,set:b.noop,remove:b.noop,clear:b.noop,isExpired:b.noop},b.mixin(a.prototype,g),a}(),g=function(){function c(b){b=b||{},this._send=b.transport?d(b.transport):a.ajax,this._get=b.rateLimiter?b.rateLimiter(this._get):this._get}function d(c){return function(d,e){function f(a){b.defer(function(){h.resolve(a)})}function g(a){b.defer(function(){h.reject(a)})}var h=a.Deferred();return c(d,e,f,g),h}}var f=0,g={},h=6,i=new e(10);return c.setMaxPendingRequests=function(a){h=a},c.resetCache=function(){i=new e(10)},b.mixin(c.prototype,{_get:function(a,b,c){function d(b){c&&c(null,b),i.set(a,b)}function e(){c&&c(!0)}function j(){f--,delete g[a],l.onDeckRequestArgs&&(l._get.apply(l,l.onDeckRequestArgs),l.onDeckRequestArgs=null)}var k,l=this;(k=g[a])?k.done(d).fail(e):h>f?(f++,g[a]=this._send(a,b).done(d).fail(e).always(j)):this.onDeckRequestArgs=[].slice.call(arguments,0)},get:function(a,c,d){var e;return b.isFunction(c)&&(d=c,c={}),(e=i.get(a))?b.defer(function(){d&&d(null,e)}):this._get(a,c,d),!!e}}),c}(),h=function(){function c(b){b=b||{},b.datumTokenizer&&b.queryTokenizer||a.error("datumTokenizer and queryTokenizer are both required"),this.datumTokenizer=b.datumTokenizer,this.queryTokenizer=b.queryTokenizer,this.reset()}function d(a){return a=b.filter(a,function(a){return!!a}),a=b.map(a,function(a){return a.toLowerCase()})}function e(){return{ids:[],children:{}}}function f(a){for(var b={},c=[],d=0;d<a.length;d++)b[a[d]]||(b[a[d]]=!0,c.push(a[d]));return c}function g(a,b){function c(a,b){return a-b}var d=0,e=0,f=[];for(a=a.sort(c),b=b.sort(c);d<a.length&&e<b.length;)a[d]<b[e]?d++:a[d]>b[e]?e++:(f.push(a[d]),d++,e++);return f}return b.mixin(c.prototype,{bootstrap:function(a){this.datums=a.datums,this.trie=a.trie},add:function(a){var c=this;a=b.isArray(a)?a:[a],b.each(a,function(a){var f,g;f=c.datums.push(a)-1,g=d(c.datumTokenizer(a)),b.each(g,function(a){var b,d,g;for(b=c.trie,d=a.split("");g=d.shift();)b=b.children[g]||(b.children[g]=e()),b.ids.push(f)})})},get:function(a){var c,e,h=this;return c=d(this.queryTokenizer(a)),b.each(c,function(a){var b,c,d,f;if(e&&0===e.length)return!1;for(b=h.trie,c=a.split("");b&&(d=c.shift());)b=b.children[d];return b&&0===c.length?(f=b.ids.slice(0),void(e=e?g(e,f):f)):(e=[],!1)}),e?b.map(f(e),function(a){return h.datums[a]}):[]},reset:function(){this.datums=[],this.trie=e()},serialize:function(){return{datums:this.datums,trie:this.trie}}}),c}(),i=function(){function d(a){return a.local||null}function e(d){var e,f;return f={url:null,thumbprint:"",ttl:864e5,filter:null,ajax:{}},(e=d.prefetch||null)&&(e=b.isString(e)?{url:e}:e,e=b.mixin(f,e),e.thumbprint=c+e.thumbprint,e.ajax.type=e.ajax.type||"GET",e.ajax.dataType=e.ajax.dataType||"json",!e.url&&a.error("prefetch requires url to be set")),e}function f(c){function d(a){return function(c){return b.debounce(c,a)}}function e(a){return function(c){return b.throttle(c,a)}}var f,g;return g={url:null,wildcard:"%QUERY",replace:null,rateLimitBy:"debounce",rateLimitWait:300,send:null,filter:null,ajax:{}},(f=c.remote||null)&&(f=b.isString(f)?{url:f}:f,f=b.mixin(g,f),f.rateLimiter=/^throttle$/i.test(f.rateLimitBy)?e(f.rateLimitWait):d(f.rateLimitWait),f.ajax.type=f.ajax.type||"GET",f.ajax.dataType=f.ajax.dataType||"json",delete f.rateLimitBy,delete f.rateLimitWait,!f.url&&a.error("remote requires url to be set")),f}return{local:d,prefetch:e,remote:f}}();!function(c){function e(b){b&&(b.local||b.prefetch||b.remote)||a.error("one of local, prefetch, or remote is required"),this.limit=b.limit||5,this.sorter=j(b.sorter),this.dupDetector=b.dupDetector||k,this.local=i.local(b),this.prefetch=i.prefetch(b),this.remote=i.remote(b),this.cacheKey=this.prefetch?this.prefetch.cacheKey||this.prefetch.url:null,this.index=new h({datumTokenizer:b.datumTokenizer,queryTokenizer:b.queryTokenizer}),this.storage=this.cacheKey?new f(this.cacheKey):null}function j(a){function c(b){return b.sort(a)}function d(a){return a}return b.isFunction(a)?c:d}function k(){return!1}var l,m;return l=c.Bloodhound,m={data:"data",protocol:"protocol",thumbprint:"thumbprint"},c.Bloodhound=e,e.noConflict=function(){return c.Bloodhound=l,e},e.tokenizers=d,b.mixin(e.prototype,{_loadPrefetch:function(b){function c(a){f.clear(),f.add(b.filter?b.filter(a):a),f._saveToStorage(f.index.serialize(),b.thumbprint,b.ttl)}var d,e,f=this;return(d=this._readFromStorage(b.thumbprint))?(this.index.bootstrap(d),e=a.Deferred().resolve()):e=a.ajax(b.url,b.ajax).done(c),e},_getFromRemote:function(a,b){function c(a,c){b(a?[]:f.remote.filter?f.remote.filter(c):c)}var d,e,f=this;return a=a||"",e=encodeURIComponent(a),d=this.remote.replace?this.remote.replace(this.remote.url,a):this.remote.url.replace(this.remote.wildcard,e),this.transport.get(d,this.remote.ajax,c)},_saveToStorage:function(a,b,c){this.storage&&(this.storage.set(m.data,a,c),this.storage.set(m.protocol,location.protocol,c),this.storage.set(m.thumbprint,b,c))},_readFromStorage:function(a){var b,c={};return this.storage&&(c.data=this.storage.get(m.data),c.protocol=this.storage.get(m.protocol),c.thumbprint=this.storage.get(m.thumbprint)),b=c.thumbprint!==a||c.protocol!==location.protocol,c.data&&!b?c.data:null},_initialize:function(){function c(){e.add(b.isFunction(f)?f():f)}var d,e=this,f=this.local;return d=this.prefetch?this._loadPrefetch(this.prefetch):a.Deferred().resolve(),f&&d.done(c),this.transport=this.remote?new g(this.remote):null,this.initPromise=d.promise()},initialize:function(a){return!this.initPromise||a?this._initialize():this.initPromise},add:function(a){this.index.add(a)},get:function(a,c){function d(a){var d=f.slice(0);b.each(a,function(a){var c;return c=b.some(d,function(b){return e.dupDetector(a,b)}),!c&&d.push(a),d.length<e.limit}),c&&c(e.sorter(d))}var e=this,f=[],g=!1;f=this.index.get(a),f=this.sorter(f).slice(0,this.limit),f.length<this.limit&&this.transport&&(g=this._getFromRemote(a,d)),g||(f.length>0||!this.transport)&&c&&c(f)},clear:function(){this.index.reset()},clearPrefetchCache:function(){this.storage&&this.storage.clear()},clearRemoteCache:function(){this.transport&&g.resetCache()},ttAdapter:function(){return b.bind(this.get,this)}}),e}(this);var j={wrapper:'<span class="twitter-typeahead"></span>',dropdown:'<span class="tt-dropdown-menu"></span>',dataset:'<div class="tt-dataset-%CLASS%"></div>',suggestions:'<span class="tt-suggestions"></span>',suggestion:'<div class="tt-suggestion"></div>'},k={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},dropdown:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},suggestions:{display:"block"},suggestion:{whiteSpace:"nowrap",cursor:"pointer"},suggestionChild:{whiteSpace:"normal"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:" 0"}};b.isMsie()&&b.mixin(k.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),b.isMsie()&&b.isMsie()<=7&&b.mixin(k.input,{marginTop:"-1px"});var l=function(){function c(b){b&&b.el||a.error("EventBus initialized without el"),this.$el=a(b.el)}var d="typeahead:";return b.mixin(c.prototype,{trigger:function(a){var b=[].slice.call(arguments,1);this.$el.trigger(d+a,b)}}),c}(),m=function(){function a(a,b,c,d){var e;if(!c)return this;for(b=b.split(i),c=d?h(c,d):c,this._callbacks=this._callbacks||{};e=b.shift();)this._callbacks[e]=this._callbacks[e]||{sync:[],async:[]},this._callbacks[e][a].push(c);return this}function b(b,c,d){return a.call(this,"async",b,c,d)}function c(b,c,d){return a.call(this,"sync",b,c,d)}function d(a){var b;if(!this._callbacks)return this;for(a=a.split(i);b=a.shift();)delete this._callbacks[b];return this}function e(a){var b,c,d,e,g;if(!this._callbacks)return this;for(a=a.split(i),d=[].slice.call(arguments,1);(b=a.shift())&&(c=this._callbacks[b]);)e=f(c.sync,this,[b].concat(d)),g=f(c.async,this,[b].concat(d)),e()&&j(g);return this}function f(a,b,c){function d(){for(var d,e=0;!d&&e<a.length;e+=1)d=a[e].apply(b,c)===!1;return!d}return d}function g(){var a;return a=window.setImmediate?function(a){setImmediate(function(){a()})}:function(a){setTimeout(function(){a()},0)}}function h(a,b){return a.bind?a.bind(b):function(){a.apply(b,[].slice.call(arguments,0))}}var i=/\s+/,j=g();return{onSync:c,onAsync:b,off:d,trigger:e}}(),n=function(a){function c(a,c,d){for(var e,f=[],g=0;g<a.length;g++)f.push(b.escapeRegExChars(a[g]));return e=d?"\\b("+f.join("|")+")\\b":"("+f.join("|")+")",c?new RegExp(e):new RegExp(e,"i")}var d={node:null,pattern:null,tagName:"strong",className:null,wordsOnly:!1,caseSensitive:!1};return function(e){function f(b){var c,d;return(c=h.exec(b.data))&&(wrapperNode=a.createElement(e.tagName),e.className&&(wrapperNode.className=e.className),d=b.splitText(c.index),d.splitText(c[0].length),wrapperNode.appendChild(d.cloneNode(!0)),b.parentNode.replaceChild(wrapperNode,d)),!!c}function g(a,b){for(var c,d=3,e=0;e<a.childNodes.length;e++)c=a.childNodes[e],c.nodeType===d?e+=b(c)?1:0:g(c,b)}var h;e=b.mixin({},d,e),e.node&&e.pattern&&(e.pattern=b.isArray(e.pattern)?e.pattern:[e.pattern],h=c(e.pattern,e.caseSensitive,e.wordsOnly),g(e.node,f))}}(window.document),o=function(){function c(c){var e,f,h,i,j=this;c=c||{},c.input||a.error("input is missing"),e=b.bind(this._onBlur,this),f=b.bind(this._onFocus,this),h=b.bind(this._onKeydown,this),i=b.bind(this._onInput,this),this.$hint=a(c.hint),this.$input=a(c.input).on("blur.tt",e).on("focus.tt",f).on("keydown.tt",h),0===this.$hint.length&&(this.setHint=this.getHint=this.clearHint=this.clearHintIfInvalid=b.noop),b.isMsie()?this.$input.on("keydown.tt keypress.tt cut.tt paste.tt",function(a){g[a.which||a.keyCode]||b.defer(b.bind(j._onInput,j,a))}):this.$input.on("input.tt",i),this.query=this.$input.val(),this.$overflowHelper=d(this.$input)}function d(b){return a('<pre aria-hidden="true"></pre>').css({position:"absolute",visibility:"hidden",whiteSpace:"pre",fontFamily:b.css("font-family"),fontSize:b.css("font-size"),fontStyle:b.css("font-style"),fontVariant:b.css("font-variant"),fontWeight:b.css("font-weight"),wordSpacing:b.css("word-spacing"),letterSpacing:b.css("letter-spacing"),textIndent:b.css("text-indent"),textRendering:b.css("text-rendering"),textTransform:b.css("text-transform")}).insertAfter(b)}function e(a,b){return c.normalizeQuery(a)===c.normalizeQuery(b)}function f(a){return a.altKey||a.ctrlKey||a.metaKey||a.shiftKey}var g;return g={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"},c.normalizeQuery=function(a){return(a||"").replace(/^\s*/g,"").replace(/\s{2,}/g," ")},b.mixin(c.prototype,m,{_onBlur:function(){this.resetInputValue(),this.trigger("blurred")},_onFocus:function(){this.trigger("focused")},_onKeydown:function(a){var b=g[a.which||a.keyCode];this._managePreventDefault(b,a),b&&this._shouldTrigger(b,a)&&this.trigger(b+"Keyed",a)},_onInput:function(){this._checkInputValue()},_managePreventDefault:function(a,b){var c,d,e;switch(a){case"tab":d=this.getHint(),e=this.getInputValue(),c=d&&d!==e&&!f(b);break;case"up":case"down":c=!f(b);break;default:c=!1}c&&b.preventDefault()},_shouldTrigger:function(a,b){var c;switch(a){case"tab":c=!f(b);break;default:c=!0}return c},_checkInputValue:function(){var a,b,c;a=this.getInputValue(),b=e(a,this.query),c=b?this.query.length!==a.length:!1,b?c&&this.trigger("whitespaceChanged",this.query):this.trigger("queryChanged",this.query=a)},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getQuery:function(){return this.query},setQuery:function(a){this.query=a},getInputValue:function(){return this.$input.val()},setInputValue:function(a,b){this.$input.val(a),b?this.clearHint():this._checkInputValue()},resetInputValue:function(){this.setInputValue(this.query,!0)},getHint:function(){return this.$hint.val()},setHint:function(a){this.$hint.val(a)},clearHint:function(){this.setHint("")},clearHintIfInvalid:function(){var a,b,c,d;a=this.getInputValue(),b=this.getHint(),c=a!==b&&0===b.indexOf(a),d=""!==a&&c&&!this.hasOverflow(),!d&&this.clearHint()},getLanguageDirection:function(){return(this.$input.css("direction")||"ltr").toLowerCase()},hasOverflow:function(){var a=this.$input.width()-2;return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>=a},isCursorAtEnd:function(){var a,c,d;return a=this.$input.val().length,c=this.$input[0].selectionStart,b.isNumber(c)?c===a:document.selection?(d=document.selection.createRange(),d.moveStart("character",-a),a===d.text.length):!0},destroy:function(){this.$hint.off(".tt"),this.$input.off(".tt"),this.$hint=this.$input=this.$overflowHelper=null}}),c}(),p=function(){function c(c){c=c||{},c.templates=c.templates||{},c.source||a.error("missing source"),c.name&&!f(c.name)&&a.error("invalid dataset name: "+c.name),this.query=null,this.highlight=!!c.highlight,this.name=c.name||b.getUniqueId(),this.source=c.source,this.displayFn=d(c.display||c.displayKey),this.templates=e(c.templates,this.displayFn),this.$el=a(j.dataset.replace("%CLASS%",this.name))}function d(a){function c(b){return b[a]}return a=a||"value",b.isFunction(a)?a:c}function e(a,c){function d(a){return"<p>"+c(a)+"</p>"}return{empty:a.empty&&b.templatify(a.empty),header:a.header&&b.templatify(a.header),footer:a.footer&&b.templatify(a.footer),suggestion:a.suggestion||d}}function f(a){return/^[_a-zA-Z0-9-]+$/.test(a)}var g="ttDataset",h="ttValue",i="ttDatum";return c.extractDatasetName=function(b){return a(b).data(g)},c.extractValue=function(b){return a(b).data(h)},c.extractDatum=function(b){return a(b).data(i)},b.mixin(c.prototype,m,{_render:function(c,d){function e(){return p.templates.empty({query:c,isEmpty:!0})}function f(){function e(b){var c;return c=a(j.suggestion).append(p.templates.suggestion(b)).data(g,p.name).data(h,p.displayFn(b)).data(i,b),c.children().each(function(){a(this).css(k.suggestionChild)}),c}var f,l;return f=a(j.suggestions).css(k.suggestions),l=b.map(d,e),f.append.apply(f,l),p.highlight&&n({node:f[0],pattern:c}),f}function l(){return p.templates.header({query:c,isEmpty:!o})}function m(){return p.templates.footer({query:c,isEmpty:!o})}if(this.$el){var o,p=this;this.$el.empty(),o=d&&d.length,!o&&this.templates.empty?this.$el.html(e()).prepend(p.templates.header?l():null).append(p.templates.footer?m():null):o&&this.$el.html(f()).prepend(p.templates.header?l():null).append(p.templates.footer?m():null),this.trigger("rendered")}},getRoot:function(){return this.$el},update:function(a){function b(b){c.canceled||a!==c.query||c._render(a,b)}var c=this;this.query=a,this.canceled=!1,this.source(a,b)},cancel:function(){this.canceled=!0},clear:function(){this.cancel(),this.$el.empty(),this.trigger("rendered")},isEmpty:function(){return this.$el.is(":empty")},destroy:function(){this.$el=null}}),c}(),q=function(){function c(c){var e,f,g,h=this;c=c||{},c.menu||a.error("menu is required"),this.isOpen=!1,this.isEmpty=!0,this.datasets=b.map(c.datasets,d),e=b.bind(this._onSuggestionClick,this),f=b.bind(this._onSuggestionMouseEnter,this),g=b.bind(this._onSuggestionMouseLeave,this),this.$menu=a(c.menu).on("click.tt",".tt-suggestion",e).on("mouseenter.tt",".tt-suggestion",f).on("mouseleave.tt",".tt-suggestion",g),b.each(this.datasets,function(a){h.$menu.append(a.getRoot()),a.onSync("rendered",h._onRendered,h)})}function d(a){return new p(a)}return b.mixin(c.prototype,m,{_onSuggestionClick:function(b){this.trigger("suggestionClicked",a(b.currentTarget))},_onSuggestionMouseEnter:function(b){this._removeCursor(),this._setCursor(a(b.currentTarget),!0)},_onSuggestionMouseLeave:function(){this._removeCursor()},_onRendered:function(){function a(a){return a.isEmpty()}this.isEmpty=b.every(this.datasets,a),this.isEmpty?this._hide():this.isOpen&&this._show(),this.trigger("datasetRendered")},_hide:function(){this.$menu.hide()},_show:function(){this.$menu.css("display","block")},_getSuggestions:function(){return this.$menu.find(".tt-suggestion")},_getCursor:function(){return this.$menu.find(".tt-cursor").first()},_setCursor:function(a,b){a.first().addClass("tt-cursor"),!b&&this.trigger("cursorMoved")},_removeCursor:function(){this._getCursor().removeClass("tt-cursor")},_moveCursor:function(a){var b,c,d,e;if(this.isOpen){if(c=this._getCursor(),b=this._getSuggestions(),this._removeCursor(),d=b.index(c)+a,d=(d+1)%(b.length+1)-1,-1===d)return void this.trigger("cursorRemoved");-1>d&&(d=b.length-1),this._setCursor(e=b.eq(d)),this._ensureVisible(e)}},_ensureVisible:function(a){var b,c,d,e;b=a.position().top,c=b+a.outerHeight(!0),d=this.$menu.scrollTop(),e=this.$menu.height()+parseInt(this.$menu.css("paddingTop"),10)+parseInt(this.$menu.css("paddingBottom"),10),0>b?this.$menu.scrollTop(d+b):c>e&&this.$menu.scrollTop(d+(c-e))},close:function(){this.isOpen&&(this.isOpen=!1,this._removeCursor(),this._hide(),this.trigger("closed"))},open:function(){this.isOpen||(this.isOpen=!0,!this.isEmpty&&this._show(),this.trigger("opened"))},setLanguageDirection:function(a){this.$menu.css("ltr"===a?k.ltr:k.rtl)},moveCursorUp:function(){this._moveCursor(-1)},moveCursorDown:function(){this._moveCursor(1)},getDatumForSuggestion:function(a){var b=null;return a.length&&(b={raw:p.extractDatum(a),value:p.extractValue(a),datasetName:p.extractDatasetName(a)}),b},getDatumForCursor:function(){return this.getDatumForSuggestion(this._getCursor().first())},getDatumForTopSuggestion:function(){return this.getDatumForSuggestion(this._getSuggestions().first())},update:function(a){function c(b){b.update(a)}b.each(this.datasets,c)},empty:function(){function a(a){a.clear()}b.each(this.datasets,a),this.isEmpty=!0},isVisible:function(){return this.isOpen&&!this.isEmpty},destroy:function(){function a(a){a.destroy()}this.$menu.off(".tt"),this.$menu=null,b.each(this.datasets,a)}}),c}(),r=function(){function c(c){var e,f,g;c=c||{},c.input||a.error("missing input"),this.isActivated=!1,this.autoselect=!!c.autoselect,this.minLength=b.isNumber(c.minLength)?c.minLength:1,this.$node=d(c.input,c.withHint),e=this.$node.find(".tt-dropdown-menu"),f=this.$node.find(".tt-input"),g=this.$node.find(".tt-hint"),f.on("blur.tt",function(a){var c,d,g;c=document.activeElement,d=e.is(c),g=e.has(c).length>0,b.isMsie()&&(d||g)&&(a.preventDefault(),a.stopImmediatePropagation(),b.defer(function(){f.focus()}))}),e.on("mousedown.tt",function(a){a.preventDefault()}),this.eventBus=c.eventBus||new l({el:f}),this.dropdown=new q({menu:e,datasets:c.datasets}).onSync("suggestionClicked",this._onSuggestionClicked,this).onSync("cursorMoved",this._onCursorMoved,this).onSync("cursorRemoved",this._onCursorRemoved,this).onSync("opened",this._onOpened,this).onSync("closed",this._onClosed,this).onAsync("datasetRendered",this._onDatasetRendered,this),this.input=new o({input:f,hint:g}).onSync("focused",this._onFocused,this).onSync("blurred",this._onBlurred,this).onSync("enterKeyed",this._onEnterKeyed,this).onSync("tabKeyed",this._onTabKeyed,this).onSync("escKeyed",this._onEscKeyed,this).onSync("upKeyed",this._onUpKeyed,this).onSync("downKeyed",this._onDownKeyed,this).onSync("leftKeyed",this._onLeftKeyed,this).onSync("rightKeyed",this._onRightKeyed,this).onSync("queryChanged",this._onQueryChanged,this).onSync("whitespaceChanged",this._onWhitespaceChanged,this),this._setLanguageDirection()}function d(b,c){var d,f,h,i;d=a(b),f=a(j.wrapper).css(k.wrapper),h=a(j.dropdown).css(k.dropdown),i=d.clone().css(k.hint).css(e(d)),i.val("").removeData().addClass("tt-hint").removeAttr("id name placeholder").prop("disabled",!0).attr({autocomplete:"off",spellcheck:"false"}),d.data(g,{dir:d.attr("dir"),autocomplete:d.attr("autocomplete"),spellcheck:d.attr("spellcheck"),style:d.attr("style")}),d.addClass("tt-input").attr({autocomplete:"off",spellcheck:!1}).css(c?k.input:k.inputWithNoHint);try{!d.attr("dir")&&d.attr("dir","auto")}catch(l){}return d.wrap(f).parent().prepend(c?i:null).append(h)}function e(a){return{backgroundAttachment:a.css("background-attachment"),backgroundClip:a.css("background-clip"),backgroundColor:a.css("background-color"),backgroundImage:a.css("background-image"),backgroundOrigin:a.css("background-origin"),backgroundPosition:a.css("background-position"),backgroundRepeat:a.css("background-repeat"),backgroundSize:a.css("background-size")}}function f(a){var c=a.find(".tt-input");b.each(c.data(g),function(a,d){b.isUndefined(a)?c.removeAttr(d):c.attr(d,a)}),c.detach().removeData(g).removeClass("tt-input").insertAfter(a),a.remove()}var g="ttAttrs";return b.mixin(c.prototype,{_onSuggestionClicked:function(a,b){var c;(c=this.dropdown.getDatumForSuggestion(b))&&this._select(c)},_onCursorMoved:function(){var a=this.dropdown.getDatumForCursor();this.input.setInputValue(a.value,!0),this.eventBus.trigger("cursorchanged",a.raw,a.datasetName)},_onCursorRemoved:function(){this.input.resetInputValue(),this._updateHint()},_onDatasetRendered:function(){this._updateHint()},_onOpened:function(){this._updateHint(),this.eventBus.trigger("opened")},_onClosed:function(){this.input.clearHint(),this.eventBus.trigger("closed")},_onFocused:function(){this.isActivated=!0,this.dropdown.open()},_onBlurred:function(){this.isActivated=!1,this.dropdown.empty(),this.dropdown.close()},_onEnterKeyed:function(a,b){var c,d;c=this.dropdown.getDatumForCursor(),d=this.dropdown.getDatumForTopSuggestion(),c?(this._select(c),b.preventDefault()):this.autoselect&&d&&(this._select(d),b.preventDefault())},_onTabKeyed:function(a,b){var c;(c=this.dropdown.getDatumForCursor())?(this._select(c),b.preventDefault()):this._autocomplete(!0)},_onEscKeyed:function(){this.dropdown.close(),this.input.resetInputValue()},_onUpKeyed:function(){var a=this.input.getQuery();this.dropdown.isEmpty&&a.length>=this.minLength?this.dropdown.update(a):this.dropdown.moveCursorUp(),this.dropdown.open()},_onDownKeyed:function(){var a=this.input.getQuery();this.dropdown.isEmpty&&a.length>=this.minLength?this.dropdown.update(a):this.dropdown.moveCursorDown(),this.dropdown.open()},_onLeftKeyed:function(){"rtl"===this.dir&&this._autocomplete()},_onRightKeyed:function(){"ltr"===this.dir&&this._autocomplete()},_onQueryChanged:function(a,b){this.input.clearHintIfInvalid(),b.length>=this.minLength?this.dropdown.update(b):this.dropdown.empty(),this.dropdown.open(),this._setLanguageDirection()},_onWhitespaceChanged:function(){this._updateHint(),this.dropdown.open()},_setLanguageDirection:function(){var a;this.dir!==(a=this.input.getLanguageDirection())&&(this.dir=a,this.$node.css("direction",a),this.dropdown.setLanguageDirection(a))},_updateHint:function(){var a,c,d,e,f,g;a=this.dropdown.getDatumForTopSuggestion(),a&&this.dropdown.isVisible()&&!this.input.hasOverflow()?(c=this.input.getInputValue(),d=o.normalizeQuery(c),e=b.escapeRegExChars(d),f=new RegExp("^(?:"+e+")(.+$)","i"),g=f.exec(a.value),g?this.input.setHint(c+g[1]):this.input.clearHint()):this.input.clearHint()},_autocomplete:function(a){var b,c,d,e;b=this.input.getHint(),c=this.input.getQuery(),d=a||this.input.isCursorAtEnd(),b&&c!==b&&d&&(e=this.dropdown.getDatumForTopSuggestion(),e&&this.input.setInputValue(e.value),this.eventBus.trigger("autocompleted",e.raw,e.datasetName))},_select:function(a){this.input.setQuery(a.value),this.input.setInputValue(a.value,!0),this._setLanguageDirection(),this.eventBus.trigger("selected",a.raw,a.datasetName),this.dropdown.close(),b.defer(b.bind(this.dropdown.empty,this.dropdown))},open:function(){this.dropdown.open()},close:function(){this.dropdown.close()},setVal:function(a){this.isActivated?this.input.setInputValue(a):(this.input.setQuery(a),this.input.setInputValue(a,!0)),this._setLanguageDirection()},getVal:function(){return this.input.getQuery()},destroy:function(){this.input.destroy(),this.dropdown.destroy(),f(this.$node),this.$node=null}}),c}();!function(){var c,d,e;c=a.fn.typeahead,d="ttTypeahead",e={initialize:function(c,e){function f(){var f,g,h=a(this);b.each(e,function(a){a.highlight=!!c.highlight}),g=new r({input:h,eventBus:f=new l({el:h}),withHint:b.isUndefined(c.hint)?!0:!!c.hint,minLength:c.minLength,autoselect:c.autoselect,datasets:e}),h.data(d,g)}return e=b.isArray(e)?e:[].slice.call(arguments,1),c=c||{},this.each(f)},open:function(){function b(){var b,c=a(this);(b=c.data(d))&&b.open()}return this.each(b)},close:function(){function b(){var b,c=a(this);(b=c.data(d))&&b.close()}return this.each(b)},val:function(b){function c(){var c,e=a(this);(c=e.data(d))&&c.setVal(b)}function e(a){var b,c;return(b=a.data(d))&&(c=b.getVal()),c}return arguments.length?this.each(c):e(this.first())},destroy:function(){function b(){var b,c=a(this);(b=c.data(d))&&(b.destroy(),c.removeData(d))}return this.each(b)}},a.fn.typeahead=function(a){return e[a]?e[a].apply(this,[].slice.call(arguments,1)):e.initialize.apply(this,arguments)},a.fn.typeahead.noConflict=function(){return a.fn.typeahead=c,this}}()}(window.jQuery);
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
.bootstrap-tagsinput {
|
|
2
|
+
background-color: #fff;
|
|
3
|
+
border: 1px solid #ccc;
|
|
4
|
+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
|
5
|
+
display: inline-block;
|
|
6
|
+
padding: 4px 6px;
|
|
7
|
+
margin-bottom: 10px;
|
|
8
|
+
color: #555;
|
|
9
|
+
vertical-align: middle;
|
|
10
|
+
border-radius: 4px;
|
|
11
|
+
max-width: 100%;
|
|
12
|
+
line-height: 22px;
|
|
13
|
+
}
|
|
14
|
+
.bootstrap-tagsinput input {
|
|
15
|
+
border: none;
|
|
16
|
+
box-shadow: none;
|
|
17
|
+
outline: none;
|
|
18
|
+
background-color: transparent;
|
|
19
|
+
padding: 0;
|
|
20
|
+
margin: 0;
|
|
21
|
+
width: auto !important;
|
|
22
|
+
max-width: inherit;
|
|
23
|
+
}
|
|
24
|
+
.bootstrap-tagsinput input:focus {
|
|
25
|
+
border: none;
|
|
26
|
+
box-shadow: none;
|
|
27
|
+
}
|
|
28
|
+
.bootstrap-tagsinput .tag {
|
|
29
|
+
margin-right: 2px;
|
|
30
|
+
color: white;
|
|
31
|
+
}
|
|
32
|
+
.bootstrap-tagsinput .tag [data-role="remove"] {
|
|
33
|
+
margin-left: 8px;
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
}
|
|
36
|
+
.bootstrap-tagsinput .tag [data-role="remove"]:after {
|
|
37
|
+
content: "x";
|
|
38
|
+
padding: 0px 2px;
|
|
39
|
+
}
|
|
40
|
+
.bootstrap-tagsinput .tag [data-role="remove"]:hover {
|
|
41
|
+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
|
42
|
+
}
|
|
43
|
+
.bootstrap-tagsinput .tag [data-role="remove"]:hover:active {
|
|
44
|
+
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
|
45
|
+
}
|
|
46
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
.leaflet-areaselect-shade {
|
|
2
|
+
position: absolute;
|
|
3
|
+
background: rgba(0,0,0, 0.4);
|
|
4
|
+
}
|
|
5
|
+
.leaflet-areaselect-handle {
|
|
6
|
+
position: absolute;
|
|
7
|
+
background: #fff;
|
|
8
|
+
border: 1px solid #666;
|
|
9
|
+
-moz-box-shadow: 1px 1px rgba(0,0,0, 0.2);
|
|
10
|
+
-webkit-box-shadow: 1px 1px rgba(0,0,0, 0.2);
|
|
11
|
+
box-shadow: 1px 1px rgba(0,0,0, 0.2);
|
|
12
|
+
width: 14px;
|
|
13
|
+
height: 14px;
|
|
14
|
+
cursor: move;
|
|
15
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Adjusted from upstream to use bootstrap's colors.
|
|
2
|
+
|
|
3
|
+
$text-block-font-size: 1.275em;
|
|
4
|
+
$text-color: $body-color;
|
|
5
|
+
$text-block-font-color: $text-color;
|
|
6
|
+
$accent-color: theme-color("primary");
|
|
7
|
+
$base-ui-color: theme-color("secondary");
|
|
8
|
+
$light-ui-color: $gray-400;
|
|
9
|
+
$blocks-control-bg-color: $card-cap-bg;
|
|
10
|
+
$blocks-control-border-color: $card-border-color;
|
|
11
|
+
$error-color: theme-color("danger");
|
|
12
|
+
$selection-color: #B4D5FE;
|
|
13
|
+
|
|
14
|
+
$inner-block-padding: $grid-gutter-width $grid-gutter-width $grid-gutter-width + 18px $grid-gutter-width;
|
|
15
|
+
|
|
16
|
+
$block-controls-height: 164px;
|
|
17
|
+
$block-add-height: $line-height-lg * 2;
|
|
18
|
+
$block-controls-color:#9B9B9B;
|
|
19
|
+
|
|
20
|
+
$border-size: 2px;
|
|
21
|
+
$border-style: solid;
|
|
22
|
+
$default-border: $border-size $border-style $accent-color;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.st-outer {
|
|
2
|
+
font-size: 16px;
|
|
3
|
+
position: relative;
|
|
4
|
+
background:#fff;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.st-icon {
|
|
8
|
+
cursor:pointer;
|
|
9
|
+
width: 100%;
|
|
10
|
+
height: 100%;
|
|
11
|
+
fill: currentColor;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.st-spinner {
|
|
15
|
+
position: absolute!important;
|
|
16
|
+
left: 50%; top: 50%;
|
|
17
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
.st-block-addition-top {
|
|
2
|
+
transition: all $animation-speed 0.2s ease-in-out;
|
|
3
|
+
text-align: left;
|
|
4
|
+
outline:none;
|
|
5
|
+
border:none;
|
|
6
|
+
width:100%;
|
|
7
|
+
background-color:transparent;
|
|
8
|
+
padding:0;
|
|
9
|
+
z-index: 2;
|
|
10
|
+
position: relative;
|
|
11
|
+
cursor: text;
|
|
12
|
+
display: none;
|
|
13
|
+
|
|
14
|
+
&::-moz-focus-inner {
|
|
15
|
+
padding:0;
|
|
16
|
+
margin:0;
|
|
17
|
+
margin-left:-1px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
position: absolute;
|
|
21
|
+
top: -2em;
|
|
22
|
+
height: 30px;
|
|
23
|
+
opacity: 0;
|
|
24
|
+
display: block;
|
|
25
|
+
|
|
26
|
+
&:before {
|
|
27
|
+
transition: all $animation-speed 0.1s ease-in-out;
|
|
28
|
+
background: $accent-color;
|
|
29
|
+
position: absolute;
|
|
30
|
+
height: 2px;
|
|
31
|
+
top: 50%;
|
|
32
|
+
left: 110px;
|
|
33
|
+
right: 110px;
|
|
34
|
+
content: "";
|
|
35
|
+
display: block;
|
|
36
|
+
transform: translateY(-50%) translateZ(0);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.st-block--empty & {
|
|
40
|
+
display: none !important;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&:hover {
|
|
44
|
+
opacity: 1;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.st-block--textable &,
|
|
48
|
+
.st-block[data-type="list"] & {
|
|
49
|
+
top: -1.5em;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.st-block:nth-child(3) & {
|
|
53
|
+
display: none;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.st-block--empty + .st-block & {
|
|
57
|
+
display: none;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.st-block-addition-top__icon {
|
|
62
|
+
transition: all $animation-speed 0.1s ease-in-out;
|
|
63
|
+
border: 1px solid transparent;
|
|
64
|
+
color: #444444;
|
|
65
|
+
position:absolute;
|
|
66
|
+
top: 50%;
|
|
67
|
+
box-sizing:border-box;
|
|
68
|
+
padding-left: 35px;
|
|
69
|
+
display: inline-block;
|
|
70
|
+
margin: 0 auto;
|
|
71
|
+
cursor: pointer;
|
|
72
|
+
opacity: 0.2;
|
|
73
|
+
transform: translateY(-50%) translateZ(0);
|
|
74
|
+
|
|
75
|
+
.st-icon {
|
|
76
|
+
width: 41px;
|
|
77
|
+
height: 41px;
|
|
78
|
+
color: inherit;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.st-block-addition-top:hover &,
|
|
82
|
+
.st-block--active & {
|
|
83
|
+
color: $accent-color;
|
|
84
|
+
opacity: 1;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.st-block-addition-top__button {
|
|
89
|
+
position: absolute;
|
|
90
|
+
top: 0;
|
|
91
|
+
left: 76px;
|
|
92
|
+
right: 0;
|
|
93
|
+
bottom: 0;
|
|
94
|
+
display: inline-block;
|
|
95
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
|
|
2
|
+
$animation-speed: 0.2s;
|
|
3
|
+
|
|
4
|
+
.st-top-controls {
|
|
5
|
+
min-height: 1.750em;
|
|
6
|
+
position: relative;
|
|
7
|
+
z-index: 2;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.st-block-addition {
|
|
11
|
+
text-align: center;
|
|
12
|
+
outline:none;
|
|
13
|
+
border:none;
|
|
14
|
+
display:none;
|
|
15
|
+
width:100%;
|
|
16
|
+
background-color:transparent;
|
|
17
|
+
padding:0;
|
|
18
|
+
z-index: 2;
|
|
19
|
+
|
|
20
|
+
&::-moz-focus-inner {
|
|
21
|
+
padding:0;
|
|
22
|
+
margin:0;
|
|
23
|
+
margin-left:-1px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.st-top-controls &,
|
|
27
|
+
.st-block:last-child:not(.st-block--empty):not(.st-block--textable) & {
|
|
28
|
+
display: block;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.st--hide-top-controls {
|
|
33
|
+
.st-top-controls .st-block-addition {
|
|
34
|
+
display: none;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.st--block-limit-reached {
|
|
39
|
+
.st-top-controls,
|
|
40
|
+
.st-block-addition {
|
|
41
|
+
display: none;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.st-block-addition__button {
|
|
46
|
+
transition: all $animation-speed 0.3s ease-in-out;
|
|
47
|
+
border: 1px solid transparent;
|
|
48
|
+
color: #444444;
|
|
49
|
+
position:relative;
|
|
50
|
+
box-sizing:border-box;
|
|
51
|
+
padding:.2em;
|
|
52
|
+
display: inline-block;
|
|
53
|
+
margin: 0 auto;
|
|
54
|
+
width: 100%;
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
opacity: 0.2;
|
|
57
|
+
cursor: pointer;
|
|
58
|
+
|
|
59
|
+
transform:translateZ(0);
|
|
60
|
+
|
|
61
|
+
.st-icon {
|
|
62
|
+
height: 20px;
|
|
63
|
+
width: 20px;
|
|
64
|
+
color: inherit;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.st-block-addition:hover &,
|
|
68
|
+
.st-block--active & {
|
|
69
|
+
color: $accent-color;
|
|
70
|
+
opacity: 1;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Block Controls
|
|
2
|
+
|
|
3
|
+
.st-block-controls {
|
|
4
|
+
position: absolute;
|
|
5
|
+
left: 0;
|
|
6
|
+
top: 50%;
|
|
7
|
+
right: 0;
|
|
8
|
+
font-size:0.8em;
|
|
9
|
+
padding: 0px 110px;
|
|
10
|
+
transform: translateY(-50%);
|
|
11
|
+
z-index: 1;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.st-block-controls__buttons {
|
|
15
|
+
text-align: center;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.st-block-controls__button {
|
|
19
|
+
border:none;
|
|
20
|
+
background:transparent;
|
|
21
|
+
font-size: 12px;
|
|
22
|
+
text-transform: uppercase;
|
|
23
|
+
display: inline-block;
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
margin: 0.5em;
|
|
26
|
+
text-transform: uppercase;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.st-block-controls__button .st-icon {
|
|
30
|
+
margin: 0 0 10px 0;
|
|
31
|
+
display: block;
|
|
32
|
+
width: 42px;
|
|
33
|
+
height: 42px;
|
|
34
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
.st-block-positioner {
|
|
2
|
+
@include ui-popup;
|
|
3
|
+
right: 4em;
|
|
4
|
+
top: 0;
|
|
5
|
+
&:before {
|
|
6
|
+
left: auto;
|
|
7
|
+
right: -0.3em;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.st-block-positioner__inner {
|
|
12
|
+
background: #fff;
|
|
13
|
+
position: relative;
|
|
14
|
+
z-index: 2;
|
|
15
|
+
padding: 0.3em 0.5em;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.st-block-positioner__select {
|
|
19
|
+
display:block;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.st-block--with-errors, .st-block--delete-active {
|
|
23
|
+
& > .st-block__inner {
|
|
24
|
+
|
|
25
|
+
& > .st-block__ui {
|
|
26
|
+
.st-block-positioner {
|
|
27
|
+
border-color: $error-color;
|
|
28
|
+
&:after {
|
|
29
|
+
border-color: $error-color;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
.st-block-replacer {
|
|
2
|
+
position: absolute;
|
|
3
|
+
text-align: center;
|
|
4
|
+
transform: translateY(-50%);
|
|
5
|
+
outline:none;
|
|
6
|
+
border:none;
|
|
7
|
+
font-size:1.3em;
|
|
8
|
+
display:none;
|
|
9
|
+
background-color:transparent;
|
|
10
|
+
padding:0;
|
|
11
|
+
z-index: 2;
|
|
12
|
+
top: 50%;
|
|
13
|
+
left: 35px;
|
|
14
|
+
|
|
15
|
+
&::-moz-focus-inner {
|
|
16
|
+
padding:0;
|
|
17
|
+
margin:0;
|
|
18
|
+
margin-left:-1px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.st-block--textable.st-block--empty & {
|
|
22
|
+
display: block;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.st-block-replacer__button {
|
|
28
|
+
transition: all $animation-speed ease-in-out;
|
|
29
|
+
color: $accent-color;
|
|
30
|
+
position:relative;
|
|
31
|
+
box-sizing:border-box;
|
|
32
|
+
display: inline-block;
|
|
33
|
+
margin: 0 auto;
|
|
34
|
+
width: 41px;
|
|
35
|
+
height: 41px;
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
|
|
38
|
+
transform:translateZ(0);
|
|
39
|
+
|
|
40
|
+
.st-block--controls-active & {
|
|
41
|
+
transform: rotate(45deg);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
.st-block__control-ui {
|
|
2
|
+
position: absolute;
|
|
3
|
+
bottom: 0; left: 0;
|
|
4
|
+
opacity: 1;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.st-block__inner:hover .st-block__ui,
|
|
8
|
+
.st-block__inner:hover .st-block__control-ui {
|
|
9
|
+
opacity: 1;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.st-block-ui__confirm {
|
|
13
|
+
color: $error-color;
|
|
14
|
+
border:1px solid $error-color;
|
|
15
|
+
background:none;
|
|
16
|
+
padding: 0.15em .4em;
|
|
17
|
+
margin: 0 0.1em;
|
|
18
|
+
font-size:.9em;
|
|
19
|
+
cursor:pointer;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
%st-block-ui-btn {
|
|
23
|
+
@extend .st-icon;
|
|
24
|
+
display: block;
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
width: 1em;
|
|
27
|
+
height: 1em;
|
|
28
|
+
color:$block-controls-color;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.st-block-ui-btn__reorder {
|
|
32
|
+
@extend %st-block-ui-btn;
|
|
33
|
+
position: absolute;
|
|
34
|
+
right: 2em;
|
|
35
|
+
transform: scaleX(-1);
|
|
36
|
+
top: 0.5em;
|
|
37
|
+
opacity: 0.2;
|
|
38
|
+
transition: opacity 0.3s ease-in-out;
|
|
39
|
+
&:hover,
|
|
40
|
+
&:focus {
|
|
41
|
+
color:$accent-color;
|
|
42
|
+
opacity: 1;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.st-block-ui-btn__delete {
|
|
47
|
+
@extend %st-block-ui-btn;
|
|
48
|
+
position: absolute;
|
|
49
|
+
right: 1em;
|
|
50
|
+
top: 1.5em;
|
|
51
|
+
font-size:1.5em;
|
|
52
|
+
opacity: 0.5;
|
|
53
|
+
&:hover,
|
|
54
|
+
&:focus {
|
|
55
|
+
color:$error-color;
|
|
56
|
+
opacity: 1;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.st-block--textable &,
|
|
60
|
+
.st-block[data-type="list"] &,
|
|
61
|
+
.st-block {
|
|
62
|
+
display: none;
|
|
63
|
+
}
|
|
64
|
+
.st-block[data-type="quote"] & {
|
|
65
|
+
display: block;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.st-block-control-ui-btn {
|
|
70
|
+
@extend %st-block-ui-btn;
|
|
71
|
+
width: 2em;
|
|
72
|
+
line-height: 1.25em;
|
|
73
|
+
height: 1.25em;
|
|
74
|
+
font-size: 1em;
|
|
75
|
+
display: inline-block;
|
|
76
|
+
padding: 3px;
|
|
77
|
+
transition: color .1s;
|
|
78
|
+
&:hover,
|
|
79
|
+
&:focus {
|
|
80
|
+
color:$accent-color;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
.st-block-control-ui-btn--selected {
|
|
84
|
+
color:$accent-color;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.st-block--with-errors .st-block-control-ui-btn,
|
|
88
|
+
.st-block--delete-active .st-block-control-ui-btn {
|
|
89
|
+
color: $error-color;
|
|
90
|
+
border-color: $error-color;
|
|
91
|
+
|
|
92
|
+
&:hover,
|
|
93
|
+
&.active {
|
|
94
|
+
color: #fff;
|
|
95
|
+
background-color: $error-color;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.st-block__ui-delete-controls {
|
|
100
|
+
@include ui-popup;
|
|
101
|
+
right: 4em;
|
|
102
|
+
top: 1.85em;
|
|
103
|
+
padding: 0.3em .5em;
|
|
104
|
+
border-color:$error-color;
|
|
105
|
+
|
|
106
|
+
&:before {
|
|
107
|
+
left:auto;
|
|
108
|
+
right:-0.3em;
|
|
109
|
+
border-color:$error-color;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.st-block--with-errors {
|
|
114
|
+
opacity: 1;
|
|
115
|
+
z-index: 2;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.st-block__delete-label {
|
|
119
|
+
color: $error-color;
|
|
120
|
+
}
|