spree_backend 2.0.4 → 2.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/admin/address_states.js +19 -15
  3. data/app/assets/javascripts/admin/admin.js.erb +1 -5
  4. data/app/assets/javascripts/admin/nested-attribute.js +15 -11
  5. data/app/assets/javascripts/admin/option_type_autocomplete.js.erb +20 -16
  6. data/app/assets/javascripts/admin/orders/edit.js +17 -12
  7. data/app/assets/javascripts/admin/orders/edit_form.js +16 -12
  8. data/app/assets/javascripts/admin/product_picker.js +22 -16
  9. data/app/assets/javascripts/admin/promotions.js +34 -35
  10. data/app/assets/javascripts/admin/shipments.js.erb +35 -27
  11. data/app/assets/javascripts/admin/spree-select2.js.erb +2 -1
  12. data/app/assets/javascripts/admin/spree_backend.js +0 -1
  13. data/app/assets/javascripts/admin/states.js +10 -8
  14. data/app/assets/javascripts/admin/stock_management.js.coffee +2 -2
  15. data/app/assets/javascripts/admin/taxon_autocomplete.js.erb +32 -19
  16. data/app/assets/javascripts/admin/user_picker.js +21 -13
  17. data/app/assets/javascripts/admin/variant_autocomplete.js.erb +16 -4
  18. data/app/assets/stylesheets/admin/plugins/_select2.scss +5 -3
  19. data/app/assets/stylesheets/admin/sections/_alerts.scss +27 -0
  20. data/app/assets/stylesheets/admin/spree_admin.scss +1 -0
  21. data/app/controllers/spree/admin/base_controller.rb +11 -13
  22. data/app/controllers/spree/admin/images_controller.rb +4 -5
  23. data/app/controllers/spree/admin/mail_methods_controller.rb +1 -1
  24. data/app/controllers/spree/admin/orders/customer_details_controller.rb +1 -1
  25. data/app/controllers/spree/admin/orders_controller.rb +3 -7
  26. data/app/controllers/spree/admin/payments_controller.rb +1 -1
  27. data/app/controllers/spree/admin/resource_controller.rb +6 -2
  28. data/app/helpers/spree/admin/navigation_helper.rb +4 -2
  29. data/app/helpers/spree/admin/stock_locations_helper.rb +15 -0
  30. data/app/views/spree/admin/countries/index.html.erb +2 -2
  31. data/app/views/spree/admin/general_settings/edit.html.erb +3 -3
  32. data/app/views/spree/admin/option_types/index.html.erb +15 -5
  33. data/app/views/spree/admin/orders/_shipment.html.erb +2 -2
  34. data/app/views/spree/admin/orders/customer_details/_form.html.erb +8 -8
  35. data/app/views/spree/admin/orders/index.html.erb +4 -3
  36. data/app/views/spree/admin/payment_methods/index.html.erb +7 -4
  37. data/app/views/spree/admin/payments/_form.html.erb +1 -1
  38. data/app/views/spree/admin/payments/show.html.erb +2 -2
  39. data/app/views/spree/admin/product_properties/_product_property_fields.html.erb +1 -1
  40. data/app/views/spree/admin/product_properties/index.html.erb +9 -13
  41. data/app/views/spree/admin/products/index.html.erb +3 -3
  42. data/app/views/spree/admin/products/stock.html.erb +10 -8
  43. data/app/views/spree/admin/promotions/index.html.erb +6 -6
  44. data/app/views/spree/admin/properties/index.html.erb +12 -5
  45. data/app/views/spree/admin/prototypes/_form.html.erb +1 -1
  46. data/app/views/spree/admin/prototypes/index.html.erb +9 -2
  47. data/app/views/spree/admin/reports/index.html.erb +2 -3
  48. data/app/views/spree/admin/shared/_address_form.html.erb +11 -11
  49. data/app/views/spree/admin/shared/_alert.html.erb +3 -3
  50. data/app/views/spree/admin/shared/_routes.html.erb +1 -0
  51. data/app/views/spree/admin/shared/_tabs.html.erb +2 -2
  52. data/app/views/spree/admin/shared/_translations.html.erb +3 -0
  53. data/app/views/spree/admin/shipping_categories/index.html.erb +9 -2
  54. data/app/views/spree/admin/shipping_methods/_form.html.erb +10 -0
  55. data/app/views/spree/admin/shipping_methods/index.html.erb +9 -5
  56. data/app/views/spree/admin/stock_locations/_form.html.erb +15 -11
  57. data/app/views/spree/admin/stock_locations/index.html.erb +9 -6
  58. data/app/views/spree/admin/stock_movements/index.html.erb +7 -0
  59. data/app/views/spree/admin/stock_transfers/index.html.erb +19 -18
  60. data/app/views/spree/admin/stock_transfers/new.html.erb +24 -21
  61. data/app/views/spree/admin/stock_transfers/show.html.erb +13 -9
  62. data/app/views/spree/admin/tax_categories/index.html.erb +12 -8
  63. data/app/views/spree/admin/tax_rates/_form.html.erb +8 -8
  64. data/app/views/spree/admin/tax_rates/index.html.erb +12 -11
  65. data/app/views/spree/admin/taxonomies/_list.html.erb +5 -5
  66. data/app/views/spree/admin/taxonomies/index.html.erb +11 -4
  67. data/app/views/spree/admin/taxons/_form.html.erb +6 -5
  68. data/app/views/spree/admin/taxons/edit.html.erb +17 -2
  69. data/app/views/spree/admin/trackers/index.html.erb +10 -10
  70. data/app/views/spree/admin/variants/_autocomplete.js.erb +3 -3
  71. data/app/views/spree/admin/variants/index.html.erb +9 -7
  72. data/app/views/spree/admin/zones/_country_members.html.erb +10 -0
  73. data/app/views/spree/admin/zones/_form.html.erb +4 -1
  74. data/app/views/spree/admin/zones/_state_members.html.erb +10 -0
  75. data/app/views/spree/admin/zones/edit.html.erb +3 -7
  76. data/app/views/spree/admin/zones/index.html.erb +11 -10
  77. data/vendor/assets/javascripts/trunk8.js +362 -226
  78. metadata +11 -11
  79. data/app/views/spree/admin/zones/_country_member.html.erb +0 -5
  80. data/app/views/spree/admin/zones/_member_type.html.erb +0 -19
  81. data/app/views/spree/admin/zones/_state_member.html.erb +0 -5
  82. data/vendor/assets/javascripts/jquery.horizontalNav.js +0 -141
@@ -1,233 +1,369 @@
1
1
  /**!
2
- * trunk8 v1.2.3
2
+ * trunk8 v1.3.1
3
3
  * https://github.com/rviscomi/trunk8
4
- *
4
+ *
5
5
  * Copyright 2012 Rick Viscomi
6
6
  * Released under the MIT License.
7
- *
8
- * Date: September 9, 2012
7
+ *
8
+ * Date: September 26, 2012
9
9
  */
10
-
11
10
  (function ($) {
12
- var methods,
13
- utils,
14
- SIDES = {
15
- /* cen...ter */
16
- center: 'center',
17
- /* ...left */
18
- left: 'left',
19
- /* right... */
20
- right: 'right'
21
- },
22
- WIDTH = {
23
- auto: 'auto'
24
- },
25
- settings = {
26
- fill: '…',
27
- lines: 1,
28
- side: SIDES.right,
29
- tooltip: true,
30
- width: WIDTH.auto
31
- };
32
-
33
- function truncate() {
34
- var width = settings.width,
35
- side = settings.side,
36
- fill = settings.fill,
37
- line_height = utils.getLineHeight(this) * settings.lines,
38
- str = this.data('trunk8') || this.text(),
39
- length = str.length,
40
- max_bite = '',
41
- lower, upper,
42
- bite_size,
43
- bite;
44
-
45
- /* Reset the field to the original string. */
46
- this.html(str).data('trunk8', str);
47
-
48
- if (width === WIDTH.auto) {
49
- /* Assuming there is no "overflow: hidden". */
50
- if (this.height() <= line_height) {
51
- /* Text is already at the optimal trunkage. */
52
- return;
53
- }
54
-
55
- /* Binary search technique for finding the optimal trunkage. */
56
- /* Find the maximum bite without overflowing. */
57
- lower = 0;
58
- upper = length - 1;
59
-
60
- while (lower <= upper) {
61
- bite_size = lower + ((upper - lower) >> 1);
62
-
63
- bite = utils.eatStr(str, side, length - bite_size, fill);
64
-
65
- this.html(bite);
66
-
67
- /* Check for overflow. */
68
- if (this.height() > line_height) {
69
- upper = bite_size - 1;
70
- }
71
- else {
72
- lower = bite_size + 1;
73
-
74
- /* Save the bigger bite. */
75
- max_bite = (max_bite.length > bite.length) ? max_bite : bite;
76
- }
77
- }
78
-
79
- /* Reset the content to eliminate possible existing scroll bars. */
80
- this.html('');
81
-
82
- /* Display the biggest bite. */
83
- this.html(max_bite);
84
-
85
- if (settings.tooltip) {
86
- this.attr('title', str);
87
- }
88
- }
89
- else if (!isNaN(width)) {
90
- bite_size = length - width;
91
-
92
- bite = utils.eatStr(str, side, bite_size, fill);
93
-
94
- this.html(bite);
95
-
96
- if (settings.tooltip) {
97
- this.attr('title', str);
98
- }
99
- }
100
- else {
101
- $.error('Invalid width "' + width + '".');
102
- }
103
- }
104
-
105
- methods = {
106
- init: function (options) {
107
- settings = $.extend(settings, options);
108
-
109
- return this.each(function () {
110
- truncate.call($(this));
111
- });
112
- },
113
-
114
- /** Updates the text value of the elements while maintaining truncation. */
115
- update: function (new_string) {
116
- return this.each(function () {
117
- /* Update text. */
118
- if (new_string) {
119
- $(this).data('trunk8', new_string);
120
- }
121
-
122
- /* Truncate accordingly. */
123
- truncate.call($(this));
124
- });
125
- },
126
-
127
- revert: function () {
128
- return this.each(function () {
129
- /* Get original text. */
130
- var text = $(this).data('trunk8');
131
-
132
- /* Revert element to original text. */
133
- $(this).html(text);
134
- });
135
- },
136
-
137
- /** Returns this instance's settings object. NOT CHAINABLE. */
138
- getSettings: function () {
139
- return settings;
140
- }
141
- };
142
-
143
- utils = {
144
- /** Replaces [bite_size] [side]-most chars in [str] with [fill]. */
145
- eatStr: function (str, side, bite_size, fill) {
146
- var length = str.length,
147
- key = utils.eatStr.generateKey.apply(null, arguments),
148
- half_length,
149
- half_bite_size;
150
-
151
- /* If the result is already in the cache, return it. */
152
- if (utils.eatStr.cache[key]) {
153
- return utils.eatStr.cache[key];
154
- }
155
-
156
- /* Common error handling. */
157
- if ((typeof str !== 'string') || (length === 0)) {
158
- $.error('Invalid source string "' + str + '".');
159
- }
160
- if ((bite_size < 0) || (bite_size > length)) {
161
- $.error('Invalid bite size "' + bite_size + '".');
162
- }
163
- else if (bite_size === 0) {
164
- /* No bite should show no truncation. */
165
- return str;
166
- }
167
- if (typeof (fill + '') !== 'string') {
168
- $.error('Fill unable to be converted to a string.');
169
- }
170
-
171
- /* Compute the result, store it in the cache, and return it. */
172
- switch (side) {
173
- case SIDES.right:
174
- /* str... */
175
- return utils.eatStr.cache[key] =
176
- $.trim(str.substr(0, length - bite_size)) + fill;
177
-
178
- case SIDES.left:
179
- /* ...str */
180
- return utils.eatStr.cache[key] =
181
- fill + $.trim(str.substr(bite_size));
182
-
183
- case SIDES.center:
184
- /* Bit-shift to the right by one === Math.floor(x / 2) */
185
- half_length = length >> 1; // halve the length
186
- half_bite_size = bite_size >> 1; // halve the bite_size
187
-
188
- /* st...r */
189
- return utils.eatStr.cache[key] =
190
- $.trim(utils.eatStr(str.substr(0, length - half_length), SIDES.right, bite_size - half_bite_size, '')) +
191
- fill +
192
- $.trim(utils.eatStr(str.substr(length - half_length), SIDES.left, half_bite_size, ''));
193
-
194
- default:
195
- $.error('Invalid side "' + side + '".');
196
- }
197
- },
198
-
199
- getLineHeight: function (elem) {
200
- var html = $(elem).html(),
201
- wrapper_id = 'line-height-test',
202
- line_height;
203
-
204
- /* Set the content to a small single character and wrap. */
205
- $(elem).html('i').wrap('<div id="' + wrapper_id + '" />');
206
-
207
- /* Calculate the line height by measuring the wrapper.*/
208
- line_height = $('#' + wrapper_id).innerHeight();
209
-
210
- /* Remove the wrapper and reset the content. */
211
- $(elem).html(html).unwrap();
212
-
213
- return line_height;
214
- }
215
- };
216
-
217
- utils.eatStr.cache = {};
218
- utils.eatStr.generateKey = function () {
219
- return Array.prototype.join.call(arguments, '');
220
- };
221
-
222
- $.fn.trunk8 = function (method) {
223
- if (methods[method]) {
224
- return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
225
- }
226
- else if (typeof method === 'object' || !method) {
227
- return methods.init.apply(this, arguments);
228
- }
229
- else {
230
- $.error('Method ' + method + ' does not exist on jQuery.trunk8');
231
- }
232
- };
11
+ var methods,
12
+ utils,
13
+ SIDES = {
14
+ /* cen...ter */
15
+ center: 'center',
16
+ /* ...left */
17
+ left: 'left',
18
+ /* right... */
19
+ right: 'right'
20
+ },
21
+ WIDTH = {
22
+ auto: 'auto'
23
+ };
24
+
25
+ function trunk8(element) {
26
+ this.$element = $(element);
27
+ this.original_text = this.$element.html();
28
+ this.settings = $.extend({}, $.fn.trunk8.defaults);
29
+ }
30
+
31
+ trunk8.prototype.updateSettings = function (options) {
32
+ this.settings = $.extend(this.settings, options);
33
+ };
34
+
35
+ function stripHTML(html) {
36
+ var tmp = document.createElement("DIV");
37
+ tmp.innerHTML = html;
38
+ return tmp.textContent || tmp.innerText;
39
+ }
40
+
41
+ function getHtmlArr(str) {
42
+ /* Builds an array of strings and designated */
43
+ /* HTML tags around them. */
44
+ if (stripHTML(str) === str) {
45
+ return str.split(/\s/g);
46
+ }
47
+ var allResults = [],
48
+ reg = /<([a-z]+)([^<]*)(?:>(.*?(?!<\1>)*)<\/\1>|\s+\/>)(['.?!,]*)|((?:[^<>\s])+['.?!,]*\w?|<br\s?\/?>)/ig,
49
+ outArr = reg.exec(str),
50
+ lastI,
51
+ ind;
52
+ while (outArr && lastI !== reg.lastIndex) {
53
+ lastI = reg.lastIndex;
54
+ if (outArr[5]) {
55
+ allResults.push(outArr[5]);
56
+ } else if (outArr[1]) {
57
+ allResults.push({
58
+ tag: outArr[1],
59
+ attribs: outArr[2],
60
+ content: outArr[3],
61
+ after: outArr[4]
62
+ });
63
+ }
64
+ outArr = reg.exec(str);
65
+ }
66
+ for (ind = 0; ind < allResults.length; ind++) {
67
+ if (typeof allResults[ind] !== 'string' && allResults[ind].content) {
68
+ allResults[ind].content = getHtmlArr(allResults[ind].content);
69
+ }
70
+ }
71
+ return allResults;
72
+ }
73
+
74
+ function rebuildHtmlFromBite(bite, htmlObject, fill) {
75
+ // Take the processed bite after binary-search
76
+ // truncated and re-build the original HTML
77
+ // tags around the processed string.
78
+ bite = bite.replace(fill, '');
79
+
80
+ var biteHelper = function (contentArr, tagInfo) {
81
+ var retStr = '',
82
+ content,
83
+ biteContent,
84
+ biteLength,
85
+ i;
86
+ for (i = 0; i < contentArr.length; i++) {
87
+ content = contentArr[i];
88
+ biteLength = $.trim(bite).split(' ').length;
89
+ if ($.trim(bite).length) {
90
+ if (typeof content === 'string') {
91
+ if (!/<br\s*\/?>/.test(content)) {
92
+ if (biteLength === 1 && $.trim(bite).length <= content.length) {
93
+ content = bite;
94
+ // We want the fill to go inside of the last HTML
95
+ // element if the element is a container.
96
+ if (tagInfo === 'p' || tagInfo === 'div') {
97
+ content += fill;
98
+ }
99
+ bite = '';
100
+ } else {
101
+ bite = bite.replace(content, '');
102
+ }
103
+ }
104
+ retStr += $.trim(content) + ((i === contentArr.length - 1 || biteLength <= 1) ? '' : ' ');
105
+ } else {
106
+ biteContent = biteHelper(content.content, content.tag);
107
+ if (content.after) {
108
+ bite = bite.replace(content.after, '');
109
+ }
110
+ if (biteContent) {
111
+ if (!content.after) {
112
+ content.after = ' ';
113
+ }
114
+ retStr += '<' + content.tag + content.attribs + '>' + biteContent + '</' + content.tag + '>' + content.after;
115
+ }
116
+ }
117
+ }
118
+ }
119
+ return retStr;
120
+ },
121
+ htmlResults = biteHelper(htmlObject);
122
+
123
+ // Add fill if doesn't exist. This will place it outside the HTML elements.
124
+ if (htmlResults.slice(htmlResults.length - fill.length) === fill) {
125
+ htmlResults += fill;
126
+ }
127
+
128
+ return htmlResults;
129
+ }
130
+
131
+ function truncate() {
132
+ var data = this.data('trunk8'),
133
+ settings = data.settings,
134
+ width = settings.width,
135
+ side = settings.side,
136
+ fill = settings.fill,
137
+ parseHTML = settings.parseHTML,
138
+ line_height = utils.getLineHeight(this) * settings.lines,
139
+ str = data.original_text,
140
+ length = str.length,
141
+ max_bite = '',
142
+ lower, upper,
143
+ bite_size,
144
+ bite,
145
+ text,
146
+ htmlObject;
147
+
148
+ /* Reset the field to the original string. */
149
+ this.html(str);
150
+ text = this.text();
151
+
152
+ /* If string has HTML and parse HTML is set, build */
153
+ /* the data struct to house the tags */
154
+ if (parseHTML && stripHTML(str) !== str) {
155
+ htmlObject = getHtmlArr(str);
156
+ str = stripHTML(str);
157
+ length = str.length;
158
+ }
159
+
160
+ if (width === WIDTH.auto) {
161
+ /* Assuming there is no "overflow: hidden". */
162
+ if (this.height() <= line_height) {
163
+ /* Text is already at the optimal trunkage. */
164
+ return;
165
+ }
166
+
167
+ /* Binary search technique for finding the optimal trunkage. */
168
+ /* Find the maximum bite without overflowing. */
169
+ lower = 0;
170
+ upper = length - 1;
171
+
172
+ while (lower <= upper) {
173
+ bite_size = lower + ((upper - lower) >> 1);
174
+
175
+ bite = utils.eatStr(str, side, length - bite_size, fill);
176
+
177
+ if (parseHTML && htmlObject) {
178
+ bite = rebuildHtmlFromBite(bite, htmlObject, fill);
179
+ }
180
+
181
+ this.html(bite);
182
+
183
+ /* Check for overflow. */
184
+ if (this.height() > line_height) {
185
+ upper = bite_size - 1;
186
+ } else {
187
+ lower = bite_size + 1;
188
+
189
+ /* Save the bigger bite. */
190
+ max_bite = (max_bite.length > bite.length) ? max_bite : bite;
191
+ }
192
+ }
193
+
194
+ /* Reset the content to eliminate possible existing scroll bars. */
195
+ this.html('');
196
+
197
+ /* Display the biggest bite. */
198
+ this.html(max_bite);
199
+
200
+ if (settings.tooltip) {
201
+ this.attr('title', text);
202
+ }
203
+ } else if (!isNaN(width)) {
204
+ bite_size = length - width;
205
+
206
+ bite = utils.eatStr(str, side, bite_size, fill);
207
+
208
+ this.html(bite);
209
+
210
+ if (settings.tooltip) {
211
+ this.attr('title', str);
212
+ }
213
+ } else {
214
+ $.error('Invalid width "' + width + '".');
215
+ }
216
+ }
217
+
218
+ methods = {
219
+ init: function (options) {
220
+ return this.each(function () {
221
+ var $this = $(this),
222
+ data = $this.data('trunk8');
223
+
224
+ if (!data) {
225
+ $this.data('trunk8', (data = new trunk8(this)));
226
+ }
227
+
228
+ data.updateSettings(options);
229
+
230
+ truncate.call($this);
231
+ });
232
+ },
233
+
234
+ /** Updates the text value of the elements while maintaining truncation. */
235
+ update: function (new_string) {
236
+ return this.each(function () {
237
+ var $this = $(this);
238
+
239
+ /* Update text. */
240
+ if (new_string) {
241
+ $this.data('trunk8').original_text = new_string;
242
+ }
243
+
244
+ /* Truncate accordingly. */
245
+ truncate.call($this);
246
+ });
247
+ },
248
+
249
+ revert: function () {
250
+ return this.each(function () {
251
+ /* Get original text. */
252
+ var text = $(this).data('trunk8').original_text;
253
+
254
+ /* Revert element to original text. */
255
+ $(this).html(text);
256
+ });
257
+ },
258
+
259
+ /** Returns this instance's settings object. NOT CHAINABLE. */
260
+ getSettings: function () {
261
+ return $(this.get(0)).data('trunk8').settings;
262
+ }
263
+ };
264
+
265
+ utils = {
266
+ /** Replaces [bite_size] [side]-most chars in [str] with [fill]. */
267
+ eatStr: function (str, side, bite_size, fill) {
268
+ var length = str.length,
269
+ key = utils.eatStr.generateKey.apply(null, arguments),
270
+ half_length,
271
+ half_bite_size;
272
+
273
+ /* If the result is already in the cache, return it. */
274
+ if (utils.eatStr.cache[key]) {
275
+ return utils.eatStr.cache[key];
276
+ }
277
+
278
+ /* Common error handling. */
279
+ if ((typeof str !== 'string') || (length === 0)) {
280
+ $.error('Invalid source string "' + str + '".');
281
+ }
282
+ if ((bite_size < 0) || (bite_size > length)) {
283
+ $.error('Invalid bite size "' + bite_size + '".');
284
+ } else if (bite_size === 0) {
285
+ /* No bite should show no truncation. */
286
+ return str;
287
+ }
288
+ if (typeof (fill + '') !== 'string') {
289
+ $.error('Fill unable to be converted to a string.');
290
+ }
291
+
292
+ /* Compute the result, store it in the cache, and return it. */
293
+ switch (side) {
294
+ case SIDES.right:
295
+ /* str... */
296
+ return utils.eatStr.cache[key] = $.trim(str.substr(0, length - bite_size)) + fill;
297
+
298
+ case SIDES.left:
299
+ /* ...str */
300
+ return utils.eatStr.cache[key] = fill + $.trim(str.substr(bite_size));
301
+
302
+ case SIDES.center:
303
+ /* Bit-shift to the right by one === Math.floor(x / 2) */
304
+ half_length = length >> 1; // halve the length
305
+ half_bite_size = bite_size >> 1; // halve the bite_size
306
+
307
+ /* st...r */
308
+ return utils.eatStr.cache[key] = $.trim(utils.eatStr(str.substr(0, length - half_length), SIDES.right, bite_size - half_bite_size, '')) + fill + $.trim(utils.eatStr(str.substr(length - half_length), SIDES.left, half_bite_size, ''));
309
+
310
+ default:
311
+ $.error('Invalid side "' + side + '".');
312
+ }
313
+ },
314
+
315
+ getLineHeight: function (elem) {
316
+ var floats = $(elem).css('float');
317
+ if (floats !== 'none') {
318
+ $(elem).css('float', 'none');
319
+ }
320
+ var pos = $(elem).css('position');
321
+ if (pos === 'absolute') {
322
+ $(elem).css('position', 'static');
323
+ }
324
+
325
+ var html = $(elem).html(),
326
+ wrapper_id = 'line-height-test',
327
+ line_height;
328
+
329
+ /* Set the content to a small single character and wrap. */
330
+ $(elem).html('i').wrap('<div id="' + wrapper_id + '" />');
331
+
332
+ /* Calculate the line height by measuring the wrapper.*/
333
+ line_height = $('#' + wrapper_id).innerHeight();
334
+
335
+ /* Remove the wrapper and reset the content. */
336
+ $(elem).html(html).css({
337
+ 'float': floats,
338
+ 'position': pos
339
+ }).unwrap();
340
+
341
+ return line_height;
342
+ }
343
+ };
344
+
345
+ utils.eatStr.cache = {};
346
+ utils.eatStr.generateKey = function () {
347
+ return Array.prototype.join.call(arguments, '');
348
+ };
349
+
350
+ $.fn.trunk8 = function (method) {
351
+ if (methods[method]) {
352
+ return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
353
+ } else if (typeof method === 'object' || !method) {
354
+ return methods.init.apply(this, arguments);
355
+ } else {
356
+ $.error('Method ' + method + ' does not exist on jQuery.trunk8');
357
+ }
358
+ };
359
+
360
+ /* Default trunk8 settings. */
361
+ $.fn.trunk8.defaults = {
362
+ fill: '&hellip;',
363
+ lines: 1,
364
+ side: SIDES.right,
365
+ tooltip: true,
366
+ width: WIDTH.auto,
367
+ parseHTML: false
368
+ };
233
369
  })(jQuery);