forked from selemon/team23-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
testpage_singepage.html
executable file
·141 lines (102 loc) · 3.45 KB
/
testpage_singepage.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<!DOCTYPE html>
<html>
<head>
<title>testing page</title>
<meta name="viewport" intial-scale='1.0', content="user-scalable=no, width=device-width, initial-scale=1">
<!-- <meta name="viewport" intial-scale='1.0', content=""> -->
<link rel="stylesheet" type="text/css" href="css/stylesheet.css">
<!-- local Jquery -->
<script src="js/jquery/jquery.js"></script>
<!-- <script src="js/modernizr.js"></script> -->
<script src="js/hammer.min.js"></script>
<script type="text/javascript">
jQuery(document).on("mobileinit", function() { jQuery.mobile.autoInitializePage = false;
});</script>
<script src="js/jquery/jquery.mobile-1.4.5.min.js"></script>
<script src='js/jquery/jquery-ui.js'></script>
<script src='js/jquery/jquery.ui.touch-punch.min.js'></script>
<!-- local lib and tests -->
<!-- <script src="js/page-script.js"></script> -->
<script src="js/hashtag-cloud.js"></script>
<!-- <script src="js/drawing-script.js"></script> -->
<script src="js/manager.js"></script>
<script src="js/create-page-manager.js"></script>
</head>
<body>
<div id="wrapper">
<div class='navbar'>
<img class='nav-logo' src="img/Logo_Final_Small.png">
<img class="nav-icon-settings" src="img/icons/settings_icon.png">
</div>
<div id ='bottom-navbar'>
<ul>
<li>
<img class="nav-icon home-button" src="img/icons/home_icon.png">
</li>
<li>
<img class="nav-icon create-button" src="img/icons/create_icon.png">
</li>
<li>
<img class="nav-icon history-button" src="img/icons/history_icon.png">
</li>
<li>
<img class="nav-icon graph-button" src="img/icons/graph_icon.png">
</li>
</ul>
</div>
<!-- <div class="white-fader"></div> -->
<div class="main-content-wrapper">
<div class="page" id="page-one"> <h1> Page 1 </h1> </div>
<div class="page" id="page-two"> <h1> Page 2 </h1> </div>
<div class="page" id="page-three"> <h1> Page 3 </h1> </div>
<div class="page" id="page-four"> <h1> Page 4 </h1> </div>
</div>
</div>
<script type="text/javascript">
function submitMemory(){
//get all the info into vairables.
var title = $("#title1").val();
var text = $("#text-area-01").val();
//var userid = ;
var imageURL = "http://www.google.com/example.jpg"
var emotionStr = 'fun';
var tag = 1;
$.ajax({
dataType: "json",
method: "POST",
url: 'https://team23-project.herokuapp.com/memory/store',
data: {
"title": title,
"text": text,
"userid": 1,
"image": imageURL,
"emotion": emotionStr,
"tagid": tag
}
}).done(function(data){
alert("Successfully uploaded... " + data);
}).fail(function(jgXHR, textStatus, errorThrown){
alert("Server Connection Error"); //let user know something is wrong.
console.log("ERROR: "+textStatus+ errorThrown);
});
}
function download() {
var dt = canvas.toDataURL('image/png');
this.href = dt;
};
function readURL(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function (e) {
$('#uploaded-img-01')
.attr('src', e.target.result)
};
$('.input-selector-right').css("display", "none")
reader.readAsDataURL(input.files[0]);
}
}
function resetCustTag () {
}
</script>
</body>
</html>