From 6f44568716a8ccc999f246eb7571383ea8c75734 Mon Sep 17 00:00:00 2001 From: Jack Kerr Date: Wed, 25 May 2016 15:40:26 +1000 Subject: [PATCH] removed uneeded hack --- web/edit.jsp | 5 ----- web/js/edit.js | 13 ++++++------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/web/edit.jsp b/web/edit.jsp index 9384b32..7549521 100644 --- a/web/edit.jsp +++ b/web/edit.jsp @@ -34,11 +34,6 @@ -<%--Hack to get saving working--%> - - <%@include file="includes/bootstrapjs.jsp" %> diff --git a/web/js/edit.js b/web/js/edit.js index e724fd4..2b6ba75 100644 --- a/web/js/edit.js +++ b/web/js/edit.js @@ -1,7 +1,8 @@ -var editor; -var filename; -var locationPath; $(document).ready(function(){ + var editor; + var filename; + var locationPath; + var params = common.getParameters(); filename = decodeURIComponent(params.filename); locationPath = decodeURIComponent(params.pwd) + '/' + filename; @@ -65,15 +66,13 @@ $(document).ready(function(){ function saveFile(){ var fileData = editor.getValue(); - $('#hiddenArea').val(fileData); - var secretForm = $('#saveForm'); $.ajax({ type: "POST", url: common.buildUrl('./raw', {path: locationPath}), - data: {"contents": secretForm.serializeArray()[0].value}, + data: {"contents": fileData}, success: function () { - alert('done'); + alert('File has been saved'); } }); }