ACC SHELL

Path : /srv/www/vhosts/bubbagump/jquery/
File Upload :
Current File : /srv/www/vhosts/bubbagump/jquery/funkce.js

function openFileBrowser(s, p) {
	var f = '', x, y, mo = true, w, sw, sh, u;

	// Default some options
	s = s || {};
	p = p || {};
	var na = navigator, ua = na.userAgent
	isWebKit = /WebKit/.test(ua);
	isOpera = window.opera && opera.buildNumber;
	isIE = !isWebKit && !isOpera && (/MSIE/gi).test(ua) && (/Explorer/gi).test(na.appName);
	sw = isOpera ? window.innerWidth : screen.width; // Opera uses windows inside the Opera window
	sh = isOpera ? window.innerHeight : screen.height;
	s.name = s.name || 'mc_' + new Date().getTime();
	s.width = parseInt(s.width || 320);
	s.height = parseInt(s.height || 240);
	s.resizable = true;
	s.left = s.left || parseInt(sw / 2.0) - (s.width / 2.0);
	s.top = s.top || parseInt(sh / 2.0) - (s.height / 2.0);
	p.inline = false;
	p.mce_width = s.width;
	p.mce_height = s.height;
	p.mce_auto_focus = s.auto_focus;

	if (mo) {
		if (isIE) {
			s.center = true;
			s.help = false;
			s.dialogWidth = s.width + 'px';
			s.dialogHeight = s.height + 'px';
			s.scroll = s.scrollbars || false;
		}
	}

	// Build features string
	each(s, function(v, k) {
		if (tinymce.is(v, 'boolean'))
			v = v ? 'yes' : 'no';

		if (!/^(name|url)$/.test(k)) {
			if (isIE && mo)
				f += (f ? ';' : '') + k + ':' + v;
			else
				f += (f ? ',' : '') + k + '=' + v;
		}
	});

	u = s.url || s.file;
	u = tinymce._addVer(u);

	try {
		if (isIE && mo) {
			w = 1;
			window.showModalDialog(u, window, f);
		} else
			w = window.open(u, s.name, f);
	} catch (ex) {
		// Ignore
	}

	if (!w)
		alert(t.editor.getLang('popup_blocked'));
}



function each(o, cb, s) {
	var n, l;

	if (!o)
		return 0;

	s = s || o;

	if (o.length !== undefined) {
		// Indexed arrays, needed for Safari
		for (n=0, l = o.length; n < l; n++) {
			if (cb.call(s, o[n], n, o) === false)
				return 0;
		}
	} else {
		// Hashtables
		for (n in o) {
			if (o.hasOwnProperty(n)) {
				if (cb.call(s, o[n], n, o) === false)
					return 0;
			}
		}
	}

	return 1;
}

ACC SHELL 2018