|
|
@ -5615,6 +5615,10 @@ function () {
|
|
|
|
function DBUtils() {
|
|
|
|
function DBUtils() {
|
|
|
|
_classCallCheck(this, DBUtils);
|
|
|
|
_classCallCheck(this, DBUtils);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* NOTE: DB ERRORS REPLICATE.
|
|
|
|
|
|
|
|
* WHEN FIXING A BUG, FIX DATA WITH JSON BACKUP
|
|
|
|
|
|
|
|
*/
|
|
|
|
this.dataUtils = new _DataUtils.default();
|
|
|
|
this.dataUtils = new _DataUtils.default();
|
|
|
|
this.db = new _dexie.default("fipamo_posts");
|
|
|
|
this.db = new _dexie.default("fipamo_posts");
|
|
|
|
this.db.version(1).stores({
|
|
|
|
this.db.version(1).stores({
|
|
|
@ -5645,6 +5649,7 @@ function () {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
});
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
//console.log("UPDATED", postData);
|
|
|
|
self.db.postList.update(Number(id), {
|
|
|
|
self.db.postList.update(Number(id), {
|
|
|
|
post: postData
|
|
|
|
post: postData
|
|
|
|
}).then(function (updated) {}).catch(function (e) {
|
|
|
|
}).then(function (updated) {}).catch(function (e) {
|
|
|
@ -8604,6 +8609,8 @@ var _DateUtils = _interopRequireDefault(require("../../../../../brain/tools/util
|
|
|
|
|
|
|
|
|
|
|
|
var DataEvent = _interopRequireWildcard(require("../../../../../brain/tools/events/DataEvent"));
|
|
|
|
var DataEvent = _interopRequireWildcard(require("../../../../../brain/tools/events/DataEvent"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var _DBUtils = _interopRequireDefault(require("../../../../../brain/tools/utilities/DBUtils"));
|
|
|
|
|
|
|
|
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
|
|
|
|
|
|
|
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
|
|
|
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
|
|
|
@ -8625,6 +8632,7 @@ function () {
|
|
|
|
|
|
|
|
|
|
|
|
this.dataUtils = new _DataUtils.default();
|
|
|
|
this.dataUtils = new _DataUtils.default();
|
|
|
|
this.dateUtils = new _DateUtils.default();
|
|
|
|
this.dateUtils = new _DateUtils.default();
|
|
|
|
|
|
|
|
this.dbutils = new _DBUtils.default();
|
|
|
|
} //--------------------------
|
|
|
|
} //--------------------------
|
|
|
|
// methods
|
|
|
|
// methods
|
|
|
|
//--------------------------
|
|
|
|
//--------------------------
|
|
|
@ -8640,7 +8648,9 @@ function () {
|
|
|
|
for (var index = 0; index < items.length; index++) {
|
|
|
|
for (var index = 0; index < items.length; index++) {
|
|
|
|
navData.push({
|
|
|
|
navData.push({
|
|
|
|
title: items[index].getElementsByTagName('label')[0].innerHTML,
|
|
|
|
title: items[index].getElementsByTagName('label')[0].innerHTML,
|
|
|
|
slug: items[index].id
|
|
|
|
id: items[index].id,
|
|
|
|
|
|
|
|
slug: items[index].getAttribute('data-slug'),
|
|
|
|
|
|
|
|
uuid: items[index].getAttribute('data-uuid')
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -8652,6 +8662,18 @@ function () {
|
|
|
|
reject(err);
|
|
|
|
reject(err);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}, {
|
|
|
|
|
|
|
|
key: "removeItem",
|
|
|
|
|
|
|
|
value: function removeItem(id) {
|
|
|
|
|
|
|
|
var self = this;
|
|
|
|
|
|
|
|
this.dbutils.getPost(id).then(function (post) {
|
|
|
|
|
|
|
|
post.post.page = "false";
|
|
|
|
|
|
|
|
self.dbutils.modify(id, post.post).then(function (r) {
|
|
|
|
|
|
|
|
document.getElementById('nav-pages').removeChild(document.getElementById(id));
|
|
|
|
|
|
|
|
self.save();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
} //--------------------------
|
|
|
|
} //--------------------------
|
|
|
|
// event handlers
|
|
|
|
// event handlers
|
|
|
|
//--------------------------
|
|
|
|
//--------------------------
|
|
|
@ -8662,7 +8684,7 @@ function () {
|
|
|
|
}();
|
|
|
|
}();
|
|
|
|
|
|
|
|
|
|
|
|
exports.default = NavActions;
|
|
|
|
exports.default = NavActions;
|
|
|
|
},{"../../../../../brain//tools/utilities/DataUtils":"../../../../brain/tools/utilities/DataUtils.js","../../../../../brain//tools/utilities/StringUtils":"../../../../brain/tools/utilities/StringUtils.js","../../../../../brain/tools/utilities/DateUtils":"../../../../brain/tools/utilities/DateUtils.js","../../../../../brain/tools/events/DataEvent":"../../../../brain/tools/events/DataEvent.js"}],"controllers/NavIndex.js":[function(require,module,exports) {
|
|
|
|
},{"../../../../../brain//tools/utilities/DataUtils":"../../../../brain/tools/utilities/DataUtils.js","../../../../../brain//tools/utilities/StringUtils":"../../../../brain/tools/utilities/StringUtils.js","../../../../../brain/tools/utilities/DateUtils":"../../../../brain/tools/utilities/DateUtils.js","../../../../../brain/tools/events/DataEvent":"../../../../brain/tools/events/DataEvent.js","../../../../../brain/tools/utilities/DBUtils":"../../../../brain/tools/utilities/DBUtils.js"}],"controllers/NavIndex.js":[function(require,module,exports) {
|
|
|
|
"use strict";
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
|
@ -8676,6 +8698,8 @@ var _DataUtils = _interopRequireWildcard(require("../../../../../brain/tools/uti
|
|
|
|
|
|
|
|
|
|
|
|
var DataEvent = _interopRequireWildcard(require("../../../../../brain/tools/events/DataEvent"));
|
|
|
|
var DataEvent = _interopRequireWildcard(require("../../../../../brain/tools/events/DataEvent"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var _DBUtils = _interopRequireDefault(require("../../../../../brain/tools/utilities/DBUtils"));
|
|
|
|
|
|
|
|
|
|
|
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
|
|
|
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
|
|
|
|
|
|
|
|
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
@ -8697,6 +8721,7 @@ function () {
|
|
|
|
|
|
|
|
|
|
|
|
this.start();
|
|
|
|
this.start();
|
|
|
|
this.dataUtils = new _DataUtils.default();
|
|
|
|
this.dataUtils = new _DataUtils.default();
|
|
|
|
|
|
|
|
this.dbutils = new _DBUtils.default();
|
|
|
|
} //--------------------------
|
|
|
|
} //--------------------------
|
|
|
|
// methods
|
|
|
|
// methods
|
|
|
|
//--------------------------
|
|
|
|
//--------------------------
|
|
|
@ -8705,6 +8730,8 @@ function () {
|
|
|
|
_createClass(NavIndex, [{
|
|
|
|
_createClass(NavIndex, [{
|
|
|
|
key: "start",
|
|
|
|
key: "start",
|
|
|
|
value: function start() {
|
|
|
|
value: function start() {
|
|
|
|
|
|
|
|
var _this = this;
|
|
|
|
|
|
|
|
|
|
|
|
var self = this;
|
|
|
|
var self = this;
|
|
|
|
var menu = Sortable.create(document.getElementById("nav-pages"), {
|
|
|
|
var menu = Sortable.create(document.getElementById("nav-pages"), {
|
|
|
|
onUpdate: function onUpdate(e) {
|
|
|
|
onUpdate: function onUpdate(e) {
|
|
|
@ -8715,17 +8742,40 @@ function () {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
var nav = document.querySelectorAll('.nav-btn');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (var i = 0, length = nav.length; i < length; i++) {
|
|
|
|
|
|
|
|
nav[i].addEventListener('click', function (e) {
|
|
|
|
|
|
|
|
return _this.handleNavButton(e);
|
|
|
|
|
|
|
|
}, false);
|
|
|
|
|
|
|
|
}
|
|
|
|
} //--------------------------
|
|
|
|
} //--------------------------
|
|
|
|
// event handlers
|
|
|
|
// event handlers
|
|
|
|
//--------------------------
|
|
|
|
//--------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, {
|
|
|
|
|
|
|
|
key: "handleNavButton",
|
|
|
|
|
|
|
|
value: function handleNavButton(e) {
|
|
|
|
|
|
|
|
var self = this;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch (e.target.id) {
|
|
|
|
|
|
|
|
case "remove-item":
|
|
|
|
|
|
|
|
var id = e.target.getAttribute('data-id');
|
|
|
|
|
|
|
|
new _NavActions.default().removeItem(id);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case "edit-item":
|
|
|
|
|
|
|
|
console.log("EDIT STUFF");
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}]);
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
|
|
return NavIndex;
|
|
|
|
return NavIndex;
|
|
|
|
}();
|
|
|
|
}();
|
|
|
|
|
|
|
|
|
|
|
|
exports.default = NavIndex;
|
|
|
|
exports.default = NavIndex;
|
|
|
|
},{"../actions/NavActions":"actions/NavActions.js","../../../../../brain/tools/utilities/DataUtils":"../../../../brain/tools/utilities/DataUtils.js","../../../../../brain/tools/events/DataEvent":"../../../../brain/tools/events/DataEvent.js"}],"controllers/DashManager.js":[function(require,module,exports) {
|
|
|
|
},{"../actions/NavActions":"actions/NavActions.js","../../../../../brain/tools/utilities/DataUtils":"../../../../brain/tools/utilities/DataUtils.js","../../../../../brain/tools/events/DataEvent":"../../../../brain/tools/events/DataEvent.js","../../../../../brain/tools/utilities/DBUtils":"../../../../brain/tools/utilities/DBUtils.js"}],"controllers/DashManager.js":[function(require,module,exports) {
|
|
|
|
"use strict";
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
|
|