mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Merging the updated Limesurvey 1.92+ branch of queXS to trunk
This commit is contained in:
@@ -1,95 +1,101 @@
|
||||
<?php
|
||||
|
||||
/** This file is part of KCFinder project
|
||||
*
|
||||
* @desc Autoload classes magic function
|
||||
* @package KCFinder
|
||||
* @version 2.21
|
||||
* @author Pavel Tzonkov <pavelc@users.sourceforge.net>
|
||||
* @copyright 2010 KCFinder Project
|
||||
* @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
|
||||
* @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2
|
||||
* @link http://kcfinder.sunhater.com
|
||||
*/
|
||||
/** This file is part of KCFinder project
|
||||
*
|
||||
* @desc Autoload classes magic function
|
||||
* @package KCFinder
|
||||
* @version 2.21
|
||||
* @author Pavel Tzonkov <pavelc@users.sourceforge.net>
|
||||
* @copyright 2010 KCFinder Project
|
||||
* @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
|
||||
* @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2
|
||||
* @link http://kcfinder.sunhater.com
|
||||
*/
|
||||
|
||||
require_once(dirname(__FILE__).'/../../../../config-defaults.php');
|
||||
require_once(dirname(__FILE__).'/../../../../common.php');
|
||||
require_once(dirname(__FILE__).'/../../../admin_functions.php');
|
||||
require_once(dirname(__FILE__).'/../../../../config-defaults.php');
|
||||
require_once(dirname(__FILE__).'/../../../../common.php');
|
||||
require_once(dirname(__FILE__).'/../../../admin_functions.php');
|
||||
|
||||
$usquery = "SELECT stg_value FROM ".db_table_name("settings_global")." where stg_name='SessionName'";
|
||||
$usresult = db_execute_assoc($usquery,'',true);
|
||||
if ($usresult)
|
||||
{
|
||||
$usrow = $usresult->FetchRow();
|
||||
@session_name($usrow['stg_value']);
|
||||
}
|
||||
else
|
||||
{
|
||||
session_name("LimeSurveyAdmin");
|
||||
}
|
||||
$usquery = "SELECT stg_value FROM ".db_table_name("settings_global")." where stg_name='SessionName'";
|
||||
$usresult = db_execute_assoc($usquery,'',true);
|
||||
if ($usresult)
|
||||
{
|
||||
$usrow = $usresult->FetchRow();
|
||||
@session_name($usrow['stg_value']);
|
||||
}
|
||||
else
|
||||
{
|
||||
session_name("LimeSurveyAdmin");
|
||||
}
|
||||
|
||||
session_set_cookie_params(0,$relativeurl.'/');
|
||||
session_set_cookie_params(0,$relativeurl.'/');
|
||||
|
||||
if (session_id() == "") @session_start();
|
||||
if (session_id() == "") @session_start();
|
||||
|
||||
$_SESSION['KCFINDER'] = array();
|
||||
$_SESSION['KCFINDER'] = array();
|
||||
|
||||
$sAllowedExtensions = implode(' ',array_map('trim',explode(',',$allowedresourcesuploads)));
|
||||
$_SESSION['KCFINDER']['types']=array('files'=>$sAllowedExtensions,
|
||||
'flash'=>$sAllowedExtensions,
|
||||
'images'=>$sAllowedExtensions);
|
||||
|
||||
if ($demoModeOnly === false &&
|
||||
$sAllowedExtensions = implode(' ',array_map('trim',explode(',',$allowedresourcesuploads)));
|
||||
$_SESSION['KCFINDER']['types']=array('files'=>$sAllowedExtensions,
|
||||
'flash'=>$sAllowedExtensions,
|
||||
'images'=>$sAllowedExtensions);
|
||||
if ($demoModeOnly === false &&
|
||||
isset($_SESSION['loginID']) &&
|
||||
isset($_SESSION['FileManagerContext']))
|
||||
{
|
||||
// disable upload at survey creation time
|
||||
// because we don't know the sid yet
|
||||
if (preg_match('/^(create|edit):(question|group|answer)/',$_SESSION['FileManagerContext']) != 0 ||
|
||||
{
|
||||
// disable upload at survey creation time
|
||||
// because we don't know the sid yet
|
||||
if (preg_match('/^(create|edit):(question|group|answer)/',$_SESSION['FileManagerContext']) != 0 ||
|
||||
preg_match('/^edit:survey/',$_SESSION['FileManagerContext']) !=0 ||
|
||||
preg_match('/^edit:assessments/',$_SESSION['FileManagerContext']) !=0 ||
|
||||
preg_match('/^edit:emailsettings/',$_SESSION['FileManagerContext']) != 0)
|
||||
{
|
||||
$contextarray=explode(':',$_SESSION['FileManagerContext'],3);
|
||||
$surveyid=$contextarray[2];
|
||||
|
||||
|
||||
|
||||
if(bHasSurveyPermission($surveyid,'surveycontent','update'))
|
||||
{
|
||||
$_SESSION['KCFINDER']['disabled'] = false ;
|
||||
$_SESSION['KCFINDER']['uploadURL'] = "{$relativeurl}/upload/surveys/{$surveyid}/" ;
|
||||
$_SESSION['KCFINDER']['uploadDir'] = $uploaddir.'/surveys/'.$surveyid;
|
||||
$contextarray=explode(':',$_SESSION['FileManagerContext'],3);
|
||||
$surveyid=$contextarray[2];
|
||||
|
||||
|
||||
|
||||
if(bHasSurveyPermission($surveyid,'surveycontent','update'))
|
||||
{
|
||||
$_SESSION['KCFINDER']['disabled'] = false ;
|
||||
if (preg_match('/^edit:emailsettings/',$_SESSION['FileManagerContext']) != 0)
|
||||
{
|
||||
$_SESSION['KCFINDER']['uploadURL'] = "{$rooturl}/upload/surveys/{$surveyid}/" ;
|
||||
}
|
||||
else
|
||||
{
|
||||
$_SESSION['KCFINDER']['uploadURL'] = "{$relativeurl}/upload/surveys/{$surveyid}/" ;
|
||||
}
|
||||
$_SESSION['KCFINDER']['uploadDir'] = $uploaddir.'/surveys/'.$surveyid;
|
||||
}
|
||||
|
||||
}
|
||||
elseif (preg_match('/^edit:label/',$_SESSION['FileManagerContext']) != 0)
|
||||
{
|
||||
$contextarray=explode(':',$_SESSION['FileManagerContext'],3);
|
||||
$labelid=$contextarray[2];
|
||||
// check if the user has label management right and labelid defined
|
||||
if ($_SESSION['USER_RIGHT_MANAGE_LABEL']==1 && isset($labelid) && $labelid != '')
|
||||
{
|
||||
$_SESSION['KCFINDER']['disabled'] = false ;
|
||||
$_SESSION['KCFINDER']['uploadURL'] = "{$relativeurl}/upload/labels/{$labelid}/" ;
|
||||
$_SESSION['KCFINDER']['uploadDir'] = "{$uploaddir}/labels/{$labelid}" ;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
elseif (preg_match('/^edit:label/',$_SESSION['FileManagerContext']) != 0)
|
||||
{
|
||||
$contextarray=explode(':',$_SESSION['FileManagerContext'],3);
|
||||
$labelid=$contextarray[2];
|
||||
// check if the user has label management right and labelid defined
|
||||
if ($_SESSION['USER_RIGHT_MANAGE_LABEL']==1 && isset($labelid) && $labelid != '')
|
||||
{
|
||||
$_SESSION['KCFINDER']['disabled'] = false ;
|
||||
$_SESSION['KCFINDER']['uploadURL'] = "{$relativeurl}/upload/labels/{$labelid}/" ;
|
||||
$_SESSION['KCFINDER']['uploadDir'] = "{$uploaddir}/labels/{$labelid}" ;
|
||||
}
|
||||
|
||||
|
||||
function __autoload($class) {
|
||||
if ($class == "uploader")
|
||||
require "core/uploader.php";
|
||||
elseif ($class == "browser")
|
||||
require "core/browser.php";
|
||||
elseif (file_exists("core/types/$class.php"))
|
||||
require "core/types/$class.php";
|
||||
elseif (file_exists("lib/class_$class.php"))
|
||||
require "lib/class_$class.php";
|
||||
elseif (file_exists("lib/helper_$class.php"))
|
||||
require "lib/helper_$class.php";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
function __autoload($class) {
|
||||
if ($class == "uploader")
|
||||
require "core/uploader.php";
|
||||
elseif ($class == "browser")
|
||||
require "core/browser.php";
|
||||
elseif (file_exists("core/types/$class.php"))
|
||||
require "core/types/$class.php";
|
||||
elseif (file_exists("lib/class_$class.php"))
|
||||
require "lib/class_$class.php";
|
||||
elseif (file_exists("lib/helper_$class.php"))
|
||||
require "lib/helper_$class.php";
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -107,25 +107,42 @@ class uploader {
|
||||
if (!strlen($this->config['cookiePath']))
|
||||
$this->config['cookiePath'] = "/";
|
||||
|
||||
// UPLOAD FOLDER INIT
|
||||
if ($this->config['uploadURL'] == "/") {
|
||||
$this->config['uploadDir'] = strlen($this->config['uploadDir'])
|
||||
? path::normalize($this->config['uploadDir'])
|
||||
: path::normalize($_SERVER['DOCUMENT_ROOT']);
|
||||
$this->typeDir = "{$this->config['uploadDir']}/{$this->type}";
|
||||
$this->typeURL = "/{$this->type}";
|
||||
} else {
|
||||
$this->config['uploadURL'] = (substr($this->config['uploadURL'], 0, 1) === "/")
|
||||
? path::normalize($this->config['uploadURL'])
|
||||
: path::rel2abs_url($this->config['uploadURL']);
|
||||
$this->config['uploadDir'] = strlen($this->config['uploadDir'])
|
||||
? path::normalize($this->config['uploadDir'])
|
||||
: path::url2fullPath($this->config['uploadURL']);
|
||||
$this->typeDir = "{$this->config['uploadDir']}/{$this->type}";
|
||||
$this->typeURL = "{$this->config['uploadURL']}/{$this->type}";
|
||||
}
|
||||
if (!is_dir($this->config['uploadDir']))
|
||||
@mkdir($this->config['uploadDir'], $this->config['dirPerms']);
|
||||
// UPLOAD FOLDER INIT
|
||||
|
||||
// FULL URL
|
||||
if (preg_match('/^([a-z]+)\:\/\/([^\/^\:]+)(\:(\d+))?\/(.+)\/?$/',
|
||||
$this->config['uploadURL'], $patt)
|
||||
) {
|
||||
list($unused, $protocol, $domain, $unused, $port, $path) = $patt;
|
||||
$path = path::normalize($path);
|
||||
$this->config['uploadURL'] = "$protocol://$domain" . (strlen($port) ? ":$port" : "") . "/$path";
|
||||
$this->config['uploadDir'] = strlen($this->config['uploadDir'])
|
||||
? path::normalize($this->config['uploadDir'])
|
||||
: path::url2fullPath("/$path");
|
||||
$this->typeDir = "{$this->config['uploadDir']}/{$this->type}";
|
||||
$this->typeURL = "{$this->config['uploadURL']}/{$this->type}";
|
||||
|
||||
// SITE ROOT
|
||||
} elseif ($this->config['uploadURL'] == "/") {
|
||||
$this->config['uploadDir'] = strlen($this->config['uploadDir'])
|
||||
? path::normalize($this->config['uploadDir'])
|
||||
: path::normalize($_SERVER['DOCUMENT_ROOT']);
|
||||
$this->typeDir = "{$this->config['uploadDir']}/{$this->type}";
|
||||
$this->typeURL = "/{$this->type}";
|
||||
|
||||
// ABSOLUTE & RELATIVE
|
||||
} else {
|
||||
$this->config['uploadURL'] = (substr($this->config['uploadURL'], 0, 1) === "/")
|
||||
? path::normalize($this->config['uploadURL'])
|
||||
: path::rel2abs_url($this->config['uploadURL']);
|
||||
$this->config['uploadDir'] = strlen($this->config['uploadDir'])
|
||||
? path::normalize($this->config['uploadDir'])
|
||||
: path::url2fullPath($this->config['uploadURL']);
|
||||
$this->typeDir = "{$this->config['uploadDir']}/{$this->type}";
|
||||
$this->typeURL = "{$this->config['uploadURL']}/{$this->type}";
|
||||
}
|
||||
if (!is_dir($this->config['uploadDir']))
|
||||
@mkdir($this->config['uploadDir'], $this->config['dirPerms']);
|
||||
|
||||
// HOST APPLICATIONS INIT
|
||||
if (isset($this->get['CKEditorFuncNum']))
|
||||
@@ -496,4 +513,4 @@ if (!kc_CKEditor && !kc_FCKeditor && !kc_Custom)
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -64,11 +64,23 @@ _.getFileExtension = function(filename, toLower) {
|
||||
};
|
||||
|
||||
_.escapeDirs = function(path) {
|
||||
var fullDirExpr = /^([a-z]+)\:\/\/([^\/^\:]+)(\:(\d+))?\/(.+)$/,
|
||||
prefix = "";
|
||||
if (fullDirExpr.test(path)) {
|
||||
var port = path.replace(fullDirExpr, "$4");
|
||||
prefix = path.replace(fullDirExpr, "$1://$2")
|
||||
if (port.length)
|
||||
prefix += ":" + port;
|
||||
prefix += "/";
|
||||
path = path.replace(fullDirExpr, "$5");
|
||||
}
|
||||
|
||||
var dirs = path.split('/');
|
||||
var escapePath = '';
|
||||
for (var i = 0; i < dirs.length; i++)
|
||||
escapePath += encodeURIComponent(dirs[i]) + '/';
|
||||
return escapePath.substr(0, escapePath.length - 1);
|
||||
|
||||
return prefix + escapePath.substr(0, escapePath.length - 1);
|
||||
};
|
||||
|
||||
_.outerSpace = function(selector, type, mbp) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
* jquery.event.drag - v 2.0.0
|
||||
* Copyright (c) 2010 Three Dub Media - http://threedubmedia.com
|
||||
* Open Source MIT License - http://threedubmedia.com/code/license
|
||||
*/
|
||||
/*!
|
||||
* jquery.event.drag - v 2.0.0
|
||||
* Copyright (c) 2010 Three Dub Media - http://threedubmedia.com
|
||||
* Open Source MIT License - http://threedubmedia.com/code/license
|
||||
*/
|
||||
;(function(f){f.fn.drag=function(b,a,d){var e=typeof b=="string"?b:"",k=f.isFunction(b)?b:f.isFunction(a)?a:null;if(e.indexOf("drag")!==0)e="drag"+e;d=(b==k?a:d)||{};return k?this.bind(e,d,k):this.trigger(e)};var i=f.event,h=i.special,c=h.drag={defaults:{which:1,distance:0,not:":input",handle:null,relative:false,drop:true,click:false},datakey:"dragdata",livekey:"livedrag",add:function(b){var a=f.data(this,c.datakey),d=b.data||{};a.related+=1;if(!a.live&&b.selector){a.live=true;i.add(this,"draginit."+ c.livekey,c.delegate)}f.each(c.defaults,function(e){if(d[e]!==undefined)a[e]=d[e]})},remove:function(){f.data(this,c.datakey).related-=1},setup:function(){if(!f.data(this,c.datakey)){var b=f.extend({related:0},c.defaults);f.data(this,c.datakey,b);i.add(this,"mousedown",c.init,b);this.attachEvent&&this.attachEvent("ondragstart",c.dontstart)}},teardown:function(){if(!f.data(this,c.datakey).related){f.removeData(this,c.datakey);i.remove(this,"mousedown",c.init);i.remove(this,"draginit",c.delegate);c.textselect(true); this.detachEvent&&this.detachEvent("ondragstart",c.dontstart)}},init:function(b){var a=b.data,d;if(!(a.which>0&&b.which!=a.which))if(!f(b.target).is(a.not))if(!(a.handle&&!f(b.target).closest(a.handle,b.currentTarget).length)){a.propagates=1;a.interactions=[c.interaction(this,a)];a.target=b.target;a.pageX=b.pageX;a.pageY=b.pageY;a.dragging=null;d=c.hijack(b,"draginit",a);if(a.propagates){if((d=c.flatten(d))&&d.length){a.interactions=[];f.each(d,function(){a.interactions.push(c.interaction(this,a))})}a.propagates= a.interactions.length;a.drop!==false&&h.drop&&h.drop.handler(b,a);c.textselect(false);i.add(document,"mousemove mouseup",c.handler,a);return false}}},interaction:function(b,a){return{drag:b,callback:new c.callback,droppable:[],offset:f(b)[a.relative?"position":"offset"]()||{top:0,left:0}}},handler:function(b){var a=b.data;switch(b.type){case !a.dragging&&"mousemove":if(Math.pow(b.pageX-a.pageX,2)+Math.pow(b.pageY-a.pageY,2)<Math.pow(a.distance,2))break;b.target=a.target;c.hijack(b,"dragstart",a); if(a.propagates)a.dragging=true;case "mousemove":if(a.dragging){c.hijack(b,"drag",a);if(a.propagates){a.drop!==false&&h.drop&&h.drop.handler(b,a);break}b.type="mouseup"}case "mouseup":i.remove(document,"mousemove mouseup",c.handler);if(a.dragging){a.drop!==false&&h.drop&&h.drop.handler(b,a);c.hijack(b,"dragend",a)}c.textselect(true);if(a.click===false&&a.dragging){jQuery.event.triggered=true;setTimeout(function(){jQuery.event.triggered=false},20);a.dragging=false}break}},delegate:function(b){var a= [],d,e=f.data(this,"events")||{};f.each(e.live||[],function(k,j){if(j.preType.indexOf("drag")===0)if(d=f(b.target).closest(j.selector,b.currentTarget)[0]){i.add(d,j.origType+"."+c.livekey,j.origHandler,j.data);f.inArray(d,a)<0&&a.push(d)}});if(!a.length)return false;return f(a).bind("dragend."+c.livekey,function(){i.remove(this,"."+c.livekey)})},hijack:function(b,a,d,e,k){if(d){var j={event:b.originalEvent,type:b.type},n=a.indexOf("drop")?"drag":"drop",l,o=e||0,g,m;e=!isNaN(e)?e:d.interactions.length; b.type=a;b.originalEvent=null;d.results=[];do if(g=d.interactions[o])if(!(a!=="dragend"&&g.cancelled)){m=c.properties(b,d,g);g.results=[];f(k||g[n]||d.droppable).each(function(q,p){l=(m.target=p)?i.handle.call(p,b,m):null;if(l===false){if(n=="drag"){g.cancelled=true;d.propagates-=1}if(a=="drop")g[n][q]=null}else if(a=="dropinit")g.droppable.push(c.element(l)||p);if(a=="dragstart")g.proxy=f(c.element(l)||g.drag)[0];g.results.push(l);delete b.result;if(a!=="dropinit")return l});d.results[o]=c.flatten(g.results); if(a=="dropinit")g.droppable=c.flatten(g.droppable);a=="dragstart"&&!g.cancelled&&m.update()}while(++o<e);b.type=j.type;b.originalEvent=j.event;return c.flatten(d.results)}},properties:function(b,a,d){var e=d.callback;e.drag=d.drag;e.proxy=d.proxy||d.drag;e.startX=a.pageX;e.startY=a.pageY;e.deltaX=b.pageX-a.pageX;e.deltaY=b.pageY-a.pageY;e.originalX=d.offset.left;e.originalY=d.offset.top;e.offsetX=b.pageX-(a.pageX-e.originalX);e.offsetY=b.pageY-(a.pageY-e.originalY);e.drop=c.flatten((d.drop||[]).slice()); e.available=c.flatten((d.droppable||[]).slice());return e},element:function(b){if(b&&(b.jquery||b.nodeType==1))return b},flatten:function(b){return f.map(b,function(a){return a&&a.jquery?f.makeArray(a):a&&a.length?c.flatten(a):a})},textselect:function(b){f(document)[b?"unbind":"bind"]("selectstart",c.dontstart).attr("unselectable",b?"off":"on").css("MozUserSelect",b?"":"none")},dontstart:function(){return false},callback:function(){}};c.callback.prototype={update:function(){h.drop&&this.available.length&& f.each(this.available,function(b){h.drop.locate(this,b)})}};h.draginit=h.dragstart=h.dragend=c})(jQuery);
|
||||
@@ -1,116 +1,116 @@
|
||||
// jQuery Right-Click Plugin
|
||||
//
|
||||
// Version 1.01
|
||||
//
|
||||
// Cory S.N. LaViska
|
||||
// A Beautiful Site (http://abeautifulsite.net/)
|
||||
// 20 December 2008
|
||||
//
|
||||
// Visit http://abeautifulsite.net/notebook/68 for more information
|
||||
//
|
||||
// Usage:
|
||||
//
|
||||
// // Capture right click
|
||||
// $("#selector").rightClick( function(e) {
|
||||
// // Do something
|
||||
// });
|
||||
//
|
||||
// // Capture right mouse down
|
||||
// $("#selector").rightMouseDown( function(e) {
|
||||
// // Do something
|
||||
// });
|
||||
//
|
||||
// // Capture right mouseup
|
||||
// $("#selector").rightMouseUp( function(e) {
|
||||
// // Do something
|
||||
// });
|
||||
//
|
||||
// // Disable context menu on an element
|
||||
// $("#selector").noContext();
|
||||
//
|
||||
// History:
|
||||
//
|
||||
// 1.01 - Updated (20 December 2008)
|
||||
// - References to 'this' now work the same way as other jQuery plugins, thus
|
||||
// the el parameter has been deprecated. Use this or $(this) instead
|
||||
// - The mouse event is now passed to the callback function
|
||||
// - Changed license to GNU GPL
|
||||
//
|
||||
// 1.00 - Released (13 May 2008)
|
||||
//
|
||||
// License:
|
||||
//
|
||||
// This plugin is dual-licensed under the GNU General Public License and the MIT License
|
||||
// and is copyright 2008 A Beautiful Site, LLC.
|
||||
//
|
||||
if(jQuery) (function(){
|
||||
|
||||
$.extend($.fn, {
|
||||
|
||||
rightClick: function(handler) {
|
||||
$(this).each( function() {
|
||||
$(this).mousedown( function(e) {
|
||||
var evt = e;
|
||||
$(this).mouseup( function() {
|
||||
$(this).unbind('mouseup');
|
||||
if( evt.button == 2 ) {
|
||||
handler.call( $(this), evt );
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
});
|
||||
$(this)[0].oncontextmenu = function() {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
return $(this);
|
||||
},
|
||||
|
||||
rightMouseDown: function(handler) {
|
||||
$(this).each( function() {
|
||||
$(this).mousedown( function(e) {
|
||||
if( e.button == 2 ) {
|
||||
handler.call( $(this), e );
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
$(this)[0].oncontextmenu = function() {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
return $(this);
|
||||
},
|
||||
|
||||
rightMouseUp: function(handler) {
|
||||
$(this).each( function() {
|
||||
$(this).mouseup( function(e) {
|
||||
if( e.button == 2 ) {
|
||||
handler.call( $(this), e );
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
$(this)[0].oncontextmenu = function() {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
return $(this);
|
||||
},
|
||||
|
||||
noContext: function() {
|
||||
$(this).each( function() {
|
||||
$(this)[0].oncontextmenu = function() {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
return $(this);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// jQuery Right-Click Plugin
|
||||
//
|
||||
// Version 1.01
|
||||
//
|
||||
// Cory S.N. LaViska
|
||||
// A Beautiful Site (http://abeautifulsite.net/)
|
||||
// 20 December 2008
|
||||
//
|
||||
// Visit http://abeautifulsite.net/notebook/68 for more information
|
||||
//
|
||||
// Usage:
|
||||
//
|
||||
// // Capture right click
|
||||
// $("#selector").rightClick( function(e) {
|
||||
// // Do something
|
||||
// });
|
||||
//
|
||||
// // Capture right mouse down
|
||||
// $("#selector").rightMouseDown( function(e) {
|
||||
// // Do something
|
||||
// });
|
||||
//
|
||||
// // Capture right mouseup
|
||||
// $("#selector").rightMouseUp( function(e) {
|
||||
// // Do something
|
||||
// });
|
||||
//
|
||||
// // Disable context menu on an element
|
||||
// $("#selector").noContext();
|
||||
//
|
||||
// History:
|
||||
//
|
||||
// 1.01 - Updated (20 December 2008)
|
||||
// - References to 'this' now work the same way as other jQuery plugins, thus
|
||||
// the el parameter has been deprecated. Use this or $(this) instead
|
||||
// - The mouse event is now passed to the callback function
|
||||
// - Changed license to GNU GPL
|
||||
//
|
||||
// 1.00 - Released (13 May 2008)
|
||||
//
|
||||
// License:
|
||||
//
|
||||
// This plugin is dual-licensed under the GNU General Public License and the MIT License
|
||||
// and is copyright 2008 A Beautiful Site, LLC.
|
||||
//
|
||||
if(jQuery) (function(){
|
||||
|
||||
$.extend($.fn, {
|
||||
|
||||
rightClick: function(handler) {
|
||||
$(this).each( function() {
|
||||
$(this).mousedown( function(e) {
|
||||
var evt = e;
|
||||
$(this).mouseup( function() {
|
||||
$(this).unbind('mouseup');
|
||||
if( evt.button == 2 ) {
|
||||
handler.call( $(this), evt );
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
});
|
||||
$(this)[0].oncontextmenu = function() {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
return $(this);
|
||||
},
|
||||
|
||||
rightMouseDown: function(handler) {
|
||||
$(this).each( function() {
|
||||
$(this).mousedown( function(e) {
|
||||
if( e.button == 2 ) {
|
||||
handler.call( $(this), e );
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
$(this)[0].oncontextmenu = function() {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
return $(this);
|
||||
},
|
||||
|
||||
rightMouseUp: function(handler) {
|
||||
$(this).each( function() {
|
||||
$(this).mouseup( function(e) {
|
||||
if( e.button == 2 ) {
|
||||
handler.call( $(this), e );
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
$(this)[0].oncontextmenu = function() {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
return $(this);
|
||||
},
|
||||
|
||||
noContext: function() {
|
||||
$(this).each( function() {
|
||||
$(this)[0].oncontextmenu = function() {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
return $(this);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
@@ -1,243 +1,243 @@
|
||||
<?php
|
||||
|
||||
/** Portuguese localization file for KCFinder
|
||||
* author: Hugo Branquinho
|
||||
* country: Portugal
|
||||
* company website: www.framework.pt
|
||||
*/
|
||||
|
||||
$lang = array(
|
||||
|
||||
'_locale' => "pt_PT.UTF-8", // UNIX localization code
|
||||
'_charset' => "utf-8", // Browser charset
|
||||
|
||||
// Date time formats. See http://www.php.net/manual/en/function.strftime.php
|
||||
'_dateTimeFull' => "%A, %e %B, %Y %H:%M",
|
||||
'_dateTimeMid' => "%a %e %b %Y %H:%M",
|
||||
'_dateTimeSmall' => "%d.%m.%Y %H:%M",
|
||||
|
||||
"You don't have permissions to upload files." =>
|
||||
"Não tem permissão para enviar ficheiros.",
|
||||
|
||||
"You don't have permissions to browse server." =>
|
||||
"Não tem permissão para navegar no servidor.",
|
||||
|
||||
"Cannot move uploaded file to target folder." =>
|
||||
"Não pode mover ficheiros enviados para a pasta definida.",
|
||||
|
||||
"Unknown error." =>
|
||||
"Erro indefinido.",
|
||||
|
||||
"The uploaded file exceeds {size} bytes." =>
|
||||
"O ficheiro enviado tem mais que {size} bytes.",
|
||||
|
||||
"The uploaded file was only partially uploaded." =>
|
||||
"O ficheiro foi apenas enviado parcialmente.",
|
||||
|
||||
"No file was uploaded." =>
|
||||
"Nenhum ficheiro enviado.",
|
||||
|
||||
"Missing a temporary folder." =>
|
||||
"Falta a pasta temporária.",
|
||||
|
||||
"Failed to write file." =>
|
||||
"Não foi possÃvel guardar o ficheiro.",
|
||||
|
||||
"Denied file extension." =>
|
||||
"Extensão do ficheiro inválida.",
|
||||
|
||||
"Unknown image format/encoding." =>
|
||||
"Formato/codificação da imagem desconhecido.",
|
||||
|
||||
"The image is too big and/or cannot be resized." =>
|
||||
"A imagem é muito grande e não pode ser redimensionada.",
|
||||
|
||||
"Cannot create {dir} folder." =>
|
||||
"Não foi possÃvel criar a pasta '{dir}'.",
|
||||
|
||||
"Cannot write to upload folder." =>
|
||||
"Não foi possÃvel guardar o ficheiro.",
|
||||
|
||||
"Cannot read .htaccess" =>
|
||||
"Não foi possÃvel ler o ficheiro '.htaccess'.",
|
||||
|
||||
"Incorrect .htaccess file. Cannot rewrite it!" =>
|
||||
"Ficheiro '.htaccess' incorrecto. Não foi possÃvel altera-lo.",
|
||||
|
||||
"Cannot read upload folder." =>
|
||||
"Não foi possÃvel ler a pasta de upload.",
|
||||
|
||||
"Cannot access or create thumbnails folder." =>
|
||||
"Não foi possÃvel aceder ou criar a pasta de miniaturas.",
|
||||
|
||||
"Cannot access or write to upload folder." =>
|
||||
"Não foi possÃvel aceder ou criar a pasta de upload.",
|
||||
|
||||
"Please enter new folder name." =>
|
||||
"Por favor insira o nome da pasta.",
|
||||
|
||||
"Unallowable characters in folder name." =>
|
||||
"Caracteres não autorizados no nome da pasta.",
|
||||
|
||||
"Folder name shouldn't begins with '.'" =>
|
||||
"O nome da pasta não deve começar por '.'.",
|
||||
|
||||
"Please enter new file name." =>
|
||||
"Por favor defina o nome do ficheiro.",
|
||||
|
||||
"Unallowable characters in file name." =>
|
||||
"Caracteres não autorizados no nome do ficheiro.",
|
||||
|
||||
"File name shouldn't begins with '.'" =>
|
||||
"O nome do ficheiro não deve começar por '.'.",
|
||||
|
||||
"Are you sure you want to delete this file?" =>
|
||||
"Tem a certeza que deseja apagar este ficheiro?",
|
||||
|
||||
"Are you sure you want to delete this folder and all its content?" =>
|
||||
"Tem a certeza que deseja apagar esta pasta e todos os seus conteúdos?",
|
||||
|
||||
"Inexistant or inaccessible folder." =>
|
||||
"Pasta inexistente ou inacessÃvel.",
|
||||
|
||||
"Undefined MIME types." =>
|
||||
"Tipos MIME indefinidos.",
|
||||
|
||||
"Fileinfo PECL extension is missing." =>
|
||||
"Falta a extensão PECL nas informações do ficheiro.",
|
||||
|
||||
"Opening fileinfo database failed." =>
|
||||
"Erro a abrir a informação do ficheiro.",
|
||||
|
||||
"You can't upload such files." =>
|
||||
"Não pode enviar esse tipo de ficheiros.",
|
||||
|
||||
"The file '{file}' does not exist." =>
|
||||
"O ficheiro '{file}' não existe.",
|
||||
|
||||
"Cannot read '{file}'." =>
|
||||
"Não pode ler '{file}'.",
|
||||
|
||||
"Cannot copy '{file}'." =>
|
||||
"Não pode copiar '{file}'.",
|
||||
|
||||
"Cannot move '{file}'." =>
|
||||
"Não pode mover '{file}'.",
|
||||
|
||||
"Cannot delete '{file}'." =>
|
||||
"Não pode apagar '{file}'.",
|
||||
|
||||
"Click to remove from the Clipboard" =>
|
||||
"Clique aqui para remover do Clipboard",
|
||||
|
||||
"This file is already added to the Clipboard." =>
|
||||
"Este ficheiros já foi adicionado ao Clipboard.",
|
||||
|
||||
"Copy files here" =>
|
||||
"Copiar ficheiros para aqui",
|
||||
|
||||
"Move files here" =>
|
||||
"Mover ficheiros para aqui",
|
||||
|
||||
"Delete files" =>
|
||||
"Apagar ficheiros",
|
||||
|
||||
"Clear the Clipboard" =>
|
||||
"Limpar Clipboard",
|
||||
|
||||
"Are you sure you want to delete all files in the Clipboard?" =>
|
||||
"Tem a certeza que deseja apagar todos os ficheiros que estão no Clipboard?",
|
||||
|
||||
"Copy {count} files" =>
|
||||
"Copiar {count} ficheiros",
|
||||
|
||||
"Move {count} files" =>
|
||||
"Mover {count} ficheiros",
|
||||
|
||||
"Add to Clipboard" =>
|
||||
"Adicionar ao Clipboard",
|
||||
|
||||
"New folder name:" => "Nome da pasta:",
|
||||
"New file name:" => "Nome do ficheiro:",
|
||||
|
||||
"Upload" => "Enviar",
|
||||
"Refresh" => "Actualizar",
|
||||
"Settings" => "Preferências",
|
||||
"Maximize" => "Maximizar",
|
||||
"About" => "Acerca de",
|
||||
"files" => "Ficheiros",
|
||||
"View:" => "Ver:",
|
||||
"Show:" => "Mostrar:",
|
||||
"Order by:" => "Ordenar por:",
|
||||
"Thumbnails" => "Miniatura",
|
||||
"List" => "Lista",
|
||||
"Name" => "Nome",
|
||||
"Size" => "Tamanho",
|
||||
"Date" => "Data",
|
||||
"Descending" => "",
|
||||
"Uploading file..." => "Carregando ficheiro...",
|
||||
"Loading image..." => "Carregando imagens...",
|
||||
"Loading folders..." => "Carregando pastas...",
|
||||
"Loading files..." => "Carregando ficheiros...",
|
||||
"New Subfolder..." => "Nova pasta...",
|
||||
"Rename..." => "Alterar nome...",
|
||||
"Delete" => "Eliminar",
|
||||
"OK" => "OK",
|
||||
"Cancel" => "Cancelar",
|
||||
"Select" => "Seleccionar",
|
||||
"Select Thumbnail" => "Seleccionar miniatura",
|
||||
"View" => "Ver",
|
||||
"Download" => "Sacar",
|
||||
"Clipboard" => "Clipboard",
|
||||
|
||||
// VERSION 2 NEW LABELS
|
||||
|
||||
"Cannot rename the folder." =>
|
||||
"Não pode alterar o nome da pasta.",
|
||||
|
||||
"Non-existing directory type." =>
|
||||
"Tipo de pasta inexistente.",
|
||||
|
||||
"Cannot delete the folder." =>
|
||||
"Não pode apagar a pasta.",
|
||||
|
||||
"The files in the Clipboard are not readable." =>
|
||||
"Os ficheiros que estão no Clipboard não podem ser copiados.",
|
||||
|
||||
"{count} files in the Clipboard are not readable. Do you want to copy the rest?" =>
|
||||
"{count} ficheiros do Clipboard não podem ser copiados. Pretende copiar os restantes?",
|
||||
|
||||
"The files in the Clipboard are not movable." =>
|
||||
"Os ficheiros que estão no Clipboard não podem ser movidos.",
|
||||
|
||||
"{count} files in the Clipboard are not movable. Do you want to move the rest?" =>
|
||||
"{count} ficheiros do Clipboard não podem ser movidos. Pretende mover os restantes?",
|
||||
|
||||
"The files in the Clipboard are not removable." =>
|
||||
"Os ficheiros que estão no Clipboard não podem ser removidos.",
|
||||
|
||||
"{count} files in the Clipboard are not removable. Do you want to delete the rest?" =>
|
||||
"{count} ficheiros do Clipboard não podem ser removidos. Pretende apagar os restantes?",
|
||||
|
||||
"The selected files are not removable." =>
|
||||
"Os ficheiros seleccionados não podem ser removidos.",
|
||||
|
||||
"{count} selected files are not removable. Do you want to delete the rest?" =>
|
||||
"Não pode remover {count} ficheiros. Pretende apagar os restantes?",
|
||||
|
||||
"Are you sure you want to delete all selected files?" =>
|
||||
"Tem a certeza que deseja apagar os ficheiros seleccionados?",
|
||||
|
||||
"Failed to delete {count} files/folders." =>
|
||||
"Ocorreu um erro a apagar {count} ficheiros/pastas.",
|
||||
|
||||
"A file or folder with that name already exists." =>
|
||||
"Já existe um ficheiro ou pasta com esse nome.",
|
||||
|
||||
"selected files" => "Ficheiros seleccionados",
|
||||
"Type" => "Tipo",
|
||||
"Select Thumbnails" => "Seleccionar miniaturas",
|
||||
"Download files" => "Sacar ficheiros",
|
||||
);
|
||||
|
||||
?>
|
||||
<?php
|
||||
|
||||
/** Portuguese localization file for KCFinder
|
||||
* author: Hugo Branquinho
|
||||
* country: Portugal
|
||||
* company website: www.framework.pt
|
||||
*/
|
||||
|
||||
$lang = array(
|
||||
|
||||
'_locale' => "pt_PT.UTF-8", // UNIX localization code
|
||||
'_charset' => "utf-8", // Browser charset
|
||||
|
||||
// Date time formats. See http://www.php.net/manual/en/function.strftime.php
|
||||
'_dateTimeFull' => "%A, %e %B, %Y %H:%M",
|
||||
'_dateTimeMid' => "%a %e %b %Y %H:%M",
|
||||
'_dateTimeSmall' => "%d.%m.%Y %H:%M",
|
||||
|
||||
"You don't have permissions to upload files." =>
|
||||
"Não tem permissão para enviar ficheiros.",
|
||||
|
||||
"You don't have permissions to browse server." =>
|
||||
"Não tem permissão para navegar no servidor.",
|
||||
|
||||
"Cannot move uploaded file to target folder." =>
|
||||
"Não pode mover ficheiros enviados para a pasta definida.",
|
||||
|
||||
"Unknown error." =>
|
||||
"Erro indefinido.",
|
||||
|
||||
"The uploaded file exceeds {size} bytes." =>
|
||||
"O ficheiro enviado tem mais que {size} bytes.",
|
||||
|
||||
"The uploaded file was only partially uploaded." =>
|
||||
"O ficheiro foi apenas enviado parcialmente.",
|
||||
|
||||
"No file was uploaded." =>
|
||||
"Nenhum ficheiro enviado.",
|
||||
|
||||
"Missing a temporary folder." =>
|
||||
"Falta a pasta temporária.",
|
||||
|
||||
"Failed to write file." =>
|
||||
"Não foi possÃvel guardar o ficheiro.",
|
||||
|
||||
"Denied file extension." =>
|
||||
"Extensão do ficheiro inválida.",
|
||||
|
||||
"Unknown image format/encoding." =>
|
||||
"Formato/codificação da imagem desconhecido.",
|
||||
|
||||
"The image is too big and/or cannot be resized." =>
|
||||
"A imagem é muito grande e não pode ser redimensionada.",
|
||||
|
||||
"Cannot create {dir} folder." =>
|
||||
"Não foi possÃvel criar a pasta '{dir}'.",
|
||||
|
||||
"Cannot write to upload folder." =>
|
||||
"Não foi possÃvel guardar o ficheiro.",
|
||||
|
||||
"Cannot read .htaccess" =>
|
||||
"Não foi possÃvel ler o ficheiro '.htaccess'.",
|
||||
|
||||
"Incorrect .htaccess file. Cannot rewrite it!" =>
|
||||
"Ficheiro '.htaccess' incorrecto. Não foi possÃvel altera-lo.",
|
||||
|
||||
"Cannot read upload folder." =>
|
||||
"Não foi possÃvel ler a pasta de upload.",
|
||||
|
||||
"Cannot access or create thumbnails folder." =>
|
||||
"Não foi possÃvel aceder ou criar a pasta de miniaturas.",
|
||||
|
||||
"Cannot access or write to upload folder." =>
|
||||
"Não foi possÃvel aceder ou criar a pasta de upload.",
|
||||
|
||||
"Please enter new folder name." =>
|
||||
"Por favor insira o nome da pasta.",
|
||||
|
||||
"Unallowable characters in folder name." =>
|
||||
"Caracteres não autorizados no nome da pasta.",
|
||||
|
||||
"Folder name shouldn't begins with '.'" =>
|
||||
"O nome da pasta não deve começar por '.'.",
|
||||
|
||||
"Please enter new file name." =>
|
||||
"Por favor defina o nome do ficheiro.",
|
||||
|
||||
"Unallowable characters in file name." =>
|
||||
"Caracteres não autorizados no nome do ficheiro.",
|
||||
|
||||
"File name shouldn't begins with '.'" =>
|
||||
"O nome do ficheiro não deve começar por '.'.",
|
||||
|
||||
"Are you sure you want to delete this file?" =>
|
||||
"Tem a certeza que deseja apagar este ficheiro?",
|
||||
|
||||
"Are you sure you want to delete this folder and all its content?" =>
|
||||
"Tem a certeza que deseja apagar esta pasta e todos os seus conteúdos?",
|
||||
|
||||
"Inexistant or inaccessible folder." =>
|
||||
"Pasta inexistente ou inacessÃvel.",
|
||||
|
||||
"Undefined MIME types." =>
|
||||
"Tipos MIME indefinidos.",
|
||||
|
||||
"Fileinfo PECL extension is missing." =>
|
||||
"Falta a extensão PECL nas informações do ficheiro.",
|
||||
|
||||
"Opening fileinfo database failed." =>
|
||||
"Erro a abrir a informação do ficheiro.",
|
||||
|
||||
"You can't upload such files." =>
|
||||
"Não pode enviar esse tipo de ficheiros.",
|
||||
|
||||
"The file '{file}' does not exist." =>
|
||||
"O ficheiro '{file}' não existe.",
|
||||
|
||||
"Cannot read '{file}'." =>
|
||||
"Não pode ler '{file}'.",
|
||||
|
||||
"Cannot copy '{file}'." =>
|
||||
"Não pode copiar '{file}'.",
|
||||
|
||||
"Cannot move '{file}'." =>
|
||||
"Não pode mover '{file}'.",
|
||||
|
||||
"Cannot delete '{file}'." =>
|
||||
"Não pode apagar '{file}'.",
|
||||
|
||||
"Click to remove from the Clipboard" =>
|
||||
"Clique aqui para remover do Clipboard",
|
||||
|
||||
"This file is already added to the Clipboard." =>
|
||||
"Este ficheiros já foi adicionado ao Clipboard.",
|
||||
|
||||
"Copy files here" =>
|
||||
"Copiar ficheiros para aqui",
|
||||
|
||||
"Move files here" =>
|
||||
"Mover ficheiros para aqui",
|
||||
|
||||
"Delete files" =>
|
||||
"Apagar ficheiros",
|
||||
|
||||
"Clear the Clipboard" =>
|
||||
"Limpar Clipboard",
|
||||
|
||||
"Are you sure you want to delete all files in the Clipboard?" =>
|
||||
"Tem a certeza que deseja apagar todos os ficheiros que estão no Clipboard?",
|
||||
|
||||
"Copy {count} files" =>
|
||||
"Copiar {count} ficheiros",
|
||||
|
||||
"Move {count} files" =>
|
||||
"Mover {count} ficheiros",
|
||||
|
||||
"Add to Clipboard" =>
|
||||
"Adicionar ao Clipboard",
|
||||
|
||||
"New folder name:" => "Nome da pasta:",
|
||||
"New file name:" => "Nome do ficheiro:",
|
||||
|
||||
"Upload" => "Enviar",
|
||||
"Refresh" => "Actualizar",
|
||||
"Settings" => "Preferências",
|
||||
"Maximize" => "Maximizar",
|
||||
"About" => "Acerca de",
|
||||
"files" => "Ficheiros",
|
||||
"View:" => "Ver:",
|
||||
"Show:" => "Mostrar:",
|
||||
"Order by:" => "Ordenar por:",
|
||||
"Thumbnails" => "Miniatura",
|
||||
"List" => "Lista",
|
||||
"Name" => "Nome",
|
||||
"Size" => "Tamanho",
|
||||
"Date" => "Data",
|
||||
"Descending" => "",
|
||||
"Uploading file..." => "Carregando ficheiro...",
|
||||
"Loading image..." => "Carregando imagens...",
|
||||
"Loading folders..." => "Carregando pastas...",
|
||||
"Loading files..." => "Carregando ficheiros...",
|
||||
"New Subfolder..." => "Nova pasta...",
|
||||
"Rename..." => "Alterar nome...",
|
||||
"Delete" => "Eliminar",
|
||||
"OK" => "OK",
|
||||
"Cancel" => "Cancelar",
|
||||
"Select" => "Seleccionar",
|
||||
"Select Thumbnail" => "Seleccionar miniatura",
|
||||
"View" => "Ver",
|
||||
"Download" => "Sacar",
|
||||
"Clipboard" => "Clipboard",
|
||||
|
||||
// VERSION 2 NEW LABELS
|
||||
|
||||
"Cannot rename the folder." =>
|
||||
"Não pode alterar o nome da pasta.",
|
||||
|
||||
"Non-existing directory type." =>
|
||||
"Tipo de pasta inexistente.",
|
||||
|
||||
"Cannot delete the folder." =>
|
||||
"Não pode apagar a pasta.",
|
||||
|
||||
"The files in the Clipboard are not readable." =>
|
||||
"Os ficheiros que estão no Clipboard não podem ser copiados.",
|
||||
|
||||
"{count} files in the Clipboard are not readable. Do you want to copy the rest?" =>
|
||||
"{count} ficheiros do Clipboard não podem ser copiados. Pretende copiar os restantes?",
|
||||
|
||||
"The files in the Clipboard are not movable." =>
|
||||
"Os ficheiros que estão no Clipboard não podem ser movidos.",
|
||||
|
||||
"{count} files in the Clipboard are not movable. Do you want to move the rest?" =>
|
||||
"{count} ficheiros do Clipboard não podem ser movidos. Pretende mover os restantes?",
|
||||
|
||||
"The files in the Clipboard are not removable." =>
|
||||
"Os ficheiros que estão no Clipboard não podem ser removidos.",
|
||||
|
||||
"{count} files in the Clipboard are not removable. Do you want to delete the rest?" =>
|
||||
"{count} ficheiros do Clipboard não podem ser removidos. Pretende apagar os restantes?",
|
||||
|
||||
"The selected files are not removable." =>
|
||||
"Os ficheiros seleccionados não podem ser removidos.",
|
||||
|
||||
"{count} selected files are not removable. Do you want to delete the rest?" =>
|
||||
"Não pode remover {count} ficheiros. Pretende apagar os restantes?",
|
||||
|
||||
"Are you sure you want to delete all selected files?" =>
|
||||
"Tem a certeza que deseja apagar os ficheiros seleccionados?",
|
||||
|
||||
"Failed to delete {count} files/folders." =>
|
||||
"Ocorreu um erro a apagar {count} ficheiros/pastas.",
|
||||
|
||||
"A file or folder with that name already exists." =>
|
||||
"Já existe um ficheiro ou pasta com esse nome.",
|
||||
|
||||
"selected files" => "Ficheiros seleccionados",
|
||||
"Type" => "Tipo",
|
||||
"Select Thumbnails" => "Seleccionar miniaturas",
|
||||
"Download files" => "Sacar ficheiros",
|
||||
);
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user