From 9633dec19044ca7df34c7283c183c1316f098c16 Mon Sep 17 00:00:00 2001 From: sipp11 Date: Tue, 23 Aug 2016 15:52:20 +0700 Subject: [PATCH] Update from Jack --- css/bootstrap-theme.min.css | 0 css/bootstrap-theme.min.css.map | 0 css/bootstrap.min.css | 0 css/bootstrap.min.css.map | 0 css/materialize.css | 0 css/materialize.min.css | 0 css/stdb.css | 54 ++- css/style.css | 0 font/material-design-icons/LICENSE.txt | 0 .../Material-Design-Icons.eot | Bin .../Material-Design-Icons.svg | 0 .../Material-Design-Icons.ttf | Bin .../Material-Design-Icons.woff | Bin .../Material-Design-Icons.woff2 | Bin font/roboto/Roboto-Bold.eot | Bin font/roboto/Roboto-Bold.ttf | Bin font/roboto/Roboto-Bold.woff | Bin font/roboto/Roboto-Bold.woff2 | Bin font/roboto/Roboto-Light.eot | Bin font/roboto/Roboto-Light.ttf | Bin font/roboto/Roboto-Light.woff | Bin font/roboto/Roboto-Light.woff2 | Bin font/roboto/Roboto-Medium.eot | Bin font/roboto/Roboto-Medium.ttf | Bin font/roboto/Roboto-Medium.woff | Bin font/roboto/Roboto-Medium.woff2 | Bin font/roboto/Roboto-Regular.eot | Bin font/roboto/Roboto-Regular.ttf | Bin font/roboto/Roboto-Regular.woff | Bin font/roboto/Roboto-Regular.woff2 | Bin font/roboto/Roboto-Thin.eot | Bin font/roboto/Roboto-Thin.ttf | Bin font/roboto/Roboto-Thin.woff | Bin font/roboto/Roboto-Thin.woff2 | Bin fonts/roboto/Roboto-Bold.eot | Bin fonts/roboto/Roboto-Bold.ttf | Bin fonts/roboto/Roboto-Bold.woff | Bin fonts/roboto/Roboto-Bold.woff2 | Bin fonts/roboto/Roboto-Light.eot | Bin fonts/roboto/Roboto-Light.ttf | Bin fonts/roboto/Roboto-Light.woff | Bin fonts/roboto/Roboto-Light.woff2 | Bin fonts/roboto/Roboto-Medium.eot | Bin fonts/roboto/Roboto-Medium.ttf | Bin fonts/roboto/Roboto-Medium.woff | Bin fonts/roboto/Roboto-Medium.woff2 | Bin fonts/roboto/Roboto-Regular.eot | Bin fonts/roboto/Roboto-Regular.ttf | Bin fonts/roboto/Roboto-Regular.woff | Bin fonts/roboto/Roboto-Regular.woff2 | Bin fonts/roboto/Roboto-Thin.eot | Bin fonts/roboto/Roboto-Thin.ttf | Bin fonts/roboto/Roboto-Thin.woff | Bin fonts/roboto/Roboto-Thin.woff2 | Bin index.html | 126 ++----- instrument.html | 167 ++++++++++ js/bootstrap.js | 0 js/bootstrap.min.js | 0 js/jquery-3.0.0.min.js | 0 js/jwtDecode.min.js | 0 js/materialize.js | 0 js/materialize.min.js | 0 js/npm.js | 0 js/stdb.js | 311 ++++++++++++------ login.html | 240 ++++++-------- scss/style.scss | 0 stat.html | 115 +++++++ 67 files changed, 677 insertions(+), 336 deletions(-) mode change 100644 => 100755 css/bootstrap-theme.min.css mode change 100644 => 100755 css/bootstrap-theme.min.css.map mode change 100644 => 100755 css/bootstrap.min.css mode change 100644 => 100755 css/bootstrap.min.css.map mode change 100644 => 100755 css/materialize.css mode change 100644 => 100755 css/materialize.min.css mode change 100644 => 100755 css/stdb.css mode change 100644 => 100755 css/style.css mode change 100644 => 100755 font/material-design-icons/LICENSE.txt mode change 100644 => 100755 font/material-design-icons/Material-Design-Icons.eot mode change 100644 => 100755 font/material-design-icons/Material-Design-Icons.svg mode change 100644 => 100755 font/material-design-icons/Material-Design-Icons.ttf mode change 100644 => 100755 font/material-design-icons/Material-Design-Icons.woff mode change 100644 => 100755 font/material-design-icons/Material-Design-Icons.woff2 mode change 100644 => 100755 font/roboto/Roboto-Bold.eot mode change 100644 => 100755 font/roboto/Roboto-Bold.ttf mode change 100644 => 100755 font/roboto/Roboto-Bold.woff mode change 100644 => 100755 font/roboto/Roboto-Bold.woff2 mode change 100644 => 100755 font/roboto/Roboto-Light.eot mode change 100644 => 100755 font/roboto/Roboto-Light.ttf mode change 100644 => 100755 font/roboto/Roboto-Light.woff mode change 100644 => 100755 font/roboto/Roboto-Light.woff2 mode change 100644 => 100755 font/roboto/Roboto-Medium.eot mode change 100644 => 100755 font/roboto/Roboto-Medium.ttf mode change 100644 => 100755 font/roboto/Roboto-Medium.woff mode change 100644 => 100755 font/roboto/Roboto-Medium.woff2 mode change 100644 => 100755 font/roboto/Roboto-Regular.eot mode change 100644 => 100755 font/roboto/Roboto-Regular.ttf mode change 100644 => 100755 font/roboto/Roboto-Regular.woff mode change 100644 => 100755 font/roboto/Roboto-Regular.woff2 mode change 100644 => 100755 font/roboto/Roboto-Thin.eot mode change 100644 => 100755 font/roboto/Roboto-Thin.ttf mode change 100644 => 100755 font/roboto/Roboto-Thin.woff mode change 100644 => 100755 font/roboto/Roboto-Thin.woff2 mode change 100644 => 100755 fonts/roboto/Roboto-Bold.eot mode change 100644 => 100755 fonts/roboto/Roboto-Bold.ttf mode change 100644 => 100755 fonts/roboto/Roboto-Bold.woff mode change 100644 => 100755 fonts/roboto/Roboto-Bold.woff2 mode change 100644 => 100755 fonts/roboto/Roboto-Light.eot mode change 100644 => 100755 fonts/roboto/Roboto-Light.ttf mode change 100644 => 100755 fonts/roboto/Roboto-Light.woff mode change 100644 => 100755 fonts/roboto/Roboto-Light.woff2 mode change 100644 => 100755 fonts/roboto/Roboto-Medium.eot mode change 100644 => 100755 fonts/roboto/Roboto-Medium.ttf mode change 100644 => 100755 fonts/roboto/Roboto-Medium.woff mode change 100644 => 100755 fonts/roboto/Roboto-Medium.woff2 mode change 100644 => 100755 fonts/roboto/Roboto-Regular.eot mode change 100644 => 100755 fonts/roboto/Roboto-Regular.ttf mode change 100644 => 100755 fonts/roboto/Roboto-Regular.woff mode change 100644 => 100755 fonts/roboto/Roboto-Regular.woff2 mode change 100644 => 100755 fonts/roboto/Roboto-Thin.eot mode change 100644 => 100755 fonts/roboto/Roboto-Thin.ttf mode change 100644 => 100755 fonts/roboto/Roboto-Thin.woff mode change 100644 => 100755 fonts/roboto/Roboto-Thin.woff2 mode change 100644 => 100755 index.html create mode 100755 instrument.html mode change 100644 => 100755 js/bootstrap.js mode change 100644 => 100755 js/bootstrap.min.js mode change 100644 => 100755 js/jquery-3.0.0.min.js mode change 100644 => 100755 js/jwtDecode.min.js mode change 100644 => 100755 js/materialize.js mode change 100644 => 100755 js/materialize.min.js mode change 100644 => 100755 js/npm.js mode change 100644 => 100755 js/stdb.js mode change 100644 => 100755 login.html mode change 100644 => 100755 scss/style.scss create mode 100755 stat.html diff --git a/css/bootstrap-theme.min.css b/css/bootstrap-theme.min.css old mode 100644 new mode 100755 diff --git a/css/bootstrap-theme.min.css.map b/css/bootstrap-theme.min.css.map old mode 100644 new mode 100755 diff --git a/css/bootstrap.min.css b/css/bootstrap.min.css old mode 100644 new mode 100755 diff --git a/css/bootstrap.min.css.map b/css/bootstrap.min.css.map old mode 100644 new mode 100755 diff --git a/css/materialize.css b/css/materialize.css old mode 100644 new mode 100755 diff --git a/css/materialize.min.css b/css/materialize.min.css old mode 100644 new mode 100755 diff --git a/css/stdb.css b/css/stdb.css old mode 100644 new mode 100755 index 9f24d85..122ade0 --- a/css/stdb.css +++ b/css/stdb.css @@ -68,6 +68,7 @@ img{ width: 100%; color:#FFF; font-size:30px; + z-index:1; } .container{ margin-right: auto; @@ -155,7 +156,7 @@ img{ left: 0; top: 0; width: 100%; - height: 1000px; + height: 100%; overflow: auto; background-color: rgb(0,0,0); background-color: rgba(0,0,0,0.4); @@ -211,4 +212,55 @@ img{ border-radius: 5px; border: 0px; +} + +/* 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 */ + +/* upload img */ +a.btn-edit{ + position: relative; + margin-left: 70%; + margin-top: 15%; + padding-left: 5px; + padding-right: 5px; + background-color: rgba(0,0,0,0.13); + border-radius: 10px; + color: white; +} +.modal h2{ + margin-left: -300%; +} +a.btn-edit#order0{ + margin-top: -85%; + margin-left: 84%; +} +.upload{ + z-index: -1; +} +iframe{ + margin-left: 13%; + margin-top: -13%; +} +img.img-with-youtube{ + height: 300px; } \ No newline at end of file diff --git a/css/style.css b/css/style.css old mode 100644 new mode 100755 diff --git a/font/material-design-icons/LICENSE.txt b/font/material-design-icons/LICENSE.txt old mode 100644 new mode 100755 diff --git a/font/material-design-icons/Material-Design-Icons.eot b/font/material-design-icons/Material-Design-Icons.eot old mode 100644 new mode 100755 diff --git a/font/material-design-icons/Material-Design-Icons.svg b/font/material-design-icons/Material-Design-Icons.svg old mode 100644 new mode 100755 diff --git a/font/material-design-icons/Material-Design-Icons.ttf b/font/material-design-icons/Material-Design-Icons.ttf old mode 100644 new mode 100755 diff --git a/font/material-design-icons/Material-Design-Icons.woff b/font/material-design-icons/Material-Design-Icons.woff old mode 100644 new mode 100755 diff --git a/font/material-design-icons/Material-Design-Icons.woff2 b/font/material-design-icons/Material-Design-Icons.woff2 old mode 100644 new mode 100755 diff --git a/font/roboto/Roboto-Bold.eot b/font/roboto/Roboto-Bold.eot old mode 100644 new mode 100755 diff --git a/font/roboto/Roboto-Bold.ttf b/font/roboto/Roboto-Bold.ttf old mode 100644 new mode 100755 diff --git a/font/roboto/Roboto-Bold.woff b/font/roboto/Roboto-Bold.woff old mode 100644 new mode 100755 diff --git a/font/roboto/Roboto-Bold.woff2 b/font/roboto/Roboto-Bold.woff2 old mode 100644 new mode 100755 diff --git a/font/roboto/Roboto-Light.eot b/font/roboto/Roboto-Light.eot old mode 100644 new mode 100755 diff --git a/font/roboto/Roboto-Light.ttf b/font/roboto/Roboto-Light.ttf old mode 100644 new mode 100755 diff --git a/font/roboto/Roboto-Light.woff b/font/roboto/Roboto-Light.woff old mode 100644 new mode 100755 diff --git a/font/roboto/Roboto-Light.woff2 b/font/roboto/Roboto-Light.woff2 old mode 100644 new mode 100755 diff --git a/font/roboto/Roboto-Medium.eot b/font/roboto/Roboto-Medium.eot old mode 100644 new mode 100755 diff --git a/font/roboto/Roboto-Medium.ttf b/font/roboto/Roboto-Medium.ttf old mode 100644 new mode 100755 diff --git a/font/roboto/Roboto-Medium.woff b/font/roboto/Roboto-Medium.woff old mode 100644 new mode 100755 diff --git a/font/roboto/Roboto-Medium.woff2 b/font/roboto/Roboto-Medium.woff2 old mode 100644 new mode 100755 diff --git a/font/roboto/Roboto-Regular.eot b/font/roboto/Roboto-Regular.eot old mode 100644 new mode 100755 diff --git a/font/roboto/Roboto-Regular.ttf b/font/roboto/Roboto-Regular.ttf old mode 100644 new mode 100755 diff --git a/font/roboto/Roboto-Regular.woff b/font/roboto/Roboto-Regular.woff old mode 100644 new mode 100755 diff --git a/font/roboto/Roboto-Regular.woff2 b/font/roboto/Roboto-Regular.woff2 old mode 100644 new mode 100755 diff --git a/font/roboto/Roboto-Thin.eot b/font/roboto/Roboto-Thin.eot old mode 100644 new mode 100755 diff --git a/font/roboto/Roboto-Thin.ttf b/font/roboto/Roboto-Thin.ttf old mode 100644 new mode 100755 diff --git a/font/roboto/Roboto-Thin.woff b/font/roboto/Roboto-Thin.woff old mode 100644 new mode 100755 diff --git a/font/roboto/Roboto-Thin.woff2 b/font/roboto/Roboto-Thin.woff2 old mode 100644 new mode 100755 diff --git a/fonts/roboto/Roboto-Bold.eot b/fonts/roboto/Roboto-Bold.eot old mode 100644 new mode 100755 diff --git a/fonts/roboto/Roboto-Bold.ttf b/fonts/roboto/Roboto-Bold.ttf old mode 100644 new mode 100755 diff --git a/fonts/roboto/Roboto-Bold.woff b/fonts/roboto/Roboto-Bold.woff old mode 100644 new mode 100755 diff --git a/fonts/roboto/Roboto-Bold.woff2 b/fonts/roboto/Roboto-Bold.woff2 old mode 100644 new mode 100755 diff --git a/fonts/roboto/Roboto-Light.eot b/fonts/roboto/Roboto-Light.eot old mode 100644 new mode 100755 diff --git a/fonts/roboto/Roboto-Light.ttf b/fonts/roboto/Roboto-Light.ttf old mode 100644 new mode 100755 diff --git a/fonts/roboto/Roboto-Light.woff b/fonts/roboto/Roboto-Light.woff old mode 100644 new mode 100755 diff --git a/fonts/roboto/Roboto-Light.woff2 b/fonts/roboto/Roboto-Light.woff2 old mode 100644 new mode 100755 diff --git a/fonts/roboto/Roboto-Medium.eot b/fonts/roboto/Roboto-Medium.eot old mode 100644 new mode 100755 diff --git a/fonts/roboto/Roboto-Medium.ttf b/fonts/roboto/Roboto-Medium.ttf old mode 100644 new mode 100755 diff --git a/fonts/roboto/Roboto-Medium.woff b/fonts/roboto/Roboto-Medium.woff old mode 100644 new mode 100755 diff --git a/fonts/roboto/Roboto-Medium.woff2 b/fonts/roboto/Roboto-Medium.woff2 old mode 100644 new mode 100755 diff --git a/fonts/roboto/Roboto-Regular.eot b/fonts/roboto/Roboto-Regular.eot old mode 100644 new mode 100755 diff --git a/fonts/roboto/Roboto-Regular.ttf b/fonts/roboto/Roboto-Regular.ttf old mode 100644 new mode 100755 diff --git a/fonts/roboto/Roboto-Regular.woff b/fonts/roboto/Roboto-Regular.woff old mode 100644 new mode 100755 diff --git a/fonts/roboto/Roboto-Regular.woff2 b/fonts/roboto/Roboto-Regular.woff2 old mode 100644 new mode 100755 diff --git a/fonts/roboto/Roboto-Thin.eot b/fonts/roboto/Roboto-Thin.eot old mode 100644 new mode 100755 diff --git a/fonts/roboto/Roboto-Thin.ttf b/fonts/roboto/Roboto-Thin.ttf old mode 100644 new mode 100755 diff --git a/fonts/roboto/Roboto-Thin.woff b/fonts/roboto/Roboto-Thin.woff old mode 100644 new mode 100755 diff --git a/fonts/roboto/Roboto-Thin.woff2 b/fonts/roboto/Roboto-Thin.woff2 old mode 100644 new mode 100755 diff --git a/index.html b/index.html old mode 100644 new mode 100755 index 4d3c57e..afc4953 --- a/index.html +++ b/index.html @@ -3,115 +3,45 @@ - - Login Form - + Traffy + + - -
- -
- - diff --git a/instrument.html b/instrument.html new file mode 100755 index 0000000..21ccd58 --- /dev/null +++ b/instrument.html @@ -0,0 +1,167 @@ + + + + + + + Traffy STDB + + + + + + + + + + + + + + +
+ +
+
+
+
+
+ +
+
  • +
    + thumb_up +
    +
    (Last 7 day)
    +
    + +
  • + +
  • +
    + trending_up +
    +
    (Last 7 day)
    +
    + +
  • + +
  • +
    + people +
    +
    (Last 7 day)
    +
    + +
  • + +
  • +

    อุปกรณ์

    +
    + featured_play_list + photo +
    +
    + ทั้งหมด + มีรูป +
    +
    + + +
    + +
  • +
    +
    + +
    + +
    + +
    + + + + + + + + + diff --git a/js/bootstrap.js b/js/bootstrap.js old mode 100644 new mode 100755 diff --git a/js/bootstrap.min.js b/js/bootstrap.min.js old mode 100644 new mode 100755 diff --git a/js/jquery-3.0.0.min.js b/js/jquery-3.0.0.min.js old mode 100644 new mode 100755 diff --git a/js/jwtDecode.min.js b/js/jwtDecode.min.js old mode 100644 new mode 100755 diff --git a/js/materialize.js b/js/materialize.js old mode 100644 new mode 100755 diff --git a/js/materialize.min.js b/js/materialize.min.js old mode 100644 new mode 100755 diff --git a/js/npm.js b/js/npm.js old mode 100644 new mode 100755 diff --git a/js/stdb.js b/js/stdb.js old mode 100644 new mode 100755 index 790fb49..71a297e --- a/js/stdb.js +++ b/js/stdb.js @@ -30,7 +30,7 @@ function getStartPage(){ }); } else{ - window.location.href = 'index.html' + window.location.href = 'login.html' } } else{ @@ -85,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 @@ -94,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, @@ -120,7 +120,7 @@ function getUser(status){ function getDataStat(respone){ getUser('first'); // console.log(respone) - document.getElementById("like").innerHTML = '0' + document.getElementById("like").innerHTML = respone.items.completed document.getElementById("status").innerHTML = '+'+respone.items.recent_update document.getElementById("accountActive").innerHTML = respone.users.active document.getElementById("numAll").innerHTML = respone.items.all @@ -129,7 +129,9 @@ function getDataStat(respone){ function getData(respone) { // console.log(dataInstrument) - // console.log(respone) + console.log(respone) + console.log("---------------- Next") + console.log(respone.next) // console.log(respone.results) console.log(dataInstrument) dataInstrument = dataInstrument.concat(respone.results) @@ -139,75 +141,98 @@ function getData(respone) { var modalText = '' for (i=start;i' + +'' + } htmlText = htmlText+"
    " - +'

    '+dataInstrument[i].name+'

    ' - +'

    #'+dataInstrument[i].custom_id+'

    ' - +'

    @'+dataInstrument[i].caretaker+'

    ' + // Author :: Apirak + + imageInstrument + // end of left + +'
    ' + +'

    '+dataInstrument[i].name+'

    ' + +'

    #'+dataInstrument[i].custom_id+'

    ' + +'

    @'+dataInstrument[i].caretaker+'

    ' + +'
    '// end of right + // End +'
    '; - + // console.log(dataInstrument[i].clips.length) + var backup = dataInstrument[i].clips; + dataInstrument[i].clips = addNullData(dataInstrument[i].clips); if(dataInstrument[i].clips.length === 0){ + // console.log('========= = 0 =========') imageTag = '
    ' - +'
    ' - +'
    ' - +'' - +'

    ไม่มีรูปภาพ

    ' - +'
    ' - +'
    ' - +'' - +'
    ไม่มีรูปภาพ
    ' - +'' - +'
    ไม่มีรูปภาพ
    ' - +'' - +'
    ไม่มีรูปภาพ
    ' - +'
    ' - +'
    ' - +'
    ' - +'
    ' - +'
    ' - +'Upload
    ' - +'' - +'
    ' + +'
    ' + +'
    ' + +'' + +'

    ไม่มีรูปภาพ

    ' + +'
    ' + +'
    ' + +'' + +'
    ไม่มีรูปภาพ
    ' + +'' + +'
    ไม่มีรูปภาพ
    ' + +'' + +'
    ไม่มีรูปภาพ
    ' + +'
    ' + +'
    ' + +'' + +'
    ' + +'
    ' + +'Upload
    ' + +'' + +'
    ' } else{ - if(dataInstrument[i].clips.length > 1){ + var style4 = '' + if(dataInstrument[i].clips.length >= 2){ + // console.log('*********** >= 2 ***********') var tagMiniImage = '' var loopImage = dataInstrument[i].clips.length - var style4 = '' - for(j=1;j 4){ + loopImage = 4 + } + for(j=1;j' - +'
    '; + +'' + +'
    ไม่มีรูปภาพ
    '; } - for(j=loopImage-1;j<3;j++){ + for(j=loopImage;j<4;j++){ if (j==3){ - style4 = 'style="margin-top:5px"' + style4 = 'margin-top:5px' } tagMiniImage = tagMiniImage - +'' - +'
    ไม่มีรูปภาพ
    '; + +'' + +'
    ไม่มีรูปภาพ
    '; } } else{ + // console.log('*********** < 2 ***********') + var tagMiniImage = '' for(j=1;j<4;j++){ if (j==3){ - style4 = 'style="margin-top:5px"' + style4 = 'margin-top:5px' } tagMiniImage = tagMiniImage - +'' - +'
    ไม่มีรูปภาพ
    '; + +'' + +'
    ไม่มีรูปภาพ
    '; + } } - console.log(dataInstrument) + imageTag = '
    ' +'
    ' +'
    ' +'' - +'

    ' + +'

    ไม่มีรูปภาพ

    ' +'
    ' +'
    ' +tagMiniImage @@ -219,46 +244,100 @@ function getData(respone) { +'Upload
    ' +'' +'
    ' - } - modalText = modalText+'