Commit bc793650 authored by c24b's avatar c24b

Editor BAR

parent e9df1d89
...@@ -99,6 +99,7 @@ function addPageStatus(status, msg){ ...@@ -99,6 +99,7 @@ function addPageStatus(status, msg){
} }
function selectedUrls(){ function selectedUrls(){
var selected = []; var selected = [];
$('input:checked').each(function() { $('input:checked').each(function() {
selected.push($(this).val()); selected.push($(this).val());
...@@ -285,6 +286,22 @@ $(document).on("hover", "button", function(){ ...@@ -285,6 +286,22 @@ $(document).on("hover", "button", function(){
}); });
//MULTIPLE SELECTION ACTION //MULTIPLE SELECTION ACTION
// checkbox with BUTTON #delete, #edit #refresh // checkbox with BUTTON #delete, #edit #refresh
//Activate editor bar
$(document).on('change', 'input[type=checkbox]', function() {
if ($("input:checkbox:checked").length > 0){
if (! $("#editor").hasClass("collapse in")){
$("#editor").collapse("show");
}
}
else{
if ($("#editor").hasClass("collapse in")){
$("#editor").collapse("hide");
}
}});
//DELETE MULTI //DELETE MULTI
$(document).on("click","#delete", function(){ $(document).on("click","#delete", function(){
var selected = selectedUrls(); var selected = selectedUrls();
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
</div> </div>
<!-- CHECKBOX EDITION --> <!-- CHECKBOX EDITION -->
<div class="row" id="editor"> <div class="row collapse" id="editor">
<button title="delete selected project" type="button" class="btn btn-danger" id="delete"> <button title="delete selected project" type="button" class="btn btn-danger" id="delete">
<span class="glyphicon glyphicon-trash " aria-hidden="true" ></span> <span class="glyphicon glyphicon-trash " aria-hidden="true" ></span>
</button> </button>
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
<div id="{url}" class="item row"> <div id="{url}" class="item row">
<h3> <h3>
<div class="col-md-6 content"> <div class="col-md-6 content">
<input id="checkbox" type="checkbox" value="{url}" data-id="{id}"> <input type="checkbox" value="{url}" data-id="{id}">
<a href="{url}"> <a href="{url}">
<span class="glyphicon glyphicon-book" aria-hidden="true"></span> <span class="glyphicon glyphicon-book" aria-hidden="true"></span>
<span class="item_name">{name}</span> <span class="item_name">{name}</span>
...@@ -113,28 +113,30 @@ ...@@ -113,28 +113,30 @@
</h3> </h3>
<div id="project_detail" class="col-md-4 content"> <div id="project_detail" class="col-md-4 content">
<div id="item-editor"> <div id="item-editor">
<!-- GET Project -->
<a href="{url}"> <!-- DELETE PROJECT -->
<button type="button" title="see project" class="btn btn-default show pull-right" aria-label="Left Align"> <button type="button" class="btn btn-default delete pull-right" data-url="{url}" >
<span class="glyphicon glyphicon-eye-open" aria-hidden="true"></span> <span class="glyphicon glyphicon-trash pull-right" aria-hidden="true"></span>
</button> </button>
</a>
<!-- EDIT PROJECT--> <!-- EDIT PROJECT-->
<button class="btn btn-default edit pull-right" data-id="{id}" data-url="{url}" data-toggle="collapse"> <button class="btn btn-default edit pull-right" data-id="{id}" data-url="{url}" data-toggle="collapse">
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
</button> </button>
<!-- DELETE PROJECT -->
<button type="button" class="btn btn-default delete pull-right" data-url="{url}" >
<span class="glyphicon glyphicon-trash pull-right" aria-hidden="true"></span>
</button>
<!-- REFRESH PROJECT --> <!-- REFRESH PROJECT -->
<!-- <!--
<button type="button" class="btn btn-default refresh pull-right" data-id="{id}"> <button type="button" class="btn btn-default refresh pull-right" data-id="{id}">
<span class="glyphicon glyphicon-refresh pull-right" aria-hidden="true"></span> <span class="glyphicon glyphicon-refresh pull-right" aria-hidden="true"></span>
</button> </button>
--> -->
<!-- GET Project -->
<a href="{url}">
<button type="button" title="see project" class="btn btn-default show pull-right" aria-label="Left Align">
<span class="glyphicon glyphicon-eye-open" aria-hidden="true"></span>
</button>
</a>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment