Merge pull request #2892 from VladiMihaylenko/master

[ios] Operator
This commit is contained in:
Alex Zolotarev 2016-04-14 19:28:37 +04:00
commit fdb70b9330
40 changed files with 133 additions and 7 deletions

View file

@ -834,4 +834,5 @@
<string name="error_enter_correct_storey_number">Редактируйте здания высотой максимум %1$s этажей.</string>
<string name="editor_zip_code">Почтовый индекс</string>
<string name="error_enter_correct_zip_code">Введите корректный почтовый индекс</string>
<string name="editor_operator">Владелец</string>
</resources>

View file

@ -836,4 +836,5 @@
<string name="error_enter_correct_house_number">Enter correct house number</string>
<string name="editor_zip_code">ZIP Code</string>
<string name="error_enter_correct_zip_code">Enter correct ZIP Code</string>
<string name="editor_operator">Operator</string>
</resources>

View file

@ -52,6 +52,7 @@ MWMPlacePageCellTypeValueMap const kCellType2ReuseIdentifier{
{MWMPlacePageCellTypePhoneNumber, "MWMEditorTextTableViewCell"},
{MWMPlacePageCellTypeWebsite, "MWMEditorTextTableViewCell"},
{MWMPlacePageCellTypeEmail, "MWMEditorTextTableViewCell"},
{MWMPlacePageCellTypeOperator, "MWMEditorTextTableViewCell"},
{MWMPlacePageCellTypeCuisine, "MWMEditorSelectTableViewCell"},
{MWMPlacePageCellTypeWiFi, "MWMEditorSwitchTableViewCell"}};
@ -86,13 +87,15 @@ vector<MWMPlacePageCellType> cellsForProperties(vector<osm::Props> const & props
case Props::Cuisine:
res.push_back(MWMPlacePageCellTypeCuisine);
break;
case Props::Operator:
res.push_back(MWMPlacePageCellTypeOperator);
break;
case Props::Internet:
res.push_back(MWMPlacePageCellTypeWiFi);
break;
case Props::Wikipedia:
case Props::Fax:
case Props::Stars:
case Props::Operator:
case Props::Elevation:
case Props::Flats:
case Props::BuildingLevels:
@ -251,12 +254,10 @@ void registerCellsForTableView(vector<MWMPlacePageCellType> const & cells, UITab
self.offscreenCells = [NSMutableDictionary dictionary];
self.invalidCells = [NSMutableArray array];
if (self.isCreating)
{
m_sections.push_back(MWMEditorSectionCategory);
m_cells[MWMEditorSectionCategory] = kSectionCategoryCellTypes;
registerCellsForTableView(kSectionCategoryCellTypes, self.tableView);
}
m_sections.push_back(MWMEditorSectionCategory);
m_cells[MWMEditorSectionCategory] = kSectionCategoryCellTypes;
registerCellsForTableView(kSectionCategoryCellTypes, self.tableView);
if (m_mapObject.IsNameEditable())
{
m_sections.push_back(MWMEditorSectionName);
@ -337,6 +338,16 @@ void registerCellsForTableView(vector<MWMPlacePageCellType> const & cells, UITab
keyboardType:UIKeyboardTypeEmailAddress];
break;
}
case MWMPlacePageCellTypeOperator:
{
MWMEditorTextTableViewCell * tCell = static_cast<MWMEditorTextTableViewCell *>(cell);
[tCell configWithDelegate:self
icon:[UIImage imageNamed:@"ic_operator"]
text:@(m_mapObject.GetOperator().c_str())
placeholder:L(@"editor_operator")
keyboardType:UIKeyboardTypeEmailAddress];
break;
}
case MWMPlacePageCellTypeOpenHours:
{
MWMPlacePageOpeningHoursCell * tCell = (MWMPlacePageOpeningHoursCell *)cell;
@ -565,6 +576,7 @@ void registerCellsForTableView(vector<MWMPlacePageCellType> const & cells, UITab
case MWMPlacePageCellTypePhoneNumber: m_mapObject.SetPhone(val); break;
case MWMPlacePageCellTypeWebsite: m_mapObject.SetWebsite(val); break;
case MWMPlacePageCellTypeEmail: m_mapObject.SetEmail(val); break;
case MWMPlacePageCellTypeOperator: m_mapObject.SetOperator(val); break;
case MWMPlacePageCellTypeBuilding:
m_mapObject.SetHouseNumber(val);
if (!osm::EditableMapObject::ValidateHouseNumber(val))

View file

@ -9,6 +9,7 @@ typedef NS_ENUM(NSUInteger, MWMPlacePageCellType)
MWMPlacePageCellTypeWebsite,
MWMPlacePageCellTypeURL,
MWMPlacePageCellTypeEmail,
MWMPlacePageCellTypeOperator,
MWMPlacePageCellTypeOpenHours,
MWMPlacePageCellTypeWiFi,
MWMPlacePageCellTypeCoordinate,

View file

@ -0,0 +1,26 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_info.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_info@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_info@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 513 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 780 B

View file

@ -0,0 +1,26 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_operator.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_operator@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_operator@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 B

View file

@ -1379,3 +1379,5 @@
"editor_zip_code" = "ZIP Code";
"error_enter_correct_zip_code" = "Enter correct ZIP Code";
"editor_operator" = "Operator";

View file

@ -1379,3 +1379,5 @@
"editor_zip_code" = "ZIP Code";
"error_enter_correct_zip_code" = "Enter correct ZIP Code";
"editor_operator" = "Operator";

View file

@ -1379,3 +1379,5 @@
"editor_zip_code" = "ZIP Code";
"error_enter_correct_zip_code" = "Enter correct ZIP Code";
"editor_operator" = "Operator";

View file

@ -1379,3 +1379,5 @@
"editor_zip_code" = "ZIP Code";
"error_enter_correct_zip_code" = "Enter correct ZIP Code";
"editor_operator" = "Operator";

View file

@ -1379,3 +1379,5 @@
"editor_zip_code" = "ZIP Code";
"error_enter_correct_zip_code" = "Enter correct ZIP Code";
"editor_operator" = "Operator";

View file

@ -1379,3 +1379,5 @@
"editor_zip_code" = "ZIP Code";
"error_enter_correct_zip_code" = "Enter correct ZIP Code";
"editor_operator" = "Operator";

View file

@ -1379,3 +1379,5 @@
"editor_zip_code" = "ZIP Code";
"error_enter_correct_zip_code" = "Enter correct ZIP Code";
"editor_operator" = "Operator";

View file

@ -1379,3 +1379,5 @@
"editor_zip_code" = "ZIP Code";
"error_enter_correct_zip_code" = "Enter correct ZIP Code";
"editor_operator" = "Operator";

View file

@ -1379,3 +1379,5 @@
"editor_zip_code" = "ZIP Code";
"error_enter_correct_zip_code" = "Enter correct ZIP Code";
"editor_operator" = "Operator";

View file

@ -1379,3 +1379,5 @@
"editor_zip_code" = "ZIP Code";
"error_enter_correct_zip_code" = "Enter correct ZIP Code";
"editor_operator" = "Operator";

View file

@ -1379,3 +1379,5 @@
"editor_zip_code" = "ZIP Code";
"error_enter_correct_zip_code" = "Enter correct ZIP Code";
"editor_operator" = "Operator";

View file

@ -1379,3 +1379,5 @@
"editor_zip_code" = "ZIP Code";
"error_enter_correct_zip_code" = "Enter correct ZIP Code";
"editor_operator" = "Operator";

View file

@ -1379,3 +1379,5 @@
"editor_zip_code" = "ZIP Code";
"error_enter_correct_zip_code" = "Enter correct ZIP Code";
"editor_operator" = "Operator";

View file

@ -1379,3 +1379,5 @@
"editor_zip_code" = "ZIP Code";
"error_enter_correct_zip_code" = "Enter correct ZIP Code";
"editor_operator" = "Operator";

View file

@ -1379,3 +1379,5 @@
"editor_zip_code" = "ZIP Code";
"error_enter_correct_zip_code" = "Enter correct ZIP Code";
"editor_operator" = "Operator";

View file

@ -1379,3 +1379,5 @@
"editor_zip_code" = "ZIP Code";
"error_enter_correct_zip_code" = "Enter correct ZIP Code";
"editor_operator" = "Operator";

View file

@ -1379,3 +1379,5 @@
"editor_zip_code" = "ZIP Code";
"error_enter_correct_zip_code" = "Enter correct ZIP Code";
"editor_operator" = "Operator";

View file

@ -1379,3 +1379,5 @@
"editor_zip_code" = "ZIP Code";
"error_enter_correct_zip_code" = "Enter correct ZIP Code";
"editor_operator" = "Operator";

View file

@ -1381,3 +1381,5 @@
"editor_zip_code" = "Почтовый индекс";
"error_enter_correct_zip_code" = "Введите корректный почтовый индекс";
"editor_operator" = "Владелец";

View file

@ -1379,3 +1379,5 @@
"editor_zip_code" = "ZIP Code";
"error_enter_correct_zip_code" = "Enter correct ZIP Code";
"editor_operator" = "Operator";

View file

@ -1379,3 +1379,5 @@
"editor_zip_code" = "ZIP Code";
"error_enter_correct_zip_code" = "Enter correct ZIP Code";
"editor_operator" = "Operator";

View file

@ -1379,3 +1379,5 @@
"editor_zip_code" = "ZIP Code";
"error_enter_correct_zip_code" = "Enter correct ZIP Code";
"editor_operator" = "Operator";

View file

@ -1379,3 +1379,5 @@
"editor_zip_code" = "ZIP Code";
"error_enter_correct_zip_code" = "Enter correct ZIP Code";
"editor_operator" = "Operator";

View file

@ -1379,3 +1379,5 @@
"editor_zip_code" = "ZIP Code";
"error_enter_correct_zip_code" = "Enter correct ZIP Code";
"editor_operator" = "Operator";

View file

@ -1379,3 +1379,5 @@
"editor_zip_code" = "ZIP Code";
"error_enter_correct_zip_code" = "Enter correct ZIP Code";
"editor_operator" = "Operator";

View file

@ -1379,3 +1379,5 @@
"editor_zip_code" = "ZIP Code";
"error_enter_correct_zip_code" = "Enter correct ZIP Code";
"editor_operator" = "Operator";

View file

@ -1379,3 +1379,5 @@
"editor_zip_code" = "ZIP Code";
"error_enter_correct_zip_code" = "Enter correct ZIP Code";
"editor_operator" = "Operator";

View file

@ -16254,3 +16254,8 @@
tags = ios, android
en = Enter correct ZIP Code
ru = Введите корректный почтовый индекс
[editor_operator]
tags = ios, android
en = Operator
ru = Владелец