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

Commit 9336193

Browse files
author
Charles Ma
committed
BUG: fixed bug #218 Fixed the path
Added loading image in the upload button
1 parent eb11429 commit 9336193

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

core/layouts/layout.phtml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,8 @@ echo $this->doctype()
186186
<div class="HeaderAction">
187187
<ul>
188188
<li class="uploadFile" title="Upload" rel="<?php echo $this->webroot?>/upload/simpleupload">
189-
<a href="#"><img src="<?= $this->coreWebroot ?>/public/images/icons/addfile.png" alt="Upload a file"/>
189+
<a href="#"><img id="uploadAFile" src="<?= $this->coreWebroot ?>/public/images/icons/addfile.png" alt="Upload a file"/>
190+
<img id="uploadAFileLoadiing" style="margin-top:5px;display:none;" src="<?= $this->coreWebroot ?>/public/images/icons/loading.gif" alt="Upload a file"/>
190191
Upload
191192
</a>
192193
</li>

core/public/js/browse/browse.movecopy.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
var ajaxSelectRequest='';
2222
function callbackSelect(node)
2323
{
24-
var selectedElement = node.find('span:last').html();
24+
console.log(node);
25+
var selectedElement = node.find('span:eq(1)').html();
2526

2627
var parent = true;
2728
var current = node;
@@ -39,7 +40,7 @@
3940
}
4041
if(parent != null)
4142
{
42-
selectedElement = parent.find('span:last').html()+'/'+selectedElement;
43+
selectedElement = parent.find('span:eq(1)').html()+'/'+selectedElement;
4344
current = parent;
4445
}
4546
}

core/public/js/layout/main.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,17 @@ $(function() {
206206
}
207207
});
208208

209+
var uploadPageLoaded = false;
209210
$('div.HeaderAction li.uploadFile').click(function()
210211
{
211212
if(json.global.logged)
212213
{
213-
// loadDialog("upload","/upload/simpleupload");
214-
// showDialog("Upload",false);
214+
if(!uploadPageLoaded)
215+
{
216+
$('img#uploadAFile').hide();
217+
$('img#uploadAFileLoadiing').show();
218+
uploadPageLoaded = true;
219+
}
215220
}
216221
else
217222
{

core/public/js/upload/upload.simpleupload.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11

22

33
var swfu;
4-
4+
5+
$('img#uploadAFile').show();
6+
$('img#uploadAFileLoadiing').hide();
57
function uploadPreStart(file)
68
{
79
swfu.setPostParams({"sid" : $('.sessionId').val(),"parent": $('#destinationId').val(),'license': $('select[name=licenseSelect]').val()});

0 commit comments

Comments
 (0)