No changes
This commit is contained in:
parent
8680a02b13
commit
b6b398f5bf
17374 changed files with 2475441 additions and 0 deletions
44
ControlPanel/themes/AdminLTE/modules/news/admin_news.css
Normal file
44
ControlPanel/themes/AdminLTE/modules/news/admin_news.css
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
.pull-right {
|
||||
float: right;
|
||||
}
|
||||
.pull-left {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.fixed-height {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.news-row {
|
||||
margin-bottom: 0.1rem;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.eight-tenth {
|
||||
width: 83%;
|
||||
}
|
||||
.one-quarter {
|
||||
width: 25%;
|
||||
margin-left:10px;
|
||||
}
|
||||
.one-sixth {
|
||||
width: 16%;
|
||||
}
|
||||
.news-form-control-mce {
|
||||
min-height: 250px;
|
||||
}
|
||||
|
||||
input[type="file"]:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.admin-preview-thumbnail {
|
||||
max-width: 50px;
|
||||
max-height: 50px;
|
||||
}
|
||||
|
||||
.mce-content-body {
|
||||
overflow: scroll;
|
||||
}
|
||||
49
ControlPanel/themes/AdminLTE/modules/news/admin_news.js
Normal file
49
ControlPanel/themes/AdminLTE/modules/news/admin_news.js
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
$(document).ready(function() {
|
||||
$('.table-wrap').removeClass('table-wrap');
|
||||
$('.news-btn, [href="?m=news&p=admin_news&page=permissions"], .underline-link').addClass('btn btn-primary btn-sm');
|
||||
$('#description').addClass('form-control');
|
||||
|
||||
$(window).load(function () {
|
||||
$('.nicEdit-main').css('outline', 'none').parent('div').addClass('form-control autoheight').css('padding', '2px');
|
||||
});
|
||||
|
||||
create_button('.news-row [href$="&page=permissions"]', 'btn-danger');
|
||||
create_button('.news-row [href$="&page=settings"]', 'btn-warning');
|
||||
create_button('.news-row [href$="&page=add"]', 'btn-success');
|
||||
|
||||
/* *** Replace UL / LI with Table *** */
|
||||
var ul = $(".main ol");
|
||||
$(ul).each(function(){
|
||||
var li = $(this).find("li");
|
||||
var tul = $(this);
|
||||
$(li).each(function(){
|
||||
$(this).replaceWith('<tr><td>'+$(this).html()+'</td></tr>');
|
||||
});
|
||||
$(tul).replaceWith('<table>'+$(tul).html()+'</table>');
|
||||
});
|
||||
|
||||
$('[href^="home.php?m=news&p=admin_news&page=edit&id="]').each(function(){
|
||||
$(this).replaceWith('<a href="'+$(this).attr('href')+'"><i class="fas fa-edit"></i></a>');
|
||||
});
|
||||
|
||||
$('img[src="modules/news/images/cancel.gif"]').parent('a').each(function(){
|
||||
$(this).replaceWith('<a href="'+$(this).attr('href')+'" class="btn btn-sm btn-danger pull-right">'+$(this).find('img').attr('alt')+'</a>');
|
||||
});
|
||||
|
||||
$('.success').removeClass('success').addClass('label').addClass('label-success');
|
||||
$('.failure').removeClass('failure').addClass('label').addClass('label-danger');
|
||||
|
||||
$('.nicEdit-main').addClass('form-control');
|
||||
|
||||
$('.main [href^="home.php?m=news&p=admin_news&page=edit&id="]').addClass('btn').addClass('btn-sm').addClass('btn-primary');
|
||||
});
|
||||
|
||||
|
||||
function create_button(elem, clss)
|
||||
{
|
||||
$(elem).each(function()
|
||||
{
|
||||
$(this).replaceWith('<a href="'+$(this).attr('href')+'" class="btn btn-sm '+clss+' pull-right ml-1">'+$(this).text()+'</a>');
|
||||
});
|
||||
}
|
||||
|
||||
25
ControlPanel/themes/AdminLTE/modules/news/news.css
Normal file
25
ControlPanel/themes/AdminLTE/modules/news/news.css
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
.card-body p:last-of-type
|
||||
{
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.pull-right {
|
||||
float: right;
|
||||
}
|
||||
.pull-left {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.news-img {
|
||||
margin: 0px 10px 10px;
|
||||
}
|
||||
|
||||
.news-img img,
|
||||
[rel="prettyPhoto[ad_gal]"] img {
|
||||
max-width: 75px;
|
||||
max-height: 75px;
|
||||
}
|
||||
|
||||
.card-title a {
|
||||
color: inherit;
|
||||
}
|
||||
64
ControlPanel/themes/AdminLTE/modules/news/news.js
Normal file
64
ControlPanel/themes/AdminLTE/modules/news/news.js
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
$(document).ready(function() {
|
||||
$('.news-btn').addClass('btn btn-primary btn-sm');
|
||||
|
||||
$('.pagination b').parent('a').parent('li').addClass('active');
|
||||
|
||||
$('h3 > .failure').parent('h3').each(function(){
|
||||
var thtml = $(this).html();
|
||||
$(thtml).appendTo('.main');
|
||||
$(this).remove();
|
||||
});
|
||||
|
||||
//remove main card
|
||||
$('.main').removeClass('card-body').parent('.card').removeClass('card');
|
||||
$('.main > br, .main > .clearfix').remove();
|
||||
|
||||
$('.news-half > br').first().remove();
|
||||
$('.news-half').first().attr('class', 'ml-auto');
|
||||
$('.news-half').last().attr('class', 'mr-auto');
|
||||
|
||||
// news list
|
||||
if($('.main > .news-container').length > 0)
|
||||
{
|
||||
$('.news-container > .panel').each(function()
|
||||
{
|
||||
$(this).addClass('card');
|
||||
|
||||
$(this).find('.panel-heading').addClass('card-header');
|
||||
$(this).find('.panel-heading').addClass('card-header');
|
||||
$(this).find('.panel-title').addClass('card-title');
|
||||
|
||||
$(this).find('.news-auto').replaceWith($(this).find('.news-auto').html());
|
||||
|
||||
var newsBody = $(this).find('.panel-body').find('.news-row').first().html();
|
||||
var newsFooter = $(this).find('.panel-body').find('.news-row').last().html();
|
||||
|
||||
$(this).find('.panel-body').addClass('card-body').html(newsBody);
|
||||
$(this).append('<div class="card-footer d-flex flex-row-reverse">' + newsFooter + '</div>');
|
||||
});
|
||||
}
|
||||
|
||||
// single news
|
||||
if($('.main > .news-row').length > 0)
|
||||
{
|
||||
$('.main > .news-row > .news-row > br').first().remove();
|
||||
|
||||
var newsContent = $('.main > .news-row > .news-row').html();
|
||||
var newsFooter = $('.main > .news-row').last().html();
|
||||
|
||||
$('.main').append('\
|
||||
<div class="card">\
|
||||
<div class="card-body">\
|
||||
' + newsContent + '\
|
||||
</div>\
|
||||
<div class="card-footer d-flex flex-row-reverse">\
|
||||
' + newsFooter + '\
|
||||
</div>\
|
||||
</div>\
|
||||
');
|
||||
|
||||
$('.main > .news-row').remove();
|
||||
|
||||
$('#go_back_button').prepend('<i class="fas fa-angle-double-left mr-1"></i>');
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue