jquery-redirect 제거
This commit is contained in:
@@ -17,8 +17,6 @@ $generalObj = General::createGeneralObjFromDB($session->generalID);
|
|||||||
<title><?=UniqueConst::$serverName?>: 사령부</title>
|
<title><?=UniqueConst::$serverName?>: 사령부</title>
|
||||||
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
<?=WebUtil::printJS('../d_shared/common_path.js')?>
|
||||||
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
<?=WebUtil::printJS('dist_js/vendors.js')?>
|
||||||
<?=WebUtil::printJS('dist_js/common.js')?>
|
|
||||||
<?=WebUtil::printJS('../e_lib/jquery.redirect.js')?>
|
|
||||||
<?=WebUtil::printJS('dist_js/chiefCenter.js')?>
|
<?=WebUtil::printJS('dist_js/chiefCenter.js')?>
|
||||||
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
|
||||||
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
<?=WebUtil::printCSS('../d_shared/common.css')?>
|
||||||
|
|||||||
Vendored
-39
@@ -1,39 +0,0 @@
|
|||||||
type JqueryRedirectOpts = {
|
|
||||||
url: string,
|
|
||||||
values?: Record<string, string | number | string[] | boolean>,
|
|
||||||
method?: 'GET' | 'POST',
|
|
||||||
target?: string,
|
|
||||||
traditional?: boolean
|
|
||||||
redirectTop?: boolean,
|
|
||||||
}
|
|
||||||
|
|
||||||
interface JQueryStatic {
|
|
||||||
/**
|
|
||||||
* jQuery Redirect
|
|
||||||
* @param {string} url - Url of the redirection
|
|
||||||
* @param {Object} values - (optional) An object with the data to send. If not present will look for values as QueryString in the target url.
|
|
||||||
* @param {string} method - (optional) The HTTP verb can be GET or POST (defaults to POST)
|
|
||||||
* @param {string} target - (optional) The target of the form. If you set "_blank" will open the url in a new window.
|
|
||||||
* @param {boolean} traditional - (optional) This provides the same function as jquery's ajax function. The brackets are omitted on the field name if its an array. This allows arrays to work with MVC.net among others.
|
|
||||||
* @param {boolean} redirectTop - (optional) If its called from a iframe, force to navigate the top window.
|
|
||||||
*/
|
|
||||||
redirect(
|
|
||||||
url: string,
|
|
||||||
values?: Record<string, string | number | string[] | boolean>,
|
|
||||||
method?: 'GET' | 'POST',
|
|
||||||
target?: string, traditional?:
|
|
||||||
boolean, redirectTop?: boolean
|
|
||||||
): void;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* jQuery Redirect
|
|
||||||
* @param {string} opts - Options object
|
|
||||||
* @param {string} opts.url - Url of the redirection
|
|
||||||
* @param {Object} opts.values - (optional) An object with the data to send. If not present will look for values as QueryString in the target url.
|
|
||||||
* @param {string} opts.method - (optional) The HTTP verb can be GET or POST (defaults to POST)
|
|
||||||
* @param {string} opts.target - (optional) The target of the form. "_blank" will open the url in a new window.
|
|
||||||
* @param {boolean} opts.traditional - (optional) This provides the same function as jquery's ajax function. The brackets are omitted on the field name if its an array. This allows arrays to work with MVC.net among others.
|
|
||||||
* @param {boolean} opts.redirectTop - (optional) If its called from a iframe, force to navigate the top window.
|
|
||||||
*/
|
|
||||||
redirect(opt: JqueryRedirectOpts): void;
|
|
||||||
}
|
|
||||||
@@ -9,6 +9,7 @@ import { convertFormData } from './util/convertFormData';
|
|||||||
import { unwrap_any } from "./util/unwrap_any";
|
import { unwrap_any } from "./util/unwrap_any";
|
||||||
import { parseTime } from './util/parseTime';
|
import { parseTime } from './util/parseTime';
|
||||||
import { formatTime } from './util/formatTime';
|
import { formatTime } from './util/formatTime';
|
||||||
|
import { stringifyUrl } from 'query-string';
|
||||||
|
|
||||||
declare const maxChiefTurn: number;
|
declare const maxChiefTurn: number;
|
||||||
|
|
||||||
@@ -223,7 +224,7 @@ async function pushTurn(turnCnt: number) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
jQuery(function ($) {
|
$(function ($) {
|
||||||
|
|
||||||
chiefTableObj = genChiefTableObj();
|
chiefTableObj = genChiefTableObj();
|
||||||
void reloadTable();
|
void reloadTable();
|
||||||
@@ -232,12 +233,14 @@ jQuery(function ($) {
|
|||||||
const turnList = unwrap_any<string[]>($('#chiefTurnSelector').val()).map(function (v) { return parseInt(v); });
|
const turnList = unwrap_any<string[]>($('#chiefTurnSelector').val()).map(function (v) { return parseInt(v); });
|
||||||
const $command = $('#chiefCommandList option:selected');
|
const $command = $('#chiefCommandList option:selected');
|
||||||
if ($command.data('reqarg')) {
|
if ($command.data('reqarg')) {
|
||||||
$.redirect(
|
document.location.href = stringifyUrl({
|
||||||
"b_processing.php", {
|
url: 'b_processing.php',
|
||||||
command: unwrap($command.val()),
|
query: {
|
||||||
|
command: unwrap_any<string>($command.val()),
|
||||||
turnList: turnList.join('_'),
|
turnList: turnList.join('_'),
|
||||||
is_chief: true
|
is_chief: true
|
||||||
}, "GET");
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
void reserveTurn(turnList, unwrap_any<string>($command.val()));
|
void reserveTurn(turnList, unwrap_any<string>($command.val()));
|
||||||
|
|||||||
Reference in New Issue
Block a user