|
@@ -447,9 +447,10 @@ function addOtherInput(t,f) {
|
|
|
if(val){
|
|
|
appendArr[l] = val
|
|
|
}else {
|
|
|
- appendArr.splice(l,1)
|
|
|
+ // appendArr.splice(l,1)
|
|
|
}
|
|
|
})
|
|
|
+ // console.log(appendArr, 'appendArr');
|
|
|
}else {
|
|
|
var l = excludeArr.length
|
|
|
$(input).on('input',function () {
|
|
@@ -457,7 +458,7 @@ function addOtherInput(t,f) {
|
|
|
if(val){
|
|
|
excludeArr[l] = val
|
|
|
}else{
|
|
|
- excludeArr.splice(l,1)
|
|
|
+ // excludeArr.splice(l,1)
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -567,6 +568,13 @@ $(document).on('click','#inputDel_0 .icon-edit-img',function (e) {
|
|
|
append.forEach(function (value, index) {
|
|
|
addOtherInput('.new-box .l .add-w', true)
|
|
|
$('.new-box .l .sm:eq(' + index + ')').val(value)
|
|
|
+ $('.new-box .l .sm:eq(' + index + ')').on('input', function() {
|
|
|
+ if ($(this).val()) {
|
|
|
+ append[index] = $(this).val()
|
|
|
+ }else{
|
|
|
+ append.splice(index,1)
|
|
|
+ }
|
|
|
+ })
|
|
|
})
|
|
|
appendArr = append
|
|
|
}
|
|
@@ -576,6 +584,13 @@ $(document).on('click','#inputDel_0 .icon-edit-img',function (e) {
|
|
|
exclude.forEach(function (value, index) {
|
|
|
addOtherInput('.new-box .r .add-w', false)
|
|
|
$('.new-box .r .sm:eq(' + index + ')').val(value)
|
|
|
+ $('.new-box .r .sm:eq(' + index + ')').on('input', function() {
|
|
|
+ if ($(this).val()) {
|
|
|
+ exclude[index] = $(this).val()
|
|
|
+ }else{
|
|
|
+ exclude.splice(index,1)
|
|
|
+ }
|
|
|
+ })
|
|
|
})
|
|
|
excludeArr = exclude
|
|
|
}
|
|
@@ -636,7 +651,7 @@ $('.new-box .new-confirm').click(function () {
|
|
|
// }
|
|
|
// end
|
|
|
var editIndex = $(this).attr('data-index')
|
|
|
- // console.log(editIndex, text, appendArr, excludeArr, 'editIndex');
|
|
|
+ console.log(editIndex,type, text, appendArr, excludeArr, 'editIndex');
|
|
|
|
|
|
var keyTemArr = window[arr] || []
|
|
|
if(!Array.isArray(keyTemArr)) {
|
|
@@ -658,6 +673,7 @@ $('.new-box .new-confirm').click(function () {
|
|
|
})
|
|
|
keyTemArr.push(text)
|
|
|
}
|
|
|
+ console.log(keyAllArr, keyTemArr, 'keyAllArr');
|
|
|
|
|
|
// var tempArr = keyAllArr.map(function(v){return v.name})
|
|
|
// if(tempArr.indexOf(text) === -1) {
|