Version Description
- 12.05.2012 =
- Secured: Removed bundled version of swfupload. See fix below for SCM information.
- Changed: All transients created by NextGEN are flushed when the plugin is activated.
- Fixed: Our primary SCM is conducted at http://bitbucket.org/photocrati/nextgen-gallery, but was not synchronizing correctly with the WordPress Plugin SVN Repository
- Fixed: The transient adjustment fixes: http://wordpress.org/support/topic/plugin-nextgen-gallery-_transient_ngg_request-entry-in-wp_options
Download this release
Release Info
Developer | photocrati |
Plugin | NextGEN Gallery – WordPress Gallery Plugin |
Version | 1.9.8 |
Comparing to | |
See all releases |
Code changes from version 1.9.7 to 1.9.8
- admin/css/nggSorter.css +0 -76
- admin/images/icon-amazon.gif +0 -0
- admin/js/jquery.ui.tabs.js +0 -532
- admin/js/jquery.ui.tabs.pack.js +0 -10
- admin/js/ngg_news_notice.js +0 -9
- admin/js/sorter.js +0 -294
- admin/js/swfobject.js +0 -4
- admin/js/swfupload.js +0 -986
- admin/js/swfupload.swf +0 -0
- admin/templates/latest_news_notice.php +0 -14
- changelog.txt +6 -0
- nggallery.php +42 -2
- readme.txt +6 -0
admin/css/nggSorter.css
DELETED
@@ -1,76 +0,0 @@
|
|
1 |
-
.imageBox,.imageBoxHighlighted{
|
2 |
-
width:130px; /* Total width of each image box */
|
3 |
-
height:160px; /* Total height of each image box */
|
4 |
-
float:left;
|
5 |
-
}
|
6 |
-
.imageBox_theImage{
|
7 |
-
width:110px; /* Width of image */
|
8 |
-
height:125px; /* Height of image */
|
9 |
-
|
10 |
-
/*
|
11 |
-
Don't change these values *
|
12 |
-
*/
|
13 |
-
background-position: center;
|
14 |
-
background-repeat: no-repeat;
|
15 |
-
margin: 0 auto;
|
16 |
-
margin-bottom:2px;
|
17 |
-
}
|
18 |
-
|
19 |
-
.imageBox .imageBox_theImage{
|
20 |
-
border:1px solid #DDD; /* Border color for not selected images */
|
21 |
-
padding:2px;
|
22 |
-
}
|
23 |
-
.imageBoxHighlighted .imageBox_theImage{
|
24 |
-
border:3px solid #316AC5; /* Border color for selected image */
|
25 |
-
padding:0px;
|
26 |
-
|
27 |
-
}
|
28 |
-
.imageBoxHighlighted span{ /* Title of selected image */
|
29 |
-
background-color: #316AC5;
|
30 |
-
color:#FFFFFF;
|
31 |
-
padding:2px;
|
32 |
-
}
|
33 |
-
|
34 |
-
.imageBox_label{ /* Title of images - both selected and not selected */
|
35 |
-
text-align:center;
|
36 |
-
font-family: arial;
|
37 |
-
font-size:11px;
|
38 |
-
padding-top:2px;
|
39 |
-
margin: 0 auto;
|
40 |
-
}
|
41 |
-
|
42 |
-
/*
|
43 |
-
DIV that indicates where the dragged image will be placed
|
44 |
-
*/
|
45 |
-
#insertionMarker{
|
46 |
-
height:150px;
|
47 |
-
width:6px;
|
48 |
-
position:absolute;
|
49 |
-
}
|
50 |
-
|
51 |
-
#insertionMarkerLine{
|
52 |
-
width:6px; /* No need to change this value */
|
53 |
-
height:145px; /* To adjust the height of the div that indicates where the dragged image will be dropped */
|
54 |
-
|
55 |
-
}
|
56 |
-
|
57 |
-
#insertionMarker img{
|
58 |
-
float:left;
|
59 |
-
}
|
60 |
-
|
61 |
-
/*
|
62 |
-
DIV that shows the image as you drag it
|
63 |
-
*/
|
64 |
-
#dragDropContent{
|
65 |
-
|
66 |
-
opacity:0.4; /* 40 % opacity */
|
67 |
-
filter:alpha(opacity=40); /* 40 % opacity */
|
68 |
-
|
69 |
-
/*
|
70 |
-
No need to change these three values
|
71 |
-
*/
|
72 |
-
position:absolute;
|
73 |
-
z-index:10;
|
74 |
-
display:none;
|
75 |
-
|
76 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/images/icon-amazon.gif
DELETED
Binary file
|
admin/js/jquery.ui.tabs.js
DELETED
@@ -1,532 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Tabs 3 - New Wave Tabs
|
3 |
-
*
|
4 |
-
* Copyright (c) 2007 Klaus Hartl (stilbuero.de)
|
5 |
-
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
6 |
-
* and GPL (GPL-LICENSE.txt) licenses.
|
7 |
-
*
|
8 |
-
* http://docs.jquery.com/UI/Tabs
|
9 |
-
*/
|
10 |
-
|
11 |
-
(function($) {
|
12 |
-
|
13 |
-
// if the UI scope is not availalable, add it
|
14 |
-
$.ui = $.ui || {};
|
15 |
-
|
16 |
-
// tabs API methods
|
17 |
-
$.fn.tabs = function() {
|
18 |
-
var method = typeof arguments[0] == 'string' && arguments[0];
|
19 |
-
var args = method && Array.prototype.slice.call(arguments, 1) || arguments;
|
20 |
-
|
21 |
-
return method == 'length' ?
|
22 |
-
$.data(this[0], 'ui-tabs').$tabs.length :
|
23 |
-
this.each(function() {
|
24 |
-
if (method) {
|
25 |
-
var tabs = $.data(this, 'ui-tabs');
|
26 |
-
tabs[method].apply(tabs, args);
|
27 |
-
} else
|
28 |
-
new $.ui.tabs(this, args[0] || {});
|
29 |
-
});
|
30 |
-
};
|
31 |
-
|
32 |
-
// tabs class
|
33 |
-
$.ui.tabs = function(el, options) {
|
34 |
-
var self = this;
|
35 |
-
|
36 |
-
this.element = el;
|
37 |
-
|
38 |
-
this.options = $.extend({
|
39 |
-
|
40 |
-
// basic setup
|
41 |
-
selected: 0,
|
42 |
-
unselect: options.selected === null,
|
43 |
-
event: 'click',
|
44 |
-
disabled: [],
|
45 |
-
cookie: null, // e.g. { expires: 7, path: '/', domain: 'jquery.com', secure: true }
|
46 |
-
// TODO bookmarkable: $.ajaxHistory ? true : false,
|
47 |
-
|
48 |
-
// Ajax
|
49 |
-
spinner: 'Loading…',
|
50 |
-
cache: false,
|
51 |
-
idPrefix: 'ui-tabs-',
|
52 |
-
ajaxOptions: {},
|
53 |
-
|
54 |
-
// animations
|
55 |
-
fx: null, // e.g. { height: 'toggle', opacity: 'toggle', duration: 200 }
|
56 |
-
|
57 |
-
// templates
|
58 |
-
tabTemplate: '<li><a href="#{href}"><span>#{label}</span></a></li>',
|
59 |
-
panelTemplate: '<div></div>',
|
60 |
-
|
61 |
-
// CSS classes
|
62 |
-
navClass: 'ui-tabs-nav',
|
63 |
-
selectedClass: 'ui-tabs-selected',
|
64 |
-
unselectClass: 'ui-tabs-unselect',
|
65 |
-
disabledClass: 'ui-tabs-disabled',
|
66 |
-
panelClass: 'ui-tabs-panel',
|
67 |
-
hideClass: 'ui-tabs-hide',
|
68 |
-
loadingClass: 'ui-tabs-loading'
|
69 |
-
|
70 |
-
}, options);
|
71 |
-
|
72 |
-
// doesn't extend with null
|
73 |
-
if (options.selected === null)
|
74 |
-
this.options.selected = null;
|
75 |
-
|
76 |
-
this.options.event += '.ui-tabs'; // namespace event
|
77 |
-
this.options.cookie = $.cookie && $.cookie.constructor == Function && this.options.cookie;
|
78 |
-
|
79 |
-
$(el).bind('setData.ui-tabs', function(event, key, value) {
|
80 |
-
if ((/^selected/).test(key))
|
81 |
-
self.select(value);
|
82 |
-
else {
|
83 |
-
self.options[key] = value;
|
84 |
-
self.tabify();
|
85 |
-
}
|
86 |
-
}).bind('getData.ui-tabs', function(event, key) {
|
87 |
-
return self.options[key];
|
88 |
-
});
|
89 |
-
|
90 |
-
// save instance for later
|
91 |
-
$.data(el, 'ui-tabs', this);
|
92 |
-
|
93 |
-
// create tabs
|
94 |
-
this.tabify(true);
|
95 |
-
};
|
96 |
-
|
97 |
-
// instance methods
|
98 |
-
$.extend($.ui.tabs.prototype, {
|
99 |
-
tabId: function(a) {
|
100 |
-
return a.title && a.title.replace(/\s/g, '_').replace(/[^A-Za-z0-9\-_:\.]/g, '')
|
101 |
-
|| this.options.idPrefix + $.data(a);
|
102 |
-
},
|
103 |
-
ui: function(tab, panel) {
|
104 |
-
return {
|
105 |
-
instance: this,
|
106 |
-
options: this.options,
|
107 |
-
tab: tab,
|
108 |
-
panel: panel
|
109 |
-
};
|
110 |
-
},
|
111 |
-
tabify: function(init) {
|
112 |
-
|
113 |
-
this.$lis = $('li:has(a[href])', this.element);
|
114 |
-
this.$tabs = this.$lis.map(function() { return $('a', this)[0]; });
|
115 |
-
this.$panels = $([]);
|
116 |
-
|
117 |
-
var self = this, o = this.options;
|
118 |
-
|
119 |
-
this.$tabs.each(function(i, a) {
|
120 |
-
// inline tab
|
121 |
-
if (a.hash && a.hash.replace('#', '')) // Safari 2 reports '#' for an empty hash
|
122 |
-
self.$panels = self.$panels.add(a.hash);
|
123 |
-
// remote tab
|
124 |
-
else if ($(a).attr('href') != '#') { // prevent loading the page itself if href is just "#"
|
125 |
-
$.data(a, 'href.ui-tabs', a.href); // required for restore on destroy
|
126 |
-
$.data(a, 'load.ui-tabs', a.href); // mutable
|
127 |
-
var id = self.tabId(a);
|
128 |
-
a.href = '#' + id;
|
129 |
-
var $panel = $('#' + id);
|
130 |
-
if (!$panel.length) {
|
131 |
-
$panel = $(o.panelTemplate).attr('id', id).addClass(o.panelClass)
|
132 |
-
.insertAfter( self.$panels[i - 1] || self.element );
|
133 |
-
$panel.data('destroy.ui-tabs', true);
|
134 |
-
}
|
135 |
-
self.$panels = self.$panels.add( $panel );
|
136 |
-
}
|
137 |
-
// invalid tab href
|
138 |
-
else
|
139 |
-
o.disabled.push(i + 1);
|
140 |
-
});
|
141 |
-
|
142 |
-
if (init) {
|
143 |
-
|
144 |
-
// attach necessary classes for styling if not present
|
145 |
-
$(this.element).hasClass(o.navClass) || $(this.element).addClass(o.navClass);
|
146 |
-
this.$panels.each(function() {
|
147 |
-
var $this = $(this);
|
148 |
-
$this.hasClass(o.panelClass) || $this.addClass(o.panelClass);
|
149 |
-
});
|
150 |
-
|
151 |
-
// Try to retrieve selected tab:
|
152 |
-
// 1. from fragment identifier in url if present
|
153 |
-
// 2. from cookie
|
154 |
-
// 3. from selected class attribute on <li>
|
155 |
-
// 4. otherwise use given "selected" option
|
156 |
-
// 5. check if tab is disabled
|
157 |
-
this.$tabs.each(function(i, a) {
|
158 |
-
if (location.hash) {
|
159 |
-
if (a.hash == location.hash) {
|
160 |
-
o.selected = i;
|
161 |
-
// prevent page scroll to fragment
|
162 |
-
//if (($.browser.msie || $.browser.opera) && !o.remote) {
|
163 |
-
if ($.browser.msie || $.browser.opera) {
|
164 |
-
var $toShow = $(location.hash), toShowId = $toShow.attr('id');
|
165 |
-
$toShow.attr('id', '');
|
166 |
-
setTimeout(function() {
|
167 |
-
$toShow.attr('id', toShowId); // restore id
|
168 |
-
}, 500);
|
169 |
-
}
|
170 |
-
scrollTo(0, 0);
|
171 |
-
return false; // break
|
172 |
-
}
|
173 |
-
} else if (o.cookie) {
|
174 |
-
var index = parseInt($.cookie('ui-tabs' + $.data(self.element)),10);
|
175 |
-
if (index && self.$tabs[index]) {
|
176 |
-
o.selected = index;
|
177 |
-
return false; // break
|
178 |
-
}
|
179 |
-
} else if ( self.$lis.eq(i).hasClass(o.selectedClass) ) {
|
180 |
-
o.selected = i;
|
181 |
-
return false; // break
|
182 |
-
}
|
183 |
-
});
|
184 |
-
|
185 |
-
// highlight selected tab
|
186 |
-
this.$panels.addClass(o.hideClass);
|
187 |
-
this.$lis.removeClass(o.selectedClass);
|
188 |
-
if (!o.unselect) {
|
189 |
-
this.$panels.eq(o.selected).show().removeClass(o.hideClass); // use show and remove class to show in any case no matter how it has been hidden before
|
190 |
-
this.$lis.eq(o.selected).addClass(o.selectedClass);
|
191 |
-
}
|
192 |
-
|
193 |
-
// load if remote tab
|
194 |
-
var href = !o.unselect && $.data(this.$tabs[o.selected], 'load.ui-tabs');
|
195 |
-
if (href)
|
196 |
-
this.load(o.selected, href);
|
197 |
-
|
198 |
-
// Take disabling tabs via class attribute from HTML
|
199 |
-
// into account and update option properly...
|
200 |
-
o.disabled = $.unique(o.disabled.concat(
|
201 |
-
$.map(this.$lis.filter('.' + o.disabledClass),
|
202 |
-
function(n, i) { return self.$lis.index(n); } )
|
203 |
-
)).sort();
|
204 |
-
|
205 |
-
}
|
206 |
-
|
207 |
-
// disable tabs
|
208 |
-
for (var i = 0, li; li = this.$lis[i]; i++)
|
209 |
-
$(li)[$.inArray(i, o.disabled) != -1 && !$(li).hasClass(o.selectedClass) ? 'addClass' : 'removeClass'](o.disabledClass);
|
210 |
-
|
211 |
-
// set up animations
|
212 |
-
var hideFx, showFx, baseFx = { 'min-width': 0, duration: 1 }, baseDuration = 'normal';
|
213 |
-
if (o.fx && o.fx.constructor == Array)
|
214 |
-
hideFx = o.fx[0] || baseFx, showFx = o.fx[1] || baseFx;
|
215 |
-
else
|
216 |
-
hideFx = showFx = o.fx || baseFx;
|
217 |
-
|
218 |
-
// reset some styles to maintain print style sheets etc.
|
219 |
-
var resetCSS = { display: '', overflow: '', height: '' };
|
220 |
-
if (!$.browser.msie) // not in IE to prevent ClearType font issue
|
221 |
-
resetCSS.opacity = '';
|
222 |
-
|
223 |
-
// Hide a tab, animation prevents browser scrolling to fragment,
|
224 |
-
// $show is optional.
|
225 |
-
function hideTab(clicked, $hide, $show) {
|
226 |
-
$hide.animate(hideFx, hideFx.duration || baseDuration, function() { //
|
227 |
-
$hide.addClass(o.hideClass).css(resetCSS); // maintain flexible height and accessibility in print etc.
|
228 |
-
if ($.browser.msie && hideFx.opacity)
|
229 |
-
$hide[0].style.filter = '';
|
230 |
-
if ($show)
|
231 |
-
showTab(clicked, $show, $hide);
|
232 |
-
});
|
233 |
-
}
|
234 |
-
|
235 |
-
// Show a tab, animation prevents browser scrolling to fragment,
|
236 |
-
// $hide is optional.
|
237 |
-
function showTab(clicked, $show, $hide) {
|
238 |
-
if (showFx === baseFx)
|
239 |
-
$show.css('display', 'block'); // prevent occasionally occuring flicker in Firefox cause by gap between showing and hiding the tab panels
|
240 |
-
$show.animate(showFx, showFx.duration || baseDuration, function() {
|
241 |
-
$show.removeClass(o.hideClass).css(resetCSS); // maintain flexible height and accessibility in print etc.
|
242 |
-
if ($.browser.msie && showFx.opacity)
|
243 |
-
$show[0].style.filter = '';
|
244 |
-
|
245 |
-
// callback
|
246 |
-
$(self.element).triggerHandler("show.ui-tabs", [self.ui(clicked, $show[0])]);
|
247 |
-
|
248 |
-
});
|
249 |
-
}
|
250 |
-
|
251 |
-
// switch a tab
|
252 |
-
function switchTab(clicked, $li, $hide, $show) {
|
253 |
-
/*if (o.bookmarkable && trueClick) { // add to history only if true click occured, not a triggered click
|
254 |
-
$.ajaxHistory.update(clicked.hash);
|
255 |
-
}*/
|
256 |
-
$li.addClass(o.selectedClass)
|
257 |
-
.siblings().removeClass(o.selectedClass);
|
258 |
-
hideTab(clicked, $hide, $show);
|
259 |
-
}
|
260 |
-
|
261 |
-
// attach tab event handler, unbind to avoid duplicates from former tabifying...
|
262 |
-
this.$tabs.unbind('.ui-tabs').bind(o.event, function() {
|
263 |
-
|
264 |
-
//var trueClick = e.clientX; // add to history only if true click occured, not a triggered click
|
265 |
-
var $li = $(this).parents('li:eq(0)'),
|
266 |
-
$hide = self.$panels.filter(':visible'),
|
267 |
-
$show = $(this.hash);
|
268 |
-
|
269 |
-
// If tab is already selected and not unselectable or tab disabled or click callback returns false stop here.
|
270 |
-
// Check if click handler returns false last so that it is not executed for a disabled tab!
|
271 |
-
if (($li.hasClass(o.selectedClass) && !o.unselect) || $li.hasClass(o.disabledClass)
|
272 |
-
|| $(self.element).triggerHandler("select.ui-tabs", [self.ui(this, $show[0])]) === false) {
|
273 |
-
this.blur();
|
274 |
-
return false;
|
275 |
-
}
|
276 |
-
|
277 |
-
self.options.selected = self.$tabs.index(this);
|
278 |
-
|
279 |
-
// if tab may be closed
|
280 |
-
if (o.unselect) {
|
281 |
-
if ($li.hasClass(o.selectedClass)) {
|
282 |
-
self.options.selected = null;
|
283 |
-
$li.removeClass(o.selectedClass);
|
284 |
-
self.$panels.stop();
|
285 |
-
hideTab(this, $hide);
|
286 |
-
this.blur();
|
287 |
-
return false;
|
288 |
-
} else if (!$hide.length) {
|
289 |
-
self.$panels.stop();
|
290 |
-
var a = this;
|
291 |
-
self.load(self.$tabs.index(this), function() {
|
292 |
-
$li.addClass(o.selectedClass).addClass(o.unselectClass);
|
293 |
-
showTab(a, $show);
|
294 |
-
});
|
295 |
-
this.blur();
|
296 |
-
return false;
|
297 |
-
}
|
298 |
-
}
|
299 |
-
|
300 |
-
if (o.cookie)
|
301 |
-
$.cookie('ui-tabs' + $.data(self.element), self.options.selected, o.cookie);
|
302 |
-
|
303 |
-
// stop possibly running animations
|
304 |
-
self.$panels.stop();
|
305 |
-
|
306 |
-
// show new tab
|
307 |
-
if ($show.length) {
|
308 |
-
|
309 |
-
// prevent scrollbar scrolling to 0 and than back in IE7, happens only if bookmarking/history is enabled
|
310 |
-
/*if ($.browser.msie && o.bookmarkable) {
|
311 |
-
var showId = this.hash.replace('#', '');
|
312 |
-
$show.attr('id', '');
|
313 |
-
setTimeout(function() {
|
314 |
-
$show.attr('id', showId); // restore id
|
315 |
-
}, 0);
|
316 |
-
}*/
|
317 |
-
|
318 |
-
var a = this;
|
319 |
-
self.load(self.$tabs.index(this), function() {
|
320 |
-
switchTab(a, $li, $hide, $show);
|
321 |
-
});
|
322 |
-
|
323 |
-
// Set scrollbar to saved position - need to use timeout with 0 to prevent browser scroll to target of hash
|
324 |
-
/*var scrollX = window.pageXOffset || document.documentElement && document.documentElement.scrollLeft || document.body.scrollLeft || 0;
|
325 |
-
var scrollY = window.pageYOffset || document.documentElement && document.documentElement.scrollTop || document.body.scrollTop || 0;
|
326 |
-
setTimeout(function() {
|
327 |
-
scrollTo(scrollX, scrollY);
|
328 |
-
}, 0);*/
|
329 |
-
|
330 |
-
} else
|
331 |
-
throw 'jQuery UI Tabs: Mismatching fragment identifier.';
|
332 |
-
|
333 |
-
// Prevent IE from keeping other link focussed when using the back button
|
334 |
-
// and remove dotted border from clicked link. This is controlled in modern
|
335 |
-
// browsers via CSS, also blur removes focus from address bar in Firefox
|
336 |
-
// which can become a usability and annoying problem with tabsRotate.
|
337 |
-
if ($.browser.msie)
|
338 |
-
this.blur();
|
339 |
-
|
340 |
-
//return o.bookmarkable && !!trueClick; // convert trueClick == undefined to Boolean required in IE
|
341 |
-
return false;
|
342 |
-
|
343 |
-
});
|
344 |
-
|
345 |
-
// disable click if event is configured to something else
|
346 |
-
if (!(/^click/).test(o.event))
|
347 |
-
this.$tabs.bind('click.ui-tabs', function() { return false; });
|
348 |
-
|
349 |
-
},
|
350 |
-
add: function(url, label, index) {
|
351 |
-
if (index == undefined)
|
352 |
-
index = this.$tabs.length; // append by default
|
353 |
-
|
354 |
-
var o = this.options;
|
355 |
-
var $li = $(o.tabTemplate.replace(/#\{href\}/, url).replace(/#\{label\}/, label));
|
356 |
-
$li.data('destroy.ui-tabs', true);
|
357 |
-
|
358 |
-
var id = url.indexOf('#') == 0 ? url.replace('#', '') : this.tabId( $('a:first-child', $li)[0] );
|
359 |
-
|
360 |
-
// try to find an existing element before creating a new one
|
361 |
-
var $panel = $('#' + id);
|
362 |
-
if (!$panel.length) {
|
363 |
-
$panel = $(o.panelTemplate).attr('id', id)
|
364 |
-
.addClass(o.panelClass).addClass(o.hideClass);
|
365 |
-
$panel.data('destroy.ui-tabs', true);
|
366 |
-
}
|
367 |
-
if (index >= this.$lis.length) {
|
368 |
-
$li.appendTo(this.element);
|
369 |
-
$panel.appendTo(this.element.parentNode);
|
370 |
-
} else {
|
371 |
-
$li.insertBefore(this.$lis[index]);
|
372 |
-
$panel.insertBefore(this.$panels[index]);
|
373 |
-
}
|
374 |
-
|
375 |
-
o.disabled = $.map(o.disabled,
|
376 |
-
function(n, i) { return n >= index ? ++n : n });
|
377 |
-
|
378 |
-
this.tabify();
|
379 |
-
|
380 |
-
if (this.$tabs.length == 1) {
|
381 |
-
$li.addClass(o.selectedClass);
|
382 |
-
$panel.removeClass(o.hideClass);
|
383 |
-
var href = $.data(this.$tabs[0], 'load.ui-tabs');
|
384 |
-
if (href)
|
385 |
-
this.load(index, href);
|
386 |
-
}
|
387 |
-
|
388 |
-
// callback
|
389 |
-
$(this.element).triggerHandler("add.ui-tabs",
|
390 |
-
[this.ui(this.$tabs[index], this.$panels[index])]
|
391 |
-
);
|
392 |
-
},
|
393 |
-
remove: function(index) {
|
394 |
-
var o = this.options, $li = this.$lis.eq(index).remove(),
|
395 |
-
$panel = this.$panels.eq(index).remove();
|
396 |
-
|
397 |
-
// If selected tab was removed focus tab to the right or
|
398 |
-
// in case the last tab was removed the tab to the left.
|
399 |
-
if ($li.hasClass(o.selectedClass) && this.$tabs.length > 1)
|
400 |
-
this.select(index + (index + 1 < this.$tabs.length ? 1 : -1));
|
401 |
-
|
402 |
-
o.disabled = $.map($.grep(o.disabled, function(n, i) { return n != index; }),
|
403 |
-
function(n, i) { return n >= index ? --n : n });
|
404 |
-
|
405 |
-
this.tabify();
|
406 |
-
|
407 |
-
// callback
|
408 |
-
$(this.element).triggerHandler("remove.ui-tabs",
|
409 |
-
[this.ui($li.find('a')[0], $panel[0])]
|
410 |
-
);
|
411 |
-
},
|
412 |
-
enable: function(index) {
|
413 |
-
var o = this.options;
|
414 |
-
if ($.inArray(index, o.disabled) == -1)
|
415 |
-
return;
|
416 |
-
|
417 |
-
var $li = this.$lis.eq(index).removeClass(o.disabledClass);
|
418 |
-
if ($.browser.safari) { // fix disappearing tab (that used opacity indicating disabling) after enabling in Safari 2...
|
419 |
-
$li.css('display', 'inline-block');
|
420 |
-
setTimeout(function() {
|
421 |
-
$li.css('display', 'block');
|
422 |
-
}, 0);
|
423 |
-
}
|
424 |
-
|
425 |
-
o.disabled = $.grep(o.disabled, function(n, i) { return n != index; });
|
426 |
-
|
427 |
-
// callback
|
428 |
-
$(this.element).triggerHandler("enable.ui-tabs",
|
429 |
-
[this.ui(this.$tabs[index], this.$panels[index])]
|
430 |
-
);
|
431 |
-
|
432 |
-
},
|
433 |
-
disable: function(index) {
|
434 |
-
var self = this, o = this.options;
|
435 |
-
if (index != o.selected) { // cannot disable already selected tab
|
436 |
-
this.$lis.eq(index).addClass(o.disabledClass);
|
437 |
-
|
438 |
-
o.disabled.push(index);
|
439 |
-
o.disabled.sort();
|
440 |
-
|
441 |
-
// callback
|
442 |
-
$(this.element).triggerHandler("disable.ui-tabs",
|
443 |
-
[this.ui(this.$tabs[index], this.$panels[index])]
|
444 |
-
);
|
445 |
-
}
|
446 |
-
},
|
447 |
-
select: function(index) {
|
448 |
-
if (typeof index == 'string')
|
449 |
-
index = this.$tabs.index( this.$tabs.filter('[href$=' + index + ']')[0] );
|
450 |
-
this.$tabs.eq(index).trigger(this.options.event);
|
451 |
-
},
|
452 |
-
load: function(index, callback) { // callback is for internal usage only
|
453 |
-
var self = this, o = this.options,
|
454 |
-
$a = this.$tabs.eq(index), a = $a[0];
|
455 |
-
|
456 |
-
var url = $a.data('load.ui-tabs');
|
457 |
-
|
458 |
-
// no remote - just finish with callback
|
459 |
-
if (!url) {
|
460 |
-
typeof callback == 'function' && callback();
|
461 |
-
return;
|
462 |
-
}
|
463 |
-
|
464 |
-
// load remote from here on
|
465 |
-
if (o.spinner) {
|
466 |
-
var $span = $('span', a), label = $span.html();
|
467 |
-
$span.html('<em>' + o.spinner + '</em>');
|
468 |
-
}
|
469 |
-
var finish = function() {
|
470 |
-
self.$tabs.filter('.' + o.loadingClass).each(function() {
|
471 |
-
$(this).removeClass(o.loadingClass);
|
472 |
-
if (o.spinner)
|
473 |
-
$('span', this).html(label);
|
474 |
-
});
|
475 |
-
self.xhr = null;
|
476 |
-
};
|
477 |
-
var ajaxOptions = $.extend({}, o.ajaxOptions, {
|
478 |
-
url: url,
|
479 |
-
success: function(r, s) {
|
480 |
-
$(a.hash).html(r);
|
481 |
-
finish();
|
482 |
-
// This callback is required because the switch has to take
|
483 |
-
// place after loading has completed.
|
484 |
-
typeof callback == 'function' && callback();
|
485 |
-
|
486 |
-
if (o.cache)
|
487 |
-
$.removeData(a, 'load.ui-tabs'); // if loaded once do not load them again
|
488 |
-
|
489 |
-
// callback
|
490 |
-
$(self.element).triggerHandler("load.ui-tabs",
|
491 |
-
[self.ui(self.$tabs[index], self.$panels[index])]
|
492 |
-
);
|
493 |
-
|
494 |
-
o.ajaxOptions.success && o.ajaxOptions.success(r, s);
|
495 |
-
}
|
496 |
-
});
|
497 |
-
if (this.xhr) {
|
498 |
-
// terminate pending requests from other tabs and restore tab label
|
499 |
-
this.xhr.abort();
|
500 |
-
finish();
|
501 |
-
}
|
502 |
-
$a.addClass(o.loadingClass);
|
503 |
-
setTimeout(function() { // timeout is again required in IE, "wait" for id being restored
|
504 |
-
self.xhr = $.ajax(ajaxOptions);
|
505 |
-
}, 0);
|
506 |
-
|
507 |
-
},
|
508 |
-
url: function(index, url) {
|
509 |
-
this.$tabs.eq(index).data('load.ui-tabs', url);
|
510 |
-
},
|
511 |
-
destroy: function() {
|
512 |
-
var o = this.options;
|
513 |
-
$(this.element).unbind('.ui-tabs')
|
514 |
-
.removeClass(o.navClass).removeData('ui-tabs');
|
515 |
-
this.$tabs.each(function() {
|
516 |
-
var href = $.data(this, 'href.ui-tabs');
|
517 |
-
if (href)
|
518 |
-
this.href = href;
|
519 |
-
$(this).unbind('.ui-tabs')
|
520 |
-
.removeData('href.ui-tabs').removeData('load.ui-tabs');
|
521 |
-
});
|
522 |
-
this.$lis.add(this.$panels).each(function() {
|
523 |
-
if ($.data(this, 'destroy.ui-tabs'))
|
524 |
-
$(this).remove();
|
525 |
-
else
|
526 |
-
$(this).removeClass([o.selectedClass, o.unselectClass,
|
527 |
-
o.disabledClass, o.panelClass, o.hideClass].join(' '));
|
528 |
-
});
|
529 |
-
}
|
530 |
-
});
|
531 |
-
|
532 |
-
})(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/jquery.ui.tabs.pack.js
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Tabs 3 - New Wave Tabs
|
3 |
-
*
|
4 |
-
* Copyright (c) 2007 Klaus Hartl (stilbuero.de)
|
5 |
-
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
6 |
-
* and GPL (GPL-LICENSE.txt) licenses.
|
7 |
-
*
|
8 |
-
* http://docs.jquery.com/UI/Tabs
|
9 |
-
*/
|
10 |
-
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(6($){$.4=$.4||{};$.2k.3=6(){7 b=1c 1h[0]==\'26\'&&1h[0];7 c=b&&1N.1L.2c.28(1h,1)||1h;k b==\'D\'?$.p(2[0],\'4-3\').$3.D:2.N(6(){5(b){7 a=$.p(2,\'4-3\');a[b].2j(a,c)}E 2h $.4.3(2,c[0]||{})})};$.4.3=6(e,f){7 d=2;2.m=e;2.8=$.1G({q:0,S:f.q===M,16:\'1y\',t:[],G:M,1m:\'2wt;\',1Z:F,1P:\'4-3-\',1j:{},U:M,1O:\'<z><a y="#{y}"><1g>#{1f}</1g></a></z>\',1t:\'<1J></1J>\',1e:\'4-3-2b\',v:\'4-3-q\',1r:\'4-3-S\',Q:\'4-3-t\',V:\'4-3-1a\',I:\'4-3-X\',1q:\'4-3-2T\'},f);5(f.q===M)2.8.q=M;2.8.16+=\'.4-3\';2.8.G=$.G&&$.G.25==2R&&2.8.G;$(e).1b(\'2O.4-3\',6(b,c,a){5((/^q/).23(c))d.1i(a);E{d.8[c]=a;d.Z()}}).1b(\'2M.4-3\',6(a,b){k d.8[b]});$.p(e,\'4-3\',2);2.Z(1l)};$.1G($.4.3.1L,{1w:6(a){k a.1X&&a.1X.T(/\\s/g,\'1T\').T(/[^A-2v-2u-9\\-1T:\\.]/g,\'\')||2.8.1P+$.p(a)},4:6(a,b){k{2r:2,8:2.8,2q:a,1a:b}},Z:6(f){2.$w=$(\'z:2o(a[y])\',2.m);2.$3=2.$w.19(6(){k $(\'a\',2)[0]});2.$l=$([]);7 e=2,o=2.8;2.$3.N(6(i,a){5(a.H&&a.H.T(\'#\',\'\'))e.$l=e.$l.14(a.H);E 5($(a).W(\'y\')!=\'#\'){$.p(a,\'y.4-3\',a.y);$.p(a,\'x.4-3\',a.y);7 b=e.1w(a);a.y=\'#\'+b;7 c=$(\'#\'+b);5(!c.D){c=$(o.1t).W(\'13\',b).u(o.V).2i(e.$l[i-1]||e.m);c.p(\'12.4-3\',1l)}e.$l=e.$l.14(c)}E o.t.1M(i+1)});5(f){$(2.m).J(o.1e)||$(2.m).u(o.1e);2.$l.N(6(){7 a=$(2);a.J(o.V)||a.u(o.V)});2.$3.N(6(i,a){5(1u.H){5(a.H==1u.H){o.q=i;5($.L.11||$.L.2g){7 b=$(1u.H),1K=b.W(\'13\');b.W(\'13\',\'\');1s(6(){b.W(\'13\',1K)},2f)}2e(0,0);k F}}E 5(o.G){7 c=2d($.G(\'4-3\'+$.p(e.m)),10);5(c&&e.$3[c]){o.q=c;k F}}E 5(e.$w.C(i).J(o.v)){o.q=i;k F}});2.$l.u(o.I);2.$w.B(o.v);5(!o.S){2.$l.C(o.q).K().B(o.I);2.$w.C(o.q).u(o.v)}7 h=!o.S&&$.p(2.$3[o.q],\'x.4-3\');5(h)2.x(o.q,h);o.t=$.2a(o.t.29($.19(2.$w.R(\'.\'+o.Q),6(n,i){k e.$w.Y(n)}))).1I()}27(7 i=0,z;z=2.$w[i];i++)$(z)[$.1H(i,o.t)!=-1&&!$(z).J(o.v)?\'u\':\'B\'](o.Q);7 j,O,18={\'2V-2U\':0,1F:1},1E=\'2S\';5(o.U&&o.U.25==1N)j=o.U[0]||18,O=o.U[1]||18;E j=O=o.U||18;7 g={1p:\'\',2Q:\'\',2P:\'\'};5(!$.L.11)g.1D=\'\';6 1C(b,c,a){c.24(j,j.1F||1E,6(){c.u(o.I).17(g);5($.L.11&&j.1D)c[0].22.R=\'\';5(a)1B(b,a,c)})}6 1B(b,a,c){5(O===18)a.17(\'1p\',\'1A\');a.24(O,O.1F||1E,6(){a.B(o.I).17(g);5($.L.11&&O.1D)a[0].22.R=\'\';$(e.m).P("K.4-3",[e.4(b,a[0])])})}6 20(c,a,d,b){a.u(o.v).2N().B(o.v);1C(c,d,b)}2.$3.1z(\'.4-3\').1b(o.16,6(){7 b=$(2).2L(\'z:C(0)\'),$X=e.$l.R(\':2K\'),$K=$(2.H);5((b.J(o.v)&&!o.S)||b.J(o.Q)||$(e.m).P("1i.4-3",[e.4(2,$K[0])])===F){2.1k();k F}e.8.q=e.$3.Y(2);5(o.S){5(b.J(o.v)){e.8.q=M;b.B(o.v);e.$l.1x();1C(2,$X);2.1k();k F}E 5(!$X.D){e.$l.1x();7 a=2;e.x(e.$3.Y(2),6(){b.u(o.v).u(o.1r);1B(a,$K)});2.1k();k F}}5(o.G)$.G(\'4-3\'+$.p(e.m),e.8.q,o.G);e.$l.1x();5($K.D){7 a=2;e.x(e.$3.Y(2),6(){20(a,b,$X,$K)})}E 2J\'1Y 2H 2G: 2E 2D 2C.\';5($.L.11)2.1k();k F});5(!(/^1y/).23(o.16))2.$3.1b(\'1y.4-3\',6(){k F})},14:6(d,e,f){5(f==2B)f=2.$3.D;7 o=2.8;7 a=$(o.1O.T(/#\\{y\\}/,d).T(/#\\{1f\\}/,e));a.p(\'12.4-3\',1l);7 b=d.2A(\'#\')==0?d.T(\'#\',\'\'):2.1w($(\'a:2z-2y\',a)[0]);7 c=$(\'#\'+b);5(!c.D){c=$(o.1t).W(\'13\',b).u(o.V).u(o.I);c.p(\'12.4-3\',1l)}5(f>=2.$w.D){a.1S(2.m);c.1S(2.m.2x)}E{a.21(2.$w[f]);c.21(2.$l[f])}o.t=$.19(o.t,6(n,i){k n>=f?++n:n});2.Z();5(2.$3.D==1){a.u(o.v);c.B(o.I);7 g=$.p(2.$3[0],\'x.4-3\');5(g)2.x(f,g)}$(2.m).P("14.4-3",[2.4(2.$3[f],2.$l[f])])},15:6(a){7 o=2.8,$z=2.$w.C(a).15(),$1a=2.$l.C(a).15();5($z.J(o.v)&&2.$3.D>1)2.1i(a+(a+1<2.$3.D?1:-1));o.t=$.19($.1W(o.t,6(n,i){k n!=a}),6(n,i){k n>=a?--n:n});2.Z();$(2.m).P("15.4-3",[2.4($z.2F(\'a\')[0],$1a[0])])},1U:6(a){7 o=2.8;5($.1H(a,o.t)==-1)k;7 b=2.$w.C(a).B(o.Q);5($.L.2s){b.17(\'1p\',\'2I-1A\');1s(6(){b.17(\'1p\',\'1A\')},0)}o.t=$.1W(o.t,6(n,i){k n!=a});$(2.m).P("1U.4-3",[2.4(2.$3[a],2.$l[a])])},1V:6(a){7 b=2,o=2.8;5(a!=o.q){2.$w.C(a).u(o.Q);o.t.1M(a);o.t.1I();$(2.m).P("1V.4-3",[2.4(2.$3[a],2.$l[a])])}},1i:6(a){5(1c a==\'26\')a=2.$3.Y(2.$3.R(\'[y$=\'+a+\']\')[0]);2.$3.C(a).2p(2.8.16)},x:6(d,b){7 f=2,o=2.8,$a=2.$3.C(d),a=$a[0];7 e=$a.p(\'x.4-3\');5(!e){1c b==\'6\'&&b();k}5(o.1m){7 h=$(\'1g\',a),1f=h.1n();h.1n(\'<1R>\'+o.1m+\'</1R>\')}7 c=6(){f.$3.R(\'.\'+o.1q).N(6(){$(2).B(o.1q);5(o.1m)$(\'1g\',2).1n(1f)});f.1o=M};7 g=$.1G({},o.1j,{1Q:e,1v:6(r,s){$(a.H).1n(r);c();1c b==\'6\'&&b();5(o.1Z)$.1d(a,\'x.4-3\');$(f.m).P("x.4-3",[f.4(f.$3[d],f.$l[d])]);o.1j.1v&&o.1j.1v(r,s)}});5(2.1o){2.1o.2n();c()}$a.u(o.1q);1s(6(){f.1o=$.2m(g)},0)},1Q:6(a,b){2.$3.C(a).p(\'x.4-3\',b)},12:6(){7 o=2.8;$(2.m).1z(\'.4-3\').B(o.1e).1d(\'4-3\');2.$3.N(6(){7 a=$.p(2,\'y.4-3\');5(a)2.y=a;$(2).1z(\'.4-3\').1d(\'y.4-3\').1d(\'x.4-3\')});2.$w.14(2.$l).N(6(){5($.p(2,\'12.4-3\'))$(2).15();E $(2).B([o.v,o.1r,o.Q,o.V,o.I].2l(\' \'))})}})})(1Y);',62,182,'||this|tabs|ui|if|function|var|options||||||||||||return|panels|element|||data|selected|||disabled|addClass|selectedClass|lis|load|href|li||removeClass|eq|length|else|false|cookie|hash|hideClass|hasClass|show|browser|null|each|showFx|triggerHandler|disabledClass|filter|unselect|replace|fx|panelClass|attr|hide|index|tabify||msie|destroy|id|add|remove|event|css|baseFx|map|panel|bind|typeof|removeData|navClass|label|span|arguments|select|ajaxOptions|blur|true|spinner|html|xhr|display|loadingClass|unselectClass|setTimeout|panelTemplate|location|success|tabId|stop|click|unbind|block|showTab|hideTab|opacity|baseDuration|duration|extend|inArray|sort|div|toShowId|prototype|push|Array|tabTemplate|idPrefix|url|em|appendTo|_|enable|disable|grep|title|jQuery|cache|switchTab|insertBefore|style|test|animate|constructor|string|for|call|concat|unique|nav|slice|parseInt|scrollTo|500|opera|new|insertAfter|apply|fn|join|ajax|abort|has|trigger|tab|instance|safari|8230|z0|Za|Loading|parentNode|child|first|indexOf|undefined|identifier|fragment|Mismatching|find|Tabs|UI|inline|throw|visible|parents|getData|siblings|setData|height|overflow|Function|normal|loading|width|min'.split('|'),0,{}))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/ngg_news_notice.js
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
jQuery(function($){
|
2 |
-
$('#wp-admin-bar-ngg-menu').pointer({
|
3 |
-
content: nggAdmin.content,
|
4 |
-
pointerClass: 'pointer ngg_latest_news_notice',
|
5 |
-
close: function(){
|
6 |
-
setUserSetting(nggAdmin.setting, 1);
|
7 |
-
}
|
8 |
-
}).pointer('open');
|
9 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/sorter.js
DELETED
@@ -1,294 +0,0 @@
|
|
1 |
-
/************************************************************************************************************
|
2 |
-
(C) www.dhtmlgoodies.com, September 2005
|
3 |
-
|
4 |
-
This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website.
|
5 |
-
|
6 |
-
Terms of use:
|
7 |
-
LGPL: See web page for more info.
|
8 |
-
|
9 |
-
Thank you!
|
10 |
-
|
11 |
-
www.dhtmlgoodies.com
|
12 |
-
Alf Magne Kalleland
|
13 |
-
|
14 |
-
//TODO : Contain a marker position error when the window will be scroll down
|
15 |
-
|
16 |
-
************************************************************************************************************/
|
17 |
-
var operaBrowser = navigator.userAgent.indexOf('Opera') >=0 ? 1 : false;
|
18 |
-
var webkitBrowser = navigator.userAgent.indexOf('Safari') >=0 ? false : false;
|
19 |
-
var MSIE = navigator.userAgent.indexOf('MSIE')>= 0 ? true : false;
|
20 |
-
var navigatorVersion = navigator.appVersion.replace(/.*?MSIE (\d\.\d).*/g,'$1')/1;
|
21 |
-
|
22 |
-
function cancelEvent()
|
23 |
-
{
|
24 |
-
return false;
|
25 |
-
}
|
26 |
-
var activeImage = false;
|
27 |
-
var readyToMove = false;
|
28 |
-
var moveTimer = -1;
|
29 |
-
var dragDropDiv;
|
30 |
-
var insertionMarker;
|
31 |
-
|
32 |
-
var offsetX_marker = -3; // offset X - element that indicates destinaton of drop
|
33 |
-
var offsetY_marker = 0; // offset Y - element that indicates destinaton of drop
|
34 |
-
|
35 |
-
var firefoxOffsetX_marker = -3;
|
36 |
-
var firefoxOffsetY_marker = -2;
|
37 |
-
|
38 |
-
if(navigatorVersion<6 && MSIE){ /* IE 5.5 fix */
|
39 |
-
offsetX_marker-=23;
|
40 |
-
offsetY_marker-=10;
|
41 |
-
}
|
42 |
-
|
43 |
-
var destinationObject = false;
|
44 |
-
|
45 |
-
var divXPositions = new Array();
|
46 |
-
var divYPositions = new Array();
|
47 |
-
var divWidth = new Array();
|
48 |
-
var divHeight = new Array();
|
49 |
-
|
50 |
-
var tmpLeft = 0;
|
51 |
-
var tmpTop = 0;
|
52 |
-
|
53 |
-
var eventDiff_x = 0;
|
54 |
-
var eventDiff_y = 0;
|
55 |
-
|
56 |
-
function getTopPos(inputObj)
|
57 |
-
{
|
58 |
-
var returnValue = inputObj.offsetTop;
|
59 |
-
while((inputObj = inputObj.offsetParent) != null){
|
60 |
-
if(inputObj.tagName!='HTML'){
|
61 |
-
returnValue += (inputObj.offsetTop - inputObj.scrollTop);
|
62 |
-
if(document.all)returnValue+=inputObj.clientTop;
|
63 |
-
}
|
64 |
-
}
|
65 |
-
return returnValue;
|
66 |
-
}
|
67 |
-
|
68 |
-
function getLeftPos(inputObj)
|
69 |
-
{
|
70 |
-
var returnValue = inputObj.offsetLeft;
|
71 |
-
while((inputObj = inputObj.offsetParent) != null){
|
72 |
-
if(inputObj.tagName!='HTML'){
|
73 |
-
returnValue += inputObj.offsetLeft;
|
74 |
-
if(document.all)returnValue+=inputObj.clientLeft;
|
75 |
-
}
|
76 |
-
}
|
77 |
-
return returnValue;
|
78 |
-
}
|
79 |
-
|
80 |
-
function selectImage(e)
|
81 |
-
{
|
82 |
-
if(document.all && !operaBrowser)e = event;
|
83 |
-
var obj = this.parentNode;
|
84 |
-
if(activeImage)activeImage.className='imageBox';
|
85 |
-
obj.className = 'imageBoxHighlighted';
|
86 |
-
activeImage = obj;
|
87 |
-
readyToMove = true;
|
88 |
-
moveTimer=0;
|
89 |
-
|
90 |
-
tmpLeft = e.clientX + Math.max(document.body.scrollLeft,document.documentElement.scrollLeft);
|
91 |
-
tmpTop = e.clientY + Math.max(document.body.scrollTop,document.documentElement.scrollTop);
|
92 |
-
|
93 |
-
startMoveTimer();
|
94 |
-
|
95 |
-
return false;
|
96 |
-
}
|
97 |
-
|
98 |
-
function startMoveTimer(){
|
99 |
-
if(moveTimer>=0 && moveTimer<10){
|
100 |
-
moveTimer++;
|
101 |
-
setTimeout('startMoveTimer()',15);
|
102 |
-
}
|
103 |
-
if(moveTimer==10){
|
104 |
-
getDivCoordinates();
|
105 |
-
var subElements = dragDropDiv.getElementsByTagName('DIV');
|
106 |
-
if(subElements.length>0){
|
107 |
-
dragDropDiv.removeChild(subElements[0]);
|
108 |
-
}
|
109 |
-
|
110 |
-
jQuery("#dragDropContent").show();
|
111 |
-
// dragDropDiv.style.display='block';
|
112 |
-
var newDiv = activeImage.cloneNode(true);
|
113 |
-
newDiv.className='imageBox';
|
114 |
-
newDiv.id='';
|
115 |
-
jQuery("#dragDropContent").append(newDiv);
|
116 |
-
//dragDropDiv.appendChild(newDiv);
|
117 |
-
|
118 |
-
jQuery("#dragDropContent").css("top" , tmpTop + 'px');
|
119 |
-
jQuery("#dragDropContent").css("left" , tmpLeft + 'px');
|
120 |
-
// dragDropDiv.style.top = tmpTop + 'px';
|
121 |
-
// dragDropDiv.style.left = tmpLeft + 'px';
|
122 |
-
|
123 |
-
}
|
124 |
-
return false;
|
125 |
-
}
|
126 |
-
|
127 |
-
function dragDropEnd(ev)
|
128 |
-
{
|
129 |
-
readyToMove = false;
|
130 |
-
moveTimer = -1;
|
131 |
-
|
132 |
-
jQuery("#dragDropContent").hide();
|
133 |
-
//dragDropDiv.style.display='none';
|
134 |
-
jQuery("#insertionMarker").hide();
|
135 |
-
//insertionMarker.style.display='none';
|
136 |
-
|
137 |
-
if(destinationObject && destinationObject!=activeImage){
|
138 |
-
var parentObj = destinationObject.parentNode;
|
139 |
-
parentObj.insertBefore(activeImage,destinationObject);
|
140 |
-
activeImage.className='imageBox';
|
141 |
-
activeImage = false;
|
142 |
-
destinationObject=false;
|
143 |
-
getDivCoordinates();
|
144 |
-
}
|
145 |
-
return false;
|
146 |
-
}
|
147 |
-
|
148 |
-
function dragDropMove(e)
|
149 |
-
{
|
150 |
-
if(moveTimer==-1)
|
151 |
-
return;
|
152 |
-
if(document.all && !operaBrowser)
|
153 |
-
e = event;
|
154 |
-
|
155 |
-
if (webkitBrowser) {
|
156 |
-
var leftPos = e.pageX - eventDiff_x;
|
157 |
-
var topPos = e.pageY - eventDiff_y;
|
158 |
-
} else {
|
159 |
-
var leftPos = e.clientX + document.documentElement.scrollLeft - eventDiff_x;
|
160 |
-
var topPos = e.clientY + document.documentElement.scrollTop - eventDiff_y;
|
161 |
-
}
|
162 |
-
|
163 |
-
// message = " topPos: <strong>" + topPos + "</strong> e.pageY: <strong>" + e.pageY + "</strong> e.clientY: <strong>" + e.clientY + "</strong> scrollTop: <strong>" + document.documentElement.scrollTop + "</strong>";
|
164 |
-
// message += "<br /> leftPos: <strong>" + leftPos + "</strong> e.pageX: <strong>" + e.pageX + "</strong> e.clientX: <strong>" + e.clientX + "</strong> scrollLeft: <strong>" + document.documentElement.scrollLeft + "</strong>";
|
165 |
-
//debug( message );
|
166 |
-
|
167 |
-
dragDropDiv.style.top = topPos + 'px';
|
168 |
-
dragDropDiv.style.left = leftPos + 'px';
|
169 |
-
|
170 |
-
leftPos = leftPos + eventDiff_x;
|
171 |
-
topPos = topPos + eventDiff_y;
|
172 |
-
|
173 |
-
if(e.button!=1 && document.all && !operaBrowser)dragDropEnd(e);
|
174 |
-
var elementFound = false;
|
175 |
-
for(var prop in divXPositions){
|
176 |
-
// message = (divXPositions[prop]/1) + " < " + leftPos/1 + " && " + (divXPositions[prop]/1 + divWidth[prop]*0.7) + " > " + (leftPos/1);
|
177 |
-
// message += "<br />" + (divYPositions[prop]/1) + " < " + topPos/1 + " && " + (divYPositions[prop]/1 + divWidth[prop]) + " > " + (topPos/1);
|
178 |
-
// debug( message );
|
179 |
-
if( (divXPositions[prop]/1 < leftPos/1) && ( (divXPositions[prop]/1 + divWidth[prop]*0.7) > leftPos/1) && ( (divYPositions[prop]/1) < topPos/1) && (( (divYPositions[prop]/1) + divWidth[prop]) > topPos/1)) {
|
180 |
-
|
181 |
-
// check for IE who support document.all
|
182 |
-
if( document.all && !webkitBrowser ){
|
183 |
-
offsetX = offsetX_marker;
|
184 |
-
offsetY = offsetY_marker;
|
185 |
-
}else{
|
186 |
-
offsetX = firefoxOffsetX_marker;
|
187 |
-
offsetY = firefoxOffsetY_marker;
|
188 |
-
}
|
189 |
-
jQuery("#insertionMarker").css("top", divYPositions[prop] + offsetY + 'px');
|
190 |
-
//insertionMarker.style.top = divYPositions[prop] + offsetY + 'px';
|
191 |
-
jQuery("#insertionMarker").css("left", divXPositions[prop] + offsetX + 'px');
|
192 |
-
//insertionMarker.style.left = divXPositions[prop] + offsetX + 'px';
|
193 |
-
jQuery("#insertionMarker").show();
|
194 |
-
//insertionMarker.style.display='block';
|
195 |
-
destinationObject = document.getElementById(prop);
|
196 |
-
elementFound = true;
|
197 |
-
break;
|
198 |
-
}
|
199 |
-
}
|
200 |
-
|
201 |
-
|
202 |
-
if(!elementFound){
|
203 |
-
jQuery("#insertionMarker").hide();
|
204 |
-
//insertionMarker.style.display='none';
|
205 |
-
destinationObject = false;
|
206 |
-
}
|
207 |
-
|
208 |
-
return false;
|
209 |
-
|
210 |
-
}
|
211 |
-
|
212 |
-
// brackets are not recognize by jQuery
|
213 |
-
// see http://groups.google.com/group/jquery-en/browse_thread/thread/29438736a4369d7b
|
214 |
-
function $$(selector, context){
|
215 |
-
return jQuery(selector.replace(/(\[|\])/g, '\\$1'),context)
|
216 |
-
}
|
217 |
-
|
218 |
-
function getDivCoordinates()
|
219 |
-
{
|
220 |
-
var divs = document.getElementsByTagName('div');
|
221 |
-
for(var no=0;no<divs.length;no++){
|
222 |
-
if(divs[no].className=='imageBox' || divs[no].className=='imageBoxHighlighted' && divs[no].id){
|
223 |
-
divXPositions[divs[no].id] = getLeftPos(divs[no]);
|
224 |
-
divYPositions[divs[no].id] = getTopPos(divs[no]);
|
225 |
-
divWidth[divs[no].id] = divs[no].offsetWidth;
|
226 |
-
divHeight[divs[no].id] = divs[no].offsetHeight;
|
227 |
-
// show coordinates
|
228 |
-
// $$('#' + divs[no].id + ' span').html("X: " + getLeftPos(divs[no])+ " Y: " + getTopPos(divs[no]));
|
229 |
-
}
|
230 |
-
}
|
231 |
-
}
|
232 |
-
|
233 |
-
// seralize the ImageOrder
|
234 |
-
function saveImageOrder()
|
235 |
-
{
|
236 |
-
var serial = "";
|
237 |
-
var objects = document.getElementsByTagName('div');
|
238 |
-
for(var no=0;no<objects.length;no++){
|
239 |
-
if(objects[no].className=='imageBox' || objects[no].className=='imageBoxHighlighted'){
|
240 |
-
if (serial.length > 0) serial = serial + '&'
|
241 |
-
serial = serial + "sortArray[]=" + objects[no].id;
|
242 |
-
}
|
243 |
-
}
|
244 |
-
jQuery('input[name=sortorder]').val(serial);
|
245 |
-
// debug( 'This is the new order of the images(IDs) : <br>' + orderString );
|
246 |
-
|
247 |
-
}
|
248 |
-
|
249 |
-
function initGallery()
|
250 |
-
{
|
251 |
-
var divs = document.getElementsByTagName('div');
|
252 |
-
for(var no=0;no<divs.length;no++){
|
253 |
-
if(divs[no].className=='imageBox_theImage' || divs[no].className=='imageBox_label'){
|
254 |
-
divs[no].onmousedown = selectImage;
|
255 |
-
}
|
256 |
-
}
|
257 |
-
|
258 |
-
var insObj = document.getElementById('insertionMarker');
|
259 |
-
var images = insObj.getElementsByTagName('IMG');
|
260 |
-
document.body.onselectstart = cancelEvent;
|
261 |
-
document.body.ondragstart = cancelEvent;
|
262 |
-
document.body.onmouseup = dragDropEnd;
|
263 |
-
document.body.onmousemove = dragDropMove;
|
264 |
-
|
265 |
-
|
266 |
-
window.onresize = getDivCoordinates;
|
267 |
-
|
268 |
-
dragDropDiv = document.getElementById('dragDropContent');
|
269 |
-
// insertionMarker = document.getElementById('insertionMarker');
|
270 |
-
jQuery("#insertionMarker").hide();
|
271 |
-
getDivCoordinates();
|
272 |
-
|
273 |
-
var list = document.getElementsByClassName('imageBox');
|
274 |
-
var container = list[0].parentNode;
|
275 |
-
var lastImage = list[list.length-1];
|
276 |
-
|
277 |
-
var fooDiv = document.createElement('div');
|
278 |
-
fooDiv.className = "imageBox";
|
279 |
-
fooDiv.id = "foo";
|
280 |
-
fooDiv.style.cssText = "visibility:hidden";
|
281 |
-
|
282 |
-
if(lastImage.nextSibling){
|
283 |
-
container.insertBefore(fooDiv,lastImage.nextSibling);
|
284 |
-
} else {
|
285 |
-
container.appendChild(fooDiv);
|
286 |
-
}
|
287 |
-
|
288 |
-
}
|
289 |
-
|
290 |
-
function debug(value) {
|
291 |
-
document.getElementById('debug').innerHTML = value;
|
292 |
-
}
|
293 |
-
|
294 |
-
window.onload = initGallery;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/swfobject.js
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
/* SWFObject v2.2 <http://code.google.com/p/swfobject/>
|
2 |
-
is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
|
3 |
-
*/
|
4 |
-
var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}();
|
|
|
|
|
|
|
|
admin/js/swfupload.js
DELETED
@@ -1,986 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* SWFUpload: http://www.swfupload.org, http://swfupload.googlecode.com
|
3 |
-
*
|
4 |
-
* mmSWFUpload 1.0: Flash upload dialog - http://profandesign.se/swfupload/, http://www.vinterwebb.se/
|
5 |
-
*
|
6 |
-
* SWFUpload is (c) 2006-2007 Lars Huring, Olov Nilz�n and Mammon Media and is released under the MIT License:
|
7 |
-
* http://www.opensource.org/licenses/mit-license.php
|
8 |
-
*
|
9 |
-
* SWFUpload 2 is (c) 2007-2008 Jake Roberts and is released under the MIT License:
|
10 |
-
* http://www.opensource.org/licenses/mit-license.php
|
11 |
-
*
|
12 |
-
*/
|
13 |
-
|
14 |
-
|
15 |
-
/* ******************* */
|
16 |
-
/* Constructor & Init */
|
17 |
-
/* ******************* */
|
18 |
-
var SWFUpload;
|
19 |
-
|
20 |
-
if (SWFUpload == undefined) {
|
21 |
-
SWFUpload = function (settings) {
|
22 |
-
this.initSWFUpload(settings);
|
23 |
-
};
|
24 |
-
}
|
25 |
-
|
26 |
-
SWFUpload.prototype.initSWFUpload = function (settings) {
|
27 |
-
try {
|
28 |
-
this.customSettings = {}; // A container where developers can place their own settings associated with this instance.
|
29 |
-
this.settings = settings;
|
30 |
-
this.eventQueue = [];
|
31 |
-
this.movieName = "SWFUpload_" + SWFUpload.movieCount++;
|
32 |
-
this.movieElement = null;
|
33 |
-
|
34 |
-
|
35 |
-
// Setup global control tracking
|
36 |
-
SWFUpload.instances[this.movieName] = this;
|
37 |
-
|
38 |
-
// Load the settings. Load the Flash movie.
|
39 |
-
this.initSettings();
|
40 |
-
this.loadFlash();
|
41 |
-
this.displayDebugInfo();
|
42 |
-
} catch (ex) {
|
43 |
-
delete SWFUpload.instances[this.movieName];
|
44 |
-
throw ex;
|
45 |
-
}
|
46 |
-
};
|
47 |
-
|
48 |
-
/* *************** */
|
49 |
-
/* Static Members */
|
50 |
-
/* *************** */
|
51 |
-
SWFUpload.instances = {};
|
52 |
-
SWFUpload.movieCount = 0;
|
53 |
-
SWFUpload.version = "2.2.0 2009-03-25";
|
54 |
-
SWFUpload.QUEUE_ERROR = {
|
55 |
-
QUEUE_LIMIT_EXCEEDED : -100,
|
56 |
-
FILE_EXCEEDS_SIZE_LIMIT : -110,
|
57 |
-
ZERO_BYTE_FILE : -120,
|
58 |
-
INVALID_FILETYPE : -130
|
59 |
-
};
|
60 |
-
SWFUpload.UPLOAD_ERROR = {
|
61 |
-
HTTP_ERROR : -200,
|
62 |
-
MISSING_UPLOAD_URL : -210,
|
63 |
-
IO_ERROR : -220,
|
64 |
-
SECURITY_ERROR : -230,
|
65 |
-
UPLOAD_LIMIT_EXCEEDED : -240,
|
66 |
-
UPLOAD_FAILED : -250,
|
67 |
-
SPECIFIED_FILE_ID_NOT_FOUND : -260,
|
68 |
-
FILE_VALIDATION_FAILED : -270,
|
69 |
-
FILE_CANCELLED : -280,
|
70 |
-
UPLOAD_STOPPED : -290
|
71 |
-
};
|
72 |
-
SWFUpload.FILE_STATUS = {
|
73 |
-
QUEUED : -1,
|
74 |
-
IN_PROGRESS : -2,
|
75 |
-
ERROR : -3,
|
76 |
-
COMPLETE : -4,
|
77 |
-
CANCELLED : -5
|
78 |
-
};
|
79 |
-
SWFUpload.BUTTON_ACTION = {
|
80 |
-
SELECT_FILE : -100,
|
81 |
-
SELECT_FILES : -110,
|
82 |
-
START_UPLOAD : -120
|
83 |
-
};
|
84 |
-
SWFUpload.CURSOR = {
|
85 |
-
ARROW : -1,
|
86 |
-
HAND : -2
|
87 |
-
};
|
88 |
-
SWFUpload.WINDOW_MODE = {
|
89 |
-
WINDOW : "window",
|
90 |
-
TRANSPARENT : "transparent",
|
91 |
-
OPAQUE : "opaque"
|
92 |
-
};
|
93 |
-
|
94 |
-
// Private: takes a URL, determines if it is relative and converts to an absolute URL
|
95 |
-
// using the current site. Only processes the URL if it can, otherwise returns the URL untouched
|
96 |
-
SWFUpload.completeURL = function(url) {
|
97 |
-
if (typeof(url) !== "string" || url.match(/^https?:\/\//i) || url.match(/^\//)) {
|
98 |
-
return url;
|
99 |
-
}
|
100 |
-
|
101 |
-
var currentURL = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ":" + window.location.port : "");
|
102 |
-
|
103 |
-
var indexSlash = window.location.pathname.lastIndexOf("/");
|
104 |
-
if (indexSlash <= 0) {
|
105 |
-
path = "/";
|
106 |
-
} else {
|
107 |
-
path = window.location.pathname.substr(0, indexSlash) + "/";
|
108 |
-
}
|
109 |
-
|
110 |
-
return /*currentURL +*/ path + url;
|
111 |
-
|
112 |
-
};
|
113 |
-
|
114 |
-
|
115 |
-
/* ******************** */
|
116 |
-
/* Instance Members */
|
117 |
-
/* ******************** */
|
118 |
-
|
119 |
-
// Private: initSettings ensures that all the
|
120 |
-
// settings are set, getting a default value if one was not assigned.
|
121 |
-
SWFUpload.prototype.initSettings = function () {
|
122 |
-
this.ensureDefault = function (settingName, defaultValue) {
|
123 |
-
this.settings[settingName] = (this.settings[settingName] == undefined) ? defaultValue : this.settings[settingName];
|
124 |
-
};
|
125 |
-
|
126 |
-
// Upload backend settings
|
127 |
-
this.ensureDefault("upload_url", "");
|
128 |
-
this.ensureDefault("preserve_relative_urls", false);
|
129 |
-
this.ensureDefault("file_post_name", "Filedata");
|
130 |
-
this.ensureDefault("post_params", {});
|
131 |
-
this.ensureDefault("use_query_string", false);
|
132 |
-
this.ensureDefault("requeue_on_error", false);
|
133 |
-
this.ensureDefault("http_success", []);
|
134 |
-
this.ensureDefault("assume_success_timeout", 0);
|
135 |
-
|
136 |
-
// File Settings
|
137 |
-
this.ensureDefault("file_types", "*.*");
|
138 |
-
this.ensureDefault("file_types_description", "All Files");
|
139 |
-
this.ensureDefault("file_size_limit", 0); // Default zero means "unlimited"
|
140 |
-
this.ensureDefault("file_upload_limit", 0);
|
141 |
-
this.ensureDefault("file_queue_limit", 0);
|
142 |
-
|
143 |
-
// Flash Settings
|
144 |
-
this.ensureDefault("flash_url", "swfupload.swf");
|
145 |
-
this.ensureDefault("prevent_swf_caching", true);
|
146 |
-
|
147 |
-
// Button Settings
|
148 |
-
this.ensureDefault("button_image_url", "");
|
149 |
-
this.ensureDefault("button_width", 1);
|
150 |
-
this.ensureDefault("button_height", 1);
|
151 |
-
this.ensureDefault("button_text", "");
|
152 |
-
this.ensureDefault("button_text_style", "color: #000000; font-size: 16pt;");
|
153 |
-
this.ensureDefault("button_text_top_padding", 0);
|
154 |
-
this.ensureDefault("button_text_left_padding", 0);
|
155 |
-
this.ensureDefault("button_action", SWFUpload.BUTTON_ACTION.SELECT_FILES);
|
156 |
-
this.ensureDefault("button_disabled", false);
|
157 |
-
this.ensureDefault("button_placeholder_id", "");
|
158 |
-
this.ensureDefault("button_placeholder", null);
|
159 |
-
this.ensureDefault("button_cursor", SWFUpload.CURSOR.ARROW);
|
160 |
-
this.ensureDefault("button_window_mode", SWFUpload.WINDOW_MODE.WINDOW);
|
161 |
-
|
162 |
-
// Debug Settings
|
163 |
-
this.ensureDefault("debug", false);
|
164 |
-
this.settings.debug_enabled = this.settings.debug; // Here to maintain v2 API
|
165 |
-
|
166 |
-
// Event Handlers
|
167 |
-
this.settings.return_upload_start_handler = this.returnUploadStart;
|
168 |
-
this.ensureDefault("swfupload_loaded_handler", null);
|
169 |
-
this.ensureDefault("file_dialog_start_handler", null);
|
170 |
-
this.ensureDefault("file_queued_handler", null);
|
171 |
-
this.ensureDefault("file_queue_error_handler", null);
|
172 |
-
this.ensureDefault("file_dialog_complete_handler", null);
|
173 |
-
|
174 |
-
this.ensureDefault("upload_start_handler", null);
|
175 |
-
this.ensureDefault("upload_progress_handler", null);
|
176 |
-
this.ensureDefault("upload_error_handler", null);
|
177 |
-
this.ensureDefault("upload_success_handler", null);
|
178 |
-
this.ensureDefault("upload_complete_handler", null);
|
179 |
-
|
180 |
-
this.ensureDefault("debug_handler", this.debugMessage);
|
181 |
-
|
182 |
-
this.ensureDefault("custom_settings", {});
|
183 |
-
|
184 |
-
// Other settings
|
185 |
-
this.customSettings = this.settings.custom_settings;
|
186 |
-
|
187 |
-
// Update the flash url if needed
|
188 |
-
if (!!this.settings.prevent_swf_caching) {
|
189 |
-
this.settings.flash_url = this.settings.flash_url + (this.settings.flash_url.indexOf("?") < 0 ? "?" : "&") + "preventswfcaching=" + new Date().getTime();
|
190 |
-
}
|
191 |
-
|
192 |
-
if (!this.settings.preserve_relative_urls) {
|
193 |
-
//this.settings.flash_url = SWFUpload.completeURL(this.settings.flash_url); // Don't need to do this one since flash doesn't look at it
|
194 |
-
this.settings.upload_url = SWFUpload.completeURL(this.settings.upload_url);
|
195 |
-
this.settings.button_image_url = SWFUpload.completeURL(this.settings.button_image_url);
|
196 |
-
}
|
197 |
-
|
198 |
-
delete this.ensureDefault;
|
199 |
-
};
|
200 |
-
|
201 |
-
// Private: loadFlash replaces the button_placeholder element with the flash movie.
|
202 |
-
SWFUpload.prototype.loadFlash = function () {
|
203 |
-
var targetElement, tempParent;
|
204 |
-
|
205 |
-
// Make sure an element with the ID we are going to use doesn't already exist
|
206 |
-
if (document.getElementById(this.movieName) !== null) {
|
207 |
-
throw "ID " + this.movieName + " is already in use. The Flash Object could not be added";
|
208 |
-
}
|
209 |
-
|
210 |
-
// Get the element where we will be placing the flash movie
|
211 |
-
targetElement = document.getElementById(this.settings.button_placeholder_id) || this.settings.button_placeholder;
|
212 |
-
|
213 |
-
if (targetElement == undefined) {
|
214 |
-
throw "Could not find the placeholder element: " + this.settings.button_placeholder_id;
|
215 |
-
}
|
216 |
-
|
217 |
-
// Append the container and load the flash
|
218 |
-
tempParent = document.createElement("div");
|
219 |
-
tempParent.innerHTML = this.getFlashHTML(); // Using innerHTML is non-standard but the only sensible way to dynamically add Flash in IE (and maybe other browsers)
|
220 |
-
targetElement.parentNode.replaceChild(tempParent.firstChild, targetElement);
|
221 |
-
|
222 |
-
// Fix IE Flash/Form bug
|
223 |
-
if (window[this.movieName] == undefined) {
|
224 |
-
window[this.movieName] = this.getMovieElement();
|
225 |
-
}
|
226 |
-
|
227 |
-
};
|
228 |
-
|
229 |
-
// Private: getFlashHTML generates the object tag needed to embed the flash in to the document
|
230 |
-
SWFUpload.prototype.getFlashHTML = function () {
|
231 |
-
// Flash Satay object syntax: http://www.alistapart.com/articles/flashsatay
|
232 |
-
return ['<object id="', this.movieName, '" type="application/x-shockwave-flash" data="', this.settings.flash_url, '" width="', this.settings.button_width, '" height="', this.settings.button_height, '" class="swfupload">',
|
233 |
-
'<param name="wmode" value="', this.settings.button_window_mode, '" />',
|
234 |
-
'<param name="movie" value="', this.settings.flash_url, '" />',
|
235 |
-
'<param name="quality" value="high" />',
|
236 |
-
'<param name="menu" value="false" />',
|
237 |
-
'<param name="allowScriptAccess" value="always" />',
|
238 |
-
'<param name="flashvars" value="' + this.getFlashVars() + '" />',
|
239 |
-
'</object>'].join("");
|
240 |
-
};
|
241 |
-
|
242 |
-
// Private: getFlashVars builds the parameter string that will be passed
|
243 |
-
// to flash in the flashvars param.
|
244 |
-
SWFUpload.prototype.getFlashVars = function () {
|
245 |
-
// Build a string from the post param object
|
246 |
-
var paramString = this.buildParamString();
|
247 |
-
var httpSuccessString = this.settings.http_success.join(",");
|
248 |
-
|
249 |
-
// Build the parameter string
|
250 |
-
return ["movieName=", encodeURIComponent(this.movieName),
|
251 |
-
"&uploadURL=", encodeURIComponent(this.settings.upload_url),
|
252 |
-
"&useQueryString=", encodeURIComponent(this.settings.use_query_string),
|
253 |
-
"&requeueOnError=", encodeURIComponent(this.settings.requeue_on_error),
|
254 |
-
"&httpSuccess=", encodeURIComponent(httpSuccessString),
|
255 |
-
"&assumeSuccessTimeout=", encodeURIComponent(this.settings.assume_success_timeout),
|
256 |
-
"&params=", encodeURIComponent(paramString),
|
257 |
-
"&filePostName=", encodeURIComponent(this.settings.file_post_name),
|
258 |
-
"&fileTypes=", encodeURIComponent(this.settings.file_types),
|
259 |
-
"&fileTypesDescription=", encodeURIComponent(this.settings.file_types_description),
|
260 |
-
"&fileSizeLimit=", encodeURIComponent(this.settings.file_size_limit),
|
261 |
-
"&fileUploadLimit=", encodeURIComponent(this.settings.file_upload_limit),
|
262 |
-
"&fileQueueLimit=", encodeURIComponent(this.settings.file_queue_limit),
|
263 |
-
"&debugEnabled=", encodeURIComponent(this.settings.debug_enabled),
|
264 |
-
"&buttonImageURL=", encodeURIComponent(this.settings.button_image_url),
|
265 |
-
"&buttonWidth=", encodeURIComponent(this.settings.button_width),
|
266 |
-
"&buttonHeight=", encodeURIComponent(this.settings.button_height),
|
267 |
-
"&buttonText=", encodeURIComponent(this.settings.button_text),
|
268 |
-
"&buttonTextTopPadding=", encodeURIComponent(this.settings.button_text_top_padding),
|
269 |
-
"&buttonTextLeftPadding=", encodeURIComponent(this.settings.button_text_left_padding),
|
270 |
-
"&buttonTextStyle=", encodeURIComponent(this.settings.button_text_style),
|
271 |
-
"&buttonAction=", encodeURIComponent(this.settings.button_action),
|
272 |
-
"&buttonDisabled=", encodeURIComponent(this.settings.button_disabled),
|
273 |
-
"&buttonCursor=", encodeURIComponent(this.settings.button_cursor)
|
274 |
-
].join("");
|
275 |
-
};
|
276 |
-
|
277 |
-
// Public: getMovieElement retrieves the DOM reference to the Flash element added by SWFUpload
|
278 |
-
// The element is cached after the first lookup
|
279 |
-
SWFUpload.prototype.getMovieElement = function () {
|
280 |
-
if (this.movieElement == undefined) {
|
281 |
-
this.movieElement = document.getElementById(this.movieName);
|
282 |
-
}
|
283 |
-
|
284 |
-
if (this.movieElement === null) {
|
285 |
-
throw "Could not find Flash element";
|
286 |
-
}
|
287 |
-
|
288 |
-
return this.movieElement;
|
289 |
-
};
|
290 |
-
|
291 |
-
// Private: buildParamString takes the name/value pairs in the post_params setting object
|
292 |
-
// and joins them up in to a string formatted "name=value&name=value"
|
293 |
-
SWFUpload.prototype.buildParamString = function () {
|
294 |
-
var postParams = this.settings.post_params;
|
295 |
-
var paramStringPairs = [];
|
296 |
-
|
297 |
-
if (typeof(postParams) === "object") {
|
298 |
-
for (var name in postParams) {
|
299 |
-
if (postParams.hasOwnProperty(name)) {
|
300 |
-
paramStringPairs.push(encodeURIComponent(name.toString()) + "=" + encodeURIComponent(postParams[name].toString()));
|
301 |
-
}
|
302 |
-
}
|
303 |
-
}
|
304 |
-
|
305 |
-
return paramStringPairs.join("&");
|
306 |
-
};
|
307 |
-
|
308 |
-
// Public: Used to remove a SWFUpload instance from the page. This method strives to remove
|
309 |
-
// all references to the SWF, and other objects so memory is properly freed.
|
310 |
-
// Returns true if everything was destroyed. Returns a false if a failure occurs leaving SWFUpload in an inconsistant state.
|
311 |
-
// Credits: Major improvements provided by steffen
|
312 |
-
SWFUpload.prototype.destroy = function () {
|
313 |
-
try {
|
314 |
-
// Make sure Flash is done before we try to remove it
|
315 |
-
this.cancelUpload(null, false);
|
316 |
-
|
317 |
-
|
318 |
-
// Remove the SWFUpload DOM nodes
|
319 |
-
var movieElement = null;
|
320 |
-
movieElement = this.getMovieElement();
|
321 |
-
|
322 |
-
if (movieElement && typeof(movieElement.CallFunction) === "unknown") { // We only want to do this in IE
|
323 |
-
// Loop through all the movie's properties and remove all function references (DOM/JS IE 6/7 memory leak workaround)
|
324 |
-
for (var i in movieElement) {
|
325 |
-
try {
|
326 |
-
if (typeof(movieElement[i]) === "function") {
|
327 |
-
movieElement[i] = null;
|
328 |
-
}
|
329 |
-
} catch (ex1) {}
|
330 |
-
}
|
331 |
-
|
332 |
-
// Remove the Movie Element from the page
|
333 |
-
try {
|
334 |
-
movieElement.parentNode.removeChild(movieElement);
|
335 |
-
} catch (ex) {}
|
336 |
-
}
|
337 |
-
|
338 |
-
// Remove IE form fix reference
|
339 |
-
window[this.movieName] = null;
|
340 |
-
|
341 |
-
// Destroy other references
|
342 |
-
SWFUpload.instances[this.movieName] = null;
|
343 |
-
delete SWFUpload.instances[this.movieName];
|
344 |
-
|
345 |
-
this.movieElement = null;
|
346 |
-
this.settings = null;
|
347 |
-
this.customSettings = null;
|
348 |
-
this.eventQueue = null;
|
349 |
-
this.movieName = null;
|
350 |
-
|
351 |
-
|
352 |
-
return true;
|
353 |
-
} catch (ex2) {
|
354 |
-
return false;
|
355 |
-
}
|
356 |
-
};
|
357 |
-
|
358 |
-
|
359 |
-
// Public: displayDebugInfo prints out settings and configuration
|
360 |
-
// information about this SWFUpload instance.
|
361 |
-
// This function (and any references to it) can be deleted when placing
|
362 |
-
// SWFUpload in production.
|
363 |
-
SWFUpload.prototype.displayDebugInfo = function () {
|
364 |
-
this.debug(
|
365 |
-
[
|
366 |
-
"---SWFUpload Instance Info---\n",
|
367 |
-
"Version: ", SWFUpload.version, "\n",
|
368 |
-
"Movie Name: ", this.movieName, "\n",
|
369 |
-
"Settings:\n",
|
370 |
-
"\t", "upload_url: ", this.settings.upload_url, "\n",
|
371 |
-
"\t", "flash_url: ", this.settings.flash_url, "\n",
|
372 |
-
"\t", "use_query_string: ", this.settings.use_query_string.toString(), "\n",
|
373 |
-
"\t", "requeue_on_error: ", this.settings.requeue_on_error.toString(), "\n",
|
374 |
-
"\t", "http_success: ", this.settings.http_success.join(", "), "\n",
|
375 |
-
"\t", "assume_success_timeout: ", this.settings.assume_success_timeout, "\n",
|
376 |
-
"\t", "file_post_name: ", this.settings.file_post_name, "\n",
|
377 |
-
"\t", "post_params: ", this.settings.post_params.toString(), "\n",
|
378 |
-
"\t", "file_types: ", this.settings.file_types, "\n",
|
379 |
-
"\t", "file_types_description: ", this.settings.file_types_description, "\n",
|
380 |
-
"\t", "file_size_limit: ", this.settings.file_size_limit, "\n",
|
381 |
-
"\t", "file_upload_limit: ", this.settings.file_upload_limit, "\n",
|
382 |
-
"\t", "file_queue_limit: ", this.settings.file_queue_limit, "\n",
|
383 |
-
"\t", "debug: ", this.settings.debug.toString(), "\n",
|
384 |
-
|
385 |
-
"\t", "prevent_swf_caching: ", this.settings.prevent_swf_caching.toString(), "\n",
|
386 |
-
|
387 |
-
"\t", "button_placeholder_id: ", this.settings.button_placeholder_id.toString(), "\n",
|
388 |
-
"\t", "button_placeholder: ", (this.settings.button_placeholder ? "Set" : "Not Set"), "\n",
|
389 |
-
"\t", "button_image_url: ", this.settings.button_image_url.toString(), "\n",
|
390 |
-
"\t", "button_width: ", this.settings.button_width.toString(), "\n",
|
391 |
-
"\t", "button_height: ", this.settings.button_height.toString(), "\n",
|
392 |
-
"\t", "button_text: ", this.settings.button_text.toString(), "\n",
|
393 |
-
"\t", "button_text_style: ", this.settings.button_text_style.toString(), "\n",
|
394 |
-
"\t", "button_text_top_padding: ", this.settings.button_text_top_padding.toString(), "\n",
|
395 |
-
"\t", "button_text_left_padding: ", this.settings.button_text_left_padding.toString(), "\n",
|
396 |
-
"\t", "button_action: ", this.settings.button_action.toString(), "\n",
|
397 |
-
"\t", "button_disabled: ", this.settings.button_disabled.toString(), "\n",
|
398 |
-
|
399 |
-
"\t", "custom_settings: ", this.settings.custom_settings.toString(), "\n",
|
400 |
-
"Event Handlers:\n",
|
401 |
-
"\t", "swfupload_loaded_handler assigned: ", (typeof this.settings.swfupload_loaded_handler === "function").toString(), "\n",
|
402 |
-
"\t", "file_dialog_start_handler assigned: ", (typeof this.settings.file_dialog_start_handler === "function").toString(), "\n",
|
403 |
-
"\t", "file_queued_handler assigned: ", (typeof this.settings.file_queued_handler === "function").toString(), "\n",
|
404 |
-
"\t", "file_queue_error_handler assigned: ", (typeof this.settings.file_queue_error_handler === "function").toString(), "\n",
|
405 |
-
"\t", "upload_start_handler assigned: ", (typeof this.settings.upload_start_handler === "function").toString(), "\n",
|
406 |
-
"\t", "upload_progress_handler assigned: ", (typeof this.settings.upload_progress_handler === "function").toString(), "\n",
|
407 |
-
"\t", "upload_error_handler assigned: ", (typeof this.settings.upload_error_handler === "function").toString(), "\n",
|
408 |
-
"\t", "upload_success_handler assigned: ", (typeof this.settings.upload_success_handler === "function").toString(), "\n",
|
409 |
-
"\t", "upload_complete_handler assigned: ", (typeof this.settings.upload_complete_handler === "function").toString(), "\n",
|
410 |
-
"\t", "debug_handler assigned: ", (typeof this.settings.debug_handler === "function").toString(), "\n"
|
411 |
-
].join("")
|
412 |
-
);
|
413 |
-
};
|
414 |
-
|
415 |
-
/* Note: addSetting and getSetting are no longer used by SWFUpload but are included
|
416 |
-
the maintain v2 API compatibility
|
417 |
-
*/
|
418 |
-
// Public: (Deprecated) addSetting adds a setting value. If the value given is undefined or null then the default_value is used.
|
419 |
-
SWFUpload.prototype.addSetting = function (name, value, default_value) {
|
420 |
-
if (value == undefined) {
|
421 |
-
return (this.settings[name] = default_value);
|
422 |
-
} else {
|
423 |
-
return (this.settings[name] = value);
|
424 |
-
}
|
425 |
-
};
|
426 |
-
|
427 |
-
// Public: (Deprecated) getSetting gets a setting. Returns an empty string if the setting was not found.
|
428 |
-
SWFUpload.prototype.getSetting = function (name) {
|
429 |
-
if (this.settings[name] != undefined) {
|
430 |
-
return this.settings[name];
|
431 |
-
}
|
432 |
-
|
433 |
-
return "";
|
434 |
-
};
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
// Private: callFlash handles function calls made to the Flash element.
|
439 |
-
// Calls are made with a setTimeout for some functions to work around
|
440 |
-
// bugs in the ExternalInterface library.
|
441 |
-
SWFUpload.prototype.callFlash = function (functionName, argumentArray) {
|
442 |
-
argumentArray = argumentArray || [];
|
443 |
-
|
444 |
-
var movieElement = this.getMovieElement();
|
445 |
-
var returnValue, returnString;
|
446 |
-
|
447 |
-
// Flash's method if calling ExternalInterface methods (code adapted from MooTools).
|
448 |
-
try {
|
449 |
-
returnString = movieElement.CallFunction('<invoke name="' + functionName + '" returntype="javascript">' + __flash__argumentsToXML(argumentArray, 0) + '</invoke>');
|
450 |
-
returnValue = eval(returnString);
|
451 |
-
} catch (ex) {
|
452 |
-
throw "Call to " + functionName + " failed";
|
453 |
-
}
|
454 |
-
|
455 |
-
// Unescape file post param values
|
456 |
-
if (returnValue != undefined && typeof returnValue.post === "object") {
|
457 |
-
returnValue = this.unescapeFilePostParams(returnValue);
|
458 |
-
}
|
459 |
-
|
460 |
-
return returnValue;
|
461 |
-
};
|
462 |
-
|
463 |
-
/* *****************************
|
464 |
-
-- Flash control methods --
|
465 |
-
Your UI should use these
|
466 |
-
to operate SWFUpload
|
467 |
-
***************************** */
|
468 |
-
|
469 |
-
// WARNING: this function does not work in Flash Player 10
|
470 |
-
// Public: selectFile causes a File Selection Dialog window to appear. This
|
471 |
-
// dialog only allows 1 file to be selected.
|
472 |
-
SWFUpload.prototype.selectFile = function () {
|
473 |
-
this.callFlash("SelectFile");
|
474 |
-
};
|
475 |
-
|
476 |
-
// WARNING: this function does not work in Flash Player 10
|
477 |
-
// Public: selectFiles causes a File Selection Dialog window to appear/ This
|
478 |
-
// dialog allows the user to select any number of files
|
479 |
-
// Flash Bug Warning: Flash limits the number of selectable files based on the combined length of the file names.
|
480 |
-
// If the selection name length is too long the dialog will fail in an unpredictable manner. There is no work-around
|
481 |
-
// for this bug.
|
482 |
-
SWFUpload.prototype.selectFiles = function () {
|
483 |
-
this.callFlash("SelectFiles");
|
484 |
-
};
|
485 |
-
|
486 |
-
|
487 |
-
// Public: startUpload starts uploading the first file in the queue unless
|
488 |
-
// the optional parameter 'fileID' specifies the ID
|
489 |
-
SWFUpload.prototype.startUpload = function (fileID) {
|
490 |
-
this.callFlash("StartUpload", [fileID]);
|
491 |
-
};
|
492 |
-
|
493 |
-
// Public: cancelUpload cancels any queued file. The fileID parameter may be the file ID or index.
|
494 |
-
// If you do not specify a fileID the current uploading file or first file in the queue is cancelled.
|
495 |
-
// If you do not want the uploadError event to trigger you can specify false for the triggerErrorEvent parameter.
|
496 |
-
SWFUpload.prototype.cancelUpload = function (fileID, triggerErrorEvent) {
|
497 |
-
if (triggerErrorEvent !== false) {
|
498 |
-
triggerErrorEvent = true;
|
499 |
-
}
|
500 |
-
this.callFlash("CancelUpload", [fileID, triggerErrorEvent]);
|
501 |
-
};
|
502 |
-
|
503 |
-
// Public: stopUpload stops the current upload and requeues the file at the beginning of the queue.
|
504 |
-
// If nothing is currently uploading then nothing happens.
|
505 |
-
SWFUpload.prototype.stopUpload = function () {
|
506 |
-
this.callFlash("StopUpload");
|
507 |
-
};
|
508 |
-
|
509 |
-
/* ************************
|
510 |
-
* Settings methods
|
511 |
-
* These methods change the SWFUpload settings.
|
512 |
-
* SWFUpload settings should not be changed directly on the settings object
|
513 |
-
* since many of the settings need to be passed to Flash in order to take
|
514 |
-
* effect.
|
515 |
-
* *********************** */
|
516 |
-
|
517 |
-
// Public: getStats gets the file statistics object.
|
518 |
-
SWFUpload.prototype.getStats = function () {
|
519 |
-
return this.callFlash("GetStats");
|
520 |
-
};
|
521 |
-
|
522 |
-
// Public: setStats changes the SWFUpload statistics. You shouldn't need to
|
523 |
-
// change the statistics but you can. Changing the statistics does not
|
524 |
-
// affect SWFUpload accept for the successful_uploads count which is used
|
525 |
-
// by the upload_limit setting to determine how many files the user may upload.
|
526 |
-
SWFUpload.prototype.setStats = function (statsObject) {
|
527 |
-
this.callFlash("SetStats", [statsObject]);
|
528 |
-
};
|
529 |
-
|
530 |
-
// Public: getFile retrieves a File object by ID or Index. If the file is
|
531 |
-
// not found then 'null' is returned.
|
532 |
-
SWFUpload.prototype.getFile = function (fileID) {
|
533 |
-
if (typeof(fileID) === "number") {
|
534 |
-
return this.callFlash("GetFileByIndex", [fileID]);
|
535 |
-
} else {
|
536 |
-
return this.callFlash("GetFile", [fileID]);
|
537 |
-
}
|
538 |
-
};
|
539 |
-
|
540 |
-
// Public: addFileParam sets a name/value pair that will be posted with the
|
541 |
-
// file specified by the Files ID. If the name already exists then the
|
542 |
-
// exiting value will be overwritten.
|
543 |
-
SWFUpload.prototype.addFileParam = function (fileID, name, value) {
|
544 |
-
return this.callFlash("AddFileParam", [fileID, name, value]);
|
545 |
-
};
|
546 |
-
|
547 |
-
// Public: removeFileParam removes a previously set (by addFileParam) name/value
|
548 |
-
// pair from the specified file.
|
549 |
-
SWFUpload.prototype.removeFileParam = function (fileID, name) {
|
550 |
-
this.callFlash("RemoveFileParam", [fileID, name]);
|
551 |
-
};
|
552 |
-
|
553 |
-
// Public: setUploadUrl changes the upload_url setting.
|
554 |
-
SWFUpload.prototype.setUploadURL = function (url) {
|
555 |
-
this.settings.upload_url = url.toString();
|
556 |
-
this.callFlash("SetUploadURL", [url]);
|
557 |
-
};
|
558 |
-
|
559 |
-
// Public: setPostParams changes the post_params setting
|
560 |
-
SWFUpload.prototype.setPostParams = function (paramsObject) {
|
561 |
-
this.settings.post_params = paramsObject;
|
562 |
-
this.callFlash("SetPostParams", [paramsObject]);
|
563 |
-
};
|
564 |
-
|
565 |
-
// Public: addPostParam adds post name/value pair. Each name can have only one value.
|
566 |
-
SWFUpload.prototype.addPostParam = function (name, value) {
|
567 |
-
this.settings.post_params[name] = value;
|
568 |
-
this.callFlash("SetPostParams", [this.settings.post_params]);
|
569 |
-
};
|
570 |
-
|
571 |
-
// Public: removePostParam deletes post name/value pair.
|
572 |
-
SWFUpload.prototype.removePostParam = function (name) {
|
573 |
-
delete this.settings.post_params[name];
|
574 |
-
this.callFlash("SetPostParams", [this.settings.post_params]);
|
575 |
-
};
|
576 |
-
|
577 |
-
// Public: setFileTypes changes the file_types setting and the file_types_description setting
|
578 |
-
SWFUpload.prototype.setFileTypes = function (types, description) {
|
579 |
-
this.settings.file_types = types;
|
580 |
-
this.settings.file_types_description = description;
|
581 |
-
this.callFlash("SetFileTypes", [types, description]);
|
582 |
-
};
|
583 |
-
|
584 |
-
// Public: setFileSizeLimit changes the file_size_limit setting
|
585 |
-
SWFUpload.prototype.setFileSizeLimit = function (fileSizeLimit) {
|
586 |
-
this.settings.file_size_limit = fileSizeLimit;
|
587 |
-
this.callFlash("SetFileSizeLimit", [fileSizeLimit]);
|
588 |
-
};
|
589 |
-
|
590 |
-
// Public: setFileUploadLimit changes the file_upload_limit setting
|
591 |
-
SWFUpload.prototype.setFileUploadLimit = function (fileUploadLimit) {
|
592 |
-
this.settings.file_upload_limit = fileUploadLimit;
|
593 |
-
this.callFlash("SetFileUploadLimit", [fileUploadLimit]);
|
594 |
-
};
|
595 |
-
|
596 |
-
// Public: setFileQueueLimit changes the file_queue_limit setting
|
597 |
-
SWFUpload.prototype.setFileQueueLimit = function (fileQueueLimit) {
|
598 |
-
this.settings.file_queue_limit = fileQueueLimit;
|
599 |
-
this.callFlash("SetFileQueueLimit", [fileQueueLimit]);
|
600 |
-
};
|
601 |
-
|
602 |
-
// Public: setFilePostName changes the file_post_name setting
|
603 |
-
SWFUpload.prototype.setFilePostName = function (filePostName) {
|
604 |
-
this.settings.file_post_name = filePostName;
|
605 |
-
this.callFlash("SetFilePostName", [filePostName]);
|
606 |
-
};
|
607 |
-
|
608 |
-
// Public: setUseQueryString changes the use_query_string setting
|
609 |
-
SWFUpload.prototype.setUseQueryString = function (useQueryString) {
|
610 |
-
this.settings.use_query_string = useQueryString;
|
611 |
-
this.callFlash("SetUseQueryString", [useQueryString]);
|
612 |
-
};
|
613 |
-
|
614 |
-
// Public: setRequeueOnError changes the requeue_on_error setting
|
615 |
-
SWFUpload.prototype.setRequeueOnError = function (requeueOnError) {
|
616 |
-
this.settings.requeue_on_error = requeueOnError;
|
617 |
-
this.callFlash("SetRequeueOnError", [requeueOnError]);
|
618 |
-
};
|
619 |
-
|
620 |
-
// Public: setHTTPSuccess changes the http_success setting
|
621 |
-
SWFUpload.prototype.setHTTPSuccess = function (http_status_codes) {
|
622 |
-
if (typeof http_status_codes === "string") {
|
623 |
-
http_status_codes = http_status_codes.replace(" ", "").split(",");
|
624 |
-
}
|
625 |
-
|
626 |
-
this.settings.http_success = http_status_codes;
|
627 |
-
this.callFlash("SetHTTPSuccess", [http_status_codes]);
|
628 |
-
};
|
629 |
-
|
630 |
-
// Public: setHTTPSuccess changes the http_success setting
|
631 |
-
SWFUpload.prototype.setAssumeSuccessTimeout = function (timeout_seconds) {
|
632 |
-
this.settings.assume_success_timeout = timeout_seconds;
|
633 |
-
this.callFlash("SetAssumeSuccessTimeout", [timeout_seconds]);
|
634 |
-
};
|
635 |
-
|
636 |
-
// Public: setDebugEnabled changes the debug_enabled setting
|
637 |
-
SWFUpload.prototype.setDebugEnabled = function (debugEnabled) {
|
638 |
-
this.settings.debug_enabled = debugEnabled;
|
639 |
-
this.callFlash("SetDebugEnabled", [debugEnabled]);
|
640 |
-
};
|
641 |
-
|
642 |
-
// Public: setButtonImageURL loads a button image sprite
|
643 |
-
SWFUpload.prototype.setButtonImageURL = function (buttonImageURL) {
|
644 |
-
if (buttonImageURL == undefined) {
|
645 |
-
buttonImageURL = "";
|
646 |
-
}
|
647 |
-
|
648 |
-
this.settings.button_image_url = buttonImageURL;
|
649 |
-
this.callFlash("SetButtonImageURL", [buttonImageURL]);
|
650 |
-
};
|
651 |
-
|
652 |
-
// Public: setButtonDimensions resizes the Flash Movie and button
|
653 |
-
SWFUpload.prototype.setButtonDimensions = function (width, height) {
|
654 |
-
this.settings.button_width = width;
|
655 |
-
this.settings.button_height = height;
|
656 |
-
|
657 |
-
var movie = this.getMovieElement();
|
658 |
-
if (movie != undefined) {
|
659 |
-
movie.style.width = width + "px";
|
660 |
-
movie.style.height = height + "px";
|
661 |
-
}
|
662 |
-
|
663 |
-
this.callFlash("SetButtonDimensions", [width, height]);
|
664 |
-
};
|
665 |
-
// Public: setButtonText Changes the text overlaid on the button
|
666 |
-
SWFUpload.prototype.setButtonText = function (html) {
|
667 |
-
this.settings.button_text = html;
|
668 |
-
this.callFlash("SetButtonText", [html]);
|
669 |
-
};
|
670 |
-
// Public: setButtonTextPadding changes the top and left padding of the text overlay
|
671 |
-
SWFUpload.prototype.setButtonTextPadding = function (left, top) {
|
672 |
-
this.settings.button_text_top_padding = top;
|
673 |
-
this.settings.button_text_left_padding = left;
|
674 |
-
this.callFlash("SetButtonTextPadding", [left, top]);
|
675 |
-
};
|
676 |
-
|
677 |
-
// Public: setButtonTextStyle changes the CSS used to style the HTML/Text overlaid on the button
|
678 |
-
SWFUpload.prototype.setButtonTextStyle = function (css) {
|
679 |
-
this.settings.button_text_style = css;
|
680 |
-
this.callFlash("SetButtonTextStyle", [css]);
|
681 |
-
};
|
682 |
-
// Public: setButtonDisabled disables/enables the button
|
683 |
-
SWFUpload.prototype.setButtonDisabled = function (isDisabled) {
|
684 |
-
this.settings.button_disabled = isDisabled;
|
685 |
-
this.callFlash("SetButtonDisabled", [isDisabled]);
|
686 |
-
};
|
687 |
-
// Public: setButtonAction sets the action that occurs when the button is clicked
|
688 |
-
SWFUpload.prototype.setButtonAction = function (buttonAction) {
|
689 |
-
this.settings.button_action = buttonAction;
|
690 |
-
this.callFlash("SetButtonAction", [buttonAction]);
|
691 |
-
};
|
692 |
-
|
693 |
-
// Public: setButtonCursor changes the mouse cursor displayed when hovering over the button
|
694 |
-
SWFUpload.prototype.setButtonCursor = function (cursor) {
|
695 |
-
this.settings.button_cursor = cursor;
|
696 |
-
this.callFlash("SetButtonCursor", [cursor]);
|
697 |
-
};
|
698 |
-
|
699 |
-
/* *******************************
|
700 |
-
Flash Event Interfaces
|
701 |
-
These functions are used by Flash to trigger the various
|
702 |
-
events.
|
703 |
-
|
704 |
-
All these functions a Private.
|
705 |
-
|
706 |
-
Because the ExternalInterface library is buggy the event calls
|
707 |
-
are added to a queue and the queue then executed by a setTimeout.
|
708 |
-
This ensures that events are executed in a determinate order and that
|
709 |
-
the ExternalInterface bugs are avoided.
|
710 |
-
******************************* */
|
711 |
-
|
712 |
-
SWFUpload.prototype.queueEvent = function (handlerName, argumentArray) {
|
713 |
-
// Warning: Don't call this.debug inside here or you'll create an infinite loop
|
714 |
-
|
715 |
-
if (argumentArray == undefined) {
|
716 |
-
argumentArray = [];
|
717 |
-
} else if (!(argumentArray instanceof Array)) {
|
718 |
-
argumentArray = [argumentArray];
|
719 |
-
}
|
720 |
-
|
721 |
-
var self = this;
|
722 |
-
if (typeof this.settings[handlerName] === "function") {
|
723 |
-
// Queue the event
|
724 |
-
this.eventQueue.push(function () {
|
725 |
-
this.settings[handlerName].apply(this, argumentArray);
|
726 |
-
});
|
727 |
-
|
728 |
-
// Execute the next queued event
|
729 |
-
setTimeout(function () {
|
730 |
-
self.executeNextEvent();
|
731 |
-
}, 0);
|
732 |
-
|
733 |
-
} else if (this.settings[handlerName] !== null) {
|
734 |
-
throw "Event handler " + handlerName + " is unknown or is not a function";
|
735 |
-
}
|
736 |
-
};
|
737 |
-
|
738 |
-
// Private: Causes the next event in the queue to be executed. Since events are queued using a setTimeout
|
739 |
-
// we must queue them in order to garentee that they are executed in order.
|
740 |
-
SWFUpload.prototype.executeNextEvent = function () {
|
741 |
-
// Warning: Don't call this.debug inside here or you'll create an infinite loop
|
742 |
-
|
743 |
-
var f = this.eventQueue ? this.eventQueue.shift() : null;
|
744 |
-
if (typeof(f) === "function") {
|
745 |
-
f.apply(this);
|
746 |
-
}
|
747 |
-
};
|
748 |
-
|
749 |
-
// Private: unescapeFileParams is part of a workaround for a flash bug where objects passed through ExternalInterface cannot have
|
750 |
-
// properties that contain characters that are not valid for JavaScript identifiers. To work around this
|
751 |
-
// the Flash Component escapes the parameter names and we must unescape again before passing them along.
|
752 |
-
SWFUpload.prototype.unescapeFilePostParams = function (file) {
|
753 |
-
var reg = /[$]([0-9a-f]{4})/i;
|
754 |
-
var unescapedPost = {};
|
755 |
-
var uk;
|
756 |
-
|
757 |
-
if (file != undefined) {
|
758 |
-
for (var k in file.post) {
|
759 |
-
if (file.post.hasOwnProperty(k)) {
|
760 |
-
uk = k;
|
761 |
-
var match;
|
762 |
-
while ((match = reg.exec(uk)) !== null) {
|
763 |
-
uk = uk.replace(match[0], String.fromCharCode(parseInt("0x" + match[1], 16)));
|
764 |
-
}
|
765 |
-
unescapedPost[uk] = file.post[k];
|
766 |
-
}
|
767 |
-
}
|
768 |
-
|
769 |
-
file.post = unescapedPost;
|
770 |
-
}
|
771 |
-
|
772 |
-
return file;
|
773 |
-
};
|
774 |
-
|
775 |
-
// Private: Called by Flash to see if JS can call in to Flash (test if External Interface is working)
|
776 |
-
SWFUpload.prototype.testExternalInterface = function () {
|
777 |
-
try {
|
778 |
-
return this.callFlash("TestExternalInterface");
|
779 |
-
} catch (ex) {
|
780 |
-
return false;
|
781 |
-
}
|
782 |
-
};
|
783 |
-
|
784 |
-
// Private: This event is called by Flash when it has finished loading. Don't modify this.
|
785 |
-
// Use the swfupload_loaded_handler event setting to execute custom code when SWFUpload has loaded.
|
786 |
-
SWFUpload.prototype.flashReady = function () {
|
787 |
-
// Check that the movie element is loaded correctly with its ExternalInterface methods defined
|
788 |
-
var movieElement = this.getMovieElement();
|
789 |
-
|
790 |
-
if (!movieElement) {
|
791 |
-
this.debug("Flash called back ready but the flash movie can't be found.");
|
792 |
-
return;
|
793 |
-
}
|
794 |
-
|
795 |
-
this.cleanUp(movieElement);
|
796 |
-
|
797 |
-
this.queueEvent("swfupload_loaded_handler");
|
798 |
-
};
|
799 |
-
|
800 |
-
// Private: removes Flash added fuctions to the DOM node to prevent memory leaks in IE.
|
801 |
-
// This function is called by Flash each time the ExternalInterface functions are created.
|
802 |
-
SWFUpload.prototype.cleanUp = function (movieElement) {
|
803 |
-
// Pro-actively unhook all the Flash functions
|
804 |
-
try {
|
805 |
-
if (this.movieElement && typeof(movieElement.CallFunction) === "unknown") { // We only want to do this in IE
|
806 |
-
this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");
|
807 |
-
for (var key in movieElement) {
|
808 |
-
try {
|
809 |
-
if (typeof(movieElement[key]) === "function") {
|
810 |
-
movieElement[key] = null;
|
811 |
-
}
|
812 |
-
} catch (ex) {
|
813 |
-
}
|
814 |
-
}
|
815 |
-
}
|
816 |
-
} catch (ex1) {
|
817 |
-
|
818 |
-
}
|
819 |
-
|
820 |
-
// Fix Flashes own cleanup code so if the SWFMovie was removed from the page
|
821 |
-
// it doesn't display errors.
|
822 |
-
window["__flash__removeCallback"] = function (instance, name) {
|
823 |
-
try {
|
824 |
-
if (instance) {
|
825 |
-
instance[name] = null;
|
826 |
-
}
|
827 |
-
} catch (flashEx) {
|
828 |
-
|
829 |
-
}
|
830 |
-
};
|
831 |
-
|
832 |
-
};
|
833 |
-
|
834 |
-
|
835 |
-
/* This is a chance to do something before the browse window opens */
|
836 |
-
SWFUpload.prototype.fileDialogStart = function () {
|
837 |
-
this.queueEvent("file_dialog_start_handler");
|
838 |
-
};
|
839 |
-
|
840 |
-
|
841 |
-
/* Called when a file is successfully added to the queue. */
|
842 |
-
SWFUpload.prototype.fileQueued = function (file) {
|
843 |
-
file = this.unescapeFilePostParams(file);
|
844 |
-
this.queueEvent("file_queued_handler", file);
|
845 |
-
};
|
846 |
-
|
847 |
-
|
848 |
-
/* Handle errors that occur when an attempt to queue a file fails. */
|
849 |
-
SWFUpload.prototype.fileQueueError = function (file, errorCode, message) {
|
850 |
-
file = this.unescapeFilePostParams(file);
|
851 |
-
this.queueEvent("file_queue_error_handler", [file, errorCode, message]);
|
852 |
-
};
|
853 |
-
|
854 |
-
/* Called after the file dialog has closed and the selected files have been queued.
|
855 |
-
You could call startUpload here if you want the queued files to begin uploading immediately. */
|
856 |
-
SWFUpload.prototype.fileDialogComplete = function (numFilesSelected, numFilesQueued, numFilesInQueue) {
|
857 |
-
this.queueEvent("file_dialog_complete_handler", [numFilesSelected, numFilesQueued, numFilesInQueue]);
|
858 |
-
};
|
859 |
-
|
860 |
-
SWFUpload.prototype.uploadStart = function (file) {
|
861 |
-
file = this.unescapeFilePostParams(file);
|
862 |
-
this.queueEvent("return_upload_start_handler", file);
|
863 |
-
};
|
864 |
-
|
865 |
-
SWFUpload.prototype.returnUploadStart = function (file) {
|
866 |
-
var returnValue;
|
867 |
-
if (typeof this.settings.upload_start_handler === "function") {
|
868 |
-
file = this.unescapeFilePostParams(file);
|
869 |
-
returnValue = this.settings.upload_start_handler.call(this, file);
|
870 |
-
} else if (this.settings.upload_start_handler != undefined) {
|
871 |
-
throw "upload_start_handler must be a function";
|
872 |
-
}
|
873 |
-
|
874 |
-
// Convert undefined to true so if nothing is returned from the upload_start_handler it is
|
875 |
-
// interpretted as 'true'.
|
876 |
-
if (returnValue === undefined) {
|
877 |
-
returnValue = true;
|
878 |
-
}
|
879 |
-
|
880 |
-
returnValue = !!returnValue;
|
881 |
-
|
882 |
-
this.callFlash("ReturnUploadStart", [returnValue]);
|
883 |
-
};
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
SWFUpload.prototype.uploadProgress = function (file, bytesComplete, bytesTotal) {
|
888 |
-
file = this.unescapeFilePostParams(file);
|
889 |
-
this.queueEvent("upload_progress_handler", [file, bytesComplete, bytesTotal]);
|
890 |
-
};
|
891 |
-
|
892 |
-
SWFUpload.prototype.uploadError = function (file, errorCode, message) {
|
893 |
-
file = this.unescapeFilePostParams(file);
|
894 |
-
this.queueEvent("upload_error_handler", [file, errorCode, message]);
|
895 |
-
};
|
896 |
-
|
897 |
-
SWFUpload.prototype.uploadSuccess = function (file, serverData, responseReceived) {
|
898 |
-
file = this.unescapeFilePostParams(file);
|
899 |
-
this.queueEvent("upload_success_handler", [file, serverData, responseReceived]);
|
900 |
-
};
|
901 |
-
|
902 |
-
SWFUpload.prototype.uploadComplete = function (file) {
|
903 |
-
file = this.unescapeFilePostParams(file);
|
904 |
-
this.queueEvent("upload_complete_handler", file);
|
905 |
-
};
|
906 |
-
|
907 |
-
/* Called by SWFUpload JavaScript and Flash functions when debug is enabled. By default it writes messages to the
|
908 |
-
internal debug console. You can override this event and have messages written where you want. */
|
909 |
-
SWFUpload.prototype.debug = function (message) {
|
910 |
-
this.queueEvent("debug_handler", message);
|
911 |
-
};
|
912 |
-
|
913 |
-
|
914 |
-
/* **********************************
|
915 |
-
Debug Console
|
916 |
-
The debug console is a self contained, in page location
|
917 |
-
for debug message to be sent. The Debug Console adds
|
918 |
-
itself to the body if necessary.
|
919 |
-
|
920 |
-
The console is automatically scrolled as messages appear.
|
921 |
-
|
922 |
-
If you are using your own debug handler or when you deploy to production and
|
923 |
-
have debug disabled you can remove these functions to reduce the file size
|
924 |
-
and complexity.
|
925 |
-
********************************** */
|
926 |
-
|
927 |
-
// Private: debugMessage is the default debug_handler. If you want to print debug messages
|
928 |
-
// call the debug() function. When overriding the function your own function should
|
929 |
-
// check to see if the debug setting is true before outputting debug information.
|
930 |
-
SWFUpload.prototype.debugMessage = function (message) {
|
931 |
-
if (this.settings.debug) {
|
932 |
-
var exceptionMessage, exceptionValues = [];
|
933 |
-
|
934 |
-
// Check for an exception object and print it nicely
|
935 |
-
if (typeof message === "object" && typeof message.name === "string" && typeof message.message === "string") {
|
936 |
-
for (var key in message) {
|
937 |
-
if (message.hasOwnProperty(key)) {
|
938 |
-
exceptionValues.push(key + ": " + message[key]);
|
939 |
-
}
|
940 |
-
}
|
941 |
-
exceptionMessage = exceptionValues.join("\n") || "";
|
942 |
-
exceptionValues = exceptionMessage.split("\n");
|
943 |
-
exceptionMessage = "EXCEPTION: " + exceptionValues.join("\nEXCEPTION: ");
|
944 |
-
if (window.console)
|
945 |
-
console.log(exceptionMessage);
|
946 |
-
else
|
947 |
-
SWFUpload.Console.writeLine(exceptionMessage);
|
948 |
-
} else {
|
949 |
-
if (window.console)
|
950 |
-
console.log(message);
|
951 |
-
else
|
952 |
-
SWFUpload.Console.writeLine(message);
|
953 |
-
}
|
954 |
-
}
|
955 |
-
};
|
956 |
-
|
957 |
-
SWFUpload.Console = {};
|
958 |
-
SWFUpload.Console.writeLine = function (message) {
|
959 |
-
var console, documentForm;
|
960 |
-
|
961 |
-
try {
|
962 |
-
console = document.getElementById("SWFUpload_Console");
|
963 |
-
|
964 |
-
if (!console) {
|
965 |
-
documentForm = document.createElement("form");
|
966 |
-
document.getElementsByTagName("body")[0].appendChild(documentForm);
|
967 |
-
|
968 |
-
console = document.createElement("textarea");
|
969 |
-
console.id = "SWFUpload_Console";
|
970 |
-
console.style.fontFamily = "monospace";
|
971 |
-
console.setAttribute("wrap", "off");
|
972 |
-
console.wrap = "off";
|
973 |
-
console.style.overflow = "auto";
|
974 |
-
console.style.width = "99%";
|
975 |
-
console.style.height = "350px";
|
976 |
-
console.style.margin = "5px";
|
977 |
-
documentForm.appendChild(console);
|
978 |
-
}
|
979 |
-
|
980 |
-
console.value += message + "\n";
|
981 |
-
|
982 |
-
console.scrollTop = console.scrollHeight - console.clientHeight;
|
983 |
-
} catch (ex) {
|
984 |
-
alert("Exception: " + ex.name + " Message: " + ex.message);
|
985 |
-
}
|
986 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/swfupload.swf
DELETED
Binary file
|
admin/templates/latest_news_notice.php
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
<style>
|
2 |
-
.ngg_latest_news_notice .wp-pointer-arrow{
|
3 |
-
left: 20px;
|
4 |
-
}
|
5 |
-
</style>
|
6 |
-
<h3>Important Announcement</h3>
|
7 |
-
<p>We're happy to announce Photocrati has acquired NextGEN Gallery.</p>
|
8 |
-
<p>
|
9 |
-
For more on our plans, visit the new <a target="_blank" href='http://www.nextgen-gallery.com'>NextGEN Gallery website</a>.
|
10 |
-
For more on what's included in our first NextGEN Update, see <a target="_blank" href='http://www.nextgen-gallery.com/latest-release-notes'>here</a>.
|
11 |
-
</p>
|
12 |
-
<p>
|
13 |
-
<?php include('twitter_follow_link.php'); ?>
|
14 |
-
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
changelog.txt
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
NextGEN Gallery
|
2 |
by Photocrati Media
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
= V1.9.7 - 11.12.2012 =
|
5 |
* Secured: Removed bundled version of swfupload; using WordPress-bundled version instead for WordPress 3.2 instances
|
6 |
* Changed: Using JQuery UI for the image sorting interface (thanks Tomás Soler)
|
1 |
NextGEN Gallery
|
2 |
by Photocrati Media
|
3 |
|
4 |
+
= V1.9.8 - 12.05.2012 =
|
5 |
+
* Secured: Removed bundled version of swfupload. See fix below for SCM information.
|
6 |
+
* Changed: All transients created by NextGEN are flushed when the plugin is activated.
|
7 |
+
* Fixed: Our primary SCM is conducted at http://bitbucket.org/photocrati/nextgen-gallery, but was not synchronizing correctly with the WordPress Plugin SVN Repository
|
8 |
+
* Fixed: The transient adjustment fixes: http://wordpress.org/support/topic/plugin-nextgen-gallery-_transient_ngg_request-entry-in-wp_options
|
9 |
+
|
10 |
= V1.9.7 - 11.12.2012 =
|
11 |
* Secured: Removed bundled version of swfupload; using WordPress-bundled version instead for WordPress 3.2 instances
|
12 |
* Changed: Using JQuery UI for the image sorting interface (thanks Tomás Soler)
|
nggallery.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://www.nextgen-gallery.com/
|
|
5 |
Description: A NextGENeration Photo Gallery for WordPress
|
6 |
Author: Photocrati
|
7 |
Author URI: http://www.photocrati.com/
|
8 |
-
Version: 1.9.
|
9 |
|
10 |
Copyright (c) 2007-2011 by Alex Rabe & NextGEN DEV-Team
|
11 |
Copyright (c) 2012 Photocrati Media
|
@@ -45,7 +45,7 @@ if (!class_exists('E_Clean_Exit')) {
|
|
45 |
if (!class_exists('nggLoader')) {
|
46 |
class nggLoader {
|
47 |
|
48 |
-
var $version = '1.9.
|
49 |
var $dbversion = '1.8.1';
|
50 |
var $minimum_WP = '3.4';
|
51 |
var $donators = 'http://www.nextgen-gallery.com/donators.php';
|
@@ -455,6 +455,37 @@ if (!class_exists('nggLoader')) {
|
|
455 |
}
|
456 |
}
|
457 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
458 |
function activate() {
|
459 |
global $wpdb;
|
460 |
//Starting from version 1.8.0 it's works only with PHP5.2
|
@@ -464,6 +495,9 @@ if (!class_exists('nggLoader')) {
|
|
464 |
return;
|
465 |
}
|
466 |
|
|
|
|
|
|
|
467 |
include_once (dirname (__FILE__) . '/admin/install.php');
|
468 |
|
469 |
if (is_multisite()) {
|
@@ -496,9 +530,15 @@ if (!class_exists('nggLoader')) {
|
|
496 |
// remove & reset the init check option
|
497 |
delete_option( 'ngg_init_check' );
|
498 |
delete_option( 'ngg_update_exists' );
|
|
|
|
|
|
|
499 |
}
|
500 |
|
501 |
function uninstall() {
|
|
|
|
|
|
|
502 |
include_once (dirname (__FILE__) . '/admin/install.php');
|
503 |
nggallery_uninstall();
|
504 |
}
|
5 |
Description: A NextGENeration Photo Gallery for WordPress
|
6 |
Author: Photocrati
|
7 |
Author URI: http://www.photocrati.com/
|
8 |
+
Version: 1.9.8
|
9 |
|
10 |
Copyright (c) 2007-2011 by Alex Rabe & NextGEN DEV-Team
|
11 |
Copyright (c) 2012 Photocrati Media
|
45 |
if (!class_exists('nggLoader')) {
|
46 |
class nggLoader {
|
47 |
|
48 |
+
var $version = '1.9.8';
|
49 |
var $dbversion = '1.8.1';
|
50 |
var $minimum_WP = '3.4';
|
51 |
var $donators = 'http://www.nextgen-gallery.com/donators.php';
|
455 |
}
|
456 |
}
|
457 |
|
458 |
+
/**
|
459 |
+
* Removes all transients created by NextGEN. Called during activation
|
460 |
+
* and deactivation routines
|
461 |
+
*/
|
462 |
+
function remove_transients()
|
463 |
+
{
|
464 |
+
global $wpdb, $_wp_using_ext_object_cache;
|
465 |
+
|
466 |
+
// Fetch all transients
|
467 |
+
$query = "
|
468 |
+
SELECT option_name FROM {$wpdb->options}
|
469 |
+
WHERE option_name LIKE '%ngg_request%'
|
470 |
+
";
|
471 |
+
$transient_names = $wpdb->get_col($query);;
|
472 |
+
|
473 |
+
// Delete all transients in the database
|
474 |
+
$query = "
|
475 |
+
DELETE FROM {$wpdb->options}
|
476 |
+
WHERE option_name LIKE '%ngg_request%'
|
477 |
+
";
|
478 |
+
$wpdb->query($query);
|
479 |
+
|
480 |
+
// If using an external caching mechanism, delete the cached items
|
481 |
+
if ($_wp_using_ext_object_cache) {
|
482 |
+
foreach ($transient_names as $transient) {
|
483 |
+
wp_cache_delete($transient, 'transient');
|
484 |
+
wp_cache_delete(substr($transient, 11), 'transient');
|
485 |
+
}
|
486 |
+
}
|
487 |
+
}
|
488 |
+
|
489 |
function activate() {
|
490 |
global $wpdb;
|
491 |
//Starting from version 1.8.0 it's works only with PHP5.2
|
495 |
return;
|
496 |
}
|
497 |
|
498 |
+
// Clean up transients
|
499 |
+
$this->remove_transients();
|
500 |
+
|
501 |
include_once (dirname (__FILE__) . '/admin/install.php');
|
502 |
|
503 |
if (is_multisite()) {
|
530 |
// remove & reset the init check option
|
531 |
delete_option( 'ngg_init_check' );
|
532 |
delete_option( 'ngg_update_exists' );
|
533 |
+
|
534 |
+
// Clean up transients
|
535 |
+
$this->remove_transients();
|
536 |
}
|
537 |
|
538 |
function uninstall() {
|
539 |
+
// Clean up transients
|
540 |
+
$this->remove_transients();
|
541 |
+
|
542 |
include_once (dirname (__FILE__) . '/admin/install.php');
|
543 |
nggallery_uninstall();
|
544 |
}
|
readme.txt
CHANGED
@@ -194,6 +194,12 @@ Yes, NextGEN Gallery has been translated into dozens of languages - <a href="htt
|
|
194 |
|
195 |
== Changelog ==
|
196 |
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
= V1.9.7 - 11.13.2012 =
|
198 |
* Secured: Removed bundled version of swfupload; using WordPress-bundled version instead for WordPress 3.2 instances
|
199 |
* Changed: Using JQuery UI for the image sorting interface (thanks Tomás Soler)
|
194 |
|
195 |
== Changelog ==
|
196 |
|
197 |
+
= V1.9.8 - 12.05.2012 =
|
198 |
+
* Secured: Removed bundled version of swfupload. See fix below for SCM information.
|
199 |
+
* Changed: All transients created by NextGEN are flushed when the plugin is activated.
|
200 |
+
* Fixed: Our primary SCM is conducted at http://bitbucket.org/photocrati/nextgen-gallery, but was not synchronizing correctly with the WordPress Plugin SVN Repository
|
201 |
+
* Fixed: The transient adjustment fixes: http://wordpress.org/support/topic/plugin-nextgen-gallery-_transient_ngg_request-entry-in-wp_options
|
202 |
+
|
203 |
= V1.9.7 - 11.13.2012 =
|
204 |
* Secured: Removed bundled version of swfupload; using WordPress-bundled version instead for WordPress 3.2 instances
|
205 |
* Changed: Using JQuery UI for the image sorting interface (thanks Tomás Soler)
|