New: Switch ecm module to use ajax by default.
This commit is contained in:
parent
f5592bcc32
commit
a8307a32fd
@ -255,7 +255,7 @@ if ($type == 'directory')
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((! isset($mode) || $mode != 'noajax') && ! empty($conf->global->MAIN_ECM_TRY_JS))
|
if ((! isset($mode) || $mode != 'noajax') && empty($conf->global->MAIN_ECM_DISABLE_JS))
|
||||||
{
|
{
|
||||||
// Enable jquery handlers on new generated HTML objects
|
// Enable jquery handlers on new generated HTML objects
|
||||||
print "\n".'<script type="text/javascript">'."\n";
|
print "\n".'<script type="text/javascript">'."\n";
|
||||||
|
|||||||
@ -608,7 +608,7 @@ class FormFile
|
|||||||
// Delete or view link
|
// Delete or view link
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
if ($useinecm) print '<a href="'.DOL_URL_ROOT.'/ecm/docfile.php?urlfile='.urlencode($file['name']).$param.'" class="editfilelink" rel="'.urlencode($file['name']).'">'.img_view().'</a> ';
|
if ($useinecm) print '<a href="'.DOL_URL_ROOT.'/ecm/docfile.php?urlfile='.urlencode($file['name']).$param.'" class="editfilelink" rel="'.urlencode($file['name']).'">'.img_view().'</a> ';
|
||||||
if ($permtodelete) print '<a href="'.(($useinecm && ! empty($conf->global->MAIN_ECM_TRY_JS))?'#':$url.'?id='.$object->id.'&action=delete&urlfile='.urlencode($file['name']).$param).'" class="deletefilelink" rel="'.urlencode($file['name']).'">'.img_delete().'</a>';
|
if ($permtodelete) print '<a href="'.(($useinecm && empty($conf->global->MAIN_ECM_DISABLE_JS))?'#':$url.'?id='.$object->id.'&action=delete&urlfile='.urlencode($file['name']).$param).'" class="deletefilelink" rel="'.urlencode($file['name']).'">'.img_delete().'</a>';
|
||||||
else print ' ';
|
else print ' ';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|||||||
@ -303,7 +303,7 @@ if ($action == 'refreshmanual')
|
|||||||
//print "xx".$_SESSION["dol_screenheight"];
|
//print "xx".$_SESSION["dol_screenheight"];
|
||||||
$maxheightwin=(isset($_SESSION["dol_screenheight"]) && $_SESSION["dol_screenheight"] > 500)?($_SESSION["dol_screenheight"]-166):660;
|
$maxheightwin=(isset($_SESSION["dol_screenheight"]) && $_SESSION["dol_screenheight"] > 500)?($_SESSION["dol_screenheight"]-166):660;
|
||||||
$morejs=array();
|
$morejs=array();
|
||||||
if (! empty($conf->global->MAIN_ECM_TRY_JS)) $morejs=array("/filemanager/includes/jqueryFileTree/jqueryFileTree.js"); // TODO Move lib into includes
|
if (empty($conf->global->MAIN_ECM_DISABLE_JS)) $morejs=array("/filemanager/includes/jqueryFileTree/jqueryFileTree.js"); // TODO Move lib into includes
|
||||||
$moreheadcss="
|
$moreheadcss="
|
||||||
<!-- dol_screenheight=".$_SESSION["dol_screenheight"]." -->
|
<!-- dol_screenheight=".$_SESSION["dol_screenheight"]." -->
|
||||||
<style type=\"text/css\">
|
<style type=\"text/css\">
|
||||||
@ -586,7 +586,7 @@ if (empty($action) || $action == 'file_manager' || preg_match('/refresh/i',$acti
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_ECM_TRY_JS))
|
if (empty($conf->global->MAIN_ECM_DISABLE_JS))
|
||||||
{
|
{
|
||||||
print '<tr><td colspan="6" style="padding-left: 20px">';
|
print '<tr><td colspan="6" style="padding-left: 20px">';
|
||||||
|
|
||||||
@ -851,11 +851,8 @@ else
|
|||||||
// Start right panel
|
// Start right panel
|
||||||
|
|
||||||
|
|
||||||
//if (empty($conf->global->MAIN_ECM_TRY_JS))
|
$mode='noajax';
|
||||||
//{
|
include_once(DOL_DOCUMENT_ROOT.'/core/ajax/ajaxdirpreview.php');
|
||||||
$mode='noajax';
|
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/core/ajax/ajaxdirpreview.php');
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
// End right panel
|
// End right panel
|
||||||
@ -877,7 +874,7 @@ else
|
|||||||
|
|
||||||
|
|
||||||
// To attach new file
|
// To attach new file
|
||||||
if (! empty($conf->global->MAIN_ECM_TRY_JS) || ! empty($section))
|
if (empty($conf->global->MAIN_ECM_DISABLE_JS) || ! empty($section))
|
||||||
{
|
{
|
||||||
$formfile=new FormFile($db);
|
$formfile=new FormFile($db);
|
||||||
$formfile->form_attach_new_file(DOL_URL_ROOT.'/ecm/index.php', 'none', 0, ($section?$section:-1), $user->rights->ecm->upload, 48);
|
$formfile->form_attach_new_file(DOL_URL_ROOT.'/ecm/index.php', 'none', 0, ($section?$section:-1), $user->rights->ecm->upload, 48);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user