update
This commit is contained in:
parent
896c80f1cb
commit
8813a0983c
app
vendor/assets/components/gentelella/production/css
@ -2,7 +2,7 @@ class HomeController < ApplicationController
|
|||||||
def index
|
def index
|
||||||
config = get_conf
|
config = get_conf
|
||||||
#@current_dir = config["project_path"]
|
#@current_dir = config["project_path"]
|
||||||
@current_dir = "/mnt"
|
@current_dir = "/"
|
||||||
file_directory(@current_dir)
|
file_directory(@current_dir)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -10,6 +10,7 @@ class HomeController < ApplicationController
|
|||||||
def make_directory
|
def make_directory
|
||||||
current_dir = params[:current_dir]
|
current_dir = params[:current_dir]
|
||||||
directory_name = params[:directory_name]
|
directory_name = params[:directory_name]
|
||||||
|
puts "mkdir #{current_dir}/#{directory_name}"
|
||||||
`mkdir #{current_dir}/#{directory_name}`
|
`mkdir #{current_dir}/#{directory_name}`
|
||||||
redirect_to '/home/index'
|
redirect_to '/home/index'
|
||||||
end
|
end
|
||||||
|
@ -1,3 +1,37 @@
|
|||||||
|
<!-- create overlay page -->
|
||||||
|
<div id="popup_mkdir" class="overlay">
|
||||||
|
<div class="popup">
|
||||||
|
<h2> Make Directory </h2>
|
||||||
|
<a class="close" href="#">×</a>
|
||||||
|
|
||||||
|
<form id="form_make_directory" data-parsley-validate class="form-horizontal form-label-left" action="/home/mkdir" method="post">
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="directory-name">Current Directory <span class="required">*</span>
|
||||||
|
</label>
|
||||||
|
<div class="col-md-6 col-sm-6 col-xs-12">
|
||||||
|
<input type="text" id="directory-name" required="required" class="form-control col-md-7 col-xs-12" name="directory_name" value="<%=@current_dir%>" readonly/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="directory-name">Directory Name<span class="required">*</span>
|
||||||
|
</label>
|
||||||
|
<div class="col-md-6 col-sm-6 col-xs-12">
|
||||||
|
<input type="text" id="directory-name" required="required" class="form-control col-md-7 col-xs-12" name="directory_name" placeholder="Directory name"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="ln_solid"></div>
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
|
||||||
|
<button type="submit" class="btn btn-success">Submit</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!-- page content -->
|
<!-- page content -->
|
||||||
<div class="right_col" role="main">
|
<div class="right_col" role="main">
|
||||||
<div class="">
|
<div class="">
|
||||||
@ -90,14 +124,9 @@
|
|||||||
<div class="x_content">
|
<div class="x_content">
|
||||||
|
|
||||||
<div class="col-md-12 col-sm-12 col-xs-12" id="table_div">
|
<div class="col-md-12 col-sm-12 col-xs-12" id="table_div">
|
||||||
<p class="text-muted font-13 m-b-30"> <code> Current directory : <%=@current_dir%></code></p>
|
<p class="text-muted font-13 m-b-30"> <code> Current directory : <span id="select_dir"><%=@current_dir%></span></code></p>
|
||||||
<p>
|
<p style="text-align:right;" >
|
||||||
<form style="text-align:right;" action="/home/mkdir" method="post">
|
<a class="btn btn-default" href="#popup_mkdir"><i class="fa fa-plus"></i> Make Directory</a>
|
||||||
<input type="text" name="directory_name" placeholder="Directory name" style="padding:6px 12px; vertical-align:middle;"/>
|
|
||||||
<input type="hidden" name="current_dir" value="<%=@current_dir%>"/>
|
|
||||||
<button class="btn btn-default" type="submit"><i class="fa fa-plus"></i> Make Directory
|
|
||||||
</button>
|
|
||||||
</form>
|
|
||||||
</p>
|
</p>
|
||||||
<table id="datatable" class="table table-striped table-bordered jambo_table">
|
<table id="datatable" class="table table-striped table-bordered jambo_table">
|
||||||
<thead>
|
<thead>
|
||||||
@ -169,11 +198,11 @@
|
|||||||
url: "/application/changeDir",
|
url: "/application/changeDir",
|
||||||
data: { path: directory },
|
data: { path: directory },
|
||||||
success : function(result){
|
success : function(result){
|
||||||
|
$("#directory-name").value(directory);
|
||||||
$("#table_div").empty();
|
$("#table_div").empty();
|
||||||
var new_table = "";
|
var new_table = "";
|
||||||
new_table += "<p class='text-muted font-13 m-b-30'><code>File Manager</code></p>";
|
new_table += "<p class='text-muted font-13 m-b-30'><code>Current directory : <span id='select_dir'>" + directory+"</span></code></p>";
|
||||||
new_table += "<p>Current directory : " + directory + "</p></br>";
|
new_table += "<p style='text-align:right;'><a class='btn btn-default' href='#popup_mkdir'><i class='fa fa-plus'></i> Make Directory</a></p>";
|
||||||
new_table += "<p style='text-align:right;'><a class='btn btn-app' href='/home/mkdir/<%=@current_dir%>'><i class='fa fa-plus'></i>Make Directory</a></p>"
|
|
||||||
new_table += "<table id='datatable' class='table table-striped table-bordered jambo_table'>";
|
new_table += "<table id='datatable' class='table table-striped table-bordered jambo_table'>";
|
||||||
new_table += "<thead>";
|
new_table += "<thead>";
|
||||||
new_table += "<tr class='headings'>";
|
new_table += "<tr class='headings'>";
|
||||||
|
@ -5370,7 +5370,7 @@ ul.notifications {
|
|||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
position: relative;
|
position: relative;
|
||||||
width:30%;
|
width:40%;
|
||||||
transition: all 5s ease-in-out;
|
transition: all 5s ease-in-out;
|
||||||
overflow:auto;
|
overflow:auto;
|
||||||
z-index:20001;
|
z-index:20001;
|
||||||
|
Loading…
Reference in New Issue
Block a user