|
|
|
@ -702,6 +702,7 @@ function () {
|
|
|
|
|
postData.append("title", document.getElementById('entry_title').value);
|
|
|
|
|
postData.append('slug', new _StringUtils.default().cleanString(document.getElementById('entry_title').value));
|
|
|
|
|
postData.append("entry_plaintext", txt.value);
|
|
|
|
|
postData.append("created_date", document.getElementById('option-date').value);
|
|
|
|
|
postData.append("tags", document.getElementById('entry_tags').value);
|
|
|
|
|
var postURL;
|
|
|
|
|
var postEventType;
|
|
|
|
@ -748,7 +749,94 @@ function () {
|
|
|
|
|
}();
|
|
|
|
|
|
|
|
|
|
exports.default = EntryTasks;
|
|
|
|
|
},{"../tools/utilities/DataUtils":"tools/utilities/DataUtils.jsx","../tools/events/DataEvent":"tools/events/DataEvent.jsx","../tools/utilities/StringUtils":"tools/utilities/StringUtils.jsx"}],"../../../../node_modules/tiny-date-picker/dist/tiny-date-picker.js":[function(require,module,exports) {
|
|
|
|
|
},{"../tools/utilities/DataUtils":"tools/utilities/DataUtils.jsx","../tools/events/DataEvent":"tools/events/DataEvent.jsx","../tools/utilities/StringUtils":"tools/utilities/StringUtils.jsx"}],"tools/utilities/DateUtils.jsx":[function(require,module,exports) {
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
|
|
|
value: true
|
|
|
|
|
});
|
|
|
|
|
exports.default = void 0;
|
|
|
|
|
|
|
|
|
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
|
|
|
|
|
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
|
|
|
|
|
|
|
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
|
|
|
|
|
|
|
|
var DateUtils =
|
|
|
|
|
/*#__PURE__*/
|
|
|
|
|
function () {
|
|
|
|
|
//--------------------------
|
|
|
|
|
// constructor
|
|
|
|
|
//--------------------------
|
|
|
|
|
function DateUtils() {
|
|
|
|
|
_classCallCheck(this, DateUtils);
|
|
|
|
|
} //--------------------------
|
|
|
|
|
// methods
|
|
|
|
|
//--------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_createClass(DateUtils, [{
|
|
|
|
|
key: "getMKtime",
|
|
|
|
|
value: function getMKtime() {
|
|
|
|
|
var time = new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate(), new Date().getHours(), new Date().getMinutes(), new Date().getSeconds(), 0).getTime() / 1000;
|
|
|
|
|
return time;
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
key: "convertMKtime",
|
|
|
|
|
value: function convertMKtime(seconds) {
|
|
|
|
|
var date = new Date(seconds * 1000);
|
|
|
|
|
return date;
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
key: "getDate",
|
|
|
|
|
value: function getDate(type, rawdate) {
|
|
|
|
|
var day = rawdate != null || rawdate != '' ? String(new Date(rawdate).getUTCDate()) : String(new Date().getUTCDate());
|
|
|
|
|
var month = rawdate != null || rawdate != '' ? String(new Date(rawdate).getUTCMonth() + 1) : String(new Date().getUTCMonth() + 1);
|
|
|
|
|
var year = rawdate != null || rawdate != '' ? String(new Date(rawdate).getUTCFullYear()) : String(new Date().getUTCFullYear());
|
|
|
|
|
var hour = rawdate != null || rawdate != '' ? String(new Date(rawdate).getUTCHours()) : String(new Date().getUTCHours());
|
|
|
|
|
var minute = rawdate != null || rawdate != '' ? String(new Date(rawdate).getUTCMinutes()) : String(new Date().getUTCMinutes());
|
|
|
|
|
var seconds = rawdate != null || rawdate != '' ? String(new Date(rawdate).getUTCSeconds()) : String(new Date().getUTCSeconds());
|
|
|
|
|
var millisecond = rawdate != null || rawdate != '' ? String(new Date(rawdate).getUTCMilliseconds()) : String(new Date().getUTCMilliseconds());
|
|
|
|
|
var offset = rawdate != null || rawdate != '' ? String(new Date(rawdate).getTimezoneOffset()) : String(new Date().getTimezoneOffset());
|
|
|
|
|
if (day.length == 1) day = String("0" + day);
|
|
|
|
|
if (month.length == 1) month = String("0" + month);
|
|
|
|
|
offset = String(offset / 60);
|
|
|
|
|
if (offset.length == 1) offset = String("0" + offset);
|
|
|
|
|
|
|
|
|
|
switch (type) {
|
|
|
|
|
case "day":
|
|
|
|
|
return day;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case "month":
|
|
|
|
|
return month;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case "year":
|
|
|
|
|
return year;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case "stamp":
|
|
|
|
|
return String(year + "-" + month + "-" + day + " " + hour + ":" + minute + ":" + seconds + "." + millisecond + "-" + offset);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
return String(year + "-" + month + "-" + day);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
} //--------------------------
|
|
|
|
|
// event handlers
|
|
|
|
|
//--------------------------
|
|
|
|
|
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
return DateUtils;
|
|
|
|
|
}();
|
|
|
|
|
|
|
|
|
|
var _default = DateUtils;
|
|
|
|
|
exports.default = _default;
|
|
|
|
|
},{}],"../../../../node_modules/tiny-date-picker/dist/tiny-date-picker.js":[function(require,module,exports) {
|
|
|
|
|
var define;
|
|
|
|
|
var global = arguments[3];
|
|
|
|
|
(function (global, factory) {
|
|
|
|
@ -2453,6 +2541,8 @@ var _DataUtils = _interopRequireWildcard(require("./DataUtils"));
|
|
|
|
|
|
|
|
|
|
var DataEvent = _interopRequireWildcard(require("../events/DataEvent"));
|
|
|
|
|
|
|
|
|
|
var _DateUtils = _interopRequireDefault(require("./DateUtils"));
|
|
|
|
|
|
|
|
|
|
var _tinyDatePicker = _interopRequireDefault(require("tiny-date-picker"));
|
|
|
|
|
|
|
|
|
|
var _caretPos = require("caret-pos");
|
|
|
|
@ -2479,10 +2569,17 @@ function () {
|
|
|
|
|
this.setInputs();
|
|
|
|
|
hljs.initHighlightingOnLoad();
|
|
|
|
|
this.dataUtils = new _DataUtils.default();
|
|
|
|
|
this.dateUtils = new _DateUtils.default();
|
|
|
|
|
this.url = '';
|
|
|
|
|
(0, _tinyDatePicker.default)(document.getElementById('option-date', {
|
|
|
|
|
mode: 'dp-modal'
|
|
|
|
|
}));
|
|
|
|
|
var self = this;
|
|
|
|
|
this.dp = (0, _tinyDatePicker.default)('input');
|
|
|
|
|
(0, _tinyDatePicker.default)(document.getElementById('option-date'), {
|
|
|
|
|
mode: 'dp-below',
|
|
|
|
|
format: function format(date) {
|
|
|
|
|
//return date;
|
|
|
|
|
return self.dateUtils.getDate('origin', date);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
window.addEventListener("scroll", function (f) {
|
|
|
|
|
var fixLimit = document.getElementById('header').offsetHeight + document.getElementById('entry-header').offsetHeight + document.getElementById('entry-feature').offsetHeight;
|
|
|
|
|
|
|
|
|
@ -2635,7 +2732,7 @@ function () {
|
|
|
|
|
|
|
|
|
|
var _default = TextEditor;
|
|
|
|
|
exports.default = _default;
|
|
|
|
|
},{"./DataUtils":"tools/utilities/DataUtils.jsx","../events/DataEvent":"tools/events/DataEvent.jsx","tiny-date-picker":"../../../../node_modules/tiny-date-picker/dist/tiny-date-picker.js","caret-pos":"../../../../node_modules/caret-pos/lib/esm2015/main.js"}],"controllers/DashEntry.jsx":[function(require,module,exports) {
|
|
|
|
|
},{"./DataUtils":"tools/utilities/DataUtils.jsx","../events/DataEvent":"tools/events/DataEvent.jsx","./DateUtils":"tools/utilities/DateUtils.jsx","tiny-date-picker":"../../../../node_modules/tiny-date-picker/dist/tiny-date-picker.js","caret-pos":"../../../../node_modules/caret-pos/lib/esm2015/main.js"}],"controllers/DashEntry.jsx":[function(require,module,exports) {
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
|
|
|