diff --git a/.eslintrc.js b/.eslintrc.js
new file mode 100644
index 0000000..e76d484
--- /dev/null
+++ b/.eslintrc.js
@@ -0,0 +1,29 @@
+module.exports = {
+ "env": {
+ "browser": true,
+ "commonjs": true,
+ "es6": true
+ },
+ "extends": "eslint:recommended",
+ "parserOptions": {
+ "sourceType": "module"
+ },
+ "rules": {
+ "indent": [
+ "error",
+ "space"
+ ],
+ "linebreak-style": [
+ "error",
+ "unix"
+ ],
+ "quotes": [
+ "error",
+ "double"
+ ],
+ "semi": [
+ "error",
+ "never"
+ ]
+ }
+};
\ No newline at end of file
diff --git a/.idea/eslintPlugin.xml b/.idea/eslintPlugin.xml
new file mode 100644
index 0000000..0846c46
--- /dev/null
+++ b/.idea/eslintPlugin.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..c6cc8c8
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml
new file mode 100644
index 0000000..3b31283
--- /dev/null
+++ b/.idea/inspectionProfiles/profiles_settings.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/jsLibraryMappings.xml b/.idea/jsLibraryMappings.xml
new file mode 100644
index 0000000..a81b906
--- /dev/null
+++ b/.idea/jsLibraryMappings.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/vue_table_node_modules.xml b/.idea/libraries/vue_table_node_modules.xml
new file mode 100644
index 0000000..778cbe1
--- /dev/null
+++ b/.idea/libraries/vue_table_node_modules.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..28a804d
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..efc198a
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vue-table.iml b/.idea/vue-table.iml
new file mode 100644
index 0000000..966d3fe
--- /dev/null
+++ b/.idea/vue-table.iml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
new file mode 100644
index 0000000..4cbf69b
--- /dev/null
+++ b/.idea/workspace.xml
@@ -0,0 +1,775 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Code quality toolsJavaScript
+
+
+ JavaScript
+
+
+
+
+ AngularJS
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..dca1056
--- /dev/null
+++ b/index.html
@@ -0,0 +1,20 @@
+
+
+
+
+ Notes | coligo.io
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/main.js b/main.js
new file mode 100644
index 0000000..6fed61d
--- /dev/null
+++ b/main.js
@@ -0,0 +1,9 @@
+import Vue from 'vue'
+import store from './vuex/store'
+import App from './src/components/AppTable.vue'
+
+new Vue({
+ store, // inject store to all children
+ el: 'body',
+ components: { App }
+})
diff --git a/package.json b/package.json
index 25d8c86..b499203 100644
--- a/package.json
+++ b/package.json
@@ -2,15 +2,21 @@
"name": "vuetable",
"version": "1.4.1",
"description": "vue.js table component that will automatically request JSON data from server and display them nicely in HTML table with swap-able/extensible pagination component",
- "main": "dist/vue-table.js",
+ "main": "index.js",
"dependencies": {
"vue": "~1.0.21",
- "vue-resource": "~0.7"
+ "vue-resource": "~0.7",
+ "vuex": "^0.6.2",
+
+ "bootstrap-sweetalert": "1.0.1",
+ "moment": "^2.13.0"
},
"directories": {
"example": "examples"
},
"scripts": {
+ "dev": "webpack-dev-server --inline --hot",
+ "build": "webpack -p",
"test": "echo \"Error: no test specified\" && exit 1"
},
"browserify": {
@@ -28,7 +34,9 @@
"table",
"component",
"json",
- "pagination"
+ "pagination",
+ "vuex",
+ "notes"
],
"author": "Rati Wannapanop ",
"license": "MIT",
@@ -37,13 +45,26 @@
},
"homepage": "https://github.com/ratiw/vue-table#readme",
"devDependencies": {
- "babel-core": "^6.9.1",
- "babel-plugin-transform-runtime": "^6.9.0",
- "babel-preset-es2015": "^6.9.0",
- "babel-runtime": "^6.9.2",
"browserify": "13.0.1",
"uglify-js": "^2.6.2",
"vueify": "^8.5.4",
- "watchify": "3.7.0"
+ "watchify": "3.7.0",
+ "babel-core": "^6.7.6",
+ "babel-loader": "^6.2.4",
+ "babel-plugin-transform-runtime": "^6.7.5",
+ "babel-preset-es2015": "^6.6.0",
+ "babel-runtime": "^5.8.38",
+ "css-loader": "^0.23.1",
+ "vue-hot-reload-api": "^1.3.2",
+ "vue-html-loader": "^1.2.2",
+ "vue-loader": "^8.2.3",
+ "vue-style-loader": "^1.0.0",
+ "webpack": "^1.12.15",
+ "webpack-dev-server": "^1.14.1"
}
+
+
+
+
+
}
diff --git a/src/components/App.vue b/src/components/App.vue
new file mode 100644
index 0000000..b2e68dc
--- /dev/null
+++ b/src/components/App.vue
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/components/AppTable.vue b/src/components/AppTable.vue
new file mode 100644
index 0000000..3a25987
--- /dev/null
+++ b/src/components/AppTable.vue
@@ -0,0 +1,294 @@
+
+
+
+
+
+
diff --git a/src/components/CustomAction.vue b/src/components/CustomAction.vue
new file mode 100644
index 0000000..232fec3
--- /dev/null
+++ b/src/components/CustomAction.vue
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/components/Editor.vue b/src/components/Editor.vue
new file mode 100644
index 0000000..b72bd3b
--- /dev/null
+++ b/src/components/Editor.vue
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
diff --git a/src/components/MyNav.vue b/src/components/MyNav.vue
new file mode 100644
index 0000000..9cf032c
--- /dev/null
+++ b/src/components/MyNav.vue
@@ -0,0 +1,38 @@
+
+
+
+
+
diff --git a/src/components/NotesList.vue b/src/components/NotesList.vue
new file mode 100644
index 0000000..472c073
--- /dev/null
+++ b/src/components/NotesList.vue
@@ -0,0 +1,70 @@
+
+
+
+
+
diff --git a/src/components/Toolbar.vue b/src/components/Toolbar.vue
new file mode 100644
index 0000000..436a535
--- /dev/null
+++ b/src/components/Toolbar.vue
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/components/Vuetable.vue b/src/components/Vuetable.vue
index a20c0ee..3be90d4 100644
--- a/src/components/Vuetable.vue
+++ b/src/components/Vuetable.vue
@@ -781,6 +781,7 @@ export default {
this.loadData()
},
'vuetable:refresh': function() {
+ debugger
this.currentPage = 1
this.loadData()
},
diff --git a/src/components/VuetableSearchToolBar.vue b/src/components/VuetableSearchToolBar.vue
new file mode 100644
index 0000000..1b03290
--- /dev/null
+++ b/src/components/VuetableSearchToolBar.vue
@@ -0,0 +1,105 @@
+
+
+
+
+
diff --git a/src/components/VuetableSettingsModal.vue b/src/components/VuetableSettingsModal.vue
new file mode 100644
index 0000000..4b82544
--- /dev/null
+++ b/src/components/VuetableSettingsModal.vue
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/styles.css b/styles.css
new file mode 100755
index 0000000..4ad28dd
--- /dev/null
+++ b/styles.css
@@ -0,0 +1,89 @@
+@import url(https://fonts.googleapis.com/css?family=Raleway:400,300);
+
+html, #app {
+ height: 100%;
+}
+
+body {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ height: 100%;
+ max-height: 100%;
+ position: relative;
+}
+
+#toolbar {
+ float: left;
+ width: 80px;
+ height: 100%;
+ background-color: #30414D;
+ color: #767676;
+ padding: 35px 25px 25px 25px;
+}
+
+#notes-list {
+ float: left;
+ width: 300px;
+ height: 100%;
+ background-color: #F5F5F5;
+ font-family: 'Raleway', sans-serif;
+ font-weight: 400;
+}
+
+#list-header {
+ padding: 5px 25px 25px 25px;
+}
+
+#list-header h2 {
+ font-weight: 300;
+ text-transform: uppercase;
+ text-align: center;
+ font-size: 22px;
+ padding-bottom: 8px;
+}
+
+#notes-list .container {
+ height: calc(100% - 137px);
+ max-height: calc(100% - 137px);
+ overflow: auto;
+ width: 100%;
+ padding: 0;
+}
+
+#notes-list .container .list-group-item {
+ border: 0;
+ border-radius: 0;
+}
+
+.list-group-item-heading {
+ font-weight: 300;
+ font-size: 15px;
+}
+
+#note-editor {
+ height: 100%;
+ margin-left: 380px;
+}
+
+#note-editor textarea {
+ height: 100%;
+ border: 0;
+ border-radius: 0;
+}
+
+#toolbar i {
+ font-size: 30px;
+ margin-bottom: 35px;
+ cursor: pointer;
+ opacity: 0.8;
+ transition: opacity 0.5s ease;
+}
+
+#toolbar i:hover {
+ opacity: 1;
+}
+
+.starred {
+ color: #F7AE4F;
+}
diff --git a/vuex/actions.js b/vuex/actions.js
new file mode 100644
index 0000000..6cfcd75
--- /dev/null
+++ b/vuex/actions.js
@@ -0,0 +1,19 @@
+export const addNote = ({ dispatch }) => {
+ dispatch('ADD_NOTE')
+}
+
+export const editNote = ({ dispatch }, e) => {
+ dispatch('EDIT_NOTE', e.target.value)
+}
+
+export const deleteNote = ({ dispatch }) => {
+ dispatch('DELETE_NOTE')
+}
+
+export const updateActiveNote = ({ dispatch }, note) => {
+ dispatch('SET_ACTIVE_NOTE', note)
+}
+
+export const toggleFavorite = ({ dispatch }) => {
+ dispatch('TOGGLE_FAVORITE')
+}
diff --git a/vuex/store.js b/vuex/store.js
new file mode 100644
index 0000000..98a3123
--- /dev/null
+++ b/vuex/store.js
@@ -0,0 +1,44 @@
+import Vue from 'vue'
+import Vuex from 'vuex'
+import VueResource from 'vue-resource'
+
+Vue.use(Vuex)
+Vue.use(VueResource)
+
+const state = {
+ notes: [],
+ activeNote: {}
+}
+
+const mutations = {
+ ADD_NOTE (state) {
+ const newNote = {
+ text: 'New note',
+ favorite: false
+ }
+ state.notes.push(newNote)
+ state.activeNote = newNote
+ },
+
+ EDIT_NOTE (state, text) {
+ state.activeNote.text = text
+ },
+
+ DELETE_NOTE (state) {
+ state.notes.$remove(state.activeNote)
+ state.activeNote = state.notes[0]
+ },
+
+ TOGGLE_FAVORITE (state) {
+ state.activeNote.favorite = !state.activeNote.favorite
+ },
+
+ SET_ACTIVE_NOTE (state, note) {
+ state.activeNote = note
+ }
+}
+
+export default new Vuex.Store({
+ state,
+ mutations
+})
diff --git a/webpack.config.js b/webpack.config.js
new file mode 100644
index 0000000..0c9fe90
--- /dev/null
+++ b/webpack.config.js
@@ -0,0 +1,24 @@
+module.exports = {
+ entry: './main.js',
+ output: {
+ path: __dirname,
+ filename: 'build.js'
+ },
+ module: {
+ loaders: [
+ {
+ test: /\.js$/,
+ loader: 'babel',
+ exclude: /node_modules/
+ },
+ {
+ test: /\.vue$/,
+ loader: 'vue'
+ }
+ ]
+ },
+ babel: {
+ presets: ['es2015'],
+ plugins: ['transform-runtime']
+ }
+}