Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit e66f00f

Browse files
author
Charles Marion
committed
BUG: fixed a but with recent folders
1 parent 00d5816 commit e66f00f

File tree

5 files changed

+16
-15
lines changed

5 files changed

+16
-15
lines changed

core/controllers/BrowseController.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -284,14 +284,14 @@ public function getelementinfoAction()
284284
$folder = $this->Folder->load($id);
285285
$jsonContent = array_merge($jsonContent, $folder->toArray());
286286
$jsonContent['creation'] = $this->Component->Date->formatDate(strtotime($jsonContent['date_update']));
287-
if(!isset($this->userSession->Dao->recentFolders))
287+
if(!isset($this->userSession->recentFolders))
288288
{
289-
$this->userSession->Dao->recentFolders = array();
289+
$this->userSession->recentFolders = array();
290290
}
291-
array_push($this->userSession->Dao->recentFolders, $folder->getKey());
292-
if(count($this->userSession->Dao->recentFolders) > 5)
291+
array_push($this->userSession->recentFolders, $folder->getKey());
292+
if(count($this->userSession->recentFolders) > 5)
293293
{
294-
array_shift($this->userSession->Dao->recentFolders);
294+
array_shift($this->userSession->recentFolders);
295295
}
296296
break;
297297
case 'item':

core/controllers/FolderController.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,14 @@ public function viewAction()
131131
$header .= "</ul>";
132132
}
133133

134-
if(!isset($this->userSession->Dao->recentFolders))
134+
if(!isset($this->userSession->recentFolders))
135135
{
136-
$this->userSession->Dao->recentFolders = array();
136+
$this->userSession->recentFolders = array();
137137
}
138-
array_push($this->userSession->Dao->recentFolders, $folder->getKey());
139-
if(count($this->userSession->Dao->recentFolders) > 5)
138+
array_push($this->userSession->recentFolders, $folder->getKey());
139+
if(count($this->userSession->recentFolders) > 5)
140140
{
141-
array_shift($this->userSession->Dao->recentFolders);
141+
array_shift($this->userSession->recentFolders);
142142
}
143143

144144
$this->Folder->incrementViewCount($folder);

core/controllers/ItemController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,11 @@ function viewAction()
137137
else
138138
{
139139
$parents = $itemDao->getFolders();
140-
if(isset($this->userSession->Dao->recentFolders))
140+
if(isset($this->userSession->recentFolders))
141141
{
142142
foreach($parents as $p)
143143
{
144-
if(in_array($p->getKey(), $this->userSession->Dao->recentFolders))
144+
if(in_array($p->getKey(), $this->userSession->recentFolders))
145145
{
146146
$currentFolder = $p;
147147
break;

core/public/js/common/common.browser.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@
284284
{
285285
html+='<img class="infoLogo" alt="Data Type" src="'+json.global.coreWebroot+'/public/images/icons/document-big.png" />';
286286
}
287+
console.log(arrayElement['name']);
287288
html+='<span class="infoTitle" >'+sliceFileName(arrayElement['name'],27)+'</span>';
288289
html+='<table>';
289290
html+=' <tr>';

core/public/js/layout/jquery.treeTable.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@
332332
// var padding=parseInt(node.find('td:first').css('padding-left').slice(0,-2));
333333

334334
var j = 1;
335-
335+
var sliceValue = 42 - (id.split('-').length - 1)*3;
336336

337337
$.each(elements['folders'], function(index, value) {
338338
if(j > 70)
@@ -345,7 +345,7 @@
345345
return;
346346
}
347347
html+= "<tr id='"+id+"-"+i+"' deletable='"+value['deletable']+"' privacy='"+value['privacy_status']+"' class='parent child-of-"+id+"' ajax='"+value['folder_id']+"'type='folder' policy='"+value['policy']+"' element='"+value['folder_id']+"'>";
348-
html+= " <td><span class='folder'>"+sliceFileName(value['name'],40)+"</span></td>";
348+
html+= " <td><span class='folder'>"+sliceFileName(value['name'],sliceValue)+"</span></td>";
349349
html+= " <td>"+'<img class="folderLoading" element="'+value['folder_id']+'" alt="" src="'+json.global.coreWebroot+'/public/images/icons/loading.gif"/>'+"</td>";
350350
html+= " <td>"+value['date_update']+"</td>";
351351
html+= " <td><input type='checkbox' class='treeCheckbox' type='folder' element='"+value['folder_id']+"'/></td>";
@@ -366,7 +366,7 @@
366366
return;
367367
}
368368
html+= "<tr id='"+id+"-"+i+"' class='child-of-"+id+"' privacy='"+value['privacy_status']+"' type='item' policy='"+value['policy']+"' element='"+value['item_id']+"'>";
369-
html+= " <td><span class='file'>"+sliceFileName(value['name'],40)+"</span></td>";
369+
html+= " <td><span class='file'>"+sliceFileName(value['name'],sliceValue)+"</span></td>";
370370
html+= " <td>"+value['size']+"</td>";
371371
html+= " <td>"+value['date_update']+"</td>";
372372
html+= " <td><input type='checkbox' class='treeCheckbox' type='item' element='"+value['item_id']+"'/></td>";

0 commit comments

Comments
 (0)