Conflicts: apps/contacts/lib/app.php apps/files_sharing/js/share.jsremotes/origin/stable45
commit
94ce8f2168
@ -0,0 +1,12 @@ |
||||
<?php $TRANSLATIONS = array( |
||||
"Bookmarks" => "Adreces d'interès", |
||||
"unnamed" => "sense nom", |
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Arrossegueu-ho al navegador i feu-hi un clic quan volgueu marcar ràpidament una adreça d'interès:", |
||||
"Read later" => "Llegeix més tard", |
||||
"Address" => "Adreça", |
||||
"Title" => "Títol", |
||||
"Tags" => "Etiquetes", |
||||
"Save bookmark" => "Desa l'adreça d'interès", |
||||
"You have no bookmarks" => "No teniu adreces d'interès", |
||||
"Bookmarklet <br />" => "Bookmarklet <br />" |
||||
); |
||||
@ -0,0 +1,12 @@ |
||||
<?php $TRANSLATIONS = array( |
||||
"Bookmarks" => "Lesezeichen", |
||||
"unnamed" => "unbenannt", |
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Ziehe dies zu deinen Browser-Lesezeichen und klicke es, wenn du eine Website schnell den Lesezeichen hinzufügen willst.", |
||||
"Read later" => "Später lesen", |
||||
"Address" => "Adresse", |
||||
"Title" => "Title", |
||||
"Tags" => "Tags", |
||||
"Save bookmark" => "Lesezeichen speichern", |
||||
"You have no bookmarks" => "Du hast keine Lesezeichen", |
||||
"Bookmarklet <br />" => "Bookmarklet <br />" |
||||
); |
||||
@ -0,0 +1,12 @@ |
||||
<?php $TRANSLATIONS = array( |
||||
"Bookmarks" => "Σελιδοδείκτες", |
||||
"unnamed" => "ανώνυμο", |
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Σύρετε αυτό στους σελιδοδείκτες του περιηγητή σας και κάντε κλικ επάνω του, όταν θέλετε να προσθέσετε σύντομα μια ιστοσελίδα ως σελιδοδείκτη:", |
||||
"Read later" => "Ανάγνωση αργότερα", |
||||
"Address" => "Διεύθυνση", |
||||
"Title" => "Τίτλος", |
||||
"Tags" => "Ετικέτες", |
||||
"Save bookmark" => "Αποθήκευση σελιδοδείκτη", |
||||
"You have no bookmarks" => "Δεν έχετε σελιδοδείκτες", |
||||
"Bookmarklet <br />" => "Εφαρμογίδιο Σελιδοδεικτών <br />" |
||||
); |
||||
@ -0,0 +1,12 @@ |
||||
<?php $TRANSLATIONS = array( |
||||
"Bookmarks" => "Marcadores", |
||||
"unnamed" => "sin nombre", |
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Arrastra desde aquí a los marcadores de tu navegador, y haz clic cuando quieras marcar una página web rápidamente:", |
||||
"Read later" => "Leer después", |
||||
"Address" => "Dirección", |
||||
"Title" => "Título", |
||||
"Tags" => "Etiquetas", |
||||
"Save bookmark" => "Guardar marcador", |
||||
"You have no bookmarks" => "No tienes marcadores", |
||||
"Bookmarklet <br />" => "Bookmarklet <br />" |
||||
); |
||||
@ -0,0 +1,12 @@ |
||||
<?php $TRANSLATIONS = array( |
||||
"Bookmarks" => "Kirjanmerkit", |
||||
"unnamed" => "nimetön", |
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Vedä tämä selaimesi kirjanmerkkipalkkiin ja napsauta sitä, kun haluat lisätä kirjanmerkin nopeasti:", |
||||
"Read later" => "Lue myöhemmin", |
||||
"Address" => "Osoite", |
||||
"Title" => "Otsikko", |
||||
"Tags" => "Tunnisteet", |
||||
"Save bookmark" => "Tallenna kirjanmerkki", |
||||
"You have no bookmarks" => "Sinulla ei ole kirjanmerkkejä", |
||||
"Bookmarklet <br />" => "Kirjanmerkitsin <br />" |
||||
); |
||||
@ -0,0 +1,12 @@ |
||||
<?php $TRANSLATIONS = array( |
||||
"Bookmarks" => "Zaznamki", |
||||
"unnamed" => "neimenovano", |
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Povlecite to povezavo med zaznamke v vašem brskalniku in jo, ko želite ustvariti zaznamek trenutne strani, preprosto kliknite:", |
||||
"Read later" => "Preberi kasneje", |
||||
"Address" => "Naslov", |
||||
"Title" => "Ime", |
||||
"Tags" => "Oznake", |
||||
"Save bookmark" => "Shrani zaznamek", |
||||
"You have no bookmarks" => "Nimate zaznamkov", |
||||
"Bookmarklet <br />" => "Bookmarklet <br />" |
||||
); |
||||
@ -0,0 +1,12 @@ |
||||
<?php $TRANSLATIONS = array( |
||||
"Bookmarks" => "Bokmärken", |
||||
"unnamed" => "namnlös", |
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Dra till din webbläsares bokmärken och klicka på det när du vill bokmärka en webbsida snabbt:", |
||||
"Read later" => "Läs senare", |
||||
"Address" => "Adress", |
||||
"Title" => "Titel", |
||||
"Tags" => "Taggar", |
||||
"Save bookmark" => "Spara bokmärke", |
||||
"You have no bookmarks" => "Du har inga bokmärken", |
||||
"Bookmarklet <br />" => "Skriptbokmärke <br />" |
||||
); |
||||
@ -0,0 +1,135 @@ |
||||
<?php $TRANSLATIONS = array( |
||||
"No calendars found." => "Không tìm thấy lịch.", |
||||
"No events found." => "Không tìm thấy sự kiện nào", |
||||
"Wrong calendar" => "Sai lịch", |
||||
"New Timezone:" => "Múi giờ mới :", |
||||
"Timezone changed" => "Thay đổi múi giờ", |
||||
"Invalid request" => "Yêu cầu không hợp lệ", |
||||
"Calendar" => "Lịch", |
||||
"ddd" => "ddd", |
||||
"ddd M/d" => "ddd M/d", |
||||
"dddd M/d" => "dddd M/d", |
||||
"MMMM yyyy" => "MMMM yyyy", |
||||
"MMM d[ yyyy]{ '—'[ MMM] d yyyy}" => "MMM d[ yyyy]{ '—'[ MMM] d yyyy}", |
||||
"dddd, MMM d, yyyy" => "dddd, MMM d, yyyy", |
||||
"Birthday" => "Ngày sinh nhật", |
||||
"Business" => "Công việc", |
||||
"Call" => "Số điện thoại", |
||||
"Clients" => "Máy trạm", |
||||
"Holidays" => "Ngày lễ", |
||||
"Ideas" => "Ý tưởng", |
||||
"Jubilee" => "Lễ kỷ niệm", |
||||
"Meeting" => "Hội nghị", |
||||
"Other" => "Khác", |
||||
"Personal" => "Cá nhân", |
||||
"Projects" => "Dự án", |
||||
"Questions" => "Câu hỏi", |
||||
"Work" => "Công việc", |
||||
"New Calendar" => "Lịch mới", |
||||
"Does not repeat" => "Không lặp lại", |
||||
"Daily" => "Hàng ngày", |
||||
"Weekly" => "Hàng tuần", |
||||
"Every Weekday" => "Mỗi ngày trong tuần", |
||||
"Bi-Weekly" => "Hai tuần một lần", |
||||
"Monthly" => "Hàng tháng", |
||||
"Yearly" => "Hàng năm", |
||||
"never" => "không thay đổi", |
||||
"by occurrences" => "bởi xuất hiện", |
||||
"by date" => "bởi ngày", |
||||
"by monthday" => "bởi ngày trong tháng", |
||||
"by weekday" => "bởi ngày trong tuần", |
||||
"Monday" => "Thứ 2", |
||||
"Tuesday" => "Thứ 3", |
||||
"Wednesday" => "Thứ 4", |
||||
"Thursday" => "Thứ 5", |
||||
"Friday" => "Thứ ", |
||||
"Saturday" => "Thứ 7", |
||||
"Sunday" => "Chủ nhật", |
||||
"events week of month" => "sự kiện trong tuần của tháng", |
||||
"first" => "đầu tiên", |
||||
"second" => "Thứ hai", |
||||
"third" => "Thứ ba", |
||||
"fourth" => "Thứ tư", |
||||
"fifth" => "Thứ năm", |
||||
"January" => "Tháng 1", |
||||
"February" => "Tháng 2", |
||||
"March" => "Tháng 3", |
||||
"April" => "Tháng 4", |
||||
"May" => "Tháng 5", |
||||
"June" => "Tháng 6", |
||||
"July" => "Tháng 7", |
||||
"August" => "Tháng 8", |
||||
"September" => "Tháng 9", |
||||
"October" => "Tháng 10", |
||||
"November" => "Tháng 11", |
||||
"December" => "Tháng 12", |
||||
"by events date" => "Theo ngày tháng sự kiện", |
||||
"by weeknumber(s)" => "số tuần", |
||||
"by day and month" => "ngày, tháng", |
||||
"Date" => "Ngày", |
||||
"Cal." => "Cal.", |
||||
"All day" => "Tất cả các ngày", |
||||
"Title" => "Tiêu đề", |
||||
"From Date" => "Từ ngày", |
||||
"From Time" => "Từ thời gian", |
||||
"To Date" => "Tới ngày", |
||||
"To Time" => "Tới thời gian", |
||||
"The event ends before it starts" => "Sự kiện này kết thúc trước khi nó bắt đầu", |
||||
"Week" => "Tuần", |
||||
"Month" => "Tháng", |
||||
"List" => "Danh sách", |
||||
"Today" => "Hôm nay", |
||||
"Calendars" => "Lịch", |
||||
"There was a fail, while parsing the file." => "Có một thất bại, trong khi phân tích các tập tin.", |
||||
"Choose active calendars" => "Chọn lịch hoạt động", |
||||
"Your calendars" => "Lịch của bạn", |
||||
"CalDav Link" => "Liên kết CalDav ", |
||||
"Shared calendars" => "Chia sẻ lịch", |
||||
"No shared calendars" => "Không chia sẻ lcihj", |
||||
"Share Calendar" => "Chia sẻ lịch", |
||||
"Download" => "Tải về", |
||||
"Edit" => "Chỉnh sửa", |
||||
"Delete" => "Xóa", |
||||
"shared with you by" => "Chia sẻ bởi", |
||||
"New calendar" => "Lịch mới", |
||||
"Edit calendar" => "sửa Lịch", |
||||
"Displayname" => "Hiển thị tên", |
||||
"Active" => "Kích hoạt", |
||||
"Calendar color" => "Màu lịch", |
||||
"Save" => "Lưu", |
||||
"Submit" => "Submit", |
||||
"Cancel" => "Hủy", |
||||
"Edit an event" => "Sửa sự kiện", |
||||
"Share" => "Chia sẻ", |
||||
"Title of the Event" => "Tên sự kiện", |
||||
"Category" => "Danh mục", |
||||
"All Day Event" => "Sự kiện trong ngày", |
||||
"From" => "Từ", |
||||
"To" => "Tới", |
||||
"Advanced options" => "Tùy chọn nâng cao", |
||||
"Location" => "Nơi", |
||||
"Location of the Event" => "Nơi tổ chức sự kiện", |
||||
"Description" => "Mô tả", |
||||
"Description of the Event" => "Mô tả sự kiện", |
||||
"Repeat" => "Lặp lại", |
||||
"Advanced" => "Nâng cao", |
||||
"Select weekdays" => "Chọn ngày trong tuần", |
||||
"Select days" => "Chọn ngày", |
||||
"and the events day of year." => "và sự kiện của ngày trong năm", |
||||
"and the events day of month." => "và sự kiện của một ngày trong năm", |
||||
"Select months" => "Chọn tháng", |
||||
"Select weeks" => "Chọn tuần", |
||||
"and the events week of year." => "và sự kiện của tuần trong năm.", |
||||
"create a new calendar" => "Tạo lịch mới", |
||||
"Name of new calendar" => "Tên lịch mới", |
||||
"Close Dialog" => "Đóng hộp thoại", |
||||
"Create a new event" => "Tạo một sự kiện mới", |
||||
"View an event" => "Xem một sự kiện", |
||||
"No categories selected" => "Không danh sách nào được chọn", |
||||
"of" => "của", |
||||
"at" => "tại", |
||||
"Timezone" => "Múi giờ", |
||||
"Check always for changes of the timezone" => "Luôn kiểm tra múi giờ", |
||||
"24h" => "24h", |
||||
"12h" => "12h" |
||||
); |
||||
@ -0,0 +1,48 @@ |
||||
<?php $TRANSLATIONS = array( |
||||
"element name is not set." => "tên phần tử không được thiết lập.", |
||||
"id is not set." => "id không được thiết lập.", |
||||
"No ID provided" => "Không có ID được cung cấp", |
||||
"No address books found." => "Không tìm thấy sổ địa chỉ.", |
||||
"No contacts found." => "Không tìm thấy danh sách", |
||||
"Missing ID" => "Missing ID", |
||||
"Error reading contact photo." => "Lỗi đọc liên lạc hình ảnh.", |
||||
"The loading photo is not valid." => "Các hình ảnh tải không hợp lệ.", |
||||
"File doesn't exist:" => "Tập tin không tồn tại", |
||||
"Error loading image." => "Lỗi khi tải hình ảnh.", |
||||
"Error uploading contacts to storage." => "Lỗi tải lên danh sách địa chỉ để lưu trữ.", |
||||
"There is no error, the file uploaded with success" => "Không có lỗi, các tập tin tải lên thành công", |
||||
"Contacts" => "Liên lạc", |
||||
"Contact" => "Danh sách", |
||||
"Address" => "Địa chỉ", |
||||
"Telephone" => "Điện thoại bàn", |
||||
"Email" => "Email", |
||||
"Organization" => "Tổ chức", |
||||
"Work" => "Công việc", |
||||
"Home" => "Nhà", |
||||
"Mobile" => "Di động", |
||||
"Fax" => "Fax", |
||||
"Video" => "Video", |
||||
"Pager" => "số trang", |
||||
"Birthday" => "Ngày sinh nhật", |
||||
"Add Contact" => "Thêm liên lạc", |
||||
"Addressbooks" => "Sổ địa chỉ", |
||||
"CardDav Link" => "CardDav Link", |
||||
"Download" => "Tải về", |
||||
"Edit" => "Sửa", |
||||
"Delete" => "Xóa", |
||||
"Phone" => "Điện thoại", |
||||
"Delete contact" => "Xóa liên lạc", |
||||
"PO Box" => "Hòm thư bưu điện", |
||||
"City" => "Thành phố", |
||||
"Region" => "Vùng/miền", |
||||
"Zipcode" => "Mã bưu điện", |
||||
"Country" => "Quốc gia", |
||||
"Addressbook" => "Sổ địa chỉ", |
||||
"New Addressbook" => "Sổ địa chỉ mới", |
||||
"Edit Addressbook" => "Sửa sổ địa chỉ", |
||||
"Displayname" => "Hiển thị tên", |
||||
"Active" => "Kích hoạt", |
||||
"Save" => "Lưu", |
||||
"Submit" => "Submit", |
||||
"Cancel" => "Hủy" |
||||
); |
||||
@ -0,0 +1,21 @@ |
||||
<?php $TRANSLATIONS = array( |
||||
"Files" => "Faili", |
||||
"Unshare" => "Pārtraukt līdzdalīšanu", |
||||
"Delete" => "Izdzēst", |
||||
"Upload Error" => "Augšuplādēšanas laikā radās kļūda", |
||||
"Pending" => "Gaida savu kārtu", |
||||
"Upload cancelled." => "Augšuplāde ir atcelta", |
||||
"Invalid name, '/' is not allowed." => "Šis simbols '/', nav atļauts.", |
||||
"Size" => "Izmērs", |
||||
"Modified" => "Izmainīts", |
||||
"folder" => "mape", |
||||
"folders" => "mapes", |
||||
"file" => "fails", |
||||
"files" => "faili", |
||||
"Maximum upload size" => "Maksimālais failu augšuplādes apjoms", |
||||
"Upload" => "Augšuplādet", |
||||
"Nothing in here. Upload something!" => "Te vēl nekas nav. Rīkojies, sāc augšuplādēt", |
||||
"Name" => "Nosaukums", |
||||
"Download" => "Lejuplādēt", |
||||
"Upload too large" => "Fails ir par lielu lai to augšuplādetu" |
||||
); |
||||
@ -0,0 +1,31 @@ |
||||
<?php $TRANSLATIONS = array( |
||||
"Files" => "Tập tin", |
||||
"Delete" => "Xóa", |
||||
"Upload Error" => "Tải lên lỗi", |
||||
"Pending" => "Chờ", |
||||
"Upload cancelled." => "Hủy tải lên", |
||||
"Invalid name, '/' is not allowed." => "Tên không hợp lệ ,không được phép dùng '/'", |
||||
"Size" => "Kích cỡ", |
||||
"Modified" => "Thay đổi", |
||||
"folder" => "folder", |
||||
"folders" => "folders", |
||||
"file" => "file", |
||||
"files" => "files", |
||||
"File handling" => "Xử lý tập tin", |
||||
"Maximum upload size" => "Kích thước tối đa ", |
||||
"Enable ZIP-download" => "Cho phép ZIP-download", |
||||
"0 is unlimited" => "0 là không giới hạn", |
||||
"Maximum input size for ZIP files" => "Kích thước tối đa cho các tập tin ZIP", |
||||
"New" => "Mới", |
||||
"Text file" => "Tập tin văn bản", |
||||
"Folder" => "Folder", |
||||
"From url" => "Từ url", |
||||
"Upload" => "Tải lên", |
||||
"Cancel upload" => "Hủy upload", |
||||
"Nothing in here. Upload something!" => "Không có gì ở đây .Hãy tải lên một cái gì đó !", |
||||
"Name" => "Tên", |
||||
"Share" => "Chia sẻ", |
||||
"Download" => "Tải xuống", |
||||
"Upload too large" => "File tải lên quá lớn", |
||||
"Files are being scanned, please wait." => "Tập tin đang được quét ,vui lòng chờ." |
||||
); |
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,375 @@ |
||||
OC.Share={ |
||||
icons:[], |
||||
itemUsers:[], |
||||
itemGroups:[], |
||||
itemPrivateLink:false, |
||||
usersAndGroups:[], |
||||
loadIcons:function() { |
||||
// Cache all icons for shared files
|
||||
$.getJSON(OC.filePath('files_sharing', 'ajax', 'getstatuses.php'), function(result) { |
||||
if (result && result.status === 'success') { |
||||
$.each(result.data, function(item, hasPrivateLink) { |
||||
if (hasPrivateLink) { |
||||
OC.Share.icons[item] = OC.imagePath('core', 'actions/public'); |
||||
} else { |
||||
OC.Share.icons[item] = OC.imagePath('core', 'actions/shared'); |
||||
} |
||||
}); |
||||
} |
||||
}); |
||||
}, |
||||
loadItem:function(item) { |
||||
$.ajax({type: 'GET', url: OC.filePath('files_sharing', 'ajax', 'getitem.php'), data: { item: item }, async: false, success: function(result) { |
||||
if (result && result.status === 'success') { |
||||
var item = result.data; |
||||
OC.Share.itemUsers = item.users; |
||||
OC.Share.itemGroups = item.groups; |
||||
OC.Share.itemPrivateLink = item.privateLink; |
||||
} |
||||
}}); |
||||
}, |
||||
share:function(source, uid_shared_with, permissions, callback) { |
||||
$.post(OC.filePath('files_sharing', 'ajax', 'share.php'), { sources: source, uid_shared_with: uid_shared_with, permissions: permissions }, function(result) { |
||||
if (result && result.status === 'success') { |
||||
if (callback) { |
||||
callback(result.data); |
||||
} |
||||
} else { |
||||
OC.dialogs.alert(result.data.message, 'Error while sharing'); |
||||
} |
||||
}); |
||||
}, |
||||
unshare:function(source, uid_shared_with, callback) { |
||||
$.post(OC.filePath('files_sharing', 'ajax', 'unshare.php'), { source: source, uid_shared_with: uid_shared_with }, function(result) { |
||||
if (result && result.status === 'success') { |
||||
if (callback) { |
||||
callback(); |
||||
} |
||||
} else { |
||||
OC.dialogs.alert('Error', 'Error while unsharing'); |
||||
} |
||||
}); |
||||
}, |
||||
changePermissions:function(source, uid_shared_with, permissions) { |
||||
$.post(OC.filePath('files_sharing','ajax','setpermissions.php'), { source: source, uid_shared_with: uid_shared_with, permissions: permissions }, function(result) { |
||||
if (!result || result.status !== 'success') { |
||||
OC.dialogs.alert('Error', 'Error while changing permissions'); |
||||
} |
||||
}); |
||||
}, |
||||
showDropDown:function(item, appendTo) { |
||||
OC.Share.loadItem(item); |
||||
var html = '<div id="dropdown" class="drop" data-item="'+item+'">'; |
||||
html += '<select data-placeholder="User or Group" id="share_with" class="chzen-select">'; |
||||
html += '<option value="" selected="selected" disabled="disabled">Your groups & members</option>'; |
||||
html += '</select>'; |
||||
html += '<div id="sharedWithList">'; |
||||
html += '<ul id="userList"></ul>'; |
||||
html += '<div id="groups" style="display:none;">'; |
||||
html += '<br />'; |
||||
html += 'Groups: '; |
||||
html += '<ul id="groupList"></ul>'; |
||||
html += '</div>'; |
||||
html += '</div>'; |
||||
html += '<div id="privateLink">'; |
||||
html += '<input type="checkbox" name="privateLinkCheckbox" id="privateLinkCheckbox" value="1" /><label for="privateLinkCheckbox">Share with private link</label>'; |
||||
html += '<br />'; |
||||
html += '<form id="emailPrivateLink">'; |
||||
html += '<input id="privateLinkText" style="display:none; width:90%;" />'; |
||||
html += '<input id="email" style="display:none; width:65%;" value="" placeholder="Email link to person" />'; |
||||
html += '<input id="emailButton" style="display:none;" type="submit" value="Send" />'; |
||||
html += '</form>'; |
||||
html += '</div>'; |
||||
$(html).appendTo(appendTo); |
||||
if (OC.Share.usersAndGroups.length < 1) { |
||||
$.ajax({type: 'GET', url: OC.filePath('files_sharing', 'ajax', 'userautocomplete.php'), async: false, success: function(users) { |
||||
if (users) { |
||||
OC.Share.usersAndGroups = users; |
||||
$.each(users, function(index, user) { |
||||
$(user).appendTo('#share_with'); |
||||
}); |
||||
$('#share_with').trigger('liszt:updated'); |
||||
} |
||||
}}); |
||||
} else { |
||||
$.each(OC.Share.usersAndGroups, function(index, user) { |
||||
$(user).appendTo('#share_with'); |
||||
}); |
||||
$('#share_with').trigger('liszt:updated'); |
||||
} |
||||
if (OC.Share.itemUsers) { |
||||
$.each(OC.Share.itemUsers, function(index, user) { |
||||
if (user.parentFolder) { |
||||
OC.Share.addSharedWith(user.uid, user.permissions, false, user.parentFolder); |
||||
} else { |
||||
OC.Share.addSharedWith(user.uid, user.permissions, false, false); |
||||
} |
||||
}); |
||||
} |
||||
if (OC.Share.itemGroups) { |
||||
$.each(OC.Share.itemGroups, function(index, group) { |
||||
if (group.parentFolder) { |
||||
OC.Share.addSharedWith(group.gid, group.permissions, group.users, group.parentFolder); |
||||
} else { |
||||
OC.Share.addSharedWith(group.gid, group.permissions, group.users, false); |
||||
} |
||||
}); |
||||
} |
||||
if (OC.Share.itemPrivateLink) { |
||||
OC.Share.showPrivateLink(item, OC.Share.itemPrivateLink); |
||||
} |
||||
$('#dropdown').show('blind'); |
||||
$('#share_with').chosen(); |
||||
}, |
||||
hideDropDown:function(callback) { |
||||
$('#dropdown').hide('blind', function() { |
||||
$('#dropdown').remove(); |
||||
if (callback) { |
||||
callback.call(); |
||||
} |
||||
}); |
||||
}, |
||||
addSharedWith:function(uid_shared_with, permissions, isGroup, parentFolder) { |
||||
if (parentFolder) { |
||||
var sharedWith = '<li>Parent folder '+parentFolder+' shared with '+uid_shared_with+'</li>'; |
||||
} else { |
||||
var checked = ((permissions > 0) ? 'checked="checked"' : 'style="display:none;"'); |
||||
var style = ((permissions == 0) ? 'style="display:none;"' : ''); |
||||
var sharedWith = '<li data-uid_shared_with="'+uid_shared_with+'">'; |
||||
sharedWith += '<a href="" class="unshare" style="display:none;"><img class="svg" alt="Unshare" src="'+OC.imagePath('core','actions/delete')+'"/></a>'; |
||||
sharedWith += uid_shared_with; |
||||
sharedWith += '<input type="checkbox" name="permissions" id="'+uid_shared_with+'" class="permissions" '+checked+' />'; |
||||
sharedWith += '<label class="edit" for="'+uid_shared_with+'" '+style+'>can edit</label>'; |
||||
sharedWith += '</li>'; |
||||
} |
||||
if (isGroup) { |
||||
// Groups are added to a different list
|
||||
$('#groups').show(); |
||||
$(sharedWith).appendTo('#groupList'); |
||||
// Remove group from select form
|
||||
$('#share_with option[value="'+uid_shared_with+'(group)"]').remove(); |
||||
$('#share_with').trigger('liszt:updated'); |
||||
// Remove users in group from select form
|
||||
$.each(isGroup, function(index, user) { |
||||
$('#share_with option[value="'+user+'"]').remove(); |
||||
$('#share_with').trigger('liszt:updated'); |
||||
}); |
||||
} else { |
||||
$(sharedWith).appendTo('#userList'); |
||||
// Remove user from select form
|
||||
$('#share_with option[value="'+uid_shared_with+'"]').remove(); |
||||
$('#share_with').trigger('liszt:updated'); |
||||
} |
||||
|
||||
}, |
||||
removeSharedWith:function(uid_shared_with) { |
||||
var option; |
||||
if ($('#userList li[data-uid_shared_with="'+uid_shared_with+'"]').length > 0) { |
||||
$('#userList li[data-uid_shared_with="'+uid_shared_with+'"]').remove(); |
||||
option = '<option value="'+uid_shared_with+'">'+uid_shared_with+'</option>'; |
||||
} else if ($('#groupList li[data-uid_shared_with="'+uid_shared_with+'"]').length > 0) { |
||||
$('#groupList li[data-uid_shared_with="'+uid_shared_with+'"]').remove(); |
||||
if ($('#groupList li').length < 1) { |
||||
$('#groups').hide(); |
||||
} |
||||
option = '<option value="'+uid_shared_with+'(group)">'+uid_shared_with+' (group)</option>'; |
||||
} |
||||
$(option).appendTo('#share_with'); |
||||
$('#share_with').trigger('liszt:updated'); |
||||
}, |
||||
showPrivateLink:function(item, token) { |
||||
$('#privateLinkCheckbox').attr('checked', true); |
||||
var link = parent.location.protocol+'//'+location.host+OC.linkTo('', 'public.php')+'?service=files&token='+token; |
||||
if (token.indexOf('&path=') == -1) { |
||||
link += '&file=' + encodeURIComponent(item).replace(/%2F/g, '/'); |
||||
} else { |
||||
// Disable checkbox if inside a shared parent folder
|
||||
$('#privateLinkCheckbox').attr('disabled', 'true'); |
||||
} |
||||
$('#privateLinkText').val(link); |
||||
$('#privateLinkText').show('blind', function() { |
||||
$('#privateLinkText').after('<br id="emailBreak" />'); |
||||
$('#email').show(); |
||||
$('#emailButton').show(); |
||||
}); |
||||
}, |
||||
hidePrivateLink:function() { |
||||
$('#privateLinkText').hide('blind'); |
||||
$('#emailBreak').remove(); |
||||
$('#email').hide(); |
||||
$('#emailButton').hide(); |
||||
}, |
||||
emailPrivateLink:function() { |
||||
var link = $('#privateLinkText').val(); |
||||
var file = link.substr(link.lastIndexOf('/') + 1).replace(/%20/g, ' '); |
||||
var email = $('#email').val(); |
||||
if (email != '') { |
||||
$.post(OC.filePath('files_sharing', 'ajax', 'email.php'), { toaddress: email, link: link, file: file }, function(result) { |
||||
if (result && result.status == 'success') { |
||||
$('#email').css('font-weight', 'bold'); |
||||
$('#email').animate({ fontWeight: 'normal' }, 2000, function() { |
||||
$(this).val(''); |
||||
}).val('Email sent'); |
||||
} else { |
||||
OC.dialogs.alert(result.data.message, 'Error while sharing'); |
||||
} |
||||
}); |
||||
} |
||||
}, |
||||
dirname:function(path) { |
||||
return path.replace(/\\/g,'/').replace(/\/[^\/]*$/, ''); |
||||
} |
||||
} |
||||
|
||||
$(document).ready(function() { |
||||
|
||||
if (typeof FileActions !== 'undefined') { |
||||
OC.Share.loadIcons(); |
||||
FileActions.register('all', 'Share', function(filename) { |
||||
// Return the correct sharing icon
|
||||
if (scanFiles.scanning) { return; } // workaround to prevent additional http request block scanning feedback
|
||||
var item = $('#dir').val() + '/' + filename; |
||||
// Check if icon is in cache
|
||||
if (OC.Share.icons[item]) { |
||||
return OC.Share.icons[item]; |
||||
} else { |
||||
var last = ''; |
||||
var path = OC.Share.dirname(item); |
||||
// Search for possible parent folders that are shared
|
||||
while (path != last) { |
||||
if (OC.Share.icons[path]) { |
||||
OC.Share.icons[item] = OC.Share.icons[path]; |
||||
return OC.Share.icons[item]; |
||||
} |
||||
last = path; |
||||
path = OC.Share.dirname(path); |
||||
} |
||||
OC.Share.icons[item] = OC.imagePath('core', 'actions/share'); |
||||
return OC.Share.icons[item]; |
||||
} |
||||
}, function(filename) { |
||||
var file = $('#dir').val() + '/' + filename; |
||||
var appendTo = $('tr').filterAttr('data-file',filename).find('td.filename'); |
||||
// Check if drop down is already visible for a different file
|
||||
if (($('#dropdown').length > 0)) { |
||||
if (file != $('#dropdown').data('item')) { |
||||
OC.Share.hideDropDown(function () { |
||||
$('tr').removeClass('mouseOver'); |
||||
$('tr').filterAttr('data-file',filename).addClass('mouseOver'); |
||||
OC.Share.showDropDown(file, appendTo); |
||||
}); |
||||
} |
||||
} else { |
||||
$('tr').filterAttr('data-file',filename).addClass('mouseOver'); |
||||
OC.Share.showDropDown(file, appendTo); |
||||
} |
||||
}); |
||||
}; |
||||
|
||||
$(this).click(function(event) { |
||||
if (!($(event.target).hasClass('drop')) && $(event.target).parents().index($('#dropdown')) == -1) { |
||||
if ($('#dropdown').is(':visible')) { |
||||
OC.Share.hideDropDown(function() { |
||||
$('tr').removeClass('mouseOver'); |
||||
}); |
||||
} |
||||
} |
||||
}); |
||||
|
||||
$('#sharedWithList li').live('mouseenter', function(event) { |
||||
// Show permissions and unshare button
|
||||
$(':hidden', this).show(); |
||||
}); |
||||
|
||||
$('#sharedWithList li').live('mouseleave', function(event) { |
||||
// Hide permissions and unshare button
|
||||
$('a', this).hide(); |
||||
if (!$('input:[type=checkbox]', this).is(':checked')) { |
||||
$('input:[type=checkbox]', this).hide(); |
||||
$('label', this).hide(); |
||||
} |
||||
}); |
||||
|
||||
$('#share_with').live('change', function() { |
||||
var item = $('#dropdown').data('item'); |
||||
var uid_shared_with = $(this).val(); |
||||
var pos = uid_shared_with.indexOf('(group)'); |
||||
var isGroup = false; |
||||
if (pos != -1) { |
||||
// Remove '(group)' from uid_shared_with
|
||||
uid_shared_with = uid_shared_with.substr(0, pos); |
||||
isGroup = true; |
||||
} |
||||
OC.Share.share(item, uid_shared_with, 0, function() { |
||||
if (isGroup) { |
||||
// Reload item because we don't know which users are in the group
|
||||
OC.Share.loadItem(item); |
||||
var users; |
||||
$.each(OC.Share.itemGroups, function(index, group) { |
||||
if (group.gid == uid_shared_with) { |
||||
users = group.users; |
||||
} |
||||
}); |
||||
OC.Share.addSharedWith(uid_shared_with, 0, users, false); |
||||
} else { |
||||
OC.Share.addSharedWith(uid_shared_with, 0, false, false); |
||||
} |
||||
// Change icon
|
||||
if (!OC.Share.itemPrivateLink) { |
||||
OC.Share.icons[item] = OC.imagePath('core', 'actions/shared'); |
||||
} |
||||
}); |
||||
}); |
||||
|
||||
$('.unshare').live('click', function() { |
||||
var item = $('#dropdown').data('item'); |
||||
var uid_shared_with = $(this).parent().data('uid_shared_with'); |
||||
OC.Share.unshare(item, uid_shared_with, function() { |
||||
OC.Share.removeSharedWith(uid_shared_with); |
||||
// Reload item to update cached users and groups for the icon check
|
||||
OC.Share.loadItem(item); |
||||
// Change icon
|
||||
if (!OC.Share.itemPrivateLink && !OC.Share.itemUsers && !OC.Share.itemGroups) { |
||||
OC.Share.icons[item] = OC.imagePath('core', 'actions/share'); |
||||
} |
||||
}); |
||||
}); |
||||
|
||||
$('.permissions').live('change', function() { |
||||
var permissions = (this.checked) ? 1 : 0; |
||||
OC.Share.changePermissions($('#dropdown').data('item'), $(this).parent().data('uid_shared_with'), permissions); |
||||
}); |
||||
|
||||
$('#privateLinkCheckbox').live('change', function() { |
||||
var item = $('#dropdown').data('item'); |
||||
if (this.checked) { |
||||
// Create a private link
|
||||
OC.Share.share(item, 'public', 0, function(token) { |
||||
OC.Share.showPrivateLink(item, token); |
||||
// Change icon
|
||||
OC.Share.icons[item] = OC.imagePath('core', 'actions/public'); |
||||
}); |
||||
} else { |
||||
// Delete private link
|
||||
OC.Share.unshare(item, 'public', function() { |
||||
OC.Share.hidePrivateLink(); |
||||
// Change icon
|
||||
if (OC.Share.itemUsers || OC.Share.itemGroups) { |
||||
OC.Share.icons[item] = OC.imagePath('core', 'actions/shared'); |
||||
} else { |
||||
OC.Share.icons[item] = OC.imagePath('core', 'actions/share'); |
||||
} |
||||
}); |
||||
} |
||||
}); |
||||
|
||||
$('#privateLinkText').live('click', function() { |
||||
$(this).focus(); |
||||
$(this).select(); |
||||
}); |
||||
|
||||
$('#emailPrivateLink').live('submit', function(event) { |
||||
event.preventDefault(); |
||||
OC.Share.emailPrivateLink(); |
||||
}); |
||||
}); |
||||
@ -0,0 +1,11 @@ |
||||
<?php $TRANSLATIONS = array( |
||||
"Pictures" => "Hình ảnh", |
||||
"Share gallery" => "Chia sẻ gallery", |
||||
"Error: " => "Lỗi :", |
||||
"Internal error" => "Lỗi nội bộ", |
||||
"Back" => "Trở lại", |
||||
"Remove confirmation" => "Xóa xác nhận", |
||||
"Do you want to remove album" => "Bạn muốn xóa album này ", |
||||
"Change album name" => "Đổi tên album", |
||||
"New album name" => "Tên album mới" |
||||
); |
||||
@ -0,0 +1,14 @@ |
||||
<?php $TRANSLATIONS = array( |
||||
"Music" => "Âm nhạc", |
||||
"Add album to playlist" => "Thêm album vào playlist", |
||||
"Play" => "Play", |
||||
"Pause" => "Tạm dừng", |
||||
"Previous" => "Trang trước", |
||||
"Next" => "Tiếp theo", |
||||
"Mute" => "Tắt", |
||||
"Unmute" => "Bật", |
||||
"Rescan Collection" => "Quét lại bộ sưu tập", |
||||
"Artist" => "Nghệ sỹ", |
||||
"Album" => "Album", |
||||
"Title" => "Tiêu đề" |
||||
); |
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue