├── resources ├── screenshots │ ├── disclosedassets.png │ └── subfolder-creation.png ├── js │ └── disclosedassets.js └── icon.svg ├── CHANGELOG.md ├── composer.json ├── translations └── en.php ├── .craftplugin ├── releases.json ├── LICENSE.txt ├── DisclosedAssetsPlugin.php └── README.md /resources/screenshots/disclosedassets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nystudio107/disclosedassets/master/resources/screenshots/disclosedassets.png -------------------------------------------------------------------------------- /resources/screenshots/subfolder-creation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nystudio107/disclosedassets/master/resources/screenshots/subfolder-creation.png -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Disclosed Assets Changelog 2 | 3 | ## 1.0.1 -- 2017-09-18 4 | ### Changed 5 | * Fixed an issue where sub-folders were visually disclosed, but not clickable 6 | 7 | ## 1.0.0 -- 2017-09-14 8 | 9 | * Initial release 10 | 11 | Brought to you by [nystudio107](https://nystudio107.com) 12 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nystudio107/disclosedassets", 3 | "description": "Allow your clients to find asset sub-folders by disclosing them by default", 4 | "type": "craft-plugin", 5 | "authors": [ 6 | { 7 | "name": "nystudio107", 8 | "homepage": "https://nystudio107.com" 9 | } 10 | ], 11 | "require": { 12 | "composer/installers": "~1.0" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /translations/en.php: -------------------------------------------------------------------------------- 1 | 'To this', 16 | ); 17 | -------------------------------------------------------------------------------- /.craftplugin: -------------------------------------------------------------------------------- 1 | {"pluginName":"Disclosed Assets","pluginDescription":"Allow your clients to find asset sub-folders by disclosing them by default","pluginVersion":"1.0.0","pluginAuthorName":"nystudio107","pluginAuthorUrl":"https://nystudio107.com","pluginAuthorGithub":"nystudio107","codeComments":"","pluginComponents":"","controllerName":"","elementName":"","fieldName":"","modelName":"","purchasableName":"","recordName":"","serviceName":"","taskName":"","widgetName":"","apiVersion":"api_version_2_5"} -------------------------------------------------------------------------------- /resources/js/disclosedassets.js: -------------------------------------------------------------------------------- 1 | // Disclose the all the things! 2 | $(document).ready(function() { 3 | var toggleState = false; 4 | $('div .toggle').click(); 5 | window.setTimeout(function(event) { 6 | if (Garnish.Modal.visibleModal) { 7 | if (!toggleState) { 8 | $('div .toggle').click(); 9 | toggleState = true; 10 | } 11 | } else { 12 | toggleState = false; 13 | } 14 | }, 1000); 15 | }); 16 | -------------------------------------------------------------------------------- /releases.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "version": "1.0.1", 4 | "downloadUrl": "https://github.com/nystudio107/disclosedassets/archive/master.zip", 5 | "date": "2017-09-18T21:43:54.479Z", 6 | "notes": [ 7 | "[Fixed] Fixed an issue where sub-folders were visually disclosed, but not clickable" 8 | ] 9 | }, 10 | { 11 | "version": "1.0.0", 12 | "downloadUrl": "https://github.com/nystudio107/disclosedassets/archive/master.zip", 13 | "date": "2017-09-14T21:43:54.479Z", 14 | "notes": [ 15 | "[Added] Initial release" 16 | ] 17 | } 18 | ] -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright (c) 2017 nystudio107 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 5 | 6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 7 | 8 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /resources/icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 9 | 11 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /DisclosedAssetsPlugin.php: -------------------------------------------------------------------------------- 1 | isConsole()) { 26 | if (craft()->request->isCpRequest() && craft()->userSession->isLoggedIn()) { 27 | craft()->templates->includeJsResource('disclosedassets/js/disclosedassets.js'); 28 | } 29 | } 30 | } 31 | 32 | /** 33 | * @return mixed 34 | */ 35 | public function getName() 36 | { 37 | return Craft::t('Disclosed Assets'); 38 | } 39 | 40 | /** 41 | * @return mixed 42 | */ 43 | public function getDescription() 44 | { 45 | return Craft::t('Allow your clients to find asset sub-folders by disclosing them by default'); 46 | } 47 | 48 | /** 49 | * @return string 50 | */ 51 | public function getDocumentationUrl() 52 | { 53 | return 'https://github.com/nystudio107/disclosedassets/blob/master/README.md'; 54 | } 55 | 56 | /** 57 | * @return string 58 | */ 59 | public function getReleaseFeedUrl() 60 | { 61 | return 'https://raw.githubusercontent.com/nystudio107/disclosedassets/master/releases.json'; 62 | } 63 | 64 | /** 65 | * @return string 66 | */ 67 | public function getVersion() 68 | { 69 | return '1.0.1'; 70 | } 71 | 72 | /** 73 | * @return string 74 | */ 75 | public function getSchemaVersion() 76 | { 77 | return '1.0.0'; 78 | } 79 | 80 | /** 81 | * @return string 82 | */ 83 | public function getDeveloper() 84 | { 85 | return 'nystudio107'; 86 | } 87 | 88 | /** 89 | * @return string 90 | */ 91 | public function getDeveloperUrl() 92 | { 93 | return 'https://nystudio107.com'; 94 | } 95 | 96 | /** 97 | * @return bool 98 | */ 99 | public function hasCpSection() 100 | { 101 | return false; 102 | } 103 | 104 | /** 105 | */ 106 | public function onBeforeInstall() 107 | { 108 | } 109 | 110 | /** 111 | */ 112 | public function onAfterInstall() 113 | { 114 | } 115 | 116 | /** 117 | */ 118 | public function onBeforeUninstall() 119 | { 120 | } 121 | 122 | /** 123 | */ 124 | public function onAfterUninstall() 125 | { 126 | } 127 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![No Maintenance Intended](http://unmaintained.tech/badge.svg)](http://unmaintained.tech/) 2 | 3 | # DEPRECATED 4 | 5 | This Craft CMS 2.x plugin is no longer supported, but it is fully functional, and you may continue to use it as you see fit. The license also allows you to fork it and make changes as needed for legacy support reasons. 6 | 7 | # Disclosed Assets plugin for Craft CMS 8 | 9 | Allow your clients to find asset sub-folders by disclosing them by default 10 | 11 | ![Screenshot](resources/screenshots/disclosedassets.png) 12 | 13 | ## Installation 14 | 15 | To install Disclosed Assets, follow these steps: 16 | 17 | 1. Download & unzip the file and place the `disclosedassets` directory into your `craft/plugins` directory 18 | 2. -OR- do a `git clone https://github.com/nystudio107/disclosedassets.git` directly into your `craft/plugins` folder. You can then update it with `git pull` 19 | 3. -OR- install with Composer via `composer require nystudio107/disclosedassets` 20 | 4. Install plugin in the Craft Control Panel under Settings > Plugins 21 | 5. The plugin folder should be named `disclosedassets` for Craft to see it. GitHub recently started appending `-master` (the branch name) to the name of the folder for zip file downloads. 22 | 23 | Disclosed Assets works on Craft 2.4.x, Craft 2.5.x and Craft 2.6.x. 24 | 25 | ## Disclosed Assets Overview 26 | 27 | Disclosed Assets is a simple plugin that just ensures any Assets sub-folders are always disclosed by default. Many times, clients don't see the small `>` disclosure symbol, or have any idea what it does. 28 | 29 | After Disclosed Assets is installed, all Assets sub-folders will be disclosed by default: 30 | 31 | ![Screenshot](resources/screenshots/disclosedassets.png) 32 | 33 | ## Configuring Disclosed Assets 34 | 35 | There's nothing to configure. 36 | 37 | ## Using Disclosed Assets 38 | 39 | To use it, just install it, and enjoy happy clients. 40 | 41 | Tip: to *create* sub-folders, Control- or right-click on the Asset source name. 42 | 43 | ![Screenshot](resources/screenshots/subfolder-creation.png) 44 | 45 | If you're using something like [craft-cpjs](https://github.com/lindseydiloreto/craft-cpjs), you can just add this line to your included AdminCP JavaScript to achieve the same effect that Disclosed Assets offers: 46 | 47 | ``` 48 | // Disclose the all the things! 49 | $(document).ready(function() { 50 | var toggleState = false; 51 | $('div .toggle').click(); 52 | window.setTimeout(function(event) { 53 | if (Garnish.Modal.visibleModal) { 54 | if (!toggleState) { 55 | $('div .toggle').click(); 56 | toggleState = true; 57 | } 58 | } else { 59 | toggleState = false; 60 | } 61 | }, 1000); 62 | }); 63 | ``` 64 | 65 | ## Disclosed Assets Roadmap 66 | 67 | Some things to do, and ideas for potential features: 68 | 69 | * Release it 70 | 71 | Brought to you by [nystudio107](https://nystudio107.com) 72 | --------------------------------------------------------------------------------