R7-Office: removed unused files

This commit is contained in:
alexandervnuchkov 2019-03-04 15:15:02 +03:00
parent d86592c46c
commit 68013587de
8 changed files with 0 additions and 1987 deletions

View File

@ -1,27 +0,0 @@
body, p {font-family: 'Open Sans'; font-size: 14px; text-align: left;}
body {padding: 140px 20px 20px; margin: 0;}
p {margin: 0; padding: 3px 0;}
table td {padding: 5px 10px; font-family: 'Open Sans'; font-size: 14px; text-align: left;}
table th {padding: 5px 10px; font-family: 'Open Sans'; font-size: 18px; font-weight: 600; text-align: left;}
table th:first-child, table td:first-child {text-align: right;}
pre {white-space: pre-wrap; font-size: 14px; margin: 5px 10px; padding: 20px; border: 1px solid #ddd;}
.formDiv {position: absolute; top: 20px; left: 20px;}
select {padding: 11px 10px; font-family: 'Open Sans'; font-size: 14px; text-align: left; vertical-align: middle;}
input {font-family: 'Open Sans'; background: #444; border: 0 none; color: #fff; cursor: pointer; display: inline-block; font-size: 14px; vertical-align: middle; padding: 15px 30px; text-align: center; text-decoration: none !important; border-radius: 3px; text-transform: uppercase; font-weight: 600; line-height: 1em;}
h2 {font-weight: 400; font-size: 24px; font-family: 'Open Sans'; margin: 0; padding: 15px 0 5px; line-height: 1em; color: #444;}
h1 {font-weight: 400; font-size: 28px; font-family: 'Open Sans'; margin: 0; padding: 0; line-height: 1em; position: absolute; top: 90px; left: 20px; color: #f94a0c;}
a {color: #5891d0;}
li a {font-family: 'Open Sans'; font-size: 14px; text-align: left; text-decoration: none;}
li a:hover {text-decoration: underline;}
li {list-style-type: none;}
ul {margin: 0;}
.menu_left {margin: 0; padding: 0;}
.back_to_start {position: absolute; right: 20px; top: 32px;}
#home .back_to_start {position: relative; left: 40px; right: auto; top: 0;}
.back_to_start a {display: block; text-align: right; line-height: 1.7em;}
#home .back_to_start a {text-align: left;}
#pages a#pagesLink, #parse a#parseLink, #home a#homeLink {display: none}
#back-top {bottom: 80px; right: 24px; position: fixed; z-index: 15000;}
#back-top a {background-color: rgba(158,164,181,0.8); background-image: url(img/arrowup.png); background-position: center center; background-repeat: no-repeat; border-radius: 3px; display: block; height: 40px; text-decoration: none; transition: 1s; width: 40px;}
#back-top a:hover {background-color: rgba(61,74,107,0.7);}
.indexesjs_link {text-decoration: underline; cursor: pointer;}

View File

@ -1,21 +0,0 @@
<?php
include('shared/simple_html_dom.php');
error_reporting(E_ALL);
//ini_set("display_errors", 1);
?>
<html>
<head>
<title>Editor documentation parser</title>
<?php
include('shared/headLinks.php');
?>
</head>
<body id="home">
<div class="">
<h1>Document Editors documentation</h1>
<?php
include('shared/backToLink.php');
?>
</div>
</body>
</html>

View File

@ -1,79 +0,0 @@
<?php
error_reporting(E_ALL);
//ini_set("display_errors", 1);
$json = '';
$totalPages = '0';
include('shared/backToLink.php');
if(isset($_GET['submitEditor'])) {
$varEditors = $_GET['editorVersion'];
$languageLocale = $_GET['languageList'];
$editorList = ['Document Editor', 'Presentation Editor', 'Spreadsheet Editor'];
$editorAvatarList = ['documenteditor', 'presentationeditor', 'spreadsheeteditor'];
$languageList = ['English', 'Русский', 'Deutsch', 'Français', 'Español'];
$languageAvatarList = ['en', 'ru', 'de', 'fr', 'es'];
$lALLength = count($languageAvatarList);
$eALLength = count($editorAvatarList);
for ($i = 0; $i < $lALLength; $i++) {
if($languageAvatarList[$i] == $languageLocale) {
$languagePrint = $languageList[$i];
}
}
for ($i = 0; $i < $eALLength; $i++) {
if($editorAvatarList[$i] == $varEditors) {
$editorsPrint = $editorList[$i];
}
}
echo '<p>Editor: <b>' . $editorsPrint . '</b>, language: <b>' . $languagePrint . '</b></p>';
echo '<p>___________________________________________</p>';
echo '<div class="menu_left">';
$url = 'OfficeWeb/apps/' . $varEditors. '/main/resources/help/' . $languageLocale. '/Contents.json';
$jsonFile = file_get_contents($url);
if(substr($jsonFile, 0, 3) == pack("CCC", 0xEF, 0xBB, 0xBF)) $jsonFile = substr($jsonFile, 3);
$contents = json_decode($jsonFile, true);
foreach($contents as $item) {
$header = $item['headername'];
$link = $item['src'];
$title = $item['name'];
if($header != '') {
echo '</ul><h2>' . $header . '</h2><ul>';
}
echo '<li><a href="OfficeWeb/apps/' . $varEditors. '/main/resources/help/' . $languageLocale. '/' . $link . '">' . $title . '</a></li>';
}
echo '</div>';
echo '<p></p><p>===========================================</p><p><b>Contents.json</b> (file path: <u>\\\\siteserver2\documenteditors\OfficeWeb\apps\\' . $varEditors. '\main\resources\help\\' . $languageLocale. '\Contents.json</u>):</p>';
}
?>
<html>
<head>
<title>Build table of contents from Contents.json</title>
<?php
include('shared/headLinks.php');
?>
</head>
<body id="pages">
<h1>Build table of contents from Contents.json</h1>
<?php
include('shared/form.php');
if($_GET['languageList'] == '') echo '<p>Select the editor and its language from the list and click the <b>Start!</b> button.</p><p>The list of all the pages included into the <b>Contents.json</b> file will be formed.</p>';
?>
<p id="back-top" style="display: none">
<a title="Scroll up" href="#top"></a>
</p>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="js/arrowup.min.js"></script>
</body>
</html>

View File

@ -1,117 +0,0 @@
<?php
include('shared/simple_html_dom.php');
error_reporting(E_ALL);
//ini_set("display_errors", 1);
$json = '';
$totalPages = '0';
$localwebURL = 'http://192.168.4.102:8081/';
include('shared/backToLink.php');
if(isset($_GET['submitEditor'])) {
$varEditors = $_GET['editorVersion'];
$languageLocale = $_GET['languageList'];
$pages = array_map(null, glob('OfficeWeb/apps/' . $varEditors. '/main/resources/help/' . $languageLocale. '/*/*.htm'));
if(count($pages) != 0) {
$editorList = ['Document Editor', 'Presentation Editor', 'Spreadsheet Editor'];
$editorAvatarList = ['documenteditor', 'presentationeditor', 'spreadsheeteditor'];
$languageList = ['English', 'Русский', 'Deutsch', 'Français', 'Español'];
$languageAvatarList = ['en', 'ru', 'de', 'fr', 'es'];
$lALLength = count($languageAvatarList);
$eALLength = count($editorAvatarList);
for ($i = 0; $i < $lALLength; $i++) {
if($languageAvatarList[$i] == $languageLocale) {
$languagePrint = $languageList[$i];
}
}
for ($i = 0; $i < $eALLength; $i++) {
if($editorAvatarList[$i] == $varEditors) {
$editorsPrint = $editorList[$i];
}
}
echo '<p>Editor: <b>' . $editorsPrint . '</b>, language: <b>' . $languagePrint . '</b></p>';
echo '<p>Try if it works correctly: <a target="_blank" href="' . $localwebURL . 'OfficeWeb/apps/' . $varEditors. '/main/resources/help/' . $languageLocale. '/search/search.html?query=document">' . $localwebURL . 'OfficeWeb/apps/' . $varEditors. '/main/resources/help/' . $languageLocale. '/search/search.html?query=document</a></p>';
echo '<p><a class="indexesjs_link" onclick="javascript: $(\'html, body\').animate({ \'scrollTop\': $(\'#indexesjs\').offset().top - 50}, 500)">Go to indexes.js file</a></p>';
echo '<p>___________________________________________</p>';
foreach($pages as $url) {
$page_link_for_array = '';
$title_for_array = '';
$body_for_array = '';
$html = '';
$page_link = $url;
$page_link = str_replace('OfficeWeb/apps/' . $varEditors. '/main/resources/help/' . $languageLocale. '/',"",$page_link);
$page_link_for_array = '"id": "' . $page_link . '", ';
$html = file_get_html($url);
$titleTag = $html->find('title');
foreach($titleTag as $titleValue) {
$title = $titleValue->plaintext;
$title = str_replace("\\","\\\\",$title);
$title = str_replace('"','\"',$title);
$title_for_array = '"title": "' . $title . '", ';
}
$bodyTag = $html->find('body');
foreach($bodyTag as $bodyValue) {
$body = $bodyValue->plaintext;
$bodyTrimmed = trim($body);
$bodyTrimmed = str_replace("\t"," ",$bodyTrimmed);
$bodyTrimmed = str_replace("\n"," ",$bodyTrimmed);
$bodyTrimmed = str_replace("\r"," ",$bodyTrimmed);
$bodyTrimmed = preg_replace('/\s\s+/', ' ', $bodyTrimmed);
$bodyTrimmed = str_replace("\\","\\\\",$bodyTrimmed);
$bodyTrimmed = str_replace('"','\"',$bodyTrimmed);
if (substr($bodyTrimmed, 0, strlen($title)) == $title) {
$bodyTrimmed = substr($bodyTrimmed, strlen($title));
}
$bodyTrimmed = trim($bodyTrimmed);
$body_for_array = '"body": "' . $bodyTrimmed . '"';
}
$json .= PHP_EOL . ' {' . PHP_EOL . ' ' . $page_link_for_array . PHP_EOL . ' ' . $title_for_array . PHP_EOL . ' ' . $body_for_array . PHP_EOL . ' },';
echo '<p>' . $page_link . ' &mdash; done!</p>';
$totalPages += 1;
}
$file_start = 'var indexes = ' . PHP_EOL . '[';
$file_end = PHP_EOL . ']';
$json = rtrim($json,",");
file_put_contents('OfficeWeb/apps/' . $varEditors. '/main/resources/help/' . $languageLocale. '/search/indexes.js', $file_start . $json . $file_end);
echo '<p>___________________________________________</p><p>Total pages: <b>' . $totalPages . '</b></p>';
echo '<p></p><p>===========================================</p><p><a id="indexesjs"></a><b>indexes.js</b> (file path: <u>\\\\SITESERVER2\Sites\helpcenter.teamlab.com\helpcenter.r7-office.ru\Web\OfficeWeb\apps\\' . $varEditors. '\main\resources\help\\' . $languageLocale. '\search\indexes.js</u>):</p>';
echo '<pre>' . file_get_contents('OfficeWeb/apps/' . $varEditors. '/main/resources/help/' . $languageLocale. '/search/indexes.js') . '</pre>';
}
}
?>
<html>
<head>
<title>Build indexes.js for documentation search</title>
<?php
include('shared/headLinks.php');
?>
</head>
<body id="parse">
<h1>Build indexes.js for documentation search</h1>
<?php
include('shared/form.php');
if($_GET['languageList'] == '') echo '<p>Select the editor and its language from the list and click the <b>Start!</b> button.</p><p>The <b>indexes.js</b> file will be formed based on <b>all</b> the pages present in the selected editor/language folder.</p><p>The file will be placed to the editor folder and used for the documentation on-page search.</p>';
?>
<p id="back-top" style="display: none">
<a title="Scroll up" href="#top"></a>
</p>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="js/arrowup.min.js"></script>
</body>
</html>

View File

@ -1,5 +0,0 @@
<div class="back_to_start">
<a id="homeLink" href="index.php">Back to start page</a>
<a id="pagesLink" href="pages.php">Build table of contents from <b>Contents.json</b></a>
<a id="parseLink" href="parse.php">Build <b>indexes.js</b> for documentation search</a>
</div>

View File

@ -1,13 +0,0 @@
<form action="" method="get">
<div class="formDiv">
<select name="editorVersion">
<option <?php if($_GET['editorVersion'] == 'documenteditor') echo 'selected'; ?> value="documenteditor">Document Editor</option>
<option <?php if($_GET['editorVersion'] == 'presentationeditor') echo 'selected'; ?> value="presentationeditor">Presentation Editor</option>
<option <?php if($_GET['editorVersion'] == 'spreadsheeteditor') echo 'selected'; ?> value="spreadsheeteditor">Spreadsheet Editor</option>
</select>
<select name="languageList">
<option <?php if($_GET['languageList'] == 'ru') echo 'selected'; ?> value="ru">Русский</option>
</select>
<input name="submitEditor" type="submit" value="Start!">
</div>
</form>

View File

@ -1,4 +0,0 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:900,800,700,600,500,400,300&amp;subset=latin,cyrillic-ext,cyrillic,latin-ext" rel="stylesheet" type="text/css" />
<link href="css/style.css" rel="stylesheet" type="text/css" />

File diff suppressed because it is too large Load Diff