Skip to content
Snippets Groups Projects
Commit 14c8a0ae authored by Lukas Gygi's avatar Lukas Gygi
Browse files

changes to eventstool

parent a9e8f116
No related branches found
No related tags found
No related merge requests found
<div class="users-table-wrapper"> <div class="events-table-wrapper">
<div class="tools-full-height"> <div class="tools-full-height">
<table class="table table-hover events-table" id="events-table"> <table class="table table-hover events-table" id="events-table">
<thead> <thead>
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<!-- modal for creating new events--> <!-- modal for creating new events-->
<div class="modal show" id="new-event-modal" role="dialog"> <div class="modal fade" id="new-event-modal" role="dialog">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
...@@ -52,95 +52,99 @@ ...@@ -52,95 +52,99 @@
<h4 class="modal-title">Create new Event</h4> <h4 class="modal-title">Create new Event</h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div class="form-group"> <form id="new-event">
<label for="title_de">Title</label> <div class="form-group">
<input type="text" class="form-control" id="title_de"></input> <label for="title_de">Title</label>
</div> <input type="text" class="form-control" id="title_de"></input>
<div class="form-group"> </div>
<label for="description_de">Description</label> <div class="form-group">
<textarea type="text" class="form-control" rows="3" id="description_de"></textarea> <label for="description_de">Description</label>
</div> <textarea type="text" class="form-control" rows="3" id="description_de"></textarea>
<div class="form-group"> </div>
<label for="catchphrase_de">Catchphrase</label> <div class="form-group">
<input type="text" class="form-control" id="catchphrase_de"></input> <label for="catchphrase_de">Catchphrase</label>
</div> <input type="text" class="form-control" id="catchphrase_de"></input>
</div>
<div class="form-group">
<label for="time_start">Start Time</label> <div class="form-group">
<input type="datetime" class="form-control" id="time_start"></input> <label for="time_start">Start Time</label>
</div> <input type="datetime" class="form-control" id="time_start"></input>
<div class="form-group"> </div>
<label for="time_end">End Time</label> <div class="form-group">
<input type="datetime" class="form-control" id="time_end"></input> <label for="time_end">End Time</label>
</div> <input type="datetime" class="form-control" id="time_end"></input>
</div>
<label class="checkbox-inline">
<input type="checkbox" id="signup-required" value="">No Signup <label class="checkbox-inline">
</label> <input type="checkbox" id="signup-required" value="">No Signup
<label class="checkbox-inline"> </label>
<input type="checkbox" id="no-signup-limit" value="">No Signup Limit
</label>
<div class="form-group">
<label for="spots">Spots</label>
<input type="number" class="form-control" id="spots"></input>
</div>
<label class="checkbox-inline">
<input type="checkbox" id="allow_email_signup" value="">Only amiv Members
</label>
<div class="form-group">
<label for="time_register_start">Start of Registration</label>
<input type="datetime" class="form-control" id="time_register_start"></input>
</div>
<div class="form-group">
<label for="time_register_end">End of Registration</label>
<input type="datetime" class="form-control" id="time_register_end"></input>
</div>
<div class="form-group">
<label for="location">Location</label>
<input type="text" class="form-control" id="location"></input>
</div>
<div class="form-group">
<label for="price">Price</label>
<input type="text" class="form-control" id="price"></input>
</div>
<div>
<label class="checkbox-inline">
<input type="checkbox" id="show_website" value="">Show on Webstite (requires banner image and title)
</label>
</div>
<div>
<label class="checkbox-inline"> <label class="checkbox-inline">
<input type="checkbox" id="show_infoscreen" value="">Show ond Infoscreen (requires infoscreen image) <input type="checkbox" id="no-signup-limit" value="">No Signup Limit
</label> </label>
</div>
<div> <div class="form-group">
<label for="spots">Spots</label>
<input type="number" class="form-control" id="spots"></input>
</div>
<label class="checkbox-inline"> <label class="checkbox-inline">
<input type="checkbox" id="show announce" value="">Show in Announce (requires stuff) <input type="checkbox" id="allow_email_signup" value="">Only amiv Members
</label> </label>
</div>
<button type="button" class"btn" data-toggle="collapse" data-target="#english-collapse">show english fields</button>
<div id="english-collapse" class="collapse">
<div class="form-group"> <div class="form-group">
<label for="title_en">Title english</label> <label for="time_register_start">Start of Registration</label>
<input type="text" class="form-control" id="title_en"></input> <input type="datetime" class="form-control" id="time_register_start"></input>
</div>
<div class="form-group">
<label for="time_register_end">End of Registration</label>
<input type="datetime" class="form-control" id="time_register_end"></input>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="description_en">Description english</label> <label for="location">Location</label>
<textarea type="text" class="form-control" rows="3" id="description_en"></textarea> <input type="text" class="form-control" id="location"></input>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="catchphrase_en">Catchphrase english</label> <label for="price">Price</label>
<input type="text" class="form-control" id="catchphrase_en"></input> <input type="number" class="form-control" id="price"></input>
</div>
<div>
<label class="checkbox-inline">
<input type="checkbox" id="show_website" value="">Show on Webstite (requires banner image and title)
</label>
</div>
<div>
<label class="checkbox-inline">
<input type="checkbox" id="show_infoscreen" value="">Show ond Infoscreen (requires infoscreen image)
</label>
</div> </div>
</div> <div>
<label class="checkbox-inline">
<input type="checkbox" id="show announce" value="">Show in Announce (requires stuff)
</label>
</div>
<button type="button" class"btn" data-toggle="collapse" data-target="#english-collapse">show english fields</button>
<div name="english-collapse" class="collapse">
<div class="form-group">
<label for="title_en">Title english</label>
<input type="text" class="form-control" id="title_en"></input>
</div>
<div class="form-group">
<label for="description_en">Description english</label>
<textarea type="text" class="form-control" rows="3" id="description_en"></textarea>
</div>
<div class="form-group">
<label for="catchphrase_en">Catchphrase english</label>
<input type="text" class="form-control" id="catchphrase_en"></input>
</div>
</div>
<!-- <input type="submit"> -->
</form>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
...@@ -151,10 +155,14 @@ ...@@ -151,10 +155,14 @@
</div> </div>
<style> <style>
.users-table-wrapper { .events-table-wrapper {
position: relative; position: relative;
} }
.users-table-wrapper>div { .events-table-wrapper>div {
overflow: auto;
}
#new-event-modal {
overflow: auto; overflow: auto;
} }
...@@ -194,6 +202,8 @@ amivcore.events.GET({ ...@@ -194,6 +202,8 @@ amivcore.events.GET({
$('#events-table tbody').append('<tr name="' + ret['_items'][n]['id'] + '"">' + tmp + '</tr>'); $('#events-table tbody').append('<tr name="' + ret['_items'][n]['id'] + '"">' + tmp + '</tr>');
} }
//show modal on click of the table //show modal on click of the table
$('#events-table tbody tr').click(function(event) { $('#events-table tbody tr').click(function(event) {
var id = $(this).attr('name') var id = $(this).attr('name')
...@@ -208,7 +218,6 @@ amivcore.events.GET({ ...@@ -208,7 +218,6 @@ amivcore.events.GET({
var temp = '<td>' + field + '</td><td>' + clickedEvent[field] + '</td>'; var temp = '<td>' + field + '</td><td>' + clickedEvent[field] + '</td>';
$('#event-details-table tbody').append('<tr>' + temp + '</tr>'); $('#event-details-table tbody').append('<tr>' + temp + '</tr>');
} }
//var clicked = $.grep(_items, function(e){ return e.id == ; })[];
}); });
}); });
...@@ -216,15 +225,24 @@ $('#detail-modal').on("hidden.bs.modal", function(e) { ...@@ -216,15 +225,24 @@ $('#detail-modal').on("hidden.bs.modal", function(e) {
$(e.target).removeData("bs.modal").find(".modal-content tbody").empty(); $(e.target).removeData("bs.modal").find(".modal-content tbody").empty();
}); });
tools.ui.menu({
'New Event':{
callback: function (){
$('#new-event-modal').modal('show');
}
}
});
function submitNewEvent(){ function submitNewEvent(){
console.log("submitting new event"); console.log("submitting new event");
var newEvent = { data: {}};
amivcore.events.POST({data:{"allow_email_signup":true, 'title_de':'fuck this shit'}}) newEvent["data"]["title_de"] = "test"//$("#title_de").val();
// newEvent["data"]["allow_email_signup"] = $(#signup-required).is(':checked');
// newEvent["data"]["allow_email_signup"] = $(#signup-required).is(':checked');
// newEvent["data"]["spots"] = parseInt(newEvent["data"]["spots"]);
//newEvent["data"]["price"] = parseInt(newEvent["data"]["price"]);
console.log(newEvent);
//console.log(amivcore.events.POST({data:{"allow_email_signup":true, 'title_de':'fucking awesome event', 'spots':-1}}));
} }
$(document).ready(function() {
// $('#time_start').datetimepicker({
// locale: 'de'
//});
});
</script> </script>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment