padma-assets 0.1.32 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/app/abilities/general_ability.rb +2 -1
  3. data/app/assets/javascripts/bootstrap-multiselect.js +1401 -0
  4. data/app/assets/javascripts/bootstrap.min.js +12 -0
  5. data/app/assets/javascripts/jquery-2.1.4.min.js +4 -0
  6. data/app/assets/javascripts/jquery-iframe-transport.js +156 -0
  7. data/app/assets/javascripts/jquery-tmpl-min.js +1 -0
  8. data/app/assets/javascripts/jquery.common.js +12 -0
  9. data/app/assets/javascripts/jquery.iframe-transport.js +156 -0
  10. data/app/assets/javascripts/jquery.postmessage-transport.js +108 -0
  11. data/app/assets/javascripts/jquery.rest_in_place.js +233 -0
  12. data/app/assets/javascripts/jquery.stickyheader.js +7 -5
  13. data/app/assets/javascripts/jquery.tipsy.js +243 -0
  14. data/app/assets/javascripts/jquery.xdr-transport.js +76 -0
  15. data/app/assets/javascripts/padma-assets.js +14 -2
  16. data/app/assets/stylesheets/bootstrap-multiselect.css +1 -0
  17. data/app/assets/stylesheets/common/custom.scss +1611 -0
  18. data/app/assets/stylesheets/common/ui.css.scss +488 -0
  19. data/app/assets/stylesheets/common/variables.scss +68 -0
  20. data/app/assets/stylesheets/custom/colors.css.scss +13 -0
  21. data/app/assets/stylesheets/custom/form.css.scss +37 -0
  22. data/app/assets/stylesheets/custom/tabs.scss +7 -0
  23. data/app/assets/stylesheets/header.css.erb +8 -148
  24. data/app/assets/stylesheets/header.scss +364 -0
  25. data/app/assets/stylesheets/layout_application.css +0 -5
  26. data/app/assets/stylesheets/layout_users.css +29 -28
  27. data/app/assets/stylesheets/pm-modal.scss +15 -9
  28. data/app/views/layouts/_header.html.erb +24 -20
  29. data/app/views/layouts/_lists_list.html.erb +39 -25
  30. data/app/views/layouts/_module_box.html.erb +70 -58
  31. metadata +21 -7
  32. data/app/assets/stylesheets/button.css.scss +0 -344
  33. data/app/assets/stylesheets/padma-accounts.scss +0 -3
  34. data/app/assets/stylesheets/reset.css +0 -102
  35. data/app/assets/stylesheets/tables.css.scss +0 -154
  36. data/app/views/layouts/_alpha_lists_list.html.erb +0 -46
@@ -0,0 +1,243 @@
1
+ // tipsy, facebook style tooltips for jquery
2
+ // version 1.0.0a
3
+ // (c) 2008-2010 jason frame [jason@onehackoranother.com]
4
+ // released under the MIT license
5
+
6
+ (function($) {
7
+
8
+ function maybeCall(thing, ctx) {
9
+ return (typeof thing == 'function') ? (thing.call(ctx)) : thing;
10
+ };
11
+
12
+ function Tipsy(element, options) {
13
+ this.$element = $(element);
14
+ this.options = options;
15
+ this.enabled = true;
16
+ this.fixTitle();
17
+ };
18
+
19
+ Tipsy.prototype = {
20
+ show: function() {
21
+ var title = this.getTitle();
22
+ if (title && this.enabled) {
23
+ var $tip = this.tip();
24
+
25
+ $tip.find('.tipsy-inner')[this.options.html ? 'html' : 'text'](title);
26
+ $tip[0].className = 'tipsy'; // reset classname in case of dynamic gravity
27
+ $tip.remove().css({top: 0, left: 0, visibility: 'hidden', display: 'block'}).prependTo(document.body);
28
+
29
+ var pos = $.extend({}, this.$element.offset(), {
30
+ width: this.$element[0].offsetWidth,
31
+ height: this.$element[0].offsetHeight
32
+ });
33
+
34
+ var actualWidth = $tip[0].offsetWidth,
35
+ actualHeight = $tip[0].offsetHeight,
36
+ gravity = maybeCall(this.options.gravity, this.$element[0]);
37
+
38
+ var tp;
39
+ switch (gravity.charAt(0)) {
40
+ case 'n':
41
+ tp = {top: pos.top + pos.height + this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2};
42
+ break;
43
+ case 's':
44
+ tp = {top: pos.top - actualHeight - this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2};
45
+ break;
46
+ case 'e':
47
+ tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth - this.options.offset};
48
+ break;
49
+ case 'w':
50
+ tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width + this.options.offset};
51
+ break;
52
+ }
53
+
54
+ if (gravity.length == 2) {
55
+ if (gravity.charAt(1) == 'w') {
56
+ tp.left = pos.left + pos.width / 2 - 15;
57
+ } else {
58
+ tp.left = pos.left + pos.width / 2 - actualWidth + 15;
59
+ }
60
+ }
61
+
62
+ $tip.css(tp).addClass('tipsy-' + gravity);
63
+ $tip.find('.tipsy-arrow')[0].className = 'tipsy-arrow tipsy-arrow-' + gravity.charAt(0);
64
+ if (this.options.className) {
65
+ $tip.addClass(maybeCall(this.options.className, this.$element[0]));
66
+ }
67
+
68
+ if (this.options.fade) {
69
+ $tip.stop().css({opacity: 0, display: 'block', visibility: 'visible'}).animate({opacity: this.options.opacity});
70
+ } else {
71
+ $tip.css({visibility: 'visible', opacity: this.options.opacity});
72
+ }
73
+ }
74
+ },
75
+
76
+ hide: function() {
77
+ if (this.options.fade) {
78
+ this.tip().stop().fadeOut(function() { $(this).remove(); });
79
+ } else {
80
+ this.tip().remove();
81
+ }
82
+ },
83
+
84
+ fixTitle: function() {
85
+ var $e = this.$element;
86
+ if ($e.attr('title') || typeof($e.attr('original-title')) != 'string') {
87
+ $e.attr('original-title', $e.attr('title') || '').removeAttr('title');
88
+ }
89
+ },
90
+
91
+ getTitle: function() {
92
+ var title, $e = this.$element, o = this.options;
93
+ this.fixTitle();
94
+ var title, o = this.options;
95
+ if (typeof o.title == 'string') {
96
+ title = $e.attr(o.title == 'title' ? 'original-title' : o.title);
97
+ } else if (typeof o.title == 'function') {
98
+ title = o.title.call($e[0]);
99
+ }
100
+ title = ('' + title).replace(/(^\s*|\s*$)/, "");
101
+ return title || o.fallback;
102
+ },
103
+
104
+ tip: function() {
105
+ if (!this.$tip) {
106
+ this.$tip = $('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"></div>');
107
+ }
108
+ return this.$tip;
109
+ },
110
+
111
+ validate: function() {
112
+ if (!this.$element[0].parentNode) {
113
+ this.hide();
114
+ this.$element = null;
115
+ this.options = null;
116
+ }
117
+ },
118
+
119
+ enable: function() { this.enabled = true; },
120
+ disable: function() { this.enabled = false; },
121
+ toggleEnabled: function() { this.enabled = !this.enabled; }
122
+ };
123
+
124
+ $.fn.tipsy = function(options) {
125
+
126
+ if (options === true) {
127
+ return this.data('tipsy');
128
+ } else if (typeof options == 'string') {
129
+ var tipsy = this.data('tipsy');
130
+ if (tipsy) tipsy[options]();
131
+ return this;
132
+ }
133
+
134
+ options = $.extend({}, $.fn.tipsy.defaults, options);
135
+
136
+ function get(ele) {
137
+ var tipsy = $.data(ele, 'tipsy');
138
+ if (!tipsy) {
139
+ tipsy = new Tipsy(ele, $.fn.tipsy.elementOptions(ele, options));
140
+ $.data(ele, 'tipsy', tipsy);
141
+ }
142
+ return tipsy;
143
+ }
144
+
145
+ function enter() {
146
+ var tipsy = get(this);
147
+ tipsy.hoverState = 'in';
148
+ if (options.delayIn == 0) {
149
+ tipsy.show();
150
+ } else {
151
+ tipsy.fixTitle();
152
+ setTimeout(function() { if (tipsy.hoverState == 'in') tipsy.show(); }, options.delayIn);
153
+ }
154
+ };
155
+
156
+ function leave() {
157
+ var tipsy = get(this);
158
+ tipsy.hoverState = 'out';
159
+ if (options.delayOut == 0) {
160
+ tipsy.hide();
161
+ } else {
162
+ setTimeout(function() { if (tipsy.hoverState == 'out') tipsy.hide(); }, options.delayOut);
163
+ }
164
+ };
165
+
166
+ if (!options.live) this.each(function() { get(this); });
167
+
168
+ if (options.trigger != 'manual') {
169
+ var eventIn = options.trigger == 'hover' ? 'mouseenter' : 'focus',
170
+ eventOut = options.trigger == 'hover' ? 'mouseleave' : 'blur';
171
+ if (options.live)
172
+ $(document).on(eventIn, this.selector, enter).on(eventOut, this.selector, leave);
173
+ else
174
+ this.bind(eventIn, enter).bind(eventOut, leave);
175
+ }
176
+
177
+ return this;
178
+
179
+ };
180
+
181
+ $.fn.tipsy.defaults = {
182
+ className: null,
183
+ delayIn: 0,
184
+ delayOut: 0,
185
+ fade: false,
186
+ fallback: '',
187
+ gravity: 'n',
188
+ html: false,
189
+ live: false,
190
+ offset: 0,
191
+ opacity: 0.8,
192
+ title: 'title',
193
+ trigger: 'hover'
194
+ };
195
+
196
+ // Overwrite this method to provide options on a per-element basis.
197
+ // For example, you could store the gravity in a 'tipsy-gravity' attribute:
198
+ // return $.extend({}, options, {gravity: $(ele).attr('tipsy-gravity') || 'n' });
199
+ // (remember - do not modify 'options' in place!)
200
+ $.fn.tipsy.elementOptions = function(ele, options) {
201
+ return $.metadata ? $.extend({}, options, $(ele).metadata()) : options;
202
+ };
203
+
204
+ $.fn.tipsy.autoNS = function() {
205
+ return $(this).offset().top > ($(document).scrollTop() + $(window).height() / 2) ? 's' : 'n';
206
+ };
207
+
208
+ $.fn.tipsy.autoWE = function() {
209
+ return $(this).offset().left > ($(document).scrollLeft() + $(window).width() / 2) ? 'e' : 'w';
210
+ };
211
+
212
+ /**
213
+ * yields a closure of the supplied parameters, producing a function that takes
214
+ * no arguments and is suitable for use as an autogravity function like so:
215
+ *
216
+ * @param margin (int) - distance from the viewable region edge that an
217
+ * element should be before setting its tooltip's gravity to be away
218
+ * from that edge.
219
+ * @param prefer (string, e.g. 'n', 'sw', 'w') - the direction to prefer
220
+ * if there are no viewable region edges effecting the tooltip's
221
+ * gravity. It will try to vary from this minimally, for example,
222
+ * if 'sw' is preferred and an element is near the right viewable
223
+ * region edge, but not the top edge, it will set the gravity for
224
+ * that element's tooltip to be 'se', preserving the southern
225
+ * component.
226
+ */
227
+ $.fn.tipsy.autoBounds = function(margin, prefer) {
228
+ return function() {
229
+ var dir = {ns: prefer[0], ew: (prefer.length > 1 ? prefer[1] : false)},
230
+ boundTop = $(document).scrollTop() + margin,
231
+ boundLeft = $(document).scrollLeft() + margin,
232
+ $this = $(this);
233
+
234
+ if ($this.offset().top < boundTop) dir.ns = 'n';
235
+ if ($this.offset().left < boundLeft) dir.ew = 'w';
236
+ if ($(window).width() + $(document).scrollLeft() - $this.offset().left < margin) dir.ew = 'e';
237
+ if ($(window).height() + $(document).scrollTop() - $this.offset().top < margin) dir.ns = 's';
238
+
239
+ return dir.ns + (dir.ew ? dir.ew : '');
240
+ }
241
+ };
242
+
243
+ })(jQuery);
@@ -0,0 +1,76 @@
1
+ /*
2
+ * jQuery XDomainRequest Transport Plugin 1.0.1
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://creativecommons.org/licenses/MIT/
10
+ *
11
+ * Based on Julian Aubourg's ajaxHooks xdr.js:
12
+ * https://github.com/jaubourg/ajaxHooks/
13
+ */
14
+
15
+ /*jslint unparam: true */
16
+ /*global jQuery, window, XDomainRequest */
17
+
18
+ (function ($) {
19
+ 'use strict';
20
+ if (window.XDomainRequest) {
21
+ jQuery.ajaxTransport(function (s) {
22
+ if (s.crossDomain && s.async) {
23
+ if (s.timeout) {
24
+ s.xdrTimeout = s.timeout;
25
+ delete s.timeout;
26
+ }
27
+ var xdr;
28
+ return {
29
+ send: function (headers, completeCallback) {
30
+ function callback(status, statusText, responses, responseHeaders) {
31
+ xdr.onload = xdr.onerror = xdr.ontimeout = jQuery.noop;
32
+ xdr = null;
33
+ completeCallback(status, statusText, responses, responseHeaders);
34
+ }
35
+ xdr = new XDomainRequest();
36
+ // XDomainRequest only supports GET and POST:
37
+ if (s.type === 'DELETE') {
38
+ s.url = s.url + (/\?/.test(s.url) ? '&' : '?') +
39
+ '_method=DELETE';
40
+ s.type = 'POST';
41
+ } else if (s.type === 'PUT') {
42
+ s.url = s.url + (/\?/.test(s.url) ? '&' : '?') +
43
+ '_method=PUT';
44
+ s.type = 'POST';
45
+ }
46
+ xdr.open(s.type, s.url);
47
+ xdr.onload = function () {
48
+ callback(
49
+ 200,
50
+ 'OK',
51
+ {text: xdr.responseText},
52
+ 'Content-Type: ' + xdr.contentType
53
+ );
54
+ };
55
+ xdr.onerror = function () {
56
+ callback(404, 'Not Found');
57
+ };
58
+ if (s.xdrTimeout) {
59
+ xdr.ontimeout = function () {
60
+ callback(0, 'timeout');
61
+ };
62
+ xdr.timeout = s.xdrTimeout;
63
+ }
64
+ xdr.send((s.hasContent && s.data) || null);
65
+ },
66
+ abort: function () {
67
+ if (xdr) {
68
+ xdr.onerror = jQuery.noop();
69
+ xdr.abort();
70
+ }
71
+ }
72
+ };
73
+ }
74
+ });
75
+ }
76
+ }(jQuery));
@@ -1,8 +1,20 @@
1
- //= require jquery.gritter.min
1
+ //= require jquery-2.1.4.min
2
+ //= require bootstrap.min
3
+ //= require jquery.common
2
4
  //= require jquery.ba-throttle-debounce.min
