Browse Source

Add share Type

Marino Faggiana 8 years ago
parent
commit
121e7e1025

+ 1 - 1
iOSClient/Create/CCCreateCloud.swift

@@ -270,7 +270,7 @@ class CreateFormUploadAssets: XLFormViewController, CCMoveDelegate {
         section = XLFormSectionDescriptor.formSection()
         section = XLFormSectionDescriptor.formSection()
         form.addFormSection(section)
         form.addFormSection(section)
         
         
-        row = XLFormRowDescriptor(tag: "maskFileName", rowType: XLFormRowDescriptorTypeName, title: NSLocalizedString("_filename_", comment: ""))
+        row = XLFormRowDescriptor(tag: "maskFileName", rowType: XLFormRowDescriptorTypeAccount, title: NSLocalizedString("_filename_", comment: ""))
         
         
         let fileNameMask : String = CCUtility.getFileNameMask(keyFileNameMask)
         let fileNameMask : String = CCUtility.getFileNameMask(keyFileNameMask)
         if fileNameMask.characters.count > 0 {
         if fileNameMask.characters.count > 0 {

+ 12 - 3
iOSClient/Share/CCShareUserOC.m

@@ -57,7 +57,7 @@
     [form addFormSection:section];
     [form addFormSection:section];
     section.footerTitle = NSLocalizedString(@"_find_sharee_footer_", nil);
     section.footerTitle = NSLocalizedString(@"_find_sharee_footer_", nil);
     
     
-    row = [XLFormRowDescriptor formRowDescriptorWithTag:@"findUser" rowType:XLFormRowDescriptorTypeName];
+    row = [XLFormRowDescriptor formRowDescriptorWithTag:@"findUser" rowType:XLFormRowDescriptorTypeAccount];
     [row.cellConfigAtConfigure setObject:NSLocalizedString(@"_find_sharee_", nil) forKey:@"textField.placeholder"];
     [row.cellConfigAtConfigure setObject:NSLocalizedString(@"_find_sharee_", nil) forKey:@"textField.placeholder"];
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textField.font"];
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textField.font"];
     [section addFormRow:row];
     [section addFormRow:row];
@@ -69,11 +69,19 @@
     [form addFormSection:section];
     [form addFormSection:section];
     section.footerTitle = NSLocalizedString(@"_direct_sharee_footer_", nil);
     section.footerTitle = NSLocalizedString(@"_direct_sharee_footer_", nil);
     
     
-    row = [XLFormRowDescriptor formRowDescriptorWithTag:@"directUser" rowType:XLFormRowDescriptorTypeName];
+    row = [XLFormRowDescriptor formRowDescriptorWithTag:@"directUser" rowType:XLFormRowDescriptorTypeAccount];
     [row.cellConfigAtConfigure setObject:NSLocalizedString(@"_direct_sharee_", nil) forKey:@"textField.placeholder"];
     [row.cellConfigAtConfigure setObject:NSLocalizedString(@"_direct_sharee_", nil) forKey:@"textField.placeholder"];
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textField.font"];
     [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textField.font"];
     [section addFormRow:row];
     [section addFormRow:row];
     
     
+    section = [XLFormSectionDescriptor formSectionWithTitle:NSLocalizedString(@"_share_type_title_", nil)];
+    [form addFormSection:section];
+    
+    row = [XLFormRowDescriptor formRowDescriptorWithTag:@"pickerAccount" rowType:XLFormRowDescriptorTypePicker];
+    row.selectorOptions = @[NSLocalizedString(@"_share_type_user_", nil), NSLocalizedString(@"_share_type_group_", nil), NSLocalizedString(@"_share_type_remote_", nil)];
+    row.value = NSLocalizedString(@"_share_type_user_", nil);
+    [section addFormRow:row];
+
     section = [XLFormSectionDescriptor formSection];
     section = [XLFormSectionDescriptor formSection];
     [form addFormSection:section];
     [form addFormSection:section];
     
     
@@ -121,7 +129,8 @@
     
     
         if ([self.directUser length] > 0 && [self.directUser isEqualToString:app.activeUser] == NO) {
         if ([self.directUser length] > 0 && [self.directUser isEqualToString:app.activeUser] == NO) {
         
         
-            [self.delegate shareUserAndGroup:self.directUser shareeType:0 permission:permission];
+            // User/Group/Federate
+            [self.delegate shareUserAndGroup:self.directUser shareeType:shareTypeRemote permission:permission];
         }
         }
     }
     }
     
     

+ 4 - 0
iOSClient/en.lproj/Localizable.strings

@@ -430,6 +430,10 @@
 "_direct_sharee_footer_"        = "If you already know the name of the user enter it and press 'Done' to confirm";
 "_direct_sharee_footer_"        = "If you already know the name of the user enter it and press 'Done' to confirm";
 "_direct_sharee_"               = "Enter the username ...";
 "_direct_sharee_"               = "Enter the username ...";
 "_user_sharee_footer_"          = "Tap for change privileges";
 "_user_sharee_footer_"          = "Tap for change privileges";
+"_share_type_title_"            = "Type of share";
+"_share_type_user_"             = "User";
+"_share_type_group_"            = "Group";
+"_share_type_remote_"           = "Remote";
 
 
 // Share Permission
 // Share Permission