Improve admin list toolbar
Change "Admins" group to "Owners" (more descriptive) Fix bug in Firefox on Mediafinder form widget not respecting max-width 100% Recompile assets
This commit is contained in:
parent
a1e1b52d6e
commit
461e4f75de
|
|
@ -2663,7 +2663,8 @@ this.escape()
|
||||||
$(document).off('focusin.bs.modal')
|
$(document).off('focusin.bs.modal')
|
||||||
this.$element.removeClass('in').attr('aria-hidden',true).off('click.dismiss.bs.modal')
|
this.$element.removeClass('in').attr('aria-hidden',true).off('click.dismiss.bs.modal')
|
||||||
$.support.transition&&this.$element.hasClass('fade')?this.$element.one($.support.transition.end,$.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal()}
|
$.support.transition&&this.$element.hasClass('fade')?this.$element.one($.support.transition.end,$.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal()}
|
||||||
Modal.prototype.enforceFocus=function(){$(document).off('focusin.bs.modal').on('focusin.bs.modal',$.proxy(function(e){if(this.$element[0]!==e.target&&!this.$element.has(e.target).length){this.$element.focus()}},this))}
|
Modal.prototype.enforceFocus=function(){$(document).off('focusin.bs.modal').on('focusin.bs.modal',$.proxy(function(e){if($(e.target).hasClass('select2-search__field')){return}
|
||||||
|
if(this.$element[0]!==e.target&&!this.$element.has(e.target).length){this.$element.focus()}},this))}
|
||||||
Modal.prototype.escape=function(){if(this.isShown&&this.options.keyboard){this.$element.on('keyup.dismiss.bs.modal',$.proxy(function(e){e.which==27&&this.hide()},this))}else if(!this.isShown){this.$element.off('keyup.dismiss.bs.modal')}}
|
Modal.prototype.escape=function(){if(this.isShown&&this.options.keyboard){this.$element.on('keyup.dismiss.bs.modal',$.proxy(function(e){e.which==27&&this.hide()},this))}else if(!this.isShown){this.$element.off('keyup.dismiss.bs.modal')}}
|
||||||
Modal.prototype.hideModal=function(){var that=this
|
Modal.prototype.hideModal=function(){var that=this
|
||||||
this.$element.hide()
|
this.$element.hide()
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
<div data-control="toolbar">
|
<div data-control="toolbar">
|
||||||
<a href="<?= Backend::url('backend/usergroups/create') ?>" class="btn btn-primary oc-icon-plus"><?= e(trans('backend::lang.user.group.new')) ?></a>
|
<a href="<?= Backend::url('backend/users') ?>" class="btn btn-default oc-icon-chevron-left">
|
||||||
|
<?= e(trans('backend::lang.user.return')) ?>
|
||||||
|
</a>
|
||||||
|
<a href="<?= Backend::url('backend/usergroups/create') ?>" class="btn btn-primary oc-icon-plus">
|
||||||
|
<?= e(trans('backend::lang.user.group.new')) ?>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,10 @@
|
||||||
<div data-control="toolbar">
|
<div data-control="toolbar">
|
||||||
<a href="<?= Backend::url('backend/users/create') ?>" class="btn btn-primary oc-icon-plus"><?= e(trans('backend::lang.user.new')) ?></a>
|
<a href="<?= Backend::url('backend/users/create') ?>" class="btn btn-primary oc-icon-plus">
|
||||||
<a href="<?= Backend::url('backend/usergroups') ?>" class="btn btn-default oc-icon-group"><?= e(trans('backend::lang.user.group.list_title')) ?></a>
|
<?= e(trans('backend::lang.user.new')) ?>
|
||||||
|
</a>
|
||||||
|
<a href="<?= Backend::url('backend/usergroups') ?>" class="btn btn-default oc-icon-group">
|
||||||
|
<?= e(trans('backend::lang.user.group.list_title')) ?>
|
||||||
|
</a>
|
||||||
<?php /* @todo
|
<?php /* @todo
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button
|
<button
|
||||||
|
|
|
||||||
|
|
@ -26,10 +26,10 @@ class SeedSetupAdmin extends Seeder
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
$group = UserGroup::create([
|
$group = UserGroup::create([
|
||||||
'name' => 'Admins',
|
'name' => 'Owners',
|
||||||
'code' => 'admins',
|
'code' => 'owners',
|
||||||
'description' => 'Default group for administrators',
|
'description' => 'Default group for website owners.',
|
||||||
'is_new_user_default' => true
|
'is_new_user_default' => false
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$user = User::create([
|
$user = User::create([
|
||||||
|
|
|
||||||
|
|
@ -1818,17 +1818,8 @@ this.$box.css('top',toolbarHeight+'px')}}}}}(jQuery));(function($){'use strict';
|
||||||
var Figure=function(redactor){this.redactor=redactor
|
var Figure=function(redactor){this.redactor=redactor
|
||||||
this.toolbar={}
|
this.toolbar={}
|
||||||
this.init()}
|
this.init()}
|
||||||
Figure.prototype={control:{up:{classSuffix:'arrow-up'},down:{classSuffix:'arrow-down'},'|':{classSuffix:'divider'},remove:{classSuffix:'delete'}},controlGroup:['up','down','remove'],init:function(){this.observeCaptions()
|
Figure.prototype={control:{up:{classSuffix:'arrow-up'},down:{classSuffix:'arrow-down'},'|':{classSuffix:'divider'},remove:{classSuffix:'delete'}},controlGroup:['up','down','remove'],init:function(){this.observeToolbars()
|
||||||
this.observeToolbars()
|
this.observeKeyboard()},showToolbar:function(event){var $figure=$(event.currentTarget),type=$figure.data('type')||'default',$toolbar=this.getToolbar(type).data('figure',$figure).prependTo($figure).show()
|
||||||
this.observeKeyboard()},observeCaptions:function(){this.redactor.$editor.on('click.figure','figcaption:empty, cite:empty',$.proxy(function(event){$(event.target).prepend('<br />')
|
|
||||||
this.redactor.caret.setEnd(event.target)
|
|
||||||
event.stopPropagation()},this))
|
|
||||||
$(window).on('click',$.proxy(this.cleanCaptions,this))
|
|
||||||
this.redactor.$editor.on('blur.figure',$.proxy(this.cleanCaptions,this))
|
|
||||||
this.redactor.$editor.closest('form').one('submit',$.proxy(this.clearCaptions,this))
|
|
||||||
this.redactor.$editor.on('keydown.figure',$.proxy(function(event){var current=this.redactor.selection.getCurrent(),isEmpty=!current.length,isCaptionNode=!!$(current).closest('figcaption, cite').length,isDeleteKey=$.inArray(event.keyCode,[this.redactor.keyCode.BACKSPACE,this.redactor.keyCode.DELETE])>=0
|
|
||||||
if(isEmpty&&isDeleteKey&&isCaptionNode){event.preventDefault()}},this))},cleanCaptions:function(){this.redactor.$editor.find('figcaption, cite').filter(function(){return $(this).text()==''}).empty()},clearCaptions:function(){this.redactor.$editor.find('figcaption, cite').filter(function(){return $(this).text()==''}).remove()
|
|
||||||
if(this.redactor.opts.visual){this.redactor.code.sync()}},showToolbar:function(event){var $figure=$(event.currentTarget),type=$figure.data('type')||'default',$toolbar=this.getToolbar(type).data('figure',$figure).prependTo($figure).show()
|
|
||||||
if(this.redactor[type]&&this.redactor[type].onShow){this.redactor[type].onShow($figure,$toolbar)}},hideToolbar:function(event){$(event.currentTarget).find('.oc-figure-controls').appendTo(this.redactor.$box).hide()},observeToolbars:function(){this.redactor.$editor.on('mousedown.figure','.oc-figure-controls',$.proxy(function(event){event.preventDefault()
|
if(this.redactor[type]&&this.redactor[type].onShow){this.redactor[type].onShow($figure,$toolbar)}},hideToolbar:function(event){$(event.currentTarget).find('.oc-figure-controls').appendTo(this.redactor.$box).hide()},observeToolbars:function(){this.redactor.$editor.on('mousedown.figure','.oc-figure-controls',$.proxy(function(event){event.preventDefault()
|
||||||
this.current=this.redactor.selection.getCurrent()},this))
|
this.current=this.redactor.selection.getCurrent()},this))
|
||||||
this.redactor.$editor.on('click.figure','.oc-figure-controls span, .oc-figure-controls a',$.proxy(function(event){event.stopPropagation()
|
this.redactor.$editor.on('click.figure','.oc-figure-controls span, .oc-figure-controls a',$.proxy(function(event){event.stopPropagation()
|
||||||
|
|
@ -1872,7 +1863,6 @@ break}
|
||||||
this.redactor.code.sync()},observeKeyboard:function(){var redactor=this.redactor
|
this.redactor.code.sync()},observeKeyboard:function(){var redactor=this.redactor
|
||||||
redactor.$editor.on('keydown.figure',function(event){var currentNode=redactor.selection.getBlock()
|
redactor.$editor.on('keydown.figure',function(event){var currentNode=redactor.selection.getBlock()
|
||||||
if(event.keyCode===8&&!redactor.caret.getOffset(currentNode)&¤tNode.previousSibling&¤tNode.previousSibling.nodeName==='FIGURE'){event.preventDefault()}})},destroy:function(){this.redactor.$editor.off('.figure')
|
if(event.keyCode===8&&!redactor.caret.getOffset(currentNode)&¤tNode.previousSibling&¤tNode.previousSibling.nodeName==='FIGURE'){event.preventDefault()}})},destroy:function(){this.redactor.$editor.off('.figure')
|
||||||
$(window).off('click',$.proxy(this.cleanCaptions,this))
|
|
||||||
for(var type in this.toolbar){this.toolbar[type].find('span').off('.figure')}
|
for(var type in this.toolbar){this.toolbar[type].find('span').off('.figure')}
|
||||||
this.redactor=null
|
this.redactor=null
|
||||||
this.toolbar=null}}
|
this.toolbar=null}}
|
||||||
|
|
@ -2006,7 +1996,7 @@ return
|
||||||
if(this.$el.hasClass('stretch')){var height=$toolbar.outerHeight(true)
|
if(this.$el.hasClass('stretch')){var height=$toolbar.outerHeight(true)
|
||||||
$editor.css('top',height+1)
|
$editor.css('top',height+1)
|
||||||
$codeEditor.css('top',height)}}
|
$codeEditor.css('top',height)}}
|
||||||
RichEditor.prototype.sanityCheckContent=function(){var safeElements='p, h1, h2, h3, h4, h5, pre, figure';if(!this.$editor.children(':last-child').is(safeElements)){this.$editor.append('<p><br></p>')}
|
RichEditor.prototype.sanityCheckContent=function(){var safeElements='p, h1, h2, h3, h4, h5, pre, figure, ol, ul';if(!this.$editor.children(':last-child').is(safeElements)){this.$editor.append('<p><br></p>')}
|
||||||
if(!this.$editor.children(':first-child').is(safeElements)){this.$editor.prepend('<p><br></p>')}
|
if(!this.$editor.children(':first-child').is(safeElements)){this.$editor.prepend('<p><br></p>')}
|
||||||
this.$textarea.trigger('sanitize.oc.richeditor',[this.$editor])}
|
this.$textarea.trigger('sanitize.oc.richeditor',[this.$editor])}
|
||||||
RichEditor.prototype.syncBefore=function(html){var container={html:html}
|
RichEditor.prototype.syncBefore=function(html){var container={html:html}
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ return [
|
||||||
'send_invite' => 'Send invitation by email',
|
'send_invite' => 'Send invitation by email',
|
||||||
'send_invite_comment' => 'Sends a welcome message containing login and password information.',
|
'send_invite_comment' => 'Sends a welcome message containing login and password information.',
|
||||||
'delete_confirm' => 'Do you really want to delete this administrator?',
|
'delete_confirm' => 'Do you really want to delete this administrator?',
|
||||||
'return' => 'Return to the administrator list',
|
'return' => 'Return to admin list',
|
||||||
'allow' => 'Allow',
|
'allow' => 'Allow',
|
||||||
'inherit' => 'Inherit',
|
'inherit' => 'Inherit',
|
||||||
'deny' => 'Deny',
|
'deny' => 'Deny',
|
||||||
|
|
@ -108,9 +108,9 @@ return [
|
||||||
'code_comment' => 'Enter a unique code if you want to access it with the API.',
|
'code_comment' => 'Enter a unique code if you want to access it with the API.',
|
||||||
'menu_label' => 'Groups',
|
'menu_label' => 'Groups',
|
||||||
'list_title' => 'Manage Groups',
|
'list_title' => 'Manage Groups',
|
||||||
'new' => 'New Administrator Group',
|
'new' => 'New Group',
|
||||||
'delete_confirm' => 'Do you really want to delete this administrator group?',
|
'delete_confirm' => 'Do you really want to delete this administrator group?',
|
||||||
'return' => 'Return to the group list',
|
'return' => 'Return to group list',
|
||||||
'users_count' => 'Users'
|
'users_count' => 'Users'
|
||||||
],
|
],
|
||||||
'preferences' => [
|
'preferences' => [
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,7 @@
|
||||||
padding-bottom: 39px;
|
padding-bottom: 39px;
|
||||||
}
|
}
|
||||||
.field-mediafinder.style-image-single .find-object .icon-container {
|
.field-mediafinder.style-image-single .find-object .icon-container {
|
||||||
|
display: block;
|
||||||
border: 1px solid #f6f8f9;
|
border: 1px solid #f6f8f9;
|
||||||
background: rgba(255, 255, 255, 0.5);
|
background: rgba(255, 255, 255, 0.5);
|
||||||
}
|
}
|
||||||
|
|
@ -125,7 +126,7 @@
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.field-mediafinder.style-image-single.is-populated .find-object {
|
.field-mediafinder.style-image-single.is-populated .find-object {
|
||||||
display: inline-block;
|
display: block;
|
||||||
}
|
}
|
||||||
.field-mediafinder.style-file-single {
|
.field-mediafinder.style-file-single {
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@
|
||||||
padding-bottom: 39px;
|
padding-bottom: 39px;
|
||||||
|
|
||||||
.icon-container {
|
.icon-container {
|
||||||
|
display: block;
|
||||||
border: 1px solid #f6f8f9;
|
border: 1px solid #f6f8f9;
|
||||||
background: rgba(255,255,255,.5);
|
background: rgba(255,255,255,.5);
|
||||||
|
|
||||||
|
|
@ -39,7 +40,7 @@
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.find-object {
|
.find-object {
|
||||||
display: inline-block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue