js2ts: install_db.php
- jqValidateForm 구현 - async-validator + 수작업 - common.js 없이 ventor -> 타겟 ts 직접
This commit is contained in:
1 parent
1acbf90261
commit
28d71b8ce2
10 files changed
+196
-70
No files matched your search
+2
-65
@@ -1,65 +1,2 @@
|
||||
|
||||
$(document).ready( function () {
|
||||
$('#db_form').validate({
|
||||
rules:{
|
||||
db_host:"required",
|
||||
db_port:"required",
|
||||
db_id:"required",
|
||||
db_pw:"required",
|
||||
db_name:"required"
|
||||
},
|
||||
errorElement: "div",
|
||||
errorPlacement: function ( error, element ) {
|
||||
// Add the `help-block` class to the error element
|
||||
error.addClass( "invalid-feedback" );
|
||||
|
||||
if ( element.prop( "type" ) === "checkbox" ) {
|
||||
error.insertAfter( element.parent( "label" ) );
|
||||
} else {
|
||||
error.insertAfter( element );
|
||||
}
|
||||
},
|
||||
highlight: function ( element, errorClass, validClass ) {
|
||||
$( element ).addClass( "is-invalid" ).removeClass( "is-valid" );
|
||||
},
|
||||
unhighlight: function (element, errorClass, validClass) {
|
||||
$( element ).addClass( "is-valid" ).removeClass( "is-invalid" );
|
||||
}
|
||||
});
|
||||
$('#db_form').submit(function(e){
|
||||
e.preventDefault();
|
||||
if(!$("#db_form").valid()){
|
||||
return;
|
||||
}
|
||||
$.ajax({
|
||||
cache:false,
|
||||
type:'post',
|
||||
url:'j_install_db.php',
|
||||
dataType:'json',
|
||||
data:{
|
||||
full_reset:$('#full_reset input:radio:checked').val(),
|
||||
db_host:$('#db_host').val(),
|
||||
db_port:$('#db_port').val(),
|
||||
db_id:$('#db_id').val(),
|
||||
db_pw:$('#db_pw').val(),
|
||||
db_name:$('#db_name').val()
|
||||
}
|
||||
}).then(function(result){
|
||||
var deferred = $.Deferred();
|
||||
|
||||
if(!result.result){
|
||||
alert(result.reason);
|
||||
deferred.reject('fail');
|
||||
}
|
||||
else{
|
||||
alert('DB.php가 생성되었습니다.');
|
||||
deferred.resolve();
|
||||
}
|
||||
|
||||
return deferred.promise();
|
||||
}).then(function(){
|
||||
location.href = 'install.php';
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
(()=>{"use strict";var r,e={835:(r,e,t)=>{t(5666),t(1058),t(1539),t(8674);var n=t(9669),a=t.n(n),i=t(9755),o=t.n(i),u=t(1469),l=t.n(u),s=(t(9826),t(7941),t(715)),c=(t(1038),t(8783),t(2526),t(1817),t(2165),t(6992),t(3948),t(7037)),f=t.n(c);function d(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function p(r){var e,t={},n=function(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=function(r,e){if(r){if("string"==typeof r)return d(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?d(r,e):void 0}}(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var n=0,a=function(){};return{s:a,n:function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(r){throw r},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,u=!1;return{s:function(){t=t.call(r)},n:function(){var r=t.next();return o=r.done,r},e:function(r){u=!0,i=r},f:function(){try{o||null==t.return||t.return()}finally{if(u)throw i}}}}(r);try{for(n.s();!(e=n.n()).done;){var a=e.value,i=a.name,o=a.value;if(!f()(i))throw new TypeError("".concat(i," is not string"));if(!f()(o))throw new TypeError("".concat(o," is not string"));if(""!==i&&Line truncated
|
||||
//# sourceMappingURL=install_db.js.map
|
||||
Reference in new issue
Block a user