source: pro-violet-viettel/sourcecode/assets/js/filemanager/filemanager.js @ 923

Last change on this file since 923 was 682, checked in by quyenla, 10 years ago

tpro-violet-viettel/sourcecode/api.violet.vn/www/apps/platform/modules/space/actions/actions.class.php

File size: 2.4 KB
Line 
1jQuery(
2        function($) {
3
4                /**
5                For resize panels on main screen
6                */
7                var maxWidth = 0;
8                function getDirTreeMaxWidth () {
9                        var scrWidth = $('#main-content').width();
10                        return parseInt(scrWidth / 2);
11                }
12
13                function layout ()
14                {
15                        var scrWidth = $('#main-content').width();
16                        var scrHeght = $(window).height();
17                        var dirTreeHeight = scrHeght - $('#title-bar').height() - $('#tools-bar').height() - $('#status-bar').height() - 2;
18
19                        $('#uploaddirectory-view-container').height(dirTreeHeight);
20                        $('#directory-content-view-container').height(dirTreeHeight);
21                        $('#directory-content-view-container').width('calc(100% - ' + ($('#directory-view-container').width() + 8) + 'px)');
22                        var scollWidth = $('#directory-content-view-container').width();
23
24                        maxWidth = getDirTreeMaxWidth();
25
26                        $('#treeview-container').height(dirTreeHeight - 5);
27                }
28
29                layout ();
30
31                $('#directory-view-container').resizable({
32                        maxWidth: maxWidth,
33                        minWidth: 220,
34                        handles: "e",
35                        resize: function (event, ui) {
36                                layout ();
37                        }
38                });
39
40                $(window).resize (function() {layout ();$('#directory-view-container').resizable({maxWidth: maxWidth});});
41
42                /**
43                END - For resize panels on main screen
44                */
45
46
47                /**
48                For Directory Tree
49                */
50
51                var privateGrid = $('#file-container').violetGrid ({directoryContent:null});
52               
53                var privateTree =  $('#treeview-container').violetTree({
54                        container: $('#treeview-container'),
55                        expandEasing: 'easeOutBounce',
56                        collapseEasing: 'easeOutBounce',
57                        homeDirNameDisplay: "Thư mục gốc",
58                        grid: privateGrid
59                });
60               
61                /*var selectTree = $('#select-destination-tree').violetTree({
62                        container: $('#select-destination-tree'),
63                        expandEasing: 'easeOutBounce',
64                        collapseEasing: 'easeOutBounce',
65                        homeDirNameDisplay: "Thư mục gốc"
66                });*/
67               
68                $('#select-destination-tree').slimScroll({
69                height: '250px',
70                alwaysVisible: true,
71                disableFadeOut: true
72            });
73               
74                $('#btnNewFolder').click (function(){
75                });
76               
77                /*$('#btnCopy').click (function(){
78                        privateTree.copy();
79                });*/
80               
81                $('#btnDel').click (function() {
82                        var curDir = privateTree.getCurrentDir();
83                        privateTree.deleteDir(curDir);
84                });
85               
86                $('#btnUpload').click (function() {
87                        var curDir = privateTree.getCurrentDir();
88                        privateTree.upload();
89                });
90               
91
92
93                /**
94                END - For Directory Tree
95                */
96
97        }
98);
Note: See TracBrowser for help on using the repository browser.