- Restructuring the assets
- Worked on the schedule - Removed some gems
|
Before Width: | Height: | Size: 180 B After Width: | Height: | Size: 180 B |
|
Before Width: | Height: | Size: 182 B After Width: | Height: | Size: 182 B |
|
Before Width: | Height: | Size: 124 B After Width: | Height: | Size: 124 B |
|
Before Width: | Height: | Size: 123 B After Width: | Height: | Size: 123 B |
|
Before Width: | Height: | Size: 149 B After Width: | Height: | Size: 149 B |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 104 B After Width: | Height: | Size: 104 B |
|
Before Width: | Height: | Size: 88 B After Width: | Height: | Size: 88 B |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
BIN
app/assets/images/img/glyphicons-halflings-white.png
Normal file
|
After Width: | Height: | Size: 8.6 KiB |
BIN
app/assets/images/img/glyphicons-halflings.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
|
|
@ -14,76 +14,6 @@
|
|||
//= require jquery_ujs
|
||||
//= require jquery-ui
|
||||
//= require jquery-fileupload
|
||||
//= require twitter/bootstrap
|
||||
//= require cocoon
|
||||
|
||||
$(function() {
|
||||
|
||||
$('.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)
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
$("#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").datepicker({
|
||||
dateFormat: 'yy/mm/dd',
|
||||
numberOfMonths: 2,
|
||||
onSelect: function(selected) {
|
||||
$("#conference-reg-end-datepicker").datepicker("option","minDate", selected)
|
||||
}
|
||||
});
|
||||
$("#conference-reg-end-datepicker").datepicker({
|
||||
dateFormat: 'yy/mm/dd',
|
||||
numberOfMonths: 2,
|
||||
onSelect: function(selected) {
|
||||
$("#conference-reg-start-datepicker").datepicker("option","maxDate", selected)
|
||||
}
|
||||
});
|
||||
|
||||
$(".comment-reply-link").click(function(){
|
||||
$(".comment-reply", $(this).parent()).toggle();
|
||||
return false;
|
||||
});
|
||||
|
||||
$("#event-comment-link").click(function(){
|
||||
$("#comments-div").toggle();
|
||||
return false;
|
||||
});
|
||||
|
||||
$(".comment-reply").hide();
|
||||
$(".user-details-popover").popover();
|
||||
$("#comments-div").hide();
|
||||
});
|
||||
|
||||
function word_count(text, divId){
|
||||
var r = 0;
|
||||
var input = text.value.replace(/\s/g,' ');
|
||||
var word_array = input.split(' ');
|
||||
for (var i=0; i < word_array.length; i++) {
|
||||
if (word_array[i].length > 0) r++;
|
||||
}
|
||||
|
||||
$('#' + divId).text(r);
|
||||
}
|
||||
//= require bootstrap.min
|
||||
//= require osem
|
||||
|
|
|
|||
7
app/assets/javascripts/bootstrap.min.js
vendored
Normal file
126
app/assets/javascripts/date.format.js
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
/*
|
||||
* Date Format 1.2.3
|
||||
* (c) 2007-2009 Steven Levithan <stevenlevithan.com>
|
||||
* MIT license
|
||||
*
|
||||
* Includes enhancements by Scott Trenda <scott.trenda.net>
|
||||
* and Kris Kowal <cixar.com/~kris.kowal/>
|
||||
*
|
||||
* Accepts a date, a mask, or a date and a mask.
|
||||
* Returns a formatted version of the given date.
|
||||
* The date defaults to the current date/time.
|
||||
* The mask defaults to dateFormat.masks.default.
|
||||
*/
|
||||
|
||||
var dateFormat = function () {
|
||||
var token = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,
|
||||
timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,
|
||||
timezoneClip = /[^-+\dA-Z]/g,
|
||||
pad = function (val, len) {
|
||||
val = String(val);
|
||||
len = len || 2;
|
||||
while (val.length < len) val = "0" + val;
|
||||
return val;
|
||||
};
|
||||
|
||||
// Regexes and supporting functions are cached through closure
|
||||
return function (date, mask, utc) {
|
||||
var dF = dateFormat;
|
||||
|
||||
// You can't provide utc if you skip other args (use the "UTC:" mask prefix)
|
||||
if (arguments.length == 1 && Object.prototype.toString.call(date) == "[object String]" && !/\d/.test(date)) {
|
||||
mask = date;
|
||||
date = undefined;
|
||||
}
|
||||
|
||||
// Passing date through Date applies Date.parse, if necessary
|
||||
date = date ? new Date(date) : new Date;
|
||||
if (isNaN(date)) throw SyntaxError("invalid date");
|
||||
|
||||
mask = String(dF.masks[mask] || mask || dF.masks["default"]);
|
||||
|
||||
// Allow setting the utc argument via the mask
|
||||
if (mask.slice(0, 4) == "UTC:") {
|
||||
mask = mask.slice(4);
|
||||
utc = true;
|
||||
}
|
||||
|
||||
var _ = utc ? "getUTC" : "get",
|
||||
d = date[_ + "Date"](),
|
||||
D = date[_ + "Day"](),
|
||||
m = date[_ + "Month"](),
|
||||
y = date[_ + "FullYear"](),
|
||||
H = date[_ + "Hours"](),
|
||||
M = date[_ + "Minutes"](),
|
||||
s = date[_ + "Seconds"](),
|
||||
L = date[_ + "Milliseconds"](),
|
||||
o = utc ? 0 : date.getTimezoneOffset(),
|
||||
flags = {
|
||||
d: d,
|
||||
dd: pad(d),
|
||||
ddd: dF.i18n.dayNames[D],
|
||||
dddd: dF.i18n.dayNames[D + 7],
|
||||
m: m + 1,
|
||||
mm: pad(m + 1),
|
||||
mmm: dF.i18n.monthNames[m],
|
||||
mmmm: dF.i18n.monthNames[m + 12],
|
||||
yy: String(y).slice(2),
|
||||
yyyy: y,
|
||||
h: H % 12 || 12,
|
||||
hh: pad(H % 12 || 12),
|
||||
H: H,
|
||||
HH: pad(H),
|
||||
M: M,
|
||||
MM: pad(M),
|
||||
s: s,
|
||||
ss: pad(s),
|
||||
l: pad(L, 3),
|
||||
L: pad(L > 99 ? Math.round(L / 10) : L),
|
||||
t: H < 12 ? "a" : "p",
|
||||
tt: H < 12 ? "am" : "pm",
|
||||
T: H < 12 ? "A" : "P",
|
||||
TT: H < 12 ? "AM" : "PM",
|
||||
Z: utc ? "UTC" : (String(date).match(timezone) || [""]).pop().replace(timezoneClip, ""),
|
||||
o: (o > 0 ? "-" : "+") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4),
|
||||
S: ["th", "st", "nd", "rd"][d % 10 > 3 ? 0 : (d % 100 - d % 10 != 10) * d % 10]
|
||||
};
|
||||
|
||||
return mask.replace(token, function ($0) {
|
||||
return $0 in flags ? flags[$0] : $0.slice(1, $0.length - 1);
|
||||
});
|
||||
};
|
||||
}();
|
||||
|
||||
// Some common format strings
|
||||
dateFormat.masks = {
|
||||
"default": "ddd mmm dd yyyy HH:MM:ss",
|
||||
shortDate: "m/d/yy",
|
||||
mediumDate: "mmm d, yyyy",
|
||||
longDate: "mmmm d, yyyy",
|
||||
fullDate: "dddd, mmmm d, yyyy",
|
||||
shortTime: "h:MM TT",
|
||||
mediumTime: "h:MM:ss TT",
|
||||
longTime: "h:MM:ss TT Z",
|
||||
isoDate: "yyyy-mm-dd",
|
||||
isoTime: "HH:MM:ss",
|
||||
isoDateTime: "yyyy-mm-dd'T'HH:MM:ss",
|
||||
isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"
|
||||
};
|
||||
|
||||
// Internationalization strings
|
||||
dateFormat.i18n = {
|
||||
dayNames: [
|
||||
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat",
|
||||
"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
|
||||
],
|
||||
monthNames: [
|
||||
"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
|
||||
"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
|
||||
]
|
||||
};
|
||||
|
||||
// For convenience...
|
||||
Date.prototype.format = function (mask, utc) {
|
||||
return dateFormat(this, mask, utc);
|
||||
};
|
||||
|
||||
69
app/assets/javascripts/osem.js
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
$(function() {
|
||||
$('.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)
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
$("#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").datepicker({
|
||||
dateFormat: 'yy/mm/dd',
|
||||
numberOfMonths: 2,
|
||||
onSelect: function(selected) {
|
||||
$("#conference-reg-end-datepicker").datepicker("option","minDate", selected)
|
||||
}
|
||||
});
|
||||
$("#conference-reg-end-datepicker").datepicker({
|
||||
dateFormat: 'yy/mm/dd',
|
||||
numberOfMonths: 2,
|
||||
onSelect: function(selected) {
|
||||
$("#conference-reg-start-datepicker").datepicker("option","maxDate", selected)
|
||||
}
|
||||
});
|
||||
|
||||
$(".comment-reply-link").click(function(){
|
||||
$(".comment-reply", $(this).parent()).toggle();
|
||||
return false;
|
||||
});
|
||||
|
||||
$("#event-comment-link").click(function(){
|
||||
$("#comments-div").toggle();
|
||||
return false;
|
||||
});
|
||||
|
||||
$(".comment-reply").hide();
|
||||
$(".user-details-popover").popover();
|
||||
$("#comments-div").hide();
|
||||
});
|
||||
|
||||
function word_count(text, divId) {
|
||||
var r = 0;
|
||||
var input = text.value.replace(/\s/g,' ');
|
||||
var word_array = input.split(' ');
|
||||
for (var i=0; i < word_array.length; i++) {
|
||||
if (word_array[i].length > 0) r++;
|
||||
}
|
||||
|
||||
$('#' + divId).text(r);
|
||||
};
|
||||
1693
app/assets/javascripts/spectrum.js
Normal file
|
|
@ -1,8 +1,7 @@
|
|||
/*
|
||||
*= require bootstrap.min
|
||||
*= require formtastic-bootstrap
|
||||
*= require bootstrap_and_overrides
|
||||
*= require osem
|
||||
*= require schedule
|
||||
*= require jquery-ui-1.9.2.custom
|
||||
*= require jquery.fileupload-ui
|
||||
*/
|
||||
|
|
|
|||
868
app/assets/stylesheets/bootstrap.min.css
vendored
Normal file
|
|
@ -1,7 +0,0 @@
|
|||
/*
|
||||
=require twitter-bootstrap-static/bootstrap
|
||||
|
||||
Use Font Awesome icons (default)
|
||||
To use Glyphicons sprites instead of Font Awesome, replace with "require twitter-bootstrap-static/sprites"
|
||||
=require twitter-bootstrap-static/fontawesome
|
||||
*/
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
@import "twitter/bootstrap/bootstrap";
|
||||
@import "twitter/bootstrap/responsive";
|
||||
|
||||
// Set the correct sprite paths
|
||||
@iconSpritePath: asset-path("twitter/bootstrap/glyphicons-halflings");
|
||||
@iconWhiteSpritePath: asset-path("twitter/bootstrap/glyphicons-halflings-white");
|
||||
|
||||
// Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines)
|
||||
// Note: If you use asset_path() here, your compiled bootstrap_and_overrides.css will not
|
||||
// have the proper paths. So for now we use the absolute path.
|
||||
@fontAwesomeEotPath: asset-path("fontawesome-webfont.eot");
|
||||
@fontAwesomeEotPath_iefix: asset-path("fontawesome-webfont.eot#iefix");
|
||||
@fontAwesomeWoffPath: asset-path("fontawesome-webfont.woff");
|
||||
@fontAwesomeTtfPath: asset-path("fontawesome-webfont.ttf");
|
||||
@fontAwesomeSvgPath: asset-path("fontawesome-webfont.svg");
|
||||
|
||||
// Font Awesome
|
||||
@import "fontawesome";
|
||||
|
||||
// Glyphicons
|
||||
//@import "twitter/bootstrap/sprites.less";
|
||||
|
||||
// Your custom LESS stylesheets goes here
|
||||
//
|
||||
// Since bootstrap was imported above you have access to its mixins which
|
||||
// you may use and inherit here
|
||||
//
|
||||
// If you'd like to override bootstrap's own variables, you can do so here as well
|
||||
// See http://twitter.github.com/bootstrap/customize.html#variables for their names and documentation
|
||||
//
|
||||
// Example:
|
||||
// @linkColor: #ff0000;
|
||||
@navbarBackground: #000000;
|
||||
|
|
@ -72,32 +72,4 @@ textarea {
|
|||
-moz-box-sizing: border-box; /* Firefox, other Gecko */
|
||||
box-sizing: border-box; /* Opera/IE 8+ */
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.mainbutton {
|
||||
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #9dce2c), color-stop(1, #8cb82b) );
|
||||
background:-moz-linear-gradient( center top, #9dce2c 5%, #8cb82b 100% );
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#9dce2c', endColorstr='#8cb82b');
|
||||
background-color:#9dce2c;
|
||||
-moz-border-radius:6px;
|
||||
-webkit-border-radius:6px;
|
||||
border-radius:6px;
|
||||
border:1px solid #83c41a;
|
||||
display:inline-block;
|
||||
color:#ffffff;
|
||||
font-family:Arial;
|
||||
font-size:20px;
|
||||
font-weight:bold;
|
||||
padding:6px 24px;
|
||||
text-decoration:none;
|
||||
text-shadow:1px 1px 9px #689324;
|
||||
}.mainbutton:hover {
|
||||
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #8cb82b), color-stop(1, #9dce2c) );
|
||||
background:-moz-linear-gradient( center top, #8cb82b 5%, #9dce2c 100% );
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#8cb82b', endColorstr='#9dce2c');
|
||||
background-color:#8cb82b;
|
||||
}.mainbutton:active {
|
||||
position:relative;
|
||||
top:1px;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
.schedule-content {
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.unscheduled {
|
||||
float:left;
|
||||
border:1px solid #bbb;
|
||||
padding-left:10px;
|
||||
padding-right: 10px;
|
||||
margin-right:20px;
|
||||
margin-left:20px;
|
||||
width:149px;
|
||||
height:100%;
|
||||
position:relative;
|
||||
}
|
||||
|
||||
.schedule {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.schedule-track-column-header {
|
||||
position: absolute;
|
||||
width: 149px;
|
||||
}
|
||||
|
||||
.schedule-track-column {
|
||||
float:left;
|
||||
border-right:1px solid #bbb;
|
||||
width:149px;
|
||||
height:400px;
|
||||
position:relative;
|
||||
}
|
||||
|
||||
.schedule-event {
|
||||
position:absolute;
|
||||
cursor:move;
|
||||
width:141px;
|
||||
height:32px;
|
||||
background: #6af;
|
||||
color:#fff;
|
||||
padding:4px;
|
||||
font-weight:bold;
|
||||
z-index:1;
|
||||
}
|
||||
471
app/assets/stylesheets/spectrum.css
Normal file
|
|
@ -0,0 +1,471 @@
|
|||
/***
|
||||
Spectrum Colorpicker v1.0.1
|
||||
https://github.com/bgrins/spectrum
|
||||
Author: Brian Grinstead
|
||||
License: MIT
|
||||
***/
|
||||
|
||||
.sp-container {
|
||||
position:absolute;
|
||||
top:0;
|
||||
left:0;
|
||||
display:inline-block;
|
||||
*display: inline;
|
||||
*zoom: 1;
|
||||
z-index: 2147483647;
|
||||
overflow: hidden;
|
||||
}
|
||||
.sp-container.sp-flat {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* http://ansciath.tumblr.com/post/7347495869/css-aspect-ratio */
|
||||
.sp-top {
|
||||
position:relative;
|
||||
width: 100%;
|
||||
display:inline-block;
|
||||
}
|
||||
.sp-top-inner {
|
||||
position:absolute;
|
||||
top:0;
|
||||
left:0;
|
||||
bottom:0;
|
||||
right:0;
|
||||
}
|
||||
.sp-color {
|
||||
position: absolute;
|
||||
top:0;
|
||||
left:0;
|
||||
bottom:0;
|
||||
right:20%;
|
||||
}
|
||||
.sp-hue {
|
||||
position: absolute;
|
||||
top:0;
|
||||
right:0;
|
||||
bottom:0;
|
||||
left:84%;
|
||||
height: 100%;
|
||||
}
|
||||
.sp-fill {
|
||||
padding-top: 80%;
|
||||
}
|
||||
.sp-sat, .sp-val {
|
||||
position: absolute;
|
||||
top:0;
|
||||
left:0;
|
||||
right:0;
|
||||
bottom:0;
|
||||
}
|
||||
|
||||
.sp-alpha-enabled .sp-top
|
||||
{
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
.sp-alpha-enabled .sp-alpha
|
||||
{
|
||||
display: block;
|
||||
}
|
||||
|
||||
.sp-alpha-handle
|
||||
{
|
||||
position:absolute;
|
||||
top:-4px;
|
||||
bottom: -4px;
|
||||
width: 6px;
|
||||
left: 50%;
|
||||
cursor: pointer;
|
||||
border: 1px solid black;
|
||||
background: white;
|
||||
opacity: .8;
|
||||
}
|
||||
|
||||
.sp-alpha
|
||||
{
|
||||
display: none;
|
||||
position: absolute;
|
||||
bottom: -14px;
|
||||
right: 0;
|
||||
left: 0;
|
||||
height: 8px;
|
||||
}
|
||||
.sp-alpha-inner{
|
||||
border: solid 1px #333;
|
||||
}
|
||||
|
||||
/* Don't allow text selection */
|
||||
.sp-container, .sp-replacer, .sp-preview, .sp-dragger, .sp-slider, .sp-alpha, .sp-alpha-handle, .sp-container.sp-dragging .sp-input, .sp-container button {
|
||||
-webkit-user-select:none;
|
||||
-moz-user-select: -moz-none;
|
||||
-o-user-select:none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.sp-container.sp-input-disabled .sp-input-container {
|
||||
display: none;
|
||||
}
|
||||
.sp-container.sp-buttons-disabled .sp-button-container {
|
||||
display: none;
|
||||
}
|
||||
.sp-palette-only .sp-picker-container {
|
||||
display: none;
|
||||
}
|
||||
.sp-palette-disabled .sp-palette-container {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sp-initial-disabled .sp-initial {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
/* Gradients for hue, saturation and value instead of images. Not pretty... but it works */
|
||||
.sp-sat {
|
||||
background-image: -webkit-gradient(linear, 0 0, 100% 0, from(#FFF), to(rgba(204, 154, 129, 0)));
|
||||
background-image: -webkit-linear-gradient(left, #FFF, rgba(204, 154, 129, 0));
|
||||
background-image: -moz-linear-gradient(left, #fff, rgba(204, 154, 129, 0));
|
||||
background-image: -o-linear-gradient(left, #fff, rgba(204, 154, 129, 0));
|
||||
background-image: -ms-linear-gradient(left, #fff, rgba(204, 154, 129, 0));
|
||||
background-image: linear-gradient(to right, #fff, rgba(204, 154, 129, 0));
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)";
|
||||
filter : progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81');
|
||||
}
|
||||
.sp-val {
|
||||
background-image: -webkit-gradient(linear, 0 100%, 0 0, from(#000000), to(rgba(204, 154, 129, 0)));
|
||||
background-image: -webkit-linear-gradient(bottom, #000000, rgba(204, 154, 129, 0));
|
||||
background-image: -moz-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));
|
||||
background-image: -o-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));
|
||||
background-image: -ms-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));
|
||||
background-image: linear-gradient(to top, #000, rgba(204, 154, 129, 0));
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)";
|
||||
filter : progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000');
|
||||
}
|
||||
|
||||
.sp-hue {
|
||||
background: -moz-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
|
||||
background: -ms-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
|
||||
background: -o-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#ff0000), color-stop(0.17, #ffff00), color-stop(0.33, #00ff00), color-stop(0.5, #00ffff), color-stop(0.67, #0000ff), color-stop(0.83, #ff00ff), to(#ff0000));
|
||||
background: -webkit-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
|
||||
}
|
||||
|
||||
/* IE filters do not support multiple color stops.
|
||||
Generate 6 divs, line them up, and do two color gradients for each.
|
||||
Yes, really.
|
||||
*/
|
||||
|
||||
.sp-1 {
|
||||
height:17%;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00');
|
||||
}
|
||||
.sp-2 {
|
||||
height:16%;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00');
|
||||
}
|
||||
.sp-3 {
|
||||
height:17%;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff');
|
||||
}
|
||||
.sp-4 {
|
||||
height:17%;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff');
|
||||
}
|
||||
.sp-5 {
|
||||
height:16%;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff');
|
||||
}
|
||||
.sp-6 {
|
||||
height:17%;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000');
|
||||
}
|
||||
|
||||
/* Clearfix hack */
|
||||
.sp-cf:before, .sp-cf:after { content: ""; display: table; }
|
||||
.sp-cf:after { clear: both; }
|
||||
.sp-cf { *zoom: 1; }
|
||||
|
||||
/* Mobile devices, make hue slider bigger so it is easier to slide */
|
||||
@media (max-device-width: 480px) {
|
||||
.sp-color { right: 40%; }
|
||||
.sp-hue { left: 63%; }
|
||||
.sp-fill { padding-top: 60%; }
|
||||
}
|
||||
|
||||
.sp-dragger {
|
||||
border-radius: 5px;
|
||||
height: 5px;
|
||||
width: 5px;
|
||||
border: 1px solid #fff;
|
||||
background: #000;
|
||||
cursor: pointer;
|
||||
position:absolute;
|
||||
top:0;
|
||||
left: 0;
|
||||
}
|
||||
.sp-slider {
|
||||
position: absolute;
|
||||
top:0;
|
||||
cursor:pointer;
|
||||
height: 3px;
|
||||
left: -1px;
|
||||
right: -1px;
|
||||
border: 1px solid #000;
|
||||
background: white;
|
||||
opacity: .8;
|
||||
}
|
||||
|
||||
/* Basic display options (colors, fonts, global widths) */
|
||||
.sp-container {
|
||||
border-radius: 0;
|
||||
background-color: #ECECEC;
|
||||
border: solid 1px #f0c49B;
|
||||
padding: 0;
|
||||
}
|
||||
.sp-container, .sp-container button, .sp-container input, .sp-color, .sp-hue
|
||||
{
|
||||
font: normal 12px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
-ms-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.sp-top
|
||||
{
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
.sp-color, .sp-hue
|
||||
{
|
||||
border: solid 1px #666;
|
||||
}
|
||||
|
||||
/* Input */
|
||||
.sp-input-container {
|
||||
float:right;
|
||||
width: 100px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.sp-initial-disabled .sp-input-container {
|
||||
width: 100%;
|
||||
}
|
||||
.sp-input {
|
||||
font-size: 12px !important;
|
||||
border: 1px inset;
|
||||
padding: 4px 5px;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
background:transparent;
|
||||
border-radius: 3px;
|
||||
color: #222;
|
||||
}
|
||||
.sp-input:focus {
|
||||
border: 1px solid orange;
|
||||
}
|
||||
.sp-input.sp-validation-error
|
||||
{
|
||||
border: 1px solid red;
|
||||
background: #fdd;
|
||||
}
|
||||
.sp-picker-container , .sp-palette-container
|
||||
{
|
||||
float:left;
|
||||
position: relative;
|
||||
padding: 10px;
|
||||
padding-bottom: 300px;
|
||||
margin-bottom: -290px;
|
||||
}
|
||||
.sp-picker-container
|
||||
{
|
||||
width: 172px;
|
||||
border-left: solid 1px #fff;
|
||||
}
|
||||
|
||||
/* Palettes */
|
||||
.sp-palette-container
|
||||
{
|
||||
border-right: solid 1px #ccc;
|
||||
}
|
||||
|
||||
.sp-palette .sp-thumb-el {
|
||||
display: block;
|
||||
position:relative;
|
||||
float:left;
|
||||
width: 24px;
|
||||
height: 15px;
|
||||
margin: 3px;
|
||||
cursor: pointer;
|
||||
border:solid 2px transparent;
|
||||
}
|
||||
.sp-palette .sp-thumb-el:hover, .sp-palette .sp-thumb-el.sp-thumb-active {
|
||||
border-color: orange;
|
||||
}
|
||||
.sp-thumb-el
|
||||
{
|
||||
position:relative;
|
||||
}
|
||||
|
||||
/* Initial */
|
||||
.sp-initial
|
||||
{
|
||||
float: left;
|
||||
border: solid 1px #333;
|
||||
}
|
||||
.sp-initial span {
|
||||
width: 30px;
|
||||
height: 25px;
|
||||
border:none;
|
||||
display:block;
|
||||
float:left;
|
||||
margin:0;
|
||||
}
|
||||
|
||||
/* Buttons */
|
||||
.sp-button-container {
|
||||
float: right;
|
||||
}
|
||||
|
||||
/* Replacer (the little preview div that shows up instead of the <input>) */
|
||||
.sp-replacer {
|
||||
margin:0;
|
||||
overflow:hidden;
|
||||
cursor:pointer;
|
||||
padding: 4px;
|
||||
display:inline-block;
|
||||
*zoom: 1;
|
||||
*display: inline;
|
||||
border: solid 1px #91765d;
|
||||
background: #eee;
|
||||
color: #333;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.sp-replacer:hover, .sp-replacer.sp-active {
|
||||
border-color: #F0C49B;
|
||||
color: #111;
|
||||
}
|
||||
.sp-replacer.sp-disabled {
|
||||
cursor:default;
|
||||
border-color: silver;
|
||||
color: silver;
|
||||
}
|
||||
.sp-dd {
|
||||
padding: 2px 0;
|
||||
height: 16px;
|
||||
line-height: 16px;
|
||||
float:left;
|
||||
font-size:10px;
|
||||
}
|
||||
.sp-preview
|
||||
{
|
||||
position:relative;
|
||||
width:25px;
|
||||
height: 20px;
|
||||
border: solid 1px #222;
|
||||
margin-right: 5px;
|
||||
float:left;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.sp-palette
|
||||
{
|
||||
*width: 220px;
|
||||
max-width: 220px;
|
||||
}
|
||||
.sp-palette .sp-thumb-el
|
||||
{
|
||||
width:16px;
|
||||
height: 16px;
|
||||
margin:2px 1px;
|
||||
border: solid 1px #d0d0d0;
|
||||
}
|
||||
|
||||
.sp-container
|
||||
{
|
||||
padding-bottom:0;
|
||||
}
|
||||
|
||||
|
||||
/* Buttons: http://hellohappy.org/css3-buttons/ */
|
||||
.sp-container button {
|
||||
background-color: #eeeeee;
|
||||
background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc);
|
||||
background-image: -moz-linear-gradient(top, #eeeeee, #cccccc);
|
||||
background-image: -ms-linear-gradient(top, #eeeeee, #cccccc);
|
||||
background-image: -o-linear-gradient(top, #eeeeee, #cccccc);
|
||||
background-image: -ms-linear-gradient(top, #eeeeee, #cccccc);
|
||||
background-image: linear-gradient(to bottom, #eeeeee, #cccccc);
|
||||
border: 1px solid #ccc;
|
||||
border-bottom: 1px solid #bbb;
|
||||
border-radius: 3px;
|
||||
color: #333;
|
||||
font-size: 14px;
|
||||
line-height: 1;
|
||||
padding: 5px 4px;
|
||||
text-align: center;
|
||||
text-shadow: 0 1px 0 #eee;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.sp-container button:hover {
|
||||
background-color: #dddddd;
|
||||
background-image: -webkit-linear-gradient(top, #dddddd, #bbbbbb);
|
||||
background-image: -moz-linear-gradient(top, #dddddd, #bbbbbb);
|
||||
background-image: -ms-linear-gradient(top, #dddddd, #bbbbbb);
|
||||
background-image: -o-linear-gradient(top, #dddddd, #bbbbbb);
|
||||
background-image: -ms-linear-gradient(top, #dddddd, #bbbbbb);
|
||||
background-image: linear-gradient(to bottom, #dddddd, #bbbbbb);
|
||||
border: 1px solid #bbb;
|
||||
border-bottom: 1px solid #999;
|
||||
cursor: pointer;
|
||||
text-shadow: 0 1px 0 #ddd;
|
||||
}
|
||||
.sp-container button:active {
|
||||
border: 1px solid #aaa;
|
||||
border-bottom: 1px solid #888;
|
||||
-webkit-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
|
||||
-moz-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
|
||||
-ms-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
|
||||
-o-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
|
||||
box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
|
||||
}
|
||||
.sp-cancel
|
||||
{
|
||||
font-size: 11px;
|
||||
color: #d93f3f !important;
|
||||
margin:0;
|
||||
padding:2px;
|
||||
margin-right: 5px;
|
||||
vertical-align: middle;
|
||||
text-decoration:none;
|
||||
|
||||
}
|
||||
.sp-cancel:hover
|
||||
{
|
||||
color: #d93f3f !important;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
|
||||
.sp-palette span:hover, .sp-palette span.sp-thumb-active
|
||||
{
|
||||
border-color: #000;
|
||||
}
|
||||
|
||||
.sp-preview, .sp-alpha, .sp-thumb-el
|
||||
{
|
||||
position:relative;
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==);
|
||||
}
|
||||
.sp-preview-inner, .sp-alpha-inner, .sp-thumb-inner
|
||||
{
|
||||
display:block;
|
||||
position:absolute;
|
||||
top:0;left:0;bottom:0;right:0;
|
||||
}
|
||||
|
||||
.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner
|
||||
{
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=);
|
||||
}
|
||||
|
||||
.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner
|
||||
{
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=);
|
||||
}
|
||||
|
|
@ -32,5 +32,9 @@ class Admin::ConferenceController < ApplicationController
|
|||
|
||||
def show
|
||||
@conference = Conference.find_all_by_short_title(params[:id]).first
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.json { render :json => @conference.to_json }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,19 +1,34 @@
|
|||
class Admin::EventsController < ApplicationController
|
||||
before_filter :verify_organizer
|
||||
layout "admin"
|
||||
around_filter :set_timezone_for_this_request
|
||||
|
||||
def set_timezone_for_this_request(&block)
|
||||
Time.use_zone(@conference.timezone, &block)
|
||||
end
|
||||
|
||||
def index
|
||||
@events = @conference.events
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.json { render :json => Event.where(:state => :confirmed) }
|
||||
end
|
||||
end
|
||||
|
||||
def show
|
||||
@event = @conference.events.find(params[:id])
|
||||
@tracks = Track.all
|
||||
@comments = @event.root_comments
|
||||
@comment_count = @event.comment_threads.count
|
||||
end
|
||||
|
||||
def edit
|
||||
@event = @conference.events.find(params[:id])
|
||||
@event_types = @conference.event_types
|
||||
@tracks = Track.all
|
||||
@comments = @event.root_comments
|
||||
@comment_count = @event.comment_threads.count
|
||||
|
||||
@event = Event.find_by_id(params[:id])
|
||||
@person = @event.submitter
|
||||
@url = edit_admin_conference_event_path(@conference.short_title, @event)
|
||||
|
|
@ -27,8 +42,17 @@ class Admin::EventsController < ApplicationController
|
|||
comment.move_to_child_of(params[:parent])
|
||||
end
|
||||
|
||||
redirect_to admin_conference_event_path(:conference_id => @conference.short_title, :id => params[:id])
|
||||
redirect_to admin_conference_event_path(:conference_id => @conference.short_title)
|
||||
end
|
||||
|
||||
def update
|
||||
@event = Event.find(params[:id])
|
||||
if params.has_key? :track_id
|
||||
@event.update_attribute(:track_id, params[:track_id])
|
||||
end
|
||||
redirect_to(admin_conference_event_path(@conference.short_title, @event), :notice => "Updated")
|
||||
end
|
||||
|
||||
def create
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -3,11 +3,48 @@ class Admin::ScheduleController < ApplicationController
|
|||
layout "schedule"
|
||||
|
||||
def show
|
||||
if @conference.nil?
|
||||
redirect_to admin_conference_index_path
|
||||
return
|
||||
end
|
||||
@dates = @conference.start_date..@conference.end_date
|
||||
@tracks = @conference.tracks
|
||||
@rooms = @conference.rooms
|
||||
end
|
||||
|
||||
def update
|
||||
event = Event.where(:guid => params[:event]).first
|
||||
error_message = nil
|
||||
if event.nil?
|
||||
error_message = "Could not find event GUID: #{params[:event]}"
|
||||
end
|
||||
|
||||
if params[:date] == "none"
|
||||
event.start_time = nil
|
||||
event.room = nil
|
||||
event.save!
|
||||
render :json => {"status" => "ok"}
|
||||
return
|
||||
end
|
||||
room = Room.where(:guid => params[:room]).first
|
||||
if room.nil?
|
||||
error_message = "Could not find room GUID: #{params[:room]}"
|
||||
end
|
||||
|
||||
if !error_message.nil?
|
||||
render :json => {"status" => "error", "message" => error_message}, :status => 500
|
||||
return
|
||||
end
|
||||
|
||||
event.room = room
|
||||
time = "#{params[:date]} #{params[:time]}"
|
||||
|
||||
Rails.logger.debug("Loading #{time}")
|
||||
zone = ActiveSupport::TimeZone::new(@conference.timezone)
|
||||
startTime = DateTime.strptime(time + zone.formatted_offset, "%Y-%m-%d %k:%M %Z")
|
||||
event.start_time = startTime
|
||||
event.save!
|
||||
render :json => {"status" => "ok"}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@ class Admin::TracksController < ApplicationController
|
|||
layout "admin"
|
||||
|
||||
def show
|
||||
render :tracks_list
|
||||
respond_to do |format|
|
||||
format.html { render :tracks_list}
|
||||
format.json { render :json => @conference.tracks.to_json }
|
||||
end
|
||||
end
|
||||
|
||||
def update
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
class ApplicationController < ActionController::Base
|
||||
include ApplicationHelper
|
||||
|
||||
protect_from_forgery
|
||||
|
||||
def verify_user
|
||||
|
|
@ -8,7 +7,7 @@ class ApplicationController < ActionController::Base
|
|||
|
||||
if (current_user.nil?)
|
||||
redirect_to '/accounts/sign_in'
|
||||
return
|
||||
return false
|
||||
end
|
||||
|
||||
@conference = Conference.find_all_by_short_title(params[:conference_id]).first
|
||||
|
|
@ -19,14 +18,18 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
|
||||
def verify_organizer
|
||||
verify_user
|
||||
if !verify_user
|
||||
return
|
||||
end
|
||||
|
||||
## Todo simplify this
|
||||
redirect_to '/' unless has_role?(current_user, 'admin') || has_role?(current_user, 'organizer')
|
||||
end
|
||||
|
||||
def verify_admin
|
||||
verify_user
|
||||
if !verify_user
|
||||
return
|
||||
end
|
||||
|
||||
redirect_to '/' unless has_role?(current_user, 'admin')
|
||||
end
|
||||
|
|
|
|||
|
|
@ -49,6 +49,15 @@ class EventAttachmentsController < ApplicationController
|
|||
params[:event_attachment][:public] = false
|
||||
params[:event_attachment][:event_id] = params[:proposal_id]
|
||||
|
||||
if !organizer_or_admin?
|
||||
begin
|
||||
event = current_user.person.events.find(params[:proposal_id])
|
||||
rescue Exception => e
|
||||
# They certainly aren't allowed to attach a file to someone else's proposal
|
||||
raise ActionController::RoutingError.new('Invalid proposal')
|
||||
end
|
||||
end
|
||||
|
||||
if params.has_key?(:public)
|
||||
params[:event_attachment][:public] = true
|
||||
end
|
||||
|
|
@ -86,11 +95,17 @@ class EventAttachmentsController < ApplicationController
|
|||
end
|
||||
|
||||
def destroy
|
||||
@proposal = current_user.person.events.find(params[:proposal_id])
|
||||
@upload = @proposal.event_attachments.find(params[:id])
|
||||
@upload.destroy
|
||||
if organizer_or_admin?
|
||||
@upload = Upload.find(params[:id])
|
||||
else
|
||||
@proposal = current_user.person.events.find(params[:proposal_id])
|
||||
@upload = @proposal.event_attachments.find(params[:id])
|
||||
end
|
||||
|
||||
@upload.destroy if !@upload.nil?
|
||||
|
||||
respond_to do |format|
|
||||
|
||||
format.html { redirect_to uploads_url }
|
||||
format.json { head :no_content }
|
||||
end
|
||||
|
|
|
|||
|
|
@ -7,13 +7,15 @@ class ProposalController < ApplicationController
|
|||
if params.has_key? :proposal_id
|
||||
params[:id] = params[:proposal_id]
|
||||
end
|
||||
|
||||
begin
|
||||
if !organizer_or_admin?
|
||||
@event = @person.event.find(params[:id])
|
||||
@event = @person.events.find(params[:id])
|
||||
else
|
||||
@event = Event.find(params[:id])
|
||||
end
|
||||
rescue Exception => e
|
||||
Rails.logger.debug("Proposal failure in verify_access: #{e.message}")
|
||||
redirect_to(conference_proposal_index_path(:conference_id => @conference.short_title), :alert => 'Invalid or uneditable proposal.')
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -13,6 +13,10 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
def has_role?(current_user, role)
|
||||
if current_user.nil?
|
||||
return false
|
||||
end
|
||||
|
||||
return !!current_user.role?(role.to_s.camelize)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ class Event < ActiveRecord::Base
|
|||
include ActiveRecord::Transitions
|
||||
has_paper_trail
|
||||
attr_accessible :title, :subtitle, :abstract, :description, :event_type_id, :people_attributes, :person,
|
||||
:proposal_additional_speakers
|
||||
:proposal_additional_speakers, :track_id
|
||||
acts_as_commentable
|
||||
|
||||
has_many :event_people, :dependent => :destroy
|
||||
|
|
@ -61,7 +61,28 @@ class Event < ActiveRecord::Base
|
|||
nil
|
||||
end
|
||||
end
|
||||
def as_json(options)
|
||||
json = super(options)
|
||||
|
||||
if self.room.nil?
|
||||
json[:room_guid] = nil
|
||||
else
|
||||
json[:room_guid] = self.room.guid
|
||||
end
|
||||
|
||||
if self.track.nil?
|
||||
json[:track_color] = "#ffffff"
|
||||
else
|
||||
json[:track_color] = self.track.color;
|
||||
end
|
||||
if self.event_type.nil?
|
||||
json[:length] = 25
|
||||
else
|
||||
json[:length] = self.event_type.length
|
||||
end
|
||||
|
||||
json
|
||||
end
|
||||
def transition_possible?(transition)
|
||||
self.class.state_machine.events_for(self.current_state).include?(transition)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -5,8 +5,10 @@
|
|||
%i= @event.subtitle
|
||||
|
||||
.span2
|
||||
= link_to "Edit Submission", edit_admin_conference_event_path(@conference.short_title, @event),
|
||||
:class => "btn btn-mini btn-primary pull-right", :style => "margin-top:20px;"
|
||||
-#= link_to "Edit Submission", edit_admin_conference_event_path(@conference.short_title, @event),
|
||||
-# :class => "btn btn-mini btn-primary pull-right", :style => "margin-top:20px;", :onclick => "javascript:alert('Not ready yet');"
|
||||
= link_to "Edit Submission", "#",
|
||||
:class => "btn btn-mini btn-primary pull-right", :style => "margin-top:20px;", :onclick => "javascript:alert('Not ready yet');"
|
||||
|
||||
.row-fluid
|
||||
.span12
|
||||
|
|
@ -36,12 +38,38 @@
|
|||
- if @event.transition_possible? :cancel
|
||||
%li= link_to "Cancel event", update_state_admin_conference_event_path(@conference.short_title, @event, :transition => :cancel),
|
||||
:method => :put, :hint => "Mark this event as cancelled. Usually this means that the speakers had to cancel their appearance."
|
||||
|
||||
%tr
|
||||
%td
|
||||
%b Track
|
||||
%td
|
||||
.dropdown
|
||||
= link_to "#", :class => "dropdown-toggle", :id => "track-dropdown" do
|
||||
- if @event.track.nil?
|
||||
Track
|
||||
- else
|
||||
= @event.track.name
|
||||
<b class="caret"></b>
|
||||
%ul.dropdown-menu
|
||||
- @tracks.each do |track|
|
||||
%li= link_to track.name, admin_conference_event_path(@conference.short_title, @event, :track_id => track.id) ,
|
||||
:method => :put, :track_id => track.id
|
||||
- if !@event.room.nil?
|
||||
%tr
|
||||
%td
|
||||
%b Room
|
||||
%td
|
||||
= @event.room.name
|
||||
- if !@event.start_time.nil?
|
||||
%tr
|
||||
%td
|
||||
%b Scheduled time
|
||||
%td
|
||||
= @event.start_time
|
||||
%tr
|
||||
%td
|
||||
%b Submitter
|
||||
%td
|
||||
= link_to @event.submitter.public_name, admin_person_path(@conference.short_title, @event.submitter)
|
||||
= link_to @event.submitter.public_name, admin_person_path(@event.submitter)
|
||||
(
|
||||
= link_to @event.submitter.email, "mailto: #{@event.submitter.email}"
|
||||
)
|
||||
|
|
@ -109,4 +137,4 @@
|
|||
%br
|
||||
- @comments.each do |comment|
|
||||
%div
|
||||
= raw format_comments(comment)
|
||||
= raw format_comments(comment)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,22 @@
|
|||
- @tracks.each do |track|
|
||||
.schedule-track-column-header
|
||||
= track.name
|
||||
.schedule-track-column
|
||||
.schedule-time-column
|
||||
.schedule-time-column-header
|
||||
= Time
|
||||
- (7..23).each do |hour|
|
||||
.schedule-time-slot
|
||||
= "#{hour}:00"
|
||||
.schedule-time-slot
|
||||
= "#{hour}:15"
|
||||
.schedule-time-slot
|
||||
= "#{hour}:30"
|
||||
.schedule-time-slot
|
||||
= "#{hour}:45"
|
||||
|
||||
- @rooms.each do |room|
|
||||
.schedule-room-column{:id => "schedule-room-#{room.guid}", "room-guid" => room.guid}
|
||||
.schedule-room-column-header
|
||||
= room.name
|
||||
- (7..23).each do |hour|
|
||||
.schedule-room-slot{:id => "schedule-room-#{room.guid}-#{hour}-0", "room-guid" => room.guid, "hour" => "#{hour}:00"}
|
||||
.schedule-room-slot{:id => "schedule-room-#{room.guid}-#{hour}-15", "room-guid" => room.guid, "hour" => "#{hour}:15"}
|
||||
.schedule-room-slot{:id => "schedule-room-#{room.guid}-#{hour}-30", "room-guid" => room.guid, "hour" => "#{hour}:30"}
|
||||
.schedule-room-slot{:id => "schedule-room-#{room.guid}-#{hour}-45", "room-guid" => room.guid, "hour" => "#{hour}:45"}
|
||||
|
|
@ -1,43 +1,48 @@
|
|||
.schedule-content
|
||||
.unscheduled
|
||||
Unscheduled Events
|
||||
#test1.schedule-event
|
||||
Test
|
||||
#test2.schedule-event
|
||||
Test2
|
||||
.schedule
|
||||
.tabbable
|
||||
%ul.nav.nav-tabs
|
||||
%h2
|
||||
= "Schedule for #{@conference.title}"
|
||||
#unscheduled.unscheduled
|
||||
.unscheduled-header
|
||||
Unscheduled Events
|
||||
#schedule.schedule
|
||||
.schedule-dates-header
|
||||
%ul#date-tabs
|
||||
- @dates.each do |date|
|
||||
-if date == @dates.first
|
||||
%li.active
|
||||
= link_to "#{date}", "##{date}-content", "data-toggle"=>"tab"
|
||||
- else
|
||||
%li
|
||||
= link_to "#{date}", "##{date}-content", "data-toggle"=>"tab"
|
||||
.tab-content
|
||||
- @dates.each do |date|
|
||||
- if date == @dates.first
|
||||
.tab-pane.active{:id => "#{date}-content"}
|
||||
= render 'day_tab'
|
||||
- else
|
||||
.tab-pane{:id => "#{date}-content"}
|
||||
= render 'day_tab'
|
||||
%li.date-selector
|
||||
= link_to "#{date}", "#", :id => "#{date}-selector", :onclick => "Schedule.changeDay('#{date}')"
|
||||
.schedule-rooms-container
|
||||
= render 'day_tab'
|
||||
|
||||
:javascript
|
||||
$(document).ready( function() {
|
||||
$('.schedule-track-column').droppable({
|
||||
accept: '.schedule-event',
|
||||
drop: function(event, ui) {
|
||||
var evtName = ui.draggable.text();
|
||||
var evtDay = $(this).attr('title');
|
||||
alert('Moved \'' + evtName + '\' to ' + evtDay);
|
||||
}
|
||||
});
|
||||
$('.schedule-event').draggable({
|
||||
grid: [150,20],
|
||||
containment: '.schedule-content',
|
||||
opacity: 0.7,
|
||||
zIndex: 2
|
||||
});
|
||||
//Schedule.loadDaysAndTracks("#{@conference.short_title}");
|
||||
var conference = "#{@conference.short_title}"
|
||||
Schedule.loadEvents("#{@conference.short_title}", "#{@dates.first}");
|
||||
$('.schedule-room-slot').droppable({
|
||||
accept: '.schedule-event',
|
||||
tolerance: "pointer",
|
||||
drop: function(event, ui) {
|
||||
$(ui.draggable).appendTo(this);
|
||||
var myId = $(ui.draggable).attr("guid");
|
||||
var myRoom = $(this).attr("room-guid")
|
||||
var myDate = $(this).attr("date");
|
||||
var myTime = $(this).attr("hour");
|
||||
var length = $(ui.draggable).attr("length");
|
||||
$(ui.draggable).css("left", 0);
|
||||
$(ui.draggable).css("top", 0);
|
||||
$(this).css("background-color", "#ffffff");
|
||||
|
||||
// 15 minute slots on the schedule are 30px,
|
||||
// thus the magic multiplier here
|
||||
$(ui.draggable).height(length * 2 - 7);
|
||||
$(ui.draggable).width($(this).width() - 10);
|
||||
Schedule.save(conference, myId, myRoom, myDate, myTime);
|
||||
},
|
||||
over: function(event, ui) {
|
||||
$(this).css("background-color", "#009ED8");
|
||||
},
|
||||
out: function(event, ui) {
|
||||
$(this).css("background-color", "#ffffff");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<div class="nested-fields">
|
||||
<%= f.inputs do %>
|
||||
<%= f.input :name %>
|
||||
<%= f.input :color, :input_html => {:size => 6} %>
|
||||
<%= f.input :color, :input_html => {:size => 6, :type => "color"}, :required=> true %>
|
||||
<%= f.input :description, :input_html => {:rows => 2 } %>
|
||||
<%= remove_association_link :track, f %>
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -17,25 +17,14 @@
|
|||
.span4
|
||||
- if conference.registration_open?
|
||||
- if conference.user_registered?(current_user)
|
||||
= link_to "Modify Registration", register_conference_path(conference.short_title), :class => "mainbutton center-text"
|
||||
%br
|
||||
%i.icon-thumbs-up You're attending!
|
||||
= link_to "Modify Registration", register_conference_path(conference.short_title), :class => "btn btn-success btn-large"
|
||||
|
||||
- else
|
||||
= link_to "Register", register_conference_path(conference.short_title), :class => "mainbutton center-text"
|
||||
%br
|
||||
- if !current_user.nil?
|
||||
%i.icon-thumbs-down
|
||||
You haven't registered yet!
|
||||
= link_to "Register", register_conference_path(conference.short_title), :class => "btn btn-success btn-large"
|
||||
- else
|
||||
%b Registration is closed.
|
||||
.span4.offset4.pull-right
|
||||
- if !current_user.nil? && current_user.person.proposal_count(conference) > 0
|
||||
= link_to "View My Proposals", conference_proposal_index_path(conference.short_title), :class => "mainbutton center-text"
|
||||
%br
|
||||
- if !current_user.nil?
|
||||
%i.icon-star
|
||||
You've submitted
|
||||
%b= current_user.person.proposal_count conference
|
||||
proposals!
|
||||
= link_to "View My Proposals", conference_proposal_index_path(conference.short_title), :class => "btn btn-success btn-large"
|
||||
- else
|
||||
= link_to "Submit Proposal", conference_proposal_index_path(conference.short_title), :class => "mainbutton center-text"
|
||||
= link_to "Submit Proposal", conference_proposal_index_path(conference.short_title), :class => "btn btn-success btn-large"
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
%title= content_for?(:title) ? yield(:title) : "Admin"
|
||||
%meta{:content => "", :name => "description"}
|
||||
%meta{:content => "", :name => "author"}
|
||||
= stylesheet_link_tag "application", :media => "all"
|
||||
= stylesheet_link_tag "application"
|
||||
= javascript_include_tag "application"
|
||||
= csrf_meta_tags
|
||||
= yield(:head)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
%title= content_for?(:title) ? yield(:title) : "OSEM"
|
||||
%meta{:content => "", :name => "description"}
|
||||
%meta{:content => "", :name => "author"}
|
||||
= stylesheet_link_tag "application", :media => "all"
|
||||
= stylesheet_link_tag "application"
|
||||
= javascript_include_tag "application"
|
||||
= csrf_meta_tags
|
||||
= yield(:head)
|
||||
|
|
|
|||
|
|
@ -6,17 +6,15 @@
|
|||
%title= content_for?(:title) ? yield(:title) : "OSEM"
|
||||
%meta{:content => "", :name => "description"}
|
||||
%meta{:content => "", :name => "author"}
|
||||
= stylesheet_link_tag "application", :media => "all"
|
||||
= javascript_include_tag "application"
|
||||
= stylesheet_link_tag "/stylesheets/schedule/jquery-ui-1.9.2.custom.min"
|
||||
= stylesheet_link_tag "/stylesheets/schedule/schedule"
|
||||
|
||||
= javascript_include_tag "/javascripts/schedule/jquery-1.8.3"
|
||||
= javascript_include_tag "/javascripts/schedule/jquery-ui-1.9.2.custom.min"
|
||||
= javascript_include_tag "/javascripts/schedule/date.format"
|
||||
= javascript_include_tag "/javascripts/schedule/schedule"
|
||||
= csrf_meta_tags
|
||||
= yield(:head)
|
||||
%body
|
||||
.navbar.navbar-fixed-top
|
||||
.navbar-inner
|
||||
.container-fluid
|
||||
= render 'layouts/admin_navigation'
|
||||
= render 'layouts/messages'
|
||||
.content
|
||||
#wrap
|
||||
#inner-content
|
||||
= yield
|
||||
= yield
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
= link_to "Attachments", "#attachment-content", "data-toggle"=>"tab"
|
||||
.tab-content
|
||||
#proposal-content.tab-pane.active
|
||||
= render 'proposal_form'
|
||||
= render 'proposal/proposal_form'
|
||||
#attachment-content.tab-pane
|
||||
.span12
|
||||
= form_for EventAttachment.new, :url => conference_proposal_event_attachment_index_path(@conference.short_title, @event),
|
||||
|
|
@ -41,6 +41,17 @@
|
|||
}
|
||||
data.formData = inputs.serializeArray();
|
||||
});
|
||||
$.getJSON($('#fileupload').prop('action'), function (files) {
|
||||
var fu = $('#fileupload').data('fileupload'),
|
||||
template;
|
||||
fu._adjustMaxNumberOfFiles(-files.length);
|
||||
template = fu._renderDownload(files)
|
||||
.appendTo($('#fileupload .files'));
|
||||
fu._reflow = fu._transition && template.length &&
|
||||
template[0].offsetWidth;
|
||||
template.addClass('in');
|
||||
$('#loading').remove();
|
||||
});
|
||||
|
||||
} );
|
||||
|
||||
|
|
|
|||