merge conflict
This commit is contained in:
@@ -2,42 +2,80 @@ var tagArray = [];
|
||||
const data=[];
|
||||
const CreateMsgRouter = {
|
||||
template: `
|
||||
<div class="content card om-card">
|
||||
<h4>Neue Nachricht erstellen</h4>
|
||||
<div class="content">
|
||||
<div class="is-hidden-desktop">
|
||||
<div id="mobile" class="content card om-card">
|
||||
<h4>Neue Nachricht erstellen</h4>
|
||||
<b-field>
|
||||
<b-input placeholder="User" id="user"></b-input>
|
||||
</b-field>
|
||||
|
||||
<b-field>
|
||||
<b-input placeholder="User" id="user"></b-input>
|
||||
</b-field>
|
||||
<b-field>
|
||||
<b-input placeholder="Betreff" id="subject"></b-input>
|
||||
</b-field>
|
||||
|
||||
<b-field>
|
||||
<b-input placeholder="Betreff" id="subject"></b-input>
|
||||
</b-field>
|
||||
<b-field label="Tags">
|
||||
<b-taginput
|
||||
id="tag"
|
||||
v-model="selected"
|
||||
:data=taglist
|
||||
autocomplete
|
||||
allow-new:false
|
||||
icon="label"
|
||||
placeholder="#"
|
||||
@typing="getFilteredTags"
|
||||
@input="saveTagsToArray">
|
||||
</b-taginput>
|
||||
</b-field>
|
||||
|
||||
<b-field label="Tags">
|
||||
<b-taginput
|
||||
id="tag"
|
||||
v-model="selected"
|
||||
:data=taglist
|
||||
autocomplete
|
||||
allow-new:false
|
||||
icon="label"
|
||||
placeholder="#"
|
||||
@typing="getFilteredTags"
|
||||
@input="saveTagsToArray">
|
||||
</b-taginput>
|
||||
</b-field>
|
||||
<b-field>
|
||||
<b-input placeholder="Nachricht" id="message" type="textarea"></b-input>
|
||||
</b-field>
|
||||
|
||||
<b-field>
|
||||
<b-input placeholder="Nachricht" id="message" type="textarea"></b-input>
|
||||
</b-field>
|
||||
<b-button @click="$router.go(-1)">ABBRECHEN</b-button>
|
||||
<b-button type="is-primary" @click="createMsg">SENDEN</b-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<b-button @click="$router.go(-1)">ABBRECHEN</b-button>
|
||||
<b-button type="is-primary" @click="createMsg">SENDEN</b-button>
|
||||
<div class="column is-three-quarters is-pulled-right is-hidden-touch content-desktop">
|
||||
<div id="desktop" class="content card om-card">
|
||||
<h4>Neue Nachricht erstellen</h4>
|
||||
<b-field>
|
||||
<b-input placeholder="User" id="user"></b-input>
|
||||
</b-field>
|
||||
|
||||
<b-field>
|
||||
<b-input placeholder="Betreff" id="subject"></b-input>
|
||||
</b-field>
|
||||
|
||||
<b-field label="Tags">
|
||||
<b-taginput
|
||||
id="tag"
|
||||
v-model="selected"
|
||||
:data=taglist
|
||||
autocomplete
|
||||
allow-new:false
|
||||
icon="label"
|
||||
placeholder="#"
|
||||
@typing="getFilteredTags"
|
||||
@input="saveTagsToArray">
|
||||
</b-taginput>
|
||||
</b-field>
|
||||
|
||||
<b-field>
|
||||
<b-input placeholder="Nachricht" id="message" type="textarea"></b-input>
|
||||
</b-field>
|
||||
|
||||
<b-button @click="$router.go(-1)">ABBRECHEN</b-button>
|
||||
<b-button type="is-primary" @click="createMsg">SENDEN</b-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>`,
|
||||
|
||||
</div>
|
||||
`,
|
||||
data: function () {
|
||||
return {
|
||||
auth: auth,
|
||||
isDisabled: false,
|
||||
selected: [],
|
||||
taglist: data,
|
||||
};
|
||||
@@ -51,7 +89,7 @@ const CreateMsgRouter = {
|
||||
var _subject = $("#subject").val();
|
||||
var _message = $("#message").val();
|
||||
var _tag = tagArray;
|
||||
var _user = $("#user").val();
|
||||
var _user = auth.name ? auth.name : $("#user").val();
|
||||
//console.log("Message Created: " + _tag + " " + _message + " " + _user);
|
||||
$.ajax({
|
||||
url: "api/msg",
|
||||
@@ -103,14 +141,26 @@ const CreateMsgRouter = {
|
||||
}
|
||||
},
|
||||
mounted: function () {
|
||||
//this.list_tags();
|
||||
var userField = $('#user');
|
||||
if (auth != null && auth.mail != '') {
|
||||
// userField.prop('placeholder',auth.name);
|
||||
var authorName = auth.name.split(' ');
|
||||
authorName = authorName[1] + ', ' + authorName[0];
|
||||
userField.val(authorName);
|
||||
userField.prop('disabled',true);
|
||||
} else {
|
||||
userField.prop('placeholder','User');
|
||||
userField.prop('disabled',false);
|
||||
}
|
||||
|
||||
this.list_tags();
|
||||
if ($(this).bootstrapMaterialDesign)
|
||||
$(this).bootstrapMaterialDesign();
|
||||
},
|
||||
};
|
||||
|
||||
function get_insert_tag(id){
|
||||
$.ajax({ url: "api/tag/"+id, method: "GET" }).done(function (tag) {
|
||||
$.ajax({ url: "api/tag/id/"+id, method: "GET" }).done(function (tag) {
|
||||
data.push("#" + tag.name);
|
||||
console.log("Array:"+this.data);
|
||||
}).fail(function (e, f, g) {
|
||||
|
||||
Reference in New Issue
Block a user