corn_js 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,172 @@
1
+ var exports = window.exports || {};
2
+
3
+ (function (exports) {
4
+
5
+ var Popcorn = exports.Popcorn = function ($element, defaults) {
6
+ this.$element = $element;
7
+ this.$anchor = this.$element;
8
+ this.defaults = defaults;
9
+ };
10
+
11
+ Popcorn.prototype.decorateContainerWithHtml = function () {
12
+ if (this.positionType) { throw "inferPositionType must be called after decorateContainerWithHtml"; }
13
+
14
+ this.containerOf().hide().addClass('popcorn');
15
+
16
+ if (!this.containerOf().find('.popcorn-body').length) {
17
+ this.containerOf().contents().wrap("<div class='popcorn-body'/>");
18
+ }
19
+ this.containerOf().append("<div class='popcorn-tail'></div>");
20
+ };
21
+
22
+ Popcorn.prototype.inferPositionType = function () {
23
+ var self = this;
24
+ this.$anchor = this.$element;
25
+
26
+ function _createPositionType() {
27
+ if (self.$element.offset().left < 1) { self.$anchor = self.$element.parent(); }
28
+
29
+ if (self.collideLeft()) { return new LeftPosition(self); }
30
+ else if (self.collideRight()) { return new RightPosition(self); }
31
+ return new CenterPosition(self);
32
+ }
33
+
34
+ self.positionType = _createPositionType();
35
+ };
36
+
37
+ Popcorn.prototype.decorateContainerWithArrow = function () {
38
+ if (this.positionType == undefined) {
39
+ throw "inferPositionType must be called in order to set up the arrows";
40
+ }
41
+ this.containerOf().find('.popcorn-tail').css('left', this.positionType.leftOffset());
42
+ };
43
+
44
+ var LeftPosition = function (popcorn) {
45
+ // TODO centrare la freccia sull'elemento puntato da fatpopcorn
46
+ // this.leftOffset = function() {return popcorn.$element.offset().left + (popcorn.$element.width() - popcorn.defaults.arrowWidth) / 2; }
47
+ this.leftOffset = function () { return popcorn.defaults.marginArrow; };
48
+ this.left = function () { return popcorn.defaults.marginBorder; };
49
+ this.top = function () { return popcorn.$anchor.offset().top + popcorn.defaults.verticalOffsetFromElement; };
50
+ };
51
+
52
+ var RightPosition = function (popcorn) {
53
+ this.leftOffset = function () {
54
+ return popcorn.containerOf().width() - (popcorn.defaults.arrowWidth + popcorn.defaults.marginArrow);
55
+ };
56
+ this.left = function () {
57
+ return $('html').width() - popcorn.defaults.marginBorder - popcorn.containerOf().width();
58
+ };
59
+ this.top = function () {
60
+ return popcorn.$anchor.offset().top + popcorn.defaults.verticalOffsetFromElement
61
+ };
62
+ };
63
+
64
+ var CenterPosition = function (popcorn) {
65
+ this.leftOffset = function () {
66
+ return popcorn.containerOf().width() / 2 - Math.floor(popcorn.defaults.arrowWidth / 2);
67
+ };
68
+ this.left = function () {
69
+ var middleOfElement = Popcorn.calculateMiddle(popcorn.$anchor.offset().left, popcorn.$anchor.width());
70
+ return Popcorn.calculateLeftOffset(middleOfElement, popcorn.containerOf().width());
71
+ };
72
+ this.top = function () {
73
+ return popcorn.$anchor.offset().top + popcorn.defaults.verticalOffsetFromElement
74
+ };
75
+ };
76
+
77
+ Popcorn.containerOf = function ($element) {
78
+ return $element.next();
79
+ };
80
+
81
+ Popcorn.prototype.containerOf = function () {
82
+ return Popcorn.containerOf(this.$element);
83
+ };
84
+
85
+ Popcorn.prototype.setContainerPosition = function () {
86
+ this.containerOf().css('top', this.positionType.top());
87
+ this.containerOf().css('left', this.positionType.left());
88
+ };
89
+
90
+ Popcorn.prototype.collideRight = function () {
91
+ var middleOfElement = Popcorn.calculateMiddle(this.$anchor.offset().left, this.$anchor.width());
92
+ var rightOffset = middleOfElement + this.containerOf().width() / 2;
93
+ return ($('html').width() - (rightOffset + this.defaults.marginBorder)) < 0;
94
+ };
95
+
96
+ Popcorn.prototype.collideLeft = function () {
97
+ return (Popcorn.calculateLeftOffset(this.middleOf(), this.containerOf().width()) - this.defaults.marginBorder) < 0;
98
+ };
99
+
100
+ Popcorn.prototype.middleOf = function () {
101
+ return Popcorn.calculateMiddle(this.$anchor.offset().left, this.$anchor.width());
102
+ };
103
+
104
+ Popcorn.calculateMiddle = function (left, width) {
105
+ return left + width / 2;
106
+ };
107
+ Popcorn.calculateRightOffset = function (middlePoint, width) {
108
+ return middlePoint + width / 2;
109
+ };
110
+ Popcorn.calculateLeftOffset = function (middlePoint, width) {
111
+ return middlePoint - width / 2;
112
+ };
113
+ Popcorn.containerOf = function (element) {
114
+ return $(element).next();
115
+ };
116
+ Popcorn.hideAllContainers = function ($elements) {
117
+ $elements.each(function () {
118
+ Popcorn.containerOf(this).hide();
119
+ });
120
+ };
121
+ Popcorn.hideAllContainersExcept = function ($elements, element) {
122
+ $elements.not(element).each(function () {
123
+ Popcorn.containerOf(this).hide()
124
+ });
125
+ };
126
+ return exports;
127
+ })(window.exports);
128
+
129
+ (function ($, exports) {
130
+ var Popcorn = exports.Popcorn;
131
+
132
+ $.fn.popcorn = function (options) {
133
+
134
+ // plugin default options
135
+ var elements = this, defaults = {
136
+ marginBorder:4,
137
+ arrowWidth:19,
138
+ marginArrow:10,
139
+ verticalOffsetFromElement:20
140
+ };
141
+
142
+ // extends defaults with options provided
143
+ if (options) {
144
+ $.extend(delfaults, options);
145
+ }
146
+
147
+ $(window).unbind('click').click(function () {
148
+ Popcorn.hideAllContainers(elements);
149
+ });
150
+
151
+ function _setUpElement() {
152
+ var $element = $(this), popcorn = new Popcorn($element, defaults);
153
+
154
+ popcorn.decorateContainerWithHtml();
155
+ popcorn.inferPositionType();
156
+ popcorn.decorateContainerWithArrow();
157
+ popcorn.setContainerPosition();
158
+
159
+ $element.click(function (e) {
160
+ e.stopPropagation();
161
+ e.preventDefault();
162
+ Popcorn.hideAllContainersExcept(elements, this);
163
+ Popcorn.containerOf($element).show();
164
+ });
165
+
166
+ $(window).resize(function () {
167
+ popcorn.setContainerPosition();
168
+ });
169
+ }
170
+ return this.each(_setUpElement);
171
+ };
172
+ })(jQuery, exports);
@@ -0,0 +1,330 @@
1
+ .stickycorn {
2
+ width: 100%;
3
+ min-height: 550px;
4
+ position: absolute;
5
+ background: none repeat scroll 0 0 #FFFFFF;
6
+ border: medium none;
7
+
8
+ color: #444444;
9
+ font-size: 11px;
10
+ overflow: visible;
11
+ margin-top: 4px;
12
+ width: 160px;
13
+ }
14
+
15
+ /* ----------------*/
16
+ /* -- stickycorn --*/
17
+ /* ----------------*/
18
+
19
+ /* generic classes */
20
+ .stickycorn {
21
+ min-width: 360px;
22
+ /*min-height: 345px;*/
23
+ border: 1px solid #8FA2B4;
24
+ border-radius: 5px 5px 5px 5px;
25
+ box-shadow: 0 0 5px rgba(0, 0, 0, .15);
26
+ }
27
+ .stickycorn h1 {
28
+ font: bold 12px/14px "Segoe UI","Lucida Grande",Arial,sans-serif;
29
+ margin: 12px 0 4px 0;
30
+ padding-left: 15px;
31
+ font-size: 12px;
32
+ color: #303030;
33
+ }
34
+ .stickycorn .watchlist h1 {
35
+ background: transparent url("data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAbZJREFUeNpMUjtrmmEUfj4/b4NQlA8cFAshqAiKDkqgVTInCJkSCIE0m0sG/0RA+hccajKGLtKukkI2RSoFL4ilRRfxMqigeM1zXiJ4lpdze87znPNq6XQa7+ba7XaXi8XifLVafaa/tVqtrzab7Yemad/pj6VIe2842mw233RdT8ZiMQQCAYXQarVQrVax3W5/MfeFoX/SYKzX62en03mayWQQj8fBJAaDARhHu91GPp/HZDL5yfi17vf7bzjyPpvNIplMwmw2I5fLwW63g3F4vV643W6Uy2U//d+m0Wh0EQ6HkUgk9loUsslkAmliOBzC5/MhEolguVxemQuFwicKU8iHZrFYQNHgItQ0wzAEIKyqZPShiYZGowGHw6EaXC6XmqpylUrldDweH6dSKVUoNDganU4H0+lUxGI+n6PX6wm9Fz0ajX7o9/tnFA+Px4Nut6vohUIhBINBiD7qRKlUEsCvOnf+n6gn9Xr9o3AV27+z2Qy1Wg3FYhE86AsX8bA/3DGbnoh8IsiyRuHOyWg2m+DlX4l+y7q/2sHXMFh0R/6XbA7J1yDAH27rmUt5pD+SojcBBgBCW8Ar7p88wQAAAABJRU5ErkJggg==") no-repeat scroll 0 2px;
36
+ }
37
+ .stickycorn .attachment h1 {
38
+ background: transparent url("data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABh0RVh0Q3JlYXRpb24gVGltZQAxMS0wMS0yMDEytcl2IgAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNXG14zYAAADESURBVCiRfdAhcgJBEAXQtywCVHIEZGQcOLhByA1WEscRkMjIyI1DIpEcYeMikUjiggJBDzW1lc2vmprpqf/7/+5CN5aY4QE/OGDV6yDXuGCPIu66S1CjwWt0nWEUZ1q2yO844glbbOJ/gm8Mcocq8o6yCMnxhBU+i4w8beXN483dltCUGfkLA6yDvIx6jkUIpRnOGOMtcxxjGHPsUu4+HvESW/kv3h2HECU8B6lqE/NIDX7jvY764y9B6rgN+73bkJ24AvtdK0qIEWRDAAAAAElFTkSuQmCC") no-repeat scroll 0 2px;
39
+ }
40
+ .stickycorn .note h1 {
41
+ background: transparent url("data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABh0RVh0Q3JlYXRpb24gVGltZQAxMS0wMS0yMDEytcl2IgAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNXG14zYAAABtSURBVCiR5dGxDQJBDAXRAdEHlIA0LoDSKIVOOPIt4krYDj7RngQcOnImcvAsWfIuCVUV4MFnJ6ADl9ZaByAJalYw6lXt6qyek7Bfg2914AhMAIcNfBsQuG+eNBrm15Ne+suF5Q/q9A1V1TI/ATA3KJXtB0VMAAAAAElFTkSuQmCC") no-repeat scroll 0 2px;
42
+ }
43
+ .stickycorn .save h1 {
44
+ background: transparent url("data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAATRJREFUeNp8krFKxEAQhjfZJOZAOFNYqo11wCAW9gc+gZU+h9WJtQ8giC9i50PYXSXYWIgoKAm5bOL3r3vxbBz4M39m5p/Z2SSqqurJGLMHHPg0P2aHYdiMokj8Az6Ff+EvorIsB4KPYAp2g8BQcE3BDHoAv4Ofg9wWRXFF8LLv+/eu647wxjn3pmIwIXZC/pD4FvHjhIAKNgimFIwDiJk4jj3EsVflE71AdNjC/Jr4LblZKJbl2slPQLBtrZ0TvAnJGOyDe/Cizjq/EslyuZSfgEWWZYtwM7IHPbRT0zQS2FFAkdNo8bZtzUqkzjTxIuAXXO3glFSnMHG0NE1Nnue+6bgDaqdCfwtJ8keg7nVdS+h0Y0koPCOXrZ3frH1A72l8Kh6h0q+xw0ts/jGa9rjnbwEGAIjSw/IrQ5npAAAAAElFTkSuQmCC") no-repeat scroll 0 2px;
45
+ }
46
+ .stickycorn p {
47
+ color: #525252;
48
+ text-decoration: none;
49
+ font-style: italic;
50
+ font-size: 10px;
51
+ margin: 0 0 4px 0;
52
+ }
53
+
54
+ /* header classes */
55
+ .stickycorn .header {
56
+ width: 100% !important;
57
+ height: 34px !important;
58
+ background-color: #E4EDF5 !important;
59
+ border-bottom: 1px #8FA2B4 solid!important;
60
+ border-radius: 5px 5px 0px 0px !important;
61
+ float: none !important;
62
+ }
63
+ .stickycorn .header ul {
64
+ list-style: none;
65
+ padding:0;
66
+ margin:0;
67
+ text-align: center;
68
+ }
69
+ .stickycorn .header ul li {
70
+ display: inline;
71
+ }
72
+ .stickycorn .header li {
73
+ width: 119px;
74
+ height: 34px;
75
+ float: left;
76
+ border-left: 1px solid #dbe2e7;
77
+ }
78
+ .stickycorn .header li.active {
79
+ -moz-box-shadow: inset 0 0 20px #717f8f;
80
+ -webkit-box-shadow: inset 0 0 20px #717f8f;
81
+ box-shadow: inset 0 0 20px #717f8f;
82
+ background-color: #b3c4d9;
83
+ border-left: none;
84
+ background-position: left bottom;
85
+ cursor: pointer;
86
+ width: 120px;
87
+ }
88
+ .stickycorn .header li:hover {
89
+ background-position: left bottom;
90
+ cursor: pointer;
91
+ }
92
+ .stickycorn .header li > div {
93
+ width: 16px;
94
+ height: 16px;
95
+ color: transparent;
96
+ margin: 8px auto;
97
+ }
98
+ .stickycorn .header li.active > div {
99
+ background-position: left bottom;
100
+ cursor: pointer;
101
+ }
102
+ .stickycorn .stream-tab > div {
103
+ background: url("data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAgCAYAAAAbifjMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAALhJREFUeNpiLOuc85+BAsACpQuB+AKJeg2AuB9mwIWu8pQDpOgGuhxMMzFQCFjQTH0ApOQJ6PkAdK0gVgOAEgqkuoDqXigAUgKENAFd2oDVACD4D8XkuQBo8sQBDwNiovEj0KUCgy8aDWBpm8TMBDegn1wXMP4HgsFRHjAyMpJUHsAcTnEsMKGZ+uA/YfAeZ0oEemOAywOg84gqD4AupVF5ADSZ/uUBOdH4YXBGowEZmdKAKtkZIMAA98+JJhv1OP0AAAAASUVORK5CYII=") no-repeat scroll transparent;
104
+ }
105
+ .stickycorn .edit-tab > div {
106
+ background: url("data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAgCAYAAAAbifjMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAUJJREFUeNqUk8FtwzAMRalMkBHcDbJBRqgzQWWgA/iUXNVje3LuBewRMkI6gbNBPUIzgUKh34AqSCpJ4DuWqP9MMZI5vn9uiWhiPbO+WPbj9LqQMDasC8whvoOZoTsNYI/3ic0dm0M1M/9aKeCWmF+QGyWQADhkzCSFmPDAnufKuo4/MpUqIE6GbXQVQLESEw+waNRUYtIVWojJrdBANrkskrme3FlvLPeniULIHefFocq2CshABh73eA+QvtiDQk9cZL7h3DwZUgTK7qP7c1YBIlADUEve+y3r4n/jympYJBXBtMaIxE4DSM0TxlYKmDNmL4VQtOfULIJQtOda2P8AhEVqSDqhhuTKUkFKzRFDan9RDvLDcqxFAkghwTxgPgBaCSCGuGTuKgWshgWy0blpSHPzUHZ8+QYtYFWDfiwPAQYAQE+qb2tD6HUAAAAASUVORK5CYII=") no-repeat scroll transparent;
107
+ }
108
+ .stickycorn .history-tab > div {
109
+ background: url("data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAgCAYAAAAbifjMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ1JREFUeNpiLOuc85+BAsACpQuB+AKJeg2AuB9mwIWu8pQDpOgGuhxMM2GR+A/EDljEHbB5l4mBQjDwBrDgEE/AEg4KpBgQT6kLHNGjFeqi/cMwFig2gBGaPCnOTP1ku+A/EAyO8oCRkZGk8gDmcCYsEiDggEXcAZt3h3N5gCUcaFMe4PKCIyMaAIkN0+xMeXkATZ5kZyaKszNAgAEA3vlG66fKjJQAAAAASUVORK5CYII=") no-repeat scroll transparent;
110
+ }
111
+
112
+ /* stream classes */
113
+ .stickycorn .stream {
114
+ padding: 10px 0px 10px 10px;
115
+ display: none;
116
+ }
117
+ .stickycorn .stream .content {
118
+ max-height: 400px;
119
+ overflow: auto;
120
+ padding: 0 10px 0 0;
121
+ }
122
+ .stickycorn .stream .content > * {
123
+ clear: both;
124
+ }
125
+ .stickycorn .stream .line {
126
+ display: table-cell;
127
+ width: 100%;
128
+ border-bottom: 1px solid #566476;
129
+ }
130
+ .stickycorn .stream .time {
131
+ font-size: 13px;
132
+ display: table-cell;
133
+ font-style: italic;
134
+ color: #303030;
135
+ padding-left: 3px;
136
+ vertical-align: bottom;
137
+ white-space: nowrap;
138
+ }
139
+ .stickycorn .stream .content > div {
140
+ padding: 1px;
141
+ margin-top: 4px;
142
+ }
143
+ .stickycorn .stream .content > div.note:hover, .fatpopcorn .stream .content > div.attachment:hover {
144
+ -webkit-box-shadow: 0px 0px 4px rgba(50, 50, 50, 0.50);
145
+ -moz-box-shadow: 0px 0px 4px rgba(50, 50, 50, 0.50);
146
+ box-shadow: 0px 0px 4px rgba(50, 50, 50, 0.50);
147
+ }
148
+
149
+ .stickycorn .stream div > h1 {
150
+ margin-top: 4px;
151
+ }
152
+
153
+ .stickycorn .stream div > h1 > span.star, .stickycorn .stream div > h1 > span.delete {
154
+ display: block;
155
+ width: 12px;
156
+ height: 12px;
157
+ color: transparent;
158
+ float: right;
159
+ margin-left: 2px;
160
+ }
161
+
162
+ /* history classes*/
163
+ .stickycorn .history {
164
+ padding-bottom: 10px;
165
+ display: none;
166
+ }
167
+ .stickycorn .history .content {
168
+ max-height: 400px;
169
+ overflow: auto;
170
+ border-radius: 0 0 6px 6px;
171
+ }
172
+ .stickycorn .history div:nth-child(even) {
173
+ background-color: #fff
174
+ }
175
+ .stickycorn .history div:nth-child(odd) {
176
+ background-color: #f3f3f3
177
+ }
178
+ .stickycorn .history .content > div {
179
+ padding: 10px 10px 10px 10px;
180
+ }
181
+ .stickycorn .history .content > div > h1 {
182
+ margin: 0;
183
+ }
184
+
185
+ /* edit classes*/
186
+ .stickycorn .edit {
187
+ display: none;
188
+ }
189
+ .stickycorn .edit h1 {
190
+ font-size: 13px;
191
+ font-style: italic;
192
+ color: #303030;
193
+ white-space: nowrap;
194
+ margin: 0;
195
+ font-weight: normal;
196
+ }
197
+ .stickycorn .edit .watchlist {
198
+ margin: 10px 10px 16px 10px;
199
+ }
200
+ .stickycorn .edit .note {
201
+ margin: 10px 10px 26px 10px;
202
+ }
203
+ .stickycorn .edit #send_note {
204
+ padding-right: 6px;
205
+ cursor: pointer;
206
+ }
207
+ .stickycorn .edit .attachment {
208
+ margin: 10px 10px 26px 10px;
209
+ }
210
+ .stickycorn .edit .watchlist h1 {
211
+ display: inline;
212
+ }
213
+ .stickycorn .edit .watchlist .on-off {
214
+ display: inline;
215
+ float: right;
216
+ width: auto !important;
217
+ }
218
+ .stickycorn .qq-upload-button {
219
+ font-style: italic;
220
+ cursor: pointer;
221
+ color: #0066ff;
222
+ text-decoration: none;
223
+ font-style: italic;
224
+ font-size: 12px;
225
+ float: right;
226
+ }
227
+ .stickycorn .qq-upload-button-hover {
228
+ color: #f56a00;
229
+ }
230
+ .stickycorn .edit .info {
231
+ background-color: #f3f3f3;
232
+ display: table;
233
+ border-radius: 0px 0px 6px 6px;
234
+ padding: 10px;
235
+ height: 63px;
236
+ width: 340px;
237
+ }
238
+ .stickycorn .edit .info h1 {
239
+ background: url("data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAoxJREFUeNrMmL1SAjEQx7kbS3kAjwe40oaSRis7Km2gwkYqreyw4QW0OhupoNHqrKywofNegAcAHwB63OD/nFzcJBc+jtuZTGbysflls0k28VarVaWM4gkwz/OcOk0mk3PK6pRC5JwklKYibzQaYxf9a6a8YARTpayNdOxogCWloUgEudgZGEF1NwRiAQku2gqMgALKHrFkuxSxxHcEOHcGIygBM7BYKUESA8xQVqMUwPfqFut1CG6aG8wClfpLLM+Y+qwhqCxRLN40uAELx4JB2ZtG0YhSJDswJvFE6QRF35Ru5cGwcYSftjRwl/IkdWCvjE+Jzj1122PAD2YSov2FugNxzPSZ9lNqeyWD+czuCzXm5s6ipsayouxcLYSODnTKEmLsP/GZc0qVHuegkKrBuQOuELp6TFUbDFkwjYOOLKf2l6FO2w86R4yV2zowdQmNByF2YMxUxQYrpxIxS5oFg1Oq1sp1fVCbByxNjGPkGmW2fgu0z1gNLJUjFHAHYWy5puQ+Yqu/y3XyeWYQMcaNUib0jlMwdScmuutCkhdL/WkOq81pElNl/FD2sTpz1VRy+Ei8g3vzk7FY9hxTlsY222d5+bYQdiwd2KzAYHXmAnZw0YHVCmSouYAFBYIFJrCE2xkFyRl3IvhSqJsBQ1y2V8EYIRN2ay2WhjT7lqYmXP8Fw22/NIUhe7AWF2Yt02hGdv4hE4Z092itLhc4cLtyyFitld72G1rE9JJvaR45WTBNGCKkjweHqlxc4vemSx5tuBdYn2mfCbN85f6LmB0qzD1gLFe3PIT//WtAx0DzGImMnyquzzeHZd3u+ebw4LVGuDt98Jb6i6DUnyql/oYq/cfdwb46yyg/AgwAFCWENHW/4L0AAAAASUVORK5CYII=") no-repeat;
240
+ color: transparent;
241
+ display: table-cell;
242
+ width: 38px;
243
+ height: 38px;
244
+ }
245
+ .stickycorn .edit .info p {
246
+ color: #626262;
247
+ padding-left: 10px;
248
+ /* overflow: hidden; TODO Controllare cosa succede quando il testo va in overflow
249
+ text-overflow: ellipsis;*/
250
+ }
251
+ .stickycorn .edit .info p.error {
252
+ color: red;
253
+ }
254
+
255
+ .stickycorn .edit textarea {
256
+ width: 98%;
257
+ margin-left: 2px;
258
+ resize: none;
259
+ border-width: 1px;
260
+ border-color: #7e9ab4;
261
+ border-style: solid;
262
+ }
263
+ .stickycorn .edit hr {
264
+ border-width: 0;
265
+ color: #566476;
266
+ height: 1px;
267
+ width: 340px;
268
+ background-color: #566476;
269
+ margin: 0 10px 0 10px;
270
+ clear: both;
271
+ }
272
+ .stickycorn .edit a {
273
+ font-size: 12px;
274
+ text-align: right;
275
+ float: right;
276
+ }
277
+ .stickycorn .content .no-content {
278
+ position:absolute;
279
+ top:46%;
280
+ left: 10px;
281
+ font-size: 22px;
282
+ color: #ccc;
283
+ background-color: #ffffff !important;
284
+ text-shadow: rgba(0, 0, 0, 0.3) 0 -1px 0;
285
+ }
286
+ .stickycorn .loader {
287
+ display: none;
288
+ background: white url("data:image/gif;charset=utf-8;base64,R0lGODlhEAALAPQAAP///3F/j+rs7uTn6fL09XSCkXF/j4qWo7nAx6avuNjc4IOQnZqkr73Ey6ixutre4oaSn3OBkJymsfDy8+jr7fj5+ZCbp+vt7/f4+Nba3snP1OHk5/X29wAAAAAAAAAAACH+GkNyZWF0ZWQgd2l0aCBhamF4bG9hZC5pbmZvACH5BAALAAAAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAAEAALAAAFLSAgjmRpnqSgCuLKAq5AEIM4zDVw03ve27ifDgfkEYe04kDIDC5zrtYKRa2WQgAh+QQACwABACwAAAAAEAALAAAFJGBhGAVgnqhpHIeRvsDawqns0qeN5+y967tYLyicBYE7EYkYAgAh+QQACwACACwAAAAAEAALAAAFNiAgjothLOOIJAkiGgxjpGKiKMkbz7SN6zIawJcDwIK9W/HISxGBzdHTuBNOmcJVCyoUlk7CEAAh+QQACwADACwAAAAAEAALAAAFNSAgjqQIRRFUAo3jNGIkSdHqPI8Tz3V55zuaDacDyIQ+YrBH+hWPzJFzOQQaeavWi7oqnVIhACH5BAALAAQALAAAAAAQAAsAAAUyICCOZGme1rJY5kRRk7hI0mJSVUXJtF3iOl7tltsBZsNfUegjAY3I5sgFY55KqdX1GgIAIfkEAAsABQAsAAAAABAACwAABTcgII5kaZ4kcV2EqLJipmnZhWGXaOOitm2aXQ4g7P2Ct2ER4AMul00kj5g0Al8tADY2y6C+4FIIACH5BAALAAYALAAAAAAQAAsAAAUvICCOZGme5ERRk6iy7qpyHCVStA3gNa/7txxwlwv2isSacYUc+l4tADQGQ1mvpBAAIfkEAAsABwAsAAAAABAACwAABS8gII5kaZ7kRFGTqLLuqnIcJVK0DeA1r/u3HHCXC/aKxJpxhRz6Xi0ANAZDWa+kEAA7AAAAAAAAAAAA") no-repeat 50% 50%;
289
+ opacity: 0.7;
290
+ position: absolute;
291
+ top: 0;
292
+ width: 100%;
293
+ height: 100%;
294
+ z-index: 810;
295
+ }
296
+ .stickycorn .qq-upload-drop-area {
297
+ position:absolute;
298
+ top:0;
299
+ left:0;
300
+ width:100%;
301
+ height:100%;
302
+ max-height: 100px;
303
+ min-height: 50px;
304
+ z-index:802;
305
+ background:#ffffff;
306
+ text-align:center;
307
+ border: 2px dashed #566476;
308
+ border-radius: 4px;
309
+ background:#ffffff;
310
+ box-shadow: 0 0 8px rgba(0, 0, 0, 0.35), 0 0 1px rgba(0, 0, 0, 0.5);
311
+ }
312
+ .stickycorn .qq-upload-drop-area span {
313
+ display:block;
314
+ position:absolute;
315
+ top: 50%;
316
+ width:100%;
317
+ margin-top:-8px;
318
+ font-size:16px;
319
+ color: #ccc;
320
+ background:transparent;
321
+ text-shadow: rgba(0, 0, 0, 0.3) 0 -1px 0;
322
+ }
323
+ .stickycorn .qq-upload-drop-area-active span {
324
+ color: #566476;
325
+ }
326
+ .stickycorn .qq-upload-drop-area-active {
327
+ color: #566476;
328
+ background:#E4EDF5;
329
+ box-shadow: 0 0 8px rgba(0, 0, 0, 0.35), 0 0 1px rgba(0, 0, 0, 0.5);
330
+ }
@@ -1,3 +1,3 @@
1
1
  module CornJs
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: corn_js
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-17 00:00:00.000000000 Z
12
+ date: 2012-05-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -43,6 +43,22 @@ dependencies:
43
43
  - - ! '>='
