Browse Source

refactor: Removed old client page logic

pull/128/head
NGPixel 7 years ago
parent
commit
d590c67d50
4 changed files with 10 additions and 48 deletions
  1. 10
      .vscode/extensions.json
  2. 17
      client/js/pages/create.js
  3. 22
      client/js/pages/edit.js
  4. 9
      client/js/pages/history.js

10
.vscode/extensions.json

@ -0,0 +1,10 @@
{
"recommendations": [
"EditorConfig.editorconfig",
"dbaeumer.vscode-eslint",
"christian-kohler.path-intellisense",
"mrmlnc.vscode-puglint",
"robinbentley.sass-indented",
"octref.vetur"
]
}

17
client/js/pages/create.js

@ -1,17 +0,0 @@
'use strict'
import $ from 'jquery'
module.exports = (alerts, socket) => {
if ($('#page-type-create').length) {
let pageEntryPath = $('#page-type-create').data('entrypath')
// -> Discard
$('.btn-create-discard').on('click', (ev) => {
$('#modal-create-discard').toggleClass('is-active')
})
require('../components/editor.js')(alerts, pageEntryPath, socket)
}
}

22
client/js/pages/edit.js

@ -1,22 +0,0 @@
'use strict'
import $ from 'jquery'
module.exports = (alerts, socket) => {
if ($('#page-type-edit').length) {
let pageEntryPath = $('#page-type-edit').data('entrypath')
// let pageCleanExit = false
// -> Discard
$('.btn-edit-discard').on('click', (ev) => {
$('#modal-edit-discard').toggleClass('is-active')
})
// window.onbeforeunload = function () {
// return (pageCleanExit) ? true : 'Unsaved modifications will be lost. Are you sure you want to navigate away from this page?'
// }
require('../components/editor.js')(alerts, pageEntryPath, socket)
}
}

9
client/js/pages/history.js

@ -1,9 +0,0 @@
'use strict'
import $ from 'jquery'
module.exports = (alerts) => {
if ($('#page-type-history').length) {
// let currentBasePath = ($('#page-type-history').data('entrypath') !== 'home') ? $('#page-type-history').data('entrypath') : ''
}
}
Loading…
Cancel
Save