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