Browse Source

Funktion get_insert_message von index.html zu home.js / 2.json und 3.json verändert

pull/1/head
Edwina Barbalan 5 years ago
parent
commit
013bdb4ce1
3 changed files with 6 additions and 38 deletions
  1. 3
    3
      public/2.json
  2. 2
    2
      public/3.json
  3. 1
    33
      public/index.html

+ 3
- 3
public/2.json View File

{ {
"id": "2", "id": "2",
"subject": "Betreff", "subject": "Betreff",
"message": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam.",
"tag": "#efi #bme #semester",
"user": "user_1"
"message": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.",
"tag": "#efi #fachschaft",
"user": "user_2"
} }

+ 2
- 2
public/3.json View File

"id": "3", "id": "3",
"subject": "Betreff", "subject": "Betreff",
"message": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam.", "message": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam.",
"tag": "#efi #bme #semester",
"user": "user_1"
"tag": "#efi #bei #wichtig",
"user": "user_3"
} }

+ 1
- 33
public/index.html View File

<script src="profilCard.js"></script> <script src="profilCard.js"></script>
<script src="profilData.js"></script> <script src="profilData.js"></script>


<script type = "text/javascript" language = "javascript">

function get_insert_message (id) {
$.get (id+".json"
) .done (function (msg) {
// _messages[id] = msg;
Vue.set (_messages, id, msg);
}) .fail (function (e,f,g) {
console.log ("cannot load "+id+".json: "+e+f+g);
})
}
$(document).ready(function() {
console.log("egal");
$.get('list.json'
) .done (function (jd) {
// _messagelist = jd;
_messagelist.splice (0, _messagelist.length);
_messagelist.push.apply (_messagelist, jd);
console.log("egal2");
//$('#xxx').text(jd[0]);
for (var e in jd) {
if (! _messages[jd[e]]) {
get_insert_message (jd[e]);
}
}
}) .fail (function(e,f,g) {
console.log("egal3: "+e+f+g );
});
});
</script>


<title>OMApp</title> <title>OMApp</title>
</head> </head>


<!-- CDN_Bootstrap JS lib --> <!-- CDN_Bootstrap JS lib -->
<script src="https://unpkg.com/bootstrap-material-design@4.1.1/dist/js/bootstrap-material-design.js" integrity="sha384-CauSuKpEqAFajSpkdjv3z9t8E7RlpJ1UP0lKM/+NdtSarroVKu069AlsRPKkFBz9" crossorigin="anonymous"></script> <script src="https://unpkg.com/bootstrap-material-design@4.1.1/dist/js/bootstrap-material-design.js" integrity="sha384-CauSuKpEqAFajSpkdjv3z9t8E7RlpJ1UP0lKM/+NdtSarroVKu069AlsRPKkFBz9" crossorigin="anonymous"></script>
<!-- NOTE: Call main.js --> <!-- NOTE: Call main.js -->
<xxxscript src="main.js"></script>
<script src="main.js"></script>


</body> </body>



Loading…
Cancel
Save