Moved save button; Added blurb for the Jr High Summer to the programs page; Fixed the page editor to ask if the user doesn't save the changes.
This commit is contained in:
@@ -25,13 +25,14 @@ Tracker.autorun(function() {
|
||||
Template.PageEditor.onCreated(function() {
|
||||
let template = this;
|
||||
|
||||
currentPath = FlowRouter.getRouteName();
|
||||
this.showSelectImageDialog = new ReactiveVar(false);
|
||||
this.pageName = new ReactiveVar();
|
||||
|
||||
this.saveChanges = function() {
|
||||
if(currentPath && currentPath !== FlowRouter.getRouteName()) {
|
||||
let data = this.$('.editor').val();
|
||||
let template = this;
|
||||
const pageName = this.pageName.get();
|
||||
|
||||
currentPath = FlowRouter.getRouteName();
|
||||
|
||||
@@ -54,7 +55,7 @@ Template.PageEditor.onCreated(function() {
|
||||
}).then(
|
||||
function(isConfirm) {
|
||||
if(isConfirm) {
|
||||
Meteor.call('updatePage', template.pageName.get(), changedData, function (error, result) {
|
||||
Meteor.call('updatePage', pageName, changedData, function (error, result) {
|
||||
if (error) sAlert.error(error);
|
||||
else sAlert.success("Content Saved Successfully");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user