Browse Source

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

pull/1/head
Edwina Barbalan 6 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

@@ -1,7 +1,7 @@
{
"id": "2",
"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

@@ -2,6 +2,6 @@
"id": "3",
"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"
"tag": "#efi #bei #wichtig",
"user": "user_3"
}

+ 1
- 33
public/index.html View File

@@ -53,38 +53,6 @@
<script src="profilCard.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>
</head>

@@ -142,7 +110,7 @@
<!-- 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>
<!-- NOTE: Call main.js -->
<xxxscript src="main.js"></script>
<script src="main.js"></script>

</body>


Loading…
Cancel
Save