mirror of
https://github.com/e107inc/e107.git
synced 2025-08-07 15:16:30 +02:00
uploader JS extension options; media manager minor fixes; date, file value types (form handler)
This commit is contained in:
@@ -174,11 +174,16 @@ class media_cat_ui extends e_admin_ui
|
|||||||
"download" => "download"
|
"download" => "download"
|
||||||
);
|
);
|
||||||
|
|
||||||
if($_GET['action'] == 'list')
|
if($this->getAction() == 'list')
|
||||||
{
|
{
|
||||||
$this->fields['media_cat_owner']['writeParms'] = $restricted;
|
$this->fields['media_cat_owner']['writeParms'] = $restricted;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($this->getAction() == 'create')
|
||||||
|
{
|
||||||
|
$this->fields['media_cat_category']['noedit'] = true;
|
||||||
|
}
|
||||||
|
|
||||||
$sql = e107::getDb();
|
$sql = e107::getDb();
|
||||||
|
|
||||||
|
|
||||||
@@ -874,7 +879,7 @@ class media_admin_ui extends e_admin_ui
|
|||||||
|
|
||||||
if($file)
|
if($file)
|
||||||
{
|
{
|
||||||
$cat = $_GET['for'];
|
$cat = e107::getParser()->toDB($cat);
|
||||||
if(!isset($this->cats[$cat]))
|
if(!isset($this->cats[$cat]))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@@ -954,7 +959,9 @@ class media_admin_ui extends e_admin_ui
|
|||||||
|
|
||||||
if($type == 'file')
|
if($type == 'file')
|
||||||
{
|
{
|
||||||
$text .= $this->getUI()->getList(); //FIXME NOT WORKING!
|
$this->perPage = 0;
|
||||||
|
$this->getTreeModel()->setParam('db_query', $this->_modifyListQry(false, false, false, false, $this->listQry))->load();
|
||||||
|
$text .= $this->getUI()->getList();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -274,7 +274,10 @@ $(document).ready(function()
|
|||||||
|
|
||||||
// ----------------- Upload --------------------------------------
|
// ----------------- Upload --------------------------------------
|
||||||
|
|
||||||
var upath = $("#uploader").attr("rel");
|
var upath = $("#uploader").attr("rel"),
|
||||||
|
extImg = $("#uploader").attr("extimg"),
|
||||||
|
extArchive = $("#uploader").attr("extarch"),
|
||||||
|
extDoc = $("#uploader").attr("extdoc");
|
||||||
|
|
||||||
$("#uploader").pluploadQueue({
|
$("#uploader").pluploadQueue({
|
||||||
// General settings
|
// General settings
|
||||||
@@ -289,8 +292,9 @@ $(document).ready(function()
|
|||||||
|
|
||||||
// Specify what files to browse for
|
// Specify what files to browse for
|
||||||
filters : [
|
filters : [
|
||||||
{title : "Image files", extensions : "jpg,gif,png,jpeg"},
|
{title : "Image files", extensions : extImg || "jpg,gif,png,jpeg"},
|
||||||
{title : "Zip files", extensions : "zip,gz"}
|
{title : "Zip files", extensions : extArchive || "zip,gz"},
|
||||||
|
{title : "Document files", extensions : extDoc || "pdf,doc,docx,xls,xlsm"}
|
||||||
],
|
],
|
||||||
preinit : {
|
preinit : {
|
||||||
Init: function(up, info) {
|
Init: function(up, info) {
|
||||||
|
@@ -1816,6 +1816,16 @@ class e_form
|
|||||||
$value = '<img src="'.$tp->replaceConstants(vartrue($parms['pre']).$value, 'abs').'" alt="'.basename($value).'" class="icon'.(vartrue($parms['class']) ? ' '.$parms['class'] : '').'" />';
|
$value = '<img src="'.$tp->replaceConstants(vartrue($parms['pre']).$value, 'abs').'" alt="'.basename($value).'" class="icon'.(vartrue($parms['class']) ? ' '.$parms['class'] : '').'" />';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'file':
|
||||||
|
if(vartrue($parms['base']))
|
||||||
|
{
|
||||||
|
$url = $parms['base'].$value;
|
||||||
|
}
|
||||||
|
else $url = e107::getParser()->replaceConstants($value, 'full');
|
||||||
|
$name = basename($value);
|
||||||
|
$value = '<a href="'.$url.'" title="Direct link to '.$name.'" rel="external">'.$name.'</a>';
|
||||||
|
break;
|
||||||
|
|
||||||
case 'image': //TODO - thumb, js tooltip...
|
case 'image': //TODO - thumb, js tooltip...
|
||||||
if($value)
|
if($value)
|
||||||
{
|
{
|
||||||
@@ -1859,6 +1869,10 @@ class e_form
|
|||||||
$value = $value ? e107::getDate()->convert_date($value, vartrue($parms['mask'], 'short')) : '';
|
$value = $value ? e107::getDate()->convert_date($value, vartrue($parms['mask'], 'short')) : '';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'date':
|
||||||
|
// just show original value
|
||||||
|
break;
|
||||||
|
|
||||||
case 'userclass':
|
case 'userclass':
|
||||||
$value = $this->_uc->uc_get_classname($value);
|
$value = $this->_uc->uc_get_classname($value);
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user