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: {
|
||||
firstBuy: 'vn-entry-latest-buys tbody > tr:nth-child(1)',
|
||||
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"]',
|
||||
fieldAutocomplete: 'vn-autocomplete[ng-model="$ctrl.editedColumn.field"]',
|
||||
newValueInput: 'vn-textfield[ng-model="$ctrl.editedColumn.newValue"]',
|
||||
|
|
|
@ -135,6 +135,7 @@ export default class MultiCheck extends FormInput {
|
|||
areAllUnchecked() {
|
||||
if (!this.model || !this.model.data) return;
|
||||
|
||||
this.checkedDummyCount = null;
|
||||
const data = this.model.data;
|
||||
return data.every(item => {
|
||||
return item[this.checkField] === false;
|
||||
|
|
|
@ -4,19 +4,19 @@ module.exports = Self => {
|
|||
accessType: 'WRITE',
|
||||
accepts: [{
|
||||
arg: 'field',
|
||||
type: 'String',
|
||||
type: 'string',
|
||||
required: true,
|
||||
description: `the column to edit`
|
||||
},
|
||||
{
|
||||
arg: 'newValue',
|
||||
type: 'Any',
|
||||
type: 'any',
|
||||
required: true,
|
||||
description: `The new value to save`
|
||||
},
|
||||
{
|
||||
arg: 'lines',
|
||||
type: ['Object'],
|
||||
type: ['object'],
|
||||
required: true,
|
||||
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'
|
||||
}],
|
||||
returns: {
|
||||
type: 'Object',
|
||||
type: 'object',
|
||||
root: true
|
||||
},
|
||||
http: {
|
||||
|
|
|
@ -29,9 +29,9 @@
|
|||
<tr>
|
||||
<th shrink>
|
||||
<vn-multi-check
|
||||
checked="$ctrl.checkAll"
|
||||
model="model"
|
||||
check-field="$checked"
|
||||
checked="$ctrl.checkAll"
|
||||
check-field="checked"
|
||||
check-dummy-enabled="true"
|
||||
checked-dummy-count="$ctrl.checkedDummyCount">
|
||||
</vn-multi-check>
|
||||
|
@ -128,7 +128,7 @@
|
|||
}">
|
||||
<td>
|
||||
<vn-check
|
||||
ng-model="buy.$checked"
|
||||
ng-model="buy.checked"
|
||||
vn-click-stop>
|
||||
</vn-check>
|
||||
</td>
|
||||
|
|
|
@ -6,7 +6,7 @@ export default class Controller extends Section {
|
|||
constructor($element, $) {
|
||||
super($element, $);
|
||||
this.editedColumn;
|
||||
this.$checkAll = false;
|
||||
this.checkAll = false;
|
||||
|
||||
this.smartTableOptions = {
|
||||
activeButtons: {
|
||||
|
@ -91,7 +91,7 @@ export default class Controller extends Section {
|
|||
const buys = this.$.model.data || [];
|
||||
const checkedBuys = [];
|
||||
for (let buy of buys) {
|
||||
if (buy.$checked)
|
||||
if (buy.checked)
|
||||
checkedBuys.push(buy);
|
||||
}
|
||||
|
||||
|
|
|
@ -31,10 +31,10 @@ describe('Entry', () => {
|
|||
describe('get checked', () => {
|
||||
it(`should return a set of checked lines`, () => {
|
||||
controller.$.model.data = [
|
||||
{$checked: true, id: 1},
|
||||
{$checked: true, id: 2},
|
||||
{$checked: true, id: 3},
|
||||
{$checked: false, id: 4},
|
||||
{checked: true, id: 1},
|
||||
{checked: true, id: 2},
|
||||
{checked: true, id: 3},
|
||||
{checked: false, id: 4},
|
||||
];
|
||||
|
||||
let result = controller.checked;
|
||||
|
|
Loading…
Reference in New Issue