Merge pull request #14041 from rabbitmq/mergify/bp/v4.1.x/pr-14033
Trigger a 4.1.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details

Fix issue introduced by #13512 (backport #14033)
This commit is contained in:
Michael Klishin 2025-06-06 13:35:14 +04:00 committed by GitHub
commit f074a413e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 65 additions and 66 deletions

View File

@ -13,6 +13,7 @@
<script src="js/base64.js" type="text/javascript"></script>
<script src="js/global.js" type="text/javascript"></script>
<script src="js/main.js" type="text/javascript"></script>
<script src="js/title.js" type="text/javascript"></script>
<script src="js/prefs.js" type="text/javascript"></script>
<script src="js/formatters.js" type="text/javascript"></script>
<script src="js/charts.js" type="text/javascript"></script>

View File

@ -1,69 +1,3 @@
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['jquery', 'sammy'], factory);
} else {
(window.Sammy = window.Sammy || {}).Title = factory(window.jQuery, window.Sammy);
}
}(function ($, Sammy) {
// Sammy.Title is a very simple plugin to easily set the document's title.
// It supplies a helper for setting the title (`title()`) within routes,
// and an app level method for setting the global title (`setTitle()`)
Sammy.Title = function() {
// setTitle allows setting a global title or a function that modifies the
// title for each route/page.
//
// ### Example
//
// // setting a title prefix
// $.sammy(function() {
//
// this.setTitle('My App -');
//
// this.get('#/', function() {
// this.title('Home'); // document's title == "My App - Home"
// });
// });
//
// // setting a title with a function
// $.sammy(function() {
//
// this.setTitle(function(title) {
// return [title, " /// My App"].join('');
// });
//
// this.get('#/', function() {
// this.title('Home'); // document's title == "Home /// My App";
// });
// });
//
this.setTitle = function(title) {
if (!$.isFunction(title)) {
this.title_function = function(additional_title) {
return [title, additional_title].join(' ');
}
} else {
this.title_function = title;
}
};
// *Helper* title() sets the document title, passing it through the function
// defined by setTitle() if set.
this.helper('title', function() {
var new_title = $.makeArray(arguments).join(' ');
if (this.app.title_function) {
new_title = this.app.title_function(new_title);
}
document.title = new_title;
});
};
return Sammy.Title;
}));
dispatcher_add(function(sammy) {
function path(p, r, t) {
sammy.get(p, function() {

View File

@ -0,0 +1,64 @@
(function (factory) {
if (typeof define === "function" && define.amd) {
define(["jquery", "sammy"], factory);
} else {
(window.Sammy = window.Sammy || {}).Title = factory(
window.jQuery,
window.Sammy,
);
}
})(function ($, Sammy) {
// Sammy.Title is a very simple plugin to easily set the document's title.
// It supplies a helper for setting the title (`title()`) within routes,
// and an app level method for setting the global title (`setTitle()`)
Sammy.Title = function () {
// setTitle allows setting a global title or a function that modifies the
// title for each route/page.
//
// ### Example
//
// // setting a title prefix
// $.sammy(function() {
//
// this.setTitle('My App -');
//
// this.get('#/', function() {
// this.title('Home'); // document's title == "My App - Home"
// });
// });
//
// // setting a title with a function
// $.sammy(function() {
//
// this.setTitle(function(title) {
// return [title, " /// My App"].join('');
// });
//
// this.get('#/', function() {
// this.title('Home'); // document's title == "Home /// My App";
// });
// });
//
this.setTitle = function (title) {
if (!$.isFunction(title)) {
this.title_function = function (additional_title) {
return [title, additional_title].join(" ");
};
} else {
this.title_function = title;
}
};
// *Helper* title() sets the document title, passing it through the function
// defined by setTitle() if set.
this.helper("title", function () {
var new_title = $.makeArray(arguments).join(" ");
if (this.app.title_function) {
new_title = this.app.title_function(new_title);
}
document.title = new_title;
});
};
return Sammy.Title;
});