Compare commits
97 Commits
feature/wo
...
feature/ja
| Author | SHA1 | Date | |
|---|---|---|---|
| 1ac382d3c0 | |||
| 5933aa83ad | |||
| 78bd037486 | |||
| 17beef45f4 | |||
| b11a1be481 | |||
| a3e140981d | |||
| e0386f7cf9 | |||
| 0521f20413 | |||
| 61b5746ddf | |||
| 57d823acb1 | |||
| 4d99e2e406 | |||
| bec48ed834 | |||
| e856f5bcb1 | |||
| c57a710bca | |||
| 248e9213a1 | |||
| a035adcbd9 | |||
| 7fd1b65fec | |||
| 8ee0aa45b9 | |||
| dfcf244dc8 | |||
| 0563795494 | |||
| b6b6e80ffb | |||
| bd3b91d02f | |||
| 555f8d43cd | |||
| 3f48a8d492 | |||
| bb921e7eff | |||
| 13d5e6fa94 | |||
| cbfcf5de96 | |||
| 4771d96819 | |||
| d2aa6f0653 | |||
| cf2a00a374 | |||
| bdfb75dc84 | |||
| 9e21ca625c | |||
| 02def07f23 | |||
| fc4dac6c4b | |||
| 486a09f3b2 | |||
| 9a22fc854b | |||
| ac4d5561a2 | |||
| 98cdda06c4 | |||
| 744fccf913 | |||
| 349ff5d61d | |||
| dbba22df23 | |||
| 2ddd822b24 | |||
| 6b4d6baf4b | |||
| 2c8d151cc7 | |||
| 60c7c025a3 | |||
| 7aaf5243cb | |||
| 44b0f4d53d | |||
| 70b63636e3 | |||
| 8d4582e379 | |||
| a1ec2cf366 | |||
| 4907e9d3c8 | |||
| 88f3d6da59 | |||
| 481b111cb2 | |||
| a1e13f3315 | |||
| d1dd289c77 | |||
| 7b4e40c4e4 | |||
| 6d4cad2215 | |||
| f43a4471ef | |||
| 0cf90e86c7 | |||
| 406de99b01 | |||
| f4bcb15d33 | |||
| d2a0164738 | |||
| a49ef4cc13 | |||
| 3ca29cd402 | |||
| c398b30e33 | |||
| 8caea9fab0 | |||
| f44c62540c | |||
| 7644db80e3 | |||
| 880497cd01 | |||
| 34f8174d9d | |||
| 99bc9d3fdf | |||
| 165c292ab8 | |||
| 8fe41cd8e6 | |||
| 705ea097e2 | |||
| f4799bebb4 | |||
| 4ffa524de0 | |||
| cd055317e0 | |||
| b1941c5980 | |||
| 83bc0fed5e | |||
| 5620f49f8f | |||
| d9fefef834 | |||
| 37591d847c | |||
| 77290d88f3 | |||
| 6befd87761 | |||
| f3e270c1ad | |||
| f5f1e4b391 | |||
| 8ba389d02f | |||
| 45910ff1f3 | |||
| 7ec969f4d9 | |||
| c7e13ef8a8 | |||
| 3d488f89b2 | |||
| cc00af1510 | |||
| f8aa55143c | |||
| 1b44c04893 | |||
| 1a51759154 | |||
| 8807328180 | |||
| ca49e5bdda |
33
.github/workflows/artifact-node.yml
vendored
@ -1,33 +0,0 @@
|
||||
name: Artifact Nodejs
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [master, main]
|
||||
paths: ['web/documentserver-example/nodejs/**']
|
||||
pull_request:
|
||||
branches: [master, main, develop]
|
||||
paths: ['web/documentserver-example/nodejs/**']
|
||||
|
||||
jobs:
|
||||
artifact:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Build Artifact
|
||||
run: |
|
||||
cd ${{ github.workspace }}
|
||||
cwd=$(pwd)
|
||||
git submodule update --init --recursive
|
||||
cd ./web/documentserver-example/nodejs
|
||||
mkdir -p ./deploy/'Node.js Example'
|
||||
rsync -av --exclude='deploy' ./ ./deploy/'Node.js Example'
|
||||
cd ./deploy/'Node.js Example'/public/assets
|
||||
rm -rf ./.git/
|
||||
rm .git
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Node.js.Example
|
||||
path: ${{ github.workspace }}/web/documentserver-example/nodejs/deploy
|
||||
31
.github/workflows/lint-java.yml
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
name: Lint Java
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [master, main]
|
||||
paths: ['web/documentserver-example/java/**']
|
||||
pull_request:
|
||||
branches: [master, main]
|
||||
paths: ['web/documentserver-example/java/**']
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./web/documentserver-example/java
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Java 11
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '11'
|
||||
|
||||
- name: Run linter
|
||||
run: |
|
||||
mvn -version
|
||||
mvn package
|
||||
2
.github/workflows/lint-nodejs.yml
vendored
@ -6,7 +6,7 @@ on:
|
||||
branches: [master, main]
|
||||
paths: ['web/documentserver-example/nodejs/**']
|
||||
pull_request:
|
||||
branches: [master, main, develop]
|
||||
branches: [master, main]
|
||||
paths: ['web/documentserver-example/nodejs/**']
|
||||
|
||||
env:
|
||||
|
||||
31
.github/workflows/lint-php.yml
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
name: PHPCs
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [master, main]
|
||||
paths: ['web/documentserver-example/php/**']
|
||||
pull_request:
|
||||
branches: [master, main]
|
||||
paths: ['web/documentserver-example/php/**']
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./web/documentserver-example/php
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '8.2'
|
||||
tools: cs2pr, phpcs
|
||||
|
||||
- name: Run phpcs
|
||||
run: |
|
||||
phpcs --version
|
||||
phpcs -q --extensions=php,module,inc,install,test,profile,theme,info --ignore=node_modules,bower_components,vendor,css,js,lib --standard=./ruleset.xml ./
|
||||
40
.github/workflows/lint-python.yml
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
name: PyLint
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [master, main]
|
||||
paths: ['web/documentserver-example/python/**']
|
||||
pull_request:
|
||||
branches: [master, main]
|
||||
paths: ['web/documentserver-example/python/**']
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./web/documentserver-example/python
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install flake8
|
||||
pip install pylint
|
||||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
||||
|
||||
- name: Lint Flake8
|
||||
run: |
|
||||
flake8 ./**/*.py --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||
flake8 ./**/*.py --count --max-complexity=10 --max-line-length=79 --statistics
|
||||
|
||||
- name: Lint Pylint
|
||||
run: |
|
||||
pylint ./**/*.py
|
||||
31
.github/workflows/lint-ruby.yml
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
name: Rubocop
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [master, main]
|
||||
paths: ['web/documentserver-example/ruby/**']
|
||||
pull_request:
|
||||
branches: [master, main]
|
||||
paths: ['web/documentserver-example/ruby/**']
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./web/documentserver-example/ruby
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v3
|
||||
- uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: '3.0'
|
||||
bundler-cache: true
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
bundle install
|
||||
- name: Rubocop
|
||||
run: |
|
||||
gem install rubocop
|
||||
rubocop
|
||||
31
.github/workflows/lint-spring.yml
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
name: Lint Spring
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [master, main]
|
||||
paths: ['web/documentserver-example/java-spring/**']
|
||||
pull_request:
|
||||
branches: [master, main]
|
||||
paths: ['web/documentserver-example/java-spring/**']
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./web/documentserver-example/java-spring
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Java 11
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '11'
|
||||
|
||||
- name: Run linter
|
||||
run: |
|
||||
mvn -version
|
||||
mvn package
|
||||
48
.github/workflows/release.yml
vendored
@ -1,48 +0,0 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master,main]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Install Zip
|
||||
run: sudo apt-get install zip
|
||||
- name: Get Info
|
||||
run: |
|
||||
echo "version=$(grep -Eo '[0-9]+(\.[0-9]+)+' CHANGELOG.md | head -n 1)" >> $GITHUB_OUTPUT
|
||||
id: info
|
||||
- name: Generate Changelog
|
||||
run: |
|
||||
awk '/## [0-9]/{p++} p; /## [0-9]/{if (p > 1) exit}' CHANGELOG.md | awk 'NR>2 {print last} {last=$0}' > RELEASE.md
|
||||
- name: Build Nodejs Artifact
|
||||
run: |
|
||||
cd ${{ github.workspace }}
|
||||
cwd=$(pwd)
|
||||
git submodule update --init --recursive
|
||||
cd ./web/documentserver-example/nodejs
|
||||
mkdir -p ./'Node.js Example'
|
||||
rsync -av --exclude='Node.js Example' ./ ./'Node.js Example'
|
||||
cd ./'Node.js Example'/public/assets
|
||||
rm -rf ./.git/
|
||||
rm .git
|
||||
- name: Pack Artifacts
|
||||
run: |
|
||||
cd ${{ github.workspace }}/web/documentserver-example/nodejs
|
||||
zip -r Node.js.Example.zip ./'Node.js Example'
|
||||
- name: Create Release
|
||||
uses: ncipollo/release-action@v1
|
||||
id: create_release
|
||||
with:
|
||||
bodyFile: RELEASE.md
|
||||
artifacts: "
|
||||
${{ github.workspace }}/web/documentserver-example/nodejs/Node.js.Example.zip,
|
||||
"
|
||||
tag: v${{ steps.info.outputs.version }}
|
||||
13
.gitignore
vendored
@ -11,19 +11,6 @@
|
||||
**/.vscode/
|
||||
**/.vs/
|
||||
**/.idea
|
||||
.classpath
|
||||
.project
|
||||
.settings/
|
||||
*.iml
|
||||
*.iws
|
||||
.DS_Store
|
||||
/web/documentserver-example/java/target/
|
||||
/web/documentserver-example/java-spring/target/
|
||||
/web/documentserver-example/csharp/packages
|
||||
/web/documentserver-example/csharp-mvc/packages
|
||||
/web/documentserver-example/java-spring/documents/
|
||||
/web/documentserver-example/ruby/.bundle
|
||||
/web/documentserver-example/ruby/db/*.sqlite3
|
||||
/web/documentserver-example/ruby/db/*.sqlite3-journal
|
||||
/web/documentserver-example/ruby/log/*
|
||||
/web/documentserver-example/ruby/tmp
|
||||
|
||||
@ -1,5 +1,154 @@
|
||||
Document Server integration example uses code from the following 3rd party projects.
|
||||
|
||||
|
||||
web/documentserver-example/csharp
|
||||
|
||||
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
|
||||
License: MIT
|
||||
License File: jQuery.license
|
||||
|
||||
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
|
||||
License: MIT, GPL
|
||||
License File: jQuery.BlockUI.license
|
||||
|
||||
jQuery.FileUpload - File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads. (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
|
||||
License: MIT
|
||||
License File: jQuery.FileUpload.license
|
||||
|
||||
jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
|
||||
License: MIT
|
||||
License File: jQuery.iframe-transport.license
|
||||
|
||||
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
|
||||
License: MIT
|
||||
License File: jQuery.UI.license
|
||||
|
||||
|
||||
web/documentserver-example/csharp-mvc
|
||||
|
||||
Entity Framework - Entity Framework is an object-relational mapper that enables .NET developers to work with relational data using domain-specific objects. (https://docs.microsoft.com/en-us/ef/ef6/resources/licenses/ef5/enu)
|
||||
License: MICROSOFT SOFTWARE SUPPLEMENTAL TERMS, MICROSOFT SOFTWARE LICENSE TERMS
|
||||
License File: EntityFramework.license
|
||||
|
||||
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
|
||||
License: MIT
|
||||
License File: jQuery.license
|
||||
|
||||
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
|
||||
License: MIT, GPL
|
||||
License File: jQuery.BlockUI.license
|
||||
|
||||
jQuery.FileUpload - File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads. (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
|
||||
License: MIT
|
||||
License File: jQuery.FileUpload.license
|
||||
|
||||
jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
|
||||
License: MIT
|
||||
License File: jQuery.iframe-transport.license
|
||||
|
||||
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
|
||||
License: MIT
|
||||
License File: jQuery.UI.license
|
||||
|
||||
Microsoft.Web.Infrastructure - This package contains the Microsoft.Web.Infrastructure assembly that lets you dynamically register HTTP modules at run time. (https://www.microsoft.com/web/webpi/eula/aspnetmvc3update-eula.htm)
|
||||
License: MS-EULA License
|
||||
License File: Microsoft.Web.Infrastructure.license
|
||||
|
||||
Newtonsoft.Json - Json.NET is a popular high-performance JSON framework for .NET (https://licenses.nuget.org/MIT)
|
||||
License: MIT
|
||||
License File: Newtonsoft.Json.license
|
||||
|
||||
WebGrease - Web Grease is a suite of tools for optimizing javascript, css files and images. (https://www.microsoft.com/web/webpi/eula/aspnetcomponent_rtw_ENU.htm)
|
||||
License: MICROSOFT .NET LIBRARY LICENSE
|
||||
License File: WebGrease.license
|
||||
|
||||
|
||||
web/documentserver-example/java
|
||||
|
||||
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
|
||||
License: MIT
|
||||
License File: jQuery.license
|
||||
|
||||
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
|
||||
License: MIT, GPL
|
||||
License File: jQuery.BlockUI.license
|
||||
|
||||
jQuery.FileUpload - File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads. (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
|
||||
License: MIT
|
||||
License File: jQuery.FileUpload.license
|
||||
|
||||
jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
|
||||
License: MIT
|
||||
License File: jQuery.iframe-transport.license
|
||||
|
||||
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
|
||||
License: MIT
|
||||
License File: jQuery.UI.license
|
||||
|
||||
Prime JWT - is intended to be fast and easy to use. Prime JWT has a single external dependency on Jackson. (https://github.com/ws-apps/prime-jwt/blob/master/LICENSE)
|
||||
License: Apache 2.0
|
||||
License File: prime-jwt.license
|
||||
|
||||
|
||||
web/documentserver-example/java-spring
|
||||
|
||||
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
|
||||
License: MIT
|
||||
License File: jQuery.license
|
||||
|
||||
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
|
||||
License: MIT, GPL
|
||||
License File: jQuery.BlockUI.license
|
||||
|
||||
jQuery.FileUpload - File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads. (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
|
||||
License: MIT
|
||||
License File: jQuery.FileUpload.license
|
||||
|
||||
jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
|
||||
License: MIT
|
||||
License File: jQuery.iframe-transport.license
|
||||
|
||||
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
|
||||
License: MIT
|
||||
License File: jQuery.UI.license
|
||||
|
||||
Prime JWT - is intended to be fast and easy to use. Prime JWT has a single external dependency on Jackson. (https://github.com/ws-apps/prime-jwt/blob/master/LICENSE)
|
||||
License: Apache 2.0
|
||||
License File: prime-jwt.license
|
||||
|
||||
Spring Boot - Helps create Spring-powered, production-grade applications and services. Has external dependencies on Spring Framework. (https://github.com/spring-projects/spring-boot/blob/main/LICENSE.txt)
|
||||
License: Apache 2.0
|
||||
License File: spring-boot.license
|
||||
|
||||
Spring Boot Devtools - Provides fast application restarts, LiveReload, and configurations for enhanced development experience. (https://github.com/spring-projects/spring-boot/blob/main/LICENSE.txt)
|
||||
License: Apache 2.0
|
||||
License File: spring-boot.license
|
||||
|
||||
Spring Boot Starter Thymeleaf - A modern server-side Java template engine for both web and standalone environments. (https://github.com/spring-projects/spring-boot/blob/main/LICENSE.txt)
|
||||
License: Apache 2.0
|
||||
License File: spring-boot.license
|
||||
|
||||
Spring Data JPA - Persist data in SQL stores with Java Persistence API using Spring Data and Hibernate. (https://github.com/spring-projects/spring-data-jpa/blob/main/LICENSE.txt)
|
||||
License: Apache 2.0
|
||||
License File: spring-data-jpa.license
|
||||
|
||||
H2 Database Engine - This software contains unmodified binary redistributions for H2 database engine. H2 is a relational DBMS that can be embedded in java applications. (https://h2database.com/html/license.html)
|
||||
License: MPL 2.0 or EPL 1.0
|
||||
License File: h2database.license
|
||||
|
||||
JSON.simple - JSON.simple is a simple Java toolkit for JSON. You can use JSON.simple to encode or decode JSON text. (https://github.com/fangyidong/json-simple/blob/master/LICENSE.txt)
|
||||
License: Apache 2.0
|
||||
License File: JSON.simple.license
|
||||
|
||||
Gson - Gson is a Java library that can be used to convert Java Objects into their JSON representation. (https://github.com/google/gson/blob/master/LICENSE)
|
||||
License: Apache 2.0
|
||||
License File: gson.license
|
||||
|
||||
Jackson Databind - General-purpose data-binding functionality and tree-model for Jackson Data Processor. (https://github.com/FasterXML/jackson-databind/blob/master/LICENSE)
|
||||
License: Apache 2.0
|
||||
License File: jackson-databind.license
|
||||
|
||||
|
||||
web/documentserver-example/nodejs
|
||||
|
||||
body-parser - Node.js body parsing middleware. (https://github.com/expressjs/body-parser/blob/master/LICENSE)
|
||||
@ -77,3 +226,109 @@ License File: serve-favicon.license
|
||||
urllib - Request HTTP URLs in a complex world — basic and digest authentication, redirections, cookies, timeout and more. (https://github.com/node-modules/urllib/blob/master/LICENSE)
|
||||
License: MIT
|
||||
License File: urllib.license
|
||||
|
||||
|
||||
web/documentserver-example/php
|
||||
|
||||
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
|
||||
License: MIT
|
||||
License File: jQuery.license
|
||||
|
||||
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
|
||||
License: MIT, GPL
|
||||
License File: jQuery.BlockUI.license
|
||||
|
||||
jQuery.FileUpload - File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads. (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
|
||||
License: MIT
|
||||
License File: jQuery.FileUpload.license
|
||||
|
||||
jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
|
||||
License: MIT
|
||||
License File: jQuery.iframe-transport.license
|
||||
|
||||
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
|
||||
License: MIT
|
||||
License File: jQuery.UI.license
|
||||
|
||||
JWT - JSON Web Token implementation (https://github.com/firebase/php-jwt/blob/master/LICENSE)
|
||||
License: BSD-3-Clause
|
||||
License File: jwt.license
|
||||
|
||||
PHP_CodeSniffer - PHP_CodeSniffer is a set of two PHP scripts; the main phpcs script that tokenizes PHP, JavaScript and CSS files to detect violations of a defined coding standard, and a second phpcbf script to automatically correct coding standard violations. PHP_CodeSniffer is an essential development tool that ensures your code remains clean and consistent. (https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt)
|
||||
License: BSD-3-Clause
|
||||
License File: PHP_CodeSniffer.license
|
||||
|
||||
|
||||
web/documentserver-example/ruby
|
||||
|
||||
byebug - Byebug is a Ruby debugger. (https://github.com/deivid-rodriguez/byebug/blob/master/LICENSE)
|
||||
License: BSD-2-Clause
|
||||
License File: byebug.license
|
||||
|
||||
coffee-rails - CoffeeScript adapter for the Rails asset pipeline. (https://github.com/rails/coffee-rails/blob/master/MIT-LICENSE)
|
||||
License: MIT
|
||||
License File: coffee-rails.license
|
||||
|
||||
jbuilder - Create JSON structures via a Builder-style DSL (https://github.com/rails/jbuilder/blob/master/MIT-LICENSE)
|
||||
License: MIT
|
||||
License File: jbuilder.license
|
||||
|
||||
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
|
||||
License: MIT
|
||||
License File: jQuery.license
|
||||
|
||||
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
|
||||
License: MIT, GPL
|
||||
License File: jQuery.BlockUI.license
|
||||
|
||||
jQuery.FileUpload - File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads. (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
|
||||
License: MIT
|
||||
License File: jQuery.FileUpload.license
|
||||
|
||||
jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
|
||||
License: MIT
|
||||
License File: jQuery.iframe-transport.license
|
||||
|
||||
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
|
||||
License: MIT
|
||||
License File: jQuery.UI.license
|
||||
|
||||
jquery-rails - This gem provides jQuery and the jQuery-ujs driver for your Rails 4+ application. (https://github.com/rails/jquery-rails/blob/master/MIT-LICENSE)
|
||||
License: MIT
|
||||
License File: jquery-rails.license
|
||||
|
||||
rails - Rails is a web-application framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern. (https://github.com/rails/rails/blob/v6.0.3.2/MIT-LICENSE)
|
||||
License: MIT
|
||||
License File: rails.license
|
||||
|
||||
sass-rails - This gem provides official integration for Ruby on Rails projects with the Sass stylesheet language. (https://github.com/rails/sass-rails/blob/master/MIT-LICENSE)
|
||||
License: MIT
|
||||
License File: sass-rails.license
|
||||
|
||||
sdoc - rdoc generator html with javascript search index. (https://github.com/zzak/sdoc/blob/master/LICENSE)
|
||||
License: MIT
|
||||
License File: sdoc.license
|
||||
|
||||
sqlite3 - This module allows Ruby programs to interface with the SQLite3 database engine (www.sqlite.org). (https://github.com/sparklemotion/sqlite3-ruby/blob/master/LICENSE)
|
||||
License: BSD-3-Clause
|
||||
License File: sqlite3.license
|
||||
|
||||
turbolinks - Rails engine for Turbolinks 5 support (https://github.com/turbolinks/turbolinks-rails/blob/master/LICENSE)
|
||||
License: MIT
|
||||
License File: turbolinks.license
|
||||
|
||||
tzinfo-data - TZInfo::Data contains data from the IANA Time Zone database packaged as Ruby modules for use with TZInfo. (https://github.com/tzinfo/tzinfo-data/blob/master/LICENSE)
|
||||
License: MIT
|
||||
License File: tzinfo-data.license
|
||||
|
||||
uglifier - Uglifier minifies JavaScript files by wrapping UglifyJS to be accessible in Ruby (https://github.com/lautis/uglifier/blob/master/LICENSE.txt)
|
||||
License: MIT
|
||||
License File: uglifier.license
|
||||
|
||||
uuid - UUID generator for producing universally unique identifiers based on RFC 4122 (https://github.com/assaf/uuid/blob/master/MIT-LICENSE)
|
||||
License: MIT
|
||||
License File: uuid.license
|
||||
|
||||
web-console - A debugging tool for your Ruby on Rails applications. (https://github.com/rails/web-console/blob/master/MIT-LICENSE)
|
||||
License: MIT
|
||||
License File: web-console.license
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
# Change Log
|
||||
|
||||
- php: linter refactoring
|
||||
|
||||
## 1.5.0
|
||||
- nodejs: added wopi putRelativeFile action
|
||||
- nodejs: wopi editnew action for exisiting file
|
||||
|
||||
@ -1,2 +1,3 @@
|
||||
%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe msbuild\zip.proj /fl1 /flp1:LogFile=Zip.log;Verbosity=Normal /m
|
||||
%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe msbuild\build.proj /fl1 /flp1:LogFile=Build.log;Verbosity=Normal /m
|
||||
if %errorlevel% == 0 %SystemRoot%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe msbuild\zip.proj /fl1 /flp1:LogFile=Zip.log;Verbosity=Normal /m
|
||||
pause
|
||||
25
build/msbuild/build.proj
Normal file
@ -0,0 +1,25 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<PropertyGroup>
|
||||
<To Condition=" '$(To)' == '' ">..\deploy\</To>
|
||||
|
||||
<RootDir Condition="$(RootDir)==''">..\..\</RootDir>
|
||||
<DirCSharp>$(RootDir)web\documentserver-example\csharp\</DirCSharp>
|
||||
<DirMvc>$(RootDir)web\documentserver-example\csharp-mvc\</DirMvc>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectToBuild Include="$(DirCSharp)OnlineEditorsExample.sln"/>
|
||||
<ProjectToBuild Include="$(DirMvc)OnlineEditorsExampleMVC.sln"/>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="Build">
|
||||
<MSBuild
|
||||
Projects="@(ProjectToBuild)"
|
||||
Targets="Build"
|
||||
Properties="Configuration=Release"
|
||||
RebaseOutputs="true"
|
||||
StopOnFirstFailure="true"/>
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
@ -4,18 +4,74 @@
|
||||
<PropertyGroup>
|
||||
<To Condition=" '$(To)' == '' ">..\deploy\</To>
|
||||
<RootDir Condition="$(RootDir)==''">..\..\</RootDir>
|
||||
<NameCSharp>$(To)DotNet (Csharp) Example</NameCSharp>
|
||||
<DirCSharp>$(RootDir)web\documentserver-example\csharp\</DirCSharp>
|
||||
<NameMvc>$(To)DotNet (Csharp MVC) Example</NameMvc>
|
||||
<DirMvc>$(RootDir)web\documentserver-example\csharp-mvc\</DirMvc>
|
||||
<NameJava>$(To)Java Example</NameJava>
|
||||
<DirJava>$(RootDir)web\documentserver-example\java\</DirJava>
|
||||
<NameSpring>$(To)Java Spring Example</NameSpring>
|
||||
<DirSpring>$(RootDir)web\documentserver-example\java-spring\</DirSpring>
|
||||
<NameNodeJS>$(To)Node.js Example</NameNodeJS>
|
||||
<DirNodeJS>$(RootDir)web\documentserver-example\nodejs\</DirNodeJS>
|
||||
<NamePHP>$(To)PHP Example</NamePHP>
|
||||
<DirPHP>$(RootDir)web\documentserver-example\php\</DirPHP>
|
||||
<NameRuby>$(To)Ruby Example</NameRuby>
|
||||
<DirRuby>$(RootDir)web\documentserver-example\ruby\</DirRuby>
|
||||
<NamePython>$(To)Python Example</NamePython>
|
||||
<DirPython>$(RootDir)web\documentserver-example\python\</DirPython>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="Build">
|
||||
<RemoveDir Directories="$(To)" ContinueOnError="true" />
|
||||
|
||||
<ItemGroup>
|
||||
<ZipFilesCSharp Include="$(DirCSharp)**" Exclude="$(DirCSharp).vs\**;$(DirCSharp)bin\*.pdb;$(DirCSharp)bin\*.xml;$(DirCSharp)obj\**;$(DirCSharp)packages\**;$(DirCSharp)**\.git" />
|
||||
</ItemGroup>
|
||||
<Copy SourceFiles="@(ZipFilesCSharp)" DestinationFiles="@(ZipFilesCSharp->'$(NameCSharp)\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
<Zip Files="$(NameCSharp)" WorkingDirectory="$(To)" ZipFileName="$(NameCSharp).zip" />
|
||||
|
||||
<ItemGroup>
|
||||
<ZipFilesMVC Include="$(DirMvc)**" Exclude="$(DirMvc).vs\**;$(DirMvc)bin\*.pdb;$(DirMvc)bin\*.xml;$(DirMvc)obj\**;$(DirMvc)packages\**;$(DirMvc)**\.git" />
|
||||
</ItemGroup>
|
||||
<Copy SourceFiles="@(ZipFilesMVC)" DestinationFiles="@(ZipFilesMVC->'$(NameMvc)\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
<Zip Files="$(NameMvc)" WorkingDirectory="$(To)" ZipFileName="$(NameMvc).zip" />
|
||||
|
||||
<ItemGroup>
|
||||
<ZipFilesJava Include="$(DirJava)**" Exclude="$(DirJava)**\.git" />
|
||||
</ItemGroup>
|
||||
<Copy SourceFiles="@(ZipFilesJava)" DestinationFiles="@(ZipFilesJava->'$(NameJava)\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
<Zip Files="$(NameJava)" WorkingDirectory="$(To)" ZipFileName="$(NameJava).zip" />
|
||||
|
||||
<ItemGroup>
|
||||
<ZipFilesSpring Include="$(DirSpring)**" Exclude="$(DirSpring)**\.git" />
|
||||
</ItemGroup>
|
||||
<Copy SourceFiles="@(ZipFilesSpring)" DestinationFiles="@(ZipFilesSpring->'$(NameSpring)\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
<Zip Files="$(NameSpring)" WorkingDirectory="$(To)" ZipFileName="$(NameSpring).zip" />
|
||||
|
||||
<ItemGroup>
|
||||
<ZipFilesNodeJS Include="$(DirNodeJS)**" Exclude="$(DirNodeJS)node_modules\**;$(DirNodeJS)**\.git" />
|
||||
</ItemGroup>
|
||||
<Copy SourceFiles="@(ZipFilesNodeJS)" DestinationFiles="@(ZipFilesNodeJS->'$(NameNodeJS)\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
<Zip Files="$(NameNodeJS)" WorkingDirectory="$(To)" ZipFileName="$(NameNodeJS).zip" />
|
||||
|
||||
<ItemGroup>
|
||||
<ZipFilesPHP Include="$(DirPHP)**" Exclude="$(DirPHP)**\.git" />
|
||||
</ItemGroup>
|
||||
<Copy SourceFiles="@(ZipFilesPHP)" DestinationFiles="@(ZipFilesPHP->'$(NamePHP)\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
<Zip Files="$(NamePHP)" WorkingDirectory="$(To)" ZipFileName="$(NamePHP).zip" />
|
||||
|
||||
<ItemGroup>
|
||||
<ZipFilesRuby Include="$(DirRuby)**" Exclude="$(DirRuby)**\.git" />
|
||||
</ItemGroup>
|
||||
<Copy SourceFiles="@(ZipFilesRuby)" DestinationFiles="@(ZipFilesRuby->'$(NameRuby)\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
<Zip Files="$(NameRuby)" WorkingDirectory="$(To)" ZipFileName="$(NameRuby).zip" />
|
||||
|
||||
<ItemGroup>
|
||||
<ZipFilesPython Include="$(DirPython)**" Exclude="$(DirPython)**\.git" />
|
||||
</ItemGroup>
|
||||
<Copy SourceFiles="@(ZipFilesPython)" DestinationFiles="@(ZipFilesPython->'$(NamePython)\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
<Zip Files="$(NamePython)" WorkingDirectory="$(To)" ZipFileName="$(NamePython).zip" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
41
web/documentserver-example/csharp-mvc/3rd-Party.license
Normal file
@ -0,0 +1,41 @@
|
||||
ONLYOFFICE Applications example uses code from the following 3rd party projects:
|
||||
|
||||
Entity Framework - Entity Framework is an object-relational mapper that enables .NET developers to work with relational data using domain-specific objects. (https://docs.microsoft.com/en-us/ef/ef6/resources/licenses/ef5/enu)
|
||||
License: MICROSOFT SOFTWARE SUPPLEMENTAL TERMS, MICROSOFT SOFTWARE LICENSE TERMS
|
||||
License File: EntityFramework.license
|
||||
|
||||
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
|
||||
License: MIT
|
||||
License File: jQuery.license
|
||||
|
||||
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
|
||||
License: MIT, GPL
|
||||
License File: jQuery.BlockUI.license
|
||||
|
||||
jQuery.FileUpload - File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads. (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
|
||||
License: MIT
|
||||
License File: jQuery.FileUpload.license
|
||||
|
||||
jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
|
||||
License: MIT
|
||||
License File: jQuery.iframe-transport.license
|
||||
|
||||
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
|
||||
License: MIT
|
||||
License File: jQuery.UI.license
|
||||
|
||||
JWT - JWT (JSON Web Token) Implementation for .NET (Public Domain) (https://github.com/jwt-dotnet/jwt/)
|
||||
License: MIT
|
||||
License File: JWT.license
|
||||
|
||||
Microsoft.Web.Infrastructure - This package contains the Microsoft.Web.Infrastructure assembly that lets you dynamically register HTTP modules at run time. (https://www.microsoft.com/web/webpi/eula/aspnetmvc3update-eula.htm)
|
||||
License: MS-EULA License
|
||||
License File: Microsoft.Web.Infrastructure.license
|
||||
|
||||
Newtonsoft.Json - Json.NET is a popular high-performance JSON framework for .NET (https://github.com/JamesNK/Newtonsoft.Json)
|
||||
License: MIT
|
||||
License File: Newtonsoft.Json.license
|
||||
|
||||
WebGrease - Web Grease is a suite of tools for optimizing javascript, css files and images. (https://www.microsoft.com/web/webpi/eula/aspnetcomponent_rtw_ENU.htm)
|
||||
License: MICROSOFT .NET LIBRARY LICENSE
|
||||
License File: WebGrease.license
|
||||
@ -0,0 +1,56 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
using System.Web.Optimization;
|
||||
|
||||
namespace OnlineEditorsExampleMVC
|
||||
{
|
||||
public class BundleConfig
|
||||
{
|
||||
// register bundles
|
||||
public static void RegisterBundles(BundleCollection bundles)
|
||||
{
|
||||
// create a jquery script bundle
|
||||
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
|
||||
"~/Scripts/jquery-{version}.js",
|
||||
"~/Scripts/jquery-ui.js",
|
||||
"~/Scripts/jquery.blockUI.js",
|
||||
"~/Scripts/jquery.iframe-transport.js",
|
||||
"~/Scripts/jquery.fileupload.js",
|
||||
"~/Scripts/jquery.dropdownToggle.js"
|
||||
));
|
||||
|
||||
// create the main script bundle
|
||||
bundles.Add(new ScriptBundle("~/bundles/scripts").Include(
|
||||
"~/Scripts/jscript.js"
|
||||
));
|
||||
|
||||
// create a style bundle
|
||||
bundles.Add(new StyleBundle("~/Content/css").Include(
|
||||
"~/Content/stylesheet.css",
|
||||
"~/Content/jquery-ui.css",
|
||||
"~/Content/media.css"
|
||||
));
|
||||
|
||||
// create an editor style bundle
|
||||
bundles.Add(new StyleBundle("~/Content/editor").Include(
|
||||
"~/Content/editor.css"
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace OnlineEditorsExampleMVC
|
||||
{
|
||||
public class FilterConfig
|
||||
{
|
||||
// register global filters
|
||||
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
|
||||
{
|
||||
filters.Add(new HandleErrorAttribute());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
|
||||
namespace OnlineEditorsExampleMVC
|
||||
{
|
||||
public class RouteConfig
|
||||
{
|
||||
// register routes
|
||||
public static void RegisterRoutes(RouteCollection routes)
|
||||
{
|
||||
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
|
||||
|
||||
// create a route map
|
||||
routes.MapRoute(
|
||||
name: "Default",
|
||||
url: "{action}",
|
||||
defaults: new { controller = "Home", action = "Index" }
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
using System.Web.Http;
|
||||
|
||||
namespace OnlineEditorsExampleMVC
|
||||
{
|
||||
public static class WebApiConfig
|
||||
{
|
||||
public static void Register(HttpConfiguration config)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
44
web/documentserver-example/csharp-mvc/Content/editor.css
Normal file
@ -0,0 +1,44 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
html {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
background: #fff;
|
||||
color: #333;
|
||||
font-family: Arial, Tahoma,sans-serif;
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
overflow-y: hidden;
|
||||
padding: 0;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.form {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
div {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
@ -0,0 +1,5 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="3" y="11" width="4" height="1" fill="#444444"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M2 13V10H10V8H1C0.447715 8 0 8.44772 0 9V14C0 14.5523 0.447715 15 1 15H10V13H2Z" fill="#444444"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M23.5243 10.5534L22.2366 10.3386C22.143 9.95592 22.0065 9.59014 21.8288 9.24897L22.6532 8.22679C22.8285 8.01077 22.8205 7.69994 22.6357 7.49145L22.1235 6.91502C21.9379 6.70675 21.63 6.6627 21.3952 6.81106L20.2939 7.50337C19.8095 7.16494 19.2608 6.91502 18.6689 6.77L18.4535 5.4753C18.4083 5.20115 18.171 5 17.8926 5H17.1207C16.8428 5 16.6048 5.20115 16.5606 5.4753L16.344 6.77041C15.8546 6.89023 15.3958 7.08363 14.9771 7.33835L13.9297 6.59088C13.704 6.42961 13.394 6.45483 13.197 6.65139L12.6517 7.19707C12.4552 7.39406 12.4299 7.7041 12.5916 7.92983L13.3408 8.97921C13.0885 9.39477 12.8971 9.85099 12.7773 10.336L11.4753 10.5534C11.2015 10.5986 11 10.8359 11 11.1144V11.8856C11 12.1641 11.2015 12.4014 11.4753 12.4466L12.7773 12.664C12.8757 13.0631 13.0185 13.4444 13.2083 13.7978L12.3877 14.8142C12.213 15.0301 12.2203 15.3411 12.4051 15.5494L12.9169 16.1258C13.1026 16.3345 13.4106 16.3778 13.6455 16.2298L14.7626 15.528C15.2353 15.8513 15.7701 16.0889 16.344 16.2298L16.5606 17.5247C16.6048 17.7988 16.8428 18 17.1207 18H17.8926C18.171 18 18.4083 17.7989 18.4535 17.5247L18.6693 16.2298C19.1525 16.1116 19.6055 15.9215 20.0205 15.6712L21.1115 16.4504C21.3368 16.6122 21.6471 16.5868 21.8439 16.3897L22.3894 15.8442C22.5857 15.6478 22.6123 15.3379 22.4492 15.1118L21.6725 14.0227C21.9255 13.6058 22.118 13.1487 22.237 12.6616L23.5248 12.4465C23.7993 12.4013 24 12.1641 24 11.8856V11.1143C23.9996 10.8359 23.7989 10.5986 23.5243 10.5534ZM17.5204 13.9375C16.1745 13.9375 15.0829 12.8457 15.0829 11.5C15.0829 10.1541 16.1745 9.0625 17.5204 9.0625C18.866 9.0625 19.9578 10.1541 19.9578 11.5C19.9578 12.8457 18.866 13.9375 17.5204 13.9375Z" fill="#444444"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
BIN
web/documentserver-example/csharp-mvc/Content/images/cell.ico
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
@ -0,0 +1,3 @@
|
||||
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.294404 0.294466C-0.0961199 0.68499 -0.0998005 1.32183 0.290724 1.71236L5.57837 7L5.57841 7.00005L0.29081 12.2877C-0.0997145 12.6782 -0.0960336 13.315 0.294491 13.7055C0.685015 14.0961 1.32186 14.0997 1.71238 13.7092L6.99999 8.42162L12.2876 13.7092C12.6781 14.0997 13.315 14.0961 13.7055 13.7055C14.096 13.315 14.0997 12.6782 13.7092 12.2877L8.42156 7.00005L8.42161 7L13.7093 1.71236C14.0998 1.32183 14.0961 0.68499 13.7056 0.294466C13.315 -0.0960591 12.6782 -0.0997395 12.2877 0.290785L7.00003 5.57843L6.99999 5.57847L6.99994 5.57843L1.7123 0.290785C1.32177 -0.0997395 0.684928 -0.0960591 0.294404 0.294466Z" fill="#AAAAAA"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 781 B |
@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M5 6C4.44772 6 4 6.44772 4 7V16.4074C4 16.9597 4.44772 17.4074 5 17.4074H6.72783C7.02679 17.4074 7.31006 17.5412 7.50002 17.772L8.56115 19.0616C8.96117 19.5477 9.7055 19.5477 10.1055 19.0616L11.1667 17.772C11.3566 17.5412 11.6399 17.4074 11.9388 17.4074H19C19.5523 17.4074 20 16.9597 20 16.4074V7C20 6.44772 19.5523 6 19 6H5ZM17 9H7V10H17V9ZM17 11H7V12H17V11ZM7 13H15V14H7V13Z" fill="#444444"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 547 B |
@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M18 18.0001L17.9952 16.401L13.5964 12.0025L17.9998 7.59937L17.9998 6L16.4004 6.00008L11.997 10.4032L7.59925 6.00568L5.99999 6.00013L5.99988 7.60497L10.3977 12.0025L6.00447 16.3954L6.00001 18.0001L7.60384 17.9947L11.997 13.6018L16.3958 18.0003L18 18.0001Z" fill="#444444"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 425 B |
@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M19 6H5L5 15H19V6ZM5 4C3.89543 4 3 4.89543 3 6V15C3 16.1046 3.89543 17 5 17H10V18H6V20H18V18H14V17H19C20.1046 17 21 16.1046 21 15V6C21 4.89543 20.1046 4 19 4H5Z" fill="#444444"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 331 B |
@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10.3765 15.128C9.98789 15.5187 9.35642 15.5214 8.96449 15.134L6.14517 12.3473C5.75561 11.9622 5.12876 11.9622 4.7392 12.3473L4.72038 12.3659C4.32403 12.7576 4.32441 13.3978 4.72124 13.7891L8.96526 17.974C9.35702 18.3603 9.98726 18.3576 10.3757 17.9679L20.2877 8.02323C20.6801 7.6296 20.67 6.9855 20.2729 6.59668C19.8804 6.21243 19.2454 6.21063 18.8581 6.60005L10.3765 15.128Z" fill="#8BB825"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 507 B |
@ -0,0 +1,4 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6 16V13H7.2V11H5C4.44772 11 4 11.4477 4 12V17C4 17.5523 4.44772 18 5 18H19C19.5523 18 20 17.5523 20 17V12C20 11.4477 19.5523 11 19 11H16.8V13H18V16H6Z" fill="#444444"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.9996 8.5L15.2025 8.5C15.7911 8.5 16 8.49063 16 8.75503C16 8.94763 15.8986 9.29489 15.6987 9.4874L12.6667 12.6478C12.179 13.1174 11.821 13.1174 11.3333 12.6478L8.30133 9.4874C8.10142 9.29489 8 8.94763 8 8.75503C8 8.49056 8.20889 8.5 8.79749 8.5C8.79749 8.5 9.4909 8.5 9.99708 8.5C9.99708 8.28638 9.99708 5 9.99708 5L13.9996 5C13.9996 5 13.9996 8.29916 13.9996 8.5Z" fill="#444444"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 757 B |
@ -0,0 +1,5 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="4" y="6" width="16" height="13" rx="1" stroke="#444444" stroke-width="2"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.148 8.69651C13.8858 8.43384 13.4601 8.43384 13.1979 8.69651V8.69651C12.9362 8.95858 12.9362 9.38302 13.1979 9.64509L15.3401 11.7908C15.7296 12.1809 15.7299 12.8126 15.3409 13.2031L13.1967 15.3554C12.9357 15.6173 12.9357 16.041 13.1967 16.3029V16.3029C13.4591 16.5663 13.8855 16.5663 14.1478 16.3029L17.3302 13.1086V13.1086C17.668 12.7702 17.668 12.2222 17.3302 11.8838L14.148 8.69651Z" fill="#444444"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.85199 16.3035C10.1142 16.5662 10.5399 16.5662 10.8021 16.3035V16.3035C11.0638 16.0414 11.0638 15.617 10.8021 15.3549L8.65987 13.2092C8.2704 12.8191 8.27006 12.1874 8.65911 11.7969L10.8033 9.64461C11.0643 9.38266 11.0643 8.959 10.8033 8.69706V8.69706C10.5409 8.43371 10.1145 8.43371 9.85218 8.69706L6.66983 11.8914V11.8914C6.33201 12.2298 6.33201 12.7778 6.66983 13.1162L9.85199 16.3035Z" fill="#444444"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.99857 1.6C4.46508 1.6 1.6 4.46548 1.6 8.00029C1.6 9.70508 2.26458 11.2515 3.35202 12.3999C4.52033 13.6337 6.16874 14.4 7.99857 14.4C11.5348 14.4 14.4 11.5335 14.4 8.00029C14.4 4.46592 11.5348 1.6 7.99857 1.6ZM0 8.00029C0 3.58219 3.58105 0 7.99857 0C12.4184 0 16 3.58219 16 8.00029C16 12.4172 12.4184 16 7.99857 16C5.71117 16 3.64805 15.0395 2.19023 13.5C0.83265 12.0663 0 10.1304 0 8.00029ZM7 4H9V9H7V4ZM9 10H7V12H9V10Z" fill="#CB0000"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 593 B |
@ -0,0 +1,8 @@
|
||||
<svg width="30" height="40" viewBox="0 0 30 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0 3C0 1.34315 1.34315 0 3 0H21.674C22.4697 0 23.2327 0.316071 23.7953 0.87868L29.1213 6.20465C29.6839 6.76726 30 7.53032 30 8.32597V37C30 38.6569 28.6569 40 27 40H3C1.34315 40 0 38.6569 0 37V3Z" fill="#3779A6"/>
|
||||
<path d="M22.9167 0L30.0001 7.08333H25.9167C24.2599 7.08333 22.9167 5.74019 22.9167 4.08333V0Z" fill="#1D5880"/>
|
||||
<path d="M6.17627 14.7059H23.8233V15.8823H6.17627V14.7059Z" fill="white"/>
|
||||
<path d="M6.17627 18.5294H23.8233V19.7059H6.17627V18.5294Z" fill="white"/>
|
||||
<path d="M6.17627 22.3529H23.8233V23.5294H6.17627V22.3529Z" fill="white"/>
|
||||
<path d="M6.17627 26.1765H23.8233V27.3529H6.17627V26.1765Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 738 B |
@ -0,0 +1,6 @@
|
||||
<svg width="30" height="40" viewBox="0 0 30 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0 3C0 1.34315 1.34315 0 3 0H22.9167L30 7.08333V37C30 38.6569 28.6569 40 27 40H3C1.34315 40 0 38.6569 0 37V3Z" fill="#27ABA3"/>
|
||||
<path d="M22.9165 0L29.9998 7.08333H25.9165C24.2597 7.08333 22.9165 5.74019 22.9165 4.08333V0Z" fill="#008078"/>
|
||||
<rect x="6.5" y="15.5" width="17" height="5" stroke="white"/>
|
||||
<rect x="6.5" y="23.5" width="17" height="5" stroke="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 477 B |
@ -0,0 +1,8 @@
|
||||
<svg width="30" height="40" viewBox="0 0 30 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0 3C0 1.34315 1.34315 0 3 0H22.9167L30 7.08333V37C30 38.6569 28.6569 40 27 40H3C1.34315 40 0 38.6569 0 37V3Z" fill="#F36700"/>
|
||||
<path d="M22.9167 0L30.0001 7.08333H25.9168C24.2599 7.08333 22.9167 5.74019 22.9167 4.08333V0Z" fill="#AB531F"/>
|
||||
<path d="M6.17627 16.1275H23.8233V17.3039H6.17627V16.1275Z" fill="white"/>
|
||||
<path d="M6.17627 28.7745L6.17627 16.1275L7.35274 16.1275L7.35274 28.7745H6.17627Z" fill="white"/>
|
||||
<path d="M23.8233 16.1275V28.7745H22.6469V16.1275L23.8233 16.1275Z" fill="white"/>
|
||||
<path d="M6.17627 27.598H23.8233V28.7745H6.17627L6.17627 27.598Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 691 B |
@ -0,0 +1,6 @@
|
||||
<svg width="30" height="40" viewBox="0 0 30 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M30 7.44186L22 0H3C1.22739 0 0 0.822551 0 2.32558V37.2093C0 38.7123 1.22739 40 3 40H27C28.7726 40 30 38.7123 30 37.2093V7.44186Z" fill="#D0D5DA"/>
|
||||
<path d="M24.1042 7.27273H29.9631L22 0V5.32334C22 6.4105 22.949 7.27273 24.1042 7.27273Z" fill="#646464"/>
|
||||
<path d="M16.9562 22.3485H12.9746V17.803H10.9839L14.9654 14.1667L18.947 17.803H16.9562V22.3485Z" fill="#646464"/>
|
||||
<path d="M20.9378 23.7121C20.9378 24.1666 20.4401 24.6212 19.9424 24.6212H9.98848C9.49078 24.6212 8.99309 24.1666 8.99309 23.7121V22.3485C8.99309 21.8939 9.49078 21.4394 9.98848 21.4394H10.9839V20.0757H9.49078C8.49539 20.0757 7.5 20.9848 7.5 21.8939V24.1666C7.5 25.0757 8.61982 25.9848 9.49078 25.9848H20.4401C21.3111 25.9848 22.4309 25.0757 22.4309 24.1666V21.8939C22.4309 20.9848 21.4355 20.0757 20.4401 20.0757H18.947V21.4394H19.9424C20.4401 21.4394 20.9378 21.8939 20.9378 22.3485V23.7121Z" fill="#646464"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 992 B |
@ -0,0 +1,12 @@
|
||||
<svg width="30" height="40" viewBox="0 0 30 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0 3C0 1.34315 1.34315 0 3 0H22.9167L30 7.08333V37C30 38.6569 28.6569 40 27 40H3C1.34315 40 0 38.6569 0 37V3Z" fill="#78A73B"/>
|
||||
<path d="M22.9167 0L30.0001 7.08333H25.9168C24.2599 7.08333 22.9167 5.74019 22.9167 4.08333V0Z" fill="#5A7D2B"/>
|
||||
<path d="M6.17644 15.2941H23.8235V16.4706H6.17644V15.2941Z" fill="white"/>
|
||||
<path d="M6.17644 19.1177H23.8235V20.2941H6.17644V19.1177Z" fill="white"/>
|
||||
<path d="M6.17644 22.9412H23.8235V24.1177H6.17644V22.9412Z" fill="white"/>
|
||||
<path d="M6.17644 26.7647H23.8235V27.9412H6.17644V26.7647Z" fill="white"/>
|
||||
<path d="M5.88232 27.9412L5.88232 15.2941L7.0588 15.2941L7.0588 27.9412H5.88232Z" fill="white"/>
|
||||
<path d="M11.4706 27.9412L11.4706 15.2941L12.647 15.2941V27.9412H11.4706Z" fill="white"/>
|
||||
<path d="M17.0588 27.9412L17.0588 15.2941L18.2353 15.2941V27.9412H17.0588Z" fill="white"/>
|
||||
<path d="M22.647 27.9412V15.2941H23.8235V27.9412H22.647Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1004 B |
@ -0,0 +1,4 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6 16V13H7V11H5C4.44772 11 4 11.4477 4 12V17C4 17.5523 4.44772 18 5 18H19C19.5523 18 20 17.5523 20 17V12C20 11.4477 19.5523 11 19 11H17V13H18V16H6Z" fill="#444444"/>
|
||||
<path d="M11 15H9V13L16 6H17V7H18V8L11 15Z" fill="#444444"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 379 B |
@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.4 10.4L4 4H20L13.6 10.4V17.8667V21.0667L10.4 17.8667V10.4Z" fill="#444444"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 233 B |
@ -0,0 +1,12 @@
|
||||
<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M2.84616 1H10.8462L14.8462 5V15H2.84616V1Z" fill="white"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.8462 5L10.8462 1H2.84616V15H14.8462V5ZM10.8462 0L15.8462 5V16H1.84616V0H10.8462Z" fill="#BFBFBF"/>
|
||||
<rect x="3.84616" y="10" width="10" height="4" fill="#3779A6"/>
|
||||
<path d="M3.84616 4H4.84616V5H3.84616V4Z" fill="#BFBFBF"/>
|
||||
<path d="M3.84616 6H4.84616V7H3.84616V6Z" fill="#BFBFBF"/>
|
||||
<path d="M4.84616 8H3.84616V9H4.84616V8Z" fill="#BFBFBF"/>
|
||||
<path d="M12.8462 8H5.84616V9H12.8462V8Z" fill="#BFBFBF"/>
|
||||
<path d="M7.84616 6H5.84616V7H7.84616V6Z" fill="#BFBFBF"/>
|
||||
<path d="M12.8462 4H5.84616V5H12.8462V4Z" fill="#BFBFBF"/>
|
||||
<path opacity="0.3" d="M9.84616 1H10.8462V4H14.8462L15.8462 5H9.84616V1Z" fill="#333333"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 832 B |
@ -0,0 +1,12 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M2 1H10L14 5V15H2V1Z" fill="white"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14 5L10 1H2V15H14V5ZM10 0L15 5V16H1V0H10Z" fill="#BFBFBF"/>
|
||||
<rect x="3" y="10" width="10" height="4" fill="#F36700"/>
|
||||
<path d="M3 4H4V5H3V4Z" fill="#BFBFBF"/>
|
||||
<path d="M3 6H4V7H3V6Z" fill="#BFBFBF"/>
|
||||
<path d="M4 8H3V9H4V8Z" fill="#BFBFBF"/>
|
||||
<path d="M12 8H5V9H12V8Z" fill="#BFBFBF"/>
|
||||
<path d="M7 6H5V7H7V6Z" fill="#BFBFBF"/>
|
||||
<path d="M12 4H5V5H12V4Z" fill="#BFBFBF"/>
|
||||
<path opacity="0.3" d="M9 1H10V4H14L15 5H9V1Z" fill="#333333"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 631 B |
@ -0,0 +1,12 @@
|
||||
<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M2.84592 1H10.8459L14.8459 5V15H2.84592V1Z" fill="white"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.8459 5L10.8459 1H2.84592V15H14.8459V5ZM10.8459 0L15.8459 5V16H1.84592V0H10.8459Z" fill="#BFBFBF"/>
|
||||
<rect x="3.84592" y="10" width="10" height="4" fill="#78A73B"/>
|
||||
<path d="M3.84592 4H4.84592V5H3.84592V4Z" fill="#BFBFBF"/>
|
||||
<path d="M3.84592 6H4.84592V7H3.84592V6Z" fill="#BFBFBF"/>
|
||||
<path d="M4.84592 8H3.84592V9H4.84592V8Z" fill="#BFBFBF"/>
|
||||
<path d="M12.8459 8H5.84592V9H12.8459V8Z" fill="#BFBFBF"/>
|
||||
<path d="M7.84592 6H5.84592V7H7.84592V6Z" fill="#BFBFBF"/>
|
||||
<path d="M12.8459 4H5.84592V5H12.8459V4Z" fill="#BFBFBF"/>
|
||||
<path opacity="0.3" d="M9.84592 1H10.8459V4H14.8459L15.8459 5H9.84592V1Z" fill="#333333"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 832 B |
@ -0,0 +1,3 @@
|
||||
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6 12C9.31371 12 12 9.31371 12 6C12 2.68629 9.31371 0 6 0C2.68629 0 0 2.68629 0 6C0 9.31371 2.68629 12 6 12ZM5 6C5 5.44772 5.44772 5 6 5C6.55228 5 7 5.44772 7 6V9C7 9.55229 6.55228 10 6 10C5.44772 10 5 9.55229 5 9V6ZM6 2C5.44772 2 5 2.44772 5 3C5 3.55228 5.44772 4 6 4C6.55228 4 7 3.55228 7 3C7 2.44772 6.55228 2 6 2Z" fill="#D0D5DA"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 488 B |
|
After Width: | Height: | Size: 673 B |
BIN
web/documentserver-example/csharp-mvc/Content/images/logo.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
@ -0,0 +1,15 @@
|
||||
<svg width="153" height="28" viewBox="0 0 153 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.3403 27.6567L0.801116 21.8897C-0.267039 21.3862 -0.267039 20.6081 0.801116 20.1504L5.16662 18.1365L13.2939 21.8897C14.362 22.3932 16.0804 22.3932 17.1021 21.8897L25.2294 18.1365L29.5949 20.1504C30.663 20.6539 30.663 21.432 29.5949 21.8897L17.0556 27.6567C16.0804 28.1144 14.362 28.1144 13.3403 27.6567Z" fill="#FF6F3D"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.3403 20.5623L0.801116 14.7953C-0.267039 14.2918 -0.267039 13.5137 0.801116 13.056L5.07373 11.0879L13.3403 14.8868C14.4085 15.3903 16.1268 15.3903 17.1485 14.8868L25.4151 11.0879L29.6877 13.056C30.7559 13.5595 30.7559 14.3376 29.6877 14.7953L17.1485 20.5623C16.0804 21.0658 14.362 21.0658 13.3403 20.5623Z" fill="#95C038"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.3403 13.651L0.801116 7.88393C-0.267039 7.38045 -0.267039 6.60236 0.801116 6.14466L13.3403 0.377605C14.4085 -0.125868 16.1268 -0.125868 17.1485 0.377605L29.6877 6.14466C30.7559 6.64813 30.7559 7.42622 29.6877 7.88393L17.1485 13.651C16.0804 14.1087 14.362 14.1087 13.3403 13.651Z" fill="#5DC0E8"/>
|
||||
<path d="M38.1528 13.9433C38.1528 11.5581 38.8442 9.75803 40.2731 8.58797C41.6559 7.3729 43.3152 6.78787 45.2051 6.78787C47.0949 6.78787 48.7081 7.3729 50.0909 8.58797C51.4737 9.80304 52.1651 11.5581 52.1651 13.9883C52.1651 16.3734 51.4737 18.1735 50.0909 19.3436C48.7081 20.5586 47.0488 21.1437 45.2051 21.1437C43.3152 21.1437 41.702 20.5586 40.2731 19.3436C38.8442 18.1285 38.1528 16.3284 38.1528 13.9433ZM41.195 13.9433C41.195 15.6084 41.5176 16.7784 42.1168 17.5435C42.7621 18.3085 43.4535 18.8035 44.191 18.9835C44.3754 19.0285 44.5137 19.0735 44.698 19.0735C44.8363 19.0735 45.0207 19.1185 45.159 19.1185C45.3433 19.1185 45.4816 19.1185 45.666 19.0735C45.8504 19.0735 45.9886 19.0285 46.173 18.9835C46.9105 18.8035 47.6019 18.3085 48.2011 17.5435C48.8003 16.7784 49.123 15.5633 49.123 13.9883C49.123 12.3682 48.8003 11.1981 48.2011 10.4331C47.6019 9.66803 46.9105 9.173 46.173 8.99299C45.9886 8.94799 45.8043 8.90299 45.666 8.90299C45.4816 8.90299 45.3433 8.85798 45.159 8.85798C44.9746 8.85798 44.8363 8.85798 44.698 8.90299C44.5598 8.90299 44.3754 8.94799 44.191 8.99299C43.4535 9.173 42.7621 9.66803 42.1168 10.4331C41.5176 11.1081 41.195 12.3232 41.195 13.9433Z" fill="white"/>
|
||||
<path d="M53.6863 6.92288H57.4659L62.444 15.7434L63.1814 17.6785H63.2275L63.1814 15.1583V6.92288H66.0853V20.9636H62.3057L57.3276 11.7831L56.5901 10.2081H56.544L56.5901 12.6832V20.9636H53.6863V6.92288Z" fill="white"/>
|
||||
<path d="M69.0813 6.92288H71.9852V18.5785H77.7007V20.9636H69.0813V6.92288Z" fill="white"/>
|
||||
<path d="M75.9031 6.92288H79.2679L82.2178 11.8281L82.6787 12.8182H82.7709L83.2319 11.8281L86.2279 6.92288H89.3161L84.1076 15.2483V20.9636H81.2038V15.2033L75.9031 6.92288Z" fill="white"/>
|
||||
<path d="M88.9473 13.9433C88.9473 11.5581 89.6387 9.75803 91.0675 8.58797C92.4503 7.3729 94.1097 6.78787 95.9995 6.78787C97.8893 6.78787 99.5026 7.3729 100.885 8.58797C102.268 9.80304 102.96 11.5581 102.96 13.9883C102.96 16.3734 102.268 18.1735 100.885 19.3436C99.5026 20.5586 97.8432 21.1437 95.9995 21.1437C94.1097 21.1437 92.4964 20.5586 91.0675 19.3436C89.6848 18.1285 88.9473 16.3284 88.9473 13.9433ZM91.9894 13.9433C91.9894 15.6084 92.3121 16.7784 92.9113 17.5435C93.5566 18.3085 94.2019 18.8035 94.9855 18.9835C95.1698 19.0285 95.3081 19.0735 95.4925 19.0735C95.6308 19.0735 95.8151 19.1185 95.9534 19.1185C96.1378 19.1185 96.2761 19.1185 96.4604 19.0735C96.6448 19.0735 96.7831 19.0285 96.9675 18.9835C97.7049 18.8035 98.3963 18.3085 98.9955 17.5435C99.5948 16.7784 99.9174 15.5633 99.9174 13.9883C99.9174 12.3682 99.5948 11.1981 98.9955 10.4331C98.3963 9.66803 97.7049 9.173 96.9675 8.99299C96.7831 8.94799 96.5987 8.90299 96.4604 8.90299C96.2761 8.90299 96.1378 8.85798 95.9534 8.85798C95.769 8.85798 95.6308 8.85798 95.4925 8.90299C95.3542 8.90299 95.1698 8.94799 94.9855 8.99299C94.248 9.173 93.5566 9.66803 92.9113 10.4331C92.3121 11.1081 91.9894 12.3232 91.9894 13.9433Z" fill="white"/>
|
||||
<path d="M104.988 6.92288H113.008V9.26301H107.891V12.6832H112.777V15.0683H107.891V20.9636H104.988V6.92288Z" fill="white"/>
|
||||
<path d="M115.174 6.92288H123.195V9.26301H118.078V12.6832H122.964V15.0683H118.078V20.9636H115.174V6.92288Z" fill="white"/>
|
||||
<path d="M124.9 20.9636V6.92288H127.804V20.9636H124.9Z" fill="white"/>
|
||||
<path d="M140.599 7.2378V9.66793C140.092 9.48792 139.585 9.35291 139.032 9.26291C138.478 9.1729 137.833 9.1279 137.188 9.1279C135.667 9.1279 134.515 9.57792 133.685 10.523C132.855 11.423 132.44 12.5931 132.44 13.9882C132.44 15.3382 132.809 16.4633 133.593 17.3633C134.376 18.2634 135.482 18.7584 136.911 18.7584C137.418 18.7584 137.925 18.7134 138.525 18.6684C139.124 18.5784 139.723 18.4434 140.368 18.1734L140.553 20.5585C140.46 20.6035 140.322 20.6485 140.184 20.6935C140 20.7385 139.815 20.7835 139.585 20.8285C139.216 20.9185 138.755 20.9635 138.202 21.0535C137.649 21.0985 137.096 21.1436 136.497 21.1436C136.404 21.1436 136.312 21.1436 136.266 21.1436C136.174 21.1436 136.082 21.1436 136.036 21.1436C134.376 21.0535 132.855 20.4235 131.472 19.3435C130.09 18.2184 129.398 16.4633 129.398 14.1232C129.398 11.828 130.09 10.0279 131.426 8.76788C132.763 7.50781 134.607 6.87778 136.865 6.87778C137.464 6.87778 138.018 6.87778 138.478 6.92278C138.986 6.96778 139.446 7.05779 139.953 7.14779C140.046 7.19279 140.184 7.19279 140.276 7.2378C140.368 7.19279 140.46 7.2378 140.599 7.2378Z" fill="white"/>
|
||||
<path d="M142.903 6.92294H151.523V9.12806H145.853V12.6383H150.97V14.7984H145.853V18.7586H151.523V20.9637H142.903V6.92294Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.5 KiB |
@ -0,0 +1,6 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M5 5C5 3.89543 5.89543 3 7 3H16C17.1046 3 18 3.89543 18 5V8H17V6H6V18H17V16H18V19C18 20.1046 17.1046 21 16 21H7C5.89543 21 5 20.1046 5 19V5ZM13 4H10V5H13V4ZM12 19.5C12 19.7761 11.7761 20 11.5 20C11.2239 20 11 19.7761 11 19.5C11 19.2239 11.2239 19 11.5 19C11.7761 19 12 19.2239 12 19.5Z" fill="#444444"/>
|
||||
<rect x="7" y="9" width="1" height="6" fill="#444444"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 8V9L11 9V15H12V16H9V15H10V9H9V8H12Z" fill="#444444"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 10H18V14H15H14H13V15H14H18C18.5523 15 19 14.5523 19 14V10C19 9.44772 18.5523 9 18 9H14H13V10H14H15Z" fill="#444444"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 790 B |
@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8 3C6.89543 3 6 3.89543 6 5V19C6 20.1046 6.89543 21 8 21H16C17.1046 21 18 20.1046 18 19V5C18 3.89543 17.1046 3 16 3H8ZM16.8462 6H7.15385V18H16.8462V6ZM10.3846 4H13.6154V5H10.3846V4ZM12 20C12.2974 20 12.5385 19.7761 12.5385 19.5C12.5385 19.2239 12.2974 19 12 19C11.7026 19 11.4615 19.2239 11.4615 19.5C11.4615 19.7761 11.7026 20 12 20Z" fill="#444444"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 506 B |
@ -0,0 +1,5 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g opacity="0.3">
|
||||
<path d="M10.3826 15.3872C9.9926 15.7862 9.35162 15.7889 8.95828 15.3933L6.15133 12.5701C5.76034 12.1768 5.12403 12.1768 4.73304 12.5701L4.70185 12.6015C4.31371 12.9918 4.31409 13.6225 4.7027 14.0124L8.95904 18.2831C9.35223 18.6776 9.99196 18.6749 10.3817 18.277L20.3062 8.14519C20.6903 7.75301 20.6865 7.12447 20.2976 6.73701L20.273 6.71257C19.8791 6.32014 19.2408 6.32437 18.8521 6.722L10.3826 15.3872Z" fill="#444444"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 549 B |
@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6 5C5.44772 5 5 5.44772 5 6V18C5 18.5523 5.44772 19 6 19H17C17.5523 19 18 18.5523 18 18V13.4142L14.4142 17H11V15H8V14H11V13.5858L11.5858 13H8V12H12.5858L13.5858 11H8V10H14.5858L18 6.58579V6C18 5.44772 17.5523 5 17 5H6ZM8 8H15V9H8V8ZM12 16H14L21 9V8H20V7H19L12 14V16Z" fill="#444444"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 438 B |
BIN
web/documentserver-example/csharp-mvc/Content/images/slide.ico
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
web/documentserver-example/csharp-mvc/Content/images/word.ico
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
464
web/documentserver-example/csharp-mvc/Content/jquery-ui.css
vendored
Normal file
@ -0,0 +1,464 @@
|
||||
/*! jQuery UI - v1.9.2 - 2012-11-23
|
||||
* http://jqueryui.com
|
||||
* Includes: jquery.ui.core.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css, jquery.ui.theme.css
|
||||
* Copyright 2012 jQuery Foundation and other contributors; Licensed MIT */
|
||||
|
||||
/* Layout helpers
|
||||
----------------------------------*/
|
||||
.ui-helper-hidden { display: none; }
|
||||
.ui-helper-hidden-accessible { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
|
||||
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
|
||||
.ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; }
|
||||
.ui-helper-clearfix:after { clear: both; }
|
||||
.ui-helper-clearfix { zoom: 1; }
|
||||
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
|
||||
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
.ui-state-disabled { cursor: default !important; }
|
||||
|
||||
|
||||
/* Icons
|
||||
----------------------------------*/
|
||||
|
||||
/* states and images */
|
||||
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
|
||||
|
||||
|
||||
/* Misc visuals
|
||||
----------------------------------*/
|
||||
|
||||
/* Overlays */
|
||||
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
|
||||
|
||||
.ui-accordion .ui-accordion-header { display: block; cursor: pointer; position: relative; margin-top: 2px; padding: .5em .5em .5em .7em; zoom: 1; }
|
||||
.ui-accordion .ui-accordion-icons { padding-left: 2.2em; }
|
||||
.ui-accordion .ui-accordion-noicons { padding-left: .7em; }
|
||||
.ui-accordion .ui-accordion-icons .ui-accordion-icons { padding-left: 2.2em; }
|
||||
.ui-accordion .ui-accordion-header .ui-accordion-header-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
|
||||
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; overflow: auto; zoom: 1; }
|
||||
|
||||
.ui-autocomplete {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/* workarounds */
|
||||
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
|
||||
|
||||
.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
|
||||
.ui-button, .ui-button:link, .ui-button:visited, .ui-button:hover, .ui-button:active { text-decoration: none; }
|
||||
.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
|
||||
button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
|
||||
.ui-button-icons-only { width: 3.4em; }
|
||||
button.ui-button-icons-only { width: 3.7em; }
|
||||
|
||||
/*button text element */
|
||||
.ui-button .ui-button-text { display: block; line-height: 1.4; }
|
||||
.ui-button-text-only .ui-button-text { padding: .4em 1em; }
|
||||
.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
|
||||
.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
|
||||
.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
|
||||
.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
|
||||
/* no icon support for input elements, provide padding by default */
|
||||
input.ui-button { padding: .4em 1em; }
|
||||
|
||||
/*button icon element(s) */
|
||||
.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
|
||||
.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
|
||||
.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
|
||||
.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
|
||||
.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
|
||||
|
||||
/*button sets*/
|
||||
.ui-buttonset { margin-right: 7px; }
|
||||
.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
|
||||
|
||||
/* workarounds */
|
||||
button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
|
||||
|
||||
.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
|
||||
.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
|
||||
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
|
||||
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
|
||||
.ui-datepicker .ui-datepicker-prev { left:2px; }
|
||||
.ui-datepicker .ui-datepicker-next { right:2px; }
|
||||
.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
|
||||
.ui-datepicker .ui-datepicker-next-hover { right:1px; }
|
||||
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
|
||||
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
|
||||
.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
|
||||
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
|
||||
.ui-datepicker select.ui-datepicker-month,
|
||||
.ui-datepicker select.ui-datepicker-year { width: 49%;}
|
||||
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
|
||||
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
|
||||
.ui-datepicker td { border: 0; padding: 1px; }
|
||||
.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
|
||||
.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
|
||||
.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
|
||||
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
|
||||
|
||||
/* with multiple calendars */
|
||||
.ui-datepicker.ui-datepicker-multi { width:auto; }
|
||||
.ui-datepicker-multi .ui-datepicker-group { float:left; }
|
||||
.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
|
||||
.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
|
||||
.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
|
||||
.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
|
||||
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
|
||||
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
|
||||
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
|
||||
.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
|
||||
|
||||
/* RTL support */
|
||||
.ui-datepicker-rtl { direction: rtl; }
|
||||
.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group { float:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
||||
|
||||
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
|
||||
.ui-datepicker-cover {
|
||||
position: absolute; /*must have*/
|
||||
z-index: -1; /*must have*/
|
||||
filter: mask(); /*must have*/
|
||||
top: -4px; /*must have*/
|
||||
left: -4px; /*must have*/
|
||||
width: 200px; /*must have*/
|
||||
height: 200px; /*must have*/
|
||||
}
|
||||
.ui-dialog { position: absolute; top: 0; left: 0; padding: .2em; width: 650px; overflow: hidden; }
|
||||
.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
|
||||
.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
|
||||
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
|
||||
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
|
||||
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
|
||||
.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
|
||||
.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
|
||||
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
|
||||
.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
|
||||
.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
|
||||
.ui-draggable .ui-dialog-titlebar { cursor: move; }
|
||||
|
||||
.ui-menu { list-style:none; padding: 2px; margin: 0; display:block; outline: none; }
|
||||
.ui-menu .ui-menu { margin-top: -3px; position: absolute; }
|
||||
.ui-menu .ui-menu-item { margin: 0; padding: 0; zoom: 1; width: 100%; }
|
||||
.ui-menu .ui-menu-divider { margin: 5px -2px 5px -2px; height: 0; font-size: 0; line-height: 0; border-width: 1px 0 0 0; }
|
||||
.ui-menu .ui-menu-item a { text-decoration: none; display: block; padding: 2px .4em; line-height: 1.5; zoom: 1; font-weight: normal; }
|
||||
.ui-menu .ui-menu-item a.ui-state-focus,
|
||||
.ui-menu .ui-menu-item a.ui-state-active { font-weight: normal; margin: -1px; }
|
||||
|
||||
.ui-menu .ui-state-disabled { font-weight: normal; margin: .4em 0 .2em; line-height: 1.5; }
|
||||
.ui-menu .ui-state-disabled a { cursor: default; }
|
||||
|
||||
/* icon support */
|
||||
.ui-menu-icons { position: relative; }
|
||||
.ui-menu-icons .ui-menu-item a { position: relative; padding-left: 2em; }
|
||||
|
||||
/* left-aligned */
|
||||
.ui-menu .ui-icon { position: absolute; top: .2em; left: .2em; }
|
||||
|
||||
/* right-aligned */
|
||||
.ui-menu .ui-menu-icon { position: static; float: right; }
|
||||
|
||||
.ui-progressbar { height:2em; text-align: left; overflow: hidden; }
|
||||
.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
|
||||
.ui-resizable { position: relative;}
|
||||
.ui-resizable-handle { position: absolute;font-size: 0.1px; display: block; }
|
||||
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
|
||||
.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
|
||||
.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
|
||||
.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
|
||||
.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
|
||||
.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
|
||||
.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
|
||||
.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
|
||||
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}
|
||||
.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
|
||||
|
||||
.ui-slider { position: relative; text-align: left; }
|
||||
.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
|
||||
.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
|
||||
|
||||
.ui-slider-horizontal { height: .8em; }
|
||||
.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
|
||||
.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
|
||||
.ui-slider-horizontal .ui-slider-range-min { left: 0; }
|
||||
.ui-slider-horizontal .ui-slider-range-max { right: 0; }
|
||||
|
||||
.ui-slider-vertical { width: .8em; height: 100px; }
|
||||
.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
|
||||
.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
|
||||
.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
|
||||
.ui-slider-vertical .ui-slider-range-max { top: 0; }
|
||||
.ui-spinner { position:relative; display: inline-block; overflow: hidden; padding: 0; vertical-align: middle; }
|
||||
.ui-spinner-input { border: none; background: none; padding: 0; margin: .2em 0; vertical-align: middle; margin-left: .4em; margin-right: 22px; }
|
||||
.ui-spinner-button { width: 16px; height: 50%; font-size: .5em; padding: 0; margin: 0; text-align: center; position: absolute; cursor: default; display: block; overflow: hidden; right: 0; }
|
||||
.ui-spinner a.ui-spinner-button { border-top: none; border-bottom: none; border-right: none; } /* more specificity required here to overide default borders */
|
||||
.ui-spinner .ui-icon { position: absolute; margin-top: -8px; top: 50%; left: 0; } /* vertical centre icon */
|
||||
.ui-spinner-up { top: 0; }
|
||||
.ui-spinner-down { bottom: 0; }
|
||||
|
||||
/* TR overrides */
|
||||
.ui-spinner .ui-icon-triangle-1-s {
|
||||
/* need to fix icons sprite */
|
||||
background-position:-65px -16px;
|
||||
}
|
||||
|
||||
.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
||||
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
|
||||
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 0; margin: 1px .2em 0 0; border-bottom: 0; padding: 0; white-space: nowrap; }
|
||||
.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-active { margin-bottom: -1px; padding-bottom: 1px; }
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-active a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-tabs-loading a { cursor: text; }
|
||||
.ui-tabs .ui-tabs-nav li a, .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
||||
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
|
||||
|
||||
.ui-tooltip {
|
||||
padding: 8px;
|
||||
position: absolute;
|
||||
z-index: 9999;
|
||||
max-width: 300px;
|
||||
-webkit-box-shadow: 0 0 5px #aaa;
|
||||
box-shadow: 0 0 5px #aaa;
|
||||
}
|
||||
/* Fades and background-images don't work well together in IE6, drop the image */
|
||||
* html .ui-tooltip {
|
||||
background-image: none;
|
||||
}
|
||||
body .ui-tooltip { border-width: 2px; }
|
||||
|
||||
/* Component containers
|
||||
----------------------------------*/
|
||||
.ui-widget { font-family: 'Open Sans',sans-serif; font-size: 1.1em; }
|
||||
.ui-widget .ui-widget { font-size: 1em; }
|
||||
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: 'Open Sans',sans-serif; font-size: 1em; }
|
||||
.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff 50% 50% repeat-x; color: #222222; }
|
||||
.ui-widget-content a { color: #222222; }
|
||||
.ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc 50% 50% repeat-x; color: #222222; font-weight: bold; }
|
||||
.ui-widget-header a { color: #222222; }
|
||||
|
||||
/* Interaction states
|
||||
----------------------------------*/
|
||||
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 50% 50% repeat-x; font-weight: normal; color: #555555; }
|
||||
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; }
|
||||
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada 50% 50% repeat-x; font-weight: normal; color: #212121; }
|
||||
.ui-state-hover a, .ui-state-hover a:hover, .ui-state-hover a:link, .ui-state-hover a:visited { color: #212121; text-decoration: none; }
|
||||
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff 50% 50% repeat-x; font-weight: normal; color: #212121; }
|
||||
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; }
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee 50% 50% repeat-x; color: #363636; }
|
||||
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
|
||||
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec 50% 50% repeat-x; color: #cd0a0a; }
|
||||
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
|
||||
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
|
||||
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
|
||||
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
|
||||
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
|
||||
.ui-state-disabled .ui-icon { filter:Alpha(Opacity=35); } /* For IE8 - See #6059 */
|
||||
|
||||
/* Icons
|
||||
----------------------------------*/
|
||||
|
||||
/* positioning */
|
||||
.ui-icon-carat-1-n { background-position: 0 0; }
|
||||
.ui-icon-carat-1-ne { background-position: -16px 0; }
|
||||
.ui-icon-carat-1-e { background-position: -32px 0; }
|
||||
.ui-icon-carat-1-se { background-position: -48px 0; }
|
||||
.ui-icon-carat-1-s { background-position: -64px 0; }
|
||||
.ui-icon-carat-1-sw { background-position: -80px 0; }
|
||||
.ui-icon-carat-1-w { background-position: -96px 0; }
|
||||
.ui-icon-carat-1-nw { background-position: -112px 0; }
|
||||
.ui-icon-carat-2-n-s { background-position: -128px 0; }
|
||||
.ui-icon-carat-2-e-w { background-position: -144px 0; }
|
||||
.ui-icon-triangle-1-n { background-position: 0 -16px; }
|
||||
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
|
||||
.ui-icon-triangle-1-e { background-position: -32px -16px; }
|
||||
.ui-icon-triangle-1-se { background-position: -48px -16px; }
|
||||
.ui-icon-triangle-1-s { background-position: -64px -16px; }
|
||||
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
|
||||
.ui-icon-triangle-1-w { background-position: -96px -16px; }
|
||||
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
|
||||
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
|
||||
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
|
||||
.ui-icon-arrow-1-n { background-position: 0 -32px; }
|
||||
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
|
||||
.ui-icon-arrow-1-e { background-position: -32px -32px; }
|
||||
.ui-icon-arrow-1-se { background-position: -48px -32px; }
|
||||
.ui-icon-arrow-1-s { background-position: -64px -32px; }
|
||||
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
|
||||
.ui-icon-arrow-1-w { background-position: -96px -32px; }
|
||||
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
|
||||
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
|
||||
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
|
||||
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
|
||||
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
|
||||
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
|
||||
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
|
||||
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
|
||||
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
|
||||
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
|
||||
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
|
||||
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
|
||||
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
|
||||
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
|
||||
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
|
||||
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
|
||||
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
|
||||
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
|
||||
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
|
||||
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
|
||||
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
|
||||
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
|
||||
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
|
||||
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
|
||||
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
|
||||
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
|
||||
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
|
||||
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
|
||||
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
|
||||
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
|
||||
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
|
||||
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
|
||||
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
|
||||
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
|
||||
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
|
||||
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
|
||||
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
|
||||
.ui-icon-arrow-4 { background-position: 0 -80px; }
|
||||
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
|
||||
.ui-icon-extlink { background-position: -32px -80px; }
|
||||
.ui-icon-newwin { background-position: -48px -80px; }
|
||||
.ui-icon-refresh { background-position: -64px -80px; }
|
||||
.ui-icon-shuffle { background-position: -80px -80px; }
|
||||
.ui-icon-transfer-e-w { background-position: -96px -80px; }
|
||||
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
|
||||
.ui-icon-folder-collapsed { background-position: 0 -96px; }
|
||||
.ui-icon-folder-open { background-position: -16px -96px; }
|
||||
.ui-icon-document { background-position: -32px -96px; }
|
||||
.ui-icon-document-b { background-position: -48px -96px; }
|
||||
.ui-icon-note { background-position: -64px -96px; }
|
||||
.ui-icon-mail-closed { background-position: -80px -96px; }
|
||||
.ui-icon-mail-open { background-position: -96px -96px; }
|
||||
.ui-icon-suitcase { background-position: -112px -96px; }
|
||||
.ui-icon-comment { background-position: -128px -96px; }
|
||||
.ui-icon-person { background-position: -144px -96px; }
|
||||
.ui-icon-print { background-position: -160px -96px; }
|
||||
.ui-icon-trash { background-position: -176px -96px; }
|
||||
.ui-icon-locked { background-position: -192px -96px; }
|
||||
.ui-icon-unlocked { background-position: -208px -96px; }
|
||||
.ui-icon-bookmark { background-position: -224px -96px; }
|
||||
.ui-icon-tag { background-position: -240px -96px; }
|
||||
.ui-icon-home { background-position: 0 -112px; }
|
||||
.ui-icon-flag { background-position: -16px -112px; }
|
||||
.ui-icon-calendar { background-position: -32px -112px; }
|
||||
.ui-icon-cart { background-position: -48px -112px; }
|
||||
.ui-icon-pencil { background-position: -64px -112px; }
|
||||
.ui-icon-clock { background-position: -80px -112px; }
|
||||
.ui-icon-disk { background-position: -96px -112px; }
|
||||
.ui-icon-calculator { background-position: -112px -112px; }
|
||||
.ui-icon-zoomin { background-position: -128px -112px; }
|
||||
.ui-icon-zoomout { background-position: -144px -112px; }
|
||||
.ui-icon-search { background-position: -160px -112px; }
|
||||
.ui-icon-wrench { background-position: -176px -112px; }
|
||||
.ui-icon-gear { background-position: -192px -112px; }
|
||||
.ui-icon-heart { background-position: -208px -112px; }
|
||||
.ui-icon-star { background-position: -224px -112px; }
|
||||
.ui-icon-link { background-position: -240px -112px; }
|
||||
.ui-icon-cancel { background-position: 0 -128px; }
|
||||
.ui-icon-plus { background-position: -16px -128px; }
|
||||
.ui-icon-plusthick { background-position: -32px -128px; }
|
||||
.ui-icon-minus { background-position: -48px -128px; }
|
||||
.ui-icon-minusthick { background-position: -64px -128px; }
|
||||
.ui-icon-close { background-position: -80px -128px; }
|
||||
.ui-icon-closethick { background-position: -96px -128px; }
|
||||
.ui-icon-key { background-position: -112px -128px; }
|
||||
.ui-icon-lightbulb { background-position: -128px -128px; }
|
||||
.ui-icon-scissors { background-position: -144px -128px; }
|
||||
.ui-icon-clipboard { background-position: -160px -128px; }
|
||||
.ui-icon-copy { background-position: -176px -128px; }
|
||||
.ui-icon-contact { background-position: -192px -128px; }
|
||||
.ui-icon-image { background-position: -208px -128px; }
|
||||
.ui-icon-video { background-position: -224px -128px; }
|
||||
.ui-icon-script { background-position: -240px -128px; }
|
||||
.ui-icon-alert { background-position: 0 -144px; }
|
||||
.ui-icon-info { background-position: -16px -144px; }
|
||||
.ui-icon-notice { background-position: -32px -144px; }
|
||||
.ui-icon-help { background-position: -48px -144px; }
|
||||
.ui-icon-check { background-position: -64px -144px; }
|
||||
.ui-icon-bullet { background-position: -80px -144px; }
|
||||
.ui-icon-radio-on { background-position: -96px -144px; }
|
||||
.ui-icon-radio-off { background-position: -112px -144px; }
|
||||
.ui-icon-pin-w { background-position: -128px -144px; }
|
||||
.ui-icon-pin-s { background-position: -144px -144px; }
|
||||
.ui-icon-play { background-position: 0 -160px; }
|
||||
.ui-icon-pause { background-position: -16px -160px; }
|
||||
.ui-icon-seek-next { background-position: -32px -160px; }
|
||||
.ui-icon-seek-prev { background-position: -48px -160px; }
|
||||
.ui-icon-seek-end { background-position: -64px -160px; }
|
||||
.ui-icon-seek-start { background-position: -80px -160px; }
|
||||
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
|
||||
.ui-icon-seek-first { background-position: -80px -160px; }
|
||||
.ui-icon-stop { background-position: -96px -160px; }
|
||||
.ui-icon-eject { background-position: -112px -160px; }
|
||||
.ui-icon-volume-off { background-position: -128px -160px; }
|
||||
.ui-icon-volume-on { background-position: -144px -160px; }
|
||||
.ui-icon-power { background-position: 0 -176px; }
|
||||
.ui-icon-signal-diag { background-position: -16px -176px; }
|
||||
.ui-icon-signal { background-position: -32px -176px; }
|
||||
.ui-icon-battery-0 { background-position: -48px -176px; }
|
||||
.ui-icon-battery-1 { background-position: -64px -176px; }
|
||||
.ui-icon-battery-2 { background-position: -80px -176px; }
|
||||
.ui-icon-battery-3 { background-position: -96px -176px; }
|
||||
.ui-icon-circle-plus { background-position: 0 -192px; }
|
||||
.ui-icon-circle-minus { background-position: -16px -192px; }
|
||||
.ui-icon-circle-close { background-position: -32px -192px; }
|
||||
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
|
||||
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
|
||||
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
|
||||
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
|
||||
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
|
||||
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
|
||||
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
|
||||
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
|
||||
.ui-icon-circle-zoomin { background-position: -176px -192px; }
|
||||
.ui-icon-circle-zoomout { background-position: -192px -192px; }
|
||||
.ui-icon-circle-check { background-position: -208px -192px; }
|
||||
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
|
||||
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
|
||||
.ui-icon-circlesmall-close { background-position: -32px -208px; }
|
||||
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
|
||||
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
|
||||
.ui-icon-squaresmall-close { background-position: -80px -208px; }
|
||||
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
|
||||
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
|
||||
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
|
||||
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
|
||||
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
|
||||
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
|
||||
|
||||
|
||||
/* Misc visuals
|
||||
----------------------------------*/
|
||||
|
||||
/* Corner radius */
|
||||
.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; }
|
||||
.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; }
|
||||
.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
|
||||
.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
|
||||
|
||||
/* Overlays */
|
||||
.ui-widget-overlay { background: #aaaaaa 50% 50% repeat-x; opacity: .3;filter:Alpha(Opacity=30); }
|
||||
.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa 50% 50% repeat-x; opacity: .3;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }
|
||||
684
web/documentserver-example/csharp-mvc/Content/media.css
Normal file
@ -0,0 +1,684 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
@media (min-width: 1280px) and (max-width: 1380px) {
|
||||
.copy {
|
||||
margin-right: 6.5%;
|
||||
}
|
||||
|
||||
footer table tr td:first-child {
|
||||
margin-left: 6.5%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1280px) and (min-width: 1080px) {
|
||||
|
||||
.tableRow td:first-child {
|
||||
flex-grow: 1;
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
.tableHeaderCellFileName {
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
.tableHeaderCellEditors {
|
||||
width: 13%;
|
||||
}
|
||||
|
||||
.tableHeaderCellViewers {
|
||||
width: 29%;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.tableHeaderCellDownload {
|
||||
width: 21%;
|
||||
padding-right: 18px;
|
||||
}
|
||||
|
||||
.tableHeaderCellRemove {
|
||||
padding-left: 13px;
|
||||
}
|
||||
|
||||
footer table tr td:first-child {
|
||||
margin-left: 5%;
|
||||
}
|
||||
|
||||
.copy {
|
||||
margin-right: 5%;
|
||||
padding-right: 32px;
|
||||
}
|
||||
|
||||
.left-panel {
|
||||
margin-left: 48px;
|
||||
width: 20%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1080px) {
|
||||
.copy {
|
||||
margin-right: 32px;
|
||||
}
|
||||
|
||||
footer table tr td:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.tableRow {
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
.tableHeaderCellFileName {
|
||||
width: 16%;
|
||||
}
|
||||
|
||||
.tableHeaderCellEditors {
|
||||
width: 13%;
|
||||
}
|
||||
|
||||
.tableHeaderCellViewers {
|
||||
width: 38%;
|
||||
}
|
||||
|
||||
.tableHeaderCellDownload {
|
||||
width: 23%;
|
||||
}
|
||||
|
||||
.tableHeaderCellRemove {
|
||||
padding-left: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1008px) {
|
||||
.left-panel {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.main-panel {
|
||||
left: -1%;
|
||||
padding: 48px 26px 24px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 769px) and (min-width: 593px) {
|
||||
.contentCells-icon{
|
||||
width: 5%;
|
||||
}
|
||||
.tableRow {
|
||||
width: 55%;
|
||||
}
|
||||
|
||||
.tableRow td:first-child {
|
||||
border: none;
|
||||
flex-grow: 1;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.tableHeader {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.scroll-table-body {
|
||||
top: 31px;
|
||||
}
|
||||
|
||||
footer {
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.main {
|
||||
height: calc(100% - 128px);
|
||||
}
|
||||
|
||||
.main-panel {
|
||||
left: 0;
|
||||
padding: 48px 18px 24px;
|
||||
}
|
||||
|
||||
footer table td {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
padding-right: 4px;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
.copy {
|
||||
margin:auto;
|
||||
padding-right: 3%;
|
||||
}
|
||||
|
||||
footer table tr td:first-child {
|
||||
margin-left: auto;
|
||||
padding-left: 1%;
|
||||
margin-right: 1.5%;
|
||||
}
|
||||
|
||||
.contentCells-shift {
|
||||
padding-right: 22px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 715px) {
|
||||
.tableRow {
|
||||
width: 45%;
|
||||
}
|
||||
}
|
||||
@media (max-width: 670px) and (min-width: 620px){
|
||||
.main-panel{
|
||||
width: 90%;
|
||||
}
|
||||
}
|
||||
@media (max-width: 681px) and (min-width: 593px) {
|
||||
|
||||
.left-panel {
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
.main-panel {
|
||||
left: 2%;
|
||||
padding: 48px 0 24px;
|
||||
}
|
||||
|
||||
.help-block {
|
||||
margin: 48px 20px 24px;
|
||||
}
|
||||
.file-upload{
|
||||
width: 100%;
|
||||
}
|
||||
#fileupload{
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1080px) and (min-width: 970px) {
|
||||
.tableHeader {
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
.tableRow td:first-child {
|
||||
flex-grow: 0;
|
||||
width: 15%;
|
||||
}
|
||||
|
||||
.tableHeaderCellFileName {
|
||||
width: 16%;
|
||||
}
|
||||
|
||||
.tableHeaderCellEditors {
|
||||
width: 13%;
|
||||
}
|
||||
|
||||
.tableHeaderCellViewers {
|
||||
text-align: right;
|
||||
width: 37%;
|
||||
}
|
||||
|
||||
.tableHeaderCellDownload {
|
||||
padding-right: 22px;
|
||||
width: 22%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 986px) and (min-width: 890px) {
|
||||
.tableHeader {
|
||||
width: 75%;
|
||||
}
|
||||
|
||||
.tableHeaderCellEditors {
|
||||
width: 26%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.tableHeaderCellFileName {
|
||||
width: 17%;
|
||||
}
|
||||
|
||||
.tableHeaderCellViewers {
|
||||
width: 27%;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.tableHeaderCellDownload {
|
||||
padding-right: 18px;
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.tableHeaderCellRemove {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.tableRow {
|
||||
width: 75%;
|
||||
}
|
||||
|
||||
.tableRow td:last-child {
|
||||
padding-right: 38px;
|
||||
}
|
||||
|
||||
.tableRow td:first-child {
|
||||
flex-grow: 0;
|
||||
width: 15%;
|
||||
}
|
||||
|
||||
.contentCells-icon {
|
||||
width: 3%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 890px) and (min-width: 769px ) {
|
||||
.left-panel{
|
||||
width: 20%;
|
||||
}
|
||||
.contentCells-shift {
|
||||
padding-right: 28px;
|
||||
}
|
||||
|
||||
.main-panel {
|
||||
width: 580px;
|
||||
}
|
||||
|
||||
.tableRow {
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
.tableHeader {
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
.tableHeaderCellViewers {
|
||||
width: 22%;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.tableHeaderCellDownload {
|
||||
padding-right: 4px;
|
||||
width: 20%;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.tableHeaderCellFileName {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.tableHeaderCellEditors {
|
||||
text-align: left;
|
||||
width: 31%;
|
||||
}
|
||||
|
||||
.tableHeaderCellViewers {
|
||||
width: 18%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 890px) {
|
||||
.tableRow td:first-child {
|
||||
max-width: 17%;
|
||||
}
|
||||
#portal-info {
|
||||
max-width: 60vw;
|
||||
}
|
||||
}
|
||||
|
||||
.downloadContentCellShift:after {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
content: "";
|
||||
background: #e5e5e5;
|
||||
height: 1px;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@media (max-width: 769px) {
|
||||
.tableRow td:first-child {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media (max-width: 593px ) {
|
||||
#portal-info {
|
||||
width: 50vw;
|
||||
}
|
||||
.file-upload{
|
||||
width: 100%;
|
||||
}
|
||||
#fileupload{
|
||||
width: 100%;
|
||||
}
|
||||
.tableHeader {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.scroll-table-body {
|
||||
top: 31px;
|
||||
}
|
||||
|
||||
footer table tr {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
footer table td {
|
||||
padding-top: 16px;
|
||||
padding-right: 32px;
|
||||
padding-left: 32px;
|
||||
}
|
||||
|
||||
footer {
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.main {
|
||||
height: calc(100% - 128px);
|
||||
}
|
||||
|
||||
.copy {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.left-panel {
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
.help-block {
|
||||
margin: 16px 10px 6px;
|
||||
}
|
||||
|
||||
.main-panel {
|
||||
left: 2%;
|
||||
padding: 16px 0 6px;
|
||||
}
|
||||
|
||||
.tableRow {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
.tableRow td {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.firstContentCellShift {
|
||||
border: none;
|
||||
flex-basis: 10%;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.downloadContentCellShift {
|
||||
max-width: 7%;
|
||||
margin-right: -11px;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.contentCells-icon {
|
||||
width: 13%;
|
||||
}
|
||||
|
||||
.tableRow td:last-child {
|
||||
width: 12%;
|
||||
padding-right: 40px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.contentCells-shift {
|
||||
padding-right: 35px;
|
||||
}
|
||||
|
||||
.downloadContentCellShift:after {
|
||||
width: 85%;
|
||||
}
|
||||
|
||||
.firstContentCellViewers {
|
||||
margin-left: 0;
|
||||
border-bottom: 1px solid #e5e5e5 !important;
|
||||
}
|
||||
|
||||
.firstContentCellViewers ~ td {
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
}
|
||||
.tableRow td:first-child{
|
||||
border: none;
|
||||
width: 85%;
|
||||
}
|
||||
.contentCellsEmpty{
|
||||
display: none;
|
||||
width: 1%;
|
||||
}
|
||||
/* Mobile Upload*/
|
||||
.blockUI.blockMsg.blockPage.ui-dialog.ui-widget.ui-corner-all.ui-widget-content.ui-draggable {
|
||||
width: 344px !important;
|
||||
box-shadow: 0px 7px 15px rgba(85, 85, 85, 0.1);
|
||||
border-radius: 2px;
|
||||
top: 10% !important;
|
||||
margin-left: -172px !important;
|
||||
}
|
||||
|
||||
.ui-dialog .ui-dialog-titlebar {
|
||||
padding: 0;
|
||||
}
|
||||
.ui-dialog .ui-dialog-content {
|
||||
padding: 0 !important;
|
||||
}
|
||||
#mainProgress {
|
||||
margin: 24px 16px 0 !important;
|
||||
}
|
||||
.blockTitle {
|
||||
padding: 10px 10px 6px 16px !important;
|
||||
font-size: 14px !important;
|
||||
}
|
||||
#mainProgress .describeUpload {
|
||||
padding: 8px 0 !important;
|
||||
}
|
||||
.dialog-close {
|
||||
margin: 0 !important;
|
||||
}
|
||||
.step-descr{
|
||||
line-height: 150%;
|
||||
}
|
||||
.step {
|
||||
line-height: 160%;
|
||||
}
|
||||
.buttonsMobile{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.button.gray{
|
||||
margin: 0;
|
||||
}
|
||||
.button, .button:hover{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 0 !important;
|
||||
width: 144px;
|
||||
height: 56px;
|
||||
margin-bottom: 24px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 560px) and (min-width: 510px) {
|
||||
.contentCells-icon {
|
||||
width: 13%;
|
||||
}
|
||||
|
||||
.downloadContentCellShift {
|
||||
padding-right: 45px;
|
||||
max-width: 4%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 510px) and (min-width: 470px) {
|
||||
.tableRow {
|
||||
width: 35%;
|
||||
}
|
||||
|
||||
.tableRow td:first-child{
|
||||
width: 83%;
|
||||
}
|
||||
.contentCells-icon {
|
||||
width: 13%;
|
||||
}
|
||||
|
||||
.downloadContentCellShift {
|
||||
max-width: 6%;
|
||||
padding-right: 37px;
|
||||
}
|
||||
|
||||
.firstContentCellShift {
|
||||
flex-basis: 9%;
|
||||
}
|
||||
|
||||
.tableRow td:last-child {
|
||||
padding-right: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 470px) and (min-width: 420px) {
|
||||
.tableRow {
|
||||
width: 30%;
|
||||
}
|
||||
.tableRow td:first-child{
|
||||
width: 85%;
|
||||
}
|
||||
.contentCells-icon {
|
||||
width: 11%;
|
||||
}
|
||||
|
||||
.downloadContentCellShift {
|
||||
max-width: 3%;
|
||||
padding-right: 37px;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.firstContentCellShift {
|
||||
margin-left: 1px;
|
||||
flex-basis: 14%;
|
||||
}
|
||||
|
||||
.tableRow td:last-child {
|
||||
width: 5%;
|
||||
padding-right: 63px;
|
||||
}
|
||||
.firstContentCellViewers{
|
||||
padding-right: 2px;
|
||||
width: 12%;
|
||||
}
|
||||
.contentCellsEmpty{
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 420px) and (min-width: 320px) {
|
||||
.tableRow {
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
.tableRow td:last-child {
|
||||
width: 6%;
|
||||
padding-right: 16px;
|
||||
}
|
||||
|
||||
.downloadContentCellShift {
|
||||
max-width: 4%;
|
||||
margin-right: -18px;
|
||||
margin-left: -1px;
|
||||
}
|
||||
|
||||
.firstContentCellShift {
|
||||
flex-basis: 2%;
|
||||
}
|
||||
|
||||
.contentCells-icon{
|
||||
width: 10%;
|
||||
}
|
||||
footer table td {
|
||||
margin: 0;
|
||||
padding-right: 5px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.copy {
|
||||
padding-right: 5px;
|
||||
margin: 0;
|
||||
}
|
||||
.firstContentCellViewers{
|
||||
padding-right: 2px;
|
||||
width: 11%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1160px) {
|
||||
.left-panel {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 593px) {
|
||||
.contentCellsEmpty {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@media (max-width: 769px) and (min-width: 715px){
|
||||
.tableRow{
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
@media (max-width: 510px) {
|
||||
.tableRow td:first-child{
|
||||
flex-grow: 0;
|
||||
}
|
||||
}
|
||||
@media (max-width: 1100px) and (min-width: 890px){
|
||||
.main-panel > span{
|
||||
max-width: 70%;
|
||||
}
|
||||
}
|
||||
@media (max-width: 780px) and (min-width: 600px) {
|
||||
.main-panel{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.main-panel > span{
|
||||
max-width: 45%;
|
||||
}
|
||||
}
|
||||
@media (max-width: 600px) and (min-width: 320px) {
|
||||
.main-panel{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
@media (max-width:600px) and (min-width:500px){
|
||||
.main-panel > span{
|
||||
max-width:35%;
|
||||
}
|
||||
}
|
||||
@media (max-width:500px) and (min-width:400px){
|
||||
.main-panel > span{
|
||||
max-width:20%;
|
||||
}
|
||||
}
|
||||
@media (max-width:400px) and (min-width:320px){
|
||||
.main-panel > span{
|
||||
max-width:15%;
|
||||
}
|
||||
}
|
||||
767
web/documentserver-example/csharp-mvc/Content/stylesheet.css
Normal file
@ -0,0 +1,767 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
html {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
display: block;
|
||||
background: #FFFFFF;
|
||||
color: #333333;
|
||||
font-family: Open Sans;
|
||||
font-size: 12px;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
overflow-y: overlay;
|
||||
padding: 0;
|
||||
text-decoration: none;
|
||||
overflow-x:hidden;
|
||||
}
|
||||
|
||||
form {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
div {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
a,
|
||||
a:hover,
|
||||
a:visited {
|
||||
color: #333333;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
header {
|
||||
background: #333333;
|
||||
height: 48px;
|
||||
margin: 0 auto;
|
||||
min-width: 1152px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
header img {
|
||||
margin: 10px 0 22px 32px;
|
||||
}
|
||||
|
||||
.center {
|
||||
position:relative;
|
||||
margin: 0 auto 0;
|
||||
width: 1152px;
|
||||
}
|
||||
|
||||
.main {
|
||||
display: table;
|
||||
height: calc(100% - 112px);
|
||||
min-height: 536px;
|
||||
}
|
||||
|
||||
.table-main {
|
||||
border-spacing: 0;
|
||||
height: 100%;
|
||||
min-height: 536px;
|
||||
}
|
||||
|
||||
.section {
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.main-panel {
|
||||
box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
height: 100%;
|
||||
list-style: none;
|
||||
padding: 48px 32px 24px;
|
||||
position: relative;
|
||||
width: 896px;
|
||||
}
|
||||
|
||||
#portal-info {
|
||||
max-width: 65vw;
|
||||
}
|
||||
|
||||
.portal-name {
|
||||
color: #FF6F3D;
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
line-height: 133%;
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
|
||||
.portal-descr {
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
line-height: 160%;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.header-list {
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
line-height: 133%;
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
|
||||
label .checkbox {
|
||||
margin: 0 5px 3px 0;
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.try-editor-list {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.try-editor-list li {
|
||||
margin-bottom: 12px
|
||||
}
|
||||
|
||||
.try-editor {
|
||||
background-color: transparent;
|
||||
background-repeat: no-repeat;
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
line-height: 40px;
|
||||
padding-left: 42px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.try-editor.word {
|
||||
background-image: url("images/file_docx.svg");
|
||||
}
|
||||
|
||||
.try-editor.cell {
|
||||
background-image: url("images/file_xlsx.svg");
|
||||
}
|
||||
|
||||
.try-editor.slide {
|
||||
background-image: url("images/file_pptx.svg");
|
||||
}
|
||||
|
||||
.try-editor.form {
|
||||
background-image: url("images/file_docxf.svg");
|
||||
}
|
||||
|
||||
.side-option {
|
||||
color: #666666;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.button,
|
||||
.button:visited,
|
||||
.button:hover,
|
||||
.button:active {
|
||||
align-items: center;
|
||||
border-radius: 3px;
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.08em;
|
||||
line-height: 133%;
|
||||
padding: 8px 20px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
text-transform: uppercase;
|
||||
vertical-align: middle;
|
||||
user-select: none;
|
||||
-o-touch-callout: none;
|
||||
-moz-touch-callout: none;
|
||||
-webkit-touch-callout: none;
|
||||
-o-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
|
||||
.button.orange {
|
||||
background: #FF6F3D;
|
||||
border: 1px solid #FF6F3D;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.button.orange.disable {
|
||||
background: #EDC2B3;
|
||||
border: 1px solid #EDC2B3;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.button.orange:not(.disable):hover {
|
||||
background: #ff7a4b;
|
||||
}
|
||||
|
||||
.button.gray {
|
||||
border: 1px solid #AAAAAA;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.button.gray.disable {
|
||||
border: 1px solid #E5E5E5;
|
||||
color: #B5B5B5;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.button.gray:not(.disable):hover {
|
||||
border: 1px solid #FF6F3D;
|
||||
color: #FF6F3D;
|
||||
}
|
||||
|
||||
.upload-panel {
|
||||
float: left;
|
||||
padding: 24px 0;
|
||||
}
|
||||
|
||||
.file-upload {
|
||||
background: url("images/file_upload.svg") no-repeat 0 transparent;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
line-height: 40px;
|
||||
overflow: hidden;
|
||||
padding-left: 42px;
|
||||
position: relative;
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
.file-upload input {
|
||||
cursor: pointer;
|
||||
height: 40px;
|
||||
margin: 0;
|
||||
opacity: 0;
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
transform: translate(0px, -21px) scale(2);
|
||||
width: 192px;
|
||||
}
|
||||
|
||||
.create-panel {
|
||||
float: left;
|
||||
padding: 16px 0;
|
||||
}
|
||||
|
||||
.upload-panel,
|
||||
.create-panel {
|
||||
width: 100%;
|
||||
border-bottom: 1px solid #D0D5DA;
|
||||
}
|
||||
|
||||
#mainProgress {
|
||||
color: #333333;
|
||||
display: none;
|
||||
font-size: 12px;
|
||||
margin: 30px 40px;
|
||||
}
|
||||
|
||||
#mainProgress .uploadFileName {
|
||||
background-position: left center;
|
||||
background-repeat: no-repeat;
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
line-height: 160%;
|
||||
overflow: hidden;
|
||||
padding-left: 28px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#mainProgress .describeUpload {
|
||||
line-height: 150%;
|
||||
letter-spacing: -0.02em;
|
||||
padding: 16px 0;
|
||||
}
|
||||
|
||||
#mainProgress #embeddedView {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#mainProgress.embedded #embeddedView {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#mainProgress.embedded #uploadSteps {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.error-message {
|
||||
background: url("images/error.svg") no-repeat scroll 4px 10px;
|
||||
color: #CB0000;
|
||||
display: none;
|
||||
line-height: 160%;
|
||||
letter-spacing: -0.02em;
|
||||
margin: 5px 0;
|
||||
padding: 10px 10px 10px 30px;
|
||||
vertical-align: middle;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.step {
|
||||
background-repeat: no-repeat;
|
||||
background-position: left center;
|
||||
background-color: transparent;
|
||||
font-weight: bold;
|
||||
line-height: 167%;
|
||||
padding-left: 35px;
|
||||
}
|
||||
|
||||
.current {
|
||||
background-image: url("images/loader16.gif");
|
||||
}
|
||||
|
||||
.done {
|
||||
background-image: url("images/done.svg");
|
||||
}
|
||||
|
||||
.error {
|
||||
background-image: url("images/notdone.svg");
|
||||
}
|
||||
|
||||
.step-descr {
|
||||
display: block;
|
||||
margin-left: 35px;
|
||||
font-size: 11px;
|
||||
line-height: 188%;
|
||||
}
|
||||
|
||||
.progress-descr {
|
||||
letter-spacing: -0.02em;
|
||||
line-height: 150%;
|
||||
}
|
||||
|
||||
#loadScripts {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#iframeScripts {
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
footer {
|
||||
background: #333333;
|
||||
color: #AAAAAA;
|
||||
height: 64px;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
footer > .center {
|
||||
width: 100%;
|
||||
}
|
||||
footer table {
|
||||
width:100%;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
footer table tr {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
align-content: center;
|
||||
flex-wrap: wrap;
|
||||
width: 100vw;
|
||||
height: 64px;
|
||||
}
|
||||
|
||||
footer table td {
|
||||
display: block;
|
||||
position:relative;
|
||||
padding-left: 32px;
|
||||
}
|
||||
|
||||
footer a,
|
||||
footer a:hover,
|
||||
footer a:visited {
|
||||
color: #FF6F3D;
|
||||
font-size: 14px;
|
||||
line-height: 120%;
|
||||
}
|
||||
|
||||
footer a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
footer table tr td:first-child {
|
||||
margin-left: 14%;
|
||||
}
|
||||
.copy {
|
||||
color:#aaaaaa;
|
||||
width:max-content;
|
||||
position:relative;
|
||||
margin-left:auto;
|
||||
margin-right:14%;
|
||||
}
|
||||
|
||||
.help-block {
|
||||
margin: 48px 32px 24px;
|
||||
}
|
||||
|
||||
.help-block span {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
line-height: 19px;
|
||||
}
|
||||
|
||||
.stored-list {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.stored-edit {
|
||||
background-color: transparent;
|
||||
background-position: left center;
|
||||
background-repeat: no-repeat;
|
||||
display: inline-block;
|
||||
height: 16px;
|
||||
max-width: 250px;
|
||||
overflow: hidden;
|
||||
padding: 8px 0 1px 26px;
|
||||
text-decoration: none;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.stored-edit.word,
|
||||
.uploadFileName.word {
|
||||
background-image: url("images/icon_docx.svg");
|
||||
}
|
||||
|
||||
.stored-edit.cell,
|
||||
.uploadFileName.cell {
|
||||
background-image: url("images/icon_xlsx.svg");
|
||||
}
|
||||
|
||||
.stored-edit.slide,
|
||||
.uploadFileName.slide {
|
||||
background-image: url("images/icon_pptx.svg");
|
||||
}
|
||||
|
||||
.stored-edit span {
|
||||
font-size: 12px;
|
||||
line-height: 12px;
|
||||
}
|
||||
|
||||
.stored-edit:hover span {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.blockTitle {
|
||||
background-color: #333333 !important;
|
||||
border: none !important;
|
||||
border-radius: 0 !important;
|
||||
-moz-border-radius: 0 !important;
|
||||
-webkit-border-radius: 0 !important;
|
||||
color: #F5F5F5 !important;
|
||||
font-size: 16px !important;
|
||||
font-weight: 600 !important;
|
||||
line-height: 133%;
|
||||
letter-spacing: -0.02em;
|
||||
padding: 14px 16px 14px 46px !important;
|
||||
}
|
||||
|
||||
.dialog-close {
|
||||
background: url("images/close.svg") no-repeat scroll left top;
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
font-size: 1px;
|
||||
height: 14px;
|
||||
line-height: 1px;
|
||||
margin-top: 4px;
|
||||
width: 14px;
|
||||
}
|
||||
|
||||
.blockPage {
|
||||
border: none !important;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
|
||||
-moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
|
||||
-webkit-box-shadow:0 2px 4px rgba(0, 0, 0, 0.5);
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.clearFix:after {
|
||||
content: ".";
|
||||
display: block;
|
||||
height: 0;
|
||||
clear: both;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.tableRow {
|
||||
background: transparent;
|
||||
-moz-transition: all 0.2s ease-in-out;
|
||||
-webkit-transition: all 0.2s ease-in-out;
|
||||
-o-transition: all 0.2s ease-in-out;
|
||||
-ms-transition: all 0.2s ease-in-out;
|
||||
transition: all 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
.tableRow:hover {
|
||||
background-color: #ECECEC;
|
||||
}
|
||||
|
||||
.tableHeader {
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.tableHeader tr {
|
||||
background: transparent;
|
||||
cursor: default;
|
||||
height: 40px;
|
||||
-khtml-user-select: none;
|
||||
user-select: none;
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
|
||||
.tableHeaderCell {
|
||||
border-bottom: 1px solid #CCCCCC;
|
||||
padding: 2px 4px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.tableHeaderCellFileName {
|
||||
text-align: left;
|
||||
width: 37%;
|
||||
}
|
||||
|
||||
.tableHeaderCellEditors {
|
||||
width: 29%;
|
||||
}
|
||||
|
||||
.tableHeaderCellViewers {
|
||||
width: 11%;
|
||||
}
|
||||
|
||||
.tableHeaderCellDownload {
|
||||
width: 13%;
|
||||
text-align: right;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.tableHeaderCellRemove {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.contentCells {
|
||||
display: block;
|
||||
border-bottom: 1px solid #EFEFEF;
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
font-size: 16px;
|
||||
padding: 4px;
|
||||
white-space: nowrap;
|
||||
-khtml-user-select: none;
|
||||
user-select: none;
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
|
||||
.contentCells-shift {
|
||||
padding-right: 44px;
|
||||
}
|
||||
|
||||
.contentCells-icon {
|
||||
width: 4%;
|
||||
}
|
||||
|
||||
.select-user {
|
||||
color: #444444;
|
||||
font-family: Open Sans;
|
||||
font-size: 12px !important;
|
||||
font-weight: normal !important;
|
||||
line-height: 16px !important;
|
||||
}
|
||||
|
||||
.info {
|
||||
cursor: pointer;
|
||||
margin: -2px 5px;
|
||||
}
|
||||
|
||||
.user-block-table {
|
||||
height: 100%;
|
||||
padding-top: 14px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.user-block-table td {
|
||||
background-color: #F4F4F4;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.user-block-table td select {
|
||||
border: 1px solid #D0D5DA;
|
||||
box-sizing: border-box;
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
margin-top: 5px;
|
||||
padding: 2px 5px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.icon-delete {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.left-panel {
|
||||
width: 256px;
|
||||
background: #F5F5F5;
|
||||
}
|
||||
|
||||
.scroll-table-body {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
margin-top: 0px;
|
||||
overflow-x: auto;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 71px;
|
||||
scrollbar-color: #D0D5DA transparent;
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
|
||||
.scroll-table-body::-webkit-scrollbar {
|
||||
width: 4px;
|
||||
}
|
||||
|
||||
.scroll-table-body::-webkit-scrollbar-thumb {
|
||||
background: #D0D5DA;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.descrFilePass {
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
line-height: 167%;
|
||||
}
|
||||
|
||||
#filePass {
|
||||
border: 1px solid #D0D5DA;
|
||||
border-radius: 3px;
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
height: 33px;
|
||||
letter-spacing: -0.02em;
|
||||
line-height: 150%;
|
||||
margin-right: 8px;
|
||||
outline: none;
|
||||
padding: 7px 8px;
|
||||
vertical-align: bottom;
|
||||
user-select: none;
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
width: 250px;
|
||||
}
|
||||
|
||||
.errorInput {
|
||||
border-color: #CB0000 !important;
|
||||
}
|
||||
|
||||
.errorPass {
|
||||
color: #CB0000;
|
||||
display: block;
|
||||
line-height: 160%;
|
||||
letter-spacing: -0.02em;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
html {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
|
||||
.tableRow {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: row;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
.tableRow td:first-child {
|
||||
display: flex;
|
||||
flex-grow: 1;
|
||||
max-width: 25%;
|
||||
}
|
||||
|
||||
.tableHeaderCellFileName {
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
.tableHeaderCellEditors {
|
||||
width: 28%;
|
||||
}
|
||||
|
||||
.tableHeaderCellViewers {
|
||||
text-align: center;
|
||||
width: 18%
|
||||
}
|
||||
|
||||
.firstContentCellViewers {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.user-descr {
|
||||
display: inline-table;
|
||||
width: 30vw;
|
||||
min-width: 200px;
|
||||
max-width: 400px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.user-descr > b {
|
||||
margin-left: 25px;
|
||||
}
|
||||
|
||||
.tooltip {
|
||||
background: #FFFFFF;
|
||||
border-radius: 5px;
|
||||
box-shadow: 0px 7px 25px rgba(85, 85, 85, 0.15);
|
||||
color: #666666;
|
||||
line-height: 160%;
|
||||
max-width: 455px;
|
||||
padding: 14px;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.tooltip ul {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.arrow {
|
||||
border-top: 8px solid transparent;
|
||||
border-bottom: 8px solid transparent;
|
||||
border-right: 8px solid #FFFFFF;
|
||||
left: -4px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
@ -0,0 +1,59 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Web.Mvc;
|
||||
using OnlineEditorsExampleMVC.Helpers;
|
||||
using OnlineEditorsExampleMVC.Models;
|
||||
|
||||
namespace OnlineEditorsExampleMVC.Controllers
|
||||
{
|
||||
public class HomeController : Controller
|
||||
{
|
||||
public ActionResult Index()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
// viewing file in the editor
|
||||
public ActionResult Editor(string fileName, string editorsMode, string editorsType, string directUrl)
|
||||
{
|
||||
var file = new FileModel
|
||||
{
|
||||
Mode = editorsMode, // editor mode: edit or view
|
||||
Type = editorsType, // editor type: desktop, mobile, embedded
|
||||
FileName = Path.GetFileName(fileName), // file name
|
||||
IsEnabledDirectUrl = directUrl != null ? Convert.ToBoolean(directUrl) : false
|
||||
};
|
||||
|
||||
return View("Editor", file);
|
||||
}
|
||||
|
||||
// creating a sample document
|
||||
public ActionResult Sample(string fileExt, bool? sample)
|
||||
{
|
||||
var fileName = DocManagerHelper.CreateDemo(fileExt, sample ?? false); // create a sample document
|
||||
var id = Request.Cookies.GetOrDefault("uid", null);
|
||||
var user = Users.getUser(id);
|
||||
DocManagerHelper.CreateMeta(fileName, user.id, user.name); // create meta information for the sample document
|
||||
Response.Redirect(Url.Action("Editor", "Home", new { fileName = fileName }));
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
1
web/documentserver-example/csharp-mvc/Global.asax
Normal file
@ -0,0 +1 @@
|
||||
<%@ Application Codebehind="Global.asax.cs" Inherits="OnlineEditorsExampleMVC.MvcApplication" Language="C#" %>
|
||||
39
web/documentserver-example/csharp-mvc/Global.asax.cs
Normal file
@ -0,0 +1,39 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
using System.Web;
|
||||
using System.Web.Http;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Optimization;
|
||||
using System.Web.Routing;
|
||||
|
||||
namespace OnlineEditorsExampleMVC
|
||||
{
|
||||
public class MvcApplication : HttpApplication
|
||||
{
|
||||
protected void Application_Start()
|
||||
{
|
||||
AreaRegistration.RegisterAllAreas();
|
||||
|
||||
WebApiConfig.Register(GlobalConfiguration.Configuration);
|
||||
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
|
||||
RouteConfig.RegisterRoutes(RouteTable.Routes);
|
||||
BundleConfig.RegisterBundles(BundleTable.Bundles);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,452 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Web;
|
||||
using System.Web.Configuration;
|
||||
using System.Web.Script.Serialization;
|
||||
using OnlineEditorsExampleMVC.Models;
|
||||
using System.Net;
|
||||
|
||||
namespace OnlineEditorsExampleMVC.Helpers
|
||||
{
|
||||
public class DocManagerHelper
|
||||
{
|
||||
// get max file size
|
||||
public static long MaxFileSize
|
||||
{
|
||||
get
|
||||
{
|
||||
long size;
|
||||
long.TryParse(WebConfigurationManager.AppSettings["filesize-max"], out size);
|
||||
return size > 0 ? size : 5 * 1024 * 1024;
|
||||
}
|
||||
}
|
||||
|
||||
// get all the supported file extensions
|
||||
public static List<string> FileExts
|
||||
{
|
||||
get { return ViewedExts.Concat(EditedExts).Concat(ConvertExts).Concat(FillFormExts).ToList(); }
|
||||
}
|
||||
|
||||
// get file extensions that can be viewed
|
||||
public static List<string> ViewedExts
|
||||
{
|
||||
get { return (WebConfigurationManager.AppSettings["files.docservice.viewed-docs"] ?? "").Split(new char[] { '|', ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); }
|
||||
}
|
||||
|
||||
public static List<string> FillFormExts
|
||||
{
|
||||
get { return (WebConfigurationManager.AppSettings["files.docservice.fillform-docs"] ?? "").Split(new char[] { '|', ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); }
|
||||
}
|
||||
|
||||
// get file extensions that can be edited
|
||||
public static List<string> EditedExts
|
||||
{
|
||||
get { return (WebConfigurationManager.AppSettings["files.docservice.edited-docs"] ?? "").Split(new char[] { '|', ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); }
|
||||
}
|
||||
|
||||
// get file extensions that can be converted
|
||||
public static List<string> ConvertExts
|
||||
{
|
||||
get { return (WebConfigurationManager.AppSettings["files.docservice.convert-docs"] ?? "").Split(new char[] { '|', ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); }
|
||||
}
|
||||
|
||||
// get current user host address
|
||||
public static string CurUserHostAddress(string userAddress = null)
|
||||
{
|
||||
return Regex.Replace(userAddress ?? HttpContext.Current.Request.UserHostAddress, "[^0-9a-zA-Z.=]", "_");
|
||||
}
|
||||
|
||||
// get the storage path of the file
|
||||
public static string StoragePath(string fileName, string userAddress = null)
|
||||
{
|
||||
var directory = "";
|
||||
if (!string.IsNullOrEmpty(WebConfigurationManager.AppSettings["storage-path"]) && Path.IsPathRooted(WebConfigurationManager.AppSettings["storage-path"]))
|
||||
{
|
||||
directory = WebConfigurationManager.AppSettings["storage-path"] + "\\";
|
||||
}
|
||||
else
|
||||
{
|
||||
directory = HttpRuntime.AppDomainAppPath + WebConfigurationManager.AppSettings["storage-path"] + CurUserHostAddress(userAddress) + "\\";
|
||||
}
|
||||
|
||||
if (!Directory.Exists(directory))
|
||||
{
|
||||
Directory.CreateDirectory(directory);
|
||||
}
|
||||
return directory + (fileName.Contains("\\") ? fileName : Path.GetFileName(fileName));
|
||||
}
|
||||
|
||||
// get the path to the forcesaved file version
|
||||
public static string ForcesavePath(string fileName, string userAddress, Boolean create)
|
||||
{
|
||||
// create the directory to this file version
|
||||
var directory = "";
|
||||
if (!string.IsNullOrEmpty(WebConfigurationManager.AppSettings["storage-path"]) && Path.IsPathRooted(WebConfigurationManager.AppSettings["storage-path"]))
|
||||
{
|
||||
directory = WebConfigurationManager.AppSettings["storage-path"] + "\\";
|
||||
}
|
||||
else
|
||||
{
|
||||
directory = HttpRuntime.AppDomainAppPath + WebConfigurationManager.AppSettings["storage-path"] + CurUserHostAddress(userAddress) + "\\";
|
||||
}
|
||||
|
||||
if (!Directory.Exists(directory))
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
// create the directory to the history of this file version
|
||||
directory = directory + Path.GetFileName(fileName) + "-hist" + "\\";
|
||||
if (!Directory.Exists(directory))
|
||||
{
|
||||
if (create)
|
||||
{
|
||||
Directory.CreateDirectory(directory);
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
// get the path to the given file
|
||||
directory = directory + Path.GetFileName(fileName);
|
||||
if (!File.Exists(directory))
|
||||
{
|
||||
if (!create)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
return directory;
|
||||
}
|
||||
|
||||
// get the history directory
|
||||
public static string HistoryDir(string storagePath)
|
||||
{
|
||||
return storagePath += "-hist";
|
||||
}
|
||||
|
||||
// get the path to the file version by the history path and file version
|
||||
public static string VersionDir(string histPath, int version)
|
||||
{
|
||||
return Path.Combine(histPath, version.ToString());
|
||||
}
|
||||
|
||||
// get the path to the file version by the file name, user address and file version
|
||||
public static string VersionDir(string fileName, string userAddress, int version)
|
||||
{
|
||||
return VersionDir(HistoryDir(StoragePath(fileName, userAddress)), version);
|
||||
}
|
||||
|
||||
// get the file version by the history path
|
||||
public static int GetFileVersion(string historyPath)
|
||||
{
|
||||
if (!Directory.Exists(historyPath)) return 1; // if the history path doesn't exist, then the file version is 1
|
||||
return Directory.EnumerateDirectories(historyPath).Count() + 1; // take only directories from the history folder and count them
|
||||
}
|
||||
|
||||
// get the file version by the file name and user address
|
||||
public static int GetFileVersion(string fileName, string userAddress)
|
||||
{
|
||||
return GetFileVersion(HistoryDir(StoragePath(fileName, userAddress)));
|
||||
}
|
||||
|
||||
// get a file name with an index if the file with such a name already exists
|
||||
public static string GetCorrectName(string fileName, string userAddress = null)
|
||||
{
|
||||
var baseName = Path.GetFileNameWithoutExtension(fileName);
|
||||
var ext = Path.GetExtension(fileName).ToLower();
|
||||
var name = baseName + ext;
|
||||
|
||||
for (var i = 1; File.Exists(StoragePath(name, userAddress)); i++) // run through all the files with such a name in the storage directory
|
||||
{
|
||||
name = baseName + " (" + i + ")" + ext; // and add an index to the base name
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
// get all the stored files from the user host address
|
||||
public static List<FileInfo> GetStoredFiles()
|
||||
{
|
||||
var directory = "";
|
||||
if (!string.IsNullOrEmpty(WebConfigurationManager.AppSettings["storage-path"]) && Path.IsPathRooted(WebConfigurationManager.AppSettings["storage-path"]))
|
||||
{
|
||||
directory = WebConfigurationManager.AppSettings["storage-path"] + "\\";
|
||||
}
|
||||
else
|
||||
{
|
||||
directory = HttpRuntime.AppDomainAppPath + WebConfigurationManager.AppSettings["storage-path"] + CurUserHostAddress(null) + "\\";
|
||||
}
|
||||
|
||||
if (!Directory.Exists(directory)) return new List<FileInfo>();
|
||||
|
||||
var directoryInfo = new DirectoryInfo(directory);
|
||||
|
||||
// take files from the root directory
|
||||
List<FileInfo> storedFiles = directoryInfo.GetFiles("*.*", SearchOption.TopDirectoryOnly).ToList();
|
||||
|
||||
return storedFiles;
|
||||
}
|
||||
|
||||
// create demo document
|
||||
public static string CreateDemo(string fileExt, bool withContent)
|
||||
{
|
||||
var demoName = (withContent ? "sample." : "new.") + fileExt; // create sample or new template file with the necessary extension
|
||||
var demoPath = "assets\\" + (withContent ? "sample\\" : "new\\"); // get the path to the sample document
|
||||
|
||||
var fileName = GetCorrectName(demoName); // get a file name with an index if the file with such a name already exists
|
||||
|
||||
File.Copy(HttpRuntime.AppDomainAppPath + demoPath + demoName, StoragePath(fileName)); // copy file to the storage directory
|
||||
|
||||
return fileName;
|
||||
}
|
||||
|
||||
// create meta information
|
||||
public static void CreateMeta(string fileName, string uid, string uname, string userAddress = null)
|
||||
{
|
||||
var histDir = HistoryDir(StoragePath(fileName, userAddress)); // create history directory
|
||||
Directory.CreateDirectory(histDir);
|
||||
// create createdInfo.json file with meta information in the history directory (creation time, user id and name)
|
||||
File.WriteAllText(Path.Combine(histDir, "createdInfo.json"), new JavaScriptSerializer().Serialize(new Dictionary<string, object> {
|
||||
{ "created", DateTime.Now.ToString("yyyy'-'MM'-'dd HH':'mm':'ss") },
|
||||
{ "id", uid },
|
||||
{ "name", uname }
|
||||
}));
|
||||
}
|
||||
|
||||
// get file url
|
||||
public static string GetFileUri(string fileName, Boolean forDocumentServer)
|
||||
{
|
||||
var uri = new UriBuilder(GetServerUrl(forDocumentServer))
|
||||
{
|
||||
Path = HttpRuntime.AppDomainAppVirtualPath
|
||||
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
|
||||
+ CurUserHostAddress() + "/"
|
||||
+ fileName,
|
||||
Query = ""
|
||||
};
|
||||
|
||||
return uri.ToString();
|
||||
}
|
||||
|
||||
// get the path url
|
||||
public static string GetPathUri(string path)
|
||||
{
|
||||
var uri = new UriBuilder(GetServerUrl(true))
|
||||
{
|
||||
Path = HttpRuntime.AppDomainAppVirtualPath + "/" + path,
|
||||
Query = ""
|
||||
};
|
||||
|
||||
return uri.ToString();
|
||||
}
|
||||
|
||||
// get the server url
|
||||
public static string GetServerUrl(Boolean forDocumentServer)
|
||||
{
|
||||
if (forDocumentServer && !WebConfigurationManager.AppSettings["files.docservice.url.example"].Equals(""))
|
||||
{
|
||||
return WebConfigurationManager.AppSettings["files.docservice.url.example"];
|
||||
}
|
||||
else
|
||||
{
|
||||
var uri = new UriBuilder(HttpContext.Current.Request.Url) { Query = "" };
|
||||
var requestHost = HttpContext.Current.Request.Headers["Host"];
|
||||
if (!string.IsNullOrEmpty(requestHost))
|
||||
uri = new UriBuilder(uri.Scheme + "://" + requestHost);
|
||||
|
||||
return uri.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
// get the callback url
|
||||
public static string GetCallback(string fileName)
|
||||
{
|
||||
var callbackUrl = new UriBuilder(GetServerUrl(true))
|
||||
{
|
||||
Path =
|
||||
HttpRuntime.AppDomainAppVirtualPath
|
||||
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
|
||||
+ "webeditor.ashx",
|
||||
Query = "type=track"
|
||||
+ "&fileName=" + HttpUtility.UrlEncode(fileName)
|
||||
+ "&userAddress=" + HttpUtility.UrlEncode(CurUserHostAddress(HttpContext.Current.Request.UserHostAddress))
|
||||
};
|
||||
return callbackUrl.ToString();
|
||||
}
|
||||
|
||||
// get url to the created file
|
||||
public static string GetCreateUrl(FileUtility.FileType fileType)
|
||||
{
|
||||
var createUrl = new UriBuilder(GetServerUrl(false))
|
||||
{
|
||||
Path =
|
||||
HttpRuntime.AppDomainAppVirtualPath
|
||||
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
|
||||
+ "Sample",
|
||||
Query = "fileExt=" + DocManagerHelper.GetInternalExtension(fileType).Trim('.')
|
||||
};
|
||||
return createUrl.ToString();
|
||||
}
|
||||
|
||||
// create the public history url
|
||||
public static string GetHistoryDownloadUrl(string filename, string version, string file, Boolean isServer = true)
|
||||
{
|
||||
var userAddress = "&userAddress=" + HttpUtility.UrlEncode(CurUserHostAddress(HttpContext.Current.Request.UserHostAddress));
|
||||
var downloadUrl = new UriBuilder(GetServerUrl(isServer))
|
||||
{
|
||||
Path =
|
||||
HttpRuntime.AppDomainAppVirtualPath
|
||||
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
|
||||
+ "webeditor.ashx",
|
||||
Query = "type=downloadhistory"
|
||||
+ "&fileName=" + HttpUtility.UrlEncode(filename)
|
||||
+ userAddress
|
||||
+ "&ver=" + version
|
||||
+ "&file="+ file
|
||||
};
|
||||
return downloadUrl.ToString();
|
||||
}
|
||||
|
||||
// get url to download a file
|
||||
public static string GetDownloadUrl(string fileName, Boolean isServer = true)
|
||||
{
|
||||
var userAddress = isServer ? "&userAddress=" + HttpUtility.UrlEncode(CurUserHostAddress(HttpContext.Current.Request.UserHostAddress)) : "";
|
||||
var downloadUrl = new UriBuilder(GetServerUrl(isServer))
|
||||
{
|
||||
Path =
|
||||
HttpRuntime.AppDomainAppVirtualPath
|
||||
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
|
||||
+ "webeditor.ashx",
|
||||
Query = "type=download"
|
||||
+ "&fileName=" + HttpUtility.UrlEncode(fileName)
|
||||
+ userAddress
|
||||
};
|
||||
return downloadUrl.ToString();
|
||||
}
|
||||
|
||||
// get an editor internal extension
|
||||
public static string GetInternalExtension(FileUtility.FileType fileType)
|
||||
{
|
||||
switch (fileType)
|
||||
{
|
||||
case FileUtility.FileType.Word: // .docx for word file type
|
||||
return ".docx";
|
||||
case FileUtility.FileType.Cell: // .xlsx for cell file type
|
||||
return ".xlsx";
|
||||
case FileUtility.FileType.Slide: // .pptx for slide file type
|
||||
return ".pptx";
|
||||
default:
|
||||
return ".docx"; // the default file type is .docx
|
||||
}
|
||||
}
|
||||
|
||||
// get image url for templates
|
||||
public static string GetTemplateImageUrl(FileUtility.FileType fileType)
|
||||
{
|
||||
var path = new UriBuilder(GetServerUrl(true)) // templates image url in the "From Template" section
|
||||
{
|
||||
Path = HttpRuntime.AppDomainAppVirtualPath
|
||||
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
|
||||
+ "Content\\images\\"
|
||||
};
|
||||
switch (fileType)
|
||||
{
|
||||
case FileUtility.FileType.Word: // for word file type
|
||||
return path + "file_docx.svg";
|
||||
case FileUtility.FileType.Cell: // for cell file type
|
||||
return path + "file_xlsx.svg";
|
||||
case FileUtility.FileType.Slide: // for slide file type
|
||||
return path + "file_pptx.svg";
|
||||
default:
|
||||
return path + "file_docx.svg"; // the default value
|
||||
}
|
||||
}
|
||||
|
||||
// get file information
|
||||
public static List<Dictionary<string, object>> GetFilesInfo(string fileId = null)
|
||||
{
|
||||
var files = new List<Dictionary<string, object>>();
|
||||
|
||||
// run through all the stored files
|
||||
foreach (var file in GetStoredFiles())
|
||||
{
|
||||
// write all the parameters to the map
|
||||
var dictionary = new Dictionary<string, object>();
|
||||
dictionary.Add("version", GetFileVersion(file.Name, null));
|
||||
dictionary.Add("id", ServiceConverter.GenerateRevisionId(DocManagerHelper.CurUserHostAddress() + "/" + file.Name + "/" + File.GetLastWriteTime(DocManagerHelper.StoragePath(file.Name, null)).GetHashCode()));
|
||||
dictionary.Add("contentLength", Math.Round(file.Length / 1024.0, 2) + " KB");
|
||||
dictionary.Add("pureContentLength", file.Length);
|
||||
dictionary.Add("title", file.Name);
|
||||
dictionary.Add("updated", file.LastWriteTime.ToString());
|
||||
|
||||
// get file information by its id
|
||||
if (fileId != null)
|
||||
{
|
||||
if (fileId.Equals(dictionary["id"]))
|
||||
{
|
||||
files.Add(dictionary);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
files.Add(dictionary);
|
||||
}
|
||||
}
|
||||
|
||||
return files;
|
||||
}
|
||||
|
||||
// enable certificate ignore
|
||||
public static void VerifySSL()
|
||||
{
|
||||
// hack. http://ubuntuforums.org/showthread.php?t=1841740
|
||||
if(WebConfigurationManager.AppSettings["files.docservice.verify-peer-off"].Equals("true")) {
|
||||
ServicePointManager.ServerCertificateValidationCallback += (s, ce, ca, p) => true;
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
|
||||
}
|
||||
}
|
||||
|
||||
public static Dictionary<string, string> GetLanguages()
|
||||
{
|
||||
var languages = new Dictionary<string, string>();
|
||||
String[] couples = (WebConfigurationManager.AppSettings["files.docservice.languages"] ?? "").Split('|');
|
||||
foreach (string couple in couples)
|
||||
{
|
||||
String[] tmp = couple.Split(':');
|
||||
languages.Add(tmp[0],tmp[1]);
|
||||
}
|
||||
return languages;
|
||||
}
|
||||
|
||||
public static string GetDirectUrl()
|
||||
{
|
||||
string isEnabledDirectUrl = HttpUtility.ParseQueryString(HttpContext.Current.Request.Url.Query).Get("directUrl");
|
||||
return isEnabledDirectUrl != null ? isEnabledDirectUrl : "false";
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,271 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Web.Configuration;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Script.Serialization;
|
||||
|
||||
namespace OnlineEditorsExampleMVC.Helpers
|
||||
{
|
||||
/// <summary>
|
||||
/// Class service api conversion
|
||||
/// </summary>
|
||||
public static class ServiceConverter
|
||||
{
|
||||
/// <summary>
|
||||
/// Static constructor
|
||||
/// </summary>
|
||||
static ServiceConverter()
|
||||
{
|
||||
DocumentConverterUrl = (WebConfigurationManager.AppSettings["files.docservice.url.site"] ?? "") + (WebConfigurationManager.AppSettings["files.docservice.url.converter"] ?? "");
|
||||
|
||||
Int32.TryParse(WebConfigurationManager.AppSettings["files.docservice.timeout"], out ConvertTimeout);
|
||||
ConvertTimeout = ConvertTimeout > 0 ? ConvertTimeout : 120000;
|
||||
}
|
||||
|
||||
#region private fields
|
||||
|
||||
/// <summary>
|
||||
/// Timeout to request conversion
|
||||
/// </summary>
|
||||
private static readonly int ConvertTimeout;
|
||||
|
||||
/// <summary>
|
||||
/// Url to the service of conversion
|
||||
/// </summary>
|
||||
private static readonly string DocumentConverterUrl;
|
||||
|
||||
#endregion
|
||||
|
||||
#region public method
|
||||
|
||||
/// <summary>
|
||||
/// The method is to convert the file to the required format
|
||||
/// </summary>
|
||||
/// <param name="documentUri">Uri for the document to convert</param>
|
||||
/// <param name="fromExtension">Document extension</param>
|
||||
/// <param name="toExtension">Extension to which to convert</param>
|
||||
/// <param name="documentRevisionId">Key for caching on service</param>
|
||||
/// <param name="isAsync">Perform conversions asynchronously</param>
|
||||
/// <param name="convertedDocumentUri">Uri to the converted document</param>
|
||||
/// <returns>The percentage of conversion completion</returns>
|
||||
/// <example>
|
||||
/// string convertedDocumentUri;
|
||||
/// GetConvertedUri("http://helpcenter.onlyoffice.com/content/GettingStarted.pdf", ".pdf", ".docx", "http://helpcenter.onlyoffice.com/content/GettingStarted.pdf", false, out convertedDocumentUri);
|
||||
/// </example>
|
||||
/// <exception>
|
||||
/// </exception>
|
||||
public static int GetConvertedUri(string documentUri,
|
||||
string fromExtension,
|
||||
string toExtension,
|
||||
string documentRevisionId,
|
||||
bool isAsync,
|
||||
out string convertedDocumentUri,
|
||||
string filePass = null,
|
||||
string lang = null)
|
||||
{
|
||||
convertedDocumentUri = string.Empty;
|
||||
|
||||
// check if the fromExtension parameter is defined; if not, get it from the document url
|
||||
fromExtension = string.IsNullOrEmpty(fromExtension) ? Path.GetExtension(documentUri).ToLower() : fromExtension;
|
||||
|
||||
// check if the file name parameter is defined; if not, get random uuid for this file
|
||||
var title = Path.GetFileName(documentUri);
|
||||
title = string.IsNullOrEmpty(title) ? Guid.NewGuid().ToString() : title;
|
||||
|
||||
// get document key
|
||||
documentRevisionId = string.IsNullOrEmpty(documentRevisionId)
|
||||
? documentUri
|
||||
: documentRevisionId;
|
||||
documentRevisionId = GenerateRevisionId(documentRevisionId);
|
||||
|
||||
// specify request parameters
|
||||
var request = (HttpWebRequest)WebRequest.Create(DocumentConverterUrl);
|
||||
request.Method = "POST";
|
||||
request.ContentType = "application/json";
|
||||
request.Accept = "application/json";
|
||||
request.Timeout = ConvertTimeout;
|
||||
|
||||
// write all the necessary parameters to the body object
|
||||
var body = new Dictionary<string, object>() {
|
||||
{ "async", isAsync },
|
||||
{ "filetype", fromExtension.Trim('.') },
|
||||
{ "key", documentRevisionId },
|
||||
{ "outputtype", toExtension.Trim('.') },
|
||||
{ "title", title },
|
||||
{ "url", documentUri },
|
||||
{ "password", filePass },
|
||||
{ "region", lang }
|
||||
};
|
||||
|
||||
if (JwtManager.Enabled)
|
||||
{
|
||||
// create payload object
|
||||
var payload = new Dictionary<string, object>
|
||||
{
|
||||
{ "payload", body }
|
||||
};
|
||||
|
||||
var payloadToken = JwtManager.Encode(payload); // encode the payload object to the payload token
|
||||
var bodyToken = JwtManager.Encode(body); // encode the body object to the body token
|
||||
// create header token
|
||||
string JWTheader = string.IsNullOrEmpty(WebConfigurationManager.AppSettings["files.docservice.header"]) ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
|
||||
request.Headers.Add(JWTheader, "Bearer " + payloadToken);
|
||||
|
||||
body.Add("token", bodyToken);
|
||||
}
|
||||
|
||||
var bytes = Encoding.UTF8.GetBytes(new JavaScriptSerializer().Serialize(body));
|
||||
request.ContentLength = bytes.Length;
|
||||
using (var requestStream = request.GetRequestStream()) // get the request stream
|
||||
{
|
||||
requestStream.Write(bytes, 0, bytes.Length); // and write the serialized body object to it
|
||||
}
|
||||
|
||||
DocManagerHelper.VerifySSL();
|
||||
|
||||
string dataResponse;
|
||||
using (var response = request.GetResponse())
|
||||
using (var stream = response.GetResponseStream()) // get the response stream
|
||||
{
|
||||
if (stream == null) throw new Exception("Response is null");
|
||||
|
||||
using (var reader = new StreamReader(stream))
|
||||
{
|
||||
dataResponse = reader.ReadToEnd(); // and read it
|
||||
}
|
||||
}
|
||||
|
||||
return GetResponseUri(dataResponse, out convertedDocumentUri);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Translation key to a supported form.
|
||||
/// </summary>
|
||||
/// <param name="expectedKey">Expected key</param>
|
||||
/// <returns>Supported key</returns>
|
||||
public static string GenerateRevisionId(string expectedKey)
|
||||
{
|
||||
// if the expected key length is greater than 20, it is hashed and a fixed length value is stored in the string format
|
||||
if (expectedKey.Length > 20) expectedKey = expectedKey.GetHashCode().ToString();
|
||||
var key = Regex.Replace(expectedKey, "[^0-9-.a-zA-Z_=]", "_");
|
||||
return key.Substring(key.Length - Math.Min(key.Length, 20)); // the resulting key length is 20 or less
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region private method
|
||||
|
||||
/// <summary>
|
||||
/// Processing document received from the editing service
|
||||
/// </summary>
|
||||
/// <param name="jsonDocumentResponse">The resulting json from editing service</param>
|
||||
/// <param name="responseUri">Uri to the converted document</param>
|
||||
/// <returns>The percentage of conversion completion</returns>
|
||||
private static int GetResponseUri(string jsonDocumentResponse, out string responseUri)
|
||||
{
|
||||
if (string.IsNullOrEmpty(jsonDocumentResponse)) throw new ArgumentException("Invalid param", "jsonDocumentResponse");
|
||||
|
||||
var responseFromService = Json.Decode(jsonDocumentResponse);
|
||||
if (jsonDocumentResponse == null) throw new WebException("Invalid answer format");
|
||||
|
||||
var errorElement = responseFromService.error; // if an error occurs
|
||||
if (errorElement != null) ProcessResponseError(Convert.ToInt32(errorElement)); // then get an error message
|
||||
|
||||
// check if the conversion is completed and save the result to a variable
|
||||
var isEndConvert = responseFromService.endConvert;
|
||||
|
||||
int resultPercent;
|
||||
responseUri = string.Empty;
|
||||
if (isEndConvert) // if the conversion is completed
|
||||
{
|
||||
responseUri = responseFromService.fileUrl; // get the file url
|
||||
resultPercent = 100;
|
||||
}
|
||||
else // if the conversion isn't completed
|
||||
{
|
||||
resultPercent = responseFromService.percent; // get the percentage value
|
||||
if (resultPercent >= 100) resultPercent = 99;
|
||||
}
|
||||
|
||||
return resultPercent;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generate an error code table
|
||||
/// </summary>
|
||||
/// <param name="errorCode">Error code</param>
|
||||
private static void ProcessResponseError(int errorCode)
|
||||
{
|
||||
var errorMessage = string.Empty;
|
||||
const string errorMessageTemplate = "Error occurred in the ConvertService.ashx: {0}";
|
||||
|
||||
switch (errorCode)
|
||||
{
|
||||
case -8:
|
||||
// public const int c_nErrorFileVKey = -8;
|
||||
errorMessage = String.Format(errorMessageTemplate, "Error document VKey");
|
||||
break;
|
||||
case -7:
|
||||
// public const int c_nErrorFileRequest = -7;
|
||||
errorMessage = String.Format(errorMessageTemplate, "Error document request");
|
||||
break;
|
||||
case -6:
|
||||
// public const int c_nErrorDatabase = -6;
|
||||
errorMessage = String.Format(errorMessageTemplate, "Error database");
|
||||
break;
|
||||
case -5:
|
||||
// public const int c_nErrorUnexpectedGuid = -5;
|
||||
errorMessage = String.Format(errorMessageTemplate, "Incorrect password");
|
||||
break;
|
||||
case -4:
|
||||
// public const int c_nErrorDownloadError = -4;
|
||||
errorMessage = String.Format(errorMessageTemplate, "Error download error");
|
||||
break;
|
||||
case -3:
|
||||
// public const int c_nErrorConvertationError = -3;
|
||||
errorMessage = String.Format(errorMessageTemplate, "Error convertation error");
|
||||
break;
|
||||
case -2:
|
||||
// public const int c_nErrorConvertationTimeout = -2;
|
||||
errorMessage = String.Format(errorMessageTemplate, "Error convertation timeout");
|
||||
break;
|
||||
case -1:
|
||||
// public const int c_nErrorUnknown = -1;
|
||||
errorMessage = String.Format(errorMessageTemplate, "Error convertation unknown");
|
||||
break;
|
||||
case 0:
|
||||
// public const int c_nErrorNo = 0;
|
||||
break;
|
||||
default:
|
||||
errorMessage = "ErrorCode = " + errorCode;
|
||||
break;
|
||||
}
|
||||
|
||||
throw new Exception(errorMessage);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
60
web/documentserver-example/csharp-mvc/Helpers/JwtManager.cs
Normal file
@ -0,0 +1,60 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
using JWT;
|
||||
using JWT.Algorithms;
|
||||
using JWT.Builder;
|
||||
using JWT.Serializers;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Configuration;
|
||||
|
||||
namespace OnlineEditorsExampleMVC.Helpers
|
||||
{
|
||||
public static class JwtManager
|
||||
{
|
||||
private static readonly string Secret;
|
||||
public static readonly bool Enabled;
|
||||
|
||||
static JwtManager()
|
||||
{
|
||||
Secret = WebConfigurationManager.AppSettings["files.docservice.secret"] ?? ""; // get token secret from the config parameters
|
||||
Enabled = !string.IsNullOrEmpty(Secret); // check if the token is enabled
|
||||
}
|
||||
|
||||
// encode a payload object into a token using a secret key
|
||||
public static string Encode(IDictionary<string, object> payload)
|
||||
{
|
||||
var encoder = new JwtEncoder(new HMACSHA256Algorithm(),
|
||||
new JsonNetSerializer(),
|
||||
new JwtBase64UrlEncoder());
|
||||
return encoder.Encode(payload, Secret);
|
||||
}
|
||||
|
||||
// decode a token into a payload object using a secret key
|
||||
public static string Decode(string token)
|
||||
{
|
||||
if (!Enabled || string.IsNullOrEmpty(token)) return "";
|
||||
|
||||
return JwtBuilder.Create()
|
||||
.WithAlgorithm(new HMACSHA256Algorithm())
|
||||
.WithSecret(Secret)
|
||||
.MustVerifySignature()
|
||||
.Decode(token);
|
||||
}
|
||||
}
|
||||
}
|
||||
360
web/documentserver-example/csharp-mvc/Helpers/TrackManager.cs
Normal file
@ -0,0 +1,360 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Web.Configuration;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Text;
|
||||
|
||||
namespace OnlineEditorsExampleMVC.Helpers
|
||||
{
|
||||
public class TrackManager
|
||||
{
|
||||
// read request body
|
||||
public static Dictionary<string, object> readBody(HttpContext context)
|
||||
{
|
||||
string body;
|
||||
try
|
||||
{
|
||||
// read request body by streams and check if it is correct
|
||||
using (var receiveStream = context.Request.InputStream)
|
||||
using (var readStream = new StreamReader(receiveStream))
|
||||
{
|
||||
body = readStream.ReadToEnd();
|
||||
if (string.IsNullOrEmpty(body)) context.Response.Write("{\"error\":1,\"message\":\"Request stream is empty\"}");
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new HttpException((int)HttpStatusCode.BadRequest, e.Message);
|
||||
}
|
||||
|
||||
var jss = new JavaScriptSerializer();
|
||||
var fileData = jss.Deserialize<Dictionary<string, object>>(body);
|
||||
|
||||
// check if the document token is enabled
|
||||
if (JwtManager.Enabled)
|
||||
{
|
||||
string JWTheader = string.IsNullOrEmpty(WebConfigurationManager.AppSettings["files.docservice.header"]) ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
|
||||
|
||||
string token = null;
|
||||
|
||||
// if the document token is in the data
|
||||
if (fileData.ContainsKey("token"))
|
||||
{
|
||||
token = JwtManager.Decode(fileData["token"].ToString()); // decode it
|
||||
}
|
||||
else if (context.Request.Headers.AllKeys.Contains(JWTheader, StringComparer.InvariantCultureIgnoreCase)) // if the Authorization header exists
|
||||
{
|
||||
var headerToken = context.Request.Headers.Get(JWTheader).Substring("Bearer ".Length);
|
||||
token = JwtManager.Decode(headerToken); // decode its part after Authorization prefix
|
||||
}
|
||||
else // otherwise, an error occurs
|
||||
{
|
||||
context.Response.Write("{\"error\":1,\"message\":\"JWT expected\"}");
|
||||
}
|
||||
|
||||
if (token != null && !token.Equals("")) // invalid signature error
|
||||
{
|
||||
fileData = jss.Deserialize<Dictionary<string, object>>(token);
|
||||
if (fileData.ContainsKey("payload"))
|
||||
fileData = (Dictionary<string, object>)fileData["payload"];
|
||||
}
|
||||
else
|
||||
{
|
||||
context.Response.Write("{\"error\":1,\"message\":\"JWT validation failed\"}");
|
||||
}
|
||||
}
|
||||
|
||||
return fileData;
|
||||
}
|
||||
|
||||
// file saving process
|
||||
public static int processSave(Dictionary<string, object> fileData, string fileName, string userAddress)
|
||||
{
|
||||
if (string.IsNullOrEmpty((string)fileData["url"])) {
|
||||
throw new Exception("DownloadUrl is null");
|
||||
}
|
||||
var downloadUri = (string)fileData["url"];
|
||||
string curExt = Path.GetExtension(fileName).ToLower(); // get current file extension
|
||||
|
||||
var downloadExt = "." + (string)fileData["filetype"]; // get the extension of the downloaded file
|
||||
|
||||
var newFileName = fileName;
|
||||
|
||||
// convert downloaded file to the file with the current extension if these extensions aren't equal
|
||||
if (!curExt.Equals(downloadExt, StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
try
|
||||
{
|
||||
// convert file and give url to a new file
|
||||
string newFileUri;
|
||||
var result = ServiceConverter.GetConvertedUri(downloadUri, downloadExt, curExt, ServiceConverter.GenerateRevisionId(downloadUri), false, out newFileUri);
|
||||
if (string.IsNullOrEmpty(newFileUri))
|
||||
{
|
||||
// get the correct file name if it already exists
|
||||
newFileName = DocManagerHelper.GetCorrectName(Path.GetFileNameWithoutExtension(fileName) + downloadExt, userAddress);
|
||||
}
|
||||
else
|
||||
{
|
||||
downloadUri = newFileUri;
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
newFileName = DocManagerHelper.GetCorrectName(Path.GetFileNameWithoutExtension(fileName) + downloadExt, userAddress);
|
||||
}
|
||||
}
|
||||
|
||||
DocManagerHelper.VerifySSL();
|
||||
|
||||
try
|
||||
{
|
||||
var bytesFile = DownloadFile(downloadUri); // download document file
|
||||
var storagePath = DocManagerHelper.StoragePath(newFileName, userAddress); // get the file path
|
||||
|
||||
var histDir = DocManagerHelper.HistoryDir(storagePath); // get the path to the history directory
|
||||
if (!Directory.Exists(histDir)) Directory.CreateDirectory(histDir);
|
||||
|
||||
var versionDir = DocManagerHelper.VersionDir(histDir, DocManagerHelper.GetFileVersion(histDir)); // get the path to the file version
|
||||
if (!Directory.Exists(versionDir)) Directory.CreateDirectory(versionDir); // if the path doesn't exist, create it
|
||||
|
||||
// get the path to the previous file version and move it to the storage directory
|
||||
File.Move(DocManagerHelper.StoragePath(fileName, userAddress), Path.Combine(versionDir, "prev" + curExt));
|
||||
|
||||
SaveFile(bytesFile, storagePath);// save document file
|
||||
|
||||
byte[] bytesChanges = DownloadFile((string)fileData["changesurl"]); // download changes file
|
||||
SaveFile(bytesChanges, Path.Combine(versionDir, "diff.zip")); // save file changes to the diff.zip archive
|
||||
|
||||
var hist = fileData.ContainsKey("changeshistory") ? (string)fileData["changeshistory"] : null;
|
||||
if (string.IsNullOrEmpty(hist) && fileData.ContainsKey("history"))
|
||||
{
|
||||
var jss = new JavaScriptSerializer();
|
||||
hist = jss.Serialize(fileData["history"]);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(hist))
|
||||
{
|
||||
File.WriteAllText(Path.Combine(versionDir, "changes.json"), hist); // write the history changes to the changes.json file
|
||||
}
|
||||
|
||||
File.WriteAllText(Path.Combine(versionDir, "key.txt"), (string)fileData["key"]); // write the key value to the key.txt file
|
||||
|
||||
string forcesavePath = DocManagerHelper.ForcesavePath(newFileName, userAddress, false); // get the path to the forcesaved file version
|
||||
if (!forcesavePath.Equals("")) // if the forcesaved file version exists
|
||||
{
|
||||
File.Delete(forcesavePath); // remove it
|
||||
}
|
||||
|
||||
} catch (Exception)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// file force saving process
|
||||
public static int processForceSave(Dictionary<string, object> fileData, string fileName, string userAddress)
|
||||
{
|
||||
if ( string.IsNullOrEmpty((string)fileData["url"])) {
|
||||
throw new Exception("DownloadUrl is null");
|
||||
}
|
||||
var downloadUri = (string)fileData["url"];
|
||||
|
||||
string curExt = Path.GetExtension(fileName).ToLower(); // get current file extension
|
||||
|
||||
var downloadExt = "." + (string)fileData["filetype"]; // get the extension of the downloaded file
|
||||
|
||||
Boolean newFileName = false;
|
||||
|
||||
// convert downloaded file to the file with the current extension if these extensions aren't equal
|
||||
if (!curExt.Equals(downloadExt))
|
||||
{
|
||||
try
|
||||
{
|
||||
// convert file and give url to a new file
|
||||
string newFileUri;
|
||||
var result = ServiceConverter.GetConvertedUri(downloadUri, downloadExt, curExt, ServiceConverter.GenerateRevisionId(downloadUri), false, out newFileUri);
|
||||
if (string.IsNullOrEmpty(newFileUri))
|
||||
{
|
||||
newFileName = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
downloadUri = newFileUri;
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
newFileName = true;
|
||||
}
|
||||
}
|
||||
|
||||
DocManagerHelper.VerifySSL();
|
||||
|
||||
try
|
||||
{
|
||||
var bytesFile = DownloadFile(downloadUri); // download document file
|
||||
|
||||
string forcesavePath = "";
|
||||
Boolean isSubmitForm = fileData["forcesavetype"].ToString().Equals("3"); // SubmitForm
|
||||
|
||||
if (isSubmitForm) // if the form is submitted
|
||||
{
|
||||
if (newFileName)
|
||||
{
|
||||
fileName = DocManagerHelper.GetCorrectName(Path.GetFileNameWithoutExtension(fileName) + "-form" + downloadExt, userAddress); // get the correct file name if it already exists
|
||||
} else
|
||||
{
|
||||
fileName = DocManagerHelper.GetCorrectName(Path.GetFileNameWithoutExtension(fileName) + "-form" + curExt, userAddress);
|
||||
}
|
||||
forcesavePath = DocManagerHelper.StoragePath(fileName, userAddress);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (newFileName)
|
||||
{
|
||||
fileName = DocManagerHelper.GetCorrectName(Path.GetFileNameWithoutExtension(fileName) + downloadExt, userAddress);
|
||||
}
|
||||
forcesavePath = DocManagerHelper.ForcesavePath(fileName, userAddress, false);
|
||||
if (string.IsNullOrEmpty(forcesavePath)) // create forcesave path if it doesn't exist
|
||||
{
|
||||
forcesavePath = DocManagerHelper.ForcesavePath(fileName, userAddress, true);
|
||||
}
|
||||
}
|
||||
|
||||
SaveFile(bytesFile, forcesavePath);// save document file
|
||||
|
||||
if (isSubmitForm)
|
||||
{
|
||||
var jss = new JavaScriptSerializer();
|
||||
var actions = jss.Deserialize<List<object>>(jss.Serialize(fileData["actions"]));
|
||||
var action = jss.Deserialize<Dictionary<string, object>>(jss.Serialize(actions[0]));
|
||||
var user = action["userid"].ToString(); // get the user id
|
||||
DocManagerHelper.CreateMeta(fileName, user, "Filling Form", userAddress); // create meta data for the forcesaved file
|
||||
}
|
||||
} catch (Exception)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// create a command request
|
||||
public static void commandRequest(string method, string key, object meta = null)
|
||||
{
|
||||
DocManagerHelper.VerifySSL();
|
||||
|
||||
string documentCommandUrl = WebConfigurationManager.AppSettings["files.docservice.url.site"] + WebConfigurationManager.AppSettings["files.docservice.url.command"];
|
||||
|
||||
var request = (HttpWebRequest)WebRequest.Create(documentCommandUrl);
|
||||
request.Method = "POST";
|
||||
request.ContentType = "application/json";
|
||||
|
||||
var body = new Dictionary<string, object>() {
|
||||
{ "c", method },
|
||||
{ "key", key }
|
||||
};
|
||||
|
||||
if (meta != null)
|
||||
{
|
||||
body.Add("meta", meta);
|
||||
}
|
||||
|
||||
// check if a secret key to generate token exists or not
|
||||
if (JwtManager.Enabled)
|
||||
{
|
||||
var payload = new Dictionary<string, object>
|
||||
{
|
||||
{ "payload", body }
|
||||
};
|
||||
|
||||
var payloadToken = JwtManager.Encode(payload); // encode a payload object into a header token
|
||||
var bodyToken = JwtManager.Encode(body); // encode body into a body token
|
||||
string JWTheader = string.IsNullOrEmpty(WebConfigurationManager.AppSettings["files.docservice.header"]) ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
|
||||
request.Headers.Add(JWTheader, "Bearer " + payloadToken); // add a header Authorization with a header token and Authorization prefix in it
|
||||
|
||||
body.Add("token", bodyToken);
|
||||
}
|
||||
|
||||
var bytes = Encoding.UTF8.GetBytes(new JavaScriptSerializer().Serialize(body));
|
||||
request.ContentLength = bytes.Length;
|
||||
using (var requestStream = request.GetRequestStream())
|
||||
{
|
||||
// write bytes to the output stream
|
||||
requestStream.Write(bytes, 0, bytes.Length);
|
||||
}
|
||||
|
||||
string dataResponse;
|
||||
using (var response = request.GetResponse()) // get the response
|
||||
using (var stream = response.GetResponseStream())
|
||||
{
|
||||
if (stream == null) throw new Exception("Response is null");
|
||||
|
||||
using (var reader = new StreamReader(stream))
|
||||
{
|
||||
dataResponse = reader.ReadToEnd(); // and read it
|
||||
}
|
||||
}
|
||||
|
||||
// convert stream to json string
|
||||
var jss = new JavaScriptSerializer();
|
||||
var responseObj = jss.Deserialize<Dictionary<string, object>>(dataResponse);
|
||||
if (!responseObj["error"].ToString().Equals("0"))
|
||||
{
|
||||
throw new Exception(dataResponse);
|
||||
}
|
||||
}
|
||||
|
||||
// save file
|
||||
private static void SaveFile(byte[] data, string path)
|
||||
{
|
||||
using (var fs = File.Open(path, FileMode.Create))
|
||||
{
|
||||
fs.Write(data, 0, data.Length);
|
||||
}
|
||||
}
|
||||
|
||||
// save file information from the url to the file specified
|
||||
private static byte[] DownloadFile(string url)
|
||||
{
|
||||
if (string.IsNullOrEmpty(url)) throw new ArgumentException("url"); // url isn't specified
|
||||
|
||||
var req = (HttpWebRequest)WebRequest.Create(url);
|
||||
req.Timeout = 5000;
|
||||
using (var stream = req.GetResponse().GetResponseStream()) // get input stream of the file information from the url
|
||||
{
|
||||
if (stream == null) throw new Exception("stream is null");
|
||||
|
||||
using (MemoryStream memoryStream = new MemoryStream())
|
||||
{
|
||||
stream.CopyTo(memoryStream);
|
||||
return memoryStream.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
204
web/documentserver-example/csharp-mvc/Helpers/Users.cs
Normal file
@ -0,0 +1,204 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace OnlineEditorsExampleMVC.Helpers
|
||||
{
|
||||
public class Users
|
||||
{
|
||||
static List<string> descr_user_1 = new List<string>()
|
||||
{
|
||||
"File author by default",
|
||||
"Doesn’t belong to any group",
|
||||
"Can review all the changes",
|
||||
"Can perform all actions with comments",
|
||||
"The file favorite state is undefined",
|
||||
"Can create files from templates using data from the editor",
|
||||
"Can see the information about all users"
|
||||
};
|
||||
|
||||
static List<string> descr_user_2 = new List<string>()
|
||||
{
|
||||
"Belongs to Group2",
|
||||
"Can review only his own changes or changes made by users with no group",
|
||||
"Can view comments, edit his own comments and comments left by users with no group. Can remove his own comments only",
|
||||
"This file is marked as favorite",
|
||||
"Can create new files from the editor",
|
||||
"Can see the information about users from Group2 and users who don’t belong to any group"
|
||||
};
|
||||
|
||||
static List<string> descr_user_3 = new List<string>()
|
||||
{
|
||||
"Belongs to Group3",
|
||||
"Can review changes made by Group2 users",
|
||||
"Can view comments left by Group2 and Group3 users. Can edit comments left by the Group2 users",
|
||||
"This file isn’t marked as favorite",
|
||||
"Can’t copy data from the file to clipboard",
|
||||
"Can’t download the file",
|
||||
"Can’t print the file",
|
||||
"Can create new files from the editor",
|
||||
"Can see the information about Group2 users"
|
||||
};
|
||||
|
||||
static List<string> descr_user_0 = new List<string>()
|
||||
{
|
||||
"The name is requested when the editor is opened",
|
||||
"Doesn’t belong to any group",
|
||||
"Can review all the changes",
|
||||
"Can perform all actions with comments",
|
||||
"The file favorite state is undefined",
|
||||
"Can't mention others in comments",
|
||||
"Can't create new files from the editor",
|
||||
"Can’t see anyone’s information",
|
||||
"Can't rename files from the editor",
|
||||
"Can't view chat",
|
||||
"View file without collaboration",
|
||||
};
|
||||
|
||||
private static List<User> users = new List<User>() {
|
||||
new User(
|
||||
"uid-1",
|
||||
"John Smith",
|
||||
"smith@example.com",
|
||||
"",
|
||||
null,
|
||||
new Dictionary<string, object>(),
|
||||
null,
|
||||
null,
|
||||
new List<string>(),
|
||||
descr_user_1,
|
||||
true
|
||||
),
|
||||
new User(
|
||||
"uid-2",
|
||||
"Mark Pottato",
|
||||
"pottato@example.com",
|
||||
"group-2",
|
||||
new List<string>() { "group-2", "" },
|
||||
new Dictionary<string, object>()
|
||||
{
|
||||
{ "view", "" },
|
||||
{ "edit", new List<string>() { "group-2", "" } },
|
||||
{ "remove", new List<string>() { "group-2" } }
|
||||
},
|
||||
new List<string>() { "group-2", "" },
|
||||
true,
|
||||
new List<string>(),
|
||||
descr_user_2,
|
||||
false
|
||||
),
|
||||
new User(
|
||||
"uid-3",
|
||||
"Hamish Mitchell",
|
||||
"mitchell@example.com",
|
||||
"group-3",
|
||||
new List<string>() { "group-2" },
|
||||
new Dictionary<string,object>()
|
||||
{
|
||||
{ "view", new List<string>() { "group-2", "group-3" } },
|
||||
{ "edit", new List<string>() { "group-2" } },
|
||||
{ "remove", new List<string>() { } }
|
||||
},
|
||||
new List<string>() { "group-2" },
|
||||
false,
|
||||
new List<string>() { "copy", "download", "print" },
|
||||
descr_user_3,
|
||||
false
|
||||
),
|
||||
new User(
|
||||
"uid-0",
|
||||
null,
|
||||
null,
|
||||
"",
|
||||
null,
|
||||
new Dictionary<string,object>(),
|
||||
new List<string>(),
|
||||
null,
|
||||
new List<string>(),
|
||||
descr_user_0,
|
||||
false
|
||||
)
|
||||
};
|
||||
|
||||
// get a user by id specified
|
||||
public static User getUser(string id)
|
||||
{
|
||||
foreach(User user in users)
|
||||
{
|
||||
if (user.id.Equals(id)) return user;
|
||||
}
|
||||
return users[0];
|
||||
}
|
||||
|
||||
// get a list of all the users
|
||||
public static List<User> getAllUsers()
|
||||
{
|
||||
return users;
|
||||
}
|
||||
|
||||
// get a list of users with their names and emails for mentions
|
||||
public static List<Dictionary<string, object>> getUsersForMentions(string id)
|
||||
{
|
||||
List<Dictionary<string, object>> usersData = new List<Dictionary<string, object>>();
|
||||
foreach (User user in users)
|
||||
{
|
||||
if (!user.id.Equals(id) && user.name != null && user.email != null)
|
||||
{
|
||||
usersData.Add(new Dictionary<string, object>()
|
||||
{
|
||||
{"name", user.name },
|
||||
{"email", user.email }
|
||||
});
|
||||
}
|
||||
}
|
||||
return usersData;
|
||||
}
|
||||
}
|
||||
|
||||
public class User
|
||||
{
|
||||
public string id;
|
||||
public string name;
|
||||
public string email;
|
||||
public string group;
|
||||
public List<string> reviewGroups;
|
||||
public Dictionary<string, object> commentGroups;
|
||||
public bool? favorite;
|
||||
public List<string> deniedPermissions;
|
||||
public List<string> descriptions;
|
||||
public bool templates;
|
||||
public List<string> userInfoGroups;
|
||||
|
||||
public User(string id, string name, string email, string group, List<string> reviewGroups, Dictionary<string, object> commentGroups, List<string> userInfoGroups, bool? favorite, List<string> deniedPermissions, List<string> descriptions, bool templates)
|
||||
{
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.email = email;
|
||||
this.group = group;
|
||||
this.reviewGroups = reviewGroups;
|
||||
this.commentGroups = commentGroups;
|
||||
this.favorite = favorite;
|
||||
this.deniedPermissions = deniedPermissions;
|
||||
this.descriptions = descriptions;
|
||||
this.templates = templates;
|
||||
this.userInfoGroups = userInfoGroups;
|
||||
}
|
||||
}
|
||||
}
|
||||
41
web/documentserver-example/csharp-mvc/Helpers/Utils.cs
Normal file
@ -0,0 +1,41 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
using System.Web;
|
||||
|
||||
namespace OnlineEditorsExampleMVC.Helpers
|
||||
{
|
||||
public static class Utils
|
||||
{
|
||||
// get the request header or return the default one
|
||||
public static string GetOrDefault(this HttpRequest request, string header, string def)
|
||||
{
|
||||
var value = request[header];
|
||||
if (value != null) return value;
|
||||
return def;
|
||||
}
|
||||
|
||||
// get a cookie from the cookie collection or return the default one
|
||||
public static string GetOrDefault(this HttpCookieCollection cookies, string cookie, string def)
|
||||
{
|
||||
var cook = cookies[cookie];
|
||||
if (cook != null && !string.IsNullOrEmpty(cook.Value)) return cook.Value;
|
||||
return def;
|
||||
}
|
||||
}
|
||||
}
|
||||
201
web/documentserver-example/csharp-mvc/LICENSE
Normal file
@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
482
web/documentserver-example/csharp-mvc/Models/FileModel.cs
Executable file
@ -0,0 +1,482 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Web;
|
||||
using System.Web.Configuration;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Script.Serialization;
|
||||
using OnlineEditorsExampleMVC.Helpers;
|
||||
|
||||
namespace OnlineEditorsExampleMVC.Models
|
||||
{
|
||||
// create file model
|
||||
public class FileModel
|
||||
{
|
||||
public string Mode { get; set; } // editor mode
|
||||
public string Type { get; set; } // editor type
|
||||
public bool IsEnabledDirectUrl { get; set; } // is enabled direct url
|
||||
|
||||
// get file url for Document Server
|
||||
public string FileUri
|
||||
{
|
||||
get { return DocManagerHelper.GetFileUri(FileName, true); }
|
||||
}
|
||||
|
||||
// get file url for user
|
||||
public string FileUriUser
|
||||
{
|
||||
get { return Path.IsPathRooted(WebConfigurationManager.AppSettings["storage-path"]) ? DownloadUrl + "&dmode=emb" : DocManagerHelper.GetFileUri(FileName, false); }
|
||||
}
|
||||
|
||||
public string FileName { get; set; } // file name
|
||||
|
||||
// get document type
|
||||
public string DocumentType
|
||||
{
|
||||
get { return FileUtility.GetFileType(FileName).ToString().ToLower(); }
|
||||
}
|
||||
|
||||
// get document key
|
||||
public string Key
|
||||
{
|
||||
get { return ServiceConverter.GenerateRevisionId(DocManagerHelper.CurUserHostAddress() + "/" + FileName + "/" + File.GetLastWriteTime(DocManagerHelper.StoragePath(FileName, null)).GetHashCode()); }
|
||||
}
|
||||
|
||||
// get the callback url
|
||||
public string CallbackUrl
|
||||
{
|
||||
get { return DocManagerHelper.GetCallback(FileName); }
|
||||
}
|
||||
|
||||
public string DownloadUrl
|
||||
{
|
||||
get { return DocManagerHelper.GetDownloadUrl(FileName); }
|
||||
}
|
||||
|
||||
// get the document config
|
||||
public string GetDocConfig(HttpRequest request, UrlHelper url)
|
||||
{
|
||||
var jss = new JavaScriptSerializer();
|
||||
|
||||
var ext = Path.GetExtension(FileName).ToLower(); // get file extension
|
||||
var editorsMode = Mode ?? "edit"; // get editor mode
|
||||
|
||||
var canEdit = DocManagerHelper.EditedExts.Contains(ext); // check if the file with such an extension can be edited
|
||||
|
||||
var id = request.Cookies.GetOrDefault("uid", null);
|
||||
var user = Users.getUser(id); // get the user
|
||||
|
||||
if ((!canEdit && editorsMode.Equals("edit") || editorsMode.Equals("fillForms")) && DocManagerHelper.FillFormExts.Contains(ext)) {
|
||||
editorsMode = "fillForms";
|
||||
canEdit = true;
|
||||
}
|
||||
var submitForm = editorsMode.Equals("fillForms") && id.Equals("uid-1") && false; // check if the Submit form button is displayed or not
|
||||
var mode = canEdit && editorsMode != "view" ? "edit" : "view"; // set the mode parameter: change it to view if the document can't be edited
|
||||
|
||||
// favorite icon state
|
||||
bool? favorite = user.favorite;
|
||||
|
||||
var actionLink = request.GetOrDefault("actionLink", null); // get the action link (comment or bookmark) if it exists
|
||||
var actionData = string.IsNullOrEmpty(actionLink) ? null : jss.DeserializeObject(actionLink); // get action data for the action link
|
||||
|
||||
var directUrl = DocManagerHelper.GetDownloadUrl(FileName, false);
|
||||
var createUrl = DocManagerHelper.GetCreateUrl(FileUtility.GetFileType(FileName));
|
||||
var templatesImageUrl = DocManagerHelper.GetTemplateImageUrl(FileUtility.GetFileType(FileName)); // image url for templates
|
||||
var templates = new List<Dictionary<string, string>>
|
||||
{
|
||||
new Dictionary<string, string>()
|
||||
{
|
||||
{ "image", "" },
|
||||
{ "title", "Blank" },
|
||||
{ "url", createUrl },
|
||||
},
|
||||
new Dictionary<string, string>()
|
||||
{
|
||||
{ "image", templatesImageUrl },
|
||||
{ "title", "With sample content" },
|
||||
{ "url", createUrl + "&sample=true" },
|
||||
}
|
||||
};
|
||||
|
||||
// specify the document config
|
||||
var config = new Dictionary<string, object>
|
||||
{
|
||||
{ "type", Type ?? "desktop" },
|
||||
{ "documentType", DocumentType },
|
||||
{
|
||||
"document", new Dictionary<string, object>
|
||||
{
|
||||
{ "title", FileName },
|
||||
{ "url", DownloadUrl },
|
||||
{ "directUrl", IsEnabledDirectUrl ? directUrl : "" },
|
||||
{ "fileType", ext.Trim('.') },
|
||||
{ "key", Key },
|
||||
{
|
||||
"info", new Dictionary<string, object>
|
||||
{
|
||||
{ "owner", "Me" },
|
||||
{ "uploaded", DateTime.Now.ToShortDateString() },
|
||||
{ "favorite", favorite}
|
||||
}
|
||||
},
|
||||
{
|
||||
// the permission for the document to be edited and downloaded or not
|
||||
"permissions", new Dictionary<string, object>
|
||||
{
|
||||
{ "comment", editorsMode != "view" && editorsMode != "fillForms" && editorsMode != "embedded" && editorsMode != "blockcontent" },
|
||||
{ "copy", !user.deniedPermissions.Contains("copy") },
|
||||
{ "download", !user.deniedPermissions.Contains("download") },
|
||||
{ "edit", canEdit && (editorsMode == "edit" || editorsMode == "view" || editorsMode == "filter" || editorsMode == "blockcontent") },
|
||||
{ "print", !user.deniedPermissions.Contains("print") },
|
||||
{ "fillForms", editorsMode != "view" && editorsMode != "comment" && editorsMode != "embedded" && editorsMode != "blockcontent" },
|
||||
{ "modifyFilter", editorsMode != "filter" },
|
||||
{ "modifyContentControl", editorsMode != "blockcontent" },
|
||||
{ "review", canEdit && (editorsMode == "edit" || editorsMode == "review") },
|
||||
{ "chat", !user.id.Equals("uid-0") },
|
||||
{ "reviewGroups", user.reviewGroups },
|
||||
{ "commentGroups", user.commentGroups },
|
||||
{ "userInfoGroups", user.userInfoGroups }
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"editorConfig", new Dictionary<string, object>
|
||||
{
|
||||
{ "actionLink", actionData },
|
||||
{ "mode", mode },
|
||||
{ "lang", request.Cookies.GetOrDefault("ulang", "en") },
|
||||
{ "callbackUrl", CallbackUrl }, // absolute URL to the document storage service
|
||||
{ "coEditing", editorsMode == "view" && user.id.Equals("uid-0") ?
|
||||
new Dictionary<string, object>{
|
||||
{"mode", "strict"},
|
||||
{"change", false}
|
||||
} : null },
|
||||
{ "createUrl", !user.id.Equals("uid-0") ? createUrl : null },
|
||||
{ "templates", user.templates ? templates : null },
|
||||
{
|
||||
// the user currently viewing or editing the document
|
||||
"user", new Dictionary<string, object>
|
||||
{
|
||||
{ "id", !user.id.Equals("uid-0") ? user.id : null },
|
||||
{ "name", user.name },
|
||||
{ "group", user.group }
|
||||
}
|
||||
},
|
||||
{
|
||||
// the parameters for the embedded document type
|
||||
"embedded", new Dictionary<string, object>
|
||||
{
|
||||
{ "saveUrl", directUrl }, // the absolute URL that will allow the document to be saved onto the user personal computer
|
||||
{ "embedUrl", directUrl }, // the absolute URL to the document serving as a source file for the document embedded into the web page
|
||||
{ "shareUrl", directUrl }, // the absolute URL that will allow other users to share this document
|
||||
{ "toolbarDocked", "top" } // the place for the embedded viewer toolbar (top or bottom)
|
||||
}
|
||||
},
|
||||
{
|
||||
// the parameters for the editor interface
|
||||
"customization", new Dictionary<string, object>
|
||||
{
|
||||
{ "about", true }, // the About section display
|
||||
{ "comments", true },
|
||||
{ "feedback", true }, // the Feedback & Support menu button display
|
||||
{ "forcesave", false }, // adds the request for the forced file saving to the callback handler
|
||||
{ "submitForm", submitForm }, // if the Submit form button is displayed or not
|
||||
{
|
||||
"goback", new Dictionary<string, object> // settings for the Open file location menu button and upper right corner button
|
||||
{
|
||||
{ "url", DocManagerHelper.GetServerUrl(false) } // the absolute URL to the website address which will be opened when clicking the Open file location menu button
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// if the secret key to generate token exists
|
||||
if (JwtManager.Enabled)
|
||||
{
|
||||
// encode the document config into a token
|
||||
var token = JwtManager.Encode(config);
|
||||
config.Add("token", token);
|
||||
}
|
||||
|
||||
return jss.Serialize(config);
|
||||
}
|
||||
|
||||
// get the document history
|
||||
public void GetHistory(out string history, out string historyData)
|
||||
{
|
||||
var storagePath = WebConfigurationManager.AppSettings["storage-path"];
|
||||
var jss = new JavaScriptSerializer();
|
||||
var histDir = DocManagerHelper.HistoryDir(DocManagerHelper.StoragePath(FileName, null));
|
||||
|
||||
history = null;
|
||||
historyData = null;
|
||||
|
||||
if (DocManagerHelper.GetFileVersion(histDir) > 0) // if the file was modified (the file version is greater than 0)
|
||||
{
|
||||
var currentVersion = DocManagerHelper.GetFileVersion(histDir);
|
||||
var hist = new List<Dictionary<string, object>>();
|
||||
var histData = new Dictionary<string, object>();
|
||||
|
||||
for (var i = 1; i <= currentVersion; i++) // run through all the file versions
|
||||
{
|
||||
var obj = new Dictionary<string, object>();
|
||||
var dataObj = new Dictionary<string, object>();
|
||||
var verDir = DocManagerHelper.VersionDir(histDir, i); // get the path to the given file version
|
||||
|
||||
var key = i == currentVersion ? Key : File.ReadAllText(Path.Combine(verDir, "key.txt")); // get document key
|
||||
|
||||
obj.Add("key", key);
|
||||
obj.Add("version", i);
|
||||
|
||||
if (i == 1) // check if the version number is equal to 1
|
||||
{
|
||||
var infoPath = Path.Combine(histDir, "createdInfo.json"); // get meta data of this file
|
||||
|
||||
if (File.Exists(infoPath))
|
||||
{
|
||||
var info = jss.Deserialize<Dictionary<string, object>>(File.ReadAllText(infoPath));
|
||||
obj.Add("created", info["created"]); // write meta information to the object (user information and creation date)
|
||||
obj.Add("user", new Dictionary<string, object>() {
|
||||
{ "id", info["id"] },
|
||||
{ "name", info["name"] },
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var ext = Path.GetExtension(FileName).ToLower();
|
||||
dataObj.Add("fileType", ext.Replace(".", ""));
|
||||
dataObj.Add("key", key);
|
||||
// write file url to the data object
|
||||
string prevFileUrl;
|
||||
string directPrevFileUrl;
|
||||
if (Path.IsPathRooted(storagePath) && !string.IsNullOrEmpty(storagePath))
|
||||
{
|
||||
prevFileUrl = i == currentVersion ? DocManagerHelper.GetHistoryDownloadUrl(FileName, i.ToString(), "prev" + ext)
|
||||
: DocManagerHelper.GetDownloadUrl(Directory.GetFiles(verDir, "prev.*")[0].Replace(storagePath + "\\", ""));
|
||||
directPrevFileUrl = i == currentVersion ? DocManagerHelper.GetHistoryDownloadUrl(FileName, i.ToString(), "prev" + ext, false)
|
||||
: DocManagerHelper.GetDownloadUrl(Directory.GetFiles(verDir, "prev.*")[0].Replace(storagePath + "\\", ""), false);
|
||||
}
|
||||
else {
|
||||
prevFileUrl = i == currentVersion ? FileUri
|
||||
: DocManagerHelper.GetHistoryDownloadUrl(FileName, i.ToString(), "prev" + ext);
|
||||
directPrevFileUrl = i == currentVersion ? DocManagerHelper.GetHistoryDownloadUrl(FileName, i.ToString(), "prev" + ext, false)
|
||||
: DocManagerHelper.GetDownloadUrl(Directory.GetFiles(verDir, "prev.*")[0].Replace(storagePath + "\\", ""), false);
|
||||
}
|
||||
|
||||
dataObj.Add("url", prevFileUrl);
|
||||
if (IsEnabledDirectUrl)
|
||||
{
|
||||
dataObj.Add("directUrl", directPrevFileUrl);
|
||||
}
|
||||
dataObj.Add("version", i);
|
||||
if (i > 1) // check if the version number is greater than 1 (the file was modified)
|
||||
{
|
||||
// get the path to the changes.json file
|
||||
var changes = jss.Deserialize<Dictionary<string, object>>(File.ReadAllText(Path.Combine(DocManagerHelper.VersionDir(histDir, i - 1), "changes.json")));
|
||||
var changesArray = (ArrayList)changes["changes"];
|
||||
var change = changesArray.Count > 0
|
||||
? (Dictionary<string, object>)changesArray[0]
|
||||
: new Dictionary<string, object>();
|
||||
|
||||
// write information about changes to the object
|
||||
obj.Add("changes", change.Count > 0 ? changes["changes"] : null);
|
||||
obj.Add("serverVersion", changes["serverVersion"]);
|
||||
obj.Add("created", change.Count > 0 ? change["created"] : null);
|
||||
obj.Add("user", change.Count > 0 ? change["user"] : null);
|
||||
|
||||
var prev = (Dictionary<string, object>)histData[(i - 2).ToString()]; // get the history data from the previous file version
|
||||
dataObj.Add("previous", IsEnabledDirectUrl ? new Dictionary<string, object>() { // write information about previous file version to the data object with direct url
|
||||
{ "fileType", prev["fileType"] },
|
||||
{ "key", prev["key"] }, // write key and url information about previous file version
|
||||
{ "url", prev["url"] },
|
||||
{ "directUrl", prev["directUrl"] },
|
||||
} : new Dictionary<string, object>() { // write information about previous file version to the data object without direct url
|
||||
{ "fileType", prev["fileType"] },
|
||||
{ "key", prev["key"] }, // write key and url information about previous file version
|
||||
{ "url", prev["url"] },
|
||||
});
|
||||
// write the path to the diff.zip archive with differences in this file version
|
||||
var changesUrl = DocManagerHelper.GetHistoryDownloadUrl(FileName, (i - 1).ToString(), "diff.zip");
|
||||
dataObj.Add("changesUrl", changesUrl);
|
||||
}
|
||||
if(JwtManager.Enabled)
|
||||
{
|
||||
var token = JwtManager.Encode(dataObj);
|
||||
dataObj.Add("token", token);
|
||||
}
|
||||
hist.Add(obj); // add object dictionary to the hist list
|
||||
histData.Add((i - 1).ToString(), dataObj); // write data object information to the history data
|
||||
}
|
||||
|
||||
// write history information about the current file version to the history object
|
||||
history = jss.Serialize(new Dictionary<string, object>()
|
||||
{
|
||||
{ "currentVersion", currentVersion },
|
||||
{ "history", hist }
|
||||
});
|
||||
historyData = jss.Serialize(histData);
|
||||
}
|
||||
}
|
||||
|
||||
// get a document which will be compared with the current document
|
||||
public void GetCompareFileData(out string compareConfig)
|
||||
{
|
||||
var jss = new JavaScriptSerializer();
|
||||
|
||||
// get the path to the compared file
|
||||
var compareFileUrl = new UriBuilder(DocManagerHelper.GetServerUrl(true))
|
||||
{
|
||||
Path = HttpRuntime.AppDomainAppVirtualPath
|
||||
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
|
||||
+ "webeditor.ashx",
|
||||
Query = "type=assets&fileName=" + HttpUtility.UrlEncode("sample.docx")
|
||||
};
|
||||
|
||||
var directCompareFileUrl = new UriBuilder(DocManagerHelper.GetServerUrl(false))
|
||||
{
|
||||
Path = HttpRuntime.AppDomainAppVirtualPath
|
||||
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
|
||||
+ "webeditor.ashx",
|
||||
Query = "type=assets&fileName=" + HttpUtility.UrlEncode("sample.docx")
|
||||
};
|
||||
|
||||
// create an object with the information about the compared file
|
||||
var dataCompareFile = new Dictionary<string, object>
|
||||
{
|
||||
{ "fileType", "docx" },
|
||||
{ "url", compareFileUrl.ToString() }
|
||||
};
|
||||
|
||||
if (IsEnabledDirectUrl)
|
||||
{
|
||||
dataCompareFile.Add("directUrl", directCompareFileUrl.ToString());
|
||||
}
|
||||
|
||||
if (JwtManager.Enabled) // if the secret key to generate token exists
|
||||
{
|
||||
var compareFileToken = JwtManager.Encode(dataCompareFile); // encode the dataCompareFile object into the token
|
||||
dataCompareFile.Add("token", compareFileToken); // and add it to the dataCompareFile object
|
||||
}
|
||||
|
||||
compareConfig = jss.Serialize(dataCompareFile);
|
||||
}
|
||||
|
||||
// get a logo config
|
||||
public void GetLogoConfig(out string logoUrl)
|
||||
{
|
||||
var jss = new JavaScriptSerializer();
|
||||
|
||||
// get the path to the logo image
|
||||
var mailMergeUrl = new UriBuilder(DocManagerHelper.GetServerUrl(true))
|
||||
{
|
||||
Path = HttpRuntime.AppDomainAppVirtualPath
|
||||
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
|
||||
+ "Content\\images\\logo.png"
|
||||
};
|
||||
|
||||
var directMailMergeUrl = new UriBuilder(DocManagerHelper.GetServerUrl(false))
|
||||
{
|
||||
Path = HttpRuntime.AppDomainAppVirtualPath
|
||||
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
|
||||
+ "Content\\images\\logo.png"
|
||||
};
|
||||
|
||||
// create a logo config
|
||||
var logoConfig = new Dictionary<string, object>
|
||||
{
|
||||
{ "fileType", "png"},
|
||||
{ "url", mailMergeUrl.ToString()}
|
||||
};
|
||||
|
||||
if (IsEnabledDirectUrl)
|
||||
{
|
||||
logoConfig.Add("directUrl", directMailMergeUrl.ToString());
|
||||
}
|
||||
|
||||
if (JwtManager.Enabled) // if the secret key to generate token exists
|
||||
{
|
||||
var token = JwtManager.Encode(logoConfig); // encode logoConfig into the token
|
||||
logoConfig.Add("token", token); // and add it to the logo config
|
||||
}
|
||||
|
||||
logoUrl = jss.Serialize(logoConfig).Replace("{", "").Replace("}", "");
|
||||
}
|
||||
|
||||
// get a mail merge config
|
||||
public void GetMailMergeConfig(out string dataMailMergeRecipients)
|
||||
{
|
||||
var jss = new JavaScriptSerializer();
|
||||
|
||||
// get the path to the recipients data for mail merging
|
||||
var mailMergeUrl = new UriBuilder(DocManagerHelper.GetServerUrl(true))
|
||||
{
|
||||
Path =
|
||||
HttpRuntime.AppDomainAppVirtualPath
|
||||
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
|
||||
+ "webeditor.ashx",
|
||||
Query = "type=csv"
|
||||
};
|
||||
|
||||
var directMailMergeUrl = new UriBuilder(DocManagerHelper.GetServerUrl(false))
|
||||
{
|
||||
Path =
|
||||
HttpRuntime.AppDomainAppVirtualPath
|
||||
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
|
||||
+ "webeditor.ashx",
|
||||
Query = "type=csv"
|
||||
};
|
||||
|
||||
// create a mail merge config
|
||||
var mailMergeConfig = new Dictionary<string, object>
|
||||
{
|
||||
{ "fileType", "csv" },
|
||||
{ "url", mailMergeUrl.ToString()}
|
||||
};
|
||||
|
||||
if (IsEnabledDirectUrl)
|
||||
{
|
||||
mailMergeConfig.Add("directUrl", directMailMergeUrl.ToString());
|
||||
}
|
||||
|
||||
if (JwtManager.Enabled) // if the secret key to generate token exists
|
||||
{
|
||||
var mailmergeToken = JwtManager.Encode(mailMergeConfig); // encode mailMergeConfig into the token
|
||||
mailMergeConfig.Add("token", mailmergeToken); // and add it to the mail merge config
|
||||
}
|
||||
|
||||
dataMailMergeRecipients = jss.Serialize(mailMergeConfig);
|
||||
}
|
||||
|
||||
//get a users for mentions
|
||||
public void GetUsersMentions(HttpRequest request, out string usersForMentions)
|
||||
{
|
||||
var jss = new JavaScriptSerializer();
|
||||
var id = request.Cookies.GetOrDefault("uid", null);
|
||||
var user = Users.getUser(id);
|
||||
usersForMentions = !user.id.Equals("uid-0") ? jss.Serialize(Users.getUsersForMentions(user.id)) : null;
|
||||
}
|
||||
}
|
||||
}
|
||||
72
web/documentserver-example/csharp-mvc/Models/FileUtility.cs
Normal file
@ -0,0 +1,72 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
namespace OnlineEditorsExampleMVC.Models
|
||||
{
|
||||
public static class FileUtility
|
||||
{
|
||||
public enum FileType
|
||||
{
|
||||
Word,
|
||||
Cell,
|
||||
Slide
|
||||
}
|
||||
|
||||
// get file type
|
||||
public static FileType GetFileType(string fileName)
|
||||
{
|
||||
var ext = Path.GetExtension(fileName).ToLower();
|
||||
|
||||
if (ExtsDocument.Contains(ext)) return FileType.Word; // word type for document extensions
|
||||
if (ExtsSpreadsheet.Contains(ext)) return FileType.Cell; // cell type for spreadsheet extensions
|
||||
if (ExtsPresentation.Contains(ext)) return FileType.Slide; // slide type for presentation extensions
|
||||
|
||||
return FileType.Word; // the default type is word
|
||||
}
|
||||
|
||||
// document extensions
|
||||
public static readonly List<string> ExtsDocument = new List<string>
|
||||
{
|
||||
".doc", ".docx", ".docm",
|
||||
".dot", ".dotx", ".dotm",
|
||||
".odt", ".fodt", ".ott", ".rtf", ".txt",
|
||||
".html", ".htm", ".mht", ".xml",
|
||||
".pdf", ".djvu", ".fb2", ".epub", ".xps", ".oxps", ".oform"
|
||||
};
|
||||
|
||||
// spreadsheet extensions
|
||||
public static readonly List<string> ExtsSpreadsheet = new List<string>
|
||||
{
|
||||
".xls", ".xlsx", ".xlsm", ".xlsb",
|
||||
".xlt", ".xltx", ".xltm",
|
||||
".ods", ".fods", ".ots", ".csv"
|
||||
};
|
||||
|
||||
// presentation extensions
|
||||
public static readonly List<string> ExtsPresentation = new List<string>
|
||||
{
|
||||
".pps", ".ppsx", ".ppsm",
|
||||
".ppt", ".pptx", ".pptm",
|
||||
".pot", ".potx", ".potm",
|
||||
".odp", ".fodp", ".otp"
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,225 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>
|
||||
</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{D2C16047-E658-444A-A45D-23CEE79CB8F3}</ProjectGuid>
|
||||
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>OnlineEditorsExampleMVC</RootNamespace>
|
||||
<AssemblyName>OnlineEditorsExampleMVC</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<MvcBuildViews>false</MvcBuildViews>
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
<IISExpressSSLPort />
|
||||
<IISExpressAnonymousAuthentication />
|
||||
<IISExpressWindowsAuthentication />
|
||||
<IISExpressUseClassicPipelineMode />
|
||||
<Use64BitIISExpress />
|
||||
<UseGlobalApplicationHostFile />
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="JWT, Version=9.0.0.0, Culture=neutral, PublicKeyToken=6f98bca0f40f2ecf, processorArchitecture=MSIL">
|
||||
<HintPath>packages\JWT.9.0.3\lib\net46\JWT.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
<Reference Include="System.Web.Services" />
|
||||
<Reference Include="Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Antlr.3.5.0.2\lib\Antlr3.Runtime.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||
<HintPath>packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http.Formatting, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.Helpers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Http, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.AspNet.WebApi.Core.5.2.7\lib\net45\System.Web.Http.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Http.WebHost, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.AspNet.WebApi.WebHost.5.2.7\lib\net45\System.Web.Http.WebHost.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.AspNet.Mvc.5.2.7\lib\net45\System.Web.Mvc.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Optimization, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.AspNet.Web.Optimization.1.1.3\lib\net40\System.Web.Optimization.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.AspNet.Razor.3.2.7\lib\net45\System.Web.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="WebGrease, Version=1.6.5135.21930, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>packages\WebGrease.1.6.0\lib\WebGrease.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="App_Start\BundleConfig.cs" />
|
||||
<Compile Include="App_Start\FilterConfig.cs" />
|
||||
<Compile Include="App_Start\RouteConfig.cs" />
|
||||
<Compile Include="App_Start\WebApiConfig.cs" />
|
||||
<Compile Include="Controllers\HomeController.cs" />
|
||||
<Compile Include="Global.asax.cs">
|
||||
<DependentUpon>Global.asax</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Helpers\TrackManager.cs" />
|
||||
<Compile Include="Helpers\DocManagerHelper.cs" />
|
||||
<Compile Include="Helpers\DocumentConverter.cs" />
|
||||
<Compile Include="Helpers\JwtManager.cs" />
|
||||
<Compile Include="Helpers\Users.cs" />
|
||||
<Compile Include="Helpers\Utils.cs" />
|
||||
<Compile Include="Models\FileModel.cs" />
|
||||
<Compile Include="Models\FileUtility.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="WebEditor.ashx.cs">
|
||||
<DependentUpon>WebEditor.ashx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Content\editor.css" />
|
||||
<Content Include="Content\images\block-content.svg" />
|
||||
<Content Include="Content\images\cell.ico" />
|
||||
<Content Include="Content\images\close.svg" />
|
||||
<Content Include="Content\images\comment.svg" />
|
||||
<Content Include="Content\images\delete.svg" />
|
||||
<Content Include="Content\images\desktop.svg" />
|
||||
<Content Include="Content\images\done.svg" />
|
||||
<Content Include="Content\images\download.svg" />
|
||||
<Content Include="Content\images\embeded.svg" />
|
||||
<Content Include="Content\images\error.svg" />
|
||||
<Content Include="Content\images\file_docx.svg" />
|
||||
<Content Include="Content\images\file_docxf.svg" />
|
||||
<Content Include="Content\images\file_pptx.svg" />
|
||||
<Content Include="Content\images\file_upload.svg" />
|
||||
<Content Include="Content\images\file_xlsx.svg" />
|
||||
<Content Include="Content\images\fill-forms.svg" />
|
||||
<Content Include="Content\images\filter.svg" />
|
||||
<Content Include="Content\images\icon_docx.svg" />
|
||||
<Content Include="Content\images\icon_pptx.svg" />
|
||||
<Content Include="Content\images\icon_xlsx.svg" />
|
||||
<Content Include="Content\images\info.svg" />
|
||||
<Content Include="Content\images\loader16.gif" />
|
||||
<Content Include="Content\images\logo.png" />
|
||||
<Content Include="Content\images\logo.svg" />
|
||||
<Content Include="Content\images\mobile-fill-forms.svg" />
|
||||
<Content Include="Content\images\mobile.svg" />
|
||||
<Content Include="Content\images\notdone.svg" />
|
||||
<Content Include="Content\images\review.svg" />
|
||||
<Content Include="Content\images\slide.ico" />
|
||||
<Content Include="Content\images\word.ico" />
|
||||
<Content Include="Content\jquery-ui.css" />
|
||||
<Content Include="Content\media.css" />
|
||||
<Content Include="Content\stylesheet.css" />
|
||||
<Content Include="favicon.ico" />
|
||||
<Content Include="Global.asax" />
|
||||
<Content Include="LICENSE" />
|
||||
<Content Include="Scripts\jquery-1.8.2.js" />
|
||||
<Content Include="Scripts\jquery-ui.js" />
|
||||
<Content Include="Scripts\jquery.blockUI.js" />
|
||||
<Content Include="Scripts\jquery.dropdownToggle.js" />
|
||||
<Content Include="Scripts\jquery.fileupload.js" />
|
||||
<Content Include="Scripts\jquery.iframe-transport.js" />
|
||||
<Content Include="Scripts\jscript.js" />
|
||||
<Content Include="Views\Home\Editor.aspx" />
|
||||
<Content Include="Views\Home\Index.aspx" />
|
||||
<Content Include="Web.config">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Content Include="Views\Web.config" />
|
||||
<Content Include="Views\Shared\Error.aspx" />
|
||||
<Content Include="licenses\EntityFramework.license" />
|
||||
<Content Include="licenses\Microsoft.Web.Infrastructure.license" />
|
||||
<Content Include="licenses\Newtonsoft.Json.license" />
|
||||
<Content Include="licenses\jquery.license" />
|
||||
<Content Include="licenses\WebGrease.license" />
|
||||
<Content Include="web.appsettings.config" />
|
||||
<Content Include="WebEditor.ashx" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="assets\AUTHORS.md" />
|
||||
<Content Include="assets\LICENSE" />
|
||||
<Content Include="assets\new\new.docx" />
|
||||
<Content Include="assets\new\new.docxf" />
|
||||
<Content Include="assets\new\new.pptx" />
|
||||
<Content Include="assets\new\new.xlsx" />
|
||||
<Content Include="assets\sample\csv.csv" />
|
||||
<Content Include="assets\sample\sample.docx" />
|
||||
<Content Include="assets\sample\sample.docxf" />
|
||||
<Content Include="assets\sample\sample.pptx" />
|
||||
<Content Include="assets\sample\sample.xlsx" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">16.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="Exists('$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets')" />
|
||||
<Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
|
||||
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(WebProjectOutputDir)" />
|
||||
</Target>
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||
<WebProjectProperties>
|
||||
<UseIIS>True</UseIIS>
|
||||
<AutoAssignPort>True</AutoAssignPort>
|
||||
<DevelopmentServerPort>56212</DevelopmentServerPort>
|
||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||
<IISUrl>http://localhost:52695/</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
<UseCustomServer>False</UseCustomServer>
|
||||
<CustomServerUrl>
|
||||
</CustomServerUrl>
|
||||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
||||
</WebProjectProperties>
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
||||
@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.30523.141
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OnlineEditorsExampleMVC", "OnlineEditorsExampleMVC.csproj", "{D2C16047-E658-444A-A45D-23CEE79CB8F3}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{D2C16047-E658-444A-A45D-23CEE79CB8F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D2C16047-E658-444A-A45D-23CEE79CB8F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D2C16047-E658-444A-A45D-23CEE79CB8F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D2C16047-E658-444A-A45D-23CEE79CB8F3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {808AEE5A-E969-411D-8326-9C1F7734DC70}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@ -0,0 +1,19 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
|
||||
[assembly: AssemblyTitle("OnlineEditorsExampleMVC")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Ascensio System SIA")]
|
||||
[assembly: AssemblyProduct("OnlineEditorsExampleMVC")]
|
||||
[assembly: AssemblyCopyright("Ascensio System SIA 2023")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
[assembly: Guid("5b0423f6-859c-4514-a5c7-483e25f9bd31")]
|
||||
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
81
web/documentserver-example/csharp-mvc/README.md
Normal file
@ -0,0 +1,81 @@
|
||||
## Overview
|
||||
|
||||
This example will help you integrate ONLYOFFICE Docs into your web application written in .Net (C# MVC).
|
||||
|
||||
**Please note**: It is intended for testing purposes and demonstrating functionality of the editors. Do NOT use this integration example on your own server without proper code modifications! In case you enabled the test example, disable it before going for production.
|
||||
|
||||
## Step 1. Install ONLYOFFICE Docs
|
||||
|
||||
Download and install ONLYOFFICE Docs (packaged as Document Server).
|
||||
|
||||
See the detailed guide to learn how to install Document Server [for Windows](https://helpcenter.onlyoffice.com/installation/docs-developer-install-windows.aspx), [for Linux](https://helpcenter.onlyoffice.com/installation/docs-developer-install-ubuntu.aspx), or [for Docker](https://helpcenter.onlyoffice.com/server/developer-edition/docker/docker-installation.aspx).
|
||||
|
||||
## Step 2. Download the .Net (C# MVC) code for the editors integration
|
||||
|
||||
Download the [.Net (C# MVC) example](https://api.onlyoffice.com/editors/demopreview) from our site.
|
||||
|
||||
To connect the editors to your website, specify the path to the editors installation and the path to the storage folder in the *settings.config* file:
|
||||
```
|
||||
<add key="storage-path" value=""/>
|
||||
<add key="files.docservice.url.site" value="https://documentserver/" />
|
||||
```
|
||||
where the **documentserver** is the name of the server with the ONLYOFFICE Document Server installed and the **storage-path** is the path where files will be created and stored. You can set an absolute path.
|
||||
|
||||
If you want to experiment with the editor configuration, modify the [parameters](https://api.onlyoffice.com/editors/advanced) in the *DocEditor.aspx* file.
|
||||
|
||||
## Step 3. Install the prerequisites
|
||||
Сheck if your system meets the system requirements:
|
||||
* **Microsoft .NET Framework**: version 4.5 (download it from the [official Microsoft website](https://www.microsoft.com/en-US/download/details.aspx?id=30653));
|
||||
* **Internet Information Services**: version 7 or later.
|
||||
|
||||
Configure the IIS components for the server to work correctly:
|
||||
1. Open Windows features:
|
||||
|
||||
**Start** -> **Control Panel** -> **Programs** -> **Programs and Features** -> **Turn Windows features on or off**
|
||||
|
||||
2. In the opened window, find **Internet Information Services** and choose all the necessary features. To do this, open the **World Wide Web Services** list and check the following components:
|
||||
* **Application Development Features**: .NET Extensibility 4.8, ASP.NET 4.8, ISAPI Extensions, ISAPI Filters,
|
||||
* **Common HTTP Features**: Default Document,
|
||||
* **Security**: Request Filtering.
|
||||
|
||||
## Step 4. Run your website with the editors
|
||||
1. Run the Internet Information Service (IIS) Manager:
|
||||
|
||||
**Start** -> **Control Panel** -> **System and Security** -> **Administrative Tools** -> **Internet Information Services (IIS) Manager**
|
||||
2. Add your website in the IIS Manager.
|
||||
|
||||
On the **Connections** panel right-click the **Sites** node in the tree, then click **Add Website**.
|
||||
|
||||

|
||||
3. In the **Add Website** dialog box specify the name of the folder with the .Net (C# MVC) project in the **Site name** box.
|
||||
|
||||
Specify the path to the folder with your project in the **Physical Path** box.
|
||||
|
||||
Specify the unique value used only for this website in the **Port** box.
|
||||
|
||||

|
||||
4. Check for the .NET platform version specified in IIS Manager for you website. Choose **v4.0.** version.
|
||||
|
||||
**Application Pools** -> right-click the platform name -> **Set application Pool defaults** -> **.NET CLR version**
|
||||
|
||||

|
||||
5. Browse your website with the IIS Manager:
|
||||
|
||||
Right-click the site -> **Manage Website** -> **Browse**
|
||||
|
||||

|
||||
|
||||
## Step 5. Check accessibility
|
||||
|
||||
In case the example and Document Server are installed on different computers, make sure that your server with the example installed has access to the Document Server with the address which you specify instead of **documentserver** in the configuration files.
|
||||
|
||||
Make sure that the Document Server has access to the server with the example installed with the address which you specify instead of **example.com** in the configuration files.
|
||||
|
||||
## Important security info
|
||||
|
||||
Please keep in mind the following security aspects when you are using test examples:
|
||||
|
||||
* There is no protection of the storage from unauthorized access since there is no need for authorization.
|
||||
* There are no checks against parameter substitution in links, since the parameters are generated by the code according to the pre-arranged scripts.
|
||||
* There are no data checks in requests of saving the file after editing, since each test example is intended for requests only from ONLYOFFICE Document Server.
|
||||
* There are no prohibitions on using test examples from other sites, since they are intended to interact with ONLYOFFICE Document Server from another domain.
|
||||
9440
web/documentserver-example/csharp-mvc/Scripts/jquery-1.8.2.js
vendored
Normal file
5
web/documentserver-example/csharp-mvc/Scripts/jquery-ui.js
vendored
Normal file
576
web/documentserver-example/csharp-mvc/Scripts/jquery.blockUI.js
Normal file
@ -0,0 +1,576 @@
|
||||
/*!
|
||||
* jQuery blockUI plugin
|
||||
* Version 2.55 (18-JAN-2013)
|
||||
* @requires jQuery v1.7 or later
|
||||
*
|
||||
* Examples at: http://malsup.com/jquery/block/
|
||||
* Copyright (c) 2007-2013 M. Alsup
|
||||
* Dual licensed under the MIT and GPL licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl.html
|
||||
*
|
||||
* Thanks to Amir-Hossein Sobhi for some excellent contributions!
|
||||
*/
|
||||
|
||||
;(function() {
|
||||
"use strict";
|
||||
|
||||
function setup($) {
|
||||
$.fn._fadeIn = $.fn.fadeIn;
|
||||
|
||||
var noOp = $.noop || function() {};
|
||||
|
||||
// this bit is to ensure we don't call setExpression when we shouldn't (with extra muscle to handle
|
||||
// retarded userAgent strings on Vista)
|
||||
var msie = /MSIE/.test(navigator.userAgent);
|
||||
var ie6 = /MSIE 6.0/.test(navigator.userAgent);
|
||||
var mode = document.documentMode || 0;
|
||||
// var setExpr = msie && (($.browser.version < 8 && !mode) || mode < 8);
|
||||
var setExpr = $.isFunction( document.createElement('div').style.setExpression );
|
||||
|
||||
// global $ methods for blocking/unblocking the entire page
|
||||
$.blockUI = function(opts) { install(window, opts); };
|
||||
$.unblockUI = function(opts) { remove(window, opts); };
|
||||
|
||||
// convenience method for quick growl-like notifications (http://www.google.com/search?q=growl)
|
||||
$.growlUI = function(title, message, timeout, onClose) {
|
||||
var $m = $('<div class="growlUI"></div>');
|
||||
if (title) $m.append('<h1>'+title+'</h1>');
|
||||
if (message) $m.append('<h2>'+message+'</h2>');
|
||||
if (timeout === undefined) timeout = 3000;
|
||||
$.blockUI({
|
||||
message: $m, fadeIn: 700, fadeOut: 1000, centerY: false,
|
||||
timeout: timeout, showOverlay: false,
|
||||
onUnblock: onClose,
|
||||
css: $.blockUI.defaults.growlCSS
|
||||
});
|
||||
};
|
||||
|
||||
// plugin method for blocking element content
|
||||
$.fn.block = function(opts) {
|
||||
var fullOpts = $.extend({}, $.blockUI.defaults, opts || {});
|
||||
this.each(function() {
|
||||
var $el = $(this);
|
||||
if (fullOpts.ignoreIfBlocked && $el.data('blockUI.isBlocked'))
|
||||
return;
|
||||
$el.unblock({ fadeOut: 0 });
|
||||
});
|
||||
|
||||
return this.each(function() {
|
||||
if ($.css(this,'position') == 'static') {
|
||||
this.style.position = 'relative';
|
||||
$(this).data('blockUI.static', true);
|
||||
}
|
||||
this.style.zoom = 1; // force 'hasLayout' in ie
|
||||
install(this, opts);
|
||||
});
|
||||
};
|
||||
|
||||
// plugin method for unblocking element content
|
||||
$.fn.unblock = function(opts) {
|
||||
return this.each(function() {
|
||||
remove(this, opts);
|
||||
});
|
||||
};
|
||||
|
||||
$.blockUI.version = 2.55; // 2nd generation blocking at no extra cost!
|
||||
|
||||
// override these in your code to change the default behavior and style
|
||||
$.blockUI.defaults = {
|
||||
// message displayed when blocking (use null for no message)
|
||||
message: '<h1>Please wait...</h1>',
|
||||
|
||||
title: null, // title string; only used when theme == true
|
||||
draggable: true, // only used when theme == true (requires jquery-ui.js to be loaded)
|
||||
|
||||
theme: false, // set to true to use with jQuery UI themes
|
||||
|
||||
// styles for the message when blocking; if you wish to disable
|
||||
// these and use an external stylesheet then do this in your code:
|
||||
// $.blockUI.defaults.css = {};
|
||||
css: {
|
||||
padding: 0,
|
||||
margin: 0,
|
||||
width: '30%',
|
||||
top: '40%',
|
||||
left: '35%',
|
||||
textAlign: 'center',
|
||||
color: '#000',
|
||||
border: '3px solid #aaa',
|
||||
backgroundColor:'#fff',
|
||||
cursor: 'wait'
|
||||
},
|
||||
|
||||
// minimal style set used when themes are used
|
||||
themedCSS: {
|
||||
//width: '30%',
|
||||
top: '20%',
|
||||
left: '50%',
|
||||
marginLeft: "-325px"
|
||||
},
|
||||
|
||||
// styles for the overlay
|
||||
overlayCSS: {
|
||||
backgroundColor: '#000',
|
||||
opacity: 0.6,
|
||||
cursor: 'wait'
|
||||
},
|
||||
|
||||
// style to replace wait cursor before unblocking to correct issue
|
||||
// of lingering wait cursor
|
||||
cursorReset: 'default',
|
||||
|
||||
// styles applied when using $.growlUI
|
||||
growlCSS: {
|
||||
width: '350px',
|
||||
top: '10px',
|
||||
left: '',
|
||||
right: '10px',
|
||||
border: 'none',
|
||||
padding: '5px',
|
||||
opacity: 0.6,
|
||||
cursor: 'default',
|
||||
color: '#fff',
|
||||
backgroundColor: '#000',
|
||||
'-webkit-border-radius':'10px',
|
||||
'-moz-border-radius': '10px',
|
||||
'border-radius': '10px'
|
||||
},
|
||||
|
||||
// IE issues: 'about:blank' fails on HTTPS and javascript:false is s-l-o-w
|
||||
// (hat tip to Jorge H. N. de Vasconcelos)
|
||||
/*jshint scripturl:true */
|
||||
iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank',
|
||||
|
||||
// force usage of iframe in non-IE browsers (handy for blocking applets)
|
||||
forceIframe: false,
|
||||
|
||||
// z-index for the blocking overlay
|
||||
baseZ: 1000,
|
||||
|
||||
// set these to true to have the message automatically centered
|
||||
centerX: true, // <-- only effects element blocking (page block controlled via css above)
|
||||
centerY: true,
|
||||
|
||||
// allow body element to be stetched in ie6; this makes blocking look better
|
||||
// on "short" pages. disable if you wish to prevent changes to the body height
|
||||
allowBodyStretch: true,
|
||||
|
||||
// enable if you want key and mouse events to be disabled for content that is blocked
|
||||
bindEvents: true,
|
||||
|
||||
// be default blockUI will supress tab navigation from leaving blocking content
|
||||
// (if bindEvents is true)
|
||||
constrainTabKey: true,
|
||||
|
||||
// fadeIn time in millis; set to 0 to disable fadeIn on block
|
||||
fadeIn: 200,
|
||||
|
||||
// fadeOut time in millis; set to 0 to disable fadeOut on unblock
|
||||
fadeOut: 400,
|
||||
|
||||
// time in millis to wait before auto-unblocking; set to 0 to disable auto-unblock
|
||||
timeout: 0,
|
||||
|
||||
// disable if you don't want to show the overlay
|
||||
showOverlay: true,
|
||||
|
||||
// if true, focus will be placed in the first available input field when
|
||||
// page blocking
|
||||
focusInput: true,
|
||||
|
||||
// suppresses the use of overlay styles on FF/Linux (due to performance issues with opacity)
|
||||
// no longer needed in 2012
|
||||
// applyPlatformOpacityRules: true,
|
||||
|
||||
// callback method invoked when fadeIn has completed and blocking message is visible
|
||||
onBlock: null,
|
||||
|
||||
// callback method invoked when unblocking has completed; the callback is
|
||||
// passed the element that has been unblocked (which is the window object for page
|
||||
// blocks) and the options that were passed to the unblock call:
|
||||
// onUnblock(element, options)
|
||||
onUnblock: null,
|
||||
|
||||
// callback method invoked when the overlay area is clicked.
|
||||
// setting this will turn the cursor to a pointer, otherwise cursor defined in overlayCss will be used.
|
||||
onOverlayClick: null,
|
||||
|
||||
// don't ask; if you really must know: http://groups.google.com/group/jquery-en/browse_thread/thread/36640a8730503595/2f6a79a77a78e493#2f6a79a77a78e493
|
||||
quirksmodeOffsetHack: 4,
|
||||
|
||||
// class name of the message block
|
||||
blockMsgClass: 'blockMsg',
|
||||
|
||||
// if it is already blocked, then ignore it (don't unblock and reblock)
|
||||
ignoreIfBlocked: false
|
||||
};
|
||||
|
||||
// private data and functions follow...
|
||||
|
||||
var pageBlock = null;
|
||||
var pageBlockEls = [];
|
||||
|
||||
function install(el, opts) {
|
||||
var css, themedCSS;
|
||||
var full = (el == window);
|
||||
var msg = (opts && opts.message !== undefined ? opts.message : undefined);
|
||||
opts = $.extend({}, $.blockUI.defaults, opts || {});
|
||||
|
||||
if (opts.ignoreIfBlocked && $(el).data('blockUI.isBlocked'))
|
||||
return;
|
||||
|
||||
opts.overlayCSS = $.extend({}, $.blockUI.defaults.overlayCSS, opts.overlayCSS || {});
|
||||
css = $.extend({}, $.blockUI.defaults.css, opts.css || {});
|
||||
if (opts.onOverlayClick)
|
||||
opts.overlayCSS.cursor = 'pointer';
|
||||
|
||||
themedCSS = $.extend({}, $.blockUI.defaults.themedCSS, opts.themedCSS || {});
|
||||
msg = msg === undefined ? opts.message : msg;
|
||||
|
||||
// remove the current block (if there is one)
|
||||
if (full && pageBlock)
|
||||
remove(window, {fadeOut:0});
|
||||
|
||||
// if an existing element is being used as the blocking content then we capture
|
||||
// its current place in the DOM (and current display style) so we can restore
|
||||
// it when we unblock
|
||||
if (msg && typeof msg != 'string' && (msg.parentNode || msg.jquery)) {
|
||||
var node = msg.jquery ? msg[0] : msg;
|
||||
var data = {};
|
||||
$(el).data('blockUI.history', data);
|
||||
data.el = node;
|
||||
data.parent = node.parentNode;
|
||||
data.display = node.style.display;
|
||||
data.position = node.style.position;
|
||||
if (data.parent)
|
||||
data.parent.removeChild(node);
|
||||
}
|
||||
|
||||
$(el).data('blockUI.onUnblock', opts.onUnblock);
|
||||
var z = opts.baseZ;
|
||||
|
||||
// blockUI uses 3 layers for blocking, for simplicity they are all used on every platform;
|
||||
// layer1 is the iframe layer which is used to supress bleed through of underlying content
|
||||
// layer2 is the overlay layer which has opacity and a wait cursor (by default)
|
||||
// layer3 is the message content that is displayed while blocking
|
||||
var lyr1, lyr2, lyr3, s;
|
||||
if (msie || opts.forceIframe)
|
||||
lyr1 = $('<iframe class="blockUI" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+opts.iframeSrc+'"></iframe>');
|
||||
else
|
||||
lyr1 = $('<div class="blockUI" style="display:none"></div>');
|
||||
|
||||
if (opts.theme)
|
||||
lyr2 = $('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+ (z++) +';display:none"></div>');
|
||||
else
|
||||
lyr2 = $('<div class="blockUI blockOverlay" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');
|
||||
|
||||
if (opts.theme && full) {
|
||||
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(z+10)+';display:none;position:fixed">';
|
||||
if ( opts.title ) {
|
||||
s += '<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(opts.title || ' ')+'</div>';
|
||||
}
|
||||
s += '<div class="ui-widget-content ui-dialog-content"></div>';
|
||||
s += '</div>';
|
||||
}
|
||||
else if (opts.theme) {
|
||||
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(z+10)+';display:none;position:absolute">';
|
||||
if ( opts.title ) {
|
||||
s += '<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(opts.title || ' ')+'</div>';
|
||||
}
|
||||
s += '<div class="ui-widget-content ui-dialog-content"></div>';
|
||||
s += '</div>';
|
||||
}
|
||||
else if (full) {
|
||||
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockPage" style="z-index:'+(z+10)+';display:none;position:fixed"></div>';
|
||||
}
|
||||
else {
|
||||
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockElement" style="z-index:'+(z+10)+';display:none;position:absolute"></div>';
|
||||
}
|
||||
lyr3 = $(s);
|
||||
|
||||
// if we have a message, style it
|
||||
if (msg) {
|
||||
if (opts.theme) {
|
||||
lyr3.css(themedCSS);
|
||||
lyr3.addClass('ui-widget-content');
|
||||
}
|
||||
else
|
||||
lyr3.css(css);
|
||||
}
|
||||
|
||||
// style the overlay
|
||||
if (!opts.theme /*&& (!opts.applyPlatformOpacityRules)*/)
|
||||
lyr2.css(opts.overlayCSS);
|
||||
lyr2.css('position', full ? 'fixed' : 'absolute');
|
||||
|
||||
// make iframe layer transparent in IE
|
||||
if (msie || opts.forceIframe)
|
||||
lyr1.css('opacity',0.0);
|
||||
|
||||
//$([lyr1[0],lyr2[0],lyr3[0]]).appendTo(full ? 'body' : el);
|
||||
var layers = [lyr1,lyr2,lyr3], $par = full ? $('body') : $(el);
|
||||
$.each(layers, function() {
|
||||
this.appendTo($par);
|
||||
});
|
||||
|
||||
if (opts.theme && opts.draggable && $.fn.draggable) {
|
||||
lyr3.draggable({
|
||||
handle: '.ui-dialog-titlebar',
|
||||
cancel: 'li'
|
||||
});
|
||||
}
|
||||
|
||||
// ie7 must use absolute positioning in quirks mode and to account for activex issues (when scrolling)
|
||||
var expr = setExpr && (!$.support.boxModel || $('object,embed', full ? null : el).length > 0);
|
||||
if (ie6 || expr) {
|
||||
// give body 100% height
|
||||
if (full && opts.allowBodyStretch && $.support.boxModel)
|
||||
$('html,body').css('height','100%');
|
||||
|
||||
// fix ie6 issue when blocked element has a border width
|
||||
if ((ie6 || !$.support.boxModel) && !full) {
|
||||
var t = sz(el,'borderTopWidth'), l = sz(el,'borderLeftWidth');
|
||||
var fixT = t ? '(0 - '+t+')' : 0;
|
||||
var fixL = l ? '(0 - '+l+')' : 0;
|
||||
}
|
||||
|
||||
// simulate fixed position
|
||||
$.each(layers, function(i,o) {
|
||||
var s = o[0].style;
|
||||
s.position = 'absolute';
|
||||
if (i < 2) {
|
||||
if (full)
|
||||
s.setExpression('height','Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:'+opts.quirksmodeOffsetHack+') + "px"');
|
||||
else
|
||||
s.setExpression('height','this.parentNode.offsetHeight + "px"');
|
||||
if (full)
|
||||
s.setExpression('width','jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"');
|
||||
else
|
||||
s.setExpression('width','this.parentNode.offsetWidth + "px"');
|
||||
if (fixL) s.setExpression('left', fixL);
|
||||
if (fixT) s.setExpression('top', fixT);
|
||||
}
|
||||
else if (opts.centerY) {
|
||||
if (full) s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');
|
||||
s.marginTop = 0;
|
||||
}
|
||||
else if (!opts.centerY && full) {
|
||||
var top = (opts.css && opts.css.top) ? parseInt(opts.css.top, 10) : 0;
|
||||
var expression = '((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"';
|
||||
s.setExpression('top',expression);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// show the message
|
||||
if (msg) {
|
||||
if (opts.theme)
|
||||
lyr3.find('.ui-widget-content').append(msg);
|
||||
else
|
||||
lyr3.append(msg);
|
||||
if (msg.jquery || msg.nodeType)
|
||||
$(msg).show();
|
||||
}
|
||||
|
||||
if ((msie || opts.forceIframe) && opts.showOverlay)
|
||||
lyr1.show(); // opacity is zero
|
||||
if (opts.fadeIn) {
|
||||
var cb = opts.onBlock ? opts.onBlock : noOp;
|
||||
var cb1 = (opts.showOverlay && !msg) ? cb : noOp;
|
||||
var cb2 = msg ? cb : noOp;
|
||||
if (opts.showOverlay)
|
||||
lyr2._fadeIn(opts.fadeIn, cb1);
|
||||
if (msg)
|
||||
lyr3._fadeIn(opts.fadeIn, cb2);
|
||||
}
|
||||
else {
|
||||
if (opts.showOverlay)
|
||||
lyr2.show();
|
||||
if (msg)
|
||||
lyr3.show();
|
||||
if (opts.onBlock)
|
||||
opts.onBlock();
|
||||
}
|
||||
|
||||
// bind key and mouse events
|
||||
bind(1, el, opts);
|
||||
|
||||
if (full) {
|
||||
pageBlock = lyr3[0];
|
||||
pageBlockEls = $(':input:enabled:visible',pageBlock);
|
||||
if (opts.focusInput)
|
||||
setTimeout(focus, 20);
|
||||
}
|
||||
else
|
||||
center(lyr3[0], opts.centerX, opts.centerY);
|
||||
|
||||
if (opts.timeout) {
|
||||
// auto-unblock
|
||||
var to = setTimeout(function() {
|
||||
if (full)
|
||||
$.unblockUI(opts);
|
||||
else
|
||||
$(el).unblock(opts);
|
||||
}, opts.timeout);
|
||||
$(el).data('blockUI.timeout', to);
|
||||
}
|
||||
}
|
||||
|
||||
// remove the block
|
||||
function remove(el, opts) {
|
||||
var full = (el == window);
|
||||
var $el = $(el);
|
||||
var data = $el.data('blockUI.history');
|
||||
var to = $el.data('blockUI.timeout');
|
||||
if (to) {
|
||||
clearTimeout(to);
|
||||
$el.removeData('blockUI.timeout');
|
||||
}
|
||||
opts = $.extend({}, $.blockUI.defaults, opts || {});
|
||||
bind(0, el, opts); // unbind events
|
||||
|
||||
if (opts.onUnblock === null) {
|
||||
opts.onUnblock = $el.data('blockUI.onUnblock');
|
||||
$el.removeData('blockUI.onUnblock');
|
||||
}
|
||||
|
||||
var els;
|
||||
if (full) // crazy selector to handle odd field errors in ie6/7
|
||||
els = $('body').children().filter('.blockUI').add('body > .blockUI');
|
||||
else
|
||||
els = $el.find('>.blockUI');
|
||||
|
||||
// fix cursor issue
|
||||
if ( opts.cursorReset ) {
|
||||
if ( els.length > 1 )
|
||||
els[1].style.cursor = opts.cursorReset;
|
||||
if ( els.length > 2 )
|
||||
els[2].style.cursor = opts.cursorReset;
|
||||
}
|
||||
|
||||
if (full)
|
||||
pageBlock = pageBlockEls = null;
|
||||
|
||||
if (opts.fadeOut) {
|
||||
els.fadeOut(opts.fadeOut);
|
||||
setTimeout(function() { reset(els,data,opts,el); }, opts.fadeOut);
|
||||
}
|
||||
else
|
||||
reset(els, data, opts, el);
|
||||
}
|
||||
|
||||
// move blocking element back into the DOM where it started
|
||||
function reset(els,data,opts,el) {
|
||||
var $el = $(el);
|
||||
els.each(function(i,o) {
|
||||
// remove via DOM calls so we don't lose event handlers
|
||||
if (this.parentNode)
|
||||
this.parentNode.removeChild(this);
|
||||
});
|
||||
|
||||
if (data && data.el) {
|
||||
data.el.style.display = data.display;
|
||||
data.el.style.position = data.position;
|
||||
if (data.parent)
|
||||
data.parent.appendChild(data.el);
|
||||
$el.removeData('blockUI.history');
|
||||
}
|
||||
|
||||
if ($el.data('blockUI.static')) {
|
||||
$el.css('position', 'static'); // #22
|
||||
}
|
||||
|
||||
if (typeof opts.onUnblock == 'function')
|
||||
opts.onUnblock(el,opts);
|
||||
|
||||
// fix issue in Safari 6 where block artifacts remain until reflow
|
||||
var body = $(document.body), w = body.width(), cssW = body[0].style.width;
|
||||
body.width(w-1).width(w);
|
||||
body[0].style.width = cssW;
|
||||
}
|
||||
|
||||
// bind/unbind the handler
|
||||
function bind(b, el, opts) {
|
||||
var full = el == window, $el = $(el);
|
||||
|
||||
// don't bother unbinding if there is nothing to unbind
|
||||
if (!b && (full && !pageBlock || !full && !$el.data('blockUI.isBlocked')))
|
||||
return;
|
||||
|
||||
$el.data('blockUI.isBlocked', b);
|
||||
|
||||
// don't bind events when overlay is not in use or if bindEvents is false
|
||||
if (!opts.bindEvents || (b && !opts.showOverlay))
|
||||
return;
|
||||
|
||||
// bind anchors and inputs for mouse and key events
|
||||
var events = 'mousedown mouseup keydown keypress keyup touchstart touchend touchmove';
|
||||
if (b)
|
||||
$(document).bind(events, opts, handler);
|
||||
else
|
||||
$(document).unbind(events, handler);
|
||||
|
||||
// former impl...
|
||||
// var $e = $('a,:input');
|
||||
// b ? $e.bind(events, opts, handler) : $e.unbind(events, handler);
|
||||
}
|
||||
|
||||
// event handler to suppress keyboard/mouse events when blocking
|
||||
function handler(e) {
|
||||
// allow tab navigation (conditionally)
|
||||
if (e.keyCode && e.keyCode == 9) {
|
||||
if (pageBlock && e.data.constrainTabKey) {
|
||||
var els = pageBlockEls;
|
||||
var fwd = !e.shiftKey && e.target === els[els.length-1];
|
||||
var back = e.shiftKey && e.target === els[0];
|
||||
if (fwd || back) {
|
||||
setTimeout(function(){focus(back);},10);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
var opts = e.data;
|
||||
var target = $(e.target);
|
||||
if (target.hasClass('blockOverlay') && opts.onOverlayClick)
|
||||
opts.onOverlayClick();
|
||||
|
||||
// allow events within the message content
|
||||
if (target.parents('div.' + opts.blockMsgClass).length > 0)
|
||||
return true;
|
||||
|
||||
// allow events for content that is not being blocked
|
||||
return target.parents().children().filter('div.blockUI').length === 0;
|
||||
}
|
||||
|
||||
function focus(back) {
|
||||
if (!pageBlockEls)
|
||||
return;
|
||||
var e = pageBlockEls[back===true ? pageBlockEls.length-1 : 0];
|
||||
if (e)
|
||||
e.focus();
|
||||
}
|
||||
|
||||
function center(el, x, y) {
|
||||
var p = el.parentNode, s = el.style;
|
||||
var l = ((p.offsetWidth - el.offsetWidth)/2) - sz(p,'borderLeftWidth');
|
||||
var t = ((p.offsetHeight - el.offsetHeight)/2) - sz(p,'borderTopWidth');
|
||||
if (x) s.left = l > 0 ? (l+'px') : '0';
|
||||
if (y) s.top = t > 0 ? (t+'px') : '0';
|
||||
}
|
||||
|
||||
function sz(el, p) {
|
||||
return parseInt($.css(el,p),10)||0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*global define:true */
|
||||
if (typeof define === 'function' && define.amd && define.amd.jQuery) {
|
||||
define(['jquery'], setup);
|
||||
} else {
|
||||
setup(jQuery);
|
||||
}
|
||||
|
||||
})();
|
||||
@ -0,0 +1,142 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
;(function() {
|
||||
var
|
||||
dropdownToggleHash = {};
|
||||
jQuery.extend({
|
||||
dropdownToggle: function(options) {
|
||||
// default options
|
||||
options = jQuery.extend({
|
||||
//switcherSelector: "#id" or ".class", - button
|
||||
//dropdownID: "id", - drop panel
|
||||
//anchorSelector: "#id" or ".class", - near field
|
||||
//noActiveSwitcherSelector: "#id" or ".class", - dont hide
|
||||
addTop: 0,
|
||||
addLeft: 0,
|
||||
position: "absolute",
|
||||
fixWinSize: true,
|
||||
enableAutoHide: true,
|
||||
showFunction: null,
|
||||
afterShowFunction: null,
|
||||
hideFunction: null,
|
||||
alwaysUp: false,
|
||||
simpleToggle: false,
|
||||
rightPos: false
|
||||
}, options);
|
||||
|
||||
var _toggle = function(switcherObj, dropdownID, addTop, addLeft, fixWinSize, position, anchorSelector, showFunction, alwaysUp, simpleToggle, afterShowFunction) {
|
||||
var dropdownItem = jq("#" + dropdownID);
|
||||
|
||||
if (typeof (simpleToggle) == "undefined" || simpleToggle === false) {
|
||||
fixWinSize = fixWinSize === true;
|
||||
addTop = addTop || 0;
|
||||
addLeft = addLeft || 0;
|
||||
position = position || "absolute";
|
||||
|
||||
var targetPos = jq(anchorSelector || switcherObj).offset();
|
||||
|
||||
if (!targetPos) return;
|
||||
|
||||
var elemPosLeft = targetPos.left;
|
||||
var elemPosTop = targetPos.top + jq(anchorSelector || switcherObj).outerHeight();
|
||||
if (options.rightPos) {
|
||||
elemPosLeft = Math.max(0,targetPos.left - dropdownItem.outerWidth() + jq(anchorSelector || switcherObj).outerWidth());
|
||||
}
|
||||
|
||||
var w = jq(window);
|
||||
var topPadding = w.scrollTop();
|
||||
var leftPadding = w.scrollLeft();
|
||||
|
||||
if (position == "fixed") {
|
||||
addTop -= topPadding;
|
||||
addLeft -= leftPadding;
|
||||
}
|
||||
|
||||
var scrWidth = w.width();
|
||||
var scrHeight = w.height();
|
||||
|
||||
if (fixWinSize && (!options.rightPos)
|
||||
&& (targetPos.left + addLeft + dropdownItem.outerWidth()) > (leftPadding + scrWidth)) {
|
||||
elemPosLeft = Math.max(0, leftPadding + scrWidth - dropdownItem.outerWidth()) - addLeft;
|
||||
}
|
||||
|
||||
if (fixWinSize
|
||||
&& (elemPosTop + dropdownItem.outerHeight()) > (topPadding + scrHeight)
|
||||
&& (targetPos.top - dropdownItem.outerHeight()) > topPadding
|
||||
|| alwaysUp) {
|
||||
elemPosTop = targetPos.top - dropdownItem.outerHeight();
|
||||
}
|
||||
|
||||
dropdownItem.css(
|
||||
{
|
||||
"position": position,
|
||||
"top": elemPosTop + addTop,
|
||||
"left": elemPosLeft + addLeft
|
||||
});
|
||||
}
|
||||
if (typeof showFunction === "function") {
|
||||
showFunction(switcherObj, dropdownItem);
|
||||
}
|
||||
|
||||
dropdownItem.toggle();
|
||||
|
||||
if (typeof afterShowFunction === "function") {
|
||||
afterShowFunction(switcherObj, dropdownItem);
|
||||
}
|
||||
};
|
||||
|
||||
var _registerAutoHide = function(event, switcherSelector, dropdownSelector, hideFunction) {
|
||||
if (jq(dropdownSelector).is(":visible")) {
|
||||
var $targetElement = jq((event.target) ? event.target : event.srcElement);
|
||||
if (!$targetElement.parents().andSelf().is(switcherSelector + ", " + dropdownSelector)) {
|
||||
if (typeof hideFunction === "function")
|
||||
hideFunction($targetElement);
|
||||
jq(dropdownSelector).hide();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if (options.switcherSelector && options.dropdownID) {
|
||||
var toggleFunc = function(e) {
|
||||
_toggle(jq(this), options.dropdownID, options.addTop, options.addLeft, options.fixWinSize, options.position, options.anchorSelector, options.showFunction, options.alwaysUp, options.simpleToggle, options.afterShowFunction);
|
||||
};
|
||||
if (!dropdownToggleHash.hasOwnProperty(options.switcherSelector + options.dropdownID)) {
|
||||
jq(document).on("click", options.switcherSelector, toggleFunc);
|
||||
dropdownToggleHash[options.switcherSelector + options.dropdownID] = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (options.enableAutoHide && options.dropdownID) {
|
||||
var hideFunc = function(e) {
|
||||
var allSwitcherSelectors = options.noActiveSwitcherSelector ?
|
||||
options.switcherSelector + ", " + options.noActiveSwitcherSelector : options.switcherSelector;
|
||||
_registerAutoHide(e, allSwitcherSelectors, "#" + options.dropdownID, options.hideFunction);
|
||||
|
||||
};
|
||||
jq(document).unbind("click", hideFunc);
|
||||
jq(document).bind("click", hideFunc);
|
||||
}
|
||||
|
||||
return {
|
||||
toggle: _toggle,
|
||||
registerAutoHide: _registerAutoHide
|
||||
};
|
||||
}
|
||||
});
|
||||
})();
|
||||
1149
web/documentserver-example/csharp-mvc/Scripts/jquery.fileupload.js
vendored
Normal file
@ -0,0 +1,142 @@
|
||||
/*
|
||||
* jQuery Iframe Transport Plugin 1.2
|
||||
* https://github.com/blueimp/jQuery-File-Upload
|
||||
*
|
||||
* Copyright 2011, Sebastian Tschan
|
||||
* https://blueimp.net
|
||||
*
|
||||
* Licensed under the MIT license:
|
||||
* http://creativecommons.org/licenses/MIT/
|
||||
*/
|
||||
|
||||
/*jslint unparam: true */
|
||||
/*global jQuery */
|
||||
|
||||
(function ($) {
|
||||
'use strict';
|
||||
|
||||
// Helper variable to create unique names for the transport iframes:
|
||||
var counter = 0;
|
||||
|
||||
// The iframe transport accepts three additional options:
|
||||
// options.fileInput: a jQuery collection of file input fields
|
||||
// options.paramName: the parameter name for the file form data,
|
||||
// overrides the name property of the file input field(s)
|
||||
// options.formData: an array of objects with name and value properties,
|
||||
// equivalent to the return data of .serializeArray(), e.g.:
|
||||
// [{name: a, value: 1}, {name: b, value: 2}]
|
||||
$.ajaxTransport('iframe', function (options, originalOptions, jqXHR) {
|
||||
if (options.type === 'POST' || options.type === 'GET') {
|
||||
var form,
|
||||
iframe;
|
||||
return {
|
||||
send: function (headers, completeCallback) {
|
||||
form = $('<form style="display:none;"></form>');
|
||||
// javascript:false as initial iframe src
|
||||
// prevents warning popups on HTTPS in IE6.
|
||||
// IE versions below IE8 cannot set the name property of
|
||||
// elements that have already been added to the DOM,
|
||||
// so we set the name along with the iframe HTML markup:
|
||||
iframe = $(
|
||||
'<iframe src="javascript:false;" name="iframe-transport-' +
|
||||
(counter += 1) + '"></iframe>'
|
||||
).bind('load', function () {
|
||||
var fileInputClones;
|
||||
iframe
|
||||
.unbind('load')
|
||||
.bind('load', function () {
|
||||
// The complete callback returns the
|
||||
// iframe content document as response object:
|
||||
completeCallback(
|
||||
200,
|
||||
'success',
|
||||
{'iframe': iframe.contents()}
|
||||
);
|
||||
// Fix for IE endless progress bar activity bug
|
||||
// (happens on form submits to iframe targets):
|
||||
$('<iframe src="javascript:false;"></iframe>')
|
||||
.appendTo(form);
|
||||
form.remove();
|
||||
});
|
||||
form
|
||||
.prop('target', iframe.prop('name'))
|
||||
.prop('action', options.url)
|
||||
.prop('method', options.type);
|
||||
if (options.formData) {
|
||||
$.each(options.formData, function (index, field) {
|
||||
$('<input type="hidden"/>')
|
||||
.prop('name', field.name)
|
||||
.val(field.value)
|
||||
.appendTo(form);
|
||||
});
|
||||
}
|
||||
if (options.fileInput && options.fileInput.length &&
|
||||
options.type === 'POST') {
|
||||
fileInputClones = options.fileInput.clone();
|
||||
// Insert a clone for each file input field:
|
||||
options.fileInput.after(function (index) {
|
||||
return fileInputClones[index];
|
||||
});
|
||||
if (options.paramName) {
|
||||
options.fileInput.each(function () {
|
||||
$(this).prop('name', options.paramName);
|
||||
});
|
||||
}
|
||||
// Appending the file input fields to the hidden form
|
||||
// removes them from their original location:
|
||||
form
|
||||
.append(options.fileInput)
|
||||
.prop('enctype', 'multipart/form-data')
|
||||
// enctype must be set as encoding for IE:
|
||||
.prop('encoding', 'multipart/form-data');
|
||||
}
|
||||
form.submit();
|
||||
// Insert the file input fields at their original location
|
||||
// by replacing the clones with the originals:
|
||||
if (fileInputClones && fileInputClones.length) {
|
||||
options.fileInput.each(function (index, input) {
|
||||
var clone = $(fileInputClones[index]);
|
||||
$(input).prop('name', clone.prop('name'));
|
||||
clone.replaceWith(input);
|
||||
});
|
||||
}
|
||||
});
|
||||
form.append(iframe).appendTo('body');
|
||||
},
|
||||
abort: function () {
|
||||
if (iframe) {
|
||||
// javascript:false as iframe src aborts the request
|
||||
// and prevents warning popups on HTTPS in IE6.
|
||||
// concat is used to avoid the "Script URL" JSLint error:
|
||||
iframe
|
||||
.unbind('load')
|
||||
.prop('src', 'javascript'.concat(':false;'));
|
||||
}
|
||||
if (form) {
|
||||
form.remove();
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
// The iframe transport returns the iframe content document as response.
|
||||
// The following adds converters from iframe to text, json, html, and script:
|
||||
$.ajaxSetup({
|
||||
converters: {
|
||||
'iframe text': function (iframe) {
|
||||
return iframe.text();
|
||||
},
|
||||
'iframe json': function (iframe) {
|
||||
return $.parseJSON(iframe.text());
|
||||
},
|
||||
'iframe html': function (iframe) {
|
||||
return iframe.find('body').html();
|
||||
},
|
||||
'iframe script': function (iframe) {
|
||||
return $.globalEval(iframe.text());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}(jQuery));
|
||||
369
web/documentserver-example/csharp-mvc/Scripts/jscript.js
Normal file
@ -0,0 +1,369 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
var directUrl;
|
||||
|
||||
if (typeof jQuery != "undefined") {
|
||||
jq = jQuery.noConflict();
|
||||
|
||||
directUrl = getUrlVars()["directUrl"] == "true";
|
||||
|
||||
mustReload = false;
|
||||
|
||||
if (directUrl)
|
||||
jq("#directUrl").prop("checked", directUrl);
|
||||
else
|
||||
directUrl = jq("#directUrl").prop("checked");
|
||||
|
||||
jq("#directUrl").change(function () {
|
||||
window.location = "?directUrl=" + jq(this).prop("checked");
|
||||
});
|
||||
|
||||
jq(function () {
|
||||
jq('#fileupload').fileupload({
|
||||
dataType: 'json',
|
||||
add: function (e, data) {
|
||||
jq(".error").removeClass("error");
|
||||
jq(".done").removeClass("done");
|
||||
jq(".current").removeClass("current");
|
||||
jq("#step1").addClass("current");
|
||||
jq("#mainProgress .error-message").hide().find("span").text("");
|
||||
jq("#blockPassword").hide();
|
||||
jq("#mainProgress").removeClass("embedded");
|
||||
jq("#uploadFileName").text("");
|
||||
|
||||
jq.blockUI({
|
||||
theme: true,
|
||||
title: "File upload" + "<div class=\"dialog-close\"></div>",
|
||||
message: jq("#mainProgress"),
|
||||
overlayCSS: { "background-color": "#aaa" },
|
||||
themedCSS: { width: "539px", top: "20%", left: "50%", marginLeft: "-269px" }
|
||||
});
|
||||
jq("#beginEdit, #beginView, #beginEmbedded").addClass("disable");
|
||||
|
||||
data.submit();
|
||||
},
|
||||
always: function (e, data) {
|
||||
if (!jq("#mainProgress").is(":visible")) {
|
||||
return;
|
||||
}
|
||||
var response = data.result;
|
||||
if (response.error) {
|
||||
jq(".current").removeClass("current");
|
||||
jq(".step:not(.done)").addClass("error");
|
||||
jq("#mainProgress .error-message").show().find("span").text(response.error);
|
||||
jq('#hiddenFileName').val("");
|
||||
return;
|
||||
}
|
||||
|
||||
jq("#hiddenFileName").val(response.filename);
|
||||
jq("#uploadFileName").text(response.filename);
|
||||
jq("#uploadFileName").addClass(response.documentType);
|
||||
|
||||
mustReload = true;
|
||||
|
||||
jq("#step1").addClass("done").removeClass("current");
|
||||
|
||||
checkConvert();
|
||||
}
|
||||
});
|
||||
|
||||
initSelectors();
|
||||
});
|
||||
|
||||
var timer = null;
|
||||
var checkConvert = function (filePass) {
|
||||
filePass = filePass ? filePass : null;
|
||||
if (timer != null) {
|
||||
clearTimeout(timer);
|
||||
}
|
||||
|
||||
if (!jq("#mainProgress").is(":visible")) {
|
||||
return;
|
||||
}
|
||||
jq("#step2").addClass("current");
|
||||
jq("#filePass").val("");
|
||||
|
||||
var fileName = jq("#hiddenFileName").val();
|
||||
var posExt = fileName.lastIndexOf('.');
|
||||
posExt = 0 <= posExt ? fileName.substring(posExt).trim().toLowerCase() : '';
|
||||
|
||||
if (ConverExtList.indexOf(posExt) == -1) {
|
||||
jq("#step2").addClass("done").removeClass("current");
|
||||
loadScripts();
|
||||
return;
|
||||
}
|
||||
|
||||
timer = setTimeout(function () {
|
||||
|
||||
jq.ajax({
|
||||
async: true,
|
||||
contentType: "text/xml",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: JSON.stringify({ filename: fileName, filePass: filePass }),
|
||||
url: UrlConverter,
|
||||
complete: function (data) {
|
||||
var responseText = data.responseText;
|
||||
var response = jq.parseJSON(responseText);
|
||||
if (response.error) {
|
||||
if (response.error.includes("Incorrect password")) {
|
||||
jq(".current").removeClass("current");
|
||||
jq("#step2").addClass("error");
|
||||
jq("#blockPassword").show();
|
||||
if (filePass) {
|
||||
jq("#filePass").addClass("errorInput");
|
||||
jq(".errorPass").text("The password is incorrect, please try again.");
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
jq(".current").removeClass("current");
|
||||
jq(".step:not(.done)").addClass("error");
|
||||
jq("#mainProgress .error-message").show().find("span").text(response.error);
|
||||
jq('#hiddenFileName').val("");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
jq("#hiddenFileName").val(response.filename);
|
||||
|
||||
if (response.step && response.step < 100) {
|
||||
checkConvert(filePass);
|
||||
} else {
|
||||
jq("#step2").addClass("done").removeClass("current");
|
||||
loadScripts();
|
||||
}
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
};
|
||||
|
||||
var loadScripts = function () {
|
||||
if (!jq("#mainProgress").is(":visible")) {
|
||||
return;
|
||||
}
|
||||
jq("#step3").addClass("current");
|
||||
|
||||
if (jq("#loadScripts").is(":empty")) {
|
||||
var urlScripts = jq("#loadScripts").attr("data-docs");
|
||||
var frame = '<iframe id="iframeScripts" width=1 height=1 style="position: absolute; visibility: hidden;" ></iframe>';
|
||||
jq("#loadScripts").html(frame);
|
||||
document.getElementById("iframeScripts").onload = onloadScripts;
|
||||
jq("#loadScripts iframe").attr("src", urlScripts);
|
||||
} else {
|
||||
onloadScripts();
|
||||
}
|
||||
};
|
||||
|
||||
var onloadScripts = function () {
|
||||
if (!jq("#mainProgress").is(":visible")) {
|
||||
return;
|
||||
}
|
||||
jq("#step3").addClass("done").removeClass("current");
|
||||
jq("#beginView, #beginEmbedded").removeClass("disable");
|
||||
|
||||
var fileName = jq("#hiddenFileName").val();
|
||||
var posExt = fileName.lastIndexOf('.');
|
||||
posExt = 0 <= posExt ? fileName.substring(posExt).trim().toLowerCase() : '';
|
||||
|
||||
if (EditedExtList.indexOf(posExt) != -1 || FillExtList.indexOf(posExt) != -1) {
|
||||
jq("#beginEdit").removeClass("disable");
|
||||
}
|
||||
};
|
||||
|
||||
var initSelectors = function () {
|
||||
var userSel = jq("#user");
|
||||
var langSel = jq("#language");
|
||||
|
||||
function getCookie(name) {
|
||||
let matches = document.cookie.match(new RegExp(
|
||||
"(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"
|
||||
));
|
||||
return matches ? decodeURIComponent(matches[1]) : null;
|
||||
}
|
||||
function setCookie(name, value) {
|
||||
document.cookie = name + "=" + value + "; expires=" + new Date(Date.now() + 1000 * 60 * 60 * 24 * 7).toUTCString(); //week
|
||||
}
|
||||
|
||||
var userId = getCookie("uid");
|
||||
if (userId) userSel.val(userId);
|
||||
var langId = getCookie("ulang");
|
||||
if (langId) langSel.val(langId);
|
||||
|
||||
userSel.on("change", function () {
|
||||
setCookie("uid", userSel.val());
|
||||
});
|
||||
langSel.on("change", function () {
|
||||
setCookie("ulang", langSel.val());
|
||||
});
|
||||
};
|
||||
|
||||
jq(document).on("click", "#enterPass", function () {
|
||||
var filePass = jq("#filePass").val();
|
||||
if (filePass) {
|
||||
jq("#step2").removeClass("error");
|
||||
jq("#blockPassword").hide();
|
||||
checkConvert(filePass);
|
||||
} else {
|
||||
jq("#filePass").addClass("errorInput");
|
||||
jq(".errorPass").text("Password can't be blank.");
|
||||
}
|
||||
});
|
||||
|
||||
jq(document).on("click", "#skipPass", function () {
|
||||
jq("#blockPassword").hide();
|
||||
loadScripts();
|
||||
});
|
||||
|
||||
jq(document).on("click", "#beginEdit:not(.disable)", function () {
|
||||
var fileId = encodeURIComponent(jq('#hiddenFileName').val());
|
||||
var url = UrlEditor + "?fileName=" + fileId + "&directUrl=" + directUrl;
|
||||
window.open(url, "_blank");
|
||||
jq('#hiddenFileName').val("");
|
||||
jq.unblockUI();
|
||||
});
|
||||
|
||||
jq(document).on("click", "#beginView:not(.disable)", function () {
|
||||
var fileId = encodeURIComponent(jq('#hiddenFileName').val());
|
||||
var url = UrlEditor + "?editorsMode=view&fileName=" + fileId + "&directUrl=" + directUrl;
|
||||
window.open(url, "_blank");
|
||||
jq('#hiddenFileName').val("");
|
||||
jq.unblockUI();
|
||||
});
|
||||
|
||||
jq(document).on("click", "#beginEmbedded:not(.disable)", function () {
|
||||
var fileId = encodeURIComponent(jq('#hiddenFileName').val());
|
||||
var url = UrlEditor + "?editorsType=embedded&editorsMode=embedded&fileName=" + fileId + "&directUrl=" + directUrl;
|
||||
|
||||
jq("#mainProgress").addClass("embedded");
|
||||
jq("#beginEmbedded").addClass("disable");
|
||||
|
||||
jq("#embeddedView").attr("src", url);
|
||||
});
|
||||
|
||||
jq(document).on("click", "#cancelEdit, .dialog-close", function () {
|
||||
jq('#hiddenFileName').val("");
|
||||
jq("#embeddedView").attr("src", "");
|
||||
jq.unblockUI();
|
||||
if (mustReload) {
|
||||
document.location.reload();
|
||||
}
|
||||
});
|
||||
|
||||
jq(document).on("click", ".try-editor", function (e) {
|
||||
var url = jq(".try-editor-list")[0].attributes["data-link"].value;
|
||||
url += "?fileExt=" + e.target.attributes["data-type"].value;
|
||||
if (jq("#createSample").is(":checked")) {
|
||||
url += "&sample=true";
|
||||
}
|
||||
var w = window.open(url, "_blank");
|
||||
w.onload = function () {
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
|
||||
jq(document).on("click", ".delete-file", function () {
|
||||
var requestAddress = "webeditor.ashx"
|
||||
+ "?type=remove"
|
||||
+ "&filename=" + encodeURIComponent(jq(this).attr("data-filename"));
|
||||
|
||||
jq.ajax({
|
||||
async: true,
|
||||
contentType: "text/xml",
|
||||
url: requestAddress,
|
||||
complete: function (data) {
|
||||
document.location.reload();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function showUserTooltip (isMobile) {
|
||||
if ( jq("div#portal-info").is(":hidden") ) {
|
||||
jq("div#portal-info").show();
|
||||
jq("div.stored-list").hide();
|
||||
} else if (isMobile && jq("div#portal-info").is(":visible")) {
|
||||
jq("div#portal-info").hide();
|
||||
jq("div.stored-list").show();
|
||||
}
|
||||
};
|
||||
|
||||
function getUrlVars() {
|
||||
var vars = [], hash;
|
||||
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
|
||||
for (var i = 0; i < hashes.length; i++) {
|
||||
hash = hashes[i].split('=');
|
||||
vars.push(hash[0]);
|
||||
vars[hash[0]] = hash[1];
|
||||
}
|
||||
return vars;
|
||||
};
|
||||
|
||||
var fileList = jq("tr.tableRow");
|
||||
|
||||
var mouseIsOverTooltip = false;
|
||||
var hideTooltipTimeout = null;
|
||||
if (/android|avantgo|playbook|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\|plucker|pocket|psp|symbian|treo|up\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i
|
||||
.test(navigator.userAgent)) {
|
||||
if (fileList.length > 0) {
|
||||
if (hideTooltipTimeout != null) {
|
||||
clearTimeout(hideTooltipTimeout);
|
||||
}
|
||||
jq("#info").on("touchend", function () {
|
||||
showUserTooltip(true);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
jq("#info").mouseover(function (event) {
|
||||
if (fileList.length > 0) {
|
||||
if (hideTooltipTimeout != null) {
|
||||
clearTimeout(hideTooltipTimeout);
|
||||
}
|
||||
showUserTooltip(false);
|
||||
|
||||
jq("div#portal-info").mouseenter(function () {
|
||||
mouseIsOverTooltip = true;
|
||||
}).mouseleave(function () {
|
||||
mouseIsOverTooltip = false;
|
||||
jq("div.stored-list").show();
|
||||
jq("div#portal-info").hide();
|
||||
})
|
||||
}
|
||||
}).mouseleave(function () {
|
||||
hideTooltipTimeout = setTimeout(function () {
|
||||
if (mouseIsOverTooltip == false && fileList.length > 0) {
|
||||
jq("div.stored-list").show();
|
||||
jq("div#portal-info").hide();
|
||||
}
|
||||
}, 500);
|
||||
});
|
||||
}
|
||||
|
||||
jq(".info-tooltip").mouseover(function (event) {
|
||||
var target = event.target;
|
||||
var id = target.dataset.id ? target.dataset.id : target.id;
|
||||
var tooltip = target.dataset.tooltip;
|
||||
|
||||
jq("<div class='tooltip'>" + tooltip + "<div class='arrow'></div></div>").appendTo("body");
|
||||
|
||||
var top = jq("#" + id).offset().top + jq("#" + id).outerHeight() / 2 - jq("div.tooltip").outerHeight() / 2;
|
||||
var left = jq("#" + id).offset().left + jq("#" + id).outerWidth() + 20;
|
||||
jq("div.tooltip").css({ "top": top, "left": left });
|
||||
}).mouseout(function () {
|
||||
jq("div.tooltip").remove();
|
||||
});
|
||||
}
|
||||
266
web/documentserver-example/csharp-mvc/Views/Home/Editor.aspx
Normal file
@ -0,0 +1,266 @@
|
||||
<%@ Page Title="ONLYOFFICE" Language="C#" Inherits="System.Web.Mvc.ViewPage<OnlineEditorsExampleMVC.Models.FileModel>" %>
|
||||
<%@ Import Namespace="System.IO" %>
|
||||
<%@ Import Namespace="System.Web.Configuration" %>
|
||||
<%@ Import Namespace="OnlineEditorsExampleMVC.Helpers" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="mobile-web-app-capable" content="yes" />
|
||||
<!--
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
-->
|
||||
<link rel="icon" href="<%= "content/images/" + Model.DocumentType + ".ico" %>" type="image/x-icon" />
|
||||
<title><%= Model.FileName + " - ONLYOFFICE" %></title>
|
||||
|
||||
<%: Styles.Render("~/Content/editor") %>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="form">
|
||||
<div id="iframeEditor">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%: Scripts.Render(new []{ WebConfigurationManager.AppSettings["files.docservice.url.site"] + WebConfigurationManager.AppSettings["files.docservice.url.api"] }) %>
|
||||
|
||||
<script type="text/javascript" language="javascript">
|
||||
|
||||
var docEditor;
|
||||
var config;
|
||||
|
||||
var innerAlert = function (message, inEditor) {
|
||||
if (console && console.log)
|
||||
console.log(message);
|
||||
if (inEditor && docEditor)
|
||||
docEditor.showMessage(message);
|
||||
};
|
||||
|
||||
// the application is loaded into the browser
|
||||
var onAppReady = function () {
|
||||
innerAlert("Document editor ready");
|
||||
};
|
||||
|
||||
// the document is modified
|
||||
var onDocumentStateChange = function (event) {
|
||||
var title = document.title.replace(/\*$/g, "");
|
||||
document.title = title + (event.data ? "*" : "");
|
||||
};
|
||||
|
||||
// the user is trying to switch the document from the viewing into the editing mode
|
||||
var onRequestEditRights = function () {
|
||||
location.href = location.href.replace(RegExp("editorsMode=view\&?", "i"), "");
|
||||
};
|
||||
|
||||
// an error or some other specific event occurs
|
||||
var onError = function (event) {
|
||||
if (event)
|
||||
innerAlert(event.data);
|
||||
};
|
||||
|
||||
// the document is opened for editing with the old document.key value
|
||||
var onOutdatedVersion = function (event) {
|
||||
location.reload(true);
|
||||
};
|
||||
|
||||
// replace the link to the document which contains a bookmark
|
||||
var replaceActionLink = function(href, linkParam) {
|
||||
var link;
|
||||
var actionIndex = href.indexOf("&actionLink=");
|
||||
if (actionIndex != -1) {
|
||||
var endIndex = href.indexOf("&", actionIndex + "&actionLink=".length);
|
||||
if (endIndex != -1) {
|
||||
link = href.substring(0, actionIndex) + href.substring(endIndex) + "&actionLink=" + encodeURIComponent(linkParam);
|
||||
} else {
|
||||
link = href.substring(0, actionIndex) + "&actionLink=" + encodeURIComponent(linkParam);
|
||||
}
|
||||
} else {
|
||||
link = href + "&actionLink=" + encodeURIComponent(linkParam);
|
||||
}
|
||||
return link;
|
||||
}
|
||||
|
||||
// the user is trying to get link for opening the document which contains a bookmark, scrolling to the bookmark position
|
||||
var onMakeActionLink = function (event) {
|
||||
var actionData = event.data;
|
||||
var linkParam = JSON.stringify(actionData);
|
||||
docEditor.setActionLink(replaceActionLink(location.href, linkParam)); // set the link to the document which contains a bookmark
|
||||
};
|
||||
|
||||
// the meta information of the document is changed via the meta command
|
||||
var onMetaChange = function (event) {
|
||||
if (event.data.favorite) {
|
||||
var favorite = !!event.data.favorite;
|
||||
var title = document.title.replace(/^\☆/g, "");
|
||||
document.title = (favorite ? "☆" : "") + title;
|
||||
docEditor.setFavorite(favorite); // change the Favorite icon state
|
||||
}
|
||||
|
||||
innerAlert("onMetaChange: " + JSON.stringify(event.data));
|
||||
};
|
||||
|
||||
// the user is trying to insert an image by clicking the Image from Storage button
|
||||
var onRequestInsertImage = function (event) {
|
||||
<% string logoUrl;%>
|
||||
<% Model.GetLogoConfig(out logoUrl); %>
|
||||
docEditor.insertImage({ // insert an image into the file
|
||||
"c": event.data.c,
|
||||
<%= logoUrl%>
|
||||
})
|
||||
};
|
||||
|
||||
// the user is trying to select document for comparing by clicking the Document from Storage button
|
||||
var onRequestCompareFile = function () {
|
||||
<% string compareFileData; %>
|
||||
<% Model.GetCompareFileData(out compareFileData); %>
|
||||
docEditor.setRevisedFile(<%=compareFileData%>); // select a document for comparing
|
||||
};
|
||||
|
||||
// the user is trying to select recipients data by clicking the Mail merge button
|
||||
var onRequestMailMergeRecipients = function (event) {
|
||||
<% string dataMailMergeRecipients; %>
|
||||
<% Model.GetMailMergeConfig(out dataMailMergeRecipients); %>
|
||||
docEditor.setMailMergeRecipients(<%= dataMailMergeRecipients%>); // insert recipient data for mail merge into the file
|
||||
};
|
||||
|
||||
var onRequestSaveAs = function (event) { // the user is trying to save file by clicking Save Copy as... button
|
||||
var title = event.data.title;
|
||||
var url = event.data.url;
|
||||
var data = {
|
||||
title: title,
|
||||
url: url
|
||||
};
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open("POST", "webeditor.ashx?type=saveas");
|
||||
xhr.setRequestHeader('Content-Type', 'application/json');
|
||||
xhr.send(JSON.stringify(data));
|
||||
xhr.onload = function () {
|
||||
innerAlert(xhr.responseText);
|
||||
innerAlert(JSON.parse(xhr.responseText).file, true);
|
||||
}
|
||||
};
|
||||
|
||||
var onRequestRename = function(event) { // the user is trying to rename file by clicking Rename... button
|
||||
innerAlert("onRequestRename: " + JSON.stringify(event.data));
|
||||
|
||||
var newfilename = event.data;
|
||||
var data = {
|
||||
newfilename: newfilename,
|
||||
dockey: config.document.key,
|
||||
ext: config.document.fileType
|
||||
};
|
||||
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open("POST", "webeditor.ashx?type=rename");
|
||||
xhr.setRequestHeader('Content-Type', 'application/json');
|
||||
xhr.send(JSON.stringify(data));
|
||||
xhr.onload = function () {
|
||||
innerAlert(xhr.responseText);
|
||||
}
|
||||
};
|
||||
|
||||
config = <%= Model.GetDocConfig(Request, Url) %>;
|
||||
|
||||
config.width = "100%";
|
||||
config.height = "100%";
|
||||
|
||||
config.events = {
|
||||
'onAppReady': onAppReady,
|
||||
'onDocumentStateChange': onDocumentStateChange,
|
||||
'onRequestEditRights': onRequestEditRights,
|
||||
'onError': onError,
|
||||
'onOutdatedVersion': onOutdatedVersion,
|
||||
"onMakeActionLink": onMakeActionLink,
|
||||
"onMetaChange": onMetaChange,
|
||||
"onRequestInsertImage": onRequestInsertImage,
|
||||
"onRequestCompareFile": onRequestCompareFile,
|
||||
"onRequestMailMergeRecipients": onRequestMailMergeRecipients,
|
||||
};
|
||||
|
||||
<% string hist, histData; %>
|
||||
<% Model.GetHistory(out hist, out histData); %>
|
||||
|
||||
<% string usersForMentions; %>
|
||||
<% Model.GetUsersMentions(Request, out usersForMentions); %>
|
||||
|
||||
if (config.editorConfig.user.id) {
|
||||
<% if (!string.IsNullOrEmpty(hist) && !string.IsNullOrEmpty(histData))
|
||||
{ %>
|
||||
// the user is trying to show the document version history
|
||||
config.events['onRequestHistory'] = function () {
|
||||
docEditor.refreshHistory(<%= hist %>); // show the document version history
|
||||
};
|
||||
// the user is trying to click the specific document version in the document version history
|
||||
config.events['onRequestHistoryData'] = function (event) {
|
||||
var ver = event.data;
|
||||
var histData = <%= histData %>;
|
||||
docEditor.setHistoryData(histData[ver - 1]); // send the link to the document for viewing the version history
|
||||
};
|
||||
// the user is trying to go back to the document from viewing the document version history
|
||||
config.events['onRequestHistoryClose '] = function () {
|
||||
document.location.reload();
|
||||
};
|
||||
<% } %>
|
||||
|
||||
// add mentions for not anonymous users
|
||||
<% if (!string.IsNullOrEmpty(usersForMentions))
|
||||
{ %>
|
||||
config.events['onRequestUsers'] = function () {
|
||||
docEditor.setUsers({ // set a list of users to mention in the comments
|
||||
"users": <%= usersForMentions %>
|
||||
});
|
||||
};
|
||||
<% } %>
|
||||
|
||||
// the user is mentioned in a comment
|
||||
config.events['onRequestSendNotify'] = function (event) {
|
||||
event.data.actionLink = replaceActionLink(location.href, JSON.stringify(event.data.actionLink));
|
||||
var data = JSON.stringify(event.data);
|
||||
innerAlert("onRequestSendNotify: " + data);
|
||||
};
|
||||
// prevent file renaming for anonymous users
|
||||
config.events['onRequestRename'] = onRequestRename;
|
||||
}
|
||||
|
||||
if (config.editorConfig.createUrl) {
|
||||
config.events.onRequestSaveAs = onRequestSaveAs;
|
||||
};
|
||||
|
||||
var сonnectEditor = function () {
|
||||
if ((config.document.fileType === "docxf" || config.document.fileType === "oform")
|
||||
&& DocsAPI.DocEditor.version().split(".")[0] < 7) {
|
||||
innerAlert("Please update ONLYOFFICE Docs to version 7.0 to work on fillable forms online.");
|
||||
return;
|
||||
}
|
||||
|
||||
docEditor = new DocsAPI.DocEditor("iframeEditor", config);
|
||||
};
|
||||
|
||||
if (window.addEventListener) {
|
||||
window.addEventListener("load", сonnectEditor);
|
||||
} else if (window.attachEvent) {
|
||||
window.attachEvent("load", сonnectEditor);
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
366
web/documentserver-example/csharp-mvc/Views/Home/Index.aspx
Normal file
@ -0,0 +1,366 @@
|
||||
<%@ Page Title="ONLYOFFICE" Language="C#" Inherits="System.Web.Mvc.ViewPage" %>
|
||||
|
||||
<%@ Import Namespace="System.IO" %>
|
||||
<%@ Import Namespace="System.Web.Configuration" %>
|
||||
<%@ Import Namespace="OnlineEditorsExampleMVC.Helpers" %>
|
||||
<%@ Import Namespace="OnlineEditorsExampleMVC.Models" %>
|
||||
<%@ Import Namespace="System.Collections.Generic" %>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html lang="en">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<!--
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
-->
|
||||
<title>ONLYOFFICE</title>
|
||||
|
||||
<link href="<%: Url.Content("~/favicon.ico") %>" rel="shortcut icon" type="image/x-icon" />
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Open+Sans:900,800,700,600,500,400,300&subset=latin,cyrillic-ext,cyrillic,latin-ext" />
|
||||
|
||||
<%: Styles.Render("~/Content/css") %>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="center">
|
||||
<a href="">
|
||||
<img src ="content/images/logo.svg" alt="ONLYOFFICE" />
|
||||
</a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="center main">
|
||||
<table class="table-main">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="left-panel section">
|
||||
<div class="help-block">
|
||||
<span>Create new</span>
|
||||
<div class="clearFix">
|
||||
<div class="create-panel">
|
||||
<ul class="try-editor-list clearFix" data-link="<%= Url.Action("sample", "Home") %>">
|
||||
<li>
|
||||
<a class="try-editor word" data-type="docx">Document</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="try-editor cell" data-type="xlsx">Spreadsheet</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="try-editor slide" data-type="pptx">Presentation</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="try-editor form" data-type="docxf">Form template</a>
|
||||
</li>
|
||||
</ul>
|
||||
<label class="side-option">
|
||||
<input id="createSample" class="checkbox" type="checkbox" />With sample content
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="upload-panel clearFix">
|
||||
<a class="file-upload">Upload file
|
||||
<input type="file" id="fileupload" name="files[]" data-url="<%= Url.Content("~/webeditor.ashx?type=upload") %>" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<table class="user-block-table" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td valign="middle">
|
||||
<span class="select-user">Username</span>
|
||||
<img id="info" class="info" src="content/images/info.svg" />
|
||||
<select class="select-user" id="user">
|
||||
<% foreach (User user in Users.getAllUsers())
|
||||
{ %>
|
||||
<option value="<%= user.id %>"><%= user.name.IsEmpty() ? "Anonymous" : user.name %></option>
|
||||
<% } %>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="middle">
|
||||
<span class="select-user">Language</span>
|
||||
<img class="info info-tooltip" data-id="language"
|
||||
data-tooltip="Choose the language for ONLYOFFICE editors interface"
|
||||
src="content/images/info.svg" />
|
||||
<select class="select-user" id="language">
|
||||
<% Dictionary<string, string> languages = DocManagerHelper.GetLanguages();
|
||||
foreach (var lang in languages)
|
||||
{ %>
|
||||
<option value="<%= lang.Key %>"><%= lang.Value %></option>
|
||||
<% } %>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="middle">
|
||||
<label class="side-option">
|
||||
<input id="directUrl" type="checkbox" class="checkbox" />Try opening on client
|
||||
<img id="directUrlInfo" class="info info-tooltip" data-id="directUrlInfo" data-tooltip="Some files can be opened in the user's browser without connecting to the document server." src="content/images/info.svg" />
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
<td class="section">
|
||||
<div class="main-panel">
|
||||
<% var storedFiles = DocManagerHelper.GetStoredFiles(); %>
|
||||
<div id="portal-info" style="display: <%= storedFiles.Any() ? "none" : "table-cell" %>">
|
||||
<span class="portal-name">ONLYOFFICE Document Editors – Welcome!</span>
|
||||
<span class="portal-descr">
|
||||
Get started with a demo-sample of ONLYOFFICE Document Editors, the first html5-based editors.
|
||||
<br /> You may upload your own documents for testing using the "<b>Upload file</b>" button and <b>selecting</b> the necessary files on your PC.
|
||||
</span>
|
||||
<span class="portal-descr">Please do NOT use this integration example on your own server without proper code modifications, it is intended for testing purposes only. In case you enabled this test example, disable it before going for production.</span>
|
||||
<span class="portal-descr">You can open the same document using different users in different Web browser sessions, so you can check out multi-user editing functions.</span>
|
||||
<% foreach (User user in Users.getAllUsers())
|
||||
{ %>
|
||||
<div class="user-descr">
|
||||
<b><%= user.name.IsEmpty() ? "Anonymous" : user.name %></b>
|
||||
<ul>
|
||||
<% foreach (string description in user.descriptions)
|
||||
{ %>
|
||||
<li><%= description %></li>
|
||||
<% } %>
|
||||
</ul>
|
||||
</div>
|
||||
<% } %>
|
||||
</div>
|
||||
<%
|
||||
if (storedFiles.Any())
|
||||
{ %>
|
||||
<div class="stored-list">
|
||||
<span class="header-list">Your documents</span>
|
||||
<table class="tableHeader" cellspacing="0" cellpadding="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="tableHeaderCell tableHeaderCellFileName">Filename</td>
|
||||
<td class="tableHeaderCell tableHeaderCellEditors contentCells-shift">Editors</td>
|
||||
<td class="tableHeaderCell tableHeaderCellViewers">Viewers</td>
|
||||
<td class="tableHeaderCell tableHeaderCellDownload">Download</td>
|
||||
<td class="tableHeaderCell tableHeaderCellRemove">Remove</td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<div class="scroll-table-body">
|
||||
<table cellspacing="0" cellpadding="0" width="100%">
|
||||
<tbody>
|
||||
<% foreach (var storedFile in storedFiles)
|
||||
{
|
||||
var isEnabledDirectUrl = DocManagerHelper.GetDirectUrl();
|
||||
var editUrl = "doceditor.aspx?fileID=" + HttpUtility.UrlEncode(storedFile.Name);
|
||||
var docType = FileUtility.GetFileType(storedFile.Name).ToString().ToLower();
|
||||
var ext = Path.GetExtension(storedFile.Name).ToLower();
|
||||
var canEdit = DocManagerHelper.EditedExts.Contains(ext);
|
||||
var isFillFormDoc = DocManagerHelper.FillFormExts.Contains(ext);
|
||||
%>
|
||||
|
||||
<tr class="tableRow" title="<%= storedFile.Name %> [<%= DocManagerHelper.GetFileVersion(storedFile.Name, HttpContext.Current.Request.UserHostAddress.Replace(':', '_')) %>]">
|
||||
<td class="contentCells">
|
||||
<a class="stored-edit <%= docType %>" href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, directUrl = isEnabledDirectUrl }) %>" target="_blank">
|
||||
<span><%= storedFile.Name %></span>
|
||||
</a>
|
||||
</td>
|
||||
<% if (canEdit) { %>
|
||||
<td class="contentCells contentCells-icon">
|
||||
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "edit", directUrl = isEnabledDirectUrl }) %>" target="_blank">
|
||||
<img src="content/images/desktop.svg" alt="Open in editor for full size screens" title="Open in editor for full size screens"/>
|
||||
</a>
|
||||
</td>
|
||||
<td class="contentCells contentCells-icon">
|
||||
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "mobile", editorsMode = "edit", directUrl = isEnabledDirectUrl }) %>" target="_blank">
|
||||
<img src="content/images/mobile.svg" alt="Open in editor for mobile devices" title="Open in editor for mobile devices"/>
|
||||
</a>
|
||||
</td>
|
||||
<td class="contentCells contentCells-icon">
|
||||
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "comment", directUrl = isEnabledDirectUrl }) %>" target="_blank">
|
||||
<img src="content/images/comment.svg" alt="Open in editor for comment" title="Open in editor for comment"/>
|
||||
</a>
|
||||
</td>
|
||||
<% if (docType == "word") { %>
|
||||
<td class="contentCells contentCells-icon">
|
||||
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "review", directUrl = isEnabledDirectUrl }) %>" target="_blank">
|
||||
<img src="content/images/review.svg" alt="Open in editor for review" title="Open in editor for review"/>
|
||||
</a>
|
||||
</td>
|
||||
<% } else if (docType == "cell") { %>
|
||||
<td class="contentCells contentCells-icon">
|
||||
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "filter", directUrl = isEnabledDirectUrl }) %>" target="_blank">
|
||||
<img src="content/images/filter.svg" alt="Open in editor without access to change the filter" title="Open in editor without access to change the filter" />
|
||||
</a>
|
||||
</td>
|
||||
<% } %>
|
||||
<% if (docType == "word") { %>
|
||||
<td class="contentCells contentCells-icon">
|
||||
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "blockcontent", directUrl = isEnabledDirectUrl }) %>" target="_blank">
|
||||
<img src="content/images/block-content.svg" alt="Open in editor without content control modification" title="Open in editor without content control modification"/>
|
||||
</a>
|
||||
</td>
|
||||
<% } else { %>
|
||||
<td class="contentCells contentCells-icon"></td>
|
||||
<% } %>
|
||||
<% if (docType != "word" && docType != "cell") { %>
|
||||
<td class="contentCells contentCells-icon "></td>
|
||||
<% } %>
|
||||
<% if (isFillFormDoc) { %>
|
||||
<td class="contentCells contentCells-shift contentCells-icon firstContentCellShift">
|
||||
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "fillForms", directUrl = isEnabledDirectUrl }) %>" target="_blank">
|
||||
<img src="content/images/fill-forms.svg" alt="Open in editor for filling in forms" title="Open in editor for filling in forms"/>
|
||||
</a>
|
||||
</td>
|
||||
<% } else { %>
|
||||
<td class="contentCells contentCells-shift contentCells-icon firstContentCellShift"></td>
|
||||
<% } %>
|
||||
<% } else if (isFillFormDoc) { %>
|
||||
<td class="contentCells contentCells-icon "></td>
|
||||
<td class="contentCells contentCells-icon">
|
||||
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "mobile", editorsMode = "fillForms", directUrl = isEnabledDirectUrl }) %>" target="_blank">
|
||||
<img src="content/images/mobile-fill-forms.svg" alt="Open in editor for filling in forms for mobile devices" title="Open in editor for filling in forms for mobile devices"/>
|
||||
</a>
|
||||
</td>
|
||||
<td class="contentCells contentCells-icon "></td>
|
||||
<td class="contentCells contentCells-icon "></td>
|
||||
<td class="contentCells contentCells-icon "></td>
|
||||
<td class="contentCells contentCells-shift contentCells-icon firstContentCellShift">
|
||||
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "fillForms", directUrl = isEnabledDirectUrl }) %>" target="_blank">
|
||||
<img src="content/images/fill-forms.svg" alt="Open in editor for filling in forms" title="Open in editor for filling in forms"/>
|
||||
</a>
|
||||
</td>
|
||||
<% } else { %>
|
||||
<td class="contentCells contentCells-shift contentCells-icon contentCellsEmpty" colspan="6"></td>
|
||||
<% } %>
|
||||
<td class="contentCells contentCells-icon firstContentCellViewers">
|
||||
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "desktop", editorsMode = "view", directUrl = isEnabledDirectUrl }) %>" target="_blank">
|
||||
<img src="content/images/desktop.svg" alt="Open in viewer for full size screens" title="Open in viewer for full size screens"/>
|
||||
</a>
|
||||
</td>
|
||||
<td class="contentCells contentCells-icon">
|
||||
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "mobile", editorsMode = "view", directUrl = isEnabledDirectUrl }) %>" target="_blank">
|
||||
<img src="content/images/mobile.svg" alt="Open in viewer for mobile devices" title="Open in viewer for mobile devices"/>
|
||||
</a>
|
||||
</td>
|
||||
<td class="contentCells contentCells-icon contentCells-shift">
|
||||
<a href="<%= Url.Action("Editor", "Home", new { fileName = storedFile.Name, editorsType = "embedded", editorsMode = "embedded", directUrl = isEnabledDirectUrl }) %>" target="_blank">
|
||||
<img src="content/images/embeded.svg" alt="Open in embedded mode" title="Open in embedded mode"/>
|
||||
</a>
|
||||
</td>
|
||||
<td class="contentCells contentCells-icon contentCells-shift downloadContentCellShift">
|
||||
<a href="webeditor.ashx?type=download&fileName=<%= HttpUtility.UrlEncode(storedFile.Name) %>">
|
||||
<img class="icon-download" src="content/images/download.svg" alt="Download" title="Download" />
|
||||
</a>
|
||||
</td>
|
||||
<td class="contentCells contentCells-icon contentCells-shift">
|
||||
<a class="delete-file" data-filename="<%= storedFile.Name %>">
|
||||
<img class="icon-delete" src="content/images/delete.svg" alt="Delete" title="Delete" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<% } %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="mainProgress">
|
||||
<div id="uploadSteps">
|
||||
<span id="uploadFileName" class="uploadFileName"></span>
|
||||
<div class="describeUpload">After these steps are completed, you can work with your document.</div>
|
||||
<span id="step1" class="step">1. Loading the file.</span>
|
||||
<span class="step-descr">The loading speed depends on file size and additional elements it contains.</span>
|
||||
<br />
|
||||
<span id="step2" class="step">2. Conversion.</span>
|
||||
<span class="step-descr">The file is converted to OOXML so that you can edit it.</span>
|
||||
<br />
|
||||
<div id="blockPassword">
|
||||
<span class="descrFilePass">The file is password protected.</span>
|
||||
<br />
|
||||
<div>
|
||||
<input id="filePass" type="password"/>
|
||||
<div id="enterPass" class="button orange">Enter</div>
|
||||
<div id="skipPass" class="button gray">Skip</div>
|
||||
</div>
|
||||
<span class="errorPass"></span>
|
||||
<br />
|
||||
</div>
|
||||
<span id="step3" class="step">3. Loading editor scripts.</span>
|
||||
<span class="step-descr">They are loaded only once, they will be cached on your computer.</span>
|
||||
<input type="hidden" name="hiddenFileName" id="hiddenFileName" />
|
||||
<br />
|
||||
<span class="progress-descr">Note the speed of all operations depends on your connection quality and server location.</span>
|
||||
<br />
|
||||
<div class="error-message">
|
||||
<b>Upload error: </b><span></span>
|
||||
<br />
|
||||
Please select another file and try again.
|
||||
</div>
|
||||
</div>
|
||||
<iframe id="embeddedView" src="" height="345px" width="432px" frameborder="0" scrolling="no" allowtransparency></iframe>
|
||||
<br />
|
||||
<div class="buttonsMobile">
|
||||
<div id="beginEdit" class="button orange disable">Edit</div>
|
||||
<div id="beginView" class="button gray disable">View</div>
|
||||
<div id="beginEmbedded" class="button gray disable">Embedded view</div>
|
||||
<div id="cancelEdit" class="button gray">Cancel</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span id="loadScripts" data-docs="<%= WebConfigurationManager.AppSettings["files.docservice.url.site"] + WebConfigurationManager.AppSettings["files.docservice.url.preloader"] %>"></span>
|
||||
|
||||
<footer>
|
||||
<div class="center">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="http://api.onlyoffice.com/editors/howitworks" target="_blank">API Documentation</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="mailto:sales@onlyoffice.com">Submit your request</a>
|
||||
</td>
|
||||
<td class="copy">
|
||||
© Ascensio System SIA <%= DateTime.Now.Year.ToString() %>. All rights reserved.
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<%: Scripts.Render("~/bundles/jquery", "~/bundles/scripts") %>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
var FillExtList = '<%= string.Join(",", DocManagerHelper.FillFormExts.ToArray()) %>';
|
||||
var ConverExtList = '<%= string.Join(",", DocManagerHelper.ConvertExts.ToArray()) %>';
|
||||
var EditedExtList = '<%= string.Join(",", DocManagerHelper.EditedExts.ToArray()) %>';
|
||||
var UrlConverter = '<%= Url.Content("~/webeditor.ashx?type=convert") %>';
|
||||
var UrlEditor = '<%= Url.Action("editor", "Home") %>';
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,31 @@
|
||||
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<!--
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
-->
|
||||
<title>Error</title>
|
||||
</head>
|
||||
<body>
|
||||
<hgroup>
|
||||
<h1>Error.</h1>
|
||||
<h2>An error occurred while processing your request.</h2>
|
||||
</hgroup>
|
||||
</body>
|
||||
</html>
|
||||
59
web/documentserver-example/csharp-mvc/Views/Web.config
Normal file
@ -0,0 +1,59 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
|
||||
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
|
||||
<system.web.webPages.razor>
|
||||
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<pages pageBaseType="System.Web.Mvc.WebViewPage">
|
||||
<namespaces>
|
||||
<add namespace="System.Web.Mvc" />
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Optimization"/>
|
||||
<add namespace="System.Web.Routing" />
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
|
||||
<appSettings>
|
||||
<add key="webpages:Enabled" value="false" />
|
||||
</appSettings>
|
||||
|
||||
<system.web>
|
||||
<httpHandlers>
|
||||
<add path="*" verb="*" type="System.Web.HttpNotFoundHandler"/>
|
||||
</httpHandlers>
|
||||
|
||||
<!--
|
||||
Enabling request validation in view pages would cause validation to occur
|
||||
after the input has already been processed by the controller. By default
|
||||
MVC performs request validation before a controller processes the input.
|
||||
To change this behavior apply the ValidateInputAttribute to a
|
||||
controller or action.
|
||||
-->
|
||||
<pages
|
||||
validateRequest="false"
|
||||
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
||||
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
|
||||
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<controls>
|
||||
<add assembly="System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" />
|
||||
</controls>
|
||||
</pages>
|
||||
</system.web>
|
||||
|
||||
<system.webServer>
|
||||
<validation validateIntegratedModeConfiguration="false" />
|
||||
|
||||
<handlers>
|
||||
<remove name="BlockViewHandler"/>
|
||||
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
</configuration>
|
||||
74
web/documentserver-example/csharp-mvc/Web.config
Normal file
@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
For more information on how to configure your ASP.NET application, please visit
|
||||
http://go.microsoft.com/fwlink/?LinkId=152368
|
||||
-->
|
||||
<configuration>
|
||||
<configSections>
|
||||
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
|
||||
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||
</configSections>
|
||||
<appSettings configSource="web.appsettings.config" />
|
||||
<system.web>
|
||||
<httpRuntime maxRequestLength="51200" targetFramework="4.5" />
|
||||
<compilation debug="true" targetFramework="4.5" />
|
||||
<pages>
|
||||
<namespaces>
|
||||
<add namespace="System.Web.Helpers" />
|
||||
<add namespace="System.Web.Mvc" />
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Optimization" />
|
||||
<add namespace="System.Web.Routing" />
|
||||
<add namespace="System.Web.WebPages" />
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<validation validateIntegratedModeConfiguration="false" />
|
||||
<httpProtocol>
|
||||
<customHeaders>
|
||||
<add name="Access-Control-Allow-Origin" value="*" />
|
||||
</customHeaders>
|
||||
</httpProtocol>
|
||||
<handlers>
|
||||
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
|
||||
<remove name="OPTIONSVerbHandler" />
|
||||
<remove name="TRACEVerbHandler" />
|
||||
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
</handlers>
|
||||
<security>
|
||||
<requestFiltering>
|
||||
<requestLimits maxAllowedContentLength="52428800" />
|
||||
</requestFiltering>
|
||||
</security>
|
||||
</system.webServer>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="1.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
1
web/documentserver-example/csharp-mvc/WebEditor.ashx
Normal file
@ -0,0 +1 @@
|
||||
<%@ WebHandler Language="C#" CodeBehind="WebEditor.ashx.cs" Class="OnlineEditorsExampleMVC.WebEditor" %>
|
||||
595
web/documentserver-example/csharp-mvc/WebEditor.ashx.cs
Normal file
@ -0,0 +1,595 @@
|
||||
/**
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2023
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Web;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Web.Services;
|
||||
using System.Web.Configuration;
|
||||
using OnlineEditorsExampleMVC.Helpers;
|
||||
using OnlineEditorsExampleMVC.Models;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace OnlineEditorsExampleMVC
|
||||
{
|
||||
[WebService(Namespace = "http://tempuri.org/")]
|
||||
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
|
||||
public class WebEditor : IHttpHandler
|
||||
{
|
||||
public void ProcessRequest(HttpContext context)
|
||||
{
|
||||
// define functions for each type of operation
|
||||
switch (context.Request["type"])
|
||||
{
|
||||
case "upload":
|
||||
Upload(context);
|
||||
break;
|
||||
case "download":
|
||||
Download(context);
|
||||
break;
|
||||
case "downloadhistory":
|
||||
DownloadHistory(context);
|
||||
break;
|
||||
case "convert":
|
||||
Convert(context);
|
||||
break;
|
||||
case "track":
|
||||
Track(context);
|
||||
break;
|
||||
case "remove":
|
||||
Remove(context);
|
||||
break;
|
||||
case "assets":
|
||||
Assets(context);
|
||||
break;
|
||||
case "csv":
|
||||
GetCsv(context);
|
||||
break;
|
||||
case "files":
|
||||
Files(context);
|
||||
break;
|
||||
case "saveas":
|
||||
SaveAs(context);
|
||||
break;
|
||||
case "rename":
|
||||
Rename(context);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private static void SaveAs(HttpContext context)
|
||||
{
|
||||
context.Response.ContentType = "text/plain";
|
||||
try
|
||||
{
|
||||
string fileData;
|
||||
try
|
||||
{
|
||||
using (var receiveStream = context.Request.InputStream)
|
||||
using (var readStream = new StreamReader(receiveStream))
|
||||
{
|
||||
fileData = readStream.ReadToEnd();
|
||||
if (string.IsNullOrEmpty(fileData)) context.Response.Write("{\"error\":\"Request stream is empty\"}");
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new HttpException((int)HttpStatusCode.BadRequest, e.Message);
|
||||
}
|
||||
|
||||
var jss = new JavaScriptSerializer();
|
||||
var body = jss.Deserialize<Dictionary<string, object>>(fileData);
|
||||
var fileUrl = (string) body["url"];
|
||||
var title = (string) body["title"];
|
||||
var fileName = DocManagerHelper.GetCorrectName(title);
|
||||
var extension = "." + (Path.GetExtension(fileName).ToLower() ?? "").Trim('.');
|
||||
|
||||
var allExt = DocManagerHelper.ConvertExts
|
||||
.Concat(DocManagerHelper.EditedExts)
|
||||
.Concat(DocManagerHelper.ViewedExts)
|
||||
.Concat(DocManagerHelper.FillFormExts)
|
||||
.ToArray();
|
||||
|
||||
if (!allExt.Contains(extension))
|
||||
{
|
||||
context.Response.Write("{\"error\":\"File type is not supported\"}");
|
||||
}
|
||||
|
||||
var req = (HttpWebRequest)WebRequest.Create(fileUrl);
|
||||
|
||||
DocManagerHelper.VerifySSL();
|
||||
|
||||
using (var stream = req.GetResponse().GetResponseStream())
|
||||
{
|
||||
|
||||
if (stream == null || req.GetResponse().ContentLength <= 0 || req.GetResponse().ContentLength > DocManagerHelper.MaxFileSize)
|
||||
{
|
||||
context.Response.Write("{\"error\": \"File size is incorrect\"}");
|
||||
}
|
||||
const int bufferSize = 4096;
|
||||
|
||||
using (var fs = File.Open(DocManagerHelper.StoragePath(fileName, null), FileMode.Create))
|
||||
{
|
||||
var buffer = new byte[bufferSize];
|
||||
int readed;
|
||||
while ((readed = stream.Read(buffer, 0, bufferSize)) != 0)
|
||||
{
|
||||
fs.Write(buffer, 0, readed); // write bytes to the output stream
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var id = context.Request.Cookies.GetOrDefault("uid", null);
|
||||
var user = Users.getUser(id); // get the user
|
||||
DocManagerHelper.CreateMeta(fileName, user.id, user.name, null);
|
||||
|
||||
context.Response.Write("{ \"file\": \"" + fileName + "\"}");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
context.Response.Write("{ \"error\": \"" + 1 + "\", \"message\": \"" + e.Message + "\"}");
|
||||
}
|
||||
}
|
||||
|
||||
// upload a file
|
||||
private static void Upload(HttpContext context)
|
||||
{
|
||||
context.Response.ContentType = "text/plain";
|
||||
try
|
||||
{
|
||||
DocManagerHelper.VerifySSL();
|
||||
|
||||
var httpPostedFile = context.Request.Files[0];
|
||||
string fileName;
|
||||
|
||||
// check from which browser the request came for
|
||||
if (HttpContext.Current.Request.Browser.Browser.ToUpper() == "IE")
|
||||
{
|
||||
var files = httpPostedFile.FileName.Split(new char[] { '\\' });
|
||||
fileName = files[files.Length - 1]; // get file name
|
||||
}
|
||||
else
|
||||
{
|
||||
fileName = httpPostedFile.FileName;
|
||||
}
|
||||
|
||||
var curSize = httpPostedFile.ContentLength;
|
||||
if (DocManagerHelper.MaxFileSize < curSize || curSize <= 0) // check if the file size exceeds the maximum file size
|
||||
{
|
||||
throw new Exception("File size is incorrect");
|
||||
}
|
||||
|
||||
var curExt = (Path.GetExtension(fileName) ?? "").ToLower();
|
||||
if (!DocManagerHelper.FileExts.Contains(curExt)) // check if the file extension is supported by the editor
|
||||
{
|
||||
throw new Exception("File type is not supported");
|
||||
}
|
||||
|
||||
fileName = DocManagerHelper.GetCorrectName(fileName); // get the correct file name if such a name already exists
|
||||
var documentType = FileUtility.GetFileType(fileName).ToString().ToLower();
|
||||
|
||||
var savedFileName = DocManagerHelper.StoragePath(fileName); // get the storage path to the uploading file
|
||||
httpPostedFile.SaveAs(savedFileName); // and save it
|
||||
// get file meta information or create the default one
|
||||
var id = context.Request.Cookies.GetOrDefault("uid", null);
|
||||
var user = Users.getUser(id);
|
||||
DocManagerHelper.CreateMeta(fileName, user.id, user.name);
|
||||
|
||||
context.Response.Write("{ \"filename\": \"" + fileName + "\", \"documentType\": \"" + documentType + "\"}");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
context.Response.Write("{ \"error\": \"" + e.Message + "\"}");
|
||||
}
|
||||
}
|
||||
|
||||
// convert a file
|
||||
private static void Convert(HttpContext context)
|
||||
{
|
||||
context.Response.ContentType = "text/plain";
|
||||
try
|
||||
{
|
||||
string fileData;
|
||||
|
||||
using (var receiveStream = context.Request.InputStream)
|
||||
using (var readStream = new StreamReader(receiveStream))
|
||||
{
|
||||
fileData = readStream.ReadToEnd();
|
||||
if (string.IsNullOrEmpty(fileData)) context.Response.Write("{\"error\":1,\"message\":\"Request stream is empty\"}");
|
||||
}
|
||||
|
||||
var jss = new JavaScriptSerializer();
|
||||
var body = jss.Deserialize<Dictionary<string, object>>(fileData);
|
||||
|
||||
var fileName = Path.GetFileName(body["filename"].ToString());
|
||||
var lang = context.Request.Cookies.GetOrDefault("ulang", null);
|
||||
var filePass = body["filePass"] != null ? body["filePass"].ToString() : null;
|
||||
var fileUri = DocManagerHelper.GetDownloadUrl(fileName);
|
||||
|
||||
var extension = (Path.GetExtension(fileName).ToLower() ?? "").Trim('.');
|
||||
var internalExtension = DocManagerHelper.GetInternalExtension(FileUtility.GetFileType(fileName)).Trim('.');
|
||||
|
||||
// check if the file with such an extension can be converted
|
||||
if (DocManagerHelper.ConvertExts.Contains("." + extension)
|
||||
&& !string.IsNullOrEmpty(internalExtension))
|
||||
{
|
||||
// generate document key
|
||||
var key = ServiceConverter.GenerateRevisionId(fileUri);
|
||||
|
||||
var downloadUri = new UriBuilder(DocManagerHelper.GetServerUrl(true))
|
||||
{
|
||||
Path = HttpRuntime.AppDomainAppVirtualPath
|
||||
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
|
||||
+ "webeditor.ashx",
|
||||
Query = "type=download&fileName=" + HttpUtility.UrlEncode(fileName)
|
||||
};
|
||||
|
||||
// get the url to the converted file
|
||||
string newFileUri;
|
||||
var result = ServiceConverter.GetConvertedUri(downloadUri.ToString(), extension, internalExtension, key, true, out newFileUri, filePass, lang);
|
||||
if (result != 100)
|
||||
{
|
||||
context.Response.Write("{ \"step\" : \"" + result + "\", \"filename\" : \"" + fileName + "\"}");
|
||||
return;
|
||||
}
|
||||
|
||||
// get a file name of an internal file extension with an index if the file with such a name already exists
|
||||
var correctName = DocManagerHelper.GetCorrectName(Path.GetFileNameWithoutExtension(fileName) + "." + internalExtension);
|
||||
|
||||
var req = (HttpWebRequest)WebRequest.Create(newFileUri);
|
||||
|
||||
DocManagerHelper.VerifySSL();
|
||||
|
||||
using (var stream = req.GetResponse().GetResponseStream()) // get response stream of the converting file
|
||||
{
|
||||
if (stream == null) throw new Exception("Stream is null");
|
||||
const int bufferSize = 4096;
|
||||
|
||||
using (var fs = File.Open(DocManagerHelper.StoragePath(correctName), FileMode.Create))
|
||||
{
|
||||
var buffer = new byte[bufferSize];
|
||||
int readed;
|
||||
while ((readed = stream.Read(buffer, 0, bufferSize)) != 0)
|
||||
{
|
||||
fs.Write(buffer, 0, readed); // write bytes to the output stream
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Remove(fileName); // remove the original file and its history if it exists
|
||||
fileName = correctName; // create meta information about the converted file with user id and name specified
|
||||
var id = context.Request.Cookies.GetOrDefault("uid", null);
|
||||
var user = Users.getUser(id);
|
||||
DocManagerHelper.CreateMeta(fileName, user.id, user.name);
|
||||
}
|
||||
|
||||
var documentType = FileUtility.GetFileType(fileName).ToString().ToLower();
|
||||
context.Response.Write("{ \"filename\" : \"" + fileName + "\", \"documentType\": \"" + documentType + "\" }");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
context.Response.Write("{ \"error\": \"" + e.Message + "\"}");
|
||||
}
|
||||
}
|
||||
|
||||
// define tracker status
|
||||
private enum TrackerStatus
|
||||
{
|
||||
NotFound = 0,
|
||||
Editing = 1,
|
||||
MustSave = 2,
|
||||
Corrupted = 3,
|
||||
Closed = 4,
|
||||
MustForceSave = 6,
|
||||
CorruptedForceSave = 7
|
||||
}
|
||||
|
||||
// track file changes
|
||||
private static void Track(HttpContext context)
|
||||
{
|
||||
// read request body
|
||||
var fileData = TrackManager.readBody(context);
|
||||
|
||||
var userAddress = context.Request["userAddress"];
|
||||
var fileName = Path.GetFileName(context.Request["fileName"]);
|
||||
var status = (TrackerStatus) (int) fileData["status"]; // get status from the request body
|
||||
var saved = 0;
|
||||
switch (status)
|
||||
{
|
||||
case TrackerStatus.Editing:
|
||||
try
|
||||
{
|
||||
var jss = new JavaScriptSerializer();
|
||||
var actions = jss.Deserialize <List<object>> (jss.Serialize(fileData["actions"]));
|
||||
var action = jss.Deserialize <Dictionary<string, object>> (jss.Serialize(actions[0]));
|
||||
if (action != null && action["type"].ToString().Equals("0")) // finished edit
|
||||
{
|
||||
var user = action["userid"].ToString(); // the user who finished editing
|
||||
var users = jss.Deserialize<List<object>>(jss.Serialize(fileData["users"]));
|
||||
if (!users.Contains(user))
|
||||
{
|
||||
TrackManager.commandRequest("forcesave", fileData["key"].ToString()); // create a command request with the forcesave method
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
break;
|
||||
|
||||
// MustSave, Corrupted
|
||||
case TrackerStatus.MustSave:
|
||||
case TrackerStatus.Corrupted:
|
||||
try
|
||||
{
|
||||
// saving a document
|
||||
saved = TrackManager.processSave(fileData, fileName, userAddress);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
saved = 1;
|
||||
}
|
||||
context.Response.Write("{\"error\":" + saved + "}");
|
||||
return;
|
||||
|
||||
// MustForceSave, CorruptedForceSave
|
||||
case TrackerStatus.MustForceSave:
|
||||
case TrackerStatus.CorruptedForceSave:
|
||||
try
|
||||
{
|
||||
// force saving a document
|
||||
saved = TrackManager.processForceSave(fileData, fileName, userAddress);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
saved = 1;
|
||||
}
|
||||
context.Response.Write("{\"error\":" + saved + "}");
|
||||
return;
|
||||
}
|
||||
|
||||
context.Response.Write("{\"error\":" + saved + "}");
|
||||
}
|
||||
|
||||
// remove a file
|
||||
private static void Remove(HttpContext context)
|
||||
{
|
||||
context.Response.ContentType = "text/plain";
|
||||
try
|
||||
{
|
||||
var fileName = Path.GetFileName(context.Request["fileName"]);
|
||||
Remove(fileName); // remove a file and its history if it exists
|
||||
|
||||
context.Response.Write("{ \"success\": true }");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
context.Response.Write("{ \"error\": \"" + e.Message + "\"}");
|
||||
}
|
||||
}
|
||||
|
||||
// remove a file by its name
|
||||
private static void Remove(string fileName)
|
||||
{
|
||||
var path = DocManagerHelper.StoragePath(fileName, null); // delete file
|
||||
var histDir = DocManagerHelper.HistoryDir(path); // delete file history
|
||||
|
||||
if (File.Exists(path)) File.Delete(path);
|
||||
if (Directory.Exists(histDir)) Directory.Delete(histDir, true);
|
||||
}
|
||||
|
||||
// get files information
|
||||
private static void Files(HttpContext context)
|
||||
{
|
||||
List<Dictionary<string, object>> files = null;
|
||||
|
||||
try
|
||||
{
|
||||
var jss = new JavaScriptSerializer();
|
||||
context.Response.ContentType = "application/json";
|
||||
|
||||
if (context.Request["fileId"] == null)
|
||||
{
|
||||
files = DocManagerHelper.GetFilesInfo(); // get the information about the files from the storage path
|
||||
context.Response.Write(jss.Serialize(files));
|
||||
}
|
||||
else
|
||||
{
|
||||
var fileId = context.Request["fileId"]; // get file id from the request
|
||||
files = DocManagerHelper.GetFilesInfo(fileId);
|
||||
if (files.Count == 0)
|
||||
{
|
||||
context.Response.Write("\"File not found\"");
|
||||
}
|
||||
else
|
||||
{
|
||||
context.Response.Write(jss.Serialize(files));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
context.Response.Write("{ \"error\": \"" + e.Message + "\"}");
|
||||
}
|
||||
}
|
||||
|
||||
// get sample files from the assests
|
||||
private static void Assets(HttpContext context)
|
||||
{
|
||||
var fileName = Path.GetFileName(context.Request["filename"]);
|
||||
var filePath = HttpRuntime.AppDomainAppPath + "assets/sample/" + fileName;
|
||||
download(filePath, context);
|
||||
}
|
||||
|
||||
// download a csv file
|
||||
private static void GetCsv(HttpContext context)
|
||||
{
|
||||
var fileName = "csv.csv";
|
||||
var filePath = HttpRuntime.AppDomainAppPath + "assets/sample/" + fileName;
|
||||
download(filePath, context);
|
||||
}
|
||||
|
||||
// download a file
|
||||
private static void Download(HttpContext context)
|
||||
{
|
||||
try
|
||||
{
|
||||
var fileName = Path.IsPathRooted(WebConfigurationManager.AppSettings["storage-path"]) ? context.Request["fileName"]
|
||||
: Path.GetFileName(context.Request["fileName"]);
|
||||
var userAddress = context.Request["userAddress"];
|
||||
var isEmbedded = context.Request["dmode"];
|
||||
|
||||
if (JwtManager.Enabled && isEmbedded == null && userAddress != null)
|
||||
{
|
||||
string JWTheader = string.IsNullOrEmpty(WebConfigurationManager.AppSettings["files.docservice.header"]) ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
|
||||
|
||||
string token = "";
|
||||
if (context.Request.Headers.AllKeys.Contains(JWTheader, StringComparer.InvariantCultureIgnoreCase))
|
||||
{
|
||||
var headerToken = context.Request.Headers.Get(JWTheader).Substring("Bearer ".Length);
|
||||
token = JwtManager.Decode(headerToken);
|
||||
}
|
||||
if (string.IsNullOrEmpty(token))
|
||||
{
|
||||
context.Response.StatusCode = (int)HttpStatusCode.Forbidden;
|
||||
context.Response.Write("JWT validation failed");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var filePath = DocManagerHelper.ForcesavePath(fileName, userAddress, false); // get the path to the force saved document version
|
||||
if (string.IsNullOrEmpty(filePath))
|
||||
{
|
||||
filePath = DocManagerHelper.StoragePath(fileName, userAddress); // or to the original document
|
||||
}
|
||||
download(filePath, context);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
context.Response.Write("{ \"error\": \"File not found!\"}");
|
||||
}
|
||||
}
|
||||
|
||||
// download data from the url to the file
|
||||
private static void download(string filePath, HttpContext context)
|
||||
{
|
||||
var fileinf = new FileInfo(filePath);
|
||||
context.Response.AddHeader("Content-Length", fileinf.Length.ToString()); // set headers to the response
|
||||
context.Response.AddHeader("Content-Type", MimeMapping.GetMimeMapping(filePath));
|
||||
var tmp = HttpUtility.UrlEncode(Path.GetFileName(filePath));
|
||||
tmp = tmp.Replace("+", "%20");
|
||||
context.Response.AddHeader("Content-Disposition", "attachment; filename*=UTF-8\'\'" + tmp);
|
||||
context.Response.TransmitFile(filePath);
|
||||
}
|
||||
|
||||
public bool IsReusable
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
// download a history file
|
||||
private static void DownloadHistory(HttpContext context)
|
||||
{
|
||||
try
|
||||
{
|
||||
var fileName = Path.GetFileName(context.Request["fileName"]);
|
||||
var userAddress = Path.GetFileName(context.Request["userAddress"]);
|
||||
var version = System.Convert.ToInt32(context.Request["ver"]);
|
||||
var file = Path.GetFileName(context.Request["file"]);
|
||||
|
||||
if (JwtManager.Enabled)
|
||||
{
|
||||
string JWTheader = string.IsNullOrEmpty(WebConfigurationManager.AppSettings["files.docservice.header"]) ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
|
||||
|
||||
if (context.Request.Headers.AllKeys.Contains(JWTheader, StringComparer.InvariantCultureIgnoreCase))
|
||||
{
|
||||
var headerToken = context.Request.Headers.Get(JWTheader).Substring("Bearer ".Length);
|
||||
string token = JwtManager.Decode(headerToken);
|
||||
|
||||
if (string.IsNullOrEmpty(token))
|
||||
{
|
||||
context.Response.StatusCode = (int)HttpStatusCode.Forbidden;
|
||||
context.Response.Write("JWT validation failed");
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
context.Response.StatusCode = (int)HttpStatusCode.Forbidden;
|
||||
context.Response.Write("JWT validation failed");
|
||||
return;
|
||||
}
|
||||
}
|
||||
var histPath = DocManagerHelper.HistoryDir(DocManagerHelper.StoragePath(fileName, userAddress));
|
||||
var filePath = Path.Combine(DocManagerHelper.VersionDir(histPath, version), file); // get the path to document version
|
||||
|
||||
download(filePath, context);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
context.Response.Write("{ \"error\": \"File not found!\"}");
|
||||
}
|
||||
}
|
||||
|
||||
// rename a file
|
||||
private static void Rename(HttpContext context)
|
||||
{
|
||||
// read request body
|
||||
context.Response.ContentType = "text/plain";
|
||||
string fileData;
|
||||
try
|
||||
{
|
||||
using (var receiveStream = context.Request.InputStream)
|
||||
using (var readStream = new StreamReader(receiveStream))
|
||||
{
|
||||
fileData = readStream.ReadToEnd();
|
||||
if (string.IsNullOrEmpty(fileData)) context.Response.Write("{\"error\":\"Request stream is empty\"}");
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new HttpException((int)HttpStatusCode.BadRequest, e.Message);
|
||||
}
|
||||
|
||||
var jss = new JavaScriptSerializer();
|
||||
var body = jss.Deserialize<Dictionary<string, object>>(fileData);
|
||||
var newFileName = (string) body["newfilename"];
|
||||
var docKey = (string) body["dockey"];
|
||||
|
||||
var origExt = '.' + (string) body["ext"];
|
||||
var curExt = Path.GetExtension(newFileName).ToLower();
|
||||
|
||||
if (string.Compare(origExt, curExt, true) != 0)
|
||||
{
|
||||
newFileName += origExt;
|
||||
}
|
||||
var meta = new Dictionary<string, object>() {
|
||||
{ "title", newFileName }
|
||||
};
|
||||
TrackManager.commandRequest("meta", docKey, meta);
|
||||
context.Response.Write("{ \"result\": \"OK\"}");
|
||||
}
|
||||
}
|
||||
}
|
||||
1
web/documentserver-example/csharp-mvc/assets
Submodule
BIN
web/documentserver-example/csharp-mvc/favicon.ico
Normal file
|
After Width: | Height: | Size: 144 KiB |
@ -0,0 +1,41 @@
|
||||
ONLYOFFICE Applications example uses code from the following 3rd party projects:
|
||||
|
||||
Entity Framework - Entity Framework is an object-relational mapper that enables .NET developers to work with relational data using domain-specific objects. (https://docs.microsoft.com/en-us/ef/ef6/resources/licenses/ef5/enu)
|
||||
License: MICROSOFT SOFTWARE SUPPLEMENTAL TERMS, MICROSOFT SOFTWARE LICENSE TERMS
|
||||
License File: EntityFramework.license
|
||||
|
||||
jQuery - jQuery is a new kind of JavaScript Library. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at https://nugetpackages.codeplex.com/ (https://jquery.org/license/)
|
||||
License: MIT
|
||||
License File: jQuery.license
|
||||
|
||||
jQuery.BlockUI - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (https://github.com/malsup/blockui/)
|
||||
License: MIT, GPL
|
||||
License File: jQuery.BlockUI.license
|
||||
|
||||
jQuery.FileUpload - File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads. (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
|
||||
License: MIT
|
||||
License File: jQuery.FileUpload.license
|
||||
|
||||
jQuery.iframe-transport - jQuery Iframe Transport Plugin for File Upload (https://github.com/blueimp/jQuery-File-Upload/blob/master/LICENSE.txt)
|
||||
License: MIT
|
||||
License File: jQuery.iframe-transport.license
|
||||
|
||||
jQuery.UI - jQuery UI is an open source library of interface components — interactions, full-featured widgets, and animation effects — based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code. (https://jquery.org/license/)
|
||||
License: MIT
|
||||
License File: jQuery.UI.license
|
||||
|
||||
JWT - JWT (JSON Web Token) Implementation for .NET (Public Domain) (https://github.com/jwt-dotnet/jwt/)
|
||||
License: MIT
|
||||
License File: JWT.license
|
||||
|
||||
Microsoft.Web.Infrastructure - This package contains the Microsoft.Web.Infrastructure assembly that lets you dynamically register HTTP modules at run time. (https://www.microsoft.com/web/webpi/eula/aspnetmvc3update-eula.htm)
|
||||
License: MS-EULA License
|
||||
License File: Microsoft.Web.Infrastructure.license
|
||||
|
||||
Newtonsoft.Json - Json.NET is a popular high-performance JSON framework for .NET (https://github.com/JamesNK/Newtonsoft.Json)
|
||||
License: MIT
|
||||
License File: Newtonsoft.Json.license
|
||||
|
||||
WebGrease - Web Grease is a suite of tools for optimizing javascript, css files and images. (https://www.microsoft.com/web/webpi/eula/aspnetcomponent_rtw_ENU.htm)
|
||||
License: MICROSOFT .NET LIBRARY LICENSE
|
||||
License File: WebGrease.license
|
||||
@ -0,0 +1,41 @@
|
||||
Entity Framework 5 License
|
||||
|
||||
MICROSOFT SOFTWARE SUPPLEMENTAL LICENSE TERMS
|
||||
|
||||
ENTITY FRAMEWORK 5.0 FOR MICROSOFT WINDOWS OPERATING SYSTEM
|
||||
|
||||
Microsoft Corporation (or based on where you live, one of its affiliates) licenses this supplement to you. If you are licensed to use Microsoft Windows Operating System software (the "software"), you may use this supplement. You may not use it if you do not have a license for the software. You may use this supplement with each validly licensed copy of the software.
|
||||
|
||||
The following license terms describe additional use terms for this supplement. These terms and the license terms for the software apply to your use of the supplement. If there is a conflict, these supplemental license terms apply.
|
||||
|
||||
By using this supplement, you accept these terms. If you do not accept them, do not use this supplement.
|
||||
|
||||
If you comply with these license terms, you have the rights below.
|
||||
|
||||
1. DISTRIBUTABLE CODE. The supplement is comprised of Distributable Code. "Distributable Code" is code that you are permitted to distribute in programs you develop if you comply with the terms below.
|
||||
|
||||
a. Right to Use and Distribute.
|
||||
|
||||
You may copy and distribute the object code form of the supplement.
|
||||
Third Party Distribution. You may permit distributors of your programs to copy and distribute the Distributable Code as part of those programs.
|
||||
|
||||
b. Distribution Requirements. For any Distributable Code you distribute, you must
|
||||
|
||||
add significant primary functionality to it in your programs;
|
||||
for any Distributable Code having a filename extension of .lib, distribute only the results of running such Distributable Code through a linker with your program;
|
||||
distribute Distributable Code included in a setup program only as part of that setup program without modification;
|
||||
require distributors and external end users to agree to terms that protect it at least as much as this agreement;
|
||||
display your valid copyright notice on your programs; and
|
||||
indemnify, defend, and hold harmless Microsoft from any claims, including attorneys' fees, related to the distribution or use of your programs.
|
||||
|
||||
c. Distribution Restrictions. You may not
|
||||
|
||||
alter any copyright, trademark or patent notice in the Distributable Code;
|
||||
use Microsoft's trademarks in your programs' names or in a way that suggests your programs come from or are endorsed by Microsoft;
|
||||
distribute Distributable Code to run on a platform other than the Windows platform;
|
||||
include Distributable Code in malicious, deceptive or unlawful programs; or
|
||||
modify or distribute the source code of any Distributable Code so that any part of it becomes subject to an Excluded License. An Excluded License is one that requires, as a condition of use, modification or distribution, that
|
||||
the code be disclosed or distributed in source code form; or
|
||||
others have the right to modify it.
|
||||
|
||||
2. SUPPORT SERVICES FOR SUPPLEMENT. Microsoft provides support services for this software as described at www.support.microsoft.com/common/international.aspx.
|
||||
21
web/documentserver-example/csharp-mvc/licenses/JWT.license
Normal file
@ -0,0 +1,21 @@
|
||||
# Public Domain
|
||||
|
||||
Written by John Sheehan (http://john-sheehan.com)
|
||||
|
||||
This work is public domain.
|
||||
|
||||
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.
|
||||
|
||||
For more information, please visit: http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
# MIT
|
||||
|
||||
Copyright (c) 2019 Jwt.Net Maintainers and Contributors.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
For more information, please visit: https://opensource.org/licenses/MIT
|
||||
@ -0,0 +1,368 @@
|
||||
|
||||
MICROSOFT SOFTWARE LICENSE TERMS
|
||||
|
||||
MICROSOFT ASP.NET MODEL VIEW CONTROLLER 3 TOOLS UPDATE
|
||||
|
||||
These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. The terms also apply to any Microsoft
|
||||
|
||||
<EFBFBD> updates,
|
||||
|
||||
<EFBFBD> supplements,
|
||||
|
||||
<EFBFBD> Internet-based services, and
|
||||
|
||||
<EFBFBD> support services
|
||||
|
||||
for this software, unless other terms accompany those items. If so, those terms apply.
|
||||
|
||||
BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THEM, DO NOT USE THE SOFTWARE.
|
||||
|
||||
If you comply with these license terms, you have the rights below.
|
||||
|
||||
1. INSTALLATION AND USE RIGHTS. One user may install and use any number of copies of the software on your devices to design, develop and test your ASP.NET programs. You may modify, copy, and distribute or deploy any .js files contained in the software as part of your ASP.NET programs.
|
||||
2. ADDITIONAL LICENSING REQUIREMENTS AND/OR USE RIGHTS.
|
||||
a. Distributable Code. In addition to the .js files described above, the software contains code that you are permitted to distribute in ASP.NET programs you develop if you comply with the terms below.
|
||||
|
||||
i. Right to Use and Distribute. The code and text files listed below are <20>Distributable Code.<2E>
|
||||
|
||||
<EFBFBD> System.Web.Mvc.dll. You may copy and distribute the object code form of System.Web.Mvc.dll.
|
||||
|
||||
<EFBFBD> Third Party Distribution. You may permit distributors of your programs to copy and distribute the Distributable Code as part of those programs.
|
||||
|
||||
ii. Distribution Requirements. For any Distributable Code you distribute, you must
|
||||
|
||||
<EFBFBD> add significant primary functionality to it in your programs;
|
||||
|
||||
<EFBFBD> require distributors and external end users to agree to terms that protect it at least as much as this agreement;
|
||||
|
||||
<EFBFBD> display your valid copyright notice on your programs; and
|
||||
|
||||
<EFBFBD> indemnify, defend, and hold harmless Microsoft from any claims, including attorneys<79> fees, related to the distribution or use of your programs.
|
||||
|
||||
iii. Distribution Restrictions. You may not
|
||||
|
||||
<EFBFBD> alter any copyright, trademark or patent notice in the Distributable Code;
|
||||
|
||||
<EFBFBD> use Microsoft<66>s trademarks in your programs<6D> names or in a way that suggests your programs come from or are endorsed by Microsoft;
|
||||
|
||||
<EFBFBD> distribute Distributable Code to run on a platform other than the Windows platform;
|
||||
|
||||
<EFBFBD> include Distributable Code in malicious, deceptive or unlawful programs; or
|
||||
|
||||
<EFBFBD> modify or distribute the source code of any Distributable Code so that any part of it becomes subject to an Excluded License. An Excluded License is one that requires, as a condition of use, modification or distribution, that
|
||||
|
||||
<EFBFBD> the code be disclosed or distributed in source code form; or
|
||||
|
||||
<EFBFBD> others have the right to modify it.
|
||||
|
||||
3. THIRD PARTY NOTICES. The software may include third party code that Microsoft, not the third party, licenses to you under this agreement. Notices, if any, for the third party code are included for your information only. Microsoft<66>s service and support obligations, if any, apply only to the unmodified third party code running on ASP.NET.
|
||||
|
||||
4. Scope of License. The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. You may not
|
||||
|
||||
<EFBFBD> work around any technical limitations in the software;
|
||||
|
||||
<EFBFBD> reverse engineer, decompile or disassemble the software, except and only to the extent that applicable law expressly permits, despite this limitation;
|
||||
|
||||
<EFBFBD> make more copies of the software than specified in this agreement or allowed by applicable law, despite this limitation;
|
||||
|
||||
<EFBFBD> publish the software for others to copy;
|
||||
|
||||
<EFBFBD> rent, lease or lend the software; or
|
||||
|
||||
<EFBFBD> transfer the software or this agreement to any third party.
|
||||
|
||||
5. BACKUP COPY. You may make one backup copy of the software. You may use it only to reinstall the software.
|
||||
|
||||
6. DOCUMENTATION. Any person that has valid access to your computer or internal network may copy and use the documentation for your internal, reference purposes.
|
||||
|
||||
7. Export Restrictions. The software is subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the software. These laws include restrictions on destinations, end users and end use. For additional information, see www.microsoft.com/exporting.
|
||||
|
||||
8. SUPPORT SERVICES. Because this software is <20>as is,<2C> we may not provide support services for it.
|
||||
|
||||
9. Entire Agreement. This agreement, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for the software and support services.
|
||||
|
||||
10. Applicable Law.
|
||||
|
||||
a. United States. If you acquired the software in the United States, Washington state law governs the interpretation of this agreement and applies to claims for breach of it, regardless of conflict of laws principles. The laws of the state where you live govern all other claims, including claims under state consumer protection laws, unfair competition laws, and in tort.
|
||||
|
||||
b. Outside the United States. If you acquired the software in any other country, the laws of that country apply.
|
||||
|
||||
11. Legal Effect. This agreement describes certain legal rights. You may have other rights under the laws of your country. You may also have rights with respect to the party from whom you acquired the software. This agreement does not change your rights under the laws of your country if the laws of your country do not permit it to do so.
|
||||
|
||||
12. DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED <20>AS-IS.<2E> YOU BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES OR CONDITIONS. YOU MAY HAVE ADDITIONAL CONSUMER RIGHTS UNDER YOUR LOCAL LAWS WHICH THIS AGREEMENT CANNOT CHANGE. TO THE EXTENT PERMITTED UNDER YOUR LOCAL LAWS, MICROSOFT EXCLUDES THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
|
||||
|
||||
13. LIMITATION ON AND EXCLUSION OF REMEDIES AND DAMAGES. YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.
|
||||
|
||||
This limitation applies to
|
||||
|
||||
<EFBFBD> anything related to the software, services, content (including code) on third party Internet sites, or third party programs; and
|
||||
|
||||
<EFBFBD> claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law.
|
||||
|
||||
It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages.
|
||||
|
||||
|
||||
|
||||
* * * * *
|
||||
|
||||
MICROSOFT SOFTWARE LICENSE TERMS
|
||||
|
||||
MICROSOFT ASP.NET WEB PAGES
|
||||
|
||||
These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. The terms also apply to any Microsoft
|
||||
|
||||
<EFBFBD> updates,
|
||||
|
||||
<EFBFBD> supplements,
|
||||
|
||||
<EFBFBD> Internet-based services, and
|
||||
|
||||
<EFBFBD> support services
|
||||
|
||||
for this software, unless other terms accompany those items. If so, those terms apply.
|
||||
|
||||
BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THEM, DO NOT USE THE SOFTWARE.
|
||||
|
||||
AS DESCRIBED BELOW, USING SOME FEATURES ALSO OPERATES AS YOUR CONSENT TO THE TRANSMISSION OF CERTAIN STANDARD COMPUTER INFORMATION FOR INTERNET-BASED SERVICES.
|
||||
|
||||
If you comply with these license terms, you have the rights below.
|
||||
|
||||
1. INSTALLATION AND USE RIGHTS. One user may install and use any number of copies of the software on your devices to design, develop and test your ASP.NET programs.
|
||||
2. ADDITIONAL LICENSING REQUIREMENTS AND/OR USE RIGHTS.
|
||||
a. Distributable Code. The software contains code that you are permitted to distribute in programs you develop if you comply with the terms below.
|
||||
|
||||
i. Right to Use and Distribute. The code and text files listed below are <20>Distributable Code.<2E>
|
||||
|
||||
<EFBFBD> Redistributable DLL Files. You may copy and distribute the object code form of the following files:
|
||||
|
||||
<EFBFBD> Microsoft.Web.Infrastructure.dll;
|
||||
|
||||
<EFBFBD> NuGet.Core.dll;
|
||||
|
||||
<EFBFBD> System.Web.Helpers.dll;
|
||||
|
||||
<EFBFBD> System.Web.Razor.dll;
|
||||
|
||||
<EFBFBD> System.Web.WebPages.Administration.dll;
|
||||
|
||||
<EFBFBD> System.Web.WebPages.Deployment.dll;
|
||||
|
||||
<EFBFBD> System.Web.WebPages.dll;
|
||||
|
||||
<EFBFBD> System.Web.WebPages.Razor.dll;
|
||||
|
||||
<EFBFBD> WebMatrix.Data.dll;
|
||||
|
||||
<EFBFBD> WebMatrix.WebData.dll.
|
||||
|
||||
<EFBFBD> Third Party Distribution. You may permit distributors of your programs to copy and distribute the Distributable Code as part of those programs.
|
||||
|
||||
ii. Distribution Requirements. For any Distributable Code you distribute, you must
|
||||
|
||||
<EFBFBD> add significant primary functionality to it in your programs;
|
||||
|
||||
<EFBFBD> require distributors and external end users to agree to terms that protect it at least as much as this agreement;
|
||||
|
||||
<EFBFBD> display your valid copyright notice on your programs; and
|
||||
|
||||
<EFBFBD> indemnify, defend, and hold harmless Microsoft from any claims, including attorneys<79> fees, related to the distribution or use of your programs.
|
||||
|
||||
iii. Distribution Restrictions. You may not
|
||||
|
||||
<EFBFBD> alter any copyright, trademark or patent notice in the Distributable Code;
|
||||
|
||||
<EFBFBD> use Microsoft<66>s trademarks in your programs<6D> names or in a way that suggests your programs come from or are endorsed by Microsoft;
|
||||
|
||||
<EFBFBD> distribute Distributable Code to run on a platform other than the Windows platform;
|
||||
|
||||
<EFBFBD> include Distributable Code in malicious, deceptive or unlawful programs; or
|
||||
|
||||
<EFBFBD> modify or distribute the source code of any Distributable Code so that any part of it becomes subject to an Excluded License. An Excluded License is one that requires, as a condition of use, modification or distribution, that
|
||||
|
||||
<EFBFBD> the code be disclosed or distributed in source code form; or
|
||||
|
||||
<EFBFBD> others have the right to modify it.
|
||||
|
||||
3. INTERNET-BASED SERVICES. Microsoft provides Internet-based services with the software. It may change or cancel them at any time.
|
||||
a. Consent for Internet-Based Services. The software feature described below connects to Microsoft or service provider computer systems over the Internet. In some cases, you will not receive a separate notice when they connect. You may elect to not use it. For more information about this feature, see the software documentation and the privacy statement available at go.microsoft.com/fwlink/?LinkID=205205. BY USING THIS FEATURE, YOU CONSENT TO THE TRANSMISSION OF THIS INFORMATION. Microsoft does not use the information to identify or contact you.
|
||||
i. Computer Information. The following feature uses Internet protocols, which send to the appropriate systems computer information, such as your Internet protocol address, the type of operating system, browser and name and version of the software you are using, and the language code of the device where you installed the software. Microsoft or a third-party service provider uses this information to make the Internet-based service available to you.
|
||||
A. Open Data Protocol (OData) Service. This software will access a list of packages that is supplied by means of an OData service online from Microsoft or a third-party service provider.
|
||||
ii. Installing Packages and their Dependencies. Please refer to the <20>Package Manager Feature<72> section below for a description of this feature.
|
||||
iii. Use of Information. We or a third-party service provider may use the computer information, to improve our or their software and services. We or they may also share it with others, such as hardware and software vendors. They may use the information to improve how their products run with Microsoft software.
|
||||
b. Misuse of Internet-based Services. You may not use this service in any way that could harm it or impair anyone else<73>s use of it. You may not use the service to try to gain unauthorized access to any service, data, account or network by any means.
|
||||
4. PACKAGE MANAGER FEATURE. This software includes a package manager feature, which enables you to obtain other software packages from other sources. Those packages are offered and distributed in some cases by third parties or in some cases by Microsoft, but each such package is under its own license terms. Microsoft is not developing, distributing or licensing any of the third-party packages to you, but instead, as a convenience, is providing you with this package manager feature in order to access any packages for your own use. By using this package manager feature, you acknowledge and agree that you may be accessing and using the third-party packages as distributed by such third parties and under the separate license terms applicable to each package, including any terms applicable to software dependencies that may be included in the package. You acknowledge and agree that it is your responsibility to locate, understand and comply with all applicable license terms for each package and its dependencies, for example, by following the package source (feed) URL or by reviewing the packages for embedded notices or license terms. The package manager feature may have been pre-set to a feed that is hosted by Microsoft or a third party service provider, located at go.microsoft.com/fwlink/?LinkID=206669. The packages listed on this feed may include packages submitted by third parties. Microsoft makes no representations, warranties or guarantees as to the feed URL, any feeds from such URL, the information contained therein, or any packages referenced in or accessed by you through such feeds. Microsoft grants you no license rights for third-party software that is obtained using this feature or from the feed. You may change the feed URL that the package manager feature initially points to at any time at your discretion.
|
||||
|
||||
5. THIRD PARTY NOTICES. The package manager feature of the software includes third party code. However, such code is licensed to you by Microsoft under this license agreement, rather than licensed to you by any third party under some other license terms. Notices, if any, for the third party code are included with this software for your information only.
|
||||
|
||||
6. Scope of License. The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. You may not
|
||||
|
||||
<EFBFBD> work around any technical limitations in the software;
|
||||
|
||||
<EFBFBD> reverse engineer, decompile or disassemble the software, except and only to the extent that applicable law expressly permits, despite this limitation;
|
||||
|
||||
<EFBFBD> make more copies of the software than specified in this agreement or allowed by applicable law, despite this limitation;
|
||||
|
||||
<EFBFBD> publish the software for others to copy;
|
||||
|
||||
<EFBFBD> rent, lease or lend the software; or
|
||||
|
||||
<EFBFBD> transfer the software or this agreement to any third party.
|
||||
|
||||
7. BACKUP COPY. You may make one backup copy of the software. You may use it only to reinstall the software.
|
||||
|
||||
8. DOCUMENTATION. Any person that has valid access to your computer or internal network may copy and use the documentation for your internal, reference purposes.
|
||||
|
||||
9. Export Restrictions. The software is subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the software. These laws include restrictions on destinations, end users and end use. For additional information, see www.microsoft.com/exporting.
|
||||
|
||||
10. SUPPORT SERVICES. Because this software is <20>as is,<2C> we may not provide support services for it.
|
||||
|
||||
11. Entire Agreement. This agreement, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for the software and support services.
|
||||
|
||||
12. Applicable Law.
|
||||
|
||||
a. United States. If you acquired the software in the United States, Washington state law governs the interpretation of this agreement and applies to claims for breach of it, regardless of conflict of laws principles. The laws of the state where you live govern all other claims, including claims under state consumer protection laws, unfair competition laws, and in tort.
|
||||
|
||||
b. Outside the United States. If you acquired the software in any other country, the laws of that country apply.
|
||||
|
||||
13. Legal Effect. This agreement describes certain legal rights. You may have other rights under the laws of your country. You may also have rights with respect to the party from whom you acquired the software. This agreement does not change your rights under the laws of your country if the laws of your country do not permit it to do so.
|
||||
|
||||
14. DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED <20>AS-IS.<2E> YOU BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES OR CONDITIONS. YOU MAY HAVE ADDITIONAL CONSUMER RIGHTS UNDER YOUR LOCAL LAWS WHICH THIS AGREEMENT CANNOT CHANGE. TO THE EXTENT PERMITTED UNDER YOUR LOCAL LAWS, MICROSOFT EXCLUDES THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
|
||||
|
||||
15. LIMITATION ON AND EXCLUSION OF REMEDIES AND DAMAGES. YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.
|
||||
|
||||
This limitation applies to
|
||||
|
||||
<EFBFBD> anything related to the software, services, content (including code) on third party Internet sites, or third party programs; and
|
||||
|
||||
<EFBFBD> claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law.
|
||||
|
||||
It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages.
|
||||
|
||||
* * * * *
|
||||
|
||||
MICROSOFT SOFTWARE LICENSE TERMS
|
||||
|
||||
MICROSOFT PACKAGE MANAGER FOR .NET
|
||||
|
||||
These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. The terms also apply to any Microsoft
|
||||
|
||||
<EFBFBD> updates,
|
||||
|
||||
<EFBFBD> supplements,
|
||||
|
||||
<EFBFBD> Internet-based services, and
|
||||
|
||||
<EFBFBD> support services
|
||||
|
||||
for this software, unless other terms accompany those items. If so, those terms apply.
|
||||
|
||||
BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THEM, DO NOT USE THE SOFTWARE.
|
||||
|
||||
AS DESCRIBED BELOW, USING SOME FEATURES ALSO OPERATES AS YOUR CONSENT TO THE TRANSMISSION OF CERTAIN STANDARD COMPUTER INFORMATION FOR INTERNET-BASED SERVICES.
|
||||
|
||||
If you comply with these license terms, you have the rights below.
|
||||
|
||||
1. INSTALLATION AND USE RIGHTS. One user may install and use any number of copies of the software on your devices to design, develop and test your programs.
|
||||
2. ADDITIONAL LICENSING REQUIREMENTS AND/OR USE RIGHTS.
|
||||
a. Distributable Code. The software contains code that you are permitted to distribute in programs you develop if you comply with the terms below.
|
||||
|
||||
i. Right to Use and Distribute. The code and text files listed below are <20>Distributable Code.<2E>
|
||||
|
||||
<EFBFBD> NuGet.Core.dll. You may copy and distribute the object code form of NuGet.Core.dll.
|
||||
|
||||
<EFBFBD> Third Party Distribution. You may permit distributors of your programs to copy and distribute the Distributable Code as part of those programs.
|
||||
|
||||
ii. Distribution Requirements. For any Distributable Code you distribute, you must
|
||||
|
||||
<EFBFBD> add significant primary functionality to it in your programs;
|
||||
|
||||
<EFBFBD> require distributors and external end users to agree to terms that protect it at least as much as this agreement;
|
||||
|
||||
<EFBFBD> display your valid copyright notice on your programs; and
|
||||
|
||||
<EFBFBD> indemnify, defend, and hold harmless Microsoft from any claims, including attorneys<79> fees, related to the distribution or use of your programs.
|
||||
|
||||
iii. Distribution Restrictions. You may not
|
||||
|
||||
<EFBFBD> alter any copyright, trademark or patent notice in the Distributable Code;
|
||||
|
||||
<EFBFBD> use Microsoft<66>s trademarks in your programs<6D> names or in a way that suggests your programs come from or are endorsed by Microsoft;
|
||||
|
||||
<EFBFBD> distribute Distributable Code to run on a platform other than the Windows platform;
|
||||
|
||||
<EFBFBD> include Distributable Code in malicious, deceptive or unlawful programs; or
|
||||
|
||||
<EFBFBD> modify or distribute the source code of any Distributable Code so that any part of it becomes subject to an Excluded License. An Excluded License is one that requires, as a condition of use, modification or distribution, that
|
||||
|
||||
<EFBFBD> the code be disclosed or distributed in source code form; or
|
||||
|
||||
<EFBFBD> others have the right to modify it.
|
||||
|
||||
3. INTERNET-BASED SERVICES. Microsoft provides Internet-based services with the software. It may change or cancel them at any time.
|
||||
a. Consent for Internet-Based Services. The software feature described below connects to Microsoft or service provider computer systems over the Internet. In some cases, you will not receive a separate notice when they connect. You may elect to not use it. For more information about this feature, see the software documentation and the privacy statement available at go.microsoft.com/fwlink/?LinkID=205205. BY USING THIS FEATURE, YOU CONSENT TO THE TRANSMISSION OF THIS INFORMATION. Microsoft does not use the information to identify or contact you.
|
||||
i. Computer Information. The following feature uses Internet protocols, which send to the appropriate systems computer information, such as your Internet protocol address, the type of operating system, browser and name and version of the software you are using, and the language code of the device where you installed the software. Microsoft or a third-party service provider uses this information to make the Internet-based service available to you.
|
||||
A. Open Data Protocol (OData) Service. This software will access a list of packages that is supplied by means of an OData service online from Microsoft or a third-party service provider.
|
||||
ii. Installing Packages and their Dependencies. Please refer to the <20>Package Manager Feature<72> section below for a description of this feature.
|
||||
iii. Use of Information. We or a third-party service provider may use the computer information, to improve our or their software and services. We or they may also share it with others, such as hardware and software vendors. They may use the information to improve how their products run with Microsoft software.
|
||||
b. Misuse of Internet-based Services. You may not use this service in any way that could harm it or impair anyone else<73>s use of it. You may not use the service to try to gain unauthorized access to any service, data, account or network by any means.
|
||||
4. PACKAGE MANAGER FEATURE. This software includes a package manager feature, which enables you to obtain other software packages from other sources. Those packages are offered and distributed in some cases by third parties or in some cases by Microsoft, but each such package is under its own license terms. Microsoft is not developing, distributing or licensing any of the third-party packages to you, but instead, as a convenience, is providing you with this package manager feature in order to access any packages for your own use. By using this package manager feature, you acknowledge and agree that you may be accessing and using the third-party packages as distributed by such third parties and under the separate license terms applicable to each package, including any terms applicable to software dependencies that may be included in the package. You acknowledge and agree that it is your responsibility to locate, understand and comply with all applicable license terms for each package and its dependencies, for example, by following the package source (feed) URL or by reviewing the packages for embedded notices or license terms. The package manager feature may have been pre-set to a feed that is hosted by Microsoft or a third party service provider, located at go.microsoft.com/fwlink/?LinkID=206669. The packages listed on this feed may include packages submitted by third parties. Microsoft makes no representations, warranties or guarantees as to the feed URL, any feeds from such URL, the information contained therein, or any packages referenced in or accessed by you through such feeds. Microsoft grants you no license rights for third-party software that is obtained using this feature or from the feed. You may change the feed URL that the package manager feature initially points to at any time at your discretion.
|
||||
|
||||
5. THIRD PARTY NOTICES. The package manager feature of the software includes third party code. However, such code is licensed to you by Microsoft under this license agreement, rather than licensed to you by any third party under some other license terms. Notices, if any, for the third party code are included with this software for your information only.
|
||||
|
||||
6. Scope of License. The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. You may not
|
||||
|
||||
<EFBFBD> work around any technical limitations in the software;
|
||||
|
||||
<EFBFBD> reverse engineer, decompile or disassemble the software, except and only to the extent that applicable law expressly permits, despite this limitation;
|
||||
|
||||
<EFBFBD> make more copies of the software than specified in this agreement or allowed by applicable law, despite this limitation;
|
||||
|
||||
<EFBFBD> publish the software for others to copy;
|
||||
|
||||
<EFBFBD> rent, lease or lend the software; or
|
||||
|
||||
<EFBFBD> transfer the software or this agreement to any third party.
|
||||
|
||||
7. BACKUP COPY. You may make one backup copy of the software. You may use it only to reinstall the software.
|
||||
|
||||
8. DOCUMENTATION. Any person that has valid access to your computer or internal network may copy and use the documentation for your internal, reference purposes.
|
||||
|
||||
9. Export Restrictions. The software is subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the software. These laws include restrictions on destinations, end users and end use. For additional information, see www.microsoft.com/exporting.
|
||||
|
||||
10. SUPPORT SERVICES. Because this software is <20>as is,<2C> we may not provide support services for it.
|
||||
|
||||
11. Entire Agreement. This agreement, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for the software and support services.
|
||||
|
||||
12. Applicable Law.
|
||||
|
||||
a. United States. If you acquired the software in the United States, Washington state law governs the interpretation of this agreement and applies to claims for breach of it, regardless of conflict of laws principles. The laws of the state where you live govern all other claims, including claims under state consumer protection laws, unfair competition laws, and in tort.
|
||||
|
||||
b. Outside the United States. If you acquired the software in any other country, the laws of that country apply.
|
||||
|
||||
13. Legal Effect. This agreement describes certain legal rights. You may have other rights under the laws of your country. You may also have rights with respect to the party from whom you acquired the software. This agreement does not change your rights under the laws of your country if the laws of your country do not permit it to do so.
|
||||
|
||||
14. DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED <20>AS-IS.<2E> YOU BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES OR CONDITIONS. YOU MAY HAVE ADDITIONAL CONSUMER RIGHTS UNDER YOUR LOCAL LAWS WHICH THIS AGREEMENT CANNOT CHANGE. TO THE EXTENT PERMITTED UNDER YOUR LOCAL LAWS, MICROSOFT EXCLUDES THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
|
||||
|
||||
15. LIMITATION ON AND EXCLUSION OF REMEDIES AND DAMAGES. YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.
|
||||
|
||||
This limitation applies to
|
||||
|
||||
<EFBFBD> anything related to the software, services, content (including code) on third party Internet sites, or third party programs; and
|
||||
|
||||
<EFBFBD> claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law.
|
||||
|
||||
It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages.
|
||||
|
||||
* * * * *
|
||||
|
||||
|
||||
|
||||
MICROSOFT SOFTWARE LICENSE TERMS
|
||||
|
||||
MICROSOFT SOFTWARE UPDATE TO VISUAL STUDIO, KB2483190
|
||||
|
||||
____________________________________________________________________________________
|
||||
|
||||
PLEASE NOTE: Microsoft Corporation (or based on where you live, one of its affiliates) licenses this supplement to you. You may use it with each validly licensed copy of Microsoft Visual Studio 2010 or Microsoft Windows operating system software (for which this supplement is applicable) (the <20>software<72>). You may not use the supplement if you do not have a license for the software. The license terms for the software apply to your use of this supplement. Microsoft provides support services for the supplement as described at www.support.microsoft.com/common/international.aspx.
|
||||
|
||||
|
||||
@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2007 James Newton-King
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
163
web/documentserver-example/csharp-mvc/licenses/WebGrease.license
Normal file
@ -0,0 +1,163 @@
|
||||
|
||||
|
||||
MICROSOFT SOFTWARE LICENSE TERMS
|
||||
|
||||
MICROSOFT MSN WEBGREASE
|
||||
|
||||
These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. The terms also apply to any Microsoft
|
||||
|
||||
<EFBFBD> updates,
|
||||
|
||||
<EFBFBD> supplements,
|
||||
|
||||
<EFBFBD> Internet-based services, and
|
||||
|
||||
<EFBFBD> support services
|
||||
|
||||
for this software, unless other terms accompany those items. If so, those terms apply.
|
||||
|
||||
By using the software, you accept these terms. If you do not accept them, do not use the software.
|
||||
|
||||
If you comply with these license terms, you have the perpetual rights below.
|
||||
1. INSTALLATION AND USE RIGHTS.
|
||||
a. Installation and Use. One user may install and use any number of copies of the software on your devices.
|
||||
b. Third Party Notices. The software may include third party code. Microsoft, not the third party, licenses to you under the terms set forth in this agreement. Notices, if any, for any third party code are included for your information only.
|
||||
2. ADDITIONAL LICENSING REQUIREMENTS AND/OR USE RIGHTS.
|
||||
a. Distributable Code. The software contains code that you are permitted to distribute in programs you develop if you comply with the terms below.
|
||||
|
||||
i. Right to Use and Distribute. The code and text files listed below are <20>Distributable Code.<2E>
|
||||
|
||||
<EFBFBD> Redistributable Files. You may copy and distribute the object code form of the following files.
|
||||
|
||||
<EFBFBD> WebGrease.dll
|
||||
|
||||
<EFBFBD> WG.exe
|
||||
|
||||
<EFBFBD> Third Party Distribution. You may permit distributors of your programs to copy and distribute the Distributable Code as part of those programs.
|
||||
|
||||
ii. Distribution Requirements. For any Distributable Code you distribute, you must
|
||||
|
||||
<EFBFBD> add primary functionality to it in your programs;
|
||||
|
||||
<EFBFBD> for any Distributable Code having a filename extension of .lib, distribute only the results of running such Distributable Code through a linker with your program;
|
||||
|
||||
<EFBFBD> distribute Distributable Code included in a setup program only as part of that setup program without modification;
|
||||
|
||||
<EFBFBD> require distributors and external end users to agree to terms that protect it at least as much as this agreement;
|
||||
|
||||
<EFBFBD> display your valid copyright notice on your programs; and
|
||||
|
||||
<EFBFBD> indemnify, defend, and hold harmless Microsoft from any claims, including attorneys<79> fees, related to the distribution or use of your programs.
|
||||
|
||||
iii. Distribution Restrictions. You may not
|
||||
|
||||
<EFBFBD> alter any copyright, trademark or patent notice in the Distributable Code;
|
||||
|
||||
<EFBFBD> use Microsoft<66>s trademarks in your programs<6D> names or in a way that suggests your programs come from or are endorsed by Microsoft;
|
||||
|
||||
<EFBFBD> distribute Distributable Code to run on a platform other than the Windows platform;
|
||||
|
||||
<EFBFBD> include Distributable Code in malicious, deceptive or unlawful programs; or
|
||||
|
||||
<EFBFBD> modify or distribute the source code of any Distributable Code so that any part of it becomes subject to an Excluded License. An Excluded License is one that requires, as a condition of use, modification or distribution, that
|
||||
|
||||
<EFBFBD> the code be disclosed or distributed in source code form; or
|
||||
|
||||
<EFBFBD> others have the right to modify it.
|
||||
3. INTERNET-BASED SERVICES. Microsoft provides Internet-based services with the software. It may change or cancel them at any time. You may not use these services in any way that could harm them or impair anyone else<73>s use of them. You may not use the services to try to gain unauthorized access to any service, data, account or network by any means.
|
||||
4. SCOPE OF LICENSE. The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. You may not
|
||||
|
||||
<EFBFBD> work around any technical limitations in the software;
|
||||
|
||||
<EFBFBD> reverse engineer, decompile or disassemble the software, except and only to the extent that applicable law expressly permits, despite this limitation;
|
||||
|
||||
<EFBFBD> make more copies of the software than specified in this agreement or allowed by applicable law, despite this limitation;
|
||||
|
||||
<EFBFBD> publish the software for others to copy;
|
||||
|
||||
<EFBFBD> rent, lease or lend the software; or
|
||||
|
||||
<EFBFBD> transfer the software or this agreement to any third party.
|
||||
5. BACKUP COPY. You may make one backup copy of the software. You may use it only to reinstall the software.
|
||||
6. DOCUMENTATION. Any person that has valid access to your computer or internal network may copy and use the documentation for your internal, reference purposes.
|
||||
7. EXPORT RESTRICTIONS. The software is subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the software. These laws include restrictions on destinations, end users and end use. For additional information, see www.microsoft.com/exporting.
|
||||
8. SUPPORT SERVICES. Because this software is <20>as is,<2C> we may not provide support services for it.
|
||||
9. ENTIRE AGREEMENT. This agreement, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for the software and support services.
|
||||
10. APPLICABLE LAW.
|
||||
a. United States. If you acquired the software in the United States, Washington state law governs the interpretation of this agreement and applies to claims for breach of it, regardless of conflict of laws principles. The laws of the state where you live govern all other claims, including claims under state consumer protection laws, unfair competition laws, and in tort.
|
||||
b. Outside the United States. If you acquired the software in any other country, the laws of that country apply.
|
||||
11. LEGAL EFFECT. This agreement describes certain legal rights. You may have other rights under the laws of your country. You may also have rights with respect to the party from whom you acquired the software. This agreement does not change your rights under the laws of your country if the laws of your country do not permit it to do so.
|
||||
12. DISCLAIMER OF WARRANTY. The software is licensed <20>as-is.<2E> You bear the risk of using it. Microsoft gives no express warranties, guarantees or conditions. You may have additional consumer rights or statutory guarantees under your local laws which this agreement cannot change. To the extent permitted under your local laws, Microsoft excludes the implied warranties of merchantability, fitness for a particular purpose and non-infringement.
|
||||
|
||||
FOR AUSTRALIA <20> You have statutory guarantees under the Australian Consumer Law and nothing in these terms is intended to affect those rights.
|
||||
13. LIMITATION ON AND EXCLUSION OF REMEDIES AND DAMAGES. You can recover from Microsoft and its suppliers only direct damages up to U.S. $5.00. You cannot recover any other damages, including consequential, lost profits, special, indirect or incidental damages.
|
||||
|
||||
This limitation applies to
|
||||
|
||||
<EFBFBD> anything related to the software, services, content (including code) on third party Internet sites, or third party programs; and
|
||||
|
||||
<EFBFBD> claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law.
|
||||
|
||||
It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages.
|
||||
|
||||
Please note: As this software is distributed in Quebec, Canada, these license terms are provided below in French.
|
||||
|
||||
Remarque : Ce logiciel etant distribue au Quebec, Canada, les termes de cette licence sont fournis ci-dessous en francais.
|
||||
|
||||
TERMES DU CONTRAT DE LICENCE D<>UN LOGICIEL MICROSOFT
|
||||
|
||||
MICROSOFT MSN WEBGREASE
|
||||
|
||||
Les presents termes ont valeur de contrat entre Microsoft Corporation (ou en fonction du lieu ou vous vivez, l<>un de ses affilies) et vous. Lisez-les attentivement. Ils portent sur le logiciel nomme ci-dessus, y compris le support sur lequel vous l<>avez recu le cas echeant. Ce contrat porte egalement sur les produits Microsoft suivants :
|
||||
|
||||
<EFBFBD> les mises a jour,
|
||||
|
||||
<EFBFBD> les supplements,
|
||||
|
||||
<EFBFBD> les services Internet et
|
||||
|
||||
<EFBFBD> les services d<>assistance technique
|
||||
|
||||
de ce logiciel a moins que d<>autres termes n<>accompagnent ces produits, auquel cas, ces derniers prevalent.
|
||||
|
||||
En utilisant le logiciel, vous acceptez ces termes. Si vous ne les acceptez pas, n<>utilisez pas le logiciel.
|
||||
|
||||
Si vous respectez les presentes conditions de licence, vous disposez des droits suivants pour la duree des droits de propriete intellectuelle.
|
||||
1. INSTALLATION ET DROITS D<>UTILISATION.
|
||||
a. Installation et utilisation. Un utilisateur peut installer et utiliser un nombre quelconque de copies du logiciel sur vos dispositifs.
|
||||
b. Logiciels tiers. Le logiciel contient des programmes tiers. Les termes qui accompagnent ces programmes s'appliquent, sauf mention contraire dans lesdits termes.
|
||||
2. SERVICES INTERNET. Microsoft fournit des services Internet avec le logiciel. Ils peuvent etre modifies ou interrompus a tout moment.
|
||||
3. PORTEE DE LA LICENCE. Le logiciel est concede sous licence, pas vendu. Ce contrat vous octroie uniquement certains droits d<>utilisation du logiciel. Microsoft se reserve tous les autres droits. A moins que la loi en vigueur vous confere davantage de droits nonobstant cette limitation, vous pouvez utiliser le logiciel uniquement tel qu<71>explicitement autorise dans le present accord. A cette fin, vous devez respecter les restrictions techniques du logiciel qui autorisent uniquement son utilisation de certaines facons. Vous n<>etes pas autorise a :
|
||||
|
||||
<EFBFBD> contourner les limitations techniques du logiciel ;
|
||||
|
||||
<EFBFBD> reconstituer la logique du logiciel, le decompiler ou le desassembler, sauf dans la mesure ou ces operations seraient expressement autorisees par la reglementation applicable nonobstant la presente limitation ;
|
||||
|
||||
<EFBFBD> faire plus de copies du logiciel que specifie dans ce contrat ou par la reglementation applicable, nonobstant la presente limitation ;
|
||||
|
||||
<EFBFBD> publier le logiciel pour que d<>autres le copient ;
|
||||
|
||||
<EFBFBD> louer ou preter le logiciel ; ou
|
||||
|
||||
<EFBFBD> transferer le logiciel ou le present contrat a un tiers.
|
||||
4. COPIE DE SAUVEGARDE. Vous etes autorise a effectuer une copie de sauvegarde du logiciel. Vous ne pouvez l<>utiliser que dans le but de reinstaller le logiciel.
|
||||
5. DOCUMENTATION. Tout utilisateur disposant d<>un acces valide a votre ordinateur ou a votre reseau interne peut copier et utiliser la documentation a des fins de reference interne.
|
||||
6. RESTRICTIONS A L<>EXPORTATION. Le logiciel est soumis a la reglementation americaine relative a l<>exportation. Vous devez vous conformer a toutes les reglementations nationales et internationales relatives aux exportations concernant le logiciel. Ces reglementations comprennent les restrictions sur les destinations, les utilisateurs finaux et l<>utilisation finale. Pour plus d<>informations, consultez le site www.microsoft.com/exporting.
|
||||
7. SERVICES D<>ASSISTANCE TECHNIQUE. Comme ce logiciel est fourni <20> en l'etat <20>, nous ne fourniront aucun service d<>assistance.
|
||||
8. INTEGRALITE DES ACCORDS. Le present contrat ainsi que les termes concernant les supplements, les mises a jour, les services Internet et d<>assistance technique constituent l<>integralite des accords en ce qui concerne le logiciel et les services d<>assistance technique.
|
||||
9. DROIT APPLICABLE.
|
||||
a. Etats-Unis. Si vous avez acquis le logiciel aux Etats-Unis, les lois de l<>Etat de Washington, Etats-Unis d<>Amerique, regissent l<>interpretation de ce contrat et s<>appliquent en cas de reclamation pour violation dudit contrat, nonobstant les conflits de principes juridiques. La reglementation du pays dans lequel vous vivez regit toutes les autres reclamations, notamment, et sans limitation, les reclamations dans le cadre des lois en faveur de la protection des consommateurs, relatives a la concurrence et aux delits.
|
||||
b. En dehors des Etats-Unis. Si vous avez acquis le logiciel dans un autre pays, les lois de ce pays s<>appliquent.
|
||||
10. EFFET JURIDIQUE. Le present contrat decrit certains droits juridiques. Vous pourriez avoir d<>autres droits prevus par les lois de votre pays. Vous pourriez egalement avoir des droits a l<>egard de la partie de qui vous avez acquis le logiciel. Le present contrat ne modifie pas les droits que vous conferent les lois de votre ou pays si celles-ci ne le permettent pas.
|
||||
11. EXCLUSIONS DE GARANTIE. Le logiciel est concede sous licence <20> en l<>etat <20>. Vous assumez tous les risques lies a son utilisation. Microsoft n<>accorde aucune garantie ou condition expresse. Vous pouvez beneficier de droits des consommateurs supplementaires dans le cadre du droit local, que ce contrat ne peut modifier. Lorsque cela est autorise par le droit local, Microsoft exclut les garanties implicites de qualite, d<>adequation a un usage particulier et d<>absence de contrefacon.
|
||||
12. LIMITATION ET EXCLUSION DE RECOURS ET DE DOMMAGES. Vous pouvez obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de dommages directs limitee uniquement a hauteur de 5,00 $ US. Vous ne pouvez pretendre a aucune indemnisation pour les autres dommages, y compris les dommages speciaux, indirects ou accessoires et pertes de benefices.
|
||||
|
||||
Cette limitation concerne :
|
||||
|
||||
<EFBFBD> toute affaire liee au logiciel, aux services ou au contenu (y compris le code) figurant sur des sites Internet tiers ou dans des programmes tiers et
|
||||
|
||||
<EFBFBD> les reclamations au titre de violation de contrat ou de garantie, ou au titre de responsabilite stricte, de negligence ou d<>une autre faute dans la limite autorisee par la loi en vigueur.
|
||||
|
||||
Elle s<>applique egalement meme si Microsoft connaissait l'eventualite d'un tel dommage. La limitation ou exclusion ci-dessus peut egalement ne pas vous etre applicable, car votre pays n<>autorise pas l<>exclusion ou la limitation de responsabilite pour les dommages indirects, accessoires ou de quelque nature que ce soit.
|
||||
|
||||
|
||||
@ -0,0 +1,9 @@
|
||||
Copyright <20> 2007-2013 M. Alsup.
|
||||
|
||||
The BlockUI plugin is dual licensed under the MIT and GPL licenses.
|
||||
|
||||
You may use either license. The MIT license is recommended for most projects because it is simple and easy to understand and it places almost no restrictions on what you can do with the plugin.
|
||||
|
||||
If the GPL suits your project better you are also free to use the plugin under that license.
|
||||
|
||||
You do not have to do anything special to choose one license or the other and you don't have to notify anyone which license you are using. You are free to use the BlockUI plugin in commercial projects as long as the copyright header is left intact.
|
||||
@ -0,0 +1,20 @@
|
||||
MIT License
|
||||
|
||||
Copyright <20> 2010 Sebastian Tschan, https://blueimp.net
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@ -0,0 +1,43 @@
|
||||
Copyright jQuery Foundation and other contributors, https://jquery.org/
|
||||
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals. For exact contribution history, see the revision history
|
||||
available at https://github.com/jquery/jquery-ui
|
||||
|
||||
The following license applies to all parts of this software except as
|
||||
documented below:
|
||||
|
||||
====
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
====
|
||||
|
||||
Copyright and related rights for sample code are waived via CC0. Sample
|
||||
code is defined as all source code contained within the demos directory.
|
||||
|
||||
CC0: http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
====
|
||||
|
||||
All files located in the node_modules and external directories are
|
||||
externally maintained libraries used by this software which have their
|
||||
own licenses; we recommend you read them, as their terms may differ from
|
||||
the terms above.
|
||||
@ -0,0 +1,20 @@
|
||||
MIT License
|
||||
|
||||
Copyright <20> 2010 Sebastian Tschan, https://blueimp.net
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@ -0,0 +1,20 @@
|
||||
Copyright (c) 2009 John Resig, http://jquery.com/
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
17
web/documentserver-example/csharp-mvc/packages.config
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Antlr" version="3.5.0.2" targetFramework="net48" />
|
||||
<package id="EntityFramework" version="6.4.4" targetFramework="net48" />
|
||||
<package id="JWT" version="9.0.3" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNet.Mvc" version="5.2.7" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNet.Razor" version="3.2.7" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.7" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.7" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.7" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net48" />
|
||||
<package id="Microsoft.CSharp" version="4.7.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net48" />
|
||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
|
||||
<package id="WebGrease" version="1.6.0" targetFramework="net48" />
|
||||
</packages>
|
||||
BIN
web/documentserver-example/csharp-mvc/screenshots/add.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
web/documentserver-example/csharp-mvc/screenshots/browse.png
Normal file
|
After Width: | Height: | Size: 98 KiB |
BIN
web/documentserver-example/csharp-mvc/screenshots/platform.png
Normal file
|
After Width: | Height: | Size: 153 KiB |