Booking, QI Content, Trees, Media
This commit is contained in:
parent
1f340e96fa
commit
7fbac395a9
260 changed files with 27160 additions and 3773 deletions
|
|
@ -8,6 +8,57 @@ $('.iq-save-bar').closest('form').find(':input, select, textarea').keydown(funct
|
|||
});
|
||||
|
||||
|
||||
|
||||
$(function () {
|
||||
// Initialize sidenav togglers
|
||||
$('body').on('click', '.layout-sidenav-toggle', function (e) {
|
||||
e.preventDefault();
|
||||
window.layoutHelpers.toggleCollapsed();
|
||||
//custom save to Cookie!
|
||||
Cookies.set('layout.sidenav.toggle', window.layoutHelpers.isCollapsed(), { expires:30 });
|
||||
});
|
||||
if(!Cookies.get('layout.sidenav.toggle') || Cookies.get('layout.sidenav.toggle') === "false"){
|
||||
window.layoutHelpers.toggleCollapsed();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
(function($) {
|
||||
|
||||
$.dragYScroll = function() {
|
||||
|
||||
var clicked = false,
|
||||
viewY, speed;
|
||||
|
||||
var updateScrollPos = function(e, el) {
|
||||
var $el = $(el);
|
||||
speed = false;
|
||||
if(e.clientY < 20){
|
||||
speed = parseInt((e.clientY - 20)/10) -1;
|
||||
}
|
||||
if((viewY - e.clientY) < 20){
|
||||
speed = parseInt((e.clientY - viewY + 20)/10) + 1;
|
||||
}
|
||||
speed && $el.scrollTop($el.scrollTop() + (speed));
|
||||
};
|
||||
|
||||
$(document).on({
|
||||
'mousemove': function(e) {
|
||||
clicked && updateScrollPos(e, this);
|
||||
},
|
||||
'mousedown': function(e) {
|
||||
clicked = true;
|
||||
viewY = window.innerHeight;
|
||||
},
|
||||
'mouseup': function() {
|
||||
clicked = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}(jQuery));
|
||||
|
||||
|
||||
function showIqSaveBar(form){
|
||||
if(!$(form).data('save-bar')){
|
||||
$(form).find('.iq-save-bar').show(300);
|
||||
|
|
@ -17,7 +68,6 @@ function showIqSaveBar(form){
|
|||
|
||||
$(function() {
|
||||
if($('#netstable-content-tree').length){
|
||||
|
||||
function updateNetstableOutput(e) {
|
||||
|
||||
var list = e.length ? e : $(e.target);
|
||||
|
|
@ -202,11 +252,62 @@ function update_modal_data_load(e, $ele) {
|
|||
return false;
|
||||
}
|
||||
|
||||
function iq_update_data_load(e, $ele) {
|
||||
var ele = $ele,
|
||||
url = ele.data('url'),
|
||||
data = {action:ele.data('action'), target:ele.data('target'), data:ele.data('data')} ,
|
||||
contentType = 'application/x-www-form-urlencoded; charset=UTF-8';
|
||||
|
||||
console.log(data);
|
||||
console.log(url);
|
||||
$.ajax({
|
||||
url: url,
|
||||
data: data,
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
cache: false,
|
||||
contentType: contentType,
|
||||
encode: true,
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
success: function(response) {
|
||||
console.log(response);
|
||||
if(response.success === 'tree-node-active'){
|
||||
if(response.data === true){
|
||||
ele.find('i').addClass('fa-eye').addClass('text-success').removeClass('fa-eye-slash').removeClass('text-danger');
|
||||
}
|
||||
if(response.data === false){
|
||||
ele.find('i').addClass('fa-eye-slash').addClass('text-danger').removeClass('fa-eye').removeClass('text-success');
|
||||
}
|
||||
$.growl({
|
||||
title: "Gespeichert",
|
||||
message: "Änderung gespeichert",
|
||||
location: 'tr'
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
error: function(xhr, status, errorThrown) {
|
||||
console.log(xhr);
|
||||
console.log(xhr.responseText);
|
||||
console.log(status);
|
||||
console.log("Sorry, there was a problem!");
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
$(".update_modal_data_load").on('click', function (e) {
|
||||
e.preventDefault();
|
||||
update_modal_data_load(e, $(this));
|
||||
});
|
||||
|
||||
$(".iq_update_data_load").on('click', function (e) {
|
||||
e.preventDefault();
|
||||
iq_update_data_load(e, $(this));
|
||||
});
|
||||
});
|
||||
|
||||
$(function() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue