modif mode édition portlets
This commit is contained in:
parent
127730fd76
commit
df07856d2e
@ -24,11 +24,34 @@
|
||||
|
||||
|
||||
#= require redactor
|
||||
#= require redactor_plugins/fontsize
|
||||
#= require redactor_plugins/fontfamily
|
||||
#= require redactor_plugins/fontcolor
|
||||
|
||||
#= require nested_fields
|
||||
|
||||
#= require_tree ./note_files
|
||||
|
||||
portlet_to_move = false
|
||||
content_type_to_move =false
|
||||
@open_collapse3 = ->
|
||||
$("#collapse3 .panel").show()
|
||||
$("#collapse3").show()
|
||||
|
||||
@reset_edit_pane = ->
|
||||
$("#element_form").html()
|
||||
$("#collapse3").hide()
|
||||
|
||||
@unselect_portlet = ->
|
||||
$(".portlet.active").removeClass("active")
|
||||
reset_edit_pane()
|
||||
|
||||
@cancel_move_portlet = ->
|
||||
$(".move_message").show()
|
||||
$(".cancel_message").hide()
|
||||
|
||||
$(".move").removeClass("move")
|
||||
$(".portlet_placeholder").remove()
|
||||
portlet_to_move = false
|
||||
|
||||
$(document).ready ->
|
||||
|
||||
$(document).on 'click', 'input.datepicker', ->
|
||||
@ -61,11 +84,14 @@ $(document).ready ->
|
||||
|
||||
|
||||
$(document).on "click", ".portlet", (event) ->
|
||||
$(".portlet.active").removeClass("active")
|
||||
$(this).addClass("active")
|
||||
if !$(this).hasClass("active") and portlet_to_move == false
|
||||
|
||||
$(".portlet.active").removeClass("active")
|
||||
$(this).addClass("active")
|
||||
|
||||
$.ajax({url : $(this).data("edit-link"), type: "GET"});
|
||||
$("#collapse3 .trash").attr("href", $(this).data("show-link"));
|
||||
|
||||
$.ajax({url : $(this).data("edit-link"), type: "GET"});
|
||||
$("#collapse3 .trash").attr("href", $(this).data("show-link"));
|
||||
|
||||
event.stopPropagation();
|
||||
|
||||
@ -73,26 +99,43 @@ $(document).ready ->
|
||||
portlet_to_move = false
|
||||
content_type_to_move = false
|
||||
$("#element_form").html("")
|
||||
$("#collapse3").collapse('hide');
|
||||
$("#collapse2").collapse('show');
|
||||
|
||||
$(".portlet.active").removeClass("active")
|
||||
|
||||
portlet_to_move = false
|
||||
content_type_to_move =false
|
||||
|
||||
|
||||
|
||||
|
||||
$(document).on "click", "#content_types .content_type", ->
|
||||
|
||||
cancel_move_portlet()
|
||||
unselect_portlet()
|
||||
reset_edit_pane()
|
||||
|
||||
|
||||
type = $(this).data("type")
|
||||
content_type_to_move = type
|
||||
init_portlets_place_holder()
|
||||
$(this).addClass("move")
|
||||
false
|
||||
|
||||
|
||||
|
||||
$(document).on "click", ".portlet_handle", ->
|
||||
id = $(this).data("portlet-id")
|
||||
portlet_to_move = $("#portlet_"+id)
|
||||
init_portlets_place_holder()
|
||||
portlet_to_move.addClass("move")
|
||||
false
|
||||
if portlet_to_move == false
|
||||
|
||||
$(".move_message").hide()
|
||||
$(".cancel_message").show()
|
||||
|
||||
|
||||
id = $(this).data("portlet-id")
|
||||
portlet_to_move = $("#portlet_"+id)
|
||||
init_portlets_place_holder()
|
||||
portlet_to_move.addClass("move")
|
||||
false
|
||||
else
|
||||
cancel_move_portlet()
|
||||
|
||||
false
|
||||
|
||||
$(document).on "click", ".portlet_placeholder", ->
|
||||
if portlet_to_move != false
|
||||
@ -100,7 +143,7 @@ $(document).ready ->
|
||||
$(".move").removeClass("move")
|
||||
$(".portlet_placeholder").remove()
|
||||
update_block_portlet_order(portlet_to_move.closest(".block_portlets").data("block_id"))
|
||||
portlet_to_move = false
|
||||
cancel_move_portlet()
|
||||
else
|
||||
|
||||
block_id = $(this).closest(".block_portlets").data("block_id")
|
||||
@ -344,3 +387,14 @@ $(document).on "scroll", () ->
|
||||
|
||||
$("#toolbar-text, #menu_item_informations").css
|
||||
top : top
|
||||
|
||||
$(document).on "click", "#menu_item_informations .save", ->
|
||||
$(this).closest(".panel").find("form").submit()
|
||||
return false
|
||||
|
||||
$(document).on "click", "#menu_item_informations h4", ->
|
||||
$(this).next(".panel").toggle()
|
||||
return false
|
||||
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
73
app/assets/javascripts/redactor_plugins/fontcolor.js
Executable file
73
app/assets/javascripts/redactor_plugins/fontcolor.js
Executable file
@ -0,0 +1,73 @@
|
||||
if (!RedactorPlugins) var RedactorPlugins = {};
|
||||
|
||||
RedactorPlugins.fontcolor = function()
|
||||
{
|
||||
return {
|
||||
init: function()
|
||||
{
|
||||
var colors = [
|
||||
'#ffffff', '#000000', '#eeece1', '#1f497d', '#4f81bd', '#c0504d', '#9bbb59', '#8064a2', '#4bacc6', '#f79646', '#ffff00',
|
||||
'#f2f2f2', '#7f7f7f', '#ddd9c3', '#c6d9f0', '#dbe5f1', '#f2dcdb', '#ebf1dd', '#e5e0ec', '#dbeef3', '#fdeada', '#fff2ca',
|
||||
'#d8d8d8', '#595959', '#c4bd97', '#8db3e2', '#b8cce4', '#e5b9b7', '#d7e3bc', '#ccc1d9', '#b7dde8', '#fbd5b5', '#ffe694',
|
||||
'#bfbfbf', '#3f3f3f', '#938953', '#548dd4', '#95b3d7', '#d99694', '#c3d69b', '#b2a2c7', '#b7dde8', '#fac08f', '#f2c314',
|
||||
'#a5a5a5', '#262626', '#494429', '#17365d', '#366092', '#953734', '#76923c', '#5f497a', '#92cddc', '#e36c09', '#c09100',
|
||||
'#7f7f7f', '#0c0c0c', '#1d1b10', '#0f243e', '#244061', '#632423', '#4f6128', '#3f3151', '#31859b', '#974806', '#7f6000'
|
||||
];
|
||||
|
||||
var buttons = ['fontcolor', 'backcolor'];
|
||||
|
||||
for (var i = 0; i < 2; i++)
|
||||
{
|
||||
var name = buttons[i];
|
||||
|
||||
var button = this.button.add(name, this.lang.get(name));
|
||||
var $dropdown = this.button.addDropdown(button);
|
||||
|
||||
$dropdown.width(242);
|
||||
this.fontcolor.buildPicker($dropdown, name, colors);
|
||||
|
||||
}
|
||||
},
|
||||
buildPicker: function($dropdown, name, colors)
|
||||
{
|
||||
var rule = (name == 'backcolor') ? 'background-color' : 'color';
|
||||
|
||||
var len = colors.length;
|
||||
var self = this;
|
||||
var func = function(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
self.fontcolor.set($(this).data('rule'), $(this).attr('rel'));
|
||||
};
|
||||
|
||||
for (var z = 0; z < len; z++)
|
||||
{
|
||||
var color = colors[z];
|
||||
|
||||
var $swatch = $('<a rel="' + color + '" data-rule="' + rule +'" href="#" style="float: left; font-size: 0; border: 2px solid #fff; padding: 0; margin: 0; width: 22px; height: 22px;"></a>');
|
||||
$swatch.css('background-color', color);
|
||||
$swatch.on('click', func);
|
||||
|
||||
$dropdown.append($swatch);
|
||||
}
|
||||
|
||||
var $elNone = $('<a href="#" style="display: block; clear: both; padding: 5px; font-size: 12px; line-height: 1;"></a>').html(this.lang.get('none'));
|
||||
$elNone.on('click', $.proxy(function(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
this.fontcolor.remove(rule);
|
||||
|
||||
}, this));
|
||||
|
||||
$dropdown.append($elNone);
|
||||
},
|
||||
set: function(rule, type)
|
||||
{
|
||||
this.inline.format('span', 'style', rule + ': ' + type + ';');
|
||||
},
|
||||
remove: function(rule)
|
||||
{
|
||||
this.inline.removeStyleRule(rule);
|
||||
}
|
||||
};
|
||||
};
|
32
app/assets/javascripts/redactor_plugins/fontfamily.js
Executable file
32
app/assets/javascripts/redactor_plugins/fontfamily.js
Executable file
@ -0,0 +1,32 @@
|
||||
if (!RedactorPlugins) var RedactorPlugins = {};
|
||||
|
||||
RedactorPlugins.fontfamily = function()
|
||||
{
|
||||
return {
|
||||
init: function ()
|
||||
{
|
||||
var fonts = [ 'Lato', 'Stylograph','Arial', 'Helvetica', 'Georgia', 'Times New Roman', 'Monospace' ];
|
||||
var that = this;
|
||||
var dropdown = {};
|
||||
|
||||
$.each(fonts, function(i, s)
|
||||
{
|
||||
dropdown['s' + i] = { title: s, func: function() { that.fontfamily.set(s); }};
|
||||
});
|
||||
|
||||
dropdown.remove = { title: 'Remove Font Family', func: that.fontfamily.reset };
|
||||
|
||||
var button = this.button.add('fontfamily', 'Change Font Family');
|
||||
this.button.addDropdown(button, dropdown);
|
||||
|
||||
},
|
||||
set: function (value)
|
||||
{
|
||||
this.inline.format('span', 'style', 'font-family:' + value + ';');
|
||||
},
|
||||
reset: function()
|
||||
{
|
||||
this.inline.removeStyleRule('font-family');
|
||||
}
|
||||
};
|
||||
};
|
75
app/assets/javascripts/redactor_plugins/fontsize.js
Executable file
75
app/assets/javascripts/redactor_plugins/fontsize.js
Executable file
@ -0,0 +1,75 @@
|
||||
if (!RedactorPlugins) var RedactorPlugins = {};
|
||||
|
||||
RedactorPlugins.fontsize = function()
|
||||
{
|
||||
return {
|
||||
init: function()
|
||||
{
|
||||
var fonts = [10, 11, 12, 14, 16, 18, 20, 24, 28, 30];
|
||||
var that = this;
|
||||
var dropdown = {};
|
||||
|
||||
$.each(fonts, function(i, s)
|
||||
{
|
||||
dropdown['s' + i] = { title: s + 'px', func: function() { that.fontsize.set(s); } };
|
||||
});
|
||||
|
||||
dropdown.remove = { title: 'Remove Font Size', func: that.fontsize.reset };
|
||||
|
||||
var button = this.button.add('fontsize', 'Change Font Size');
|
||||
this.button.addDropdown(button, dropdown);
|
||||
},
|
||||
set: function(size)
|
||||
{
|
||||
this.inline.format('span', 'style', 'font-size: ' + size + 'px;');
|
||||
},
|
||||
reset: function()
|
||||
{
|
||||
this.inline.removeStyleRule('font-size');
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
if (!RedactorPlugins) var RedactorPlugins = {};
|
||||
|
||||
RedactorPlugins.scriptbuttons = function()
|
||||
{
|
||||
return {
|
||||
init: function()
|
||||
{
|
||||
var sup = this.button.add('superscript', 'Superscript');
|
||||
var sub = this.button.add('subscript', 'Subscript');
|
||||
|
||||
// make your added buttons as Font Awesome's icon
|
||||
this.button.setAwesome('superscript', 'fa-superscript');
|
||||
this.button.setAwesome('subscript', 'fa-subscript');
|
||||
|
||||
this.button.addCallback(sup, this.scriptbuttons.formatSup);
|
||||
this.button.addCallback(sub, this.scriptbuttons.formatSub);
|
||||
},
|
||||
formatSup: function()
|
||||
{
|
||||
this.inline.format('sup');
|
||||
},
|
||||
formatSub: function()
|
||||
{
|
||||
this.inline.format('sub');
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
if (!RedactorPlugins) var RedactorPlugins = {};
|
||||
|
||||
RedactorPlugins.bufferbuttons = function()
|
||||
{
|
||||
return {
|
||||
init: function()
|
||||
{
|
||||
var undo = this.button.addFirst('undo', 'Undo');
|
||||
var redo = this.button.addAfter('undo', 'redo', 'Redo');
|
||||
|
||||
this.button.addCallback(undo, this.buffer.undo);
|
||||
this.button.addCallback(redo, this.buffer.redo);
|
||||
}
|
||||
};
|
||||
};
|
@ -3,19 +3,16 @@
|
||||
@import "bootstrap";
|
||||
|
||||
@import "fontawesome/font-awesome";
|
||||
//@import "admin/lesshat";
|
||||
|
||||
@import "manager";
|
||||
@import "redactor";
|
||||
@import "pane_hover";
|
||||
@import "vendor/select2";
|
||||
|
||||
@import "admin/topics";
|
||||
|
||||
#admin_navbar{
|
||||
#admin_nav{
|
||||
border-radius:0px;
|
||||
|
||||
}
|
||||
|
||||
span.preview{
|
||||
img{
|
||||
max-width:125px;
|
||||
@ -38,7 +35,7 @@ html {
|
||||
body {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -108,7 +105,7 @@ text-decoration:none;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#upload_details{
|
||||
display:none;
|
||||
.content{
|
||||
@ -182,124 +179,125 @@ text-decoration:none;
|
||||
|
||||
|
||||
|
||||
#toolbar-text{
|
||||
position:fixed;
|
||||
#toolbar-text{
|
||||
position:fixed;
|
||||
z-index:2;
|
||||
|
||||
top:52px;
|
||||
left:0px;
|
||||
right:330px;
|
||||
top:52px;
|
||||
left:0px;
|
||||
right:330px;
|
||||
|
||||
|
||||
}
|
||||
|
||||
#flashs{
|
||||
position:fixed;
|
||||
bottom:0px;
|
||||
|
||||
}
|
||||
|
||||
#flashs{
|
||||
position:fixed;
|
||||
bottom:0px;
|
||||
|
||||
right:1em;
|
||||
min-width:600px;
|
||||
width:50%;
|
||||
left:1em;
|
||||
min-width:600px;
|
||||
width:50%;
|
||||
z-index:3;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
form .clearfix:before, form .clearfix:after {
|
||||
display: inline;
|
||||
}
|
||||
form .clearfix:before, form .clearfix:after {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.error{
|
||||
color:red;
|
||||
|
||||
input{
|
||||
border-color:red;
|
||||
}
|
||||
|
||||
*{
|
||||
color:red;
|
||||
}
|
||||
}
|
||||
.error{
|
||||
color:red;
|
||||
|
||||
input{
|
||||
border-color:red;
|
||||
}
|
||||
|
||||
*{
|
||||
color:red;
|
||||
}
|
||||
}
|
||||
|
||||
body.dragging, body.dragging * {
|
||||
cursor: move !important;
|
||||
body.dragging, body.dragging * {
|
||||
cursor: move !important;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.dragged {
|
||||
position: absolute;
|
||||
opacity: 0.5;
|
||||
z-index: 2000;
|
||||
}
|
||||
.dragged {
|
||||
position: absolute;
|
||||
opacity: 0.5;
|
||||
z-index: 2000;
|
||||
}
|
||||
|
||||
ol.sortable li.placeholder {
|
||||
position: relative;
|
||||
}
|
||||
ol.sortable li.placeholder {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
ol.sortable li.placeholder:before {
|
||||
position: absolute;
|
||||
ol.sortable li.placeholder:before {
|
||||
position: absolute;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.placeholder{
|
||||
background:rgba(143,202,70,0.8);
|
||||
height:10px;
|
||||
}
|
||||
|
||||
.placeholder{
|
||||
background:rgba(143,202,70,0.8);
|
||||
height:10px;
|
||||
}
|
||||
|
||||
.prevv_folder{
|
||||
.prevv_folder{
|
||||
|
||||
border-top:1px solid #999999;
|
||||
border-bottom:1px solid #999999;
|
||||
padding:8px 0px;
|
||||
border-top:1px solid #999999;
|
||||
border-bottom:1px solid #999999;
|
||||
padding:8px 0px;
|
||||
|
||||
.placeholder{
|
||||
height:0px;
|
||||
}
|
||||
|
||||
&.active{
|
||||
background:rgba(143,202,70,0.8);
|
||||
.placeholder{
|
||||
height:0px;
|
||||
}
|
||||
|
||||
&.active{
|
||||
background:rgba(143,202,70,0.8);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#sortable_menu_item{
|
||||
.menu_item_row{
|
||||
padding:8px 0px;
|
||||
background:rgba(240,240,240,1);
|
||||
margin:3px 0px;
|
||||
#sortable_menu_item{
|
||||
.menu_item_row{
|
||||
padding:8px 0px;
|
||||
background:rgba(240,240,240,1);
|
||||
margin:3px 0px;
|
||||
|
||||
.actions{
|
||||
text-align:right;
|
||||
.actions{
|
||||
text-align:right;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.receptable{
|
||||
position:relative;
|
||||
|
||||
.placeholder{
|
||||
position:absolute;
|
||||
top:0px;
|
||||
left:0px;
|
||||
right:0px;
|
||||
bottom:0px;
|
||||
height:auto;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.receptable{
|
||||
position:relative;
|
||||
|
||||
.placeholder{
|
||||
position:absolute;
|
||||
top:0px;
|
||||
left:0px;
|
||||
right:0px;
|
||||
bottom:0px;
|
||||
height:auto;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#menu_item_informations{
|
||||
}
|
||||
|
||||
#menu_item_informations{
|
||||
|
||||
|
||||
form{
|
||||
@ -313,251 +311,256 @@ text-decoration:none;
|
||||
}
|
||||
}
|
||||
|
||||
position:fixed;
|
||||
position:fixed;
|
||||
z-index:3;
|
||||
overflow:auto;
|
||||
box-shadow:rgba(0,0,0,1) 0px 0px 5px;
|
||||
margin-bottom:0px;
|
||||
top:52px;
|
||||
right:0px;
|
||||
width:330px;
|
||||
bottom:0px;
|
||||
top:52px;
|
||||
right:0px;
|
||||
width:330px;
|
||||
bottom:0px;
|
||||
background:white;
|
||||
.placeholder{
|
||||
display:inline-block;
|
||||
width:91px;
|
||||
height:91px;
|
||||
margin:0px;
|
||||
.placeholder{
|
||||
display:inline-block;
|
||||
width:91px;
|
||||
height:91px;
|
||||
margin:0px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.block_portlets{
|
||||
min-height:50px;
|
||||
border:1px dotted rgba(227,227,227,1);
|
||||
|
||||
|
||||
}
|
||||
|
||||
.block_portlets_sortable{
|
||||
border:0px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#menu_item_inspector_container{
|
||||
|
||||
.accordion{
|
||||
|
||||
height:auto;
|
||||
|
||||
}
|
||||
|
||||
.accordion-group{
|
||||
border:0px;
|
||||
border-radius:0px;
|
||||
}
|
||||
|
||||
|
||||
.accordion-body{
|
||||
background:white;
|
||||
|
||||
}
|
||||
.accordion-heading{
|
||||
border-radius:0px;
|
||||
border:0px;
|
||||
background:-webkit-linear-gradient(top, #222222, #111111);
|
||||
padding:0px;
|
||||
min-height:0px;
|
||||
a{
|
||||
padding:10px 20px;
|
||||
color:white;
|
||||
|
||||
&:hover{
|
||||
text-decoration:none;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.inspector_handle{
|
||||
height:10px;
|
||||
width:100%;
|
||||
background:black;
|
||||
cursor:pointer;
|
||||
|
||||
}
|
||||
|
||||
.content_type{
|
||||
display:inline-block;
|
||||
img{height:50px;cursor:pointer;}
|
||||
|
||||
.block_portlets{
|
||||
min-height:50px;
|
||||
border:1px dotted rgba(227,227,227,1);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.btn-toolbar{
|
||||
display:none;
|
||||
}
|
||||
|
||||
.block_portlets_sortable{
|
||||
border:0px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#menu_item_inspector_container{
|
||||
.panel{
|
||||
border-radius:0px;
|
||||
border-left:0px;
|
||||
border-right:0px;
|
||||
|
||||
}
|
||||
.accordion{
|
||||
|
||||
height:auto;
|
||||
|
||||
}
|
||||
|
||||
.accordion-group{
|
||||
border:0px;
|
||||
border-radius:0px;
|
||||
}
|
||||
|
||||
|
||||
.accordion-body{
|
||||
background:white;
|
||||
|
||||
}
|
||||
.accordion-heading{
|
||||
border-radius:0px;
|
||||
border:0px;
|
||||
background:-webkit-linear-gradient(top, #222222, #111111);
|
||||
padding:0px;
|
||||
min-height:0px;
|
||||
a{
|
||||
padding:10px 20px;
|
||||
color:white;
|
||||
|
||||
&:hover{
|
||||
text-decoration:none;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.inspector_handle{
|
||||
height:10px;
|
||||
width:100%;
|
||||
background:black;
|
||||
cursor:pointer;
|
||||
|
||||
}
|
||||
|
||||
.content_type{
|
||||
display:inline-block;
|
||||
img{height:50px;cursor:pointer;}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.btn-toolbar{
|
||||
display:none;
|
||||
top:-35px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
#column_sliders{
|
||||
|
||||
position:relative;
|
||||
|
||||
.slider{
|
||||
position:absolute;
|
||||
top:0px;
|
||||
left:0px;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.slider-selection{
|
||||
display:none !important;
|
||||
}
|
||||
|
||||
.slider:not(:first-child){
|
||||
|
||||
|
||||
.slider-track{
|
||||
background:transparent;
|
||||
box-shadow:transparent 0px 0px 0px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.slider-handle{
|
||||
z-index:100;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.html_content_form{
|
||||
|
||||
}
|
||||
|
||||
|
||||
#column_sliders{
|
||||
|
||||
position:relative;
|
||||
|
||||
.slider{
|
||||
position:absolute;
|
||||
top:0px;
|
||||
left:0px;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.slider-selection{
|
||||
display:none !important;
|
||||
}
|
||||
|
||||
.slider:not(:first-child){
|
||||
|
||||
|
||||
.slider-track{
|
||||
background:transparent;
|
||||
box-shadow:transparent 0px 0px 0px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.slider-handle{
|
||||
z-index:100;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.html_content_form{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ace_editor_pre{
|
||||
position:relative;
|
||||
width:100%;
|
||||
height:400px;
|
||||
background:white;
|
||||
border:1px solid #353535;
|
||||
|
||||
}
|
||||
|
||||
#ace_editor_pre{
|
||||
position:relative;
|
||||
width:100%;
|
||||
height:400px;
|
||||
background:white;
|
||||
border:1px solid #353535;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
&.large{
|
||||
position:fixed;
|
||||
top:0px;
|
||||
left:0px;
|
||||
bottom:0px;
|
||||
right:0px;
|
||||
background:white;
|
||||
z-index:2000 !important;
|
||||
|
||||
|
||||
#ace_editor_pre{
|
||||
position:absolute;
|
||||
top:10px;
|
||||
left:10px;
|
||||
bottom:50px;
|
||||
right:10px;
|
||||
width:inherit;
|
||||
height:inherit;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.action{
|
||||
|
||||
position:absolute;
|
||||
|
||||
bottom:15px;
|
||||
right:5px;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
&.large{
|
||||
position:fixed;
|
||||
top:0px;
|
||||
left:0px;
|
||||
bottom:0px;
|
||||
right:0px;
|
||||
background:white;
|
||||
z-index:2000 !important;
|
||||
|
||||
|
||||
#ace_editor_pre{
|
||||
position:absolute;
|
||||
top:10px;
|
||||
left:10px;
|
||||
bottom:50px;
|
||||
right:10px;
|
||||
width:inherit;
|
||||
height:inherit;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.action{
|
||||
|
||||
position:absolute;
|
||||
|
||||
bottom:15px;
|
||||
right:5px;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.image_square{
|
||||
display:inline-block;
|
||||
padding:5px;
|
||||
margin:5px;
|
||||
position:relative;
|
||||
border : 1px solid rgb(230,230,230);
|
||||
.image_square{
|
||||
display:inline-block;
|
||||
padding:5px;
|
||||
margin:5px;
|
||||
position:relative;
|
||||
border : 1px solid rgb(230,230,230);
|
||||
|
||||
background:white;
|
||||
|
||||
.actions{
|
||||
display:none;
|
||||
position:absolute;
|
||||
top:0px;
|
||||
right:0px;
|
||||
}
|
||||
}
|
||||
background:white;
|
||||
|
||||
.actions{
|
||||
display:none;
|
||||
position:absolute;
|
||||
top:0px;
|
||||
right:0px;
|
||||
}
|
||||
}
|
||||
|
||||
.image_square .img{
|
||||
text-align:center;
|
||||
width:150px;
|
||||
height:150px;
|
||||
margin:0px;
|
||||
background-position:center center;
|
||||
background-repeat:no-repeat;
|
||||
.image_square .img{
|
||||
text-align:center;
|
||||
width:150px;
|
||||
height:150px;
|
||||
margin:0px;
|
||||
background-position:center center;
|
||||
background-repeat:no-repeat;
|
||||
|
||||
background-size: contain;
|
||||
|
||||
|
||||
|
||||
}
|
||||
background-size: contain;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
.image_square:hover .actions{
|
||||
display:block;
|
||||
border:none;
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
.image_square:hover .actions{
|
||||
display:block;
|
||||
border:none;
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.image_square:hover .actions:hover{
|
||||
.image_square:hover .actions:hover{
|
||||
|
||||
opacity:1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
opacity:1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
.event_date_form{
|
||||
background:rgba(143,193,46,0.9);
|
||||
margin:0px -10px 20px -10px;
|
||||
padding:10px;
|
||||
|
||||
color:black;
|
||||
|
||||
p{
|
||||
line-height:35px;
|
||||
}
|
||||
background:rgba(143,193,46,0.9);
|
||||
margin:0px -10px 20px -10px;
|
||||
padding:10px;
|
||||
|
||||
color:black;
|
||||
|
||||
p{
|
||||
line-height:35px;
|
||||
}
|
||||
|
||||
label{
|
||||
display:inline;
|
||||
@ -567,21 +570,21 @@ text-decoration:none;
|
||||
|
||||
|
||||
.field_with_suppr{
|
||||
display:inline-block;
|
||||
position:relative;
|
||||
|
||||
.suppr{
|
||||
display:inline-block;
|
||||
position:relative;
|
||||
|
||||
.suppr{
|
||||
|
||||
display:block;
|
||||
position:absolute;
|
||||
top:7px;
|
||||
right:5px;
|
||||
img{
|
||||
cursor:pointer;
|
||||
}
|
||||
display:block;
|
||||
position:absolute;
|
||||
top:7px;
|
||||
right:5px;
|
||||
img{
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.periodes_form .field, .jockers_form .field{
|
||||
@ -638,10 +641,180 @@ cursor:pointer;
|
||||
box-sizing: border-box;
|
||||
&.active{
|
||||
border:3px solid rgba(129,155,237,1);
|
||||
.redactor-editor{
|
||||
background:rgba(225,237,251,1);
|
||||
|
||||
}
|
||||
}
|
||||
&.portlet_text_content{
|
||||
border:0;
|
||||
}
|
||||
|
||||
&.move{
|
||||
opacity:0.5;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
h1{
|
||||
margin-top:0;
|
||||
|
||||
}
|
||||
|
||||
.table-striped tr:nth-child(odd) td, .table-striped tr:nth-child(odd) th{
|
||||
|
||||
background:rgba(235,244,250,1) !important;
|
||||
|
||||
}
|
||||
|
||||
.block_portlets{
|
||||
.portlet{
|
||||
min-height:50px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#menu_item_informations{
|
||||
#collapse3{
|
||||
|
||||
position:relative;
|
||||
padding-bottom:50px;
|
||||
}
|
||||
|
||||
|
||||
#element_form_action{
|
||||
|
||||
position:fixed;
|
||||
width:330px;
|
||||
right:0;
|
||||
bottom:0;
|
||||
border-top:solid rgba(221,221,221,1) 1px;
|
||||
|
||||
.portlet_handle, .trash, .save{
|
||||
border-radius:0;
|
||||
border:0;
|
||||
margin:0;
|
||||
display:block;
|
||||
float:left;
|
||||
padding:10px 12px;
|
||||
|
||||
}
|
||||
|
||||
.portlet_handle{
|
||||
width:35%;
|
||||
|
||||
.cancel_message{
|
||||
display:none;
|
||||
}
|
||||
}
|
||||
.trash{
|
||||
width:20%;
|
||||
}
|
||||
.save{
|
||||
width:45%;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.row{
|
||||
|
||||
margin:auto;
|
||||
max-width:1100px;
|
||||
display:block;
|
||||
|
||||
|
||||
&:after{
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
|
||||
}
|
||||
|
||||
.columns{
|
||||
|
||||
display:block;
|
||||
|
||||
box-sizing: border-box;
|
||||
float:left;
|
||||
display:inline-block;
|
||||
|
||||
&.span_12{
|
||||
width:100%;
|
||||
|
||||
}
|
||||
|
||||
&.span_11{
|
||||
width:100/12*11;
|
||||
|
||||
}
|
||||
&.span_10{
|
||||
width:percentage(1/12*10);
|
||||
|
||||
}
|
||||
&.span_9{
|
||||
width:percentage(1/12*9);
|
||||
|
||||
}
|
||||
&.span_8{
|
||||
width:percentage(1/12*8);
|
||||
|
||||
}
|
||||
&.span_7{
|
||||
width:percentage(1/12*7);
|
||||
|
||||
}
|
||||
|
||||
&.span_6{
|
||||
width:percentage(1/12*6);
|
||||
|
||||
}
|
||||
&.span_5{
|
||||
width:percentage(1/12*5);
|
||||
|
||||
}
|
||||
&.span_4{
|
||||
width:percentage(1/12*4);
|
||||
|
||||
}
|
||||
&.span_3{
|
||||
width:percentage(1/12*3);
|
||||
|
||||
}
|
||||
&.span_2{
|
||||
width:percentage(1/12*2);
|
||||
|
||||
}
|
||||
|
||||
&.span_1{
|
||||
width:percentage(1/12*1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
#menu_item_informations{
|
||||
h4{
|
||||
color: #333333;
|
||||
background-color: whitesmoke;
|
||||
border:1px solid #dddddd;
|
||||
padding:10px 15px;
|
||||
font-size:16px;
|
||||
cursor:pointer;
|
||||
border-left:0px;
|
||||
border-right:0px;
|
||||
}
|
||||
|
||||
.panel{
|
||||
padding:0 10px;
|
||||
}
|
||||
}
|
||||
#collapse3{
|
||||
height:auto !important;
|
||||
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -5,7 +5,17 @@
|
||||
=render :partial => "admin/blocks/block", :locals => {:block => page.blocks[0], :sortable => true}
|
||||
|
||||
|
||||
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
#menu_item_inspector_container
|
||||
|
||||
|
||||
@ -14,55 +24,54 @@
|
||||
|
||||
|
||||
|
||||
.accordion#menu_item_informations.panel-group
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
%h4.panel-title
|
||||
%a.panel-toggle{:href => "#collapseOne",:data => {:toggle => "collapse", :parent => "#menu_item_informations"}}
|
||||
Infos sur la page
|
||||
#menu_item_informations
|
||||
%h4
|
||||
Infos sur la page
|
||||
|
||||
|
||||
#collapseOne.panel-collapse.collapse
|
||||
.panel-body
|
||||
=render :partial => "edit_form"
|
||||
.panel#collapseOne{:style => "display:none;"}
|
||||
=render :partial => "edit_form"
|
||||
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
%h4.panel-title
|
||||
%a.panel-toggle{:href => "#collapse2",:data => {:toggle => "collapse", :parent => "#menu_item_informations"}}
|
||||
éléments
|
||||
%h4 éléments
|
||||
|
||||
|
||||
#collapse2.panel-collapse.collapse.in
|
||||
.panel-body
|
||||
.block_portlets_sortable#content_types
|
||||
-page.blocks[0].alloweds_types.each do |slug, name|
|
||||
.panel#collapse2
|
||||
.block_portlets_sortable#content_types
|
||||
-page.blocks[0].alloweds_types.each do |slug, name|
|
||||
|
||||
.content_type{:id => slug, :"data-type" => slug}
|
||||
=#i slug.to_s.constantize.picto
|
||||
=image_tag("admin/content_type/type_"+slug.to_s+".png", :alt => name, :title => name, :class => "handle")
|
||||
|
||||
|
||||
.content_type{:id => slug, :"data-type" => slug}
|
||||
=image_tag("admin/content_type/type_"+slug.to_s+".png", :alt => name, :title => name, :class => "handle")
|
||||
|
||||
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
%h4.panel-title
|
||||
%a.panel-toggle{:href => "#collapse3",:data => {:toggle => "collapse", :parent => "#menu_item_informations"}}
|
||||
Modifier l'élément
|
||||
#collapse3{:style => "display:none;"}
|
||||
%h4 Modifier l'élément
|
||||
|
||||
|
||||
#collapse3.panel-collapse.collapse
|
||||
.panel-body
|
||||
|
||||
#element_form
|
||||
|
||||
%div
|
||||
%a.btn.btn-default.portlet_handle{:href => "#", :data => {:portlet_id => nil}}
|
||||
.panel
|
||||
#element_form
|
||||
|
||||
%div#element_form_action
|
||||
%a.move.btn.btn-default.portlet_handle{:href => "#", :data => {:portlet_id => nil}}
|
||||
%span.move_message
|
||||
=ic :arrows
|
||||
|
||||
déplacer
|
||||
=link_to ic(:"trash-o")+" Supprimer", "#", :method => :delete, :data => { :confirm => "Etes-vous sûr ?"}, :remote => true, :class => "btn btn-danger trash"
|
||||
|
||||
%span.cancel_message
|
||||
=ic :ban
|
||||
|
||||
annuler
|
||||
|
||||
=link_to ic(:"trash-o"), "#", :method => :delete, :data => { :confirm => "Etes-vous sûr ?"}, :remote => true, :class => "btn btn-danger trash"
|
||||
|
||||
%button.save.btn.btn-primary
|
||||
=ic(:"floppy-o")
|
||||
|
||||
Sauvegarder
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
%tr#testimony_row.testimony_row.row{:id => testimony.id}
|
||||
%tr#testimony_row.testimony_row{:id => testimony.id}
|
||||
%td=testimony.author
|
||||
%td=testimony.quote
|
||||
|
||||
|
@ -5,7 +5,17 @@
|
||||
=render :partial => "admin/blocks/block", :locals => {:block => @testimony.block, :sortable => true}
|
||||
|
||||
|
||||
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
#menu_item_inspector_container
|
||||
|
||||
|
||||
@ -14,60 +24,53 @@
|
||||
|
||||
|
||||
|
||||
.accordion#menu_item_informations.panel-group
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
%h4.panel-title
|
||||
%a.panel-toggle{:href => "#collapseOne",:data => {:toggle => "collapse", :parent => "#menu_item_informations"}}
|
||||
Infos sur le témoignage
|
||||
#menu_item_informations
|
||||
%h4
|
||||
Infos sur le témoignage
|
||||
|
||||
|
||||
#collapseOne.panel-collapse.collapse
|
||||
.panel-body
|
||||
=link_to "modifier", edit_admin_testimony_path(@testimony), :remote => true,:class => "btn"
|
||||
=render :partial => "show"
|
||||
.panel#collapseOne{:style => "display:none;"}
|
||||
=link_to "modifier", edit_admin_testimony_path(@testimony), :remote => true,:class => "btn"
|
||||
=render :partial => "show"
|
||||
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
%h4.panel-title
|
||||
%a.panel-toggle{:href => "#collapse2",:data => {:toggle => "collapse", :parent => "#menu_item_informations"}}
|
||||
éléments
|
||||
%h4 éléments
|
||||
|
||||
|
||||
#collapse2.panel-collapse.collapse.in
|
||||
.panel-body
|
||||
.block_portlets_sortable#content_types
|
||||
-@testimony.alloweds_types.each do |slug, name|
|
||||
.panel#collapse2
|
||||
.block_portlets_sortable#content_types
|
||||
-@testimony.alloweds_types.each do |slug, name|
|
||||
|
||||
.content_type{:id => slug, :"data-type" => slug}
|
||||
=image_tag("admin/content_type/type_"+slug.to_s+".png", :alt => name, :title => name, :class => "handle")
|
||||
.content_type{:id => slug, :"data-type" => slug}
|
||||
=image_tag("admin/content_type/type_"+slug.to_s+".png", :alt => name, :title => name, :class => "handle")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
%h4.panel-title
|
||||
%a.panel-toggle{:href => "#collapse3",:data => {:toggle => "collapse", :parent => "#menu_item_informations"}}
|
||||
Modifier l'élément
|
||||
#collapse3{:style => "display:none;"}
|
||||
%h4 Modifier l'élément
|
||||
|
||||
|
||||
#collapse3.panel-collapse.collapse
|
||||
.panel-body
|
||||
|
||||
#element_form
|
||||
|
||||
%div
|
||||
%a.btn.btn-default.portlet_handle{:href => "#", :data => {:portlet_id => nil}}
|
||||
.panel
|
||||
#element_form
|
||||
|
||||
%div#element_form_action
|
||||
%a.move.btn.btn-default.portlet_handle{:href => "#", :data => {:portlet_id => nil}}
|
||||
%span.move_message
|
||||
=ic :arrows
|
||||
|
||||
déplacer
|
||||
=link_to ic(:"trash-o")+" Supprimer", "#", :method => :delete, :data => { :confirm => "Etes-vous sûr ?"}, :remote => true, :class => "btn btn-danger trash"
|
||||
|
||||
%span.cancel_message
|
||||
=ic :ban
|
||||
|
||||
annuler
|
||||
|
||||
=link_to ic(:"trash-o"), "#", :method => :delete, :data => { :confirm => "Etes-vous sûr ?"}, :remote => true, :class => "btn btn-danger trash"
|
||||
|
||||
%button.save.btn.btn-primary
|
||||
=ic(:"floppy-o")
|
||||
|
||||
Sauvegarder
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -5,7 +5,17 @@
|
||||
=render :partial => "admin/blocks/block", :locals => {:block => @topic.block, :sortable => true}
|
||||
|
||||
|
||||
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
#menu_item_inspector_container
|
||||
|
||||
|
||||
@ -14,59 +24,47 @@
|
||||
|
||||
|
||||
|
||||
.accordion#menu_item_informations.panel-group
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
%h4.panel-title
|
||||
%a.panel-toggle{:href => "#collapseOne",:data => {:toggle => "collapse", :parent => "#menu_item_informations"}}
|
||||
Infos sur la ressource
|
||||
#menu_item_informations
|
||||
%h4
|
||||
Infos sur la ressource
|
||||
|
||||
|
||||
#collapseOne.panel-collapse.collapse
|
||||
.panel-body
|
||||
=render :partial => "form"
|
||||
|
||||
|
||||
|
||||
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
%h4.panel-title
|
||||
%a.panel-toggle{:href => "#collapse2",:data => {:toggle => "collapse", :parent => "#menu_item_informations"}}
|
||||
éléments
|
||||
|
||||
|
||||
#collapse2.panel-collapse.collapse.in
|
||||
.panel-body
|
||||
.block_portlets_sortable#content_types
|
||||
-@topic.block.alloweds_types.each do |slug, name|
|
||||
|
||||
.content_type{:id => slug, :"data-type" => slug}
|
||||
=image_tag("admin/content_type/type_"+slug.to_s+".png", :alt => name, :title => name, :class => "handle")
|
||||
|
||||
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
%h4.panel-title
|
||||
%a.panel-toggle{:href => "#collapse3",:data => {:toggle => "collapse", :parent => "#menu_item_informations"}}
|
||||
Modifier l'élément
|
||||
|
||||
|
||||
#collapse3.panel-collapse.collapse
|
||||
.panel-body
|
||||
|
||||
#element_form
|
||||
.panel#collapseOne{:style => "display:none;"}
|
||||
=render :partial => "form"
|
||||
|
||||
%div
|
||||
%a.btn.btn-default.portlet_handle{:href => "#", :data => {:portlet_id => nil}}
|
||||
%h4 éléments
|
||||
|
||||
.panel#collapse2
|
||||
.block_portlets_sortable#content_types
|
||||
-@topic.block.alloweds_types.each do |slug, name|
|
||||
|
||||
.content_type{:id => slug, :"data-type" => slug}
|
||||
=image_tag("admin/content_type/type_"+slug.to_s+".png", :alt => name, :title => name, :class => "handle")
|
||||
|
||||
|
||||
#collapse3{:style => "display:none;"}
|
||||
%h4 Modifier l'élément
|
||||
|
||||
|
||||
.panel
|
||||
#element_form
|
||||
|
||||
%div#element_form_action
|
||||
%a.move.btn.btn-default.portlet_handle{:href => "#", :data => {:portlet_id => nil}}
|
||||
%span.move_message
|
||||
=ic :arrows
|
||||
|
||||
déplacer
|
||||
=link_to ic(:"trash-o")+" Supprimer", "#", :method => :delete, :data => { :confirm => "Etes-vous sûr ?"}, :remote => true, :class => "btn btn-danger trash"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
%span.cancel_message
|
||||
=ic :ban
|
||||
|
||||
annuler
|
||||
|
||||
=link_to ic(:"trash-o"), "#", :method => :delete, :data => { :confirm => "Etes-vous sûr ?"}, :remote => true, :class => "btn btn-danger trash"
|
||||
|
||||
%button.save.btn.btn-primary
|
||||
=ic(:"floppy-o")
|
||||
|
||||
Sauvegarder
|
||||
|
||||
|
||||
|
@ -1,20 +1,20 @@
|
||||
-style=""
|
||||
-if block_content.style== 2
|
||||
-style += "background:#d8d8d8;"
|
||||
-style += "background:#d8d8d8;"
|
||||
-if block_content.nbr_columns == 1
|
||||
-block_content.blocks.each do |block|
|
||||
-block_content.blocks.each do |block|
|
||||
|
||||
.container_12{:style => "padding:0px;"+style.to_s}
|
||||
.grid_12
|
||||
=render :partial => "admin/blocks/block", :locals => {:block => block}
|
||||
.clear
|
||||
.container_12{:style => "padding:0px;"+style.to_s}
|
||||
.grid_12
|
||||
=render :partial => "admin/blocks/block", :locals => {:block => block}
|
||||
.clear
|
||||
-else
|
||||
.container_12{:style => "padding:0px;"+style.to_s}
|
||||
-i = 0
|
||||
-block_content.blocks.each do |block|
|
||||
-i+=1
|
||||
.grid_6.col{:class => ("col_"+i.to_s)}
|
||||
.container_12{:style => "padding:0px;"+style.to_s}
|
||||
-i = 0
|
||||
-block_content.blocks.each do |block|
|
||||
-i+=1
|
||||
.grid_6.col{:class => ("col_"+i.to_s)}
|
||||
|
||||
=render :partial => "admin/blocks/block", :locals => {:block => block}
|
||||
|
||||
.clear
|
||||
=render :partial => "admin/blocks/block", :locals => {:block => block}
|
||||
|
||||
.clear
|
@ -1,89 +1,84 @@
|
||||
|
||||
=semantic_form_for( [:portlet, @block_content], :remote => true) do |f|
|
||||
-if !@block_content.id
|
||||
%table
|
||||
%tr
|
||||
%td Nombre de colonnes :
|
||||
%td
|
||||
|
||||
%p
|
||||
=f.radio_button :nbr_columns, 1
|
||||
Une colonne
|
||||
%p
|
||||
=f.radio_button :nbr_columns, 2
|
||||
Deux colonnes
|
||||
|
||||
%p
|
||||
=f.radio_button :nbr_columns, 3
|
||||
Trois colonnes
|
||||
|
||||
%p
|
||||
=f.radio_button :nbr_columns, 4
|
||||
Quatre colonnes
|
||||
|
||||
-else
|
||||
|
||||
|
||||
#column_sliders{:style => "height:22px;"}
|
||||
-for i in 1..(@block_content.nbr_columns.to_i-1)
|
||||
|
||||
.column_slider{:"data-slider-value"=>eval("@block_content.row#{i}_value.to_i"), :style => "width:100%;"}
|
||||
|
||||
-if !@block_content.id
|
||||
%table
|
||||
%tr
|
||||
%td Nombre de colonnes :
|
||||
%td
|
||||
|
||||
%p
|
||||
=f.radio_button :nbr_columns, 1
|
||||
Une colonne
|
||||
%p
|
||||
=f.radio_button :nbr_columns, 2
|
||||
Deux colonnes
|
||||
|
||||
%p
|
||||
=f.radio_button :nbr_columns, 3
|
||||
Trois colonnes
|
||||
|
||||
%p
|
||||
=f.radio_button :nbr_columns, 4
|
||||
Quatre colonnes
|
||||
|
||||
-else
|
||||
|
||||
|
||||
#column_sliders{:style => "height:22px;"}
|
||||
-for i in 1..(@block_content.nbr_columns.to_i-1)
|
||||
|
||||
.column_slider{:"data-slider-value"=>eval("@block_content.row#{i}_value.to_i"), :style => "width:100%;"}
|
||||
|
||||
|
||||
|
||||
:javascript
|
||||
function compareNumbers(a, b)
|
||||
{
|
||||
return a - b;
|
||||
}
|
||||
|
||||
$(".column_slider").slider({
|
||||
max: 12,
|
||||
min: 0,
|
||||
step:1
|
||||
}).on("slide", function(ev)
|
||||
{
|
||||
var return_array = new Array();
|
||||
|
||||
$("#column_sliders .column_slider").each(function(){
|
||||
return_array.push($(this).data('slider').getValue());
|
||||
|
||||
});
|
||||
|
||||
var cols_values = [];
|
||||
prev_value= 0;
|
||||
$.each(return_array.sort(compareNumbers), function(index, value) {
|
||||
cols_values.push(value-prev_value);
|
||||
|
||||
|
||||
prev_value = value;
|
||||
|
||||
});
|
||||
|
||||
cols_values.push(12-prev_value);
|
||||
|
||||
$.each(cols_values, function(index, value) {
|
||||
|
||||
$("#row"+(index+1)).val(value);
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
=f.hidden_field :row1, :id => "row1"
|
||||
=f.hidden_field :row2, :id => "row2"
|
||||
=f.hidden_field :row3, :id => "row3"
|
||||
=f.hidden_field :row4, :id => "row4"
|
||||
|
||||
-if BlockContent::STYLES.size > 0
|
||||
Style :
|
||||
= f.select :style, BlockContent::STYLES
|
||||
%br
|
||||
|
||||
|
||||
= f.submit "Sauvegarder", :class => "btn btn-primary"
|
||||
|
||||
|
||||
:javascript
|
||||
function compareNumbers(a, b)
|
||||
{
|
||||
return a - b;
|
||||
}
|
||||
|
||||
$(".column_slider").slider({
|
||||
max: 12,
|
||||
min: 0,
|
||||
step:1
|
||||
}).on("slide", function(ev)
|
||||
{
|
||||
var return_array = new Array();
|
||||
|
||||
$("#column_sliders .column_slider").each(function(){
|
||||
return_array.push($(this).data('slider').getValue());
|
||||
|
||||
});
|
||||
|
||||
var cols_values = [];
|
||||
prev_value= 0;
|
||||
$.each(return_array.sort(compareNumbers), function(index, value) {
|
||||
cols_values.push(value-prev_value);
|
||||
|
||||
|
||||
prev_value = value;
|
||||
|
||||
});
|
||||
|
||||
cols_values.push(12-prev_value);
|
||||
|
||||
$.each(cols_values, function(index, value) {
|
||||
|
||||
$("#row"+(index+1)).val(value);
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
=f.hidden_field :row1, :id => "row1"
|
||||
=f.hidden_field :row2, :id => "row2"
|
||||
=f.hidden_field :row3, :id => "row3"
|
||||
=f.hidden_field :row4, :id => "row4"
|
||||
|
||||
-if BlockContent::STYLES.size > 0
|
||||
Style :
|
||||
= f.select :style, BlockContent::STYLES
|
||||
|
||||
|
@ -1,15 +1,11 @@
|
||||
=semantic_form_for( [:portlet, @break_content], :remote => true) do |f|
|
||||
%table.form_table
|
||||
%tr
|
||||
%td Trait ?
|
||||
%td=f.check_box :line
|
||||
|
||||
-if BreakContent::STYLES.size > 0
|
||||
%tr
|
||||
%td Style :
|
||||
%td= f.select :style, BreakContent::STYLES
|
||||
|
||||
= f.submit "Sauvegarder", :class => "btn btn-primary"
|
||||
|
||||
|
||||
|
||||
%table.form_table
|
||||
%tr
|
||||
%td Trait ?
|
||||
%td=f.check_box :line
|
||||
|
||||
-if BreakContent::STYLES.size > 0
|
||||
%tr
|
||||
%td Style :
|
||||
%td= f.select :style, BreakContent::STYLES
|
||||
|
@ -1,8 +1,8 @@
|
||||
|
||||
%p
|
||||
Titre :
|
||||
=download_content.title
|
||||
|
||||
Titre :
|
||||
=download_content.title
|
||||
|
||||
%p
|
||||
Téléchargement :
|
||||
=download_content.data_file.abstract_file_name if download_content.data_file
|
||||
Téléchargement :
|
||||
=download_content.data_file.abstract_file_name if download_content.data_file
|
||||
|
@ -1,39 +1,31 @@
|
||||
=semantic_form_for( [:portlet, @download_content], :remote => true) do |f|
|
||||
|
||||
|
||||
|
||||
%table.form_table
|
||||
|
||||
|
||||
%table.form_table
|
||||
|
||||
%tr
|
||||
%td Titre :
|
||||
%td=f.text_field :title
|
||||
|
||||
%tr
|
||||
%td
|
||||
-r = rand(1000000000000000000000000000)
|
||||
Fichier :
|
||||
%td
|
||||
#name{:id => r}
|
||||
=f.object.data_file.abstract_file_name if f.object.data_file
|
||||
=f.hidden_field :data_file_id, :id => "input_"+r.to_s
|
||||
|
||||
=link_to "Modifier ce fichier", "#", :onclick => "select_file_from_manager('"+r.to_s+"');return false;"
|
||||
|
||||
|
||||
|
||||
-if DownloadContent::STYLES.size >0
|
||||
%tr
|
||||
%td Style :
|
||||
%td= f.select :style, DownloadContent::STYLES
|
||||
|
||||
|
||||
|
||||
|
||||
= f.submit "Sauvegarder", :class => "btn btn-primary"
|
||||
|
||||
|
||||
%tr
|
||||
%td Titre :
|
||||
%td=f.text_field :title
|
||||
|
||||
%tr
|
||||
%td
|
||||
-r = rand(1000000000000000000000000000)
|
||||
Fichier :
|
||||
%td
|
||||
#name{:id => r}
|
||||
=f.object.data_file.abstract_file_name if f.object.data_file
|
||||
=f.hidden_field :data_file_id, :id => "input_"+r.to_s
|
||||
|
||||
=link_to "Modifier ce fichier", "#", :onclick => "select_file_from_manager('"+r.to_s+"');return false;"
|
||||
|
||||
|
||||
|
||||
-if DownloadContent::STYLES.size >0
|
||||
%tr
|
||||
%td Style :
|
||||
%td= f.select :style, DownloadContent::STYLES
|
||||
|
||||
|
||||
|
||||
|
@ -1,18 +1,11 @@
|
||||
=semantic_form_for( [:portlet, @dynamic_content], :remote => true) do |f|
|
||||
|
||||
|
||||
%table.form_table
|
||||
%table.form_table
|
||||
|
||||
%tr
|
||||
%tr
|
||||
|
||||
%td= f.select :name, DynamicContent::NAMES.map {|u| [u[1], u[0]] }
|
||||
%td= f.select :name, DynamicContent::NAMES.map {|u| [u[1], u[0]] }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
= f.submit "Sauvegarder", :class => "btn btn-primary"
|
||||
|
||||
|
||||
|
||||
|
@ -1,9 +1,10 @@
|
||||
= semantic_form_for [:portlet, @gallery_content], :remote => true do |form|
|
||||
|
||||
-if GalleryContent::STYLES.size > 0
|
||||
Style :
|
||||
= form.select :style, GalleryContent::STYLES
|
||||
|
||||
= form.submit "Sauvegarder", :class => "btn btn-primary"
|
||||
%p
|
||||
=link_to "Ajouter des images", "#", :onclick => "select_gallery_images_from_manager('#{form.object.id.to_s}');return false;", :class => "btn btn-default" if form.object.id
|
||||
-if GalleryContent::STYLES.size > 0
|
||||
Style :
|
||||
= form.select :style, GalleryContent::STYLES
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,32 +1,19 @@
|
||||
#myModal.modal.fade{"aria-hidden" => "true", "aria-labelledby" => "myModalLabel", :role => "dialog", :tabindex => "-1"}
|
||||
|
||||
= semantic_form_for [:portlet, @gallery_image], :remote => true do |form|
|
||||
.content
|
||||
|
||||
|
||||
%h3 Modifier les infos
|
||||
|
||||
.modal-header
|
||||
%button.close{"aria-hidden" => "true", "data-dismiss" => "modal", :type => "button"} ×
|
||||
%h3#myModalLabel Modifier les infos
|
||||
.modal-body
|
||||
|
||||
= semantic_form_for [:portlet, @gallery_image], :remote => true do |form|
|
||||
= form.inputs do
|
||||
= form.input :title, :label => "Titre :"
|
||||
= form.input :tags, :label => "Tags :"
|
||||
= form.input :description, :label => "Description :", :as => :text, :input_html => {:class => "text_editor"}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.modal-footer
|
||||
%button.btn{"aria-hidden" => "true", "data-dismiss" => "modal"} Annuler
|
||||
%button.btn.btn-primary{"aria-hidden" => "true", "data-dismiss" => "modal", :onclick => "$(this).closest('.modal').find('form').submit();"} Sauvegarder
|
||||
|
||||
= form.inputs do
|
||||
= form.input :title, :label => "Titre :"
|
||||
= form.input :tags, :label => "Tags :"
|
||||
= form.input :description, :label => "Description :", :as => :text, :input_html => {:class => "text_editor"}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.actions
|
||||
=form.submit "Sauvegarder", :class => "btn btn-primary"
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
-if gallery_image.image_file
|
||||
.gallery_image.image_square#gallery_image{:id => gallery_image.id, :data => { :title => gallery_image.title , :description => gallery_image.description, :id => gallery_image.id} }
|
||||
.img{:style => "background-image : url('#{gallery_image.image_file.file.large.medium.small.thumb.url}');"}
|
||||
|
||||
.actions
|
||||
=link_to i(:"trash-o"), [:portlet, gallery_image], :confirm => 'Voulez-vous vraiment supprimer cette image ?', :method => :delete, :remote => true
|
||||
=link_to i(:pencil), edit_portlet_gallery_image_path(gallery_image), :remote => true
|
||||
|
||||
|
||||
.gallery_image.image_square#gallery_image{:id => gallery_image.id, :data => { :title => gallery_image.title , :description => gallery_image.description, :id => gallery_image.id} }
|
||||
.img{:style => "background-image : url('#{gallery_image.image_file.file.large.medium.small.thumb.url}');"}
|
||||
|
||||
.actions
|
||||
=link_to i(:"trash-o"), [:portlet, gallery_image], :confirm => 'Voulez-vous vraiment supprimer cette image ?', :method => :delete, :remote => true
|
||||
=link_to i(:pencil), edit_portlet_gallery_image_path(gallery_image), :remote => true
|
||||
|
||||
|
@ -1,2 +1 @@
|
||||
|
||||
$('<%= escape_javascript(render(:partial => "form"))%>').modal('show');
|
||||
show_pane_hover("<%= escape_javascript(render(:partial => "form"))%>");
|
@ -1,60 +1,53 @@
|
||||
.html_content_form
|
||||
|
||||
=semantic_form_for( [:portlet, @html_content], :remote => true) do |f|
|
||||
|
||||
|
||||
=f.text_area :content, :style => "width:98%;height:400px;", :class => "inputText", :id => "ace_editor_textarea"
|
||||
|
||||
%pre#ace_editor_pre{:style => "margin:0px;"}
|
||||
|
||||
<script>
|
||||
var editor;
|
||||
|
||||
editor = ace.edit("ace_editor_pre");
|
||||
editor.setTheme("ace/theme/textmate");
|
||||
editor.getSession().setMode("ace/mode/html");
|
||||
editor.setPrintMarginColumn(0);
|
||||
editor.session.setUseWrapMode(true);
|
||||
|
||||
var textarea = $('#ace_editor_textarea').hide();
|
||||
editor.getSession().setValue(textarea.val());
|
||||
|
||||
editor.getSession().on('change', function(){
|
||||
|
||||
textarea.val(editor.getSession().getValue());
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
=semantic_form_for( [:portlet, @html_content], :remote => true) do |f|
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
%table.form_table
|
||||
%tr
|
||||
%td Style :
|
||||
%td= f.select :content_type, HtmlContent::CONTENT_TYPES
|
||||
|
||||
|
||||
|
||||
.action
|
||||
%button{:onclick => "$(this).closest('.html_content_form').toggleClass('large');editor.resize() ;return false;"} zoom
|
||||
= f.submit "Sauvegarder", :class => "btn btn-primary"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
=f.text_area :content, :style => "width:98%;height:400px;", :class => "inputText", :id => "ace_editor_textarea"
|
||||
|
||||
%pre#ace_editor_pre{:style => "margin:0px;"}
|
||||
=raw "<!---"
|
||||
<script>
|
||||
var editor;
|
||||
|
||||
editor = ace.edit("ace_editor_pre");
|
||||
editor.setTheme("ace/theme/textmate");
|
||||
editor.getSession().setMode("ace/mode/html");
|
||||
editor.setPrintMarginColumn(0);
|
||||
editor.session.setUseWrapMode(true);
|
||||
|
||||
var textarea = $('#ace_editor_textarea').hide();
|
||||
editor.getSession().setValue(textarea.val());
|
||||
|
||||
editor.getSession().on('change', function(){
|
||||
|
||||
textarea.val(editor.getSession().getValue());
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
=raw "---->"
|
||||
%table.form_table
|
||||
%tr
|
||||
%td Style :
|
||||
%td= f.select :content_type, HtmlContent::CONTENT_TYPES
|
||||
|
||||
|
||||
|
||||
.action
|
||||
%button{:onclick => "$(this).closest('.html_content_form').toggleClass('large');editor.resize() ;return false;"} zoom
|
||||
|
||||
|
||||
-if HtmlContent::STYLES.size > 0
|
||||
%table.form_table
|
||||
%tr
|
||||
%td Style :
|
||||
%td= f.select :style, HtmlContent::STYLES
|
||||
|
||||
|
||||
|
||||
|
||||
-if HtmlContent::STYLES.size > 0
|
||||
%table.form_table
|
||||
%tr
|
||||
%td Style :
|
||||
%td= f.select :style, HtmlContent::STYLES
|
||||
|
||||
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
-begin
|
||||
=render :inline => html_content.content, :type => html_content.content_type
|
||||
=render :inline => html_content.content, :type => html_content.content_type
|
||||
-rescue Exception=>e
|
||||
-if html_content.content_type == "haml"
|
||||
%h3= e.message
|
||||
%p
|
||||
à la ligne
|
||||
= e.original_exception.line
|
||||
-if html_content.content_type == "haml"
|
||||
%h3= e.message
|
||||
%p
|
||||
à la ligne
|
||||
= e.original_exception.line
|
||||
|
||||
-else
|
||||
%h3= e.message
|
||||
-else
|
||||
%h3= e.message
|
||||
|
@ -1,32 +1,29 @@
|
||||
|
||||
|
||||
|
||||
= semantic_form_for [:portlet, @image_content], :remote => true do |form|
|
||||
|
||||
= form.inputs do
|
||||
= form.input :image_file_id, :label => "Image :" , :as => :qi_image_select
|
||||
|
||||
= form.inputs do
|
||||
= form.input :image_file_id, :label => "Image :" , :as => :qi_image_select
|
||||
|
||||
|
||||
= form.input :alt, :label => "Texte alternatif :"
|
||||
|
||||
= form.input :alignement, :label => "Alignement :", :as => :select, :collection => ImageContent::ALIGNS, :include_blank => false
|
||||
= form.input :style, :label => "Style :", :as => :select, :collection => ImageContent::STYLES, :include_blank => false
|
||||
= form.input :width, :label => "Largeur :"
|
||||
= form.input :height, :label => "Hauteur :"
|
||||
|
||||
|
||||
= form.input :with_cible, :as => :boolean, :label => "Avec lien ?", :input_html => { :onchange => "if ($('#with_cible').is(':checked')) { $('#with_cible').closest('form').find('.cible_space').show();$('#with_cible').closest('form').find('.expandable').hide(); }else{ $('#with_cible').closest('form').find('.cible_space').hide();$('#with_cible').closest('form').find('.expandable').show(); }", :id => "with_cible" }, :label_html => {:onchange => ""}
|
||||
= form.input :alt, :label => "Texte alternatif :"
|
||||
|
||||
= form.input :alignement, :label => "Alignement :", :as => :select, :collection => ImageContent::ALIGNS, :include_blank => false
|
||||
= form.input :style, :label => "Style :", :as => :select, :collection => ImageContent::STYLES, :include_blank => false
|
||||
= form.input :width, :label => "Largeur :"
|
||||
= form.input :height, :label => "Hauteur :"
|
||||
|
||||
|
||||
= form.input :with_cible, :as => :boolean, :label => "Avec lien ?", :input_html => { :onchange => "if ($('#with_cible').is(':checked')) { $('#with_cible').closest('form').find('.cible_space').show();$('#with_cible').closest('form').find('.expandable').hide(); }else{ $('#with_cible').closest('form').find('.cible_space').hide();$('#with_cible').closest('form').find('.expandable').show(); }", :id => "with_cible" }, :label_html => {:onchange => ""}
|
||||
|
||||
.expandable{:style => ((!@image_content.cible and !@image_content.with_cible) ? "display:block;" : "display:none;" )}
|
||||
= form.inputs do
|
||||
= form.input :expandable,:as => :boolean , :label => "L'image peut être agrandie ? :"
|
||||
|
||||
.expandable{:style => ((!@image_content.cible and !@image_content.with_cible) ? "display:block;" : "display:none;" )}
|
||||
= form.inputs do
|
||||
= form.input :expandable,:as => :boolean , :label => "L'image peut être agrandie ? :"
|
||||
|
||||
|
||||
.cible_space{:style => ((!@image_content.cible and !@image_content.with_cible) ? "display:none;" : "display:block;" )}
|
||||
= form.inputs do
|
||||
= form.input :cible, :label => "Cible :" , :as => :qi_cible_select
|
||||
= form.input :popup, :label => "Ouvrir dans une popup ?", :as => :boolean
|
||||
|
||||
|
||||
= form.submit "Sauvegarder", :class => "btn btn-primary"
|
||||
.cible_space{:style => ((!@image_content.cible and !@image_content.with_cible) ? "display:none;" : "display:block;" )}
|
||||
= form.inputs do
|
||||
= form.input :cible, :label => "Cible :" , :as => :qi_cible_select
|
||||
= form.input :popup, :label => "Ouvrir dans une popup ?", :as => :boolean
|
||||
|
||||
|
||||
|
@ -1,31 +1,31 @@
|
||||
|
||||
-if image_content.image_file
|
||||
|
||||
-if image_content.style== "1"
|
||||
-url =image_content.image_file.file.large.medium.url
|
||||
-if image_content.style== "1"
|
||||
-url =image_content.image_file.file.large.medium.url
|
||||
|
||||
-elsif image_content.style== "2"
|
||||
-url =image_content.image_file.file.large.medium.small.url
|
||||
-elsif image_content.style== "2"
|
||||
-url =image_content.image_file.file.large.medium.small.url
|
||||
|
||||
-elsif image_content.style== "3"
|
||||
-url =image_content.image_file.file.square.url
|
||||
-elsif image_content.style== "3"
|
||||
-url =image_content.image_file.file.square.url
|
||||
|
||||
-elsif image_content.style== "4"
|
||||
-url =image_content.image_file.file.large.medium.small.thumb.url
|
||||
-elsif image_content.style== "5"
|
||||
-url =image_content.image_file.file.large.url
|
||||
|
||||
-elsif image_content.style== "4"
|
||||
-url =image_content.image_file.file.large.medium.small.thumb.url
|
||||
-elsif image_content.style== "5"
|
||||
-url =image_content.image_file.file.large.url
|
||||
|
||||
|
||||
=image_content.style
|
||||
=image_content.style
|
||||
|
||||
-else
|
||||
-url ="admin/default_image.png"
|
||||
-url ="admin/default_image.png"
|
||||
-style = ""
|
||||
-style = "text-align:center;" if image_content.alignement == "center"
|
||||
|
||||
|
||||
-style = "text-align:right;" if image_content.alignement == "right"
|
||||
|
||||
|
||||
|
||||
-style = "text-align:left;" if image_content.alignement == "left"
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
|
||||
|
||||
%p.img{:style =>style}
|
||||
=image_tag(url, :alt => image_content.alt.to_s, :style => styleimg)
|
||||
|
||||
=image_tag(url, :alt => image_content.alt.to_s, :style => styleimg)
|
||||
|
||||
|
||||
="L'image peut être agrandie si l'on clique dessus" if image_content.expandable
|
@ -1,14 +1,12 @@
|
||||
= semantic_form_for [:portlet, @link_content], :remote => true do |form|
|
||||
|
||||
.form1
|
||||
= form.inputs do
|
||||
= form.input :name, :label => "Texte à afficher :"
|
||||
=# form.input :title, :label => "Title :"
|
||||
= form.input :popup,:as => :boolean , :label => "Ouvrir dans une nouvelle fenêtre ?"
|
||||
|
||||
= form.input :cible, :label => "Cible :" , :as => :qi_cible_select
|
||||
|
||||
|
||||
= form.submit "Sauvegarder", :class => "btn btn-primary"
|
||||
|
||||
|
||||
.form1
|
||||
= form.inputs do
|
||||
= form.input :name, :label => "Texte à afficher :"
|
||||
=# form.input :title, :label => "Title :"
|
||||
= form.input :popup,:as => :boolean , :label => "Ouvrir dans une nouvelle fenêtre ?"
|
||||
|
||||
= form.input :cible, :label => "Cible :" , :as => :qi_cible_select
|
||||
|
||||
|
||||
|
@ -4,7 +4,7 @@ Texte affiché :
|
||||
%br
|
||||
="s'ouvre dans une nouvelle page" if link_content.popup
|
||||
|
||||
- if link_content.cible
|
||||
%strong
|
||||
Liens vers
|
||||
= link_content.cible.cible_name
|
||||
- if link_content.cible
|
||||
%strong
|
||||
Liens vers
|
||||
= link_content.cible.cible_name
|
@ -1,26 +1,22 @@
|
||||
=semantic_form_for( [:portlet, @map_content], :remote => true) do |f|
|
||||
|
||||
%p
|
||||
Adresse :
|
||||
=f.text_field :address, :style => "width:98%;", :class => "inputText"
|
||||
|
||||
%p
|
||||
Adresse :
|
||||
=f.text_field :address, :style => "width:98%;", :class => "inputText"
|
||||
|
||||
%p
|
||||
Nom du lieu :
|
||||
=f.text_field :name, :style => "width:98%;", :class => "inputText"
|
||||
|
||||
%p
|
||||
Infobule
|
||||
=f.check_box :info_bule
|
||||
|
||||
%p
|
||||
Vue
|
||||
= f.select :view, MapContent::VIEWS
|
||||
|
||||
%p
|
||||
Zoom
|
||||
= f.select :zoom, MapContent::ZOOMS
|
||||
%br
|
||||
= f.submit "Sauvegarder", :class => "btn btn-primary"
|
||||
|
||||
|
||||
%p
|
||||
Nom du lieu :
|
||||
=f.text_field :name, :style => "width:98%;", :class => "inputText"
|
||||
|
||||
%p
|
||||
Infobule
|
||||
=f.check_box :info_bule
|
||||
|
||||
%p
|
||||
Vue
|
||||
= f.select :view, MapContent::VIEWS
|
||||
|
||||
%p
|
||||
Zoom
|
||||
= f.select :zoom, MapContent::ZOOMS
|
||||
|
||||
|
@ -22,12 +22,12 @@ var myOptions = {
|
||||
center: myLatlng,
|
||||
|
||||
-if map_content.view == 1
|
||||
mapTypeId: google.maps.MapTypeId.ROADMAP
|
||||
mapTypeId: google.maps.MapTypeId.ROADMAP
|
||||
-elsif map_content.view == 2
|
||||
mapTypeId: google.maps.MapTypeId.HYBRID
|
||||
mapTypeId: google.maps.MapTypeId.HYBRID
|
||||
|
||||
-elsif map_content.view == 3
|
||||
mapTypeId: google.maps.MapTypeId.SATELLITE
|
||||
mapTypeId: google.maps.MapTypeId.SATELLITE
|
||||
};
|
||||
|
||||
="var map = new google.maps.Map(document.getElementById('map_content_map_#{map_content.id}'),"
|
||||
@ -53,7 +53,7 @@ var infowindow = new google.maps.InfoWindow({
|
||||
|
||||
|
||||
-if map_content.info_bule
|
||||
infowindow.open(map,marker);
|
||||
infowindow.open(map,marker);
|
||||
|
||||
}
|
||||
});
|
||||
|
@ -5,9 +5,14 @@ $("#new_portlet_form_inline").replaceWith("<%= escape_javascript(render(@portlet
|
||||
|
||||
|
||||
|
||||
$("#collapse3 .trash").attr("href", $("#portlet_<%= @portlet.id %>").data("show-link"));
|
||||
|
||||
update_block_portlet_order(block_portlet_id);
|
||||
//$.ajax({url : $("#portlet_<%= @portlet.id %>").data("edit-link"), type: "GET"});
|
||||
|
||||
|
||||
$(".block_portlets").sortable("enable");
|
||||
cancel_move_portlet();
|
||||
unselect_portlet();
|
||||
|
||||
|
||||
<%= flash_js %>
|
@ -1,4 +1,10 @@
|
||||
|
||||
cancel_move_portlet();
|
||||
reset_edit_pane();
|
||||
$("#portlet_<%= @portlet.id %>").remove();
|
||||
$("#element_form").html("");
|
||||
<%= flash_js %>
|
||||
block_js_initialize();
|
||||
update_portlet_order();
|
||||
|
||||
update_portlet_order();
|
||||
|
||||
|
||||
|
@ -1,18 +1,11 @@
|
||||
//$("#portlet_<%= @portlet.id %>").html("<div id='edit_portlet_content_form'></div>");
|
||||
|
||||
//$("#edit_portlet_content_form").html("<%= escape_javascript(render( :partial => "form")) %>");
|
||||
|
||||
$("#toolbar-text").html("");
|
||||
$("#element_form").html("<%= escape_javascript(render( :partial => "form")) %>");
|
||||
|
||||
|
||||
$("#collapse2").collapse('hide');
|
||||
$("#collapse3").collapse('show');
|
||||
//$(".block_portlets").sortable("disable");
|
||||
|
||||
|
||||
|
||||
open_collapse3();
|
||||
|
||||
<%- cancel_button = escape_javascript(link_to("annuler", portlet_portlet_path(@portlet), :class => "button cancel", :remote => true)); %>
|
||||
|
||||
$("#portlet_<%= @portlet.id %>").find('.buttons ol').prepend('<%= cancel_button %>');
|
||||
|
||||
|
||||
|
@ -1,21 +1,7 @@
|
||||
$("#new_portlet_content_form").html("<%= escape_javascript(render( :partial => "portlet/shared/new")) %>");
|
||||
$("#toolbar-text").html("");
|
||||
$("#element_form").html("<%= escape_javascript(render( :partial => "form")) %>");
|
||||
|
||||
$(".block_portlets").sortable("disable");
|
||||
$("#collapse3 .portlet_handle").data("portlet-id", "");
|
||||
|
||||
open_collapse3();
|
||||
|
||||
|
||||
var first_form_element = $("#new_portlet_content_form input:text:visible:first")
|
||||
if(first_form_element.length == 0){
|
||||
first_form_element = $("#new_portlet_content_form .text_editor:first")
|
||||
|
||||
//first_form_element.tinymce().focus();
|
||||
}
|
||||
|
||||
if(first_form_element.length == 0){
|
||||
first_form_element = $("#new_portlet_content_form textarea:first")
|
||||
}
|
||||
|
||||
|
||||
first_form_element.focus();
|
||||
|
||||
uninitialize_block_js();
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
$("#portlet_<%= @portlet.id %>").replaceWith("<%= escape_javascript(render(@portlet)) %>");
|
||||
$("#portlet_<%= @portlet.id %>").addClass("active")
|
||||
//$("#element_form").html("")
|
||||
//$(".block_portlets").sortable("enable");
|
||||
|
||||
cancel_move_portlet();
|
||||
unselect_portlet();
|
||||
|
||||
<%= flash_js %>
|
@ -2,21 +2,17 @@
|
||||
=semantic_form_for( [:portlet, @table_content], :remote => true) do |f|
|
||||
|
||||
|
||||
-if !@table_content.id
|
||||
%table
|
||||
%tr
|
||||
%td Nombre de lignes :
|
||||
%td=f.text_field :nbr_rows
|
||||
%tr
|
||||
%td Nombre de colonnes :
|
||||
%td=f.text_field :nbr_cols
|
||||
|
||||
-if BlockContent::STYLES.size > 0
|
||||
Style :
|
||||
= f.select :style, TableContent::STYLES
|
||||
|
||||
%br
|
||||
= f.submit "Sauvegarder", :class => "btn btn-primary"
|
||||
|
||||
|
||||
|
||||
-if !@table_content.id
|
||||
%table
|
||||
%tr
|
||||
%td Nombre de lignes :
|
||||
%td=f.text_field :nbr_rows
|
||||
%tr
|
||||
%td Nombre de colonnes :
|
||||
%td=f.text_field :nbr_cols
|
||||
|
||||
-if BlockContent::STYLES.size > 0
|
||||
Style :
|
||||
= f.select :style, TableContent::STYLES
|
||||
|
||||
|
@ -2,45 +2,45 @@
|
||||
|
||||
|
||||
%table.table_content
|
||||
-table_rows = table_content.table_rows
|
||||
%tr
|
||||
-i = 0
|
||||
-table_content.nbr_cols.times do
|
||||
-i += 1
|
||||
%td.add_col
|
||||
%span.innerWrapper
|
||||
.col_menu
|
||||
=link_to "Ajouter une colonne avant", portlet_table_cols_path(:position => i, :table_content_id =>table_content.id ), :method => :post, :remote => true
|
||||
|
||||
=link_to "Ajouter une colonne après", portlet_table_cols_path(:position => i+1, :table_content_id =>table_content.id ), :method => :post, :remote => true
|
||||
|
||||
-if table_content.nbr_cols > 1
|
||||
=link_to "Supprimer cette colonne", portlet_table_col_path(:id => i, :table_content_id =>table_content.id ), :method => :delete, :remote => true, :confirm => "Voulez-vous vraiment supprimer cette colonne ?"
|
||||
= i(:cog_alt, :gray_light, 12)
|
||||
|
||||
%td
|
||||
|
||||
-table_rows.each do |table_row|
|
||||
%tr{:id => table_row.id}
|
||||
|
||||
|
||||
-CelTable.where(:table_row_id => table_row.id).order("position ASC").each do |cel_table|
|
||||
|
||||
%td.table_content_cel{:id => cel_table.id}
|
||||
-table_rows = table_content.table_rows
|
||||
%tr
|
||||
-i = 0
|
||||
-table_content.nbr_cols.times do
|
||||
-i += 1
|
||||
%td.add_col
|
||||
%span.innerWrapper
|
||||
.col_menu
|
||||
=link_to "Ajouter une colonne avant", portlet_table_cols_path(:position => i, :table_content_id =>table_content.id ), :method => :post, :remote => true
|
||||
|
||||
=link_to "Ajouter une colonne après", portlet_table_cols_path(:position => i+1, :table_content_id =>table_content.id ), :method => :post, :remote => true
|
||||
|
||||
-if table_content.nbr_cols > 1
|
||||
=link_to "Supprimer cette colonne", portlet_table_col_path(:id => i, :table_content_id =>table_content.id ), :method => :delete, :remote => true, :confirm => "Voulez-vous vraiment supprimer cette colonne ?"
|
||||
= i(:cog_alt, :gray_light, 12)
|
||||
|
||||
%td
|
||||
|
||||
-table_rows.each do |table_row|
|
||||
%tr{:id => table_row.id}
|
||||
|
||||
|
||||
-CelTable.where(:table_row_id => table_row.id).order("position ASC").each do |cel_table|
|
||||
|
||||
%td.table_content_cel{:id => cel_table.id}
|
||||
|
||||
=render :partial => "admin/blocks/block", :locals => {:block => cel_table.block}
|
||||
|
||||
%td.add_cel
|
||||
|
||||
.innerWrapper
|
||||
.row_menu
|
||||
=link_to "Ajouter un rang avant", portlet_table_rows_path(:table_row => {:table_content_id => table_content.id, :position => (table_row.position)}), :method => :post, :remote => true
|
||||
|
||||
=link_to "Ajouter un rang après", portlet_table_rows_path(:table_row => {:table_content_id => table_content.id, :position => (table_row.position+1)}), :method => :post, :remote => true
|
||||
-if table_content.nbr_rows > 1
|
||||
=link_to "Supprimer ce rang", portlet_table_row_path(table_row), :method => :delete, :remote => true, :confirm => "Voulez-vous vraiment supprimer ce rang ?"
|
||||
= i(:cog_alt, :gray_light, 12)
|
||||
|
||||
|
||||
|
||||
|
||||
=render :partial => "admin/blocks/block", :locals => {:block => cel_table.block}
|
||||
|
||||
%td.add_cel
|
||||
|
||||
.innerWrapper
|
||||
.row_menu
|
||||
=link_to "Ajouter un rang avant", portlet_table_rows_path(:table_row => {:table_content_id => table_content.id, :position => (table_row.position)}), :method => :post, :remote => true
|
||||
|
||||
=link_to "Ajouter un rang après", portlet_table_rows_path(:table_row => {:table_content_id => table_content.id, :position => (table_row.position+1)}), :method => :post, :remote => true
|
||||
-if table_content.nbr_rows > 1
|
||||
=link_to "Supprimer ce rang", portlet_table_row_path(table_row), :method => :delete, :remote => true, :confirm => "Voulez-vous vraiment supprimer ce rang ?"
|
||||
= i(:cog_alt, :gray_light, 12)
|
||||
|
||||
|
||||
|
||||
|
@ -1,33 +1,33 @@
|
||||
%table.table_content
|
||||
-table_rows = @table_content.table_rows
|
||||
%tr
|
||||
|
||||
|
||||
-table_rows = @table_content.table_rows
|
||||
%tr
|
||||
|
||||
|
||||
|
||||
|
||||
-table_rows.each do |table_row|
|
||||
%tr
|
||||
%td.row_left
|
||||
.crl
|
||||
%a{:href => "#", :onclick => "$('.table_row_menu').hide();$('#table_row_menu_"+table_row.id.to_s+"').toggle();return false;"}+
|
||||
|
||||
|
||||
|
||||
|
||||
.table_row_menu#table_row_menu{:id => table_row.id}
|
||||
=link_to "ajouter un rang avant", portlet_table_rows_path(:table_row => {:table_content_id => @table_content.id, :position => (table_row.position)}), :method => :post
|
||||
%br
|
||||
=link_to "ajouter un rang après", portlet_table_rows_path(:table_row => {:table_content_id => @table_content.id, :position => (table_row.position+1)}), :method => :post
|
||||
%br
|
||||
=link_to "supprimer ce rang", [:portlet, table_row], :method => :delete, :confirm => "Voulez-vous vraiment supprimer ce rang ainsi que son contenu ?", :remote => true
|
||||
|
||||
-table_row.cel_tables.each do |cel_table|
|
||||
-table_rows.each do |table_row|
|
||||
%tr
|
||||
%td.row_left
|
||||
.crl
|
||||
%a{:href => "#", :onclick => "$('.table_row_menu').hide();$('#table_row_menu_"+table_row.id.to_s+"').toggle();return false;"}+
|
||||
|
||||
|
||||
|
||||
|
||||
.table_row_menu#table_row_menu{:id => table_row.id}
|
||||
=link_to "ajouter un rang avant", portlet_table_rows_path(:table_row => {:table_content_id => @table_content.id, :position => (table_row.position)}), :method => :post
|
||||
%br
|
||||
=link_to "ajouter un rang après", portlet_table_rows_path(:table_row => {:table_content_id => @table_content.id, :position => (table_row.position+1)}), :method => :post
|
||||
%br
|
||||
=link_to "supprimer ce rang", [:portlet, table_row], :method => :delete, :confirm => "Voulez-vous vraiment supprimer ce rang ainsi que son contenu ?", :remote => true
|
||||
|
||||
-table_row.cel_tables.each do |cel_table|
|
||||
|
||||
%td.table_content_cel
|
||||
=auto_load_div(admin_block_path(cel_table.block),"Page_"+"@page.id.to_s"+"_blocks_part")
|
||||
%td.table_content_cel
|
||||
=auto_load_div(admin_block_path(cel_table.block),"Page_"+"@page.id.to_s"+"_blocks_part")
|
||||
|
||||
%td.add_col
|
||||
%span +
|
||||
-@table_content.nbr_cols.times do
|
||||
%td.add_col
|
||||
%span +f
|
||||
%td.add_col
|
||||
%span +
|
||||
-@table_content.nbr_cols.times do
|
||||
%td.add_col
|
||||
%span +f
|
||||
|
@ -1,48 +1,46 @@
|
||||
%p Vous pouvez modifier le contenu directement à l'endroit où vous avez placé votre texte.
|
||||
%p N'oubliez pas de sauvegarder vos modifications avec le bouton ci dessous.
|
||||
|
||||
-if @text_content.id
|
||||
=semantic_form_for( [:portlet, @text_content], :remote => true, :html => {:"data-portlet-id" => @text_content.portlet.id}) do |f|
|
||||
|
||||
%p{:style => "text-align:center;"}= f.submit "Sauvegarder", :class => "btn btn-primary"
|
||||
|
||||
|
||||
=f.text_area :content, :style => "width:98%;height:600px;", :class => "redactor_content", :style => "display:none;"
|
||||
|
||||
|
||||
|
||||
|
||||
-if TextContent::STYLES.size > 0
|
||||
Style :
|
||||
= f.select :style, TextContent::STYLES
|
||||
|
||||
|
||||
|
||||
|
||||
:javascript
|
||||
$("#element_form form").submit(function (e){
|
||||
|
||||
$("textarea").val($('#portlet_'+$("#element_form form").data("portlet-id")+' .content').html());
|
||||
$("#element_form textarea").val($('#portlet_'+$("#element_form form").data("portlet-id")+' .content').redactor('code.get'));
|
||||
$("#toolbar-text").html("");
|
||||
|
||||
});
|
||||
|
||||
|
||||
$('#portlet_'+$("#element_form form").data("portlet-id")+' .content').redactor({
|
||||
plugins: ['fontcolor'],
|
||||
focus: true,
|
||||
toolbarExternal: '#toolbar-text',
|
||||
buttons : ['undo','redo','|', 'formatting', '|', 'bold', 'italic', 'deleted','underline','|', 'fontcolor','|', 'alignleft', 'aligncenter', 'alignright', 'justify', '|', 'unorderedlist', 'orderedlist', 'outdent', 'indent', '|', 'table', 'link', '|','fontcolor', 'backcolor','|', 'horizontalrule', '|','html']
|
||||
buttonSource: true,
|
||||
buttons : [ 'html','alignleft', 'aligncenter', 'alignright', 'justify', 'formatting', 'bold', 'italic', 'deleted','underline','unorderedlist', 'orderedlist', 'outdent', 'indent','image', 'file', 'link', 'alignment','fontsize', 'horizontalrule','fontcolor', 'backcolor'],
|
||||
plugins : ['bufferbuttons','fontsize',"fontfamily", 'fontcolor', 'scriptbuttons']
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-else
|
||||
=semantic_form_for( [:portlet, @text_content], :remote => true) do |f|
|
||||
|
||||
%p{:style => "text-align:center;"}= f.submit "Sauvegarder", :class => "btn btn-primary"
|
||||
|
||||
=f.text_area :content, :style => "width:98%;height:600px;", :class => "redactor_content"
|
||||
=f.text_area :content, :style => "width:98%;height:600px;", :class => "redactor_content", :style => "display:none;"
|
||||
|
||||
|
||||
|
||||
@ -52,21 +50,29 @@
|
||||
= f.select :style, TextContent::STYLES
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
:javascript
|
||||
|
||||
$('.redactor_content').redactor({
|
||||
plugins: ['fontcolor'],
|
||||
$("#new_portlet_form_inline").html('<div class="content"></div>')
|
||||
|
||||
content_element = $('#new_portlet_form_inline .content')
|
||||
|
||||
$("#element_form form").submit(function (e){
|
||||
|
||||
$("#element_form textarea").val(content_element.redactor('code.get'));
|
||||
$("#toolbar-text").html("");
|
||||
|
||||
});
|
||||
|
||||
content_element.redactor({
|
||||
focus: true,
|
||||
toolbarExternal: '#toolbar-text',
|
||||
buttons : ['undo','redo','|', 'formatting', '|', 'bold', 'italic', 'deleted','underline','|', 'fontcolor','|', 'alignleft', 'aligncenter', 'alignright', 'justify', '|', 'unorderedlist', 'orderedlist', 'outdent', 'indent', '|', 'table', 'link', '|','fontcolor', 'backcolor','|', 'horizontalrule', '|','html']
|
||||
|
||||
buttons : ['undo','redo','|', 'formatting', '|', 'bold', 'italic', 'deleted','underline','|', 'alignleft', 'aligncenter', 'alignright', 'justify', '|', 'unorderedlist', 'orderedlist', 'outdent', 'indent', '|', 'table', 'link', '|','fontcolor', 'backcolor','|', 'horizontalrule', '|','html']
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,15 +1,34 @@
|
||||
=semantic_form_for( [:portlet, @title_content], :remote => true) do |f|
|
||||
=semantic_form_for( [:portlet, @title_content], :remote => true, :html => {:"data-portlet-id" => (@title_content.portlet.id if @title_content.portlet)}) do |f|
|
||||
|
||||
=f.text_field :content, :style => "width:98%;", :class => "inputText", :style => ("display:none;" if @title_content.id)
|
||||
|
||||
=f.text_field :content, :style => "width:98%;", :class => "inputText" if !@title_content.id
|
||||
|
||||
Importance :
|
||||
= f.select :level, TitleContent::LEVELS
|
||||
-if TitleContent::STYLES.size > 0
|
||||
Style :
|
||||
= f.select :style, TitleContent::STYLES
|
||||
%br
|
||||
|
||||
= f.submit "Sauvegarder", :class => "btn btn-primary"
|
||||
|
||||
|
||||
Importance :
|
||||
= f.select :level, TitleContent::LEVELS
|
||||
-if TitleContent::STYLES.size > 0
|
||||
Style :
|
||||
= f.select :style, TitleContent::STYLES
|
||||
%br
|
||||
|
||||
-if @title_content.id
|
||||
|
||||
:javascript
|
||||
|
||||
$("#element_form form").submit(function (e){
|
||||
|
||||
$("#element_form #title_content_content").val($('#portlet_'+$("#element_form form").data("portlet-id")+' .title_content_inline').redactor('code.get'));
|
||||
$("#toolbar-text").html("");
|
||||
|
||||
});
|
||||
|
||||
$('#portlet_'+$("#element_form form").data("portlet-id")+' .title_content_inline').redactor({
|
||||
focus: true,
|
||||
toolbarExternal: '#toolbar-text',
|
||||
buttonSource: true,
|
||||
plugins : [ 'fontcolor', 'scriptbuttons'],
|
||||
buttons: [ 'bold', 'italic'],
|
||||
allowedTags: ['sup', "strong", "em", "sub", "span", "br"],
|
||||
linebreaks: true
|
||||
|
||||
|
||||
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user