responsive: fixed modalecard from flagcollection

This commit is contained in:
Bachir Soussi Chiadmi 2021-03-31 11:03:00 +02:00
parent 70b36d9f55
commit ae3c8f1234
2 changed files with 9 additions and 4 deletions

View File

@ -1199,7 +1199,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict"; "use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.default = void 0;\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.common.js\");\n\nvar _cardMixins = _interopRequireDefault(__webpack_require__(/*! vuejs/components/cardMixins */ \"./web/themes/custom/materiotheme/vuejs/components/cardMixins.js\"));\n\nvar _ModalCard = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Content/ModalCard */ \"./web/themes/custom/materiotheme/vuejs/components/Content/ModalCard.vue\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n name: \"MiniCard\",\n props: ['item', 'collid'],\n mixins: [_cardMixins.default],\n components: {\n ModalCard: _ModalCard.default\n },\n data: function data() {\n return {\n blanksrc: \"\".concat(drupalSettings.path.themePath, \"/assets/img/blank.gif\"),\n loadingItem: false\n };\n },\n computed: _objectSpread({}, (0, _vuex.mapState)({\n isloggedin: function isloggedin(state) {\n return state.User.isloggedin;\n }\n })),\n methods: _objectSpread(_objectSpread({}, (0, _vuex.mapActions)({\n flagUnflag: 'User/flagUnflag'\n })), {}, {\n itemIsLoading: function itemIsLoading(id) {\n return this.loadingItem;\n },\n onUnFlagCard: function onUnFlagCard(e) {\n var _this = this;\n\n console.log(\"Card onFlagActionCard\", e, this.item);\n\n if (!this.loadingItem) {\n this.loadingItem = true;\n this.flagUnflag({\n action: 'unflag',\n id: this.item.id,\n collid: this.collid\n }).then(function (data) {\n console.log(\"onUnFlagCard then\", data);\n _this.loadingItem = false;\n });\n }\n },\n openModalCard: function openModalCard(e) {\n console.log('openModalCard', this.isLoggedin);\n\n if (this.isloggedin) {\n this.$modal.show(_ModalCard.default, {\n item: this.item\n }, {\n name: \"modal-\".concat(this.item.id),\n draggable: true,\n width: '850px',\n height: '610px'\n });\n }\n }\n })\n};\nexports.default = _default;\n\n//# sourceURL=webpack://materio.com/./web/themes/custom/materiotheme/vuejs/components/Content/MiniCard.vue?./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options"); eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.default = void 0;\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.common.js\");\n\nvar _cardMixins = _interopRequireDefault(__webpack_require__(/*! vuejs/components/cardMixins */ \"./web/themes/custom/materiotheme/vuejs/components/cardMixins.js\"));\n\nvar _ModalCard = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Content/ModalCard */ \"./web/themes/custom/materiotheme/vuejs/components/Content/ModalCard.vue\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n name: \"MiniCard\",\n props: ['item', 'collid'],\n mixins: [_cardMixins.default],\n components: {\n ModalCard: _ModalCard.default\n },\n data: function data() {\n return {\n blanksrc: \"\".concat(drupalSettings.path.themePath, \"/assets/img/blank.gif\"),\n loadingItem: false\n };\n },\n computed: _objectSpread({}, (0, _vuex.mapState)({\n isloggedin: function isloggedin(state) {\n return state.User.isloggedin;\n }\n })),\n methods: _objectSpread(_objectSpread({}, (0, _vuex.mapActions)({\n flagUnflag: 'User/flagUnflag'\n })), {}, {\n itemIsLoading: function itemIsLoading(id) {\n return this.loadingItem;\n },\n onUnFlagCard: function onUnFlagCard(e) {\n var _this = this;\n\n console.log(\"Card onFlagActionCard\", e, this.item);\n\n if (!this.loadingItem) {\n this.loadingItem = true;\n this.flagUnflag({\n action: 'unflag',\n id: this.item.id,\n collid: this.collid\n }).then(function (data) {\n console.log(\"onUnFlagCard then\", data);\n _this.loadingItem = false;\n });\n }\n },\n openModalCard: function openModalCard(e) {\n console.log('openModalCard', this.isLoggedin);\n\n if (this.isloggedin) {\n this.$modal.show(_ModalCard.default, {\n item: this.item\n }, {\n name: \"modal-\".concat(this.item.id),\n draggable: false,\n classes: \"vm--modale-card\",\n // this does not work\n // adaptative: true,\n // maxWidth: 850,\n // maxHeight: 610,\n width: '95%',\n height: '95%'\n });\n }\n }\n })\n};\nexports.default = _default;\n\n//# sourceURL=webpack://materio.com/./web/themes/custom/materiotheme/vuejs/components/Content/MiniCard.vue?./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options");
/***/ }), /***/ }),

View File

@ -105,9 +105,14 @@ export default {
{ item: this.item }, { item: this.item },
{ {
name: `modal-${this.item.id}`, name: `modal-${this.item.id}`,
draggable: true, draggable: false,
width: '850px', classes: "vm--modale-card",
height: '610px' // this does not work
// adaptative: true,
// maxWidth: 850,
// maxHeight: 610,
width: '95%',
height: '95%'
} }
) )
} }