Skip to content

Commit b170d59

Browse files
Contact updated to post data, Experience modified
1 parent a2bdf75 commit b170d59

File tree

8 files changed

+81
-112
lines changed

8 files changed

+81
-112
lines changed

app/modules/dashboard/controllers/contact.js

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,31 @@
88
99
===========================================================*/
1010

11-
dashboard.controller("ContactController", ['$rootScope', '$scope', '$state', '$location', 'dashboardService', 'Flash','$http',
11+
dashboard.controller("ContactController", ['$rootScope', '$scope', '$state', '$location', 'dashboardService', 'Flash', '$http',
1212
function ($rootScope, $scope, $state, $location, dashboardService, Flash, $http) {
1313
var vm = this;
1414

1515
vm.message = {};
1616

17-
vm.submitForm=function(){
17+
vm.submitForm = function () {
1818
console.log(vm.message);
1919
var request = $http({
2020
method: "post",
2121
url: "contact.php",
22-
data: {
23-
Name: vm.message.name,
24-
Phone: vm.message.phone,
25-
Email: vm.message.email,
26-
Message: vm.message.message
27-
},
22+
data: vm.message,
2823
headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
2924
});
3025

3126
/* Check whether the HTTP Request is successful or not. */
3227
request.success(function (data) {
3328
console.log(data);
34-
//document.getElementById("message").textContent = "You have login successfully with email " + data;
29+
if (data == "success") {
30+
Flash.create('success', 'Message Sent Succesfully', 'large-text');
31+
vm.message = {};
32+
vm.contactForm.$pristine();
33+
vm.contactForm.$setUntouched();
34+
35+
}
3536
});
3637
};
3738
console.log("coming to Contact controller");

app/modules/dashboard/controllers/skills.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ function ($rootScope, $scope, $state, $location, dashboardService, Flash) {
104104
Software: "Photo Shop",
105105
Percentage: "90",
106106
theme: "maroon",
107-
image: "photoshop",
107+
image: "Photoshop",
108108
progressbar: "blue"
109109
},
110110
{

app/modules/dashboard/views/contact.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ <h1>
2424
Send me a Message
2525
</div>
2626
<div class="panel-body">
27-
<form data-ng-submit="vm.submitForm();">
27+
<form data-ng-submit="vm.submitForm();" name="vm.contactForm">
2828
<md-content class="autoScroll">
2929
<md-input-container class="md-icon-float md-block">
3030
<label>Name</label>

app/modules/dashboard/views/experience.html

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,20 @@ <h1>
3232
<h3 class="timeline-header"><a href="http://kmitsolutions.com" target="_blank">Software Engineer - KMIT Solutions</a></h3>
3333
<div class="timeline-body">
3434
<ul>
35-
<li>
36-
Responsible for creating responsive Web applications and integrating it with the API through angular services
37-
</li>
35+
<li>Developing Web applications</li>
36+
<li>Developing E-Comm sites</li>
37+
<li>Integrating web apps with API</li>
3838
</ul>
3939

4040
</div>
4141
<div class="timeline-footer">
4242
<p>
43-
<span class="label label-danger">UI Design</span>
44-
<span class="label label-success">Coding</span>
45-
<span class="label label-info">Javascript</span>
46-
<span class="label label-warning">PHP</span>
47-
<span class="label label-primary">Node.js</span>
43+
<span class="label label-danger">HTML 5</span>
44+
<span class="label label-success">CSS 3</span>
45+
<span class="label label-info">Angular JS</span>
46+
<span class="label label-warning">Java Script</span>
47+
<span class="label label-primary">Type Script</span>
48+
<span class="label label-success">SAAS</span>
4849
<span class="pull-right">
4950
<a class="btn btn-primary btn-xs" ui-sref="app.recent">View Recent projects</a>
5051
</span>
@@ -64,19 +65,20 @@ <h3 class="timeline-header"><a href="http://kmitsolutions.com" target="_blank">S
6465
<h3 class="timeline-header"><a>Web & Graphic Designer - Premier Group of Companies</a></h3>
6566
<div class="timeline-body">
6667
<ul>
67-
<li>
68-
Responsible for creating responsive Web applications and integrating it with the API through angular services
69-
</li>
68+
<li>Designing Loogo, Visiting Card, Brochures, Flex etc.,</li>
69+
<li>Designing static Websites</li>
70+
<li>Hosting and Domain Management</li>
71+
<li>Did UI Designs and Mockups as a Freelancer</li>
7072
</ul>
7173

7274
</div>
7375
<div class="timeline-footer">
7476
<p>
75-
<span class="label label-danger">UI Design</span>
76-
<span class="label label-success">Coding</span>
77-
<span class="label label-info">Javascript</span>
78-
<span class="label label-warning">PHP</span>
79-
<span class="label label-primary">Node.js</span>
77+
<span class="label label-danger">Photo Shop</span>
78+
<span class="label label-success">Corel Draw</span>
79+
<span class="label label-info">HTML</span>
80+
<span class="label label-warning">CSS</span>
81+
<span class="label label-primary">Bootstrap</span>
8082
<span class="pull-right">
8183
<a class="btn btn-google btn-xs" ui-sref="app.websites">View Websites</a>
8284
<a class="btn btn-facebook btn-xs" ui-sref="app.portfolio">View Portfolio</a>

app/modules/dashboard/views/portfolio.html

Lines changed: 0 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -28,85 +28,8 @@ <h1>
2828
<div class="titleBox">{{portfolio.title}}</div>
2929
</div>
3030
</div>
31-
32-
33-
<div class="gallery-box">
34-
<div class="boxInner">
35-
<img src="http://www.dwuser.com/education/content/creating-responsive-tiled-layout-with-pure-css/images/demo/7.jpg" />
36-
<div class="titleBox">Butterfly</div>
37-
</div>
38-
</div>
39-
<div class="gallery-box">
40-
<div class="boxInner">
41-
<img src="http://www.dwuser.com/education/content/creating-responsive-tiled-layout-with-pure-css/images/demo/1.jpg" />
42-
<div class="titleBox">An old greenhouse</div>
43-
</div>
44-
</div>
45-
<div class="gallery-box">
46-
<div class="boxInner">
47-
<img src="http://www.dwuser.com/education/content/creating-responsive-tiled-layout-with-pure-css/images/demo/2.jpg" />
48-
<div class="titleBox">Purple wildflowers</div>
49-
</div>
50-
</div>
51-
<div class="gallery-box">
52-
<div class="boxInner">
53-
<img src="http://www.dwuser.com/education/content/creating-responsive-tiled-layout-with-pure-css/images/demo/3.jpg" />
54-
<div class="titleBox">A birdfeeder</div>
55-
</div>
56-
</div>
57-
<div class="gallery-box">
58-
<div class="boxInner">
59-
<img src="http://www.dwuser.com/education/content/creating-responsive-tiled-layout-with-pure-css/images/demo/10.jpg" />
60-
<div class="titleBox">Crocus close-up</div>
61-
</div>
62-
</div>
63-
<div class="gallery-box">
64-
<div class="boxInner">
65-
<img src="http://www.dwuser.com/education/content/creating-responsive-tiled-layout-with-pure-css/images/demo/4.jpg" />
66-
<div class="titleBox">The garden shop</div>
67-
</div>
68-
</div>
69-
<div class="gallery-box">
70-
<div class="boxInner">
71-
<img src="http://www.dwuser.com/education/content/creating-responsive-tiled-layout-with-pure-css/images/demo/5.jpg" />
72-
<div class="titleBox">Spring daffodils</div>
73-
</div>
74-
</div>
75-
<div class="gallery-box">
76-
<div class="boxInner">
77-
<img src="http://www.dwuser.com/education/content/creating-responsive-tiled-layout-with-pure-css/images/demo/6.jpg" />
78-
<div class="titleBox">Iris along the path</div>
79-
</div>
80-
</div>
81-
<div class="gallery-box">
82-
<div class="boxInner">
83-
<img src="http://www.dwuser.com/education/content/creating-responsive-tiled-layout-with-pure-css/images/demo/8.jpg" />
84-
<div class="titleBox">The garden blueprint</div>
85-
</div>
86-
</div>
87-
<div class="gallery-box">
88-
<div class="boxInner">
89-
<img src="http://www.dwuser.com/education/content/creating-responsive-tiled-layout-with-pure-css/images/demo/9.jpg" />
90-
<div class="titleBox">The patio</div>
91-
</div>
92-
</div>
93-
<div class="gallery-box">
94-
<div class="boxInner">
95-
<img src="http://www.dwuser.com/education/content/creating-responsive-tiled-layout-with-pure-css/images/demo/11.jpg" />
96-
<div class="titleBox">Bumble bee collecting nectar</div>
97-
</div>
98-
</div>
99-
<div class="gallery-box">
100-
<div class="boxInner">
101-
<img src="http://www.dwuser.com/education/content/creating-responsive-tiled-layout-with-pure-css/images/demo/12.jpg" />
102-
<div class="titleBox">Winding garden path</div>
103-
</div>
104-
</div>
105-
10631
</div>
10732
</div>
108-
109-
11033
</section><!-- /.content -->
11134

11235
<script type="text/javascript">

contact.php

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,49 @@
1-

2-
3-
<?php
1+
<?php
42
/*
53
* Collect all Details from Angular HTTP Request.
64
*/
75
$postdata = file_get_contents("php://input");
86
$request = json_decode($postdata);
7+
8+
$name = $request->name;
9+
$phone = $request->phone;
10+
$email = $request->email;
11+
$message = $request->message;
12+
13+
14+
/* Set e-mail recipient */
15+
$myemail = "ranjithprabhu.k@gmail.com";
16+
17+
18+
$subject="Message From your Dashboard";
19+
/* Let's prepare the message for the e-mail */
20+
$message = "Hello Boss,
21+
22+
You got a message from your Dashboard Site...
23+
24+
Name: $name
25+
26+
Phone: $phone
27+
28+
E-mail: $email
29+
30+
Message: $message
31+
32+
33+
34+
Thank you,
35+
Have a nice day Boss...
36+
37+
38+
End of message
39+
";
40+
41+
/* Send the message using mail() function */
42+
mail($myemail, $subject, $message);
43+
944

10-
@$email = $request->email;
11-
@$pass = $request->pass;
12-
echo 'success'; //this will go back under "data" of angular call.
45+
echo 'success';
46+
//this will go back under "data" of angular call.
1347
/*
1448
* You can use $email and $pass for further work. Such as Database calls.
1549
*/

css/site.css

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,4 +127,13 @@ padding:10px;
127127

128128
.error-template {padding: 40px 15px;text-align: center;}
129129
.error-actions {margin-top:15px;margin-bottom:15px;}
130-
.error-actions .btn { margin-right:10px; }
130+
.error-actions .btn { margin-right:10px; }
131+
132+
133+
.alert{
134+
position: fixed;
135+
top: 50px;
136+
left: 25%;
137+
width: 50%;
138+
z-index: 999999;
139+
}

js/angular-flash.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
app.directive('flashMessage', ['$compile', '$rootScope', function($compile, $rootScope) {
4141
return {
4242
restrict: 'A',
43-
template: '<div role="alert" ng-show="hasFlash" class="alert {{flash.addClass}} alert-{{flash.type}} alert-dismissible ng-hide alertIn alertOut col-md-offset-3 col-md-6 col-md-offset-3"> <span dynamic="flash.text"></span> <button type="button" class="close" close-flash><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button> </div>',
43+
template: '<div role="alert" ng-show="hasFlash" class="alert {{flash.addClass}} alert-{{flash.type}} alert-dismissible ng-hide alertIn alertOut"> <span dynamic="flash.text"></span> <button type="button" class="close" close-flash><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button> </div>',
4444
link: function(scope, ele, attrs) {
4545
// get timeout value from directive attribute and set to flash timeout
4646
$rootScope.flash.timeout = parseInt(attrs.flashMessage, 10);

0 commit comments

Comments
 (0)