Skip to content

Commit

Permalink
Merge branch 'release/0.2.5.1'
Browse files Browse the repository at this point in the history
* release/0.2.5.1:
  add font-awesome to admin panel
  some fixes
  add role for member input
  upgrade to Rails 4.2.1
  add paginate
  add pagination
  add tags news buttons
  fix arrows
  fix events
  • Loading branch information
kalashnikovisme committed Jun 8, 2015
2 parents 79011bd + acbe0e0 commit a67cdbe
Show file tree
Hide file tree
Showing 47 changed files with 276 additions and 146 deletions.
5 changes: 3 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
source 'https://rubygems.org'


gem 'rails', '4.2.0'
gem 'rails', '4.2.1'
gem 'pg'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
Expand Down Expand Up @@ -47,6 +46,8 @@ gem "autoprefixer-rails"
gem 'select2-rails'
gem 'jasny_bootstrap_extension_rails'
gem 'sinatra', '>= 1.3.0', require: nil
gem 'kaminari'
gem 'bootstrap-kaminari-views'

group :production do
gem 'unicorn-rails'
Expand Down
98 changes: 53 additions & 45 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ GIT

GIT
remote: git://github.com/galetahub/ckeditor.git
revision: 46f5ac6db09331692b54d22454b8f4bdf4039bc4
revision: 289251c32cd3db9c908bac75678f58f95258ea97
specs:
ckeditor (4.1.2)
cocaine
Expand Down Expand Up @@ -51,9 +51,9 @@ GIT

GIT
remote: https://github.com/fnando/i18n-js
revision: 78030390e36529b2611f960bda88df1d9e01aafd
revision: a3db398cf386116ceceb49a68b03bee5f66ffc58
specs:
i18n-js (3.0.0.rc9)
i18n-js (3.0.0.rc10)
i18n (~> 0.6)

GIT
Expand All @@ -65,36 +65,36 @@ GIT
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.2.0)
actionpack (= 4.2.0)
actionview (= 4.2.0)
activejob (= 4.2.0)
actionmailer (4.2.1)
actionpack (= 4.2.1)
actionview (= 4.2.1)
activejob (= 4.2.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.0)
actionview (= 4.2.0)
activesupport (= 4.2.0)
rack (~> 1.6.0)
actionpack (4.2.1)
actionview (= 4.2.1)
activesupport (= 4.2.1)
rack (~> 1.6)
rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.1)
actionview (4.2.0)
activesupport (= 4.2.0)
actionview (4.2.1)
activesupport (= 4.2.1)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.1)
activejob (4.2.0)
activesupport (= 4.2.0)
activejob (4.2.1)
activesupport (= 4.2.1)
globalid (>= 0.3.0)
activemodel (4.2.0)
activesupport (= 4.2.0)
activemodel (4.2.1)
activesupport (= 4.2.1)
builder (~> 3.1)
activerecord (4.2.0)
activemodel (= 4.2.0)
activesupport (= 4.2.0)
activerecord (4.2.1)
activemodel (= 4.2.1)
activesupport (= 4.2.1)
arel (~> 6.0)
activesupport (4.2.0)
activesupport (4.2.1)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
Expand All @@ -105,7 +105,7 @@ GEM
authority (3.0.0)
activesupport (>= 3.0.0)
rake (>= 0.8.7)
autoprefixer-rails (5.1.11)
autoprefixer-rails (5.2.0)
execjs
json
awesome_print (1.6.1)
Expand All @@ -116,6 +116,9 @@ GEM
rack (>= 0.9.0)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
bootstrap-kaminari-views (0.0.5)
kaminari (>= 0.13)
rails (>= 3.1)
bootstrap-sass (3.3.4.1)
autoprefixer-rails (>= 5.0.0.1)
sass (>= 3.2.19)
Expand Down Expand Up @@ -238,7 +241,7 @@ GEM
haml (>= 4.0.6, < 5.0)
html2haml (>= 1.0.1)
railties (>= 4.0.1)
hashie (3.4.1)
hashie (3.4.2)
hitimes (1.2.2)
html2haml (2.0.0)
erubis (~> 2.7.0)
Expand All @@ -262,8 +265,11 @@ GEM
js-routes (1.0.1)
railties (>= 3.2)
sprockets-rails
json (1.8.2)
json (1.8.3)
jwt (1.5.0)
kaminari (0.16.3)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
kgio (2.9.3)
libv8 (3.16.14.7)
listen (2.10.0)
Expand All @@ -276,10 +282,10 @@ GEM
mail (2.6.3)
mime-types (>= 1.16, < 3)
method_source (0.8.2)
mime-types (2.5)
mini_magick (4.2.4)
mime-types (2.6.1)
mini_magick (4.2.7)
mini_portile (0.6.2)
minitest (5.6.1)
minitest (5.7.0)
multi_json (1.11.0)
multi_xml (0.5.5)
multipart-post (2.0.0)
Expand Down Expand Up @@ -342,16 +348,16 @@ GEM
rack-test (0.6.3)
rack (>= 1.0)
railroady (1.3.0)
rails (4.2.0)
actionmailer (= 4.2.0)
actionpack (= 4.2.0)
actionview (= 4.2.0)
activejob (= 4.2.0)
activemodel (= 4.2.0)
activerecord (= 4.2.0)
activesupport (= 4.2.0)
rails (4.2.1)
actionmailer (= 4.2.1)
actionpack (= 4.2.1)
actionview (= 4.2.1)
activejob (= 4.2.1)
activemodel (= 4.2.1)
activerecord (= 4.2.1)
activesupport (= 4.2.1)
bundler (>= 1.3.0, < 2.0)
railties (= 4.2.0)
railties (= 4.2.1)
sprockets-rails
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
Expand All @@ -361,9 +367,9 @@ GEM
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.2)
loofah (~> 2.0)
railties (4.2.0)
actionpack (= 4.2.0)
activesupport (= 4.2.0)
railties (4.2.1)
actionpack (= 4.2.1)
activesupport (= 4.2.1)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
raindrops (0.13.0)
Expand All @@ -382,16 +388,16 @@ GEM
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 3.0)
netrc (~> 0.7)
rmagick (2.15.0)
ruby_parser (3.6.6)
rmagick (2.15.2)
ruby_parser (3.7.0)
sexp_processor (~> 4.1)
russian (0.6.0)
i18n (>= 0.5.0)
russian_sex (0.0.1)
unicode_utils (>= 1.4.0)
rvm-capistrano (1.5.0)
capistrano (>= 2.15.4)
sass (3.4.13)
sass (3.4.14)
sass-rails (5.0.3)
railties (>= 4.0.0, < 5.0)
sass (~> 3.1)
Expand All @@ -403,7 +409,7 @@ GEM
rdoc (~> 4.0)
select2-rails (3.5.9.3)
thor (~> 0.14)
sexp_processor (4.5.1)
sexp_processor (4.6.0)
shellany (0.0.1)
sidekiq (3.3.4)
celluloid (>= 0.16.0)
Expand All @@ -425,7 +431,7 @@ GEM
tilt (>= 1.3, < 3)
slop (3.6.0)
spring (1.3.4)
sprockets (3.1.0)
sprockets (3.2.0)
rack (~> 1.0)
sprockets-rails (2.3.1)
actionpack (>= 3.0)
Expand Down Expand Up @@ -479,6 +485,7 @@ DEPENDENCIES
awesome_print
bcrypt (~> 3.1.7)
better_errors
bootstrap-kaminari-views
bootstrap-sass
bootstrap_glyphicons-rails
byebug
Expand Down Expand Up @@ -514,6 +521,7 @@ DEPENDENCIES
jquery-rails
jquery-ui-rails
js-routes
kaminari
libv8 (= 3.16.14.7)
mini_magick
momentjs-rails (>= 2.9)!
Expand All @@ -527,7 +535,7 @@ DEPENDENCIES
quiet_assets
rack-livereload
railroady
rails (= 4.2.0)
rails (= 4.2.1)
rmagick
russian
russian_sex
Expand Down
Binary file removed app/assets/images/caret.png
Binary file not shown.
68 changes: 56 additions & 12 deletions app/assets/javascripts/web/welcome.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ $ ->
infinite: false
slidesToShow: 5
slidesToScroll: 5
prevArrow: $('.news .slider-arrows>.left-arrow')
nextArrow: $('.news .slider-arrows>.right-arrow')
prevArrow: $('.news .left-arrow')
nextArrow: $('.news .right-arrow')
}

