first commit
This commit is contained in:
85
public/vendor/laravel-admin/laravel-admin/laravel-admin.css
vendored
Normal file
85
public/vendor/laravel-admin/laravel-admin/laravel-admin.css
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
input.content {
|
||||
min-height: 0 !important;
|
||||
padding: 6px 12px !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
input.label:empty {
|
||||
display: inherit !important;
|
||||
}
|
||||
|
||||
input.label {
|
||||
display: inherit !important;
|
||||
padding: 6px 12px !important;
|
||||
font-size: 14px !important;
|
||||
font-weight: inherit !important;
|
||||
line-height: 1.42857143 !important;
|
||||
color: #555 !important;
|
||||
text-align: inherit !important;
|
||||
white-space: inherit !important;
|
||||
vertical-align: inherit !important;
|
||||
border-radius: inherit !important;
|
||||
}
|
||||
|
||||
.box-show {
|
||||
border-radius: 0 !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
a.editable-empty {
|
||||
color: #3c8dbc;
|
||||
border-bottom: none !important;
|
||||
}
|
||||
|
||||
.form-group > label.asterisk:before {
|
||||
content: "* ";
|
||||
color: red;
|
||||
}
|
||||
|
||||
.mailbox-attachments li {
|
||||
width: 300px !important;
|
||||
}
|
||||
|
||||
.table-has-many .form-group {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
|
||||
.table-has-many label.control-label[for=inputError] {
|
||||
position: absolute;
|
||||
z-index: 100;
|
||||
background-color: #fff;
|
||||
border: 1px solid #dd4b39;
|
||||
border-radius: 5px;
|
||||
text-align: left;
|
||||
top: 34px;
|
||||
padding: 8px;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.table-has-many label.control-label[for=inputError]+br {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#totop {
|
||||
display: none;
|
||||
position: fixed;
|
||||
bottom: 40px;
|
||||
right: 20px;
|
||||
z-index: 99999;
|
||||
outline: none;
|
||||
background-color: rgb(34, 45, 50);
|
||||
color: rgb(238, 238, 238);
|
||||
cursor: pointer;
|
||||
padding: 10px 15px;
|
||||
border-radius: 4px;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
#totop:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.file-input .glyphicon-folder-open {
|
||||
display: inline;
|
||||
}
|
||||
198
public/vendor/laravel-admin/laravel-admin/laravel-admin.js
vendored
Normal file
198
public/vendor/laravel-admin/laravel-admin/laravel-admin.js
vendored
Normal file
@@ -0,0 +1,198 @@
|
||||
$.fn.editable.defaults.params = function (params) {
|
||||
params._token = LA.token;
|
||||
params._editable = 1;
|
||||
params._method = 'PUT';
|
||||
return params;
|
||||
};
|
||||
|
||||
$.fn.editable.defaults.error = function (data) {
|
||||
var msg = '';
|
||||
if (data.responseJSON.errors) {
|
||||
$.each(data.responseJSON.errors, function (k, v) {
|
||||
msg += v + "\n";
|
||||
});
|
||||
}
|
||||
return msg
|
||||
};
|
||||
|
||||
toastr.options = {
|
||||
closeButton: true,
|
||||
progressBar: true,
|
||||
showMethod: 'slideDown',
|
||||
timeOut: 4000
|
||||
};
|
||||
|
||||
$.pjax.defaults.timeout = 5000;
|
||||
$.pjax.defaults.maxCacheLength = 0;
|
||||
$(document).pjax('a:not(a[target="_blank"])', {
|
||||
container: '#pjax-container'
|
||||
});
|
||||
|
||||
NProgress.configure({parent: '#app'});
|
||||
|
||||
$(document).on('pjax:timeout', function (event) {
|
||||
event.preventDefault();
|
||||
})
|
||||
|
||||
$(document).on('submit', 'form[pjax-container]', function (event) {
|
||||
$.pjax.submit(event, '#pjax-container')
|
||||
});
|
||||
|
||||
$(document).on("pjax:popstate", function () {
|
||||
|
||||
$(document).one("pjax:end", function (event) {
|
||||
$(event.target).find("script[data-exec-on-popstate]").each(function () {
|
||||
$.globalEval(this.text || this.textContent || this.innerHTML || '');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('pjax:send', function (xhr) {
|
||||
if (xhr.relatedTarget && xhr.relatedTarget.tagName && xhr.relatedTarget.tagName.toLowerCase() === 'form') {
|
||||
$submit_btn = $('form[pjax-container] :submit');
|
||||
if ($submit_btn) {
|
||||
$submit_btn.button('loading')
|
||||
}
|
||||
}
|
||||
NProgress.start();
|
||||
});
|
||||
|
||||
$(document).on('pjax:complete', function (xhr) {
|
||||
if (xhr.relatedTarget && xhr.relatedTarget.tagName && xhr.relatedTarget.tagName.toLowerCase() === 'form') {
|
||||
$submit_btn = $('form[pjax-container] :submit');
|
||||
if ($submit_btn) {
|
||||
$submit_btn.button('reset')
|
||||
}
|
||||
}
|
||||
NProgress.done();
|
||||
$.admin.grid.selects = {};
|
||||
});
|
||||
|
||||
$(document).click(function () {
|
||||
$('.sidebar-form .dropdown-menu').hide();
|
||||
});
|
||||
|
||||
$(function () {
|
||||
$('.sidebar-menu li:not(.treeview) > a').on('click', function () {
|
||||
var $parent = $(this).parent().addClass('active');
|
||||
$parent.siblings('.treeview.active').find('> a').trigger('click');
|
||||
$parent.siblings().removeClass('active').find('li').removeClass('active');
|
||||
});
|
||||
var menu = $('.sidebar-menu li > a[href$="' + (location.pathname + location.search + location.hash) + '"]').parent().addClass('active');
|
||||
menu.parents('ul.treeview-menu').addClass('menu-open');
|
||||
menu.parents('li.treeview').addClass('active');
|
||||
|
||||
$('[data-toggle="popover"]').popover();
|
||||
|
||||
// Sidebar form autocomplete
|
||||
$('.sidebar-form .autocomplete').on('keyup focus', function () {
|
||||
var $menu = $('.sidebar-form .dropdown-menu');
|
||||
var text = $(this).val();
|
||||
|
||||
if (text === '') {
|
||||
$menu.hide();
|
||||
return;
|
||||
}
|
||||
|
||||
var regex = new RegExp(text, 'i');
|
||||
var matched = false;
|
||||
|
||||
$menu.find('li').each(function () {
|
||||
if (!regex.test($(this).find('a').text())) {
|
||||
$(this).hide();
|
||||
} else {
|
||||
$(this).show();
|
||||
matched = true;
|
||||
}
|
||||
});
|
||||
|
||||
if (matched) {
|
||||
$menu.show();
|
||||
}
|
||||
}).click(function(event){
|
||||
event.stopPropagation();
|
||||
});
|
||||
|
||||
$('.sidebar-form .dropdown-menu li a').click(function (){
|
||||
$('.sidebar-form .autocomplete').val($(this).text());
|
||||
});
|
||||
});
|
||||
|
||||
$(window).scroll(function() {
|
||||
if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {
|
||||
$('#totop').fadeIn(500);
|
||||
} else {
|
||||
$('#totop').fadeOut(500);
|
||||
}
|
||||
});
|
||||
|
||||
$('#totop').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
$('html,body').animate({scrollTop: 0}, 500);
|
||||
});
|
||||
|
||||
(function ($) {
|
||||
|
||||
var Grid = function () {
|
||||
this.selects = {};
|
||||
};
|
||||
|
||||
Grid.prototype.select = function (id) {
|
||||
this.selects[id] = id;
|
||||
};
|
||||
|
||||
Grid.prototype.unselect = function (id) {
|
||||
delete this.selects[id];
|
||||
};
|
||||
|
||||
Grid.prototype.selected = function () {
|
||||
var rows = [];
|
||||
$.each(this.selects, function (key, val) {
|
||||
rows.push(key);
|
||||
});
|
||||
|
||||
return rows;
|
||||
};
|
||||
|
||||
$.fn.admin = LA;
|
||||
$.admin = LA;
|
||||
$.admin.swal = swal;
|
||||
$.admin.toastr = toastr;
|
||||
$.admin.grid = new Grid();
|
||||
|
||||
$.admin.reload = function () {
|
||||
$.pjax.reload('#pjax-container');
|
||||
$.admin.grid = new Grid();
|
||||
};
|
||||
|
||||
$.admin.redirect = function (url) {
|
||||
$.pjax({container:'#pjax-container', url: url });
|
||||
$.admin.grid = new Grid();
|
||||
};
|
||||
|
||||
$.admin.getToken = function () {
|
||||
return $('meta[name="csrf-token"]').attr('content');
|
||||
};
|
||||
|
||||
$.admin.loadedScripts = [];
|
||||
|
||||
$.admin.loadScripts = function(arr) {
|
||||
var _arr = $.map(arr, function(src) {
|
||||
|
||||
if ($.inArray(src, $.admin.loadedScripts)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$.admin.loadedScripts.push(src);
|
||||
|
||||
return $.getScript(src);
|
||||
});
|
||||
|
||||
_arr.push($.Deferred(function(deferred){
|
||||
$(deferred.resolve);
|
||||
}));
|
||||
|
||||
return $.when.apply($, _arr);
|
||||
}
|
||||
|
||||
})(jQuery);
|
||||
Reference in New Issue
Block a user