mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-18 14:11:10 +00:00
commit
3a17ccb49b
9 changed files with 65 additions and 89 deletions
4
Gemfile
4
Gemfile
|
|
@ -46,11 +46,11 @@ gem 'uglifier', '>= 1.3.0'
|
||||||
gem 'bootstrap-sass'
|
gem 'bootstrap-sass'
|
||||||
gem 'formtastic-bootstrap'
|
gem 'formtastic-bootstrap'
|
||||||
gem 'formtastic', '~> 2.3.0.rc3'
|
gem 'formtastic', '~> 2.3.0.rc3'
|
||||||
|
gem 'momentjs-rails', '>= 2.8.1'
|
||||||
|
gem 'bootstrap3-datetimepicker-rails', '~> 3.0.2'
|
||||||
|
|
||||||
# Use jquery as the JavaScript library
|
# Use jquery as the JavaScript library
|
||||||
gem 'jquery-rails'
|
gem 'jquery-rails'
|
||||||
gem 'jquery-ui-rails'
|
|
||||||
gem 'jquery-fileupload-rails'
|
gem 'jquery-fileupload-rails'
|
||||||
gem 'cocoon'
|
gem 'cocoon'
|
||||||
|
|
||||||
|
|
|
||||||
15
Gemfile.lock
15
Gemfile.lock
|
|
@ -59,6 +59,8 @@ GEM
|
||||||
bcrypt (3.1.7)
|
bcrypt (3.1.7)
|
||||||
bootstrap-sass (3.1.1.1)
|
bootstrap-sass (3.1.1.1)
|
||||||
sass (~> 3.2)
|
sass (~> 3.2)
|
||||||
|
bootstrap3-datetimepicker-rails (3.0.3)
|
||||||
|
momentjs-rails (>= 2.8.1)
|
||||||
browser (0.6.0)
|
browser (0.6.0)
|
||||||
builder (3.2.2)
|
builder (3.2.2)
|
||||||
byebug (3.1.2)
|
byebug (3.1.2)
|
||||||
|
|
@ -158,7 +160,7 @@ GEM
|
||||||
activesupport
|
activesupport
|
||||||
builder
|
builder
|
||||||
htmlentities (4.3.1)
|
htmlentities (4.3.1)
|
||||||
i18n (0.6.9)
|
i18n (0.6.11)
|
||||||
inversion (0.12.3)
|
inversion (0.12.3)
|
||||||
loggability (~> 0.4)
|
loggability (~> 0.4)
|
||||||
jquery-fileupload-rails (0.4.1)
|
jquery-fileupload-rails (0.4.1)
|
||||||
|
|
@ -167,8 +169,6 @@ GEM
|
||||||
jquery-rails (3.1.0)
|
jquery-rails (3.1.0)
|
||||||
railties (>= 3.0, < 5.0)
|
railties (>= 3.0, < 5.0)
|
||||||
thor (>= 0.14, < 2.0)
|
thor (>= 0.14, < 2.0)
|
||||||
jquery-ui-rails (4.2.1)
|
|
||||||
railties (>= 3.2.16)
|
|
||||||
json (1.8.1)
|
json (1.8.1)
|
||||||
jwt (1.0.0)
|
jwt (1.0.0)
|
||||||
launchy (2.4.2)
|
launchy (2.4.2)
|
||||||
|
|
@ -191,7 +191,9 @@ GEM
|
||||||
open4
|
open4
|
||||||
rake
|
rake
|
||||||
mini_portile (0.6.0)
|
mini_portile (0.6.0)
|
||||||
minitest (5.3.5)
|
minitest (5.4.0)
|
||||||
|
momentjs-rails (2.8.1)
|
||||||
|
railties (>= 3.1)
|
||||||
multi_json (1.10.1)
|
multi_json (1.10.1)
|
||||||
multi_xml (0.5.5)
|
multi_xml (0.5.5)
|
||||||
multipart-post (2.0.0)
|
multipart-post (2.0.0)
|
||||||
|
|
@ -379,7 +381,7 @@ GEM
|
||||||
ttfunk (1.1.1)
|
ttfunk (1.1.1)
|
||||||
turbolinks (2.2.2)
|
turbolinks (2.2.2)
|
||||||
coffee-rails
|
coffee-rails
|
||||||
tzinfo (1.2.1)
|
tzinfo (1.2.2)
|
||||||
thread_safe (~> 0.1)
|
thread_safe (~> 0.1)
|
||||||
uglifier (2.5.0)
|
uglifier (2.5.0)
|
||||||
execjs (>= 0.3.0)
|
execjs (>= 0.3.0)
|
||||||
|
|
@ -407,6 +409,7 @@ DEPENDENCIES
|
||||||
awesome_nested_set (~> 3.0.0.rc.5)
|
awesome_nested_set (~> 3.0.0.rc.5)
|
||||||
axlsx_rails
|
axlsx_rails
|
||||||
bootstrap-sass
|
bootstrap-sass
|
||||||
|
bootstrap3-datetimepicker-rails (~> 3.0.2)
|
||||||
byebug
|
byebug
|
||||||
cancancan
|
cancancan
|
||||||
capybara
|
capybara
|
||||||
|
|
@ -427,9 +430,9 @@ DEPENDENCIES
|
||||||
hoptoad_notifier (~> 2.3)
|
hoptoad_notifier (~> 2.3)
|
||||||
jquery-fileupload-rails
|
jquery-fileupload-rails
|
||||||
jquery-rails
|
jquery-rails
|
||||||
jquery-ui-rails
|
|
||||||
letter_opener
|
letter_opener
|
||||||
mina
|
mina
|
||||||
|
momentjs-rails (>= 2.8.1)
|
||||||
mysql2
|
mysql2
|
||||||
omniauth
|
omniauth
|
||||||
omniauth-facebook
|
omniauth-facebook
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,8 @@
|
||||||
// GO AFTER THE REQUIRES BELOW.
|
// GO AFTER THE REQUIRES BELOW.
|
||||||
//
|
//
|
||||||
//= require jquery
|
//= require jquery
|
||||||
//= require jquery.ui.all
|
|
||||||
//= require jquery_ujs
|
//= require jquery_ujs
|
||||||
//= require jquery-fileupload
|
//= require jquery-fileupload
|
||||||
//= require jquery-ui-timepicker-addon
|
|
||||||
//= require jquery.dataTables
|
//= require jquery.dataTables
|
||||||
//= require cocoon
|
//= require cocoon
|
||||||
//= require bootstrap
|
//= require bootstrap
|
||||||
|
|
@ -27,6 +25,10 @@
|
||||||
//= require bootstrap-markdown
|
//= require bootstrap-markdown
|
||||||
//= require to-markdown
|
//= require to-markdown
|
||||||
//= require markdown
|
//= require markdown
|
||||||
|
//= require moment
|
||||||
|
//= require bootstrap-datetimepicker
|
||||||
|
//= require osem-datepickers
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('a[disabled=disabled]').click(function(event){
|
$('a[disabled=disabled]').click(function(event){
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
34
app/assets/javascripts/osem-datepickers.js
Normal file
34
app/assets/javascripts/osem-datepickers.js
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
$(function () {
|
||||||
|
$("#conference-start-datepicker").datetimepicker({
|
||||||
|
pickTime: false,
|
||||||
|
format: "YYYY-MM-DD"
|
||||||
|
});
|
||||||
|
$("#conference-end-datepicker").datetimepicker({
|
||||||
|
pickTime: false,
|
||||||
|
format: "YYYY-MM-DD"
|
||||||
|
});
|
||||||
|
$("#conference-reg-start-datepicker").datetimepicker({
|
||||||
|
format: "YYYY-MM-DD",
|
||||||
|
pickTime: false,
|
||||||
|
pickSeconds: false
|
||||||
|
});
|
||||||
|
$("#conference-reg-end-datepicker").datetimepicker({
|
||||||
|
format: "YYYY-MM-DD",
|
||||||
|
pickTime: false,
|
||||||
|
pickSeconds: false
|
||||||
|
});
|
||||||
|
$(".target-due-date-datepicker").datetimepicker({
|
||||||
|
pickTime: false,
|
||||||
|
format: "YYYY-MM-DD"
|
||||||
|
});
|
||||||
|
/* Appends the datetimepicker to new injected nested target fields. */
|
||||||
|
$('a:contains("Add target")').click(function () {
|
||||||
|
setTimeout(function () {
|
||||||
|
$('.target-due-date-datepicker').not('.hasDatepicker').datetimepicker({
|
||||||
|
pickTime: false,
|
||||||
|
format: "YYYY-MM-DD"
|
||||||
|
});
|
||||||
|
},
|
||||||
|
5)
|
||||||
|
});
|
||||||
|
} );
|
||||||
|
|
@ -9,7 +9,11 @@ $(function () {
|
||||||
$("#" + id).toggle();
|
$("#" + id).toggle();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
$("#commercial_commercial_type").change(function () {
|
||||||
|
$(".media-type").hide();
|
||||||
|
$('#' + $(this).val().toLowerCase() + '-help').show();
|
||||||
|
});
|
||||||
|
$('.dropdown-toggle').dropdown();
|
||||||
/**
|
/**
|
||||||
* Adds the default template as value to the regarding email textarea field.
|
* Adds the default template as value to the regarding email textarea field.
|
||||||
*/
|
*/
|
||||||
|
|
@ -69,77 +73,6 @@ $(function () {
|
||||||
$('#' + $(this).data('name')).toggle();
|
$('#' + $(this).data('name')).toggle();
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
|
||||||
* Appends the datetimepicker to new injected nested target fields.
|
|
||||||
*/
|
|
||||||
$('a:contains("Add target")').click(function () {
|
|
||||||
setTimeout(function () {
|
|
||||||
$('.target-due-date-datepicker').not('.hasDatepicker').datepicker({
|
|
||||||
dateFormat: 'yy/mm/dd',
|
|
||||||
numberOfMonths: 1
|
|
||||||
});
|
|
||||||
},
|
|
||||||
5)
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
$("#commercial_commercial_type").change(function () {
|
|
||||||
$(".media-type").hide();
|
|
||||||
$('#' + $(this).val().toLowerCase() + '-help').show();
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.dropdown-toggle').dropdown();
|
|
||||||
$("#conference-start-datepicker").datepicker({
|
|
||||||
dateFormat: 'yy/mm/dd',
|
|
||||||
numberOfMonths: 2,
|
|
||||||
onSelect: function(selected) {
|
|
||||||
$("#conference-end-datepicker").datepicker("option","minDate", selected)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$("#conference-end-datepicker").datepicker({
|
|
||||||
dateFormat: 'yy/mm/dd',
|
|
||||||
numberOfMonths: 2,
|
|
||||||
onSelect: function(selected) {
|
|
||||||
$("#conference-start-datepicker").datepicker("option","maxDate", selected)
|
|
||||||
$("#cfp-hard-datepicker").datepicker("option","minDate", selected)
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$(".target-due-date-datepicker").datepicker({
|
|
||||||
dateFormat: 'yy/mm/dd',
|
|
||||||
numberOfMonths: 1
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#cfp-hard-datepicker").datepicker({
|
|
||||||
dateFormat: 'yy/mm/dd',
|
|
||||||
numberOfMonths: 2,
|
|
||||||
onSelect: function(selected) {
|
|
||||||
$("#conference-end-datepicker").datepicker("option","maxDate", selected)
|
|
||||||
$("#conference-start-datepicker").datepicker("option","maxDate", selected)
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#conference-reg-start-datepicker").datetimepicker({
|
|
||||||
dateFormat: "yy-mm-dd",
|
|
||||||
timeFormat: "HH:mm",
|
|
||||||
showSecond: false,
|
|
||||||
numberOfMonths: 2,
|
|
||||||
onSelect: function(selected) {
|
|
||||||
$("#conference-reg-end-datepicker").datepicker("option","minDate", selected)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#conference-reg-end-datepicker").datetimepicker({
|
|
||||||
dateFormat: "yy-mm-dd",
|
|
||||||
timeFormat: "HH:mm",
|
|
||||||
showSecond: false,
|
|
||||||
numberOfMonths: 2,
|
|
||||||
onSelect: function(selected) {
|
|
||||||
$("#conference-reg-start-datepicker").datepicker("option","maxDate", selected)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$(".comment-reply-link").click(function(){
|
$(".comment-reply-link").click(function(){
|
||||||
$(".comment-reply", $(this).parent()).toggle();
|
$(".comment-reply", $(this).parent()).toggle();
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
/*
|
/*
|
||||||
*= require strap-on
|
*= require strap-on
|
||||||
*= require formtastic-bootstrap
|
*= require formtastic-bootstrap
|
||||||
*= require jquery.ui.all
|
|
||||||
*= require jquery.fileupload-ui
|
*= require jquery.fileupload-ui
|
||||||
*= require jquery-ui-timepicker-addon
|
|
||||||
*= require jquery.dataTables_themeroller
|
*= require jquery.dataTables_themeroller
|
||||||
*= require osem
|
*= require osem
|
||||||
*= require osem-rating
|
*= require osem-rating
|
||||||
|
|
@ -13,4 +11,5 @@
|
||||||
*= require osem-fonts
|
*= require osem-fonts
|
||||||
*= require font-awesome
|
*= require font-awesome
|
||||||
*= require bootstrap-markdown.min
|
*= require bootstrap-markdown.min
|
||||||
|
*= require bootstrap-datetimepicker
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -5,4 +5,5 @@ $navbar-default-color: #ffffff;
|
||||||
$navbar-default-link-color: #ffffff;
|
$navbar-default-link-color: #ffffff;
|
||||||
$navbar-default-link-hover-color: #000000;
|
$navbar-default-link-hover-color: #000000;
|
||||||
|
|
||||||
@import "bootstrap";
|
@import 'bootstrap';
|
||||||
|
@import 'bootstrap-datetimepicker';
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,6 @@
|
||||||
= f.inputs 'Scheduling' do
|
= f.inputs 'Scheduling' do
|
||||||
= f.input :timezone, as: :time_zone, hint: 'Please select in what time zone your conference will take place.'
|
= f.input :timezone, as: :time_zone, hint: 'Please select in what time zone your conference will take place.'
|
||||||
= f.input :start_date, as: :string, input_html: { id: 'conference-start-datepicker', required: 'required' }
|
= f.input :start_date, as: :string, input_html: { id: 'conference-start-datepicker', required: 'required' }
|
||||||
= f.input :end_date, as: :string, input_html: { id: 'conference-end-datepicker', required: 'required' }
|
= f.input :end_date, as: :string, input_html: { id: 'conference-end-datepicker', required: 'required' }
|
||||||
= f.actions do
|
= f.actions do
|
||||||
= f.action :submit, button_html: {class: 'btn btn-success pull-right'}
|
= f.action :submit, button_html: {class: 'btn btn-success pull-right'}
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,12 @@
|
||||||
%li.divider
|
%li.divider
|
||||||
%li
|
%li
|
||||||
= link_to(admin_conference_index_path()) do
|
= link_to(admin_conference_index_path()) do
|
||||||
%span.glyphicon.glyphicon-home
|
- if Conference.any?
|
||||||
Administration
|
%span.glyphicon.glyphicon-home
|
||||||
|
Administration
|
||||||
|
- else
|
||||||
|
%span.glyphicon.glyphicon-plus
|
||||||
|
Create Conference
|
||||||
-if @conference and @conference.id and can? :show, @conference
|
-if @conference and @conference.id and can? :show, @conference
|
||||||
%li
|
%li
|
||||||
= link_to(admin_conference_path(@conference.short_title)) do
|
= link_to(admin_conference_path(@conference.short_title)) do
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue