volt-semantic-ui 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (155) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +0 -0
  3. data/Gemfile +0 -0
  4. data/LICENSE.txt +0 -0
  5. data/README.md +0 -0
  6. data/Rakefile +0 -0
  7. data/app/semanticui/assets/css/semantic.min.css +3 -3
  8. data/app/semanticui/assets/css/themes/basic/assets/fonts/icons.eot +0 -0
  9. data/app/semanticui/assets/css/themes/basic/assets/fonts/icons.svg +0 -0
  10. data/app/semanticui/assets/css/themes/basic/assets/fonts/icons.ttf +0 -0
  11. data/app/semanticui/assets/css/themes/basic/assets/fonts/icons.woff +0 -0
  12. data/app/semanticui/assets/css/themes/default/assets/fonts/icons.eot +0 -0
  13. data/app/semanticui/assets/css/themes/default/assets/fonts/icons.otf +0 -0
  14. data/app/semanticui/assets/css/themes/default/assets/fonts/icons.svg +526 -465
  15. data/app/semanticui/assets/css/themes/default/assets/fonts/icons.ttf +0 -0
  16. data/app/semanticui/assets/css/themes/default/assets/fonts/icons.woff +0 -0
  17. data/app/semanticui/assets/css/themes/default/assets/fonts/icons.woff2 +0 -0
  18. data/app/semanticui/assets/css/themes/default/assets/images/flags.png +0 -0
  19. data/app/semanticui/assets/js/components/accordion.css +256 -0
  20. data/app/semanticui/assets/js/components/accordion.js +578 -0
  21. data/app/semanticui/assets/js/components/accordion.min.css +10 -0
  22. data/app/semanticui/assets/js/components/accordion.min.js +11 -0
  23. data/app/semanticui/assets/js/components/ad.css +276 -0
  24. data/app/semanticui/assets/js/components/ad.min.css +10 -0
  25. data/app/semanticui/assets/js/components/api.js +871 -0
  26. data/app/semanticui/assets/js/components/api.min.js +11 -0
  27. data/app/semanticui/assets/js/components/breadcrumb.css +124 -0
  28. data/app/semanticui/assets/js/components/breadcrumb.min.css +10 -0
  29. data/app/semanticui/assets/js/components/button.css +2391 -0
  30. data/app/semanticui/assets/js/components/button.min.css +10 -0
  31. data/app/semanticui/assets/js/components/card.css +909 -0
  32. data/app/semanticui/assets/js/components/card.min.css +10 -0
  33. data/app/semanticui/assets/js/components/checkbox.css +513 -0
  34. data/app/semanticui/assets/js/components/checkbox.js +509 -0
  35. data/app/semanticui/assets/js/components/checkbox.min.css +10 -0
  36. data/app/semanticui/assets/js/components/checkbox.min.js +11 -0
  37. data/app/semanticui/assets/js/components/comment.css +259 -0
  38. data/app/semanticui/assets/js/components/comment.min.css +10 -0
  39. data/app/semanticui/assets/js/components/dimmer.css +186 -0
  40. data/app/semanticui/assets/js/components/dimmer.js +669 -0
  41. data/app/semanticui/assets/js/components/dimmer.min.css +10 -0
  42. data/app/semanticui/assets/js/components/dimmer.min.js +11 -0
  43. data/app/semanticui/assets/js/components/divider.css +241 -0
  44. data/app/semanticui/assets/js/components/divider.min.css +10 -0
  45. data/app/semanticui/assets/js/components/dropdown.css +1103 -0
  46. data/app/semanticui/assets/js/components/dropdown.js +1795 -0
  47. data/app/semanticui/assets/js/components/dropdown.min.css +10 -0
  48. data/app/semanticui/assets/js/components/dropdown.min.js +11 -0
  49. data/app/semanticui/assets/js/components/feed.css +276 -0
  50. data/app/semanticui/assets/js/components/feed.min.css +10 -0
  51. data/app/semanticui/assets/js/components/flag.css +1024 -0
  52. data/app/semanticui/assets/js/components/flag.min.css +10 -0
  53. data/app/semanticui/assets/js/components/form.css +891 -0
  54. data/app/semanticui/assets/js/components/form.js +1118 -0
  55. data/app/semanticui/assets/js/components/form.min.css +10 -0
  56. data/app/semanticui/assets/js/components/form.min.js +11 -0
  57. data/app/semanticui/assets/js/components/grid.css +1871 -0
  58. data/app/semanticui/assets/js/components/grid.min.css +10 -0
  59. data/app/semanticui/assets/js/components/header.css +596 -0
  60. data/app/semanticui/assets/js/components/header.min.css +10 -0
  61. data/app/semanticui/assets/js/components/icon.css +2467 -0
  62. data/app/semanticui/assets/js/components/icon.min.css +10 -0
  63. data/app/semanticui/assets/js/components/image.css +288 -0
  64. data/app/semanticui/assets/js/components/image.min.css +10 -0
  65. data/app/semanticui/assets/js/components/input.css +439 -0
  66. data/app/semanticui/assets/js/components/input.min.css +10 -0
  67. data/app/semanticui/assets/js/components/item.css +456 -0
  68. data/app/semanticui/assets/js/components/item.min.css +10 -0
  69. data/app/semanticui/assets/js/components/label.css +963 -0
  70. data/app/semanticui/assets/js/components/label.min.css +10 -0
  71. data/app/semanticui/assets/js/components/list.css +878 -0
  72. data/app/semanticui/assets/js/components/list.min.css +10 -0
  73. data/app/semanticui/assets/js/components/loader.css +284 -0
  74. data/app/semanticui/assets/js/components/loader.min.css +10 -0
  75. data/app/semanticui/assets/js/components/menu.css +1608 -0
  76. data/app/semanticui/assets/js/components/menu.min.css +10 -0
  77. data/app/semanticui/assets/js/components/message.css +421 -0
  78. data/app/semanticui/assets/js/components/message.min.css +10 -0
  79. data/app/semanticui/assets/js/components/modal.css +432 -0
  80. data/app/semanticui/assets/js/components/modal.js +860 -0
  81. data/app/semanticui/assets/js/components/modal.min.css +10 -0
  82. data/app/semanticui/assets/js/components/modal.min.js +11 -0
  83. data/app/semanticui/assets/js/components/nag.css +148 -0
  84. data/app/semanticui/assets/js/components/nag.js +477 -0
  85. data/app/semanticui/assets/js/components/nag.min.css +10 -0
  86. data/app/semanticui/assets/js/components/nag.min.js +11 -0
  87. data/app/semanticui/assets/js/components/popup.css +293 -0
  88. data/app/semanticui/assets/js/components/popup.js +1224 -0
  89. data/app/semanticui/assets/js/components/popup.min.css +10 -0
  90. data/app/semanticui/assets/js/components/popup.min.js +11 -0
  91. data/app/semanticui/assets/js/components/progress.css +461 -0
  92. data/app/semanticui/assets/js/components/progress.js +785 -0
  93. data/app/semanticui/assets/js/components/progress.min.css +10 -0
  94. data/app/semanticui/assets/js/components/progress.min.js +11 -0
  95. data/app/semanticui/assets/js/components/rail.css +124 -0
  96. data/app/semanticui/assets/js/components/rail.min.css +10 -0
  97. data/app/semanticui/assets/js/components/rating.css +251 -0
  98. data/app/semanticui/assets/js/components/rating.js +451 -0
  99. data/app/semanticui/assets/js/components/rating.min.css +10 -0
  100. data/app/semanticui/assets/js/components/rating.min.js +11 -0
  101. data/app/semanticui/assets/js/components/reset.css +429 -0
  102. data/app/semanticui/assets/js/components/reset.min.css +10 -0
  103. data/app/semanticui/assets/js/components/reveal.css +293 -0
  104. data/app/semanticui/assets/js/components/reveal.min.css +10 -0
  105. data/app/semanticui/assets/js/components/search.css +329 -0
  106. data/app/semanticui/assets/js/components/search.js +1096 -0
  107. data/app/semanticui/assets/js/components/search.min.css +10 -0
  108. data/app/semanticui/assets/js/components/search.min.js +11 -0
  109. data/app/semanticui/assets/js/components/segment.css +635 -0
  110. data/app/semanticui/assets/js/components/segment.min.css +10 -0
  111. data/app/semanticui/assets/js/components/shape.css +154 -0
  112. data/app/semanticui/assets/js/components/shape.js +830 -0
  113. data/app/semanticui/assets/js/components/shape.min.css +10 -0
  114. data/app/semanticui/assets/js/components/shape.min.js +11 -0
  115. data/app/semanticui/assets/js/components/sidebar.css +625 -0
  116. data/app/semanticui/assets/js/components/sidebar.js +1089 -0
  117. data/app/semanticui/assets/js/components/sidebar.min.css +10 -0
  118. data/app/semanticui/assets/js/components/sidebar.min.js +11 -0
  119. data/app/semanticui/assets/js/components/site.css +160 -0
  120. data/app/semanticui/assets/js/components/site.js +487 -0
  121. data/app/semanticui/assets/js/components/site.min.css +10 -0
  122. data/app/semanticui/assets/js/components/site.min.js +11 -0
  123. data/app/semanticui/assets/js/components/state.js +695 -0
  124. data/app/semanticui/assets/js/components/state.min.js +11 -0
  125. data/app/semanticui/assets/js/components/statistic.css +409 -0
  126. data/app/semanticui/assets/js/components/statistic.min.css +10 -0
  127. data/app/semanticui/assets/js/components/step.css +432 -0
  128. data/app/semanticui/assets/js/components/step.min.css +10 -0
  129. data/app/semanticui/assets/js/components/sticky.css +79 -0
  130. data/app/semanticui/assets/js/components/sticky.js +792 -0
  131. data/app/semanticui/assets/js/components/sticky.min.css +10 -0
  132. data/app/semanticui/assets/js/components/sticky.min.js +11 -0
  133. data/app/semanticui/assets/js/components/tab.css +92 -0
  134. data/app/semanticui/assets/js/components/tab.js +802 -0
  135. data/app/semanticui/assets/js/components/tab.min.css +10 -0
  136. data/app/semanticui/assets/js/components/tab.min.js +11 -0
  137. data/app/semanticui/assets/js/components/table.css +1000 -0
  138. data/app/semanticui/assets/js/components/table.min.css +10 -0
  139. data/app/semanticui/assets/js/components/transition.css +1990 -0
  140. data/app/semanticui/assets/js/components/transition.js +1038 -0
  141. data/app/semanticui/assets/js/components/transition.min.css +10 -0
  142. data/app/semanticui/assets/js/components/transition.min.js +11 -0
  143. data/app/semanticui/assets/js/components/video.css +125 -0
  144. data/app/semanticui/assets/js/components/video.js +540 -0
  145. data/app/semanticui/assets/js/components/video.min.css +10 -0
  146. data/app/semanticui/assets/js/components/video.min.js +11 -0
  147. data/app/semanticui/assets/js/components/visibility.js +1032 -0
  148. data/app/semanticui/assets/js/components/visibility.min.js +11 -0
  149. data/app/semanticui/assets/js/semantic.min.js +9 -9
  150. data/lib/volt/semanticui.rb +0 -0
  151. data/lib/volt/semanticui/version.rb +1 -1
  152. data/volt-semantic-ui-0.0.1.gem +0 -0
  153. data/volt-semanticui-0.0.1.gem +0 -0
  154. data/volt-semanticui.gemspec +0 -0
  155. metadata +141 -10
@@ -0,0 +1,10 @@
1
+ /*!
2
+ * # Semantic UI 1.11.4 - Nag
3
+ * http://github.com/semantic-org/semantic-ui/
4
+ *
5
+ *
6
+ * Copyright 2014 Contributors
7
+ * Released under the MIT license
8
+ * http://opensource.org/licenses/MIT
9
+ *
10
+ */.ui.nag{display:none;opacity:.95;position:relative;top:0;left:0;z-index:999;min-height:0;width:100%;margin:0;padding:.75em 1em;background:#555;box-shadow:0 1px 2px 0 rgba(0,0,0,.2);font-size:1rem;text-align:center;color:rgba(0,0,0,.8);border-radius:0 0 .2857rem .2857rem;-webkit-transition:.2s background ease;transition:.2s background ease}a.ui.nag{cursor:pointer}.ui.nag>.title{display:inline-block;margin:0 .5em;color:#fff}.ui.nag>.close.icon{cursor:pointer;opacity:.4;position:absolute;top:50%;right:1em;font-size:1em;margin:-.5em 0 0;color:#fff;-webkit-transition:opacity .2s ease;transition:opacity .2s ease}.ui.nag:hover{background:#555;opacity:1}.ui.nag .close:hover{opacity:1}.ui.overlay.nag{position:absolute;display:block}.ui.fixed.nag{position:fixed}.ui.bottom.nag,.ui.bottom.nags{border-radius:.2857rem .2857rem 0 0;top:auto;bottom:0}.ui.inverted.nag,.ui.inverted.nags .nag{background-color:#f0f0f0;color:rgba(0,0,0,.85)}.ui.inverted.nag .close,.ui.inverted.nag .title,.ui.inverted.nags .nag .close,.ui.inverted.nags .nag .title{color:rgba(0,0,0,.4)}.ui.nags .nag{border-radius:0!important}.ui.nags .nag:last-child{border-radius:0 0 .2857rem .2857rem}.ui.bottom.nags .nag:last-child{border-radius:.2857rem .2857rem 0 0}
@@ -0,0 +1,11 @@
1
+ /*!
2
+ * # Semantic UI 1.11.4 - Nag
3
+ * http://github.com/semantic-org/semantic-ui/
4
+ *
5
+ *
6
+ * Copyright 2014 Contributors
7
+ * Released under the MIT license
8
+ * http://opensource.org/licenses/MIT
9
+ *
10
+ */
11
+ !function(e,o,n,t){"use strict";e.fn.nag=function(n){var i,a=e(this),r=a.selector||"",s=(new Date).getTime(),c=[],l=arguments[0],u="string"==typeof l,g=[].slice.call(arguments,1);return a.each(function(){{var a,d=e.isPlainObject(n)?e.extend(!0,{},e.fn.nag.settings,n):e.extend({},e.fn.nag.settings),m=(d.className,d.selector),f=d.error,p=d.namespace,h="."+p,b=p+"-module",v=e(this),y=v.find(m.close),k=e(d.context?d.context:"body"),w=this,x=v.data(b);o.requestAnimationFrame||o.mozRequestAnimationFrame||o.webkitRequestAnimationFrame||o.msRequestAnimationFrame||function(e){setTimeout(e,0)}}a={initialize:function(){a.verbose("Initializing element"),v.data(b,a),y.on("click"+h,a.dismiss),d.detachable&&v.parent()[0]!==k[0]&&v.detach().prependTo(k),d.displayTime>0&&setTimeout(a.hide,d.displayTime),a.show()},destroy:function(){a.verbose("Destroying instance"),v.removeData(b).off(h)},show:function(){a.should.show()&&!v.is(":visible")&&(a.debug("Showing nag",d.animation.show),"fade"==d.animation.show?v.fadeIn(d.duration,d.easing):v.slideDown(d.duration,d.easing))},hide:function(){a.debug("Showing nag",d.animation.hide),"fade"==d.animation.show?v.fadeIn(d.duration,d.easing):v.slideUp(d.duration,d.easing)},onHide:function(){a.debug("Removing nag",d.animation.hide),v.remove(),d.onHide&&d.onHide()},dismiss:function(e){d.storageMethod&&a.storage.set(d.key,d.value),a.hide(),e.stopImmediatePropagation(),e.preventDefault()},should:{show:function(){return d.persist?(a.debug("Persistent nag is set, can show nag"),!0):a.storage.get(d.key)!=d.value.toString()?(a.debug("Stored value is not set, can show nag",a.storage.get(d.key)),!0):(a.debug("Stored value is set, cannot show nag",a.storage.get(d.key)),!1)}},get:{storageOptions:function(){var e={};return d.expires&&(e.expires=d.expires),d.domain&&(e.domain=d.domain),d.path&&(e.path=d.path),e}},clear:function(){a.storage.remove(d.key)},storage:{set:function(n,i){var r=a.get.storageOptions();if("localstorage"==d.storageMethod&&o.localStorage!==t)o.localStorage.setItem(n,i),a.debug("Value stored using local storage",n,i);else{if(e.cookie===t)return void a.error(f.noCookieStorage);e.cookie(n,i,r),a.debug("Value stored using cookie",n,i,r)}},get:function(n){var i;return"localstorage"==d.storageMethod&&o.localStorage!==t?i=o.localStorage.getItem(n):e.cookie!==t?i=e.cookie(n):a.error(f.noCookieStorage),("undefined"==i||"null"==i||i===t||null===i)&&(i=t),i},remove:function(n){var i=a.get.storageOptions();"local"==d.storageMethod&&o.store!==t?o.localStorage.removeItem(n):e.cookie!==t?e.removeCookie(n,i):a.error(f.noStorage)}},setting:function(o,n){if(a.debug("Changing setting",o,n),e.isPlainObject(o))e.extend(!0,d,o);else{if(n===t)return d[o];d[o]=n}},internal:function(o,n){if(e.isPlainObject(o))e.extend(!0,a,o);else{if(n===t)return a[o];a[o]=n}},debug:function(){d.debug&&(d.performance?a.performance.log(arguments):(a.debug=Function.prototype.bind.call(console.info,console,d.name+":"),a.debug.apply(console,arguments)))},verbose:function(){d.verbose&&d.debug&&(d.performance?a.performance.log(arguments):(a.verbose=Function.prototype.bind.call(console.info,console,d.name+":"),a.verbose.apply(console,arguments)))},error:function(){a.error=Function.prototype.bind.call(console.error,console,d.name+":"),a.error.apply(console,arguments)},performance:{log:function(e){var o,n,t;d.performance&&(o=(new Date).getTime(),t=s||o,n=o-t,s=o,c.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:w,"Execution Time":n})),clearTimeout(a.performance.timer),a.performance.timer=setTimeout(a.performance.display,100)},display:function(){var o=d.name+":",n=0;s=!1,clearTimeout(a.performance.timer),e.each(c,function(e,o){n+=o["Execution Time"]}),o+=" "+n+"ms",r&&(o+=" '"+r+"'"),(console.group!==t||console.table!==t)&&c.length>0&&(console.groupCollapsed(o),console.table?console.table(c):e.each(c,function(e,o){console.log(o.Name+": "+o["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(o,n,r){var s,c,l,u=x;return n=n||g,r=w||r,"string"==typeof o&&u!==t&&(o=o.split(/[\. ]/),s=o.length-1,e.each(o,function(n,i){var r=n!=s?i+o[n+1].charAt(0).toUpperCase()+o[n+1].slice(1):o;if(e.isPlainObject(u[r])&&n!=s)u=u[r];else{if(u[r]!==t)return c=u[r],!1;if(!e.isPlainObject(u[i])||n==s)return u[i]!==t?(c=u[i],!1):(a.error(f.method,o),!1);u=u[i]}})),e.isFunction(c)?l=c.apply(r,n):c!==t&&(l=c),e.isArray(i)?i.push(l):i!==t?i=[i,l]:l!==t&&(i=l),c}},u?(x===t&&a.initialize(),a.invoke(l)):(x!==t&&x.invoke("destroy"),a.initialize())}),i!==t?i:this},e.fn.nag.settings={name:"Nag",debug:!1,verbose:!0,performance:!0,namespace:"Nag",persist:!1,displayTime:0,animation:{show:"slide",hide:"slide"},context:!1,detachable:!1,expires:30,domain:!1,path:"/",storageMethod:"cookie",key:"nag",value:"dismiss",error:{noStorage:"Neither $.cookie or store is defined. A storage solution is required for storing state",method:"The method you called is not defined."},className:{bottom:"bottom",fixed:"fixed"},selector:{close:".close.icon"},speed:500,easing:"easeOutQuad",onHide:function(){}}}(jQuery,window,document);
@@ -0,0 +1,293 @@
1
+ /*!
2
+ * # Semantic UI 1.11.4 - Popup
3
+ * http://github.com/semantic-org/semantic-ui/
4
+ *
5
+ *
6
+ * Copyright 2014 Contributors
7
+ * Released under the MIT license
8
+ * http://opensource.org/licenses/MIT
9
+ *
10
+ */
11
+
12
+
13
+ /*******************************
14
+ Popup
15
+ *******************************/
16
+
17
+ .ui.popup {
18
+ display: none;
19
+ position: absolute;
20
+ top: 0px;
21
+ right: 0px;
22
+
23
+ /* Fixes content being squished when inline (moz only) */
24
+ min-width: -moz-max-content;
25
+ z-index: 1900;
26
+ border: 1px solid #cccccc;
27
+ max-width: 250px;
28
+ background-color: #ffffff;
29
+ padding: 0.833em 1em;
30
+ font-weight: normal;
31
+ font-style: normal;
32
+ color: rgba(0, 0, 0, 0.8);
33
+ border-radius: 0.2857rem;
34
+ box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
35
+ }
36
+ .ui.popup > .header {
37
+ padding: 0em;
38
+ font-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
39
+ font-size: 1.125em;
40
+ line-height: 1.2;
41
+ font-weight: bold;
42
+ }
43
+ .ui.popup > .header + .content {
44
+ padding-top: 0.5em;
45
+ }
46
+ .ui.popup:before {
47
+ position: absolute;
48
+ content: '';
49
+ width: 0.75em;
50
+ height: 0.75em;
51
+ background: #ffffff;
52
+ -webkit-transform: rotate(45deg);
53
+ -ms-transform: rotate(45deg);
54
+ transform: rotate(45deg);
55
+ z-index: 2;
56
+ box-shadow: 1px 1px 0px 0px #b3b3b3;
57
+ }
58
+
59
+
60
+ /*******************************
61
+ Types
62
+ *******************************/
63
+
64
+
65
+ /*--------------
66
+ Spacing
67
+ ---------------*/
68
+
69
+ .ui.popup {
70
+ margin: 0em;
71
+ }
72
+ .ui.popup.bottom {
73
+ margin: 0.75em 0em 0em;
74
+ }
75
+ .ui.popup.top {
76
+ margin: 0em 0em 0.75em;
77
+ }
78
+ .ui.popup.left.center {
79
+ margin: 0em 0.75em 0em 0em;
80
+ }
81
+ .ui.popup.right.center {
82
+ margin: 0em 0em 0em 0.75em;
83
+ }
84
+
85
+ /*--------------
86
+ Pointer
87
+ ---------------*/
88
+
89
+
90
+ /*--- Below ---*/
91
+
92
+ .ui.bottom.center.popup:before {
93
+ margin-left: -0.325em;
94
+ top: -0.325em;
95
+ left: 50%;
96
+ right: auto;
97
+ bottom: auto;
98
+ box-shadow: -1px -1px 0px 0px #b3b3b3;
99
+ }
100
+ .ui.bottom.left.popup {
101
+ margin-left: 0em;
102
+ }
103
+ .ui.bottom.left.popup:before {
104
+ top: -0.325em;
105
+ left: 1em;
106
+ right: auto;
107
+ bottom: auto;
108
+ margin-left: 0em;
109
+ box-shadow: -1px -1px 0px 0px #b3b3b3;
110
+ }
111
+ .ui.bottom.right.popup {
112
+ margin-right: 0em;
113
+ }
114
+ .ui.bottom.right.popup:before {
115
+ top: -0.325em;
116
+ right: 1em;
117
+ bottom: auto;
118
+ left: auto;
119
+ margin-left: 0em;
120
+ box-shadow: -1px -1px 0px 0px #b3b3b3;
121
+ }
122
+
123
+ /*--- Above ---*/
124
+
125
+ .ui.top.center.popup:before {
126
+ top: auto;
127
+ right: auto;
128
+ bottom: -0.325em;
129
+ left: 50%;
130
+ margin-left: -0.325em;
131
+ }
132
+ .ui.top.left.popup {
133
+ margin-left: 0em;
134
+ }
135
+ .ui.top.left.popup:before {
136
+ bottom: -0.325em;
137
+ left: 1em;
138
+ top: auto;
139
+ right: auto;
140
+ margin-left: 0em;
141
+ }
142
+ .ui.top.right.popup {
143
+ margin-right: 0em;
144
+ }
145
+ .ui.top.right.popup:before {
146
+ bottom: -0.325em;
147
+ right: 1em;
148
+ top: auto;
149
+ left: auto;
150
+ margin-left: 0em;
151
+ }
152
+
153
+ /*--- Left Center ---*/
154
+
155
+ .ui.left.center.popup:before {
156
+ top: 50%;
157
+ right: -0.325em;
158
+ bottom: auto;
159
+ left: auto;
160
+ margin-top: -0.325em;
161
+ box-shadow: 1px -1px 0px 0px #b3b3b3;
162
+ }
163
+
164
+ /*--- Right Center ---*/
165
+
166
+ .ui.right.center.popup:before {
167
+ top: 50%;
168
+ left: -0.325em;
169
+ bottom: auto;
170
+ right: auto;
171
+ margin-top: -0.325em;
172
+ box-shadow: -1px 1px 0px 0px #b3b3b3;
173
+ }
174
+
175
+
176
+ /*******************************
177
+ Coupling
178
+ *******************************/
179
+
180
+
181
+ /* Immediate Nested Grid */
182
+ .ui.popup > .ui.grid:not(.padded) {
183
+ width: -webkit-calc(100% + 1.75rem);
184
+ width: calc(100% + 1.75rem);
185
+ margin: -0.7rem -0.875rem;
186
+ }
187
+
188
+
189
+ /*******************************
190
+ States
191
+ *******************************/
192
+
193
+ .ui.loading.popup {
194
+ display: block;
195
+ visibility: hidden;
196
+ z-index: -1;
197
+ }
198
+ .ui.animating.popup,
199
+ .ui.visible.popup {
200
+ display: block;
201
+ }
202
+
203
+
204
+ /*******************************
205
+ Variations
206
+ *******************************/
207
+
208
+
209
+ /*--------------
210
+ Basic
211
+ ---------------*/
212
+
213
+ .ui.basic.popup:before {
214
+ display: none;
215
+ }
216
+
217
+ /*--------------
218
+ Wide
219
+ ---------------*/
220
+
221
+ .ui.wide.popup {
222
+ max-width: 350px;
223
+ }
224
+ .ui[class*="very wide"].popup {
225
+ max-width: 550px;
226
+ }
227
+
228
+ /*--------------
229
+ Fluid
230
+ ---------------*/
231
+
232
+ .ui.fluid.popup {
233
+ width: 100%;
234
+ max-width: none;
235
+ }
236
+
237
+ /*--------------
238
+ Colors
239
+ ---------------*/
240
+
241
+
242
+ /* Inverted colors */
243
+ .ui.inverted.popup {
244
+ background: #1b1c1d;
245
+ color: #ffffff;
246
+ border: none;
247
+ box-shadow: none;
248
+ }
249
+ .ui.inverted.popup .header {
250
+ background-color: none;
251
+ color: #ffffff;
252
+ }
253
+ .ui.inverted.popup:before {
254
+ background-color: #1b1c1d;
255
+ box-shadow: none !important;
256
+ }
257
+
258
+ /*--------------
259
+ Flowing
260
+ ---------------*/
261
+
262
+ .ui.flowing.popup {
263
+ max-width: none;
264
+ }
265
+
266
+ /*--------------
267
+ Sizes
268
+ ---------------*/
269
+
270
+ .ui.small.popup {
271
+ font-size: 0.785714rem;
272
+ }
273
+ .ui.popup {
274
+ font-size: 0.85714rem;
275
+ }
276
+ .ui.large.popup {
277
+ font-size: 1rem;
278
+ }
279
+ .ui.huge.popup {
280
+ font-size: 1.14285rem;
281
+ }
282
+
283
+
284
+ /*******************************
285
+ Theme Overrides
286
+ *******************************/
287
+
288
+
289
+
290
+ /*******************************
291
+ User Overrides
292
+ *******************************/
293
+
@@ -0,0 +1,1224 @@
1
+ /*!
2
+ * # Semantic UI 1.11.4 - Popup
3
+ * http://github.com/semantic-org/semantic-ui/
4
+ *
5
+ *
6
+ * Copyright 2014 Contributors
7
+ * Released under the MIT license
8
+ * http://opensource.org/licenses/MIT
9
+ *
10
+ */
11
+
12
+ ;(function ($, window, document, undefined) {
13
+
14
+ "use strict";
15
+
16
+ $.fn.popup = function(parameters) {
17
+ var
18
+ $allModules = $(this),
19
+ $document = $(document),
20
+
21
+ moduleSelector = $allModules.selector || '',
22
+
23
+ hasTouch = ('ontouchstart' in document.documentElement),
24
+ time = new Date().getTime(),
25
+ performance = [],
26
+
27
+ query = arguments[0],
28
+ methodInvoked = (typeof query == 'string'),
29
+ queryArguments = [].slice.call(arguments, 1),
30
+
31
+ returnedValue
32
+ ;
33
+ $allModules
34
+ .each(function() {
35
+ var
36
+ settings = ( $.isPlainObject(parameters) )
37
+ ? $.extend(true, {}, $.fn.popup.settings, parameters)
38
+ : $.extend({}, $.fn.popup.settings),
39
+
40
+ selector = settings.selector,
41
+ className = settings.className,
42
+ error = settings.error,
43
+ metadata = settings.metadata,
44
+ namespace = settings.namespace,
45
+
46
+ eventNamespace = '.' + settings.namespace,
47
+ moduleNamespace = 'module-' + namespace,
48
+
49
+ $module = $(this),
50
+ $context = $(settings.context),
51
+ $target = (settings.target)
52
+ ? $(settings.target)
53
+ : $module,
54
+
55
+ $window = $(window),
56
+ $body = $('body'),
57
+ $popup,
58
+ $offsetParent,
59
+
60
+ searchDepth = 0,
61
+ triedPositions = false,
62
+
63
+ element = this,
64
+ instance = $module.data(moduleNamespace),
65
+
66
+ elementNamespace,
67
+ id,
68
+ module
69
+ ;
70
+
71
+ module = {
72
+
73
+ // binds events
74
+ initialize: function() {
75
+ module.debug('Initializing', $module);
76
+ module.createID();
77
+ module.bind.events();
78
+ if( !module.exists() && settings.preserve) {
79
+ module.create();
80
+ }
81
+ module.instantiate();
82
+ },
83
+
84
+ instantiate: function() {
85
+ module.verbose('Storing instance', module);
86
+ instance = module;
87
+ $module
88
+ .data(moduleNamespace, instance)
89
+ ;
90
+ },
91
+
92
+ refresh: function() {
93
+ if(settings.popup) {
94
+ $popup = $(settings.popup).eq(0);
95
+ }
96
+ else {
97
+ if(settings.inline) {
98
+ $popup = $target.next(selector.popup).eq(0);
99
+ }
100
+ }
101
+ if(settings.popup) {
102
+ $popup.addClass(className.loading);
103
+ $offsetParent = module.get.offsetParent();
104
+ $popup.removeClass(className.loading);
105
+ if(settings.movePopup && module.has.popup() && module.get.offsetParent($popup)[0] !== $offsetParent[0]) {
106
+ module.debug('Moving popup to the same offset parent as activating element');
107
+ $popup
108
+ .detach()
109
+ .appendTo($offsetParent)
110
+ ;
111
+ }
112
+ }
113
+ else {
114
+ $offsetParent = (settings.inline)
115
+ ? module.get.offsetParent($target)
116
+ : module.has.popup()
117
+ ? module.get.offsetParent($popup)
118
+ : $body
119
+ ;
120
+ }
121
+ if( $offsetParent.is('html') ) {
122
+ module.debug('Setting page as offset parent');
123
+ $offsetParent = $body;
124
+ }
125
+ },
126
+
127
+ reposition: function() {
128
+ module.refresh();
129
+ module.set.position();
130
+ },
131
+
132
+ destroy: function() {
133
+ module.debug('Destroying previous module');
134
+ // remove element only if was created dynamically
135
+ if($popup && !settings.preserve) {
136
+ module.removePopup();
137
+ }
138
+ // clear all timeouts
139
+ clearTimeout(module.hideTimer);
140
+ clearTimeout(module.showTimer);
141
+ // remove events
142
+ $window.off(elementNamespace);
143
+ $module
144
+ .off(eventNamespace)
145
+ .removeData(moduleNamespace)
146
+ ;
147
+ },
148
+
149
+ event: {
150
+ start: function(event) {
151
+ var
152
+ delay = ($.isPlainObject(settings.delay))
153
+ ? settings.delay.show
154
+ : settings.delay
155
+ ;
156
+ clearTimeout(module.hideTimer);
157
+ module.showTimer = setTimeout(function() {
158
+ if(module.is.hidden() && !( module.is.active() && module.is.dropdown()) ) {
159
+ module.show();
160
+ }
161
+ }, delay);
162
+ },
163
+ end: function() {
164
+ var
165
+ delay = ($.isPlainObject(settings.delay))
166
+ ? settings.delay.hide
167
+ : settings.delay
168
+ ;
169
+ clearTimeout(module.showTimer);
170
+ module.hideTimer = setTimeout(function() {
171
+ if(module.is.visible() ) {
172
+ module.hide();
173
+ }
174
+ }, delay);
175
+ },
176
+ resize: function() {
177
+ if( module.is.visible() ) {
178
+ module.set.position();
179
+ }
180
+ }
181
+ },
182
+
183
+ // generates popup html from metadata
184
+ create: function() {
185
+ var
186
+ html = $module.data(metadata.html) || settings.html,
187
+ variation = $module.data(metadata.variation) || settings.variation,
188
+ title = $module.data(metadata.title) || settings.title,
189
+ content = $module.data(metadata.content) || $module.attr('title') || settings.content
190
+ ;
191
+ if(html || content || title) {
192
+ module.debug('Creating pop-up html');
193
+ if(!html) {
194
+ html = settings.templates.popup({
195
+ title : title,
196
+ content : content
197
+ });
198
+ }
199
+ $popup = $('<div/>')
200
+ .addClass(className.popup)
201
+ .addClass(variation)
202
+ .data(metadata.activator, $module)
203
+ .html(html)
204
+ ;
205
+ if(variation) {
206
+ $popup
207
+ .addClass(variation)
208
+ ;
209
+ }
210
+ if(settings.inline) {
211
+ module.verbose('Inserting popup element inline', $popup);
212
+ $popup
213
+ .insertAfter($module)
214
+ ;
215
+ }
216
+ else {
217
+ module.verbose('Appending popup element to body', $popup);
218
+ $popup
219
+ .appendTo( $context )
220
+ ;
221
+ }
222
+ module.refresh();
223
+ if(settings.hoverable) {
224
+ module.bind.popup();
225
+ }
226
+ settings.onCreate.call($popup, element);
227
+ }
228
+ else if($target.next(selector.popup).length !== 0) {
229
+ module.verbose('Pre-existing popup found');
230
+ settings.inline = true;
231
+ settings.popup = $target.next(selector.popup).data(metadata.activator, $module);
232
+ module.refresh();
233
+ if(settings.hoverable) {
234
+ module.bind.popup();
235
+ }
236
+ }
237
+ else if(settings.popup) {
238
+ settings.popup.data(metadata.activator, $module);
239
+ module.verbose('Used popup specified in settings');
240
+ module.refresh();
241
+ if(settings.hoverable) {
242
+ module.bind.popup();
243
+ }
244
+ }
245
+ else {
246
+ module.debug('No content specified skipping display', element);
247
+ }
248
+ },
249
+
250
+ createID: function() {
251
+ id = (Math.random().toString(16) + '000000000').substr(2,8);
252
+ elementNamespace = '.' + id;
253
+ module.verbose('Creating unique id for element', id);
254
+ },
255
+
256
+ // determines popup state
257
+ toggle: function() {
258
+ module.debug('Toggling pop-up');
259
+ if( module.is.hidden() ) {
260
+ module.debug('Popup is hidden, showing pop-up');
261
+ module.unbind.close();
262
+ module.show();
263
+ }
264
+ else {
265
+ module.debug('Popup is visible, hiding pop-up');
266
+ module.hide();
267
+ }
268
+ },
269
+
270
+ show: function(callback) {
271
+ callback = $.isFunction(callback) ? callback : function(){};
272
+ module.debug('Showing pop-up', settings.transition);
273
+ if( !module.exists() ) {
274
+ module.create();
275
+ }
276
+ else if(!settings.preserve && !settings.popup) {
277
+ module.refresh();
278
+ }
279
+ if( $popup && module.set.position() ) {
280
+ module.save.conditions();
281
+ if(settings.exclusive) {
282
+ module.hideAll();
283
+ }
284
+ module.animate.show(callback);
285
+ }
286
+ },
287
+
288
+
289
+ hide: function(callback) {
290
+ callback = $.isFunction(callback) ? callback : function(){};
291
+ module.remove.visible();
292
+ module.unbind.close();
293
+ if( module.is.visible() ) {
294
+ module.restore.conditions();
295
+ module.animate.hide(callback);
296
+ }
297
+ },
298
+
299
+ hideAll: function() {
300
+ $(selector.popup)
301
+ .filter('.' + className.visible)
302
+ .each(function() {
303
+ $(this)
304
+ .data(metadata.activator)
305
+ .popup('hide')
306
+ ;
307
+ })
308
+ ;
309
+ },
310
+
311
+ hideGracefully: function(event) {
312
+ // don't close on clicks inside popup
313
+ if(event && $(event.target).closest(selector.popup).length === 0) {
314
+ module.debug('Click occurred outside popup hiding popup');
315
+ module.hide();
316
+ }
317
+ else {
318
+ module.debug('Click was inside popup, keeping popup open');
319
+ }
320
+ },
321
+
322
+ exists: function() {
323
+ if(!$popup) {
324
+ return false;
325
+ }
326
+ if(settings.inline || settings.popup) {
327
+ return ( module.has.popup() );
328
+ }
329
+ else {
330
+ return ( $popup.closest($context).length >= 1 )
331
+ ? true
332
+ : false
333
+ ;
334
+ }
335
+ },
336
+
337
+ removePopup: function() {
338
+ module.debug('Removing popup', $popup);
339
+ if( module.has.popup() && !settings.popup) {
340
+ $popup.remove();
341
+ $popup = undefined;
342
+ }
343
+ settings.onRemove.call($popup, element);
344
+ },
345
+
346
+ save: {
347
+ conditions: function() {
348
+ module.cache = {
349
+ title: $module.attr('title')
350
+ };
351
+ if (module.cache.title) {
352
+ $module.removeAttr('title');
353
+ }
354
+ module.verbose('Saving original attributes', module.cache.title);
355
+ }
356
+ },
357
+ restore: {
358
+ conditions: function() {
359
+ if(module.cache && module.cache.title) {
360
+ $module.attr('title', module.cache.title);
361
+ module.verbose('Restoring original attributes', module.cache.title);
362
+ }
363
+ return true;
364
+ }
365
+ },
366
+ animate: {
367
+ show: function(callback) {
368
+ callback = $.isFunction(callback) ? callback : function(){};
369
+ if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
370
+ module.set.visible();
371
+ $popup
372
+ .transition({
373
+ animation : settings.transition + ' in',
374
+ queue : false,
375
+ debug : settings.debug,
376
+ verbose : settings.verbose,
377
+ duration : settings.duration,
378
+ onComplete : function() {
379
+ module.bind.close();
380
+ callback.call($popup, element);
381
+ settings.onVisible.call($popup, element);
382
+ }
383
+ })
384
+ ;
385
+ }
386
+ else {
387
+ module.set.visible();
388
+ $popup
389
+ .stop()
390
+ .fadeIn(settings.duration, settings.easing, function() {
391
+ module.bind.close();
392
+ callback.call($popup, element);
393
+ settings.onVisible.call($popup, element);
394
+ })
395
+ ;
396
+ }
397
+ settings.onShow.call($popup, element);
398
+ },
399
+ hide: function(callback) {
400
+ callback = $.isFunction(callback) ? callback : function(){};
401
+ module.debug('Hiding pop-up');
402
+ if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
403
+ $popup
404
+ .transition({
405
+ animation : settings.transition + ' out',
406
+ queue : false,
407
+ duration : settings.duration,
408
+ debug : settings.debug,
409
+ verbose : settings.verbose,
410
+ onComplete : function() {
411
+ module.reset();
412
+ callback.call($popup, element);
413
+ settings.onHidden.call($popup, element);
414
+ }
415
+ })
416
+ ;
417
+ }
418
+ else {
419
+ $popup
420
+ .stop()
421
+ .fadeOut(settings.duration, settings.easing, function() {
422
+ module.reset();
423
+ callback.call($popup, element);
424
+ settings.onHidden.call($popup, element);
425
+ })
426
+ ;
427
+ }
428
+ settings.onHide.call($popup, element);
429
+ }
430
+ },
431
+
432
+ get: {
433
+ id: function() {
434
+ return id;
435
+ },
436
+ startEvent: function() {
437
+ if(settings.on == 'hover') {
438
+ return (hasTouch)
439
+ ? 'touchstart mouseenter'
440
+ : 'mouseenter'
441
+ ;
442
+ }
443
+ else if(settings.on == 'focus') {
444
+ return 'focus';
445
+ }
446
+ return false;
447
+ },
448
+ scrollEvent: function() {
449
+ return (hasTouch)
450
+ ? 'touchmove scroll'
451
+ : 'scroll'
452
+ ;
453
+ },
454
+ endEvent: function() {
455
+ if(settings.on == 'hover') {
456
+ return 'mouseleave';
457
+ }
458
+ else if(settings.on == 'focus') {
459
+ return 'blur';
460
+ }
461
+ return false;
462
+ },
463
+ offsetParent: function($target) {
464
+ var
465
+ element = ($target !== undefined)
466
+ ? $target[0]
467
+ : $module[0],
468
+ parentNode = element.parentNode,
469
+ $node = $(parentNode)
470
+ ;
471
+ if(parentNode) {
472
+ var
473
+ is2D = ($node.css('transform') === 'none'),
474
+ isStatic = ($node.css('position') === 'static'),
475
+ isHTML = $node.is('html')
476
+ ;
477
+ while(parentNode && !isHTML && isStatic && is2D) {
478
+ parentNode = parentNode.parentNode;
479
+ $node = $(parentNode);
480
+ is2D = ($node.css('transform') === 'none');
481
+ isStatic = ($node.css('position') === 'static');
482
+ isHTML = $node.is('html');
483
+ }
484
+ }
485
+ return ($node && $node.length > 0)
486
+ ? $node
487
+ : $()
488
+ ;
489
+ },
490
+ offstagePosition: function(position) {
491
+ var
492
+ boundary = {
493
+ top : $(window).scrollTop(),
494
+ bottom : $(window).scrollTop() + $(window).height(),
495
+ left : 0,
496
+ right : $(window).width()
497
+ },
498
+ popup = {
499
+ width : $popup.width(),
500
+ height : $popup.height(),
501
+ offset : $popup.offset()
502
+ },
503
+ offstage = {},
504
+ offstagePositions = []
505
+ ;
506
+ position = position || false;
507
+ if(popup.offset && position) {
508
+ module.verbose('Checking if outside viewable area', popup.offset);
509
+ offstage = {
510
+ top : (popup.offset.top < boundary.top),
511
+ bottom : (popup.offset.top + popup.height > boundary.bottom),
512
+ right : (popup.offset.left + popup.width > boundary.right),
513
+ left : (popup.offset.left < boundary.left)
514
+ };
515
+ }
516
+ // return only boundaries that have been surpassed
517
+ $.each(offstage, function(direction, isOffstage) {
518
+ if(isOffstage) {
519
+ offstagePositions.push(direction);
520
+ }
521
+ });
522
+ return (offstagePositions.length > 0)
523
+ ? offstagePositions.join(' ')
524
+ : false
525
+ ;
526
+ },
527
+ positions: function() {
528
+ return {
529
+ 'top left' : false,
530
+ 'top center' : false,
531
+ 'top right' : false,
532
+ 'bottom left' : false,
533
+ 'bottom center' : false,
534
+ 'bottom right' : false,
535
+ 'left center' : false,
536
+ 'right center' : false
537
+ };
538
+ },
539
+ nextPosition: function(position) {
540
+ var
541
+ positions = position.split(' '),
542
+ verticalPosition = positions[0],
543
+ horizontalPosition = positions[1],
544
+ opposite = {
545
+ top : 'bottom',
546
+ bottom : 'top',
547
+ left : 'right',
548
+ right : 'left'
549
+ },
550
+ adjacent = {
551
+ left : 'center',
552
+ center : 'right',
553
+ right : 'left'
554
+ },
555
+ backup = {
556
+ 'top left' : 'top center',
557
+ 'top center' : 'top right',
558
+ 'top right' : 'right center',
559
+ 'right center' : 'bottom right',
560
+ 'bottom right' : 'bottom center',
561
+ 'bottom center' : 'bottom left',
562
+ 'bottom left' : 'left center',
563
+ 'left center' : 'top left'
564
+ },
565
+ adjacentsAvailable = (verticalPosition == 'top' || verticalPosition == 'bottom'),
566
+ oppositeTried = false,
567
+ adjacentTried = false,
568
+ nextPosition = false
569
+ ;
570
+ if(!triedPositions) {
571
+ module.verbose('All available positions available');
572
+ triedPositions = module.get.positions();
573
+ }
574
+
575
+ module.debug('Recording last position tried', position);
576
+ triedPositions[position] = true;
577
+
578
+ if(settings.prefer === 'opposite') {
579
+ nextPosition = [opposite[verticalPosition], horizontalPosition];
580
+ nextPosition = nextPosition.join(' ');
581
+ oppositeTried = (triedPositions[nextPosition] === true);
582
+ module.debug('Trying opposite strategy', nextPosition);
583
+ }
584
+ if((settings.prefer === 'adjacent') && adjacentsAvailable ) {
585
+ nextPosition = [verticalPosition, adjacent[horizontalPosition]];
586
+ nextPosition = nextPosition.join(' ');
587
+ adjacentTried = (triedPositions[nextPosition] === true);
588
+ module.debug('Trying adjacent strategy', nextPosition);
589
+ }
590
+ if(adjacentTried || oppositeTried) {
591
+ module.debug('Using backup position', nextPosition);
592
+ nextPosition = backup[position];
593
+ }
594
+ return nextPosition;
595
+ }
596
+ },
597
+
598
+ set: {
599
+ position: function(position, arrowOffset) {
600
+ var
601
+ windowWidth = $(window).width(),
602
+ windowHeight = $(window).height(),
603
+
604
+ targetWidth = $target.outerWidth(),
605
+ targetHeight = $target.outerHeight(),
606
+
607
+ popupWidth = $popup.outerWidth(),
608
+ popupHeight = $popup.outerHeight(),
609
+
610
+ parentWidth = $offsetParent.outerWidth(),
611
+ parentHeight = $offsetParent.outerHeight(),
612
+
613
+ distanceAway = settings.distanceAway,
614
+
615
+ targetElement = $target[0],
616
+
617
+ marginTop = (settings.inline)
618
+ ? parseInt( window.getComputedStyle(targetElement).getPropertyValue('margin-top'), 10)
619
+ : 0,
620
+ marginLeft = (settings.inline)
621
+ ? parseInt( window.getComputedStyle(targetElement).getPropertyValue(module.is.rtl() ? 'margin-right' : 'margin-left'), 10)
622
+ : 0,
623
+
624
+ target = (settings.inline || settings.popup)
625
+ ? $target.position()
626
+ : $target.offset(),
627
+
628
+ computedPosition,
629
+ positioning,
630
+ offstagePosition
631
+ ;
632
+ position = position || $module.data(metadata.position) || settings.position;
633
+ arrowOffset = arrowOffset || $module.data(metadata.offset) || settings.offset;
634
+
635
+ if(searchDepth == settings.maxSearchDepth && settings.lastResort) {
636
+ module.debug('Using last resort position to display', settings.lastResort);
637
+ position = settings.lastResort;
638
+ }
639
+
640
+ if(settings.inline) {
641
+ module.debug('Adding targets margin to calculation');
642
+ if(position == 'left center' || position == 'right center') {
643
+ arrowOffset += marginTop;
644
+ distanceAway += -marginLeft;
645
+ }
646
+ else if (position == 'top left' || position == 'top center' || position == 'top right') {
647
+ arrowOffset += marginLeft;
648
+ distanceAway -= marginTop;
649
+ }
650
+ else {
651
+ arrowOffset += marginLeft;
652
+ distanceAway += marginTop;
653
+ }
654
+ }
655
+ module.debug('Calculating popup positioning', position);
656
+
657
+ computedPosition = position;
658
+ if (module.is.rtl()) {
659
+ computedPosition = computedPosition.replace(/left|right/g, function (match) {
660
+ return (match == 'left')
661
+ ? 'right'
662
+ : 'left'
663
+ ;
664
+ });
665
+ module.debug('RTL: Popup positioning updated', computedPosition);
666
+ }
667
+ switch (computedPosition) {
668
+ case 'top left':
669
+ positioning = {
670
+ top : 'auto',
671
+ bottom : parentHeight - target.top + distanceAway,
672
+ left : target.left + arrowOffset,
673
+ right : 'auto'
674
+ };
675
+ break;
676
+ case 'top center':
677
+ positioning = {
678
+ bottom : parentHeight - target.top + distanceAway,
679
+ left : target.left + (targetWidth / 2) - (popupWidth / 2) + arrowOffset,
680
+ top : 'auto',
681
+ right : 'auto'
682
+ };
683
+ break;
684
+ case 'top right':
685
+ positioning = {
686
+ bottom : parentHeight - target.top + distanceAway,
687
+ right : parentWidth - target.left - targetWidth - arrowOffset,
688
+ top : 'auto',
689
+ left : 'auto'
690
+ };
691
+ break;
692
+ case 'left center':
693
+ positioning = {
694
+ top : target.top + (targetHeight / 2) - (popupHeight / 2) + arrowOffset,
695
+ right : parentWidth - target.left + distanceAway,
696
+ left : 'auto',
697
+ bottom : 'auto'
698
+ };
699
+ break;
700
+ case 'right center':
701
+ positioning = {
702
+ top : target.top + (targetHeight / 2) - (popupHeight / 2) + arrowOffset,
703
+ left : target.left + targetWidth + distanceAway,
704
+ bottom : 'auto',
705
+ right : 'auto'
706
+ };
707
+ break;
708
+ case 'bottom left':
709
+ positioning = {
710
+ top : target.top + targetHeight + distanceAway,
711
+ left : target.left + arrowOffset,
712
+ bottom : 'auto',
713
+ right : 'auto'
714
+ };
715
+ break;
716
+ case 'bottom center':
717
+ positioning = {
718
+ top : target.top + targetHeight + distanceAway,
719
+ left : target.left + (targetWidth / 2) - (popupWidth / 2) + arrowOffset,
720
+ bottom : 'auto',
721
+ right : 'auto'
722
+ };
723
+ break;
724
+ case 'bottom right':
725
+ positioning = {
726
+ top : target.top + targetHeight + distanceAway,
727
+ right : parentWidth - target.left - targetWidth - arrowOffset,
728
+ left : 'auto',
729
+ bottom : 'auto'
730
+ };
731
+ break;
732
+ }
733
+ if(positioning === undefined) {
734
+ module.error(error.invalidPosition, position);
735
+ }
736
+
737
+ module.debug('Calculated popup positioning values', positioning);
738
+
739
+ // tentatively place on stage
740
+ $popup
741
+ .css(positioning)
742
+ .removeClass(className.position)
743
+ .addClass(position)
744
+ .addClass(className.loading)
745
+ ;
746
+ // check if is offstage
747
+ offstagePosition = module.get.offstagePosition(position);
748
+
749
+ // recursively find new positioning
750
+ if(offstagePosition) {
751
+ module.debug('Popup cant fit into viewport', offstagePosition);
752
+ if(searchDepth < settings.maxSearchDepth) {
753
+ searchDepth++;
754
+ position = module.get.nextPosition(position);
755
+ module.debug('Trying new position', position);
756
+ return ($popup)
757
+ ? module.set.position(position)
758
+ : false
759
+ ;
760
+ }
761
+ else if(!settings.lastResort) {
762
+ module.debug('Popup could not find a position in view', $popup);
763
+ module.error(error.cannotPlace, element);
764
+ module.remove.attempts();
765
+ module.remove.loading();
766
+ module.reset();
767
+ return false;
768
+ }
769
+ }
770
+
771
+ module.debug('Position is on stage', position);
772
+ module.remove.attempts();
773
+ module.set.fluidWidth();
774
+ module.remove.loading();
775
+ return true;
776
+ },
777
+
778
+ fluidWidth: function() {
779
+ if( settings.setFluidWidth && $popup.hasClass(className.fluid) ) {
780
+ $popup.css('width', $offsetParent.width());
781
+ }
782
+ },
783
+
784
+ visible: function() {
785
+ $module.addClass(className.visible);
786
+ }
787
+ },
788
+
789
+ remove: {
790
+ loading: function() {
791
+ $popup.removeClass(className.loading);
792
+ },
793
+ visible: function() {
794
+ $module.removeClass(className.visible);
795
+ },
796
+ attempts: function() {
797
+ module.verbose('Resetting all searched positions');
798
+ searchDepth = 0;
799
+ triedPositions = false;
800
+ }
801
+ },
802
+
803
+ bind: {
804
+ events: function() {
805
+ module.debug('Binding popup events to module');
806
+ if(settings.on == 'click') {
807
+ $module
808
+ .on('click' + eventNamespace, module.toggle)
809
+ ;
810
+ }
811
+ else if( module.get.startEvent() ) {
812
+ $module
813
+ .on(module.get.startEvent() + eventNamespace, module.event.start)
814
+ .on(module.get.endEvent() + eventNamespace, module.event.end)
815
+ ;
816
+ }
817
+ if(settings.target) {
818
+ module.debug('Target set to element', $target);
819
+ }
820
+ $window.on('resize' + elementNamespace, module.event.resize);
821
+ },
822
+ popup: function() {
823
+ module.verbose('Allowing hover events on popup to prevent closing');
824
+ if( $popup && module.has.popup() ) {
825
+ $popup
826
+ .on('mouseenter' + eventNamespace, module.event.start)
827
+ .on('mouseleave' + eventNamespace, module.event.end)
828
+ ;
829
+ }
830
+ },
831
+ close:function() {
832
+ if(settings.hideOnScroll === true || settings.hideOnScroll == 'auto' && settings.on != 'click') {
833
+ $document
834
+ .one(module.get.scrollEvent() + elementNamespace, module.hideGracefully)
835
+ ;
836
+ $context
837
+ .one(module.get.scrollEvent() + elementNamespace, module.hideGracefully)
838
+ ;
839
+ }
840
+ if(settings.on == 'click' && settings.closable) {
841
+ module.verbose('Binding popup close event to document');
842
+ $document
843
+ .on('click' + elementNamespace, function(event) {
844
+ module.verbose('Pop-up clickaway intent detected');
845
+ module.hideGracefully.call(element, event);
846
+ })
847
+ ;
848
+ }
849
+ }
850
+ },
851
+
852
+ unbind: {
853
+ close: function() {
854
+ if(settings.hideOnScroll === true || settings.hideOnScroll == 'auto' && settings.on != 'click') {
855
+ $document
856
+ .off('scroll' + elementNamespace, module.hide)
857
+ ;
858
+ $context
859
+ .off('scroll' + elementNamespace, module.hide)
860
+ ;
861
+ }
862
+ if(settings.on == 'click' && settings.closable) {
863
+ module.verbose('Removing close event from document');
864
+ $document
865
+ .off('click' + elementNamespace)
866
+ ;
867
+ }
868
+ }
869
+ },
870
+
871
+ has: {
872
+ popup: function() {
873
+ return ($popup && $popup.length > 0);
874
+ }
875
+ },
876
+
877
+ is: {
878
+ active: function() {
879
+ return $module.hasClass(className.active);
880
+ },
881
+ animating: function() {
882
+ return ( $popup && $popup.is(':animated') || $popup.hasClass(className.animating) );
883
+ },
884
+ visible: function() {
885
+ return $popup && $popup.is(':visible');
886
+ },
887
+ dropdown: function() {
888
+ return $module.hasClass(className.dropdown);
889
+ },
890
+ hidden: function() {
891
+ return !module.is.visible();
892
+ },
893
+ rtl: function () {
894
+ return $module.css('direction') == 'rtl';
895
+ }
896
+ },
897
+
898
+ reset: function() {
899
+ module.remove.visible();
900
+ if(settings.preserve) {
901
+ if($.fn.transition !== undefined) {
902
+ $popup
903
+ .transition('remove transition')
904
+ ;
905
+ }
906
+ }
907
+ else {
908
+ module.removePopup();
909
+ }
910
+ },
911
+
912
+ setting: function(name, value) {
913
+ if( $.isPlainObject(name) ) {
914
+ $.extend(true, settings, name);
915
+ }
916
+ else if(value !== undefined) {
917
+ settings[name] = value;
918
+ }
919
+ else {
920
+ return settings[name];
921
+ }
922
+ },
923
+ internal: function(name, value) {
924
+ if( $.isPlainObject(name) ) {
925
+ $.extend(true, module, name);
926
+ }
927
+ else if(value !== undefined) {
928
+ module[name] = value;
929
+ }
930
+ else {
931
+ return module[name];
932
+ }
933
+ },
934
+ debug: function() {
935
+ if(settings.debug) {
936
+ if(settings.performance) {
937
+ module.performance.log(arguments);
938
+ }
939
+ else {
940
+ module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');
941
+ module.debug.apply(console, arguments);
942
+ }
943
+ }
944
+ },
945
+ verbose: function() {
946
+ if(settings.verbose && settings.debug) {
947
+ if(settings.performance) {
948
+ module.performance.log(arguments);
949
+ }
950
+ else {
951
+ module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');
952
+ module.verbose.apply(console, arguments);
953
+ }
954
+ }
955
+ },
956
+ error: function() {
957
+ module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
958
+ module.error.apply(console, arguments);
959
+ },
960
+ performance: {
961
+ log: function(message) {
962
+ var
963
+ currentTime,
964
+ executionTime,
965
+ previousTime
966
+ ;
967
+ if(settings.performance) {
968
+ currentTime = new Date().getTime();
969
+ previousTime = time || currentTime;
970
+ executionTime = currentTime - previousTime;
971
+ time = currentTime;
972
+ performance.push({
973
+ 'Name' : message[0],
974
+ 'Arguments' : [].slice.call(message, 1) || '',
975
+ 'Element' : element,
976
+ 'Execution Time' : executionTime
977
+ });
978
+ }
979
+ clearTimeout(module.performance.timer);
980
+ module.performance.timer = setTimeout(module.performance.display, 100);
981
+ },
982
+ display: function() {
983
+ var
984
+ title = settings.name + ':',
985
+ totalTime = 0
986
+ ;
987
+ time = false;
988
+ clearTimeout(module.performance.timer);
989
+ $.each(performance, function(index, data) {
990
+ totalTime += data['Execution Time'];
991
+ });
992
+ title += ' ' + totalTime + 'ms';
993
+ if(moduleSelector) {
994
+ title += ' \'' + moduleSelector + '\'';
995
+ }
996
+ if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
997
+ console.groupCollapsed(title);
998
+ if(console.table) {
999
+ console.table(performance);
1000
+ }
1001
+ else {
1002
+ $.each(performance, function(index, data) {
1003
+ console.log(data['Name'] + ': ' + data['Execution Time']+'ms');
1004
+ });
1005
+ }
1006
+ console.groupEnd();
1007
+ }
1008
+ performance = [];
1009
+ }
1010
+ },
1011
+ invoke: function(query, passedArguments, context) {
1012
+ var
1013
+ object = instance,
1014
+ maxDepth,
1015
+ found,
1016
+ response
1017
+ ;
1018
+ passedArguments = passedArguments || queryArguments;
1019
+ context = element || context;
1020
+ if(typeof query == 'string' && object !== undefined) {
1021
+ query = query.split(/[\. ]/);
1022
+ maxDepth = query.length - 1;
1023
+ $.each(query, function(depth, value) {
1024
+ var camelCaseValue = (depth != maxDepth)
1025
+ ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
1026
+ : query
1027
+ ;
1028
+ if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {
1029
+ object = object[camelCaseValue];
1030
+ }
1031
+ else if( object[camelCaseValue] !== undefined ) {
1032
+ found = object[camelCaseValue];
1033
+ return false;
1034
+ }
1035
+ else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {
1036
+ object = object[value];
1037
+ }
1038
+ else if( object[value] !== undefined ) {
1039
+ found = object[value];
1040
+ return false;
1041
+ }
1042
+ else {
1043
+ return false;
1044
+ }
1045
+ });
1046
+ }
1047
+ if ( $.isFunction( found ) ) {
1048
+ response = found.apply(context, passedArguments);
1049
+ }
1050
+ else if(found !== undefined) {
1051
+ response = found;
1052
+ }
1053
+ if($.isArray(returnedValue)) {
1054
+ returnedValue.push(response);
1055
+ }
1056
+ else if(returnedValue !== undefined) {
1057
+ returnedValue = [returnedValue, response];
1058
+ }
1059
+ else if(response !== undefined) {
1060
+ returnedValue = response;
1061
+ }
1062
+ return found;
1063
+ }
1064
+ };
1065
+
1066
+ if(methodInvoked) {
1067
+ if(instance === undefined) {
1068
+ module.initialize();
1069
+ }
1070
+ module.invoke(query);
1071
+ }
1072
+ else {
1073
+ if(instance !== undefined) {
1074
+ instance.invoke('destroy');
1075
+ }
1076
+ module.initialize();
1077
+ }
1078
+ })
1079
+ ;
1080
+
1081
+ return (returnedValue !== undefined)
1082
+ ? returnedValue
1083
+ : this
1084
+ ;
1085
+ };
1086
+
1087
+ $.fn.popup.settings = {
1088
+
1089
+ name : 'Popup',
1090
+
1091
+ debug : false,
1092
+ verbose : true,
1093
+ performance : true,
1094
+ namespace : 'popup',
1095
+
1096
+ onCreate : function(){},
1097
+ onRemove : function(){},
1098
+
1099
+ onShow : function(){},
1100
+ onVisible : function(){},
1101
+ onHide : function(){},
1102
+ onHidden : function(){},
1103
+
1104
+ variation : '',
1105
+ content : false,
1106
+ html : false,
1107
+ title : false,
1108
+
1109
+ on : 'hover',
1110
+ closable : true,
1111
+ hideOnScroll : 'auto',
1112
+ exclusive : true,
1113
+
1114
+ context : 'body',
1115
+
1116
+ position : 'top left',
1117
+ prefer : 'opposite',
1118
+ lastResort : false,
1119
+
1120
+ delay : {
1121
+ show : 30,
1122
+ hide : 0
1123
+ },
1124
+
1125
+ setFluidWidth : true,
1126
+ movePopup : true,
1127
+
1128
+ target : false,
1129
+ popup : false,
1130
+ inline : false,
1131
+ preserve : false,
1132
+ hoverable : false,
1133
+
1134
+ duration : 200,
1135
+ easing : 'easeOutQuint',
1136
+ transition : 'scale',
1137
+
1138
+ distanceAway : 0,
1139
+ offset : 0,
1140
+ maxSearchDepth : 20,
1141
+
1142
+ error: {
1143
+ invalidPosition : 'The position you specified is not a valid position',
1144
+ cannotPlace : 'No visible position could be found for the popup',
1145
+ method : 'The method you called is not defined.'
1146
+ },
1147
+
1148
+ metadata: {
1149
+ activator : 'activator',
1150
+ content : 'content',
1151
+ html : 'html',
1152
+ offset : 'offset',
1153
+ position : 'position',
1154
+ title : 'title',
1155
+ variation : 'variation'
1156
+ },
1157
+
1158
+ className : {
1159
+ active : 'active',
1160
+ animating : 'animating',
1161
+ dropdown : 'dropdown',
1162
+ fluid : 'fluid',
1163
+ loading : 'loading',
1164
+ popup : 'ui popup',
1165
+ position : 'top left center bottom right',
1166
+ visible : 'visible'
1167
+ },
1168
+
1169
+ selector : {
1170
+ popup : '.ui.popup'
1171
+ },
1172
+
1173
+ templates: {
1174
+ escape: function(string) {
1175
+ var
1176
+ badChars = /[&<>"'`]/g,
1177
+ shouldEscape = /[&<>"'`]/,
1178
+ escape = {
1179
+ "&": "&amp;",
1180
+ "<": "&lt;",
1181
+ ">": "&gt;",
1182
+ '"': "&quot;",
1183
+ "'": "&#x27;",
1184
+ "`": "&#x60;"
1185
+ },
1186
+ escapedChar = function(chr) {
1187
+ return escape[chr];
1188
+ }
1189
+ ;
1190
+ if(shouldEscape.test(string)) {
1191
+ return string.replace(badChars, escapedChar);
1192
+ }
1193
+ return string;
1194
+ },
1195
+ popup: function(text) {
1196
+ var
1197
+ html = '',
1198
+ escape = $.fn.popup.settings.templates.escape
1199
+ ;
1200
+ if(typeof text !== undefined) {
1201
+ if(typeof text.title !== undefined && text.title) {
1202
+ text.title = escape(text.title);
1203
+ html += '<div class="header">' + text.title + '</div>';
1204
+ }
1205
+ if(typeof text.content !== undefined && text.content) {
1206
+ text.content = escape(text.content);
1207
+ html += '<div class="content">' + text.content + '</div>';
1208
+ }
1209
+ }
1210
+ return html;
1211
+ }
1212
+ }
1213
+
1214
+ };
1215
+
1216
+ // Adds easing
1217
+ $.extend( $.easing, {
1218
+ easeOutQuad: function (x, t, b, c, d) {
1219
+ return -c *(t/=d)*(t-2) + b;
1220
+ }
1221
+ });
1222
+
1223
+
1224
+ })( jQuery, window , document );