Changeset 28552
- Timestamp:
- May 28, 2014, 11:33:17 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/themes/default/js/addAlbum.js
r28540 r28552 84 84 85 85 albumParent.val(''); 86 jQuery('#albumSelection ').show();86 jQuery('#albumSelection, .selectFiles, .showFieldset').show(); 87 87 }, 88 88 error: function(XMLHttpRequest, textStatus, errorThrows) { -
trunk/admin/themes/default/template/photos_add_direct.tpl
r28545 r28552 26 26 filter: function(categories, options) { 27 27 if (categories.length > 0) { 28 jQuery("#albumSelection ").show();28 jQuery("#albumSelection, .selectFiles, .showFieldset").show(); 29 29 options.default = categories[0].id; 30 30 } … … 43 43 var sizeLimit = Math.round({$upload_max_filesize} / 1024); /* in KBytes */ 44 44 45 var noAlbum_message = "{'Select an album'|translate}"; 46 45 47 {literal} 46 48 jQuery(document).ready(function(){ 47 function checkUploadStart() {48 var nbErrors = 0;49 jQuery("#formErrors").hide();50 jQuery("#formErrors li").hide();51 52 if (jQuery("select[name=category]").val() == '') {53 jQuery("#formErrors #noAlbum").show();54 nbErrors++;55 }56 57 var nbFiles = 0;58 if (jQuery("#uploadBoxes").size() == 1) {59 jQuery("input[name^=image_upload]").each(function() {60 if (jQuery(this).val() != "") {61 nbFiles++;62 }63 });64 }65 else {66 nbFiles = jQuery(".uploadifyQueueItem").size();67 }68 69 if (nbFiles == 0) {70 jQuery("#formErrors #noPhoto").show();71 nbErrors++;72 }73 74 if (nbErrors != 0) {75 jQuery("#formErrors").show();76 return false;77 }78 else {79 return true;80 }81 82 }83 84 function humanReadableFileSize(bytes) {85 var byteSize = Math.round(bytes / 1024 * 100) * .01;86 var suffix = 'KB';87 88 if (byteSize > 1000) {89 byteSize = Math.round(byteSize *.001 * 100) * .01;90 suffix = 'MB';91 }92 93 var sizeParts = byteSize.toString().split('.');94 if (sizeParts.length > 1) {95 byteSize = sizeParts[0] + '.' + sizeParts[1].substr(0,2);96 }97 else {98 byteSize = sizeParts[0];99 }100 101 return byteSize+suffix;102 }103 104 jQuery("#hideErrors").click(function() {105 jQuery("#formErrors").hide();106 return false;107 });108 109 49 jQuery("#uploadWarningsSummary a.showInfo").click(function() { 110 50 jQuery("#uploadWarningsSummary").hide(); … … 177 117 178 118 html = '<a href="admin.php?page=photo-'+data.result.image_id+'" target="_blank">'; 179 html += '<img src="'+data.result.src+'" class="thumbnail" >';119 html += '<img src="'+data.result.src+'" class="thumbnail" title="'+data.result.name+'">'; 180 120 html += '</a> '; 181 121 182 122 jQuery("#uploadedPhotos").prepend(html); 123 124 up.removeFile(file); 183 125 } 184 126 } … … 194 136 195 137 <div id="photosAddContent"> 138 139 {* 140 <div class="infos"> 141 <ul> 142 <li>%d photos added..</li> 143 </ul> 144 </div> 145 *} 196 146 197 147 {if count($setup_errors) > 0} … … 232 182 {else} 233 183 234 <div id="formErrors" class="errors" style="display:none"> 235 <ul> 236 <li id="noAlbum">{'Select an album'|@translate}</li> 237 <li id="noPhoto">{'Select at least one photo'|@translate}</li> 238 </ul> 239 <div class="hideButton" style="text-align:center"><a href="#" id="hideErrors">{'Hide'|@translate}</a></div> 240 </div> 241 242 243 <form id="uploadForm" enctype="multipart/form-data" method="post" action="{$form_action}" class="properties"> 184 <form id="uploadForm" enctype="multipart/form-data" method="post" action="{$form_action}"> 244 185 {if $upload_mode eq 'multiple'} 245 186 <input name="upload_id" value="{$upload_id}" type="hidden"> … … 256 197 </fieldset> 257 198 258 <p class="showFieldset" ><a id="showPermissions" href="#">{'Manage Permissions'|@translate}</a></p>199 <p class="showFieldset" style="display:none"><a id="showPermissions" href="#">{'Manage Permissions'|@translate}</a></p> 259 200 260 201 <fieldset id="permissions" style="display:none"> … … 266 207 </fieldset> 267 208 268 <fieldset >209 <fieldset class="selectFiles" style="display:none"> 269 210 <legend>{'Select files'|@translate}</legend> 270 211 … … 283 224 284 225 <div id="uploader"> 285 <p>Your browser doesn't have Flash, Silverlight orHTML5 support.</p>226 <p>Your browser doesn't have HTML5 support.</p> 286 227 </div> 287 228 -
trunk/admin/themes/default/theme.css
r28545 r28552 984 984 985 985 /* Upload Form */ 986 .plupload_header {display:none;} 987 #uploadForm .plupload_container {padding:0} 988 #uploadForm .plupload_scroll .plupload_filelist {height:250px;} 989 #uploadForm li.plupload_droptext {line-height:230px;font-size:2em;} 990 986 991 #uploadBoxes .file {margin-bottom:5px;text-align:left;} 987 992 #uploadBoxes {margin-top:20px;} -
trunk/include/ws_functions/pwg.images.php
r28545 r28552 1303 1303 $chunks = isset($_REQUEST["chunks"]) ? intval($_REQUEST["chunks"]) : 0; 1304 1304 1305 file_put_contents('/tmp/plupload.log', "[".date('c')."] ".__FUNCTION__.', '.$fileName.' '.($chunk+1).'/'.$chunks."\n", FILE_APPEND); 1306 1307 single_insert( 1308 'plupload', 1309 array( 1310 'received_on' => date('c'), 1311 'filename' => $fileName, 1312 'chunk' => $chunk+1, 1313 'chunks' => $chunks, 1314 ) 1315 ); 1316 1305 // file_put_contents('/tmp/plupload.log', "[".date('c')."] ".__FUNCTION__.', '.$fileName.' '.($chunk+1).'/'.$chunks."\n", FILE_APPEND); 1317 1306 1318 1307 // Open temp file … … 1370 1359 SELECT 1371 1360 id, 1361 name, 1372 1362 path 1373 1363 FROM '.IMAGES_TABLE.' … … 1379 1369 'image_id' => $image_id, 1380 1370 'src' => DerivativeImage::thumb_url($image_infos), 1371 'name' => $image_infos['name'], 1381 1372 ); 1382 1373 }
Note: See TracChangeset
for help on using the changeset viewer.