Skip to content
This repository was archived by the owner on Mar 30, 2024. It is now read-only.

Commit 9dc1eef

Browse files
committed
clean ui, files, less,js,img and apply fixes
1 parent 14a65e8 commit 9dc1eef

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+3887
-7165
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ node_modules
1010
filemanager/js/*
1111
filemanager/css/*
1212
resources/tmp/*
13-
/nbproject/private/
13+
/nbproject/private/
14+
/nbproject/private

bower.json

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,33 @@
11
{
2-
"name": "ResponsiveFilemanager",
3-
"version": "9.9.7",
4-
"homepage": "http://www.responsivefilemanager.com/",
5-
"authors": [
6-
"tr1pp0 <info@albertoperipolli.com>"
7-
],
8-
"license": "Creative Commons Attribution - NonCommercial 3.0 Unported License",
9-
"ignore": [
10-
"**/.*",
11-
"node_modules",
12-
"bower_components",
13-
"test",
14-
"tests"
15-
],
16-
"dependencies": {
17-
"jquery": "1.9.1",
18-
"jquery_lazyload": "git@github.com:tuupola/jquery_lazyload.git",
19-
"jQuery-contextMenu": "~1.6.6",
20-
"jquery-touchswipe": "~1.6.8",
21-
"dropzone": "~4.0.1",
22-
"zeroclipboard": "2.1.6",
23-
"jquery-ui": "1.10.4",
24-
"jqueryui-touch-punch": "*",
25-
"jPlayer": "git@github.com:happyworm/jPlayer.git#2.4.0",
26-
"html5shiv": "3.6.2",
27-
"viewerjs": "~0.5.5"
28-
},
29-
"resolutions": {
30-
"jquery": "1.9.1"
31-
}
2+
"name": "ResponsiveFilemanager",
3+
"version": "9.9.7",
4+
"homepage": "http://www.responsivefilemanager.com/",
5+
"authors": [
6+
"tr1pp0 <info@albertoperipolli.com>"
7+
],
8+
"license": "Creative Commons Attribution - NonCommercial 3.0 Unported License",
9+
"ignore": [
10+
"**/.*",
11+
"node_modules",
12+
"bower_components",
13+
"test",
14+
"tests"
15+
],
16+
"dependencies": {
17+
"jquery": "1.9.1",
18+
"jquery_lazyload": "git@github.com:tuupola/jquery_lazyload.git",
19+
"jquery-scrollstop": "git@github.com:ssorallen/jquery-scrollstop.git",
20+
"jQuery-contextMenu": "~1.7.0",
21+
"jquery-touchswipe": "~1.6.8",
22+
"dropzone": "~4.0.1",
23+
"zeroclipboard": "2.1.6",
24+
"jquery-ui": "1.10.4",
25+
"jqueryui-touch-punch": "*",
26+
"jPlayer": "git@github.com:happyworm/jPlayer.git#2.4.0",
27+
"html5shiv": "3.6.2",
28+
"viewerjs": "~0.5.5"
29+
},
30+
"resolutions": {
31+
"jquery": "1.9.1"
32+
}
3233
}

filemanager/ajax_calls.php

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,21 @@
5656
break;
5757
case 'save_img':
5858
$info = pathinfo($_POST['name']);
59-
6059
if (
6160
strpos($_POST['path'], '/') === 0 || strpos($_POST['path'], '../') !== false || strpos($_POST['path'], './') === 0 || (strpos($_POST['url'], 'http://s3.amazonaws.com/feather') !== 0 && strpos($_POST['url'], 'https://s3.amazonaws.com/feather') !== 0) || $_POST['name'] != fix_filename($_POST['name'], $transliteration, $convert_spaces, $replace_with) || !in_array(strtolower($info['extension']), array('jpg', 'jpeg', 'png'))
6261
) {
6362
response('wrong data', 400)->send();
6463
exit;
6564
}
66-
$image_data = file_get_contents($_POST['url']);
65+
66+
$image_data = get_file_by_url($_POST['url']);
6767
if ($image_data === false) {
6868
response(trans('Aviary_No_Save'), 400)->send();
6969
exit;
7070
}
71-
require_once('include/php_image_magician.php');
72-
$magicianObj = new imageLib($_POST['url']);
73-
$magicianObj->saveImage($current_path . $_POST['path'] . $_POST['name']);
71+
72+
73+
file_put_contents($current_path . $_POST['path'] . $_POST['name'], $image_data);
7474
create_img($current_path . $_POST['path'] . $_POST['name'], $thumbs_base_path . $_POST['path'] . $_POST['name'], 122, 91);
7575
// TODO something with this function cause its blowing my mind
7676
new_thumbnails_creation(
@@ -239,7 +239,7 @@
239239
});
240240
</script>
241241

242-
<?php
242+
<?php
243243
endif;
244244

245245
$content = ob_get_clean();
@@ -270,7 +270,8 @@
270270

271271
// size over limit
272272
if ($copy_cut_max_size !== false && is_int($copy_cut_max_size)) {
273-
if (($copy_cut_max_size * 1024 * 1024) < foldersize($path)) {
273+
list($sizeFolderToCopy, $fileNum, $foldersCount) = folder_info($path);
274+
if (($copy_cut_max_size * 1024 * 1024) < $sizeFolderToCopy) {
274275
response(sprintf(trans('Copy_Cut_Size_Limit'), ($_POST['sub_action'] == 'copy' ? lcfirst(trans('Copy')) : lcfirst(trans('Cut'))), $copy_cut_max_size), 400)->send();
275276
exit;
276277
}
@@ -440,7 +441,7 @@
440441

441442
if ($sub_action == 'preview') {
442443
if ($preview_mode == 'text') {
443-
// get and sanities
444+
// get and sanities
444445
$data = stripslashes(htmlspecialchars(file_get_contents($selected_file)));
445446

446447
$ret = '';
@@ -453,7 +454,7 @@
453454
$ret .= '<div class="text-center"><strong>' . $info['basename'] . '</strong></div><pre class="no-prettify">' . $data . '</pre>';
454455
}
455456
} elseif ($preview_mode == 'viewerjs') {
456-
$ret = '<iframe id="viewer" src="js/ViewerJS/#../../' . $_GET["file"] . '" allowfullscreen="" webkitallowfullscreen="" class="viewer-iframe"></iframe>';
457+
$ret = '<iframe id="viewer" src="js/ViewerJS/../../' . $_GET["file"] . '" allowfullscreen="" webkitallowfullscreen="" class="viewer-iframe"></iframe>';
457458
} elseif ($preview_mode == 'google') {
458459
$url_file = $base_url . $upload_dir . str_replace($current_path, '', $_GET["file"]);
459460
$googledoc_url = urlencode($url_file);

filemanager/dialog.php

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@
299299
echo $aopt_key . ": " . json_encode($aopt_val) . ",";
300300
}
301301
?>
302+
302303
onReady: function() {
303304
hide_animation();
304305
},
@@ -311,7 +312,8 @@
311312
url: "ajax_calls.php?action=save_img",
312313
data: { url: newURL, path:$('#sub_folder').val() + $('#fldr_value').val(), name:$('#aviary_img').attr('data-name') }
313314
}).done(function(msg) {
314-
featherEditor.close();
315+
console.log(msg);
316+
featherEditor.close();
315317
d = new Date();
316318
$("figure[data-name='" + $('#aviary_img').attr('data-name') + "']").find('img').each(function(){
317319
$(this).attr('src', $(this).attr('src') + "?" + d.getTime());
@@ -320,22 +322,23 @@
320322
$(this).attr('data-url', $(this).data('url') + "?" + d.getTime());
321323
});
322324
hide_animation();
323-
});
325+
}).error(function(msg) {
326+
console.log(msg); });
324327
return false;
325328
},
326329
onError: function(errorObj) {
327-
bootbox.alert(errorObj.message);
330+
console.log(errorObj.message);
328331
hide_animation();
329332
}
330333

331334
});
332335
}
333336
</script>
334337

335-
<!-- <script src="js/include.js"></script>-->
336-
<script src="../resources/assets/js/metro.js"></script>
337-
<script src="../resources/assets/js/include.js"></script>
338-
<script src="../resources/assets/js/custom.js"></script>
338+
<script src="js/include.js"></script>
339+
<!-- <script src="../resources/assets/js/metro.js"></script>
340+
<script src="../resources/assets/js/include.js"></script>
341+
<script src="../resources/assets/js/custom.js"></script>-->
339342

340343

341344
</head>
@@ -714,23 +717,23 @@ function extensionSort($x, $y) {
714717
if ($sort_by == "name") {
715718
echo ($descending) ? "descending" : "ascending";
716719
}
717-
?>" href="javascript:void('')" data-sort="name"><?php echo trans('Filename'); ?></a></div>
720+
?>" href="javascript:void('')" data-sort="name"><span class="indicator"></span> <?php echo trans('Filename'); ?></a></div>
718721
<div class="file-date"><a class="sorter sort-date <?php
719722
if ($sort_by == "date") {
720723
echo ($descending) ? "descending" : "ascending";
721724
}
722-
?>" href="javascript:void('')" data-sort="date"><?php echo trans('Date'); ?></a></div>
725+
?>" href="javascript:void('')" data-sort="date"><span class="indicator"></span> <?php echo trans('Date'); ?></a></div>
723726
<div class="file-size"><a class="sorter sort-size <?php
724727
if ($sort_by == "size") {
725728
echo ($descending) ? "descending" : "ascending";
726729
}
727-
?>" href="javascript:void('')" data-sort="size"><?php echo trans('Size'); ?></a></div>
730+
?>" href="javascript:void('')" data-sort="size"><span class="indicator"></span> <?php echo trans('Size'); ?></a></div>
728731
<div class='img-dimension'><?php echo trans('Dimension'); ?></div>
729732
<div class='file-extension'><a class="sorter sort-extension <?php
730733
if ($sort_by == "extension") {
731734
echo ($descending) ? "descending" : "ascending";
732735
}
733-
?>" href="javascript:void('')" data-sort="extension"><?php echo trans('Type'); ?></a></div>
736+
?>" href="javascript:void('')" data-sort="extension"><span class="indicator"></span> <?php echo trans('Type'); ?></a></div>
734737
<div class='file-operations'><?php echo trans('Operations'); ?></div>
735738
</div>
736739
<?php } ?>
@@ -1140,7 +1143,7 @@ function extensionSort($x, $y) {
11401143
<div class="cell" style="margin: auto;float: none;">
11411144
<div class="image-container bordered image-format-hd">
11421145
<div class="frame">
1143-
<img id="full-img" src="img/storing_animation.gif" class="" style="margin: auto;">
1146+
<img id="full-img" src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=" class="" style="margin: auto;">
11441147
</div>
11451148
</div>
11461149

@@ -1152,9 +1155,13 @@ function extensionSort($x, $y) {
11521155
<!-- lightbox div end -->
11531156

11541157
<!-- loading div start -->
1155-
<div id="loading_container" style="display:none;">
1156-
<div id="loading" style="background-color:#000; position:fixed; width:100%; height:100%; top:0px; left:0px;z-index:100000"></div>
1157-
<img id="loading_animation" src="img/storing_animation.gif" alt="loading" style="z-index:10001; margin-left:-32px; margin-top:-32px; position:fixed; left:50%; top:50%"/>
1158+
<!-- <div id="loading_container" style="display:block;">
1159+
<div id="loading" style="background-color:#000; position:fixed; width:100%; height:100%; top:0px; left:0px;z-index:10000;opacity: .7"></div>
1160+
<div data-role="preloader" data-type="ring" style="margin: auto;z-index:10001;" class="preloader-ring"></div>
1161+
</div>-->
1162+
<div id="loading_container" style="display: none;">
1163+
<div id="loading"></div>
1164+
<div data-role="preloader" data-type="ring" class="preloader-ring"></div>
11581165
</div>
11591166
<!-- loading div end -->
11601167

0 commit comments

Comments
 (0)