this.selectableRange, this.format)); this.$emit('pick', date, visible, first); }, handleKeydown: function handleKeydown(event) { var keyCode = event.keyCode; var mapping = { 38: -1, 40: 1, 37: -1, 39: 1 }; // Left or Right if (keyCode === 37 || keyCode === 39) { var step = mapping[keyCode]; this.changeSelectionRange(step); event.preventDefault(); return; } // Up or Down if (keyCode === 38 || keyCode === 40) { var _step = mapping[keyCode]; this.$refs.spinner.scrollDown(_step); event.preventDefault(); return; } }, isValidValue: function isValidValue(date) { return (0, _util.timeWithinRange)(date, this.selectableRange, this.format); }, adjustSpinners: function adjustSpinners() { return this.$refs.spinner.adjustSpinners(); }, changeSelectionRange: function changeSelectionRange(step) { var list = [0, 3].concat(this.showSeconds ? [6] : []); var mapping = ['hours', 'minutes'].concat(this.showSeconds ? ['seconds'] : []); var index = list.indexOf(this.selectionRange[0]); var next = (index + step + list.length) % list.length; this.$refs.spinner.emitSelectRange(mapping[next]); } }, mounted: function mounted() { var _this3 = this; this.$nextTick(function () { return _this3.handleConfirm(true, true); }); this.$emit('mounted'); } }; // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /***/ }), /***/ 42: /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _util = __webpack_require__(11); var _scrollbar = __webpack_require__(17); var _scrollbar2 = _interopRequireDefault(_scrollbar); var _repeatClick = __webpack_require__(24); var _repeatClick2 = _interopRequireDefault(_repeatClick); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = { components: { ElScrollbar: _scrollbar2.default }, directives: { repeatClick: _repeatClick2.default }, props: { date: {}, defaultValue: {}, // reserved for future use showSeconds: { type: Boolean, default: true }, arrowControl: Boolean, amPmMode: { type: String, default: '' // 'a': am/pm; 'A': AM/PM } }, computed: { hours: function hours() { return this.date.getHours(); }, minutes: function minutes() { return this.date.getMinutes(); }, seconds: function seconds() { return this.date.getSeconds(); }, hoursList: function hoursList() { return (0, _util.getRangeHours)(this.selectableRange); }, arrowHourList: function arrowHourList() { var hours = this.hours; return [hours > 0 ? hours - 1 : undefined, hours, hours < 23 ? hours + 1 : undefined]; }, arrowMinuteList: function arrowMinuteList() { var minutes = this.minutes; return [minutes > 0 ? minutes - 1 : undefined, minutes, minutes < 59 ? minutes + 1 : undefined]; }, arrowSecondList: function arrowSecondList() { var seconds = this.seconds; return [seconds > 0 ? seconds - 1 : undefined, seconds, seconds < 59 ? seconds + 1 : undefined]; } }, data: function data() { return { selectableRange: [], currentScrollbar: null }; }, mounted: function mounted() { var _this = this; this.$nextTick(function () { !_this.arrowControl && _this.bindScrollEvent(); }); }, methods: { increase: function increase() { this.scrollDown(1); }, decrease: function decrease() { this.scrollDown(-1); }, modifyDateField: function modifyDateField(type, value) { switch (type) { case 'hours': this.$emit('change', (0, _util.modifyTime)(this.date, value, this.minutes, this.seconds));break; case 'minutes': this.$emit('change', (0, _util.modifyTime)(this.date, this.hours, value, this.seconds));break; case 'seconds': this.$emit('change', (0, _util.modifyTime)(this.date, this.hours, this.minutes, value));break; } }, handleClick: function handleClick(type, _ref) { var value = _ref.value, disabled = _ref.disabled; if (!disabled) { this.modifyDateField(type, value); this.emitSelectRange(type); this.adjustSpinner(type, value); } }, emitSelectRange: function emitSelectRange(type) { if (type === 'hours') { this.$emit('select-range', 0, 2); } else if (type === 'minutes') { this.$emit('select-range', 3, 5); } else if (type === 'seconds') { this.$emit('select-range', 6, 8); } this.currentScrollbar = type; }, bindScrollEvent: function bindScrollEvent() { var _this2 = this; var bindFuntion = function bindFuntion(type) { _this2.$refs[type].wrap.onscroll = function (e) { // TODO: scroll is emitted when set scrollTop programatically // should find better solutions in the future! _this2.handleScroll(type, e); }; }; bindFuntion('hours'); bindFuntion('minutes'); bindFuntion('seconds'); }, handleScroll: function handleScroll(type) { var value = Math.min(Math.floor((this.$refs[type].wrap.scrollTop - 80) / 32 + 3), type === 'hours' ? 23 : 59); this.modifyDateField(type, value); }, // NOTE: used by datetime / date-range panel // renamed from adjustScrollTop // should try to refactory it adjustSpinners: function adjustSpinners() { this.adjustSpinner('hours', this.hours); this.adjustSpinner('minutes', this.minutes); this.adjustSpinner('seconds', this.seconds); }, adjustCurrentSpinner: function adjustCurrentSpinner(type) { this.adjustSpinner(type, this[type]); }, adjustSpinner: function adjustSpinner(type, value) { if (this.arrowControl) return; var el = this.$refs[type].wrap; if (el) { el.scrollTop = Math.max(0, (value - 2.5) * 32 + 80); } }, scrollDown: function scrollDown(step) { if (!this.currentScrollbar) { this.emitSelectRange('hours'); } var label = this.currentScrollbar; var hoursList = this.hoursList; var now = this[label]; if (this.currentScrollbar === 'hours') { var total = Math.abs(step); step = step > 0 ? 1 : -1; var length = hoursList.length; while (length-- && total) { now = (now + step + hoursList.length) % hoursList.length; if (hoursList[now]) { continue; } total--; } if (hoursList[now]) return; } else { now = (now + step + 60) % 60; } this.modifyDateField(label, now); this.adjustSpinner(label, now); }, amPm: function amPm(hour) { var shouldShowAmPm = this.amPmMode.toLowerCase() === 'a'; if (!shouldShowAmPm) return ''; var isCapital = this.amPmMode === 'A'; var content = hour < 12 ? ' am' : ' pm'; if (isCapital) content = content.toUpperCase(); return content; } } }; // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /***/ }), /***/ 43: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"el-time-spinner",class:{ 'has-seconds': _vm.showSeconds }},[(!_vm.arrowControl)?[_c('el-scrollbar',{ref:"hours",staticClass:"el-time-spinner__wrapper",attrs:{"wrap-style":"max-height: inherit;","view-class":"el-time-spinner__list","noresize":"","tag":"ul"},nativeOn:{"mouseenter":function($event){_vm.emitSelectRange('hours')},"mousemove":function($event){_vm.adjustCurrentSpinner('hours')}}},_vm._l((_vm.hoursList),function(disabled,hour){return _c('li',{staticClass:"el-time-spinner__item",class:{ 'active': hour === _vm.hours, 'disabled': disabled },on:{"click":function($event){_vm.handleClick('hours', { value: hour, disabled: disabled })}}},[_vm._v(_vm._s(('0' + (_vm.amPmMode ? (hour % 12 || 12) : hour )).slice(-2))+_vm._s(_vm.amPm(hour)))])})),_c('el-scrollbar',{ref:"minutes",staticClass:"el-time-spinner__wrapper",attrs:{"wrap-style":"max-height: inherit;","view-class":"el-time-spinner__list","noresize":"","tag":"ul"},nativeOn:{"mouseenter":function($event){_vm.emitSelectRange('minutes')},"mousemove":function($event){_vm.adjustCurrentSpinner('minutes')}}},_vm._l((60),function(minute,key){return _c('li',{staticClass:"el-time-spinner__item",class:{ 'active': key === _vm.minutes },on:{"click":function($event){_vm.handleClick('minutes', { value: key, disabled: false })}}},[_vm._v(_vm._s(('0' + key).slice(-2)))])})),_c('el-scrollbar',{directives:[{name:"show",rawName:"v-show",value:(_vm.showSeconds),expression:"showSeconds"}],ref:"seconds",staticClass:"el-time-spinner__wrapper",attrs:{"wrap-style":"max-height: inherit;","view-class":"el-time-spinner__list","noresize":"","tag":"ul"},nativeOn:{"mouseenter":function($event){_vm.emitSelectRange('seconds')},"mousemove":function($event){_vm.adjustCurrentSpinner('seconds')}}},_vm._l((60),function(second,key){return _c('li',{staticClass:"el-time-spinner__item",class:{ 'active': key === _vm.seconds },on:{"click":function($event){_vm.handleClick('seconds', { value: key, disabled: false })}}},[_vm._v(_vm._s(('0' + key).slice(-2)))])}))]:_vm._e(),(_vm.arrowControl)?[_c('div',{staticClass:"el-time-spinner__wrapper is-arrow",on:{"mouseenter":function($event){_vm.emitSelectRange('hours')}}},[_c('i',{directives:[{name:"repeat-click",rawName:"v-repeat-click",value:(_vm.decrease),expression:"decrease"}],staticClass:"el-time-spinner__arrow el-icon-arrow-up"}),_c('i',{directives:[{name:"repeat-click",rawName:"v-repeat-click",value:(_vm.increase),expression:"increase"}],staticClass:"el-time-spinner__arrow el-icon-arrow-down"}),_c('ul',{ref:"hours",staticClass:"el-time-spinner__list"},_vm._l((_vm.arrowHourList),function(hour){return _c('li',{staticClass:"el-time-spinner__item",class:{ 'active': hour === _vm.hours, 'disabled': _vm.hoursList[hour] }},[_vm._v(_vm._s(hour === undefined ? '' : ('0' + (_vm.amPmMode ? (hour % 12 || 12) : hour )).slice(-2) + _vm.amPm(hour)))])}))]),_c('div',{staticClass:"el-time-spinner__wrapper is-arrow",on:{"mouseenter":function($event){_vm.emitSelectRange('minutes')}}},[_c('i',{directives:[{name:"repeat-click",rawName:"v-repeat-click",value:(_vm.decrease),expression:"decrease"}],staticClass:"el-time-spinner__arrow el-icon-arrow-up"}),_c('i',{directives:[{name:"repeat-click",rawName:"v-repeat-click",value:(_vm.increase),expression:"increase"}],staticClass:"el-time-spinner__arrow el-icon-arrow-down"}),_c('ul',{ref:"minutes",staticClass:"el-time-spinner__list"},_vm._l((_vm.arrowMinuteList),function(minute){return _c('li',{staticClass:"el-time-spinner__item",class:{ 'active': minute === _vm.minutes }},[_vm._v("\n "+_vm._s(minute === undefined ? '' : ('0' + minute).slice(-2))+"\n ")])}))]),(_vm.showSeconds)?_c('div',{staticClass:"el-time-spinner__wrapper is-arrow",on:{"mouseenter":function($event){_vm.emitSelectRange('seconds')}}},[_c('i',{directives:[{name:"repeat-click",rawName:"v-repeat-click",value:(_vm.decrease),expression:"decrease"}],staticClass:"el-time-spinner__arrow el-icon-arrow-up"}),_c('i',{directives:[{name:"repeat-click",rawName:"v-repeat-click",value:(_vm.increase),expression:"increase"}],staticClass:"el-time-spinner__arrow el-icon-arrow-down"}),_c('ul',{ref:"seconds",staticClass:"el-time-spinner__list"},_vm._l((_vm.arrowSecondList),function(second){return _c('li',{staticClass:"el-time-spinner__item",class:{ 'active': second === _vm.seconds }},[_vm._v("\n "+_vm._s(second === undefined ? '' : ('0' + second).slice(-2))+"\n ")])}))]):_vm._e()]:_vm._e()],2)} var staticRenderFns = [] var esExports = { render: render, staticRenderFns: staticRenderFns } /* harmony default export */ __webpack_exports__["a"] = (esExports); /***/ }), /***/ 44: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('transition',{attrs:{"name":"el-zoom-in-top"},on:{"after-leave":function($event){_vm.$emit('dodestroy')}}},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.visible),expression:"visible"}],staticClass:"el-time-panel el-popper",class:_vm.popperClass},[_c('div',{staticClass:"el-time-panel__content",class:{ 'has-seconds': _vm.showSeconds }},[_c('time-spinner',{ref:"spinner",attrs:{"arrow-control":_vm.useArrow,"show-seconds":_vm.showSeconds,"am-pm-mode":_vm.amPmMode,"date":_vm.date},on:{"change":_vm.handleChange,"select-range":_vm.setSelectionRange}})],1),_c('div',{staticClass:"el-time-panel__footer"},[_c('button',{staticClass:"el-time-panel__btn cancel",attrs:{"type":"button"},on:{"click":_vm.handleCancel}},[_vm._v(_vm._s(_vm.t('el.datepicker.cancel')))]),_c('button',{staticClass:"el-time-panel__btn",class:{confirm: !_vm.disabled},attrs:{"type":"button"},on:{"click":function($event){_vm.handleConfirm()}}},[_vm._v(_vm._s(_vm.t('el.datepicker.confirm')))])])])])} var staticRenderFns = [] var esExports = { render: render, staticRenderFns: staticRenderFns } /* harmony default export */ __webpack_exports__["a"] = (esExports); /***/ }), /***/ 5: /***/ (function(module, exports) { module.exports = require("element-ui/lib/mixins/locale"); /***/ }), /***/ 6: /***/ (function(module, exports) { module.exports = require("element-ui/lib/input"); /***/ }), /***/ 7: /***/ (function(module, exports) { module.exports = require("element-ui/lib/utils/vue-popper"); /***/ }), /***/ 9: /***/ (function(module, exports) { module.exports = require("element-ui/lib/utils/merge"); /***/ }) /******/ }); kodo - Gogs: Go Git Service

Geen omschrijving

0006_systemmessageinfo_src.py 571B

    # -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('message', '0005_auto_20160422_1322'), ] operations = [ migrations.AddField( model_name='systemmessageinfo', name='src', field=models.IntegerField(default=0, help_text='\u7cfb\u7edf\u6d88\u606f\u7c7b\u522b', verbose_name='src', choices=[(0, '\u62cd\u7231\u7528\u6237\u7aef'), (1, '\u62cd\u7231\u6444\u5f71\u5e08\u7aef')]), ), ]