[ Index ]

MailPress 7.2

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    

title

Body

[close]

/mp-includes/js/fileupload/ -> si.files.js (source)

   1  // STYLING FILE INPUTS 1.0 | Shaun Inman <http://www.shauninman.com/> | 2007-09-07
   2  if (!window.SI) { var SI = {}; };
   3  SI.Files =
   4  {
   5      htmlClass : 'SI-FILES-STYLIZED',
   6      fileClass : 'file',
   7      wrapClass : 'cabinet',
   8      
   9      fini : false,
  10      able : false,
  11      
  12      stylize : function(elem)
  13      {
  14          if (!this.fini) { this.init(); };
  15          if (!this.able) { return; };
  16  
  17          elem.parentNode.file = elem;
  18      },
  19      
  20      stylizeById : function(id)
  21      {
  22          this.stylize(document.getElementById(id));
  23      },
  24      
  25      stylizeAll : function()
  26      {
  27          if (!this.fini) { this.init(); };
  28          if (!this.able) { return; };
  29          
  30          var inputs = document.getElementsByTagName('input');
  31          for (var i = 0; i < inputs.length; i++)
  32          {
  33              var input = inputs[i];
  34              if (input.type == 'file' && input.className.indexOf(this.fileClass) != -1 && input.parentNode.className.indexOf(this.wrapClass) != -1)
  35              {
  36                  this.stylize(input);
  37              };
  38          };
  39      },
  40  
  41      init : function()
  42      {
  43          this.fini = true;
  44          
  45          var ie = 0 //@cc_on + @_jscript_version
  46          if (window.opera || (ie && ie < 5.5) || !document.getElementsByTagName) { return; } // no support for opacity or the DOM
  47          this.able = true;
  48          
  49          var html = document.getElementsByTagName('html')[0];
  50          html.className += (html.className != '' ? ' ' : '') + this.htmlClass;
  51      }
  52  };


Generated: Tue May 19 15:55:14 2020 Cross-referenced by PHPXref 0.7.1