mirror of
https://github.com/go-gitea/gitea
synced 2025-07-25 11:48:37 +00:00
Rework delete org and rename org UI (#34762)
# What's the problem of the original implementation Renaming organization will mix with organization's information change make the operation difficult to keep consistent. This PR created a danger zone like what's repository setting. It also moved organization's `rename` and `delete` operations to this zone. The original updating repository will not change the name any more. This is also a step to extract the `updaterepository` function completely. Before:   After:     --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -525,7 +525,7 @@ $.fn.dropdown = function(parameters) {
|
||||
return true;
|
||||
}
|
||||
if(settings.onShow.call(element) !== false) {
|
||||
settings.onAfterFiltered.call(element); // GITEA-PATCH: callback to correctly handle the filtered items
|
||||
$module.fomanticExt.onDropdownAfterFiltered.call(element); // GITEA-PATCH: callback to correctly handle the filtered items
|
||||
module.animate.show(function() {
|
||||
if( module.can.click() ) {
|
||||
module.bind.intent();
|
||||
@@ -753,7 +753,7 @@ $.fn.dropdown = function(parameters) {
|
||||
if(module.is.searchSelection() && module.can.show() && module.is.focusedOnSearch() ) {
|
||||
module.show();
|
||||
}
|
||||
settings.onAfterFiltered.call(element); // GITEA-PATCH: callback to correctly handle the filtered items
|
||||
$module.fomanticExt.onDropdownAfterFiltered.call(element); // GITEA-PATCH: callback to correctly handle the filtered items
|
||||
}
|
||||
;
|
||||
if(settings.useLabels && module.has.maxSelections()) {
|
||||
@@ -3994,8 +3994,6 @@ $.fn.dropdown.settings = {
|
||||
onShow : function(){},
|
||||
onHide : function(){},
|
||||
|
||||
onAfterFiltered: function(){}, // GITEA-PATCH: callback to correctly handle the filtered items
|
||||
|
||||
/* Component */
|
||||
name : 'Dropdown',
|
||||
namespace : 'dropdown',
|
||||
|
@@ -467,7 +467,7 @@ $.fn.modal = function(parameters) {
|
||||
ignoreRepeatedEvents = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
$module.fomanticExt.onModalBeforeHidden.call(element); // GITEA-PATCH: handle more UI updates before hidden
|
||||
if( module.is.animating() || module.is.active() ) {
|
||||
if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
|
||||
module.remove.active();
|
||||
@@ -641,7 +641,7 @@ $.fn.modal = function(parameters) {
|
||||
$module
|
||||
.off('mousedown' + elementEventNamespace)
|
||||
;
|
||||
}
|
||||
}
|
||||
$dimmer
|
||||
.off('mousedown' + elementEventNamespace)
|
||||
;
|
||||
@@ -877,7 +877,7 @@ $.fn.modal = function(parameters) {
|
||||
? $(document).scrollTop() + settings.padding
|
||||
: $(document).scrollTop() + (module.cache.contextHeight - module.cache.height - settings.padding),
|
||||
marginLeft: -(module.cache.width / 2)
|
||||
})
|
||||
})
|
||||
;
|
||||
} else {
|
||||
$module
|
||||
@@ -886,7 +886,7 @@ $.fn.modal = function(parameters) {
|
||||
? -(module.cache.height / 2)
|
||||
: settings.padding / 2,
|
||||
marginLeft: -(module.cache.width / 2)
|
||||
})
|
||||
})
|
||||
;
|
||||
}
|
||||
module.verbose('Setting modal offset for legacy mode');
|
||||
|
Reference in New Issue
Block a user