diff --git a/app/app.js b/app/app.js
index f24ef96..f4e92b8 100644
--- a/app/app.js
+++ b/app/app.js
@@ -99,7 +99,7 @@ var app = new Vue({
mounted()
{
- //this.loadFromStorage();
+ this.loadFromStorage();
// Set the "current" main navigation item based on the current route.
this.selectMenuItemForCurrentUrl();
@@ -184,6 +184,16 @@ var app = new Vue({
},
+ saveResume: function()
+ {
+ var response = confirm("Resume saved");
+
+ helpers.setLocalStorage("sections", this.$root.sections);
+
+ alert("Resume saved");
+ return false;
+ },
+
/**
* Open the sidebar on smaller screens.
@@ -508,12 +518,13 @@ var app = new Vue({
$data: {
handler: function(val, oldVal)
{
- // Save the data to localStorage
- //NOTE: I'm initially not concerned about performance here.
- if (val.status == "loaded")
- {
- helpers.setLocalStorage("sections", val.sections);
- }
+ //TODO: Disbled
+ // // Save the data to localStorage
+ // //NOTE: I'm initially not concerned about performance here.
+ // if (val.status == "loaded")
+ // {
+ // helpers.setLocalStorage("sections", val.sections);
+ // }
},
deep: true
}
diff --git a/components/import.js b/components/import.js
index 4bd1d8f..d8abffd 100644
--- a/components/import.js
+++ b/components/import.js
@@ -34,6 +34,8 @@ var importComponent = {
var data = JSON.parse(this.json);
this.$root.populateSections(data);
+
+ helpers.setLocalStorage("sections", this.$root.sections);
},
diff --git a/components/preview_single_field.js b/components/preview_single_field.js
index a87ea6d..f7ac1b8 100644
--- a/components/preview_single_field.js
+++ b/components/preview_single_field.js
@@ -14,7 +14,7 @@ Vue.component("preview-field", {
mounted: function()
{
-
+ this.displayFormat = (this.format ? this.format : "");
},
@@ -29,6 +29,7 @@ Vue.component("preview-field", {
data: function()
{
return {
+ displayFormat: "", // Refine the "format" so we don't mutate the prop.
item: {}
};
},
@@ -36,21 +37,41 @@ Vue.component("preview-field", {
methods: {
+ getLabel: function()
+ {
+ return (this.label ? this.label : " ");
+ },
+
getValue: function()
{
// Return the value formatted.
- if (this.format == "url")
+ if (this.displayFormat == "url")
{
return "" + this.value + "";
}
- if (this.format == "multi-line")
+ if (this.displayFormat == "email")
+ {
+ return "" + this.value + "";
+ }
+
+ if (this.displayFormat == "phone")
+ {
+ return "" + this.value + "";
+ }
+
+ if (this.displayFormat == "multi-line")
{
return this.replaceLineBreaks(this.value);
}
- return this.value;
+ if (this.displayFormat == "image")
+ {
+ return "";
+ }
+
+ return (this.value ? this.value : " ");
},
diff --git a/index.html b/index.html
index e1b6216..a95a6b3 100644
--- a/index.html
+++ b/index.html
@@ -55,9 +55,13 @@