init_slider = ->
Expand Down Expand Up @@ -39,9 +39,20 @@ $ ->
if $first_active_slide.prop('href') == ''
$('.news-slider .slick-track a').slice(-5).each ->
$(this).append spin()
load_news()
count = 5
params = {
count: count
offset: parseInt($('.news-slider .slick-track a').length) - count
tag: $news_slider.data('tag')
}
load_news params
return

remove_all_slides = ->
slideIndex = $('.news-slider .slick-track a').length - 1
while slideIndex >= 0
$news_slider.slick 'slickRemove', slideIndex--

text_news_template = ->
"
<a class='new-slider-item slick-slide'>
Expand Down Expand Up @@ -79,24 +90,57 @@ $ ->
return
return

load_news = ->
count = 5
offset = parseInt($('.news-slider .slick-track a').length) - count
load_news = (params) ->
$.ajax {
url: Routes.api_news_index_path()
method: 'GET'
data: {
count: count
offset: offset
}
data: params
dataType: 'json'
success: (response) ->
fill_news response
append_empty_items()
if params['tag'] == undefined
fill_news response
append_empty_items()
else
remove_all_slides()
append_empty_items()
fill_news response
append_empty_items()
error: ->
alert 'error'
}

edit_buttons = ($button, tag_params) ->
$news_slider.data('tag', tag_params)

reverse_buttons = ($button) ->
$news_slider.data('tag', '')

$('.category-navbar-container ul li').click ->
count = 5
data_type = $(this).data('type')
data_tag = $(this).data('tag')
if data_type == 'string'
tag_type = 'string'
text = data_tag
else
tag_type = 'link'
target_type = data_type
title = data_tag
params = {
count: count
offset: parseInt($('.news-slider .slick-track a').length) - count
tag: {
tag_type: tag_type
target_type: target_type
title: title
text: text
}
}
edit_buttons $(this), params['tag']
$('.news-slider .slick-track a').slice(-5).each ->
$(this).append spin()
load_news params

init_slider()

# Events
Expand Down
1 change: 1 addition & 0 deletions app/assets/stylesheets/web/admin/application.sass
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
@import 'bootstrap-sprockets'
@import 'bootstrap'
@import 'bootstrap-datetimepicker'
@import 'font-awesome'

.link
cursor: pointer
Expand Down
5 changes: 4 additions & 1 deletion app/assets/stylesheets/web/elements.scss
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,11 @@ hr.orange {

.mic-member {
@extend %mic-element;
&.participant {
width: auto;
}
img {
width: 100vw;
width: 15vw;
height: 15vw;
}
.role {
Expand Down
Loading

0 comments on commit a67cdbe

Please sign in to comment.