diff --git a/settings.json.template b/settings.json.template index 04c097517..4b18d7800 100644 --- a/settings.json.template +++ b/settings.json.template @@ -101,5 +101,5 @@ "loglevel": "INFO", // restrict socket.io transport methods - "socketTransportProtocols" : ['xhr-polling', 'jsonp-polling', 'htmlfile'] + "socketTransportProtocols" : ["xhr-polling", "jsonp-polling", "htmlfile"] } diff --git a/src/locales/en.json b/src/locales/en.json index 37e07a154..15feae644 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -1 +1,113 @@ -{"index.newPad":"New Pad","index.createOpenPad":"or create/open a Pad with the name:","pad.toolbar.bold.title":"Bold (Ctrl-B)","pad.toolbar.italic.title":"Italic (Ctrl-I)","pad.toolbar.underline.title":"Underline (Ctrl-U)","pad.toolbar.strikethrough.title":"Strikethrough","pad.toolbar.ol.title":"Ordered list","pad.toolbar.ul.title":"Unordered List","pad.toolbar.indent.title":"Indent","pad.toolbar.unindent.title":"Outdent","pad.toolbar.undo.title":"Undo (Ctrl-Z)","pad.toolbar.redo.title":"Redo (Ctrl-Y)","pad.toolbar.clearAuthorship.title":"Clear Authorship Colors","pad.toolbar.import_export.title":"Import/Export from/to different file formats","pad.toolbar.timeslider.title":"Timeslider","pad.toolbar.savedRevision.title":"Saved Revisions","pad.toolbar.settings.title":"Settings","pad.toolbar.embed.title":"Embed this pad","pad.toolbar.showusers.title":"Show the users on this pad","pad.colorpicker.save":"Save","pad.colorpicker.cancel":"Cancel","pad.loading":"Loading...","pad.passwordRequired":"You need a password to access this pad","pad.permissionDenied":"You do not have permission to access this pad","pad.wrongPassword":"Your password was wrong","pad.settings.padSettings":"Pad Settings","pad.settings.myView":"My View","pad.settings.stickychat":"Chat always on screen","pad.settings.colorcheck":"Authorship colors","pad.settings.linenocheck":"Line numbers","pad.settings.fontType":"Font type:","pad.settings.fontType.normal":"Normal","pad.settings.fontType.monospaced":"Monospace","pad.settings.globalView":"Global View","pad.settings.language":"Language:","pad.importExport.import_export":"Import/Export","pad.importExport.import":"Upload any text file or document","pad.importExport.importSuccessful":"Successful!","pad.importExport.export":"Export current pad as:","pad.importExport.exporthtml":"HTML","pad.importExport.exportplain":"Plain text","pad.importExport.exportword":"Microsoft Word","pad.importExport.exportpdf":"PDF","pad.importExport.exportopen":"ODF (Open Document Format)","pad.importExport.exportdokuwiki":"DokuWiki","pad.importExport.abiword.innerHTML":"You only can import from plain text or html formats. For more advanced import features please install abiword.","pad.modals.connected":"Connected.","pad.modals.reconnecting":"Reconnecting to your pad..","pad.modals.forcereconnect":"Force reconnect","pad.modals.userdup":"Opened in another window","pad.modals.userdup.explanation":"This pad seems to be opened in more than one browser window on this computer.","pad.modals.userdup.advice":"Reconnect to use this window instead.","pad.modals.unauth":"Not authorized","pad.modals.unauth.explanation":"Your permissions have changed while viewing this page. Try to reconnect.","pad.modals.looping":"Disconnected.","pad.modals.looping.explanation":"There are communication problems with the synchronization server.","pad.modals.looping.cause":"Perhaps you connected through an incompatible firewall or proxy.","pad.modals.initsocketfail":"Server is unreachable.","pad.modals.initsocketfail.explanation":"Couldn't connect to the synchronization server.","pad.modals.initsocketfail.cause":"This is probably due to a problem with your browser or your internet connection.","pad.modals.slowcommit":"Disconnected.","pad.modals.slowcommit.explanation":"The server is not responding.","pad.modals.slowcommit.cause":"This could be due to problems with network connectivity.","pad.modals.deleted":"Deleted.","pad.modals.deleted.explanation":"This pad has been removed.","pad.modals.disconnected":"You have been disconnected.","pad.modals.disconnected.explanation":"The connection to the server was lost","pad.modals.disconnected.cause":"The server may be unavailable. Please notify us if this continues to happen.","pad.share":"Share this pad","pad.share.readonly":"Read only","pad.share.link":"Link","pad.share.emebdcode":"Embed URL","pad.chat":"Chat","pad.chat.title":"Open the chat for this pad.","pad.chat.loadmessages": "Load more messages","timeslider.pageTitle":"{{appTitle}} Timeslider","timeslider.toolbar.returnbutton":"Return to pad","timeslider.toolbar.authors":"Authors:","timeslider.toolbar.authorsList":"No Authors","timeslider.toolbar.exportlink.title":"Export","timeslider.exportCurrent":"Export current version as:","timeslider.version":"Version {{version}}","timeslider.saved":"Saved {{month}} {{day}}, {{year}}","timeslider.dateformat":"{{month}}/{{day}}/{{year}} {{hours}}:{{minutes}}:{{seconds}}","timeslider.month.january":"January","timeslider.month.february":"February","timeslider.month.march":"March","timeslider.month.april":"April","timeslider.month.may":"May","timeslider.month.june":"June","timeslider.month.july":"July","timeslider.month.august":"August","timeslider.month.september":"September","timeslider.month.october":"October","timeslider.month.november":"November","timeslider.month.december":"December","pad.savedrevs.marked":"This revision is now marked as a saved revision","pad.userlist.entername":"Enter your name","pad.userlist.unnamed":"unnamed","pad.userlist.guest":"Guest","pad.userlist.deny":"Deny","pad.userlist.approve":"Approve","pad.editbar.clearcolors":"Clear authorship colors on entire document?","pad.impexp.importbutton":"Import Now","pad.impexp.importing":"Importing...","pad.impexp.confirmimport":"Importing a file will overwrite the current text of the pad. Are you sure you want to proceed?","pad.impexp.convertFailed":"We were not able to import this file. Please use a different document format or copy paste manually","pad.impexp.uploadFailed":"The upload failed, please try again","pad.impexp.importfailed":"Import failed","pad.impexp.copypaste":"Please copy paste","pad.impexp.exportdisabled":"Exporting as {{type}} format is disabled. Please contact your system administrator for details."} \ No newline at end of file +{ + "index.newPad": "New Pad", + "index.createOpenPad": "or create/open a Pad with the name:", + "pad.toolbar.bold.title": "Bold (Ctrl-B)", + "pad.toolbar.italic.title": "Italic (Ctrl-I)", + "pad.toolbar.underline.title": "Underline (Ctrl-U)", + "pad.toolbar.strikethrough.title": "Strikethrough", + "pad.toolbar.ol.title": "Ordered list", + "pad.toolbar.ul.title": "Unordered List", + "pad.toolbar.indent.title": "Indent", + "pad.toolbar.unindent.title": "Outdent", + "pad.toolbar.undo.title": "Undo (Ctrl-Z)", + "pad.toolbar.redo.title": "Redo (Ctrl-Y)", + "pad.toolbar.clearAuthorship.title": "Clear Authorship Colors", + "pad.toolbar.import_export.title": "Import/Export from/to different file formats", + "pad.toolbar.timeslider.title": "Timeslider", + "pad.toolbar.savedRevision.title": "Saved Revisions", + "pad.toolbar.settings.title": "Settings", + "pad.toolbar.embed.title": "Embed this pad", + "pad.toolbar.showusers.title": "Show the users on this pad", + "pad.colorpicker.save": "Save", + "pad.colorpicker.cancel": "Cancel", + "pad.loading": "Loading...", + "pad.passwordRequired": "You need a password to access this pad", + "pad.permissionDenied": "You do not have permission to access this pad", + "pad.wrongPassword": "Your password was wrong", + "pad.settings.padSettings": "Pad Settings", + "pad.settings.myView": "My View", + "pad.settings.stickychat": "Chat always on screen", + "pad.settings.colorcheck": "Authorship colors", + "pad.settings.linenocheck": "Line numbers", + "pad.settings.fontType": "Font type:", + "pad.settings.fontType.normal": "Normal", + "pad.settings.fontType.monospaced": "Monospace", + "pad.settings.globalView": "Global View", + "pad.settings.language": "Language:", + "pad.importExport.import_export": "Import/Export", + "pad.importExport.import": "Upload any text file or document", + "pad.importExport.importSuccessful": "Successful!", + "pad.importExport.export": "Export current pad as:", + "pad.importExport.exporthtml": "HTML", + "pad.importExport.exportplain": "Plain text", + "pad.importExport.exportword": "Microsoft Word", + "pad.importExport.exportpdf": "PDF", + "pad.importExport.exportopen": "ODF (Open Document Format)", + "pad.importExport.exportdokuwiki": "DokuWiki", + "pad.importExport.abiword.innerHTML": "You only can import from plain text or html formats. For more advanced import features please install abiword.", + "pad.modals.connected": "Connected.", + "pad.modals.reconnecting": "Reconnecting to your pad..", + "pad.modals.forcereconnect": "Force reconnect", + "pad.modals.userdup": "Opened in another window", + "pad.modals.userdup.explanation": "This pad seems to be opened in more than one browser window on this computer.", + "pad.modals.userdup.advice": "Reconnect to use this window instead.", + "pad.modals.unauth": "Not authorized", + "pad.modals.unauth.explanation": "Your permissions have changed while viewing this page. Try to reconnect.", + "pad.modals.looping": "Disconnected.", + "pad.modals.looping.explanation": "There are communication problems with the synchronization server.", + "pad.modals.looping.cause": "Perhaps you connected through an incompatible firewall or proxy.", + "pad.modals.initsocketfail": "Server is unreachable.", + "pad.modals.initsocketfail.explanation": "Couldn't connect to the synchronization server.", + "pad.modals.initsocketfail.cause": "This is probably due to a problem with your browser or your internet connection.", + "pad.modals.slowcommit": "Disconnected.", + "pad.modals.slowcommit.explanation": "The server is not responding.", + "pad.modals.slowcommit.cause": "This could be due to problems with network connectivity.", + "pad.modals.deleted": "Deleted.", + "pad.modals.deleted.explanation": "This pad has been removed.", + "pad.modals.disconnected": "You have been disconnected.", + "pad.modals.disconnected.explanation": "The connection to the server was lost", + "pad.modals.disconnected.cause": "The server may be unavailable. Please notify us if this continues to happen.", + "pad.share": "Share this pad", + "pad.share.readonly": "Read only", + "pad.share.link": "Link", + "pad.share.emebdcode": "Embed URL", + "pad.chat": "Chat", + "pad.chat.title": "Open the chat for this pad.", + "pad.chat.loadmessages": "Load more messages", + "timeslider.pageTitle": "{{appTitle}} Timeslider", + "timeslider.toolbar.returnbutton": "Return to pad", + "timeslider.toolbar.authors": "Authors:", + "timeslider.toolbar.authorsList": "No Authors", + "timeslider.toolbar.exportlink.title": "Export", + "timeslider.exportCurrent": "Export current version as:", + "timeslider.version": "Version {{version}}", + "timeslider.saved": "Saved {{month}} {{day}}, {{year}}", + "timeslider.dateformat": "{{month}}/{{day}}/{{year}} {{hours}}:{{minutes}}:{{seconds}}", + "timeslider.month.january": "January", + "timeslider.month.february": "February", + "timeslider.month.march": "March", + "timeslider.month.april": "April", + "timeslider.month.may": "May", + "timeslider.month.june": "June", + "timeslider.month.july": "July", + "timeslider.month.august": "August", + "timeslider.month.september": "September", + "timeslider.month.october": "October", + "timeslider.month.november": "November", + "timeslider.month.december": "December", + "pad.savedrevs.marked": "This revision is now marked as a saved revision", + "pad.userlist.entername": "Enter your name", + "pad.userlist.unnamed": "unnamed", + "pad.userlist.guest": "Guest", + "pad.userlist.deny": "Deny", + "pad.userlist.approve": "Approve", + "pad.editbar.clearcolors": "Clear authorship colors on entire document?", + "pad.impexp.importbutton": "Import Now", + "pad.impexp.importing": "Importing...", + "pad.impexp.confirmimport": "Importing a file will overwrite the current text of the pad. Are you sure you want to proceed?", + "pad.impexp.convertFailed": "We were not able to import this file. Please use a different document format or copy paste manually", + "pad.impexp.uploadFailed": "The upload failed, please try again", + "pad.impexp.importfailed": "Import failed", + "pad.impexp.copypaste": "Please copy paste", + "pad.impexp.exportdisabled": "Exporting as {{type}} format is disabled. Please contact your system administrator for details." +} \ No newline at end of file diff --git a/src/node/handler/ImportHandler.js b/src/node/handler/ImportHandler.js index b87001416..ac856a604 100644 --- a/src/node/handler/ImportHandler.js +++ b/src/node/handler/ImportHandler.js @@ -176,7 +176,7 @@ exports.doImport = function(req, res, padId) ERR(err); //close the connection - res.send("
", 200); + res.send("", 200); }); } diff --git a/src/static/css/admin.css b/src/static/css/admin.css index b91850a65..0d9471268 100644 --- a/src/static/css/admin.css +++ b/src/static/css/admin.css @@ -7,18 +7,51 @@ body { background: -moz-radial-gradient(circle,#aaa,#eee 60%) center fixed; background: -ms-radial-gradient(circle,#aaa,#eee 60%) center fixed; background: -o-radial-gradient(circle,#aaa,#eee 60%) center fixed; - border-top: 8px solid rgba(51,51,51,.8); } -#wrapper { - margin-top: 160px; + +#topborder { + border-top: 8px solid rgba(51, 51, 51, 0.8); + position: fixed; + top: 0px; + width: 100%; +} + +div.menu { + background: none repeat scroll 0% 0% rgba(255, 255, 255, 0.75); + box-shadow: 0px -4px 4px rgba(0, 0, 0, 0.3); + display: block; + float: left; + height: 100%; + padding: 15px; + position: fixed; + width: 220px; +} + +div.menu li { + list-style: none; + margin-left: 3px; + line-height: 1.6 +} + +div.innerwrapper { + display: block; + float: right; + opacity: 0.9; padding: 15px; - background: #fff; - opacity: .9; - box-shadow: 0px 1px 8px rgba(0,0,0,0.3); - max-width: 700px; - margin: auto; + width: 860px; border-radius: 0 0 7px 7px; } + +#wrapper { + background: none repeat scroll 0px 0px #FFFFFF; + box-shadow: 0px 1px 8px rgba(0, 0, 0, 0.3); + margin: auto; + max-width: 1150px; + min-height: 100%; + overflow: auto; + padding-left: 15px; + opacity: .9; +} h1 { font-size: 29px; } @@ -53,9 +86,6 @@ input[type="button"].do-install, input[type="button"].do-uninstall { float: right; width: 100px; } -input[type="button"]#do-search { - display: block; -} input[type="text"] { border-radius: 3px; box-sizing: border-box; @@ -84,41 +114,9 @@ td, th { .template { display: none; } -.dialog { - display: none; +#progress { position: absolute; - left: 50%; - top: 50%; - width: 700px; - height: 500px; - margin-left: -350px; - margin-top: -250px; - border: 3px solid #999; - background: #eee; -} -.dialog .title { - margin: 0; - padding: 2px; - border-bottom: 3px solid #999; - font-size: 24px; - line-height: 24px; - height: 24px; - overflow: hidden; -} -.dialog .title .close { - float: right; - padding: 1px 10px; -} -.dialog .history { - background: #222; - color: #eee; - position: absolute; - top: 41px; - bottom: 10px; - left: 10px; - right: 10px; - padding: 2px; - overflow: auto; + bottom: 50px; } .settings { margin-top:10px; @@ -128,3 +126,13 @@ td, th { #response{ display:inline; } + +a:link, a:visited, a:hover, a:focus { + color: #333333; + text-decoration: none; + border-bottom: #333333 1px dotted; +} + +a:focus, a:hover { + border-bottom: #333333 1px solid; +} \ No newline at end of file diff --git a/src/static/js/admin/plugins.js b/src/static/js/admin/plugins.js index ddff767bf..ed38fc4e7 100644 --- a/src/static/js/admin/plugins.js +++ b/src/static/js/admin/plugins.js @@ -25,10 +25,6 @@ $(document).ready(function () { } function updateHandlers() { - $("#progress.dialog .close").unbind('click').click(function () { - $("#progress.dialog").hide(); - }); - $("form").submit(function(){ var query = $('.search-results').data('query'); query.pattern = $("#search-query").val(); @@ -36,8 +32,8 @@ $(document).ready(function () { search(); return false; }); - - $("#do-search").unbind('click').click(function () { + + $("#search-query").unbind('keyup').keyup(function () { var query = $('.search-results').data('query'); query.pattern = $("#search-query").val(); query.offset = 0; @@ -47,13 +43,13 @@ $(document).ready(function () { $(".do-install").unbind('click').click(function (e) { var row = $(e.target).closest("tr"); doUpdate = true; - socket.emit("install", row.find(".name").html()); + socket.emit("install", row.find(".name").text()); }); $(".do-uninstall").unbind('click').click(function (e) { var row = $(e.target).closest("tr"); doUpdate = true; - socket.emit("uninstall", row.find(".name").html()); + socket.emit("uninstall", row.find(".name").text()); }); $(".do-prev-page").unbind('click').click(function (e) { @@ -77,32 +73,32 @@ $(document).ready(function () { updateHandlers(); socket.on('progress', function (data) { - if (data.progress > 0 && $('#progress.dialog').data('progress') > data.progress) return; + if (data.progress > 0 && $('#progress').data('progress') > data.progress) return; - $("#progress.dialog .close").hide(); - $("#progress.dialog").show(); + $("#progress").show(); - $('#progress.dialog').data('progress', data.progress); + $('#progress').data('progress', data.progress); var message = "Unknown status"; if (data.message) { - message = "" + data.message.toString() + ""; + message = data.message.toString(); } if (data.error) { - message = "" + data.error.toString() + ""; + data.progress = 1; } - $("#progress.dialog .message").html(message); - $("#progress.dialog .history").append("<%- plugins.formatPlugins().replace(", ","\n") %>+
<%= plugins.formatParts() %>+
<%- plugins.formatPlugins().replace(", ","\n") %>-
<%= plugins.formatParts() %>-