Skip to content

Commit

Permalink
Added edit management company
Browse files Browse the repository at this point in the history
  • Loading branch information
Maher Hawash committed Apr 10, 2012
1 parent c582f6d commit 1662bf2
Show file tree
Hide file tree
Showing 28 changed files with 1,035 additions and 24 deletions.
7 changes: 4 additions & 3 deletions Hometastic/Hometastic/Content/Home.css
Expand Up @@ -156,8 +156,6 @@ width:30%;
{
display: block;
float: left;
padding-right: 1em;
margin-top: 1em;
}

#main-body div span:last-child
Expand Down Expand Up @@ -401,4 +399,7 @@ h2 { color: #C60; font-size: 1.3m; font-weight: bold; padding-top: 1em; }
width: 42%;
border-left: 2px solid #ECF5FC;
padding-left: 1em;
}
}

.edit .field textarea {width: 80%; height: 8em; margin-bottom: 1em; display: block; clear: both;}
.edit .field label {font-weight: bolder; font-size: larger; margin-bottom: 0.5em;}
565 changes: 565 additions & 0 deletions Hometastic/Hometastic/Content/jquery-ui-1.8.18.custom.css

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions Hometastic/Hometastic/Controllers/ManagementCompanyController.vb
Expand Up @@ -9,7 +9,7 @@ Namespace Hometastic

Sub SetupMenu()
ViewBag.Menu = {({"My Account", "/ManagementCompany/Index"}),
({"Manage Site", "/ManagementCompany/Manage"}),
({"Manage Site", "/ManagementCompany/Edit"}),
({"News", "/ManagementCompany/News"}),
({"Q&A", "/ManagementCompany/Survey"})
}
Expand Down Expand Up @@ -56,15 +56,17 @@ Namespace Hometastic
'
' GET: /ManagementCompany/Edit/5

Function Edit(ByVal id As Integer) As ActionResult
Return View()
Function Edit() As ActionResult
Account.Authenticate("6400", "pmsi", "", "ManagementCompany")
SetupMenu()
Return View(CurrentUser)
End Function

'
' POST: /ManagementCompany/Edit/5

<HttpPost()> _
Function Edit(ByVal id As Integer, ByVal collection As FormCollection) As ActionResult
Function Edit(ByVal collection As FormCollection) As ActionResult
Try
' TODO: Add update logic here

Expand Down
11 changes: 6 additions & 5 deletions Hometastic/Hometastic/Global.asax.vb
Expand Up @@ -7,10 +7,10 @@ Public Class MvcApplication

Shared Sub RegisterGlobalFilters(ByVal filters As GlobalFilterCollection)
filters.Add(New HandleErrorAttribute())
Dim provider As New ActionFilterProvider
provider.Add("ManagementCompany", "*", New ManagementUserFilter)
provider.Add("Hoa", "*", New HoaUserFilter)
FilterProviders.Providers.Add(provider)
'Dim provider As New ActionFilterProvider
'provider.Add("ManagementCompany", "*", New ManagementUserFilter)
'provider.Add("Hoa", "*", New HoaUserFilter)
'FilterProviders.Providers.Add(provider)

End Sub

Expand All @@ -25,7 +25,8 @@ Public Class MvcApplication
' (1) Route name
' (2) URL with parameters
' (3) Parameter defaults
routes.MapRoute("LogOn", "", New With {.controller = "Home", .action = "LogOn", .path = UrlParameter.Optional})
'routes.MapRoute("LogOn", "", New With {.controller = "Home", .action = "LogOn", .path = UrlParameter.Optional})
routes.MapRoute("LogOn", "", New With {.controller = "ManagementCompany", .action = "Edit", .path = UrlParameter.Optional})
MapResource("ManagementCompany")
MapResource("Hoa")
MapResource("Vendor")
Expand Down
8 changes: 7 additions & 1 deletion Hometastic/Hometastic/Hometastic.vbproj
Expand Up @@ -163,6 +163,7 @@
<Content Include="Content\flash\success.png" />
<Content Include="Content\flash\warning.png" />
<Content Include="Content\Fonts.css" />
<Content Include="Content\jquery-ui-1.8.18.custom.css" />
<Content Include="Content\jquery-ui-1.8.4.custom.css" />
<Content Include="Content\jquery.dataTables_themeroller.css" />
<Content Include="Content\themes\base\images\ui-bg_flat_0_aaaaaa_40x100.png" />
Expand Down Expand Up @@ -193,7 +194,10 @@
<Content Include="Content\themes\base\jquery.ui.tabs.css" />
<Content Include="Content\themes\base\jquery.ui.theme.css" />
<Content Include="packages.config" />
<Content Include="Scripts\jquery-ui-1.8.18.custom.min.js" />
<Content Include="Scripts\jquery-ui-1.8.18.min.js" />
<Content Include="Views\ManagementCompany\Index.vbhtml" />
<Content Include="Views\ManagementCompany\_edit_introduction.vbhtml" />
<Content Include="Views\Shared\_Menu.vbhtml" />
<Content Include="Views\Home\ContactUs.vbhtml" />
<Content Include="Views\Home\_Left.vbhtml" />
Expand All @@ -211,6 +215,8 @@
<Content Include="Views\Shared\_ManagementCompanyLayout.vbhtml" />
<Content Include="Views\Hoa\Index.vbhtml" />
<Content Include="Views\Hoa\Edit.vbhtml" />
<Content Include="Views\ManagementCompany\Edit.vbhtml" />
<Content Include="Views\ManagementCompany\_edit_contact_info.vbhtml" />
<None Include="Views\Shared\Flash.vbhtml" />
<Content Include="Views\Shared\_Layout.vbhtml" />
<Content Include="Views\Vendor\Edit.vbhtml" />
Expand Down Expand Up @@ -281,7 +287,7 @@
<WebProjectProperties>
<UseIIS>False</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>56591</DevelopmentServerPort>
<DevelopmentServerPort>61287</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>
</IISUrl>
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions Hometastic/Hometastic/Models/MVNetBase.vb
Expand Up @@ -36,14 +36,18 @@ Namespace Models
End If
End Sub

Function Value(ByVal key As Integer) As String
Function Value(ByVal key As String) As String
Try
Return m_mvItem(m_ColumnNamesList(key))
Return m_mvItem(key)
Catch ex As Exception
Return Nothing
End Try
End Function

Function Value(ByVal key As Integer) As String
Return Value(m_ColumnNamesList(key))
End Function

Function Valid()
Return m_Valid
End Function
Expand Down
356 changes: 356 additions & 0 deletions Hometastic/Hometastic/Scripts/jquery-ui-1.8.18.custom.min.js

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions Hometastic/Hometastic/Views/Home/MgmtCompany.vbhtml
@@ -1,8 +1,4 @@
@Code
ViewData("Title") = "Hoa"
Layout = "~/Views/Shared/_Layout.vbhtml"
End Code
@Code
ViewData("Title") = "Services"
Layout = "~/Views/Shared/_Layout.vbhtml"
End Code
Expand Down
4 changes: 0 additions & 4 deletions Hometastic/Hometastic/Views/Home/Vendors.vbhtml
@@ -1,8 +1,4 @@
@Code
ViewData("Title") = "Hoa"
Layout = "~/Views/Shared/_Layout.vbhtml"
End Code
@Code
ViewData("Title") = "Services"
Layout = "~/Views/Shared/_Layout.vbhtml"
End Code
Expand Down
35 changes: 35 additions & 0 deletions Hometastic/Hometastic/Views/ManagementCompany/Edit.vbhtml
@@ -0,0 +1,35 @@
@ModelType Hometastic.Models.ManagementCompanyUser
@Code
ViewData("Title") = "Manage Company Site"
Layout = "~/Views/Shared/_ManagementCompanyLayout.vbhtml"
End Code

@Section JavaScript
<script type="text/javascript">
$(function () {
var icons = {
header: "ui-icon-circle-arrow-e",
headerSelected: "ui-icon-circle-arrow-s"
};
$("#accordion").accordion({
icons: icons
});

$('#accordion').click(function () {
$(this).next().toggle('slow');
return false;
}).next().hide();
});
</script>
End Section

<div id="main-body">
<p>
</p>
<div id="accordion">
<h3><a href="#">Introduction & About Us</a></h3>
@Html.Partial("_edit_introduction")
<h3> <a href="#">Contact Information</a></h3>
@Html.Partial("_edit_contact_info")
</div>
</div>
@@ -0,0 +1,28 @@
@ModelType Hometastic.Models.ManagementCompanyUser
<div>
<p>
This tools lets you enter the text that will be shown on the frontpage of your web
site (Introduction) and on the page with your management company information (About
Us).
</p>
<div class="management_company edit">
@Using Html.BeginForm()
Dim items = {({"Address 1", "CONTACTADDR1"}), _
({"Address 2", "CONTACTADDR2"}), _
({"City", "CCITY"}), _
({"State", "CST"}), _
({"Zip", "CONTACTZIPCODE"}), _
({"Contact E-Mail", "CONTACTEMAIL"}), _
({"Webmaster E-Mail", "WEBMASTEREMAIL"}), _
({"Phone", "CONTACTPHONE"}), _
({"Fax", "MGMTCOFAX"})
}
For Each item As String() In items
@<div class="field">
@Html.Label(item(0))
@Html.TextBox(item(1), Model.Value(item(1)))
</div>
Next
End Using
</div>
</div>
@@ -0,0 +1,20 @@
@ModelType Hometastic.Models.ManagementCompanyUser
<div>
<p>
This tools lets you enter the text that will be shown on the frontpage of your web
site (Introduction) and on the page with your management company information (About
Us).
</p>
@Using Html.BeginForm()
@<div class="management_company edit">
<div class="field">
@Html.Label("Introduction")
@Html.TextArea("TEXTINTRO", Model.Value("TEXTINTRO"))
</div>
<div class="field">
@Html.Label("About Us")
@Html.TextArea("TEXTIABOUT", Model.Value("TEXTABOUT"))
</div>
</div>
End Using
</div>
Expand Up @@ -7,8 +7,9 @@
<link href="@Url.Content("~/Content/demo_page.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/demo_table_jui.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/jquery.dataTables_themeroller.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/jquery-ui-1.8.4.custom.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/jquery-ui-1.8.18.custom.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/jquery-1.7.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery-ui-1.8.18.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.dataTables.js")" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
Expand Down

0 comments on commit 1662bf2

Please sign in to comment.