Permalink
Browse files

Update View/Helper/UploadHelper.php

  • Loading branch information...
1 parent 81f9a2f commit 97ce004ead461e06bdd124aaa67079b36b76d9c7 @plugs plugs committed Oct 29, 2012
Showing with 24 additions and 0 deletions.
  1. +24 −0 View/Helper/UploadHelper.php
@@ -75,6 +75,30 @@ public function edit ($model, $id) {
</div>
<script src="$webroot/js/fileuploader.js" type="text/javascript"></script>
<script>
+ if (typeof document.getElementsByClassName!='function') {
+ document.getElementsByClassName = function() {
+ var elms = document.getElementsByTagName('*');
+ var ei = new Array();
+ for (i=0;i<elms.length;i++) {
+ if (elms[i].getAttribute('class')) {
+ ecl = elms[i].getAttribute('class').split(' ');
+ for (j=0;j<ecl.length;j++) {
+ if (ecl[j].toLowerCase() == arguments[0].toLowerCase()) {
+ ei.push(elms[i]);
+ }
+ }
+ } else if (elms[i].className) {
+ ecl = elms[i].className.split(' ');
+ for (j=0;j<ecl.length;j++) {
+ if (ecl[j].toLowerCase() == arguments[0].toLowerCase()) {
+ ei.push(elms[i]);
+ }
+ }
+ }
+ }
+ return ei;
+ }
+ }
function createUploader(){
var amuCollection = document.getElementsByClassName("AjaxMultiUpload$lastDir");
for (var i = 0, max = amuCollection.length; i < max; i++) {

0 comments on commit 97ce004

Please sign in to comment.