update notification
This commit is contained in:
@@ -57,6 +57,7 @@ $(document).on('turbolinks:load', function() {
|
||||
var animateExit = $("#notify_message").attr('data-animate-exit');
|
||||
var colorName = $("#notify_message").attr('data-color-name');
|
||||
var text = $("#notify_message").attr('data-message');
|
||||
console.log(text);
|
||||
if (text != null || colorName != null){
|
||||
showNotification(colorName, text, placementFrom, placementAlign, animateEnter, animateExit);
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
//= require turbolinks
|
||||
//= require cable
|
||||
//= require jquery-slimscroll/jquery.slimscroll.js
|
||||
//= require bootstrap-notify/bootstrap-notify.js
|
||||
//= require node-waves/waves.js
|
||||
//= require sweetalert/sweetalert.min.js
|
||||
//= require BSBMaterial/admin.js
|
||||
|
||||
@@ -4,9 +4,10 @@ class BaseOrigamiController < ActionController::Base
|
||||
|
||||
#before_action :check_installation
|
||||
protect_from_forgery with: :exception
|
||||
|
||||
rescue_from CanCan::AccessDenied do |exception|
|
||||
flash[:warning] = exception.message
|
||||
puts "ssssssssssss"
|
||||
puts flash
|
||||
redirect_to origami_root_path
|
||||
end
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Origami::CashOutsController < ApplicationController#BaseOrigamiController
|
||||
class Origami::CashOutsController < BaseOrigamiController
|
||||
def new
|
||||
end
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Origami::PayparPaymentsController < ApplicationController#BaseOrigamiController
|
||||
class Origami::PayparPaymentsController < BaseOrigamiController
|
||||
def create
|
||||
sale_id = params[:sale_id]
|
||||
redeem_amount = params[:redeem_amount]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Origami::VoidController < ApplicationController
|
||||
class Origami::VoidController < BaseOrigamiController
|
||||
authorize_resource :class => false
|
||||
def overall_void
|
||||
|
||||
|
||||
@@ -48,14 +48,18 @@
|
||||
<!-- Main Content -->
|
||||
<section class="content">
|
||||
<% flash.each do |type, message| %>
|
||||
<% if !flash["errors"]%>
|
||||
<div class="alert fade in">
|
||||
<button class="close" aria-hidden="true" data-dismiss="alert" type="button">×</button>
|
||||
<%=message%>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
<% if type == "notice"
|
||||
color = "alert-success"
|
||||
elsif type == "error"
|
||||
color = "alert-danger"
|
||||
else
|
||||
color = "bg-black"
|
||||
end %>
|
||||
|
||||
<p id="notify_message" class="hidden" data-placement-from="top" data-message="<%=message%>" data-placement-align="center"
|
||||
data-animate-enter="" data-animate-exit="" data-color-name="<%=color%>" >
|
||||
</p>
|
||||
<% end %>
|
||||
<%= yield %>
|
||||
</section>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user