diff --git a/web/documentserver-example/nodejs/app.js b/web/documentserver-example/nodejs/app.js index 815e8b83..7f3a1ded 100644 --- a/web/documentserver-example/nodejs/app.js +++ b/web/documentserver-example/nodejs/app.js @@ -384,7 +384,7 @@ app.get("/editor", function (req, res) { var lastname = req.query.lastname ? req.query.lastname : "Smith"; if (fileExt != null) { - var fileName = docManager.createDemo((req.query.create ? "new." : "sample.") + fileExt, userid, firstname + " " + lastname); + var fileName = docManager.createDemo((req.query.sample ? "sample." : "new.") + fileExt, userid, firstname + " " + lastname); var redirectPath = docManager.getProtocol() + "://" + docManager.req.get("host") + "/editor?fileName=" + encodeURIComponent(fileName) + docManager.getCustomParams(); res.redirect(redirectPath); diff --git a/web/documentserver-example/nodejs/public/images/file_upload.png b/web/documentserver-example/nodejs/public/images/file_upload.png new file mode 100644 index 00000000..5566e6dd Binary files /dev/null and b/web/documentserver-example/nodejs/public/images/file_upload.png differ diff --git a/web/documentserver-example/nodejs/public/javascripts/jscript.js b/web/documentserver-example/nodejs/public/javascripts/jscript.js index 2d07b542..e6deeb36 100644 --- a/web/documentserver-example/nodejs/public/javascripts/jscript.js +++ b/web/documentserver-example/nodejs/public/javascripts/jscript.js @@ -278,6 +278,18 @@ if (typeof jQuery != "undefined") { }); }); + jq("#createSample").click(function () { + jq(".try-editor").each(function () { + var href = jq(this).attr("href"); + if (jq("#createSample").is(":checked")) { + href += "&sample=true"; + } else { + href = href.replace("&sample=true", ""); + } + jq(this).attr("href", href); + }); + }); + jq.dropdownToggle({ switcherSelector: ".question", dropdownID: "hint" diff --git a/web/documentserver-example/nodejs/public/stylesheets/stylesheet.css b/web/documentserver-example/nodejs/public/stylesheets/stylesheet.css index 43d9e617..2e4e3620 100644 --- a/web/documentserver-example/nodejs/public/stylesheets/stylesheet.css +++ b/web/documentserver-example/nodejs/public/stylesheets/stylesheet.css @@ -99,11 +99,7 @@ pre.hljs { margin-top: 0px; } .save-original { - color: #929597; - line-height: 20px; - margin-left: 16px; - white-space: nowrap; - width: 272px; + margin-left: 30px; } label .checkbox { margin: 0 5px 3px 0; @@ -143,13 +139,13 @@ label .checkbox { .try-editor-list { list-style: none; - margin: 0; + margin: 0 0 16px; padding: 0; } .try-editor-list li { float: left; - margin: 25px; - width: 150px; + margin: 0 15px; + width: 100px; } .try-editor { background-color: transparent; @@ -172,7 +168,9 @@ label .checkbox { .try-editor.presentation { background-image: url("../images/file_pptx.png"); } - +.create-sample { + margin-left: 75px; +} .button, .button:visited, .button:hover, .button:active { display: inline-block; font-weight: normal; @@ -216,27 +214,40 @@ label .checkbox { color: #333; } -.file-upload { - cursor: pointer; - margin-bottom: 8px; - padding: 0 !important; - overflow: hidden; - position: relative; +.upload-panel { + border-right: 1px solid #D1D1D1; + float: left; + margin-right: 25px; } -.file-upload span { +.file-upload { + background: url("../images/file_upload.png") no-repeat center 0 transparent; + cursor: pointer; + display: inline-block; + font-size: 14px; font-weight: bold; - line-height: 42px; - margin: 2px 50px; + height: 45px; + margin: 0 40px 16px; + overflow: hidden; + padding-top: 100px; + position: relative; + text-align: center; + width: 100px; } .file-upload input { cursor: pointer; - font-size: 23px; opacity: 0; position: absolute; right: 0; top: 0; transform: translate(-300px, 0) scale(4); } +.create-panel { + float: left; +} +.upload-panel, +.create-panel { + padding: 10px 0; +} #mainProgress { color: #979b9f; @@ -421,6 +432,7 @@ footer { cursor: default; font-family: 'Open Sans', sans-serif; font-size: 13px; + height: 40px; -khtml-user-select: none; user-select: none; -moz-user-select: none; @@ -434,7 +446,7 @@ footer { text-align: left; } .contentCells { - padding: 2px 1px 2px 5px; + padding: 4px 1px 4px 5px; font-family: 'Open Sans', sans-serif; font-size: 16px; border-bottom: 1px solid #e5e5e5; diff --git a/web/documentserver-example/nodejs/views/index.ejs b/web/documentserver-example/nodejs/views/index.ejs index 62d64ff7..2f4e29ec 100644 --- a/web/documentserver-example/nodejs/views/index.ejs +++ b/web/documentserver-example/nodejs/views/index.ejs @@ -38,7 +38,7 @@
- + ONLYOFFICE™
@@ -82,81 +82,51 @@
-
- Upload file - -
- -
-
-
- Or, you can view and edit sample documents –click on one of the links below. - - - + +
+
<% if (storedFiles.length > 0) { %> @@ -166,17 +136,16 @@

-
- - - - - - - - - - <% for (var i = 0; i < storedFiles.length; i++) { %> +
FilenameEditorsViewers
+ + + + + + + + + <% for (var i = 0; i < storedFiles.length; i++) { %> - <% } %> - -
FilenameEditorsViewers
@@ -207,10 +176,9 @@ embedded
-
+ <% } %> + +
<% } %>