fcfinder 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +10 -0
- data/.travis.yml +3 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/Rakefile +1 -0
- data/app/assets/images/fcfinder/about.png +0 -0
- data/app/assets/images/fcfinder/copy.png +0 -0
- data/app/assets/images/fcfinder/cut.png +0 -0
- data/app/assets/images/fcfinder/date_sorter.png +0 -0
- data/app/assets/images/fcfinder/delete.png +0 -0
- data/app/assets/images/fcfinder/directory-max.png +0 -0
- data/app/assets/images/fcfinder/directory.png +0 -0
- data/app/assets/images/fcfinder/directory_mini.png +0 -0
- data/app/assets/images/fcfinder/download.png +0 -0
- data/app/assets/images/fcfinder/duplicate.png +0 -0
- data/app/assets/images/fcfinder/edit.png +0 -0
- data/app/assets/images/fcfinder/files/7z.png +0 -0
- data/app/assets/images/fcfinder/files/Untitled-24.png +0 -0
- data/app/assets/images/fcfinder/files/avi.png +0 -0
- data/app/assets/images/fcfinder/files/bmp.png +0 -0
- data/app/assets/images/fcfinder/files/bz.png +0 -0
- data/app/assets/images/fcfinder/files/bz2.png +0 -0
- data/app/assets/images/fcfinder/files/css.png +0 -0
- data/app/assets/images/fcfinder/files/doc.png +0 -0
- data/app/assets/images/fcfinder/files/docx.png +0 -0
- data/app/assets/images/fcfinder/files/dv.png +0 -0
- data/app/assets/images/fcfinder/files/flv.png +0 -0
- data/app/assets/images/fcfinder/files/gif.png +0 -0
- data/app/assets/images/fcfinder/files/gz.png +0 -0
- data/app/assets/images/fcfinder/files/htm.png +0 -0
- data/app/assets/images/fcfinder/files/html.png +0 -0
- data/app/assets/images/fcfinder/files/ico.png +0 -0
- data/app/assets/images/fcfinder/files/jpeg.png +0 -0
- data/app/assets/images/fcfinder/files/jpg.png +0 -0
- data/app/assets/images/fcfinder/files/js.png +0 -0
- data/app/assets/images/fcfinder/files/mid.png +0 -0
- data/app/assets/images/fcfinder/files/mkv.png +0 -0
- data/app/assets/images/fcfinder/files/mov.png +0 -0
- data/app/assets/images/fcfinder/files/mp3.png +0 -0
- data/app/assets/images/fcfinder/files/mp4.png +0 -0
- data/app/assets/images/fcfinder/files/mp4a.png +0 -0
- data/app/assets/images/fcfinder/files/mpg.png +0 -0
- data/app/assets/images/fcfinder/files/ogg.png +0 -0
- data/app/assets/images/fcfinder/files/other.png +0 -0
- data/app/assets/images/fcfinder/files/pdf.png +0 -0
- data/app/assets/images/fcfinder/files/php.png +0 -0
- data/app/assets/images/fcfinder/files/png.png +0 -0
- data/app/assets/images/fcfinder/files/pps.png +0 -0
- data/app/assets/images/fcfinder/files/ppt.png +0 -0
- data/app/assets/images/fcfinder/files/pptx.png +0 -0
- data/app/assets/images/fcfinder/files/psd.png +0 -0
- data/app/assets/images/fcfinder/files/rar.png +0 -0
- data/app/assets/images/fcfinder/files/rb.png +0 -0
- data/app/assets/images/fcfinder/files/swf.png +0 -0
- data/app/assets/images/fcfinder/files/tar.png +0 -0
- data/app/assets/images/fcfinder/files/tbz.png +0 -0
- data/app/assets/images/fcfinder/files/tga.png +0 -0
- data/app/assets/images/fcfinder/files/tgz.png +0 -0
- data/app/assets/images/fcfinder/files/tif.png +0 -0
- data/app/assets/images/fcfinder/files/tiff.png +0 -0
- data/app/assets/images/fcfinder/files/txt.png +0 -0
- data/app/assets/images/fcfinder/files/wav.png +0 -0
- data/app/assets/images/fcfinder/files/wm.png +0 -0
- data/app/assets/images/fcfinder/files/wma.png +0 -0
- data/app/assets/images/fcfinder/files/xls.png +0 -0
- data/app/assets/images/fcfinder/files/xlsx.png +0 -0
- data/app/assets/images/fcfinder/files/xml.png +0 -0
- data/app/assets/images/fcfinder/files/zip.png +0 -0
- data/app/assets/images/fcfinder/finder.png +0 -0
- data/app/assets/images/fcfinder/icon_view.png +0 -0
- data/app/assets/images/fcfinder/info.png +0 -0
- data/app/assets/images/fcfinder/info2.png +0 -0
- data/app/assets/images/fcfinder/kind_sorter.png +0 -0
- data/app/assets/images/fcfinder/list_view.png +0 -0
- data/app/assets/images/fcfinder/name_sorter.png +0 -0
- data/app/assets/images/fcfinder/new_folder.png +0 -0
- data/app/assets/images/fcfinder/paste.png +0 -0
- data/app/assets/images/fcfinder/preview.png +0 -0
- data/app/assets/images/fcfinder/refresh.png +0 -0
- data/app/assets/images/fcfinder/rename.png +0 -0
- data/app/assets/images/fcfinder/settings.png +0 -0
- data/app/assets/images/fcfinder/show_date.png +0 -0
- data/app/assets/images/fcfinder/show_size.png +0 -0
- data/app/assets/images/fcfinder/size_sorter.png +0 -0
- data/app/assets/images/fcfinder/sort.png +0 -0
- data/app/assets/images/fcfinder/tree/folder.png +0 -0
- data/app/assets/images/fcfinder/tree/loader.gif +0 -0
- data/app/assets/images/fcfinder/tree/minus.png +0 -0
- data/app/assets/images/fcfinder/tree/plus.png +0 -0
- data/app/assets/images/fcfinder/up_folder.png +0 -0
- data/app/assets/images/fcfinder/upload.png +0 -0
- data/app/assets/javascripts/fcfinder.js +1697 -0
- data/app/assets/stylesheets/fcfinder.css +347 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/fcfinder.gemspec +31 -0
- data/lib/fcfinder.rb +7 -0
- data/lib/fcfinder/connector.rb +612 -0
- data/lib/fcfinder/engine.rb +4 -0
- data/lib/fcfinder/version.rb +3 -0
- data/lib/fcfinder/zip_file_generator.rb +47 -0
- metadata +203 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 71430280fb0cb028149a2deddcad49155cad48db
|
4
|
+
data.tar.gz: 0d46014e94abc9aa523a79373e16f4cd615a9d46
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 83890395444510d0704889b83d543342cbcb954950a9d1b15a5e3ad7b1749578350b707dfa186661fc00ebfd0730545f9b13fd8f42e9dcdb5aec44705939cc3b
|
7
|
+
data.tar.gz: 01e84d9e4297d386816c05dde13f8da17336b94ad2ed2c14fa36182ed670cb0060aa83b6dec1c0a65b44ba139effc1c43f1859125cf86eaedfa8f3c201f5a14a
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
4
|
+
|
5
|
+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
|
6
|
+
|
7
|
+
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
8
|
+
|
9
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
10
|
+
|
11
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
|
12
|
+
|
13
|
+
This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Furkan Çelik
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,1697 @@
|
|
1
|
+
;(function($){
|
2
|
+
$.fn.fcFinder = function(opts) {
|
3
|
+
|
4
|
+
//Ana Seçiciler
|
5
|
+
var fcfinder = $(this);
|
6
|
+
var fcfinder_selector = fcfinder.selector;
|
7
|
+
var $body = $("body");
|
8
|
+
|
9
|
+
//Selector Ayarı
|
10
|
+
if(fcfinder_selector!="#fcfinder"){
|
11
|
+
$(this).css({"margin":"0","padding":"0","display": "block","height": "100%","width": "100%"}).append('<div id="fcfinder"></div>');
|
12
|
+
fcfinder = fcfinder.find("#fcfinder");
|
13
|
+
fcfinder_selector = fcfinder.selector
|
14
|
+
}
|
15
|
+
|
16
|
+
// Varsayılan Metinler
|
17
|
+
var i18n = {
|
18
|
+
empty_dir : 'Dizin Boş',
|
19
|
+
empty_file : 'Dosya Boş',
|
20
|
+
loading : 'Yükleniyor...',
|
21
|
+
file_size : 'Dosya Boyutu',
|
22
|
+
file_name : 'Dosya Adı',
|
23
|
+
file_cdate : 'Dosya Oluşturulma Tarihi',
|
24
|
+
faild_process : 'İşlem Gerçekleşemedi',
|
25
|
+
access_not_head : 'Erişim İzni Yok',
|
26
|
+
access_not_content : 'Erişim İzniniz Yok Lütfen Giriş Yapmayı Deneyiniz Hala Bu Sorunla Karşılaşırsanız Lüftfen Yönetici İle Görüşünüz.',
|
27
|
+
bottom_file : '{0} Dosya ( {1} )',
|
28
|
+
load_directory : 'Dizinler Yükleniyor',
|
29
|
+
read_permission : 'Okuma İzni',
|
30
|
+
write_permission : 'Yazma İzni',
|
31
|
+
read_write_permission : 'Yazma ve Okuma İzni',
|
32
|
+
directory : 'Klasör',
|
33
|
+
|
34
|
+
error :
|
35
|
+
{
|
36
|
+
large_file : 'Dosya Boyutu İzin Verilen Dosya Boyutundan Fazla \n İzin Verilen Dosya Boyutu: {0}',
|
37
|
+
error_type : 'Yüklemeye Çalıştığınız Dosya Türüne İzin Verilmemiş \n İzin Verilen Dosya Türü(leri):\n {0}.',
|
38
|
+
load_error : 'Bir Hata Meydana Geldi ve Dosya Yüklenemedi Hata Sebebi: "{0}" Olabilir.',
|
39
|
+
select_file_error : 'Bir Hata Meydana Geldi ve Dosya Açılamadı, Açmaya Çalıştığınız Dosya Sunucuda Olmayabilir.',
|
40
|
+
error_msg : 'Beklenmedik Bir Hata Meydana Geldi',
|
41
|
+
download_error : 'Bir Hata Meydana Geldi ve Dosya İndirilemiyor Hata Sebebi: "{0}" Olabilir. \n Dosya Arşive Eklenirken Hata Oluşmuş Olabilir Klasor Adıyla Aynı Arşiv Dosyası Olmadığından Emin Olun',
|
42
|
+
copy_error : 'Bir Hata Meydana Geldi ve Koyalama İşlemi Gerçekleştirilemedi Hata Sebebi "{0}" Olabilir.',
|
43
|
+
replace_error : 'Bir Hata Meydana Geldi ve Dosya Değiştirilemedi İşlem İptal Edildi, Hata Sebebi "{0}" Olabilir.',
|
44
|
+
duplicate_error : 'Bir Hata Meydana Geldi ve Seçtiğiniz Dosyanın Kopyası Oluşturulamadı Hata Sebebi: "{0}" Olabilir.',
|
45
|
+
rename_error : 'Bir Hata Meydana Geldi ve Dosya Adı Değiştirilemedi Hata Sebebi: "{0}" Olabilir.',
|
46
|
+
edit_error : 'Bir Hata Meydana Geldi, Açmaya Çalıştığınız Dosyanın Sunucuda Olmaya Bilir.',
|
47
|
+
delete_error_0 : 'Silmeye Çalıştığınız Dosyaya Erişilemiyor Dosya Olmayabilir.',
|
48
|
+
delete_error_1 : 'Bir Hata Meydana Geldi ve Dosya Silme İşlemi Gerçekleştirilemedi Hata Sebebi: "{0}" Olabilir.',
|
49
|
+
new_directory_error_1 : 'Bu İsimde Dosya Var',
|
50
|
+
new_directory_error_0 : 'Bir Hata Meydana Geldi ve Klasör Oluşturulamadı, Hata Sebebi: "{0}" Olabilir.'
|
51
|
+
},
|
52
|
+
|
53
|
+
dialog :
|
54
|
+
{
|
55
|
+
info_h : 'Bilgiler',
|
56
|
+
info_size : 'Boyutu:',
|
57
|
+
info_addres : 'Adresi:',
|
58
|
+
info_url : 'Link:',
|
59
|
+
info_cdate : 'Oluşturulma Tarihi:',
|
60
|
+
info_mdate : 'Son Değişiklik Tarihi:',
|
61
|
+
info_file_permission : 'Dosya İzinleri:',
|
62
|
+
preview_h : 'Önizle',
|
63
|
+
preview_size : 'Boyutu:',
|
64
|
+
preview_addres : 'Adresi:',
|
65
|
+
preview_url : 'Link:',
|
66
|
+
preview_cdate : 'Oluşturulma Tarihi:',
|
67
|
+
preview_mdate : 'Son Değişiklik Tarihi:',
|
68
|
+
file_replace_h : 'Dosya Değiştir veya Atla',
|
69
|
+
file_replace_content : 'Hedefte Zaten "{0}" Adında Bir Dosya Var Üzerine Yazılsınmı?',
|
70
|
+
cancel : 'İptal Et',
|
71
|
+
ok : 'Evet',
|
72
|
+
close : 'Kapat',
|
73
|
+
delete : 'Sil',
|
74
|
+
delete_h : '{0} Sil',
|
75
|
+
delete_content : '{0} Kalıcı Olarak Silmek İstediğinize Eminmisiniz?',
|
76
|
+
settings_h : 'Ayarlar',
|
77
|
+
settings_icon_view : 'Simge Görünümü',
|
78
|
+
settings_list_view : 'Liste Görünümü',
|
79
|
+
settings_show_size : 'Dosya Boyutunu Göster',
|
80
|
+
settings_show_date : 'Dosya Oluşturulma Tarihini Göster',
|
81
|
+
sorter_h : 'Sıralama Düzenle',
|
82
|
+
sorter_name : 'Ada Göre Sırala',
|
83
|
+
sorter_size : 'Boyutuna Göre Sırala',
|
84
|
+
sorter_date : 'Tarihe Göre Sırala',
|
85
|
+
sorter_kind : 'Dosya Türüne Göre Sırala'
|
86
|
+
},
|
87
|
+
|
88
|
+
contextmenu :
|
89
|
+
{
|
90
|
+
file_open : 'Aç',
|
91
|
+
file_preview : 'Önizle',
|
92
|
+
file_download : 'İndir',
|
93
|
+
file_copy : 'Kopyala',
|
94
|
+
file_cut : 'Kes',
|
95
|
+
file_duplicate : 'Kopyasını Oluştur',
|
96
|
+
file_rename : 'Yeniden Adlandır',
|
97
|
+
file_delete : 'Sil',
|
98
|
+
file_info : 'Bilgiler',
|
99
|
+
wrapper_paste : 'Yapıştır',
|
100
|
+
wrapper_list_view : 'Liste Görünümü',
|
101
|
+
wrapper_icon_view : 'Simge Görünümü',
|
102
|
+
wrapper_upload : 'Dosya Yükle',
|
103
|
+
wrapper_newfolder : 'Yeni Klasör',
|
104
|
+
wrapper_refresh : 'Yenile',
|
105
|
+
wrapper_show_size : 'Boyutu Göster / Gizle',
|
106
|
+
wrapper_show_date : 'Tarihi Göster / Gizle',
|
107
|
+
wrapper_namesorter : 'Ada Göre Sırala',
|
108
|
+
wrapper_sizesorter : 'Boyuta Göre Sırala',
|
109
|
+
wrapper_datesorter : 'Tarihe Göre Sırala',
|
110
|
+
wrapper_kindsorter : 'Türüne Göre Sırala'
|
111
|
+
},
|
112
|
+
|
113
|
+
widget_menu :
|
114
|
+
{
|
115
|
+
up_folder : 'Üst Klasor',
|
116
|
+
upload : 'Yükle',
|
117
|
+
new_folder : 'Yeni Klasor',
|
118
|
+
refresh : 'Yenile',
|
119
|
+
download : 'İndir',
|
120
|
+
info : 'Bilgiler',
|
121
|
+
preview : 'Ön İzle',
|
122
|
+
edit : 'Düzenle',
|
123
|
+
copy : 'Kopyala',
|
124
|
+
cut : 'Kes',
|
125
|
+
paste : 'Yapıştır',
|
126
|
+
duplicate : 'Kopyasını Oluştur',
|
127
|
+
rename : 'Yeniden Adlandır',
|
128
|
+
delete : 'Sil',
|
129
|
+
settings : 'Ayarlar',
|
130
|
+
icon_view : 'Simge Görünümü',
|
131
|
+
list_view : 'Liste Görünümü',
|
132
|
+
show_size : 'Boyutu Göster',
|
133
|
+
show_date : 'Oluşturulma Tarihini Göster',
|
134
|
+
sort : 'Sırala',
|
135
|
+
name_sorter : 'Ada Göre Sırala',
|
136
|
+
size_sorter : 'Boyuta Göre Sırala',
|
137
|
+
date_sorter : 'Tarihe Göre Sırala',
|
138
|
+
kind_sorter : 'Türüne Göre Sırala',
|
139
|
+
about : 'Hakkında'
|
140
|
+
}
|
141
|
+
};
|
142
|
+
|
143
|
+
|
144
|
+
//Dil Seçimi
|
145
|
+
if (typeof(opts.i18n)=="object"){
|
146
|
+
opts.i18n = fnc.merge_options(i18n,opts.i18n);
|
147
|
+
}else {opts.i18n = i18n; }
|
148
|
+
|
149
|
+
|
150
|
+
//Cookies Objesi
|
151
|
+
var Cookies = {
|
152
|
+
setCookie : function (cname, cvalue, exdays) {
|
153
|
+
var d = new Date();
|
154
|
+
d.setTime(d.getTime() + (exdays*1000));
|
155
|
+
var expires = "expires="+d.toUTCString();
|
156
|
+
document.cookie = cname + "=" + cvalue + "; " + expires;
|
157
|
+
},
|
158
|
+
|
159
|
+
getCookie :function (cname) {
|
160
|
+
var name = cname + "=";
|
161
|
+
var ca = document.cookie.split(';');
|
162
|
+
for(var i=0; i<ca.length; i++) {
|
163
|
+
var c = ca[i];
|
164
|
+
while (c.charAt(0)==' ') c = c.substring(1);
|
165
|
+
if (c.indexOf(name) == 0) return c.substring(name.length,c.length);
|
166
|
+
}
|
167
|
+
return "";
|
168
|
+
}
|
169
|
+
|
170
|
+
};
|
171
|
+
|
172
|
+
|
173
|
+
//Sabit Fonksiyonlar Objesi
|
174
|
+
var fnc = {
|
175
|
+
ajax_fnc : {
|
176
|
+
|
177
|
+
},
|
178
|
+
//fnc.prepend_dialog(opts.i18n.access_not_head,opts.i18n.access_not_content,{type:"p",dialog_class:'noclose danger',scope_class:'noclose'});
|
179
|
+
prepend_dialog : function(head,content,opt){
|
180
|
+
opt = opt || {};
|
181
|
+
opt.scope_class = typeof (opt.scope_class)==="undefined" ? "" : " "+opt.scope_class;
|
182
|
+
opt.dialog_class = typeof (opt.dialog_class)==="undefined" ? "" : " "+opt.dialog_class;
|
183
|
+
var html = '<div class="dialog-scope'+opt.scope_class+'"></div><div style="display:none;" class="dialog'+opt.dialog_class+'"><h1>'+head+'</h1>';
|
184
|
+
if (opt.type=="p"){html += '<p>'+content+'</p>'; }
|
185
|
+
html += '</div>';
|
186
|
+
fcfinder.prepend(html);
|
187
|
+
fcfinder.find(".dialog").fadeIn(300);
|
188
|
+
fcfinder.find(".dialog").ortala();
|
189
|
+
},
|
190
|
+
|
191
|
+
ripleClick : function (_class)
|
192
|
+
{
|
193
|
+
var ink, d, x, y;
|
194
|
+
$body.on("click",_class,function(e){
|
195
|
+
if($(this).find(".ink").length === 0){
|
196
|
+
$(this).prepend("<span class='ink'></span>");
|
197
|
+
}
|
198
|
+
ink = $(this).find(".ink");
|
199
|
+
ink.removeClass("animate");
|
200
|
+
if(!ink.height() && !ink.width()){
|
201
|
+
d = Math.max($(this).outerWidth(), $(this).outerHeight());
|
202
|
+
ink.css({height: d, width: d});
|
203
|
+
}
|
204
|
+
x = e.pageX - $(this).offset().left - ink.width()/2;
|
205
|
+
y = e.pageY - $(this).offset().top - ink.height()/2;
|
206
|
+
ink.css({top: y+'px', left: x+'px'}).addClass("animate");
|
207
|
+
setTimeout(function(){ ink.remove(); fcfinder.find("span.ink").remove(); },600);
|
208
|
+
});
|
209
|
+
},
|
210
|
+
|
211
|
+
merge_options : function(obj1,obj2){
|
212
|
+
var obj3 = {};
|
213
|
+
for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; }
|
214
|
+
for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; }
|
215
|
+
return obj3;
|
216
|
+
},
|
217
|
+
|
218
|
+
fcfinderresize : function()
|
219
|
+
{
|
220
|
+
fcfinder.find(".right").width(fcfinder.width()-fcfinder.find(".left").width()-15);
|
221
|
+
fcfinder.find(".right .wrapper , .right .widget").width(fcfinder.find(".right").width()-10);
|
222
|
+
fcfinder.find(".right").children(".wrapper").height(($body.height()-fcfinder.find(".widget").height())-43);
|
223
|
+
fcfinder.find(".left").height($body.height()-35);
|
224
|
+
},
|
225
|
+
|
226
|
+
appendFiles : function(data,type){
|
227
|
+
type = type || "";
|
228
|
+
if (type==""){
|
229
|
+
var element =ul_wrapper.find(".file_wrapper:last");
|
230
|
+
}
|
231
|
+
else{var element =type;}
|
232
|
+
|
233
|
+
$.each(data.file,function(key,val){
|
234
|
+
var _style_type = "";
|
235
|
+
if (val.type == "image_file") { _style_type = "style=\"background:url('//"+val.url.replace("uploads","uploads/.thumbs")+"') no-repeat center 5px / 65% 60px \""; }
|
236
|
+
element.append('<div '+_style_type+' data-kind="'+val.type+'" data-date="'+val.ctime+'" data-size="'+val.size+'" data-size_2="'+val.size_2+'" data-name="'+key+'" data-path="'+val.path+'" class="'+val.type+'"><span class="file_name">'+key+'</span><span class="file_size"'+is_show_size+'>'+val.size+'</span><span class="file_date"'+is_show_date+'>'+val.ctime+'</span></div>');
|
237
|
+
});
|
238
|
+
|
239
|
+
|
240
|
+
if (is_show_date == " style=\"display:block;\"" ){fcfinder.find(".right ul.wrapper li div").height(80+32+10);}
|
241
|
+
if (is_show_size == " style=\"display:block;\"" ){fcfinder.find(".right ul.wrapper li div").height(80+16+10);}
|
242
|
+
if (is_show_date == " style=\"display:block;\"" && is_show_size == " style=\"display:block;\"" ){fcfinder.find(".right ul.wrapper li div").height(80+16+32+10);}
|
243
|
+
|
244
|
+
},
|
245
|
+
|
246
|
+
getUrlParam : function(paramName) {
|
247
|
+
var reParam = new RegExp('(?:[\?&]|&)' + paramName + '=([^&]+)', 'i') ;
|
248
|
+
var match = window.location.search.match(reParam) ;
|
249
|
+
|
250
|
+
return (match && match.length > 1) ? match[1] : '' ;
|
251
|
+
},
|
252
|
+
|
253
|
+
sortable : function(type)
|
254
|
+
{
|
255
|
+
if (type=="name"){ fcfinder.find(".right ul.widget li a.name_sorter").removeClass("z_a").removeClass("a_z").trigger('click'); }
|
256
|
+
if (type=="size"){ fcfinder.find(".right ul.widget li a.size_sorter").removeClass("z_a").removeClass("a_z").trigger('click'); }
|
257
|
+
if (type=="date"){ fcfinder.find(".right ul.widget li a.date_sorter").removeClass("z_a").removeClass("a_z").trigger('click'); }
|
258
|
+
if (type=="kind"){ fcfinder.find(".right ul.widget li a.kind_sorter").removeClass("z_a").removeClass("a_z").trigger('click'); }
|
259
|
+
},
|
260
|
+
|
261
|
+
toDate : function(date)
|
262
|
+
{
|
263
|
+
if (date!=null)
|
264
|
+
{
|
265
|
+
var a = date.split("/");
|
266
|
+
return Date.parse(a[1]+"/"+a[0]+"/"+a[2]);
|
267
|
+
}
|
268
|
+
},
|
269
|
+
|
270
|
+
toInt : function (size)
|
271
|
+
{
|
272
|
+
if (size!=null)
|
273
|
+
{
|
274
|
+
return parseInt(size);
|
275
|
+
}
|
276
|
+
}
|
277
|
+
|
278
|
+
};
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
// Cookies Tanımlamaları
|
286
|
+
Cookies.getCookie("FCFINDER_size_show")==""?Cookies.setCookie("FCFINDER_size_show","false",60*60*24*365):'';
|
287
|
+
Cookies.getCookie("FCFINDER_date_show")==""?Cookies.setCookie("FCFINDER_date_show","false",60*60*24*365):'';
|
288
|
+
Cookies.getCookie("FCFINDER_sortable")==""?Cookies.setCookie("FCFINDER_sortable","kind",60*60*24*365):'';
|
289
|
+
Cookies.getCookie("FCFINDER_view_type")==""?Cookies.setCookie("FCFINDER_view_type","icon",60*60*24*365):'';
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
//HTML'yi Yükle
|
294
|
+
fcfinder.append('<div class="left"><div id="all_folders">'+
|
295
|
+
'<ul class="folders">'+
|
296
|
+
'<li><a><span class="folder">'+opts.i18n.loading+'<span class="load"></span></span>'+
|
297
|
+
'</a></li>'+
|
298
|
+
'</div></div>'+
|
299
|
+
'<div class="right">'+
|
300
|
+
'<ul class="widget">'+
|
301
|
+
'<li><a href="fcfinder:up" title="'+opts.i18n.widget_menu.up_folder+'" class="up_folder passive">'+opts.i18n.widget_menu.up_folder+'</a></li>'+
|
302
|
+
'<li><a title="'+opts.i18n.widget_menu.upload+'" class="upload">'+
|
303
|
+
'<form style="opacity:0;" id="file_upload" method="post" action="" enctype="multipart/form-data">'+
|
304
|
+
'<input class="upload_field" name="fcfinder[upload][]" style="height:31px" multiple="multiple" type="file">'+
|
305
|
+
'<input name="fcfinder[type]" value="upload" type="hidden">'+
|
306
|
+
'<input name="fcfinder[path]" value="" type="hidden">'+
|
307
|
+
'</form>'+
|
308
|
+
'</a></li>'+
|
309
|
+
'<li><a href="fcfinder:newfolder" title="'+opts.i18n.widget_menu.new_folder+'" class="new_folder">'+opts.i18n.widget_menu.new_folder+'</a></li>'+
|
310
|
+
'<li><a href="fcfinder:refresh" title="'+opts.i18n.widget_menu.refresh+'" class="refresh">'+opts.i18n.widget_menu.refresh+'</a></li>'+
|
311
|
+
'<li><a href="" title="'+opts.i18n.widget_menu.download+'" class="download passive">'+opts.i18n.widget_menu.download+'</a></li>'+
|
312
|
+
'<li><a href="fcfinder:info" title="'+opts.i18n.widget_menu.info+'" class="info passive">'+opts.i18n.widget_menu.info+'</a><div>'+
|
313
|
+
'<ul>'+
|
314
|
+
'<li><a href="fcfinder:preview" title="'+opts.i18n.widget_menu.preview+'" class="preview passive">'+opts.i18n.widget_menu.preview+'</a></li>'+
|
315
|
+
'</ul>'+
|
316
|
+
'</div></li>'+
|
317
|
+
'<li><a href="fcfinder:edit" title="'+opts.i18n.widget_menu.edit+'" class="edit passive">'+opts.i18n.widget_menu.edit+'</a><div>'+
|
318
|
+
'<ul>'+
|
319
|
+
'<li><a href="fcfinder:copy" title="'+opts.i18n.widget_menu.copy+'" class="copy passive">'+opts.i18n.widget_menu.copy+'</a></li>'+
|
320
|
+
'<li><a href="fcfinder:cut" title="'+opts.i18n.widget_menu.cut+'" class="cut passive">'+opts.i18n.widget_menu.cut+'</a></li>'+
|
321
|
+
'<li><a href="fcfinder:paste" title="'+opts.i18n.widget_menu.paste+'" class="paste passive">'+opts.i18n.widget_menu.paste+'</a></li>'+
|
322
|
+
'<li><a href="fcfinder:duplicate" title="'+opts.i18n.widget_menu.duplicate+'" class="duplicate passive">'+opts.i18n.widget_menu.duplicate+'</a></li>'+
|
323
|
+
'<li><a href="fcfinder:rename" title="'+opts.i18n.widget_menu.rename+'" class="rename passive">'+opts.i18n.widget_menu.rename+'</a></li>'+
|
324
|
+
'<li><a href="fcfinder:edit" title="'+opts.i18n.widget_menu.edit+'" class="edit passive">'+opts.i18n.widget_menu.edit+'</a></li>'+
|
325
|
+
'</ul>'+
|
326
|
+
'</div></li>'+
|
327
|
+
'<li><a href="fcfinder:delete" title="'+opts.i18n.widget_menu.delete+'" class="delete passive">'+opts.i18n.widget_menu.delete+'</a></li>'+
|
328
|
+
'<li><a href="fcfinder:settings" title="'+opts.i18n.widget_menu.settings+'" class="settings">'+opts.i18n.widget_menu.settings+'</a><div>'+
|
329
|
+
'<ul>'+
|
330
|
+
'<li><a href="fcfinder:iconview" title="'+opts.i18n.widget_menu.icon_view+'" class="icon_view">'+opts.i18n.widget_menu.icon_view+'</a></li>'+
|
331
|
+
'<li><a href="fcfinder:listview" title="'+opts.i18n.widget_menu.list_view+'" class="list_view">'+opts.i18n.widget_menu.list_view+'</a></li>'+
|
332
|
+
'<li><a data-show="'+Cookies.getCookie("FCFINDER_size_show")+'" href="fcfinder:showsize" title="'+opts.i18n.widget_menu.show_size+'" class="show_size">'+opts.i18n.widget_menu.show_size+'</a></li>'+
|
333
|
+
'<li><a data-show="'+Cookies.getCookie("FCFINDER_date_show")+'" href="fcfinder:showdate" title="'+opts.i18n.widget_menu.show_date+'" class="show_date">'+opts.i18n.widget_menu.show_date+'</a></li>'+
|
334
|
+
'</ul>'+
|
335
|
+
'</div></li>'+
|
336
|
+
'<li><a href="fcfinder:sorting" title="'+opts.i18n.widget_menu.sort+'" class="sort">'+opts.i18n.widget_menu.sort+'</a><div>'+
|
337
|
+
'<ul>'+
|
338
|
+
'<li><a href="fcfinder:namesorter" title="'+opts.i18n.widget_menu.name_sorter+'" class="name_sorter">'+opts.i18n.widget_menu.name_sorter+'</a></li>'+
|
339
|
+
'<li><a href="fcfinder:sizesorter" title="'+opts.i18n.widget_menu.size_sorter+'" class="size_sorter">'+opts.i18n.widget_menu.size_sorter+'</a></li>'+
|
340
|
+
'<li><a href="fcfinder:datesorter" title="'+opts.i18n.widget_menu.date_sorter+'" class="date_sorter">'+opts.i18n.widget_menu.date_sorter+'</a></li>'+
|
341
|
+
'<li><a href="fcfinder:kindsorter" title="'+opts.i18n.widget_menu.kind_sorter+'" class="kind_sorter">'+opts.i18n.widget_menu.kind_sorter+'</a></li>'+
|
342
|
+
'</ul>'+
|
343
|
+
'</div></li>'+
|
344
|
+
'<li><a href="fcfinder:settings" title="'+opts.i18n.widget_menu.about+'" class="about">'+opts.i18n.widget_menu.about+'</a></li>'+
|
345
|
+
'</ul>'+
|
346
|
+
'<ul class="wrapper">'+
|
347
|
+
'<li>'+opts.i18n.loading+'<span class="load"></span></li>'+
|
348
|
+
'</ul>'+
|
349
|
+
'</div>'+
|
350
|
+
'<div class="clear"></div>'+
|
351
|
+
'<ul class="bottom">'+opts.i18n.loading+'<span class="load"></span></ul>');
|
352
|
+
|
353
|
+
//Görünüm Tipini Seç
|
354
|
+
if (Cookies.getCookie("FCFINDER_view_type")=="icon"){
|
355
|
+
fcfinder.find(".right ul.widget li a.icon_view").addClass("passive");
|
356
|
+
fcfinder.find(".right ul.wrapper").addClass("icon_view");
|
357
|
+
}
|
358
|
+
else{
|
359
|
+
fcfinder.find(".right ul.widget li a.list_view").addClass("passive");
|
360
|
+
fcfinder.find(".right ul.wrapper").addClass("list_view");
|
361
|
+
}
|
362
|
+
|
363
|
+
|
364
|
+
|
365
|
+
//Dosya Boyutu ve Tarihi Görünüyormu
|
366
|
+
var is_show_size = Cookies.getCookie("FCFINDER_size_show")=="true"?" style=\"display:block;\"":"";
|
367
|
+
var is_show_date = Cookies.getCookie("FCFINDER_date_show")=="true"?" style=\"display:block;\"":"";
|
368
|
+
|
369
|
+
|
370
|
+
|
371
|
+
|
372
|
+
//Çok Kullanılan Elementler
|
373
|
+
var ul_folders = fcfinder.children(".left").children("#all_folders").children("ul.folders");
|
374
|
+
var ul_wrapper = fcfinder.children(".right").children("ul.wrapper");
|
375
|
+
|
376
|
+
|
377
|
+
|
378
|
+
//Dosyaları Yükle
|
379
|
+
$.ajax({url:opts.url,dataType:'json',type:'POST',success:function(_data) {
|
380
|
+
//İzin Yoksa Hata Ver
|
381
|
+
if (_data == "Access not allowed!") {
|
382
|
+
|
383
|
+
fnc.prepend_dialog(opts.i18n.access_not_head,opts.i18n.access_not_content,{type:"p",dialog_class:'noclose danger',scope_class:'noclose'});
|
384
|
+
fcfinder.find(".left #all_folders").html("");
|
385
|
+
fcfinder.find(".right ul.wrapper").html("");
|
386
|
+
fcfinder.find("ul.bottom").html("");
|
387
|
+
}
|
388
|
+
else{
|
389
|
+
//İzin Varsa Dosyaları Yükle
|
390
|
+
if (fcfinder.find("ul.bottom li[data-path='fcdir:/']").size()===0){
|
391
|
+
fcfinder.find("ul.bottom").html("").append('<li data-path="fcdir:/">'+opts.i18n.bottom_file.format(_data[1],_data[2])+'</li>');}
|
392
|
+
var data = _data[0];
|
393
|
+
var main_file_path = data.main_file.path;
|
394
|
+
|
395
|
+
var main_class = data.main_file.sub_dir ? " opened " : " ";
|
396
|
+
ul_folders.html("").append('<li><a id="true" href="fcdir:/" data-show="true" class="active">' +
|
397
|
+
'<span class="braca'+main_class+'"></span>'+
|
398
|
+
'<span class="folder">'+main_file_path+'</span>'+
|
399
|
+
'</a></li>');
|
400
|
+
|
401
|
+
if($.isEmptyObject(data.directory) && $.isEmptyObject(data.file))
|
402
|
+
{
|
403
|
+
ul_wrapper.html("").append('<li class="file_wrapper" data-show="true" data-path="fcdir:/">'+opts.i18n.empty_file+'</li>');
|
404
|
+
}else
|
405
|
+
{
|
406
|
+
ul_wrapper.html("").append('<li class="file_wrapper" data-show="true" data-path="fcdir:/"></li>');
|
407
|
+
}
|
408
|
+
|
409
|
+
ul_folders.children("li").append('<ul class="folders"></ul>');
|
410
|
+
|
411
|
+
|
412
|
+
$.each(data.directory,function(key,val){
|
413
|
+
ul_wrapper.find(".file_wrapper:first").append('<div data-path="'+val.path+'" data-name="'+key+'" data-size="'+val.size+'" data-size_2="'+val.size_2+'" data-date="'+val.ctime+'" data-kind="'+val.type+'" class="directory"><span class="file_name">'+key+'</span><span class="file_size"'+is_show_size+'>'+val.size+'</span><span class="file_date"'+is_show_date+'>'+val.ctime+'</span></div>');
|
414
|
+
|
415
|
+
var ths_cls = val.sub_dir? " closed " : "";
|
416
|
+
ul_folders.children("li").children("ul.folders").append('<li><a href="'+val.path+'">'+
|
417
|
+
'<span class="braca'+ths_cls+'"></span>'+
|
418
|
+
'<span class="folder">'+key+'</span>'+
|
419
|
+
'</a></li>');
|
420
|
+
});
|
421
|
+
fnc.appendFiles(data);
|
422
|
+
fnc.sortable(Cookies.getCookie("FCFINDER_sortable"));
|
423
|
+
if (Cookies.getCookie("FCFINDER_view_type")=="list"){fcfinder.find(".right ul.wrapper li[data-show='true']").prepend('<div class="list_head"><span class="file_name">'+opts.i18n.file_name+'</span><span class="file_size">'+opts.i18n.file_size+'</span><span class="file_date">'+opts.i18n.file_cdate+'</span></div>');}
|
424
|
+
if (fcfinder.find(".left #all_folders ul.folders li a.active").attr("href")!="fcdir:/"){ fcfinder.find(".right ul.widget li a.up_folder").removeClass("passive");}
|
425
|
+
else{fcfinder.find(".right ul.widget li a.up_folder").addClass("passive");}
|
426
|
+
}
|
427
|
+
|
428
|
+
|
429
|
+
}});
|
430
|
+
|
431
|
+
|
432
|
+
|
433
|
+
//Yükleme İnputu Seçilince Formu Submit Et
|
434
|
+
$body.on("change",fcfinder_selector+" input.upload_field",function(){
|
435
|
+
fcfinder.find("input[name='fcfinder[path]']").val(fcfinder.find(".left #all_folders ul li a.active").attr("href"));
|
436
|
+
$(this).closest('form').trigger('submit');
|
437
|
+
});
|
438
|
+
|
439
|
+
|
440
|
+
|
441
|
+
|
442
|
+
//Form Submit Ediliyor
|
443
|
+
$body.on("submit",fcfinder_selector+" form#file_upload",function(){
|
444
|
+
var formData = new FormData(this);
|
445
|
+
$.ajax({url:opts.url,dataType:'json',processData: false,contentType: false,type:'POST',data:formData,
|
446
|
+
xhr: function () {
|
447
|
+
var xhr = new window.XMLHttpRequest();
|
448
|
+
xhr.upload.addEventListener("progress", function (evt) {
|
449
|
+
if (evt.lengthComputable) {
|
450
|
+
var percentComplete = evt.loaded / evt.total;
|
451
|
+
if (fcfinder.find("#progress").length === 0) {
|
452
|
+
fcfinder.prepend($("<div><dt/><dd/></div>").attr("id", "progress"));
|
453
|
+
}
|
454
|
+
fcfinder.find("#progress").css({width: percentComplete * 100 + '%'});
|
455
|
+
if (percentComplete === 1) {
|
456
|
+
fcfinder.find("#progress").width("101%").delay(100).fadeOut(300, function() {
|
457
|
+
$(this).remove();
|
458
|
+
});
|
459
|
+
}
|
460
|
+
}
|
461
|
+
}, false);
|
462
|
+
xhr.addEventListener("progress", function (evt) {
|
463
|
+
if (evt.lengthComputable) {
|
464
|
+
var percentComplete = evt.loaded / evt.total;
|
465
|
+
fcfinder.find('#progress').css({
|
466
|
+
width: percentComplete * 100 + '%'
|
467
|
+
});
|
468
|
+
}
|
469
|
+
}, false);
|
470
|
+
return xhr;
|
471
|
+
},
|
472
|
+
success:function(data) {
|
473
|
+
if (data[0]=="true"){
|
474
|
+
fcfinder.find(".right ul.widget li a.refresh").trigger("click");
|
475
|
+
}else{
|
476
|
+
if (data[1]=="0"){
|
477
|
+
fnc.prepend_dialog(opts.i18n.faild_process,opts.i18n.error.large_file.format(data[2]),{type:"p",dialog_class:'danger'});
|
478
|
+
}
|
479
|
+
if (data[1]=="-1"){
|
480
|
+
var txt = [];
|
481
|
+
$.each(data[2],function(k,v){
|
482
|
+
txt.push(v[0]);
|
483
|
+
});
|
484
|
+
fnc.prepend_dialog(opts.i18n.faild_process,opts.i18n.error.error_type.format(txt.join(", ")),{type:"p",dialog_class:'danger'});
|
485
|
+
}
|
486
|
+
else{
|
487
|
+
fnc.prepend_dialog(opts.i18n.faild_process,opts.i18n.error.load_error.format(data[2]),{type:"p",dialog_class:'danger'});
|
488
|
+
}
|
489
|
+
}
|
490
|
+
}
|
491
|
+
});
|
492
|
+
|
493
|
+
//upload_files
|
494
|
+
return false;
|
495
|
+
});
|
496
|
+
|
497
|
+
|
498
|
+
//Dosyalar Çift Tıklandığında (Seçilme İşlemi)
|
499
|
+
$body.on("dblclick",fcfinder_selector+" .right ul.wrapper li div",function(){
|
500
|
+
var path = $(this).attr("data-path");
|
501
|
+
if (fcfinder.find(".left #all_folders ul.folders li a[href='"+path+"']").size()>0){
|
502
|
+
fcfinder.find(".left #all_folders ul.folders li a[href='"+path+"']").trigger("click");
|
503
|
+
}else{
|
504
|
+
var data = 'fcfinder[path]='+path+'&fcfinder[type]=path_to_url';
|
505
|
+
$.ajax({url:opts.url,dataType:'json',type:'POST',data:data,success:function(data) {
|
506
|
+
if (data[0]=="true"){ var url = "//"+data[1];
|
507
|
+
//CKEditor ise
|
508
|
+
var funcNum = fnc.getUrlParam('CKEditorFuncNum');
|
509
|
+
if (funcNum>0)
|
510
|
+
{
|
511
|
+
window.opener.CKEDITOR.tools.callFunction(funcNum, url);
|
512
|
+
window.close();
|
513
|
+
}else
|
514
|
+
{
|
515
|
+
//Değilse getFileCallback Fonksiyonunu Çağır
|
516
|
+
if (typeof (opts.getFileCallback) == "function" && opts.getFileCallback)
|
517
|
+
{
|
518
|
+
opts.getFileCallback(url);
|
519
|
+
}
|
520
|
+
}
|
521
|
+
}
|
522
|
+
else{
|
523
|
+
fnc.prepend_dialog(opts.i18n.faild_process,opts.i18n.error.select_file_error,{type:"p",dialog_class:'danger'});
|
524
|
+
}
|
525
|
+
}});
|
526
|
+
}
|
527
|
+
if (fcfinder.find(".left #all_folders ul.folders li a.active").attr("href")!="fcdir:/"){ fcfinder.find(".right ul.widget li a.up_folder").removeClass("passive");}
|
528
|
+
else{fcfinder.find(".right ul.widget li a.up_folder").addClass("passive");}
|
529
|
+
});
|
530
|
+
|
531
|
+
|
532
|
+
|
533
|
+
|
534
|
+
//Klasör Ağacından Klasör Seçildiğinde
|
535
|
+
$body.on("click",fcfinder_selector+" ul.folders a",function(){
|
536
|
+
var ths = $(this);
|
537
|
+
var url = ths.attr("href");
|
538
|
+
var id = ths.attr("id");
|
539
|
+
var data_path = ths.attr("href");
|
540
|
+
|
541
|
+
|
542
|
+
fcfinder.find(".right ul.wrapper li.file_wrapper").attr("data-show","false").hide();
|
543
|
+
fcfinder.find(".right ul.wrapper li.file_wrapper[data-path='" + data_path + "']").attr("data-show","true").show();
|
544
|
+
fcfinder.find("ul.folders li a").removeClass("active");
|
545
|
+
ths.addClass("active").attr("data-show","true");
|
546
|
+
fcfinder.find("ul.bottom li").hide();
|
547
|
+
fcfinder.find("ul.bottom li[data-path='"+url+"']").show();
|
548
|
+
|
549
|
+
|
550
|
+
|
551
|
+
if (id!="true" && id!="false"){
|
552
|
+
|
553
|
+
if (ths.children("span.braca").hasClass("closed")){
|
554
|
+
ths.children("span.braca").removeClass("closed").addClass("opened");
|
555
|
+
}
|
556
|
+
|
557
|
+
ths.parent("li").append('<span class="folder_load">'+opts.i18n.load_directory+'</span>');
|
558
|
+
|
559
|
+
var data = 'fcfinder[url]='+url+'&fcfinder[type]=all_file_list';
|
560
|
+
$.ajax({url:opts.url,dataType:'json',type:'POST',data:data,success:function(_data) {
|
561
|
+
|
562
|
+
if (fcfinder.find("ul.bottom li[data-path='"+url+"']").size()===0){
|
563
|
+
fcfinder.find("ul.bottom").append('<li data-path="'+url+'">'+opts.i18n.bottom_file.format(_data[1],_data[2])+'</li>');}
|
564
|
+
else { fcfinder.find("ul.bottom li").hide(); fcfinder.find("ul.bottom li[data-path='"+url+"']").show();}
|
565
|
+
|
566
|
+
var data = _data[0];
|
567
|
+
if (!$.isEmptyObject(data.directory))
|
568
|
+
{
|
569
|
+
ths.parent("li").append("<ul class=\"folders\"></ul>");
|
570
|
+
$.each(data.directory,function(key,val){
|
571
|
+
var ths_cls = val.sub_dir? " closed " : "";
|
572
|
+
ths.parent("li").children("ul.folders").append('<li><a href="'+val.path+'">'+
|
573
|
+
'<span class="braca '+ths_cls+'"></span>'+
|
574
|
+
'<span class="folder">'+key+'</span>'+
|
575
|
+
'</a></li>');
|
576
|
+
});
|
577
|
+
}
|
578
|
+
|
579
|
+
if ($.isEmptyObject(data.directory) && $.isEmptyObject(data.file))
|
580
|
+
{
|
581
|
+
fcfinder.find(".right ul.wrapper li.file_wrapper").hide();
|
582
|
+
if (ul_wrapper.find("li.file_wrapper[data-path='"+data_path+"']").size()=="0"){
|
583
|
+
ul_wrapper.append('<li class="file_wrapper" data-show="true" data-path="'+data_path+'">'+opts.i18n.empty_dir+'</li>').show();
|
584
|
+
}else{
|
585
|
+
ul_wrapper.find("li.file_wrapper[data-path='"+data_path+"']").show();
|
586
|
+
}
|
587
|
+
ths.removeAttr("id").removeAttr("data-show");
|
588
|
+
}else {
|
589
|
+
fcfinder.find(".right ul.wrapper li.file_wrapper").hide();
|
590
|
+
if (ul_wrapper.find("li.file_wrapper[data-path='"+data_path+"']").size()=="0"){
|
591
|
+
ul_wrapper.append('<li class="file_wrapper" data-show="true" data-path="'+data_path+'"></li>').show();
|
592
|
+
}else{
|
593
|
+
ul_wrapper.find("li.file_wrapper[data-path='"+data_path+"']").show();
|
594
|
+
}
|
595
|
+
|
596
|
+
if (ul_wrapper.find(".file_wrapper:last").html()!=""){ul_wrapper.find(".file_wrapper:last").html("");}
|
597
|
+
$.each(data.directory,function(key,val){
|
598
|
+
ul_wrapper.find(".file_wrapper:last").append('<div data-path="'+val.path+'" data-name="'+key+'" data-size="'+val.size+'" data-size_2="'+val.size_2+'" data-kind="'+val.type+'" data-date="'+val.ctime+'" class="directory"><span class="file_name">'+key+'</span><span class"file_size"'+is_show_size+'>'+val.size+'</span><span class="file_date"'+is_show_date+'>'+val.ctime+'</span></div>');
|
599
|
+
});
|
600
|
+
|
601
|
+
fnc.appendFiles(data);
|
602
|
+
fnc.sortable(Cookies.getCookie("FCFINDER_sortable"));
|
603
|
+
if (Cookies.getCookie("FCFINDER_view_type")=="list"){fcfinder.find(".right ul.wrapper li[data-show='true']").prepend('<div class="list_head"><span class="file_name">'+opts.i18n.file_name+'</span><span class="file_size">'+opts.i18n.file_size+'</span><span class="file_date">'+opts.i18n.file_cdate+'</span></div>');}
|
604
|
+
}
|
605
|
+
|
606
|
+
ths.next("span.folder_load").remove();
|
607
|
+
|
608
|
+
}});
|
609
|
+
ths.attr("id","true");
|
610
|
+
}
|
611
|
+
|
612
|
+
if (fcfinder.find(".left #all_folders ul.folders li a.active").attr("href")!="fcdir:/"){ fcfinder.find(".right ul.widget li a.up_folder").removeClass("passive");}
|
613
|
+
else{fcfinder.find(".right ul.widget li a.up_folder").addClass("passive");}
|
614
|
+
return false;
|
615
|
+
});
|
616
|
+
|
617
|
+
|
618
|
+
//Dosyaya yada Klasöre Tıklandığında
|
619
|
+
$body.on("click",fcfinder_selector+" .right ul.wrapper li div",function(){
|
620
|
+
var ths = $(this);
|
621
|
+
if (ths.attr("class")!="list_head"){
|
622
|
+
fcfinder.find(".right ul.wrapper li div").removeClass("active");
|
623
|
+
ths.addClass("active");
|
624
|
+
|
625
|
+
if (fcfinder.find("ul.bottom li[data-name='"+ths.attr("data-path")+"']").size()===0){
|
626
|
+
fcfinder.find("ul.bottom li").hide();
|
627
|
+
fcfinder.find("ul.bottom").append('<li style="display:block;" data-name="'+ths.attr("data-path")+'">'+ths.attr("data-name")+' ( '+ths.attr("data-size")+', '+ths.attr("data-date")+' )</li>');}
|
628
|
+
else { fcfinder.find("ul.bottom li").hide(); fcfinder.find("ul.bottom li[data-name='"+ths.attr("data-path")+"']").show();}
|
629
|
+
|
630
|
+
if (fcfinder.find(".right ul.wrapper li div.active").attr("data-new")!="new_folder")
|
631
|
+
{if (fcfinder.find(".right ul.wrapper li div.active").attr("data-kind")=="image_file"){fcfinder.find(".right ul.widget li a.edit").removeClass("passive"); }
|
632
|
+
fcfinder.find(".right ul.widget li a.download , " +
|
633
|
+
".right ul.widget li a.info , " +
|
634
|
+
".right ul.widget li a.preview , " +
|
635
|
+
//".right ul.widget li a.edit , " +
|
636
|
+
".right ul.widget li a.copy , " +
|
637
|
+
".right ul.widget li a.cut , " +
|
638
|
+
//".right ul.widget li a.paste , " +
|
639
|
+
".right ul.widget li a.duplicate , " +
|
640
|
+
".right ul.widget li a.rename , " +
|
641
|
+
".right ul.widget li a.delete").removeClass("passive");
|
642
|
+
}
|
643
|
+
}
|
644
|
+
|
645
|
+
});
|
646
|
+
|
647
|
+
//Klasör Ağacında Artı yada Eksiye Basıldığında
|
648
|
+
$body.on("click",fcfinder_selector+' .left #all_folders ul.folders li a span.braca',function(){
|
649
|
+
|
650
|
+
var ths = $(this);
|
651
|
+
var _ths = $(this).parent("a");
|
652
|
+
var id = _ths.attr("id");
|
653
|
+
|
654
|
+
|
655
|
+
if (id=="true"){
|
656
|
+
_ths.next("ul.folders").hide();
|
657
|
+
_ths.attr("id","false");
|
658
|
+
|
659
|
+
|
660
|
+
}
|
661
|
+
else if(id=="false"){
|
662
|
+
_ths.next("ul.folders").show();
|
663
|
+
_ths.attr("id","true");
|
664
|
+
|
665
|
+
}
|
666
|
+
|
667
|
+
|
668
|
+
fcfinder.find("ul.folders li a").removeClass("active");
|
669
|
+
_ths.addClass("active");
|
670
|
+
|
671
|
+
if (ths.hasClass("closed")){
|
672
|
+
ths.removeClass("closed").addClass("opened");
|
673
|
+
}else {
|
674
|
+
ths.removeClass("opened").addClass("closed");
|
675
|
+
}
|
676
|
+
|
677
|
+
if (fcfinder.find(".left #all_folders ul.folders li a.active").attr("href")!="fcdir:/"){ fcfinder.find(".right ul.widget li a.up_folder").removeClass("passive");}
|
678
|
+
else{fcfinder.find(".right ul.widget li a.up_folder").addClass("passive");}
|
679
|
+
});
|
680
|
+
|
681
|
+
|
682
|
+
//Dosya Boyutu Göster / Gizle
|
683
|
+
$body.on("click",fcfinder_selector+" .right ul.widget li a.show_size",function(){
|
684
|
+
if (Cookies.getCookie('FCFINDER_view_type')=="icon"){
|
685
|
+
var show = $(this).attr("data-show");
|
686
|
+
if (show=="false") {
|
687
|
+
fcfinder.find(".right ul.wrapper li div span.file_size").css({"display":"block"});
|
688
|
+
fcfinder.find(".right ul.wrapper li div").height(fcfinder.find(".right ul.wrapper li div").height()+16);
|
689
|
+
$(this).attr("data-show","true");
|
690
|
+
Cookies.setCookie("FCFINDER_size_show","true",60*60*24*365);
|
691
|
+
is_show_size = fcfinder.find(".right ul.widget li a.show_size").attr("data-show")=="true"?" style=\"display:block;\"":"";
|
692
|
+
}
|
693
|
+
else {
|
694
|
+
fcfinder.find(".right ul.wrapper li div span.file_size").hide();
|
695
|
+
fcfinder.find(".right ul.wrapper li div").height(fcfinder.find(".right ul.wrapper li div").height()-16);
|
696
|
+
$(this).attr("data-show","false");
|
697
|
+
Cookies.setCookie("FCFINDER_size_show","false",60*60*24*365);
|
698
|
+
is_show_size = fcfinder.find(".right ul.widget li a.show_size").attr("data-show")=="false"?" style=\"display:block;\"":"";
|
699
|
+
}
|
700
|
+
}
|
701
|
+
return false;
|
702
|
+
});
|
703
|
+
|
704
|
+
|
705
|
+
//Dosya Tarihi Göster / Gizle
|
706
|
+
$body.on("click",fcfinder_selector+" .right ul.widget li a.show_date",function(){
|
707
|
+
if (Cookies.getCookie('FCFINDER_view_type')=="icon"){
|
708
|
+
var show = $(this).attr("data-show");
|
709
|
+
if (show=="false") {
|
710
|
+
fcfinder.find(".right ul.wrapper li div span.file_date").css({"display":"block"});
|
711
|
+
fcfinder.find(".right ul.wrapper li div").height(fcfinder.find(".right ul.wrapper li div").height()+32);
|
712
|
+
$(this).attr("data-show","true");
|
713
|
+
Cookies.setCookie("FCFINDER_date_show","true",60*60*24*365);
|
714
|
+
is_show_date = fcfinder.find(".right ul.widget li a.show_date").attr("data-show")=="true"?" style=\"display:block;\"":"";
|
715
|
+
|
716
|
+
}
|
717
|
+
else {
|
718
|
+
fcfinder.find(".right ul.wrapper li div span.file_date").hide();
|
719
|
+
fcfinder.find(".right ul.wrapper li div").height(fcfinder.find(".right ul.wrapper li div").height()-32);
|
720
|
+
$(this).attr("data-show","false");
|
721
|
+
Cookies.setCookie("FCFINDER_date_show","false",60*60*24*365);
|
722
|
+
is_show_date = fcfinder.find(".right ul.widget li a.show_date").attr("data-show")=="false"?" style=\"display:block;\"":"";
|
723
|
+
}
|
724
|
+
}
|
725
|
+
return false;
|
726
|
+
});
|
727
|
+
|
728
|
+
//Yeni Klasör Oluşturma
|
729
|
+
$body.on("click",fcfinder_selector+" .right ul.widget li a.new_folder",function(){
|
730
|
+
var dir = fcfinder.find(".right ul.wrapper li[data-show='true']");
|
731
|
+
if (dir.html()==opts.i18n.empty_dir){dir.html("");}
|
732
|
+
fcfinder.find(".right ul.wrapper li div").removeClass("active");
|
733
|
+
var html = '<div data-new="new_folder" data-path="" data-name="" data-size="0" data-size_2="0" data-date="" data-kind="_directory" class="active directory"><span class="file_name"><form id="new_directory"><input type="text" name="fcfinder[directory_name]" /><input type="hidden" name="fcfinder[type]" value="create_directory"/> <input type="hidden" name="fcfinder[path]" value="'+dir.attr("data-path")+'"></form></span><span class="file_size"></span><span class="file_date"></span></div>';
|
734
|
+
if (Cookies.getCookie('FCFINDER_view_type')=="list"){
|
735
|
+
dir.find(".list_head").after(html);
|
736
|
+
}else {
|
737
|
+
dir.prepend(html);
|
738
|
+
}
|
739
|
+
dir.find("input").select();
|
740
|
+
|
741
|
+
return false;
|
742
|
+
});
|
743
|
+
|
744
|
+
//Sayfa Yenileme
|
745
|
+
$body.on("click",fcfinder_selector+" .right ul.widget li a.refresh",function(){
|
746
|
+
var left_wrapper = fcfinder.find(".left #all_folders ul li a.active");
|
747
|
+
var right_wrapper = fcfinder.find(".right ul.wrapper li.file_wrapper[data-show='true']");
|
748
|
+
if (right_wrapper.attr("data-path") == left_wrapper.attr("href")){
|
749
|
+
var path = right_wrapper.attr("data-path");
|
750
|
+
var data = "fcfinder[type]=refresh&fcfinder[path]="+path;
|
751
|
+
left_wrapper.next("ul").html("")
|
752
|
+
right_wrapper.html("")
|
753
|
+
$.ajax({url:opts.url,dataType:'json',type:'POST',data:data,success:function(data) {
|
754
|
+
|
755
|
+
if ($.isEmptyObject(data.directory) && $.isEmptyObject(data.file))
|
756
|
+
{
|
757
|
+
right_wrapper.html(opts.i18n.empty_dir);
|
758
|
+
}else {
|
759
|
+
if (right_wrapper.html()!=""){right_wrapper.html("");}
|
760
|
+
$.each(data.directory,function(key,val){
|
761
|
+
var ths_cls = val.sub_dir? " closed " : "";
|
762
|
+
left_wrapper.next("ul.folders").append('<li><a href="'+val.path+'">'+
|
763
|
+
'<span class="braca '+ths_cls+'"></span>'+
|
764
|
+
'<span class="folder">'+key+'</span>'+
|
765
|
+
'</a></li>');
|
766
|
+
|
767
|
+
right_wrapper.append('<div data-path="'+val.path+'" data-kind="'+val.type+'" data-name="'+key+'" data-size="'+val.size+'" data-size_2="'+val.size_2+'" data-date="'+val.ctime+'" class="directory"><span class="file_name">'+key+'</span><span class="file_size"'+is_show_size+'>'+val.size+'</span><span class="file_date"'+is_show_date+'>'+val.ctime+'</span></div>');
|
768
|
+
});
|
769
|
+
|
770
|
+
fnc.appendFiles(data,right_wrapper);
|
771
|
+
fnc.sortable(Cookies.getCookie("FCFINDER_sortable"));
|
772
|
+
if (Cookies.getCookie("FCFINDER_view_type")=="list"){fcfinder.find(".right ul.wrapper li[data-show='true']").prepend('<div class="list_head"><span class="file_name">'+opts.i18n.file_name+'</span><span class="file_size">'+opts.i18n.file_size+'</span><span class="file_date">'+opts.i18n.file_cdate+'</span></div>');}
|
773
|
+
}
|
774
|
+
}});
|
775
|
+
}else {
|
776
|
+
fnc.prepend_dialog(opts.i18n.faild_process,opts.i18n.error.error_msg,{type:"p",dialog_class:'danger'});
|
777
|
+
}
|
778
|
+
|
779
|
+
return false;
|
780
|
+
});
|
781
|
+
|
782
|
+
|
783
|
+
|
784
|
+
//Dosya İndirme
|
785
|
+
$body.on("click",fcfinder_selector+" .right ul.widget li a.download",function(){
|
786
|
+
if (!$(this).hasClass("passive")){
|
787
|
+
var path = fcfinder.find(".right ul.wrapper li div.active").attr("data-path").replace("fcdir:/","");
|
788
|
+
var data = "fcfinder[type]=download&fcfinder[path]="+fcfinder.find(".right ul.wrapper li div.active").attr("data-path");
|
789
|
+
$.ajax({
|
790
|
+
url: opts.url, dataType: 'json', type: 'POST', data: data, success: function (data) {
|
791
|
+
|
792
|
+
if (data[0]=="false"){
|
793
|
+
fnc.prepend_dialog(opts.i18n.faild_process,opts.i18n.error.download_error.format(data[2]),{type:"p",dialog_class:'danger'});
|
794
|
+
}
|
795
|
+
else{
|
796
|
+
window.open(location+"/download/"+data.file);
|
797
|
+
fcfinder.find(".right ul.widget li a.refresh").trigger("click");
|
798
|
+
}
|
799
|
+
}});
|
800
|
+
}
|
801
|
+
return false;
|
802
|
+
});
|
803
|
+
|
804
|
+
|
805
|
+
|
806
|
+
|
807
|
+
|
808
|
+
//Üst Dizin'e Çıkma
|
809
|
+
$body.on("click",fcfinder_selector+" .right ul.widget li a.up_folder",function(){
|
810
|
+
if (!$(this).hasClass("passive")){
|
811
|
+
var up_path = fcfinder.find(".left #all_folders ul.folders li a.active").attr("href").split("/");
|
812
|
+
up_path.pop();
|
813
|
+
var data_path = up_path.length > 1 ? up_path.join("/") : up_path[0]+"/";
|
814
|
+
var ths = fcfinder.find(".left #all_folders ul.folders li a[href='"+data_path+"']");
|
815
|
+
if (data_path=="fcdir:/"){$(this).addClass("passive");}
|
816
|
+
fcfinder.find(".right ul.wrapper li.file_wrapper").attr("data-show","false").hide();
|
817
|
+
fcfinder.find(".right ul.wrapper li.file_wrapper[data-path='" + data_path + "']").attr("data-show","true").show();
|
818
|
+
fcfinder.find("ul.folders li a").removeClass("active");
|
819
|
+
ths.addClass("active").attr("data-show","true");
|
820
|
+
|
821
|
+
if (fcfinder.find("ul.bottom li[data-path='"+data_path+"']").size()===0){
|
822
|
+
fcfinder.find("ul.bottom li").hide();}
|
823
|
+
else { fcfinder.find("ul.bottom li").hide(); fcfinder.find("ul.bottom li[data-path='"+data_path+"']").show();}
|
824
|
+
|
825
|
+
fcfinder.find(".right ul.widget li a.refresh").trigger("click");
|
826
|
+
}
|
827
|
+
return false;
|
828
|
+
});
|
829
|
+
|
830
|
+
|
831
|
+
|
832
|
+
//Dosya Bilgilerini Göster
|
833
|
+
$body.on("click",fcfinder_selector+" .right ul.widget li a.info",function(){
|
834
|
+
if (!$(this).hasClass("passive")){
|
835
|
+
var file = fcfinder.find(".right ul.wrapper li div.active");
|
836
|
+
var kind = file.attr("data-kind");
|
837
|
+
var data = "fcfinder[type]=info&fcfinder[file]="+file.attr("data-path")+"&kind="+kind;
|
838
|
+
fnc.prepend_dialog(opts.i18n.dialog.info_h,opts.i18n.loading,{type:"p"});
|
839
|
+
$.ajax({
|
840
|
+
url: opts.url, dataType: 'json', type: 'POST', data: data, success: function (data) {
|
841
|
+
|
842
|
+
var permissions="";
|
843
|
+
var _class = "";
|
844
|
+
if (data.permissions.read == "true"){ permissions = opts.i18n.read_permission; }
|
845
|
+
if (data.permissions.write == "true"){ permissions = opts.i18n.write_permission; }
|
846
|
+
if (data.permissions.write == "true" && data.permissions.read == "true"){ permissions = opts.i18n.read_write_permission; }
|
847
|
+
if (data.mime_type == "directory") { data.mime_type = opts.i18n.directory; _class = " directory"; }
|
848
|
+
else { _class = " "+file.removeClass("active").attr("class");
|
849
|
+
file.addClass("active");}
|
850
|
+
$(fcfinder_selector).find(".dialog").html('<h1>'+opts.i18n.dialog.info_h+'</h1>' +
|
851
|
+
'<div class="file_bg'+_class+'" style=\''+file.attr("style")+'\'></div>'+
|
852
|
+
'<span class="file_name">'+file.attr("data-name")+'</span><span class="file_type">'+data.mime_type+'</span>'+
|
853
|
+
'<ul class="file_info">' +
|
854
|
+
'<li><span>'+opts.i18n.dialog.info_size+'</span>'+data.size+'</li>' +
|
855
|
+
'<li><span>'+opts.i18n.dialog.info_addres+'</span>'+data.path+'</li>' +
|
856
|
+
'<li><span>'+opts.i18n.dialog.info_url+'</span><a target="_blank" href="//'+data.url+'">'+file.attr("data-name")+'</a></li>' +
|
857
|
+
'<li><span>'+opts.i18n.dialog.info_cdate+'</span>'+data.ctime+'</li>' +
|
858
|
+
'<li><span>'+opts.i18n.dialog.info_mdate+'</span>'+data.mtime+'</li>' +
|
859
|
+
'<li><span>'+opts.i18n.dialog.info_file_permission+'</span>'+permissions+'</li>' +
|
860
|
+
'</ul>' +
|
861
|
+
'<a href="#" class="close">'+opts.i18n.dialog.close+'</a>');
|
862
|
+
fnc.fcfinderresize();
|
863
|
+
}});
|
864
|
+
}
|
865
|
+
return false;
|
866
|
+
});
|
867
|
+
|
868
|
+
|
869
|
+
//Dosyayı Önizle
|
870
|
+
$body.on("click",fcfinder_selector+" .right ul.widget li a.preview",function(){
|
871
|
+
if (!$(this).hasClass("passive")){
|
872
|
+
var file = fcfinder.find(".right ul.wrapper li div.active");
|
873
|
+
var kind = file.attr("data-kind");
|
874
|
+
var data = "fcfinder[type]=preview&fcfinder[file]="+file.attr("data-path")+"&kind="+kind;
|
875
|
+
$(fcfinder_selector).prepend('<div class="dialog-scope"></div>' +
|
876
|
+
'<div style="display: none;" class="dialog"><h1>'+opts.i18n.dialog.preview_h+'</h1>' +
|
877
|
+
'<p>'+opts.i18n.loading+'<span class="load"></span> </p>' +
|
878
|
+
'</div>');
|
879
|
+
fcfinder.find(".dialog").fadeIn(300);
|
880
|
+
$.ajax({
|
881
|
+
url: opts.url, dataType: 'json', type: 'POST', data: data, success: function (data) {
|
882
|
+
|
883
|
+
var _class = "";
|
884
|
+
if (data.mime_type == "directory") { data.mime_type = opts.i18n.directory; _class = " directory"; }
|
885
|
+
else { _class = " "+file.removeClass("active").attr("class");
|
886
|
+
file.addClass("active");}
|
887
|
+
|
888
|
+
if (kind == "image_file"){
|
889
|
+
$(fcfinder_selector).find(".dialog").html('<h1>'+file.attr("data-name")+'</h1>' +
|
890
|
+
'<img style="width:'+$(window).width()/4+'px;" class="preview" src="//'+data.url+'" />' +
|
891
|
+
'<div class="clear"></div>'+
|
892
|
+
'<a href="#" class="close">'+opts.i18n.dialog.close+'</a>' +
|
893
|
+
'<div class="clear"></div>');
|
894
|
+
var img_width = fcfinder.find(".dialog img").width();
|
895
|
+
fcfinder.find(".dialog").css({"width":img_width+100+"px"});
|
896
|
+
fcfinder.find(".dialog").ortala();
|
897
|
+
}
|
898
|
+
else{
|
899
|
+
$(fcfinder_selector).find(".dialog").html('<h1>'+opts.i18n.dialog.preview_h+'</h1>' +
|
900
|
+
'<div class="file_bg'+_class+'" style="'+file.attr("style")+'"></div>'+
|
901
|
+
'<span class="file_name">'+file.attr("data-name")+'</span><span class="file_type">'+data.mime_type+'</span>'+
|
902
|
+
'<ul class="file_info">' +
|
903
|
+
'<li><span>'+opts.i18n.dialog.preview_size+'</span>'+data.size+'</li>' +
|
904
|
+
'<li><span>'+opts.i18n.dialog.preview_addres+'</span>'+data.path+'</li>' +
|
905
|
+
'<li><span>'+opts.i18n.dialog.preview_url+'</span><a target="_blank" href="//'+data.url+'">'+file.attr("data-name")+'</a></li>' +
|
906
|
+
'<li><span>'+opts.i18n.dialog.preview_cdate+'</span>'+data.ctime+'</li>' +
|
907
|
+
'<li><span>'+opts.i18n.dialog.preview_mdate+'</span>'+data.mtime+'</li>' +
|
908
|
+
'</ul>' +
|
909
|
+
'<a href="#" class="close">'+opts.i18n.dialog.close+'</a>');
|
910
|
+
fcfinder.find(".dialog").ortala();
|
911
|
+
}
|
912
|
+
}});
|
913
|
+
fnc.fcfinderresize();
|
914
|
+
}
|
915
|
+
return false;
|
916
|
+
});
|
917
|
+
|
918
|
+
//Dosya Kopyala
|
919
|
+
$body.on("click",fcfinder_selector+" .right ul.widget li a.copy",function(){
|
920
|
+
if (!$(this).hasClass("passive")){
|
921
|
+
var file = fcfinder.find(".right ul.wrapper li div.active");
|
922
|
+
var copy_file_path = file.attr("data-path");
|
923
|
+
if (fcfinder.find("#copy_form").size()>0){ fcfinder.find("#copy_form").remove(); }
|
924
|
+
fcfinder.append('<form id="copy_form"><input type="hidden" name="copy_file_path" value="'+copy_file_path+'" /><input type="hidden" name="copy_type" value="copy" /></form>');
|
925
|
+
fcfinder.find(".right ul.widget li a.paste").removeClass("passive");
|
926
|
+
}
|
927
|
+
return false;
|
928
|
+
});
|
929
|
+
|
930
|
+
|
931
|
+
//Dosya Kesme
|
932
|
+
$body.on("click",fcfinder_selector+" .right ul.widget li a.cut",function(){
|
933
|
+
if (!$(this).hasClass("passive")){
|
934
|
+
fcfinder.find(".right ul.wrapper li div").removeClass("cutting");
|
935
|
+
var file = fcfinder.find(".right ul.wrapper li div.active");
|
936
|
+
file.addClass("cutting");
|
937
|
+
var copy_file_path = file.attr("data-path");
|
938
|
+
if (fcfinder.find("#copy_form").size()>0){ fcfinder.find("#copy_form").remove(); }
|
939
|
+
fcfinder.append('<form id="copy_form"><input type="hidden" name="copy_file_path" value="'+copy_file_path+'" /><input type="hidden" name="copy_type" value="cut" /></form>');
|
940
|
+
fcfinder.find(".right ul.widget li a.paste").removeClass("passive");
|
941
|
+
}
|
942
|
+
return false;
|
943
|
+
});
|
944
|
+
|
945
|
+
//Dosya Yapıştırma
|
946
|
+
$body.on("click",fcfinder_selector+" .right ul.widget li a.paste",function(){
|
947
|
+
var $ths = $(this);
|
948
|
+
if (!$ths.hasClass("passive")){
|
949
|
+
var $input = fcfinder.find("input[name='copy_file_path']");
|
950
|
+
var $type = fcfinder.find("input[name='copy_type']").val();
|
951
|
+
var copy_file_path = $input.val();
|
952
|
+
var this_folder_path = fcfinder.find(".left #all_folders ul.folders li a.active").attr("href");
|
953
|
+
var data;
|
954
|
+
var data_input;
|
955
|
+
if ($type=="copy"){
|
956
|
+
data = "fcfinder[type]=copy&fcfinder[copy_file_path]="+copy_file_path+"&fcfinder[this_folder_path]="+this_folder_path;
|
957
|
+
data_input = "fcfinder[type]=copy!&fcfinder[copy_file_path]="+copy_file_path+"&fcfinder[this_folder_path]="+this_folder_path;
|
958
|
+
}
|
959
|
+
if ($type=="cut") {
|
960
|
+
data = "fcfinder[type]=cut&fcfinder[cut_file_path]="+copy_file_path+"&fcfinder[this_folder_path]="+this_folder_path;
|
961
|
+
data_input = "fcfinder[type]=cut!&fcfinder[cut_file_path]="+copy_file_path+"&fcfinder[this_folder_path]="+this_folder_path;
|
962
|
+
}
|
963
|
+
|
964
|
+
$.ajax({
|
965
|
+
url: opts.url, dataType: 'json', type: 'POST', data: data, success: function (data){
|
966
|
+
|
967
|
+
if (data[0]=="true")
|
968
|
+
{if (fcfinder.find(".right ul.wrapper li div.cutting")){fcfinder.find(".right ul.wrapper li div.cutting").remove(); }
|
969
|
+
fcfinder.find(".right ul.widget li a.refresh").trigger("click");
|
970
|
+
}else {
|
971
|
+
if (data[1] == "0"){
|
972
|
+
$(fcfinder_selector).prepend('<div class="dialog-scope"></div>' +
|
973
|
+
'<div style="display: none;" class="dialog"><h1>'+opts.i18n.dialog.file_replace_h+'</h1>' +
|
974
|
+
'<p>'+opts.i18n.dialog.file_replace_content.format(copy_file_path.split("/").pop()) +
|
975
|
+
'<input type="hidden" name="data_input" value="'+data_input+'" /> </p>' +
|
976
|
+
'<a class="close" href="#">'+opts.i18n.dialog.cancel+'</a>' +
|
977
|
+
'<a class="btn file_copy_ok" href="#">'+opts.i18n.dialog.ok+'</a>' +
|
978
|
+
'</div>');
|
979
|
+
fcfinder.find(".dialog").fadeIn(300);
|
980
|
+
fcfinder.find(".dialog").ortala();
|
981
|
+
}
|
982
|
+
else{
|
983
|
+
fnc.prepend_dialog(opts.i18n.faild_process,opts.i18n.error.copy_error.format(data[2]),{type:"p",dialog_class:'danger'});
|
984
|
+
}
|
985
|
+
}
|
986
|
+
}});
|
987
|
+
$input.remove();
|
988
|
+
$ths.addClass("passive");
|
989
|
+
|
990
|
+
}
|
991
|
+
return false;
|
992
|
+
});
|
993
|
+
|
994
|
+
|
995
|
+
//Dosya Yapıştırma (Aynı İsimde Dosya Değiştirme)
|
996
|
+
$body.on("click",fcfinder_selector+" .dialog a.file_copy_ok",function(){
|
997
|
+
var data = fcfinder.find(".dialog input[name='data_input']").val();
|
998
|
+
$.ajax({
|
999
|
+
url: opts.url, dataType: 'json', type: 'POST', data: data, success: function (data){
|
1000
|
+
|
1001
|
+
if (data[0]=="true")
|
1002
|
+
{if (fcfinder.find(".right ul.wrapper li div.cutting")){fcfinder.find(".right ul.wrapper li div.cutting").remove(); }
|
1003
|
+
fcfinder.find(".right ul.widget li a.refresh").trigger("click");
|
1004
|
+
}else {
|
1005
|
+
fnc.prepend_dialog(opts.i18n.faild_process,opts.i18n.error.replace_error.format(data[2]),{type:"p",dialog_class:'danger'});
|
1006
|
+
}
|
1007
|
+
}});
|
1008
|
+
return false;
|
1009
|
+
});
|
1010
|
+
|
1011
|
+
|
1012
|
+
|
1013
|
+
//Dosya Kopyasını Oluşturma
|
1014
|
+
$body.on("click",fcfinder_selector+" .right ul.widget li a.duplicate",function(){
|
1015
|
+
if (!$(this).hasClass("passive")){
|
1016
|
+
var file_path = fcfinder.find(".right ul.wrapper li div.active").attr("data-path");
|
1017
|
+
var data = "fcfinder[type]=duplicate&fcfinder[file_path]="+file_path;
|
1018
|
+
$.ajax({
|
1019
|
+
url: opts.url, dataType: 'json', type: 'POST', data: data, success: function (data){
|
1020
|
+
|
1021
|
+
if (data[0]=="true")
|
1022
|
+
{
|
1023
|
+
fcfinder.find(".right ul.widget li a.refresh").trigger("click");
|
1024
|
+
}else
|
1025
|
+
{
|
1026
|
+
//Kopyası Oluşmadı
|
1027
|
+
fnc.prepend_dialog(opts.i18n.faild_process,opts.i18n.error.duplicate_error.format(data[2]),{type:"p",dialog_class:'danger'});
|
1028
|
+
}
|
1029
|
+
}});
|
1030
|
+
|
1031
|
+
}
|
1032
|
+
return false;
|
1033
|
+
});
|
1034
|
+
|
1035
|
+
|
1036
|
+
|
1037
|
+
//Dosya Yeniden Adlandırma
|
1038
|
+
$body.on("click",fcfinder_selector+" .right ul.widget li a.rename",function(){
|
1039
|
+
if (!$(this).hasClass("passive")){
|
1040
|
+
var file = fcfinder.find(".right ul.wrapper li div.active");
|
1041
|
+
file.attr("data-rename","true");
|
1042
|
+
file.children("span.file_name").html('<form id="file_rename"><input type="text" id=\"file_name\" data-value="'+file.children("span.file_name").html()+'" name="fcfinder[file_name]" value="'+file.children("span.file_name").html()+'" /><input type="hidden" name="fcfinder[type]" value="file_rename"/> <input type="hidden" name="fcfinder[path]" value="'+file.attr("data-path")+'"></form>');
|
1043
|
+
|
1044
|
+
var field = file.find("span.file_name form input[name='fcfinder[file_name]']");
|
1045
|
+
if (file.hasClass("directory")){
|
1046
|
+
field.select();
|
1047
|
+
}else{
|
1048
|
+
|
1049
|
+
field[0].focus();
|
1050
|
+
field[0].setSelectionRange(0,(field.val().length-(field.val().split(".").slice(-1).toString().length+1)));
|
1051
|
+
}
|
1052
|
+
|
1053
|
+
|
1054
|
+
}
|
1055
|
+
return false;
|
1056
|
+
});
|
1057
|
+
|
1058
|
+
|
1059
|
+
|
1060
|
+
//Dosya Yeniden Adlandırma Form Submit
|
1061
|
+
$body.on("submit",fcfinder_selector+" #file_rename",function(){
|
1062
|
+
var data = $(this).serialize();
|
1063
|
+
$.ajax({
|
1064
|
+
url: opts.url, dataType: 'json', type: 'POST', data: data, success: function (data) {
|
1065
|
+
if (data[0]=="true"){
|
1066
|
+
fcfinder.find(".right ul.widget li a.refresh").trigger("click");
|
1067
|
+
}else {
|
1068
|
+
//Bir hata meydana geldi adı değiştirilemedi
|
1069
|
+
fnc.prepend_dialog(opts.i18n.faild_process,opts.i18n.error.rename_error.format(data[2]),{type:"p",dialog_class:'danger'});
|
1070
|
+
}
|
1071
|
+
}});
|
1072
|
+
return false;
|
1073
|
+
});
|
1074
|
+
|
1075
|
+
|
1076
|
+
//Dosya Düzenleme (pixlr)
|
1077
|
+
$body.on("click",fcfinder_selector+" .right ul.widget li a.edit",function(){
|
1078
|
+
if (!$(this).hasClass("passive")){
|
1079
|
+
var data = "fcfinder[type]=edit_file&fcfinder[file_path]="+fcfinder.find(".right ul.wrapper li div.active").attr("data-path");
|
1080
|
+
$.ajax({
|
1081
|
+
url: opts.url, dataType: 'json', type: 'POST', data: data, success: function (data) {
|
1082
|
+
|
1083
|
+
if (data[0]=="false"){
|
1084
|
+
fnc.prepend_dialog(opts.i18n.faild_process,opts.i18n.error.edit_error,{type:"p",dialog_class:'danger'});
|
1085
|
+
}else {
|
1086
|
+
window.open("http://apps.pixlr.com/editor/?s=c&image="+encodeURIComponent(data.url)+"&title="+encodeURIComponent(data.title));
|
1087
|
+
}
|
1088
|
+
}});
|
1089
|
+
}
|
1090
|
+
return false;
|
1091
|
+
});
|
1092
|
+
|
1093
|
+
|
1094
|
+
|
1095
|
+
//Dosya Silme
|
1096
|
+
$body.on("click",fcfinder_selector+" .right ul.widget li a.delete",function(){
|
1097
|
+
if (!$(this).hasClass("passive")){
|
1098
|
+
var file = fcfinder.find(".right ul.wrapper li div.active");
|
1099
|
+
var file_path = file.attr("data-path");
|
1100
|
+
if (fcfinder.find("form#delete_file_form").size()>0){fcfinder.find("form#delete_file_form").remove();}
|
1101
|
+
fcfinder.append('<form id="delete_file_form"><input name="file_path" value="'+file_path+'" type="hidden" /></form>');
|
1102
|
+
$(fcfinder_selector).prepend('<div class="dialog-scope"></div>' +
|
1103
|
+
'<div style="display: none;" class="dialog"><h1>'+opts.i18n.dialog.delete_h.format(file.attr("data-name"))+'</h1>' +
|
1104
|
+
'<p>'+opts.i18n.dialog.delete_content.format(file.attr("data-name"))+'</p>'+
|
1105
|
+
'<a class="close" href="#">'+opts.i18n.dialog.close+'</a>' +
|
1106
|
+
'<a class="btn file_delete" href="#">'+opts.i18n.dialog.delete+'</a>' +
|
1107
|
+
'</div>');
|
1108
|
+
fcfinder.find(".dialog").fadeIn(300);
|
1109
|
+
fcfinder.find(".dialog").ortala();
|
1110
|
+
}
|
1111
|
+
return false;
|
1112
|
+
});
|
1113
|
+
|
1114
|
+
|
1115
|
+
//Dosya Silme Onayı
|
1116
|
+
$body.on("click",fcfinder_selector+" .dialog a.file_delete",function(){
|
1117
|
+
var file_path = fcfinder.find("form#delete_file_form input[name='file_path']").val();
|
1118
|
+
var data = "fcfinder[type]=delete&fcfinder[file_path]="+file_path;
|
1119
|
+
fcfinder.find(".dialog a.close").trigger("click");
|
1120
|
+
$.ajax({
|
1121
|
+
url: opts.url, dataType: 'json', type: 'POST', data: data, success: function (data) {
|
1122
|
+
if (data[0]=="true"){
|
1123
|
+
fcfinder.find(".right ul.widget li a.refresh").trigger("click");
|
1124
|
+
}else {
|
1125
|
+
if (data[1]=="0"){
|
1126
|
+
fnc.prepend_dialog(opts.i18n.faild_process,opts.i18n.error.delete_error_0,{type:"p",dialog_class:'danger'});
|
1127
|
+
}
|
1128
|
+
else {
|
1129
|
+
fnc.prepend_dialog(opts.i18n.faild_process,opts.i18n.error.delete_error_1.format(data[2]),{type:"p",dialog_class:'danger'});
|
1130
|
+
}
|
1131
|
+
}
|
1132
|
+
}});
|
1133
|
+
return false;
|
1134
|
+
});
|
1135
|
+
|
1136
|
+
|
1137
|
+
|
1138
|
+
|
1139
|
+
//Ada Göre Dosya Listeleme
|
1140
|
+
$body.on("click",fcfinder_selector+" .right ul.widget li a.name_sorter",function(){
|
1141
|
+
if (!$(this).hasClass("passive")){
|
1142
|
+
var $ul = fcfinder.find(".right ul.wrapper li.file_wrapper[data-show='true']"),
|
1143
|
+
$li = $ul.find("div");
|
1144
|
+
if (!$(this).hasClass("z_a"))
|
1145
|
+
{
|
1146
|
+
$li.sort(function(a,b){
|
1147
|
+
var an = a.getAttribute('data-name'),
|
1148
|
+
bn = b.getAttribute('data-name');
|
1149
|
+
if(an > bn) { return 1;}
|
1150
|
+
if(an < bn) {return -1;}
|
1151
|
+
return 0;
|
1152
|
+
});
|
1153
|
+
$li.detach().appendTo($ul);
|
1154
|
+
$(this).removeClass("a_z").addClass("z_a");
|
1155
|
+
}else {
|
1156
|
+
$li.sort(function(a,b){
|
1157
|
+
var an = a.getAttribute('data-name'),
|
1158
|
+
bn = b.getAttribute('data-name');
|
1159
|
+
if(an < bn) { return 1;}
|
1160
|
+
if(an > bn) {return -1;}
|
1161
|
+
return 0;
|
1162
|
+
});
|
1163
|
+
$li.detach().appendTo($ul);
|
1164
|
+
$(this).removeClass("z_a").addClass("a_z");
|
1165
|
+
}
|
1166
|
+
}
|
1167
|
+
Cookies.setCookie("FCFINDER_sortable","name",60*60*24*365);
|
1168
|
+
return false;
|
1169
|
+
});
|
1170
|
+
|
1171
|
+
|
1172
|
+
|
1173
|
+
//Boyuta Göre Dosya Listeleme
|
1174
|
+
$body.on("click",fcfinder_selector+" .right ul.widget li a.size_sorter",function(){
|
1175
|
+
if (!$(this).hasClass("passive")){
|
1176
|
+
var $ul = fcfinder.find(".right ul.wrapper li.file_wrapper[data-show='true']"),
|
1177
|
+
$li = $ul.find("div");
|
1178
|
+
if (!$(this).hasClass("z_a"))
|
1179
|
+
{
|
1180
|
+
$li.sort(function(a,b){
|
1181
|
+
var an = fnc.toInt(a.getAttribute('data-size_2')),
|
1182
|
+
bn = fnc.toInt(b.getAttribute('data-size_2'));
|
1183
|
+
if(an < bn) { return 1;}
|
1184
|
+
if(an > bn) {return -1;}
|
1185
|
+
return 0;
|
1186
|
+
});
|
1187
|
+
$li.detach().appendTo($ul);
|
1188
|
+
$(this).removeClass("a_z").addClass("z_a");
|
1189
|
+
}else {
|
1190
|
+
$li.sort(function(a,b){
|
1191
|
+
var an = fnc.toInt(a.getAttribute('data-size_2')),
|
1192
|
+
bn = fnc.toInt(b.getAttribute('data-size_2'));
|
1193
|
+
if(an > bn) { return 1;}
|
1194
|
+
if(an < bn) {return -1;}
|
1195
|
+
return 0;
|
1196
|
+
});
|
1197
|
+
$li.detach().appendTo($ul);
|
1198
|
+
$(this).removeClass("z_a").addClass("a_z");
|
1199
|
+
}
|
1200
|
+
}
|
1201
|
+
Cookies.setCookie("FCFINDER_sortable","size",60*60*24*365);
|
1202
|
+
return false;
|
1203
|
+
});
|
1204
|
+
|
1205
|
+
|
1206
|
+
|
1207
|
+
//Tarihine Göre Dosya Listeleme
|
1208
|
+
$body.on("click",fcfinder_selector+" .right ul.widget li a.date_sorter",function(){
|
1209
|
+
if (!$(this).hasClass("passive")){
|
1210
|
+
var $ul = fcfinder.find(".right ul.wrapper li.file_wrapper[data-show='true']"),
|
1211
|
+
$li = $ul.find("div");
|
1212
|
+
if (!$(this).hasClass("z_a"))
|
1213
|
+
{
|
1214
|
+
$li.sort(function(a,b){
|
1215
|
+
var an = fnc.toDate(a.getAttribute('data-date')),
|
1216
|
+
bn = fnc.toDate(b.getAttribute('data-date'));
|
1217
|
+
if(an > bn) { return 1;}
|
1218
|
+
if(an < bn) {return -1;}
|
1219
|
+
return 0;
|
1220
|
+
});
|
1221
|
+
$li.detach().appendTo($ul);
|
1222
|
+
$(this).removeClass("a_z").addClass("z_a");
|
1223
|
+
}else {
|
1224
|
+
$li.sort(function(a,b){
|
1225
|
+
var an = fnc.toDate(a.getAttribute('data-date')),
|
1226
|
+
bn = fnc.toDate(b.getAttribute('data-date'));
|
1227
|
+
if(an < bn) { return 1;}
|
1228
|
+
if(an > bn) {return -1;}
|
1229
|
+
return 0;
|
1230
|
+
});
|
1231
|
+
$li.detach().appendTo($ul);
|
1232
|
+
$(this).removeClass("z_a").addClass("a_z");
|
1233
|
+
}
|
1234
|
+
}
|
1235
|
+
Cookies.setCookie("FCFINDER_sortable","date",60*60*24*365);
|
1236
|
+
return false;
|
1237
|
+
});
|
1238
|
+
|
1239
|
+
//Türüne Göre Dosya Listeleme
|
1240
|
+
$body.on("click",fcfinder_selector+" .right ul.widget li a.kind_sorter",function(){
|
1241
|
+
if (!$(this).hasClass("passive")){
|
1242
|
+
var $ul = fcfinder.find(".right ul.wrapper li.file_wrapper[data-show='true']"),
|
1243
|
+
$li = $ul.find("div");
|
1244
|
+
if (!$(this).hasClass("z_a"))
|
1245
|
+
{
|
1246
|
+
$li.sort(function(a,b){
|
1247
|
+
var an = a.getAttribute('data-kind'),
|
1248
|
+
bn = b.getAttribute('data-kind');
|
1249
|
+
if(an > bn) { return 1;}
|
1250
|
+
if(an < bn) {return -1;}
|
1251
|
+
return 0;
|
1252
|
+
});
|
1253
|
+
$li.detach().appendTo($ul);
|
1254
|
+
$(this).removeClass("a_z").addClass("z_a");
|
1255
|
+
}else {
|
1256
|
+
$li.sort(function(a,b){
|
1257
|
+
var an = a.getAttribute('data-kind'),
|
1258
|
+
bn = b.getAttribute('data-kind');
|
1259
|
+
if(an < bn) { return 1;}
|
1260
|
+
if(an > bn) {return -1;}
|
1261
|
+
return 0;
|
1262
|
+
});
|
1263
|
+
$li.detach().appendTo($ul);
|
1264
|
+
$(this).removeClass("z_a").addClass("a_z");
|
1265
|
+
}
|
1266
|
+
}
|
1267
|
+
Cookies.setCookie("FCFINDER_sortable","kind",60*60*24*365);
|
1268
|
+
return false;
|
1269
|
+
});
|
1270
|
+
|
1271
|
+
|
1272
|
+
|
1273
|
+
|
1274
|
+
//Simge Görünümü
|
1275
|
+
$body.on("click",fcfinder_selector+" .right ul.widget li a.icon_view",function(){
|
1276
|
+
if (!$(this).hasClass("passive")) {
|
1277
|
+
fcfinder.find(".right ul.wrapper").removeClass("list_view").addClass("icon_view");
|
1278
|
+
Cookies.setCookie("FCFINDER_view_type","icon",60*60*24*365);
|
1279
|
+
$(this).addClass("passive");
|
1280
|
+
fcfinder.find(".right ul.widget li a.list_view").removeClass("passive");
|
1281
|
+
fcfinder.find(".right ul.wrapper li div.list_head").remove();
|
1282
|
+
}
|
1283
|
+
return false;
|
1284
|
+
});
|
1285
|
+
|
1286
|
+
//Liste Görünümü
|
1287
|
+
$body.on("click",fcfinder_selector+" .right ul.widget li a.list_view",function(){
|
1288
|
+
if (!$(this).hasClass("passive")) {
|
1289
|
+
fcfinder.find(".right ul.wrapper li[data-show='true']").prepend('<div class="list_head"><span class="file_name">'+opts.i18n.file_name+'</span><span class="file_size">'+opts.i18n.file_size+'</span><span class="file_date">'+opts.i18n.file_cdate+'</span></div>');
|
1290
|
+
fcfinder.find(".right ul.wrapper").removeClass("icon_view").addClass("list_view");
|
1291
|
+
Cookies.setCookie("FCFINDER_view_type","list",60*60*24*365);
|
1292
|
+
$(this).addClass("passive");
|
1293
|
+
fcfinder.find(".right ul.widget li a.icon_view").removeClass("passive");
|
1294
|
+
}
|
1295
|
+
return false;
|
1296
|
+
});
|
1297
|
+
|
1298
|
+
|
1299
|
+
|
1300
|
+
|
1301
|
+
|
1302
|
+
|
1303
|
+
//Ayarlar Menüsü
|
1304
|
+
$body.on("click",fcfinder_selector+" .right ul.widget li a.settings",function(){
|
1305
|
+
if (!$(this).hasClass("passive")){
|
1306
|
+
var list_type = Cookies.getCookie("FCFINDER_view_type");
|
1307
|
+
var size_show = Cookies.getCookie("FCFINDER_size_show");
|
1308
|
+
var date_show = Cookies.getCookie("FCFINDER_date_show");
|
1309
|
+
|
1310
|
+
var dialog_text = '<div class="dialog-scope"></div>' +
|
1311
|
+
'<div style="display: none;" class="dialog"><h1>'+opts.i18n.dialog.settings_h+'</h1>' +
|
1312
|
+
'<div class="content">';
|
1313
|
+
dialog_text += '<div><label><input type="radio" name="view" value="icon"';
|
1314
|
+
dialog_text += list_type == "icon" ? ' checked="checked" ' : '';
|
1315
|
+
dialog_text += ' /> '+opts.i18n.dialog.settings_icon_view+' </label></div>';
|
1316
|
+
dialog_text += '<div><label><input type="radio" name="view" value="list"';
|
1317
|
+
dialog_text += list_type == "list" ? ' checked="checked" ' : ''
|
1318
|
+
dialog_text += ' /> '+opts.i18n.dialog.settings_list_view+' </label></div>'
|
1319
|
+
dialog_text += '<div><label><input type="checkbox" name="size_show" value="true"'
|
1320
|
+
dialog_text += size_show == "true" ? ' checked="checked" ' : ''
|
1321
|
+
dialog_text +=' /> '+opts.i18n.dialog.settings_show_size+' </label></div>'
|
1322
|
+
dialog_text +='<div><label><input type="checkbox" name="date_show" value="true"'
|
1323
|
+
dialog_text += date_show == "true" ? ' checked="checked" ' : ''
|
1324
|
+
dialog_text +=' /> '+opts.i18n.dialog.settings_show_date+' </label></div>' +
|
1325
|
+
'</div>' +
|
1326
|
+
'<a class="close" href="#">'+opts.i18n.dialog.close+'</a>' +
|
1327
|
+
'</div>';
|
1328
|
+
$(fcfinder_selector).prepend(dialog_text);
|
1329
|
+
fcfinder.find(".dialog").fadeIn(300);
|
1330
|
+
fcfinder.find(".dialog").ortala();
|
1331
|
+
}
|
1332
|
+
return false;
|
1333
|
+
});
|
1334
|
+
|
1335
|
+
|
1336
|
+
//Ayarlar -> Tarih Göster İnputu Seçilirse
|
1337
|
+
$body.on("change",fcfinder_selector+" .dialog div.content div label input[name='date_show']",function(){
|
1338
|
+
fcfinder.find(".right ul.widget li a.show_date").trigger('click');
|
1339
|
+
});
|
1340
|
+
|
1341
|
+
//Ayarlar -> Boyut Göster İnputu Seçilirse
|
1342
|
+
$body.on("change",fcfinder_selector+" .dialog div.content div label input[name='size_show']",function(){
|
1343
|
+
fcfinder.find(".right ul.widget li a.show_size").trigger('click');
|
1344
|
+
});
|
1345
|
+
|
1346
|
+
//Ayarlar -> Görünüm Tipi Seçimi (Liste|Simge)
|
1347
|
+
$body.on("change",fcfinder_selector+" .dialog div.content div label input[name='view']",function(){
|
1348
|
+
var view_type = $(this).val();
|
1349
|
+
if (view_type=="icon"){ fcfinder.find(".right ul.widget li a.icon_view").trigger("click"); }
|
1350
|
+
if (view_type=="list"){ fcfinder.find(".right ul.widget li a.list_view").trigger("click");}
|
1351
|
+
});
|
1352
|
+
|
1353
|
+
|
1354
|
+
|
1355
|
+
|
1356
|
+
//Sıralama Menüsü
|
1357
|
+
$body.on("click",fcfinder_selector+" .right ul.widget li a.sort",function(){
|
1358
|
+
if (!$(this).hasClass("passive")){
|
1359
|
+
var sortable_type = Cookies.getCookie("FCFINDER_sortable");
|
1360
|
+
var dialog_text = '<div class="dialog-scope"></div>' +
|
1361
|
+
'<div style="display: none;" class="dialog"><h1>'+opts.i18n.dialog.sorter_h+'</h1>' +
|
1362
|
+
'<div class="content">';
|
1363
|
+
dialog_text += '<div><label><input type="radio" name="sortable" value="name"';
|
1364
|
+
dialog_text += sortable_type == "name" ? ' checked="checked" ' : '';
|
1365
|
+
dialog_text += ' /> '+opts.i18n.dialog.sorter_name+' </label></div>';
|
1366
|
+
dialog_text += '<div><label><input type="radio" name="sortable" value="size"';
|
1367
|
+
dialog_text += sortable_type == "size" ? ' checked="checked" ' : ''
|
1368
|
+
dialog_text += ' /> '+opts.i18n.dialog.sorter_size+' </label></div>'
|
1369
|
+
dialog_text += '<div><label><input type="radio" name="sortable" value="date"'
|
1370
|
+
dialog_text +=sortable_type == "date" ? ' checked="checked" ' : ''
|
1371
|
+
dialog_text +=' /> '+opts.i18n.dialog.sorter_date+' </label></div>'
|
1372
|
+
dialog_text +='<div><label><input type="radio" name="sortable" value="kind"'
|
1373
|
+
dialog_text +=sortable_type == "kind" ? ' checked="checked" ' : ''
|
1374
|
+
dialog_text +=' /> '+opts.i18n.dialog.sorter_kind+' </label></div>' +
|
1375
|
+
'</div>' +
|
1376
|
+
'<a class="close" href="#">'+opts.i18n.dialog.close+'</a>' +
|
1377
|
+
'</div>';
|
1378
|
+
$(fcfinder_selector).prepend(dialog_text);
|
1379
|
+
fcfinder.find(".dialog").fadeIn(300);
|
1380
|
+
fcfinder.find(".dialog").ortala();
|
1381
|
+
}
|
1382
|
+
return false;
|
1383
|
+
});
|
1384
|
+
|
1385
|
+
|
1386
|
+
//Sıralama -> Sıralama Yöntemi Seçimi (İsim|Botur|Tarih|Tür)
|
1387
|
+
$body.on("change",fcfinder_selector+" .dialog div.content div label input[name='sortable']",function(){
|
1388
|
+
var sort_type = $(this).val();
|
1389
|
+
Cookies.setCookie("FCFINDER_sortable",sort_type,60*60*24*365);
|
1390
|
+
fnc.sortable(sort_type);
|
1391
|
+
return false;
|
1392
|
+
});
|
1393
|
+
|
1394
|
+
|
1395
|
+
|
1396
|
+
//Klavye Kontrolleri
|
1397
|
+
$(document).keyup(function(e) {
|
1398
|
+
//ESC Press
|
1399
|
+
if (e.keyCode == 27) {
|
1400
|
+
if (fcfinder.find(".dialog").size() > 0 || fcfinder.find(".dialog-scope").size() > 0)
|
1401
|
+
{
|
1402
|
+
fcfinder.find(".dialog").fadeOut(300, function(){ fcfinder.find(".dialog-scope , .dialog").remove(); });
|
1403
|
+
}
|
1404
|
+
fcfinder.find("#ctxMenu").remove();
|
1405
|
+
fcfinder.find(".right ul.wrapper li[data-show='true'] div[data-new='new_folder']").remove();
|
1406
|
+
if (fcfinder.find(".right ul.wrapper li.file_wrapper[data-show='true']").html()==""){fcfinder.find(".right ul.wrapper li.file_wrapper[data-show='true']").html(opts.i18n.empty_dir);}
|
1407
|
+
var file = fcfinder.find(".right ul.wrapper li[data-show='true'] div[data-rename='true']");
|
1408
|
+
file.removeAttr("data-rename");
|
1409
|
+
file.children("span.file_name").html(file.find("form#file_rename input[name='fcfinder[file_name]']").attr("data-value"));
|
1410
|
+
}
|
1411
|
+
//F2 Press
|
1412
|
+
if(e.which == 113) {
|
1413
|
+
if (fcfinder.find(".right ul.wrapper li div.active")){
|
1414
|
+
fcfinder.find(".right ul.widget li a.rename").trigger('click');
|
1415
|
+
}
|
1416
|
+
return false;
|
1417
|
+
}
|
1418
|
+
|
1419
|
+
});
|
1420
|
+
|
1421
|
+
//Hedef Dışı Tıklama Kontrolleri
|
1422
|
+
$("*").click(function(e){
|
1423
|
+
|
1424
|
+
if (!$(e.target).is(fcfinder_selector+" ul#ctxMenu") && !$(e.target).is(fcfinder_selector+" ul#ctxMenu *") )
|
1425
|
+
{
|
1426
|
+
fcfinder.find("#ctxMenu").remove();
|
1427
|
+
}
|
1428
|
+
|
1429
|
+
if (!$(e.target).is(fcfinder_selector+" .dialog") && !$(e.target).is(fcfinder_selector+" .dialog *") &&
|
1430
|
+
!$(e.target).is(fcfinder_selector+" .right ul.widget li a.icon_view") &&
|
1431
|
+
!$(e.target).is(fcfinder_selector+" .right ul.widget li a.list_view") &&
|
1432
|
+
!$(e.target).is(fcfinder_selector+" .right ul.widget li a.show_size") &&
|
1433
|
+
!$(e.target).is(fcfinder_selector+" .right ul.widget li a.show_date") &&
|
1434
|
+
!$(e.target).is(fcfinder_selector+" .right ul.widget li a.name_sorter") &&
|
1435
|
+
!$(e.target).is(fcfinder_selector+" .right ul.widget li a.size_sorter") &&
|
1436
|
+
!$(e.target).is(fcfinder_selector+" .right ul.widget li a.date_sorter") &&
|
1437
|
+
!$(e.target).is(fcfinder_selector+" .right ul.widget li a.kind_sorter") &&
|
1438
|
+
!$(e.target).is(fcfinder_selector+" "))
|
1439
|
+
{
|
1440
|
+
if (!fcfinder.find(".dialog").hasClass("noclose")){
|
1441
|
+
fcfinder.find(".dialog").fadeOut(300, function(){ fcfinder.find(".dialog-scope , .dialog").remove(); });
|
1442
|
+
}
|
1443
|
+
}
|
1444
|
+
|
1445
|
+
if (!$(e.target).is(fcfinder_selector+" .right ul.wrapper li[data-show='true'] div[data-new='new_folder']") && !$(e.target).is(fcfinder_selector+" .right ul.wrapper li[data-show='true'] div[data-new='new_folder'] *"))
|
1446
|
+
{
|
1447
|
+
fcfinder.find(".right ul.wrapper li[data-show='true'] div[data-new='new_folder']").remove();
|
1448
|
+
if (fcfinder.find(".right ul.wrapper li.file_wrapper[data-show='true']").html()==""){fcfinder.find(".right ul.wrapper li.file_wrapper[data-show='true']").html(opts.i18n.empty_dir);}
|
1449
|
+
}
|
1450
|
+
|
1451
|
+
|
1452
|
+
if (!$(e.target).is(fcfinder_selector+" .right ul.wrapper li[data-show='true'] div[data-rename='true']") && !$(e.target).is(fcfinder_selector+" .right ul.wrapper li[data-show='true'] div[data-rename='true'] *"))
|
1453
|
+
{
|
1454
|
+
var file = fcfinder.find(".right ul.wrapper li[data-show='true'] div[data-rename='true']");
|
1455
|
+
file.removeAttr("data-rename");
|
1456
|
+
file.children("span.file_name").html(file.find("form#file_rename input[name='fcfinder[file_name]']").attr("data-value"));
|
1457
|
+
}
|
1458
|
+
|
1459
|
+
if (
|
1460
|
+
!$(e.target).is(fcfinder_selector+" .right ul.widget li a.download") &&
|
1461
|
+
!$(e.target).is(fcfinder_selector+" .right ul.widget li a.info") &&
|
1462
|
+
!$(e.target).is(fcfinder_selector+" .right ul.widget li a.preview") &&
|
1463
|
+
!$(e.target).is(fcfinder_selector+" .right ul.widget li a.edit") &&
|
1464
|
+
!$(e.target).is(fcfinder_selector+" .right ul.widget li a.copy") &&
|
1465
|
+
!$(e.target).is(fcfinder_selector+" .right ul.widget li a.cut") &&
|
1466
|
+
//!$(e.target).is(fcfinder_selector+" .right ul.widget li a.paste") &&
|
1467
|
+
!$(e.target).is(fcfinder_selector+" .right ul.widget li a.duplicate") &&
|
1468
|
+
!$(e.target).is(fcfinder_selector+" .right ul.widget li a.rename") &&
|
1469
|
+
!$(e.target).is(fcfinder_selector+" .right ul.widget li a.delete") &&
|
1470
|
+
|
1471
|
+
!$(e.target).is(fcfinder_selector+" ul#ctxMenu li") &&
|
1472
|
+
!$(e.target).is(fcfinder_selector+" ul#ctxMenu li *") &&
|
1473
|
+
|
1474
|
+
|
1475
|
+
!$(e.target).is(fcfinder_selector+" .right ul.wrapper li div") && !$(e.target).is(fcfinder_selector+" .right ul.wrapper li div *"))
|
1476
|
+
{
|
1477
|
+
fcfinder.find(".right ul.wrapper li div").removeClass("active");
|
1478
|
+
fcfinder.find(".right ul.widget li a.download , " +
|
1479
|
+
".right ul.widget li a.info , " +
|
1480
|
+
".right ul.widget li a.preview , " +
|
1481
|
+
//".right ul.widget li a.edit , " +
|
1482
|
+
".right ul.widget li a.copy , " +
|
1483
|
+
".right ul.widget li a.cut , " +
|
1484
|
+
//".right ul.widget li a.paste , " +
|
1485
|
+
".right ul.widget li a.duplicate , " +
|
1486
|
+
".right ul.widget li a.rename , " +
|
1487
|
+
".right ul.widget li a.delete").addClass("passive");
|
1488
|
+
|
1489
|
+
}
|
1490
|
+
|
1491
|
+
});
|
1492
|
+
|
1493
|
+
|
1494
|
+
//Sağ Tıklama Ayarı
|
1495
|
+
$("*").contextmenu(function(e){
|
1496
|
+
fcfinder.find("#ctxMenu").remove();
|
1497
|
+
if (!$(e.target).is(fcfinder_selector+" .right ul.wrapper li div.list_head") && !$(e.target).is(fcfinder_selector+" .right ul.wrapper li div.list_head *")){
|
1498
|
+
if ($(e.target).is(fcfinder_selector+" .right ul.wrapper li div") || $(e.target).is(fcfinder_selector+" .right ul.wrapper li div *")) {
|
1499
|
+
if (typeof $(e.target).parent("div").attr("data-name") === "undefined") {
|
1500
|
+
var file = $(e.target);
|
1501
|
+
}else {
|
1502
|
+
var file = $(e.target).parent("div");
|
1503
|
+
}
|
1504
|
+
file.trigger("click");
|
1505
|
+
fcfinder.prepend('<ul id="ctxMenu"></ul>');
|
1506
|
+
var ctxMenu = fcfinder.find("#ctxMenu");
|
1507
|
+
var x = parseInt(e.pageX) - 20;
|
1508
|
+
var y = parseInt(e.pageY) - 30;
|
1509
|
+
var d_x = $(document).width();
|
1510
|
+
var d_y = $(document).height();
|
1511
|
+
var ctxW_x = ctxMenu.width();
|
1512
|
+
var ctxH_y = ctxMenu.height();
|
1513
|
+
|
1514
|
+
if (x >= d_x - ctxW_x - 50) { x = d_x - ctxW_x - 50; }
|
1515
|
+
if (y >= d_y - ctxH_y - 40) { y = d_y - ctxH_y - 40;}
|
1516
|
+
|
1517
|
+
//
|
1518
|
+
ctxMenu.html('<li><a class="none">' + file.attr("data-name") + '</a></li><li class="hr"> </li>'+
|
1519
|
+
'<li><a href="fcfinder:open">'+opts.i18n.contextmenu.file_open+'</a></li>'+
|
1520
|
+
'<li><a href="fcfinder:preview">'+opts.i18n.contextmenu.file_preview+'</a></li>'+
|
1521
|
+
'<li><a href="fcfinder:download">'+opts.i18n.contextmenu.file_download+'</a></li>'+
|
1522
|
+
'<li class="hr"> </li>'+
|
1523
|
+
'<li><a href="fcfinder:copy">'+opts.i18n.contextmenu.file_copy+'</a></li>'+
|
1524
|
+
'<li><a href="fcfinder:cut">'+opts.i18n.contextmenu.file_cut+'</a></li>'+
|
1525
|
+
'<li><a href="fcfinder:duplicate">'+opts.i18n.contextmenu.file_duplicate+'</a></li>'+
|
1526
|
+
'<li><a href="fcfinder:rename">'+opts.i18n.contextmenu.file_rename+'</a></li>'+
|
1527
|
+
'<li><a href="fcfinder:delete">'+opts.i18n.contextmenu.file_delete+'</a></li>'+
|
1528
|
+
'<li class="hr"> </li>'+
|
1529
|
+
'<li><a href="fcfinder:info">'+opts.i18n.contextmenu.file_info+'</a></li>');
|
1530
|
+
|
1531
|
+
ctxMenu.css({"left": x + "px", "top": y + "px"});
|
1532
|
+
}
|
1533
|
+
|
1534
|
+
if ($(e.target).is(fcfinder_selector+" .right ul.wrapper li[data-show='true']") || $(e.target).is(fcfinder_selector+" .right ul.wrapper")) {
|
1535
|
+
|
1536
|
+
fcfinder.prepend('<ul id="ctxMenu"></ul>');
|
1537
|
+
var ctxMenu = fcfinder.find("#ctxMenu");
|
1538
|
+
var x = parseInt(e.pageX) - 20;
|
1539
|
+
var y = parseInt(e.pageY) - 30;
|
1540
|
+
var d_x = $(document).width();
|
1541
|
+
var d_y = $(document).height();
|
1542
|
+
var ctxW_x = ctxMenu.width();
|
1543
|
+
var ctxH_y = ctxMenu.height();
|
1544
|
+
|
1545
|
+
if (x >= d_x - ctxW_x - 50) { x = d_x - ctxW_x - 50; }
|
1546
|
+
if (y >= d_y - ctxH_y - 40) { y = d_y - ctxH_y - 40;}
|
1547
|
+
|
1548
|
+
|
1549
|
+
var paste;
|
1550
|
+
if (fcfinder.find(".right ul.widget li a.paste").hasClass("passive")){
|
1551
|
+
paste = '<li><a class="none" href="fcfinder:paste">'+opts.i18n.contextmenu.wrapper_paste+'</a></li>';
|
1552
|
+
}else{paste = '<li><a href="fcfinder:paste">'+opts.i18n.contextmenu.wrapper_paste+'</a></li>';}
|
1553
|
+
|
1554
|
+
var view;
|
1555
|
+
if (Cookies.getCookie("FCFINDER_view_type")=="icon"){
|
1556
|
+
view = '<li><a href="fcfinder:list_view">'+opts.i18n.contextmenu.wrapper_list_view+'</a></li>';
|
1557
|
+
}else{
|
1558
|
+
view = '<li><a href="fcfinder:icon_view">'+opts.i18n.contextmenu.wrapper_icon_view+'</a></li>';
|
1559
|
+
}
|
1560
|
+
|
1561
|
+
ctxMenu.html('<li><a class="none">' + fcfinder.find(".right ul.wrapper li[data-show='true']").attr("data-path") + '</a></li><li class="hr"> </li>'+
|
1562
|
+
'<li><a href="fcfinder:upload">'+opts.i18n.contextmenu.wrapper_upload+'</a></li>'+
|
1563
|
+
'<li><a href="fcfinder:newfolder">'+opts.i18n.contextmenu.wrapper_newfolder+'</a></li>'+
|
1564
|
+
'<li><a href="fcfinder:refresh">'+opts.i18n.contextmenu.wrapper_refresh+'</a></li>'+
|
1565
|
+
paste+
|
1566
|
+
'<li class="hr"> </li>'+
|
1567
|
+
view+
|
1568
|
+
'<li class="hr"> </li>'+
|
1569
|
+
'<li><a href="fcfinder:showsize">'+opts.i18n.contextmenu.wrapper_show_size+'</a></li>'+
|
1570
|
+
'<li><a href="fcfinder:showdate">'+opts.i18n.contextmenu.wrapper_show_size+'</a></li>'+
|
1571
|
+
'<li class="hr"> </li>'+
|
1572
|
+
'<li><a href="fcfinder:namesorter">'+opts.i18n.contextmenu.wrapper_namesorter+'</a></li>'+
|
1573
|
+
'<li><a href="fcfinder:sizesorter">'+opts.i18n.contextmenu.wrapper_sizesorter+'</a></li>'+
|
1574
|
+
'<li><a href="fcfinder:datesorter">'+opts.i18n.contextmenu.wrapper_datesorter+'</a></li>'+
|
1575
|
+
'<li><a href="fcfinder:kindsorter">'+opts.i18n.contextmenu.wrapper_kindsorter+'</a></li>');
|
1576
|
+
|
1577
|
+
|
1578
|
+
ctxMenu.css({"left": x + "px", "top": y + "px"});
|
1579
|
+
}
|
1580
|
+
}
|
1581
|
+
return false;
|
1582
|
+
});
|
1583
|
+
|
1584
|
+
|
1585
|
+
|
1586
|
+
//Sağ Tıklama Menü Link Seçimi
|
1587
|
+
$body.on("click",fcfinder_selector+" ul#ctxMenu li a",function(){
|
1588
|
+
if ($(this).attr("class")=="none"){ return false; }else {
|
1589
|
+
fcfinder.find("ul#ctxMenu").remove();
|
1590
|
+
if ($(this).attr("href")=="fcfinder:open"){ fcfinder.find(".right ul.wrapper li div.active").trigger("dblclick");}
|
1591
|
+
if ($(this).attr("href")=="fcfinder:preview"){ fcfinder.find(".right ul.widget li a.preview").trigger("click"); }
|
1592
|
+
if ($(this).attr("href")=="fcfinder:download"){fcfinder.find(".right ul.widget li a.download").trigger("click");}
|
1593
|
+
if ($(this).attr("href")=="fcfinder:copy"){fcfinder.find(".right ul.widget li a.copy").trigger("click");}
|
1594
|
+
if ($(this).attr("href")=="fcfinder:cut"){fcfinder.find(".right ul.widget li a.cut").trigger("click");}
|
1595
|
+
if ($(this).attr("href")=="fcfinder:duplicate"){fcfinder.find(".right ul.widget li a.duplicate").trigger("click");}
|
1596
|
+
if ($(this).attr("href")=="fcfinder:rename"){fcfinder.find(".right ul.widget li a.rename").trigger("click");}
|
1597
|
+
if ($(this).attr("href")=="fcfinder:delete"){fcfinder.find(".right ul.widget li a.delete").trigger("click");}
|
1598
|
+
if ($(this).attr("href")=="fcfinder:info"){fcfinder.find(".right ul.widget li a.info").trigger("click");}
|
1599
|
+
|
1600
|
+
if ($(this).attr("href")=="fcfinder:upload"){ fcfinder.find(".right ul.widget li a.upload input.upload_field").trigger("click");}
|
1601
|
+
if ($(this).attr("href")=="fcfinder:newfolder"){ fcfinder.find(".right ul.widget li a.new_folder").trigger("click");}
|
1602
|
+
if ($(this).attr("href")=="fcfinder:refresh"){ fcfinder.find(".right ul.widget li a.refresh").trigger("click");}
|
1603
|
+
if ($(this).attr("href")=="fcfinder:paste"){ fcfinder.find(".right ul.widget li a.paste").trigger("click");}
|
1604
|
+
if ($(this).attr("href")=="fcfinder:list_view"){ fcfinder.find(".right ul.widget li a.list_view").trigger("click");}
|
1605
|
+
if ($(this).attr("href")=="fcfinder:icon_view"){ fcfinder.find(".right ul.widget li a.icon_view").trigger("click");}
|
1606
|
+
|
1607
|
+
if ($(this).attr("href")=="fcfinder:showdate"){ fcfinder.find(".right ul.widget li a.show_date").trigger("click");}
|
1608
|
+
if ($(this).attr("href")=="fcfinder:showsize"){ fcfinder.find(".right ul.widget li a.show_size").trigger("click");}
|
1609
|
+
|
1610
|
+
if ($(this).attr("href")=="fcfinder:namesorter"){ fcfinder.find(".right ul.widget li a.name_sorter").trigger("click");}
|
1611
|
+
if ($(this).attr("href")=="fcfinder:sizesorter"){ fcfinder.find(".right ul.widget li a.size_sorter").trigger("click");}
|
1612
|
+
if ($(this).attr("href")=="fcfinder:datesorter"){ fcfinder.find(".right ul.widget li a.date_sorter").trigger("click");}
|
1613
|
+
if ($(this).attr("href")=="fcfinder:kindsorter"){ fcfinder.find(".right ul.widget li a.kind_sorter").trigger("click");}
|
1614
|
+
|
1615
|
+
|
1616
|
+
return false;
|
1617
|
+
}
|
1618
|
+
|
1619
|
+
});
|
1620
|
+
|
1621
|
+
|
1622
|
+
|
1623
|
+
//Yeni Klasör Form Submit
|
1624
|
+
$body.on("submit",fcfinder_selector+" #new_directory",function(){
|
1625
|
+
var data = $(this).serialize();
|
1626
|
+
$.ajax({
|
1627
|
+
url: opts.url, dataType: 'json', type: 'POST', data: data, success: function (data) {
|
1628
|
+
|
1629
|
+
if (data[0]=="true"){
|
1630
|
+
fcfinder.find(".right ul.widget li a.refresh").trigger("click");
|
1631
|
+
fcfinder.find(".left #all_folders ul.folders li a[href='"+data[1].top_dir+"']").trigger("click");
|
1632
|
+
fcfinder.find(".left #all_folders ul.folders li a[href='"+data[1].top_dir+"']").children("span.braca").addClass("closed");
|
1633
|
+
}else {
|
1634
|
+
if (data[1]=="-1"){
|
1635
|
+
fnc.prepend_dialog(opts.i18n.faild_process,opts.i18n.error.new_directory_error_1,{type:"p",dialog_class:'danger'});
|
1636
|
+
}
|
1637
|
+
else {
|
1638
|
+
fnc.prepend_dialog(opts.i18n.faild_process,opts.i18n.error.new_directory_error_0.format(data[2]),{type:"p",dialog_class:'danger'});
|
1639
|
+
}
|
1640
|
+
}
|
1641
|
+
}
|
1642
|
+
});
|
1643
|
+
return false;
|
1644
|
+
});
|
1645
|
+
|
1646
|
+
//Dialog Kapatma Butonu
|
1647
|
+
$body.on("click",fcfinder_selector+" .dialog a.close",function(){
|
1648
|
+
fcfinder.find(".dialog").fadeOut(300, function(){ fcfinder.find(".dialog-scope , .dialog").remove(); });
|
1649
|
+
fnc.fcfinderresize();
|
1650
|
+
return false;
|
1651
|
+
});
|
1652
|
+
|
1653
|
+
|
1654
|
+
|
1655
|
+
|
1656
|
+
//Hakkında Sayfası
|
1657
|
+
$body.on("click",fcfinder_selector+" .right ul.widget li a.about",function(){
|
1658
|
+
return false;
|
1659
|
+
});
|
1660
|
+
|
1661
|
+
|
1662
|
+
|
1663
|
+
|
1664
|
+
//Görüntü Yükseklik Genişlik Ayarları
|
1665
|
+
fnc.fcfinderresize();
|
1666
|
+
$(window).resize(function(){ fnc.fcfinderresize(); fcfinder.find(".dialog").ortala(); });
|
1667
|
+
|
1668
|
+
//Tıklama Efekti Ayarı
|
1669
|
+
fnc.ripleClick(fcfinder_selector+" .right ul.widget li a ,"+fcfinder_selector+" .right ul.wrapper li div ,"+fcfinder_selector+" .left #all_folders ul.folders li a span.folder");
|
1670
|
+
|
1671
|
+
|
1672
|
+
|
1673
|
+
|
1674
|
+
|
1675
|
+
|
1676
|
+
//String Objesi Metod Ekleme
|
1677
|
+
String.prototype.format = function() {
|
1678
|
+
var formatted = this;
|
1679
|
+
for (var i = 0; i < arguments.length; i++) {
|
1680
|
+
var regexp = new RegExp('\\{'+i+'\\}', 'gi');
|
1681
|
+
formatted = formatted.replace(regexp, arguments[i]);
|
1682
|
+
}
|
1683
|
+
return formatted;
|
1684
|
+
};
|
1685
|
+
|
1686
|
+
//$ Genişletme Yeni Metod Ekleme
|
1687
|
+
$().__proto__.ortala = function(){
|
1688
|
+
this.css({
|
1689
|
+
left: ($(window).width()/2)-(this.width()/2),
|
1690
|
+
top: ($(window).height()/2)-(this.height()/2)
|
1691
|
+
});
|
1692
|
+
|
1693
|
+
};
|
1694
|
+
|
1695
|
+
};
|
1696
|
+
|
1697
|
+
})(jQuery);
|