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
|
# as authorization framework
|
||||||
gem 'cancancan'
|
gem 'cancancan'
|
||||||
|
|
||||||
|
gem 'toastr_rails'
|
||||||
# for roles
|
# for roles
|
||||||
gem 'rolify'
|
gem 'rolify'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -497,6 +497,7 @@ GEM
|
||||||
timecop (0.7.1)
|
timecop (0.7.1)
|
||||||
timers (1.1.0)
|
timers (1.1.0)
|
||||||
tins (1.6.0)
|
tins (1.6.0)
|
||||||
|
toastr_rails (2.1.3)
|
||||||
transitions (0.1.12)
|
transitions (0.1.12)
|
||||||
ttfunk (1.1.1)
|
ttfunk (1.1.1)
|
||||||
turbolinks (2.5.3)
|
turbolinks (2.5.3)
|
||||||
|
|
@ -628,6 +629,7 @@ DEPENDENCIES
|
||||||
stripe
|
stripe
|
||||||
stripe-ruby-mock
|
stripe-ruby-mock
|
||||||
timecop
|
timecop
|
||||||
|
toastr_rails
|
||||||
transitions
|
transitions
|
||||||
turbolinks
|
turbolinks
|
||||||
uglifier (>= 1.3.0)
|
uglifier (>= 1.3.0)
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
// GO AFTER THE REQUIRES BELOW.
|
// GO AFTER THE REQUIRES BELOW.
|
||||||
//
|
//
|
||||||
//= require jquery
|
//= require jquery
|
||||||
|
//= require toastr_rails
|
||||||
//= require jquery_ujs
|
//= require jquery_ujs
|
||||||
//= require jquery.mobile.custom.min
|
//= require jquery.mobile.custom.min
|
||||||
//= require jquery.ui.draggable
|
//= require jquery.ui.draggable
|
||||||
|
|
@ -48,11 +49,28 @@
|
||||||
//= require countable
|
//= require countable
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('a[disabled=disabled]').click(function(event){
|
$('a[disabled=disabled]').click(function(event){
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
$('body').smoothScroll({
|
toastr.options = {
|
||||||
delegateSelector: 'a.smoothscroll'
|
'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 leaflet
|
||||||
*= require bootstrap3-switch
|
*= require bootstrap3-switch
|
||||||
*= require osem-payments
|
*= require osem-payments
|
||||||
|
*= require toastr_rails
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -133,21 +133,6 @@ module ApplicationHelper
|
||||||
result
|
result
|
||||||
end
|
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)
|
def label_for(event_state)
|
||||||
result = ''
|
result = ''
|
||||||
case event_state
|
case event_state
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,4 @@
|
||||||
%h2
|
%h2
|
||||||
JavaScript is not enabled
|
JavaScript is not enabled
|
||||||
%p
|
%p
|
||||||
OSEM requires JavaScript to be enabled to function. Please turn on JavaScript in your browser's settings and reload the page to continue.
|
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
|
|
||||||
|
|
@ -18,10 +18,10 @@
|
||||||
};
|
};
|
||||||
= content_for(:script_head)
|
= content_for(:script_head)
|
||||||
= javascript_include_tag "//cdn.transifex.com/live.js"
|
= javascript_include_tag "//cdn.transifex.com/live.js"
|
||||||
|
|
||||||
= yield(:head)
|
= yield(:head)
|
||||||
%body
|
%body
|
||||||
= render 'layouts/navigation'
|
= render 'layouts/navigation'
|
||||||
|
= render 'toastr_rails/flash'
|
||||||
-# Admin area
|
-# Admin area
|
||||||
- if controller.class.name.split("::").first=="Admin"
|
- if controller.class.name.split("::").first=="Admin"
|
||||||
= render 'layouts/admin'
|
= render 'layouts/admin'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue