-
116 |
- All 117 |
This asset might be used by other pages!
144 |You can remove the image from this page,
145 | or you can delete the asset.
Deleting cannot be undone!
147 |├── .gitignore ├── README.md ├── assets ├── .DS_Store ├── css │ ├── .DS_Store │ ├── colorbox.css │ ├── dropzone.css │ ├── images │ │ ├── controls.png │ │ └── loading.gif │ ├── jquery-ui.css │ └── mgr.css ├── images │ ├── close-dialog.png │ ├── edit-icon.png │ ├── gif-load.gif │ ├── glyphicons-halflings-white.png │ ├── glyphicons-halflings.png │ ├── sort.png │ ├── trash-over.png │ └── trash.png └── js │ ├── .DS_Store │ ├── app.js │ ├── bootstrap.js │ ├── dropzone.js │ ├── form2js.js │ ├── handlebars.js │ ├── jcrop.js │ ├── jquery-ui.js │ ├── jquery.colorbox.js │ ├── jquery.js │ ├── jquery.min.js │ ├── jquery.quicksand.js │ ├── jquery.tabify.js │ └── multisortable.js ├── composer.json ├── controllers ├── .DS_Store ├── APIController.php ├── AssetController.php ├── BaseController.php ├── ErrorController.php ├── PageController.php ├── PageassetController.php └── index.class.php ├── docs ├── changelog.txt ├── license.txt └── readme.txt ├── elements ├── .DS_Store ├── plugins │ └── assetmanager.plugin.php └── snippets │ ├── .DS_Store │ ├── asset.php │ ├── getPageAssets.php │ ├── resize.php │ ├── scale2h.php │ ├── scale2w.php │ └── src.php ├── lexicon ├── .DS_Store └── en │ └── default.inc.php ├── model ├── .DS_Store ├── Snippet.php ├── assman │ ├── asset.class.php │ ├── metadata.mysql.php │ ├── mysql │ │ ├── asset.class.php │ │ ├── asset.map.inc.php │ │ ├── pageasset.class.php │ │ └── pageasset.map.inc.php │ └── pageasset.class.php ├── migrations │ ├── install.php │ └── uninstall.php ├── schema │ └── assman.mysql.schema.xml └── seeds │ ├── base │ ├── modContentType.php │ ├── modMenu.php │ └── modSystemSetting.php │ └── test │ └── Asset.php ├── phpunit.xml ├── tests ├── assetTest.php ├── assets │ └── image.jpg └── bootstrap.php └── views ├── error └── 404.php ├── footer.php ├── group └── manage.php ├── header.php └── main ├── assets.php ├── index.php ├── pageassets.tpl ├── pageassets_new.tpl ├── settings.php ├── test.html └── verify.php /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.lock 3 | *.DS_Store 4 | *.swp 5 | *.out 6 | composer.phar 7 | phpunit.phar 8 | vendor/ 9 | .idea/ 10 | .DS_Store 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Asset Manager 2 | ============= 3 | 4 | This Repository is no longer maintained. 5 | 6 | Asset Manager Media Library for MODX Revolution 7 | 8 | This package adds asset management functionality to MODX Revolution so you can easily upload and edit images and other assets and attach them to any MODX page. Because it stores all asset data in a custom database table, you can easily search for assets by complex criteria or manipulate the search queries for custom reporting. 9 | 10 | The end result of using the Asset Manager can be similar to adding multiple image Template Variables to a template (e.g. using MIGX), but the user interface and backend data model is cleaner. 11 | 12 | Requires PHP 5.3 or greater and MODX 2.3 (version 1.0 was compatible with MODX 2.2.14). 13 | 14 | 15 | ## Features: 16 | 17 | - Drag and drop images to upload them using Dropzone 18 | - Automatic detection of MIME-type and creation of MODX content types. 19 | - Galleries of Images 20 | - Output filters for easy image resizing (like pThumb, but better), including scale-to-width, scale-to-height, thumbnails and cropping. 21 | - Relies on standard Packagist packages to conduct image manipulation 22 | 23 |  24 | 25 | 26 | 27 | ## Thanks To 28 | 29 | This package would not be possible without the beautiful and brilliant work of other coders. 30 | 31 | - [Dropzone](https://www.dropzonejs.com/) -- a brilliant drag and drop file uploader with image previews. 32 | - [Quicksand](http://razorjack.net/quicksand/) -- a great sorting/animation jQuery library. 33 | - [jCrop](http://deepliquid.com/content/Jcrop.html) -- provides image cropping functionality. 34 | - [Placehold.it](https://placehold.it/) -- a quick and simple image placeholding service. 35 | 36 | 37 | ## Technical Note: 38 | 39 | The Asset Manager helps maintain an ordered folder structure for your images and other assets while 40 | keeping database records on those file assets. Images are not stored as binary data in the database, 41 | so it is critical that the database and the filesystem be kept in sync. Do not meddle around with the 42 | files on the filesystem that have been put in place by the Asset Manager! Doing so may break the URLs 43 | to your images. 44 | 45 | You are forced to use the UI to upload assets so that the database "knows" about the assets you have added. The Asset 46 | Manager won't "know" about an asset if you upload it manually (e.g. using SFTP). 47 | 48 | 49 | Author: everett@craftsmancoding.com 50 | -------------------------------------------------------------------------------- /assets/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craftsmancoding/assetmanager/44013717eff2a3c8f3ad35565a8a42fe00406caf/assets/.DS_Store -------------------------------------------------------------------------------- /assets/css/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craftsmancoding/assetmanager/44013717eff2a3c8f3ad35565a8a42fe00406caf/assets/css/.DS_Store -------------------------------------------------------------------------------- /assets/css/colorbox.css: -------------------------------------------------------------------------------- 1 | /* 2 | Colorbox Core Style: 3 | The following CSS is consistent between example themes and should not be altered. 4 | */ 5 | #colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;} 6 | #cboxWrapper {max-width:none;} 7 | #cboxOverlay{position:fixed; width:100%; height:100%;} 8 | #cboxMiddleLeft, #cboxBottomLeft{clear:left;} 9 | #cboxContent{position:relative;} 10 | #cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;} 11 | #cboxTitle{margin:0;} 12 | #cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;} 13 | #cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;} 14 | .cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none; -ms-interpolation-mode:bicubic;} 15 | .cboxIframe{width:100%; height:100%; display:block; border:0; padding:0; margin:0;} 16 | #colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;} 17 | 18 | /* 19 | User Style: 20 | Change the following styles to modify the appearance of Colorbox. They are 21 | ordered & tabbed in a way that represents the nesting of the generated HTML. 22 | */ 23 | #cboxOverlay{background:#29292c;opacity: 0.6 !important;} 24 | #colorbox{outline:0;} 25 | #cboxContent{margin-top:32px; overflow:visible; background:#000;} 26 | .cboxIframe{background:#fff;} 27 | #cboxError{padding:50px; border:1px solid #ccc;} 28 | #cboxLoadedContent{background:#000; padding:1px;} 29 | #cboxLoadingGraphic{background:url(images/loading.gif) no-repeat center center;} 30 | #cboxLoadingOverlay{background:#000;} 31 | #cboxTitle{position:absolute; top:-22px; left:0; color:#000;} 32 | #cboxCurrent{position:absolute; top:-22px; right:205px; text-indent:-9999px;} 33 | 34 | /* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */ 35 | #cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; text-indent:-9999px; width:20px; height:20px; position:absolute; top:-20px; background:url(images/controls.png) no-repeat 0 0;} 36 | 37 | /* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */ 38 | #cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;} 39 | 40 | #cboxPrevious{background-position:0px 0px; right:44px;} 41 | #cboxPrevious:hover{background-position:0px -25px;} 42 | #cboxNext{background-position:-25px 0px; right:22px;} 43 | #cboxNext:hover{background-position:-25px -25px;} 44 | #cboxClose{background-position:-50px 0px;right: 0px;} 45 | #cboxClose:hover{background-position:-50px -25px;} 46 | .cboxSlideshow_on #cboxPrevious, .cboxSlideshow_off #cboxPrevious{right:66px;} 47 | .cboxSlideshow_on #cboxSlideshow{background-position:-75px -25px; right:44px;} 48 | .cboxSlideshow_on #cboxSlideshow:hover{background-position:-100px -25px;} 49 | .cboxSlideshow_off #cboxSlideshow{background-position:-100px 0px; right:44px;} 50 | .cboxSlideshow_off #cboxSlideshow:hover{background-position:-75px -25px;} 51 | -------------------------------------------------------------------------------- /assets/css/dropzone.css: -------------------------------------------------------------------------------- 1 | /* The MIT License */ 2 | .dropzone-wrap { 3 | background: rgba(0,0,0,0.02); 4 | } 5 | .dropzone-previews, 6 | .dropzone-previews * { 7 | -webkit-box-sizing: border-box; 8 | -moz-box-sizing: border-box; 9 | box-sizing: border-box; 10 | } 11 | .dz-label { 12 | text-align: center; 13 | font-size: 16px; 14 | margin-top: 10px; 15 | color: #c7c7c7; 16 | font-size: 20px; 17 | display: block; 18 | float: left; 19 | font-weight: normal; 20 | } 21 | 22 | .dz-default{ 23 | color: #555; 24 | border: 1px solid #ccc; 25 | background: #fff; 26 | vertical-align: top; 27 | display: block; 28 | float: left; 29 | padding: 5px 20px; 30 | cursor: pointer; 31 | margin-left: 15px; 32 | border-radius: 3px; 33 | -moz-border-radius: 3px; 34 | -webkit-border-radius: 3px; 35 | margin-top: 4px; 36 | } 37 | 38 | .dz-default:hover { 39 | -webkit-box-shadow: inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08); 40 | box-shadow: inset 0 1px 0 #fff,0 1px 0 rgba(0,0,0,.08); 41 | } 42 | 43 | .dropzone-wrap .dz-preview, 44 | .dropzone-previews .dz-preview { 45 | background: rgba(255,255,255,0.8); 46 | position: relative; 47 | display: inline-block; 48 | margin: 17px; 49 | vertical-align: top; 50 | border: 1px solid #acacac; 51 | padding: 6px 6px 6px 6px; 52 | } 53 | .dropzone-wrap .dz-preview.dz-file-preview [data-dz-thumbnail], 54 | .dropzone-previews .dz-preview.dz-file-preview [data-dz-thumbnail] { 55 | display: none; 56 | } 57 | .dropzone-wrap .dz-preview .dz-details, 58 | .dropzone-previews .dz-preview .dz-details { 59 | width: 100px; 60 | height: 100px; 61 | position: relative; 62 | background: #ebebeb; 63 | padding: 5px; 64 | margin-bottom: 22px; 65 | } 66 | .dropzone-wrap .dz-preview .dz-details .dz-filename, 67 | .dropzone-previews .dz-preview .dz-details .dz-filename { 68 | overflow: hidden; 69 | height: 100%; 70 | } 71 | .dropzone-wrap .dz-preview .dz-details img, 72 | .dropzone-previews .dz-preview .dz-details img { 73 | position: absolute; 74 | top: 0; 75 | left: 0; 76 | width: 100px; 77 | height: 100px; 78 | } 79 | .dropzone-wrap .dz-preview .dz-details .dz-size, 80 | .dropzone-previews .dz-preview .dz-details .dz-size { 81 | position: absolute; 82 | bottom: -28px; 83 | left: 3px; 84 | height: 28px; 85 | line-height: 28px; 86 | } 87 | .dropzone-wrap .dz-preview.dz-error .dz-error-mark, 88 | .dropzone-previews .dz-preview.dz-error .dz-error-mark { 89 | display: block; 90 | } 91 | .dropzone-wrap .dz-preview.dz-success .dz-success-mark, 92 | .dropzone-previews .dz-preview.dz-success .dz-success-mark { 93 | display: block; 94 | } 95 | .dropzone-wrap .dz-preview:hover .dz-details img, 96 | .dropzone-previews .dz-preview:hover .dz-details img { 97 | display: none; 98 | } 99 | .dropzone-wrap .dz-preview .dz-success-mark, 100 | .dropzone-previews .dz-preview .dz-success-mark, 101 | .dropzone-wrap .dz-preview .dz-error-mark, 102 | .dropzone-previews .dz-preview .dz-error-mark { 103 | display: none; 104 | position: absolute; 105 | width: 40px; 106 | height: 40px; 107 | font-size: 30px; 108 | text-align: center; 109 | right: -10px; 110 | top: -10px; 111 | } 112 | .dropzone-wrap .dz-preview .dz-success-mark, 113 | .dropzone-previews .dz-preview .dz-success-mark { 114 | color: #8cc657; 115 | } 116 | .dropzone-wrap .dz-preview .dz-error-mark, 117 | .dropzone-previews .dz-preview .dz-error-mark { 118 | color: #ee162d; 119 | } 120 | .dropzone-wrap .dz-preview .dz-progress, 121 | .dropzone-previews .dz-preview .dz-progress { 122 | position: absolute; 123 | top: 100px; 124 | left: 6px; 125 | right: 6px; 126 | height: 6px; 127 | background: #d7d7d7; 128 | display: none; 129 | } 130 | .dropzone-wrap .dz-preview .dz-progress .dz-upload, 131 | .dropzone-previews .dz-preview .dz-progress .dz-upload { 132 | position: absolute; 133 | top: 0; 134 | bottom: 0; 135 | left: 0; 136 | width: 0%; 137 | background-color: #8cc657; 138 | } 139 | .dropzone-wrap .dz-preview.dz-processing .dz-progress, 140 | .dropzone-previews .dz-preview.dz-processing .dz-progress { 141 | display: block; 142 | } 143 | .dropzone-wrap .dz-preview .dz-error-message, 144 | .dropzone-previews .dz-preview .dz-error-message { 145 | display: none; 146 | position: absolute; 147 | top: -5px; 148 | left: -20px; 149 | background: rgba(245,245,245,0.8); 150 | padding: 8px 10px; 151 | color: #800; 152 | min-width: 140px; 153 | max-width: 500px; 154 | z-index: 500; 155 | } 156 | .dropzone-wrap .dz-preview:hover.dz-error .dz-error-message, 157 | .dropzone-previews .dz-preview:hover.dz-error .dz-error-message { 158 | display: block; 159 | } 160 | -------------------------------------------------------------------------------- /assets/css/images/controls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craftsmancoding/assetmanager/44013717eff2a3c8f3ad35565a8a42fe00406caf/assets/css/images/controls.png -------------------------------------------------------------------------------- /assets/css/images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craftsmancoding/assetmanager/44013717eff2a3c8f3ad35565a8a42fe00406caf/assets/css/images/loading.gif -------------------------------------------------------------------------------- /assets/css/mgr.css: -------------------------------------------------------------------------------- 1 | #assman_header a, 2 | #assman_canvas a, 3 | .assman_nav_item a { 4 | color: #3697cd; 5 | text-decoration: none; 6 | } 7 | 8 | 9 | 10 | #assman_header a:hover, 11 | #assman_canvas a:hover, 12 | .assman_nav_item a:hover { 13 | color: #3697cd; 14 | } 15 | 16 | /** 17 | * CMPs 18 | */ 19 | #assman_canvas { 20 | background: #fff; 21 | margin: 0px 10px 0px; 22 | padding-bottom: 20px; 23 | -webkit-box-shadow: 0px 0px 3px -1px rgba(181,179,181,1); 24 | -moz-box-shadow: 0px 0px 3px -1px rgba(181,179,181,1); 25 | box-shadow: 0px 0px 3px -1px rgba(181,179,181,1); 26 | } 27 | 28 | .assman_canvas_inner { 29 | padding: 20px 20px 0 20px; 30 | } 31 | 32 | h2.assman_cmp_heading { 33 | margin-bottom: 0px; 34 | } 35 | 36 | #assman_nav { 37 | list-style-type:none; 38 | padding:0; 39 | list-style-type: none; 40 | padding: 0; 41 | float: right; 42 | margin: 40px 10px 5px 10px; 43 | font-size: 12px; 44 | } 45 | 46 | .assman_nav_item { 47 | display:inline; 48 | padding: 10px; 49 | color: #3697cd; 50 | font-size: 13px; 51 | } 52 | 53 | .assman_nav_item a.current { 54 | background: #fff; 55 | padding: 7px 10px; 56 | border-top: 3px solid #3697cd; 57 | } 58 | /* not sure if we need this... */ 59 | .assman_nav_home { 60 | 61 | } 62 | 63 | #assman_footer { 64 | text-align: center; 65 | display: block; 66 | margin-top: 20px; 67 | } 68 | .assman_donation_link { 69 | 70 | } 71 | .assman_bug_link { 72 | 73 | } 74 | .assman_wiki_link { 75 | 76 | } 77 | 78 | #assman_copyright { 79 | color: #727272; 80 | margin-top: 15px; 81 | font-style: italic; 82 | text-align: center; 83 | } 84 | 85 | #assman_buttons { 86 | width: 100%; 87 | } 88 | #assman_buttons ul:before, 89 | #assman_buttons ul:after { 90 | content: " "; 91 | display: table; 92 | } 93 | #assman_buttons ul:after { 94 | clear: both; 95 | } 96 | #assman_buttons ul { 97 | width: 102%; 98 | margin: -1% 0 0 -1%; 99 | /* clearfix */ 100 | *zoom: 1; 101 | } 102 | #assman_buttons ul li { 103 | display: table; 104 | position: relative; 105 | float: left; 106 | width: 32%; 107 | margin: 0; 108 | padding: 1% 0 0 1%; 109 | } 110 | 111 | 112 | /* #assets_tab { 113 | margin-top: 10px; 114 | } 115 | */ 116 | #assets_tab li.li_page_image { 117 | float: left; 118 | border: 1px solid #eee; 119 | /* padding: 5px; */ 120 | margin: 5px 0px 20px 20px; 121 | position: relative; 122 | -webkit-box-shadow: 0 8px 6px -6px #ddd; 123 | -moz-box-shadow: 0 8px 6px -6px #ddd; 124 | box-shadow: 0 8px 6px -6px #ddd 125 | } 126 | 127 | .assman_nav_item a.current { 128 | font-weight: bold; 129 | } 130 | 131 | 132 | 133 | .btn, 134 | .assman-btn { 135 | background: #fff; 136 | border: 1px solid #e4e4e4; 137 | border-radius: 4px; 138 | -webkit-border-radius: 4px; 139 | -moz-border-radius: 4px; 140 | padding: 7px 15px; 141 | color: #6a6a6a !important; 142 | font-weight: normal; 143 | font-size: 14px; 144 | text-shadow: none !important; 145 | cursor: pointer !important; 146 | } 147 | 148 | .btn-primary { 149 | background: #2aa798; 150 | color: #fff !important; 151 | border: 1px solid #2aa798; 152 | } 153 | 154 | .btn-info { 155 | background: #556c88; 156 | color: #fff !important; 157 | border: 1px solid #556c88; 158 | } 159 | 160 | .btn-primary:hover { 161 | background: #02958f; 162 | } 163 | 164 | .btn-large { 165 | padding: 15px 25px !important; 166 | font-size: 16px; 167 | } 168 | 169 | .btn-mini { 170 | padding: 5px 10px !important; 171 | font-size: 10px; 172 | } 173 | 174 | 175 | 176 | .icon-trash { 177 | background-position: -456px 0; 178 | } 179 | 180 | .drop-delete { 181 | margin-top: 15px; 182 | border: 1px dashed #a7a7a7; 183 | display: block; 184 | font-weight: bold; 185 | font-size: 16px; 186 | text-align: center; 187 | padding: 15px; 188 | } 189 | 190 | .dz-link-wrap { 191 | width: 380px; 192 | margin: 0 auto; 193 | } 194 | 195 | .selected { 196 | background: #eae9eb; 197 | } 198 | 199 | .li-to-be-removed { 200 | width: 30px !important; 201 | height: auto !important; 202 | } 203 | 204 | .img-to-be-removed { 205 | width: 30px; 206 | } 207 | 208 | div > label.x-form-cb-label { 209 | display: inline; 210 | } 211 | 212 | 213 | .state { 214 | margin-bottom: 0px !important; 215 | } 216 | 217 | 218 | #page_images li.inactive { 219 | border: 1px solid #ddd; 220 | } 221 | 222 | .img-info-wrap { 223 | position: relative; 224 | min-height:180px; 225 | } 226 | 227 | .img-info-inner { 228 | position: absolute; 229 | bottom: 0px; 230 | background: #000; 231 | background-color: rgba(0,0,0,0.3); 232 | width: 100%; 233 | color: #fff; 234 | } 235 | 236 | .img-info-inner p { 237 | margin: 3px 5px; 238 | } 239 | #page_images li.inactive .img-info-wrap a img { 240 | filter: url("data:image/svg+xml;utf8,#grayscale"); /* Firefox 10+, Firefox on Android */ 241 | filter: gray; /* IE6-9 */ 242 | -webkit-filter: grayscale(100%); /* Chrome 19+, Safari 6+, Safari 6+ iOS */ 243 | opacity:0.4; 244 | filter:alpha(opacity=40); /* For IE8 and earlier */ 245 | } 246 | 247 | #image_upload { 248 | position: relative; 249 | } 250 | 251 | 252 | .image-nav { 253 | display: none; 254 | } 255 | 256 | 257 | .li_page_image .remove-img { 258 | position: absolute; 259 | top: -5px; 260 | right: -5px; 261 | width: 15px; 262 | height: 15px; 263 | /* background: url('../images/remove-icon.png') no-repeat; */ 264 | text-indent: -999999px; 265 | display: none; 266 | } 267 | 268 | .asset-edit-inner { 269 | width: 800px; 270 | margin: 15px auto; 271 | } 272 | .row-input { 273 | display: block; 274 | margin-bottom: 10px; 275 | 276 | } 277 | 278 | .row-input .row-lbl { 279 | font-weight: bold; 280 | font-size: 12px; 281 | color: #707070; 282 | width: 120px; 283 | float: left; 284 | margin-right: 20px; 285 | text-align: right; 286 | } 287 | 288 | .row-input .row-field, 289 | select { 290 | border: 1px solid; 291 | -moz-border-radius: 2px; 292 | -webkit-border-radius: 2px; 293 | -o-border-radius: 2px; 294 | -ms-border-radius: 2px; 295 | -khtml-border-radius: 2px; 296 | border-radius: 2px; 297 | position: relative; 298 | background-color: #fbfbfb; 299 | background-image: none; 300 | border-color: #CCCCCC; 301 | padding: 5px; 302 | width: 70%; 303 | } 304 | 305 | select { 306 | width: 50%; 307 | height: 28px; 308 | padding: 0px; 309 | } 310 | 311 | .row-input .non-input { 312 | font-weight: bold; 313 | } 314 | 315 | .row-input input[type="checkbox"] { 316 | width: auto; 317 | } 318 | 319 | .ui-dialog-titlebar-close { 320 | /* background: #ddd url('../images/close-dialog.png') 4px 5px no-repeat; */ 321 | border: 1px solid #bbb; 322 | border-radius: 2px; 323 | -moz-border-radius: 2px; 324 | -webkit-border-radius: 2px; 325 | } 326 | 327 | 328 | /**** Alerts*****/ 329 | .danger { 330 | margin: 10px; 331 | padding: 5px; 332 | background: #ffddde; 333 | border: 1px solid #9b0004; 334 | color: #9b0004; 335 | border-radius: 3px; 336 | -webkit-border-radius: 3px; 337 | -moz-border-radius: 3px; 338 | } 339 | 340 | .success { 341 | margin: 10px; 342 | padding: 5px; 343 | background: #dae8bf; 344 | border: 1px solid #64812e; 345 | color: #4e6424; 346 | border-radius: 3px; 347 | -webkit-border-radius: 3px; 348 | -moz-border-radius: 3px; 349 | } 350 | 351 | .asset_category_modal { 352 | padding: 5px 0px; 353 | width: 75%; 354 | float: right; 355 | } 356 | 357 | .asset_category_modal li { 358 | float: left; 359 | margin: 7px 2px; 360 | } 361 | 362 | #asset_category_filters li { 363 | display: inline-block; 364 | margin-bottom: 20px; 365 | } 366 | 367 | .asset_category_modal li a, 368 | #asset_category_filters li a { 369 | padding: 5px 10px; 370 | border: 1px solid #d8d8d8; 371 | background: #e4e4e4; 372 | color: #7c7c7c; 373 | text-decoration: none; 374 | } 375 | 376 | #asset_category_filters li.current a, 377 | #asset_category_filters li.first a { 378 | border: 1px solid #444444; 379 | background: #444444; 380 | font-weight: bold; 381 | color: #fff; 382 | } 383 | 384 | 385 | table.classy-assetmgr { 386 | width: 100%; 387 | } 388 | 389 | table.classy-assetmgr thead tr { 390 | background: #e4e9ee !important; 391 | } 392 | 393 | table.classy-assetmgr thead tr th { 394 | padding: 12px 5px; 395 | color: #696969; 396 | font-weight: bold; 397 | font-size: 12px; 398 | } 399 | 400 | table.classy-assetmgr thead a { 401 | color: #fff; 402 | } 403 | 404 | table thead a:hover { 405 | color: #fff; 406 | text-decoration: underline; 407 | } 408 | 409 | table.classy-assetmgr tr:nth-child(even) {background: #f5f6f9} 410 | table.classy-assetmgr tr:nth-child(odd) {background: #fff} 411 | 412 | .span70 { 413 | width: 70%; 414 | } 415 | 416 | .span20 { 417 | width: 20%; 418 | } 419 | 420 | .span100 { 421 | width: 100%; 422 | display: block; 423 | } 424 | .pull-right { 425 | float: right; 426 | } 427 | .pull-left { 428 | float: left; 429 | } 430 | 431 | #assman_msg { 432 | position: absolute; 433 | top: 5px; 434 | right: 10px; 435 | } 436 | #cboxContent { 437 | background: #fff !important; 438 | } 439 | #cboxLoadedContent { 440 | padding: 20px; 441 | background: #fff !important; 442 | } 443 | 444 | .asset-modal-controls { 445 | position: absolute; 446 | bottom: 0px; 447 | background: #fff; 448 | padding: 10px; 449 | border-top: 1px solid #ddd; 450 | display: block; 451 | width: 100%; 452 | } 453 | 454 | #asset_modal_form-inner { 455 | margin: 20px; 456 | margin-bottom: 70px; 457 | } 458 | #asset_groups { 459 | margin: 20px 0px; 460 | } 461 | #asset_groups li { 462 | margin: 5px 0px; 463 | background: url('../images/sort.png') 0px 6px no-repeat; 464 | } 465 | 466 | #asset_groups .row-field { 467 | width: 50%; 468 | margin-left: 20px; 469 | } 470 | 471 | #modal_asset_img img { 472 | max-width: 100%; 473 | } 474 | 475 | .fback-dz { 476 | display: none; 477 | } 478 | 479 | 480 | .fa-assmam-trash-icon { 481 | display: inline-block; 482 | font-family: FontAwesome; 483 | font-style: normal; 484 | font-weight: 400; 485 | line-height: 1; 486 | -webkit-font-smoothing: antialiased; 487 | font-size: 26px; 488 | float: left; 489 | 490 | } 491 | 492 | .over-trash .fa-assmam-trash-icon { 493 | color: red; 494 | } 495 | 496 | 497 | .fa-assmam-trash-icon:before { 498 | content: "\f1f8"; 499 | } 500 | /* The Magnificent Clearfix: Updated to prevent margin-collapsing on child elements. 501 | j.mp/bestclearfix */ 502 | .clear:before, .clear:after, 503 | .clearfix:before, .clearfix:after { content: "\0020"; display: block; height: 0; visibility: hidden; } 504 | .clear:after, 505 | .clearfix:after { clear: both; } 506 | /* Fix clearfix: blueprintcss.lighthouseapp.com/projects/15318/tickets/5-extra-margin-padding-bottom-of-page */ 507 | .clear, 508 | .clearfix { zoom: 1; } -------------------------------------------------------------------------------- /assets/images/close-dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craftsmancoding/assetmanager/44013717eff2a3c8f3ad35565a8a42fe00406caf/assets/images/close-dialog.png -------------------------------------------------------------------------------- /assets/images/edit-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craftsmancoding/assetmanager/44013717eff2a3c8f3ad35565a8a42fe00406caf/assets/images/edit-icon.png -------------------------------------------------------------------------------- /assets/images/gif-load.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craftsmancoding/assetmanager/44013717eff2a3c8f3ad35565a8a42fe00406caf/assets/images/gif-load.gif -------------------------------------------------------------------------------- /assets/images/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craftsmancoding/assetmanager/44013717eff2a3c8f3ad35565a8a42fe00406caf/assets/images/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /assets/images/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craftsmancoding/assetmanager/44013717eff2a3c8f3ad35565a8a42fe00406caf/assets/images/glyphicons-halflings.png -------------------------------------------------------------------------------- /assets/images/sort.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craftsmancoding/assetmanager/44013717eff2a3c8f3ad35565a8a42fe00406caf/assets/images/sort.png -------------------------------------------------------------------------------- /assets/images/trash-over.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craftsmancoding/assetmanager/44013717eff2a3c8f3ad35565a8a42fe00406caf/assets/images/trash-over.png -------------------------------------------------------------------------------- /assets/images/trash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craftsmancoding/assetmanager/44013717eff2a3c8f3ad35565a8a42fe00406caf/assets/images/trash.png -------------------------------------------------------------------------------- /assets/js/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/craftsmancoding/assetmanager/44013717eff2a3c8f3ad35565a8a42fe00406caf/assets/js/.DS_Store -------------------------------------------------------------------------------- /assets/js/form2js.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2010 Maxim Vasiliev 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | * 22 | * @author Maxim Vasiliev 23 | * Date: 09.09.2010 24 | * Time: 19:02:33 25 | */ 26 | 27 | 28 | (function (root, factory) 29 | { 30 | if (typeof define === 'function' && define.amd) 31 | { 32 | // AMD. Register as an anonymous module. 33 | define(factory); 34 | } 35 | else 36 | { 37 | // Browser globals 38 | root.form2js = factory(); 39 | } 40 | }(this, function () 41 | { 42 | "use strict"; 43 | 44 | /** 45 | * Returns form values represented as Javascript object 46 | * "name" attribute defines structure of resulting object 47 | * 48 | * @param rootNode {Element|String} root form element (or it's id) or array of root elements 49 | * @param delimiter {String} structure parts delimiter defaults to '.' 50 | * @param skipEmpty {Boolean} should skip empty text values, defaults to true 51 | * @param nodeCallback {Function} custom function to get node value 52 | * @param useIdIfEmptyName {Boolean} if true value of id attribute of field will be used if name of field is empty 53 | */ 54 | function form2js(rootNode, delimiter, skipEmpty, nodeCallback, useIdIfEmptyName, getDisabled) 55 | { 56 | getDisabled = getDisabled ? true : false; 57 | if (typeof skipEmpty == 'undefined' || skipEmpty == null) skipEmpty = true; 58 | if (typeof delimiter == 'undefined' || delimiter == null) delimiter = '.'; 59 | if (arguments.length < 5) useIdIfEmptyName = false; 60 | 61 | rootNode = typeof rootNode == 'string' ? document.getElementById(rootNode) : rootNode; 62 | 63 | var formValues = [], 64 | currNode, 65 | i = 0; 66 | 67 | /* If rootNode is array - combine values */ 68 | if (rootNode.constructor == Array || (typeof NodeList != "undefined" && rootNode.constructor == NodeList)) 69 | { 70 | while(currNode = rootNode[i++]) 71 | { 72 | formValues = formValues.concat(getFormValues(currNode, nodeCallback, useIdIfEmptyName, getDisabled)); 73 | } 74 | } 75 | else 76 | { 77 | formValues = getFormValues(rootNode, nodeCallback, useIdIfEmptyName, getDisabled); 78 | } 79 | 80 | return processNameValues(formValues, skipEmpty, delimiter); 81 | } 82 | 83 | /** 84 | * Processes collection of { name: 'name', value: 'value' } objects. 85 | * @param nameValues 86 | * @param skipEmpty if true skips elements with value == '' or value == null 87 | * @param delimiter 88 | */ 89 | function processNameValues(nameValues, skipEmpty, delimiter) 90 | { 91 | var result = {}, 92 | arrays = {}, 93 | i, j, k, l, 94 | value, 95 | nameParts, 96 | currResult, 97 | arrNameFull, 98 | arrName, 99 | arrIdx, 100 | namePart, 101 | name, 102 | _nameParts; 103 | 104 | for (i = 0; i < nameValues.length; i++) 105 | { 106 | value = nameValues[i].value; 107 | 108 | if (skipEmpty && (value === '' || value === null)) continue; 109 | 110 | name = nameValues[i].name; 111 | _nameParts = name.split(delimiter); 112 | nameParts = []; 113 | currResult = result; 114 | arrNameFull = ''; 115 | 116 | for(j = 0; j < _nameParts.length; j++) 117 | { 118 | namePart = _nameParts[j].split(']['); 119 | if (namePart.length > 1) 120 | { 121 | for(k = 0; k < namePart.length; k++) 122 | { 123 | if (k == 0) 124 | { 125 | namePart[k] = namePart[k] + ']'; 126 | } 127 | else if (k == namePart.length - 1) 128 | { 129 | namePart[k] = '[' + namePart[k]; 130 | } 131 | else 132 | { 133 | namePart[k] = '[' + namePart[k] + ']'; 134 | } 135 | 136 | arrIdx = namePart[k].match(/([a-z_]+)?\[([a-z_][a-z0-9_]+?)\]/i); 137 | if (arrIdx) 138 | { 139 | for(l = 1; l < arrIdx.length; l++) 140 | { 141 | if (arrIdx[l]) nameParts.push(arrIdx[l]); 142 | } 143 | } 144 | else{ 145 | nameParts.push(namePart[k]); 146 | } 147 | } 148 | } 149 | else 150 | nameParts = nameParts.concat(namePart); 151 | } 152 | 153 | for (j = 0; j < nameParts.length; j++) 154 | { 155 | namePart = nameParts[j]; 156 | 157 | if (namePart.indexOf('[]') > -1 && j == nameParts.length - 1) 158 | { 159 | arrName = namePart.substr(0, namePart.indexOf('[')); 160 | arrNameFull += arrName; 161 | 162 | if (!currResult[arrName]) currResult[arrName] = []; 163 | currResult[arrName].push(value); 164 | } 165 | else if (namePart.indexOf('[') > -1) 166 | { 167 | arrName = namePart.substr(0, namePart.indexOf('[')); 168 | arrIdx = namePart.replace(/(^([a-z_]+)?\[)|(\]$)/gi, ''); 169 | 170 | /* Unique array name */ 171 | arrNameFull += '_' + arrName + '_' + arrIdx; 172 | 173 | /* 174 | * Because arrIdx in field name can be not zero-based and step can be 175 | * other than 1, we can't use them in target array directly. 176 | * Instead we're making a hash where key is arrIdx and value is a reference to 177 | * added array element 178 | */ 179 | 180 | if (!arrays[arrNameFull]) arrays[arrNameFull] = {}; 181 | if (arrName != '' && !currResult[arrName]) currResult[arrName] = []; 182 | 183 | if (j == nameParts.length - 1) 184 | { 185 | if (arrName == '') 186 | { 187 | currResult.push(value); 188 | arrays[arrNameFull][arrIdx] = currResult[currResult.length - 1]; 189 | } 190 | else 191 | { 192 | currResult[arrName].push(value); 193 | arrays[arrNameFull][arrIdx] = currResult[arrName][currResult[arrName].length - 1]; 194 | } 195 | } 196 | else 197 | { 198 | if (!arrays[arrNameFull][arrIdx]) 199 | { 200 | if ((/^[0-9a-z_]+\[?/i).test(nameParts[j+1])) currResult[arrName].push({}); 201 | else currResult[arrName].push([]); 202 | 203 | arrays[arrNameFull][arrIdx] = currResult[arrName][currResult[arrName].length - 1]; 204 | } 205 | } 206 | 207 | currResult = arrays[arrNameFull][arrIdx]; 208 | } 209 | else 210 | { 211 | arrNameFull += namePart; 212 | 213 | if (j < nameParts.length - 1) /* Not the last part of name - means object */ 214 | { 215 | if (!currResult[namePart]) currResult[namePart] = {}; 216 | currResult = currResult[namePart]; 217 | } 218 | else 219 | { 220 | currResult[namePart] = value; 221 | } 222 | } 223 | } 224 | } 225 | 226 | return result; 227 | } 228 | 229 | function getFormValues(rootNode, nodeCallback, useIdIfEmptyName, getDisabled) 230 | { 231 | var result = extractNodeValues(rootNode, nodeCallback, useIdIfEmptyName, getDisabled); 232 | return result.length > 0 ? result : getSubFormValues(rootNode, nodeCallback, useIdIfEmptyName, getDisabled); 233 | } 234 | 235 | function getSubFormValues(rootNode, nodeCallback, useIdIfEmptyName, getDisabled) 236 | { 237 | var result = [], 238 | currentNode = rootNode.firstChild; 239 | 240 | while (currentNode) 241 | { 242 | result = result.concat(extractNodeValues(currentNode, nodeCallback, useIdIfEmptyName, getDisabled)); 243 | currentNode = currentNode.nextSibling; 244 | } 245 | 246 | return result; 247 | } 248 | 249 | function extractNodeValues(node, nodeCallback, useIdIfEmptyName, getDisabled) { 250 | if (node.disabled && !getDisabled) return []; 251 | 252 | var callbackResult, fieldValue, result, fieldName = getFieldName(node, useIdIfEmptyName); 253 | 254 | callbackResult = nodeCallback && nodeCallback(node); 255 | 256 | if (callbackResult && callbackResult.name) { 257 | result = [callbackResult]; 258 | } 259 | else if (fieldName != '' && node.nodeName.match(/INPUT|TEXTAREA/i)) { 260 | fieldValue = getFieldValue(node, getDisabled); 261 | if (null === fieldValue) { 262 | result = []; 263 | } else { 264 | result = [ { name: fieldName, value: fieldValue} ]; 265 | } 266 | } 267 | else if (fieldName != '' && node.nodeName.match(/SELECT/i)) { 268 | fieldValue = getFieldValue(node, getDisabled); 269 | result = [ { name: fieldName.replace(/\[\]$/, ''), value: fieldValue } ]; 270 | } 271 | else { 272 | result = getSubFormValues(node, nodeCallback, useIdIfEmptyName, getDisabled); 273 | } 274 | 275 | return result; 276 | } 277 | 278 | function getFieldName(node, useIdIfEmptyName) 279 | { 280 | if (node.name && node.name != '') return node.name; 281 | else if (useIdIfEmptyName && node.id && node.id != '') return node.id; 282 | else return ''; 283 | } 284 | 285 | 286 | function getFieldValue(fieldNode, getDisabled) 287 | { 288 | if (fieldNode.disabled && !getDisabled) return null; 289 | 290 | switch (fieldNode.nodeName) { 291 | case 'INPUT': 292 | case 'TEXTAREA': 293 | switch (fieldNode.type.toLowerCase()) { 294 | case 'radio': 295 | if (fieldNode.checked && fieldNode.value === "false") return false; 296 | case 'checkbox': 297 | if (fieldNode.checked && fieldNode.value === "true") return true; 298 | if (!fieldNode.checked && fieldNode.value === "true") return false; 299 | if (fieldNode.checked) return fieldNode.value; 300 | break; 301 | 302 | case 'button': 303 | case 'reset': 304 | case 'submit': 305 | case 'image': 306 | return ''; 307 | break; 308 | 309 | default: 310 | return fieldNode.value; 311 | break; 312 | } 313 | break; 314 | 315 | case 'SELECT': 316 | return getSelectedOptionValue(fieldNode); 317 | break; 318 | 319 | default: 320 | break; 321 | } 322 | 323 | return null; 324 | } 325 | 326 | function getSelectedOptionValue(selectNode) 327 | { 328 | var multiple = selectNode.multiple, 329 | result = [], 330 | options, 331 | i, l; 332 | 333 | if (!multiple) return selectNode.value; 334 | 335 | for (options = selectNode.getElementsByTagName("option"), i = 0, l = options.length; i < l; i++) 336 | { 337 | if (options[i].selected) result.push(options[i].value); 338 | } 339 | 340 | return result; 341 | } 342 | 343 | return form2js; 344 | 345 | })); 346 | -------------------------------------------------------------------------------- /assets/js/jcrop.js: -------------------------------------------------------------------------------- 1 | /** 2 | * jquery.Jcrop.min.js v0.9.12 (build:20130202) 3 | * jQuery Image Cropping Plugin - released under MIT License 4 | * Copyright (c) 2008-2013 Tapmodo Interactive LLC 5 | * https://github.com/tapmodo/Jcrop 6 | */ 7 | (function(a){a.Jcrop=function(b,c){function i(a){return Math.round(a)+"px"}function j(a){return d.baseClass+"-"+a}function k(){return a.fx.step.hasOwnProperty("backgroundColor")}function l(b){var c=a(b).offset();return[c.left,c.top]}function m(a){return[a.pageX-e[0],a.pageY-e[1]]}function n(b){typeof b!="object"&&(b={}),d=a.extend(d,b),a.each(["onChange","onSelect","onRelease","onDblClick"],function(a,b){typeof d[b]!="function"&&(d[b]=function(){})})}function o(a,b,c){e=l(D),bc.setCursor(a==="move"?a:a+"-resize");if(a==="move")return bc.activateHandlers(q(b),v,c);var d=_.getFixed(),f=r(a),g=_.getCorner(r(f));_.setPressed(_.getCorner(f)),_.setCurrent(g),bc.activateHandlers(p(a,d),v,c)}function p(a,b){return function(c){if(!d.aspectRatio)switch(a){case"e":c[1]=b.y2;break;case"w":c[1]=b.y2;break;case"n":c[0]=b.x2;break;case"s":c[0]=b.x2}else switch(a){case"e":c[1]=b.y+1;break;case"w":c[1]=b.y+1;break;case"n":c[0]=b.x+1;break;case"s":c[0]=b.x+1}_.setCurrent(c),bb.update()}}function q(a){var b=a;return bd.watchKeys 8 | (),function(a){_.moveOffset([a[0]-b[0],a[1]-b[1]]),b=a,bb.update()}}function r(a){switch(a){case"n":return"sw";case"s":return"nw";case"e":return"nw";case"w":return"ne";case"ne":return"sw";case"nw":return"se";case"se":return"nw";case"sw":return"ne"}}function s(a){return function(b){return d.disabled?!1:a==="move"&&!d.allowMove?!1:(e=l(D),W=!0,o(a,m(b)),b.stopPropagation(),b.preventDefault(),!1)}}function t(a,b,c){var d=a.width(),e=a.height();d>b&&b>0&&(d=b,e=b/a.width()*a.height()),e>c&&c>0&&(e=c,d=c/a.height()*a.width()),T=a.width()/d,U=a.height()/e,a.width(d).height(e)}function u(a){return{x:a.x*T,y:a.y*U,x2:a.x2*T,y2:a.y2*U,w:a.w*T,h:a.h*U}}function v(a){var b=_.getFixed();b.w>d.minSelect[0]&&b.h>d.minSelect[1]?(bb.enableHandles(),bb.done()):bb.release(),bc.setCursor(d.allowSelect?"crosshair":"default")}function w(a){if(d.disabled)return!1;if(!d.allowSelect)return!1;W=!0,e=l(D),bb.disableHandles(),bc.setCursor("crosshair");var b=m(a);return _.setPressed(b),bb.update(),bc.activateHandlers(x,v,a.type.substring 9 | (0,5)==="touch"),bd.watchKeys(),a.stopPropagation(),a.preventDefault(),!1}function x(a){_.setCurrent(a),bb.update()}function y(){var b=a("
").addClass(j("tracker"));return g&&b.css({opacity:0,backgroundColor:"white"}),b}function be(a){G.removeClass().addClass(j("holder")).addClass(a)}function bf(a,b){function t(){window.setTimeout(u,l)}var c=a[0]/T,e=a[1]/U,f=a[2]/T,g=a[3]/U;if(X)return;var h=_.flipCoords(c,e,f,g),i=_.getFixed(),j=[i.x,i.y,i.x2,i.y2],k=j,l=d.animationDelay,m=h[0]-j[0],n=h[1]-j[1],o=h[2]-j[2],p=h[3]-j[3],q=0,r=d.swingSpeed;c=k[0],e=k[1],f=k[2],g=k[3],bb.animMode(!0);var s,u=function(){return function(){q+=(100-q)/r,k[0]=Math.round(c+q/100*m),k[1]=Math.round(e+q/100*n),k[2]=Math.round(f+q/100*o),k[3]=Math.round(g+q/100*p),q>=99.8&&(q=100),q<100?(bh(k),t()):(bb.done(),bb.animMode(!1),typeof b=="function"&&b.call(bs))}}();t()}function bg(a){bh([a[0]/T,a[1]/U,a[2]/T,a[3]/U]),d.onSelect.call(bs,u(_.getFixed())),bb.enableHandles()}function bh(a){_.setPressed([a[0],a[1]]),_.setCurrent([a[2], 10 | a[3]]),bb.update()}function bi(){return u(_.getFixed())}function bj(){return _.getFixed()}function bk(a){n(a),br()}function bl(){d.disabled=!0,bb.disableHandles(),bb.setCursor("default"),bc.setCursor("default")}function bm(){d.disabled=!1,br()}function bn(){bb.done(),bc.activateHandlers(null,null)}function bo(){G.remove(),A.show(),A.css("visibility","visible"),a(b).removeData("Jcrop")}function bp(a,b){bb.release(),bl();var c=new Image;c.onload=function(){var e=c.width,f=c.height,g=d.boxWidth,h=d.boxHeight;D.width(e).height(f),D.attr("src",a),H.attr("src",a),t(D,g,h),E=D.width(),F=D.height(),H.width(E).height(F),M.width(E+L*2).height(F+L*2),G.width(E).height(F),ba.resize(E,F),bm(),typeof b=="function"&&b.call(bs)},c.src=a}function bq(a,b,c){var e=b||d.bgColor;d.bgFade&&k()&&d.fadeTime&&!c?a.animate({backgroundColor:e},{queue:!1,duration:d.fadeTime}):a.css("backgroundColor",e)}function br(a){d.allowResize?a?bb.enableOnly():bb.enableHandles():bb.disableHandles(),bc.setCursor(d.allowSelect?"crosshair":"default"),bb 11 | .setCursor(d.allowMove?"move":"default"),d.hasOwnProperty("trueSize")&&(T=d.trueSize[0]/E,U=d.trueSize[1]/F),d.hasOwnProperty("setSelect")&&(bg(d.setSelect),bb.done(),delete d.setSelect),ba.refresh(),d.bgColor!=N&&(bq(d.shade?ba.getShades():G,d.shade?d.shadeColor||d.bgColor:d.bgColor),N=d.bgColor),O!=d.bgOpacity&&(O=d.bgOpacity,d.shade?ba.refresh():bb.setBgOpacity(O)),P=d.maxSize[0]||0,Q=d.maxSize[1]||0,R=d.minSize[0]||0,S=d.minSize[1]||0,d.hasOwnProperty("outerImage")&&(D.attr("src",d.outerImage),delete d.outerImage),bb.refresh()}var d=a.extend({},a.Jcrop.defaults),e,f=navigator.userAgent.toLowerCase(),g=/msie/.test(f),h=/msie [1-6]\./.test(f);typeof b!="object"&&(b=a(b)[0]),typeof c!="object"&&(c={}),n(c);var z={border:"none",visibility:"visible",margin:0,padding:0,position:"absolute",top:0,left:0},A=a(b),B=!0;if(b.tagName=="IMG"){if(A[0].width!=0&&A[0].height!=0)A.width(A[0].width),A.height(A[0].height);else{var C=new Image;C.src=A[0].src,A.width(C.width),A.height(C.height)}var D=A.clone().removeAttr("id"). 12 | css(z).show();D.width(A.width()),D.height(A.height()),A.after(D).hide()}else D=A.css(z).show(),B=!1,d.shade===null&&(d.shade=!0);t(D,d.boxWidth,d.boxHeight);var E=D.width(),F=D.height(),G=a("").width(E).height(F).addClass(j("holder")).css({position:"relative",backgroundColor:d.bgColor}).insertAfter(A).append(D);d.addClass&&G.addClass(d.addClass);var H=a(""),I=a("").width("100%").height("100%").css({zIndex:310,position:"absolute",overflow:"hidden"}),J=a("").width("100%").height("100%").css("zIndex",320),K=a("").css({position:"absolute",zIndex:600}).dblclick(function(){var a=_.getFixed();d.onDblClick.call(bs,a)}).insertBefore(D).append(I,J);B&&(H=a("'.print_r($scriptProperties,true).''; 184 | $settings = array('library_path','url_override','site_url','class_keys','thumbnail_width', 185 | 'thumbnail_height','autocreate_content_type'); 186 | foreach ($settings as $s) { 187 | $value = $this->modx->getOption($s, $scriptProperties); 188 | if ($Setting = $this->modx->getObject('modSystemSetting', 'assman.'.$s)) { 189 | $Setting->set('value', $value); 190 | } 191 | else { 192 | $this->modx->log(\modX::LOG_LEVEL_ERROR, 'Could not load System Setting assman.'.$s,'','Asset::'.__FUNCTION__); 193 | continue; 194 | } 195 | if (!$Setting->save()) { 196 | $this->modx->log(\modX::LOG_LEVEL_ERROR, 'Could not save System Setting','','Asset::'.__FUNCTION__); 197 | continue; 198 | } 199 | $this->modx->setOption('assman.'.$s, $value); 200 | } 201 | // Clear cache 202 | $this->modx->cacheManager->refresh(array( 'system_settings' => array() )); 203 | return $this->getSettings(array(),'
modWebLink
, modSymLink
, modStaticResource
, and modDocument
(the default). List these as a JSON array.';
119 | $_lang['assman.settings.storage.title'] = 'Storage';
120 | $_lang['assman.settings.storage.path.desc'] = 'Several settings relate to where the Asset Manager stores its files and how they are accessed.';
121 | $_lang['assman.settings.storage.path.note'] = 'Relative to the MODX_ASSETS_URL
';
122 | $_lang['assman.settings.storage.override.desc'] = 'Normally, asset URLS are calculated as MODX_ASSETS_URL
+ assman.library_path
+ Asset stub. If URL-override is enabled, the URLS are calculated as assman.site_url
+ assman.library_path
+ Asset stub.';
123 | $_lang['assman.settings.storage.override.note'] = 'Used to calculate URLs When the URL Override is checked.';
124 | $_lang['assman.settings.contenttype.desc'] = 'By default, the Asset Manager will detect the MIME types of uploaded files and create a modContentType
object for the detected content type. This behavior saves a lot of time, but you may disable if you need to customize the specifics of your upload types.';
125 | $_lang['assman.settings.contenttype.title'] = 'Content Types';
126 |
127 | $_lang['assman.no_results'] = 'No results.';
128 |
129 | //---------------------------------------
130 | // Assets Tab
131 | //---------------------------------------
132 | $_lang['assman.assettab.drop'] = 'Drop files here to upload or';
--------------------------------------------------------------------------------
/model/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/craftsmancoding/assetmanager/44013717eff2a3c8f3ad35565a8a42fe00406caf/model/.DS_Store
--------------------------------------------------------------------------------
/model/Snippet.php:
--------------------------------------------------------------------------------
1 | modx =& $modx;
15 | }
16 |
17 | public function __destruct() {
18 | $this->modx->setLogLevel($this->old_log_level);
19 | /*
20 | // TODO
21 | $xpdo->setLogTarget(array(
22 | 'target' => 'FILE',
23 | 'options' => array(
24 | 'filename' => 'install.' . strftime('%Y-%m-%dT%H:%M:%S')
25 | )
26 | ));
27 | */
28 | }
29 |
30 |
31 | /**
32 | * Logging Snippet info
33 | *
34 | */
35 | public function log($snippetName, $scriptProperties) {
36 | $log_level = $this->modx->getOption('log_level',$scriptProperties, $this->modx->getOption('log_level'));
37 | $this->old_log_level = $this->modx->setLogLevel($log_level);
38 |
39 | // TODO
40 | //$this->old_log_target = $this->modx->getOption('log_level');
41 | //$log_target = $this->modx->getOption('log_target',$scriptProperties);
42 |
43 | $this->modx->log(\modX::LOG_LEVEL_DEBUG, "scriptProperties:\n".print_r($scriptProperties,true),'','Snippet '.$snippetName);
44 | }
45 |
46 |
47 | /**
48 | * Format a record set:
49 | *
50 | * Frequently Snippets need to iterate over a record set. Each record should be formatted
51 | * using the $innerTpl, and the final output should be optionally wrapped in the $outerTpl.
52 | *
53 | * See http://rtfm.modx.com/revolution/2.x/developing-in-modx/other-development-resources/class-reference/modx/modx.getchunk
54 | *
55 | * @param array of arrays (a simple record set), or an array of objects (an xPDO Collection)
56 | * @param string formatting $innerTpl formatting string OR chunk name
57 | * @param string formatting $outerTpl formatting string OR chunk name (optional)
58 | * @return string
59 | */
60 | public function format($records,$innerTpl,$outerTpl=null,$firstTpl=null,$lastTpl=null,$onOne='innerTpl',$cnt=0) {
61 | if (empty($records)) {
62 | return '';
63 | }
64 |
65 | // A Chunk Name was passed
66 | $use_tmp_chunk = false;
67 | if (!$innerChunk = $this->modx->getObject('modChunk', array('name' => $innerTpl))) {
68 | $use_tmp_chunk = true;
69 | }
70 |
71 | $out = '';
72 | $i = 1;
73 | foreach ($records as $r) {
74 | if (is_object($r)) $r = $r->toArray('',false,false,true); // Handle xPDO objects
75 | if ($cnt == 1) {
76 | // Real Chunk
77 | if ($singleChunk = $this->modx->getObject('modChunk', array('name' => $$onOne))) {
78 | $out .= $this->modx->getChunk($$onOne, $r);
79 | }
80 | // Formatting String
81 | else {
82 | $uniqid = uniqid() . $i;
83 | $singleChunk = $this->modx->newObject('modChunk', array('name' => "{tmp-inner}-{$uniqid}"));
84 | $singleChunk->setCacheable(false);
85 | $out .= $singleChunk->process($r, $$onOne); // <-- gulp.
86 | }
87 | break;
88 | }
89 | // First
90 | if ($i == 1) {
91 | // Real Chunk
92 | if ($singleChunk = $this->modx->getObject('modChunk', array('name' => $firstTpl))) {
93 | $out .= $this->modx->getChunk($firstTpl, $r);
94 | }
95 | // Formatting String
96 | else {
97 | $uniqid = uniqid() . $i;
98 | $singleChunk = $this->modx->newObject('modChunk', array('name' => "{tmp-inner}-{$uniqid}"));
99 | $singleChunk->setCacheable(false);
100 | $out .= $singleChunk->process($r, $firstTpl);
101 | }
102 | }
103 | // Last
104 | elseif ($i == $cnt) {
105 | // Real Chunk
106 | if ($singleChunk = $this->modx->getObject('modChunk', array('name' => $lastTpl))) {
107 | $out .= $this->modx->getChunk($lastTpl, $r);
108 | }
109 | // Formatting String
110 | else {
111 | $uniqid = uniqid() . $i;
112 | $singleChunk = $this->modx->newObject('modChunk', array('name' => "{tmp-inner}-{$uniqid}"));
113 | $singleChunk->setCacheable(false);
114 | $out .= $singleChunk->process($r, $lastTpl);
115 | }
116 | }
117 | else {
118 | // Use a temporary Chunk when dealing with raw formatting strings
119 | if ($use_tmp_chunk) {
120 | $uniqid = uniqid() . $i;
121 | $innerChunk = $this->modx->newObject('modChunk', array('name' => "{tmp-inner}-{$uniqid}"));
122 | $innerChunk->setCacheable(false);
123 | $out .= $innerChunk->process($r, $innerTpl);
124 | }
125 | // Use getChunk when a chunk name was passed
126 | else {
127 | $out .= $this->modx->getChunk($innerTpl, $r);
128 | }
129 | }
130 | $i++;
131 | }
132 |
133 | if ($outerTpl) {
134 | $props = array('content'=>$out);
135 | // Formatting String
136 | if (!$outerChunk = $this->modx->getObject('modChunk', array('name' => $outerTpl))) {
137 | $uniqid = uniqid();
138 | $outerChunk = $this->modx->newObject('modChunk', array('name' => "{tmp-outer}-{$uniqid}"));
139 | $outerChunk->setCacheable(false);
140 | return $outerChunk->process($props, $outerTpl);
141 | }
142 | // Chunk Name
143 | else {
144 | return $this->modx->getChunk($outerTpl, $props);
145 | }
146 | }
147 | return $out;
148 | }
149 |
150 | /**
151 | * Given a potentially deeply nested array, this demonstrates which placeholders are available
152 | * for debugging purposes.
153 | * @param array
154 | */
155 | public function revealPlaceholders($array) {
156 |
157 | }
158 |
159 | }
--------------------------------------------------------------------------------
/model/assman/metadata.mysql.php:
--------------------------------------------------------------------------------
1 |
5 | array (
6 | 0 => 'Asset',
7 | ),
8 | 'xPDOSimpleObject' =>
9 | array (
10 | 0 => 'PageAsset',
11 | ),
12 | );
--------------------------------------------------------------------------------
/model/assman/mysql/asset.class.php:
--------------------------------------------------------------------------------
1 | 'assman',
4 | 'version' => '1.0',
5 | 'table' => 'assets',
6 | 'extends' => 'xPDOObject',
7 | 'fields' =>
8 | array (
9 | 'asset_id' => NULL,
10 | 'content_type_id' => NULL,
11 | 'title' => NULL,
12 | 'alt' => NULL,
13 | 'manual_url' => NULL,
14 | 'thumbnail_manual_url' => NULL,
15 | 'stub' => NULL,
16 | 'width' => NULL,
17 | 'height' => NULL,
18 | 'size' => NULL,
19 | 'duration' => NULL,
20 | 'sig' => NULL,
21 | 'seq' => NULL,
22 | 'is_image' => 1,
23 | 'is_active' => 1,
24 | 'is_protected' => 0,
25 | 'timestamp_created' => 'CURRENT_TIMESTAMP',
26 | 'timestamp_modified' => NULL,
27 | ),
28 | 'fieldMeta' =>
29 | array (
30 | 'asset_id' =>
31 | array (
32 | 'dbtype' => 'int',
33 | 'precision' => '11',
34 | 'phptype' => 'integer',
35 | 'null' => false,
36 | 'index' => 'pk',
37 | 'generated' => 'native',
38 | ),
39 | 'content_type_id' =>
40 | array (
41 | 'dbtype' => 'int',
42 | 'precision' => '11',
43 | 'phptype' => 'integer',
44 | 'null' => false,
45 | ),
46 | 'title' =>
47 | array (
48 | 'dbtype' => 'varchar',
49 | 'precision' => '255',
50 | 'phptype' => 'string',
51 | 'null' => false,
52 | ),
53 | 'alt' =>
54 | array (
55 | 'dbtype' => 'varchar',
56 | 'precision' => '255',
57 | 'phptype' => 'string',
58 | 'null' => false,
59 | ),
60 | 'manual_url' =>
61 | array (
62 | 'dbtype' => 'varchar',
63 | 'precision' => '255',
64 | 'phptype' => 'string',
65 | 'null' => false,
66 | 'index' => 'index',
67 | ),
68 | 'thumbnail_manual_url' =>
69 | array (
70 | 'dbtype' => 'varchar',
71 | 'precision' => '255',
72 | 'phptype' => 'string',
73 | 'null' => false,
74 | 'index' => 'index',
75 | ),
76 | 'stub' =>
77 | array (
78 | 'dbtype' => 'varchar',
79 | 'precision' => '255',
80 | 'phptype' => 'string',
81 | 'null' => true,
82 | 'index' => 'index',
83 | ),
84 | 'width' =>
85 | array (
86 | 'dbtype' => 'int',
87 | 'precision' => '4',
88 | 'phptype' => 'integer',
89 | 'null' => false,
90 | ),
91 | 'height' =>
92 | array (
93 | 'dbtype' => 'int',
94 | 'precision' => '4',
95 | 'phptype' => 'integer',
96 | 'null' => false,
97 | ),
98 | 'size' =>
99 | array (
100 | 'dbtype' => 'int',
101 | 'precision' => '11',
102 | 'phptype' => 'integer',
103 | 'null' => false,
104 | 'comment' => 'In Bytes',
105 | ),
106 | 'duration' =>
107 | array (
108 | 'dbtype' => 'int',
109 | 'precision' => '11',
110 | 'phptype' => 'integer',
111 | 'null' => false,
112 | 'comment' => 'for videos and sound files: round to seconds',
113 | ),
114 | 'sig' =>
115 | array (
116 | 'dbtype' => 'varchar',
117 | 'precision' => '40',
118 | 'phptype' => 'string',
119 | 'null' => false,
120 | 'index' => 'index',
121 | ),
122 | 'seq' =>
123 | array (
124 | 'dbtype' => 'int',
125 | 'precision' => '4',
126 | 'phptype' => 'integer',
127 | 'null' => false,
128 | ),
129 | 'is_image' =>
130 | array (
131 | 'dbtype' => 'tinyint',
132 | 'precision' => '1',
133 | 'attributes' => 'unsigned',
134 | 'phptype' => 'boolean',
135 | 'null' => false,
136 | 'default' => 1,
137 | ),
138 | 'is_active' =>
139 | array (
140 | 'dbtype' => 'tinyint',
141 | 'precision' => '1',
142 | 'attributes' => 'unsigned',
143 | 'phptype' => 'boolean',
144 | 'null' => false,
145 | 'default' => 1,
146 | ),
147 | 'is_protected' =>
148 | array (
149 | 'dbtype' => 'tinyint',
150 | 'precision' => '1',
151 | 'attributes' => 'unsigned',
152 | 'phptype' => 'boolean',
153 | 'null' => false,
154 | 'default' => 0,
155 | ),
156 | 'timestamp_created' =>
157 | array (
158 | 'dbtype' => 'timestamp',
159 | 'phptype' => 'timestamp',
160 | 'null' => true,
161 | 'default' => 'CURRENT_TIMESTAMP',
162 | ),
163 | 'timestamp_modified' =>
164 | array (
165 | 'dbtype' => 'timestamp',
166 | 'phptype' => 'timestamp',
167 | 'null' => true,
168 | ),
169 | ),
170 | 'indexes' =>
171 | array (
172 | 'PRIMARY' =>
173 | array (
174 | 'alias' => 'PRIMARY',
175 | 'primary' => true,
176 | 'unique' => true,
177 | 'columns' =>
178 | array (
179 | 'asset_id' =>
180 | array (
181 | 'length' => '',
182 | 'collation' => 'A',
183 | 'null' => false,
184 | ),
185 | ),
186 | ),
187 | 'url' =>
188 | array (
189 | 'alias' => 'url',
190 | 'primary' => false,
191 | 'unique' => true,
192 | 'type' => 'BTREE',
193 | 'columns' =>
194 | array (
195 | 'url' =>
196 | array (
197 | 'length' => '',
198 | 'collation' => 'A',
199 | 'null' => false,
200 | ),
201 | ),
202 | ),
203 | 'path' =>
204 | array (
205 | 'alias' => 'path',
206 | 'primary' => false,
207 | 'unique' => true,
208 | 'type' => 'BTREE',
209 | 'columns' =>
210 | array (
211 | 'path' =>
212 | array (
213 | 'length' => '',
214 | 'collation' => 'A',
215 | 'null' => true,
216 | ),
217 | ),
218 | ),
219 | 'sig' =>
220 | array (
221 | 'alias' => 'sig',
222 | 'primary' => false,
223 | 'unique' => true,
224 | 'type' => 'BTREE',
225 | 'columns' =>
226 | array (
227 | 'sig' =>
228 | array (
229 | 'length' => '',
230 | 'collation' => 'A',
231 | 'null' => false,
232 | ),
233 | ),
234 | ),
235 | ),
236 | 'composites' =>
237 | array (
238 | 'Pages' =>
239 | array (
240 | 'class' => 'PageAsset',
241 | 'local' => 'asset_id',
242 | 'foreign' => 'asset_id',
243 | 'cardinality' => 'many',
244 | 'owner' => 'local',
245 | ),
246 | ),
247 | 'aggregates' =>
248 | array (
249 | 'ContentType' =>
250 | array (
251 | 'class' => 'modContentType',
252 | 'local' => 'content_type_id',
253 | 'foreign' => 'id',
254 | 'cardinality' => 'one',
255 | 'owner' => 'foreign',
256 | ),
257 | ),
258 | );
259 |
--------------------------------------------------------------------------------
/model/assman/mysql/pageasset.class.php:
--------------------------------------------------------------------------------
1 | 'assman',
4 | 'version' => '1.0',
5 | 'table' => 'page_assets',
6 | 'extends' => 'xPDOSimpleObject',
7 | 'fields' =>
8 | array (
9 | 'page_id' => NULL,
10 | 'asset_id' => NULL,
11 | 'group' => NULL,
12 | 'is_active' => 1,
13 | 'seq' => NULL,
14 | ),
15 | 'fieldMeta' =>
16 | array (
17 | 'page_id' =>
18 | array (
19 | 'dbtype' => 'int',
20 | 'precision' => '11',
21 | 'phptype' => 'integer',
22 | 'null' => false,
23 | ),
24 | 'asset_id' =>
25 | array (
26 | 'dbtype' => 'int',
27 | 'precision' => '11',
28 | 'phptype' => 'integer',
29 | 'null' => false,
30 | ),
31 | 'group' =>
32 | array (
33 | 'dbtype' => 'varchar',
34 | 'precision' => '32',
35 | 'phptype' => 'string',
36 | 'null' => true,
37 | ),
38 | 'is_active' =>
39 | array (
40 | 'dbtype' => 'tinyint',
41 | 'precision' => '1',
42 | 'phptype' => 'integer',
43 | 'null' => false,
44 | 'default' => 1,
45 | 'comment' => 'Used to disable/enable an asset on a given page',
46 | ),
47 | 'seq' =>
48 | array (
49 | 'dbtype' => 'tinyint',
50 | 'precision' => '3',
51 | 'phptype' => 'integer',
52 | 'null' => true,
53 | ),
54 | ),
55 | 'indexes' =>
56 | array (
57 | 'PRIMARY' =>
58 | array (
59 | 'alias' => 'PRIMARY',
60 | 'primary' => true,
61 | 'unique' => true,
62 | 'columns' =>
63 | array (
64 | 'id' =>
65 | array (
66 | 'length' => '',
67 | 'collation' => 'A',
68 | 'null' => false,
69 | ),
70 | ),
71 | ),
72 | ),
73 | 'aggregates' =>
74 | array (
75 | 'Page' =>
76 | array (
77 | 'class' => 'modResource',
78 | 'local' => 'page_id',
79 | 'foreign' => 'id',
80 | 'cardinality' => 'one',
81 | 'owner' => 'foreign',
82 | ),
83 | 'Asset' =>
84 | array (
85 | 'class' => 'Asset',
86 | 'local' => 'asset_id',
87 | 'foreign' => 'asset_id',
88 | 'cardinality' => 'one',
89 | 'owner' => 'foreign',
90 | ),
91 | ),
92 | );
93 |
--------------------------------------------------------------------------------
/model/assman/pageasset.class.php:
--------------------------------------------------------------------------------
1 | xpdo->newQuery('PageAsset');
14 | $c->where(array('PageAsset.page_id' => $page_id));
15 | $c->sortby('PageAsset.seq','ASC');
16 | $PA = $this->xpdo->getCollectionGraph('PageAsset','{"Asset":{}}',$c);
17 | $out = array();
18 |
19 | foreach ($PA as $p) {
20 | $out[] = $p->toArray('',false,false,true);
21 | }
22 |
23 | return $out;
24 | }
25 |
26 | /**
27 | * Make sure the relations actually exist.
28 | */
29 | public function save($cacheFlag= null) {
30 |
31 | if (!$Asset = $this->xpdo->getObject('Asset', $this->get('asset_id'))) {
32 | $this->xpdo->log(\modX::LOG_LEVEL_ERROR, 'Invalid Asset ID: '.$this->get('asset_id'),'',__CLASS__);
33 | throw new \Exception('Invalid Asset ID specified for PageAsset');
34 | }
35 | if (!$Page = $this->xpdo->getObject('modResource', $this->get('page_id'))) {
36 | $this->xpdo->log(\modX::LOG_LEVEL_ERROR, 'Invalid Page ID: '.$this->get('page_id'),'',__CLASS__);
37 | throw new \Exception('Invalid Page ID specified for PageAsset');
38 | }
39 |
40 | return parent::save($cacheFlag);
41 | }
42 |
43 | }
--------------------------------------------------------------------------------
/model/migrations/install.php:
--------------------------------------------------------------------------------
1 | getOption('assman.core_path','',MODX_CORE_PATH.'components/assman/');
3 |
4 | // Add the package to the MODX extension_packages array
5 | // TODO: read the table prefix from config
6 | $modx->addExtensionPackage($object['namespace'],"{$core_path}model/", array('tablePrefix'=>'ass_'));
7 | $modx->addPackage('assman',"{$core_path}model/",'ass_');
8 |
9 | $manager = $modx->getManager();
10 |
11 | $manager->createObjectContainer('Asset');
12 | $manager->createObjectContainer('PageAsset');
13 |
--------------------------------------------------------------------------------
/model/migrations/uninstall.php:
--------------------------------------------------------------------------------
1 | getOption('assman.core_path','',MODX_CORE_PATH.'components/assman/');
9 |
10 | $modx->addPackage('assman',"{$core_path}model/",'ass_');
11 |
12 | $manager = $modx->getManager();
13 |
14 |
15 | // Moxycart
16 | $manager->removeObjectContainer('Asset');
17 | $manager->removeObjectContainer('PageAsset');
18 |
19 | // See https://github.com/modxcms/revolution/issues/829
20 | if ($Setting = $modx->getObject('modSystemSetting',array('key' => 'extension_packages'))) {
21 | $modx->removeExtensionPackage($object['namespace']);
22 | }
--------------------------------------------------------------------------------
/model/schema/assman.mysql.schema.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 | Sorry, the page you requested could not be found.
modx->lexicon('assman.groups.subtitle'); ?>
34 | modx->lexicon('assman.lbl.thumbnail'); ?> 35 | | 36 |37 | modx->lexicon('assman.lbl.title'); ?> 38 | | 39 |40 | modx->lexicon('assman.lbl.alt'); ?> 41 | | 42 |43 | modx->lexicon('assman.lbl.size'); ?> 44 | | 45 |modx->lexicon('assman.lbl.action'); ?> | 46 |
---|---|---|---|---|
get('path');
53 | print $this->modx->runSnippet('Asset', array('asset_id'=>$r->get('asset_id'),'width'=>$this->modx->getOption('assman.thumbnail_width'),'tpl'=>' |
56 | get('title'); ?> | 57 |get('alt'); ?> | 58 |get('size'); ?> 59 | | 60 |61 | | 64 | 62 | 63 |
Deleting the asset will remove it permanently from your site.
88 |Deleting cannot be undone!
89 |modx->lexicon('assman.index.subtitle') ?>
8 |This asset might be used by other pages!
144 |You can remove the image from this page,
145 | or you can delete the asset.
Deleting cannot be undone!
147 |Welcome to the Asset Manager! Please save your page before adding assets to it. 8 | Once your page has been saved, you can upload your assets here.
9 |modx->lexicon('assman.verify.subtitle'); ?>
6 |Congratulations! Your asset library matches with what's in the database!
19 | 20 | 21 | 22 |23 | 24 | 25 | 26 |27 | 28 | 29 | 30 |