diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md deleted file mode 100644 index b036b97e4..000000000 --- a/.github/CONTRIBUTING.md +++ /dev/null @@ -1,158 +0,0 @@ -# Contributing to October CMS - -Thank you for your interest in contributing to the October CMS project. We appreciate any assistance that community members and users of October CMS are willing to provide. You can contribute to the project in several different ways: - -- [Reporting a Security Vulnerability](#reporting-a-security-vulnerability) -- [Reporting an issue with October CMS](#reporting-an-issue-with-octobercms) - - [Reporting an issue with an October CMS plugin](#reporting-an-issue-with-an-octobercms-plugin) -- [Making a Feature Request](#making-a-feature-request) -- [Making a Pull Request](#making-a-pull-request) -- [Testing Pull Requests](#testing-a-pull-request) - -## Reporting a Security Vulnerability - -Please review [our security policy](https://github.com/octobercms/october/security/policy) on how to report security vulnerabilities. Please do not report security vulnerabilities on GitHub. - -## Reporting an issue with October CMS - ->**NOTE:** If your issue is related to an October CMS plugin, please see the [Reporting an issue with an October CMS plugin](#reporting-an-issue-with-an-octobercms-plugin) section below. - -We work hard to process bugs that are reported, to assist with this please ensure the following details are always included: - -- **Summary**: Make sure your summary reflects what the problem is and where it is. Provide as much detail as possible, the more information we have to work with the more likely it is that your problem can be solved. - -- **Installed build and plugins**: Please provide the build number of October CMS that is exhibiting the fault, and the version numbers of any installed and active plugins on your installation. You may retrieve this information by logging in to the Backend and navigating to *Settings* and then *Updates & Plugins*. - -- **Reproduce steps**: Clearly mention the steps to reproduce the bug. - -- **Expected behavior**: Describe how October CMS should behave on above mentioned steps. - -- **Actual behavior**: What is the actual result on running above steps i.e. the bug behavior - **include any error messages**. - -If possible, please provide any screenshots or GIFs of the issue occurring to provide us with additional context to determine the cause of the issue. - ->**NOTE**: If you're reporting an issue that you intend to fix yourself, you can skip the Issue step and just submit a Pull Request that fixes the issue (along with a detailed description of the original problem) instead. - -#### Here's how to report an issue on GitHub - -1. **Register for an account on [GitHub](https://github.com),** if you don't already have one. - -2. **Search for similar issues.** Perhaps someone has already reported your issue! If so, please add clarification and/or more information to the **existing** issue. - -3. **Create a new issue.** If you don't find any similar issues, you can report your issue via the ["issues" tab](https://github.com/octobercms/october/issues) once you've logged in. - -4. **Monitor your issue and respond to questions.** It may be necessary to provide additional information upon request or you might be asked if the issue still occurs after an update. - -5. **Close your issue.** In case you notice that the issue doesn't occur anymore, you can close the issue yourself (don't forget to add a note saying that the issue is resolved and ideally any additional information on how it was resolved). - -If you find out your bug is actually a duplicate of another bug and only notice that after you created it, please also close your bug with a short reference to the other issue that was there before. - -#### Reporting an issue with an October CMS plugin - ->Please don't use the main GitHub for reporting issues with plugins. - -If you have found a bug in a plugin, the best place to report it is with the [plugin author](https://octobercms.com/plugins). - -If you are unable to contact the plugin author and the issue prevents the plugin from being used correctly, please feel free to email `hello@octobercms.com`, mentioning the plugin name, URL and the issue found. We will then determine if the plugin needs to be delisted. - -#### Escalation process - -We do our best to attend to all reported issues. If you have an important issue that requires attention, consider submitting a bounty using the [October CMS Bounty Program](https://www.bountysource.com/teams/october). - -## Making a Feature Request - ->**NOTE:** Please don't use GitHub issues for suggesting a new feature. If you have a feature idea, the best place to suggest it is the [October CMS website forum](https://octobercms.com/forum/chan/feature-requests). - -Only use GitHub if you are planning on contributing a new feature and developing it. If you want to discuss your idea first, before "officially" posting it anywhere, you can always join us on [Discord](https://discord.gg/gEKgwSZ). - -#### GitHub feature requests - -Feature Requests submitted as GitHub Issues specifically mean *"I'd like to see this feature, I'm going to be working on some code to implement it."* It is more like a Pre-Pull Request, in which a developer signifies that he or she wants to see a feature implemented that they think would be really great, and they're committed to coding it. - -It's a great way to launch discussions on the developer side of things because both the core team and the community developer get a chance to talk about the technical side of the feature implementation. It's a great way to exchange ideas about how the logic could work in code. - -## Making a Pull Request - -Your contributions to the project are very welcome. If you would like to fix a bug or propose a new feature, you can submit a Pull Request. - -To help us merge your Pull Request, please make sure you follow these points: - -- Describe the problem clearly in the Pull Request description -- Please make your fix on the `develop` branch. This makes merging much easier. -- Do not edit compiled core asset files such as `october.css`, `storm.js`, `framework.css`, `framework.combined.js`, `framework-min.js`, etc. directly. Instead, edit the relevant source / non-minified / non-combined LESS / JS files. For third-party vendor files, you should update both the **.min** and **non-min** versions. Afterwards, run `php artisan october:util compile assets` from the project root to compile all the source asset files; and then commit the changes. For a list of options available for the `compile assets` command, see https://octobercms.com/docs/console/commands#october-util-command -- For any change that you make, **please also add a test case(s)** in the `tests/unit` directory. This helps us understand the issue and make sure that it will stay fixed forever. - -Thank you for your contributions! - -#### Best practices - -It is ideal to keep your development branch or fork synchronised with the core October CMS `develop` branch when submitting Pull Requests, as this minimises the possibility of merge conflicts. - -To keep in sync with October CMS, add the core OctoberCMS repository as a Git remote (ie. `upstream`) and pull changes from the OctoberCMS repository into your local `develop` branch as often as possible: - -``` -git remote add upstream git@github.com:octobercms/october.git -git fetch upstream -git checkout develop -git pull upstream develop -``` - -This ensures that your local `develop` branch matches October CMS. When developing a pull request, it is best to use your own development branch. For example, creating a fix to improve spelling on a language file could be made into a branch called `lang-en-spelling-fixes`, which can be branched off from the `develop` branch. - -``` -git checkout -b lang-en-spelling-fixes develop -``` - -When you wish to update your development branch with the latest changes from the `develop` branch, it is just a simple merge: - -``` -git merge develop -``` - -This will merge all the latest changes from the October CMS `develop` branch into your development branch. - -#### Resolving merge conflicts - -Occassionally, you may encounter a merge conflict with your Pull Request. This most commonly occurs if another change made to the October CMS repository was made to a file that your Pull Request has also changed. - -It is the responsibility of the author of the Pull Request to resolve any merge conflicts before their Pull Request is accepted. - -You should ensure that your local copy of October CMS is synchronised with the `develop` branch in the October CMS repository. Please follow the [steps above](#best-practices) to synchronise the repositories. - -If Git reports that your changes have conflicts, you will need to resolve the changes in a way that includes the changes from the OctoberCMS repository as well as implementing your Pull Request's changes. See GitHub's guide to [resolving a merge conflict](https://help.github.com/en/articles/resolving-a-merge-conflict-using-the-command-line) for tips on resolving conflicts. - -#### PSR Coding standards - -Please ensure that your Pull Request satisfies the following coding standards: - -- [PSR 2 Coding Style Guide](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) -- [PSR 1 Coding Style Guide](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md) -- [PSR 0 Coding Style Guide](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md) - -To validate your changes against our coding standards, you may run `./vendor/bin/phpcs -nq --extensions="php"` in your development folder. - -#### Team rules - -The October CMS team follows the [developer guidelines](https://octobercms.com/docs/help/developer-guide) as much as possible. - -## Testing a Pull Request - -Although we aim to test all pull requests made to the October CMS repository, the maintainers of October CMS are volunteers and may not be able to promptly attend to all pull requests. - -To help speed things up, any assistance with testing Pull Requests and fixes will be very appreciated. The best Pull Requests to test are those that are tagged as [**Testing Needed**](https://github.com/octobercms/october/pulls?q=is%3Apr+is%3Aopen+label%3A%22Testing+Needed%22) in the repository. - -To test a Pull Request, you can use the steps below in a terminal or command-line interface to create a fresh installation of October CMS with the changes made in the Pull Request, ready to test. In this example, we have a user called `qwerty123` that has created a pull request with an ID of `#4509`. - -1. Check out a copy of the October CMS repository to a folder that you can view in your web browser: `git clone git@github.com:octobercms/october.git`. This will add the files into a subfolder called `october`. - -2. Then, go to the `october` subfolder and check out **@qwerty123**'s changes in a branch in your local repository: `git fetch origin pull/4509/head:pr-4509`. This will pull their changes into a branch called `pr-4509`. You will then need to check out the branch: `git checkout pr-4509`. - -3. Next, get the Composer dependencies: `composer update`. - -4. Next run `git checkout pr-4509` again in case composer overwrote the changes. - -5. Next, run `php artisan october:env` to create a `.env` file in your folder. This will contain the configuration values for the database and site. - -6. Finally, once you've populated that file with your database and site details, run `php artisan october:up` to install the necessary database tables. - -At this point, you should have a working copy of the Pull Request ready to test. diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index a29ace930..000000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,4 +0,0 @@ -# These are supported funding model platforms -custom: ['https://octobercms.com/premium-support'] -open_collective: octobercms -github: LukeTowers diff --git a/.github/ISSUE_TEMPLATE/0_IMMEDIATE_SUPPORT.md b/.github/ISSUE_TEMPLATE/0_IMMEDIATE_SUPPORT.md index 96219a5f4..795741003 100644 --- a/.github/ISSUE_TEMPLATE/0_IMMEDIATE_SUPPORT.md +++ b/.github/ISSUE_TEMPLATE/0_IMMEDIATE_SUPPORT.md @@ -1,15 +1,13 @@ --- name: "🚨 Immediate Support" -about: 'I use October and it just broke! Help me!' +about: 'I use Winter and it just broke! Help me!' --- This repository is only for reporting reproducible bugs or problems. If you need support, please use the following options: -- Slack: https://octobercms.slack.com (Get an invite: https://octobercms-slack.herokuapp.com/) -- Live chat (IRC): https://octobercms.com/chat - **Note:** Not as active as Slack -- Forum: https://octobercms.com/forum -- Stack Overflow: https://stackoverflow.com/questions/tagged/octobercms +- Slack: https://discord.gg/D5MFSPH6Ux +- Stack Overflow: https://stackoverflow.com/questions/tagged/wintercms -If you rely on OctoberCMS for your business consider purchasing a paid support plan! Send an email to octobercms@luketowers.ca to get started. +If you rely on Winter CMS for your business consider purchasing a paid support plan! Send an email to wintercms@luketowers.ca to get started. Thanks! \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/1_BUG_REPORT.md b/.github/ISSUE_TEMPLATE/1_BUG_REPORT.md index 4b8883732..78370ce42 100644 --- a/.github/ISSUE_TEMPLATE/1_BUG_REPORT.md +++ b/.github/ISSUE_TEMPLATE/1_BUG_REPORT.md @@ -1,10 +1,10 @@ --- name: "🐛 Bug Report" -about: 'Report a general OctoberCMS issue. See our policy below if reporting a security issue.' +about: 'Report a general Winter CMS issue. See our policy below if reporting a security issue.' labels: 'Status: Review Needed, Type: Unconfirmed Bug' --- -- OctoberCMS Build: ### +- Winter CMS Build: ### - PHP Version: - Database Engine: - Plugins Installed: diff --git a/.github/ISSUE_TEMPLATE/2_MARKETPLACE_SUPPORT.md b/.github/ISSUE_TEMPLATE/2_MARKETPLACE_SUPPORT.md index a2e76acef..ef8cff905 100644 --- a/.github/ISSUE_TEMPLATE/2_MARKETPLACE_SUPPORT.md +++ b/.github/ISSUE_TEMPLATE/2_MARKETPLACE_SUPPORT.md @@ -1,6 +1,6 @@ --- name: "🛒 Marketplace Support" -about: 'For reporting any issues with the marketplace, send an email to hello@octobercms.com' +about: 'For reporting any issues with the marketplace, send an email to wintercms@luketowers.ca' --- All marketplace support issues will be addressed through email support. diff --git a/.github/ISSUE_TEMPLATE/3_GENERAL_SUPPORT.md b/.github/ISSUE_TEMPLATE/3_GENERAL_SUPPORT.md index a76dd57b1..b46117f98 100644 --- a/.github/ISSUE_TEMPLATE/3_GENERAL_SUPPORT.md +++ b/.github/ISSUE_TEMPLATE/3_GENERAL_SUPPORT.md @@ -1,12 +1,11 @@ --- name: "⚠️ General Support" -about: 'This repository is only for reporting bugs or problems. If you need help using OctoberCMS, see: https://octobercms.com/support' +about: 'This repository is only for reporting bugs or problems. If you need help using Winter CMS, see: https://wintercms.com/support' --- This repository is only for reporting bugs or problems. If you need support, please use the following options: -- Forum: https://octobercms.com/forum -- Slack: https://octobercms.slack.com (Get an invite: https://octobercms-slack.herokuapp.com/) -- Stack Overflow: https://stackoverflow.com/questions/tagged/octobercms +- Discord: https://discord.gg/D5MFSPH6Ux +- Stack Overflow: https://stackoverflow.com/questions/tagged/wintercms Thanks! \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/4_FEATURE_REQUEST.md b/.github/ISSUE_TEMPLATE/4_FEATURE_REQUEST.md index 2d1234dec..bf44de6e0 100644 --- a/.github/ISSUE_TEMPLATE/4_FEATURE_REQUEST.md +++ b/.github/ISSUE_TEMPLATE/4_FEATURE_REQUEST.md @@ -3,4 +3,4 @@ name: "💡 Feature Request" about: 'For ideas or feature requests, make a PR or talk to the core members on Slack' --- -If you would like to propose new features, please make a pull request. Alternatively, you may message the core team on the OctoberCMS Slack. \ No newline at end of file +If you would like to propose new features, please make a pull request. Alternatively, you may message the core team on the Winter CMS Slack. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/5_DOCUMENTATION.md b/.github/ISSUE_TEMPLATE/5_DOCUMENTATION.md index 850a288d5..63cb19231 100644 --- a/.github/ISSUE_TEMPLATE/5_DOCUMENTATION.md +++ b/.github/ISSUE_TEMPLATE/5_DOCUMENTATION.md @@ -1,9 +1,9 @@ --- name: "📚 Documentation Issue" -about: 'For documentation issues, see: https://github.com/octobercms/docs/issues' +about: 'For documentation issues, see: https://github.com/wintercms/docs/issues' --- -The OctoberCMS documentation has its own dedicated repository. Please open your documentation-related issue at https://github.com/octobercms/docs/issues. +The Winter CMS documentation has its own dedicated repository. Please open your documentation-related issue at https://github.com/wintercms/docs/issues. > **NOTE:** Since documentation issues are not reviewed very often, it's best to simply make a pull request to correct the issue you have found!** diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 9e3335ad9..000000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ - \ No newline at end of file diff --git a/.github/workflows/archive.yml b/.github/workflows/archive.yml index a42e0ca76..d1bf7729c 100644 --- a/.github/workflows/archive.yml +++ b/.github/workflows/archive.yml @@ -17,14 +17,14 @@ jobs: This issue will be closed and archived in 3 days, as there has been no activity in the last 60 days. If this issue is still relevant or you would like to see it actioned, please respond and we will re-open this issue. - - If this issue is critical to your business, consider joining the [Premium Support Program](https://octobercms.com/premium-support) where a Service Level Agreement is offered. + + If this issue is critical to your business, consider joining the [Premium Support Program](https://wintercms.com/premium-support) where a Service Level Agreement is offered. stale-pr-message: > This pull request will be closed and archived in 3 days, as there has been no activity in the last 60 days. If this is still being worked on, please respond and we will re-open this pull request. - - If this pull request is critical to your business, consider joining the [Premium Support Program](https://octobercms.com/premium-support) where a Service Level Agreement is offered. + + If this pull request is critical to your business, consider joining the [Premium Support Program](https://wintercms.com/premium-support) where a Service Level Agreement is offered. stale-issue-label: 'Status: Archived' stale-pr-label: 'Status: Archived' exempt-issue-label: 'Status: In Progress' diff --git a/.github/workflows/code-quality-pr.yaml b/.github/workflows/code-quality-pr.yaml index a63b5013b..d831730cb 100644 --- a/.github/workflows/code-quality-pr.yaml +++ b/.github/workflows/code-quality-pr.yaml @@ -8,14 +8,33 @@ jobs: runs-on: ubuntu-latest name: PHP steps: + - name: Cancel previous incomplete runs + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + - name: Checkout changes uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Install PHP and PHP Code Sniffer + + - name: Install PHP uses: shivammathur/setup-php@v2 with: - php-version: '7.3' - tools: phpcs + php-version: 7.2 + extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_sqlite, sqlite3, xml, zip + + - name: Install Composer dependencies + run: composer install --no-interaction --no-progress --no-suggest + + - name: Reset Winter modules and library + run: | + git reset --hard HEAD + rm -rf ./vendor/winter/storm + wget https://github.com/wintercms/storm/archive/develop.zip -O ./vendor/winter/develop.zip + unzip ./vendor/winter/develop.zip -d ./vendor/winter + mv ./vendor/winter/storm-develop ./vendor/winter/storm + composer dump-autoload + - name: Run code quality checks - run: ./.github/workflows/utilities/phpcs-pr ${{ github.base_ref }} + run: | + git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" && git fetch + ./vendor/bin/phpcs --colors -nq --report="full" --extensions="php" $(git diff --name-only --diff-filter=ACMR origin/${{ github.base_ref }} HEAD) \ No newline at end of file diff --git a/.github/workflows/code-quality-push.yaml b/.github/workflows/code-quality-push.yaml index 8c036b312..19412855c 100644 --- a/.github/workflows/code-quality-push.yaml +++ b/.github/workflows/code-quality-push.yaml @@ -3,23 +3,41 @@ name: Code Quality on: push: branches: - - 1.0 - - 1.1 - - develop + - '1.1' + - 'develop' jobs: codeQuality: runs-on: ubuntu-latest name: PHP steps: + - name: Cancel previous incomplete runs + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + - name: Checkout changes uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Install PHP and PHP Code Sniffer + + - name: Install PHP uses: shivammathur/setup-php@v2 with: - php-version: '7.3' - tools: phpcs + php-version: 7.2 + extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_sqlite, sqlite3, xml, zip + + - name: Install Composer dependencies + run: composer install --no-interaction --no-progress --no-suggest + + - name: Reset Winter modules and library + run: | + git reset --hard HEAD + rm -rf ./vendor/winter/storm + wget https://github.com/wintercms/storm/archive/develop.zip -O ./vendor/winter/develop.zip + unzip ./vendor/winter/develop.zip -d ./vendor/winter + mv ./vendor/winter/storm-develop ./vendor/winter/storm + composer dump-autoload + - name: Run code quality checks - run: ./.github/workflows/utilities/phpcs-push ${{ github.sha }} + run: | + git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" && git fetch + ./vendor/bin/phpcs --colors -nq --report="full" --extensions="php" $(git diff --name-only --diff-filter=ACMR origin/${{ github.base_ref }} HEAD) \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0ec65aff1..4e8e90ec8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -3,8 +3,8 @@ name: Tests on: push: branches: - - 1.0 - - 1.1 + - '1.0' + - '1.1' - develop pull_request: @@ -39,8 +39,13 @@ jobs: name: ${{ matrix.operatingSystem }} / PHP ${{ matrix.phpVersion }} env: extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_sqlite, sqlite3, xml, zip - key: october-cms-cache-v1 + key: winter-cms-cache-develop steps: + - name: Cancel previous incomplete runs + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + - name: Checkout changes uses: actions/checkout@v2 @@ -63,13 +68,8 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.phpVersion }} - tools: composer:v1 extensions: ${{ env.extensions }} - - name: Switch library dependency - if: github.ref == 'refs/heads/develop' || github.base_ref == 'develop' - run: php ./.github/workflows/utilities/library-switcher "dev-develop as 1.1" - - name: Setup dependency cache id: composercache run: echo "::set-output name=dir::$(composer config cache-files-dir)" @@ -82,24 +82,24 @@ jobs: restore-keys: ${{ runner.os }}-composer- - name: Install Composer dependencies - run: composer install --no-interaction --no-progress --no-suggest --no-scripts + run: composer install --no-interaction --no-progress --no-scripts --no-suggest - - name: Reset October modules - run: | - git reset --hard HEAD - composer dumpautoload - - - name: Run post-update Composer scripts - run: php artisan package:discover - - - name: Reset October modules + - name: Reset Winter modules and library run: | git reset --hard HEAD - composer dumpautoload + rm -rf ./vendor/winter/storm + wget https://github.com/wintercms/storm/archive/develop.zip -O ./vendor/winter/develop.zip + unzip ./vendor/winter/winter.zip -d ./vendor/winter + mv ./vendor/winter/storm-develop ./vendor/winter/storm + composer dump-autoload + - name: Run post-update Composer scripts + run: php artisan package:discover - name: Setup problem matchers for PHPUnit if: matrix.phpVersion == '7.4' run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - - name: Run tests - run: ./vendor/bin/phpunit --prepend ./vendor/october/rain/src/Support/helpers.php + - name: Run Linting and Tests + run: | + ./vendor/bin/parallel-lint --exclude vendor --exclude storage --exclude tests/fixtures/plugins/testvendor/goto/Plugin.php . + ./vendor/bin/phpunit \ No newline at end of file diff --git a/.github/workflows/utilities/library-switcher b/.github/workflows/utilities/library-switcher deleted file mode 100755 index 1e29eb7d5..000000000 --- a/.github/workflows/utilities/library-switcher +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env php - ($line[3] === 'warning'), - 'message' => $line[4], - 'line' => $line[1], - ]; - } - - // Render report - echo "\e[0;31mFound " - . ((count($lines) === 1) - ? '1 issue' - : count($lines) . ' issues') - . " with code quality.\e[0m"; - echo "\n"; - - foreach ($files as $file => $errors) { - echo "\n"; - echo "\e[1;37m" . str_replace('"', '', $file) . "\e[0m"; - echo "\n\n"; - - foreach ($errors as $error) { - echo "\e[2m" . str_pad(' L' . $error['line'], 7) . " | \e[0m"; - if ($error['warning'] === false) { - echo "\e[0;31mERR:\e[0m "; - } else { - echo "\e[1;33mWARN:\e[0m "; - } - echo $error['message']; - echo "\n"; - } - } - exit(1); -} diff --git a/.github/workflows/utilities/phpcs-push b/.github/workflows/utilities/phpcs-push deleted file mode 100755 index 08c9d7fb5..000000000 --- a/.github/workflows/utilities/phpcs-push +++ /dev/null @@ -1,77 +0,0 @@ -#!/usr/bin/env php - ($line[3] === 'warning'), - 'message' => $line[4], - 'line' => $line[1], - ]; - } - - // Render report - echo "\e[0;31mFound " - . ((count($lines) === 1) - ? '1 issue' - : count($lines) . ' issues') - . " with code quality.\e[0m"; - echo "\n"; - - foreach ($files as $file => $errors) { - echo "\n"; - echo "\e[1;37m" . str_replace('"', '', $file) . "\e[0m"; - echo "\n\n"; - - foreach ($errors as $error) { - echo "\e[2m" . str_pad(' L' . $error['line'], 7) . " | \e[0m"; - if ($error['warning'] === false) { - echo "\e[0;31mERR:\e[0m "; - } else { - echo "\e[1;33mWARN:\e[0m "; - } - echo $error['message']; - echo "\n"; - } - } - exit(1); -} diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c2a2c0cf..63319241d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1 +1 @@ -View the changelog on the [OctoberCMS website](https://octobercms.com/changelog) +View the changelog on the [meta repository](https://github.com/wintercms/meta/tree/master/release-notes) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index bacdb2061..000000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,5 +0,0 @@ -# Code of Conduct - -We promise to extend courtesy and respect to everyone opening an issue. We expect anyone using the bug trackers to do the same. - -All reported issues to this project are valuable. Please act with respect and avoid demeaning, condescending, racist, sexist and other inappropriate language and conduct. Please ensure comments stay professional and constructive. \ No newline at end of file diff --git a/LICENSE b/LICENSE index 5d1797ce7..7b47a3b13 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,7 @@ MIT License -Copyright (c) OctoberCMS +Copyright (c) 2013-2021.03.01 October CMS +Copyright (c) 2021 Winter CMS Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index b470bd45c..abfc8780d 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ php artisan october:install ## Learning October -The best place to learn October is by [reading the documentation](https://octobercms.com/docs), [watching some screencasts](https://octobercms.com/support/topic/screencast) or [following some tutorials](https://octobercms.com/support/articles/tutorials). +The best place to learn October is by [reading the documentation](https://wintercms.com/docs), [watching some screencasts](https://wintercms.com/support/topic/screencast) or [following some tutorials](https://wintercms.com/support/articles/tutorials). You may also watch these introductory videos for [beginners](https://vimeo.com/79963873) and [advanced users](https://vimeo.com/172202661). @@ -58,12 +58,12 @@ You can communicate with us using the following mediums: * [Follow us on Twitter](https://twitter.com/octobercms) for announcements and updates. * [Follow us on Facebook](https://facebook.com/octobercms) for announcements and updates. -* [Join the Official Forum](https://octobercms.com/forum) to engage with the community. -* [Join us on Discord](https://octobercms.com/chat) to chat with us. +* [Join the Official Forum](https://wintercms.com/forum) to engage with the community. +* [Join us on Discord](https://wintercms.com/chat) to chat with us. ### Premium Support -October CMS can provide premium support for a monthly fee. Find out more via the [Premium Support Program](https://octobercms.com/premium-support). +Winter CMS can provide premium support for a monthly fee. Find out more via the [Premium Support Program](https://wintercms.com/premium-support). ## Contributing @@ -79,12 +79,12 @@ Please follow the following guides and code standards: ### Code of Conduct -In order to ensure that the October CMS community is welcoming to all, please review and abide by the [Code of Conduct](CODE_OF_CONDUCT.md). +In order to ensure that the Winter CMS community is welcoming to all, please review and abide by the [Code of Conduct](https://github.com/wintercms/.github/CODE_OF_CONDUCT.md). ## License -The October CMS platform is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT). +The Winter CMS platform is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT). ## Security Vulnerabilities -Please review [our security policy](https://github.com/octobercms/october/security/policy) on how to report security vulnerabilities. +Please review [our security policy](https://github.com/wintercms/winter/security/policy) on how to report security vulnerabilities. diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index c49606fa5..000000000 --- a/SECURITY.md +++ /dev/null @@ -1,11 +0,0 @@ -# Security Policy - -**PLEASE DON'T DISCLOSE SECURITY-RELATED ISSUES PUBLICLY, [SEE BELOW](#reporting-a-vulnerability).** - -## Supported Versions - -October is evergreen, no one version is singled out for security fixes because there is no way to update just one version. Builds are continually released and security fixes will always be available in the latest build. - -## Reporting a Vulnerability - -If you discover a security vulnerability within OctoberCMS, please send an email to Luke Towers at octobercms@luketowers.ca and Samuel Georges at hello@octobercms.com. All security vulnerabilities will be promptly addressed. diff --git a/artisan b/artisan old mode 100644 new mode 100755 diff --git a/bootstrap/app.php b/bootstrap/app.php index cc0ec8d58..10e92d3cd 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -11,7 +11,7 @@ | */ -$app = new October\Rain\Foundation\Application( +$app = new Winter\Storm\Foundation\Application( realpath(__DIR__.'/../') ); @@ -28,17 +28,17 @@ $app = new October\Rain\Foundation\Application( $app->singleton( Illuminate\Contracts\Http\Kernel::class, - October\Rain\Foundation\Http\Kernel::class + Winter\Storm\Foundation\Http\Kernel::class ); $app->singleton( Illuminate\Contracts\Console\Kernel::class, - October\Rain\Foundation\Console\Kernel::class + Winter\Storm\Foundation\Console\Kernel::class ); $app->singleton( Illuminate\Contracts\Debug\ExceptionHandler::class, - October\Rain\Foundation\Exception\Handler::class + Winter\Storm\Foundation\Exception\Handler::class ); /* diff --git a/bootstrap/autoload.php b/bootstrap/autoload.php index 6533c54ca..0b57e5e2f 100644 --- a/bootstrap/autoload.php +++ b/bootstrap/autoload.php @@ -13,7 +13,7 @@ define('LARAVEL_START', microtime(true)); | */ -$helperPath = __DIR__.'/../vendor/october/rain/src/Support/helpers.php'; +$helperPath = __DIR__.'/../vendor/winter/storm/src/Support/helpers.php'; if (!file_exists($helperPath)) { echo 'Missing vendor files, try running "composer install" or use the Wizard installer.'.PHP_EOL; diff --git a/config/app.php b/config/app.php index d0178f422..02574e331 100644 --- a/config/app.php +++ b/config/app.php @@ -28,7 +28,7 @@ return [ | any other location as required by the application or its packages. */ - 'name' => 'October CMS', + 'name' => 'Winter CMS', /* |-------------------------------------------------------------------------- diff --git a/config/cache.php b/config/cache.php index 251771724..8c851ce5f 100644 --- a/config/cache.php +++ b/config/cache.php @@ -76,7 +76,7 @@ return [ | */ - 'prefix' => 'october', + 'prefix' => 'winter', /* |-------------------------------------------------------------------------- @@ -85,7 +85,7 @@ return [ | | This option controls the cache key used by the CMS when storing generated | PHP from the theme PHP sections. Recommended to change this when multiple - | servers running OctoberCMS are connected to the same cache server to + | servers running Winter CMS are connected to the same cache server to | prevent conflicts. | */ diff --git a/config/cms.php b/config/cms.php index 60ab5e494..4da7fd4a7 100644 --- a/config/cms.php +++ b/config/cms.php @@ -18,7 +18,7 @@ return [ | Bleeding edge updates |-------------------------------------------------------------------------- | - | If you are developing with October, it is important to have the latest + | If you are developing with Winter, it is important to have the latest | code base. Set this value to 'true' to tell the platform to download | and use the development copies of core files and plugins. | @@ -300,14 +300,14 @@ return [ | temporaryUrlTTL to a value in seconds to define a validity period. This | is only used for the 'uploads' config when using a supported cloud disk | - | NOTE: If you have installed October in a subfolder, are using local + | NOTE: If you have installed Winter in a subfolder, are using local | storage and are not using a linkPolicy of 'force' you should include | the path to the subfolder in the `path` option for these storage | configurations. | - | Example: October is installed under https://localhost/projects/october. - | You should then specify `/projects/october/storage/app/uploads` as the - | path for the uploads disk and `/projects/october/storage/app/media` as + | Example: Winter is installed under https://localhost/projects/winter. + | You should then specify `/projects/winter/storage/app/uploads` as the + | path for the uploads disk and `/projects/winter/storage/app/media` as | the path for the media disk. */ @@ -339,7 +339,7 @@ return [ | Convert Line Endings |-------------------------------------------------------------------------- | - | Determines if October should convert line endings from the windows style + | Determines if Winter should convert line endings from the windows style | \r\n to the unix style \n. | */ diff --git a/config/cookie.php b/config/cookie.php index 9b624ae71..f286fe5a6 100644 --- a/config/cookie.php +++ b/config/cookie.php @@ -7,7 +7,7 @@ return [ | Cookies that should not be encrypted |-------------------------------------------------------------------------- | - | OctoberCMS encrypts/decrypts cookies by default. You can specify cookies + | Winter CMS encrypts/decrypts cookies by default. You can specify cookies | that should not be encrypted or decrypted here. This is useful, for | example, when you want to pass data from frontend to server side backend | via cookies, and vice versa. diff --git a/config/database.php b/config/database.php index a06bc7586..025084c41 100644 --- a/config/database.php +++ b/config/database.php @@ -133,10 +133,10 @@ return [ | Use DB configuration for testing |-------------------------------------------------------------------------- | - | When running plugin tests OctoberCMS by default uses SQLite in memory. + | When running plugin tests Winter CMS by default uses SQLite in memory. | You can override this behavior by setting `useConfigForTesting` to true. | - | After that OctoberCMS will take DB parameters from the config. + | After that Winter CMS will take DB parameters from the config. | If file `/config/testing/database.php` exists, config will be read from it, | but remember that when not specified it will use parameters specified in | `/config/database.php`. diff --git a/config/develop.php b/config/develop.php index 2c1cbc642..377744a5a 100644 --- a/config/develop.php +++ b/config/develop.php @@ -8,7 +8,7 @@ return [ |-------------------------------------------------------------------------- | | Enabling this will load all individual backend asset files, instead of - | loading the compiled asset files generated by `october:util compile + | loading the compiled asset files generated by `winter:util compile | assets`. This is useful only for development purposes, and should not be | enabled in production. Please note that enabling this will make the | Backend load a LOT of individual asset files. diff --git a/config/mail.php b/config/mail.php index 4c471d568..d61395884 100644 --- a/config/mail.php +++ b/config/mail.php @@ -55,7 +55,7 @@ return [ | */ - 'from' => ['address' => 'noreply@domain.tld', 'name' => 'OctoberCMS'], + 'from' => ['address' => 'noreply@example.com', 'name' => 'Winter CMS'], /* |-------------------------------------------------------------------------- diff --git a/config/session.php b/config/session.php index 8e2f8fa57..bb3f8b5a4 100644 --- a/config/session.php +++ b/config/session.php @@ -109,7 +109,7 @@ return [ | */ - 'cookie' => 'october_session', + 'cookie' => 'winter_session', /* |-------------------------------------------------------------------------- @@ -147,7 +147,7 @@ return [ | the HTTP protocol. You are free to modify this option if needed. | */ - + 'http_only' => true, /* diff --git a/config/testing/cms.php b/config/testing/cms.php index 8267ac3e4..18e483f9c 100644 --- a/config/testing/cms.php +++ b/config/testing/cms.php @@ -80,7 +80,7 @@ return [ | Convert Line Endings |-------------------------------------------------------------------------- | - | Determines if October should convert line endings from the windows style + | Determines if Winter should convert line endings from the windows style | \r\n to the unix style \n. | */ diff --git a/index.php b/index.php index 9c4d23a06..3ce7b10e1 100644 --- a/index.php +++ b/index.php @@ -1,8 +1,8 @@ registerBundle('~/modules/backend/assets/less/october.less'); - $combiner->registerBundle('~/modules/backend/assets/js/october.js'); + $combiner->registerBundle('~/modules/backend/assets/less/winter.less'); + $combiner->registerBundle('~/modules/backend/assets/js/winter.js'); $combiner->registerBundle('~/modules/backend/widgets/table/assets/js/build.js'); $combiner->registerBundle('~/modules/backend/widgets/mediamanager/assets/js/mediamanager-browser.js'); $combiner->registerBundle('~/modules/backend/widgets/mediamanager/assets/less/mediamanager.less'); @@ -98,7 +98,7 @@ class ServiceProvider extends ModuleServiceProvider protected function registerBackendNavigation() { BackendMenu::registerCallback(function ($manager) { - $manager->registerMenuItems('October.Backend', [ + $manager->registerMenuItems('Winter.Backend', [ 'dashboard' => [ 'label' => 'backend::lang.dashboard.menu_label', 'icon' => 'icon-dashboard', @@ -116,6 +116,7 @@ class ServiceProvider extends ModuleServiceProvider 'order' => 200 ] ]); + $manager->registerOwnerAlias('Winter.Backend', 'October.Backend'); }); } @@ -138,7 +139,7 @@ class ServiceProvider extends ModuleServiceProvider protected function registerBackendPermissions() { BackendAuth::registerCallback(function ($manager) { - $manager->registerPermissions('October.Backend', [ + $manager->registerPermissions('Winter.Backend', [ 'backend.access_dashboard' => [ 'label' => 'system::lang.permissions.view_the_dashboard', 'tab' => 'system::lang.permissions.name', @@ -186,6 +187,7 @@ class ServiceProvider extends ModuleServiceProvider 'roles' => UserRole::CODE_DEVELOPER, ], ]); + $manager->registerPermissionOwnerAlias('Winter.Backend', 'October.Backend'); }); } @@ -219,7 +221,7 @@ class ServiceProvider extends ModuleServiceProvider protected function registerBackendSettings() { SettingsManager::instance()->registerCallback(function ($manager) { - $manager->registerSettingItems('October.Backend', [ + $manager->registerSettingItems('Winter.Backend', [ 'branding' => [ 'label' => 'backend::lang.branding.menu_label', 'description' => 'backend::lang.branding.menu_description', @@ -270,6 +272,7 @@ class ServiceProvider extends ModuleServiceProvider 'order' => 920 ] ]); + $manager->registerOwnerAlias('Winter.Backend', 'October.Backend'); }); } } diff --git a/modules/backend/assets/css/october.css b/modules/backend/assets/css/winter.css similarity index 98% rename from modules/backend/assets/css/october.css rename to modules/backend/assets/css/winter.css index 5703da3d0..7f0622b6c 100644 --- a/modules/backend/assets/css/october.css +++ b/modules/backend/assets/css/winter.css @@ -246,13 +246,21 @@ html.mobile .control-scrollbar {overflow:auto;-webkit-overflow-scrolling:touch} .control-scrollpanel .control-scrollbar.vertical >.scrollbar-scrollbar {right:0} .tooltip .tooltip-inner {text-align:left;padding:5px 8px} .tooltip.in {opacity:1;filter:alpha(opacity=100)} -.oc-logo-white {background-image:url(../images/october-logo-white.svg);background-position:50% 50%;background-repeat:no-repeat;background-size:contain} -.oc-logo {background-image:url(../images/october-logo.svg);background-position:50% 50%;background-repeat:no-repeat;background-size:contain} +.wn-logo-white, +.oc-logo-white {background-image:url(../images/winter-logo-white.svg);background-position:50% 50%;background-repeat:no-repeat;background-size:contain} +.wn-logo, +.oc-logo {background-image:url(../images/winter-logo.svg);background-position:50% 50%;background-repeat:no-repeat;background-size:contain} +.layout.control-tabs.wn-logo-transparent:not(.has-tabs), .layout.control-tabs.oc-logo-transparent:not(.has-tabs), +.flex-layout-column.wn-logo-transparent:not(.has-tabs), .flex-layout-column.oc-logo-transparent:not(.has-tabs), -.layout-cell.oc-logo-transparent {background-size:50% auto;background-repeat:no-repeat;background-image:url(../images/october-logo.svg);background-position:50% 50%;position:relative} +.layout-cell.wn-logo-transparent, +.layout-cell.oc-logo-transparent {background-size:50% auto;background-repeat:no-repeat;background-image:url(../images/winter-logo.svg);background-position:50% 50%;position:relative} +.layout.control-tabs.wn-logo-transparent:not(.has-tabs):after, .layout.control-tabs.oc-logo-transparent:not(.has-tabs):after, +.flex-layout-column.wn-logo-transparent:not(.has-tabs):after, .flex-layout-column.oc-logo-transparent:not(.has-tabs):after, +.layout-cell.wn-logo-transparent:after, .layout-cell.oc-logo-transparent:after {content:'';display:table-cell;position:absolute;left:0;top:0;height:100%;width:100%;background:rgba(249,249,249,0.7)} .report-widget {padding:15px;background:white;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;font-size:13px} .report-widget h3 {font-size:14px;color:#7e8c8d;text-transform:uppercase;font-weight:600;margin-top:0;margin-bottom:30px} @@ -679,10 +687,9 @@ nav#layout-mainmenu .toolbar-item:before {left:-12px} nav#layout-mainmenu .toolbar-item:after {right:-12px} nav#layout-mainmenu .toolbar-item.scroll-active-before:before {color:#fff} nav#layout-mainmenu .toolbar-item.scroll-active-after:after {color:#fff} -nav#layout-mainmenu ul.mainmenu-toolbar li.mainmenu-quick-action {margin:0} -nav#layout-mainmenu ul.mainmenu-toolbar li.mainmenu-quick-action:first-child {margin-left:21px} -nav#layout-mainmenu ul.mainmenu-toolbar li.mainmenu-quick-action i {font-size:20px} -nav#layout-mainmenu ul.mainmenu-toolbar li.mainmenu-quick-action a {position:relative;padding:0 10px;top:-1px} +nav#layout-mainmenu ul.mainmenu-toolbar li.mainmenu-preview {margin:0 0 0 21px} +nav#layout-mainmenu ul.mainmenu-toolbar li.mainmenu-preview i {font-size:20px} +nav#layout-mainmenu ul.mainmenu-toolbar li.mainmenu-preview a {position:relative;padding:0 10px;top:-1px} nav#layout-mainmenu ul.mainmenu-toolbar li.mainmenu-account {margin-right:0} nav#layout-mainmenu ul.mainmenu-toolbar li.mainmenu-account >a {padding:0 15px 0 10px;font-size:13px;position:relative} nav#layout-mainmenu ul.mainmenu-toolbar li.mainmenu-account.highlight >a {z-index:600} @@ -707,8 +714,8 @@ nav#layout-mainmenu ul li .mainmenu-accountmenu li:first-child a:active:after {c nav#layout-mainmenu ul li .mainmenu-accountmenu li.divider {height:1px;width:100%;background-color:#e0e0e0} nav#layout-mainmenu.navbar-mode-inline, nav#layout-mainmenu.navbar-mode-inline_no_icons {height:60px} -nav#layout-mainmenu.navbar-mode-inline ul.mainmenu-toolbar li.mainmenu-quick-action a, -nav#layout-mainmenu.navbar-mode-inline_no_icons ul.mainmenu-toolbar li.mainmenu-quick-action a {height:60px;line-height:60px} +nav#layout-mainmenu.navbar-mode-inline ul.mainmenu-toolbar li.mainmenu-preview a, +nav#layout-mainmenu.navbar-mode-inline_no_icons ul.mainmenu-toolbar li.mainmenu-preview a {height:60px;line-height:60px} nav#layout-mainmenu.navbar-mode-inline ul.mainmenu-toolbar li.mainmenu-account >a, nav#layout-mainmenu.navbar-mode-inline_no_icons ul.mainmenu-toolbar li.mainmenu-account >a {height:60px;line-height:60px} nav#layout-mainmenu.navbar-mode-inline ul li .mainmenu-accountmenu, @@ -731,7 +738,7 @@ nav#layout-mainmenu.navbar-mode-inline ul.mainmenu-nav li:last-child, nav#layout-mainmenu.navbar-mode-inline_no_icons ul.mainmenu-nav li:last-child {margin-right:0} nav#layout-mainmenu.navbar-mode-inline_no_icons .nav-icon {display:none !important} nav#layout-mainmenu.navbar-mode-tile {height:78px} -nav#layout-mainmenu.navbar-mode-tile ul.mainmenu-toolbar li.mainmenu-quick-action a {height:78px;line-height:78px} +nav#layout-mainmenu.navbar-mode-tile ul.mainmenu-toolbar li.mainmenu-preview a {height:78px;line-height:78px} nav#layout-mainmenu.navbar-mode-tile ul.mainmenu-toolbar li.mainmenu-account >a {height:78px;line-height:78px} nav#layout-mainmenu.navbar-mode-tile ul li .mainmenu-accountmenu {top:88px} nav#layout-mainmenu.navbar-mode-tile ul.mainmenu-nav li a {position:relative;width:65px;height:65px} @@ -750,14 +757,14 @@ nav#layout-mainmenu .menu-toggle .menu-toggle-title {margin-left:10px} nav#layout-mainmenu .menu-toggle:hover .menu-toggle-icon {opacity:1} body.mainmenu-open nav#layout-mainmenu .menu-toggle-icon {opacity:1} nav#layout-mainmenu.navbar-mode-collapse {padding-left:0;height:45px} -nav#layout-mainmenu.navbar-mode-collapse ul.mainmenu-toolbar li.mainmenu-quick-action a {height:45px;line-height:45px} +nav#layout-mainmenu.navbar-mode-collapse ul.mainmenu-toolbar li.mainmenu-preview a {height:45px;line-height:45px} nav#layout-mainmenu.navbar-mode-collapse ul.mainmenu-toolbar li.mainmenu-account >a {height:45px;line-height:45px} nav#layout-mainmenu.navbar-mode-collapse ul li .mainmenu-accountmenu {top:55px} nav#layout-mainmenu.navbar-mode-collapse ul.mainmenu-toolbar li.mainmenu-account >a {padding-right:0} nav#layout-mainmenu.navbar-mode-collapse ul li .mainmenu-accountmenu:after {right:13px} nav#layout-mainmenu.navbar-mode-collapse ul.nav {display:none} nav#layout-mainmenu.navbar-mode-collapse .menu-toggle {display:inline-block;color:#fff !important} -@media (max-width:769px) {nav#layout-mainmenu.navbar {padding-left:0;height:45px }nav#layout-mainmenu.navbar ul.mainmenu-toolbar li.mainmenu-quick-action a {height:45px;line-height:45px }nav#layout-mainmenu.navbar ul.mainmenu-toolbar li.mainmenu-account >a {height:45px;line-height:45px }nav#layout-mainmenu.navbar ul li .mainmenu-accountmenu {top:55px }nav#layout-mainmenu.navbar ul.mainmenu-toolbar li.mainmenu-account >a {padding-right:0 }nav#layout-mainmenu.navbar ul li .mainmenu-accountmenu:after {right:13px }nav#layout-mainmenu.navbar ul.nav {display:none }nav#layout-mainmenu.navbar .menu-toggle {display:inline-block;color:#fff !important }} +@media (max-width:769px) {nav#layout-mainmenu.navbar {padding-left:0;height:45px }nav#layout-mainmenu.navbar ul.mainmenu-toolbar li.mainmenu-preview a {height:45px;line-height:45px }nav#layout-mainmenu.navbar ul.mainmenu-toolbar li.mainmenu-account >a {height:45px;line-height:45px }nav#layout-mainmenu.navbar ul li .mainmenu-accountmenu {top:55px }nav#layout-mainmenu.navbar ul.mainmenu-toolbar li.mainmenu-account >a {padding-right:0 }nav#layout-mainmenu.navbar ul li .mainmenu-accountmenu:after {right:13px }nav#layout-mainmenu.navbar ul.nav {display:none }nav#layout-mainmenu.navbar .menu-toggle {display:inline-block;color:#fff !important }} .mainmenu-collapsed {position:absolute;height:100%;top:0;left:0;margin:0;background:#000} .mainmenu-collapsed >div {display:block;height:100%} .mainmenu-collapsed >div ul.mainmenu-nav li a {position:relative;width:65px;height:65px} @@ -850,6 +857,7 @@ body.outer {background:#2b3e50} body.outer .layout >.layout-row.layout-head {text-align:center;background:#f9f9f9} body.outer .layout >.layout-row.layout-head >.layout-cell {height:40%;padding:50px 0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;vertical-align:middle;position:relative} body.outer .layout >.layout-row.layout-head >.layout-cell:after {content:'';display:block;width:0;height:0;border-left:28px solid transparent;border-right:28px solid transparent;border-top:20px solid #f9f9f9;border-bottom-width:0;position:absolute;bottom:-20px;left:50%;margin-left:-28px} +body.outer .layout >.layout-row.layout-head >.layout-cell h1.wn-logo, body.outer .layout >.layout-row.layout-head >.layout-cell h1.oc-logo {font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0;display:inline-block;width:100%;max-width:450px;height:170px;min-height:72px} body.outer .layout >.layout-row >.layout-cell {vertical-align:top} body.outer .layout >.layout-row >.layout-cell .outer-form-container {margin:0 auto;width:436px;padding:40px 0} @@ -1095,9 +1103,12 @@ body.breadcrumb-fancy .control-breadcrumb li:last-child:before, .fancy-layout .form-buttons .btn {padding:0;margin-right:5px;margin-top:-6px;margin-right:30px;background:transparent;color:#fff;font-weight:normal;-webkit-box-shadow:none;box-shadow:none;opacity:0.5;filter:alpha(opacity=50);-webkit-transition:all 0.3s ease;transition:all 0.3s ease} .fancy-layout .form-buttons .btn:hover {opacity:1;filter:alpha(opacity=100)} .fancy-layout .form-buttons .btn:last-child {margin-right:0} +.fancy-layout .form-buttons .btn[class^="wn-icon-"]:before, +.fancy-layout .form-buttons .btn[class*=" wn-icon-"]:before, .fancy-layout .form-buttons .btn[class^="oc-icon-"]:before, .fancy-layout .form-buttons .btn[class*=" oc-icon-"]:before {opacity:1} -.fancy-layout form.oc-data-changed .btn.save {opacity:1;filter:alpha(opacity=100)} +.fancy-layout form.oc-data-changed .btn.save, +.fancy-layout form.wn-data-changed .btn.save {opacity:1;filter:alpha(opacity=100)} .fancy-layout .field-codeeditor {border:none !important;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0} .fancy-layout .field-codeeditor .editor-code {-webkit-border-radius:0;-moz-border-radius:0;border-radius:0} .fancy-layout .field-richeditor {border:none;border-left:1px solid #d1d6d9 !important} diff --git a/modules/backend/assets/images/favicon.png b/modules/backend/assets/images/favicon.png index 6af9b71b9..2a14a9fec 100644 Binary files a/modules/backend/assets/images/favicon.png and b/modules/backend/assets/images/favicon.png differ diff --git a/modules/backend/assets/images/logo.svg b/modules/backend/assets/images/logo.svg new file mode 100644 index 000000000..9d202b97c --- /dev/null +++ b/modules/backend/assets/images/logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/modules/backend/assets/images/october-leaf.svg b/modules/backend/assets/images/october-leaf.svg deleted file mode 100644 index 6f4cfdbc3..000000000 --- a/modules/backend/assets/images/october-leaf.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - october-leaf - Created with Sketch. - - - - - - - \ No newline at end of file diff --git a/modules/backend/assets/images/october-logo-text.png b/modules/backend/assets/images/october-logo-text.png deleted file mode 100644 index 365dfb439..000000000 Binary files a/modules/backend/assets/images/october-logo-text.png and /dev/null differ diff --git a/modules/backend/assets/images/october-logo-transparent.svg b/modules/backend/assets/images/october-logo-transparent.svg deleted file mode 100644 index fd79425d0..000000000 --- a/modules/backend/assets/images/october-logo-transparent.svg +++ /dev/null @@ -1,75 +0,0 @@ - - - -]> - - - - - - - - - - - diff --git a/modules/backend/assets/images/october-logo-white.svg b/modules/backend/assets/images/october-logo-white.svg deleted file mode 100644 index 122438598..000000000 --- a/modules/backend/assets/images/october-logo-white.svg +++ /dev/null @@ -1,75 +0,0 @@ - - - -]> - - - - - - - - - - - diff --git a/modules/backend/assets/images/october-logo.svg b/modules/backend/assets/images/october-logo.svg deleted file mode 100644 index b4121e44f..000000000 --- a/modules/backend/assets/images/october-logo.svg +++ /dev/null @@ -1,75 +0,0 @@ - - - -]> - - - - - - - - - - - diff --git a/modules/backend/assets/images/winter-logo-white.svg b/modules/backend/assets/images/winter-logo-white.svg new file mode 100644 index 000000000..e072730fe --- /dev/null +++ b/modules/backend/assets/images/winter-logo-white.svg @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/backend/assets/images/winter-logo.svg b/modules/backend/assets/images/winter-logo.svg new file mode 100644 index 000000000..18c85e7db --- /dev/null +++ b/modules/backend/assets/images/winter-logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/modules/backend/assets/images/wordmark.png b/modules/backend/assets/images/wordmark.png new file mode 100644 index 000000000..3b2280df6 Binary files /dev/null and b/modules/backend/assets/images/wordmark.png differ diff --git a/modules/backend/assets/js/backend.js b/modules/backend/assets/js/backend.js index d21803df7..a9d1c941d 100644 --- a/modules/backend/assets/js/backend.js +++ b/modules/backend/assets/js/backend.js @@ -1,5 +1,5 @@ /* - * October General Utilities + * Winter General Utilities */ /* @@ -19,10 +19,12 @@ $.ajaxPrefilter(function(options) { * Path helpers */ +if ($.wn === undefined) + $.wn = {} if ($.oc === undefined) - $.oc = {} + $.oc = $.wn -$.oc.backendUrl = function(url) { +$.wn.backendUrl = function(url) { var backendBasePath = $('meta[name="backend-base-path"]').attr('content') if (!backendBasePath) @@ -164,10 +166,12 @@ assetManager = new AssetManager(); /* * String escape */ +if ($.wn === undefined) + $.wn = {} if ($.oc === undefined) - $.oc = {} + $.oc = $.wn -$.oc.escapeHtmlString = function(string) { +$.wn.escapeHtmlString = function(string) { var htmlEscapes = { '&': '&', '<': '<', @@ -186,7 +190,7 @@ $.oc.escapeHtmlString = function(string) { /* * Inverse Click Event (not used) * - * Calls the handler function if the user has clicked outside the object + * Calls the handler function if the user has clicked outside the object * and not on any of the elements in the exception list. */ /* diff --git a/modules/backend/assets/js/october.js b/modules/backend/assets/js/october.js deleted file mode 100644 index 17fd9d38d..000000000 --- a/modules/backend/assets/js/october.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * This is a bundle file, you can compile this in two ways: - * (1) Using your favorite JS combiner - * (2) Using CLI command: - * php artisan october:util compile assets - * - * @see october-min.js - * - -=require vendor/jquery.touchwipe.js -=require vendor/jquery.autoellipsis.js -=require vendor/jquery.waterfall.js -=require vendor/jquery.cookie.js -=require ../vendor/dropzone/dropzone.js -=require ../vendor/sweet-alert/sweet-alert.js -=require ../vendor/jcrop/js/jquery.Jcrop.js -=require ../../../system/assets/vendor/prettify/prettify.js -=require ../../widgets/mediamanager/assets/js/mediamanager-global.js - -=require october.lang.js -=require october.alert.js -=require october.scrollpad.js -=require october.verticalmenu.js -=require october.navbar.js -=require october.sidenav.js -=require october.scrollbar.js -=require october.filelist.js -=require october.layout.js -=require october.sidepaneltab.js -=require october.simplelist.js -=require october.treelist.js -=require october.sidenav-tree.js -=require october.datetime.js - -=require backend.js -*/ diff --git a/modules/backend/assets/js/october-min.js b/modules/backend/assets/js/winter-min.js similarity index 98% rename from modules/backend/assets/js/october-min.js rename to modules/backend/assets/js/winter-min.js index 41cba9726..d3636fa18 100644 --- a/modules/backend/assets/js/october-min.js +++ b/modules/backend/assets/js/winter-min.js @@ -523,9 +523,9 @@ $.Jcrop.Loader(this,function(){$(this).css({display:'block',visibility:'hidden'} else window.setTimeout(completeCheck,50);} $img.bind('load.jcloader',completeCheck).bind('error.jcloader',function(e){$img.unbind('.jcloader');if($.isFunction(error))error.call(img);});if(img.complete&&$.isFunction(success)){$img.unbind('.jcloader');success.call(img);}};$.Jcrop.defaults={allowSelect:true,allowMove:true,allowResize:true,trackDocument:true,baseClass:'jcrop',addClass:null,bgColor:'black',bgOpacity:0.6,bgFade:false,borderOpacity:0.4,handleOpacity:0.5,handleSize:null,aspectRatio:0,keySupport:true,createHandles:['n','s','e','w','nw','ne','se','sw'],createDragbars:['n','s','e','w'],createBorders:['n','s','e','w'],drawBorders:true,dragEdges:true,fixedSupport:true,touchSupport:null,shade:null,boxWidth:0,boxHeight:0,boundary:2,fadeTime:400,animationDelay:20,swingSpeed:3,minSelect:[0,0],maxSize:[0,0],minSize:[0,0],onChange:function(){},onSelect:function(){},onDblClick:function(){},onRelease:function(){}};}(jQuery));!function(){var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;(function(){function S(a){function d(e){var b=e.charCodeAt(0);if(b!==92)return b;var a=e.charAt(1);return(b=r[a])?b:"0"<=a&&a<="7"?parseInt(e.substring(1),8):a==="u"||a==="x"?parseInt(e.substring(2),16):e.charCodeAt(1)}function g(e){if(e<32)return(e<16?"\\x0":"\\x")+e.toString(16);e=String.fromCharCode(e);return e==="\\"||e==="-"||e==="]"||e==="^"?"\\"+e:e}function b(e){var b=e.substring(1,e.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),e=[],a=b[0]==="^",c=["["];a&&c.push("^");for(var a=a?1:0,f=b.length;a122||(l<65||h>90||e.push([Math.max(65,h)|32,Math.min(l,90)|32]),l<97||h>122||e.push([Math.max(97,h)&-33,Math.min(l,122)&-33]))}}e.sort(function(e,a){return e[0]-a[0]||a[1]-e[1]});b=[];f=[];for(a=0;ah[0]&&(h[1]+1>h[0]&&c.push("-"),c.push(g(h[1])));c.push("]");return c.join("")}function s(e){for(var a=e.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),c=a.length,d=[],f=0,h=0;f=2&&e==="["?a[f]=b(l):e!=="\\"&&(a[f]=l.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return a.join("")}for(var x=0,m=!1,j=!1,k=0,c=a.length;k=5&&"lang-"===w.substring(0,5))&&!(t&&typeof t[1]==="string"))f=!1,w="src";f||(r[z]=w)}h=c;c+=z.length;if(f){f=t[1];var l=z.indexOf(f),B=l+f.length;t[2]&&(B=z.length-t[2].length,l=B-f.length);w=w.substring(5);H(j+h,z.substring(0,l),g,k);H(j+h+l,f,I(w,f),k);H(j+h+B,z.substring(B),g,k)}else k.push(j+h,w)}a.g=k}var b={},s;(function(){for(var g=a.concat(d),j=[],k={},c=0,i=g.length;c=0;)b[n.charAt(e)]=r;r=r[1];n=""+r;k.hasOwnProperty(n)||(j.push(r),k[n]=q)}j.push(/[\S\s]/);s=S(j)})();var x=d.length;return g}function v(a){var d=[],g=[];a.tripleQuotedStrings?d.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?d.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,q,"'\"`"]):d.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&g.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var b=a.hashComments;b&&(a.cStyleComments?(b>1?d.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):d.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),g.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,q])):d.push(["com",/^#[^\n\r]*/,q,"#"]));a.cStyleComments&&(g.push(["com",/^\/\/[^\n\r]*/,q]),g.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));if(b=a.regexLiterals){var s=(b=b>1?"":"\n\r")?".":"[\\S\\s]";g.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+("/(?=[^/*"+b+"])(?:[^/\\x5B\\x5C"+b+"]|\\x5C"+s+"|\\x5B(?:[^\\x5C\\x5D"+b+"]|\\x5C"+ s+")*(?:\\x5D|$))+/")+")")])}(b=a.types)&&g.push(["typ",b]);b=(""+a.keywords).replace(/^ | $/g,"");b.length&&g.push(["kwd",RegExp("^(?:"+b.replace(/[\s,]+/g,"|")+")\\b"),q]);d.push(["pln",/^\s+/,q," \r\n\t\u00a0"]);b="^.[^\\s\\w.$@'\"`/\\\\]*";a.regexLiterals&&(b+="(?!s*/)");g.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",RegExp(b),q]);return C(d,g)}function J(a,d,g){function b(a){var c=a.nodeType;if(c==1&&!x.test(a.className))if("br"===a.nodeName)s(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)b(a);else if((c==3||c==4)&&g){var d=a.nodeValue,i=d.match(m);if(i)c=d.substring(0,i.index),a.nodeValue=c,(d=d.substring(i.index+i[0].length))&&a.parentNode.insertBefore(j.createTextNode(d),a.nextSibling),s(a),c||a.parentNode.removeChild(a)}}function s(a){function b(a,c){var d=c?a.cloneNode(!1):a,e=a.parentNode;if(e){var e=b(e,1),g=a.nextSibling;e.appendChild(d);for(var i=g;i;i=g)g=i.nextSibling,e.appendChild(i)}return d}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),d;(d=a.parentNode)&&d.nodeType===1;)a=d;c.push(a)}for(var x=/(?:^|\s)nocode(?:\s|$)/,m=/\r\n?|\n/,j=a.ownerDocument,k=j.createElement("li");a.firstChild;)k.appendChild(a.firstChild);for(var c=[k],i=0;i=0;){var b=d[g];F.hasOwnProperty(b)?D.console&&console.warn("cannot override language handler %s",b):F[b]=a}}function I(a,d){if(!a||!F.hasOwnProperty(a))a=/^\s*=l&&(b+=2);g>=B&&(r+=2)}}finally{if(f)f.style.display=h}}catch(u){D.console&&console.log(u&&u.stack||u)}}var D=window,y=["break,continue,do,else,for,if,return,while"],E=[[y,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],M=[E,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],N=[E,"abstract,assert,boolean,byte,extends,final,finally,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],O=[N,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],E=[E,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],P=[y,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],Q=[y,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],W=[y,"as,assert,const,copy,drop,enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"],y=[y,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],R=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,V=/\S/,X=v({keywords:[M,O,E,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",P,Q,y],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),F={};p(X,["default-code"]);p(C([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);p(C([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);p(C([],[["atv",/^[\S\s]+/]]),["uq.val"]);p(v({keywords:M,hashComments:!0,cStyleComments:!0,types:R}),["c","cc","cpp","cxx","cyc","m"]);p(v({keywords:"null,true,false"}),["json"]);p(v({keywords:O,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:R}),["cs"]);p(v({keywords:N,cStyleComments:!0}),["java"]);p(v({keywords:y,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]);p(v({keywords:P,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]);p(v({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]);p(v({keywords:Q,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]);p(v({keywords:E,cStyleComments:!0,regexLiterals:!0}),["javascript","js"]);p(v({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);p(v({keywords:W,cStyleComments:!0,multilineStrings:!0}),["rc","rs","rust"]);p(C([],[["str",/^[\S\s]+/]]),["regex"]);var Y=D.PR={createSimpleLexer:C,registerLangHandler:p,sourceDecorator:v,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:D.prettyPrintOne=function(a,d,g){var b=document.createElement("div");b.innerHTML="
"+a+"
";b=b.firstChild;g&&J(b,g,!0);K({h:d,j:g,c:b,i:1});return b.innerHTML},prettyPrint:D.prettyPrint=function(a,d){function g(){for(var b=D.PR_SHOULD_USE_CONTINUATION?c.now()+250:Infinity;i1) dragPerc=1 var scrollPos=dragPerc*contentSize;this.scrollContentElement[scrollAttr]=scrollPos} @@ -761,8 +765,10 @@ navbar=$(this),nav=$('ul.nav',navbar),collapseMode=navbar.hasClass('navbar-mode- nav.verticalMenu($('a.menu-toggle',navbar),{breakpoint:collapseMode?Infinity:769}) $('li.with-tooltip:not(.active) > a',navbar).tooltip({container:'body',placement:'bottom',template:''}).on('show.bs.tooltip',function(e){if(isMobile)e.preventDefault()}) var dragScroll=$('[data-control=toolbar]',navbar).data('oc.dragScroll') -if(dragScroll){dragScroll.goToElement($('ul.nav > li.active',navbar),undefined,{'duration':0})}})})})(jQuery);+function($){"use strict";if($.oc===undefined) -$.oc={} +if(dragScroll){dragScroll.goToElement($('ul.nav > li.active',navbar),undefined,{'duration':0})}})})})(jQuery);+function($){"use strict";if($.wn===undefined) +$.wn={} +if($.oc===undefined) +$.oc=$.wn var SideNav=function(element,options){this.options=options this.$el=$(element) this.$list=$('ul',this.$el) @@ -798,15 +804,15 @@ var options=$.extend({},SideNav.DEFAULTS,$this.data(),typeof option=='object'&&o if(!data)$this.data('oc.sideNav',(data=new SideNav(this,options))) if(typeof option=='string')result=data[option].apply(data,args) if(typeof result!='undefined')return false -if($.oc.sideNav===undefined) -$.oc.sideNav=data}) +if($.wn.sideNav===undefined) +$.wn.sideNav=data}) return result?result:this} $.fn.sideNav.Constructor=SideNav $.fn.sideNav.noConflict=function(){$.fn.sideNav=old return this} -$(document).ready(function(){$('[data-control="sidenav"]').sideNav()})}(window.jQuery);+function($){"use strict";var Base=$.oc.foundation.base,BaseProto=Base.prototype +$(document).ready(function(){$('[data-control="sidenav"]').sideNav()})}(window.jQuery);+function($){"use strict";var Base=$.wn.foundation.base,BaseProto=Base.prototype var Scrollbar=function(element,options){var -$el=this.$el=$(element),el=$el.get(0),self=this,options=this.options=options||{},sizeName=this.sizeName=options.vertical?'height':'width',isNative=$('html').hasClass('mobile'),isTouch=this.isTouch=Modernizr.touchevents,isScrollable=this.isScrollable=false,isLocked=this.isLocked=false,eventElementName=options.vertical?'pageY':'pageX',dragStart=0,startOffset=0;$.oc.foundation.controlUtils.markDisposable(element) +$el=this.$el=$(element),el=$el.get(0),self=this,options=this.options=options||{},sizeName=this.sizeName=options.vertical?'height':'width',isNative=$('html').hasClass('mobile'),isTouch=this.isTouch=Modernizr.touchevents,isScrollable=this.isScrollable=false,isLocked=this.isLocked=false,eventElementName=options.vertical?'pageY':'pageX',dragStart=0,startOffset=0;$.wn.foundation.controlUtils.markDisposable(element) Base.call(this) this.$el.one('dispose-control',this.proxy(this.dispose)) if(isNative){return} @@ -968,12 +974,12 @@ data[option].apply(data,methodArgs)}})} $.fn.fileList.Constructor=FileList $.fn.fileList.noConflict=function(){$.fn.fileList=old return this} -$(document).ready(function(){$('[data-control=filelist]').fileList()})}(window.jQuery);(function($){var OctoberLayout=function(){this.$accountMenuOverlay=null} -OctoberLayout.prototype.setPageTitle=function(title){var $title=$('title') +$(document).ready(function(){$('[data-control=filelist]').fileList()})}(window.jQuery);(function($){var WinterLayout=function(){this.$accountMenuOverlay=null} +WinterLayout.prototype.setPageTitle=function(title){var $title=$('title') if(this.pageTitleTemplate===undefined) this.pageTitleTemplate=$title.data('titleTemplate') $title.text(this.pageTitleTemplate.replace('%s',title))} -OctoberLayout.prototype.updateLayout=function(title){var $children,$el,fixedWidth,margin +WinterLayout.prototype.updateLayout=function(title){var $children,$el,fixedWidth,margin $('[data-calculate-width]').each(function(){$children=$(this).children() if($children.length>0){fixedWidth=0 $children.each(function(){$el=$(this) @@ -983,7 +989,7 @@ $el.data('oc.layoutMargin',margin)} fixedWidth+=$el.get(0).offsetWidth+margin}) $(this).width(fixedWidth) $(this).trigger('oc.widthFixed')}})} -OctoberLayout.prototype.toggleAccountMenu=function(el){var self=this,$el=$(el),$parent=$(el).parent(),$menu=$el.next() +WinterLayout.prototype.toggleAccountMenu=function(el){var self=this,$el=$(el),$parent=$(el).parent(),$menu=$el.next() $el.tooltip('hide') if($menu.hasClass('active')){self.$accountMenuOverlay.remove() $parent.removeClass('highlight') @@ -995,13 +1001,15 @@ $menu.addClass('active') self.$accountMenuOverlay.one('click',function(){self.$accountMenuOverlay.remove() $menu.removeClass('active') $parent.removeClass('highlight')})}} +if($.wn===undefined) +$.wn={} if($.oc===undefined) -$.oc={} -$.oc.layout=new OctoberLayout() -$(document).ready(function(){$.oc.layout.updateLayout() -window.setTimeout($.oc.layout.updateLayout,100)}) -$(window).on('resize',function(){$.oc.layout.updateLayout()}) -$(window).on('oc.updateUi',function(){$.oc.layout.updateLayout()})})(jQuery);+function($){"use strict";var SidePanelTab=function(element,options){this.options=options +$.oc=$.wn +$.wn.layout=new WinterLayout() +$(document).ready(function(){$.wn.layout.updateLayout() +window.setTimeout($.wn.layout.updateLayout,100)}) +$(window).on('resize',function(){$.wn.layout.updateLayout()}) +$(window).on('oc.updateUi',function(){$.wn.layout.updateLayout()})})(jQuery);+function($){"use strict";var SidePanelTab=function(element,options){this.options=options this.$el=$(element) this.init()} SidePanelTab.prototype.init=function(){var self=this @@ -1041,7 +1049,7 @@ self.$el.on('close.oc.sidePanel',function(){self.hideSidePanel()})} this.updateActiveTab()} SidePanelTab.prototype.displayTab=function(menuItem){var menuItemId=$(menuItem).data('menu-item') this.visibleItemId=menuItemId -if($.oc.sideNav!==undefined){$.oc.sideNav.setActiveItem(menuItemId)} +if($.wn.sideNav!==undefined){$.wn.sideNav.setActiveItem(menuItemId)} this.$sidePanelItems.each(function(){var $el=$(this) $el.toggleClass('hide',$el.data('content-id')!=menuItemId)}) $(window).trigger('resize')} @@ -1058,9 +1066,9 @@ this.updateActiveTab()} SidePanelTab.prototype.updatePanelPosition=function(){if(!this.panelFixed()||Modernizr.touchevents){this.$el.height($(document).height()-this.mainNavHeight)} else{this.$el.css('height','')} if(this.panelVisible&&$(window).width()>this.options.breakpoint&&this.panelFixed()){this.hideSidePanel()}} -SidePanelTab.prototype.updateActiveTab=function(){if($.oc.sideNav===undefined){return} -if(!this.panelVisible&&($(window).width()':'>','"':'"',"'":''','/':'/'},htmlEscaper=/[&<>"'\/]/g +img.src=source})}};return o;};assetManager=new AssetManager();if($.wn===undefined) +$.wn={} +if($.oc===undefined) +$.oc=$.wn +$.wn.escapeHtmlString=function(string){var htmlEscapes={'&':'&','<':'<','>':'>','"':'"',"'":''','/':'/'},htmlEscaper=/[&<>"'\/]/g return(''+string).replace(htmlEscaper,function(match){return htmlEscapes[match];})} if(!!window.MSInputMethodContext&&!!document.documentMode){$(window).on('resize',function(){fixMediaManager() fixSidebar()}) diff --git a/modules/backend/assets/js/october.alert.js b/modules/backend/assets/js/winter.alert.js similarity index 74% rename from modules/backend/assets/js/october.alert.js rename to modules/backend/assets/js/winter.alert.js index 11d9e64c0..6a3558db2 100644 --- a/modules/backend/assets/js/october.alert.js +++ b/modules/backend/assets/js/winter.alert.js @@ -4,26 +4,28 @@ * Displays alert and confirmation dialogs * * JavaScript API: - * $.oc.alert() - * $.oc.confirm() + * $.wn.alert() + * $.wn.confirm() * * Dependences: * - Sweet Alert - * - Translations (october.lang.js) + * - Translations (winter.lang.js) */ (function($){ + if ($.wn === undefined) + $.wn = {} if ($.oc === undefined) - $.oc = {} + $.oc = $.wn - $.oc.alert = function alert(message) { + $.wn.alert = function alert(message) { swal({ title: message, confirmButtonClass: 'btn-primary' }) } - $.oc.confirm = function confirm(message, callback) { + $.wn.confirm = function confirm(message, callback) { swal({ title: message, @@ -42,7 +44,7 @@ $(window).on('ajaxErrorMessage', function(event, message){ if (!message) return - $.oc.alert(message) + $.wn.alert(message) // Prevent the default alert() message event.preventDefault() @@ -51,7 +53,7 @@ $(window).on('ajaxErrorMessage', function(event, message){ $(window).on('ajaxConfirmMessage', function(event, message){ if (!message) return - $.oc.confirm(message, function(isConfirm){ + $.wn.confirm(message, function(isConfirm){ isConfirm ? event.promise.resolve() : event.promise.reject() @@ -74,14 +76,14 @@ $(document).ready(function(){ window.sweetAlert = window.swal = function(message, callback) { if (typeof message === 'object') { // Do not override if texts are provided - message.confirmButtonText = message.confirmButtonText || $.oc.lang.get('alert.confirm_button_text') - message.cancelButtonText = message.cancelButtonText || $.oc.lang.get('alert.cancel_button_text') + message.confirmButtonText = message.confirmButtonText || $.wn.lang.get('alert.confirm_button_text') + message.cancelButtonText = message.cancelButtonText || $.wn.lang.get('alert.cancel_button_text') } else { message = { title: message, - confirmButtonText: $.oc.lang.get('alert.confirm_button_text'), - cancelButtonText: $.oc.lang.get('alert.cancel_button_text') + confirmButtonText: $.wn.lang.get('alert.confirm_button_text'), + cancelButtonText: $.wn.lang.get('alert.cancel_button_text') } } diff --git a/modules/backend/assets/js/october.datetime.js b/modules/backend/assets/js/winter.datetime.js similarity index 98% rename from modules/backend/assets/js/october.datetime.js rename to modules/backend/assets/js/winter.datetime.js index ae4299669..8bab57a33 100644 --- a/modules/backend/assets/js/october.datetime.js +++ b/modules/backend/assets/js/winter.datetime.js @@ -27,14 +27,14 @@ * */ +function ($) { "use strict"; - var Base = $.oc.foundation.base, + var Base = $.wn.foundation.base, BaseProto = Base.prototype var DateTimeConverter = function (element, options) { this.$el = $(element) this.options = options || {} - $.oc.foundation.controlUtils.markDisposable(element) + $.wn.foundation.controlUtils.markDisposable(element) Base.call(this) this.init() } diff --git a/modules/backend/assets/js/october.filelist.js b/modules/backend/assets/js/winter.filelist.js similarity index 100% rename from modules/backend/assets/js/october.filelist.js rename to modules/backend/assets/js/winter.filelist.js diff --git a/modules/backend/assets/js/october.flyout.js b/modules/backend/assets/js/winter.flyout.js similarity index 98% rename from modules/backend/assets/js/october.flyout.js rename to modules/backend/assets/js/winter.flyout.js index 1d5c9b15a..e98701361 100644 --- a/modules/backend/assets/js/october.flyout.js +++ b/modules/backend/assets/js/winter.flyout.js @@ -3,7 +3,7 @@ */ +function ($) { "use strict"; - var Base = $.oc.foundation.base, + var Base = $.wn.foundation.base, BaseProto = Base.prototype // SCROLLPAD CLASS DEFINITION @@ -188,7 +188,7 @@ var old = $.fn.flyout $.fn.flyout = function (option) { - var args = Array.prototype.slice.call(arguments, 1), + var args = Array.prototype.slice.call(arguments, 1), result = undefined this.each(function () { @@ -199,7 +199,7 @@ if (typeof option == 'string') result = data[option].apply(data, args) if (typeof result != 'undefined') return false }) - + return result ? result : this } diff --git a/modules/backend/assets/js/winter.js b/modules/backend/assets/js/winter.js new file mode 100644 index 000000000..f05a4bced --- /dev/null +++ b/modules/backend/assets/js/winter.js @@ -0,0 +1,35 @@ +/* + * This is a bundle file, you can compile this by running + * + * php artisan winter:util compile assets + * + * @see winter-min.js + * + +=require vendor/jquery.touchwipe.js +=require vendor/jquery.autoellipsis.js +=require vendor/jquery.waterfall.js +=require vendor/jquery.cookie.js +=require ../vendor/dropzone/dropzone.js +=require ../vendor/sweet-alert/sweet-alert.js +=require ../vendor/jcrop/js/jquery.Jcrop.js +=require ../../../system/assets/vendor/prettify/prettify.js +=require ../../widgets/mediamanager/assets/js/mediamanager-global.js + +=require winter.lang.js +=require winter.alert.js +=require winter.scrollpad.js +=require winter.verticalmenu.js +=require winter.navbar.js +=require winter.sidenav.js +=require winter.scrollbar.js +=require winter.filelist.js +=require winter.layout.js +=require winter.sidepaneltab.js +=require winter.simplelist.js +=require winter.treelist.js +=require winter.sidenav-tree.js +=require winter.datetime.js + +=require backend.js +*/ diff --git a/modules/backend/assets/js/october.lang.js b/modules/backend/assets/js/winter.lang.js similarity index 81% rename from modules/backend/assets/js/october.lang.js rename to modules/backend/assets/js/winter.lang.js index 92ed770e9..cefd1468e 100644 --- a/modules/backend/assets/js/october.lang.js +++ b/modules/backend/assets/js/winter.lang.js @@ -2,13 +2,15 @@ * Client side translations */ +if ($.wn === undefined) + $.wn = {} if ($.oc === undefined) - $.oc = {} + $.oc = $.wn -if ($.oc.langMessages === undefined) - $.oc.langMessages = {} +if ($.wn.langMessages === undefined) + $.wn.langMessages = {} -$.oc.lang = (function(lang, messages) { +$.wn.lang = (function(lang, messages) { lang.load = function(locale) { if (messages[locale] === undefined) { @@ -47,4 +49,4 @@ $.oc.lang = (function(lang, messages) { return lang -})($.oc.lang || {}, $.oc.langMessages); \ No newline at end of file +})($.wn.lang || {}, $.wn.langMessages); \ No newline at end of file diff --git a/modules/backend/assets/js/october.layout.js b/modules/backend/assets/js/winter.layout.js similarity index 80% rename from modules/backend/assets/js/october.layout.js rename to modules/backend/assets/js/winter.layout.js index 3f0af1c8a..d2276c767 100644 --- a/modules/backend/assets/js/october.layout.js +++ b/modules/backend/assets/js/winter.layout.js @@ -1,9 +1,9 @@ (function($){ - var OctoberLayout = function() { + var WinterLayout = function() { this.$accountMenuOverlay = null } - OctoberLayout.prototype.setPageTitle = function(title) { + WinterLayout.prototype.setPageTitle = function(title) { var $title = $('title') if (this.pageTitleTemplate === undefined) @@ -12,7 +12,7 @@ $title.text(this.pageTitleTemplate.replace('%s', title)) } - OctoberLayout.prototype.updateLayout = function(title) { + WinterLayout.prototype.updateLayout = function(title) { var $children, $el, fixedWidth, margin $('[data-calculate-width]').each(function(){ @@ -38,7 +38,7 @@ }) } - OctoberLayout.prototype.toggleAccountMenu = function(el) { + WinterLayout.prototype.toggleAccountMenu = function(el) { var self = this, $el = $(el), $parent = $(el).parent(), @@ -65,20 +65,22 @@ } } + if ($.wn === undefined) + $.wn = {} if ($.oc === undefined) - $.oc = {} + $.oc = $.wn - $.oc.layout = new OctoberLayout() + $.wn.layout = new WinterLayout() $(document).ready(function(){ - $.oc.layout.updateLayout() + $.wn.layout.updateLayout() - window.setTimeout($.oc.layout.updateLayout, 100) + window.setTimeout($.wn.layout.updateLayout, 100) }) $(window).on('resize', function() { - $.oc.layout.updateLayout() + $.wn.layout.updateLayout() }) $(window).on('oc.updateUi', function() { - $.oc.layout.updateLayout() + $.wn.layout.updateLayout() }) })(jQuery); \ No newline at end of file diff --git a/modules/backend/assets/js/october.navbar.js b/modules/backend/assets/js/winter.navbar.js similarity index 94% rename from modules/backend/assets/js/october.navbar.js rename to modules/backend/assets/js/winter.navbar.js index 25c9b7d50..37c1cde8f 100644 --- a/modules/backend/assets/js/october.navbar.js +++ b/modules/backend/assets/js/winter.navbar.js @@ -5,8 +5,8 @@ * - If the content doesn't fit the navbar, it can be dragged left and right. * * Dependences: - * - DragScroll (october.dragscroll.js) - * - VerticalMenu (october.verticalmenu.js) + * - DragScroll (winter.dragscroll.js) + * - VerticalMenu (winter.verticalmenu.js) */ (function($){ diff --git a/modules/backend/assets/js/october.scrollbar.js b/modules/backend/assets/js/winter.scrollbar.js similarity index 97% rename from modules/backend/assets/js/october.scrollbar.js rename to modules/backend/assets/js/winter.scrollbar.js index c99628ba6..39b6e116f 100644 --- a/modules/backend/assets/js/october.scrollbar.js +++ b/modules/backend/assets/js/winter.scrollbar.js @@ -1,20 +1,20 @@ /* - * Creates a scrollbar in a container. - * + * Creates a scrollbar in a container. + * * Note the element must have a height set for vertical, * and a width set for horizontal. - * + * * Data attributes: * - data-control="scrollbar" - enables the scrollbar plugin * * JavaScript API: * $('#area').scrollbar() * - * Dependences: + * Dependences: * - Mouse Wheel plugin (mousewheel.js) */ +function ($) { "use strict"; - var Base = $.oc.foundation.base, + var Base = $.wn.foundation.base, BaseProto = Base.prototype var Scrollbar = function (element, options) { @@ -33,7 +33,7 @@ dragStart = 0, startOffset = 0; - $.oc.foundation.controlUtils.markDisposable(element) + $.wn.foundation.controlUtils.markDisposable(element) Base.call(this) @@ -199,7 +199,7 @@ self.endScrollTimeout = undefined } - self.endScrollTimeout = setTimeout(function() { + self.endScrollTimeout = setTimeout(function() { $el.trigger('oc.scrollEnd') self.endScrollTimeout = undefined }, 50) @@ -315,8 +315,8 @@ offset = 0, animated = false, params = { - duration: 300, - queue: false, + duration: 300, + queue: false, complete: function(){ if (callback !== undefined) callback() diff --git a/modules/backend/assets/js/october.scrollpad.js b/modules/backend/assets/js/winter.scrollpad.js similarity index 92% rename from modules/backend/assets/js/october.scrollpad.js rename to modules/backend/assets/js/winter.scrollpad.js index 8e2be6293..3935f2453 100644 --- a/modules/backend/assets/js/october.scrollpad.js +++ b/modules/backend/assets/js/winter.scrollpad.js @@ -1,13 +1,13 @@ /* * ScrollPad plugin. * - * This plugin creates a scrollable area with features similar (but more limited) - * to october.scrollbar.js, with virtual scroll bars. This plugin is more lightweight + * This plugin creates a scrollable area with features similar (but more limited) + * to winter.scrollbar.js, with virtual scroll bars. This plugin is more lightweight * in terms of calculations and more responsive. It doesn't use scripting for scrolling, - * instead it uses the native scrolling and listens for the onscroll event to update + * instead it uses the native scrolling and listens for the onscroll event to update * the virtual scroll bars. * - * The plugin is partially based on Trackpad Scroll Emulator + * The plugin is partially based on Trackpad Scroll Emulator * https://github.com/jnicol/trackpad-scroll-emulator, cleaned up for the better CPU and * memory (DOM references) management. * @@ -15,12 +15,12 @@ *
*
*
- * The content goes here. The two wrapping + * The content goes here. The two wrapping * DIV elements are required. *
*
*
- * + * * Data attributes: * - data-control="scrollpad" - enables the plugin. * - data-direction="vertical|horizontal" - sets the scrolling direction. @@ -38,7 +38,7 @@ */ +function ($) { "use strict"; - var Base = $.oc.foundation.base, + var Base = $.wn.foundation.base, BaseProto = Base.prototype // SCROLLPAD CLASS DEFINITION @@ -63,7 +63,7 @@ this.init() - $.oc.foundation.controlUtils.markDisposable(element) + $.wn.foundation.controlUtils.markDisposable(element) } Scrollpad.prototype = Object.create(BaseProto) @@ -157,7 +157,7 @@ document.body.removeChild(testerElement) - // Some magic for FireFox, see + // Some magic for FireFox, see // https://github.com/jnicol/trackpad-scroll-emulator/blob/master/jquery.trackpad-scroll-emulator.js if (width === innerWidth && navigator.userAgent.toLowerCase().indexOf('firefox') > -1) return this.scrollbarSize = 17 @@ -221,15 +221,15 @@ if (this.updateScrollbarTimer !== null) return - this.updateScrollbarTimer = setTimeout(this.proxy(this.displayScrollbar), 10) + this.updateScrollbarTimer = setTimeout(this.proxy(this.displayScrollbar), 10) } Scrollpad.prototype.onStartDrag = function(ev) { - $.oc.foundation.event.stop(ev) - - var pageCoords = $.oc.foundation.event.pageCoordinates(ev), + $.wn.foundation.event.stop(ev) + + var pageCoords = $.wn.foundation.event.pageCoordinates(ev), eventOffset = this.options.direction == 'vertical' ? pageCoords.y : pageCoords.x, - handleCoords = $.oc.foundation.element.absolutePosition(this.dragHandleElement), + handleCoords = $.wn.foundation.element.absolutePosition(this.dragHandleElement), handleOffset = this.options.direction == 'vertical' ? handleCoords.top : handleCoords.left this.dragOffset = eventOffset - handleOffset @@ -239,15 +239,15 @@ } Scrollpad.prototype.onMouseMove = function(ev) { - $.oc.foundation.event.stop(ev) + $.wn.foundation.event.stop(ev) var eventCoordsAttr = this.options.direction == 'vertical' ? 'y' : 'x', elementCoordsAttr = this.options.direction == 'vertical' ? 'top' : 'left', offsetAttr = this.options.direction == 'vertical' ? 'offsetHeight' : 'offsetWidth', scrollAttr = this.options.direction == 'vertical' ? 'scrollTop' : 'scrollLeft' - var eventOffset = $.oc.foundation.event.pageCoordinates(ev)[eventCoordsAttr], - scrollbarOffset = $.oc.foundation.element.absolutePosition(this.scrollbarElement)[elementCoordsAttr], + var eventOffset = $.wn.foundation.event.pageCoordinates(ev)[eventCoordsAttr], + scrollbarOffset = $.wn.foundation.element.absolutePosition(this.scrollbarElement)[elementCoordsAttr], dragPos = eventOffset - scrollbarOffset - this.dragOffset, scrollbarSize = this.scrollbarElement[offsetAttr], contentSize = this.contentElement[offsetAttr], @@ -260,7 +260,7 @@ this.scrollContentElement[scrollAttr] = scrollPos } - + Scrollpad.prototype.onEndDrag = function(ev) { document.removeEventListener('mousemove', this.proxy(this.onMouseMove)) document.removeEventListener('mouseup', this.proxy(this.onEndDrag)) @@ -276,7 +276,7 @@ var old = $.fn.scrollpad $.fn.scrollpad = function (option) { - var args = Array.prototype.slice.call(arguments, 1), + var args = Array.prototype.slice.call(arguments, 1), result = undefined this.each(function () { @@ -287,7 +287,7 @@ if (typeof option == 'string') result = data[option].apply(data, args) if (typeof result != 'undefined') return false }) - + return result ? result : this } diff --git a/modules/backend/assets/js/october.sidenav-tree.js b/modules/backend/assets/js/winter.sidenav-tree.js similarity index 100% rename from modules/backend/assets/js/october.sidenav-tree.js rename to modules/backend/assets/js/winter.sidenav-tree.js diff --git a/modules/backend/assets/js/october.sidenav.js b/modules/backend/assets/js/winter.sidenav.js similarity index 90% rename from modules/backend/assets/js/october.sidenav.js rename to modules/backend/assets/js/winter.sidenav.js index 292caab93..714305902 100644 --- a/modules/backend/assets/js/october.sidenav.js +++ b/modules/backend/assets/js/winter.sidenav.js @@ -1,22 +1,24 @@ /* * Side Navigation - * + * * Data attributes: * - data-control="sidenav" - enables the side navigation plugin * * JavaScript API: * $('#nav').sideNav() - * $.oc.sideNav.setCounter('cms/partials', 5); - sets the counter value for a particular menu item - * $.oc.sideNav.increaseCounter('cms/partials', 5); - increases the counter value for a particular menu item - * $.oc.sideNav.dropCounter('cms/partials'); - drops the counter value for a particular menu item + * $.wn.sideNav.setCounter('cms/partials', 5); - sets the counter value for a particular menu item + * $.wn.sideNav.increaseCounter('cms/partials', 5); - increases the counter value for a particular menu item + * $.wn.sideNav.dropCounter('cms/partials'); - drops the counter value for a particular menu item * - * Dependences: - * - Drag Scroll (october.dragscroll.js) + * Dependences: + * - Drag Scroll (winter.dragscroll.js) */ +function ($) { "use strict"; + if ($.wn === undefined) + $.wn = {} if ($.oc === undefined) - $.oc = {} + $.oc = $.wn // SIDENAV CLASS DEFINITION // ============================ @@ -113,8 +115,8 @@ if (typeof option == 'string') result = data[option].apply(data, args) if (typeof result != 'undefined') return false - if ($.oc.sideNav === undefined) - $.oc.sideNav = data + if ($.wn.sideNav === undefined) + $.wn.sideNav = data }) return result ? result : this diff --git a/modules/backend/assets/js/october.sidepaneltab.js b/modules/backend/assets/js/winter.sidepaneltab.js similarity index 97% rename from modules/backend/assets/js/october.sidepaneltab.js rename to modules/backend/assets/js/winter.sidepaneltab.js index 2a5eba766..319127143 100644 --- a/modules/backend/assets/js/october.sidepaneltab.js +++ b/modules/backend/assets/js/winter.sidepaneltab.js @@ -115,8 +115,8 @@ this.visibleItemId = menuItemId - if ($.oc.sideNav !== undefined) { - $.oc.sideNav.setActiveItem(menuItemId) + if ($.wn.sideNav !== undefined) { + $.wn.sideNav.setActiveItem(menuItemId) } this.$sidePanelItems.each(function() { @@ -166,15 +166,15 @@ } SidePanelTab.prototype.updateActiveTab = function() { - if ($.oc.sideNav === undefined) { + if ($.wn.sideNav === undefined) { return } if (!this.panelVisible && ($(window).width() < this.options.breakpoint || !this.panelFixed())) { - $.oc.sideNav.unsetActiveItem() + $.wn.sideNav.unsetActiveItem() } else { - $.oc.sideNav.setActiveItem(this.visibleItemId) + $.wn.sideNav.setActiveItem(this.visibleItemId) } } diff --git a/modules/backend/assets/js/october.simplelist.js b/modules/backend/assets/js/winter.simplelist.js similarity index 100% rename from modules/backend/assets/js/october.simplelist.js rename to modules/backend/assets/js/winter.simplelist.js diff --git a/modules/backend/assets/js/october.tabformexpandcontrols.js b/modules/backend/assets/js/winter.tabformexpandcontrols.js similarity index 97% rename from modules/backend/assets/js/october.tabformexpandcontrols.js rename to modules/backend/assets/js/winter.tabformexpandcontrols.js index 499886966..f1195f0c2 100644 --- a/modules/backend/assets/js/october.tabformexpandcontrols.js +++ b/modules/backend/assets/js/winter.tabformexpandcontrols.js @@ -1,11 +1,11 @@ /* - * Extends the fancy tabs layout with expand controls in the tab - * form sections. See main Builder page for example. + * Extends the fancy tabs layout with expand controls in the tab + * form sections. See main Builder page for example. * TODO: A similar layout is used in the CMS, Pages and Builder areas, * but only Builder uses this class. */ +function ($) { "use strict"; - var Base = $.oc.foundation.base, + var Base = $.wn.foundation.base, BaseProto = Base.prototype var TabFormExpandControls = function ($tabsControlElement, options) { @@ -159,5 +159,5 @@ onInitTab: null } - $.oc.tabFormExpandControls = TabFormExpandControls + $.wn.tabFormExpandControls = TabFormExpandControls }(window.jQuery); \ No newline at end of file diff --git a/modules/backend/assets/js/october.treelist.js b/modules/backend/assets/js/winter.treelist.js similarity index 96% rename from modules/backend/assets/js/october.treelist.js rename to modules/backend/assets/js/winter.treelist.js index c0aaa5043..10290ac0a 100644 --- a/modules/backend/assets/js/october.treelist.js +++ b/modules/backend/assets/js/winter.treelist.js @@ -5,15 +5,15 @@ * - handle - class name to use as a handle * - nested - set to false if sorting should be kept within each OL container, if using * a handle it should be focused enough to exclude nested handles. - * + * * Events: * - move.oc.treelist - triggered when a node on the tree is moved. - * + * * Dependences: - * - Sortable Plugin (october.sortable.js) + * - Sortable Plugin (winter.sortable.js) */ +function ($) { "use strict"; - var Base = $.oc.foundation.base, + var Base = $.wn.foundation.base, BaseProto = Base.prototype var TreeListWidget = function (element, options) { @@ -22,7 +22,7 @@ Base.call(this) - $.oc.foundation.controlUtils.markDisposable(element) + $.wn.foundation.controlUtils.markDisposable(element) this.init() } @@ -125,7 +125,7 @@ // TREELIST WIDGET DATA-API // ============== - + $(document).render(function(){ $('[data-control="treelist"]').treeListWidget(); }) diff --git a/modules/backend/assets/js/october.treeview.js b/modules/backend/assets/js/winter.treeview.js similarity index 98% rename from modules/backend/assets/js/october.treeview.js rename to modules/backend/assets/js/winter.treeview.js index f443429c1..f2cef65bb 100644 --- a/modules/backend/assets/js/october.treeview.js +++ b/modules/backend/assets/js/winter.treeview.js @@ -9,11 +9,11 @@ * - open.oc.treeview - this event is triggered on the list element when an item is clicked. * * Dependences: - * - Tree list (october.treelist.js) + * - Tree list (winter.treelist.js) * */ +function ($) { "use strict"; - var Base = $.oc.foundation.base, + var Base = $.wn.foundation.base, BaseProto = Base.prototype var TreeView = function (element, options) { @@ -24,7 +24,7 @@ Base.call(this) - $.oc.foundation.controlUtils.markDisposable(element) + $.wn.foundation.controlUtils.markDisposable(element) this.init() } diff --git a/modules/backend/assets/js/october.verticalmenu.js b/modules/backend/assets/js/winter.verticalmenu.js similarity index 98% rename from modules/backend/assets/js/october.verticalmenu.js rename to modules/backend/assets/js/winter.verticalmenu.js index 79ecc2892..442ac552a 100644 --- a/modules/backend/assets/js/october.verticalmenu.js +++ b/modules/backend/assets/js/winter.verticalmenu.js @@ -1,11 +1,11 @@ /* - * Creates a vertical responsive menu. + * Creates a vertical responsive menu. * * JavaScript API: * $('#menu').verticalMenu() * - * Dependences: - * - Drag Scroll (october.dragscroll.js) + * Dependences: + * - Drag Scroll (winter.dragscroll.js) */ +function ($) { "use strict"; diff --git a/modules/backend/assets/less/controls/common.less b/modules/backend/assets/less/controls/common.less index 542c6e3a6..2c8ac6592 100644 --- a/modules/backend/assets/less/controls/common.less +++ b/modules/backend/assets/less/controls/common.less @@ -3,7 +3,7 @@ // -------------------------------------------------- // -// The scroll panel can host a scrollbar control. It has a right border that covers +// The scroll panel can host a scrollbar control. It has a right border that covers // the scrollbar to satisfy the design requirements. // .control-scrollpanel { @@ -30,26 +30,26 @@ // Logos // -.oc-logo-white { - background-image: url(../images/october-logo-white.svg); +.wn-logo-white, .oc-logo-white { + background-image: url(../images/winter-logo-white.svg); background-position: 50% 50%; background-repeat: no-repeat; background-size: contain; } -.oc-logo { - background-image: url(../images/october-logo.svg); +.wn-logo, .oc-logo { + background-image: url(../images/winter-logo.svg); background-position: 50% 50%; background-repeat: no-repeat; background-size: contain; } -.layout.control-tabs.oc-logo-transparent:not(.has-tabs), -.flex-layout-column.oc-logo-transparent:not(.has-tabs), -.layout-cell.oc-logo-transparent { +.layout.control-tabs.wn-logo-transparent:not(.has-tabs), .layout.control-tabs.oc-logo-transparent:not(.has-tabs), +.flex-layout-column.wn-logo-transparent:not(.has-tabs), .flex-layout-column.oc-logo-transparent:not(.has-tabs), +.layout-cell.wn-logo-transparent, .layout-cell.oc-logo-transparent { background-size: 50% auto; background-repeat: no-repeat; - background-image: url(../images/october-logo.svg); + background-image: url(../images/winter-logo.svg); background-position: 50% 50%; position: relative; diff --git a/modules/backend/assets/less/controls/simplelist.less b/modules/backend/assets/less/controls/simplelist.less index 919ff4958..355ff28a3 100644 --- a/modules/backend/assets/less/controls/simplelist.less +++ b/modules/backend/assets/less/controls/simplelist.less @@ -11,7 +11,7 @@ // With icons (no bullets): //
//
    -//
  • Hello friend
  • +//
  • Hello friend
  • //
//
// diff --git a/modules/backend/assets/less/layout/fancylayout.less b/modules/backend/assets/less/layout/fancylayout.less index 37a258761..c9af9d7d8 100644 --- a/modules/backend/assets/less/layout/fancylayout.less +++ b/modules/backend/assets/less/layout/fancylayout.less @@ -619,6 +619,8 @@ body.breadcrumb-fancy .control-breadcrumb, margin-right: 0; } + &[class^="wn-icon-"], + &[class*=" wn-icon-"], &[class^="oc-icon-"], &[class*=" oc-icon-"] { &:before { @@ -628,7 +630,8 @@ body.breadcrumb-fancy .control-breadcrumb, } } - form.oc-data-changed { + form.oc-data-changed, + form.wn-data-changed { .btn.save { .opacity(1); } diff --git a/modules/backend/assets/less/layout/outerlayout.less b/modules/backend/assets/less/layout/outerlayout.less index 1fd47da2f..34aa5132a 100644 --- a/modules/backend/assets/less/layout/outerlayout.less +++ b/modules/backend/assets/less/layout/outerlayout.less @@ -26,6 +26,7 @@ body.outer { margin-left: -28px; } + h1.wn-logo, h1.oc-logo { .hide-text(); display: inline-block; diff --git a/modules/backend/assets/less/october.less b/modules/backend/assets/less/winter.less similarity index 100% rename from modules/backend/assets/less/october.less rename to modules/backend/assets/less/winter.less diff --git a/modules/backend/assets/vendor/dropzone/dropzone.js b/modules/backend/assets/vendor/dropzone/dropzone.js index 476c0550d..702fd10d6 100644 --- a/modules/backend/assets/vendor/dropzone/dropzone.js +++ b/modules/backend/assets/vendor/dropzone/dropzone.js @@ -1,5 +1,5 @@ /** - * DropZone V5.5.1 (non-minified) for testing on October CMS + * DropZone V5.5.1 (non-minified) for testing on Winter CMS */ "use strict"; diff --git a/modules/backend/assets/vendor/jcrop/OCTOBER-README.md b/modules/backend/assets/vendor/jcrop/WINTER-README.md similarity index 100% rename from modules/backend/assets/vendor/jcrop/OCTOBER-README.md rename to modules/backend/assets/vendor/jcrop/WINTER-README.md diff --git a/modules/backend/assets/vendor/jcrop/js/jquery.Jcrop.js b/modules/backend/assets/vendor/jcrop/js/jquery.Jcrop.js index feed10e92..eabc21257 100755 --- a/modules/backend/assets/vendor/jcrop/js/jquery.Jcrop.js +++ b/modules/backend/assets/vendor/jcrop/js/jquery.Jcrop.js @@ -1,6 +1,6 @@ /** * jquery.Jcrop.js v0.9.12 - * jQuery Image Cropping Plugin - released under MIT License + * jQuery Image Cropping Plugin - released under MIT License * Author: Kelly Hallman * http://github.com/tapmodo/Jcrop * Copyright (c) 2008-2013 Tapmodo Interactive LLC {{{ @@ -171,7 +171,7 @@ if ((ord === 'move') && !options.allowMove) { return false; } - + // Fix position of crop area when dragged the very first time. // Necessary when crop image is in a hidden element when page is loaded. docOffset = getPos($img); @@ -304,12 +304,12 @@ $origimg.width($origimg[0].width); $origimg.height($origimg[0].height); } else { - // Obtain dimensions from temporary image in case the original is not loaded yet (e.g. IE 7.0). + // Obtain dimensions from temporary image in case the original is not loaded yet (e.g. IE 7.0). var tempImage = new Image(); tempImage.src = $origimg[0].src; $origimg.width(tempImage.width); $origimg.height(tempImage.height); - } + } var $img = $origimg.clone().removeAttr('id').css(img_css).show(); @@ -327,8 +327,8 @@ var boundx = $img.width(), boundy = $img.height(), - - + + $div = $('
').width(boundx).height(boundy).addClass(cssClass('holder')).css({ position: 'relative', backgroundColor: options.bgColor @@ -340,24 +340,24 @@ var $img2 = $('
'), - $img_holder = $('
') + $img_holder = $('
') .width('100%').height('100%').css({ zIndex: 310, position: 'absolute', overflow: 'hidden' }), - $hdl_holder = $('
') - .width('100%').height('100%').css('zIndex', 320), + $hdl_holder = $('
') + .width('100%').height('100%').css('zIndex', 320), - $sel = $('
') + $sel = $('
') .css({ position: 'absolute', zIndex: 600 }).dblclick(function(){ var c = Coords.getFixed(); options.onDblClick.call(api,c); - }).insertBefore($img).append($img_holder, $hdl_holder); + }).insertBefore($img).append($img_holder, $hdl_holder); if (img_mode) { @@ -393,7 +393,7 @@ // }}} // }}} // Internal Modules {{{ - // Touch Module {{{ + // Touch Module {{{ var Touch = (function () { // Touch support detection function adapted (under MIT License) // from code by Jeffrey Sambells - http://github.com/iamamused/ @@ -533,8 +533,8 @@ // This function could use some optimization I think... var aspect = options.aspectRatio, min_x = options.minSize[0] / xscale, - - + + //min_y = options.minSize[1]/yscale, max_x = options.maxSize[0] / xscale, max_y = options.maxSize[1] / yscale, @@ -1050,7 +1050,7 @@ { seehandles = false; $hdl_holder.hide(); - } + } //}}} function animMode(v) //{{{ { @@ -1061,13 +1061,13 @@ animating = false; enableHandles(); } - } + } //}}} function done() //{{{ { animMode(false); refresh(); - } + } //}}} // Insert draggable elements {{{ // Insert border divs for outline @@ -1084,7 +1084,7 @@ //}}} // This is a hack for iOS5 to support drag/move touch functionality - // Hack OctoberCMS - the event handler was moved to the Touch module. + // Hack Winter CMS - the event handler was moved to the Touch module. // The closure used before was handling a reference to the target object, // preventing it from removing from DOM after the control is destroyed. $(document).bind('touchstart.jcrop-ios', Touch.fixTouchSupport); @@ -1124,7 +1124,7 @@ done: done }; }()); - + //}}} // Tracker Module {{{ var Tracker = (function () { @@ -1147,7 +1147,7 @@ $(document) .bind('mousemove.jcrop',trackMove) .bind('mouseup.jcrop',trackUp); - } + } //}}} function toBack() //{{{ { @@ -1155,13 +1155,13 @@ zIndex: 290 }); $(document).unbind('.jcrop'); - } + } //}}} function trackMove(e) //{{{ { onMove(mouseAbs(e)); return false; - } + } //}}} function trackUp(e) //{{{ { diff --git a/modules/backend/behaviors/FormController.php b/modules/backend/behaviors/FormController.php index 01bef3b0c..2d0b04d71 100644 --- a/modules/backend/behaviors/FormController.php +++ b/modules/backend/behaviors/FormController.php @@ -8,7 +8,7 @@ use Event; use Redirect; use Backend; use Backend\Classes\ControllerBehavior; -use October\Rain\Router\Helper as RouterHelper; +use Winter\Storm\Router\Helper as RouterHelper; use ApplicationException; use Exception; @@ -33,8 +33,8 @@ use Exception; * values as either a YAML file, located in the controller view directory, * or directly as a PHP array. * - * @see http://octobercms.com/docs/backend/forms Back-end form documentation - * @package october\backend + * @see http://wintercms.com/docs/backend/forms Back-end form documentation + * @package winter\wn-backend-module * @author Alexey Bobkov, Samuel Georges */ class FormController extends ControllerBehavior @@ -89,7 +89,7 @@ class FormController extends ControllerBehavior protected $context; /** - * @var \October\Rain\Database\Model|\October\Rain\Halcyon\Model The initialized model used by the form. + * @var \Winter\Storm\Database\Model|\Winter\Storm\Halcyon\Model The initialized model used by the form. */ protected $model; @@ -116,7 +116,7 @@ class FormController extends ControllerBehavior * to this behavior via this method as the first argument. * * @see \Backend\Widgets\Form - * @param \October\Rain\Database\Model|\October\Rain\Halcyon\Model $model + * @param \Winter\Storm\Database\Model|\Winter\Storm\Halcyon\Model $model * @param string $context Form context * @return void */ @@ -186,7 +186,7 @@ class FormController extends ControllerBehavior /** * Prepares commonly used view data. - * @param \October\Rain\Database\Model|\October\Rain\Halcyon\Model $model + * @param \Winter\Storm\Database\Model|\Winter\Storm\Halcyon\Model $model */ protected function prepareVars($model) { @@ -303,7 +303,7 @@ class FormController extends ControllerBehavior * @param int $recordId Record identifier * @param string $context Form context * @return \Illuminate\Http\RedirectResponse|void - * @throws \October\Rain\Exception\ApplicationException if the provided recordId is not found + * @throws \Winter\Storm\Exception\ApplicationException if the provided recordId is not found */ public function update_onSave($recordId = null, $context = null) { @@ -340,7 +340,7 @@ class FormController extends ControllerBehavior * * @param int $recordId Record identifier * @return \Illuminate\Http\RedirectResponse|void - * @throws \October\Rain\Exception\ApplicationException if the provided recordId is not found + * @throws \Winter\Storm\Exception\ApplicationException if the provided recordId is not found * @throws Exception if there is no primary key on the model */ public function update_onDelete($recordId = null) @@ -408,7 +408,7 @@ class FormController extends ControllerBehavior * @see \Backend\Widgets\Form * @param array $options Render options * @return string Rendered HTML for the form. - * @throws \October\Rain\Exception\ApplicationException if the Form Widget isn't set + * @throws \Winter\Storm\Exception\ApplicationException if the Form Widget isn't set */ public function formRender($options = []) { @@ -424,7 +424,7 @@ class FormController extends ControllerBehavior * The model will be provided by one of the page actions or AJAX * handlers via the `initForm` method. * - * @return \October\Rain\Database\Model|\October\Rain\Halcyon\Model + * @return \Winter\Storm\Database\Model|\Winter\Storm\Halcyon\Model */ public function formGetModel() { @@ -446,7 +446,7 @@ class FormController extends ControllerBehavior /** * Internal method used to prepare the form model object. * - * @return \October\Rain\Database\Model|\October\Rain\Halcyon\Model + * @return \Winter\Storm\Database\Model|\Winter\Storm\Halcyon\Model */ protected function createModel() { @@ -459,7 +459,7 @@ class FormController extends ControllerBehavior * the model primary key. * * @param string $context Redirect context, eg: create, update, delete - * @param \October\Rain\Database\Model|\October\Rain\Halcyon\Model $model The active model to parse in it's ID and attributes. + * @param \Winter\Storm\Database\Model|\Winter\Storm\Halcyon\Model $model The active model to parse in it's ID and attributes. * @return \Illuminate\Http\RedirectResponse */ public function makeRedirect($context = null, $model = null) @@ -562,7 +562,7 @@ class FormController extends ControllerBehavior * formRenderPreview() ?> * * @return string The form HTML markup. - * @throws \October\Rain\Exception\ApplicationException if the Form Widget isn't set + * @throws \Winter\Storm\Exception\ApplicationException if the Form Widget isn't set */ public function formRenderPreview() { @@ -591,7 +591,7 @@ class FormController extends ControllerBehavior * formRenderOutsideFields() ?> * * @return string HTML markup - * @throws \October\Rain\Exception\ApplicationException if the Form Widget isn't set + * @throws \Winter\Storm\Exception\ApplicationException if the Form Widget isn't set */ public function formRenderOutsideFields() { @@ -620,7 +620,7 @@ class FormController extends ControllerBehavior * formRenderPrimaryTabs() ?> * * @return string HTML markup - * @throws \October\Rain\Exception\ApplicationException if the Form Widget isn't set + * @throws \Winter\Storm\Exception\ApplicationException if the Form Widget isn't set */ public function formRenderPrimaryTabs() { @@ -701,7 +701,7 @@ class FormController extends ControllerBehavior /** * Called before the creation or updating form is saved. - * @param \October\Rain\Database\Model|\October\Rain\Halcyon\Model + * @param \Winter\Storm\Database\Model|\Winter\Storm\Halcyon\Model */ public function formBeforeSave($model) { @@ -709,7 +709,7 @@ class FormController extends ControllerBehavior /** * Called after the creation or updating form is saved. - * @param \October\Rain\Database\Model|\October\Rain\Halcyon\Model + * @param \Winter\Storm\Database\Model|\Winter\Storm\Halcyon\Model */ public function formAfterSave($model) { @@ -717,7 +717,7 @@ class FormController extends ControllerBehavior /** * Called before the creation form is saved. - * @param \October\Rain\Database\Model|\October\Rain\Halcyon\Model + * @param \Winter\Storm\Database\Model|\Winter\Storm\Halcyon\Model */ public function formBeforeCreate($model) { @@ -725,7 +725,7 @@ class FormController extends ControllerBehavior /** * Called after the creation form is saved. - * @param \October\Rain\Database\Model|\October\Rain\Halcyon\Model + * @param \Winter\Storm\Database\Model|\Winter\Storm\Halcyon\Model */ public function formAfterCreate($model) { @@ -733,7 +733,7 @@ class FormController extends ControllerBehavior /** * Called before the updating form is saved. - * @param \October\Rain\Database\Model|\October\Rain\Halcyon\Model + * @param \Winter\Storm\Database\Model|\Winter\Storm\Halcyon\Model */ public function formBeforeUpdate($model) { @@ -741,7 +741,7 @@ class FormController extends ControllerBehavior /** * Called after the updating form is saved. - * @param \October\Rain\Database\Model|\October\Rain\Halcyon\Model + * @param \Winter\Storm\Database\Model|\Winter\Storm\Halcyon\Model */ public function formAfterUpdate($model) { @@ -749,7 +749,7 @@ class FormController extends ControllerBehavior /** * Called after the form model is deleted. - * @param \October\Rain\Database\Model|\October\Rain\Halcyon\Model + * @param \Winter\Storm\Database\Model|\Winter\Storm\Halcyon\Model */ public function formAfterDelete($model) { @@ -759,8 +759,8 @@ class FormController extends ControllerBehavior * Finds a Model record by its primary identifier, used by update actions. This logic * can be changed by overriding it in the controller. * @param string $recordId - * @return \October\Rain\Database\Model|\October\Rain\Halcyon\Model - * @throws \October\Rain\Exception\ApplicationException if the provided recordId is not found + * @return \Winter\Storm\Database\Model|\Winter\Storm\Halcyon\Model + * @throws \Winter\Storm\Exception\ApplicationException if the provided recordId is not found */ public function formFindModelObject($recordId) { @@ -791,7 +791,7 @@ class FormController extends ControllerBehavior /** * Creates a new instance of a form model. This logic can be changed * by overriding it in the controller. - * @return \October\Rain\Database\Model|\October\Rain\Halcyon\Model + * @return \Winter\Storm\Database\Model|\Winter\Storm\Halcyon\Model */ public function formCreateModelObject() { @@ -850,8 +850,8 @@ class FormController extends ControllerBehavior /** * Extend supplied model used by create and update actions, the model can * be altered by overriding it in the controller. - * @param \October\Rain\Database\Model|\October\Rain\Halcyon\Model $model - * @return \October\Rain\Database\Model|\October\Rain\Halcyon\Model|void + * @param \Winter\Storm\Database\Model|\Winter\Storm\Halcyon\Model $model + * @return \Winter\Storm\Database\Model|\Winter\Storm\Halcyon\Model|void */ public function formExtendModel($model) { @@ -860,7 +860,7 @@ class FormController extends ControllerBehavior /** * Extend the query used for finding the form model. Extra conditions * can be applied to the query, for example, $query->withTrashed(); - * @param \October\Rain\Database\Builder|\October\Rain\Halcyon\Builder $query + * @param \Winter\Storm\Database\Builder|\Winter\Storm\Halcyon\Builder $query * @return void */ public function formExtendQuery($query) diff --git a/modules/backend/behaviors/ImportExportController.php b/modules/backend/behaviors/ImportExportController.php index 0af1497ac..7419d7a85 100644 --- a/modules/backend/behaviors/ImportExportController.php +++ b/modules/backend/behaviors/ImportExportController.php @@ -31,7 +31,7 @@ use Exception; * values as either a YAML file, located in the controller view directory, * or directly as a PHP array. * - * @package october\backend + * @package winter\wn-backend-module * @author Alexey Bobkov, Samuel Georges */ class ImportExportController extends ControllerBehavior @@ -149,7 +149,7 @@ class ImportExportController extends ControllerBehavior return $response; } - $this->addJs('js/october.import.js', 'core'); + $this->addJs('js/winter.import.js', 'core'); $this->addCss('css/import.css', 'core'); $this->controller->pageTitle = $this->controller->pageTitle @@ -168,7 +168,7 @@ class ImportExportController extends ControllerBehavior return $response; } - $this->addJs('js/october.export.js', 'core'); + $this->addJs('js/winter.export.js', 'core'); $this->addCss('css/export.css', 'core'); $this->controller->pageTitle = $this->controller->pageTitle diff --git a/modules/backend/behaviors/ListController.php b/modules/backend/behaviors/ListController.php index 903fb71fd..936bd0045 100644 --- a/modules/backend/behaviors/ListController.php +++ b/modules/backend/behaviors/ListController.php @@ -21,7 +21,7 @@ use Backend\Classes\ControllerBehavior; * values as either a YAML file, located in the controller view directory, * or directly as a PHP array. * - * @package october\backend + * @package winter\wn-backend-module * @author Alexey Bobkov, Samuel Georges */ class ListController extends ControllerBehavior @@ -290,7 +290,7 @@ class ListController extends ControllerBehavior /** * Bulk delete records. * @return void - * @throws \October\Rain\Exception\ApplicationException when the parent definition is missing. + * @throws \Winter\Storm\Exception\ApplicationException when the parent definition is missing. */ public function index_onDelete() { @@ -370,7 +370,7 @@ class ListController extends ControllerBehavior * Renders the widget collection. * @param string $definition Optional list definition. * @return string Rendered HTML for the list. - * @throws \October\Rain\Exception\ApplicationException when there are no list widgets set. + * @throws \Winter\Storm\Exception\ApplicationException when there are no list widgets set. */ public function listRender($definition = null) { @@ -491,9 +491,9 @@ class ListController extends ControllerBehavior /** * Controller override: Extend supplied model - * @param \October\Rain\Database\Model $model + * @param \Winter\Storm\Database\Model $model * @param string|null $definition - * @return \October\Rain\Database\Model + * @return \Winter\Storm\Database\Model */ public function listExtendModel($model, $definition = null) { @@ -503,7 +503,7 @@ class ListController extends ControllerBehavior /** * Controller override: Extend the query used for populating the list * before the default query is processed. - * @param \October\Rain\Database\Builder $query + * @param \Winter\Storm\Database\Builder $query * @param string|null $definition */ public function listExtendQueryBefore($query, $definition = null) @@ -513,7 +513,7 @@ class ListController extends ControllerBehavior /** * Controller override: Extend the query used for populating the list * after the default query is processed. - * @param \October\Rain\Database\Builder $query + * @param \Winter\Storm\Database\Builder $query * @param string|null $definition */ public function listExtendQuery($query, $definition = null) @@ -533,7 +533,7 @@ class ListController extends ControllerBehavior /** * Controller override: Extend the query used for populating the filter * options before the default query is processed. - * @param \October\Rain\Database\Builder $query + * @param \Winter\Storm\Database\Builder $query * @param array $scope */ public function listFilterExtendQuery($query, $scope) @@ -542,7 +542,7 @@ class ListController extends ControllerBehavior /** * Returns a CSS class name for a list row (). - * @param \October\Rain\Database\Model $record The populated model used for the column + * @param \Winter\Storm\Database\Model $record The populated model used for the column * @param string|null $definition List definition (optional) * @return string|void CSS class name */ @@ -552,7 +552,7 @@ class ListController extends ControllerBehavior /** * Replace a table column value (...) - * @param \October\Rain\Database\Model $record The populated model used for the column + * @param \Winter\Storm\Database\Model $record The populated model used for the column * @param string $columnName The column name to override * @param string|null $definition List definition (optional) * @return string|void HTML view diff --git a/modules/backend/behaviors/RelationController.php b/modules/backend/behaviors/RelationController.php index 88ef54ff4..f17b6d759 100644 --- a/modules/backend/behaviors/RelationController.php +++ b/modules/backend/behaviors/RelationController.php @@ -5,7 +5,7 @@ use Lang; use Request; use Form as FormHelper; use Backend\Classes\ControllerBehavior; -use October\Rain\Database\Model; +use Winter\Storm\Database\Model; use ApplicationException; /** @@ -23,7 +23,7 @@ use ApplicationException; * values as either a YAML file, located in the controller view directory, * or directly as a PHP array. * - * @package october\backend + * @package winter\wn-backend-module * @author Alexey Bobkov, Samuel Georges */ class RelationController extends ControllerBehavior @@ -223,7 +223,7 @@ class RelationController extends ControllerBehavior { parent::__construct($controller); - $this->addJs('js/october.relation.js', 'core'); + $this->addJs('js/winter.relation.js', 'core'); $this->addCss('css/relation.css', 'core'); /* @@ -824,18 +824,18 @@ class RelationController extends ControllerBehavior if ($this->viewMode == 'single') { $config->showCheckboxes = false; $config->recordOnClick = sprintf( - "$.oc.relationBehavior.clickManageListRecord(':%s', '%s', '%s')", + "$.wn.relationBehavior.clickManageListRecord(':%s', '%s', '%s')", $this->relationModel->getKeyName(), $this->relationGetId(), $this->relationGetSessionKey() ); } elseif ($config->showCheckboxes) { - $config->recordOnClick = "$.oc.relationBehavior.toggleListCheckbox(this)"; + $config->recordOnClick = "$.wn.relationBehavior.toggleListCheckbox(this)"; } elseif ($isPivot) { $config->recordOnClick = sprintf( - "$.oc.relationBehavior.clickManagePivotListRecord(':%s', '%s', '%s')", + "$.wn.relationBehavior.clickManagePivotListRecord(':%s', '%s', '%s')", $this->relationModel->getKeyName(), $this->relationGetId(), $this->relationGetSessionKey() @@ -1416,7 +1416,7 @@ class RelationController extends ControllerBehavior * Provides an opportunity to manipulate the field configuration. * @param object $config * @param string $field - * @param \October\Rain\Database\Model $model + * @param \Winter\Storm\Database\Model $model */ public function relationExtendConfig($config, $field, $model) { @@ -1426,7 +1426,7 @@ class RelationController extends ControllerBehavior * Provides an opportunity to manipulate the view widget. * @param Backend\Classes\WidgetBase $widget * @param string $field - * @param \October\Rain\Database\Model $model + * @param \Winter\Storm\Database\Model $model */ public function relationExtendViewWidget($widget, $field, $model) { @@ -1436,7 +1436,7 @@ class RelationController extends ControllerBehavior * Provides an opportunity to manipulate the manage widget. * @param Backend\Classes\WidgetBase $widget * @param string $field - * @param \October\Rain\Database\Model $model + * @param \Winter\Storm\Database\Model $model */ public function relationExtendManageWidget($widget, $field, $model) { @@ -1446,7 +1446,7 @@ class RelationController extends ControllerBehavior * Provides an opportunity to manipulate the pivot widget. * @param Backend\Classes\WidgetBase $widget * @param string $field - * @param \October\Rain\Database\Model $model + * @param \Winter\Storm\Database\Model $model */ public function relationExtendPivotWidget($widget, $field, $model) { @@ -1456,7 +1456,7 @@ class RelationController extends ControllerBehavior * Provides an opportunity to manipulate the manage filter widget. * @param \Backend\Widgets\Filter $widget * @param string $field - * @param \October\Rain\Database\Model $model + * @param \Winter\Storm\Database\Model $model */ public function relationExtendManageFilterWidget($widget, $field, $model) { @@ -1466,7 +1466,7 @@ class RelationController extends ControllerBehavior * Provides an opportunity to manipulate the view filter widget. * @param \Backend\Widgets\Filter $widget * @param string $field - * @param \October\Rain\Database\Model $model + * @param \Winter\Storm\Database\Model $model */ public function relationExtendViewFilterWidget($widget, $field, $model) { diff --git a/modules/backend/behaviors/ReorderController.php b/modules/backend/behaviors/ReorderController.php index 4b9681972..35e31cf71 100644 --- a/modules/backend/behaviors/ReorderController.php +++ b/modules/backend/behaviors/ReorderController.php @@ -20,7 +20,7 @@ use Backend\Classes\ControllerBehavior; * values as either a YAML file, located in the controller view directory, * or directly as a PHP array. * - * @package october\backend + * @package winter\wn-backend-module * @author Alexey Bobkov, Samuel Georges */ class ReorderController extends ControllerBehavior @@ -57,8 +57,8 @@ class ReorderController extends ControllerBehavior /** * @var string Reordering mode: - * - simple: October\Rain\Database\Traits\Sortable - * - nested: October\Rain\Database\Traits\NestedTree + * - simple: Winter\Storm\Database\Traits\Sortable + * - nested: Winter\Storm\Database\Traits\NestedTree */ protected $sortMode; @@ -99,7 +99,7 @@ class ReorderController extends ControllerBehavior public function reorder() { - $this->addJs('js/october.reorder.js', 'core'); + $this->addJs('js/winter.reorder.js', 'core'); $this->controller->pageTitle = $this->controller->pageTitle ?: Lang::get($this->getConfig('title', 'backend::lang.reorder.default_title')); @@ -259,7 +259,7 @@ class ReorderController extends ControllerBehavior /** * Extend the query used for finding reorder records. Extra conditions * can be applied to the query, for example, $query->withTrashed(); - * @param October\Rain\Database\Builder $query + * @param Winter\Storm\Database\Builder $query * @return void */ public function reorderExtendQuery($query) diff --git a/modules/backend/behaviors/importexportcontroller/TranscodeFilter.php b/modules/backend/behaviors/importexportcontroller/TranscodeFilter.php index 93f99c1ae..bc683d600 100644 --- a/modules/backend/behaviors/importexportcontroller/TranscodeFilter.php +++ b/modules/backend/behaviors/importexportcontroller/TranscodeFilter.php @@ -11,7 +11,7 @@ stream_filter_register(TranscodeFilter::FILTER_NAME . "*", TranscodeFilter::clas */ class TranscodeFilter extends php_user_filter { - const FILTER_NAME = 'october.csv.transcode.'; + const FILTER_NAME = 'winter.csv.transcode.'; protected $encodingFrom = 'auto'; diff --git a/modules/backend/behaviors/importexportcontroller/assets/js/october.export.js b/modules/backend/behaviors/importexportcontroller/assets/js/winter.export.js similarity index 91% rename from modules/backend/behaviors/importexportcontroller/assets/js/october.export.js rename to modules/backend/behaviors/importexportcontroller/assets/js/winter.export.js index b6f8dd58b..6c95050c7 100644 --- a/modules/backend/behaviors/importexportcontroller/assets/js/october.export.js +++ b/modules/backend/behaviors/importexportcontroller/assets/js/winter.export.js @@ -18,5 +18,5 @@ } - $.oc.exportBehavior = new ExportBehavior; + $.wn.exportBehavior = new ExportBehavior; }(window.jQuery); \ No newline at end of file diff --git a/modules/backend/behaviors/importexportcontroller/assets/js/october.import.js b/modules/backend/behaviors/importexportcontroller/assets/js/winter.import.js similarity index 99% rename from modules/backend/behaviors/importexportcontroller/assets/js/october.import.js rename to modules/backend/behaviors/importexportcontroller/assets/js/winter.import.js index 6c2eb9e2b..ef6a38578 100644 --- a/modules/backend/behaviors/importexportcontroller/assets/js/october.import.js +++ b/modules/backend/behaviors/importexportcontroller/assets/js/winter.import.js @@ -145,5 +145,5 @@ } } - $.oc.importBehavior = new ImportBehavior; + $.wn.importBehavior = new ImportBehavior; }(window.jQuery); \ No newline at end of file diff --git a/modules/backend/behaviors/importexportcontroller/partials/_column_sample_form.htm b/modules/backend/behaviors/importexportcontroller/partials/_column_sample_form.htm index 9dfbf6622..c7d232a4e 100644 --- a/modules/backend/behaviors/importexportcontroller/partials/_column_sample_form.htm +++ b/modules/backend/behaviors/importexportcontroller/partials/_column_sample_form.htm @@ -11,7 +11,7 @@
    -
  • +
  • diff --git a/modules/backend/behaviors/importexportcontroller/partials/_export_form.htm b/modules/backend/behaviors/importexportcontroller/partials/_export_form.htm index f98f261f6..47ab7e6a8 100644 --- a/modules/backend/behaviors/importexportcontroller/partials/_export_form.htm +++ b/modules/backend/behaviors/importexportcontroller/partials/_export_form.htm @@ -24,7 +24,7 @@ diff --git a/modules/backend/behaviors/importexportcontroller/partials/_import_db_columns.htm b/modules/backend/behaviors/importexportcontroller/partials/_import_db_columns.htm index 00eeef412..256d8ee9e 100644 --- a/modules/backend/behaviors/importexportcontroller/partials/_import_db_columns.htm +++ b/modules/backend/behaviors/importexportcontroller/partials/_import_db_columns.htm @@ -19,5 +19,5 @@
\ No newline at end of file diff --git a/modules/backend/behaviors/importexportcontroller/partials/_import_file_columns.htm b/modules/backend/behaviors/importexportcontroller/partials/_import_file_columns.htm index b221e5487..d64883ced 100644 --- a/modules/backend/behaviors/importexportcontroller/partials/_import_file_columns.htm +++ b/modules/backend/behaviors/importexportcontroller/partials/_import_file_columns.htm @@ -13,14 +13,14 @@ data-delay="300" data-placement="right" title="" - onclick="$.oc.importBehavior.ignoreFileColumn(this)" + onclick="$.wn.importBehavior.ignoreFileColumn(this)" > @@ -40,5 +40,5 @@
diff --git a/modules/backend/behaviors/importexportcontroller/partials/_import_form.htm b/modules/backend/behaviors/importexportcontroller/partials/_import_form.htm index 220879dff..daa43fe2c 100644 --- a/modules/backend/behaviors/importexportcontroller/partials/_import_form.htm +++ b/modules/backend/behaviors/importexportcontroller/partials/_import_form.htm @@ -24,7 +24,7 @@ diff --git a/modules/backend/behaviors/importexportcontroller/partials/_import_toolbar.htm b/modules/backend/behaviors/importexportcontroller/partials/_import_toolbar.htm index f7b3e0b9d..db503c474 100644 --- a/modules/backend/behaviors/importexportcontroller/partials/_import_toolbar.htm +++ b/modules/backend/behaviors/importexportcontroller/partials/_import_toolbar.htm @@ -2,15 +2,15 @@ + class="btn btn-sm btn-secondary wn-icon-eye disabled" + onclick="$.wn.importBehavior.showIgnoredColumns()"> + class="btn btn-sm btn-secondary wn-icon-bullseye" + onclick="$.wn.importBehavior.autoMatchColumns()">
diff --git a/modules/backend/behaviors/relationcontroller/assets/js/october.relation.js b/modules/backend/behaviors/relationcontroller/assets/js/winter.relation.js similarity index 98% rename from modules/backend/behaviors/relationcontroller/assets/js/october.relation.js rename to modules/backend/behaviors/relationcontroller/assets/js/winter.relation.js index 126e39284..5af54ebee 100644 --- a/modules/backend/behaviors/relationcontroller/assets/js/october.relation.js +++ b/modules/backend/behaviors/relationcontroller/assets/js/winter.relation.js @@ -96,5 +96,5 @@ } - $.oc.relationBehavior = new RelationBehavior; + $.wn.relationBehavior = new RelationBehavior; }(window.jQuery); diff --git a/modules/backend/behaviors/relationcontroller/partials/_button_add.htm b/modules/backend/behaviors/relationcontroller/partials/_button_add.htm index 6939b3bc3..08da269f2 100644 --- a/modules/backend/behaviors/relationcontroller/partials/_button_add.htm +++ b/modules/backend/behaviors/relationcontroller/partials/_button_add.htm @@ -3,6 +3,6 @@ data-size="huge" data-handler="onRelationButtonAdd" href="javascript:;" - class="btn btn-sm btn-secondary oc-icon-plus"> + class="btn btn-sm btn-secondary wn-icon-plus"> trans($relationLabel)])) ?> diff --git a/modules/backend/behaviors/relationcontroller/partials/_button_create.htm b/modules/backend/behaviors/relationcontroller/partials/_button_create.htm index d7d3569df..b2080b102 100644 --- a/modules/backend/behaviors/relationcontroller/partials/_button_create.htm +++ b/modules/backend/behaviors/relationcontroller/partials/_button_create.htm @@ -3,6 +3,6 @@ data-size="huge" data-handler="onRelationButtonCreate" href="javascript:;" - class="btn btn-sm btn-secondary oc-icon-file"> + class="btn btn-sm btn-secondary wn-icon-file"> trans($relationLabel)])) ?> diff --git a/modules/backend/behaviors/relationcontroller/partials/_button_delete.htm b/modules/backend/behaviors/relationcontroller/partials/_button_delete.htm index d8fd4ff6b..5e7b02039 100644 --- a/modules/backend/behaviors/relationcontroller/partials/_button_delete.htm +++ b/modules/backend/behaviors/relationcontroller/partials/_button_delete.htm @@ -1,22 +1,22 @@
diff --git a/modules/backend/classes/AuthManager.php b/modules/backend/classes/AuthManager.php index 85a59ae2f..982a71e54 100644 --- a/modules/backend/classes/AuthManager.php +++ b/modules/backend/classes/AuthManager.php @@ -2,16 +2,16 @@ use Config; use System\Classes\PluginManager; -use October\Rain\Auth\Manager as RainAuthManager; -use October\Rain\Exception\SystemException; +use Winter\Storm\Auth\Manager as StormAuthManager; +use Winter\Storm\Exception\SystemException; /** * Back-end authentication manager. * - * @package october\backend + * @package winter\wn-backend-module * @author Alexey Bobkov, Samuel Georges */ -class AuthManager extends RainAuthManager +class AuthManager extends StormAuthManager { protected static $instance; @@ -47,6 +47,11 @@ class AuthManager extends RainAuthManager */ protected $permissions = []; + /** + * @var array List of owner aliases. ['Aliased.Owner' => 'Real.Owner'] + */ + protected $aliases = []; + /** * @var array List of registered permission roles. */ @@ -94,14 +99,32 @@ class AuthManager extends RainAuthManager */ public function registerPermissions($owner, array $definitions) { + // Resolve alias + $owner = $this->aliases[$owner] ?? $owner; + foreach ($definitions as $code => $definition) { - $permission = (object)array_merge(self::$permissionDefaults, array_merge($definition, [ + $permission = (object) array_merge(self::$permissionDefaults, array_merge($definition, [ 'code' => $code, 'owner' => $owner ])); $this->permissions[] = $permission; } + + // Clear the permission cache + $this->permissionCache = false; + } + + /** + * Register a permission owner alias + * + * @param string $owner The owner to register an alias for. Example: Real.Owner + * @param string $alias The alias to register. Example: Aliased.Owner + * @return void + */ + public function registerPermissionOwnerAlias(string $owner, string $alias) + { + $this->aliases[$alias] = $owner; } /** @@ -116,6 +139,9 @@ class AuthManager extends RainAuthManager throw new SystemException('Unable to remove permissions before they are loaded.'); } + // Resolve alias + $owner = $this->aliases[$owner] ?? $owner; + $ownerPermissions = array_filter($this->permissions, function ($permission) use ($owner) { return $permission->owner === $owner; }); @@ -125,6 +151,9 @@ class AuthManager extends RainAuthManager unset($this->permissions[$key]); } } + + // Clear the permission cache + $this->permissionCache = false; } /** diff --git a/modules/backend/classes/BackendController.php b/modules/backend/classes/BackendController.php index 33a312652..88d6ff3f5 100644 --- a/modules/backend/classes/BackendController.php +++ b/modules/backend/classes/BackendController.php @@ -9,7 +9,7 @@ use Config; use Request; use Response; use Illuminate\Routing\Controller as ControllerBase; -use October\Rain\Router\Helper as RouterHelper; +use Winter\Storm\Router\Helper as RouterHelper; use System\Classes\PluginManager; use Closure; @@ -23,12 +23,12 @@ use Closure; * for the `Posts` controller inside the `Acme.Blog` plugin. * * @see Backend\Classes\Controller Base class for back-end controllers - * @package october\backend + * @package winter\wn-backend-module * @author Alexey Bobkov, Samuel Georges */ class BackendController extends ControllerBase { - use \October\Rain\Extension\ExtendableTrait; + use \Winter\Storm\Extension\ExtendableTrait; /** * @var array Behaviors implemented by this controller. diff --git a/modules/backend/classes/Controller.php b/modules/backend/classes/Controller.php index a0790ed2e..a9d73f13c 100644 --- a/modules/backend/classes/Controller.php +++ b/modules/backend/classes/Controller.php @@ -15,10 +15,10 @@ use BackendAuth; use Backend\Models\UserPreference; use Backend\Models\Preference as BackendPreference; use Backend\Widgets\MediaManager; -use October\Rain\Exception\AjaxException; -use October\Rain\Exception\SystemException; -use October\Rain\Exception\ValidationException; -use October\Rain\Exception\ApplicationException; +use Winter\Storm\Exception\AjaxException; +use Winter\Storm\Exception\SystemException; +use Winter\Storm\Exception\ValidationException; +use Winter\Storm\Exception\ApplicationException; use Illuminate\Database\Eloquent\MassAssignmentException; use Illuminate\Http\RedirectResponse; use Illuminate\Routing\Controller as ControllerBase; @@ -27,7 +27,7 @@ use Illuminate\Routing\Controller as ControllerBase; * The Backend base controller class, used by Backend controllers. * The base controller services back end pages. * - * @package october\backend + * @package winter\wn-backend-module * @author Alexey Bobkov, Samuel Georges */ class Controller extends ControllerBase @@ -40,7 +40,7 @@ class Controller extends ControllerBase use \System\Traits\SecurityController; use \Backend\Traits\ErrorMaker; use \Backend\Traits\WidgetMaker; - use \October\Rain\Extension\ExtendableTrait; + use \Winter\Storm\Extension\ExtendableTrait; /** * @var array Behaviors implemented by this controller. @@ -432,7 +432,7 @@ class Controller extends ControllerBase return null; } - if ($handler = Request::header('X_OCTOBER_REQUEST_HANDLER')) { + if ($handler = Request::header('X_WINTER_REQUEST_HANDLER')) { return trim($handler); } @@ -457,7 +457,7 @@ class Controller extends ControllerBase /* * Validate the handler partial list */ - if ($partialList = trim(Request::header('X_OCTOBER_REQUEST_PARTIALS'))) { + if ($partialList = trim(Request::header('X_WINTER_REQUEST_PARTIALS'))) { $partialList = explode('&', $partialList); foreach ($partialList as $partial) { @@ -491,7 +491,7 @@ class Controller extends ControllerBase * framework.js knows to redirect the browser and not the request! */ if ($result instanceof RedirectResponse) { - $responseContents['X_OCTOBER_REDIRECT'] = $result->getTargetUrl(); + $responseContents['X_WINTER_REDIRECT'] = $result->getTargetUrl(); $result = null; } /* @@ -505,7 +505,7 @@ class Controller extends ControllerBase * Detect assets */ if ($this->hasAssetsDefined()) { - $responseContents['X_OCTOBER_ASSETS'] = $this->getAssetPaths(); + $responseContents['X_WINTER_ASSETS'] = $this->getAssetPaths(); } /* @@ -532,7 +532,7 @@ class Controller extends ControllerBase Flash::error($ex->getMessage()); $responseContents = []; $responseContents['#layout-flash-messages'] = $this->makeLayoutPartial('flash_messages'); - $responseContents['X_OCTOBER_ERROR_FIELDS'] = $ex->getFields(); + $responseContents['X_WINTER_ERROR_FIELDS'] = $ex->getFields(); throw new AjaxException($responseContents); } catch (MassAssignmentException $ex) { diff --git a/modules/backend/classes/ControllerBehavior.php b/modules/backend/classes/ControllerBehavior.php index 1df06bd48..9b7dbee16 100644 --- a/modules/backend/classes/ControllerBehavior.php +++ b/modules/backend/classes/ControllerBehavior.php @@ -2,14 +2,14 @@ use Lang; use ApplicationException; -use October\Rain\Extension\ExtensionBase; +use Winter\Storm\Extension\ExtensionBase; use System\Traits\ViewMaker; -use October\Rain\Html\Helper as HtmlHelper; +use Winter\Storm\Html\Helper as HtmlHelper; /** * Controller Behavior base class * - * @package october\backend + * @package winter\wn-backend-module * @author Alexey Bobkov, Samuel Georges */ class ControllerBehavior extends ExtensionBase diff --git a/modules/backend/classes/FilterScope.php b/modules/backend/classes/FilterScope.php index bf5d062fb..6a58852ae 100644 --- a/modules/backend/classes/FilterScope.php +++ b/modules/backend/classes/FilterScope.php @@ -1,12 +1,12 @@ 'Real.Owner'] + */ + protected $aliases = []; + /** * @var MainMenuItem[] List of registered items. */ @@ -223,6 +228,18 @@ class NavigationManager $this->addMainMenuItems($owner, $definitions); } + /** + * Register an owner alias + * + * @param string $owner The owner to register an alias for. Example: Real.Owner + * @param string $alias The alias to register. Example: Aliased.Owner + * @return void + */ + public function registerOwnerAlias(string $owner, string $alias) + { + $this->aliases[$alias] = $owner; + } + /** * Dynamically add an array of main menu items * @param string $owner @@ -609,8 +626,8 @@ class NavigationManager } /** - * Sets the navigation context. - * The function sets the navigation owner. + * Sets the navigation context owner. + * * @param string $owner Specifies the navigation owner in the format Vendor/Module */ public function setContextOwner($owner) @@ -618,6 +635,14 @@ class NavigationManager $this->contextOwner = $owner; } + /** + * Gets the navigation context owner + */ + public function getContextOwner() + { + return $this->aliases[$this->contextOwner] ?? $this->contextOwner; + } + /** * Specifies a code of the main menu item in the current navigation context. * @param string $mainMenuItemCode Specifies the main menu item code @@ -639,7 +664,7 @@ class NavigationManager return (object)[ 'mainMenuCode' => $this->contextMainMenuItemCode, 'sideMenuCode' => $this->contextSideMenuItemCode, - 'owner' => $this->contextOwner + 'owner' => $this->getContextOwner(), ]; } @@ -660,7 +685,7 @@ class NavigationManager */ public function isMainMenuItemActive($item) { - return $this->contextOwner === $item->owner && $this->contextMainMenuItemCode === $item->code; + return $this->getContextOwner() === $item->owner && $this->contextMainMenuItemCode === $item->code; } /** @@ -691,7 +716,7 @@ class NavigationManager return true; } - return $this->contextOwner === $item->owner && $this->contextSideMenuItemCode === $item->code; + return $this->getContextOwner() === $item->owner && $this->contextSideMenuItemCode === $item->code; } /** @@ -716,6 +741,7 @@ class NavigationManager */ public function getContextSidenavPartial($owner, $mainMenuItemCode) { + $owner = $this->aliases[$owner] ?? $owner; $key = $owner.$mainMenuItemCode; return $this->contextSidenavPartials[$key] ?? null; @@ -752,6 +778,6 @@ class NavigationManager */ protected function makeItemKey($owner, $code) { - return strtoupper($owner).'.'.strtoupper($code); + return strtoupper($this->aliases[$owner] ?? $owner).'.'.strtoupper($code); } } diff --git a/modules/backend/classes/ReportWidgetBase.php b/modules/backend/classes/ReportWidgetBase.php index d37e180d1..ac7b091d8 100644 --- a/modules/backend/classes/ReportWidgetBase.php +++ b/modules/backend/classes/ReportWidgetBase.php @@ -4,7 +4,7 @@ * Report Widget base class * Report widgets are used inside the ReportContainer. * - * @package october\backend + * @package winter\wn-backend-module * @author Alexey Bobkov, Samuel Georges */ class ReportWidgetBase extends WidgetBase diff --git a/modules/backend/classes/Skin.php b/modules/backend/classes/Skin.php index e46865c3f..b64b83c0d 100644 --- a/modules/backend/classes/Skin.php +++ b/modules/backend/classes/Skin.php @@ -2,13 +2,13 @@ use File; use Config; -use October\Rain\Router\Helper as RouterHelper; +use Winter\Storm\Router\Helper as RouterHelper; /** * Skin Base class * Used for defining skins. * - * @package october\backend + * @package winter\wn-backend-module * @author Alexey Bobkov, Samuel Georges */ abstract class Skin diff --git a/modules/backend/classes/WidgetBase.php b/modules/backend/classes/WidgetBase.php index 3444b91ad..91f1ec57a 100644 --- a/modules/backend/classes/WidgetBase.php +++ b/modules/backend/classes/WidgetBase.php @@ -1,13 +1,13 @@ $formWidgetInfo]. @@ -240,7 +240,7 @@ class WidgetManager * Manually registers report widget for consideration. Usage: * * WidgetManager::registerReportWidgets(function ($manager) { - * $manager->registerReportWidget('RainLab\GoogleAnalytics\ReportWidgets\TrafficOverview', [ + * $manager->registerReportWidget('Winter\GoogleAnalytics\ReportWidgets\TrafficOverview', [ * 'name' => 'Google Analytics traffic overview', * 'context' => 'dashboard' * ]); diff --git a/modules/backend/composer.json b/modules/backend/composer.json index c199e9fe1..951735316 100644 --- a/modules/backend/composer.json +++ b/modules/backend/composer.json @@ -1,9 +1,9 @@ { - "name": "october/backend", - "type": "october-module", - "description": "Backend module for October CMS", - "homepage": "https://octobercms.com", - "keywords": ["october cms", "october", "backend"], + "name": "winter/wn-backend-module", + "type": "winter-module", + "description": "Backend module for Winter CMS", + "homepage": "https://wintercms.com", + "keywords": ["winter cms", "winter", "backend"], "license": "MIT", "authors": [ { @@ -18,7 +18,7 @@ }, { "name": "Luke Towers", - "email": "octobercms@luketowers.ca", + "email": "wintercms@luketowers.ca", "homepage": "https://luketowers.ca", "role": "Maintainer" } diff --git a/modules/backend/controllers/AccessLogs.php b/modules/backend/controllers/AccessLogs.php index 512048faf..8e437e8db 100644 --- a/modules/backend/controllers/AccessLogs.php +++ b/modules/backend/controllers/AccessLogs.php @@ -8,7 +8,7 @@ use System\Classes\SettingsManager; /** * Access Logs controller * - * @package october\system + * @package winter\wn-system-module * @author Alexey Bobkov, Samuel Georges */ class AccessLogs extends Controller @@ -37,8 +37,8 @@ class AccessLogs extends Controller { parent::__construct(); - BackendMenu::setContext('October.System', 'system', 'settings'); - SettingsManager::setContext('October.Backend', 'access_logs'); + BackendMenu::setContext('Winter.System', 'system', 'settings'); + SettingsManager::setContext('Winter.Backend', 'access_logs'); } public function index_onRefresh() diff --git a/modules/backend/controllers/Auth.php b/modules/backend/controllers/Auth.php index 003df9955..abe182250 100644 --- a/modules/backend/controllers/Auth.php +++ b/modules/backend/controllers/Auth.php @@ -13,12 +13,12 @@ use ApplicationException; use ValidationException; use Exception; use Config; -use October\Rain\Foundation\Http\Middleware\CheckForTrustedHost; +use Winter\Storm\Foundation\Http\Middleware\CheckForTrustedHost; /** * Authentication controller * - * @package october\backend + * @package winter\wn-backend-module * @author Alexey Bobkov, Samuel Georges * */ diff --git a/modules/backend/controllers/Files.php b/modules/backend/controllers/Files.php index adc5bcf32..ad9fd2b56 100644 --- a/modules/backend/controllers/Files.php +++ b/modules/backend/controllers/Files.php @@ -16,7 +16,7 @@ use Exception; * Used for delivering protected system files, and generating URLs * for accessing them. * - * @package october\backend + * @package winter\wn-backend-module * @author Alexey Bobkov, Samuel Georges * */ diff --git a/modules/backend/controllers/Index.php b/modules/backend/controllers/Index.php index 75a18eb3a..008ec1634 100644 --- a/modules/backend/controllers/Index.php +++ b/modules/backend/controllers/Index.php @@ -8,7 +8,7 @@ use Backend\Widgets\ReportContainer; /** * Dashboard controller * - * @package october\backend + * @package winter\wn-backend-module * @author Alexey Bobkov, Samuel Georges * */ @@ -29,7 +29,7 @@ class Index extends Controller { parent::__construct(); - BackendMenu::setContextOwner('October.Backend'); + BackendMenu::setContextOwner('Winter.Backend'); $this->addCss('/modules/backend/assets/css/dashboard/dashboard.css', 'core'); } diff --git a/modules/backend/controllers/Media.php b/modules/backend/controllers/Media.php index e8c8941bb..7a3a743e0 100644 --- a/modules/backend/controllers/Media.php +++ b/modules/backend/controllers/Media.php @@ -7,7 +7,7 @@ use Backend\Widgets\MediaManager; /** * Backend Media Manager * - * @package october\backend + * @package winter\wn-backend-module * @author Alexey Bobkov, Samuel Georges */ class Media extends Controller @@ -24,7 +24,7 @@ class Media extends Controller { parent::__construct(); - BackendMenu::setContext('October.Backend', 'media', true); + BackendMenu::setContext('Winter.Backend', 'media', true); $this->pageTitle = 'backend::lang.media.menu_label'; $manager = new MediaManager($this, 'manager'); diff --git a/modules/backend/controllers/Preferences.php b/modules/backend/controllers/Preferences.php index 1a9e25828..cce20becb 100644 --- a/modules/backend/controllers/Preferences.php +++ b/modules/backend/controllers/Preferences.php @@ -11,7 +11,7 @@ use Backend\Models\Preference as PreferenceModel; /** * Editor Settings controller * - * @package october\backend + * @package winter\wn-backend-module * @author Alexey Bobkov, Samuel Georges * */ @@ -42,8 +42,8 @@ class Preferences extends Controller $this->addJs('/modules/backend/formwidgets/codeeditor/assets/js/build-min.js', 'core'); $this->addJs('/modules/backend/assets/js/preferences/preferences.js', 'core'); - BackendMenu::setContext('October.System', 'system', 'mysettings'); - SettingsManager::setContext('October.Backend', 'preferences'); + BackendMenu::setContext('Winter.System', 'system', 'mysettings'); + SettingsManager::setContext('Winter.Backend', 'preferences'); } public function index() diff --git a/modules/backend/controllers/UserGroups.php b/modules/backend/controllers/UserGroups.php index ed5e4d3e2..e73c9a56e 100644 --- a/modules/backend/controllers/UserGroups.php +++ b/modules/backend/controllers/UserGroups.php @@ -7,7 +7,7 @@ use System\Classes\SettingsManager; /** * Backend user groups controller * - * @package october\backend + * @package winter\wn-backend-module * @author Alexey Bobkov, Samuel Georges * */ @@ -43,7 +43,7 @@ class UserGroups extends Controller { parent::__construct(); - BackendMenu::setContext('October.System', 'system', 'users'); - SettingsManager::setContext('October.System', 'administrators'); + BackendMenu::setContext('Winter.System', 'system', 'users'); + SettingsManager::setContext('Winter.System', 'administrators'); } } diff --git a/modules/backend/controllers/UserRoles.php b/modules/backend/controllers/UserRoles.php index bed79dbe9..cddc0b67e 100644 --- a/modules/backend/controllers/UserRoles.php +++ b/modules/backend/controllers/UserRoles.php @@ -9,7 +9,7 @@ use System\Classes\SettingsManager; /** * Backend user groups controller * - * @package october\backend + * @package winter\wn-backend-module * @author Alexey Bobkov, Samuel Georges * */ @@ -45,8 +45,8 @@ class UserRoles extends Controller { parent::__construct(); - BackendMenu::setContext('October.System', 'system', 'users'); - SettingsManager::setContext('October.System', 'administrators'); + BackendMenu::setContext('Winter.System', 'system', 'users'); + SettingsManager::setContext('Winter.System', 'administrators'); /* * Only super users can access diff --git a/modules/backend/controllers/Users.php b/modules/backend/controllers/Users.php index 3aa4f7e32..15bd175c6 100644 --- a/modules/backend/controllers/Users.php +++ b/modules/backend/controllers/Users.php @@ -14,7 +14,7 @@ use System\Classes\SettingsManager; /** * Backend user controller * - * @package october\backend + * @package winter\wn-backend-module * @author Alexey Bobkov, Samuel Georges * */ @@ -59,8 +59,8 @@ class Users extends Controller $this->requiredPermissions = null; } - BackendMenu::setContext('October.System', 'system', 'users'); - SettingsManager::setContext('October.System', 'administrators'); + BackendMenu::setContext('Winter.System', 'system', 'users'); + SettingsManager::setContext('Winter.System', 'administrators'); } /** @@ -168,7 +168,7 @@ class Users extends Controller */ public function myaccount() { - SettingsManager::setContext('October.Backend', 'myaccount'); + SettingsManager::setContext('Winter.Backend', 'myaccount'); $this->pageTitle = 'backend::lang.myaccount.menu_label'; return $this->update($this->user->id, 'myaccount'); diff --git a/modules/backend/controllers/accesslogs/_list_toolbar.htm b/modules/backend/controllers/accesslogs/_list_toolbar.htm index 5f9c7802e..81bfa643b 100644 --- a/modules/backend/controllers/accesslogs/_list_toolbar.htm +++ b/modules/backend/controllers/accesslogs/_list_toolbar.htm @@ -3,7 +3,7 @@ href="javascript:;" data-request="onRefresh" data-load-indicator="" - class="btn btn-primary oc-icon-refresh"> + class="btn btn-primary wn-icon-refresh">
diff --git a/modules/backend/controllers/auth/reset.htm b/modules/backend/controllers/auth/reset.htm index 6761a369f..279a899a7 100644 --- a/modules/backend/controllers/auth/reset.htm +++ b/modules/backend/controllers/auth/reset.htm @@ -6,7 +6,7 @@
-
+
-
+
-
+
-

+

diff --git a/modules/backend/controllers/usergroups/_list_toolbar.htm b/modules/backend/controllers/usergroups/_list_toolbar.htm index b1d2b38bc..bccd9620a 100644 --- a/modules/backend/controllers/usergroups/_list_toolbar.htm +++ b/modules/backend/controllers/usergroups/_list_toolbar.htm @@ -1,8 +1,8 @@

diff --git a/modules/backend/controllers/usergroups/update.htm b/modules/backend/controllers/usergroups/update.htm index 9efd8e6c2..fa1462dd3 100644 --- a/modules/backend/controllers/usergroups/update.htm +++ b/modules/backend/controllers/usergroups/update.htm @@ -38,7 +38,7 @@