Code cleansing
This commit is contained in:
parent
15db7f27de
commit
88fb7bdacc
@ -4,9 +4,6 @@
|
|||||||
//= require turbolinks
|
//= require turbolinks
|
||||||
//= require bootstrap.min.js
|
//= require bootstrap.min.js
|
||||||
|
|
||||||
//= require contextmenu.js
|
|
||||||
//= require flash.js
|
|
||||||
|
|
||||||
//= require gentelella/src/js/custom.js
|
//= require gentelella/src/js/custom.js
|
||||||
//= require gentelella/vendors/Chart.js/dist/Chart.min.js
|
//= require gentelella/vendors/Chart.js/dist/Chart.min.js
|
||||||
//= require gentelella/vendors/Flot/jquery.flot.js
|
//= require gentelella/vendors/Flot/jquery.flot.js
|
||||||
@ -22,5 +19,23 @@
|
|||||||
//= require gentelella/vendors/validator/validator.js
|
//= require gentelella/vendors/validator/validator.js
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
console.log("Application js");
|
$('#flash').delay(500).fadeIn('normal', function() {
|
||||||
|
$(this).delay(2500).fadeOut();
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
function CheckLocation(){
|
||||||
|
$(document).mousedown(function(e){
|
||||||
|
// context menu 가 아닌 다른 영역을 클릭한경우 판단
|
||||||
|
if ($(e.target).parents(".contextmenu").length !== 0)
|
||||||
|
return;
|
||||||
|
$(".contextmenu").hide();
|
||||||
|
$(document).unbind('mousedown');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function ShowContextMenu(className){
|
||||||
|
$("."+className).css({
|
||||||
|
left:event.pageX+"px",
|
||||||
|
top:event.pageY+"px"
|
||||||
|
}).show();
|
||||||
|
}
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
function CheckLocation(){
|
|
||||||
$(document).mousedown(function(e){
|
|
||||||
// context menu 가 아닌 다른 영역을 클릭한경우 판단
|
|
||||||
if ($(e.target).parents(".contextmenu").length !== 0)
|
|
||||||
return;
|
|
||||||
$(".contextmenu").hide();
|
|
||||||
$(document).unbind('mousedown');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function ShowContextMenu(className){
|
|
||||||
$("."+className).css({
|
|
||||||
left:event.pageX+"px",
|
|
||||||
top:event.pageY+"px"
|
|
||||||
}).show();
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
$(function() {
|
|
||||||
$('#flash').delay(500).fadeIn('normal', function() {
|
|
||||||
$(this).delay(2500).fadeOut();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
@ -1,9 +1,5 @@
|
|||||||
class ApplicationController < ActionController::Base
|
class ApplicationController < ActionController::Base
|
||||||
protect_from_forgery with: :exception
|
protect_from_forgery with: :exception
|
||||||
include ApplicationHelper
|
|
||||||
include HomeHelper
|
|
||||||
include VolumeHelper
|
|
||||||
include NodeHelper
|
|
||||||
|
|
||||||
def require_login
|
def require_login
|
||||||
unless user_signed_in?
|
unless user_signed_in?
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
class Web::HomeController < WebController
|
class Web::HomeController < WebController
|
||||||
before_action :require_login
|
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@current_dir = "/mnt"
|
@current_dir = "/mnt"
|
||||||
end
|
end
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
class Web::NodeController < WebController
|
class Web::NodeController < WebController
|
||||||
before_action :require_login
|
|
||||||
|
|
||||||
def index
|
def index
|
||||||
end
|
end
|
||||||
def detail
|
def detail
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
class Web::VolumeController < WebController
|
class Web::VolumeController < WebController
|
||||||
before_action :require_login
|
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@current_dir = "/mnt"
|
@current_dir = "/mnt"
|
||||||
end
|
end
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
class WebController < ApplicationController
|
class WebController < ApplicationController
|
||||||
|
before_action :require_login
|
||||||
end
|
end
|
||||||
|
@ -9,5 +9,4 @@ Rails.application.config.assets.version = '1.0'
|
|||||||
# Precompile additional assets.
|
# Precompile additional assets.
|
||||||
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
||||||
# Rails.application.config.assets.precompile += %w( search.js )
|
# Rails.application.config.assets.precompile += %w( search.js )
|
||||||
|
# Rails.application.config.assets.precompile += %w( footermanifest.js)
|
||||||
Rails.application.config.assets.precompile += %w( footermanifest.js)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user