quit $
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
ea2e38af4e
commit
62f7b80ed4
|
@ -1133,7 +1133,7 @@ export default {
|
||||||
entryLatestBuys: {
|
entryLatestBuys: {
|
||||||
firstBuy: 'vn-entry-latest-buys tbody > tr:nth-child(1)',
|
firstBuy: 'vn-entry-latest-buys tbody > tr:nth-child(1)',
|
||||||
allBuysCheckBox: 'vn-entry-latest-buys thead vn-check',
|
allBuysCheckBox: 'vn-entry-latest-buys thead vn-check',
|
||||||
secondBuyCheckBox: 'vn-entry-latest-buys tbody tr:nth-child(2) vn-check[ng-model="buy.$checked"]',
|
secondBuyCheckBox: 'vn-entry-latest-buys tbody tr:nth-child(2) vn-check[ng-model="buy.checked"]',
|
||||||
editBuysButton: 'vn-entry-latest-buys vn-button[icon="edit"]',
|
editBuysButton: 'vn-entry-latest-buys vn-button[icon="edit"]',
|
||||||
fieldAutocomplete: 'vn-autocomplete[ng-model="$ctrl.editedColumn.field"]',
|
fieldAutocomplete: 'vn-autocomplete[ng-model="$ctrl.editedColumn.field"]',
|
||||||
newValueInput: 'vn-textfield[ng-model="$ctrl.editedColumn.newValue"]',
|
newValueInput: 'vn-textfield[ng-model="$ctrl.editedColumn.newValue"]',
|
||||||
|
|
|
@ -135,6 +135,7 @@ export default class MultiCheck extends FormInput {
|
||||||
areAllUnchecked() {
|
areAllUnchecked() {
|
||||||
if (!this.model || !this.model.data) return;
|
if (!this.model || !this.model.data) return;
|
||||||
|
|
||||||
|
this.checkedDummyCount = null;
|
||||||
const data = this.model.data;
|
const data = this.model.data;
|
||||||
return data.every(item => {
|
return data.every(item => {
|
||||||
return item[this.checkField] === false;
|
return item[this.checkField] === false;
|
||||||
|
|
|
@ -4,19 +4,19 @@ module.exports = Self => {
|
||||||
accessType: 'WRITE',
|
accessType: 'WRITE',
|
||||||
accepts: [{
|
accepts: [{
|
||||||
arg: 'field',
|
arg: 'field',
|
||||||
type: 'String',
|
type: 'string',
|
||||||
required: true,
|
required: true,
|
||||||
description: `the column to edit`
|
description: `the column to edit`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
arg: 'newValue',
|
arg: 'newValue',
|
||||||
type: 'Any',
|
type: 'any',
|
||||||
required: true,
|
required: true,
|
||||||
description: `The new value to save`
|
description: `The new value to save`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
arg: 'lines',
|
arg: 'lines',
|
||||||
type: ['Object'],
|
type: ['object'],
|
||||||
required: true,
|
required: true,
|
||||||
description: `the buys which will be modified`
|
description: `the buys which will be modified`
|
||||||
},
|
},
|
||||||
|
@ -26,7 +26,7 @@ module.exports = Self => {
|
||||||
description: 'Filter defining where, order, offset, and limit - must be a JSON-encoded string'
|
description: 'Filter defining where, order, offset, and limit - must be a JSON-encoded string'
|
||||||
}],
|
}],
|
||||||
returns: {
|
returns: {
|
||||||
type: 'Object',
|
type: 'object',
|
||||||
root: true
|
root: true
|
||||||
},
|
},
|
||||||
http: {
|
http: {
|
||||||
|
|
|
@ -29,9 +29,9 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th shrink>
|
<th shrink>
|
||||||
<vn-multi-check
|
<vn-multi-check
|
||||||
checked="$ctrl.checkAll"
|
|
||||||
model="model"
|
model="model"
|
||||||
check-field="$checked"
|
checked="$ctrl.checkAll"
|
||||||
|
check-field="checked"
|
||||||
check-dummy-enabled="true"
|
check-dummy-enabled="true"
|
||||||
checked-dummy-count="$ctrl.checkedDummyCount">
|
checked-dummy-count="$ctrl.checkedDummyCount">
|
||||||
</vn-multi-check>
|
</vn-multi-check>
|
||||||
|
@ -128,7 +128,7 @@
|
||||||
}">
|
}">
|
||||||
<td>
|
<td>
|
||||||
<vn-check
|
<vn-check
|
||||||
ng-model="buy.$checked"
|
ng-model="buy.checked"
|
||||||
vn-click-stop>
|
vn-click-stop>
|
||||||
</vn-check>
|
</vn-check>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -6,7 +6,7 @@ export default class Controller extends Section {
|
||||||
constructor($element, $) {
|
constructor($element, $) {
|
||||||
super($element, $);
|
super($element, $);
|
||||||
this.editedColumn;
|
this.editedColumn;
|
||||||
this.$checkAll = false;
|
this.checkAll = false;
|
||||||
|
|
||||||
this.smartTableOptions = {
|
this.smartTableOptions = {
|
||||||
activeButtons: {
|
activeButtons: {
|
||||||
|
@ -91,7 +91,7 @@ export default class Controller extends Section {
|
||||||
const buys = this.$.model.data || [];
|
const buys = this.$.model.data || [];
|
||||||
const checkedBuys = [];
|
const checkedBuys = [];
|
||||||
for (let buy of buys) {
|
for (let buy of buys) {
|
||||||
if (buy.$checked)
|
if (buy.checked)
|
||||||
checkedBuys.push(buy);
|
checkedBuys.push(buy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,10 +31,10 @@ describe('Entry', () => {
|
||||||
describe('get checked', () => {
|
describe('get checked', () => {
|
||||||
it(`should return a set of checked lines`, () => {
|
it(`should return a set of checked lines`, () => {
|
||||||
controller.$.model.data = [
|
controller.$.model.data = [
|
||||||
{$checked: true, id: 1},
|
{checked: true, id: 1},
|
||||||
{$checked: true, id: 2},
|
{checked: true, id: 2},
|
||||||
{$checked: true, id: 3},
|
{checked: true, id: 3},
|
||||||
{$checked: false, id: 4},
|
{checked: false, id: 4},
|
||||||
];
|
];
|
||||||
|
|
||||||
let result = controller.checked;
|
let result = controller.checked;
|
||||||
|
|
Loading…
Reference in New Issue