@ -0,0 +1,130 @@ |
|||
conference |
|||
- title : string |
|||
- slug : string |
|||
- start_date : datetime |
|||
- end_date : datetime |
|||
- info : text |
|||
- poster : *image |
|||
- banner : *image |
|||
- workshop_schedule_published : boolean |
|||
- registration_open : boolean |
|||
- meals_provided : boolean |
|||
- meal_info : *text |
|||
|
|||
- conference_type : [conference_type] |
|||
- host_organizations : NtoN[organization] |
|||
- locations : *NtoN[location] |
|||
- registration_form_fields : *NtoN[registration_form_field] |
|||
- workshop_resources : *NtoN[workshop_resource] |
|||
|
|||
*conference_type |
|||
- title : string |
|||
- slug : string |
|||
- info : text |
|||
|
|||
event |
|||
- title : string |
|||
- slug : string |
|||
- conference : [conference] |
|||
- info : text |
|||
- location : *[location] |
|||
- start_time : *datetime |
|||
- end_time : *datetime |
|||
|
|||
*location |
|||
- title : *string |
|||
- latitude : *float |
|||
- longitude : *float |
|||
- country : *string |
|||
- territory : *string |
|||
- city : *string |
|||
- street : *string |
|||
- postal_code : *string |
|||
|
|||
*organization |
|||
- name : string |
|||
- slug : string |
|||
- email_address : string |
|||
- shop_status : list(string) |
|||
- year_founded : integer |
|||
- info : text |
|||
- url : string |
|||
- logo : image |
|||
- icon : image |
|||
- requires_approval : boolean |
|||
- secret_question : *string |
|||
- secret_answer : *string(hashed) |
|||
- location : [location] |
|||
- members : NtoN[user_organization_replationship] |
|||
|
|||
registration_form_field |
|||
- title : string |
|||
- slug : string |
|||
- required : boolean |
|||
- field_type : list(string) |
|||
- options : *string |
|||
- other_option : *boolean |
|||
- retired : boolean |
|||
|
|||
request |
|||
- comment : text |
|||
- object : Nto1[object] |
|||
- is_invite : boolean |
|||
- state : list(string) |
|||
|
|||
*user_organization_relationship |
|||
- user : [user] |
|||
- organization : [organization] |
|||
- relationship : string |
|||
|
|||
workshop |
|||
- title : string |
|||
- slug : string |
|||
- info : text |
|||
- conference : [conference] |
|||
- stream : [workshop_stream] |
|||
- presentation_style : [presentation_style] |
|||
- requested_resources : NtoN[workshop_resource] |
|||
- facilitators : NtoN[user] |
|||
- min_facilitators : integer |
|||
- location : *[location] |
|||
- start_time : *datetime |
|||
- end_time : *datetime |
|||
|
|||
*workshop_presentation_style |
|||
- name : string |
|||
- slug : string |
|||
- info : text |
|||
|
|||
*workshop_resource |
|||
- name : string |
|||
- slug : string |
|||
- info : text |
|||
|
|||
*workshop_stream |
|||
- name : string |
|||
- slug : string |
|||
- info : text |
|||
|
|||
rails g scaffold organization name:string slug:string email_address:string url:string year_founded:integer info:text logo:string avatar:string requires_approval:boolean secret_question:string secret_answer:string location_id:integer user_organization_replationship_id:integer |
|||
|
|||
organization_status:string |
|||
user_organization_replationship_id:integer |
|||
|
|||
|
|||
conference title:string slug:string start_date:datetime end_date:datetime info:text poster:string banner:string workshop_schedule_published:boolean registration_open:boolean meals_provided:boolean meal_info:text travel_info:text conference_type:conference_type_id |
|||
|
|||
conference_hosts_organizations conference_id:integer organization_id:integer |
|||
|
|||
- host_organizations : NtoN[organization] |
|||
- locations : *NtoN[location] |
|||
- registration_form_fields : *NtoN[registration_form_field] |
|||
- workshop_resources : *NtoN[workshop_resource] |
|||
|
|||
registration_form_field |
|||
- title : string |
|||
- help : text |
|||
- required : boolean |
|||
- field_type : list(string) |
|||
- options : string |
|||
- retired : boolean |
@ -0,0 +1,10 @@ |
|||
Bike!Bike! Icon Font |
|||
=========== |
|||
|
|||
To add to the icon font: |
|||
|
|||
* Go to icomoon.io/app/ |
|||
* Import the .svg in this folder |
|||
* Add you own svg icons |
|||
* Genreate and download the font |
|||
* Unzip and overwrite the contents into this directory |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 1.1 MiB |
After Width: | Height: | Size: 1.2 MiB |
After Width: | Height: | Size: 693 KiB |
After Width: | Height: | Size: 1.1 MiB |
After Width: | Height: | Size: 2.4 MiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 357 KiB |
After Width: | Height: | Size: 96 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 453 KiB |
@ -0,0 +1,175 @@ |
|||
#= require jquery |
|||
#= require jquery_ujs |
|||
#= require jquery.ui.sortable |
|||
#= require jquery.turbolinks |
|||
#= require turbolinks |
|||
#= require foundation |
|||
|
|||
# FRONT END |
|||
|
|||
# JS HANDLEBARS TEMPLATES |
|||
# require handlebars.runtime |
|||
# require jquery_nested_form |
|||
|
|||
# I18n |
|||
#= require i18n |
|||
#= require i18n/translations |
|||
|
|||
# ALL THE REST |
|||
#= require_tree . |
|||
|
|||
'use strict' |
|||
|
|||
I18n.defaultLocale = '<%= I18n.default_locale %>' |
|||
I18n.locale = $('html').attr 'lang' |
|||
|
|||
try Typekit.load() catch |
|||
|
|||
startSpinner = -> |
|||
$('#loading-spinner').show() |
|||
|
|||
stopSpinner = -> |
|||
$('#loading-spinner').fadeOut() |
|||
|
|||
# Turbolinks Spinner |
|||
document.addEventListener 'page:fetch', startSpinner |
|||
document.addEventListener 'page:receive', stopSpinner |
|||
|
|||
readURL = (input) -> |
|||
reader = null |
|||
if input.files && input.files[0] |
|||
reader = new FileReader() |
|||
reader.readAsDataURL input.files[0] |
|||
reader.onload = (e) -> |
|||
$(input).prev().attr('src', e.target.result) |
|||
|
|||
createOverlay = () -> |
|||
if $('#overlay').length > 0 |
|||
$('#overlay').remove() |
|||
$('body').append('<div id="overlay" class="loading"><div id="overlay-inner"></div></div>') |
|||
$('#overlay-dlg') |
|||
|
|||
setOverlayHTML = (html) -> |
|||
$('#overlay-inner').append('<div id="overlay-dlg">' + html + '</div>'); |
|||
$('#overlay').removeAttr('class').click(destroyOverlay) |
|||
|
|||
destroyOverlay = () -> |
|||
$('#overlay').remove() |
|||
|
|||
selectA = (type, event, $emptyObj) -> |
|||
event.preventDefault() |
|||
# = $(this) |
|||
$overlay = createOverlay() |
|||
objs = [] |
|||
$('.' + type + '-select-field.added input.' + type + '-id').each () -> obj.push($(this).val()) |
|||
$.post $emptyObj.data().url + (if type == 'organization' then '/nonhosts' else '/nonmembers'), {added: objs}, |
|||
(html) -> |
|||
setOverlayHTML(html).addClass('' + type + '-select') |
|||
$('#select-' + type + '-list a').click (event) -> |
|||
event.preventDefault() |
|||
|
|||
$this = $(this) |
|||
$old_field = $emptyObj.closest('.field') |
|||
$field = $old_field.clone() |
|||
|
|||
oldID = parseInt($old_field.find('input[type="hidden"]').attr('name').match(/\[(\d+)\]\[id\]/)[1]) |
|||
newID = oldID + 1 |
|||
|
|||
$field.find('input.' + type + '-id').val($this.data().id) |
|||
$field.find('.' + type + 'name').html($this.find('.' + type + 'name').html()).before('<img src="' + $this.find('img').attr('src') + '" />') |
|||
$field.find('.select-' + type + '').remove() |
|||
$field.removeClass('new').addClass('added') |
|||
$old_field.html (i, html) -> |
|||
pregex = new RegExp('\\[' + oldID + '\\]', 'g'); |
|||
aregex = new RegExp('_' + oldID + '_', 'g'); |
|||
html.replace(pregex, '[' + newID + ']').replace(aregex, '_' + newID + '_') |
|||
$field.insertBefore($old_field) |
|||
$('a.select-' + type + '').click (event) -> selectA(type, event, $(this)) |
|||
|
|||
destroyOverlay() |
|||
return |
|||
, 'html' |
|||
|
|||
updateFormField = () -> |
|||
$form = $('form#new_registration_form_field') |
|||
$field_type = $form.find('#registration_form_field_field_type') |
|||
field_type = $field_type.val() |
|||
$form.find('.registration-form-field-field').hide() |
|||
$form.find('.registration-form-field-field.field-type-' + field_type).show() |
|||
|
|||
updateFormFieldForm = () -> |
|||
$('form #registration_form_field_field_type').change updateFormField |
|||
updateFormField() |
|||
$('form#new_registration_form_field').submit (event) -> |
|||
event.preventDefault() |
|||
$form = $(this) |
|||
serialized = $form.serialize() |
|||
$.post $form.attr('action'), serialized, |
|||
(json) -> |
|||
$form.replaceWith(json.form) |
|||
$('#registration-form-field-list').html(json.list) |
|||
updateFormFieldForm() |
|||
, 'json' |
|||
updateFormFieldList = () -> |
|||
$('#registration-form-field-list .add-form-field').click () -> |
|||
$.post 'form/add-field', {field: $(this).data().id}, |
|||
(json) -> |
|||
$('#conference-form').html(json.form) |
|||
$('#registration-form-field-list').html(json.list) |
|||
#console.log json |
|||
updateFormFieldList() |
|||
return |
|||
$('#conference-form .remove-form-field').click () -> |
|||
$.post 'form/remove-field', {field: $(this).data().id}, |
|||
(json) -> |
|||
$('#conference-form').html(json.form) |
|||
$('#registration-form-field-list').html(json.list) |
|||
updateFormFieldList() |
|||
return |
|||
|
|||
$ -> |
|||
$(document).foundation(); |
|||
$('.field.country-select select').change () -> |
|||
$country = $(this) |
|||
country = $country.val() |
|||
$territory = $('.field.subregion-select select') |
|||
if $territory.data().country == country |
|||
$territory.removeClass('can cant').addClass('can') |
|||
return |
|||
|
|||
$.post '/location/territories', {country: country}, |
|||
(json) -> |
|||
$territory.html('') |
|||
if json && Object.keys(json).length |
|||
$.each json, (code, name) -> |
|||
$territory.append($('<option>').text(name).attr('value', code)) |
|||
return |
|||
$territory.removeClass('can cant').addClass('can') |
|||
$territory.data().country = country |
|||
else |
|||
$territory.removeClass('can cant').addClass('cant') |
|||
return |
|||
, 'json' |
|||
|
|||
return |
|||
|
|||
$('img + input[type="file"]').change () -> |
|||
readURL(this); |
|||
|
|||
$('a.select-user, a.select-organization').click (event) -> selectA($(this).attr('class').match(/(^|\s)select\-([^\s]+)/)[2], event, $(this)) |
|||
updateFormFieldForm() |
|||
updateFormFieldList() |
|||
|
|||
$('ul.sortable').sortable |
|||
handle: '.drag-sort', |
|||
items: 'li', |
|||
update: (event, props) -> |
|||
$(this).children().each (index, child) -> |
|||
$(child).find('.sortable-position').val(index + 1) |
|||
url = $(this).data().url |
|||
if url |
|||
data = $(this).find('input, select, textarea').serialize() |
|||
$.post url, data#, |
|||
# (json) -> |
|||
# console.log json |
|||
#, 'json' |
@ -0,0 +1,3 @@ |
|||
# Place all the behaviors and hooks related to the matching controller here. |
|||
# All this logic will automatically be available in application.js. |
|||
# You can use CoffeeScript in this file: http://coffeescript.org/ |
@ -0,0 +1,3 @@ |
|||
# Place all the behaviors and hooks related to the matching controller here. |
|||
# All this logic will automatically be available in application.js. |
|||
# You can use CoffeeScript in this file: http://coffeescript.org/ |
@ -0,0 +1,3 @@ |
|||
# Place all the behaviors and hooks related to the matching controller here. |
|||
# All this logic will automatically be available in application.js. |
|||
# You can use CoffeeScript in this file: http://coffeescript.org/ |
@ -0,0 +1,3 @@ |
|||
# Place all the behaviors and hooks related to the matching controller here. |
|||
# All this logic will automatically be available in application.js. |
|||
# You can use CoffeeScript in this file: http://coffeescript.org/ |
@ -0,0 +1,3 @@ |
|||
# Place all the behaviors and hooks related to the matching controller here. |
|||
# All this logic will automatically be available in application.js. |
|||
# You can use CoffeeScript in this file: http://coffeescript.org/ |
@ -0,0 +1,3 @@ |
|||
# Place all the behaviors and hooks related to the matching controller here. |
|||
# All this logic will automatically be available in application.js. |
|||
# You can use CoffeeScript in this file: http://coffeescript.org/ |
@ -0,0 +1,3 @@ |
|||
# Place all the behaviors and hooks related to the matching controller here. |
|||
# All this logic will automatically be available in application.js. |
|||
# You can use CoffeeScript in this file: http://coffeescript.org/ |
@ -0,0 +1,3 @@ |
|||
# Place all the behaviors and hooks related to the matching controller here. |
|||
# All this logic will automatically be available in application.js. |
|||
# You can use CoffeeScript in this file: http://coffeescript.org/ |
@ -0,0 +1,3 @@ |
|||
# Place all the behaviors and hooks related to the matching controller here. |
|||
# All this logic will automatically be available in application.js. |
|||
# You can use CoffeeScript in this file: http://coffeescript.org/ |
@ -0,0 +1,3 @@ |
|||
# Place all the behaviors and hooks related to the matching controller here. |
|||
# All this logic will automatically be available in application.js. |
|||
# You can use CoffeeScript in this file: http://coffeescript.org/ |
@ -0,0 +1,3 @@ |
|||
# Place all the behaviors and hooks related to the matching controller here. |
|||
# All this logic will automatically be available in application.js. |
|||
# You can use CoffeeScript in this file: http://coffeescript.org/ |
@ -0,0 +1,121 @@ |
|||
# I18n |
|||
#= require i18n |
|||
#= require i18n/translations |
|||
|
|||
'use strict' |
|||
|
|||
$(document).ready -> |
|||
$('#translation-control form').unbind('submit').bind('submit', (event)-> |
|||
event.preventDefault() |
|||
event.stopPropagation() |
|||
$form = $(this) |
|||
serialized = $form.serialize() |
|||
$form.find('select, button, textarea').prop 'disabled', true |
|||
$.post $form.attr('action'), serialized, |
|||
(json) -> |
|||
if json.success |
|||
$span = $('.translate-me[data-translate-key="' + json.key + '"]') |
|||
$span.html(json.translation) |
|||
$span.attr('data-translate-untranslated', json.translation) |
|||
$span.removeClass 'untranslated' |
|||
else if json.test |
|||
console.log json.test |
|||
$form.find('select, button, textarea').prop 'disabled', false |
|||
return |
|||
, 'json' |
|||
return |
|||
) |
|||
$('.translate-me').click (event)-> |
|||
if event.altKey |
|||
event.preventDefault() |
|||
key = $(this).attr('data-translate-key') |
|||
$('#translationkey').val key |
|||
resetTranslation key |
|||
$('#translationvalue').focus() |
|||
return |
|||
#$('#translationvalue, #translationkey').focus -> |
|||
$('#translation-control *').focus -> |
|||
key = $('#translationkey').val() |
|||
selectTranslation key |
|||
updateTranslation key |
|||
return |
|||
$('#translationkey').change (event)-> |
|||
#$('#translationvalue').val('') |
|||
key = $('#translationkey').val() |
|||
selectTranslation key |
|||
resetTranslation key |
|||
#$('#translation').focus() |
|||
#console.log event |
|||
return |
|||
# $('#translationvalue, #translationkey').blur -> |
|||
$('#translation-control *').blur -> |
|||
selectTranslation() |
|||
return |
|||
$('#translationvalue').bind 'input propertychange', ()-> |
|||
updateTranslation $('#translationkey').val() |
|||
return |
|||
return |
|||
|
|||
selectTranslation = (key)-> |
|||
$span = $('.translate-me.selected'); |
|||
$span.removeClass 'selected' |
|||
$span.removeClass 'preview' |
|||
$('#translatevars').hide() |
|||
$('#translatepluralizations').hide() |
|||
$('#translatevars ul').html '' |
|||
$('#translationhascount').val('0') |
|||
if key |
|||
$target = $('.translate-me[data-translate-key="' + key + '"]') |
|||
if !$target || !$target.length |
|||
return |
|||
vars = $target.addClass('selected').data().vars |
|||
if vars |
|||
keys = Object.keys(vars) |
|||
if keys.length |
|||
for i in [0...keys.length] |
|||
$('#translatevars ul').append ('<li class="var-' + keys[i] + '" title="Value: ' + vars[keys[i]] + '">' + keys[i] + '</li>') |
|||
if keys[i] == 'count' |
|||
$('#translatepluralizations').show() |
|||
$('#translationhascount').val('1') |
|||
$('#translatevars').show() |
|||
else |
|||
$span.html ()-> |
|||
$(this).attr('data-translate-untranslated') |
|||
return |
|||
|
|||
updateTranslation = (key)-> |
|||
$span = $('.translate-me[data-translate-key="' + key + '"]') |
|||
val = $('#translationvalue').val() |
|||
is_preview = ($span.hasClass 'preview') |
|||
$('#translatevars li').removeClass('used') |
|||
if val |
|||
if !is_preview |
|||
$span.addClass 'preview' |
|||
if !$span || !$span.length |
|||
return |
|||
vars = $span.data().vars |
|||
keys = Object.keys(vars) |
|||
for i in [0...keys.length] |
|||
_var = new RegExp('%{' + keys[i] + '}') |
|||
if val.match _var |
|||
# console.log 'Match!' |
|||
$('#translatevars li.var-' + keys[i]).addClass('used') |
|||
val = val.replace _var, vars[keys[i]] |
|||
else |
|||
if is_preview |
|||
$span.removeClass 'preview' |
|||
$span.html (val || $span.attr('data-translate-untranslated')) |
|||
return |
|||
|
|||
resetTranslation = (key)-> |
|||
$target = $('.translate-me[data-translate-key="' + key + '"]') |
|||
if $target && $target.length |
|||
translated = $target.data().translateTranslated |
|||
counts = ['zero', 'one', 'two', 'few', 'many'] |
|||
for i in counts |
|||
val = translated[key + '.' + i] |
|||
$('#translationvalue_' + i).val(val || '') |
|||
$('#translationpluralization_' + i).prop('checked', !!val) |
|||
val = (translated[key] || translated[key + '.other']) |
|||
$('#translationvalue').val(val || '') |
|||
return |
@ -0,0 +1,3 @@ |
|||
# Place all the behaviors and hooks related to the matching controller here. |
|||
# All this logic will automatically be available in application.js. |
|||
# You can use CoffeeScript in this file: http://coffeescript.org/ |
@ -0,0 +1,3 @@ |
|||
# Place all the behaviors and hooks related to the matching controller here. |
|||
# All this logic will automatically be available in application.js. |
|||
# You can use CoffeeScript in this file: http://coffeescript.org/ |
@ -0,0 +1,3 @@ |
|||
# Place all the behaviors and hooks related to the matching controller here. |
|||
# All this logic will automatically be available in application.js. |
|||
# You can use CoffeeScript in this file: http://coffeescript.org/ |
@ -0,0 +1,3 @@ |
|||
# Place all the behaviors and hooks related to the matching controller here. |
|||
# All this logic will automatically be available in application.js. |
|||
# You can use CoffeeScript in this file: http://coffeescript.org/ |
@ -0,0 +1,3 @@ |
|||
# Place all the behaviors and hooks related to the matching controller here. |
|||
# All this logic will automatically be available in application.js. |
|||
# You can use CoffeeScript in this file: http://coffeescript.org/ |
@ -0,0 +1,3 @@ |
|||
# Place all the behaviors and hooks related to the matching controller here. |
|||
# All this logic will automatically be available in application.js. |
|||
# You can use CoffeeScript in this file: http://coffeescript.org/ |
@ -0,0 +1,3 @@ |
|||
# Place all the behaviors and hooks related to the matching controller here. |
|||
# All this logic will automatically be available in application.js. |
|||
# You can use CoffeeScript in this file: http://coffeescript.org/ |
@ -0,0 +1,37 @@ |
|||
#= require jquery |
|||
#= require jquery_ujs |
|||
#= require jquery.turbolinks |
|||
#= require turbolinks |
|||
#= require foundation |
|||
|
|||
# FRONT END |
|||
|
|||
# JS HANDLEBARS TEMPLATES |
|||
# require handlebars.runtime |
|||
|
|||
# I18n |
|||
#= require i18n |
|||
#= require i18n/translations |
|||
|
|||
# ALL THE REST |
|||
#= require_tree . |
|||
|
|||
'use strict' |
|||
|
|||
I18n.defaultLocale = '<%= I18n.default_locale %>' |
|||
I18n.locale = $('html').attr 'lang' |
|||
|
|||
startSpinner = -> |
|||
$('#loading-spinner').show() |
|||
|
|||
stopSpinner = -> |
|||
$('#loading-spinner').fadeOut() |
|||
|
|||
# Turbolinks Spinner |
|||
document.addEventListener 'page:fetch', startSpinner |
|||
document.addEventListener 'page:receive', stopSpinner |
|||
|
|||
alert('123'); |
|||
|
|||
$ -> |
|||
$(document).foundation(); |
@ -0,0 +1,3 @@ |
|||
// Place all the styles related to the conference_admins controller here. |
|||
// They will automatically be included in application.css. |
|||
// You can use Sass (SCSS) here: http://sass-lang.com/ |
@ -0,0 +1,3 @@ |
|||
// Place all the styles related to the conference_host_organizations controller here. |
|||
// They will automatically be included in application.css. |
|||
// You can use Sass (SCSS) here: http://sass-lang.com/ |
@ -0,0 +1,3 @@ |
|||
// Place all the styles related to the conference_registration_responses controller here. |
|||
// They will automatically be included in application.css. |
|||
// You can use Sass (SCSS) here: http://sass-lang.com/ |
@ -0,0 +1,3 @@ |
|||
// Place all the styles related to the conference_registrations controller here. |
|||
// They will automatically be included in application.css. |
|||
// You can use Sass (SCSS) here: http://sass-lang.com/ |
@ -0,0 +1,3 @@ |
|||
// Place all the styles related to the conference_registraton_form_fields controller here. |
|||
// They will automatically be included in application.css. |
|||
// You can use Sass (SCSS) here: http://sass-lang.com/ |
@ -0,0 +1,3 @@ |
|||
// Place all the styles related to the conference_types controller here. |
|||
// They will automatically be included in application.css. |
|||
// You can use Sass (SCSS) here: http://sass-lang.com/ |
@ -0,0 +1,3 @@ |
|||
// Place all the styles related to the conferences controller here. |
|||
// They will automatically be included in application.css. |
|||
// You can use Sass (SCSS) here: http://sass-lang.com/ |
@ -0,0 +1,3 @@ |
|||
// Place all the styles related to the Locations controller here. |
|||
// They will automatically be included in application.css. |
|||
// You can use Sass (SCSS) here: http://sass-lang.com/ |
@ -0,0 +1,3 @@ |
|||
// Place all the styles related to the organization_statuses controller here. |
|||
// They will automatically be included in application.css. |
|||
// You can use Sass (SCSS) here: http://sass-lang.com/ |
@ -0,0 +1,3 @@ |
|||
// Place all the styles related to the organizations controller here. |
|||
// They will automatically be included in application.css. |
|||
// You can use Sass (SCSS) here: http://sass-lang.com/ |
@ -0,0 +1,3 @@ |
|||
// Place all the styles related to the registration_form_fields controller here. |
|||
// They will automatically be included in application.css. |
|||
// You can use Sass (SCSS) here: http://sass-lang.com/ |