rails_handsontable 0.13.2 → 0.23.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,15 +1,29 @@
1
1
  /*!
2
- * Handsontable 0.13.1
3
- * Handsontable is a JavaScript library for editable tables with basic copy-paste compatibility with Excel and Google Docs
4
- *
5
- * Copyright (c) 2012-2014 Marcin Warpechowski
6
- * Copyright (c) 2015 Handsoncode sp. z o.o. <hello@handsontable.com>
7
- * Licensed under the MIT license.
8
- * http://handsontable.com/
9
- *
10
- * Date: Thu Mar 19 2015 15:05:12 GMT+0100 (CET)
11
- */
2
+ (The MIT License)
3
+
4
+ Copyright (c) 2012-2014 Marcin Warpechowski
5
+ Copyright (c) 2015 Handsoncode sp. z o.o. <hello@handsoncode.net>
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining
8
+ a copy of this software and associated documentation files (the
9
+ 'Software'), to deal in the Software without restriction, including
10
+ without limitation the rights to use, copy, modify, merge, publish,
11
+ distribute, sublicense, and/or sell copies of the Software, and to
12
+ permit persons to whom the Software is furnished to do so, subject to
13
+ the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be
16
+ included in all copies or substantial portions of the Software.
17
+
18
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
19
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
21
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
22
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
12
25
 
26
+ */
13
27
  .handsontable {
14
28
  position: relative;
15
29
  }
@@ -21,11 +35,11 @@
21
35
  position: relative;
22
36
  }
23
37
 
24
- .handsontable.htAutoColumnSize {
38
+ .handsontable.htAutoSize {
25
39
  visibility: hidden;
26
- left: 0;
40
+ left: -99000px;
27
41
  position: absolute;
28
- top: 0;
42
+ top: -99000px;
29
43
  }
30
44
 
31
45
  .handsontable .wtHider {
@@ -87,6 +101,8 @@
87
101
 
88
102
  .handsontable th,
89
103
  .handsontable td {
104
+ border-top-width: 0;
105
+ border-left-width: 0;
90
106
  border-right: 1px solid #CCC;
91
107
  border-bottom: 1px solid #CCC;
92
108
  height: 22px;
@@ -125,22 +141,31 @@
125
141
  }
126
142
 
127
143
  .handsontable th:first-child,
128
- .handsontable td:first-child,
144
+ .handsontable td:first-of-type,
129
145
  .handsontable .htNoFrame + th,
130
146
  .handsontable .htNoFrame + td {
131
147
  border-left: 1px solid #CCC;
132
148
  }
133
149
 
150
+ .handsontable.htRowHeaders thead tr th:nth-child(2) {
151
+ border-left: 1px solid #CCC;
152
+ }
153
+
134
154
  .handsontable tr:first-child th,
135
155
  .handsontable tr:first-child td {
136
156
  border-top: 1px solid #CCC;
137
157
  }
138
158
 
139
- .handsontable thead tr:last-child th {
140
- border-bottom-width: 0;
159
+ .ht_master:not(.innerBorderLeft) ~ .handsontable tbody tr th,
160
+ .ht_master:not(.innerBorderLeft) ~ .handsontable:not(.ht_clone_top) thead tr th:first-child
161
+ {
162
+ border-right-width: 0;
141
163
  }
142
164
 
143
- .handsontable thead tr.lastChild th {
165
+ .ht_master:not(.innerBorderTop) thead tr:last-child th,
166
+ .ht_master:not(.innerBorderTop) ~ .handsontable thead tr:last-child th,
167
+ .ht_master:not(.innerBorderTop) thead tr.lastChild th,
168
+ .ht_master:not(.innerBorderTop) ~ .handsontable thead tr.lastChild th {
144
169
  border-bottom-width: 0;
145
170
  }
146
171
 
@@ -266,11 +291,62 @@
266
291
  display: block;
267
292
  }
268
293
 
294
+ .handsontable .columnSorting {
295
+ position: relative;
296
+ }
297
+
269
298
  .handsontable .columnSorting:hover {
270
299
  text-decoration: underline;
271
300
  cursor: pointer;
272
301
  }
273
302
 
303
+ .handsontable .columnSorting.ascending::after {
304
+ content: '\25B2';
305
+ color: #5f5f5f;
306
+ position: absolute;
307
+ right: -15px;
308
+ }
309
+
310
+ .handsontable .columnSorting.descending::after {
311
+ content: '\25BC';
312
+ color: #5f5f5f;
313
+ position: absolute;
314
+ right: -15px;
315
+ }
316
+
317
+ .handsontable th.beforeHiddenColumn {
318
+ position: relative;
319
+ }
320
+
321
+ .handsontable th.beforeHiddenColumn::after,
322
+ .handsontable th.afterHiddenColumn::before {
323
+ content: '\25C0';
324
+ color: #bbb;
325
+ position: absolute;
326
+ right: 1px;
327
+ top: 2px;
328
+ font-size: 5pt;
329
+ }
330
+
331
+ .handsontable th.afterHiddenColumn {
332
+ position: relative;
333
+ }
334
+
335
+ .handsontable th.afterHiddenColumn::before {
336
+ left: 1px;
337
+ top: 2px;
338
+ right: auto;
339
+ content: '\25B6';
340
+ }
341
+
342
+ .handsontable td.afterHiddenColumn.firstVisible {
343
+ border-left: 1px solid #CCC;
344
+ }
345
+
346
+ .handsontable thead th.hiddenHeader {
347
+ display: none;
348
+ }
349
+
274
350
  /* border line */
275
351
 
276
352
  .handsontable .wtBorder {
@@ -420,6 +496,11 @@ CheckboxRenderer
420
496
  .handsontable .htCheckboxRendererInput.noValue {
421
497
  opacity: 0.5;
422
498
  }
499
+ .handsontable .htCheckboxRendererLabel {
500
+ cursor: pointer;
501
+ display: inline-block;
502
+ width: 100%;
503
+ }
423
504
 
424
505
  /*
425
506
  NumericRenderer
@@ -489,14 +570,15 @@ Comment For Cell
489
570
  * Handsontable in Handsontable
490
571
  */
491
572
 
492
- .handsontable .handsontable .wtHider {
573
+ .handsontable .handsontable.ht_clone_top .wtHider {
493
574
  padding: 0 0 5px 0;
494
575
  }
495
576
 
496
- .handsontable .handsontable table {
497
- -webkit-box-shadow: 1px 2px 5px rgba(0, 0, 0, 0.4);
498
- box-shadow: 1px 2px 5px rgba(0, 0, 0, 0.4);
499
- }
577
+ /* removing shadows, TODO: remove the commented code and this comment */
578
+ /*.handsontable .handsontable:not(.ht_master) table {*/
579
+ /*-webkit-box-shadow: 1px 2px 5px rgba(0, 0, 0, 0.4);*/
580
+ /*box-shadow: 1px 2px 5px rgba(0, 0, 0, 0.4);*/
581
+ /*}*/
500
582
 
501
583
  /**
502
584
  * Autocomplete Editor
@@ -528,7 +610,7 @@ Comment For Cell
528
610
  .handsontable.listbox tr:last-child th,
529
611
  .handsontable.listbox tr:first-child td,
530
612
  .handsontable.listbox td {
531
- border-width: 0;
613
+ border-color: transparent;
532
614
  }
533
615
 
534
616
  .handsontable.listbox th,
@@ -552,19 +634,6 @@ Comment For Cell
552
634
  background: #eee;
553
635
  }
554
636
 
555
- .htContextMenu {
556
- display: none;
557
- position: absolute;
558
- z-index: 1060; /*needs to be higher than 1050 - z-index for Twitter Bootstrap modal (#1569)*/
559
- }
560
-
561
- .htContextMenu .ht_clone_top,
562
- .htContextMenu .ht_clone_left,
563
- .htContextMenu .ht_clone_corner,
564
- .htContextMenu .ht_clone_debug {
565
- display: none;
566
- }
567
-
568
637
  .ht_clone_top {
569
638
  z-index: 101;
570
639
  }
@@ -573,7 +642,8 @@ Comment For Cell
573
642
  z-index: 102;
574
643
  }
575
644
 
576
- .ht_clone_corner {
645
+ .ht_clone_top_left_corner,
646
+ .ht_clone_bottom_left_corner {
577
647
  z-index: 103;
578
648
  }
579
649
 
@@ -581,62 +651,6 @@ Comment For Cell
581
651
  z-index: 103;
582
652
  }
583
653
 
584
- .htContextMenu table.htCore {
585
- outline: 1px solid #bbb;
586
- }
587
-
588
- .htContextMenu .wtBorder {
589
- visibility: hidden;
590
- }
591
-
592
- .htContextMenu table tbody tr td {
593
- background: white;
594
- border-width: 0;
595
- padding: 4px 6px 0px 6px;
596
- cursor: pointer;
597
- overflow: hidden;
598
- white-space: nowrap;
599
- text-overflow: ellipsis;
600
- }
601
-
602
- .htContextMenu table tbody tr td:first-child {
603
- border: 0;
604
- }
605
-
606
- .htContextMenu table tbody tr td.htDimmed{
607
- font-style: normal;
608
- color: #323232;
609
- }
610
-
611
- .htContextMenu table tbody tr td.current,
612
- .htContextMenu table tbody tr td.zeroclipboard-is-hover {
613
- background: rgb(233, 233, 233);
614
- }
615
-
616
- .htContextMenu table tbody tr td.htSeparator {
617
- border-top: 1px solid #bbb;
618
- height: 0;
619
- padding: 0;
620
- }
621
-
622
- .htContextMenu table tbody tr td.htDisabled {
623
- color: #999;
624
- }
625
-
626
- .htContextMenu table tbody tr td.htDisabled:hover {
627
- background: white;
628
- color: #999;
629
- cursor: default;
630
- }
631
- .htContextMenu table tbody tr td div{
632
- padding-left: 10px;
633
- }
634
- .htContextMenu table tbody tr td div span.selected{
635
- margin-top: -2px;
636
- position: absolute;
637
- left: 4px;
638
- }
639
-
640
654
  .handsontable td.htSearchResult {
641
655
  background: #fcedd9;
642
656
  color: #583707;
@@ -649,94 +663,46 @@ Cell borders
649
663
  /*box-sizing: border-box !important;*/
650
664
  border-width: 1px;
651
665
  }
652
- .htBordered.htTopBorderSolid{
666
+ .htBordered.htTopBorderSolid {
653
667
  border-top-style: solid;
654
668
  border-top-color: #000;
655
669
  }
656
- .htBordered.htRightBorderSolid{
670
+ .htBordered.htRightBorderSolid {
657
671
  border-right-style: solid;
658
672
  border-right-color: #000;
659
673
  }
660
- .htBordered.htBottomBorderSolid{
674
+ .htBordered.htBottomBorderSolid {
661
675
  border-bottom-style: solid;
662
676
  border-bottom-color: #000;
663
677
  }
664
- .htBordered.htLeftBorderSolid{
678
+ .htBordered.htLeftBorderSolid {
665
679
  border-left-style: solid;
666
680
  border-left-color: #000;
667
681
  }
668
682
 
669
683
  .htCommentTextArea{
684
+ -moz-box-shadow: 1px 1px 2px #bbb;
685
+ -webkit-box-shadow: 1px 1px 2px #bbb;
670
686
  background-color: #FFFACD;
687
+ border: 1px solid #999;
671
688
  box-shadow: 1px 1px 2px #bbb;
672
689
  font-family: 'Arial';
673
- -webkit-box-shadow: 1px 1px 2px #bbb;
674
- -moz-box-shadow: 1px 1px 2px #bbb;
675
-
676
- }
677
-
678
- /* Grouping indicators */
679
- .handsontable colgroup col.rowHeader.htGroupCol {
680
- width: 25px !important;
681
- }
682
- .handsontable colgroup col.rowHeader.htGroupColClosest {
683
- width: 30px !important;
684
- }
685
-
686
- .handsontable .htGroupIndicatorContainer {
687
- background: #fff;
688
- border: 0px;
689
- padding-bottom: 0px;
690
- vertical-align: bottom;
691
- position: relative;
692
- }
693
-
694
- .handsontable thead .htGroupIndicatorContainer {
695
- vertical-align: top;
696
- border-bottom: 0px;
697
690
  }
698
691
 
699
692
  .handsontable tbody tr th:nth-last-child(2) {
700
693
  border-right: 1px solid #CCC;
701
694
  }
702
695
 
703
- .handsontable thead tr:nth-last-child(2) th {
696
+ .handsontable thead tr:nth-last-child(2) th.htGroupIndicatorContainer {
704
697
  border-bottom: 1px solid #CCC;
705
698
  padding-bottom: 5px;
706
699
  }
707
700
 
708
701
 
709
- .ht_clone_corner thead tr th:nth-last-child(2) {
702
+ .ht_clone_top_left_corner thead tr th:nth-last-child(2) {
710
703
  border-right: 1px solid #CCC;
711
704
  }
712
705
 
713
- .htVerticalGroup {
714
- height: 100%;
715
- }
716
-
717
- .htHorizontalGroup {
718
- width: 100%;
719
- height: 100%;
720
- }
721
-
722
- .htVerticalGroup:not(.htCollapseButton):after {
723
- content: "";
724
- height: 100%;
725
- width: 1px;
726
- display: block;
727
- background: #ccc;
728
- margin-left: 5px;
729
- }
730
-
731
- .htHorizontalGroup:not(.htCollapseButton):after {
732
- content: "";
733
- width: 100%;
734
- height: 1px;
735
- display: block;
736
- background: #ccc;
737
- margin-top: 20%;
738
- }
739
-
740
706
  .htCollapseButton {
741
707
  width: 10px;
742
708
  height: 10px;
@@ -778,37 +744,6 @@ thead .htCollapseButton:after {
778
744
  top: 4px;
779
745
  }
780
746
 
781
- .handsontable tr th .htGroupStart:after {
782
- background: transparent;
783
- border-left: 1px solid #ccc;
784
- border-top: 1px solid #ccc;
785
- width: 5px;
786
- position: relative;
787
- top: 50%;
788
- }
789
-
790
- .handsontable thead tr th .htGroupStart:after {
791
- background: transparent;
792
- border-left: 1px solid #ccc;
793
- border-top: 1px solid #ccc;
794
- height: 5px;
795
- width: 50%;
796
- position: relative;
797
- top: 0px;
798
- left: 50%;
799
- }
800
-
801
- .handsontable .htGroupLevelTrigger {
802
- -webkit-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
803
- box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
804
- width: 15px;
805
- height: 15px;
806
- margin: 4px auto;
807
- padding: 0px;
808
- line-height: 15px;
809
- cursor: pointer;
810
- }
811
-
812
747
  .handsontable tr th .htExpandButton {
813
748
  position: absolute;
814
749
  width: 10px;
@@ -820,7 +755,7 @@ thead .htCollapseButton:after {
820
755
  -webkit-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
821
756
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
822
757
  cursor: pointer;
823
- top: 0px;
758
+ top: 0;
824
759
  display: none;
825
760
  }
826
761
 
@@ -833,8 +768,31 @@ thead .htCollapseButton:after {
833
768
  display: block;
834
769
  }
835
770
 
771
+ .collapsibleIndicator {
772
+ position: absolute;
773
+ top: 50%;
774
+ transform: translate(0% ,-50%);
775
+ right: 5px;
776
+ border: 1px solid #A6A6A6;
777
+ line-height: 10px;
778
+ color: #222;
779
+ border-radius: 10px;
780
+ font-size: 10px;
781
+ width: 10px;
782
+ height: 10px;
783
+ cursor: pointer;
784
+ -webkit-box-shadow: 0px 0px 0px 6px rgba(238,238,238,1);
785
+ -moz-box-shadow: 0px 0px 0px 6px rgba(238,238,238,1);
786
+ box-shadow: 0px 0px 0px 6px rgba(238,238,238,1);
787
+ background: #eee;
788
+ }
789
+
836
790
  .handsontable col.hidden {
837
- width: 0px !important;
791
+ width: 0 !important;
792
+ }
793
+
794
+ .handsontable table tr th.lightRightBorder {
795
+ border-right: 1px solid #E6E6E6;
838
796
  }
839
797
 
840
798
  .handsontable tr.hidden,
@@ -843,6 +801,29 @@ thead .htCollapseButton:after {
843
801
  display: none;
844
802
  }
845
803
 
804
+ .ht_master,
805
+ .ht_clone_left,
806
+ .ht_clone_top,
807
+ .ht_clone_bottom {
808
+ overflow: hidden;
809
+ }
810
+
811
+ .ht_master .wtHolder {
812
+ overflow: auto;
813
+ }
814
+
815
+ .ht_clone_left .wtHolder {
816
+ overflow-x: hidden;
817
+ overflow-y: auto;
818
+ }
819
+
820
+ .ht_clone_top .wtHolder,
821
+ .ht_clone_bottom .wtHolder {
822
+ overflow-x: auto;
823
+ overflow-y: hidden;
824
+ }
825
+
826
+
846
827
  /*WalkontableDebugOverlay*/
847
828
 
848
829
  .wtDebugHidden {
@@ -890,14 +871,14 @@ thead .htCollapseButton:after {
890
871
  opacity: 1;
891
872
  }
892
873
  }
893
-
894
874
  /*
895
875
 
896
876
  Handsontable Mobile Text Editor stylesheet
897
877
 
898
878
  */
899
879
 
900
- .handsontable.mobile {
880
+ .handsontable.mobile,
881
+ .handsontable.mobile .wtHolder {
901
882
  -webkit-touch-callout:none;
902
883
  -webkit-user-select:none;
903
884
  -khtml-user-select:none;
@@ -1105,3 +1086,89 @@ thead .htCollapseButton:after {
1105
1086
  animation-fill-mode: forwards;
1106
1087
  -webkit-animation-fill-mode: forwards;
1107
1088
  }
1089
+ /*!
1090
+ * Handsontable ContextMenu
1091
+ */
1092
+
1093
+ .htContextMenu {
1094
+ display: none;
1095
+ position: absolute;
1096
+ z-index: 1060; /* needs to be higher than 1050 - z-index for Twitter Bootstrap modal (#1569) */
1097
+ }
1098
+
1099
+ .htContextMenu .ht_clone_top,
1100
+ .htContextMenu .ht_clone_left,
1101
+ .htContextMenu .ht_clone_corner,
1102
+ .htContextMenu .ht_clone_debug {
1103
+ display: none;
1104
+ }
1105
+
1106
+ .htContextMenu table.htCore {
1107
+ border: 1px solid #bbb;
1108
+ border-bottom-width: 2px;
1109
+ border-right-width: 2px;
1110
+ }
1111
+
1112
+ .htContextMenu .wtBorder {
1113
+ visibility: hidden;
1114
+ }
1115
+
1116
+ .htContextMenu table tbody tr td {
1117
+ background: white;
1118
+ border-width: 0;
1119
+ padding: 4px 6px 0 6px;
1120
+ cursor: pointer;
1121
+ overflow: hidden;
1122
+ white-space: nowrap;
1123
+ text-overflow: ellipsis;
1124
+ }
1125
+
1126
+ .htContextMenu table tbody tr td:first-child {
1127
+ border: 0;
1128
+ }
1129
+
1130
+ .htContextMenu table tbody tr td.htDimmed {
1131
+ font-style: normal;
1132
+ color: #323232;
1133
+ }
1134
+
1135
+ .htContextMenu table tbody tr td.current,
1136
+ .htContextMenu table tbody tr td.zeroclipboard-is-hover {
1137
+ background: #e9e9e9;
1138
+ }
1139
+
1140
+ .htContextMenu table tbody tr td.htSeparator {
1141
+ border-top: 1px solid #bbb;
1142
+ height: 0;
1143
+ padding: 0;
1144
+ cursor: default;
1145
+ }
1146
+
1147
+ .htContextMenu table tbody tr td.htDisabled {
1148
+ color: #999;
1149
+ }
1150
+
1151
+ .htContextMenu table tbody tr td.htDisabled:hover {
1152
+ background: #fff;
1153
+ color: #999;
1154
+ cursor: default;
1155
+ }
1156
+
1157
+ .htContextMenu table tbody tr.htHidden {
1158
+ display: none;
1159
+ }
1160
+
1161
+ .htContextMenu table tbody tr td .htItemWrapper {
1162
+ margin-left: 10px;
1163
+ margin-right: 6px;
1164
+ }
1165
+
1166
+ .htContextMenu table tbody tr td div span.selected {
1167
+ margin-top: -2px;
1168
+ position: absolute;
1169
+ left: 4px;
1170
+ }
1171
+
1172
+ .htContextMenu .ht_master .wtHolder {
1173
+ overflow: hidden;
1174
+ }