[Alba-desarrollo] SVN Alba r4548 - in prosistem/alba/trunk/alba/web: . sfMediaLibraryPlugin sfMediaLibraryPlugin/css sfMediaLibraryPlugin/images sfMediaLibraryPlugin/js

commits en pressenter.com.ar commits en pressenter.com.ar
Mie Abr 18 17:23:13 CEST 2007


Author: josx
Date: 2007-04-18 12:23:04 -0300 (Wed, 18 Apr 2007)
New Revision: 4548

Added:
   prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/
   prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/css/
   prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/css/media.css
   prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/
   prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/archive.png
   prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/bin.png
   prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/delete.png
   prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/doc.png
   prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/edit.png
   prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/filenew.png
   prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/folder.png
   prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/folder_new.png
   prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/folder_open.png
   prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/html.png
   prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/image.png
   prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/pdf.png
   prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/ppt.png
   prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/txt.png
   prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/unknown.png
   prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/up.png
   prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/xls.png
   prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/js/
   prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/js/main.js
Log:
Archivos necesarios para los estilos del plugin sfMediaLibrary

Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/css/media.css
===================================================================
--- prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/css/media.css	2007-04-18 15:23:08 UTC (rev 4547)
+++ prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/css/media.css	2007-04-18 15:23:04 UTC (rev 4548)
@@ -0,0 +1,190 @@
+#sf_asset_container ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,p,blockquote,fieldset,input
+{ margin: 0; padding: 0; }
+#sf_asset_container a img,:link img,:visited img { border: none; }
+
+#sf_asset_container a:link, #sf_admin_container a:visited
+{
+  text-decoration: none;
+}
+
+#sf_asset_container a:hover
+{
+  text-decoration: underline;
+}
+
+#sf_asset_container td
+{
+  margin: 0;
+  padding: 20px;
+  font-family: Arial, sans-serif;
+  font-size: 11px;
+  background-color: #fff;
+}
+
+#sf_asset_container p
+{
+  margin-bottom: 5px;
+}
+
+
+#sf_asset_container #sf_asset_assets
+{
+  padding-top: 10px;
+  clear: left;
+}
+
+#sf_asset_container h1
+{
+  margin: 8px 0;
+  padding: 3px;
+  padding-left: 0px;
+  color: #555;
+  font-family: "Trebuchet MS", Arial, Verdana, sans-serif;
+  font-size: 25px;
+}
+
+#sf_asset_container input
+{
+  padding: 3px;
+  font-family: Arial, sans-serif;
+  font-size: 11px;
+  border: 1px solid #ddd;
+  vertical-align:middle;
+}
+
+#sf_asset_container label
+{
+  display: block;
+  padding: 0 1em 3px 0;
+  text-align: left;
+  color: #666;
+  font-weight: normal !important;
+}
+
+#sf_asset_container .form-row
+{
+  padding: 10px;
+  border-bottom: 1px solid #ddd;
+  height: 40px;
+}
+
+#sf_asset_container #sf_asset_upload_form
+{
+  width: 240px;
+  margin-right: 10px;
+}
+
+#sf_asset_container #sf_asset_mkdir_form
+{
+  width: 150px;
+}
+
+#sf_asset_container fieldset
+{
+  margin-bottom: 3px;
+  border: 1px solid #ddd;
+  border-bottom: 0px;
+}
+
+#sf_asset_container .float-left
+{
+  float: left;
+}
+
+#sf_asset_container .float-right
+{
+  float: right;
+}
+
+#sf_asset_container ul.sf_asset_actions
+{
+  display: block;
+  margin: 0;
+  list-style-type: none;
+  text-align: right;
+}
+
+#sf_asset_container ul.sf_asset_actions a
+{
+  color: #333;
+}
+
+#sf_asset_container ul.sf_asset_actions li
+{
+  list-style-type: none;
+  display: inline;
+}
+
+#sf_asset_container ul.sf_asset_actions input
+{
+  padding: 3px 3px 3px 20px;
+  color: #333;
+  font-size: 11px;
+  font-family: Arial, sans-serif;
+  border: 0px;
+  border-right: 4px solid #999;
+  background-color: #ffc;
+  cursor: hand;
+  cursor: pointer;
+}
+
+#sf_asset_container .sf_asset_action_add_file
+{
+  background: url(../images/filenew.png) no-repeat 3px 2px;
+  border-right: 4px solid #73B65A !important;
+}
+
+#sf_asset_container .sf_asset_action_add_folder
+{
+  background: url(../images/folder_new.png) no-repeat 3px 2px;
+  border-right: 4px solid #73B65A !important;
+}
+
+#sf_asset_container .sf_asset_filters li
+{
+  list-style-type: none;
+}
+
+#sf_asset_container .assetImage
+{
+  float: left;
+  padding: 10px 20px 5px 20px;
+  margin-right: 15px;
+  margin-bottom: 15px;
+  border: 1px solid #ddd;
+  background-color: #eee;
+  text-align: center;
+}
+
+#sf_asset_container .assetComment
+{
+  font-family: Arial, sans-serif;
+  margin: -5px -20px;
+  margin-top: 10px;
+  padding: 2px;
+  padding-left: 5px;
+  padding-right: 5px;
+  background-color: #aaa;
+  font-size: 90%;
+  color: #eee;
+  text-align: left;
+}
+
+#sf_asset_container .assetComment a
+{
+  border-bottom: 0;
+}
+
+#sf_asset_container .assetImage a
+{
+  color: #eee;
+  border-bottom: 0;
+}
+
+#sf_asset_container .thumbnails
+{
+  width: auto !important;
+  width: 0;
+  height: 64px;
+
+}

Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/archive.png
===================================================================
(Binary files differ)


