ninegate
Some checks failed
Cadoles/nineskeletor/pipeline/head There was a failure building this commit
Some checks failed
Cadoles/nineskeletor/pipeline/head There was a failure building this commit
This commit is contained in:
@ -2,13 +2,16 @@ $(document).ready(function() {
|
||||
// Color
|
||||
$(".pick-a-color").spectrum(
|
||||
{
|
||||
type: "text",
|
||||
showAlpha: false
|
||||
preferredFormat: "hex",
|
||||
type: "string",
|
||||
showPalette: true,
|
||||
allowEmpty: true,
|
||||
showAlpha: false,
|
||||
}
|
||||
);
|
||||
$(".pick-a-color").attr("autocomplete","off");
|
||||
|
||||
// method confirm
|
||||
// Method confirm
|
||||
var doit = true;
|
||||
$("a[data-method]").on('click',function(){
|
||||
if($(this).data('confirm')){
|
||||
@ -57,33 +60,45 @@ $(document).ready(function() {
|
||||
}
|
||||
});
|
||||
|
||||
// Resize
|
||||
resize();
|
||||
// select2-icon
|
||||
function iformat(icon) {
|
||||
return $('<span><i class="' + icon.id + '"></i> ' + icon.text + '</span>');
|
||||
}
|
||||
$('.select2-icon').select2({
|
||||
width: "100%",
|
||||
placeholder: 'choisir un icône',
|
||||
allowClear: true,
|
||||
templateSelection: iformat,
|
||||
templateResult: iformat,
|
||||
formatResult: iformat,
|
||||
allowHtml: true,
|
||||
escapeMarkup: function(m) {
|
||||
return m;
|
||||
}
|
||||
})
|
||||
|
||||
// Menu
|
||||
$(".dropdown-toggle").click(function(){
|
||||
$(this).parent().find(".dropdown-menu").toggle();
|
||||
})
|
||||
$(".nav-toogle").click(function(){
|
||||
$("#selmenu").modal("toggle");
|
||||
})
|
||||
|
||||
|
||||
|
||||
// Forcer le resize des objects
|
||||
Resize();
|
||||
|
||||
// Focus
|
||||
$("#page").focus();
|
||||
});
|
||||
|
||||
$( window ).resize(function() {
|
||||
resize();
|
||||
Resize();
|
||||
});
|
||||
|
||||
|
||||
|
||||
function resize() {
|
||||
if($("#header").is(":visible")){
|
||||
$(".navbar-logo").hide();
|
||||
$("#menulink").hide();
|
||||
$("#header").hide();
|
||||
}
|
||||
else {
|
||||
$(".navbar-logo").show();
|
||||
$("#menulink").show();
|
||||
$("#header").show();
|
||||
}
|
||||
|
||||
$("main").css("height",$(window).height()-$(".header").height());
|
||||
$("#page").css("height",$(window).height()-$(".header").height());
|
||||
$("#sidebar").css("min-height",$("body").height()-$(".header").height());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user