blacklight-spotlight 4.0.1 → 4.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -815,102 +815,6 @@
815
815
 
816
816
  })(window.jQuery || window.Zepto, window, document);
817
817
 
818
- /*
819
- https://gist.github.com/pjambet/3710461
820
- */
821
- var LATIN_MAP = {
822
- 'À': 'A', 'Á': 'A', 'Â': 'A', 'Ã': 'A', 'Ä': 'A', 'Å': 'A', 'Æ': 'AE', 'Ç':
823
- 'C', 'È': 'E', 'É': 'E', 'Ê': 'E', 'Ë': 'E', 'Ì': 'I', 'Í': 'I', 'Î': 'I',
824
- 'Ï': 'I', 'Ð': 'D', 'Ñ': 'N', 'Ò': 'O', 'Ó': 'O', 'Ô': 'O', 'Õ': 'O', 'Ö':
825
- 'O', 'Ő': 'O', 'Ø': 'O', 'Ù': 'U', 'Ú': 'U', 'Û': 'U', 'Ü': 'U', 'Ű': 'U',
826
- 'Ý': 'Y', 'Þ': 'TH', 'ß': 'ss', 'à':'a', 'á':'a', 'â': 'a', 'ã': 'a', 'ä':
827
- 'a', 'å': 'a', 'æ': 'ae', 'ç': 'c', 'è': 'e', 'é': 'e', 'ê': 'e', 'ë': 'e',
828
- 'ì': 'i', 'í': 'i', 'î': 'i', 'ï': 'i', 'ð': 'd', 'ñ': 'n', 'ò': 'o', 'ó':
829
- 'o', 'ô': 'o', 'õ': 'o', 'ö': 'o', 'ő': 'o', 'ø': 'o', 'ù': 'u', 'ú': 'u',
830
- 'û': 'u', 'ü': 'u', 'ű': 'u', 'ý': 'y', 'þ': 'th', 'ÿ': 'y'
831
- };
832
- var LATIN_SYMBOLS_MAP = {
833
- '©':'(c)'
834
- };
835
- var GREEK_MAP = {
836
- 'α':'a', 'β':'b', 'γ':'g', 'δ':'d', 'ε':'e', 'ζ':'z', 'η':'h', 'θ':'8',
837
- 'ι':'i', 'κ':'k', 'λ':'l', 'μ':'m', 'ν':'n', 'ξ':'3', 'ο':'o', 'π':'p',
838
- 'ρ':'r', 'σ':'s', 'τ':'t', 'υ':'y', 'φ':'f', 'χ':'x', 'ψ':'ps', 'ω':'w',
839
- 'ά':'a', 'έ':'e', 'ί':'i', 'ό':'o', 'ύ':'y', 'ή':'h', 'ώ':'w', 'ς':'s',
840
- 'ϊ':'i', 'ΰ':'y', 'ϋ':'y', 'ΐ':'i',
841
- 'Α':'A', 'Β':'B', 'Γ':'G', 'Δ':'D', 'Ε':'E', 'Ζ':'Z', 'Η':'H', 'Θ':'8',
842
- 'Ι':'I', 'Κ':'K', 'Λ':'L', 'Μ':'M', 'Ν':'N', 'Ξ':'3', 'Ο':'O', 'Π':'P',
843
- 'Ρ':'R', 'Σ':'S', 'Τ':'T', 'Υ':'Y', 'Φ':'F', 'Χ':'X', 'Ψ':'PS', 'Ω':'W',
844
- 'Ά':'A', 'Έ':'E', 'Ί':'I', 'Ό':'O', 'Ύ':'Y', 'Ή':'H', 'Ώ':'W', 'Ϊ':'I',
845
- 'Ϋ':'Y'
846
- };
847
- var TURKISH_MAP = {
848
- 'ş':'s', 'Ş':'S', 'ı':'i', 'İ':'I', 'ç':'c', 'Ç':'C', 'ü':'u', 'Ü':'U',
849
- 'ö':'o', 'Ö':'O', 'ğ':'g', 'Ğ':'G'
850
- };
851
- var RUSSIAN_MAP = {
852
- 'а':'a', 'б':'b', 'в':'v', 'г':'g', 'д':'d', 'е':'e', 'ё':'yo', 'ж':'zh',
853
- 'з':'z', 'и':'i', 'й':'j', 'к':'k', 'л':'l', 'м':'m', 'н':'n', 'о':'o',
854
- 'п':'p', 'р':'r', 'с':'s', 'т':'t', 'у':'u', 'ф':'f', 'х':'h', 'ц':'c',
855
- 'ч':'ch', 'ш':'sh', 'щ':'sh', 'ъ':'', 'ы':'y', 'ь':'', 'э':'e', 'ю':'yu',
856
- 'я':'ya',
857
- 'А':'A', 'Б':'B', 'В':'V', 'Г':'G', 'Д':'D', 'Е':'E', 'Ё':'Yo', 'Ж':'Zh',
858
- 'З':'Z', 'И':'I', 'Й':'J', 'К':'K', 'Л':'L', 'М':'M', 'Н':'N', 'О':'O',
859
- 'П':'P', 'Р':'R', 'С':'S', 'Т':'T', 'У':'U', 'Ф':'F', 'Х':'H', 'Ц':'C',
860
- 'Ч':'Ch', 'Ш':'Sh', 'Щ':'Sh', 'Ъ':'', 'Ы':'Y', 'Ь':'', 'Э':'E', 'Ю':'Yu',
861
- 'Я':'Ya'
862
- };
863
- var UKRAINIAN_MAP = {
864
- 'Є':'Ye', 'І':'I', 'Ї':'Yi', 'Ґ':'G', 'є':'ye', 'і':'i', 'ї':'yi', 'ґ':'g'
865
- };
866
- var CZECH_MAP = {
867
- 'č':'c', 'ď':'d', 'ě':'e', 'ň': 'n', 'ř':'r', 'š':'s', 'ť':'t', 'ů':'u',
868
- 'ž':'z', 'Č':'C', 'Ď':'D', 'Ě':'E', 'Ň': 'N', 'Ř':'R', 'Š':'S', 'Ť':'T',
869
- 'Ů':'U', 'Ž':'Z'
870
- };
871
-
872
- var POLISH_MAP = {
873
- 'ą':'a', 'ć':'c', 'ę':'e', 'ł':'l', 'ń':'n', 'ó':'o', 'ś':'s', 'ź':'z',
874
- 'ż':'z', 'Ą':'A', 'Ć':'C', 'Ę':'e', 'Ł':'L', 'Ń':'N', 'Ó':'o', 'Ś':'S',
875
- 'Ź':'Z', 'Ż':'Z'
876
- };
877
-
878
- var LATVIAN_MAP = {
879
- 'ā':'a', 'č':'c', 'ē':'e', 'ģ':'g', 'ī':'i', 'ķ':'k', 'ļ':'l', 'ņ':'n',
880
- 'š':'s', 'ū':'u', 'ž':'z', 'Ā':'A', 'Č':'C', 'Ē':'E', 'Ģ':'G', 'Ī':'i',
881
- 'Ķ':'k', 'Ļ':'L', 'Ņ':'N', 'Š':'S', 'Ū':'u', 'Ž':'Z'
882
- };
883
-
884
- var ALL_DOWNCODE_MAPS=new Array();
885
- ALL_DOWNCODE_MAPS[0]=LATIN_MAP;
886
- ALL_DOWNCODE_MAPS[1]=LATIN_SYMBOLS_MAP;
887
- ALL_DOWNCODE_MAPS[2]=GREEK_MAP;
888
- ALL_DOWNCODE_MAPS[3]=TURKISH_MAP;
889
- ALL_DOWNCODE_MAPS[4]=RUSSIAN_MAP;
890
- ALL_DOWNCODE_MAPS[5]=UKRAINIAN_MAP;
891
- ALL_DOWNCODE_MAPS[6]=CZECH_MAP;
892
- ALL_DOWNCODE_MAPS[7]=POLISH_MAP;
893
- ALL_DOWNCODE_MAPS[8]=LATVIAN_MAP;
894
-
895
- var Downcoder = new Object();
896
- Downcoder.Initialize = function()
897
- {
898
- if (Downcoder.map) // already made
899
- return ;
900
- Downcoder.map ={};
901
- Downcoder.chars = '' ;
902
- for(var i in ALL_DOWNCODE_MAPS)
903
- {
904
- var lookup = ALL_DOWNCODE_MAPS[i];
905
- for (var c in lookup)
906
- {
907
- Downcoder.map[c] = lookup[c] ;
908
- Downcoder.chars += c ;
909
- }
910
- }
911
- Downcoder.regex = new RegExp('[' + Downcoder.chars + ']|[^' + Downcoder.chars + ']+','g') ;
912
- };
913
-
914
818
  /* From https://github.com/TimSchlechter/bootstrap-tagsinput/blob/2661784c2c281d3a69b93897ff3f39e4ffa5cbd1/dist/bootstrap-tagsinput.js */
915
819
 
916
820
  /* The MIT License (MIT)
@@ -4774,6 +4678,144 @@
4774
4678
  }
4775
4679
  }
4776
4680
 
4681
+ /*
4682
+ https://gist.github.com/pjambet/3710461
4683
+ */
4684
+ var LATIN_MAP = {
4685
+ 'À': 'A', 'Á': 'A', 'Â': 'A', 'Ã': 'A', 'Ä': 'A', 'Å': 'A', 'Æ': 'AE', 'Ç':
4686
+ 'C', 'È': 'E', 'É': 'E', 'Ê': 'E', 'Ë': 'E', 'Ì': 'I', 'Í': 'I', 'Î': 'I',
4687
+ 'Ï': 'I', 'Ð': 'D', 'Ñ': 'N', 'Ò': 'O', 'Ó': 'O', 'Ô': 'O', 'Õ': 'O', 'Ö':
4688
+ 'O', 'Ő': 'O', 'Ø': 'O', 'Ù': 'U', 'Ú': 'U', 'Û': 'U', 'Ü': 'U', 'Ű': 'U',
4689
+ 'Ý': 'Y', 'Þ': 'TH', 'ß': 'ss', 'à':'a', 'á':'a', 'â': 'a', 'ã': 'a', 'ä':
4690
+ 'a', 'å': 'a', 'æ': 'ae', 'ç': 'c', 'è': 'e', 'é': 'e', 'ê': 'e', 'ë': 'e',
4691
+ 'ì': 'i', 'í': 'i', 'î': 'i', 'ï': 'i', 'ð': 'd', 'ñ': 'n', 'ò': 'o', 'ó':
4692
+ 'o', 'ô': 'o', 'õ': 'o', 'ö': 'o', 'ő': 'o', 'ø': 'o', 'ù': 'u', 'ú': 'u',
4693
+ 'û': 'u', 'ü': 'u', 'ű': 'u', 'ý': 'y', 'þ': 'th', 'ÿ': 'y'
4694
+ };
4695
+ var LATIN_SYMBOLS_MAP = {
4696
+ '©':'(c)'
4697
+ };
4698
+ var GREEK_MAP = {
4699
+ 'α':'a', 'β':'b', 'γ':'g', 'δ':'d', 'ε':'e', 'ζ':'z', 'η':'h', 'θ':'8',
4700
+ 'ι':'i', 'κ':'k', 'λ':'l', 'μ':'m', 'ν':'n', 'ξ':'3', 'ο':'o', 'π':'p',
4701
+ 'ρ':'r', 'σ':'s', 'τ':'t', 'υ':'y', 'φ':'f', 'χ':'x', 'ψ':'ps', 'ω':'w',
4702
+ 'ά':'a', 'έ':'e', 'ί':'i', 'ό':'o', 'ύ':'y', 'ή':'h', 'ώ':'w', 'ς':'s',
4703
+ 'ϊ':'i', 'ΰ':'y', 'ϋ':'y', 'ΐ':'i',
4704
+ 'Α':'A', 'Β':'B', 'Γ':'G', 'Δ':'D', 'Ε':'E', 'Ζ':'Z', 'Η':'H', 'Θ':'8',
4705
+ 'Ι':'I', 'Κ':'K', 'Λ':'L', 'Μ':'M', 'Ν':'N', 'Ξ':'3', 'Ο':'O', 'Π':'P',
4706
+ 'Ρ':'R', 'Σ':'S', 'Τ':'T', 'Υ':'Y', 'Φ':'F', 'Χ':'X', 'Ψ':'PS', 'Ω':'W',
4707
+ 'Ά':'A', 'Έ':'E', 'Ί':'I', 'Ό':'O', 'Ύ':'Y', 'Ή':'H', 'Ώ':'W', 'Ϊ':'I',
4708
+ 'Ϋ':'Y'
4709
+ };
4710
+ var TURKISH_MAP = {
4711
+ 'ş':'s', 'Ş':'S', 'ı':'i', 'İ':'I', 'ç':'c', 'Ç':'C', 'ü':'u', 'Ü':'U',
4712
+ 'ö':'o', 'Ö':'O', 'ğ':'g', 'Ğ':'G'
4713
+ };
4714
+ var RUSSIAN_MAP = {
4715
+ 'а':'a', 'б':'b', 'в':'v', 'г':'g', 'д':'d', 'е':'e', 'ё':'yo', 'ж':'zh',
4716
+ 'з':'z', 'и':'i', 'й':'j', 'к':'k', 'л':'l', 'м':'m', 'н':'n', 'о':'o',
4717
+ 'п':'p', 'р':'r', 'с':'s', 'т':'t', 'у':'u', 'ф':'f', 'х':'h', 'ц':'c',
4718
+ 'ч':'ch', 'ш':'sh', 'щ':'sh', 'ъ':'', 'ы':'y', 'ь':'', 'э':'e', 'ю':'yu',
4719
+ 'я':'ya',
4720
+ 'А':'A', 'Б':'B', 'В':'V', 'Г':'G', 'Д':'D', 'Е':'E', 'Ё':'Yo', 'Ж':'Zh',
4721
+ 'З':'Z', 'И':'I', 'Й':'J', 'К':'K', 'Л':'L', 'М':'M', 'Н':'N', 'О':'O',
4722
+ 'П':'P', 'Р':'R', 'С':'S', 'Т':'T', 'У':'U', 'Ф':'F', 'Х':'H', 'Ц':'C',
4723
+ 'Ч':'Ch', 'Ш':'Sh', 'Щ':'Sh', 'Ъ':'', 'Ы':'Y', 'Ь':'', 'Э':'E', 'Ю':'Yu',
4724
+ 'Я':'Ya'
4725
+ };
4726
+ var UKRAINIAN_MAP = {
4727
+ 'Є':'Ye', 'І':'I', 'Ї':'Yi', 'Ґ':'G', 'є':'ye', 'і':'i', 'ї':'yi', 'ґ':'g'
4728
+ };
4729
+ var CZECH_MAP = {
4730
+ 'č':'c', 'ď':'d', 'ě':'e', 'ň': 'n', 'ř':'r', 'š':'s', 'ť':'t', 'ů':'u',
4731
+ 'ž':'z', 'Č':'C', 'Ď':'D', 'Ě':'E', 'Ň': 'N', 'Ř':'R', 'Š':'S', 'Ť':'T',
4732
+ 'Ů':'U', 'Ž':'Z'
4733
+ };
4734
+
4735
+ var POLISH_MAP = {
4736
+ 'ą':'a', 'ć':'c', 'ę':'e', 'ł':'l', 'ń':'n', 'ó':'o', 'ś':'s', 'ź':'z',
4737
+ 'ż':'z', 'Ą':'A', 'Ć':'C', 'Ę':'e', 'Ł':'L', 'Ń':'N', 'Ó':'o', 'Ś':'S',
4738
+ 'Ź':'Z', 'Ż':'Z'
4739
+ };
4740
+
4741
+ var LATVIAN_MAP = {
4742
+ 'ā':'a', 'č':'c', 'ē':'e', 'ģ':'g', 'ī':'i', 'ķ':'k', 'ļ':'l', 'ņ':'n',
4743
+ 'š':'s', 'ū':'u', 'ž':'z', 'Ā':'A', 'Č':'C', 'Ē':'E', 'Ģ':'G', 'Ī':'i',
4744
+ 'Ķ':'k', 'Ļ':'L', 'Ņ':'N', 'Š':'S', 'Ū':'u', 'Ž':'Z'
4745
+ };
4746
+
4747
+ var ALL_DOWNCODE_MAPS=new Array();
4748
+ ALL_DOWNCODE_MAPS[0]=LATIN_MAP;
4749
+ ALL_DOWNCODE_MAPS[1]=LATIN_SYMBOLS_MAP;
4750
+ ALL_DOWNCODE_MAPS[2]=GREEK_MAP;
4751
+ ALL_DOWNCODE_MAPS[3]=TURKISH_MAP;
4752
+ ALL_DOWNCODE_MAPS[4]=RUSSIAN_MAP;
4753
+ ALL_DOWNCODE_MAPS[5]=UKRAINIAN_MAP;
4754
+ ALL_DOWNCODE_MAPS[6]=CZECH_MAP;
4755
+ ALL_DOWNCODE_MAPS[7]=POLISH_MAP;
4756
+ ALL_DOWNCODE_MAPS[8]=LATVIAN_MAP;
4757
+
4758
+ var Downcoder = new Object();
4759
+ Downcoder.Initialize = function()
4760
+ {
4761
+ if (Downcoder.map) // already made
4762
+ return ;
4763
+ Downcoder.map ={};
4764
+ Downcoder.chars = '' ;
4765
+ for(var i in ALL_DOWNCODE_MAPS)
4766
+ {
4767
+ var lookup = ALL_DOWNCODE_MAPS[i];
4768
+ for (var c in lookup)
4769
+ {
4770
+ Downcoder.map[c] = lookup[c] ;
4771
+ Downcoder.chars += c ;
4772
+ }
4773
+ }
4774
+ Downcoder.regex = new RegExp('[' + Downcoder.chars + ']|[^' + Downcoder.chars + ']+','g') ;
4775
+ };
4776
+
4777
+ const downcode = function( slug )
4778
+ {
4779
+ Downcoder.Initialize() ;
4780
+ var downcoded ="";
4781
+ var pieces = slug.match(Downcoder.regex);
4782
+ if(pieces)
4783
+ {
4784
+ for (var i = 0 ; i < pieces.length ; i++)
4785
+ {
4786
+ if (pieces[i].length == 1)
4787
+ {
4788
+ var mapped = Downcoder.map[pieces[i]] ;
4789
+ if (mapped != null)
4790
+ {
4791
+ downcoded+=mapped;
4792
+ continue ;
4793
+ }
4794
+ }
4795
+ downcoded+=pieces[i];
4796
+ }
4797
+ }
4798
+ else
4799
+ {
4800
+ downcoded = slug;
4801
+ }
4802
+ return downcoded;
4803
+ };
4804
+
4805
+
4806
+ function URLify(s, num_chars) {
4807
+ // changes, e.g., "Petty theft" to "petty_theft"
4808
+ // remove all these words from the string before urlifying
4809
+ s = downcode(s);
4810
+ //
4811
+ // if downcode doesn't hit, the char will be stripped here
4812
+ s = s.replace(/[^-\w\s]/g, ' '); // remove unneeded chars
4813
+ s = s.replace(/^\s+|\s+$/g, ''); // trim leading/trailing spaces
4814
+ s = s.replace(/[-\s]+/g, '-'); // convert spaces to hyphens
4815
+ s = s.toLowerCase(); // convert to lowercase
4816
+ return s.substring(0, num_chars);// trim to first num_chars chars
4817
+ }
4818
+
4777
4819
  class Exhibits {
4778
4820
  connect() {
4779
4821
  // auto-fill the exhibit slug on the new exhibit form
@@ -4834,7 +4876,7 @@
4834
4876
  }
4835
4877
  }
4836
4878
 
4837
- (function($, undefined$1) {
4879
+ (function($, _) {
4838
4880
 
4839
4881
  /*
4840
4882
  * SerializedForm is built as a singleton jQuery plugin. It needs to be able to
@@ -5002,7 +5044,7 @@
5002
5044
  $('li', thumbList).each(function(){
5003
5045
  var thisThumb = $(this),
5004
5046
  image = $('img', thisThumb),
5005
- totalWidth = width += thisThumb.width();
5047
+ totalWidth = width += thisThumb.width(),
5006
5048
  position = (thumbList.position().left + totalWidth) - thisThumb.width();
5007
5049
 
5008
5050
  if(position >= 0 && position < viewportWidth) {
@@ -5295,7 +5337,7 @@
5295
5337
  addAutocompleteBehavior($(this));
5296
5338
  });
5297
5339
 
5298
- function addAutocompleteBehavior( typeAheadInput, settings ) {
5340
+ function addAutocompleteBehavior( typeAheadInput, _ ) {
5299
5341
  var settings = $.extend({
5300
5342
  displayKey: 'title',
5301
5343
  minLength: 0,
@@ -5420,7 +5462,7 @@
5420
5462
  var children = data[i]['children'];
5421
5463
  for(var child in children){
5422
5464
  var id = children[child]['id'];
5423
- child_node = findNode(id, container);
5465
+ var child_node = findNode(id, container);
5424
5466
  setWeight(child_node, weight++);
5425
5467
  setParent(child_node, parent_id);
5426
5468
  }
@@ -6285,8 +6327,8 @@
6285
6327
  </div>
6286
6328
  <div class="row">
6287
6329
  <div class="form-group mb-3 col-md-8">
6288
- <label for="${this.formId(id_key)}">${i18n.t("blocks:oembed:url")}</label>
6289
- <input name="${id_key}" class="form-control col-md-6" type="text" id="${this.formId(id_key)}" />
6330
+ <label for="${this.formId(this.id_key)}">${i18n.t("blocks:oembed:url")}</label>
6331
+ <input name="${this.id_key}" class="form-control col-md-6" type="text" id="${this.formId(this.id_key)}" />
6290
6332
  </div>
6291
6333
  </div>
6292
6334
  ${this.text_area()}
@@ -6541,8 +6583,6 @@
6541
6583
  auto_play_images_interval_key: "auto-play-images-interval",
6542
6584
  max_height_key: "max-height",
6543
6585
 
6544
- item_options: function() { return "" },
6545
-
6546
6586
  carouselCycleTimesInSeconds: {
6547
6587
  values: [ 3, 5, 8, 12, 20 ],
6548
6588
  selected: 5