[ios] Added operator.

This commit is contained in:
VladiMihaylenko 2016-04-14 15:08:50 +03:00
parent 0c0e027274
commit a39136faf2
2 changed files with 16 additions and 1 deletions

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:
@ -337,6 +340,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 +578,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,