Commit bc793650 authored by c24b's avatar c24b

Editor BAR

parent e9df1d89
......@@ -99,6 +99,7 @@ function addPageStatus(status, msg){
}
function selectedUrls(){
var selected = [];
$('input:checked').each(function() {
selected.push($(this).val());
......@@ -285,6 +286,22 @@ $(document).on("hover", "button", function(){
});
//MULTIPLE SELECTION ACTION
// 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
$(document).on("click","#delete", function(){
var selected = selectedUrls();
......
......@@ -74,7 +74,7 @@
</div>
<!-- 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">
<span class="glyphicon glyphicon-trash " aria-hidden="true" ></span>
</button>
......@@ -104,7 +104,7 @@
<div id="{url}" class="item row">
<h3>
<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}">
<span class="glyphicon glyphicon-book" aria-hidden="true"></span>
<span class="item_name">{name}</span>
......@@ -113,28 +113,30 @@
</h3>
<div id="project_detail" class="col-md-4 content">
<div id="item-editor">
<!-- 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>
<!-- 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>
<!-- EDIT PROJECT-->
<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>
</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 -->
<!--
<button type="button" class="btn btn-default refresh pull-right" data-id="{id}">
<span class="glyphicon glyphicon-refresh pull-right" aria-hidden="true"></span>
</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>
......
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