Merge 3427233057 into 00c095d054
This commit is contained in:
commit
8541e47f88
7 changed files with 30 additions and 31 deletions
1
Gemfile
1
Gemfile
|
|
@ -48,6 +48,7 @@ gem 'omniauth-github'
|
|||
# as authorization framework
|
||||
gem 'cancancan'
|
||||
|
||||
gem 'toastr_rails'
|
||||
# for roles
|
||||
gem 'rolify'
|
||||
|
||||
|
|
|
|||
|
|
@ -497,6 +497,7 @@ GEM
|
|||
timecop (0.7.1)
|
||||
timers (1.1.0)
|
||||
tins (1.6.0)
|
||||
toastr_rails (2.1.3)
|
||||
transitions (0.1.12)
|
||||
ttfunk (1.1.1)
|
||||
turbolinks (2.5.3)
|
||||
|
|
@ -628,6 +629,7 @@ DEPENDENCIES
|
|||
stripe
|
||||
stripe-ruby-mock
|
||||
timecop
|
||||
toastr_rails
|
||||
transitions
|
||||
turbolinks
|
||||
uglifier (>= 1.3.0)
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
// GO AFTER THE REQUIRES BELOW.
|
||||
//
|
||||
//= require jquery
|
||||
//= require toastr_rails
|
||||
//= require jquery_ujs
|
||||
//= require jquery.mobile.custom.min
|
||||
//= require jquery.ui.draggable
|
||||
|
|
@ -48,11 +49,28 @@
|
|||
//= require countable
|
||||
|
||||
$(document).ready(function() {
|
||||
$('a[disabled=disabled]').click(function(event){
|
||||
return false;
|
||||
});
|
||||
$('a[disabled=disabled]').click(function(event){
|
||||
return false;
|
||||
});
|
||||
|
||||
$('body').smoothScroll({
|
||||
delegateSelector: 'a.smoothscroll'
|
||||
});
|
||||
toastr.options = {
|
||||
'closeButton': false,
|
||||
'debug': false,
|
||||
'newestOnTop': false,
|
||||
'progressBar': true,
|
||||
'positionClass': 'toast-top-center',
|
||||
'preventDuplicates': true,
|
||||
'onclick': null,
|
||||
'showDuration': '300',
|
||||
'hideDuration': '100',
|
||||
'timeOut': '5000',
|
||||
'extendedTimeOut': '1000',
|
||||
'showEasing': 'swing',
|
||||
'hideEasing': 'linear',
|
||||
'showMethod': 'fadeIn',
|
||||
'hideMethod': 'fadeOut'
|
||||
};
|
||||
$('body').smoothScroll({
|
||||
delegateSelector: 'a.smoothscroll'
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -15,4 +15,5 @@
|
|||
*= require leaflet
|
||||
*= require bootstrap3-switch
|
||||
*= require osem-payments
|
||||
*= require toastr_rails
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -133,21 +133,6 @@ module ApplicationHelper
|
|||
result
|
||||
end
|
||||
|
||||
def bootstrap_class_for(flash_type)
|
||||
case flash_type
|
||||
when 'success'
|
||||
'alert-success'
|
||||
when 'error'
|
||||
'alert-danger'
|
||||
when 'alert'
|
||||
'alert-warning'
|
||||
when 'notice'
|
||||
'alert-info'
|
||||
else
|
||||
'alert-warning'
|
||||
end
|
||||
end
|
||||
|
||||
def label_for(event_state)
|
||||
result = ''
|
||||
case event_state
|
||||
|
|
|
|||
|
|
@ -6,12 +6,4 @@
|
|||
%h2
|
||||
JavaScript is not enabled
|
||||
%p
|
||||
OSEM requires JavaScript to be enabled to function. Please turn on JavaScript in your browser's settings and reload the page to continue.
|
||||
- flash.each do |type, message|
|
||||
.row
|
||||
.col-md-12
|
||||
%div{:class=>"alert alert-dismissable #{bootstrap_class_for(type)}", :id=>"flash"}
|
||||
.button.close{"data-dismiss" => "alert", "aria-hidden"=>"true"}
|
||||
×
|
||||
%p
|
||||
= message
|
||||
OSEM requires JavaScript to be enabled to function. Please turn on JavaScript in your browser's settings and reload the page to continue.
|
||||
|
|
@ -18,10 +18,10 @@
|
|||
};
|
||||
= content_for(:script_head)
|
||||
= javascript_include_tag "//cdn.transifex.com/live.js"
|
||||
|
||||
= yield(:head)
|
||||
%body
|
||||
= render 'layouts/navigation'
|
||||
= render 'toastr_rails/flash'
|
||||
-# Admin area
|
||||
- if controller.class.name.split("::").first=="Admin"
|
||||
= render 'layouts/admin'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue