Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Melhorias no layout e usabilidade #39

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Binary file added app/assets/images/01.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/1-large.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/covers/1-large.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/covers/2-large.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/covers/3-large.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/covers/4-large.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/covers/5-large.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/covers/6-large.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 3 additions & 13 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,8 @@
//
//= require jquery
//= require jquery_ujs
//= require jquery-ui/jquery-ui.min
//= require jquery-ui/i18n/jquery.ui.datepicker-pt-BR.min
//= require popper
//= require bootstrap.min
//= require mdb/mdb.min
//= require schedule
//= require jquery.rating.pack
//= require jquery.maskedinput.min
//= require custom
//= require comments
//= require event
//= require external_events
//= require invite_user
//= require material-components-web.min
//= require talk
//= require export_subscribers
//= require infinite-scroll.pkgd.min
//= require custom
69 changes: 60 additions & 9 deletions app/assets/javascripts/custom.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,61 @@
jQuery(function($) {
$('.dropdown-toggle').dropdown();

$(".date").mask("99/99/9999");
$(".fone").mask("(99) 99999999?9");
$(".cep").mask("99999-999");
$(".hour").mask("99:99");
$(".cpf").mask("999.999.999-99");
$(".cnpj").mask("99.999.999/9999-99");
});
// $('.dropdown-toggle').dropdown();
//
// $(".fone").mask("(99) 99999999?9");
// $(".cep").mask("99999-999");
// $(".hour").mask("99:99");
// $(".cpf").mask("999.999.999-99");
// $(".cnpj").mask("99.999.999/9999-99");
});

$.each(document.querySelectorAll('.my-surface'), function(i, el){
mdc.ripple.MDCRipple.attachTo(el);
});

$.each(document.querySelectorAll('.mdc-text-field'), function(i, el){
const textField = new mdc.textField.MDCTextField(el);
});

let drawer = new mdc.drawer.MDCTemporaryDrawer(document.querySelector('.mdc-drawer--temporary'));
document.querySelector('.menu-button').addEventListener('click', () => drawer.open = true);

$('#main-container').on('click', '.custom-card, .link-effect', function(){
$('#main-container').addClass('animated fadeOutDown');
$('.mdc-linear-progress').show();
});

$(".container-grid").height( $(window).height() );

var buttons = document.querySelectorAll('.mdc-button, .mdc-fab');
for (var i = 0, button; button = buttons[i]; i++) {
mdc.ripple.MDCRipple.attachTo(button);
}

var nodes = document.querySelectorAll('.mdc-icon-toggle');
for (var i = 0, node; node = nodes[i]; i++) {
mdc.iconToggle.MDCIconToggle.attachTo(node);
}

var checkboxes = document.querySelectorAll('.mdc-checkbox');
for (var i = 0, checkbox; checkbox = checkboxes[i]; i++) {
new mdc.checkbox.MDCCheckbox(checkbox);
}

var selects = document.querySelectorAll('.mdc-select');
for (var i = 0, select; select = selects[i]; i++) {
new mdc.select.MDCSelect(select);
}

var radios = document.querySelectorAll('.mdc-radio');
for (var i = 0, radio; radio = radios[i]; i++) {
new mdc.radio.MDCRadio(radio);
}

var interactiveListItems = document.querySelectorAll('.mdc-list-item');
for (var i = 0, li; li = interactiveListItems[i]; i++) {
mdc.ripple.MDCRipple.attachTo(li);
// Prevent link clicks from jumping demo to the top of the page
li.addEventListener('click', function(evt) {
// evt.preventDefault();
});
}
48 changes: 36 additions & 12 deletions app/assets/javascripts/event.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,52 @@
var event_id;

$(function() {
event_id = $('#event_id').val();
var menuEl = document.querySelector('#event-menu');
if ( menuEl ){
var menu = new mdc.menu.MDCMenu(menuEl);
var menuButtonEl = document.querySelector('#event-menu-button');

$("#event_start_date").datepicker();
menuButtonEl.addEventListener('click', function() {
menu.open = !menu.open;
});

$("#event_end_date").datepicker();
menu.quickOpen = true;
}

$("#event_deadline_date_enrollment").datepicker();
event_id = $('#event_id').val();

$(".btn-present").on("click", function(e) {
e.preventDefault();
addPresence(this)
});

$("form.rating .rating").rating({
callback: function (value, link) {
$(this.form).submit();
},
required: true,
half: true
});
$('#subscription-button').click(function(e){
e.preventDefault();
var eventId = $('#event_id').val();

$.ajax({
url: '/events/' + eventId + '/enrollments',
type: 'post',
dataType : "json",
beforeSend: function(xhr) {
xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content'))
},
success: function(res){
console.log(res);
}
})

})

// $("form.rating .rating").rating({
// callback: function (value, link) {
// $(this.form).submit();
// },
// required: true,
// half: true
// });

$(".rating.readonly").rating({required: true,readOnly: true, half: true});
// $(".rating.readonly").rating({required: true,readOnly: true, half: true});
});

var addPresence = function(obj) {
Expand Down
12 changes: 12 additions & 0 deletions app/assets/javascripts/infinite-scroll.pkgd.min.js

Large diffs are not rendered by default.

311 changes: 311 additions & 0 deletions app/assets/javascripts/material-components-web.min.js

Large diffs are not rendered by default.