sanitize manager

This commit is contained in:
Nicolas Bally 2012-06-20 10:07:49 +02:00
parent b3b3494bba
commit efc0e595e6
11 changed files with 260 additions and 235 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

View File

@ -2,7 +2,7 @@ function data_files_load()
{
update_data_multiple_selection_text();
set_data_files_big_container_size();
@ -101,18 +101,7 @@ function close_data_file_container(data_file_id)
}
function set_data_files_big_container_size(){
if($("#data_files_big_container").parent().attr("id") == "manager_box")
{
$("#data_files_big_container").css("height",( $("#manager_box").height())+"px");
$("#data_files_big_container").css("top","0px");
}
else
{
$("#data_files_big_container").css("height",( $(window).height() - 36)+"px");
}
}
function delete_multiple_files(){
@ -185,9 +174,7 @@ create :
$(document).ready(function ($) {
$(window).bind("resize", function() {
set_data_files_big_container_size();
})
$("#left_buttons").live("click", function() {
@ -254,7 +241,7 @@ $(document).ready(function ($) {
});
set_data_files_big_container_size();

View File

@ -4,7 +4,7 @@ function image_files_load()
{
update_multiple_selection_text();
set_image_files_big_container_size();
set_image_files_img_size();
if(!slider_enabled){
@ -116,19 +116,6 @@ function close_image_file_container(image_file_id)
}
function set_image_files_big_container_size(){
if($("#image_files_big_container").parent().attr("id") == "manager_box")
{
$("#image_files_big_container").css("height",( $("#manager_box").height())+"px");
$("#image_files_big_container").css("top","0px");
}
else
{
$("#image_files_big_container").css("height",( $(window).height() - 36)+"px");
//alert($("#breadcrumb").outerHeight());
}
}
function delete_multiple_images(){
@ -201,10 +188,6 @@ create :
$(document).ready(function ($) {
$(window).bind("resize", function() {
set_image_files_big_container_size();
})
$("#left_buttons").live("click", function() {
multiple_selection_ids();
@ -269,7 +252,7 @@ $(document).ready(function ($) {
});
set_image_files_big_container_size();

View File

@ -150,9 +150,9 @@ function manager_send_cible(cible_id, cible_type, cible_name){
function manager_send_data_file(data_file_id){
var image_file_id_file_div = $('#data_file_'+data_file_id);
var data_file_div = $('#data_file_'+data_file_id);
manager_send_response({data_file_id : image_file_div.data("id"), name : image_file_div.data("name")});
manager_send_response({data_file_id : data_file_div.data("id"), name : data_file_div.data("name")});
}

View File

@ -34,7 +34,7 @@ function initialize_uploads()
return $('<tr><td>' + files[index].name + '<\/td>' +
'<td class="file_upload_progress"><div><\/div><\/td>' +
'<td class="file_upload_cancel">' +
'<img alt="Pen_alt_stroke_16x16" src="/assets/iconic/gray_light/denied_16x16.png" />' +
'<img alt="Pen_alt_stroke_16x16" src="/assets/shared/iconic/gray_light/denied_16x16.png" />' +
'<\/td><\/tr>');
}
@ -73,7 +73,7 @@ function initialize_uploads()
return $('<tr><td>' + files[index].name + '<\/td>' +
'<td class="file_upload_progress"><div><\/div><\/td>' +
'<td class="file_upload_cancel">' +
'<img alt="Pen_alt_stroke_16x16" src="/assets/iconic/gray_light/denied_16x16.png" />' +
'<img alt="Pen_alt_stroke_16x16" src="/assets/shared/iconic/gray_light/denied_16x16.png" />' +
'<\/td><\/tr>');
}

View File

@ -8,7 +8,7 @@
@import "shared/formtastic";
@import "shared/jquery-ui-1.8.11.custom.css";
@import "shared/jquery-ui-1.8.11.custom";
@import "shared/ui.timepickr";
@import "admin/portlets";

View File

@ -334,10 +334,20 @@ float:right;
background:red;
position:absolute;
top:36px;
top:34px;
left:0px;
right:0px;
bottom:0px;
}
#manager_box #data_files_big_container{
top:0px;
}
#data_files_big_container #sidebar{
width:209px;
border-right:1px solid #adb5ba;
@ -413,6 +423,14 @@ background:RGB(217,233,245);
right:0px;
overflow:auto;
padding-bottom:34px;
table{
margin:0px;
td{
border:0px;
}
}
}
@ -741,9 +759,12 @@ background:RGB(217,233,245);
transition: 0.4s ease-in-out;
}
#data_files_big_container #right_bar #data_file_queue #files{
margin:0px;
}
#data_files_big_container #right_bar #data_file_queue #files td{
color:#eff2f2;
padding:5px;
}
@ -772,7 +793,7 @@ background:RGB(217,233,245);
#data_files_big_container #right_bar #multiple_selection #multiple_menu{
position:absolute;
left:0px;
bottom:33px;
bottom:31px;
height:0px;
width:216px;
background:rgba(0,0,0,0.9);
@ -833,10 +854,21 @@ height:auto;
background:red;
position:absolute;
top:36px;
top:34px;
left:0px;
right:0px;
bottom:0px;
}
#manager_box #image_files_big_container{
top:0px;
}
#image_files_big_container #sidebar{
width:209px;
border-right:1px solid #adb5ba;
@ -1162,9 +1194,6 @@ background:RGB(217,233,245);
}
#image_files_big_container #right_bar{
background:rgba(0,0,0,0.8);
@ -1174,171 +1203,199 @@ background:RGB(217,233,245);
left:210px;
right:0px;
}
#image_file_form{
position:absolute;
top:0px;
left:240px;
.file_upload {
position: relative;
overflow: hidden;
padding:9px;
width:250px;
cursor:pointer;
/* webkit */
-webkit-transition-property: background-color;
-webkit-transition-duration: 0.4s;
/* Firefox */
-moz-transition-property: background-color;
-moz-transition-duration: 0.4s;
/* standardisé */
transition-property: background-color;
transition-duration: 0.4s;
direction: ltr;
cursor: pointer;
text-align: left;
color:#eff2f2;
}
.file_upload:hover {
background-color:rgba(131,131,131,0.3);
}
.file_upload_highlight {
background-color: rgba(106,191,6,0.2);
}
}
#image_files_big_container #right_bar #image_file_form{
position:absolute;
top:0px;
left:240px;
#image_file_queue{
position:absolute;
left:240px;
bottom:33px;
color:#eff2f2;
width:50%;
background:rgba(0,0,0,0.9);
border:1px solid #444444;
border-top:0px;
-webkit-transition: 0.4s ease-in-out;
-moz-transition: 0.4s ease-in-out;
-o-transition: 0.4s ease-in-out;
transition: 0.4s ease-in-out;
#files {
margin:0px;
td{
color:#eff2f2;
padding:5px;
}
}
}
#grid_slider{
position:absolute;
right:20px;
top:15px;
width:150px;
height:3px;
background:#191919;
border:1px solid #444444;
border-radius:2px;
}
#grid_slider{
.ui-slider-handle{
border-radius:6px;
height:10px;
width:10px;
cursor:pointer;
background:#838383;
}
}
#multiple_selection {
&:hover{
#multiple_menu{
height:auto;
}
}
#multiple_menu{
position:absolute;
left:0px;
bottom:31px;
height:0px;
width:216px;
background:rgba(0,0,0,0.9);
border:1px solid #444444;
border-top:0px;
overflow:hidden;
-webkit-transition: 0.4s ease-in-out;
-moz-transition: 0.4s ease-in-out;
-o-transition: 0.4s ease-in-out;
transition: 0.4s ease-in-out;
a{
display:block;
padding:9px;
border-top:1px solid #444444;
color:#eff2f2;
cursor:pointer;
/* webkit */
-webkit-transition-property: background-color;
-webkit-transition-duration: 0.4s;
/* Firefox */
-moz-transition-property: background-color;
-moz-transition-duration: 0.4s;
/* standardisé */
transition-property: background-color;
transition-duration: 0.4s;
&:hover{
background-color:rgba(131,131,131,0.3);
}
}
}
}
}
#image_files_big_container #right_bar #image_file_form .file_upload {
position: relative;
overflow: hidden;
padding:9px;
width:250px;
cursor:pointer;
/* webkit */
-webkit-transition-property: background-color;
-webkit-transition-duration: 0.4s;
/* Firefox */
-moz-transition-property: background-color;
-moz-transition-duration: 0.4s;
/* standardisé */
transition-property: background-color;
transition-duration: 0.4s;
direction: ltr;
cursor: pointer;
text-align: left;
color:#eff2f2;
}
#image_files_big_container #right_bar #image_file_form .file_upload:hover {
background-color:rgba(131,131,131,0.3);
}
.file_upload_highlight {
background-color: rgba(106,191,6,0.2);
}
#image_files_big_container #right_bar #image_file_queue{
position:absolute;
left:240px;
bottom:33px;
color:#eff2f2;
width:50%;
background:rgba(0,0,0,0.9);
border:1px solid #444444;
border-top:0px;
-webkit-transition: 0.4s ease-in-out;
-moz-transition: 0.4s ease-in-out;
-o-transition: 0.4s ease-in-out;
transition: 0.4s ease-in-out;
}
#image_files_big_container #right_bar #image_file_queue #files td{
padding:5px;
}
#image_files_big_container #right_bar #grid_slider{
position:absolute;
right:20px;
top:15px;
width:150px;
height:3px;
background:#191919;
border:1px solid #444444;
border-radius:2px;
}
#image_files_big_container #right_bar #grid_slider .ui-slider-handle{
border-radius:6px;
height:10px;
width:10px;
cursor:pointer;
background:#838383;
}
#image_files_big_container #right_bar #multiple_selection #multiple_menu{
position:absolute;
left:0px;
bottom:33px;
height:0px;
width:216px;
background:rgba(0,0,0,0.9);
border:1px solid #444444;
border-top:0px;
overflow:hidden;
-webkit-transition: 0.4s ease-in-out;
-moz-transition: 0.4s ease-in-out;
-o-transition: 0.4s ease-in-out;
transition: 0.4s ease-in-out;
}
#image_files_big_container #right_bar #multiple_selection #multiple_menu a{
display:block;
padding:9px;
border-top:1px solid #444444;
color:#eff2f2;
cursor:pointer;
/* webkit */
-webkit-transition-property: background-color;
-webkit-transition-duration: 0.4s;
/* Firefox */
-moz-transition-property: background-color;
-moz-transition-duration: 0.4s;
/* standardisé */
transition-property: background-color;
transition-duration: 0.4s;
}
#image_files_big_container #right_bar #multiple_selection #multiple_menu a:hover{
background-color:rgba(131,131,131,0.3);
}
#image_files_big_container #right_bar #multiple_selection:hover #multiple_menu{
height:auto;
}
#menu_items_breadcrumbs{
margin-top:10px;
@ -1346,36 +1403,41 @@ height:auto;
background : #F0F0F0;
border-radius:10px;
}
#menu_items_breadcrumbs *{
color:#505B66;
}
#menu_items_breadcrumbs .receptable{
float:left;
padding:5px 10px 5px 10px;
*{
color:#505B66;
}
.receptable{
float:left;
padding:5px 10px 5px 10px;
width:auto;
width:auto;
/*background : url("/images/quartz_admin/icons_receptable.png") no-repeat right center;*/
}
#menu_items_breadcrumbs .separate{
float:left;
padding:5px;
}
.separate{
float:left;
padding:5px;
width:auto;
width:auto;
/*background : url("/images/quartz_admin/icons_receptable.png") no-repeat right center;*/
}
#menu_items_breadcrumbs .actual{
float:left;
padding:5px;
padding-right:20px;
margin-right:5px;
width:auto;
/*background : url("/images/quartz_admin/icons_receptable.png") no-repeat right center;*/
}
.actual{
float:left;
padding:5px;
padding-right:20px;
margin-right:5px;
width:auto;
}
}

View File

@ -29,7 +29,7 @@
}
.file_upload_progress .ui-progressbar-value {
background: url(pbar-ani.gif);
background: url('/assets/admin/pbar-ani.gif');
}
.file_upload_progress div {

View File

@ -23,11 +23,11 @@ class DataFile < ActiveRecord::Base
end
def abstract_file_name
self.name+File.extname(self.file.to_s)
self.name+File.extname(self.attributes['file'])
end
def abstract_file_name_slug
self.name.to_slug+File.extname(self.file.to_s)
self.name.to_slug+File.extname(self.attributes['file'])
end
end

View File

@ -51,8 +51,3 @@
:javascript
set_data_files_big_container_size();

View File

@ -57,6 +57,4 @@
:javascript
set_image_files_big_container_size();