Property changes on: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/archive.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/bin.png
===================================================================
(Binary files differ)


Property changes on: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/bin.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/delete.png
===================================================================
(Binary files differ)


Property changes on: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/delete.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/doc.png
===================================================================
(Binary files differ)


Property changes on: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/doc.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/edit.png
===================================================================
(Binary files differ)


Property changes on: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/edit.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/filenew.png
===================================================================
(Binary files differ)


Property changes on: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/filenew.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/folder.png
===================================================================
(Binary files differ)


Property changes on: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/folder.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/folder_new.png
===================================================================
(Binary files differ)


Property changes on: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/folder_new.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/folder_open.png
===================================================================
(Binary files differ)


Property changes on: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/folder_open.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/html.png
===================================================================
(Binary files differ)


Property changes on: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/html.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/image.png
===================================================================
(Binary files differ)


Property changes on: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/image.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/pdf.png
===================================================================
(Binary files differ)


Property changes on: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/pdf.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/ppt.png
===================================================================
(Binary files differ)


Property changes on: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/ppt.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/txt.png
===================================================================
(Binary files differ)


Property changes on: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/txt.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/unknown.png
===================================================================
(Binary files differ)


Property changes on: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/unknown.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/up.png
===================================================================
(Binary files differ)


Property changes on: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/up.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/xls.png
===================================================================
(Binary files differ)


Property changes on: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/images/xls.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/js/main.js
===================================================================
--- prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/js/main.js	2007-04-18 15:23:08 UTC (rev 4547)
+++ prosistem/alba/trunk/alba/web/sfMediaLibraryPlugin/js/main.js	2007-04-18 15:23:04 UTC (rev 4548)
@@ -0,0 +1,132 @@
+function sfMediaLibrary_Engine()
+{
+  // Browser check
+  var ua = navigator.userAgent;
+  this.isMSIE = (navigator.appName == "Microsoft Internet Explorer");
+  this.isMSIE5 = this.isMSIE && (ua.indexOf('MSIE 5') != -1);
+  this.isMSIE5_0 = this.isMSIE && (ua.indexOf('MSIE 5.0') != -1);
+  this.isGecko = ua.indexOf('Gecko') != -1;
+  this.isSafari = ua.indexOf('Safari') != -1;
+  this.isOpera = ua.indexOf('Opera') != -1;
+  this.isMac = ua.indexOf('Mac') != -1;
+  this.isNS7 = ua.indexOf('Netscape/7') != -1;
+  this.isNS71 = ua.indexOf('Netscape/7.1') != -1;
+  this.isTinyMCE = false;
+
+  // Fake MSIE on Opera and if Opera fakes IE, Gecko or Safari cancel those
+  if (this.isOpera) {
+    this.isMSIE = true;
+    this.isGecko = false;
+    this.isSafari =  false;
+  }
+}
+
+sfMediaLibrary_Engine.prototype = {
+  init : function(url)
+  {
+    this.url = url;
+  },
+
+  fileBrowserReturn : function (url)
+  {
+    if(this.isTinyMCE)
+    {
+      tinyMCE.setWindowArg('editor_id', this.fileBrowserWindowArg);
+      if (this.fileBrowserType == 'image')
+      {
+        this.fileBrowserWin.showPreviewImage(url);
+      }
+    }
+    this.fileBrowserWin.document.forms[this.fileBrowserFormName].elements[this.fileBrowserFieldName].value = url;
+  },
+
+  fileBrowserCallBack : function (field_name, url, type, win)
+  {
+    this.isTinyMCE = true;
+    this.fileBrowserWindowArg = tinyMCE.getWindowArg('editor_id');
+    var template = new Array();
+    template['title']  = 'Assets';
+    var url = this.url;
+    if (type == 'image')
+      url += '/images_only/1';
+    template['file']   = url;
+    template['width']  = 550;
+    template['height'] = 600;
+    template['close_previous'] = 'no';
+
+    this.fileBrowserWin = win;
+    this.fileBrowserFormName = 0;
+    this.fileBrowserFieldName = field_name;
+    this.fileBrowserType = type;
+    tinyMCE.openWindow(template, {inline : "yes", scrollbars: 'yes'});
+  },
+
+  openWindow : function(options)
+  {
+    var width, height, x, y, resizable, scrollbars, url;
+
+    if (!options)
+      return;
+    if (!options['field_name'])
+      return;
+    if (!options['url'] && !this.url)
+      return;
+    this.fileBrowserWin = self;
+    this.fileBrowserFormName = (options['form_name'] == '') ? 0 : options['form_name'];
+    this.fileBrowserFieldName = options['field_name'];
+    this.fileBrowserType = options['type'];
+
+    url = this.url;
+    if (options['type'] == 'image')
+      url += '/images_only/1';
+
+    if (!(width = parseInt(options['width'])))
+      width = 550;
+
+    if (!(width = parseInt(options['width'])))
+      width = 550;
+
+    if (!(height = parseInt(options['height'])))
+      height = 600;
+
+    // Add to height in M$ due to SP2 WHY DON'T YOU GUYS IMPLEMENT innerWidth of windows!!
+    if (sfMediaLibrary.isMSIE)
+      height += 40;
+    else
+      height += 20;
+
+    x = parseInt(screen.width / 2.0) - (width / 2.0);
+    y = parseInt(screen.height / 2.0) - (height / 2.0);
+
+    resizable = (options && options['resizable']) ? options['resizable'] : "no";
+    scrollbars = (options && options['scrollbars']) ? options['scrollbars'] : "no";
+
+    var modal = (resizable == "yes") ? "no" : "yes";
+
+    if (sfMediaLibrary.isGecko && sfMediaLibrary.isMac)
+      modal = "no";
+
+    if (options['close_previous'] != "no")
+      try {sfMediaLibrary.lastWindow.close();} catch (ex) {}
+
+    var win = window.open(url, "sfPopup" + new Date().getTime(), "top=" + y + ",left=" + x + ",scrollbars=" + scrollbars + ",dialog=" + modal + ",minimizable=" + resizable + ",modal=" + modal + ",width=" + width + ",height=" + height + ",resizable=" + resizable);
+
+    if (options['close_previous'] != "no")
+      sfMediaLibrary.lastWindow = win;
+
+    eval('try { win.resizeTo(width, height); } catch(e) { }');
+
+    // Make it bigger if statusbar is forced
+    if (sfMediaLibrary.isGecko)
+    {
+      if (win.document.defaultView.statusbar.visible)
+        win.resizeBy(0, sfMediaLibrary.isMac ? 10 : 24);
+    }
+
+    win.focus();
+
+  }
+}
+
+var SfMediaLibrary = sfMediaLibrary_Engine; // Compatiblity with gzip compressors
+var sfMediaLibrary = new sfMediaLibrary_Engine();




Más información sobre la lista de distribución Alba-desarrollo