Skip to content

Commit

Permalink
October CMS - Reorder Records
Browse files Browse the repository at this point in the history
  • Loading branch information
Doric Ivan committed Aug 15, 2020
1 parent 299520c commit 9ecae6c
Show file tree
Hide file tree
Showing 1,755 changed files with 108,389 additions and 34,452 deletions.
22 changes: 21 additions & 1 deletion modules/backend/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
use Backend;
use BackendMenu;
use BackendAuth;
use Backend\Models\UserRole;
use Backend\Classes\WidgetManager;
use System\Classes\MailManager;
use System\Classes\CombineAssets;
Expand Down Expand Up @@ -74,6 +75,11 @@ protected function registerAssetBundles()
$combiner->registerBundle('~/modules/backend/formwidgets/repeater/assets/less/repeater.less');
$combiner->registerBundle('~/modules/backend/formwidgets/codeeditor/assets/js/build.js');
$combiner->registerBundle('~/modules/backend/formwidgets/fileupload/assets/less/fileupload.less');
$combiner->registerBundle('~/modules/backend/formwidgets/nestedform/assets/less/nestedform.less');
$combiner->registerBundle('~/modules/backend/formwidgets/richeditor/assets/js/build-plugins.js');
$combiner->registerBundle('~/modules/backend/formwidgets/colorpicker/assets/less/colorpicker.less');
$combiner->registerBundle('~/modules/backend/formwidgets/permissioneditor/assets/less/permissioneditor.less');
$combiner->registerBundle('~/modules/backend/formwidgets/markdowneditor/assets/less/markdowneditor.less');

/*
* Rich Editor is protected by DRM
Expand Down Expand Up @@ -136,10 +142,18 @@ protected function registerBackendPermissions()
'label' => 'system::lang.permissions.view_the_dashboard',
'tab' => 'system::lang.permissions.name'
],
'backend.manage_default_dashboard' => [
'label' => 'system::lang.permissions.manage_default_dashboard',
'tab' => 'system::lang.permissions.name',
],
'backend.manage_users' => [
'label' => 'system::lang.permissions.manage_other_administrators',
'tab' => 'system::lang.permissions.name'
],
'backend.impersonate_users' => [
'label' => 'system::lang.permissions.impersonate_users',
'tab' => 'system::lang.permissions.name',
],
'backend.manage_preferences' => [
'label' => 'system::lang.permissions.manage_preferences',
'tab' => 'system::lang.permissions.name'
Expand All @@ -155,7 +169,12 @@ protected function registerBackendPermissions()
'media.manage_media' => [
'label' => 'backend::lang.permissions.manage_media',
'tab' => 'system::lang.permissions.name',
]
],
'backend.allow_unsafe_markdown' => [
'label' => 'backend::lang.permissions.allow_unsafe_markdown',
'tab' => 'system::lang.permissions.name',
'roles' => UserRole::CODE_DEVELOPER,
],
]);
});
}
Expand All @@ -179,6 +198,7 @@ protected function registerBackendWidgets()
$manager->registerFormWidget('Backend\FormWidgets\Repeater', 'repeater');
$manager->registerFormWidget('Backend\FormWidgets\TagList', 'taglist');
$manager->registerFormWidget('Backend\FormWidgets\MediaFinder', 'mediafinder');
$manager->registerFormWidget('Backend\FormWidgets\NestedForm', 'nestedform');
});
}

Expand Down
2,124 changes: 1,116 additions & 1,008 deletions modules/backend/assets/css/october.css

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions modules/backend/assets/js/auth/uninstall-sw.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Only run on HTTPS connections
if (location.protocol === 'https:') {
// Unregister all service workers before signing in to prevent cache issues
navigator.serviceWorker.getRegistrations().then(
function(registrations) {
for (let registration of registrations) {
registration.unregister();
}
});
}
337 changes: 202 additions & 135 deletions modules/backend/assets/js/october-min.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion modules/backend/assets/js/october.alert.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*
* Dependences:
* - Sweet Alert
* - Translations (october.lang.js)
*/
(function($){

Expand Down Expand Up @@ -65,7 +66,7 @@ $(window).on('ajaxConfirmMessage', function(event, message){
* Override "Sweet Alert" functions to translate default buttons
*/

$(document).on('ready', function(){
$(document).ready(function(){
if (!window.swal) return

var swal = window.swal
Expand Down
4 changes: 2 additions & 2 deletions modules/backend/assets/js/october.flyout.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
}

Flyout.prototype.onDocumentKeydown = function(ev) {
if (ev.which == 27) {
if (ev.key === 'Escape') {
this.hide();
}
}
Expand Down Expand Up @@ -218,7 +218,7 @@

// Currently flyouts don't use the document render event
// and can't be created dynamically (performance considerations).
$(document).on('ready', function(){
$(document).ready(function(){
$('div[data-control=flyout]').flyout()
})
}(window.jQuery);
2 changes: 1 addition & 1 deletion modules/backend/assets/js/october.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
=require october.datetime.js
=require backend.js
*/
*/
19 changes: 9 additions & 10 deletions modules/backend/assets/js/october.navbar.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
/*
* Top navigation bar. Features of the bar:
* - Hide content if the display width is less than 768px. In this case the menu icon is displayed.
* - Hide content if the display width is less than 768px. In this case the menu icon is displayed.
* When the icon is clicked, the menu content is displayed on the left side of the page.
* - If the content doesn't fit the navbar, it can be dragged left and right.
* - If the content doesn't fit the navbar, it can be dragged left and right.
*
* Dependences:
* - DragScroll (october.dragscroll.js)
* - VerticalMenu (october.verticalmenu.js)
*/

(function($){
$(window).load(function() {
$(document).ready(function(){
$('nav.navbar').each(function(){
var
navbar = $(this),
Expand All @@ -31,12 +31,11 @@
if (isMobile) e.preventDefault()
})

$('[data-calculate-width]', navbar).one('oc.widthFixed', function() {
var dragScroll = $('[data-control=toolbar]', navbar).data('oc.dragScroll')
if (dragScroll) {
dragScroll.goToElement($('ul.nav > li.active', navbar), undefined, {'duration': 0})
}
})
// Scroll to the currently active nav item.
var dragScroll = $('[data-control=toolbar]', navbar).data('oc.dragScroll')
if (dragScroll) {
dragScroll.goToElement($('ul.nav > li.active', navbar), undefined, {'duration': 0})
}
})
})
})(jQuery);
})(jQuery);
2 changes: 1 addition & 1 deletion modules/backend/assets/js/october.scrollbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
options = this.options = options || {},
sizeName = this.sizeName = options.vertical ? 'height' : 'width',
isNative = $('html').hasClass('mobile'),
isTouch = this.isTouch = Modernizr.touch,
isTouch = this.isTouch = Modernizr.touchevents,
isScrollable = this.isScrollable = false,
isLocked = this.isLocked = false,
eventElementName = options.vertical ? 'pageY' : 'pageX',
Expand Down
4 changes: 2 additions & 2 deletions modules/backend/assets/js/october.sidenav-tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@

$list.css({
'overflow': 'hidden',
'display': '',
'height': 0
})
$list.animate({'height': $list[0].scrollHeight}, { duration: duration, queue: false, complete: function() {
$list.css({
'overflow': 'visible',
'height': 'auto'
'height': 'auto',
'display': ''
})
$(group).attr('data-status', 'expanded')
$(window).trigger('oc.updateUi')
Expand Down
18 changes: 12 additions & 6 deletions modules/backend/assets/js/october.sidepaneltab.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
return
}

if (Modernizr.touch && $(window).width() < self.options.breakpoint) {
if (Modernizr.touchevents && $(window).width() < self.options.breakpoint) {
if ($(this).data('menu-item') == self.visibleItemId && self.panelVisible) {
self.hideSidePanel()
return
Expand All @@ -50,7 +50,7 @@
return false
})

if (!Modernizr.touch) {
if (!Modernizr.touchevents) {
// The side panel now opens only when a menu item is hovered and
// when the item doesn't have the "data-no-side-panel" attribute.
// TODO: remove the comment and the code below if no issues noticed.
Expand Down Expand Up @@ -115,7 +115,9 @@

this.visibleItemId = menuItemId

$.oc.sideNav.setActiveItem(menuItemId)
if ($.oc.sideNav !== undefined) {
$.oc.sideNav.setActiveItem(menuItemId)
}

this.$sidePanelItems.each(function() {
var $el = $(this)
Expand Down Expand Up @@ -151,7 +153,7 @@
}

SidePanelTab.prototype.updatePanelPosition = function() {
if (!this.panelFixed() || Modernizr.touch) {
if (!this.panelFixed() || Modernizr.touchevents) {
this.$el.height($(document).height() - this.mainNavHeight)
}
else {
Expand All @@ -164,6 +166,10 @@
}

SidePanelTab.prototype.updateActiveTab = function() {
if ($.oc.sideNav === undefined) {
return
}

if (!this.panelVisible && ($(window).width() < this.options.breakpoint || !this.panelFixed())) {
$.oc.sideNav.unsetActiveItem()
}
Expand Down Expand Up @@ -230,15 +236,15 @@
// DATA-API
// ============

$(window).load(function() {
$(document).ready(function(){
$('[data-control=layout-sidepanel]').sidePanelTab()
})

// STORED PREFERENCES
// ====================

$(document).ready(function() {
if (Modernizr.touch || (typeof(localStorage) !== 'undefined')) {
if (Modernizr.touchevents || (typeof(localStorage) !== 'undefined')) {
if (localStorage.ocSidePanelFixed == 0) {
$(document.body).addClass('side-panel-not-fixed')
$(window).trigger('resize')
Expand Down
Loading

0 comments on commit 9ecae6c

Please sign in to comment.