Browse Source

Admin generator integration

Sevajol Bastien 12 years ago
parent
commit
b1b3958714
100 changed files with 14052 additions and 1 deletions
  1. 3 0
      app/AppKernel.php
  2. 4 1
      app/config/routing.yml
  3. 8 0
      web/bundles/admingeneratorgenerator/css/admingenerator/collection.css
  4. 36 0
      web/bundles/admingeneratorgenerator/css/admingenerator/filetypeicons.css
  5. 79 0
      web/bundles/admingeneratorgenerator/css/admingenerator/form/single-upload.css
  6. 13 0
      web/bundles/admingeneratorgenerator/css/admingenerator/general.css
  7. 160 0
      web/bundles/admingeneratorgenerator/css/admingenerator/nested-list.css
  8. 25 0
      web/bundles/admingeneratorgenerator/css/admingenerator/upload.css
  9. 223 0
      web/bundles/admingeneratorgenerator/css/bootstrap/bootstrap-datepicker.css
  10. 262 0
      web/bundles/admingeneratorgenerator/css/bootstrap/bootstrap-extended.css
  11. 5 0
      web/bundles/admingeneratorgenerator/css/bootstrap/bootstrap-responsive-extended.css
  12. 1058 0
      web/bundles/admingeneratorgenerator/css/bootstrap/bootstrap-responsive.css
  13. 5774 0
      web/bundles/admingeneratorgenerator/css/bootstrap/bootstrap.css
  14. 30 0
      web/bundles/admingeneratorgenerator/css/google/prettify.css
  15. BIN
      web/bundles/admingeneratorgenerator/css/img/glyphicons-halflings-white.png
  16. BIN
      web/bundles/admingeneratorgenerator/css/img/glyphicons-halflings.png
  17. BIN
      web/bundles/admingeneratorgenerator/css/jquery-ui/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
  18. BIN
      web/bundles/admingeneratorgenerator/css/jquery-ui/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
  19. BIN
      web/bundles/admingeneratorgenerator/css/jquery-ui/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
  20. BIN
      web/bundles/admingeneratorgenerator/css/jquery-ui/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
  21. BIN
      web/bundles/admingeneratorgenerator/css/jquery-ui/smoothness/images/ui-bg_glass_75_dadada_1x400.png
  22. BIN
      web/bundles/admingeneratorgenerator/css/jquery-ui/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
  23. BIN
      web/bundles/admingeneratorgenerator/css/jquery-ui/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
  24. BIN
      web/bundles/admingeneratorgenerator/css/jquery-ui/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
  25. BIN
      web/bundles/admingeneratorgenerator/css/jquery-ui/smoothness/images/ui-icons_222222_256x240.png
  26. BIN
      web/bundles/admingeneratorgenerator/css/jquery-ui/smoothness/images/ui-icons_2e83ff_256x240.png
  27. BIN
      web/bundles/admingeneratorgenerator/css/jquery-ui/smoothness/images/ui-icons_454545_256x240.png
  28. BIN
      web/bundles/admingeneratorgenerator/css/jquery-ui/smoothness/images/ui-icons_888888_256x240.png
  29. BIN
      web/bundles/admingeneratorgenerator/css/jquery-ui/smoothness/images/ui-icons_cd0a0a_256x240.png
  30. 5 0
      web/bundles/admingeneratorgenerator/css/jquery-ui/smoothness/jquery-ui-1.9.2.custom.min.css
  31. BIN
      web/bundles/admingeneratorgenerator/cur/closedhand.cur
  32. BIN
      web/bundles/admingeneratorgenerator/cur/openhand.cur
  33. BIN
      web/bundles/admingeneratorgenerator/ico/apple-touch-icon-114-precomposed.png
  34. BIN
      web/bundles/admingeneratorgenerator/ico/apple-touch-icon-144-precomposed.png
  35. BIN
      web/bundles/admingeneratorgenerator/ico/apple-touch-icon-57-precomposed.png
  36. BIN
      web/bundles/admingeneratorgenerator/ico/apple-touch-icon-72-precomposed.png
  37. BIN
      web/bundles/admingeneratorgenerator/ico/favicon.ico
  38. BIN
      web/bundles/admingeneratorgenerator/img/filetypeicons/archive.png
  39. BIN
      web/bundles/admingeneratorgenerator/img/filetypeicons/audio.png
  40. BIN
      web/bundles/admingeneratorgenerator/img/filetypeicons/html.png
  41. BIN
      web/bundles/admingeneratorgenerator/img/filetypeicons/image.png
  42. 24 0
      web/bundles/admingeneratorgenerator/img/filetypeicons/license.txt
  43. BIN
      web/bundles/admingeneratorgenerator/img/filetypeicons/pdf-document.png
  44. BIN
      web/bundles/admingeneratorgenerator/img/filetypeicons/plain-text.png
  45. BIN
      web/bundles/admingeneratorgenerator/img/filetypeicons/presentation.png
  46. BIN
      web/bundles/admingeneratorgenerator/img/filetypeicons/spreadsheet.png
  47. BIN
      web/bundles/admingeneratorgenerator/img/filetypeicons/text-document.png
  48. BIN
      web/bundles/admingeneratorgenerator/img/filetypeicons/unknown.png
  49. BIN
      web/bundles/admingeneratorgenerator/img/filetypeicons/video.png
  50. 63 0
      web/bundles/admingeneratorgenerator/javascripts/double_list.js
  51. 9 0
      web/bundles/admingeneratorgenerator/js/admingenerator/_namespace.md
  52. 436 0
      web/bundles/admingeneratorgenerator/js/admingenerator/form/single-upload.js
  53. 10 0
      web/bundles/admingeneratorgenerator/js/admingenerator/general.js
  54. 153 0
      web/bundles/admingeneratorgenerator/js/admingenerator/nestedset.js
  55. 12 0
      web/bundles/admingeneratorgenerator/js/admingenerator/tabs.js
  56. 1 0
      web/bundles/admingeneratorgenerator/js/blueimp/blueimp.canvas-to-blob.min.js
  57. 1 0
      web/bundles/admingeneratorgenerator/js/blueimp/blueimp.javascript-load-image.min.js
  58. 1 0
      web/bundles/admingeneratorgenerator/js/blueimp/blueimp.javascript-templates.min.js
  59. 220 0
      web/bundles/admingeneratorgenerator/js/blueimp/jquery.fileupload-fp.js
  60. 732 0
      web/bundles/admingeneratorgenerator/js/blueimp/jquery.fileupload-ui.js
  61. 1108 0
      web/bundles/admingeneratorgenerator/js/blueimp/jquery.fileupload.js
  62. 172 0
      web/bundles/admingeneratorgenerator/js/blueimp/jquery.iframe-transport.js
  63. 104 0
      web/bundles/admingeneratorgenerator/js/bootstrap/bootstrap-affix.js
  64. 90 0
      web/bundles/admingeneratorgenerator/js/bootstrap/bootstrap-alert.js
  65. 96 0
      web/bundles/admingeneratorgenerator/js/bootstrap/bootstrap-button.js
  66. 176 0
      web/bundles/admingeneratorgenerator/js/bootstrap/bootstrap-carousel.js
  67. 158 0
      web/bundles/admingeneratorgenerator/js/bootstrap/bootstrap-collapse.js
  68. 779 0
      web/bundles/admingeneratorgenerator/js/bootstrap/bootstrap-datepicker.js
  69. 150 0
      web/bundles/admingeneratorgenerator/js/bootstrap/bootstrap-dropdown.js
  70. 239 0
      web/bundles/admingeneratorgenerator/js/bootstrap/bootstrap-modal.js
  71. 103 0
      web/bundles/admingeneratorgenerator/js/bootstrap/bootstrap-popover.js
  72. 151 0
      web/bundles/admingeneratorgenerator/js/bootstrap/bootstrap-scrollspy.js
  73. 135 0
      web/bundles/admingeneratorgenerator/js/bootstrap/bootstrap-tab.js
  74. 275 0
      web/bundles/admingeneratorgenerator/js/bootstrap/bootstrap-tooltip.js
  75. 60 0
      web/bundles/admingeneratorgenerator/js/bootstrap/bootstrap-transition.js
  76. 318 0
      web/bundles/admingeneratorgenerator/js/bootstrap/bootstrap-typeahead-extended.js
  77. 300 0
      web/bundles/admingeneratorgenerator/js/bootstrap/bootstrap-typeahead.js
  78. 13 0
      web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.br.js
  79. 13 0
      web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.cs.js
  80. 13 0
      web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.da.js
  81. 13 0
      web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.de.js
  82. 13 0
      web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.es.js
  83. 13 0
      web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.fi.js
  84. 13 0
      web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.fr.js
  85. 13 0
      web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.id.js
  86. 13 0
      web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.is.js
  87. 13 0
      web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.it.js
  88. 13 0
      web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.ja.js
  89. 13 0
      web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.kr.js
  90. 15 0
      web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.lt.js
  91. 15 0
      web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.lv.js
  92. 13 0
      web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.ms.js
  93. 13 0
      web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.nb.js
  94. 13 0
      web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.nl.js
  95. 13 0
      web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.pl.js
  96. 14 0
      web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.pt.js
  97. 13 0
      web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.ru.js
  98. 13 0
      web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.sv.js
  99. 13 0
      web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.th.js
  100. 0 0
      web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.tr.js

+ 3 - 0
app/AppKernel.php View File

@@ -28,6 +28,9 @@ class AppKernel extends Kernel
28 28
             //new Sonata\AdminBundle\SonataAdminBundle(),
29 29
             //new Knp\Bundle\MenuBundle\KnpMenuBundle(),
30 30
             new Gregwar\ImageBundle\GregwarImageBundle(),
31
+            new Admingenerator\GeneratorBundle\AdmingeneratorGeneratorBundle(),
32
+            new Knp\Bundle\MenuBundle\KnpMenuBundle(),
33
+            new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
31 34
             
32 35
             new Muzich\CoreBundle\MuzichCoreBundle(),
33 36
             new Muzich\UserBundle\MuzichUserBundle(),

+ 4 - 1
app/config/routing.yml View File

@@ -64,4 +64,7 @@ MuzichFavoriteBundle:
64 64
 MuzichCommentBundle:
65 65
   resource: "@MuzichCommentBundle/Resources/config/routing.yml"
66 66
   prefix:   /{_locale}/
67
-  
67
+  
68
+AdmingeneratorGeneratorBundle_Dashboard:
69
+    resource: "@AdmingeneratorGeneratorBundle/Resources/config/routing.yml"
70
+    prefix:   /

+ 8 - 0
web/bundles/admingeneratorgenerator/css/admingenerator/collection.css View File

@@ -0,0 +1,8 @@
1
+/* Collection form styles
2
+ * ------------------------------------------------------------------------- */
3
+
4
+/* Set fallback background for collection-item */
5
+tbody.collection > tr,
6
+div.collection > fieldset {
7
+    background-color: #fff;
8
+}

+ 36 - 0
web/bundles/admingeneratorgenerator/css/admingenerator/filetypeicons.css View File

@@ -0,0 +1,36 @@
1
+/* Filetype icon styles
2
+ * ------------------------------------------------------------------------- */
3
+
4
+.fileicon {
5
+    /* Block styles */
6
+    display:  inline-block;
7
+    overflow: hidden;
8
+    width:    128px;
9
+    height:   128px;
10
+    /* Box model */
11
+	-webkit-box-sizing:   border-box; /* Safari/Chrome, other WebKit */
12
+	-moz-box-sizing:      border-box; /* Firefox, other Gecko */
13
+	box-sizing:           border-box; /* Opera/IE 8+ */
14
+    /* Font positioning */
15
+    text-align:   center;
16
+    padding-top:  86px;
17
+    line-height:  13px;    
18
+    /* Font styles */
19
+    font-size:    13px;
20
+    color:        #aaa;
21
+    font-weight:  bold;
22
+    font-family:  Arial, sans-serif;
23
+    text-shadow:  1px 1px 0px #fff;
24
+}
25
+
26
+.fileicon.audio           { background: url('../../img/filetypeicons/audio.png') no-repeat top center; }
27
+.fileicon.archive         { background: url('../../img/filetypeicons/archive.png') no-repeat top center; }
28
+.fileicon.html            { background: url('../../img/filetypeicons/html.png') no-repeat top center; }
29
+.fileicon.image           { background: url('../../img/filetypeicons/image.png') no-repeat top center; }
30
+.fileicon.pdf-document    { background: url('../../img/filetypeicons/pdf-document.png') no-repeat top center; }
31
+.fileicon.plain-text      { background: url('../../img/filetypeicons/plain-text.png') no-repeat top center; }
32
+.fileicon.presentation    { background: url('../../img/filetypeicons/presentation.png') no-repeat top center; }
33
+.fileicon.spreadsheet     { background: url('../../img/filetypeicons/spreadsheet.png') no-repeat top center; }
34
+.fileicon.text-document   { background: url('../../img/filetypeicons/text-document.png') no-repeat top center; }
35
+.fileicon.unknown         { background: url('../../img/filetypeicons/unknown.png') no-repeat top center; }
36
+.fileicon.video           { background: url('../../img/filetypeicons/video.png') no-repeat top center; }

+ 79 - 0
web/bundles/admingeneratorgenerator/css/admingenerator/form/single-upload.css View File

@@ -0,0 +1,79 @@
1
+/* Single upload form styles
2
+ * Requires: upload.css
3
+ * ------------------------------------------------------------------------- */
4
+
5
+/* Preview images style */
6
+.single-upload-preview {
7
+    border: 3px dashed #EEEEEE; 
8
+    border-top: 1px solid #DDDDDD; 
9
+    border-radius: 0px 0px 8px 8px; 
10
+    padding: 15px;
11
+}
12
+
13
+.single-upload-preview [class*="_preview_image"] {
14
+    text-align: center;
15
+}
16
+
17
+/* Shift filename under preview */
18
+.single-upload-preview img {
19
+    margin-bottom: 8px;
20
+}
21
+
22
+/* Single upload buttonbar styles */
23
+.singleupload-buttonbar {
24
+    padding: 5px 10px;
25
+}
26
+
27
+.singleupload-buttonbar > span,
28
+.singleupload-buttonbar > div,
29
+.singleupload-buttonbar > button,
30
+.singleupload-buttonbar > input {
31
+    display: inline-block;
32
+    margin-top: 5px;
33
+    margin-bottom: 5px;
34
+    vertical-align: top;
35
+}
36
+
37
+.singleupload-controls-wrapper {
38
+    margin-left: 5px;
39
+    white-space: nowrap;
40
+}
41
+
42
+/* Fixing ui-effects-wrapper styles */
43
+.singleupload-buttonbar .btn-wrapper {
44
+    position: relative;
45
+    display: inline-block !important;
46
+    vertical-align: top;    /* Firefox overflow:hidden + display:inline-block combo misallignement fix */
47
+    *display: inline !important;
48
+    /* IE7 inline-block hack */
49
+
50
+    *zoom: 1 !important;
51
+    font-size: 0 !important;
52
+}
53
+
54
+.singleupload-buttonbar .btn-wrapper > .btn,
55
+.singleupload-buttonbar .btn-wrapper > .ui-effects-wrapper {
56
+    margin-right: 5px !important;
57
+}
58
+
59
+.singleupload-buttonbar .btn-wrapper > .ui-effects-wrapper .btn {
60
+    height: auto !important;
61
+    width: auto !important;
62
+}
63
+
64
+/* Negative indent if preceded by another wrapped button */
65
+.singleupload-buttonbar .btn-wrapper + .btn-wrapper:not(.removed) > .ui-effects-wrapper {
66
+    position: relative;
67
+    left: -2px;
68
+    z-index: 999;
69
+    margin-left: -100% !important;
70
+}
71
+
72
+/* Fix margin for removed wrapper */
73
+.singleupload-buttonbar .btn-wrapper.removed {
74
+    margin-left: 5px;
75
+}
76
+
77
+.single-upload + .help-block {
78
+    margin-top: 20px;
79
+}

+ 13 - 0
web/bundles/admingeneratorgenerator/css/admingenerator/general.css View File

@@ -0,0 +1,13 @@
1
+/* General styles
2
+-------------------------------------------------- */
3
+
4
+/* Block scrolling */
5
+html, body {
6
+    overflow-x: hidden;
7
+}
8
+
9
+/* Padding for top static navbar */
10
+body {
11
+    padding-top: 60px;
12
+    padding-bottom: 40px;
13
+}

+ 160 - 0
web/bundles/admingeneratorgenerator/css/admingenerator/nested-list.css View File

@@ -0,0 +1,160 @@
1
+/* Prepend expander icon to expandable nodes
2
+ * ------------------------------------------------------------------------- */
3
+
4
+/* NonExpandable nodes have no icon */
5
+.treeTable tbody tr .icon-expander {
6
+    visibility: hidden;
7
+    -moz-user-select: none; 
8
+    -khtml-user-select: none; 
9
+    -webkit-user-select: none; 
10
+    -o-user-select: none; 
11
+}
12
+
13
+/* Collapsed branch: icon-chevron-right */
14
+.treeTable tbody tr.parent.collapsed .icon-expander {
15
+    background-position: -456px -72px;
16
+    visibility: visible;
17
+}
18
+
19
+/* Expanded branch: icon-chevron-down */
20
+.treeTable tbody tr.parent.expanded .icon-expander {
21
+    background-position: -313px -119px;
22
+    visibility: visible;
23
+}
24
+
25
+/* Non-transparent  helper row backgrounds
26
+ * ------------------------------------------------------------------------- */
27
+.nested-helper tr {
28
+    background-color: #FFFFFF;
29
+}
30
+
31
+/* Fade out dragged helper rows
32
+ * ============================
33
+ * Requires: CSS3 support
34
+ * Else: no fade out applied, all rows will be visible
35
+ * ------------------------------------------------------------------------- */
36
+
37
+/* Style 1'st displayed row */
38
+.nested-helper tr:nth-child(1)
39
+{ opacity: 0.80 !important; }
40
+.nested-helper tr:nth-child(1) th,
41
+.nested-helper tr:nth-child(1) td
42
+{ border-top: 1px solid rgba(221, 221, 221, 0.80) !important; }
43
+
44
+/* Style 2'nd displayed row */
45
+.nested-helper tr:not(.ui-helper-hidden)~tr
46
+{ opacity: 0.65 !important; }
47
+.nested-helper tr:not(.ui-helper-hidden)~tr th,
48
+.nested-helper tr:not(.ui-helper-hidden)~tr td
49
+{ border-top: 1px solid rgba(221, 221, 221, 0.65) !important; }
50
+
51
+/* Style 3'rd displayed row */
52
+.nested-helper tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr
53
+{ opacity: 0.50 !important; }
54
+.nested-helper tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr th,
55
+.nested-helper tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr td
56
+{ border-top: 1px solid rgba(221, 221, 221, 0.50) !important; }
57
+
58
+/* Style 4'th displayed row */
59
+.nested-helper tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr
60
+{ opacity: 0.35 !important; }
61
+.nested-helper tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr th,
62
+.nested-helper tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr td
63
+{ border-top: 1px solid rgba(221, 221, 221, 0.35) !important; }
64
+
65
+/* Style 5'th displayed row */
66
+.nested-helper tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr
67
+{ opacity: 0.20 !important; }
68
+.nested-helper tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr th,
69
+.nested-helper tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr td
70
+{ border-top: 1px solid rgba(221, 221, 221, 0.20) !important; }
71
+
72
+/* Style 6'th displayed row */
73
+.nested-helper tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr
74
+{ opacity: 0.05 !important; }
75
+.nested-helper tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr th,
76
+.nested-helper tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr td
77
+{ border-top: 1px solid rgba(221, 221, 221, 0.05) !important; }
78
+
79
+/* Style all displayed rows below 6'th */
80
+.nested-helper tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr
81
+{ opacity: 0 !important; }
82
+.nested-helper tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr th,
83
+.nested-helper tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr:not(.ui-helper-hidden)~tr td
84
+{ border-top: 1px solid rgba(221, 221, 221, 0) !important; }
85
+
86
+/* Droppable action highlight, Selected row highlight
87
+ * ==================================================
88
+ * Requires: CSS2 support
89
+ * Else: expander and droppable action icons won't be visible
90
+ * ------------------------------------------------------------------------- */
91
+
92
+.treeTable tbody tr.droppable-before,
93
+.treeTable tbody tr.droppable-after{
94
+    box-shadow: 0 0 10px 5px rgba(73, 175, 205, 0.25);
95
+}
96
+
97
+.treeTable tbody tr.droppable-before > td:first-child:before,
98
+.treeTable tbody tr.droppable-after > td:first-child:before {
99
+    position: relative;
100
+    display: inline-block;
101
+    width: 14px;
102
+    height: 14px;
103
+    content: '';
104
+    margin-top: 1px;
105
+    margin-right: -14px;
106
+    left: 5px;
107
+    line-height: 14px;
108
+    vertical-align: text-top;
109
+    background-image: url("../img/glyphicons-halflings.png");
110
+    background-position: 14px 14px;
111
+    background-repeat: no-repeat;
112
+    cursor: pointer;
113
+}
114
+
115
+/* Insert before: icon-share-alt */
116
+.treeTable tbody tr.droppable-before > td:first-child:before {
117
+    background-position: -336px -96px;
118
+    top: -14px;
119
+}
120
+
121
+/* Insert after: flipped icon-share-alt */
122
+.treeTable tbody tr.droppable-after > td:first-child:before {
123
+    background-position: -336px -96px;
124
+    bottom: -14px;
125
+    
126
+    -webkit-transform:scaleY(-1);
127
+    -moz-transform:scaleY(-1);
128
+    -ms-transform:scaleY(-1);
129
+    -o-transform:scaleY(-1);
130
+    transform:scaleY(-1);
131
+}
132
+
133
+/* Highlight selected row */
134
+.treeTable tbody tr.selected,
135
+.treeTable tbody tr.droppable-in {
136
+    background-color: #0088CC;
137
+    color: #fff;
138
+}
139
+
140
+/* Use white icon set in selected rows */
141
+.treeTable tbody tr.selected [class^="icon-"],
142
+.treeTable tbody tr.droppable-in [class^="icon-"],
143
+.treeTable tbody tr.selected [class*=" icon-"],
144
+.treeTable tbody tr.droppable-in [class*=" icon-"],
145
+.treeTable tbody tr.parent.selected td:first-child:before,
146
+.treeTable tbody tr.parent.droppable-in td:first-child:before {
147
+    background-image: url("../img/glyphicons-halflings-white.png") !important;
148
+}
149
+
150
+/* Remove cell backgrounds to make row background visible */
151
+.treeTable tbody tr.selected td, .treeTable tbody tr.droppable-in td, 
152
+.treeTable tbody tr.selected th, .treeTable tbody tr.droppable-in th {
153
+    background-color: transparent !important;
154
+}
155
+
156
+/* jQuery UI layout helpers
157
+ * ========================
158
+ * This way I don't have to require the full jQuery UI CSS to be loaded.
159
+ * ------------------------------------------------------------------------- */
160
+.ui-helper-hidden { display: none; }

+ 25 - 0
web/bundles/admingeneratorgenerator/css/admingenerator/upload.css View File

@@ -0,0 +1,25 @@
1
+/* Upload form styles
2
+ * ------------------------------------------------------------------------- */
3
+
4
+/* Set fallback background for files_list item */
5
+tbody.files > tr {
6
+    background-color: #fff;
7
+}
8
+
9
+/* Add grab cursor when hovering over sortable element */
10
+tbody.files.sortable > tr.template-download:hover {
11
+    cursor: url('../cur/openhand.cur'), move;
12
+    cursor: url('../cur/openhand.cur') 4 4, move;
13
+    cursor: -webkit-grab; 
14
+    cursor: -moz-grab;
15
+    cursor: move\9; /* fallback cursor for IE */
16
+}
17
+
18
+/* Add grabbing cursor when sorting */
19
+tbody.files.sortable > tr.template-download.ui-sortable-helper:hover {
20
+    cursor: url('../cur/closedhand.cur'), move;
21
+    cursor: url('../cur/closedhand.cur') 4 4, move;
22
+    cursor: -webkit-grabbing; 
23
+    cursor: -moz-grabbing;
24
+    cursor: move\9; /* fallback cursor for IE */
25
+}

+ 223 - 0
web/bundles/admingeneratorgenerator/css/bootstrap/bootstrap-datepicker.css View File

@@ -0,0 +1,223 @@
1
+/*!
2
+ * Datepicker for Bootstrap
3
+ *
4
+ * Copyright 2012 Stefan Petre
5
+ * Improvements by Andrew Rowls
6
+ * Licensed under the Apache License v2.0
7
+ * http://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ */
10
+.datepicker {
11
+  top: 0;
12
+  left: 0;
13
+  padding: 4px;
14
+  margin-top: 1px;
15
+  -webkit-border-radius: 4px;
16
+  -moz-border-radius: 4px;
17
+  border-radius: 4px;
18
+  /*.dow {
19
+		border-top: 1px solid #ddd !important;
20
+	}*/
21
+
22
+}
23
+.datepicker:before {
24
+  content: '';
25
+  display: inline-block;
26
+  border-left: 7px solid transparent;
27
+  border-right: 7px solid transparent;
28
+  border-bottom: 7px solid #ccc;
29
+  border-bottom-color: rgba(0, 0, 0, 0.2);
30
+  position: absolute;
31
+  top: -7px;
32
+  left: 6px;
33
+}
34
+.datepicker:after {
35
+  content: '';
36
+  display: inline-block;
37
+  border-left: 6px solid transparent;
38
+  border-right: 6px solid transparent;
39
+  border-bottom: 6px solid #ffffff;
40
+  position: absolute;
41
+  top: -6px;
42
+  left: 7px;
43
+}
44
+.datepicker > div {
45
+  display: none;
46
+}
47
+.datepicker.days div.datepicker-days {
48
+  display: block;
49
+}
50
+.datepicker.months div.datepicker-months {
51
+  display: block;
52
+}
53
+.datepicker.years div.datepicker-years {
54
+  display: block;
55
+}
56
+.datepicker table {
57
+  margin: 0;
58
+}
59
+.datepicker td,
60
+.datepicker th {
61
+  text-align: center;
62
+  width: 20px;
63
+  height: 20px;
64
+  -webkit-border-radius: 4px;
65
+  -moz-border-radius: 4px;
66
+  border-radius: 4px;
67
+}
68
+.datepicker td.day:hover {
69
+  background: #eeeeee;
70
+  cursor: pointer;
71
+}
72
+.datepicker td.old,
73
+.datepicker td.new {
74
+  color: #999999;
75
+}
76
+.datepicker td.disabled,
77
+.datepicker td.disabled:hover {
78
+  background: none;
79
+  color: #999999;
80
+  cursor: default;
81
+}
82
+.datepicker td.active,
83
+.datepicker td.active:hover,
84
+.datepicker td.active.disabled,
85
+.datepicker td.active.disabled:hover {
86
+  background-color: #006dcc;
87
+  background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
88
+  background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
89
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
90
+  background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
91
+  background-image: -o-linear-gradient(top, #0088cc, #0044cc);
92
+  background-image: linear-gradient(top, #0088cc, #0044cc);
93
+  background-repeat: repeat-x;
94
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
95
+  border-color: #0044cc #0044cc #002a80;
96
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
97
+  filter: progid:dximagetransform.microsoft.gradient(enabled=false);
98
+  color: #fff;
99
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
100
+}
101
+.datepicker td.active:hover,
102
+.datepicker td.active:hover:hover,
103
+.datepicker td.active.disabled:hover,
104
+.datepicker td.active.disabled:hover:hover,
105
+.datepicker td.active:active,
106
+.datepicker td.active:hover:active,
107
+.datepicker td.active.disabled:active,
108
+.datepicker td.active.disabled:hover:active,
109
+.datepicker td.active.active,
110
+.datepicker td.active:hover.active,
111
+.datepicker td.active.disabled.active,
112
+.datepicker td.active.disabled:hover.active,
113
+.datepicker td.active.disabled,
114
+.datepicker td.active:hover.disabled,
115
+.datepicker td.active.disabled.disabled,
116
+.datepicker td.active.disabled:hover.disabled,
117
+.datepicker td.active[disabled],
118
+.datepicker td.active:hover[disabled],
119
+.datepicker td.active.disabled[disabled],
120
+.datepicker td.active.disabled:hover[disabled] {
121
+  background-color: #0044cc;
122
+}
123
+.datepicker td.active:active,
124
+.datepicker td.active:hover:active,
125
+.datepicker td.active.disabled:active,
126
+.datepicker td.active.disabled:hover:active,
127
+.datepicker td.active.active,
128
+.datepicker td.active:hover.active,
129
+.datepicker td.active.disabled.active,
130
+.datepicker td.active.disabled:hover.active {
131
+  background-color: #003399 \9;
132
+}
133
+.datepicker td span {
134
+  display: block;
135
+  width: 23%;
136
+  height: 54px;
137
+  line-height: 54px;
138
+  float: left;
139
+  margin: 1%;
140
+  cursor: pointer;
141
+  -webkit-border-radius: 4px;
142
+  -moz-border-radius: 4px;
143
+  border-radius: 4px;
144
+}
145
+.datepicker td span:hover {
146
+  background: #eeeeee;
147
+}
148
+.datepicker td span.disabled,
149
+.datepicker td span.disabled:hover {
150
+  background: none;
151
+  color: #999999;
152
+  cursor: default;
153
+}
154
+.datepicker td span.active,
155
+.datepicker td span.active:hover,
156
+.datepicker td span.active.disabled,
157
+.datepicker td span.active.disabled:hover {
158
+  background-color: #006dcc;
159
+  background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
160
+  background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
161
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
162
+  background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
163
+  background-image: -o-linear-gradient(top, #0088cc, #0044cc);
164
+  background-image: linear-gradient(top, #0088cc, #0044cc);
165
+  background-repeat: repeat-x;
166
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
167
+  border-color: #0044cc #0044cc #002a80;
168
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
169
+  filter: progid:dximagetransform.microsoft.gradient(enabled=false);
170
+  color: #fff;
171
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
172
+}
173
+.datepicker td span.active:hover,
174
+.datepicker td span.active:hover:hover,
175
+.datepicker td span.active.disabled:hover,
176
+.datepicker td span.active.disabled:hover:hover,
177
+.datepicker td span.active:active,
178
+.datepicker td span.active:hover:active,
179
+.datepicker td span.active.disabled:active,
180
+.datepicker td span.active.disabled:hover:active,
181
+.datepicker td span.active.active,
182
+.datepicker td span.active:hover.active,
183
+.datepicker td span.active.disabled.active,
184
+.datepicker td span.active.disabled:hover.active,
185
+.datepicker td span.active.disabled,
186
+.datepicker td span.active:hover.disabled,
187
+.datepicker td span.active.disabled.disabled,
188
+.datepicker td span.active.disabled:hover.disabled,
189
+.datepicker td span.active[disabled],
190
+.datepicker td span.active:hover[disabled],
191
+.datepicker td span.active.disabled[disabled],
192
+.datepicker td span.active.disabled:hover[disabled] {
193
+  background-color: #0044cc;
194
+}
195
+.datepicker td span.active:active,
196
+.datepicker td span.active:hover:active,
197
+.datepicker td span.active.disabled:active,
198
+.datepicker td span.active.disabled:hover:active,
199
+.datepicker td span.active.active,
200
+.datepicker td span.active:hover.active,
201
+.datepicker td span.active.disabled.active,
202
+.datepicker td span.active.disabled:hover.active {
203
+  background-color: #003399 \9;
204
+}
205
+.datepicker td span.old {
206
+  color: #999999;
207
+}
208
+.datepicker th.switch {
209
+  width: 145px;
210
+}
211
+.datepicker thead tr:first-child th {
212
+  cursor: pointer;
213
+}
214
+.datepicker thead tr:first-child th:hover {
215
+  background: #eeeeee;
216
+}
217
+.input-append.date .add-on i,
218
+.input-prepend.date .add-on i {
219
+  display: block;
220
+  cursor: pointer;
221
+  width: 16px;
222
+  height: 16px;
223
+}

+ 262 - 0
web/bundles/admingeneratorgenerator/css/bootstrap/bootstrap-extended.css View File

@@ -0,0 +1,262 @@
1
+/* List sorting styles */
2
+
3
+.sorted-asc, .sorted-desc {
4
+    border-left: 5px solid transparent;
5
+    border-right: 5px solid transparent;
6
+    border-top: 5px solid #0088CC;
7
+    content: "";
8
+    width: 0;
9
+    height: 0;
10
+    display: inline-block;
11
+    vertical-align: top;
12
+    margin-top: 7px;
13
+    margin-left: 4px;
14
+}
15
+
16
+.sorted-desc {
17
+    border-top: 0px solid transparent;
18
+    border-bottom: 5px solid #0088CC;
19
+}
20
+
21
+/* List pagination styles */
22
+
23
+.pagination {
24
+    margin: 0;
25
+}
26
+
27
+.btn-toolbar + .pagination {
28
+   margin-top: 5px;
29
+}
30
+
31
+/* Fieldset styles */
32
+
33
+.row-fluid > .form_field {
34
+    -moz-box-sizing: border-box;
35
+    display: block;
36
+    float: left;
37
+    margin-right: 2.5641%;
38
+    min-height: 30px;
39
+}
40
+
41
+.row-fluid > .form_field:last-child {
42
+    margin-right: 0;
43
+}
44
+
45
+.row-fluid > .form_field:only-child {
46
+    width: 100%;
47
+}
48
+
49
+fieldset {
50
+  border: 1px solid #DDDDDD;
51
+  border-radius: 8px;
52
+  padding: 10px 20px;
53
+  margin: 0;
54
+}
55
+
56
+fieldset legend {
57
+  border: 0 none; 
58
+  margin: 0 0 0 -8px;
59
+  width: auto;
60
+}
61
+
62
+fieldset legend span {
63
+  background-color: #FFF; 
64
+  padding: 0 8px;
65
+}
66
+
67
+legend + .control-group {
68
+  margin-top: 0px;
69
+}
70
+
71
+/* Entitypicker styles */
72
+
73
+ul.typeahead.dropdown-menu blockquote {
74
+    border: 0 none;
75
+    margin: 0;
76
+}
77
+
78
+ul.typeahead.dropdown-menu div:first-of-type > blockquote {
79
+    padding: 0;
80
+}
81
+
82
+ul.typeahead.dropdown-menu blockquote small:before, 
83
+ul.typeahead.dropdown-menu blockquote small:after {
84
+    content: "";
85
+}
86
+
87
+ul.typeahead.dropdown-menu blockquote .label,
88
+ul.typeahead.dropdown-menu blockquote .badge {
89
+    margin-left: 4px;
90
+}
91
+
92
+ul.typeahead.dropdown-menu blockquote .label:first-of-type,
93
+ul.typeahead.dropdown-menu blockquote .badge:first-of-type {
94
+    margin-left: 0;
95
+}
96
+
97
+.typeahead.dropdown-menu .active > a .muted, 
98
+.typeahead.dropdown-menu .active > a:hover .muted {
99
+    color: #e4e4e4;
100
+}
101
+
102
+/* Table additional styles */
103
+
104
+.table.table-shrinked {
105
+  display: inline-block;
106
+}
107
+
108
+/* Table collection styles */
109
+
110
+tr.collection-item th.new-label {
111
+  white-space: nowrap;
112
+  padding-right: 20px;
113
+}
114
+
115
+tr.collection-item > td:first-of-type {
116
+  width: 100%;
117
+}
118
+
119
+tr.collection-item > td:last-of-type {
120
+  white-space: nowrap;
121
+}
122
+
123
+tr.collection-item > td > fieldset:last-child {
124
+  margin-bottom: 20px;
125
+}
126
+
127
+tr.collection-item > td:last-of-type > .delete {
128
+  padding: 3px 6px;
129
+  -webkit-border-radius: 40px;
130
+     -moz-border-radius: 40px;
131
+          border-radius: 40px;
132
+}
133
+
134
+tr.collection-item > td:last-of-type > .delete {
135
+  margin-left: 5px;
136
+}
137
+
138
+tr.collection-item > td:last-of-type > .btn-toggle {
139
+  margin-left: 20px;
140
+}
141
+
142
+/* Fieldset collection styles */
143
+
144
+fieldset.collection-item {
145
+  position: relative;
146
+  padding-bottom: 20px;
147
+  margin-right: 30px;
148
+  display: inline-block;
149
+  vertical-align: top
150
+}
151
+
152
+fieldset.collection-item > legend > label {
153
+  display: inline;
154
+  margin: 0;
155
+  font-size: inherit;
156
+  font-weight: inherit;
157
+  line-height: inherit;
158
+}
159
+
160
+fieldset.collection-item > .delete {
161
+  position: absolute;
162
+  top: 5px;
163
+  right: -15px;
164
+  padding: 3px 6px;
165
+  -webkit-border-radius: 40px;
166
+     -moz-border-radius: 40px;
167
+          border-radius: 40px;
168
+}
169
+
170
+fieldset.collection-item > .btn-toggle {
171
+  position: absolute;
172
+  top: 5px;
173
+  right: 20px;
174
+  padding: 3px 6px;
175
+  opacity: 1;
176
+  background-color: #efefef;
177
+  border-color: #d9d9d9;
178
+}
179
+
180
+fieldset.collection-item > .btn-toggle > input[type="checkbox"] {
181
+  opacity: 0.65;
182
+}
183
+
184
+/* Form error styles */
185
+ul.form-errors {
186
+  margin-left: 15px;
187
+}
188
+
189
+/* Remove firefox grey dotted focus outline */
190
+a:focus, .btn:focus {
191
+  outline: none;
192
+}
193
+
194
+input[type="checkbox"] {
195
+  outline: none !important;
196
+}
197
+
198
+button::-moz-focus-inner, select::-moz-focus-inner {
199
+  border: 0;
200
+}
201
+
202
+/* File input */
203
+
204
+.fileinput {
205
+  position: relative;
206
+  overflow: hidden;
207
+}
208
+
209
+.fileinput input[type="file"] {
210
+    -moz-border-bottom-colors: none;
211
+    -moz-border-left-colors: none;
212
+    -moz-border-right-colors: none;
213
+    -moz-border-top-colors: none;
214
+    border-color: transparent;
215
+    border-image: none;
216
+    border-style: solid;
217
+    border-width: 0 0 100px 200px;
218
+    cursor: pointer;
219
+    direction: ltr;
220
+    margin: 0;
221
+    opacity: 0;
222
+    position: absolute;
223
+    right: 0;
224
+    top: 0;
225
+    transform: translate(-300px, 0px) scale(4);
226
+    height: 30px;
227
+    line-height: 30px;
228
+}
229
+
230
+/* Upload presentation table styles */
231
+tbody.files > tr > td {
232
+  padding-top: 10px;
233
+  padding-bottom: 10px;
234
+}
235
+
236
+tbody.files > tr > td.delete {
237
+  padding-top: 0px;
238
+  padding-bottom: 0px;
239
+}
240
+
241
+tbody.files > tr > td > span {
242
+  line-height: 20px;
243
+  padding: 4px 0px; 
244
+}
245
+
246
+/* Additional text styles */
247
+.justify {
248
+  text-align: justify;
249
+}
250
+
251
+/* Toogle selection button */
252
+.btn.btn-toggle {
253
+  padding: 3px 6px;
254
+  cursor: pointer;
255
+}
256
+
257
+/* Actions toolbar */
258
+.form-actions.form-actions-condensed {
259
+  padding: 10px;
260
+  margin: 0px;
261
+  border: 0 none;
262
+}

+ 5 - 0
web/bundles/admingeneratorgenerator/css/bootstrap/bootstrap-responsive-extended.css View File

@@ -0,0 +1,5 @@
1
+@media (max-width: 979px) {
2
+  body {
3
+      padding-top: 0px !important;
4
+  }
5
+}

File diff suppressed because it is too large
+ 1058 - 0
web/bundles/admingeneratorgenerator/css/bootstrap/bootstrap-responsive.css


File diff suppressed because it is too large
+ 5774 - 0
web/bundles/admingeneratorgenerator/css/bootstrap/bootstrap.css


+ 30 - 0
web/bundles/admingeneratorgenerator/css/google/prettify.css View File

@@ -0,0 +1,30 @@
1
+.com { color: #93a1a1; }
2
+.lit { color: #195f91; }
3
+.pun, .opn, .clo { color: #93a1a1; }
4
+.fun { color: #dc322f; }
5
+.str, .atv { color: #D14; }
6
+.kwd, .prettyprint .tag { color: #1e347b; }
7
+.typ, .atn, .dec, .var { color: teal; }
8
+.pln { color: #48484c; }
9
+
10
+.prettyprint {
11
+  padding: 8px;
12
+  background-color: #f7f7f9;
13
+  border: 1px solid #e1e1e8;
14
+}
15
+.prettyprint.linenums {
16
+  -webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
17
+     -moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
18
+          box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
19
+}
20
+
21
+/* Specify class=linenums on a pre to get line numbering */
22
+ol.linenums {
23
+  margin: 0 0 0 33px; /* IE indents via margin-left */
24
+}
25
+ol.linenums li {
26
+  padding-left: 12px;
27
+  color: #bebec5;
28
+  line-height: 20px;
29
+  text-shadow: 0 1px 0 #fff;
30
+}

BIN
web/bundles/admingeneratorgenerator/css/img/glyphicons-halflings-white.png View File


BIN
web/bundles/admingeneratorgenerator/css/img/glyphicons-halflings.png View File


BIN
web/bundles/admingeneratorgenerator/css/jquery-ui/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png View File


BIN
web/bundles/admingeneratorgenerator/css/jquery-ui/smoothness/images/ui-bg_flat_75_ffffff_40x100.png View File


BIN
web/bundles/admingeneratorgenerator/css/jquery-ui/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png View File


BIN
web/bundles/admingeneratorgenerator/css/jquery-ui/smoothness/images/ui-bg_glass_65_ffffff_1x400.png View File


BIN
web/bundles/admingeneratorgenerator/css/jquery-ui/smoothness/images/ui-bg_glass_75_dadada_1x400.png View File


BIN
web/bundles/admingeneratorgenerator/css/jquery-ui/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png View File


BIN
web/bundles/admingeneratorgenerator/css/jquery-ui/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png View File


BIN
web/bundles/admingeneratorgenerator/css/jquery-ui/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png View File


BIN
web/bundles/admingeneratorgenerator/css/jquery-ui/smoothness/images/ui-icons_222222_256x240.png View File


BIN
web/bundles/admingeneratorgenerator/css/jquery-ui/smoothness/images/ui-icons_2e83ff_256x240.png View File


BIN
web/bundles/admingeneratorgenerator/css/jquery-ui/smoothness/images/ui-icons_454545_256x240.png View File


BIN
web/bundles/admingeneratorgenerator/css/jquery-ui/smoothness/images/ui-icons_888888_256x240.png View File


BIN
web/bundles/admingeneratorgenerator/css/jquery-ui/smoothness/images/ui-icons_cd0a0a_256x240.png View File


File diff suppressed because it is too large
+ 5 - 0
web/bundles/admingeneratorgenerator/css/jquery-ui/smoothness/jquery-ui-1.9.2.custom.min.css


BIN
web/bundles/admingeneratorgenerator/cur/closedhand.cur View File


BIN
web/bundles/admingeneratorgenerator/cur/openhand.cur View File


BIN
web/bundles/admingeneratorgenerator/ico/apple-touch-icon-114-precomposed.png View File


BIN
web/bundles/admingeneratorgenerator/ico/apple-touch-icon-144-precomposed.png View File


BIN
web/bundles/admingeneratorgenerator/ico/apple-touch-icon-57-precomposed.png View File


BIN
web/bundles/admingeneratorgenerator/ico/apple-touch-icon-72-precomposed.png View File


BIN
web/bundles/admingeneratorgenerator/ico/favicon.ico View File


BIN
web/bundles/admingeneratorgenerator/img/filetypeicons/archive.png View File


BIN
web/bundles/admingeneratorgenerator/img/filetypeicons/audio.png View File


BIN
web/bundles/admingeneratorgenerator/img/filetypeicons/html.png View File


BIN
web/bundles/admingeneratorgenerator/img/filetypeicons/image.png View File


+ 24 - 0
web/bundles/admingeneratorgenerator/img/filetypeicons/license.txt View File

@@ -0,0 +1,24 @@
1
+**********************************
2
+Symfony2 Admingenerator File Icons
3
+==================================
4
+
5
+created by loostro <loostro@gmail.com>
6
+
7
+a derrivative work from Filetypeicons.com.
8
+
9
+Thanks to FileSquare for shareing!
10
+Visit their website!
11
+
12
+
13
+**********************************
14
+# Original work: Filetypeicons.com
15
+==================================
16
+
17
+brought to you by FileSquare 
18
+http://www.filesq.com
19
+
20
+
21
+This work is licensed under 
22
+
23
+Creative Commons Attribution-ShareAlike 3.0 Hong Kong License
24
+http://creativecommons.org/licenses/by-sa/3.0/hk/

BIN
web/bundles/admingeneratorgenerator/img/filetypeicons/pdf-document.png View File


BIN
web/bundles/admingeneratorgenerator/img/filetypeicons/plain-text.png View File


BIN
web/bundles/admingeneratorgenerator/img/filetypeicons/presentation.png View File


BIN
web/bundles/admingeneratorgenerator/img/filetypeicons/spreadsheet.png View File


BIN
web/bundles/admingeneratorgenerator/img/filetypeicons/text-document.png View File


BIN
web/bundles/admingeneratorgenerator/img/filetypeicons/unknown.png View File


BIN
web/bundles/admingeneratorgenerator/img/filetypeicons/video.png View File


+ 63 - 0
web/bundles/admingeneratorgenerator/javascripts/double_list.js View File

@@ -0,0 +1,63 @@
1
+var sfDoubleList =
2
+{
3
+  init: function(id, className)
4
+  {
5
+    form = sfDoubleList.get_current_form(id);
6
+
7
+    callback = function() { sfDoubleList.submit(form, className) };
8
+
9
+    if (form.addEventListener)
10
+    {
11
+      form.addEventListener("submit", callback, false);
12
+    }
13
+    else if (form.attachEvent)
14
+    {
15
+      var r = form.attachEvent("onsubmit", callback);
16
+    }
17
+  },
18
+
19
+  move: function(srcId, destId)
20
+  {
21
+    var src = document.getElementById(srcId);
22
+    var dest = document.getElementById(destId);
23
+    for (var i = 0; i < src.options.length; i++)
24
+    {
25
+      if (src.options[i].selected)
26
+      {
27
+        dest.options[dest.length] = new Option(src.options[i].text, src.options[i].value);
28
+        src.options[i] = null;
29
+        --i;
30
+      }
31
+    }
32
+  },
33
+
34
+  submit: function(form, className)
35
+  {
36
+    var element;
37
+
38
+    for (var i = 0; i < form.elements.length; i++)
39
+    {
40
+      element = form.elements[i];
41
+      if (element.type == 'select-multiple')
42
+      {
43
+        if (element.className == className + '-selected')
44
+        {
45
+          for (var j = 0; j < element.options.length; j++)
46
+          {
47
+            element.options[j].selected = true;
48
+          }
49
+        }
50
+      }
51
+    }
52
+  },
53
+
54
+  get_current_form: function(el)
55
+  {
56
+    if ("form" != el.tagName.toLowerCase())
57
+    {
58
+      return sfDoubleList.get_current_form(el.parentNode);
59
+    }
60
+
61
+    return el;
62
+  }
63
+};

+ 9 - 0
web/bundles/admingeneratorgenerator/js/admingenerator/_namespace.md View File

@@ -0,0 +1,9 @@
1
+### Admingenerator Javascript Plugins Namespace
2
+
3
+To avoid conflicts Admingenerator scripts have been moved to plugins.
4
+
5
+Admingenerator plugins use `agen$` namespace prefix.
6
+
7
+### Alphabetical list of Admingenerator plugins
8
+
9
+* **agen$**singleUpload

+ 436 - 0
web/bundles/admingeneratorgenerator/js/admingenerator/form/single-upload.js View File

@@ -0,0 +1,436 @@
1
+/*
2
+ *  Project:        Symfony2Admingenerator
3
+ *  Description:    jQuery plugin for SingleUpload form widget
4
+ *  Author:         loostro <loostro@gmail.com>
5
+ *  License:        MIT
6
+ *  Dependencies: 
7
+ *                  - blueimp / JavaScript Load Image 1.2.3
8
+ *                    https://github.com/blueimp/JavaScript-Load-Image
9
+ */
10
+
11
+// the semi-colon before function invocation is a safety net against concatenated
12
+// scripts and/or other plugins which may not be closed properly.
13
+;(function ( $, window, undefined ) {
14
+    
15
+    // undefined is used here as the undefined global variable in ECMAScript 3 is
16
+    // mutable (ie. it can be changed by someone else). undefined isn't really being
17
+    // passed in so we can ensure the value of it is truly undefined. In ES5, undefined
18
+    // can no longer be modified.
19
+    
20
+    // window is passed through as local variable rather than global
21
+    // as this (slightly) quickens the resolution process and can be more efficiently
22
+    // minified (especially when both are regularly referenced in your plugin).
23
+
24
+    // Create the defaults once
25
+    var pluginName = 'agen$singleUpload',
26
+        document = window.document,
27
+        defaults = {
28
+            maxWidth:   320,
29
+            maxHeight:  180,
30
+            minWidth:   16,
31
+            minHeight:  16,
32
+            previewImages:    true,
33
+            previewAsCanvas:  true,
34
+            isEmpty:          true,
35
+            nameable:         false,
36
+            deleteable:       false,
37
+            filetypes:  {
38
+                'audio':            "Audio",
39
+                'archive':          "Archive",
40
+                'html':             "HTML",
41
+                'image':            "Image",
42
+                'pdf-document':     "PDF<br />Document",
43
+                'plain-text':       "Plain<br />Text",
44
+                'presentation':     "Presentation",
45
+                'spreadsheet':      "Spreadsheet",
46
+                'text-document':    "Text<br />Document",
47
+                'unknown':          "Unknown<br />Filetype",
48
+                'video':            "Video"
49
+            }
50
+        };
51
+
52
+    // The actual plugin constructor
53
+    function Plugin( element, options ) {
54
+        this.element = element;
55
+
56
+        // jQuery has an extend method which merges the contents of two or
57
+        // more objects, storing the result in the first object. The first object
58
+        // is generally empty as we don't want to alter the default options for
59
+        // future instances of the plugin
60
+        this.options = $.extend( {}, defaults, options) ;
61
+        
62
+        this._defaults = defaults;
63
+        this._name = pluginName;
64
+        
65
+        this._init();
66
+    }
67
+    
68
+    Plugin.prototype = {
69
+
70
+        _init: function() {
71
+            // Plugin-scope helper
72
+            var that = this;
73
+            
74
+            // Select container
75
+            var $widgetContainer  = $('#'+that.element.id+'_widget_container');
76
+            var $cancelButton     = $widgetContainer.find('.singleupload-buttonbar .cancel');
77
+            var $deleteButton     = $widgetContainer.find('.singleupload-buttonbar .delete');
78
+            
79
+            // Grant plugin-scope access to button selectors
80
+            that.$cancelButton    = $cancelButton;
81
+            that.$deleteButton    = $deleteButton;
82
+            
83
+            // Prepare nameable behavior if enabled
84
+            if(that.options.nameable) {
85
+                var $nameableInput    = $('#'+that.element.id+'_nameable');
86
+                that.$nameableInput   = $nameableInput;
87
+                that.originalName     = $nameableInput.val();
88
+            }
89
+            
90
+            // Set isDeletable
91
+            that.isDeletable      = (!that.options.isEmpty && that.options.deleteable);
92
+            
93
+            // Add deletable behaviour
94
+            if (that.isDeletable) {
95
+                var $deleteableInput    = $('#'+that.element.id+'_deleteable');
96
+                that.$deleteableInput   = $deleteableInput;
97
+                $deleteButton.show();
98
+            }            
99
+            
100
+            // Make sure upload input is empty (prevent cached form data)
101
+            that._resetInput(that);
102
+            
103
+            // bind onChange to file input change event
104
+            $(that.element).on('change', function(){
105
+                that._onChange(that);
106
+            });
107
+            
108
+            // bind onCancel to button click event
109
+            $cancelButton.click(function(){
110
+                that._onCancel(that);
111
+            });
112
+            
113
+            // bind onDelete to button click event
114
+            $deleteButton.click(function(){
115
+                that._onDelete(that);
116
+            });
117
+        },
118
+
119
+        _onChange: function(that) {
120
+            var file = that.element.files[0]; 
121
+            
122
+            // show cancel button
123
+            that.$cancelButton.removeClass('disabled').show('slide', {direction: 'left'}, 'slow');
124
+            // hide delete button
125
+            (that.isDeletable) ? that.$deleteButton.addClass('disabled').hide('slide', {direction: 'right'}, 'slow') : '';
126
+            
127
+            // change name
128
+            (that.options.nameable) ? that.$nameableInput.removeAttr('disabled').val(file.name) : '';
129
+            
130
+            // trigger preview
131
+            (that.options.previewImages && that._isImage(file))
132
+            ?   that._onPreviewImage(that)
133
+            :   that._onPreviewFile(that);
134
+        },
135
+        
136
+        _onCancel: function(that) {
137
+            // hide cancel button
138
+            that.$cancelButton.addClass('disabled').hide('slide', {direction: 'left'}, 'slow');            
139
+            // show delete button
140
+            (that.isDeletable) ? that.$deleteButton.removeClass('disabled').show('slide', {direction: 'right'}, 'slow') : '';
141
+            
142
+            // revert name
143
+            (that.options.nameable) ? that.$nameableInput.val(that.originalName) : '';
144
+            
145
+            var $activePreview    = $('.'+that.element.id+'_preview_image.active');
146
+            var $previewDownload  = $('.'+that.element.id+'_preview_image.download');
147
+            
148
+            // sanity-check
149
+            if ($activePreview.hasClass('download')) return;
150
+            
151
+            // reset input
152
+            that._resetInput(that);
153
+            
154
+            // animate preview toggle
155
+            $previewDownload.slideDown({ 
156
+                duration: 'slow', 
157
+                queue:    false,
158
+                complete: function() { $(this).addClass('active'); }
159
+            });  
160
+            $activePreview.slideUp({ 
161
+                duration: 'slow', 
162
+                queue:    false,
163
+                complete: function() { $(this).remove(); }
164
+            });
165
+        },
166
+
167
+        _onDelete: function(that) {
168
+            var $previewDownload  = $('.'+that.element.id+'_preview_image.download');
169
+            
170
+            // sanity check
171
+            if (!that.isDeletable) return;
172
+            
173
+            // clear name
174
+            (that.options.nameable) ? that.$nameableInput.attr('disabled', 'disabled').val('') : '';
175
+            
176
+            // hide and remove delete button
177
+            that.$deleteButton.parent().addClass('removed').end()
178
+            that.$deleteButton.addClass('disabled').hide('slide', {
179
+                direction:  'left', 
180
+                queue:      false,
181
+                complete:   function(){ 
182
+                    that.$deleteButton.parent().remove(); 
183
+                }
184
+            }, 'slow');
185
+            
186
+            // hide previewDownload and remove the image
187
+            $previewDownload.slideUp({ 
188
+                duration: 'slow', 
189
+                queue:    false,
190
+                complete: function() { $(this).empty(); }
191
+            });
192
+            
193
+            // Set deletable flag
194
+            that.$deletableInput.val(true);
195
+            
196
+            // Disable delete button animation
197
+            that.isDeletable = false;
198
+        },
199
+        
200
+        _onPreviewImage: function(that) {     
201
+            var file = that.element.files[0];     
202
+            // load preview image
203
+            window.loadImage(
204
+                file,
205
+                function (img) {
206
+                    var $activePreview = $('.'+that.element.id+'_preview_image.active');
207
+                    var $previewUpload = $activePreview.clone().empty().hide().removeClass('download').addClass('upload');
208
+
209
+                    var $filelabel = $('<div/>').addClass('row-fluid').text(file.name);
210
+                    var $filesize = $('<div/>').addClass('row-fluid').text(that._bytesToSize(file.size));
211
+                    
212
+                    // create and insert new preview node
213
+                    $previewUpload.appendTo($activePreview.parent())
214
+                                  .html($(img).addClass('img-polaroid')).append($filelabel).append($filesize);
215
+                    // animate preview toggle
216
+                    $previewUpload.slideDown({
217
+                        duration: 'slow', 
218
+                        queue:    false,
219
+                        complete: function() { $(this).addClass('active'); }
220
+                    });
221
+                    $activePreview.slideUp({ 
222
+                        duration: 'slow', 
223
+                        queue:    false,
224
+                        complete: function() { 
225
+                            ($(this).hasClass('download'))
226
+                            ?   $(this).removeClass('active')
227
+                            :   $(this).remove(); 
228
+                        }
229
+                    });
230
+                }, {
231
+                    maxWidth:   that.options.maxWidth,
232
+                    maxHeight:  that.options.maxHeight,
233
+                    minWidth:   that.options.minWidth,
234
+                    minHeight:  that.options.minHeight,
235
+                    canvas:     that.options.previewAsCanvas,
236
+                    noRevoke:   true
237
+                }
238
+            );
239
+        },
240
+        
241
+        _onPreviewFile: function(that) {
242
+            var $activePreview = $('.'+that.element.id+'_preview_image.active');
243
+            var $previewUpload = $activePreview.clone().empty().hide().removeClass('download').addClass('upload');
244
+            
245
+            var file = that.element.files[0];
246
+            var filetype = that._checkFileType(that, file);
247
+            var $fileicon = $('<div/>').addClass('fileicon').addClass(filetype)
248
+                                       .html(that.options.filetypes[filetype]);
249
+            
250
+            var $filelabel = $('<div/>').addClass('row-fluid').text(file.name);
251
+            var $filesize = $('<div/>').addClass('row-fluid').text(that._bytesToSize(file.size));
252
+                                   
253
+            // create and insert new preview node
254
+            $previewUpload.appendTo($activePreview.parent())
255
+                          .html($fileicon).append($filelabel).append($filesize);
256
+            // animate preview toggle
257
+            $previewUpload.slideDown({
258
+                duration: 'slow', 
259
+                queue:    false,
260
+                complete: function() { $(this).addClass('active'); }
261
+            });
262
+            $activePreview.slideUp({ 
263
+                duration: 'slow', 
264
+                queue:    false,
265
+                complete: function() { 
266
+                    ($(this).hasClass('download'))
267
+                    ?   $(this).removeClass('active')
268
+                    :   $(this).remove(); 
269
+                }
270
+            });
271
+        },
272
+        
273
+        _bytesToSize: function(bytes) {
274
+            var kilobyte = 1024;
275
+            var megabyte = kilobyte * 1024;
276
+            var gigabyte = megabyte * 1024;
277
+            var terabyte = gigabyte * 1024;
278
+
279
+            if (bytes < kilobyte)         return bytes + ' B'; 
280
+            else if (bytes < megabyte)    return (bytes / kilobyte).toFixed(2) + ' KB';
281
+            else if (bytes < gigabyte)    return (bytes / megabyte).toFixed(2) + ' MB';
282
+            else if (bytes < terabyte)    return (bytes / gigabyte).toFixed(2) + ' GB';
283
+            else                          return (bytes / terabyte).toFixed(2) + ' TB';
284
+        },
285
+        
286
+        _checkFileType: function(that, file) {            
287
+            if (that._isAudio(file))        return 'audio';
288
+            if (that._isArchive(file))      return 'archive';
289
+            if (that._isHTML(file))         return 'html';
290
+            if (that._isImage(file))        return 'image';
291
+            if (that._isPDFDocument(file))  return 'pdf-document';
292
+            if (that._isPlainText(file))    return 'plain-text';
293
+            if (that._isPresentation(file)) return 'presentation';
294
+            if (that._isSpreadsheet(file))  return 'spreadsheet';
295
+            if (that._isTextDocument(file)) return 'text-document';
296
+            if (that._isVideo(file))        return 'video';
297
+            // else
298
+            return 'unknown';
299
+        },
300
+        
301
+        _isAudio: function(file) {
302
+            return (file.type.match('audio/.*'));
303
+        },
304
+        
305
+        _isArchive: function(file) {
306
+            return (
307
+                file.type.match('application/.*compress.*') || 
308
+                file.type.match('application/.*archive.*') || 
309
+                file.type.match('application/.*zip.*') || 
310
+                file.type.match('application/.*tar.*') || 
311
+                file.type.match('application/x\-ace') || 
312
+                file.type.match('application/x\-bz2') || 
313
+                file.type.match('gzip/document')
314
+            );
315
+        },
316
+        
317
+        _isHTML: function(file) {
318
+            return (file.type.match('text/html'));
319
+        }, 
320
+        
321
+        _isImage: function(file) {
322
+            return (file.type.match('image/.*'));
323
+        },
324
+        
325
+        _isPDFDocument: function(file) {
326
+            return (
327
+                file.type.match('application/acrobat') || 
328
+                file.type.match('applications?/.*pdf.*') || 
329
+                file.type.match('text/.*pdf.*')
330
+            );
331
+        }, 
332
+        
333
+        _isPlainText: function(file) {
334
+            return (file.type.match('text/plain'));
335
+        },
336
+        
337
+        _isPresentation: function(file) {
338
+            return (
339
+                file.type.match('application/.*ms\-powerpoint.*') || 
340
+                file.type.match('application/.*officedocument\.presentationml.*') || 
341
+                file.type.match('application/.*opendocument\.presentation.*')
342
+            );
343
+        },
344
+        
345
+        _isSpreadsheet: function(file) {
346
+            return (
347
+                file.type.match('application/.*ms\-excel.*') || 
348
+                file.type.match('application/.*officedocument\.spreadsheetml.*') || 
349
+                file.type.match('application/.*opendocument\.spreadsheet.*')
350
+            );
351
+        },
352
+        
353
+        _isTextDocument: function(file) {
354
+            return (
355
+                file.type.match('application/.*ms\-?word.*') || 
356
+                file.type.match('application/.*officedocument\.wordprocessingml.*') || 
357
+                file.type.match('application/.*opendocument\.text.*')
358
+            );
359
+        },
360
+        
361
+        _isVideo: function(file) {
362
+            return (file.type.match('video/.*'));
363
+        },
364
+        
365
+        _resetInput: function(that) {
366
+            // create replacement input
367
+            var $replacement = $(that.element).val('').clone(true);
368
+            // replace inputs
369
+            $(that.element).replaceWith( $replacement );
370
+            // point plugin to new element
371
+            that.element = $replacement[0];
372
+        }
373
+    };
374
+
375
+    // You don't need to change something below:
376
+    // A really lightweight plugin wrapper around the constructor,
377
+    // preventing against multiple instantiations and allowing any
378
+    // public function (ie. a function whose name doesn't start
379
+    // with an underscore) to be called via the jQuery plugin,
380
+    // e.g. $(element).defaultPluginName('functionName', arg1, arg2)
381
+    $.fn[pluginName] = function ( options ) {
382
+        var args = arguments;
383
+
384
+        // Is the first parameter an object (options), or was omitted,
385
+        // instantiate a new instance of the plugin.
386
+        if (options === undefined || typeof options === 'object') {
387
+            return this.each(function () {
388
+
389
+                // Only allow the plugin to be instantiated once,
390
+                // so we check that the element has no plugin instantiation yet
391
+                if (!$.data(this, 'plugin_' + pluginName)) {
392
+
393
+                    // if it has no instance, create a new one,
394
+                    // pass options to our plugin constructor,
395
+                    // and store the plugin instance
396
+                    // in the elements jQuery data object.
397
+                    $.data(this, 'plugin_' + pluginName, new Plugin( this, options ));
398
+                }
399
+            });
400
+
401
+        // If the first parameter is a string and it doesn't start
402
+        // with an underscore or "contains" the `init`-function,
403
+        // treat this as a call to a public method.
404
+        } else if (typeof options === 'string' && options[0] !== '_' && options !== 'init') {
405
+
406
+            // Cache the method call
407
+            // to make it possible
408
+            // to return a value
409
+            var returns;
410
+
411
+            this.each(function () {
412
+                var instance = $.data(this, 'plugin_' + pluginName);
413
+
414
+                // Tests that there's already a plugin-instance
415
+                // and checks that the requested public method exists
416
+                if (instance instanceof Plugin && typeof instance[options] === 'function') {
417
+
418
+                    // Call the method of our plugin instance,
419
+                    // and pass it the supplied arguments.
420
+                    returns = instance[options].apply( instance, Array.prototype.slice.call( args, 1 ) );
421
+                }
422
+
423
+                // Allow instances to be destroyed via the 'destroy' method
424
+                if (options === 'destroy') {
425
+                  $.data(this, 'plugin_' + pluginName, null);
426
+                }
427
+            });
428
+
429
+            // If the earlier cached method
430
+            // gives a value back return the value,
431
+            // otherwise return this to preserve chainability.
432
+            return returns !== undefined ? returns : this;
433
+        }
434
+    };
435
+
436
+}(jQuery, window));

+ 10 - 0
web/bundles/admingeneratorgenerator/js/admingenerator/general.js View File

@@ -0,0 +1,10 @@
1
+$(document).ready(function(){
2
+    // Enable tooltips
3
+    $('a[rel="tooltip"]').tooltip();
4
+    
5
+    // Enable confirm on object actions
6
+    $("td.actions a[data-confirm]").click(function(e) {
7
+        e.preventDefault();        
8
+    	if(confirm($(this).data('confirm'))) { window.location.href = $(this).attr('href'); }
9
+    });
10
+});

+ 153 - 0
web/bundles/admingeneratorgenerator/js/admingenerator/nestedset.js View File

@@ -0,0 +1,153 @@
1
+/*!
2
+ * Nestedset drag & drop for Symfony2Admingenerator
3
+ * ================================================
4
+ * 
5
+ * Created by loostro, 2013
6
+ * Released under MIT license.
7
+ * 
8
+ * Uses: 
9
+ *  > jquery-ui draggable
10
+ *  > jquery-ui droppable
11
+ *  > twitter bootstrap modal
12
+ *  > jquery treeTable (modified version)
13
+ *  
14
+ *  Requires setting (in template) variables:
15
+ *  admingeneratorNestedUrl  >>  url used for ajax call
16
+ *  nestedsetStringExpand    >>  collapsed branch title translation
17
+ *  nestedsetStringCollapse  >>  expanded branch title translation
18
+ */   
19
+$(document).ready(function(){
20
+    nestedsetTreeTable(); 
21
+    nestedsetDragAndDrop();
22
+});
23
+
24
+// Init treeTable
25
+
26
+function nestedsetTreeTable() {  
27
+    $('#tree-table').treeTable({
28
+        stringExpand: nestedsetStringExpand,
29
+        stringCollapse: nestedsetStringCollapse,
30
+        doubleclickMode: true,
31
+        initialRootState: "expanded",
32
+        initialIndent: -19,
33
+        onNodeInit: function(node, expandable, isRootNode) {
34
+            (isRootNode) ? node.addClass('ui-helper-hidden') : '';
35
+            var cell = $(node).children().first();
36
+            var expander = $('<i />').addClass('icon-expander');
37
+            cell.prepend(expander);
38
+        },
39
+        onNodeReinit: function(node, expandable, isRootNode) {
40
+            $(node).find('.icon-expander').remove();
41
+        }
42
+    });
43
+}
44
+
45
+// Init drag and drop
46
+
47
+function nestedsetDragAndDrop() {
48
+    $("#tree-table tbody tr").draggable({
49
+        helper: function(e) {
50
+            var row = $(e.target).closest('tr');
51
+            var branch = row.selectBranch();
52
+            return $('<div />').addClass('nested-helper').css({
53
+              'width': branch.closest('table').width()+'px',
54
+              'height': row.outerHeight()
55
+            }).append($('<table />').css('width', '100%').append(branch.clone()));
56
+        },
57
+        drag: function(e, ui) {
58
+            var $draggable = $(this);
59
+            var $droppable = $draggable.data('current-droppable');
60
+            if($droppable && isAccepted($droppable, $draggable, ui)) { highlightAction(ui, $droppable); }
61
+        },
62
+        refreshPositions: true, // Performance?
63
+        revert: "invalid",
64
+        revertDuration: 300,
65
+        scroll: true
66
+    });
67
+
68
+    $("#tree-table tbody tr").droppable({
69
+        accept: "#tree-table tbody tr",
70
+        over: function(e, ui) {
71
+            var $droppable = $(this);
72
+            var $draggable = ui.draggable;
73
+            if(isAccepted($droppable, $draggable, ui)) {
74
+                highlightAction(ui, $droppable);
75
+                $draggable.data('current-droppable', $droppable);
76
+            }
77
+        },
78
+        out: function(e, ui) {
79
+            var $droppable = $(this);
80
+            var $draggable = ui.draggable;
81
+            if(isAccepted($droppable, $draggable, ui)) { unhighlightAction(ui, $droppable); }
82
+        },
83
+        drop: function(e, ui) {
84
+            var $droppable = $(this);
85
+            var $draggable = ui.draggable;
86
+          
87
+            if(isAccepted($droppable, $draggable, ui)) {
88
+                unhighlightAction(ui, $droppable);
89
+                var action = dropActionName(ui, $droppable); 
90
+                
91
+                var url = admingeneratorNestedUrl;
92
+                url = url.replace('|dragged|', ($draggable[0].id).replace('node-',''));
93
+                url = url.replace('|dropped|', ($droppable[0].id).replace('node-',''));
94
+                url = url.replace('|action|', action);
95
+
96
+                $('#nestedset_loading').modal('show');
97
+
98
+                $.ajax({
99
+                    url: url,
100
+                    success: function() {
101
+                        // reorganize tree
102
+                        var $parent = $draggable.nodeParent();
103
+                        $draggable.moveBranch(action, $droppable);
104
+                        if($parent) { $parent.nodeReinitialize(); }
105
+                        if(action == 'in') { $droppable.nodeReinitialize(); }
106
+                        // hide modal, display success alert
107
+                        var alert = $('#nestedset_success').clone();
108
+                        $('#flashes').append(alert);
109
+                        $('#nestedset_loading').modal('hide');
110
+                    },
111
+                    error: function() {
112
+                        // hide modal, display error alert
113
+                        var alert = $('#nestedset_error').clone();
114
+                        $('#flashes').append(alert);
115
+                        $('#nestedset_loading').modal('hide');
116
+                    }
117
+                });
118
+            }
119
+        }
120
+    });
121
+}
122
+
123
+// Private functions
124
+
125
+function isAccepted($droppable, $draggable, ui) {
126
+    if($draggable.nodeParent() && $draggable.nodeParent()[0].id == $droppable[0].id && dropActionName(ui, $droppable) == 'after') { return false; }
127
+    return ($.inArray($droppable, $draggable.selectBranch()) == -1);
128
+}
129
+
130
+function dropActionName(ui, $droppable)
131
+{
132
+    var $draggable = ui.draggable || ui.helper.find('table tbody tr:first');    
133
+    var draggableX = ui.offset.top + $draggable.outerHeight() / 2;
134
+    var droppableOffset = $droppable.offset().top;
135
+    var droppableHeight = $droppable.outerHeight();
136
+    
137
+    if (droppableOffset <= draggableX && draggableX < droppableOffset + droppableHeight * 1/3 )
138
+    { return 'before'; } else 
139
+    if (droppableOffset + droppableHeight * 1/3 <= draggableX && draggableX  <= droppableOffset + droppableHeight * 2/3 )
140
+    { return 'in'; } else
141
+    if (droppableOffset + droppableHeight * 2/3 < draggableX && draggableX <= droppableOffset + droppableHeight )
142
+    { return 'after'; }
143
+}
144
+
145
+function highlightAction(ui, $droppable) {
146
+    var className = 'droppable-'+dropActionName(ui, $droppable);
147
+    $droppable.removeClass('droppable-before').removeClass('droppable-in').removeClass('droppable-after').addClass(className);
148
+}
149
+        
150
+function unhighlightAction(ui, $droppable) {
151
+    ui.draggable.removeData('current-droppable');
152
+    $droppable.removeClass('droppable-before').removeClass('droppable-in').removeClass('droppable-after');
153
+}

+ 12 - 0
web/bundles/admingeneratorgenerator/js/admingenerator/tabs.js View File

@@ -0,0 +1,12 @@
1
+function showFieldsetsForTab(name) {
2
+    $('.admin_form fieldset.fieldset_tabbable').css('display','none');
3
+    $('.form_tabs li').removeClass('active');
4
+
5
+    var toDisplay = $('.form_tabs li[data-name="'+name+'"] a').data('display').split(' ');
6
+
7
+    $(toDisplay).each(function(){
8
+        $('.admin_form .form_fieldset_'+this).css('display','block');
9
+    });
10
+    
11
+    $('.form_tabs li[data-name="'+name+'"]').addClass('active');
12
+}

+ 1 - 0
web/bundles/admingeneratorgenerator/js/blueimp/blueimp.canvas-to-blob.min.js View File

@@ -0,0 +1 @@
1
+(function(a){"use strict";var b=a.HTMLCanvasElement&&a.HTMLCanvasElement.prototype,c=a.Blob&&function(){try{return Boolean(new Blob)}catch(a){return!1}}(),d=c&&a.Uint8Array&&function(){try{return(new Blob([new Uint8Array(100)])).size===100}catch(a){return!1}}(),e=a.BlobBuilder||a.WebKitBlobBuilder||a.MozBlobBuilder||a.MSBlobBuilder,f=(c||e)&&a.atob&&a.ArrayBuffer&&a.Uint8Array&&function(a){var b,f,g,h,i,j;a.split(",")[0].indexOf("base64")>=0?b=atob(a.split(",")[1]):b=decodeURIComponent(a.split(",")[1]),f=new ArrayBuffer(b.length),g=new Uint8Array(f);for(h=0;h<b.length;h+=1)g[h]=b.charCodeAt(h);return i=a.split(",")[0].split(":")[1].split(";")[0],c?new Blob([d?g:f],{type:i}):(j=new e,j.append(f),j.getBlob(i))};a.HTMLCanvasElement&&!b.toBlob&&(b.mozGetAsFile?b.toBlob=function(a,b){a(this.mozGetAsFile("blob",b))}:b.toDataURL&&f&&(b.toBlob=function(a,b){a(f(this.toDataURL(b)))})),typeof define=="function"&&define.amd?define(function(){return f}):a.dataURLtoBlob=f})(this);

+ 1 - 0
web/bundles/admingeneratorgenerator/js/blueimp/blueimp.javascript-load-image.min.js View File

@@ -0,0 +1 @@
1
+(function(a){"use strict";var b=function(a,c,d){var e=document.createElement("img"),f,g;return e.onerror=c,e.onload=function(){g&&(!d||!d.noRevoke)&&b.revokeObjectURL(g),c(b.scale(e,d))},window.Blob&&a instanceof Blob||window.File&&a instanceof File?(f=g=b.createObjectURL(a),e._type=a.type):f=a,f?(e.src=f,e):b.readFile(a,function(a){e.src=a})},c=window.createObjectURL&&window||window.URL&&URL.revokeObjectURL&&URL||window.webkitURL&&webkitURL;b.detectSubsampling=function(a){var b=a.width,c=a.height,d,e;return b*c>1048576?(d=document.createElement("canvas"),d.width=d.height=1,e=d.getContext("2d"),e.drawImage(a,-b+1,0),e.getImageData(0,0,1,1).data[3]===0):!1},b.detectVerticalSquash=function(a,b){var c=document.createElement("canvas"),d=c.getContext("2d"),e,f,g,h,i;c.width=1,c.height=b,d.drawImage(a,0,0),e=d.getImageData(0,0,1,b).data,f=0,g=b,h=b;while(h>f)i=e[(h-1)*4+3],i===0?g=h:f=h,h=g+f>>1;return h/b},b.renderImageToCanvas=function(a,c,d,e){var f=a.width,g=a.height,h=c.getContext("2d"),i,j=1024,k=document.createElement("canvas"),l,m,n,o,p;h.save(),b.detectSubsampling(a)&&(f/=2,g/=2),i=b.detectVerticalSquash(a,g),k.width=k.height=j,l=k.getContext("2d"),m=0;while(m<g){n=m+j>g?g-m:j,o=0;while(o<f)p=o+j>f?f-o:j,l.clearRect(0,0,j,j),l.drawImage(a,-o,-m),h.drawImage(k,0,0,p,n,Math.floor(o*d/f),Math.floor(m*e/g/i),Math.ceil(p*d/f),Math.ceil(n*e/g/i)),o+=j;m+=j}h.restore(),k=l=null},b.scale=function(a,c){c=c||{};var d=document.createElement("canvas"),e=a.width,f=a.height,g=Math.max((c.minWidth||e)/e,(c.minHeight||f)/f);return g>1&&(e=parseInt(e*g,10),f=parseInt(f*g,10)),g=Math.min((c.maxWidth||e)/e,(c.maxHeight||f)/f),g<1&&(e=parseInt(e*g,10),f=parseInt(f*g,10)),a.getContext||c.canvas&&d.getContext?(d.width=e,d.height=f,a._type==="image/jpeg"?b.renderImageToCanvas(a,d,e,f):d.getContext("2d").drawImage(a,0,0,e,f),d):(a.width=e,a.height=f,a)},b.createObjectURL=function(a){return c?c.createObjectURL(a):!1},b.revokeObjectURL=function(a){return c?c.revokeObjectURL(a):!1},b.readFile=function(a,b){if(window.FileReader&&FileReader.prototype.readAsDataURL){var c=new FileReader;return c.onload=function(a){b(a.target.result)},c.readAsDataURL(a),c}return!1},typeof define=="function"&&define.amd?define(function(){return b}):a.loadImage=b})(this);

+ 1 - 0
web/bundles/admingeneratorgenerator/js/blueimp/blueimp.javascript-templates.min.js View File

@@ -0,0 +1 @@
1
+(function(a){"use strict";var b=function(a,c){var d=/[^\w\-\.:]/.test(a)?new Function(b.arg+",tmpl","var _e=tmpl.encode"+b.helper+",_s='"+a.replace(b.regexp,b.func)+"';return _s;"):b.cache[a]=b.cache[a]||b(b.load(a));return c?d(c,b):function(a){return d(a,b)}};b.cache={},b.load=function(a){return document.getElementById(a).innerHTML},b.regexp=/([\s'\\])(?![^%]*%\})|(?:\{%(=|#)([\s\S]+?)%\})|(\{%)|(%\})/g,b.func=function(a,b,c,d,e,f){if(b)return{"\n":"\\n","\r":"\\r","\t":"\\t"," ":" "}[a]||"\\"+a;if(c)return c==="="?"'+_e("+d+")+'":"'+("+d+"||'')+'";if(e)return"';";if(f)return"_s+='"},b.encReg=/[<>&"'\x00]/g,b.encMap={"<":"&lt;",">":"&gt;","&":"&amp;",'"':"&quot;","'":"&#39;"},b.encode=function(a){return String(a||"").replace(b.encReg,function(a){return b.encMap[a]||""})},b.arg="o",b.helper=",print=function(s,e){_s+=e&&(s||'')||_e(s);},include=function(s,d){_s+=tmpl(s,d);}",typeof define=="function"&&define.amd?define(function(){return b}):a.tmpl=b})(this);

+ 220 - 0
web/bundles/admingeneratorgenerator/js/blueimp/jquery.fileupload-fp.js View File

@@ -0,0 +1,220 @@
1
+/*
2
+ * jQuery File Upload File Processing Plugin 1.2
3
+ * https://github.com/blueimp/jQuery-File-Upload
4
+ *
5
+ * Copyright 2012, Sebastian Tschan
6
+ * https://blueimp.net
7
+ *
8
+ * Licensed under the MIT license:
9
+ * http://www.opensource.org/licenses/MIT
10
+ */
11
+
12
+/*jslint nomen: true, unparam: true, regexp: true */
13
+/*global define, window, document */
14
+
15
+(function (factory) {
16
+    'use strict';
17
+    if (typeof define === 'function' && define.amd) {
18
+        // Register as an anonymous AMD module:
19
+        define([
20
+            'jquery',
21
+            'load-image',
22
+            'canvas-to-blob',
23
+            './jquery.fileupload'
24
+        ], factory);
25
+    } else {
26
+        // Browser globals:
27
+        factory(
28
+            window.jQuery,
29
+            window.loadImage
30
+        );
31
+    }
32
+}(function ($, loadImage) {
33
+    'use strict';
34
+
35
+    // The File Upload FP version extends the fileupload widget
36
+    // with file processing functionality:
37
+    $.widget('blueimp.fileupload', $.blueimp.fileupload, {
38
+
39
+        options: {
40
+            // The list of file processing actions:
41
+            process: [
42
+            /*
43
+                {
44
+                    action: 'load',
45
+                    fileTypes: /^image\/(gif|jpeg|png)$/,
46
+                    maxFileSize: 20000000 // 20MB
47
+                },
48
+                {
49
+                    action: 'resize',
50
+                    maxWidth: 1920,
51
+                    maxHeight: 1200,
52
+                    minWidth: 800,
53
+                    minHeight: 600
54
+                },
55
+                {
56
+                    action: 'save'
57
+                }
58
+            */
59
+            ],
60
+
61
+            // The add callback is invoked as soon as files are added to the
62
+            // fileupload widget (via file input selection, drag & drop or add
63
+            // API call). See the basic file upload widget for more information:
64
+            add: function (e, data) {
65
+                $(this).fileupload('process', data).done(function () {
66
+                    data.submit();
67
+                });
68
+            }
69
+        },
70
+
71
+        processActions: {
72
+            // Loads the image given via data.files and data.index
73
+            // as img element if the browser supports canvas.
74
+            // Accepts the options fileTypes (regular expression)
75
+            // and maxFileSize (integer) to limit the files to load:
76
+            load: function (data, options) {
77
+                var that = this,
78
+                    file = data.files[data.index],
79
+                    dfd = $.Deferred();
80
+                if (window.HTMLCanvasElement &&
81
+                        window.HTMLCanvasElement.prototype.toBlob &&
82
+                        ($.type(options.maxFileSize) !== 'number' ||
83
+                            file.size < options.maxFileSize) &&
84
+                        (!options.fileTypes ||
85
+                            options.fileTypes.test(file.type))) {
86
+                    loadImage(
87
+                        file,
88
+                        function (img) {
89
+                            data.img = img;
90
+                            dfd.resolveWith(that, [data]);
91
+                        }
92
+                    );
93
+                } else {
94
+                    dfd.rejectWith(that, [data]);
95
+                }
96
+                return dfd.promise();
97
+            },
98
+            // Resizes the image given as data.img and updates
99
+            // data.canvas with the resized image as canvas element.
100
+            // Accepts the options maxWidth, maxHeight, minWidth and
101
+            // minHeight to scale the given image:
102
+            resize: function (data, options) {
103
+                var img = data.img,
104
+                    canvas;
105
+                options = $.extend({canvas: true}, options);
106
+                if (img) {
107
+                    canvas = loadImage.scale(img, options);
108
+                    if (canvas.width !== img.width ||
109
+                            canvas.height !== img.height) {
110
+                        data.canvas = canvas;
111
+                    }
112
+                }
113
+                return data;
114
+            },
115
+            // Saves the processed image given as data.canvas
116
+            // inplace at data.index of data.files:
117
+            save: function (data, options) {
118
+                // Do nothing if no processing has happened:
119
+                if (!data.canvas) {
120
+                    return data;
121
+                }
122
+                var that = this,
123
+                    file = data.files[data.index],
124
+                    name = file.name,
125
+                    dfd = $.Deferred(),
126
+                    callback = function (blob) {
127
+                        if (!blob.name) {
128
+                            if (file.type === blob.type) {
129
+                                blob.name = file.name;
130
+                            } else if (file.name) {
131
+                                blob.name = file.name.replace(
132
+                                    /\..+$/,
133
+                                    '.' + blob.type.substr(6)
134
+                                );
135
+                            }
136
+                        }
137
+                        // Store the created blob at the position
138
+                        // of the original file in the files list:
139
+                        data.files[data.index] = blob;
140
+                        dfd.resolveWith(that, [data]);
141
+                    };
142
+                // Use canvas.mozGetAsFile directly, to retain the filename, as
143
+                // Gecko doesn't support the filename option for FormData.append:
144
+                if (data.canvas.mozGetAsFile) {
145
+                    callback(data.canvas.mozGetAsFile(
146
+                        (/^image\/(jpeg|png)$/.test(file.type) && name) ||
147
+                            ((name && name.replace(/\..+$/, '')) ||
148
+                                'blob') + '.png',
149
+                        file.type
150
+                    ));
151
+                } else {
152
+                    data.canvas.toBlob(callback, file.type);
153
+                }
154
+                return dfd.promise();
155
+            }
156
+        },
157
+
158
+        // Resizes the file at the given index and stores the created blob at
159
+        // the original position of the files list, returns a Promise object:
160
+        _processFile: function (files, index, options) {
161
+            var that = this,
162
+                dfd = $.Deferred().resolveWith(that, [{
163
+                    files: files,
164
+                    index: index
165
+                }]),
166
+                chain = dfd.promise();
167
+            that._processing += 1;
168
+            $.each(options.process, function (i, settings) {
169
+                chain = chain.pipe(function (data) {
170
+                    return that.processActions[settings.action]
171
+                        .call(this, data, settings);
172
+                });
173
+            });
174
+            chain.always(function () {
175
+                that._processing -= 1;
176
+                if (that._processing === 0) {
177
+                    that.element
178
+                        .removeClass('fileupload-processing');
179
+                }
180
+            });
181
+            if (that._processing === 1) {
182
+                that.element.addClass('fileupload-processing');
183
+            }
184
+            return chain;
185
+        },
186
+
187
+        // Processes the files given as files property of the data parameter,
188
+        // returns a Promise object that allows to bind a done handler, which
189
+        // will be invoked after processing all files (inplace) is done:
190
+        process: function (data) {
191
+            var that = this,
192
+                options = $.extend({}, this.options, data);
193
+            if (options.process && options.process.length &&
194
+                    this._isXHRUpload(options)) {
195
+                $.each(data.files, function (index, file) {
196
+                    that._processingQueue = that._processingQueue.pipe(
197
+                        function () {
198
+                            var dfd = $.Deferred();
199
+                            that._processFile(data.files, index, options)
200
+                                .always(function () {
201
+                                    dfd.resolveWith(that);
202
+                                });
203
+                            return dfd.promise();
204
+                        }
205
+                    );
206
+                });
207
+            }
208
+            return this._processingQueue;
209
+        },
210
+
211
+        _create: function () {
212
+            this._super();
213
+            this._processing = 0;
214
+            this._processingQueue = $.Deferred().resolveWith(this)
215
+                .promise();
216
+        }
217
+
218
+    });
219
+
220
+}));

+ 732 - 0
web/bundles/admingeneratorgenerator/js/blueimp/jquery.fileupload-ui.js View File

@@ -0,0 +1,732 @@
1
+/*
2
+ * jQuery File Upload User Interface Plugin 6.10
3
+ * https://github.com/blueimp/jQuery-File-Upload
4
+ *
5
+ * Copyright 2010, Sebastian Tschan
6
+ * https://blueimp.net
7
+ *
8
+ * Licensed under the MIT license:
9
+ * http://www.opensource.org/licenses/MIT
10
+ */
11
+
12
+/*jslint nomen: true, unparam: true, regexp: true */
13
+/*global define, window, URL, webkitURL, FileReader */
14
+
15
+(function (factory) {
16
+    'use strict';
17
+    if (typeof define === 'function' && define.amd) {
18
+        // Register as an anonymous AMD module:
19
+        define([
20
+            'jquery',
21
+            'tmpl',
22
+            'load-image',
23
+            './jquery.fileupload-fp'
24
+        ], factory);
25
+    } else {
26
+        // Browser globals:
27
+        factory(
28
+            window.jQuery,
29
+            window.tmpl,
30
+            window.loadImage
31
+        );
32
+    }
33
+}(function ($, tmpl, loadImage) {
34
+    'use strict';
35
+
36
+    // The UI version extends the file upload widget
37
+    // and adds complete user interface interaction:
38
+    $.widget('blueimp.fileupload', $.blueimp.fileupload, {
39
+
40
+        options: {
41
+            // By default, files added to the widget are uploaded as soon
42
+            // as the user clicks on the start buttons. To enable automatic
43
+            // uploads, set the following option to true:
44
+            autoUpload: false,
45
+            // The following option limits the number of files that are
46
+            // allowed to be uploaded using this widget:
47
+            maxNumberOfFiles: undefined,
48
+            // The maximum allowed file size:
49
+            maxFileSize: undefined,
50
+            // The minimum allowed file size:
51
+            minFileSize: undefined,
52
+            // The regular expression for allowed file types, matches
53
+            // against either file type or file name:
54
+            acceptFileTypes:  /.+$/i,
55
+            // The regular expression to define for which files a preview
56
+            // image is shown, matched against the file type:
57
+            previewSourceFileTypes: /^image\/(gif|jpeg|png)$/,
58
+            // The maximum file size of images that are to be displayed as preview:
59
+            previewSourceMaxFileSize: 5000000, // 5MB
60
+            // The maximum width of the preview images:
61
+            previewMaxWidth: 80,
62
+            // The maximum height of the preview images:
63
+            previewMaxHeight: 80,
64
+            // By default, preview images are displayed as canvas elements
65
+            // if supported by the browser. Set the following option to false
66
+            // to always display preview images as img elements:
67
+            previewAsCanvas: true,
68
+            // The ID of the upload template:
69
+            uploadTemplateId: 'template-upload',
70
+            // The ID of the download template:
71
+            downloadTemplateId: 'template-download',
72
+            // The container for the list of files. If undefined, it is set to
73
+            // an element with class "files" inside of the widget element:
74
+            filesContainer: undefined,
75
+            // By default, files are appended to the files container.
76
+            // Set the following option to true, to prepend files instead:
77
+            prependFiles: false,
78
+            // The expected data type of the upload response, sets the dataType
79
+            // option of the $.ajax upload requests:
80
+            dataType: 'json',
81
+
82
+            // The add callback is invoked as soon as files are added to the fileupload
83
+            // widget (via file input selection, drag & drop or add API call).
84
+            // See the basic file upload widget for more information:
85
+            add: function (e, data) {
86
+                var that = $(this).data('fileupload'),
87
+                    options = that.options,
88
+                    files = data.files;
89
+                $(this).fileupload('process', data).done(function () {
90
+                    that._adjustMaxNumberOfFiles(-files.length);
91
+                    data.maxNumberOfFilesAdjusted = true;
92
+                    data.files.valid = data.isValidated = that._validate(files);
93
+                    data.context = that._renderUpload(files).data('data', data);
94
+                    options.filesContainer[
95
+                        options.prependFiles ? 'prepend' : 'append'
96
+                    ](data.context);
97
+                    that._renderPreviews(files, data.context);
98
+                    that._forceReflow(data.context);
99
+                    that._transition(data.context).done(
100
+                        function () {
101
+                            if ((that._trigger('added', e, data) !== false) &&
102
+                                    (options.autoUpload || data.autoUpload) &&
103
+                                    data.autoUpload !== false && data.isValidated) {
104
+                                data.submit();
105
+                            }
106
+                        }
107
+                    );
108
+                });
109
+            },
110
+            // Callback for the start of each file upload request:
111
+            send: function (e, data) {
112
+                var that = $(this).data('fileupload');
113
+                if (!data.isValidated) {
114
+                    if (!data.maxNumberOfFilesAdjusted) {
115
+                        that._adjustMaxNumberOfFiles(-data.files.length);
116
+                        data.maxNumberOfFilesAdjusted = true;
117
+                    }
118
+                    if (!that._validate(data.files)) {
119
+                        return false;
120
+                    }
121
+                }
122
+                if (data.context && data.dataType &&
123
+                        data.dataType.substr(0, 6) === 'iframe') {
124
+                    // Iframe Transport does not support progress events.
125
+                    // In lack of an indeterminate progress bar, we set
126
+                    // the progress to 100%, showing the full animated bar:
127
+                    data.context
128
+                        .find('.progress').addClass(
129
+                            !$.support.transition && 'progress-animated'
130
+                        )
131
+                        .attr('aria-valuenow', 100)
132
+                        .find('.bar').css(
133
+                            'width',
134
+                            '100%'
135
+                        );
136
+                }
137
+                return that._trigger('sent', e, data);
138
+            },
139
+            // Callback for successful uploads:
140
+            done: function (e, data) {
141
+                var that = $(this).data('fileupload'),
142
+                    template;
143
+                if (data.context) {
144
+                    data.context.each(function (index) {
145
+                        var file = ($.isArray(data.result) &&
146
+                                data.result[index]) ||
147
+                                    {error: 'Empty file upload result'};
148
+                        if (file.error) {
149
+                            that._adjustMaxNumberOfFiles(1);
150
+                        }
151
+                        that._transition($(this)).done(
152
+                            function () {
153
+                                var node = $(this);
154
+                                template = that._renderDownload([file])
155
+                                    .replaceAll(node);
156
+                                that._forceReflow(template);
157
+                                that._transition(template).done(
158
+                                    function () {
159
+                                        data.context = $(this);
160
+                                        that._trigger('completed', e, data);
161
+                                    }
162
+                                );
163
+                            }
164
+                        );
165
+                    });
166
+                } else {
167
+                    if ($.isArray(data.result)) {
168
+                        $.each(data.result, function (index, file) {
169
+                            if (data.maxNumberOfFilesAdjusted && file.error) {
170
+                                that._adjustMaxNumberOfFiles(1);
171
+                            } else if (!data.maxNumberOfFilesAdjusted &&
172
+                                    !file.error) {
173
+                                that._adjustMaxNumberOfFiles(-1);
174
+                            }
175
+                        });
176
+                        data.maxNumberOfFilesAdjusted = true;
177
+                    }
178
+                    template = that._renderDownload(data.result)
179
+                        .appendTo(that.options.filesContainer);
180
+                    that._forceReflow(template);
181
+                    that._transition(template).done(
182
+                        function () {
183
+                            data.context = $(this);
184
+                            that._trigger('completed', e, data);
185
+                        }
186
+                    );
187
+                }
188
+            },
189
+            // Callback for failed (abort or error) uploads:
190
+            fail: function (e, data) {
191
+                var that = $(this).data('fileupload'),
192
+                    template;
193
+                if (data.maxNumberOfFilesAdjusted) {
194
+                    that._adjustMaxNumberOfFiles(data.files.length);
195
+                }
196
+                if (data.context) {
197
+                    data.context.each(function (index) {
198
+                        if (data.errorThrown !== 'abort') {
199
+                            var file = data.files[index];
200
+                            file.error = file.error || data.errorThrown ||
201
+                                true;
202
+                            that._transition($(this)).done(
203
+                                function () {
204
+                                    var node = $(this);
205
+                                    template = that._renderDownload([file])
206
+                                        .replaceAll(node);
207
+                                    that._forceReflow(template);
208
+                                    that._transition(template).done(
209
+                                        function () {
210
+                                            data.context = $(this);
211
+                                            that._trigger('failed', e, data);
212
+                                        }
213
+                                    );
214
+                                }
215
+                            );
216
+                        } else {
217
+                            that._transition($(this)).done(
218
+                                function () {
219
+                                    $(this).remove();
220
+                                    that._trigger('failed', e, data);
221
+                                }
222
+                            );
223
+                        }
224
+                    });
225
+                } else if (data.errorThrown !== 'abort') {
226
+                    data.context = that._renderUpload(data.files)
227
+                        .appendTo(that.options.filesContainer)
228
+                        .data('data', data);
229
+                    that._forceReflow(data.context);
230
+                    that._transition(data.context).done(
231
+                        function () {
232
+                            data.context = $(this);
233
+                            that._trigger('failed', e, data);
234
+                        }
235
+                    );
236
+                } else {
237
+                    that._trigger('failed', e, data);
238
+                }
239
+            },
240
+            // Callback for upload progress events:
241
+            progress: function (e, data) {
242
+                if (data.context) {
243
+                    var progress = parseInt(data.loaded / data.total * 100, 10);
244
+                    data.context.find('.progress')
245
+                        .attr('aria-valuenow', progress)
246
+                        .find('.bar').css(
247
+                            'width',
248
+                            progress + '%'
249
+                        );
250
+                }
251
+            },
252
+            // Callback for global upload progress events:
253
+            progressall: function (e, data) {
254
+                var $this = $(this),
255
+                    progress = parseInt(data.loaded / data.total * 100, 10),
256
+                    globalProgressNode = $this.find('.fileupload-progress'),
257
+                    extendedProgressNode = globalProgressNode
258
+                        .find('.progress-extended');
259
+                if (extendedProgressNode.length) {
260
+                    extendedProgressNode.html(
261
+                        $this.data('fileupload')._renderExtendedProgress(data)
262
+                    );
263
+                }
264
+                globalProgressNode
265
+                    .find('.progress')
266
+                    .attr('aria-valuenow', progress)
267
+                    .find('.bar').css(
268
+                        'width',
269
+                        progress + '%'
270
+                    );
271
+            },
272
+            // Callback for uploads start, equivalent to the global ajaxStart event:
273
+            start: function (e) {
274
+                var that = $(this).data('fileupload');
275
+                that._transition($(this).find('.fileupload-progress')).done(
276
+                    function () {
277
+                        that._trigger('started', e);
278
+                    }
279
+                );
280
+            },
281
+            // Callback for uploads stop, equivalent to the global ajaxStop event:
282
+            stop: function (e) {
283
+                var that = $(this).data('fileupload');
284
+                that._transition($(this).find('.fileupload-progress')).done(
285
+                    function () {
286
+                        $(this).find('.progress')
287
+                            .attr('aria-valuenow', '0')
288
+                            .find('.bar').css('width', '0%');
289
+                        $(this).find('.progress-extended').html('&nbsp;');
290
+                        that._trigger('stopped', e);
291
+                    }
292
+                );
293
+            },
294
+            // Callback for file deletion:
295
+            destroy: function (e, data) {
296
+                var that = $(this).data('fileupload');
297
+                if (data.url) {
298
+                    $.ajax(data);
299
+                    that._adjustMaxNumberOfFiles(1);
300
+                }
301
+                that._transition(data.context).done(
302
+                    function () {
303
+                        $(this).remove();
304
+                        that._trigger('destroyed', e, data);
305
+                    }
306
+                );
307
+            }
308
+        },
309
+
310
+        // Link handler, that allows to download files
311
+        // by drag & drop of the links to the desktop:
312
+        _enableDragToDesktop: function () {
313
+            var link = $(this),
314
+                url = link.prop('href'),
315
+                name = link.prop('download'),
316
+                type = 'application/octet-stream';
317
+            link.bind('dragstart', function (e) {
318
+                try {
319
+                    e.originalEvent.dataTransfer.setData(
320
+                        'DownloadURL',
321
+                        [type, name, url].join(':')
322
+                    );
323
+                } catch (err) {}
324
+            });
325
+        },
326
+
327
+        _adjustMaxNumberOfFiles: function (operand) {
328
+            if (typeof this.options.maxNumberOfFiles === 'number') {
329
+                this.options.maxNumberOfFiles += operand;
330
+                if (this.options.maxNumberOfFiles < 1) {
331
+                    this._disableFileInputButton();
332
+                } else {
333
+                    this._enableFileInputButton();
334
+                }
335
+            }
336
+        },
337
+
338
+        _formatFileSize: function (bytes) {
339
+            if (typeof bytes !== 'number') {
340
+                return '';
341
+            }
342
+            if (bytes >= 1000000000) {
343
+                return (bytes / 1000000000).toFixed(2) + ' GB';
344
+            }
345
+            if (bytes >= 1000000) {
346
+                return (bytes / 1000000).toFixed(2) + ' MB';
347
+            }
348
+            return (bytes / 1000).toFixed(2) + ' KB';
349
+        },
350
+
351
+        _formatBitrate: function (bits) {
352
+            if (typeof bits !== 'number') {
353
+                return '';
354
+            }
355
+            if (bits >= 1000000000) {
356
+                return (bits / 1000000000).toFixed(2) + ' Gbit/s';
357
+            }
358
+            if (bits >= 1000000) {
359
+                return (bits / 1000000).toFixed(2) + ' Mbit/s';
360
+            }
361
+            if (bits >= 1000) {
362
+                return (bits / 1000).toFixed(2) + ' kbit/s';
363
+            }
364
+            return bits + ' bit/s';
365
+        },
366
+
367
+        _formatTime: function (seconds) {
368
+            var date = new Date(seconds * 1000),
369
+                days = parseInt(seconds / 86400, 10);
370
+            days = days ? days + 'd ' : '';
371
+            return days +
372
+                ('0' + date.getUTCHours()).slice(-2) + ':' +
373
+                ('0' + date.getUTCMinutes()).slice(-2) + ':' +
374
+                ('0' + date.getUTCSeconds()).slice(-2);
375
+        },
376
+
377
+        _formatPercentage: function (floatValue) {
378
+            return (floatValue * 100).toFixed(2) + ' %';
379
+        },
380
+
381
+        _renderExtendedProgress: function (data) {
382
+            return this._formatBitrate(data.bitrate) + ' | ' +
383
+                this._formatTime(
384
+                    (data.total - data.loaded) * 8 / data.bitrate
385
+                ) + ' | ' +
386
+                this._formatPercentage(
387
+                    data.loaded / data.total
388
+                ) + ' | ' +
389
+                this._formatFileSize(data.loaded) + ' / ' +
390
+                this._formatFileSize(data.total);
391
+        },
392
+
393
+        _hasError: function (file) {
394
+            if (file.error) {
395
+                return file.error;
396
+            }
397
+            // The number of added files is subtracted from
398
+            // maxNumberOfFiles before validation, so we check if
399
+            // maxNumberOfFiles is below 0 (instead of below 1):
400
+            if (this.options.maxNumberOfFiles < 0) {
401
+                return 'Maximum number of files exceeded';
402
+            }
403
+            // Files are accepted if either the file type or the file name
404
+            // matches against the acceptFileTypes regular expression, as
405
+            // only browsers with support for the File API report the type:
406
+            if (!(this.options.acceptFileTypes.test(file.type) ||
407
+                    this.options.acceptFileTypes.test(file.name))) {
408
+                return 'Filetype not allowed';
409
+            }
410
+            if (this.options.maxFileSize &&
411
+                    file.size > this.options.maxFileSize) {
412
+                return 'File is too big';
413
+            }
414
+            if (typeof file.size === 'number' &&
415
+                    file.size < this.options.minFileSize) {
416
+                return 'File is too small';
417
+            }
418
+            return null;
419
+        },
420
+
421
+        _validate: function (files) {
422
+            var that = this,
423
+                valid = !!files.length;
424
+            $.each(files, function (index, file) {
425
+                file.error = that._hasError(file);
426
+                if (file.error) {
427
+                    valid = false;
428
+                }
429
+            });
430
+            return valid;
431
+        },
432
+
433
+        _renderTemplate: function (func, files) {
434
+            if (!func) {
435
+                return $();
436
+            }
437
+            var result = func({
438
+                files: files,
439
+                formatFileSize: this._formatFileSize,
440
+                options: this.options
441
+            });
442
+            if (result instanceof $) {
443
+                return result;
444
+            }
445
+            return $(this.options.templatesContainer).html(result).children();
446
+        },
447
+
448
+        _renderPreview: function (file, node) {
449
+            var that = this,
450
+                options = this.options,
451
+                dfd = $.Deferred();
452
+            return ((loadImage && loadImage(
453
+                file,
454
+                function (img) {
455
+                    node.append(img);
456
+                    that._forceReflow(node);
457
+                    that._transition(node).done(function () {
458
+                        dfd.resolveWith(node);
459
+                    });
460
+                    if (!$.contains(that.document[0].body, node[0])) {
461
+                        // If the element is not part of the DOM,
462
+                        // transition events are not triggered,
463
+                        // so we have to resolve manually:
464
+                        dfd.resolveWith(node);
465
+                    }
466
+                },
467
+                {
468
+                    maxWidth: options.previewMaxWidth,
469
+                    maxHeight: options.previewMaxHeight,
470
+                    canvas: options.previewAsCanvas
471
+                }
472
+            )) || dfd.resolveWith(node)) && dfd;
473
+        },
474
+
475
+        _renderPreviews: function (files, nodes) {
476
+            var that = this,
477
+                options = this.options;
478
+            nodes.find('.preview span').each(function (index, element) {
479
+                var file = files[index];
480
+                if (options.previewSourceFileTypes.test(file.type) &&
481
+                        ($.type(options.previewSourceMaxFileSize) !== 'number' ||
482
+                        file.size < options.previewSourceMaxFileSize)) {
483
+                    that._processingQueue = that._processingQueue.pipe(function () {
484
+                        var dfd = $.Deferred();
485
+                        that._renderPreview(file, $(element)).done(
486
+                            function () {
487
+                                dfd.resolveWith(that);
488
+                            }
489
+                        );
490
+                        return dfd.promise();
491
+                    });
492
+                }
493
+            });
494
+            return this._processingQueue;
495
+        },
496
+
497
+        _renderUpload: function (files) {
498
+            return this._renderTemplate(
499
+                this.options.uploadTemplate,
500
+                files
501
+            );
502
+        },
503
+
504
+        _renderDownload: function (files) {
505
+            return this._renderTemplate(
506
+                this.options.downloadTemplate,
507
+                files
508
+            ).find('a[download]').each(this._enableDragToDesktop).end();
509
+        },
510
+
511
+        _startHandler: function (e) {
512
+            e.preventDefault();
513
+            var button = $(e.currentTarget),
514
+                template = button.closest('.template-upload'),
515
+                data = template.data('data');
516
+            if (data && data.submit && !data.jqXHR && data.submit()) {
517
+                button.prop('disabled', true);
518
+            }
519
+        },
520
+
521
+        _cancelHandler: function (e) {
522
+            e.preventDefault();
523
+            var template = $(e.currentTarget).closest('.template-upload'),
524
+                data = template.data('data') || {};
525
+            if (!data.jqXHR) {
526
+                data.errorThrown = 'abort';
527
+                this._trigger('fail', e, data);
528
+            } else {
529
+                data.jqXHR.abort();
530
+            }
531
+        },
532
+
533
+        _deleteHandler: function (e) {
534
+            e.preventDefault();
535
+            var button = $(e.currentTarget);
536
+            this._trigger('destroy', e, {
537
+                context: button.closest('.template-download'),
538
+                url: button.attr('data-url'),
539
+                type: button.attr('data-type') || 'DELETE',
540
+                dataType: this.options.dataType
541
+            });
542
+        },
543
+
544
+        _forceReflow: function (node) {
545
+            return $.support.transition && node.length &&
546
+                node[0].offsetWidth;
547
+        },
548
+
549
+        _transition: function (node) {
550
+            var dfd = $.Deferred();
551
+            if ($.support.transition && node.hasClass('fade')) {
552
+                node.bind(
553
+                    $.support.transition.end,
554
+                    function (e) {
555
+                        // Make sure we don't respond to other transitions events
556
+                        // in the container element, e.g. from button elements:
557
+                        if (e.target === node[0]) {
558
+                            node.unbind($.support.transition.end);
559
+                            dfd.resolveWith(node);
560
+                        }
561
+                    }
562
+                ).toggleClass('in');
563
+            } else {
564
+                node.toggleClass('in');
565
+                dfd.resolveWith(node);
566
+            }
567
+            return dfd;
568
+        },
569
+
570
+        _initButtonBarEventHandlers: function () {
571
+            var fileUploadButtonBar = this.element.find('.fileupload-buttonbar'),
572
+                filesList = this.options.filesContainer;
573
+            this._on(fileUploadButtonBar.find('.start'), {
574
+                click: function (e) {
575
+                    e.preventDefault();
576
+                    filesList.find('.start button').click();
577
+                }
578
+            });
579
+            this._on(fileUploadButtonBar.find('.cancel'), {
580
+                click: function (e) {
581
+                    e.preventDefault();
582
+                    filesList.find('.cancel button').click();
583
+                }
584
+            });
585
+            this._on(fileUploadButtonBar.find('.delete'), {
586
+                click: function (e) {
587
+                    e.preventDefault();
588
+                    filesList.find('.delete input:checked')
589
+                        .siblings('button').click();
590
+                    fileUploadButtonBar.find('.toggle')
591
+                        .prop('checked', false);
592
+                }
593
+            });
594
+            this._on(fileUploadButtonBar.find('.toggle'), {
595
+                change: function (e) {
596
+                    filesList.find('.delete input').prop(
597
+                        'checked',
598
+                        $(e.currentTarget).is(':checked')
599
+                    );
600
+                }
601
+            });
602
+        },
603
+
604
+        _destroyButtonBarEventHandlers: function () {
605
+            this._off(
606
+                this.element.find('.fileupload-buttonbar button'),
607
+                'click'
608
+            );
609
+            this._off(
610
+                this.element.find('.fileupload-buttonbar .toggle'),
611
+                'change.'
612
+            );
613
+        },
614
+
615
+        _initEventHandlers: function () {
616
+            this._super();
617
+            this._on(this.options.filesContainer, {
618
+                'click .start button': this._startHandler,
619
+                'click .cancel button': this._cancelHandler,
620
+                'click .delete button': this._deleteHandler
621
+            });
622
+            this._initButtonBarEventHandlers();
623
+        },
624
+
625
+        _destroyEventHandlers: function () {
626
+            this._destroyButtonBarEventHandlers();
627
+            this._off(this.options.filesContainer, 'click');
628
+            this._super();
629
+        },
630
+
631
+        _enableFileInputButton: function () {
632
+            this.element.find('.fileinput-button input')
633
+                .prop('disabled', false)
634
+                .parent().removeClass('disabled');
635
+        },
636
+
637
+        _disableFileInputButton: function () {
638
+            this.element.find('.fileinput-button input')
639
+                .prop('disabled', true)
640
+                .parent().addClass('disabled');
641
+        },
642
+
643
+        _initTemplates: function () {
644
+            var options = this.options;
645
+            options.templatesContainer = this.document[0].createElement(
646
+                options.filesContainer.prop('nodeName')
647
+            );
648
+            if (tmpl) {
649
+                if (options.uploadTemplateId) {
650
+                    options.uploadTemplate = tmpl(options.uploadTemplateId);
651
+                }
652
+                if (options.downloadTemplateId) {
653
+                    options.downloadTemplate = tmpl(options.downloadTemplateId);
654
+                }
655
+            }
656
+        },
657
+
658
+        _initFilesContainer: function () {
659
+            var options = this.options;
660
+            if (options.filesContainer === undefined) {
661
+                options.filesContainer = this.element.find('.files');
662
+            } else if (!(options.filesContainer instanceof $)) {
663
+                options.filesContainer = $(options.filesContainer);
664
+            }
665
+        },
666
+
667
+        _stringToRegExp: function (str) {
668
+            var parts = str.split('/'),
669
+                modifiers = parts.pop();
670
+            parts.shift();
671
+            return new RegExp(parts.join('/'), modifiers);
672
+        },
673
+
674
+        _initRegExpOptions: function () {
675
+            var options = this.options;
676
+            if ($.type(options.acceptFileTypes) === 'string') {
677
+                options.acceptFileTypes = this._stringToRegExp(
678
+                    options.acceptFileTypes
679
+                );
680
+            }
681
+            if ($.type(options.previewSourceFileTypes) === 'string') {
682
+                options.previewSourceFileTypes = this._stringToRegExp(
683
+                    options.previewSourceFileTypes
684
+                );
685
+            }
686
+        },
687
+
688
+        _initSpecialOptions: function () {
689
+            this._super();
690
+            this._initFilesContainer();
691
+            this._initTemplates();
692
+            this._initRegExpOptions();
693
+        },
694
+
695
+        _create: function () {
696
+            this._super();
697
+            this._refreshOptionsList.push(
698
+                'filesContainer',
699
+                'uploadTemplateId',
700
+                'downloadTemplateId'
701
+            );
702
+            if (!this._processingQueue) {
703
+                this._processingQueue = $.Deferred().resolveWith(this).promise();
704
+                this.process = function () {
705
+                    return this._processingQueue;
706
+                };
707
+            }
708
+        },
709
+
710
+        enable: function () {
711
+            var wasDisabled = false;
712
+            if (this.options.disabled) {
713
+                wasDisabled = true;
714
+            }
715
+            this._super();
716
+            if (wasDisabled) {
717
+                this.element.find('input, button').prop('disabled', false);
718
+                this._enableFileInputButton();
719
+            }
720
+        },
721
+
722
+        disable: function () {
723
+            if (!this.options.disabled) {
724
+                this.element.find('input, button').prop('disabled', true);
725
+                this._disableFileInputButton();
726
+            }
727
+            this._super();
728
+        }
729
+
730
+    });
731
+
732
+}));

File diff suppressed because it is too large
+ 1108 - 0
web/bundles/admingeneratorgenerator/js/blueimp/jquery.fileupload.js


+ 172 - 0
web/bundles/admingeneratorgenerator/js/blueimp/jquery.iframe-transport.js View File

@@ -0,0 +1,172 @@
1
+/*
2
+ * jQuery Iframe Transport Plugin 1.5
3
+ * https://github.com/blueimp/jQuery-File-Upload
4
+ *
5
+ * Copyright 2011, Sebastian Tschan
6
+ * https://blueimp.net
7
+ *
8
+ * Licensed under the MIT license:
9
+ * http://www.opensource.org/licenses/MIT
10
+ */
11
+
12
+/*jslint unparam: true, nomen: true */
13
+/*global define, window, document */
14
+
15
+(function (factory) {
16
+    'use strict';
17
+    if (typeof define === 'function' && define.amd) {
18
+        // Register as an anonymous AMD module:
19
+        define(['jquery'], factory);
20
+    } else {
21
+        // Browser globals:
22
+        factory(window.jQuery);
23
+    }
24
+}(function ($) {
25
+    'use strict';
26
+
27
+    // Helper variable to create unique names for the transport iframes:
28
+    var counter = 0;
29
+
30
+    // The iframe transport accepts three additional options:
31
+    // options.fileInput: a jQuery collection of file input fields
32
+    // options.paramName: the parameter name for the file form data,
33
+    //  overrides the name property of the file input field(s),
34
+    //  can be a string or an array of strings.
35
+    // options.formData: an array of objects with name and value properties,
36
+    //  equivalent to the return data of .serializeArray(), e.g.:
37
+    //  [{name: 'a', value: 1}, {name: 'b', value: 2}]
38
+    $.ajaxTransport('iframe', function (options) {
39
+        if (options.async && (options.type === 'POST' || options.type === 'GET')) {
40
+            var form,
41
+                iframe;
42
+            return {
43
+                send: function (_, completeCallback) {
44
+                    form = $('<form style="display:none;"></form>');
45
+                    form.attr('accept-charset', options.formAcceptCharset);
46
+                    // javascript:false as initial iframe src
47
+                    // prevents warning popups on HTTPS in IE6.
48
+                    // IE versions below IE8 cannot set the name property of
49
+                    // elements that have already been added to the DOM,
50
+                    // so we set the name along with the iframe HTML markup:
51
+                    iframe = $(
52
+                        '<iframe src="javascript:false;" name="iframe-transport-' +
53
+                            (counter += 1) + '"></iframe>'
54
+                    ).bind('load', function () {
55
+                        var fileInputClones,
56
+                            paramNames = $.isArray(options.paramName) ?
57
+                                    options.paramName : [options.paramName];
58
+                        iframe
59
+                            .unbind('load')
60
+                            .bind('load', function () {
61
+                                var response;
62
+                                // Wrap in a try/catch block to catch exceptions thrown
63
+                                // when trying to access cross-domain iframe contents:
64
+                                try {
65
+                                    response = iframe.contents();
66
+                                    // Google Chrome and Firefox do not throw an
67
+                                    // exception when calling iframe.contents() on
68
+                                    // cross-domain requests, so we unify the response:
69
+                                    if (!response.length || !response[0].firstChild) {
70
+                                        throw new Error();
71
+                                    }
72
+                                } catch (e) {
73
+                                    response = undefined;
74
+                                }
75
+                                // The complete callback returns the
76
+                                // iframe content document as response object:
77
+                                completeCallback(
78
+                                    200,
79
+                                    'success',
80
+                                    {'iframe': response}
81
+                                );
82
+                                // Fix for IE endless progress bar activity bug
83
+                                // (happens on form submits to iframe targets):
84
+                                $('<iframe src="javascript:false;"></iframe>')
85
+                                    .appendTo(form);
86
+                                form.remove();
87
+                            });
88
+                        form
89
+                            .prop('target', iframe.prop('name'))
90
+                            .prop('action', options.url)
91
+                            .prop('method', options.type);
92
+                        if (options.formData) {
93
+                            $.each(options.formData, function (index, field) {
94
+                                $('<input type="hidden"/>')
95
+                                    .prop('name', field.name)
96
+                                    .val(field.value)
97
+                                    .appendTo(form);
98
+                            });
99
+                        }
100
+                        if (options.fileInput && options.fileInput.length &&
101
+                                options.type === 'POST') {
102
+                            fileInputClones = options.fileInput.clone();
103
+                            // Insert a clone for each file input field:
104
+                            options.fileInput.after(function (index) {
105
+                                return fileInputClones[index];
106
+                            });
107
+                            if (options.paramName) {
108
+                                options.fileInput.each(function (index) {
109
+                                    $(this).prop(
110
+                                        'name',
111
+                                        paramNames[index] || options.paramName
112
+                                    );
113
+                                });
114
+                            }
115
+                            // Appending the file input fields to the hidden form
116
+                            // removes them from their original location:
117
+                            form
118
+                                .append(options.fileInput)
119
+                                .prop('enctype', 'multipart/form-data')
120
+                                // enctype must be set as encoding for IE:
121
+                                .prop('encoding', 'multipart/form-data');
122
+                        }
123
+                        form.submit();
124
+                        // Insert the file input fields at their original location
125
+                        // by replacing the clones with the originals:
126
+                        if (fileInputClones && fileInputClones.length) {
127
+                            options.fileInput.each(function (index, input) {
128
+                                var clone = $(fileInputClones[index]);
129
+                                $(input).prop('name', clone.prop('name'));
130
+                                clone.replaceWith(input);
131
+                            });
132
+                        }
133
+                    });
134
+                    form.append(iframe).appendTo(document.body);
135
+                },
136
+                abort: function () {
137
+                    if (iframe) {
138
+                        // javascript:false as iframe src aborts the request
139
+                        // and prevents warning popups on HTTPS in IE6.
140
+                        // concat is used to avoid the "Script URL" JSLint error:
141
+                        iframe
142
+                            .unbind('load')
143
+                            .prop('src', 'javascript'.concat(':false;'));
144
+                    }
145
+                    if (form) {
146
+                        form.remove();
147
+                    }
148
+                }
149
+            };
150
+        }
151
+    });
152
+
153
+    // The iframe transport returns the iframe content document as response.
154
+    // The following adds converters from iframe to text, json, html, and script:
155
+    $.ajaxSetup({
156
+        converters: {
157
+            'iframe text': function (iframe) {
158
+                return $(iframe[0].body).text();
159
+            },
160
+            'iframe json': function (iframe) {
161
+                return $.parseJSON($(iframe[0].body).text());
162
+            },
163
+            'iframe html': function (iframe) {
164
+                return $(iframe[0].body).html();
165
+            },
166
+            'iframe script': function (iframe) {
167
+                return $.globalEval($(iframe[0].body).text());
168
+            }
169
+        }
170
+    });
171
+
172
+}));

+ 104 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/bootstrap-affix.js View File

@@ -0,0 +1,104 @@
1
+/* ==========================================================
2
+ * bootstrap-affix.js v2.1.1
3
+ * http://twitter.github.com/bootstrap/javascript.html#affix
4
+ * ==========================================================
5
+ * Copyright 2012 Twitter, Inc.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ * ========================================================== */
19
+
20
+
21
+!function ($) {
22
+
23
+  "use strict"; // jshint ;_;
24
+
25
+
26
+ /* AFFIX CLASS DEFINITION
27
+  * ====================== */
28
+
29
+  var Affix = function (element, options) {
30
+    this.options = $.extend({}, $.fn.affix.defaults, options)
31
+    this.$window = $(window).on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
32
+    this.$element = $(element)
33
+    this.checkPosition()
34
+  }
35
+
36
+  Affix.prototype.checkPosition = function () {
37
+    if (!this.$element.is(':visible')) return
38
+
39
+    var scrollHeight = $(document).height()
40
+      , scrollTop = this.$window.scrollTop()
41
+      , position = this.$element.offset()
42
+      , offset = this.options.offset
43
+      , offsetBottom = offset.bottom
44
+      , offsetTop = offset.top
45
+      , reset = 'affix affix-top affix-bottom'
46
+      , affix
47
+
48
+    if (typeof offset != 'object') offsetBottom = offsetTop = offset
49
+    if (typeof offsetTop == 'function') offsetTop = offset.top()
50
+    if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
51
+
52
+    affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ?
53
+      false    : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ?
54
+      'bottom' : offsetTop != null && scrollTop <= offsetTop ?
55
+      'top'    : false
56
+
57
+    if (this.affixed === affix) return
58
+
59
+    this.affixed = affix
60
+    this.unpin = affix == 'bottom' ? position.top - scrollTop : null
61
+
62
+    this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : ''))
63
+  }
64
+
65
+
66
+ /* AFFIX PLUGIN DEFINITION
67
+  * ======================= */
68
+
69
+  $.fn.affix = function (option) {
70
+    return this.each(function () {
71
+      var $this = $(this)
72
+        , data = $this.data('affix')
73
+        , options = typeof option == 'object' && option
74
+      if (!data) $this.data('affix', (data = new Affix(this, options)))
75
+      if (typeof option == 'string') data[option]()
76
+    })
77
+  }
78
+
79
+  $.fn.affix.Constructor = Affix
80
+
81
+  $.fn.affix.defaults = {
82
+    offset: 0
83
+  }
84
+
85
+
86
+ /* AFFIX DATA-API
87
+  * ============== */
88
+
89
+  $(window).on('load', function () {
90
+    $('[data-spy="affix"]').each(function () {
91
+      var $spy = $(this)
92
+        , data = $spy.data()
93
+
94
+      data.offset = data.offset || {}
95
+
96
+      data.offsetBottom && (data.offset.bottom = data.offsetBottom)
97
+      data.offsetTop && (data.offset.top = data.offsetTop)
98
+
99
+      $spy.affix(data)
100
+    })
101
+  })
102
+
103
+
104
+}(window.jQuery);

+ 90 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/bootstrap-alert.js View File

@@ -0,0 +1,90 @@
1
+/* ==========================================================
2
+ * bootstrap-alert.js v2.1.1
3
+ * http://twitter.github.com/bootstrap/javascript.html#alerts
4
+ * ==========================================================
5
+ * Copyright 2012 Twitter, Inc.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ * ========================================================== */
19
+
20
+
21
+!function ($) {
22
+
23
+  "use strict"; // jshint ;_;
24
+
25
+
26
+ /* ALERT CLASS DEFINITION
27
+  * ====================== */
28
+
29
+  var dismiss = '[data-dismiss="alert"]'
30
+    , Alert = function (el) {
31
+        $(el).on('click', dismiss, this.close)
32
+      }
33
+
34
+  Alert.prototype.close = function (e) {
35
+    var $this = $(this)
36
+      , selector = $this.attr('data-target')
37
+      , $parent
38
+
39
+    if (!selector) {
40
+      selector = $this.attr('href')
41
+      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
42
+    }
43
+
44
+    $parent = $(selector)
45
+
46
+    e && e.preventDefault()
47
+
48
+    $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
49
+
50
+    $parent.trigger(e = $.Event('close'))
51
+
52
+    if (e.isDefaultPrevented()) return
53
+
54
+    $parent.removeClass('in')
55
+
56
+    function removeElement() {
57
+      $parent
58
+        .trigger('closed')
59
+        .remove()
60
+    }
61
+
62
+    $.support.transition && $parent.hasClass('fade') ?
63
+      $parent.on($.support.transition.end, removeElement) :
64
+      removeElement()
65
+  }
66
+
67
+
68
+ /* ALERT PLUGIN DEFINITION
69
+  * ======================= */
70
+
71
+  $.fn.alert = function (option) {
72
+    return this.each(function () {
73
+      var $this = $(this)
74
+        , data = $this.data('alert')
75
+      if (!data) $this.data('alert', (data = new Alert(this)))
76
+      if (typeof option == 'string') data[option].call($this)
77
+    })
78
+  }
79
+
80
+  $.fn.alert.Constructor = Alert
81
+
82
+
83
+ /* ALERT DATA-API
84
+  * ============== */
85
+
86
+  $(function () {
87
+    $('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
88
+  })
89
+
90
+}(window.jQuery);

+ 96 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/bootstrap-button.js View File

@@ -0,0 +1,96 @@
1
+/* ============================================================
2
+ * bootstrap-button.js v2.1.1
3
+ * http://twitter.github.com/bootstrap/javascript.html#buttons
4
+ * ============================================================
5
+ * Copyright 2012 Twitter, Inc.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ * ============================================================ */
19
+
20
+
21
+!function ($) {
22
+
23
+  "use strict"; // jshint ;_;
24
+
25
+
26
+ /* BUTTON PUBLIC CLASS DEFINITION
27
+  * ============================== */
28
+
29
+  var Button = function (element, options) {
30
+    this.$element = $(element)
31
+    this.options = $.extend({}, $.fn.button.defaults, options)
32
+  }
33
+
34
+  Button.prototype.setState = function (state) {
35
+    var d = 'disabled'
36
+      , $el = this.$element
37
+      , data = $el.data()
38
+      , val = $el.is('input') ? 'val' : 'html'
39
+
40
+    state = state + 'Text'
41
+    data.resetText || $el.data('resetText', $el[val]())
42
+
43
+    $el[val](data[state] || this.options[state])
44
+
45
+    // push to event loop to allow forms to submit
46
+    setTimeout(function () {
47
+      state == 'loadingText' ?
48
+        $el.addClass(d).attr(d, d) :
49
+        $el.removeClass(d).removeAttr(d)
50
+    }, 0)
51
+  }
52
+
53
+  Button.prototype.toggle = function () {
54
+    var $parent = this.$element.closest('[data-toggle="buttons-radio"]')
55
+
56
+    $parent && $parent
57
+      .find('.active')
58
+      .removeClass('active')
59
+
60
+    this.$element.toggleClass('active')
61
+  }
62
+
63
+
64
+ /* BUTTON PLUGIN DEFINITION
65
+  * ======================== */
66
+
67
+  $.fn.button = function (option) {
68
+    return this.each(function () {
69
+      var $this = $(this)
70
+        , data = $this.data('button')
71
+        , options = typeof option == 'object' && option
72
+      if (!data) $this.data('button', (data = new Button(this, options)))
73
+      if (option == 'toggle') data.toggle()
74
+      else if (option) data.setState(option)
75
+    })
76
+  }
77
+
78
+  $.fn.button.defaults = {
79
+    loadingText: 'loading...'
80
+  }
81
+
82
+  $.fn.button.Constructor = Button
83
+
84
+
85
+ /* BUTTON DATA-API
86
+  * =============== */
87
+
88
+  $(function () {
89
+    $('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
90
+      var $btn = $(e.target)
91
+      if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
92
+      $btn.button('toggle')
93
+    })
94
+  })
95
+
96
+}(window.jQuery);

+ 176 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/bootstrap-carousel.js View File

@@ -0,0 +1,176 @@
1
+/* ==========================================================
2
+ * bootstrap-carousel.js v2.1.1
3
+ * http://twitter.github.com/bootstrap/javascript.html#carousel
4
+ * ==========================================================
5
+ * Copyright 2012 Twitter, Inc.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ * ========================================================== */
19
+
20
+
21
+!function ($) {
22
+
23
+  "use strict"; // jshint ;_;
24
+
25
+
26
+ /* CAROUSEL CLASS DEFINITION
27
+  * ========================= */
28
+
29
+  var Carousel = function (element, options) {
30
+    this.$element = $(element)
31
+    this.options = options
32
+    this.options.slide && this.slide(this.options.slide)
33
+    this.options.pause == 'hover' && this.$element
34
+      .on('mouseenter', $.proxy(this.pause, this))
35
+      .on('mouseleave', $.proxy(this.cycle, this))
36
+  }
37
+
38
+  Carousel.prototype = {
39
+
40
+    cycle: function (e) {
41
+      if (!e) this.paused = false
42
+      this.options.interval
43
+        && !this.paused
44
+        && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
45
+      return this
46
+    }
47
+
48
+  , to: function (pos) {
49
+      var $active = this.$element.find('.item.active')
50
+        , children = $active.parent().children()
51
+        , activePos = children.index($active)
52
+        , that = this
53
+
54
+      if (pos > (children.length - 1) || pos < 0) return
55
+
56
+      if (this.sliding) {
57
+        return this.$element.one('slid', function () {
58
+          that.to(pos)
59
+        })
60
+      }
61
+
62
+      if (activePos == pos) {
63
+        return this.pause().cycle()
64
+      }
65
+
66
+      return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos]))
67
+    }
68
+
69
+  , pause: function (e) {
70
+      if (!e) this.paused = true
71
+      if (this.$element.find('.next, .prev').length && $.support.transition.end) {
72
+        this.$element.trigger($.support.transition.end)
73
+        this.cycle()
74
+      }
75
+      clearInterval(this.interval)
76
+      this.interval = null
77
+      return this
78
+    }
79
+
80
+  , next: function () {
81
+      if (this.sliding) return
82
+      return this.slide('next')
83
+    }
84
+
85
+  , prev: function () {
86
+      if (this.sliding) return
87
+      return this.slide('prev')
88
+    }
89
+
90
+  , slide: function (type, next) {
91
+      var $active = this.$element.find('.item.active')
92
+        , $next = next || $active[type]()
93
+        , isCycling = this.interval
94
+        , direction = type == 'next' ? 'left' : 'right'
95
+        , fallback  = type == 'next' ? 'first' : 'last'
96
+        , that = this
97
+        , e = $.Event('slide', {
98
+            relatedTarget: $next[0]
99
+          })
100
+
101
+      this.sliding = true
102
+
103
+      isCycling && this.pause()
104
+
105
+      $next = $next.length ? $next : this.$element.find('.item')[fallback]()
106
+
107
+      if ($next.hasClass('active')) return
108
+
109
+      if ($.support.transition && this.$element.hasClass('slide')) {
110
+        this.$element.trigger(e)
111
+        if (e.isDefaultPrevented()) return
112
+        $next.addClass(type)
113
+        $next[0].offsetWidth // force reflow
114
+        $active.addClass(direction)
115
+        $next.addClass(direction)
116
+        this.$element.one($.support.transition.end, function () {
117
+          $next.removeClass([type, direction].join(' ')).addClass('active')
118
+          $active.removeClass(['active', direction].join(' '))
119
+          that.sliding = false
120
+          setTimeout(function () { that.$element.trigger('slid') }, 0)
121
+        })
122
+      } else {
123
+        this.$element.trigger(e)
124
+        if (e.isDefaultPrevented()) return
125
+        $active.removeClass('active')
126
+        $next.addClass('active')
127
+        this.sliding = false
128
+        this.$element.trigger('slid')
129
+      }
130
+
131
+      isCycling && this.cycle()
132
+
133
+      return this
134
+    }
135
+
136
+  }
137
+
138
+
139
+ /* CAROUSEL PLUGIN DEFINITION
140
+  * ========================== */
141
+
142
+  $.fn.carousel = function (option) {
143
+    return this.each(function () {
144
+      var $this = $(this)
145
+        , data = $this.data('carousel')
146
+        , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
147
+        , action = typeof option == 'string' ? option : options.slide
148
+      if (!data) $this.data('carousel', (data = new Carousel(this, options)))
149
+      if (typeof option == 'number') data.to(option)
150
+      else if (action) data[action]()
151
+      else if (options.interval) data.cycle()
152
+    })
153
+  }
154
+
155
+  $.fn.carousel.defaults = {
156
+    interval: 5000
157
+  , pause: 'hover'
158
+  }
159
+
160
+  $.fn.carousel.Constructor = Carousel
161
+
162
+
163
+ /* CAROUSEL DATA-API
164
+  * ================= */
165
+
166
+  $(function () {
167
+    $('body').on('click.carousel.data-api', '[data-slide]', function ( e ) {
168
+      var $this = $(this), href
169
+        , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
170
+        , options = !$target.data('modal') && $.extend({}, $target.data(), $this.data())
171
+      $target.carousel(options)
172
+      e.preventDefault()
173
+    })
174
+  })
175
+
176
+}(window.jQuery);

+ 158 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/bootstrap-collapse.js View File

@@ -0,0 +1,158 @@
1
+/* =============================================================
2
+ * bootstrap-collapse.js v2.1.1
3
+ * http://twitter.github.com/bootstrap/javascript.html#collapse
4
+ * =============================================================
5
+ * Copyright 2012 Twitter, Inc.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ * ============================================================ */
19
+
20
+
21
+!function ($) {
22
+
23
+  "use strict"; // jshint ;_;
24
+
25
+
26
+ /* COLLAPSE PUBLIC CLASS DEFINITION
27
+  * ================================ */
28
+
29
+  var Collapse = function (element, options) {
30
+    this.$element = $(element)
31
+    this.options = $.extend({}, $.fn.collapse.defaults, options)
32
+
33
+    if (this.options.parent) {
34
+      this.$parent = $(this.options.parent)
35
+    }
36
+
37
+    this.options.toggle && this.toggle()
38
+  }
39
+
40
+  Collapse.prototype = {
41
+
42
+    constructor: Collapse
43
+
44
+  , dimension: function () {
45
+      var hasWidth = this.$element.hasClass('width')
46
+      return hasWidth ? 'width' : 'height'
47
+    }
48
+
49
+  , show: function () {
50
+      var dimension
51
+        , scroll
52
+        , actives
53
+        , hasData
54
+
55
+      if (this.transitioning) return
56
+
57
+      dimension = this.dimension()
58
+      scroll = $.camelCase(['scroll', dimension].join('-'))
59
+      actives = this.$parent && this.$parent.find('> .accordion-group > .in')
60
+
61
+      if (actives && actives.length) {
62
+        hasData = actives.data('collapse')
63
+        if (hasData && hasData.transitioning) return
64
+        actives.collapse('hide')
65
+        hasData || actives.data('collapse', null)
66
+      }
67
+
68
+      this.$element[dimension](0)
69
+      this.transition('addClass', $.Event('show'), 'shown')
70
+      $.support.transition && this.$element[dimension](this.$element[0][scroll])
71
+    }
72
+
73
+  , hide: function () {
74
+      var dimension
75
+      if (this.transitioning) return
76
+      dimension = this.dimension()
77
+      this.reset(this.$element[dimension]())
78
+      this.transition('removeClass', $.Event('hide'), 'hidden')
79
+      this.$element[dimension](0)
80
+    }
81
+
82
+  , reset: function (size) {
83
+      var dimension = this.dimension()
84
+
85
+      this.$element
86
+        .removeClass('collapse')
87
+        [dimension](size || 'auto')
88
+        [0].offsetWidth
89
+
90
+      this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
91
+
92
+      return this
93
+    }
94
+
95
+  , transition: function (method, startEvent, completeEvent) {
96
+      var that = this
97
+        , complete = function () {
98
+            if (startEvent.type == 'show') that.reset()
99
+            that.transitioning = 0
100
+            that.$element.trigger(completeEvent)
101
+          }
102
+
103
+      this.$element.trigger(startEvent)
104
+
105
+      if (startEvent.isDefaultPrevented()) return
106
+
107
+      this.transitioning = 1
108
+
109
+      this.$element[method]('in')
110
+
111
+      $.support.transition && this.$element.hasClass('collapse') ?
112
+        this.$element.one($.support.transition.end, complete) :
113
+        complete()
114
+    }
115
+
116
+  , toggle: function () {
117
+      this[this.$element.hasClass('in') ? 'hide' : 'show']()
118
+    }
119
+
120
+  }
121
+
122
+
123
+ /* COLLAPSIBLE PLUGIN DEFINITION
124
+  * ============================== */
125
+
126
+  $.fn.collapse = function (option) {
127
+    return this.each(function () {
128
+      var $this = $(this)
129
+        , data = $this.data('collapse')
130
+        , options = typeof option == 'object' && option
131
+      if (!data) $this.data('collapse', (data = new Collapse(this, options)))
132
+      if (typeof option == 'string') data[option]()
133
+    })
134
+  }
135
+
136
+  $.fn.collapse.defaults = {
137
+    toggle: true
138
+  }
139
+
140
+  $.fn.collapse.Constructor = Collapse
141
+
142
+
143
+ /* COLLAPSIBLE DATA-API
144
+  * ==================== */
145
+
146
+  $(function () {
147
+    $('body').on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
148
+      var $this = $(this), href
149
+        , target = $this.attr('data-target')
150
+          || e.preventDefault()
151
+          || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
152
+        , option = $(target).data('collapse') ? 'toggle' : $this.data()
153
+      $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
154
+      $(target).collapse(option)
155
+    })
156
+  })
157
+
158
+}(window.jQuery);

+ 779 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/bootstrap-datepicker.js View File

@@ -0,0 +1,779 @@
1
+/* =========================================================
2
+ * bootstrap-datepicker.js
3
+ * http://www.eyecon.ro/bootstrap-datepicker
4
+ * =========================================================
5
+ * Copyright 2012 Stefan Petre
6
+ * Improvements by Andrew Rowls
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ * ========================================================= */
20
+
21
+!function( $ ) {
22
+
23
+	function UTCDate(){
24
+		return new Date(Date.UTC.apply(Date, arguments));
25
+	}
26
+
27
+	// Picker object
28
+
29
+	var Datepicker = function(element, options) {
30
+		var that = this;
31
+
32
+		this.element = $(element);
33
+		this.language = options.language||this.element.data('date-language')||"en";
34
+		this.language = this.language in dates ? this.language : "en";
35
+		this.format = DPGlobal.parseFormat(options.format||this.element.data('date-format')||'mm/dd/yyyy');
36
+		this.picker = $(DPGlobal.template)
37
+							.appendTo('body')
38
+							.on({
39
+								click: $.proxy(this.click, this)
40
+							});
41
+		this.isInput = this.element.is('input');
42
+		this.component = this.element.is('.date') ? this.element.find('.add-on') : false;
43
+		this.hasInput = this.component && this.element.find('input').length;
44
+		if(this.component && this.component.length === 0)
45
+			this.component = false;
46
+
47
+		if (this.isInput) {
48
+			this.element.on({
49
+				focus: $.proxy(this.show, this),
50
+				keyup: $.proxy(this.update, this),
51
+				keydown: $.proxy(this.keydown, this)
52
+			});
53
+		} else {
54
+			if (this.component && this.hasInput){
55
+				// For components that are not readonly, allow keyboard nav
56
+				this.element.find('input').on({
57
+					focus: $.proxy(this.show, this),
58
+					keyup: $.proxy(this.update, this),
59
+					keydown: $.proxy(this.keydown, this)
60
+				});
61
+
62
+				this.component.on('click', $.proxy(this.show, this));
63
+			} else {
64
+				this.element.on('click', $.proxy(this.show, this));
65
+			}
66
+		}
67
+
68
+		$(document).on('mousedown', function (e) {
69
+			// Clicked outside the datepicker, hide it
70
+			if ($(e.target).closest('.datepicker').length == 0) {
71
+				that.hide();
72
+			}
73
+		});
74
+
75
+		this.autoclose = false;
76
+		if ('autoclose' in options) {
77
+			this.autoclose = options.autoclose;
78
+		} else if ('dateAutoclose' in this.element.data()) {
79
+			this.autoclose = this.element.data('date-autoclose');
80
+		}
81
+
82
+		this.keyboardNavigation = true;
83
+		if ('keyboardNavigation' in options) {
84
+			this.keyboardNavigation = options.keyboardNavigation;
85
+		} else if ('dateKeyboardNavigation' in this.element.data()) {
86
+			this.keyboardNavigation = this.element.data('date-keyboard-navigation');
87
+		}
88
+
89
+		switch(options.startView || this.element.data('date-start-view')){
90
+			case 2:
91
+			case 'decade':
92
+				this.viewMode = this.startViewMode = 2;
93
+				break;
94
+			case 1:
95
+			case 'year':
96
+				this.viewMode = this.startViewMode = 1;
97
+				break;
98
+			case 0:
99
+			case 'month':
100
+			default:
101
+				this.viewMode = this.startViewMode = 0;
102
+				break;
103
+		}
104
+
105
+		this.weekStart = ((options.weekStart||this.element.data('date-weekstart')||dates[this.language].weekStart||0) % 7);
106
+		this.weekEnd = ((this.weekStart + 6) % 7);
107
+		this.startDate = -Infinity;
108
+		this.endDate = Infinity;
109
+		this.setStartDate(options.startDate||this.element.data('date-startdate'));
110
+		this.setEndDate(options.endDate||this.element.data('date-enddate'));
111
+		this.fillDow();
112
+		this.fillMonths();
113
+		this.update();
114
+		this.showMode();
115
+	};
116
+
117
+	Datepicker.prototype = {
118
+		constructor: Datepicker,
119
+
120
+		show: function(e) {
121
+			this.picker.show();
122
+			this.height = this.component ? this.component.outerHeight() : this.element.outerHeight();
123
+			this.update();
124
+			this.place();
125
+			$(window).on('resize', $.proxy(this.place, this));
126
+			if (e ) {
127
+				e.stopPropagation();
128
+				e.preventDefault();
129
+			}
130
+			this.element.trigger({
131
+				type: 'show',
132
+				date: this.date
133
+			});
134
+		},
135
+
136
+		hide: function(e){
137
+			this.picker.hide();
138
+			$(window).off('resize', this.place);
139
+			this.viewMode = this.startViewMode;
140
+			this.showMode();
141
+			if (!this.isInput) {
142
+				$(document).off('mousedown', this.hide);
143
+			}
144
+			if (e && e.currentTarget.value)
145
+				this.setValue();
146
+			this.element.trigger({
147
+				type: 'hide',
148
+				date: this.date
149
+			});
150
+		},
151
+
152
+		setValue: function() {
153
+			var formatted = DPGlobal.formatDate(this.date, this.format, this.language);
154
+			if (!this.isInput) {
155
+				if (this.component){
156
+					this.element.find('input').prop('value', formatted);
157
+				}
158
+				this.element.data('date', formatted);
159
+			} else {
160
+				this.element.prop('value', formatted);
161
+			}
162
+		},
163
+
164
+		setStartDate: function(startDate){
165
+			this.startDate = startDate||-Infinity;
166
+			if (this.startDate !== -Infinity) {
167
+				this.startDate = DPGlobal.parseDate(this.startDate, this.format, this.language);
168
+			}
169
+			this.update();
170
+			this.updateNavArrows();
171
+		},
172
+
173
+		setEndDate: function(endDate){
174
+			this.endDate = endDate||Infinity;
175
+			if (this.endDate !== Infinity) {
176
+				this.endDate = DPGlobal.parseDate(this.endDate, this.format, this.language);
177
+			}
178
+			this.update();
179
+			this.updateNavArrows();
180
+		},
181
+
182
+		place: function(){
183
+			var zIndex = parseInt(this.element.parents().filter(function() {
184
+							return $(this).css('z-index') != 'auto';
185
+						}).first().css('z-index'))+10;
186
+			var offset = this.component ? this.component.offset() : this.element.offset();
187
+			this.picker.css({
188
+				top: offset.top + this.height,
189
+				left: offset.left,
190
+				zIndex: zIndex
191
+			});
192
+		},
193
+
194
+		update: function(){
195
+			this.date = DPGlobal.parseDate(
196
+				this.isInput ? this.element.prop('value') : this.element.data('date') || this.element.find('input').prop('value'),
197
+				this.format, this.language
198
+			);
199
+			if (this.date < this.startDate) {
200
+				this.viewDate = new Date(this.startDate);
201
+			} else if (this.date > this.endDate) {
202
+				this.viewDate = new Date(this.endDate);
203
+			} else {
204
+				this.viewDate = new Date(this.date);
205
+			}
206
+			this.fill();
207
+		},
208
+
209
+		fillDow: function(){
210
+			var dowCnt = this.weekStart;
211
+			var html = '<tr>';
212
+			while (dowCnt < this.weekStart + 7) {
213
+				html += '<th class="dow">'+dates[this.language].daysMin[(dowCnt++)%7]+'</th>';
214
+			}
215
+			html += '</tr>';
216
+			this.picker.find('.datepicker-days thead').append(html);
217
+		},
218
+
219
+		fillMonths: function(){
220
+			var html = '';
221
+			var i = 0
222
+			while (i < 12) {
223
+				html += '<span class="month">'+dates[this.language].monthsShort[i++]+'</span>';
224
+			}
225
+			this.picker.find('.datepicker-months td').html(html);
226
+		},
227
+
228
+		fill: function() {
229
+			var d = new Date(this.viewDate),
230
+				year = d.getUTCFullYear(),
231
+				month = d.getUTCMonth(),
232
+				startYear = this.startDate !== -Infinity ? this.startDate.getUTCFullYear() : -Infinity,
233
+				startMonth = this.startDate !== -Infinity ? this.startDate.getUTCMonth() : -Infinity,
234
+				endYear = this.endDate !== Infinity ? this.endDate.getUTCFullYear() : Infinity,
235
+				endMonth = this.endDate !== Infinity ? this.endDate.getUTCMonth() : Infinity,
236
+				currentDate = this.date.valueOf();
237
+			this.picker.find('.datepicker-days th:eq(1)')
238
+						.text(dates[this.language].months[month]+' '+year);
239
+			this.updateNavArrows();
240
+			this.fillMonths();
241
+			var prevMonth = UTCDate(year, month-1, 28,0,0,0,0),
242
+				day = DPGlobal.getDaysInMonth(prevMonth.getUTCFullYear(), prevMonth.getUTCMonth());
243
+			prevMonth.setUTCDate(day);
244
+			prevMonth.setUTCDate(day - (prevMonth.getUTCDay() - this.weekStart + 7)%7);
245
+			var nextMonth = new Date(prevMonth);
246
+			nextMonth.setUTCDate(nextMonth.getUTCDate() + 42);
247
+			nextMonth = nextMonth.valueOf();
248
+			var html = [];
249
+			var clsName;
250
+			while(prevMonth.valueOf() < nextMonth) {
251
+				if (prevMonth.getUTCDay() == this.weekStart) {
252
+					html.push('<tr>');
253
+				}
254
+				clsName = '';
255
+				if (prevMonth.getUTCFullYear() < year || (prevMonth.getUTCFullYear() == year && prevMonth.getUTCMonth() < month)) {
256
+					clsName += ' old';
257
+				} else if (prevMonth.getUTCFullYear() > year || (prevMonth.getUTCFullYear() == year && prevMonth.getUTCMonth() > month)) {
258
+					clsName += ' new';
259
+				}
260
+				if (prevMonth.valueOf() == currentDate) {
261
+					clsName += ' active';
262
+				}
263
+				if (prevMonth.valueOf() < this.startDate || prevMonth.valueOf() > this.endDate) {
264
+					clsName += ' disabled';
265
+				}
266
+				html.push('<td class="day'+clsName+'">'+prevMonth.getUTCDate() + '</td>');
267
+				if (prevMonth.getUTCDay() == this.weekEnd) {
268
+					html.push('</tr>');
269
+				}
270
+				prevMonth.setUTCDate(prevMonth.getUTCDate()+1);
271
+			}
272
+			this.picker.find('.datepicker-days tbody').empty().append(html.join(''));
273
+			var currentYear = this.date.getUTCFullYear();
274
+
275
+			var months = this.picker.find('.datepicker-months')
276
+						.find('th:eq(1)')
277
+							.text(year)
278
+							.end()
279
+						.find('span').removeClass('active');
280
+			if (currentYear == year) {
281
+				months.eq(this.date.getUTCMonth()).addClass('active');
282
+			}
283
+			if (year < startYear || year > endYear) {
284
+				months.addClass('disabled');
285
+			}
286
+			if (year == startYear) {
287
+				months.slice(0, startMonth).addClass('disabled');
288
+			}
289
+			if (year == endYear) {
290
+				months.slice(endMonth+1).addClass('disabled');
291
+			}
292
+
293
+			html = '';
294
+			year = parseInt(year/10, 10) * 10;
295
+			var yearCont = this.picker.find('.datepicker-years')
296
+								.find('th:eq(1)')
297
+									.text(year + '-' + (year + 9))
298
+									.end()
299
+								.find('td');
300
+			year -= 1;
301
+			for (var i = -1; i < 11; i++) {
302
+				html += '<span class="year'+(i == -1 || i == 10 ? ' old' : '')+(currentYear == year ? ' active' : '')+(year < startYear || year > endYear ? ' disabled' : '')+'">'+year+'</span>';
303
+				year += 1;
304
+			}
305
+			yearCont.html(html);
306
+		},
307
+
308
+		updateNavArrows: function() {
309
+			var d = new Date(this.viewDate),
310
+				year = d.getUTCFullYear(),
311
+				month = d.getUTCMonth();
312
+			switch (this.viewMode) {
313
+				case 0:
314
+					if (this.startDate !== -Infinity && year <= this.startDate.getUTCFullYear() && month <= this.startDate.getUTCMonth()) {
315
+						this.picker.find('.prev').css({visibility: 'hidden'});
316
+					} else {
317
+						this.picker.find('.prev').css({visibility: 'visible'});
318
+					}
319
+					if (this.endDate !== Infinity && year >= this.endDate.getUTCFullYear() && month >= this.endDate.getUTCMonth()) {
320
+						this.picker.find('.next').css({visibility: 'hidden'});
321
+					} else {
322
+						this.picker.find('.next').css({visibility: 'visible'});
323
+					}
324
+					break;
325
+				case 1:
326
+				case 2:
327
+					if (this.startDate !== -Infinity && year <= this.startDate.getUTCFullYear()) {
328
+						this.picker.find('.prev').css({visibility: 'hidden'});
329
+					} else {
330
+						this.picker.find('.prev').css({visibility: 'visible'});
331
+					}
332
+					if (this.endDate !== Infinity && year >= this.endDate.getUTCFullYear()) {
333
+						this.picker.find('.next').css({visibility: 'hidden'});
334
+					} else {
335
+						this.picker.find('.next').css({visibility: 'visible'});
336
+					}
337
+					break;
338
+			}
339
+		},
340
+
341
+		click: function(e) {
342
+			e.stopPropagation();
343
+			e.preventDefault();
344
+			var target = $(e.target).closest('span, td, th');
345
+			if (target.length == 1) {
346
+				switch(target[0].nodeName.toLowerCase()) {
347
+					case 'th':
348
+						switch(target[0].className) {
349
+							case 'switch':
350
+								this.showMode(1);
351
+								break;
352
+							case 'prev':
353
+							case 'next':
354
+								var dir = DPGlobal.modes[this.viewMode].navStep * (target[0].className == 'prev' ? -1 : 1);
355
+								switch(this.viewMode){
356
+									case 0:
357
+										this.viewDate = this.moveMonth(this.viewDate, dir);
358
+										break;
359
+									case 1:
360
+									case 2:
361
+										this.viewDate = this.moveYear(this.viewDate, dir);
362
+										break;
363
+								}
364
+								this.fill();
365
+								break;
366
+						}
367
+						break;
368
+					case 'span':
369
+						if (!target.is('.disabled')) {
370
+							this.viewDate.setUTCDate(1);
371
+							if (target.is('.month')) {
372
+								var month = target.parent().find('span').index(target);
373
+								this.viewDate.setUTCMonth(month);
374
+								this.element.trigger({
375
+									type: 'changeMonth',
376
+									date: this.viewDate
377
+								});
378
+							} else {
379
+								var year = parseInt(target.text(), 10)||0;
380
+								this.viewDate.setUTCFullYear(year);
381
+								this.element.trigger({
382
+									type: 'changeYear',
383
+									date: this.viewDate
384
+								});
385
+							}
386
+							this.showMode(-1);
387
+							this.fill();
388
+						}
389
+						break;
390
+					case 'td':
391
+						if (target.is('.day') && !target.is('.disabled')){
392
+							var day = parseInt(target.text(), 10)||1;
393
+							var year = this.viewDate.getUTCFullYear(),
394
+								month = this.viewDate.getUTCMonth();
395
+							if (target.is('.old')) {
396
+								if (month == 0) {
397
+									month = 11;
398
+									year -= 1;
399
+								} else {
400
+									month -= 1;
401
+								}
402
+							} else if (target.is('.new')) {
403
+								if (month == 11) {
404
+									month = 0;
405
+									year += 1;
406
+								} else {
407
+									month += 1;
408
+								}
409
+							}
410
+							this.date = UTCDate(year, month, day,0,0,0,0);
411
+							this.viewDate = UTCDate(year, month, day,0,0,0,0);
412
+							this.fill();
413
+							this.setValue();
414
+							this.element.trigger({
415
+								type: 'changeDate',
416
+								date: this.date
417
+							});
418
+							var element;
419
+							if (this.isInput) {
420
+								element = this.element;
421
+							} else if (this.component){
422
+								element = this.element.find('input');
423
+							}
424
+							if (element) {
425
+								element.change();
426
+								if (this.autoclose) {
427
+									this.hide();
428
+								}
429
+							}
430
+						}
431
+						break;
432
+				}
433
+			}
434
+		},
435
+
436
+		moveMonth: function(date, dir){
437
+			if (!dir) return date;
438
+			var new_date = new Date(date.valueOf()),
439
+				day = new_date.getUTCDate(),
440
+				month = new_date.getUTCMonth(),
441
+				mag = Math.abs(dir),
442
+				new_month, test;
443
+			dir = dir > 0 ? 1 : -1;
444
+			if (mag == 1){
445
+				test = dir == -1
446
+					// If going back one month, make sure month is not current month
447
+					// (eg, Mar 31 -> Feb 31 == Feb 28, not Mar 02)
448
+					? function(){ return new_date.getUTCMonth() == month; }
449
+					// If going forward one month, make sure month is as expected
450
+					// (eg, Jan 31 -> Feb 31 == Feb 28, not Mar 02)
451
+					: function(){ return new_date.getUTCMonth() != new_month; };
452
+				new_month = month + dir;
453
+				new_date.setUTCMonth(new_month);
454
+				// Dec -> Jan (12) or Jan -> Dec (-1) -- limit expected date to 0-11
455
+				if (new_month < 0 || new_month > 11)
456
+					new_month = (new_month + 12) % 12;
457
+			} else {
458
+				// For magnitudes >1, move one month at a time...
459
+				for (var i=0; i<mag; i++)
460
+					// ...which might decrease the day (eg, Jan 31 to Feb 28, etc)...
461
+					new_date = this.moveMonth(new_date, dir);
462
+				// ...then reset the day, keeping it in the new month
463
+				new_month = new_date.getUTCMonth();
464
+				new_date.setUTCDate(day);
465
+				test = function(){ return new_month != new_date.getUTCMonth(); };
466
+			}
467
+			// Common date-resetting loop -- if date is beyond end of month, make it
468
+			// end of month
469
+			while (test()){
470
+				new_date.setUTCDate(--day);
471
+				new_date.setUTCMonth(new_month);
472
+			}
473
+			return new_date;
474
+		},
475
+
476
+		moveYear: function(date, dir){
477
+			return this.moveMonth(date, dir*12);
478
+		},
479
+
480
+		dateWithinRange: function(date){
481
+			return date >= this.startDate && date <= this.endDate;
482
+		},
483
+
484
+		keydown: function(e){
485
+			if (this.picker.is(':not(:visible)')){
486
+				if (e.keyCode == 27) // allow escape to hide and re-show picker
487
+					this.show();
488
+				return;
489
+			}
490
+			var dateChanged = false,
491
+				dir, day, month,
492
+				newDate, newViewDate;
493
+			switch(e.keyCode){
494
+				case 27: // escape
495
+					this.hide();
496
+					e.preventDefault();
497
+					break;
498
+				case 37: // left
499
+				case 39: // right
500
+					if (!this.keyboardNavigation) break;
501
+					dir = e.keyCode == 37 ? -1 : 1;
502
+					if (e.ctrlKey){
503
+						newDate = this.moveYear(this.date, dir);
504
+						newViewDate = this.moveYear(this.viewDate, dir);
505
+					} else if (e.shiftKey){
506
+						newDate = this.moveMonth(this.date, dir);
507
+						newViewDate = this.moveMonth(this.viewDate, dir);
508
+					} else {
509
+						newDate = new Date(this.date);
510
+						newDate.setUTCDate(this.date.getUTCDate() + dir);
511
+						newViewDate = new Date(this.viewDate);
512
+						newViewDate.setUTCDate(this.viewDate.getUTCDate() + dir);
513
+					}
514
+					if (this.dateWithinRange(newDate)){
515
+						this.date = newDate;
516
+						this.viewDate = newViewDate;
517
+						this.setValue();
518
+						this.update();
519
+						e.preventDefault();
520
+						dateChanged = true;
521
+					}
522
+					break;
523
+				case 38: // up
524
+				case 40: // down
525
+					if (!this.keyboardNavigation) break;
526
+					dir = e.keyCode == 38 ? -1 : 1;
527
+					if (e.ctrlKey){
528
+						newDate = this.moveYear(this.date, dir);
529
+						newViewDate = this.moveYear(this.viewDate, dir);
530
+					} else if (e.shiftKey){
531
+						newDate = this.moveMonth(this.date, dir);
532
+						newViewDate = this.moveMonth(this.viewDate, dir);
533
+					} else {
534
+						newDate = new Date(this.date);
535
+						newDate.setUTCDate(this.date.getUTCDate() + dir * 7);
536
+						newViewDate = new Date(this.viewDate);
537
+						newViewDate.setUTCDate(this.viewDate.getUTCDate() + dir * 7);
538
+					}
539
+					if (this.dateWithinRange(newDate)){
540
+						this.date = newDate;
541
+						this.viewDate = newViewDate;
542
+						this.setValue();
543
+						this.update();
544
+						e.preventDefault();
545
+						dateChanged = true;
546
+					}
547
+					break;
548
+				case 13: // enter
549
+					this.hide();
550
+					e.preventDefault();
551
+					break;
552
+				case 9: // tab
553
+					this.hide();
554
+					break;
555
+			}
556
+			if (dateChanged){
557
+				this.element.trigger({
558
+					type: 'changeDate',
559
+					date: this.date
560
+				});
561
+				var element;
562
+				if (this.isInput) {
563
+					element = this.element;
564
+				} else if (this.component){
565
+					element = this.element.find('input');
566
+				}
567
+				if (element) {
568
+					element.change();
569
+				}
570
+			}
571
+		},
572
+
573
+		showMode: function(dir) {
574
+			if (dir) {
575
+				this.viewMode = Math.max(0, Math.min(2, this.viewMode + dir));
576
+			}
577
+			this.picker.find('>div').hide().filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName).show();
578
+			this.updateNavArrows();
579
+		}
580
+	};
581
+
582
+	$.fn.datepicker = function ( option ) {
583
+		var args = Array.apply(null, arguments);
584
+		args.shift();
585
+		return this.each(function () {
586
+			var $this = $(this),
587
+				data = $this.data('datepicker'),
588
+				options = typeof option == 'object' && option;
589
+			if (!data) {
590
+				$this.data('datepicker', (data = new Datepicker(this, $.extend({}, $.fn.datepicker.defaults,options))));
591
+			}
592
+			if (typeof option == 'string' && typeof data[option] == 'function') {
593
+				data[option].apply(data, args);
594
+			}
595
+		});
596
+	};
597
+
598
+	$.fn.datepicker.defaults = {
599
+	};
600
+	$.fn.datepicker.Constructor = Datepicker;
601
+	var dates = $.fn.datepicker.dates = {
602
+		en: {
603
+			days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"],
604
+			daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
605
+			daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"],
606
+			months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
607
+			monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
608
+		}
609
+	}
610
+
611
+	var DPGlobal = {
612
+		modes: [
613
+			{
614
+				clsName: 'days',
615
+				navFnc: 'Month',
616
+				navStep: 1
617
+			},
618
+			{
619
+				clsName: 'months',
620
+				navFnc: 'FullYear',
621
+				navStep: 1
622
+			},
623
+			{
624
+				clsName: 'years',
625
+				navFnc: 'FullYear',
626
+				navStep: 10
627
+		}],
628
+		isLeapYear: function (year) {
629
+			return (((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0))
630
+		},
631
+		getDaysInMonth: function (year, month) {
632
+			return [31, (DPGlobal.isLeapYear(year) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month]
633
+		},
634
+		validParts: /dd?|mm?|MM?|yy(?:yy)?/g,
635
+		nonpunctuation: /[^ -\/:-@\[-`{-~\t\n\r]+/g,
636
+		parseFormat: function(format){
637
+			// IE treats \0 as a string end in inputs (truncating the value),
638
+			// so it's a bad format delimiter, anyway
639
+			var separators = format.replace(this.validParts, '\0').split('\0'),
640
+				parts = format.match(this.validParts);
641
+			if (!separators || !separators.length || !parts || parts.length == 0){
642
+				throw new Error("Invalid date format.");
643
+			}
644
+			return {separators: separators, parts: parts};
645
+		},
646
+		parseDate: function(date, format, language) {
647
+			if (date instanceof Date) return date;
648
+			if (/^[-+]\d+[dmwy]([\s,]+[-+]\d+[dmwy])*$/.test(date)) {
649
+				var part_re = /([-+]\d+)([dmwy])/,
650
+					parts = date.match(/([-+]\d+)([dmwy])/g),
651
+					part, dir;
652
+				date = new Date();
653
+				for (var i=0; i<parts.length; i++) {
654
+					part = part_re.exec(parts[i]);
655
+					dir = parseInt(part[1]);
656
+					switch(part[2]){
657
+						case 'd':
658
+							date.setUTCDate(date.getUTCDate() + dir);
659
+							break;
660
+						case 'm':
661
+							date = Datepicker.prototype.moveMonth.call(Datepicker.prototype, date, dir);
662
+							break;
663
+						case 'w':
664
+							date.setUTCDate(date.getUTCDate() + dir * 7);
665
+							break;
666
+						case 'y':
667
+							date = Datepicker.prototype.moveYear.call(Datepicker.prototype, date, dir);
668
+							break;
669
+					}
670
+				}
671
+				return UTCDate(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), 0, 0, 0);
672
+			}
673
+			var parts = date && date.match(this.nonpunctuation) || [],
674
+				date = new Date(),
675
+				parsed = {},
676
+				setters_order = ['yyyy', 'yy', 'M', 'MM', 'm', 'mm', 'd', 'dd'],
677
+				setters_map = {
678
+					yyyy: function(d,v){ return d.setUTCFullYear(v); },
679
+					yy: function(d,v){ return d.setUTCFullYear(2000+v); },
680
+					m: function(d,v){
681
+						v -= 1;
682
+						while (v<0) v += 12;
683
+						v %= 12;
684
+						d.setUTCMonth(v);
685
+						while (d.getUTCMonth() != v)
686
+							d.setUTCDate(d.getUTCDate()-1);
687
+						return d;
688
+					},
689
+					d: function(d,v){ return d.setUTCDate(v); }
690
+				},
691
+				val, filtered, part;
692
+			setters_map['M'] = setters_map['MM'] = setters_map['mm'] = setters_map['m'];
693
+			setters_map['dd'] = setters_map['d'];
694
+			date = UTCDate(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), 0, 0, 0);
695
+			if (parts.length == format.parts.length) {
696
+				for (var i=0, cnt = format.parts.length; i < cnt; i++) {
697
+					val = parseInt(parts[i], 10);
698
+					part = format.parts[i];
699
+					if (isNaN(val)) {
700
+						switch(part) {
701
+							case 'MM':
702
+								filtered = $(dates[language].months).filter(function(){
703
+									var m = this.slice(0, parts[i].length),
704
+										p = parts[i].slice(0, m.length);
705
+									return m == p;
706
+								});
707
+								val = $.inArray(filtered[0], dates[language].months) + 1;
708
+								break;
709
+							case 'M':
710
+								filtered = $(dates[language].monthsShort).filter(function(){
711
+									var m = this.slice(0, parts[i].length),
712
+										p = parts[i].slice(0, m.length);
713
+									return m == p;
714
+								});
715
+								val = $.inArray(filtered[0], dates[language].monthsShort) + 1;
716
+								break;
717
+						}
718
+					}
719
+					parsed[part] = val;
720
+				}
721
+				for (var i=0, s; i<setters_order.length; i++){
722
+					s = setters_order[i];
723
+					if (s in parsed)
724
+						setters_map[s](date, parsed[s])
725
+				}
726
+			}
727
+			return date;
728
+		},
729
+		formatDate: function(date, format, language){
730
+			var val = {
731
+				d: date.getUTCDate(),
732
+				m: date.getUTCMonth() + 1,
733
+				M: dates[language].monthsShort[date.getUTCMonth()],
734
+				MM: dates[language].months[date.getUTCMonth()],
735
+				yy: date.getUTCFullYear().toString().substring(2),
736
+				yyyy: date.getUTCFullYear()
737
+			};
738
+			val.dd = (val.d < 10 ? '0' : '') + val.d;
739
+			val.mm = (val.m < 10 ? '0' : '') + val.m;
740
+			var date = [],
741
+				seps = $.extend([], format.separators);
742
+			for (var i=0, cnt = format.parts.length; i < cnt; i++) {
743
+				if (seps.length)
744
+					date.push(seps.shift())
745
+				date.push(val[format.parts[i]]);
746
+			}
747
+			return date.join('');
748
+		},
749
+		headTemplate: '<thead>'+
750
+							'<tr>'+
751
+								'<th class="prev"><i class="icon-arrow-left"/></th>'+
752
+								'<th colspan="5" class="switch"></th>'+
753
+								'<th class="next"><i class="icon-arrow-right"/></th>'+
754
+							'</tr>'+
755
+						'</thead>',
756
+		contTemplate: '<tbody><tr><td colspan="7"></td></tr></tbody>'
757
+	};
758
+	DPGlobal.template = '<div class="datepicker dropdown-menu">'+
759
+							'<div class="datepicker-days">'+
760
+								'<table class=" table-condensed">'+
761
+									DPGlobal.headTemplate+
762
+									'<tbody></tbody>'+
763
+								'</table>'+
764
+							'</div>'+
765
+							'<div class="datepicker-months">'+
766
+								'<table class="table-condensed">'+
767
+									DPGlobal.headTemplate+
768
+									DPGlobal.contTemplate+
769
+								'</table>'+
770
+							'</div>'+
771
+							'<div class="datepicker-years">'+
772
+								'<table class="table-condensed">'+
773
+									DPGlobal.headTemplate+
774
+									DPGlobal.contTemplate+
775
+								'</table>'+
776
+							'</div>'+
777
+						'</div>';
778
+
779
+}( window.jQuery );

+ 150 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/bootstrap-dropdown.js View File

@@ -0,0 +1,150 @@
1
+/* ============================================================
2
+ * bootstrap-dropdown.js v2.1.1
3
+ * http://twitter.github.com/bootstrap/javascript.html#dropdowns
4
+ * ============================================================
5
+ * Copyright 2012 Twitter, Inc.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ * ============================================================ */
19
+
20
+
21
+!function ($) {
22
+
23
+  "use strict"; // jshint ;_;
24
+
25
+
26
+ /* DROPDOWN CLASS DEFINITION
27
+  * ========================= */
28
+
29
+  var toggle = '[data-toggle=dropdown]'
30
+    , Dropdown = function (element) {
31
+        var $el = $(element).on('click.dropdown.data-api', this.toggle)
32
+        $('html').on('click.dropdown.data-api', function () {
33
+          $el.parent().removeClass('open')
34
+        })
35
+      }
36
+
37
+  Dropdown.prototype = {
38
+
39
+    constructor: Dropdown
40
+
41
+  , toggle: function (e) {
42
+      var $this = $(this)
43
+        , $parent
44
+        , isActive
45
+
46
+      if ($this.is('.disabled, :disabled')) return
47
+
48
+      $parent = getParent($this)
49
+
50
+      isActive = $parent.hasClass('open')
51
+
52
+      clearMenus()
53
+
54
+      if (!isActive) {
55
+        $parent.toggleClass('open')
56
+        $this.focus()
57
+      }
58
+
59
+      return false
60
+    }
61
+
62
+  , keydown: function (e) {
63
+      var $this
64
+        , $items
65
+        , $active
66
+        , $parent
67
+        , isActive
68
+        , index
69
+
70
+      if (!/(38|40|27)/.test(e.keyCode)) return
71
+
72
+      $this = $(this)
73
+
74
+      e.preventDefault()
75
+      e.stopPropagation()
76
+
77
+      if ($this.is('.disabled, :disabled')) return
78
+
79
+      $parent = getParent($this)
80
+
81
+      isActive = $parent.hasClass('open')
82
+
83
+      if (!isActive || (isActive && e.keyCode == 27)) return $this.click()
84
+
85
+      $items = $('[role=menu] li:not(.divider) a', $parent)
86
+
87
+      if (!$items.length) return
88
+
89
+      index = $items.index($items.filter(':focus'))
90
+
91
+      if (e.keyCode == 38 && index > 0) index--                                        // up
92
+      if (e.keyCode == 40 && index < $items.length - 1) index++                        // down
93
+      if (!~index) index = 0
94
+
95
+      $items
96
+        .eq(index)
97
+        .focus()
98
+    }
99
+
100
+  }
101
+
102
+  function clearMenus() {
103
+    getParent($(toggle))
104
+      .removeClass('open')
105
+  }
106
+
107
+  function getParent($this) {
108
+    var selector = $this.attr('data-target')
109
+      , $parent
110
+
111
+    if (!selector) {
112
+      selector = $this.attr('href')
113
+      selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
114
+    }
115
+
116
+    $parent = $(selector)
117
+    $parent.length || ($parent = $this.parent())
118
+
119
+    return $parent
120
+  }
121
+
122
+
123
+  /* DROPDOWN PLUGIN DEFINITION
124
+   * ========================== */
125
+
126
+  $.fn.dropdown = function (option) {
127
+    return this.each(function () {
128
+      var $this = $(this)
129
+        , data = $this.data('dropdown')
130
+      if (!data) $this.data('dropdown', (data = new Dropdown(this)))
131
+      if (typeof option == 'string') data[option].call($this)
132
+    })
133
+  }
134
+
135
+  $.fn.dropdown.Constructor = Dropdown
136
+
137
+
138
+  /* APPLY TO STANDARD DROPDOWN ELEMENTS
139
+   * =================================== */
140
+
141
+  $(function () {
142
+    $('html')
143
+      .on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus)
144
+    $('body')
145
+      .on('click.dropdown touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
146
+      .on('click.dropdown.data-api touchstart.dropdown.data-api'  , toggle, Dropdown.prototype.toggle)
147
+      .on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
148
+  })
149
+
150
+}(window.jQuery);

+ 239 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/bootstrap-modal.js View File

@@ -0,0 +1,239 @@
1
+/* =========================================================
2
+ * bootstrap-modal.js v2.1.1
3
+ * http://twitter.github.com/bootstrap/javascript.html#modals
4
+ * =========================================================
5
+ * Copyright 2012 Twitter, Inc.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ * ========================================================= */
19
+
20
+
21
+!function ($) {
22
+
23
+  "use strict"; // jshint ;_;
24
+
25
+
26
+ /* MODAL CLASS DEFINITION
27
+  * ====================== */
28
+
29
+  var Modal = function (element, options) {
30
+    this.options = options
31
+    this.$element = $(element)
32
+      .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
33
+    this.options.remote && this.$element.find('.modal-body').load(this.options.remote)
34
+  }
35
+
36
+  Modal.prototype = {
37
+
38
+      constructor: Modal
39
+
40
+    , toggle: function () {
41
+        return this[!this.isShown ? 'show' : 'hide']()
42
+      }
43
+
44
+    , show: function () {
45
+        var that = this
46
+          , e = $.Event('show')
47
+
48
+        this.$element.trigger(e)
49
+
50
+        if (this.isShown || e.isDefaultPrevented()) return
51
+
52
+        $('body').addClass('modal-open')
53
+
54
+        this.isShown = true
55
+
56
+        this.escape()
57
+
58
+        this.backdrop(function () {
59
+          var transition = $.support.transition && that.$element.hasClass('fade')
60
+
61
+          if (!that.$element.parent().length) {
62
+            that.$element.appendTo(document.body) //don't move modals dom position
63
+          }
64
+
65
+          that.$element
66
+            .show()
67
+
68
+          if (transition) {
69
+            that.$element[0].offsetWidth // force reflow
70
+          }
71
+
72
+          that.$element
73
+            .addClass('in')
74
+            .attr('aria-hidden', false)
75
+            .focus()
76
+
77
+          that.enforceFocus()
78
+
79
+          transition ?
80
+            that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) :
81
+            that.$element.trigger('shown')
82
+
83
+        })
84
+      }
85
+
86
+    , hide: function (e) {
87
+        e && e.preventDefault()
88
+
89
+        var that = this
90
+
91
+        e = $.Event('hide')
92
+
93
+        this.$element.trigger(e)
94
+
95
+        if (!this.isShown || e.isDefaultPrevented()) return
96
+
97
+        this.isShown = false
98
+
99
+        $('body').removeClass('modal-open')
100
+
101
+        this.escape()
102
+
103
+        $(document).off('focusin.modal')
104
+
105
+        this.$element
106
+          .removeClass('in')
107
+          .attr('aria-hidden', true)
108
+
109
+        $.support.transition && this.$element.hasClass('fade') ?
110
+          this.hideWithTransition() :
111
+          this.hideModal()
112
+      }
113
+
114
+    , enforceFocus: function () {
115
+        var that = this
116
+        $(document).on('focusin.modal', function (e) {
117
+          if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
118
+            that.$element.focus()
119
+          }
120
+        })
121
+      }
122
+
123
+    , escape: function () {
124
+        var that = this
125
+        if (this.isShown && this.options.keyboard) {
126
+          this.$element.on('keyup.dismiss.modal', function ( e ) {
127
+            e.which == 27 && that.hide()
128
+          })
129
+        } else if (!this.isShown) {
130
+          this.$element.off('keyup.dismiss.modal')
131
+        }
132
+      }
133
+
134
+    , hideWithTransition: function () {
135
+        var that = this
136
+          , timeout = setTimeout(function () {
137
+              that.$element.off($.support.transition.end)
138
+              that.hideModal()
139
+            }, 500)
140
+
141
+        this.$element.one($.support.transition.end, function () {
142
+          clearTimeout(timeout)
143
+          that.hideModal()
144
+        })
145
+      }
146
+
147
+    , hideModal: function (that) {
148
+        this.$element
149
+          .hide()
150
+          .trigger('hidden')
151
+
152
+        this.backdrop()
153
+      }
154
+
155
+    , removeBackdrop: function () {
156
+        this.$backdrop.remove()
157
+        this.$backdrop = null
158
+      }
159
+
160
+    , backdrop: function (callback) {
161
+        var that = this
162
+          , animate = this.$element.hasClass('fade') ? 'fade' : ''
163
+
164
+        if (this.isShown && this.options.backdrop) {
165
+          var doAnimate = $.support.transition && animate
166
+
167
+          this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
168
+            .appendTo(document.body)
169
+
170
+          if (this.options.backdrop != 'static') {
171
+            this.$backdrop.click($.proxy(this.hide, this))
172
+          }
173
+
174
+          if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
175
+
176
+          this.$backdrop.addClass('in')
177
+
178
+          doAnimate ?
179
+            this.$backdrop.one($.support.transition.end, callback) :
180
+            callback()
181
+
182
+        } else if (!this.isShown && this.$backdrop) {
183
+          this.$backdrop.removeClass('in')
184
+
185
+          $.support.transition && this.$element.hasClass('fade')?
186
+            this.$backdrop.one($.support.transition.end, $.proxy(this.removeBackdrop, this)) :
187
+            this.removeBackdrop()
188
+
189
+        } else if (callback) {
190
+          callback()
191
+        }
192
+      }
193
+  }
194
+
195
+
196
+ /* MODAL PLUGIN DEFINITION
197
+  * ======================= */
198
+
199
+  $.fn.modal = function (option) {
200
+    return this.each(function () {
201
+      var $this = $(this)
202
+        , data = $this.data('modal')
203
+        , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
204
+      if (!data) $this.data('modal', (data = new Modal(this, options)))
205
+      if (typeof option == 'string') data[option]()
206
+      else if (options.show) data.show()
207
+    })
208
+  }
209
+
210
+  $.fn.modal.defaults = {
211
+      backdrop: true
212
+    , keyboard: true
213
+    , show: true
214
+  }
215
+
216
+  $.fn.modal.Constructor = Modal
217
+
218
+
219
+ /* MODAL DATA-API
220
+  * ============== */
221
+
222
+  $(function () {
223
+    $('body').on('click.modal.data-api', '[data-toggle="modal"]', function ( e ) {
224
+      var $this = $(this)
225
+        , href = $this.attr('href')
226
+        , $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
227
+        , option = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
228
+
229
+      e.preventDefault()
230
+
231
+      $target
232
+        .modal(option)
233
+        .one('hide', function () {
234
+          $this.focus()
235
+        })
236
+    })
237
+  })
238
+
239
+}(window.jQuery);

+ 103 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/bootstrap-popover.js View File

@@ -0,0 +1,103 @@
1
+/* ===========================================================
2
+ * bootstrap-popover.js v2.1.1
3
+ * http://twitter.github.com/bootstrap/javascript.html#popovers
4
+ * ===========================================================
5
+ * Copyright 2012 Twitter, Inc.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ * =========================================================== */
19
+
20
+
21
+!function ($) {
22
+
23
+  "use strict"; // jshint ;_;
24
+
25
+
26
+ /* POPOVER PUBLIC CLASS DEFINITION
27
+  * =============================== */
28
+
29
+  var Popover = function (element, options) {
30
+    this.init('popover', element, options)
31
+  }
32
+
33
+
34
+  /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
35
+     ========================================== */
36
+
37
+  Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
38
+
39
+    constructor: Popover
40
+
41
+  , setContent: function () {
42
+      var $tip = this.tip()
43
+        , title = this.getTitle()
44
+        , content = this.getContent()
45
+
46
+      $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
47
+      $tip.find('.popover-content > *')[this.options.html ? 'html' : 'text'](content)
48
+
49
+      $tip.removeClass('fade top bottom left right in')
50
+    }
51
+
52
+  , hasContent: function () {
53
+      return this.getTitle() || this.getContent()
54
+    }
55
+
56
+  , getContent: function () {
57
+      var content
58
+        , $e = this.$element
59
+        , o = this.options
60
+
61
+      content = $e.attr('data-content')
62
+        || (typeof o.content == 'function' ? o.content.call($e[0]) :  o.content)
63
+
64
+      return content
65
+    }
66
+
67
+  , tip: function () {
68
+      if (!this.$tip) {
69
+        this.$tip = $(this.options.template)
70
+      }
71
+      return this.$tip
72
+    }
73
+
74
+  , destroy: function () {
75
+      this.hide().$element.off('.' + this.type).removeData(this.type)
76
+    }
77
+
78
+  })
79
+
80
+
81
+ /* POPOVER PLUGIN DEFINITION
82
+  * ======================= */
83
+
84
+  $.fn.popover = function (option) {
85
+    return this.each(function () {
86
+      var $this = $(this)
87
+        , data = $this.data('popover')
88
+        , options = typeof option == 'object' && option
89
+      if (!data) $this.data('popover', (data = new Popover(this, options)))
90
+      if (typeof option == 'string') data[option]()
91
+    })
92
+  }
93
+
94
+  $.fn.popover.Constructor = Popover
95
+
96
+  $.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
97
+    placement: 'right'
98
+  , trigger: 'click'
99
+  , content: ''
100
+  , template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'
101
+  })
102
+
103
+}(window.jQuery);

+ 151 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/bootstrap-scrollspy.js View File

@@ -0,0 +1,151 @@
1
+/* =============================================================
2
+ * bootstrap-scrollspy.js v2.1.1
3
+ * http://twitter.github.com/bootstrap/javascript.html#scrollspy
4
+ * =============================================================
5
+ * Copyright 2012 Twitter, Inc.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ * ============================================================== */
19
+
20
+
21
+!function ($) {
22
+
23
+  "use strict"; // jshint ;_;
24
+
25
+
26
+ /* SCROLLSPY CLASS DEFINITION
27
+  * ========================== */
28
+
29
+  function ScrollSpy(element, options) {
30
+    var process = $.proxy(this.process, this)
31
+      , $element = $(element).is('body') ? $(window) : $(element)
32
+      , href
33
+    this.options = $.extend({}, $.fn.scrollspy.defaults, options)
34
+    this.$scrollElement = $element.on('scroll.scroll-spy.data-api', process)
35
+    this.selector = (this.options.target
36
+      || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
37
+      || '') + ' .nav li > a'
38
+    this.$body = $('body')
39
+    this.refresh()
40
+    this.process()
41
+  }
42
+
43
+  ScrollSpy.prototype = {
44
+
45
+      constructor: ScrollSpy
46
+
47
+    , refresh: function () {
48
+        var self = this
49
+          , $targets
50
+
51
+        this.offsets = $([])
52
+        this.targets = $([])
53
+
54
+        $targets = this.$body
55
+          .find(this.selector)
56
+          .map(function () {
57
+            var $el = $(this)
58
+              , href = $el.data('target') || $el.attr('href')
59
+              , $href = /^#\w/.test(href) && $(href)
60
+            return ( $href
61
+              && $href.length
62
+              && [[ $href.position().top, href ]] ) || null
63
+          })
64
+          .sort(function (a, b) { return a[0] - b[0] })
65
+          .each(function () {
66
+            self.offsets.push(this[0])
67
+            self.targets.push(this[1])
68
+          })
69
+      }
70
+
71
+    , process: function () {
72
+        var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
73
+          , scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
74
+          , maxScroll = scrollHeight - this.$scrollElement.height()
75
+          , offsets = this.offsets
76
+          , targets = this.targets
77
+          , activeTarget = this.activeTarget
78
+          , i
79
+
80
+        if (scrollTop >= maxScroll) {
81
+          return activeTarget != (i = targets.last()[0])
82
+            && this.activate ( i )
83
+        }
84
+
85
+        for (i = offsets.length; i--;) {
86
+          activeTarget != targets[i]
87
+            && scrollTop >= offsets[i]
88
+            && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
89
+            && this.activate( targets[i] )
90
+        }
91
+      }
92
+
93
+    , activate: function (target) {
94
+        var active
95
+          , selector
96
+
97
+        this.activeTarget = target
98
+
99
+        $(this.selector)
100
+          .parent('.active')
101
+          .removeClass('active')
102
+
103
+        selector = this.selector
104
+          + '[data-target="' + target + '"],'
105
+          + this.selector + '[href="' + target + '"]'
106
+
107
+        active = $(selector)
108
+          .parent('li')
109
+          .addClass('active')
110
+
111
+        if (active.parent('.dropdown-menu').length)  {
112
+          active = active.closest('li.dropdown').addClass('active')
113
+        }
114
+
115
+        active.trigger('activate')
116
+      }
117
+
118
+  }
119
+
120
+
121
+ /* SCROLLSPY PLUGIN DEFINITION
122
+  * =========================== */
123
+
124
+  $.fn.scrollspy = function (option) {
125
+    return this.each(function () {
126
+      var $this = $(this)
127
+        , data = $this.data('scrollspy')
128
+        , options = typeof option == 'object' && option
129
+      if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options)))
130
+      if (typeof option == 'string') data[option]()
131
+    })
132
+  }
133
+
134
+  $.fn.scrollspy.Constructor = ScrollSpy
135
+
136
+  $.fn.scrollspy.defaults = {
137
+    offset: 10
138
+  }
139
+
140
+
141
+ /* SCROLLSPY DATA-API
142
+  * ================== */
143
+
144
+  $(window).on('load', function () {
145
+    $('[data-spy="scroll"]').each(function () {
146
+      var $spy = $(this)
147
+      $spy.scrollspy($spy.data())
148
+    })
149
+  })
150
+
151
+}(window.jQuery);

+ 135 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/bootstrap-tab.js View File

@@ -0,0 +1,135 @@
1
+/* ========================================================
2
+ * bootstrap-tab.js v2.1.1
3
+ * http://twitter.github.com/bootstrap/javascript.html#tabs
4
+ * ========================================================
5
+ * Copyright 2012 Twitter, Inc.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ * ======================================================== */
19
+
20
+
21
+!function ($) {
22
+
23
+  "use strict"; // jshint ;_;
24
+
25
+
26
+ /* TAB CLASS DEFINITION
27
+  * ==================== */
28
+
29
+  var Tab = function (element) {
30
+    this.element = $(element)
31
+  }
32
+
33
+  Tab.prototype = {
34
+
35
+    constructor: Tab
36
+
37
+  , show: function () {
38
+      var $this = this.element
39
+        , $ul = $this.closest('ul:not(.dropdown-menu)')
40
+        , selector = $this.attr('data-target')
41
+        , previous
42
+        , $target
43
+        , e
44
+
45
+      if (!selector) {
46
+        selector = $this.attr('href')
47
+        selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
48
+      }
49
+
50
+      if ( $this.parent('li').hasClass('active') ) return
51
+
52
+      previous = $ul.find('.active a').last()[0]
53
+
54
+      e = $.Event('show', {
55
+        relatedTarget: previous
56
+      })
57
+
58
+      $this.trigger(e)
59
+
60
+      if (e.isDefaultPrevented()) return
61
+
62
+      $target = $(selector)
63
+
64
+      this.activate($this.parent('li'), $ul)
65
+      this.activate($target, $target.parent(), function () {
66
+        $this.trigger({
67
+          type: 'shown'
68
+        , relatedTarget: previous
69
+        })
70
+      })
71
+    }
72
+
73
+  , activate: function ( element, container, callback) {
74
+      var $active = container.find('> .active')
75
+        , transition = callback
76
+            && $.support.transition
77
+            && $active.hasClass('fade')
78
+
79
+      function next() {
80
+        $active
81
+          .removeClass('active')
82
+          .find('> .dropdown-menu > .active')
83
+          .removeClass('active')
84
+
85
+        element.addClass('active')
86
+
87
+        if (transition) {
88
+          element[0].offsetWidth // reflow for transition
89
+          element.addClass('in')
90
+        } else {
91
+          element.removeClass('fade')
92
+        }
93
+
94
+        if ( element.parent('.dropdown-menu') ) {
95
+          element.closest('li.dropdown').addClass('active')
96
+        }
97
+
98
+        callback && callback()
99
+      }
100
+
101
+      transition ?
102
+        $active.one($.support.transition.end, next) :
103
+        next()
104
+
105
+      $active.removeClass('in')
106
+    }
107
+  }
108
+
109
+
110
+ /* TAB PLUGIN DEFINITION
111
+  * ===================== */
112
+
113
+  $.fn.tab = function ( option ) {
114
+    return this.each(function () {
115
+      var $this = $(this)
116
+        , data = $this.data('tab')
117
+      if (!data) $this.data('tab', (data = new Tab(this)))
118
+      if (typeof option == 'string') data[option]()
119
+    })
120
+  }
121
+
122
+  $.fn.tab.Constructor = Tab
123
+
124
+
125
+ /* TAB DATA-API
126
+  * ============ */
127
+
128
+  $(function () {
129
+    $('body').on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
130
+      e.preventDefault()
131
+      $(this).tab('show')
132
+    })
133
+  })
134
+
135
+}(window.jQuery);

+ 275 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/bootstrap-tooltip.js View File

@@ -0,0 +1,275 @@
1
+/* ===========================================================
2
+ * bootstrap-tooltip.js v2.1.1
3
+ * http://twitter.github.com/bootstrap/javascript.html#tooltips
4
+ * Inspired by the original jQuery.tipsy by Jason Frame
5
+ * ===========================================================
6
+ * Copyright 2012 Twitter, Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ * ========================================================== */
20
+
21
+
22
+!function ($) {
23
+
24
+  "use strict"; // jshint ;_;
25
+
26
+
27
+ /* TOOLTIP PUBLIC CLASS DEFINITION
28
+  * =============================== */
29
+
30
+  var Tooltip = function (element, options) {
31
+    this.init('tooltip', element, options)
32
+  }
33
+
34
+  Tooltip.prototype = {
35
+
36
+    constructor: Tooltip
37
+
38
+  , init: function (type, element, options) {
39
+      var eventIn
40
+        , eventOut
41
+
42
+      this.type = type
43
+      this.$element = $(element)
44
+      this.options = this.getOptions(options)
45
+      this.enabled = true
46
+
47
+      if (this.options.trigger == 'click') {
48
+        this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
49
+      } else if (this.options.trigger != 'manual') {
50
+        eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus'
51
+        eventOut = this.options.trigger == 'hover' ? 'mouseleave' : 'blur'
52
+        this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
53
+        this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
54
+      }
55
+
56
+      this.options.selector ?
57
+        (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
58
+        this.fixTitle()
59
+    }
60
+
61
+  , getOptions: function (options) {
62
+      options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data())
63
+
64
+      if (options.delay && typeof options.delay == 'number') {
65
+        options.delay = {
66
+          show: options.delay
67
+        , hide: options.delay
68
+        }
69
+      }
70
+
71
+      return options
72
+    }
73
+
74
+  , enter: function (e) {
75
+      var self = $(e.currentTarget)[this.type](this._options).data(this.type)
76
+
77
+      if (!self.options.delay || !self.options.delay.show) return self.show()
78
+
79
+      clearTimeout(this.timeout)
80
+      self.hoverState = 'in'
81
+      this.timeout = setTimeout(function() {
82
+        if (self.hoverState == 'in') self.show()
83
+      }, self.options.delay.show)
84
+    }
85
+
86
+  , leave: function (e) {
87
+      var self = $(e.currentTarget)[this.type](this._options).data(this.type)
88
+
89
+      if (this.timeout) clearTimeout(this.timeout)
90
+      if (!self.options.delay || !self.options.delay.hide) return self.hide()
91
+
92
+      self.hoverState = 'out'
93
+      this.timeout = setTimeout(function() {
94
+        if (self.hoverState == 'out') self.hide()
95
+      }, self.options.delay.hide)
96
+    }
97
+
98
+  , show: function () {
99
+      var $tip
100
+        , inside
101
+        , pos
102
+        , actualWidth
103
+        , actualHeight
104
+        , placement
105
+        , tp
106
+
107
+      if (this.hasContent() && this.enabled) {
108
+        $tip = this.tip()
109
+        this.setContent()
110
+
111
+        if (this.options.animation) {
112
+          $tip.addClass('fade')
113
+        }
114
+
115
+        placement = typeof this.options.placement == 'function' ?
116
+          this.options.placement.call(this, $tip[0], this.$element[0]) :
117
+          this.options.placement
118
+
119
+        inside = /in/.test(placement)
120
+
121
+        $tip
122
+          .remove()
123
+          .css({ top: 0, left: 0, display: 'block' })
124
+          .appendTo(inside ? this.$element : document.body)
125
+
126
+        pos = this.getPosition(inside)
127
+
128
+        actualWidth = $tip[0].offsetWidth
129
+        actualHeight = $tip[0].offsetHeight
130
+
131
+        switch (inside ? placement.split(' ')[1] : placement) {
132
+          case 'bottom':
133
+            tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}
134
+            break
135
+          case 'top':
136
+            tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}
137
+            break
138
+          case 'left':
139
+            tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}
140
+            break
141
+          case 'right':
142
+            tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}
143
+            break
144
+        }
145
+
146
+        $tip
147
+          .css(tp)
148
+          .addClass(placement)
149
+          .addClass('in')
150
+      }
151
+    }
152
+
153
+  , setContent: function () {
154
+      var $tip = this.tip()
155
+        , title = this.getTitle()
156
+
157
+      $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
158
+      $tip.removeClass('fade in top bottom left right')
159
+    }
160
+
161
+  , hide: function () {
162
+      var that = this
163
+        , $tip = this.tip()
164
+
165
+      $tip.removeClass('in')
166
+
167
+      function removeWithAnimation() {
168
+        var timeout = setTimeout(function () {
169
+          $tip.off($.support.transition.end).remove()
170
+        }, 500)
171
+
172
+        $tip.one($.support.transition.end, function () {
173
+          clearTimeout(timeout)
174
+          $tip.remove()
175
+        })
176
+      }
177
+
178
+      $.support.transition && this.$tip.hasClass('fade') ?
179
+        removeWithAnimation() :
180
+        $tip.remove()
181
+
182
+      return this
183
+    }
184
+
185
+  , fixTitle: function () {
186
+      var $e = this.$element
187
+      if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
188
+        $e.attr('data-original-title', $e.attr('title') || '').removeAttr('title')
189
+      }
190
+    }
191
+
192
+  , hasContent: function () {
193
+      return this.getTitle()
194
+    }
195
+
196
+  , getPosition: function (inside) {
197
+      return $.extend({}, (inside ? {top: 0, left: 0} : this.$element.offset()), {
198
+        width: this.$element[0].offsetWidth
199
+      , height: this.$element[0].offsetHeight
200
+      })
201
+    }
202
+
203
+  , getTitle: function () {
204
+      var title
205
+        , $e = this.$element
206
+        , o = this.options
207
+
208
+      title = $e.attr('data-original-title')
209
+        || (typeof o.title == 'function' ? o.title.call($e[0]) :  o.title)
210
+
211
+      return title
212
+    }
213
+
214
+  , tip: function () {
215
+      return this.$tip = this.$tip || $(this.options.template)
216
+    }
217
+
218
+  , validate: function () {
219
+      if (!this.$element[0].parentNode) {
220
+        this.hide()
221
+        this.$element = null
222
+        this.options = null
223
+      }
224
+    }
225
+
226
+  , enable: function () {
227
+      this.enabled = true
228
+    }
229
+
230
+  , disable: function () {
231
+      this.enabled = false
232
+    }
233
+
234
+  , toggleEnabled: function () {
235
+      this.enabled = !this.enabled
236
+    }
237
+
238
+  , toggle: function () {
239
+      this[this.tip().hasClass('in') ? 'hide' : 'show']()
240
+    }
241
+
242
+  , destroy: function () {
243
+      this.hide().$element.off('.' + this.type).removeData(this.type)
244
+    }
245
+
246
+  }
247
+
248
+
249
+ /* TOOLTIP PLUGIN DEFINITION
250
+  * ========================= */
251
+
252
+  $.fn.tooltip = function ( option ) {
253
+    return this.each(function () {
254
+      var $this = $(this)
255
+        , data = $this.data('tooltip')
256
+        , options = typeof option == 'object' && option
257
+      if (!data) $this.data('tooltip', (data = new Tooltip(this, options)))
258
+      if (typeof option == 'string') data[option]()
259
+    })
260
+  }
261
+
262
+  $.fn.tooltip.Constructor = Tooltip
263
+
264
+  $.fn.tooltip.defaults = {
265
+    animation: true
266
+  , placement: 'top'
267
+  , selector: false
268
+  , template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
269
+  , trigger: 'hover'
270
+  , title: ''
271
+  , delay: 0
272
+  , html: true
273
+  }
274
+
275
+}(window.jQuery);

+ 60 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/bootstrap-transition.js View File

@@ -0,0 +1,60 @@
1
+/* ===================================================
2
+ * bootstrap-transition.js v2.1.1
3
+ * http://twitter.github.com/bootstrap/javascript.html#transitions
4
+ * ===================================================
5
+ * Copyright 2012 Twitter, Inc.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ * ========================================================== */
19
+
20
+
21
+!function ($) {
22
+
23
+  $(function () {
24
+
25
+    "use strict"; // jshint ;_;
26
+
27
+
28
+    /* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
29
+     * ======================================================= */
30
+
31
+    $.support.transition = (function () {
32
+
33
+      var transitionEnd = (function () {
34
+
35
+        var el = document.createElement('bootstrap')
36
+          , transEndEventNames = {
37
+               'WebkitTransition' : 'webkitTransitionEnd'
38
+            ,  'MozTransition'    : 'transitionend'
39
+            ,  'OTransition'      : 'oTransitionEnd otransitionend'
40
+            ,  'transition'       : 'transitionend'
41
+            }
42
+          , name
43
+
44
+        for (name in transEndEventNames){
45
+          if (el.style[name] !== undefined) {
46
+            return transEndEventNames[name]
47
+          }
48
+        }
49
+
50
+      }())
51
+
52
+      return transitionEnd && {
53
+        end: transitionEnd
54
+      }
55
+
56
+    })()
57
+
58
+  })
59
+
60
+}(window.jQuery);

+ 318 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/bootstrap-typeahead-extended.js View File

@@ -0,0 +1,318 @@
1
+/* =============================================================
2
+ * MODIFIED by loostro
3
+ * =============================================================
4
+ * bootstrap-typeahead.js v2.1.1
5
+ * http://twitter.github.com/bootstrap/javascript.html#typeahead
6
+ * =============================================================
7
+ * Copyright 2012 Twitter, Inc.
8
+ *
9
+ * Licensed under the Apache License, Version 2.0 (the "License");
10
+ * you may not use this file except in compliance with the License.
11
+ * You may obtain a copy of the License at
12
+ *
13
+ * http://www.apache.org/licenses/LICENSE-2.0
14
+ *
15
+ * Unless required by applicable law or agreed to in writing, software
16
+ * distributed under the License is distributed on an "AS IS" BASIS,
17
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ * See the License for the specific language governing permissions and
19
+ * limitations under the License.
20
+ * ============================================================ */
21
+
22
+
23
+!function($){
24
+
25
+  "use strict"; // jshint ;_;
26
+
27
+
28
+ /* TYPEAHEAD PUBLIC CLASS DEFINITION
29
+  * ================================= */
30
+
31
+  var Typeahead = function (element, options) {
32
+    this.$element = $(element)
33
+    this.options = $.extend({}, $.fn.typeahead.defaults, options)
34
+    this.matcher = this.options.matcher || this.matcher
35
+    this.sorter = this.options.sorter || this.sorter
36
+    this.highlighter = this.options.highlighter || this.highlighter
37
+    this.updater = this.options.updater || this.updater
38
+    this.getter = this.options.getter || this.getter
39
+    this.setter = this.options.setter || this.setter
40
+    this.$menu = $(this.options.menu).appendTo('body')
41
+    this.source = this.options.source
42
+    this.shown = false
43
+    this.listen()
44
+  }
45
+
46
+  Typeahead.prototype = {
47
+
48
+    constructor: Typeahead
49
+
50
+  , select: function () {
51
+      var val = this.$menu.find('.active').attr('data-value'),
52
+      item = this.getter(val)
53
+      
54
+      this.$element
55
+          .val(this.updater(item))
56
+          .change()
57
+      return this.hide()
58
+    }
59
+
60
+  , updater: function (item) {
61
+      return item
62
+    }
63
+    
64
+  , getter: function (pk) {      
65
+      var source = $.isFunction(this.source) ? this.source() : this.source
66
+        
67
+      return $.grep(source, function(item){
68
+          return item == pk
69
+      })[0]
70
+  }
71
+  
72
+  , setter: function(item) {
73
+      return item;
74
+  }
75
+
76
+  , show: function () {
77
+      var pos = $.extend({}, this.$element.offset(), {
78
+        height: this.$element[0].offsetHeight
79
+      })
80
+
81
+      this.$menu.css({
82
+        top: pos.top + pos.height
83
+      , left: pos.left
84
+      })
85
+
86
+      this.$menu.show()
87
+      this.shown = true
88
+      return this
89
+    }
90
+
91
+  , hide: function () {
92
+      this.$menu.hide()
93
+      this.shown = false
94
+      return this
95
+    }
96
+
97
+  , lookup: function (event) {
98
+      var items
99
+
100
+      this.query = this.$element.val()
101
+
102
+      if (!this.query || this.query.length < this.options.minLength) {
103
+        return this.shown ? this.hide() : this
104
+      }
105
+
106
+      items = $.isFunction(this.source) ? this.source(this.query, $.proxy(this.process, this)) : this.source
107
+
108
+      return items ? this.process(items) : this
109
+    }
110
+
111
+  , process: function (items) {
112
+      var that = this
113
+
114
+      items = $.grep(items, function (item) {
115
+        return that.matcher(item)
116
+      })
117
+
118
+      items = this.sorter(items)
119
+
120
+      if (!items.length) {
121
+        return this.shown ? this.hide() : this
122
+      }
123
+
124
+      return this.render(items.slice(0, this.options.items)).show()
125
+    }
126
+
127
+  , matcher: function (item) {
128
+      return ~item.toLowerCase().indexOf(this.query.toLowerCase())
129
+    }
130
+
131
+  , sorter: function (items) {
132
+      var beginswith = []
133
+        , caseSensitive = []
134
+        , caseInsensitive = []
135
+        , item
136
+
137
+      while (item = items.shift()) {
138
+        if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item)
139
+        else if (~item.indexOf(this.query)) caseSensitive.push(item)
140
+        else caseInsensitive.push(item)
141
+      }
142
+
143
+      return beginswith.concat(caseSensitive, caseInsensitive)
144
+    }
145
+
146
+  , highlighter: function (item) {
147
+      var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
148
+      return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
149
+        return '<strong>' + match + '</strong>'
150
+      })
151
+    }
152
+
153
+  , render: function (items) {
154
+      var that = this
155
+
156
+      items = $(items).map(function (i, item) {
157
+        i = $(that.options.item).attr('data-value', that.setter(item))
158
+        i.find('a').html(that.highlighter(item))
159
+        return i[0]
160
+      })
161
+
162
+      items.first().addClass('active')
163
+      this.$menu.html(items)
164
+      return this
165
+    }
166
+
167
+  , next: function (event) {
168
+      var active = this.$menu.find('.active').removeClass('active')
169
+        , next = active.next()
170
+
171
+      if (!next.length) {
172
+        next = $(this.$menu.find('li')[0])
173
+      }
174
+
175
+      next.addClass('active')
176
+    }
177
+
178
+  , prev: function (event) {
179
+      var active = this.$menu.find('.active').removeClass('active')
180
+        , prev = active.prev()
181
+
182
+      if (!prev.length) {
183
+        prev = this.$menu.find('li').last()
184
+      }
185
+
186
+      prev.addClass('active')
187
+    }
188
+
189
+  , listen: function () {
190
+      this.$element
191
+        .on('blur',     $.proxy(this.blur, this))
192
+        .on('keypress', $.proxy(this.keypress, this))
193
+        .on('keyup',    $.proxy(this.keyup, this))
194
+
195
+      if ($.browser.chrome || $.browser.webkit || $.browser.msie) {
196
+        this.$element.on('keydown', $.proxy(this.keydown, this))
197
+      }
198
+
199
+      this.$menu
200
+        .on('click', $.proxy(this.click, this))
201
+        .on('mouseenter', 'li', $.proxy(this.mouseenter, this))
202
+    }
203
+
204
+  , move: function (e) {
205
+      if (!this.shown) return
206
+
207
+      switch(e.keyCode) {
208
+        case 9: // tab
209
+        case 13: // enter
210
+        case 27: // escape
211
+          e.preventDefault()
212
+          break
213
+
214
+        case 38: // up arrow
215
+          e.preventDefault()
216
+          this.prev()
217
+          break
218
+
219
+        case 40: // down arrow
220
+          e.preventDefault()
221
+          this.next()
222
+          break
223
+      }
224
+
225
+      e.stopPropagation()
226
+    }
227
+
228
+  , keydown: function (e) {
229
+      this.suppressKeyPressRepeat = !~$.inArray(e.keyCode, [40,38,9,13,27])
230
+      this.move(e)
231
+    }
232
+
233
+  , keypress: function (e) {
234
+      if (this.suppressKeyPressRepeat) return
235
+      this.move(e)
236
+    }
237
+
238
+  , keyup: function (e) {
239
+      switch(e.keyCode) {
240
+        case 40: // down arrow
241
+        case 38: // up arrow
242
+          break
243
+
244
+        case 9: // tab
245
+        case 13: // enter
246
+          if (!this.shown) return
247
+          this.select()
248
+          break
249
+
250
+        case 27: // escape
251
+          if (!this.shown) return
252
+          this.hide()
253
+          break
254
+
255
+        default:
256
+          this.lookup()
257
+      }
258
+
259
+      e.stopPropagation()
260
+      e.preventDefault()
261
+  }
262
+
263
+  , blur: function (e) {
264
+      var that = this
265
+      setTimeout(function () { that.hide() }, 150)
266
+    }
267
+
268
+  , click: function (e) {
269
+      e.stopPropagation()
270
+      e.preventDefault()
271
+      this.select()
272
+    }
273
+
274
+  , mouseenter: function (e) {
275
+      this.$menu.find('.active').removeClass('active')
276
+      $(e.currentTarget).addClass('active')
277
+    }
278
+
279
+  }
280
+
281
+
282
+  /* TYPEAHEAD PLUGIN DEFINITION
283
+   * =========================== */
284
+
285
+  $.fn.typeahead = function (option) {
286
+    return this.each(function () {
287
+      var $this = $(this)
288
+        , data = $this.data('typeahead')
289
+        , options = typeof option == 'object' && option
290
+      if (!data) $this.data('typeahead', (data = new Typeahead(this, options)))
291
+      if (typeof option == 'string') data[option]()
292
+    })
293
+  }
294
+
295
+  $.fn.typeahead.defaults = {
296
+    source: []
297
+  , items: 8
298
+  , menu: '<ul class="typeahead dropdown-menu"></ul>'
299
+  , item: '<li><a href="#"></a></li>'
300
+  , minLength: 1
301
+  }
302
+
303
+  $.fn.typeahead.Constructor = Typeahead
304
+
305
+
306
+ /*   TYPEAHEAD DATA-API
307
+  * ================== */
308
+
309
+  $(function () {
310
+    $('body').on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
311
+      var $this = $(this)
312
+      if ($this.data('typeahead')) return
313
+      e.preventDefault()
314
+      $this.typeahead($this.data())
315
+    })
316
+  })
317
+
318
+}(window.jQuery);

+ 300 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/bootstrap-typeahead.js View File

@@ -0,0 +1,300 @@
1
+/* =============================================================
2
+ * bootstrap-typeahead.js v2.1.1
3
+ * http://twitter.github.com/bootstrap/javascript.html#typeahead
4
+ * =============================================================
5
+ * Copyright 2012 Twitter, Inc.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ * ============================================================ */
19
+
20
+
21
+!function($){
22
+
23
+  "use strict"; // jshint ;_;
24
+
25
+
26
+ /* TYPEAHEAD PUBLIC CLASS DEFINITION
27
+  * ================================= */
28
+
29
+  var Typeahead = function (element, options) {
30
+    this.$element = $(element)
31
+    this.options = $.extend({}, $.fn.typeahead.defaults, options)
32
+    this.matcher = this.options.matcher || this.matcher
33
+    this.sorter = this.options.sorter || this.sorter
34
+    this.highlighter = this.options.highlighter || this.highlighter
35
+    this.updater = this.options.updater || this.updater
36
+    this.$menu = $(this.options.menu).appendTo('body')
37
+    this.source = this.options.source
38
+    this.shown = false
39
+    this.listen()
40
+  }
41
+
42
+  Typeahead.prototype = {
43
+
44
+    constructor: Typeahead
45
+
46
+  , select: function () {
47
+      var val = this.$menu.find('.active').attr('data-value')
48
+      this.$element
49
+        .val(this.updater(val))
50
+        .change()
51
+      return this.hide()
52
+    }
53
+
54
+  , updater: function (item) {
55
+      return item
56
+    }
57
+
58
+  , show: function () {
59
+      var pos = $.extend({}, this.$element.offset(), {
60
+        height: this.$element[0].offsetHeight
61
+      })
62
+
63
+      this.$menu.css({
64
+        top: pos.top + pos.height
65
+      , left: pos.left
66
+      })
67
+
68
+      this.$menu.show()
69
+      this.shown = true
70
+      return this
71
+    }
72
+
73
+  , hide: function () {
74
+      this.$menu.hide()
75
+      this.shown = false
76
+      return this
77
+    }
78
+
79
+  , lookup: function (event) {
80
+      var items
81
+
82
+      this.query = this.$element.val()
83
+
84
+      if (!this.query || this.query.length < this.options.minLength) {
85
+        return this.shown ? this.hide() : this
86
+      }
87
+
88
+      items = $.isFunction(this.source) ? this.source(this.query, $.proxy(this.process, this)) : this.source
89
+
90
+      return items ? this.process(items) : this
91
+    }
92
+
93
+  , process: function (items) {
94
+      var that = this
95
+
96
+      items = $.grep(items, function (item) {
97
+        return that.matcher(item)
98
+      })
99
+
100
+      items = this.sorter(items)
101
+
102
+      if (!items.length) {
103
+        return this.shown ? this.hide() : this
104
+      }
105
+
106
+      return this.render(items.slice(0, this.options.items)).show()
107
+    }
108
+
109
+  , matcher: function (item) {
110
+      return ~item.toLowerCase().indexOf(this.query.toLowerCase())
111
+    }
112
+
113
+  , sorter: function (items) {
114
+      var beginswith = []
115
+        , caseSensitive = []
116
+        , caseInsensitive = []
117
+        , item
118
+
119
+      while (item = items.shift()) {
120
+        if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item)
121
+        else if (~item.indexOf(this.query)) caseSensitive.push(item)
122
+        else caseInsensitive.push(item)
123
+      }
124
+
125
+      return beginswith.concat(caseSensitive, caseInsensitive)
126
+    }
127
+
128
+  , highlighter: function (item) {
129
+      var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
130
+      return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
131
+        return '<strong>' + match + '</strong>'
132
+      })
133
+    }
134
+
135
+  , render: function (items) {
136
+      var that = this
137
+
138
+      items = $(items).map(function (i, item) {
139
+        i = $(that.options.item).attr('data-value', item)
140
+        i.find('a').html(that.highlighter(item))
141
+        return i[0]
142
+      })
143
+
144
+      items.first().addClass('active')
145
+      this.$menu.html(items)
146
+      return this
147
+    }
148
+
149
+  , next: function (event) {
150
+      var active = this.$menu.find('.active').removeClass('active')
151
+        , next = active.next()
152
+
153
+      if (!next.length) {
154
+        next = $(this.$menu.find('li')[0])
155
+      }
156
+
157
+      next.addClass('active')
158
+    }
159
+
160
+  , prev: function (event) {
161
+      var active = this.$menu.find('.active').removeClass('active')
162
+        , prev = active.prev()
163
+
164
+      if (!prev.length) {
165
+        prev = this.$menu.find('li').last()
166
+      }
167
+
168
+      prev.addClass('active')
169
+    }
170
+
171
+  , listen: function () {
172
+      this.$element
173
+        .on('blur',     $.proxy(this.blur, this))
174
+        .on('keypress', $.proxy(this.keypress, this))
175
+        .on('keyup',    $.proxy(this.keyup, this))
176
+
177
+      if ($.browser.chrome || $.browser.webkit || $.browser.msie) {
178
+        this.$element.on('keydown', $.proxy(this.keydown, this))
179
+      }
180
+
181
+      this.$menu
182
+        .on('click', $.proxy(this.click, this))
183
+        .on('mouseenter', 'li', $.proxy(this.mouseenter, this))
184
+    }
185
+
186
+  , move: function (e) {
187
+      if (!this.shown) return
188
+
189
+      switch(e.keyCode) {
190
+        case 9: // tab
191
+        case 13: // enter
192
+        case 27: // escape
193
+          e.preventDefault()
194
+          break
195
+
196
+        case 38: // up arrow
197
+          e.preventDefault()
198
+          this.prev()
199
+          break
200
+
201
+        case 40: // down arrow
202
+          e.preventDefault()
203
+          this.next()
204
+          break
205
+      }
206
+
207
+      e.stopPropagation()
208
+    }
209
+
210
+  , keydown: function (e) {
211
+      this.suppressKeyPressRepeat = !~$.inArray(e.keyCode, [40,38,9,13,27])
212
+      this.move(e)
213
+    }
214
+
215
+  , keypress: function (e) {
216
+      if (this.suppressKeyPressRepeat) return
217
+      this.move(e)
218
+    }
219
+
220
+  , keyup: function (e) {
221
+      switch(e.keyCode) {
222
+        case 40: // down arrow
223
+        case 38: // up arrow
224
+          break
225
+
226
+        case 9: // tab
227
+        case 13: // enter
228
+          if (!this.shown) return
229
+          this.select()
230
+          break
231
+
232
+        case 27: // escape
233
+          if (!this.shown) return
234
+          this.hide()
235
+          break
236
+
237
+        default:
238
+          this.lookup()
239
+      }
240
+
241
+      e.stopPropagation()
242
+      e.preventDefault()
243
+  }
244
+
245
+  , blur: function (e) {
246
+      var that = this
247
+      setTimeout(function () { that.hide() }, 150)
248
+    }
249
+
250
+  , click: function (e) {
251
+      e.stopPropagation()
252
+      e.preventDefault()
253
+      this.select()
254
+    }
255
+
256
+  , mouseenter: function (e) {
257
+      this.$menu.find('.active').removeClass('active')
258
+      $(e.currentTarget).addClass('active')
259
+    }
260
+
261
+  }
262
+
263
+
264
+  /* TYPEAHEAD PLUGIN DEFINITION
265
+   * =========================== */
266
+
267
+  $.fn.typeahead = function (option) {
268
+    return this.each(function () {
269
+      var $this = $(this)
270
+        , data = $this.data('typeahead')
271
+        , options = typeof option == 'object' && option
272
+      if (!data) $this.data('typeahead', (data = new Typeahead(this, options)))
273
+      if (typeof option == 'string') data[option]()
274
+    })
275
+  }
276
+
277
+  $.fn.typeahead.defaults = {
278
+    source: []
279
+  , items: 8
280
+  , menu: '<ul class="typeahead dropdown-menu"></ul>'
281
+  , item: '<li><a href="#"></a></li>'
282
+  , minLength: 1
283
+  }
284
+
285
+  $.fn.typeahead.Constructor = Typeahead
286
+
287
+
288
+ /*   TYPEAHEAD DATA-API
289
+  * ================== */
290
+
291
+  $(function () {
292
+    $('body').on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
293
+      var $this = $(this)
294
+      if ($this.data('typeahead')) return
295
+      e.preventDefault()
296
+      $this.typeahead($this.data())
297
+    })
298
+  })
299
+
300
+}(window.jQuery);

+ 13 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.br.js View File

@@ -0,0 +1,13 @@
1
+/**
2
+ * Brazilian translation for bootstrap-datepicker
3
+ * Cauan Cabral <cauan@radig.com.br>
4
+ */
5
+;(function($){
6
+	$.fn.datepicker.dates['br'] = {
7
+		days: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado", "Domingo"],
8
+		daysShort: ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb", "Dom"],
9
+		daysMin: ["Do", "Se", "Te", "Qu", "Qu", "Se", "Sa", "Do"],
10
+		months: ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"],
11
+		monthsShort: ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"]
12
+	};
13
+}(jQuery));

+ 13 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.cs.js View File

@@ -0,0 +1,13 @@
1
+/**
2
+ * Czech translation for bootstrap-datepicker
3
+ * Matěj Koubík <matej@koubik.name>
4
+ */
5
+;(function($){
6
+	$.fn.datepicker.dates['cs'] = {
7
+		days: ["Neděle", "Pondělí", "Úterý", "Středa", "Čtvrtek", "Pátek", "Sobota", "Neděle"],
8
+		daysShort: ["Ne", "Po", "Út", "St", "Čt", "Pá", "So", "Ne"],
9
+		daysMin: ["N", "P", "Ú", "St", "Č", "P", "So", "N"],
10
+		months: ["Leden", "Únor", "Březen", "Duben", "Květen", "Červen", "Červenec", "Srpen", "Září", "Říjen", "Listopad", "Prosinec"],
11
+		monthsShort: ["Led", "Úno", "Bře", "Dub", "Kvě", "Čer", "Čnc", "Srp", "Zář", "Říj", "Lis", "Pro"]
12
+	};
13
+}(jQuery));

+ 13 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.da.js View File

@@ -0,0 +1,13 @@
1
+/**
2
+ * Danish translation for bootstrap-datepicker
3
+ * Christian Pedersen <http://github.com/chripede>
4
+ */
5
+;(function($){
6
+	$.fn.datepicker.dates['da'] = {
7
+		days: ["Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag", "Søndag"],
8
+		daysShort: ["Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør", "Søn"],
9
+		daysMin: ["Sø", "Ma", "Ti", "On", "To", "Fr", "Lø", "Sø"],
10
+		months: ["Januar", "Februar", "Marts", "April", "Maj", "Juni", "Juli", "August", "September", "Oktober", "November", "December"],
11
+		monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"]
12
+	};
13
+}(jQuery));

+ 13 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.de.js View File

@@ -0,0 +1,13 @@
1
+/**
2
+ * German translation for bootstrap-datepicker
3
+ * Sam Zurcher <sam@orelias.ch>
4
+ */
5
+;(function($){
6
+	$.fn.datepicker.dates['de'] = {
7
+		days: ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag", "Sonntag"],
8
+		daysShort: ["Son", "Mon", "Die", "Mit", "Don", "Fre", "Sam", "Son"],
9
+		daysMin: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa", "So"],
10
+		months: ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"],
11
+		monthsShort: ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"]
12
+	};
13
+}(jQuery));

+ 13 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.es.js View File

@@ -0,0 +1,13 @@
1
+/**
2
+ * Spanish translation for bootstrap-datepicker
3
+ * Bruno Bonamin <bruno.bonamin@gmail.com>
4
+ */
5
+;(function($){
6
+	$.fn.datepicker.dates['es'] = {
7
+		days: ["Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado", "Domingo"],
8
+		daysShort: ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb", "Dom"],
9
+		daysMin: ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sa", "Do"],
10
+		months: ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"],
11
+		monthsShort: ["Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic"]
12
+	};
13
+}(jQuery));

+ 13 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.fi.js View File

@@ -0,0 +1,13 @@
1
+/**
2
+ * Finnish translation for bootstrap-datepicker
3
+ * Jaakko Salonen <https://github.com/jsalonen>
4
+ */
5
+;(function($){
6
+	$.fn.datepicker.dates['fi'] = {
7
+		days: ["sunnuntai", "maanantai", "tiistai", "keskiviikko", "torstai", "perjantai", "lauantai", "sunnuntai"],
8
+		daysShort: ["sun", "maa", "tii", "kes", "tor", "per", "lau", "sun"],
9
+		daysMin: ["su", "ma", "ti", "ke", "to", "pe", "la", "su"],
10
+		months: ["tammikuu", "helmikuu", "maaliskuu", "huhtikuu", "toukokuu", "kesäkuu", "heinäkuu", "elokuu", "syyskuu", "lokakuu", "marraskuu", "joulukuu"],
11
+		monthsShort: ["tam", "hel", "maa", "huh", "tou", "kes", "hei", "elo", "syy", "lok", "mar", "jou"]
12
+	};
13
+}(jQuery));

+ 13 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.fr.js View File

@@ -0,0 +1,13 @@
1
+/**
2
+ * French translation for bootstrap-datepicker
3
+ * Nico Mollet <nico.mollet@gmail.com>
4
+ */
5
+;(function($){
6
+	$.fn.datepicker.dates['fr'] = {
7
+		days: ["Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi", "Dimanche"],
8
+		daysShort: ["Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam", "Dim"],
9
+		daysMin: ["D", "L", "Ma", "Me", "J", "V", "S", "D"],
10
+		months: ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"],
11
+		monthsShort: ["Jan", "Fev", "Mar", "Avr", "Mai", "Jui", "Jul", "Aou", "Sep", "Oct", "Nov", "Dec"]
12
+	};
13
+}(jQuery));

+ 13 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.id.js View File

@@ -0,0 +1,13 @@
1
+/**
2
+ * Bahasa translation for bootstrap-datepicker
3
+ * Azwar Akbar <azwar.akbar@gmail.com>
4
+ */
5
+;(function($){
6
+	$.fn.datepicker.dates['id'] = {
7
+		days: ["Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu", "Minggu"],
8
+		daysShort: ["Mgu", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab", "Mgu"],
9
+		daysMin: ["Mg", "Sn", "Sl", "Ra", "Ka", "Ju", "Sa", "Mg"],
10
+		months: ["Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember"],
11
+		monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Ags", "Sep", "Okt", "Nov", "Des"]
12
+	};
13
+}(jQuery));

+ 13 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.is.js View File

@@ -0,0 +1,13 @@
1
+/**
2
+ * Icelandic translation for bootstrap-datepicker
3
+ * Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
4
+ */
5
+;(function($){
6
+	$.fn.datepicker.dates['is'] = {
7
+		days: ["Sunnudagur", "Mánudagur", "Þriðjudagur", "Miðvikudagur", "Fimmtudagur", "Föstudagur", "Laugardagur", "Sunnudagur"],
8
+		daysShort: ["Sun", "Mán", "Þri", "Mið", "Fim", "Fös", "Lau", "Sun"],
9
+		daysMin: ["Su", "Má", "Þr", "Mi", "Fi", "Fö", "La", "Su"],
10
+		months: ["Janúar", "Febrúar", "Mars", "Apríl", "Maí", "Júní", "Júlí", "Ágúst", "September", "Október", "Nóvember", "Desember"],
11
+		monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maí", "Jún", "Júl", "Ágú", "Sep", "Okt", "Nóv", "Des"]
12
+	};
13
+}(jQuery));

+ 13 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.it.js View File

@@ -0,0 +1,13 @@
1
+/**
2
+ * Italian translation for bootstrap-datepicker
3
+ * Enrico Rubboli <rubboli@gmail.com>
4
+ */
5
+;(function($){
6
+	$.fn.datepicker.dates['it'] = {
7
+		days: ["Domenica", "Lunedi", "Martedi", "Mercoledi", "Giovedi", "Venerdi", "Sabato", "Domenica"],
8
+		daysShort: ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab", "Dom"],
9
+		daysMin: ["Do", "Lu", "Ma", "Me", "Gi", "Ve", "Sa", "Do"],
10
+		months: ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"],
11
+		monthsShort: ["Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic"]
12
+	};
13
+}(jQuery));

+ 13 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.ja.js View File

@@ -0,0 +1,13 @@
1
+/**
2
+ * Japanese translation for bootstrap-datepicker
3
+ * Norio Suzuki <https://github.com/suzuki/>
4
+ */
5
+;(function($){
6
+	$.fn.datepicker.dates['ja'] = {
7
+		days: ["日曜", "月曜", "火曜", "水曜", "木曜", "金曜", "土曜", "日曜"],
8
+		daysShort: ["日", "月", "火", "水", "木", "金", "土", "日"],
9
+		daysMin: ["日", "月", "火", "水", "木", "金", "土", "日"],
10
+		months: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
11
+		monthsShort: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"]
12
+	};
13
+}(jQuery));

+ 13 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.kr.js View File

@@ -0,0 +1,13 @@
1
+/**
2
+ * Korean translation for bootstrap-datepicker
3
+ * Gu Youn <http://github.com/guyoun>
4
+ */
5
+;(function($){
6
+	$.fn.datepicker.dates['kr'] = {
7
+		days: ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일", "일요일"],
8
+		daysShort: ["일", "월", "화", "수", "목", "금", "토", "일"],
9
+		daysMin: ["일", "월", "화", "수", "목", "금", "토", "일"],
10
+		months: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"],
11
+		monthsShort: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"],
12
+	};
13
+}(jQuery));

+ 15 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.lt.js View File

@@ -0,0 +1,15 @@
1
+/**
2
+ * Lithuanian translation for bootstrap-datepicker
3
+ * Šarūnas Gliebus <ssharunas@yahoo.co.uk>
4
+ */
5
+
6
+;(function($){
7
+    $.fn.datepicker.dates['lt'] = {
8
+        days: ["Sekmadienis", "Pirmadienis", "Antradienis", "Trečiadienis", "Ketvirtadienis", "Penktadienis", "Šeštadienis", "Sekmadienis"],
9
+        daysShort: ["S", "Pr", "A", "T", "K", "Pn", "Š", "S"],
10
+        daysMin: ["Sk", "Pr", "An", "Tr", "Ke", "Pn", "Št", "Sk"],
11
+        months: ["Sausis", "Vasaris", "Kovas", "Balandis", "Gegužė", "Birželis", "Liepa", "Rugpjūtis", "Rugsėjis", "Spalis", "Lapkritis", "Gruodis"],
12
+        monthsShort: ["Sau", "Vas", "Kov", "Bal", "Geg", "Bir", "Lie", "Rugp", "Rugs", "Spa", "Lap", "Gru"],
13
+        weekStart: 1
14
+    };
15
+}(jQuery));

+ 15 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.lv.js View File

@@ -0,0 +1,15 @@
1
+/**
2
+ * Latvian translation for bootstrap-datepicker
3
+ * Artis Avotins <artis@apit.lv>
4
+ */
5
+
6
+;(function($){
7
+    $.fn.datepicker.dates['lv'] = {
8
+        days: ["Svētdiena", "Pirmdiena", "Otrdiena", "Trešdiena", "Ceturtdiena", "Piektdiena", "Sestdiena", "Svētdiena"],
9
+        daysShort: ["Sv", "P", "O", "T", "C", "Pk", "S", "Sv"],
10
+        daysMin: ["Sv", "Pr", "Ot", "Tr", "Ce", "Pk", "St", "Sv"],
11
+        months: ["Janvāris", "Februāris", "Marts", "Aprīlis", "Maijs", "Jūnijs", "Jūlijs", "Augusts", "Septembris", "Oktobris", "Novembris", "Decembris"],
12
+        monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mai", "Jūn", "Jūl", "Aug", "Sep", "Okt", "Nov", "Dec."],
13
+        weekStart: 1
14
+    };
15
+}(jQuery));

+ 13 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.ms.js View File

@@ -0,0 +1,13 @@
1
+/**
2
+ * Malay translation for bootstrap-datepicker
3
+ * Ateman Faiz <noorulfaiz@gmail.com>
4
+ */
5
+;(function($){
6
+	$.fn.datepicker.dates['ms'] = {
7
+		days: ["Ahad", "Isnin", "Selasa", "Rabu", "Khamis", "Jumaat", "Sabtu", "Ahad"],
8
+		daysShort: ["Aha", "Isn", "Sel", "Rab", "Kha", "Jum", "Sab", "Aha"],
9
+		daysMin: ["Ah", "Is", "Se", "Ra", "Kh", "Ju", "Sa", "Ah"],
10
+		months: ["Januari", "Februari", "Mac", "April", "Mei", "Jun", "Julai", "Ogos", "September", "Oktober", "November", "Disember"],
11
+		monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Ogo", "Sep", "Okt", "Nov", "Dis"]
12
+	};
13
+}(jQuery));

+ 13 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.nb.js View File

@@ -0,0 +1,13 @@
1
+/**
2
+ * Norwegian (bokmål) translation for bootstrap-datepicker
3
+ * Fredrik Sundmyhr <http://github.com/fsundmyhr>
4
+ */
5
+;(function($){
6
+	$.fn.datepicker.dates['nb'] = {
7
+		days: ["Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag", "Søndag"],
8
+		daysShort: ["Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør", "Søn"],
9
+		daysMin: ["Sø", "Ma", "Ti", "On", "To", "Fr", "Lø", "Sø"],
10
+		months: ["Januar", "Februar", "Mars", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Desember"],
11
+		monthsShort: ["Jan", "Feb", "Mar", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Des"]
12
+	};
13
+}(jQuery));

+ 13 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.nl.js View File

@@ -0,0 +1,13 @@
1
+/**
2
+ * Dutch translation for bootstrap-datepicker
3
+ * Reinier Goltstein <mrgoltstein@gmail.com>
4
+ */
5
+;(function($){
6
+	$.fn.datepicker.dates['nl'] = {
7
+		days: ["Zondag", "Maandag", "Dinsdag", "Woensdag", "Donderdag", "Vrijdag", "Zaterdag", "Zondag"],
8
+		daysShort: ["Zo", "Ma", "Di", "Wo", "Do", "Vr", "Za", "Zo"],
9
+		daysMin: ["Zo", "Ma", "Di", "Wo", "Do", "Vr", "Za", "Zo"],
10
+		months: ["Januari", "Februari", "Maart", "April", "Mei", "Juni", "Juli", "Augustus", "September", "Oktober", "November", "December"],
11
+		monthsShort: ["Jan", "Feb", "Mrt", "Apr", "Mei", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"]
12
+	};
13
+}(jQuery));

+ 13 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.pl.js View File

@@ -0,0 +1,13 @@
1
+/**
2
+ * Polish translation for bootstrap-datepicker
3
+ * Robert <rtpm@gazeta.pl>
4
+ */
5
+;(function($){
6
+        $.fn.datepicker.dates['pl'] = {
7
+                days: ["Niedziela", "Poniedziałek", "Wtorek", "Środa", "Czwartek", "Piątek", "Sobota", "Niedziela"],
8
+                daysShort: ["Nie", "Pn", "Wt", "Śr", "Czw", "Pt", "So", "Nie"],
9
+                daysMin: ["N", "Pn", "Wt", "Śr", "Cz", "Pt", "So", "N"],
10
+                months: ["Styczeń", "Luty", "Marzec", "Kwiecień", "Maj", "Czerwiec", "Lipiec", "Sierpień", "Wrzesień", "Październik", "Listopad", "Grudzień"],
11
+                monthsShort: ["Sty", "Lu", "Mar", "Kw", "Maj", "Cze", "Lip", "Sie", "Wrz", "Pa", "Lis", "Gru"]
12
+        };
13
+}(jQuery));

+ 14 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.pt.js View File

@@ -0,0 +1,14 @@
1
+/**
2
+ * Portuguese translation for bootstrap-datepicker
3
+ * Original code: Cauan Cabral <cauan@radig.com.br>
4
+ * Tiago Melo <tiago.blackcode@gmail.com>
5
+ */
6
+;(function($){
7
+	$.fn.datepicker.dates['pt'] = {
8
+		days: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado", "Domingo"],
9
+		daysShort: ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb", "Dom"],
10
+		daysMin: ["Do", "Se", "Te", "Qu", "Qu", "Se", "Sa", "Do"],
11
+		months: ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"],
12
+		monthsShort: ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"]
13
+	};
14
+}(jQuery));

+ 13 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.ru.js View File

@@ -0,0 +1,13 @@
1
+/**
2
+ * Russian translation for bootstrap-datepicker
3
+ * Victor Taranenko <darwin@snowdale.com>
4
+ */
5
+;(function($){
6
+	$.fn.datepicker.dates['ru'] = {
7
+		days: ["Воскресенье", "Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота", "Воскресенье"],
8
+		daysShort: ["Вск", "Пнд", "Втр", "Срд", "Чтв", "Птн", "Суб", "Вск"],
9
+		daysMin: ["Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб", "Вс"],
10
+		months: ["Январь", "Февраль", "Март", "Апрель", "Май", "Июнь", "Июль", "Август", "Сентябрь", "Октябрь", "Ноябрь", "Декабрь"],
11
+		monthsShort: ["Янв", "Фев", "Мар", "Апр", "Май", "Июн", "Июл", "Авг", "Сен", "Окт", "Ноя", "Дек"]
12
+	};
13
+}(jQuery));

+ 13 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.sv.js View File

@@ -0,0 +1,13 @@
1
+/**
2
+ * Swedish translation for bootstrap-datepicker
3
+ * Patrik Ragnarsson <patrik@starkast.net>
4
+ */
5
+;(function($){
6
+	$.fn.datepicker.dates['sv'] = {
7
+		days: ["Söndag", "Måndag", "Tisdag", "Onsdag", "Torsdag", "Fredag", "Lördag", "Söndag"],
8
+		daysShort: ["Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör", "Sön"],
9
+		daysMin: ["Sö", "Må", "Ti", "On", "To", "Fr", "Lö", "Sö"],
10
+		months: ["Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September", "Oktober", "November", "December"],
11
+		monthsShort: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"]
12
+	};
13
+}(jQuery));

+ 13 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.th.js View File

@@ -0,0 +1,13 @@
1
+/**
2
+ * Thai translation for bootstrap-datepicker
3
+ * Suchau Jiraprapot <seroz24@gmail.com>
4
+ */
5
+;(function($){
6
+	$.fn.datepicker.dates['th'] = {
7
+		days: ["อาทิตย์", "จันทร์", "อังคาร", "พุธ", "พฤหัส", "ศุกร์", "เสาร์", "อาทิตย์"],
8
+		daysShort: ["อา", "จ", "อ", "พ", "พฤ", "ศ", "ส", "อา"],
9
+		daysMin: ["อา", "จ", "อ", "พ", "พฤ", "ศ", "ส", "อา"],
10
+		months: ["มกราคม", "กุมภาพันธ์", "มีนาคม", "เมษายน", "พฤษภาคม", "มิถุนายน", "กรกฎาคม", "สิงหาคม", "กันยายน", "ตุลาคม", "พฤศจิกายน", "ธันวาคม"],
11
+		monthsShort: ["ม.ค.", "ก.พ.", "มี.ค.", "เม.ย.", "พ.ค.", "มิ.ย.", "ก.ค.", "ส.ค.", "ก.ย.", "ต.ค.", "พ.ย.", "ธ.ค."]
12
+	};
13
+}(jQuery));

+ 0 - 0
web/bundles/admingeneratorgenerator/js/bootstrap/locales/bootstrap-datepicker.tr.js View File


Some files were not shown because too many files changed in this diff