5
+ //= require jquery.gritter.min
6
+ //= require jquery-iframe-transport
7
+ //= require jquery-tmpl-min
8
+ //= require jquery.postmessage-transport
9
+ //= require jquery.rest_in_place
10
+ //= require jquery.stickyheader
11
+ //= require jquery.tipsy
12
+ //= require jquery.xdr-transport
3
13
  //= require jquery.quickfilter
14
+ //= require mixpanel
4
15
  //= require notifications
16
+ //= require ux-events
5
17
  //= require cache
6
18
  //= require async_render
7
19
  //= require initialize-lists-menu
8
- //= require_tree
20
+ //= require bootstrap-multiselect
@@ -0,0 +1 @@
1
+ .multiselect-container{position:absolute;list-style-type:none;margin:0;padding:0}.multiselect-container .input-group{margin:5px}.multiselect-container>li{padding:0}.multiselect-container>li>a.multiselect-all label{font-weight:700}.multiselect-container>li.multiselect-group label{margin:0;padding:3px 20px 3px 20px;height:100%;font-weight:700}.multiselect-container>li.multiselect-group-clickable label{cursor:pointer}.multiselect-container>li>a{padding:0}.multiselect-container>li>a>label{margin:0;height:100%;cursor:pointer;font-weight:400;padding:3px 20px 3px 40px}.multiselect-container>li>a>label.radio,.multiselect-container>li>a>label.checkbox{margin:0}.multiselect-container>li>a>label>input[type=checkbox]{margin-bottom:5px}.btn-group>.btn-group:nth-child(2)>.multiselect.btn{border-top-left-radius:4px;border-bottom-left-radius:4px}.form-inline .multiselect-container label.checkbox,.form-inline .multiselect-container label.radio{padding:3px 20px 3px 40px}.form-inline .multiselect-container li a label.checkbox input[type=checkbox],.form-inline .multiselect-container li a label.radio input[type=radio]{margin-left:-20px;margin-right:0}