Hi, I'm having problems with my script view in that when I look at the
source for a particular file it is about three times larger than the
actual js file. You get most of the way down the lines and then they
are rendered all over again. I thought maybe it was another plugin
that might be causing it but I've removed all plugins that add
features to Firebug (like FireQuery, EventBug etc).
Example below, you can see below that around line 346 the source
starts again but I can assure you the source file doesn't look like
that!
Am using Firebug 1.5.4 on Firefox 3.6 (on a Mac).
Thanks very much!
Matt
(function($) {
2
3 $.grid = function(options) {
4 return $.grid.impl.init(options);
5 };
6
7 $.fn.grid = function(options) {
8 return $.grid.impl.init(this, options);
9 };
10
11 /*
12 * default options
13 */
14 $.grid.defaults = {
15
16};
17
18$.grid.impl = {
19
20 /*
21 * options
22 */
23 opts: null,
24
25 /*
26 * helper
27 */
28 helper: {},
29
30 /*
31 * Init
32 */
33 init: function(template, options) {
34
35 var self = this;
36
37 this.opts = $.extend({}, $.grid.defaults, options);
38
39 self.helper.template = template;
40 self.helper.cells = template.find('.cell-set');
41
42 self.assignClasses();
43 self.videos();
44 self.medias();
45 self.fonts();
46 self.events();
47
48 return self;
49 },
50
51 /*
52 * Assign Classes
53 */
54 assignClasses: function() {
55
56 var self = this;
57
58 self.helper.cells.find('.cell-
product').parent('.cell').addClass('product');
59 self.helper.cells.find('.cell-
media').parent('.cell').addClass('media');
60 self.helper.cells.find('.cell-
link').parent('.cell').addClass('link');
61 self.helper.cells.find('.cell-
video').parent('.cell').addClass('video');
62
63
64 return;
65 },
66
67 /*
68 * Medias
69 */
70 medias: function() {
71
72 var self = this;
73
74 self.helper.cells.find('.media')
75 .each(function(i, cell) {
76
77 var $cell, id, mediaPath;
78
79 $cell = $(this);
80 id = 'media' + i;
81 mediaPath = $cell.find('a').attr('href');
82
83 $cell
84 .empty()
85 .append('<div id="' + id + '" style="width: 100%; height: 100%;" /
>');
86 ;
87
88 swfobject.embedSWF(mediaPath, id, '100%', '100%', '9.0.0', false,
self.opts.mediaOpts.params, self.opts.mediaOpts.params,
self.opts.mediaOpts.attributes);
89
90 if ($.browser.mozilla) {
91 $cell
92 .hover(function() {
93
94 self.helper.cells
95 .draggable('disable')
96 ;
97
98 }, function() {
99
100 self.helper.cells
101 .draggable('enable')
102 ;
103
104 })
105 ;
106 }
107
108 })
109 ;
110
111 return;
112 },
113
114 /*
115 * Videos
116 */
117 videos: function() {
118
119 var self = this;
120
121 self.helper.cells.find('.video')
122 .each(function(i, cell) {
123
124 var $cell, $object, id, videoPath, flashvars;
125
126 $cell = $(this);
127 id = 'video' + i;
128 flashvars = $.extend({}, self.opts.playerOpts.flashvars);
129 flashvars.videoLink = $cell.find('a').attr('href');
130
131 $cell
132 .empty()
133 .append('<div id="' + id + '" style="width: 100%; height: 100%;" /
>');
134 ;
135
136 swfobject.embedSWF(self.opts.playerPath, id, '100%', '100%',
'9.0.0', false, flashvars, self.opts.playerOpts.params,
self.opts.playerOpts.attributes);
137
138 if ($.browser.mozilla) {
139 $cell
140 .hover(function() {
141
142 self.helper.cells
143 .draggable('disable')
144 ;
145
146 }, function() {
147
148 self.helper.cells
149 .draggable('enable')
150 ;
151
152 })
153 ;
154 }
155
156 })
157 ;
158
159 return;
160 },
161
162 /*
163 * Events
164 */
165 events: function() {
166
167 var self = this;
168 var bounds, w_win, h_win, w_grid, h_grid, x_1, y_1, x_2, y_2,
draggableOpts;
169
170 w_win = $(window).width();
171 h_win = $(window).height();
172 w_grid = self.helper.cells.width();
173 h_grid =(function($) {
174
175 $.grid = function(options) {
176 return $.grid.impl.init(options);
177 };
178
179 $.fn.grid = function(options) {
180 return $.grid.impl.init(this, options);
181 };
182
183 /*
184 * default options
185 */
186 $.grid.defaults = {
187
188};
189
190$.grid.impl = {
191
192 /*
193 * options
194 */
195 opts: null,
196
197 /*
198 * helper
199 */
200 helper: {},
201
202 /*
203 * Init
204 */
205 init: function(template, options) {
206
207 var self = this;
208
209 this.opts = $.extend({}, $.grid.defaults, options);
210
211 self.helper.template = template;
212 self.helper.cells = template.find('.cell-set');
213
214 self.assignClasses();
215 self.videos();
216 self.medias();
217 self.fonts();
218 self.events();
219
220 return self;
221 },
222
223 /*
224 * Assign Classes
225 */
226 assignClasses: function() {
227
228 var self = this;
229
230 self.helper.cells.find('.cell-
product').parent('.cell').addClass('product');
231 self.helper.cells.find('.cell-
media').parent('.cell').addClass('media');
232 self.helper.cells.find('.cell-
link').parent('.cell').addClass('link');
233 self.helper.cells.find('.cell-
video').parent('.cell').addClass('video');
234
235
236 return;
237 },
238
239 /*
240 * Medias
241 */
242 medias: function() {
243
244 var self = this;
245
246 self.helper.cells.find('.media')
247 .each(function(i, cell) {
248
249 var $cell, id, mediaPath;
250
251 $cell = $(this);
252 id = 'media' + i;
253 mediaPath = $cell.find('a').attr('href');
254
255 $cell
256 .empty()
257 .append('<div id="' + id + '" style="width: 100%; height: 100%;" /
>');
258 ;
259
260 swfobject.embedSWF(mediaPath, id, '100%', '100%', '9.0.0', false,
self.opts.mediaOpts.params, self.opts.mediaOpts.params,
self.opts.mediaOpts.attributes);
261
262 if ($.browser.mozilla) {
263 $cell
264 .hover(function() {
265
266 self.helper.cells
267 .draggable('disable')
268 ;
269
270 }, function() {
271
272 self.helper.cells
273 .draggable('enable')
274 ;
275
276 })
277 ;
278 }
279
280 })
281 ;
282
283 return;
284 },
285
286 /*
287 * Videos
288 */
289 videos: function() {
290
291 var self = this;
292
293 self.helper.cells.find('.video')
294 .each(function(i, cell) {
295
296 var $cell, $object, id, videoPath, flashvars;
297
298 $cell = $(this);
299 id = 'video' + i;
300 flashvars = $.extend({}, self.opts.playerOpts.flashvars);
301 flashvars.videoLink = $cell.find('a').attr('href');
302
303 $cell
304 .empty()
305 .append('<div id="' + id + '" style="width: 100%; height: 100%;" /
>');
306 ;
307
308 swfobject.embedSWF(self.opts.playerPath, id, '100%', '100%',
'9.0.0', false, flashvars, self.opts.playerOpts.params,
self.opts.playerOpts.attributes);
309
310 if ($.browser.mozilla) {
311 $cell
312 .hover(function() {
313
314 self.helper.cells
315 .draggable('disable')
316 ;
317
318 }, function() {
319
320 self.helper.cells
321 .draggable('enable')
322 ;
323
324 })
325 ;
326 }
327
328 })
329 ;
330
331 return;
332 },
333
334 /*
335 * Events
336 */
337 events: function() {
338
339 var self = this;
340 var bounds, w_win, h_win, w_grid, h_grid, x_1, y_1, x_2, y_2,
draggableOpts;
341
342 w_win = $(window).width();
343 h_win = $(window).height();
344 w_grid = self.helper.cells.width();
345 h_grid =(function($) {
346
347 $.grid = function(options) {
348 return $.grid.impl.init(options);
349 };
--
You received this message because you are subscribed to the Google Groups
"Firebug" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/firebug?hl=en.