Fixes in the drop-down styling, minor client-side fixes in the back-end
This commit is contained in:
parent
41a94a50ae
commit
02961c6c8f
File diff suppressed because it is too large
Load Diff
|
|
@ -920,9 +920,10 @@ if(e.isDefaultPrevented())
|
|||
return
|
||||
this.$container.removeClass('in')
|
||||
if(this.$overlay)this.$overlay.removeClass('in')
|
||||
this.disposeControls()
|
||||
$.support.transition&&this.$container.hasClass('fade')?this.$container.one($.support.transition.end,$.proxy(this.hidePopover,this)).emulateTransitionEnd(300):this.hidePopover()}
|
||||
Popover.prototype.hidePopover=function(){if(this.$container)this.$container.remove()
|
||||
if(this.$overlay)this.$overlay.remove()
|
||||
Popover.prototype.disposeControls=function(){if(this.$container){$.oc.foundation.controlUtils.disposeControls(this.$container.get(0))}}
|
||||
Popover.prototype.hidePopover=function(){this.$container.remove();if(this.$overlay)this.$overlay.remove()
|
||||
this.$el.removeClass('popover-highlight')
|
||||
this.$el.trigger('hide.oc.popover')
|
||||
this.$overlay=false
|
||||
|
|
@ -1530,6 +1531,8 @@ return state.text}
|
|||
var selectOptions={templateResult:formatSelectOption,templateSelection:formatSelectOption,escapeMarkup:function(m){return m}}
|
||||
$('select.custom-select').each(function(){var $element=$(this),extraOptions={}
|
||||
if($element.data('select2')!=null){return true;}
|
||||
$element.attr('data-disposable','data-disposable')
|
||||
$element.one('dispose-control',function(){if($element.data('select2')){$element.select2('destroy')}})
|
||||
if($element.hasClass('select-no-search')){extraOptions.minimumResultsForSearch=Infinity}
|
||||
$element.select2($.extend({},selectOptions,extraOptions))})})
|
||||
$(document).on('disable','select.custom-select',function(event,status){$(this).select2('enable',!status)})
|
||||
|
|
@ -1783,9 +1786,7 @@ var e=$.Event('hidden.oc.inspector')
|
|||
this.$el.trigger(e)
|
||||
this.$el.data('oc.inspectorVisible',false)
|
||||
this.dispose()}
|
||||
Inspector.prototype.dispose=function(){for(var i=0,len=this.editors.length;i<len;i++){this.editors[i].dispose()
|
||||
this.editors[i]=null}
|
||||
var $popoverContainer=$(this.$el.data('oc.popover').$container)
|
||||
Inspector.prototype.dispose=function(){var $popoverContainer=$(this.$el.data('oc.popover').$container)
|
||||
$popoverContainer.off('keydown',this.proxy(this.onPopoverKeyDown))
|
||||
$('.with-tooltip',$popoverContainer).tooltip('destroy')
|
||||
this.$el.removeData('oc.inspector')
|
||||
|
|
@ -1820,7 +1821,9 @@ e.preventDefault()
|
|||
var self=this
|
||||
setTimeout(function(){self.focus()},0)
|
||||
return false})
|
||||
$('.with-tooltip',this.$el.data('oc.popover').$container).tooltip('hide')}
|
||||
$('.with-tooltip',this.$el.data('oc.popover').$container).tooltip('hide')
|
||||
if(!e.isDefaultPrevented()){for(var i=0,len=this.editors.length;i<len;i++){this.editors[i].dispose()
|
||||
this.editors[i]=null}}}
|
||||
Inspector.prototype.editorExternalPropertyEnabled=function(editor){var $container=this.$el.data('inspector-container'),$cell=$('#'+editor.inspectorCellId,$container),$extPropEditorContainer=$cell.find('.external-param-editor-container')
|
||||
return $extPropEditorContainer.hasClass('editor-visible')}
|
||||
Inspector.prototype.findEditor=function(property){var count=this.editors.length
|
||||
|
|
@ -1910,7 +1913,8 @@ InspectorEditorDropdown.prototype=Object.create(BaseProto)
|
|||
InspectorEditorDropdown.prototype.constructor=InspectorEditorDropdown
|
||||
InspectorEditorDropdown.prototype.dispose=function(){$(document).off('change',this.selector,this.proxy(this.applyValue))
|
||||
var $element=$(this.selector)
|
||||
if($element.data('select2')!=null){$element.select2('destroy')}
|
||||
if($element.data('select2')!=null){$element.select2('close')
|
||||
$element.select2('destroy')}
|
||||
this.inspector=null
|
||||
this.fieldDef=null
|
||||
this.editorId=null
|
||||
|
|
@ -2440,6 +2444,8 @@ return state.text}
|
|||
var selectOptions={templateResult:formatSelectOption,templateSelection:formatSelectOption,escapeMarkup:function(m){return m}}
|
||||
$('select.custom-select').each(function(){var $element=$(this),extraOptions={}
|
||||
if($element.data('select2')!=null){return true;}
|
||||
$element.attr('data-disposable','data-disposable')
|
||||
$element.one('dispose-control',function(){if($element.data('select2')){$element.select2('destroy')}})
|
||||
if($element.hasClass('select-no-search')){extraOptions.minimumResultsForSearch=Infinity}
|
||||
$element.select2($.extend({},selectOptions,extraOptions))})})
|
||||
$(document).on('disable','select.custom-select',function(event,status){$(this).select2('enable',!status)})
|
||||
|
|
@ -2531,9 +2537,10 @@ if(e.isDefaultPrevented())
|
|||
return
|
||||
this.$container.removeClass('in')
|
||||
if(this.$overlay)this.$overlay.removeClass('in')
|
||||
this.disposeControls()
|
||||
$.support.transition&&this.$container.hasClass('fade')?this.$container.one($.support.transition.end,$.proxy(this.hidePopover,this)).emulateTransitionEnd(300):this.hidePopover()}
|
||||
Popover.prototype.hidePopover=function(){if(this.$container)this.$container.remove()
|
||||
if(this.$overlay)this.$overlay.remove()
|
||||
Popover.prototype.disposeControls=function(){if(this.$container){$.oc.foundation.controlUtils.disposeControls(this.$container.get(0))}}
|
||||
Popover.prototype.hidePopover=function(){this.$container.remove();if(this.$overlay)this.$overlay.remove()
|
||||
this.$el.removeClass('popover-highlight')
|
||||
this.$el.trigger('hide.oc.popover')
|
||||
this.$overlay=false
|
||||
|
|
|
|||
|
|
@ -581,7 +581,7 @@ html.cssanimations {
|
|||
.loading-indicator-container {
|
||||
.loading-indicator > span {
|
||||
.animation(spin 1s linear infinite);
|
||||
background-image: url(../images/loading-indicator-white.svg);
|
||||
background-image: url(../../../../../modules/system/assets/ui/images/loader-white.svg);
|
||||
background-size: 20px 20px;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -681,11 +681,6 @@
|
|||
}
|
||||
|
||||
Inspector.prototype.dispose = function() {
|
||||
for (var i=0, len=this.editors.length; i<len; i++) {
|
||||
this.editors[i].dispose()
|
||||
this.editors[i] = null
|
||||
}
|
||||
|
||||
var $popoverContainer = $(this.$el.data('oc.popover').$container)
|
||||
$popoverContainer.off('keydown', this.proxy(this.onPopoverKeyDown))
|
||||
$('.with-tooltip', $popoverContainer).tooltip('destroy')
|
||||
|
|
@ -761,6 +756,13 @@
|
|||
})
|
||||
|
||||
$('.with-tooltip', this.$el.data('oc.popover').$container).tooltip('hide')
|
||||
|
||||
if (!e.isDefaultPrevented()) {
|
||||
for (var i=0, len=this.editors.length; i<len; i++) {
|
||||
this.editors[i].dispose()
|
||||
this.editors[i] = null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Inspector.prototype.editorExternalPropertyEnabled = function(editor) {
|
||||
|
|
@ -992,6 +994,7 @@
|
|||
|
||||
var $element = $(this.selector)
|
||||
if ($element.data('select2') != null) {
|
||||
$element.select2('close')
|
||||
$element.select2('destroy')
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -64,16 +64,23 @@
|
|||
this.$container.removeClass('in')
|
||||
if (this.$overlay) this.$overlay.removeClass('in')
|
||||
|
||||
this.disposeControls()
|
||||
|
||||
$.support.transition && this.$container.hasClass('fade')
|
||||
? this.$container
|
||||
.one($.support.transition.end, $.proxy(this.hidePopover, this))
|
||||
.emulateTransitionEnd(300)
|
||||
: this.hidePopover()
|
||||
? this.$container
|
||||
.one($.support.transition.end, $.proxy(this.hidePopover, this))
|
||||
.emulateTransitionEnd(300)
|
||||
: this.hidePopover()
|
||||
}
|
||||
|
||||
Popover.prototype.disposeControls = function() {
|
||||
if (this.$container) {
|
||||
$.oc.foundation.controlUtils.disposeControls(this.$container.get(0))
|
||||
}
|
||||
}
|
||||
|
||||
Popover.prototype.hidePopover = function() {
|
||||
|
||||
if (this.$container) this.$container.remove()
|
||||
this.$container.remove();
|
||||
if (this.$overlay) this.$overlay.remove()
|
||||
|
||||
this.$el.removeClass('popover-highlight')
|
||||
|
|
|
|||
|
|
@ -52,6 +52,13 @@
|
|||
return true; // Continue
|
||||
}
|
||||
|
||||
$element.attr('data-disposable', 'data-disposable')
|
||||
$element.one('dispose-control', function(){
|
||||
if ($element.data('select2')) {
|
||||
$element.select2('destroy')
|
||||
}
|
||||
})
|
||||
|
||||
if ($element.hasClass('select-no-search')) {
|
||||
extraOptions.minimumResultsForSearch = Infinity
|
||||
}
|
||||
|
|
|
|||
|
|
@ -377,6 +377,10 @@ body.slim-container {
|
|||
width: 100%!important;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--single .select2-selection__arrow b {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.select2-dropdown {
|
||||
z-index: 10000;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -392,6 +392,7 @@ div.control-popover {
|
|||
.select2-search {
|
||||
min-height: 26px;
|
||||
position: relative;
|
||||
border-bottom: 1px solid #b2b9be;
|
||||
|
||||
&:after {
|
||||
position: absolute;
|
||||
|
|
@ -401,11 +402,12 @@ div.control-popover {
|
|||
color: #95a5a6;
|
||||
}
|
||||
|
||||
input.select2-input {
|
||||
input.select2-search__field {
|
||||
min-height: 26px;
|
||||
background: transparent !important;
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -157,8 +157,9 @@
|
|||
// Make the dropdown arrow point up while the dropdown is visible.
|
||||
//
|
||||
.select2-selection .select2-selection__arrow b {
|
||||
border-color: transparent transparent @color-select-icon transparent;
|
||||
border-width: 0 @caret-width-base @caret-width-base @caret-width-base;
|
||||
&:before {
|
||||
.icon(@angle-up);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
|
@ -253,22 +254,23 @@
|
|||
width: @caret-width-base;
|
||||
|
||||
b {
|
||||
border-color: @color-select-icon transparent transparent transparent;
|
||||
border-style: solid;
|
||||
border-width: @caret-width-base @caret-width-base 0 @caret-width-base;
|
||||
height: 0;
|
||||
left: 0;
|
||||
margin-left: -@caret-width-base;
|
||||
margin-top: -@caret-width-base/2;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 0;
|
||||
height: 9px;
|
||||
width: 8px;
|
||||
right: 3px;
|
||||
margin-top: -5px;
|
||||
line-height: 9px;
|
||||
&:before {
|
||||
.icon(@angle-down);
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.select2-selection__rendered {
|
||||
color: @input-color;
|
||||
padding: 0;
|
||||
padding: 0 22px 0 0;
|
||||
}
|
||||
|
||||
.select2-selection__placeholder {
|
||||
|
|
|
|||
Loading…
Reference in New Issue