diff --git a/css/stdb.css b/css/stdb.css
index 7590b3a..e3cafdf 100644
--- a/css/stdb.css
+++ b/css/stdb.css
@@ -211,4 +211,26 @@ img{
border-radius: 5px;
border: 0px;
-}
\ No newline at end of file
+}
+
+/* Author :: Apirak */
+/* Add cover image to display */
+.box-left {
+ width: 20%;
+ height: 100%;
+ display: inline-table;
+}
+
+.box-right {
+ /*float: right;*/
+ width: 80%;
+ height: 100%;
+ display: inline-table;
+}
+img.cover-img {
+ width: 120px;
+ height: 120px;
+ margin-top: -2%;
+ margin-left: 1%;
+}
+/* End */
\ No newline at end of file
diff --git a/index.html b/index.html
index c8c3266..4dd1e07 100644
--- a/index.html
+++ b/index.html
@@ -3,161 +3,45 @@
-
+
+
diff --git a/js/stdb.js b/js/stdb.js
index 796d4c8..73932e3 100644
--- a/js/stdb.js
+++ b/js/stdb.js
@@ -8,8 +8,6 @@ var nextUrl = ''
htmlText = ''
var dataUri = []
-console.log('Welcome to Web STDB')
-
function getStartPage(){
sesToken = sessionStorage.getItem('token');
if( sesToken === null){
@@ -87,7 +85,7 @@ function getUser(status){
token = sessionStorage.getItem("token")
var searchText = ''
if (status === 'search'){
- // console.log("search")
+ console.log("search")
dataInstrument = []
searchText = '&search='+document.getElementById("searchId").value
start = 0
@@ -96,12 +94,12 @@ function getUser(status){
htmlText = '';
modalText = '';
dataInstrument = [];
- // console.log(' >> end of search button');
- // console.log(dataInstrument)
- // console.log($('#card').html());
+ console.log(' >> end of search button');
+ console.log(dataInstrument)
+ console.log($('#card').html());
}
var url = 'http://www.serv.stdb.most.go.th/api/v2/instrument/?organization='+respone.organizations[0].id+searchText;
- // console.log('url = ' + url)
+ console.log('url = ' + url)
$.ajax({
type: "GET",
url: url,
@@ -122,7 +120,7 @@ function getUser(status){
function getDataStat(respone){
getUser('first');
// console.log(respone)
- document.getElementById("like").innerHTML = respone.items.completed
+ document.getElementById("like").innerHTML = '0'
document.getElementById("status").innerHTML = '+'+respone.items.recent_update
document.getElementById("accountActive").innerHTML = respone.users.active
document.getElementById("numAll").innerHTML = respone.items.all
@@ -131,28 +129,35 @@ function getDataStat(respone){
function getData(respone) {
// console.log(dataInstrument)
- // console.log(respone)
- // console.log("---------------- Next")
- // console.log(respone.next)
+ console.log(respone)
+ console.log("---------------- Next")
+ console.log(respone.next)
// console.log(respone.results)
- // console.log(dataInstrument)
+ console.log(dataInstrument)
dataInstrument = dataInstrument.concat(respone.results)
- // console.log('*******ฬฬฬฬฬฬฬฬฬ*********')
- // console.log(respone.results)
+ console.log('*******ฬฬฬฬฬฬฬฬฬ*********')
+ console.log(respone.results)
var htmlText = ''
var modalText = ''
for (i=start;i
"
- +''+dataInstrument[i].name+'
'
- +'#'+dataInstrument[i].custom_id+'
'
- +'@'+dataInstrument[i].caretaker+'
'
+ // Author :: Apirak
+ +''
+ +'
'
+ +'
'// end of left
+ +''
+ +'
'+dataInstrument[i].name+'
'
+ +'#'+dataInstrument[i].custom_id+'
'
+ +'@'+dataInstrument[i].caretaker+'
'
+ +''// end of right
+ // End
+' ';
- // console.log(dataInstrument[i].clips.length)
+ console.log(dataInstrument[i].clips.length)
if(dataInstrument[i].clips.length === 0){
- // console.log('========= = 0 =========')
+ console.log('========= = 0 =========')
imageTag = '