Merged in feature/PMCORE-3102-E (pull request #8170)
PMCORE-3102 Approved-by: Rodrigo Quelca
This commit is contained in:
committed by
Julio Cesar Laura Avendaño
commit
252804765d
@@ -73,6 +73,7 @@
|
|||||||
"vuejs-datepicker": "^1.5.4",
|
"vuejs-datepicker": "^1.5.4",
|
||||||
"vuejs-paginate": "^2.0.1",
|
"vuejs-paginate": "^2.0.1",
|
||||||
"vuetify": "^1.1.4",
|
"vuetify": "^1.1.4",
|
||||||
"web-animations-js": "^2.3.2"
|
"web-animations-js": "^2.3.2",
|
||||||
|
"vue-simple-context-menu": "^3.4.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
<template>
|
||||||
|
<tr
|
||||||
|
:class="`VueTables__row ${props.rowAttrs.class}`"
|
||||||
|
v-bind="props.rowAttrs.attrs"
|
||||||
|
@contextmenu.prevent.stop="props.rowEvents.click"
|
||||||
|
@click="props.rowEvents.click"
|
||||||
|
>
|
||||||
|
<vt-child-row-toggler
|
||||||
|
:row-id="props.rowId"
|
||||||
|
v-if="props.childRowTogglerFirst"
|
||||||
|
/>
|
||||||
|
<vt-table-cell
|
||||||
|
v-for="(column, i) in props.columns"
|
||||||
|
:key="i"
|
||||||
|
:column="column"
|
||||||
|
/>
|
||||||
|
<vt-child-row-toggler
|
||||||
|
:row-id="props.rowId"
|
||||||
|
v-if="props.childRowTogglerLast"
|
||||||
|
/>
|
||||||
|
</tr>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import VtTableCell from "vue-tables-2/compiled/components/VtTableCell";
|
||||||
|
import VtChildRowToggler from "vue-tables-2/compiled/components/VtChildRowToggler";
|
||||||
|
export default {
|
||||||
|
name: "MyTableRow",
|
||||||
|
props: ["props"],
|
||||||
|
components: { VtTableCell, VtChildRowToggler },
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
:columns="columns"
|
:columns="columns"
|
||||||
:options="options"
|
:options="options"
|
||||||
ref="vueTable"
|
ref="vueTable"
|
||||||
@row-click="onRowClick"
|
@row-click="configRowClick"
|
||||||
:key="random"
|
:key="random"
|
||||||
>
|
>
|
||||||
<div slot="info" slot-scope="props">
|
<div slot="info" slot-scope="props">
|
||||||
@@ -76,6 +76,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</v-server-table>
|
</v-server-table>
|
||||||
|
<vue-simple-context-menu
|
||||||
|
:elementId="idContextMenu"
|
||||||
|
:options="contextMenuItems"
|
||||||
|
:ref="idContextMenu"
|
||||||
|
@option-clicked="contextMenuItemClicked"
|
||||||
|
/>
|
||||||
<ModalComments
|
<ModalComments
|
||||||
ref="modal-comments"
|
ref="modal-comments"
|
||||||
@postNotes="onPostNotes"
|
@postNotes="onPostNotes"
|
||||||
@@ -93,10 +99,11 @@ import ThreadTitleCell from "../../components/vuetable/ThreadTitleCell.vue"
|
|||||||
import api from "../../api/index";
|
import api from "../../api/index";
|
||||||
import utils from "../../utils/utils";
|
import utils from "../../utils/utils";
|
||||||
import defaultMixin from "./defaultMixins.js";
|
import defaultMixin from "./defaultMixins.js";
|
||||||
|
import customMixin from "./customMixins";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "AdvancedSearch",
|
name: "AdvancedSearch",
|
||||||
mixins: [defaultMixin],
|
mixins: [defaultMixin, customMixin],
|
||||||
components: {
|
components: {
|
||||||
AdvancedFilter,
|
AdvancedFilter,
|
||||||
ButtonFleft,
|
ButtonFleft,
|
||||||
|
|||||||
15
resources/assets/js/home/AdvancedSearch/customMixins.js
Normal file
15
resources/assets/js/home/AdvancedSearch/customMixins.js
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
contextMenuItems: []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/**
|
||||||
|
* Handler for item context menu clicked
|
||||||
|
*/
|
||||||
|
contextMenuItemClicked(info) {
|
||||||
|
console.log(info);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,7 +2,9 @@ import api from "../../api/index";
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
random: 1
|
random: 1,
|
||||||
|
idContextMenu: "pm-ad-context-menu",
|
||||||
|
contextMenuItems: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -41,6 +43,46 @@ export default {
|
|||||||
}
|
}
|
||||||
this.columns = cols;
|
this.columns = cols;
|
||||||
this.random = _.random(0, 10000000000);
|
this.random = _.random(0, 10000000000);
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Row click event handler
|
||||||
|
* @param {*} event
|
||||||
|
*/
|
||||||
|
configRowClick(event) {
|
||||||
|
if (event.event.button === 2) {
|
||||||
|
this.onRowContextMenu(event);
|
||||||
|
} else {
|
||||||
|
this.onRowClick(event);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Context Menu event handler
|
||||||
|
* @param {*} event
|
||||||
|
*/
|
||||||
|
onRowContextMenu(event) {
|
||||||
|
this.$refs[this.idContextMenu].showMenu(event.event, event.row);
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Row click event handler
|
||||||
|
* @param {*} event
|
||||||
|
*/
|
||||||
|
onRowClick(event) {
|
||||||
|
var self = this;
|
||||||
|
self.clickCount += 1;
|
||||||
|
if (self.clickCount === 1) {
|
||||||
|
self.singleClickTimer = setTimeout(function () {
|
||||||
|
self.clickCount = 0;
|
||||||
|
}, 400);
|
||||||
|
} else if (self.clickCount === 2) {
|
||||||
|
clearTimeout(self.singleClickTimer);
|
||||||
|
self.clickCount = 0;
|
||||||
|
self.openCaseDetail(event.row);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Handler for item context menu clicked
|
||||||
|
*/
|
||||||
|
contextMenuItemClicked(event) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -12,8 +12,11 @@ import "@fortawesome/fontawesome-free/css/all.css";
|
|||||||
import 'bootstrap/dist/css/bootstrap-grid.css';
|
import 'bootstrap/dist/css/bootstrap-grid.css';
|
||||||
import 'bootstrap/dist/css/bootstrap.min.css'
|
import 'bootstrap/dist/css/bootstrap.min.css'
|
||||||
import 'bootstrap-vue/dist/bootstrap-vue.css';
|
import 'bootstrap-vue/dist/bootstrap-vue.css';
|
||||||
import VueApexCharts from 'vue-apexcharts'
|
import VueApexCharts from 'vue-apexcharts';
|
||||||
import 'bootstrap-vue/dist/bootstrap-vue.css'
|
import 'bootstrap-vue/dist/bootstrap-vue.css';
|
||||||
|
import VueSimpleContextMenu from 'vue-simple-context-menu';
|
||||||
|
import VtTableRow from '../components/vuetable/extends/VtTableRow';
|
||||||
|
import 'vue-simple-context-menu/dist/vue-simple-context-menu.css'
|
||||||
|
|
||||||
import Home from "./Home";
|
import Home from "./Home";
|
||||||
|
|
||||||
@@ -26,11 +29,13 @@ Vue.use(VueI18n);
|
|||||||
|
|
||||||
Vue.use(ServerTable, {}, false, 'bootstrap3', {
|
Vue.use(ServerTable, {}, false, 'bootstrap3', {
|
||||||
tableHeading: VtTableHeadingCustom,
|
tableHeading: VtTableHeadingCustom,
|
||||||
sortControl: VtSortControl
|
sortControl: VtSortControl,
|
||||||
|
tableRow: VtTableRow
|
||||||
});
|
});
|
||||||
Vue.use(ClientTable, {}, false, 'bootstrap3', {});
|
Vue.use(ClientTable, {}, false, 'bootstrap3', {});
|
||||||
Vue.component('settings-popover', SettingsPopover);
|
Vue.component('settings-popover', SettingsPopover);
|
||||||
Vue.component('apexchart', VueApexCharts);
|
Vue.component('apexchart', VueApexCharts);
|
||||||
|
Vue.component('vue-simple-context-menu', VueSimpleContextMenu);
|
||||||
|
|
||||||
window.ProcessMaker = {
|
window.ProcessMaker = {
|
||||||
apiClient: require('axios')
|
apiClient: require('axios')
|
||||||
|
|||||||
Reference in New Issue
Block a user