44
44
  - !ruby/object:Gem::Version
45
45
  version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: rspec-rails
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
46
62
  description: It's possible to use the generic popcorn and the app specific fat popcorn
47
63
  plugin
48
64
  email:
@@ -52,12 +68,14 @@ extensions: []
52
68
  extra_rdoc_files: []
53
69
  files:
54
70
  - app/assets/javascripts/corn.js
55
- - app/assets/javascripts/corn_js/corn.js
71
+ - app/assets/javascripts/corn_js/activemetadata.js
56
72
  - app/assets/javascripts/corn_js/fileuploader.js
73
+ - app/assets/javascripts/corn_js/popcorn.js
57
74
  - app/assets/stylesheets/corn.css
58
75
  - app/assets/stylesheets/corn_js/23states.css
59
76
  - app/assets/stylesheets/corn_js/corn.css
60
77
  - app/assets/stylesheets/corn_js/fileuploader.css
78
+ - app/assets/stylesheets/corn_js/stickycorn.css
61
79
  - config/routes.rb
62
80
  - lib/corn_js/engine.rb
63
81
  - lib/corn_js/version.rb
@@ -79,7 +97,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
79
97
  version: '0'
80
98
  segments:
81
99
  - 0
82
- hash: -697541353557166821
100
+ hash: -2388074889520572843
83
101
  required_rubygems_version: !ruby/object:Gem::Requirement
84
102
  none: false
85
103
  requirements:
@@ -88,10 +106,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
106
  version: '0'
89
107
  segments:
90
108
  - 0
91
- hash: -697541353557166821
109
+ hash: -2388074889520572843
92
110
  requirements: []
93
111
  rubyforge_project:
94
- rubygems_version: 1.8.19
112
+ rubygems_version: 1.8.21
95
113
  signing_key:
96
114
  specification_version: 3
97
115
  summary: A javascript popup menu plugin