[Alba-desarrollo] SVN Alba r4546 - in prosistem/alba/trunk/alba/plugins: . sfMediaLibraryPlugin sfMediaLibraryPlugin/lib sfMediaLibraryPlugin/lib/helper sfMediaLibraryPlugin/modules sfMediaLibraryPlugin/modules/sfMediaLibrary sfMediaLibraryPlugin/modules/sfMediaLibrary/actions sfMediaLibraryPlugin/modules/sfMediaLibrary/config sfMediaLibraryPlugin/modules/sfMediaLibrary/i18n sfMediaLibraryPlugin/modules/sfMediaLibrary/lib sfMediaLibraryPlugin/modules/sfMediaLibrary/templates sfMediaLibraryPlugin/web sfMediaLibraryPlugin/web/css sfMediaLibraryPlugin/web/images sfMediaLibraryPlugin/web/js

commits en pressenter.com.ar commits en pressenter.com.ar
Mie Abr 18 17:22:20 CEST 2007


Author: josx
Date: 2007-04-18 12:22:07 -0300 (Wed, 18 Apr 2007)
New Revision: 4546

Added:
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/LICENSE
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/README
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/lib/
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/lib/helper/
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/lib/helper/sfMe=
diaLibraryHelper.php
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMedia=
Library/
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMedia=
Library/actions/
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMedia=
Library/actions/actions.class.php
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMedia=
Library/config/
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMedia=
Library/config/view.yml
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMedia=
Library/i18n/
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMedia=
Library/i18n/sfMediaLibrary.fr.xml
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMedia=
Library/lib/
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMedia=
Library/lib/BasesfMediaLibraryActions.class.php
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMedia=
Library/templates/
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMedia=
Library/templates/_block.php
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMedia=
Library/templates/_dirs.php
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMedia=
Library/templates/_files.php
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMedia=
Library/templates/choiceSuccess.php
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMedia=
Library/templates/indexSuccess.php
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMedia=
Library/templates/renameSuccess.php
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/css/
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/css/media.c=
ss
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/arch=
ive.png
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/bin.=
png
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/dele=
te.png
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/doc.=
png
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/edit=
.png
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/file=
new.png
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/fold=
er.png
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/fold=
er_new.png
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/fold=
er_open.png
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/html=
.png
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/imag=
e.png
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/pdf.=
png
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/ppt.=
png
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/txt.=
png
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/unkn=
own.png
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/up.p=
ng
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/images/xls.=
png
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/js/
   prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/js/main.js
Log:
Version 0.81 del plugin sfMediaLibrary

Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/LICENSE
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/LICENSE	2007-0=
4-18 15:20:37 UTC (rev 4545)
+++ prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/LICENSE	2007-0=
4-18 15:22:07 UTC (rev 4546)
@@ -0,0 +1,7 @@
+Copyright (c) 2004-2007 Fabien Potencier, Frederic Coelho, Fran=E7ois Za=
ninotto
+
+Permission is hereby granted, free of charge, to any person obtaining a =
copy of this software and associated documentation files (the "Software")=
, to deal in the Software without restriction, including without limitati=
on the rights to use, copy, modify, merge, publish, distribute, sublicens=
e, and/or sell copies of the Software, and to permit persons to whom the =
Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included =
in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS =
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILIT=
Y, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHAL=
L THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OT=
HER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISI=
NG FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DE=
ALINGS IN THE SOFTWARE.

Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/README
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/README	2007-04=
-18 15:20:37 UTC (rev 4545)
+++ prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/README	2007-04=
-18 15:22:07 UTC (rev 4546)
@@ -0,0 +1,125 @@
+=3D sfMediaLibrary plugin =3D
+
+The `sfMediaLibraryPlugin` provides an easy-to-use interface to manage w=
eb assets (images, PDF documents, Flash objects, and so on). It also prov=
ides an extension to tinyMCE so that the media inclusion feature of rich =
text editors uses the assets uploaded through the plugin's module.
+
+This plug-in consists of:
+
+ - one module
+ - one helper group
+ - one JavaScript script
+=20
+=3D=3D Installation =3D=3D
+
+To install the plugin for a symfony project, the usual process is to use=
 the symfony command line:
+{{{
+$ php symfony plugin-install http://plugins.symfony-project.com/sfMediaL=
ibraryPlugin
+}}}
+
+Alternatively, if you don't have PEAR installed, you can download the la=
test package attached to this plugin's wiki page and extract it under you=
r project's `plugins/` directory. You will also have to copy the contents=
 of the `myproject/plugins/sfMediaLibraryPlugin/web/` directory into a `m=
yproject/web/sfMediaLibraryPlugin/` directory.
+
+Enable the new module in your application, via the `settings.yml` file.
+{{{
+// in myproject/apps/frontend/config/settings.yml
+all:
+  .settings:
+    enabled_modules:        [default, sfMediaLibrary]
+}}}
+
+Clear the cache to enable the autoloading to find the new classes:
+{{{
+$ php symfony cc
+}}}
+
+Start using the new module by making a request to:
+
+{{{
+http://myproject/frontend_dev.php/sfMediaLibrary
+}}}
+
+=3D=3D The `sfMediaLibrary` module =3D=3D
+
+The module allows for the upload, renaming and deletion of all types of =
files (image, pdf, spreadsheet, etc). Click on an asset name to rename it=
, click on the trashcan icon to delete it.
+
+You can create, rename and delete subdirectories as well, resulting in a=
 real tree structure that will keep your media assets organized.
+
+The module is fully i18n'ed, and the plugin comes with English and Frenc=
h translations.
+
+Uploaded assets end up under the `myproject/web/uploads/assets/` directo=
ry. This means that when you want to include them in a template with, for=
 instance, an `image_tag()`, you must use an absolute path, as follows:
+
+{{{
+<?php echo image_tag('/uploads/assets/path_to_asset.suffix') ?>
+}}}
+
+=3D=3D Using the media library with TinyMCE =3D=3D
+
+If you want to use the sfMediaLibrary plugin as a replacement for tinyMC=
E's file browser for image insertion, you must first initiate the plugin =
with a helper in the template:
+
+{{{
+<?php use_helper('sfMediaLibrary') ?>
+<?php echo init_media_library() ?>
+}}}
+
+The next thing to do is to pass a special JavaScript callback function t=
o the TinyMCE object at initialization. This is done with the `tinymce_op=
tions` option of the `textarea_tag()` helper:
+
+{{{
+<?php echo textarea_tag('content', '', array (
+  'rich' =3D> true,
+  'tinymce_options' =3D> 'file_browser_callback:"sfMediaLibrary.fileBrow=
serCallBack"',
+  )); ?>
+}}}
+
+That's it, the TinyMCE file browser is now the sfMediaLibrary's one.
+
+Tip: For use with an admin generated module, place the `init_media_libra=
ry()` call in the `_edit_header.php` partial in the `templates/` director=
y of the module. To define the callback in a `generator.yml`, do as follo=
ws:
+
+{{{
+generator:
+  class:              sfPropelAdminGenerator
+  param:
+    model_class:      Post
+    theme:            default
+       =20
+    edit:
+      fields:
+        content: { params: rich=3Dtrue tinymce_options=3D\'file_browser_=
callback:"sfMediaLibrary.fileBrowserCallBack"\' }
+}}}
+
+=3D=3D Using the Media Library input_file helper =3D=3D
+
+Traditionally, when an asset has to be referenced in a form, a file inpu=
t is used (`<input type=3D'file'>`). It allows the user to upload a file =
from his computer to the server, and this file can be further embedded in=
 a rich text content.
+
+Using the sfMediaLibrary, you can change this control into some sort of =
file input that wouldn't refer to the client's computer, but to the media=
 library itself, or, to put it differently, to the files located in `web/=
uploads/assets/`. The plugin comes with a special helper for that purpose=
, the `input_asset_tag()`. Use is just like a regular `input_tag()`:
+
+{{{
+<?php echo form_tag('foo/bar') ?>
+  <?php echo input_asset_tag('my_asset_field', '') ?>
+</form>
+}}}
+
+The input is not a real file input tag, meaning that the chosen asset fi=
le will not be posted woth the request. It is iseless anyway, since the f=
ile is already on the server. Instead, the action will be able to retriev=
e the asset file path relative to the web root, exactly what is needed to=
 display it.
+
+Optionally, you can restrict the choice of possible assets in this input=
 to images only, as follows:
+
+{{{
+<?php echo input_asset_tag('my_asset_field', '', array('images_only' =3D=
> true)) ?>
+}}}
+
+=3D=3D TODO =3D=3D
+
+ * Add screenshots to the wiki description
+ * Use [wiki:sfThumbnailPlugin] when available
+ * Improve CSS and design
+ * Improve compatibility
+ * Allow to move an asset to another directory
+ * Make path clickable to go up in the tree structure
+ * More translations for the `sfMediaLibrary` module
+=20
+=3D=3D Changelog =3D=3D
+
+=3D=3D=3D 2007-04-16 | 0.8.1 Beta =3D=3D=3D=20
+
+ * francois: Fixed a conflict with URL rewriting rules making folder nav=
igation impossible
+
+=3D=3D=3D 2007-04-13 | 0.8.0 Beta =3D=3D=3D=20
+
+ * francois: Initial release
\ No newline at end of file

Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/lib/helper/=
sfMediaLibraryHelper.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/lib/helper/sfM=
ediaLibraryHelper.php	2007-04-18 15:20:37 UTC (rev 4545)
+++ prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/lib/helper/sfM=
ediaLibraryHelper.php	2007-04-18 15:22:07 UTC (rev 4546)
@@ -0,0 +1,56 @@
+<?php
+
+function init_media_library()
+{
+  sfContext::getInstance()->getResponse()->addJavascript('/sfMediaLibrar=
yPlugin/js/main', 'last');
+  $url =3D url_for('sfMediaLibrary/choice');
+  $js =3D 'sfMediaLibrary.init(\''.$url.'\')';
+ =20
+  return javascript_tag($js);
+}
+
+function input_asset_tag($name, $value, $options =3D array())
+{
+  use_helper('Javascript');
+ =20
+  $type =3D 'all';
+  if (isset($options['images_only']))
+  {
+    $type =3D 'image';
+    unset($options['images_only']);
+  }
+ =20
+  $form_name =3D 'this.previousSibling.previousSibling.form.name';
+  if (isset($options['form_name']))
+  {
+    $form_name =3D '\''.$options['form_name'].'\'';
+    unset($options['form_name']);
+  }
+   =20
+  $html =3D '';
+
+  if (is_file(sfConfig::get('sf_web_dir').$value))
+  {
+    $ext  =3D substr($value, strpos($value, '.') - strlen($value) + 1);
+    if (in_array($ext, array('png', 'jpg', 'gif')))
+    {
+      $image_path =3D $value;
+    }
+    else
+    {
+      if (!is_file(sfConfig::get('sf_plugins_dir').'/sfMediaLibraryPlugi=
n/web/images/'.$ext.'.png'))
+      {
+        $ext =3D 'unknown';
+      }
+      $image_path =3D '/sfMediaLibraryPlugin/images/'.$ext;
+    }
+    $html .=3D link_to_function(image_tag($image_path, array('alt' =3D> =
'File', 'height' =3D> '64')), "window.open('$value')");
+    $html .=3D '<br />';
+  }
+
+  $html .=3D input_tag($name, $value, $options);
+  $html .=3D '&nbsp;'.image_tag('/sfMediaLibraryPlugin/images/folder_ope=
n', array('alt' =3D> __('Insert Image'), 'style' =3D> 'cursor: pointer; v=
ertical-align: middle', 'onclick' =3D> 'sfMediaLibrary.openWindow({ form_=
name: '.$form_name.', field_name: \''.$name.'\', type: \''.$type.'\', scr=
ollbars: \'yes\' })'));
+  $html .=3D init_media_library();
+
+  return $html;
+}


Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlug=
in/lib/helper/sfMediaLibraryHelper.php
___________________________________________________________________
Name: svn:keywords
   + "Id Author URL Date Rev"

Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfM=
ediaLibrary/actions/actions.class.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMedi=
aLibrary/actions/actions.class.php	2007-04-18 15:20:37 UTC (rev 4545)
+++ prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMedi=
aLibrary/actions/actions.class.php	2007-04-18 15:22:07 UTC (rev 4546)
@@ -0,0 +1,22 @@
+<?php
+
+/*
+ * This file is part of the symfony package.
+ * (c) 2004-2006 Fabien Potencier <fabien.potencier en symfony-project.com>
+ *
+ * For the full copyright and license information, please view the LICEN=
SE
+ * file that was distributed with this source code.
+ */
+
+require_once(dirname(__FILE__).'/../lib/BasesfMediaLibraryActions.class.=
php');
+
+/**
+ *
+ * @package    symfony
+ * @subpackage plugin
+ * @author     Fabien Potencier <fabien.potencier en symfony-project.com>
+ * @version    SVN: $Id: actions.class.php 1949 2006-09-05 14:40:20Z fab=
ien $
+ */
+class sfMediaLibraryActions extends BasesfMediaLibraryActions
+{
+}


Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlug=
in/modules/sfMediaLibrary/actions/actions.class.php
___________________________________________________________________
Name: svn:keywords
   + "Id Author URL Date Rev"

Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfM=
ediaLibrary/config/view.yml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMedi=
aLibrary/config/view.yml	2007-04-18 15:20:37 UTC (rev 4545)
+++ prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMedi=
aLibrary/config/view.yml	2007-04-18 15:22:07 UTC (rev 4546)
@@ -0,0 +1,6 @@
+all:
+  stylesheets: [%SF_ADMIN_WEB_DIR%/main, /sfMediaLibraryPlugin/css/media=
]
+
+choiceSuccess:
+  has_layout: false
+  stylesheets: [-*, %SF_ADMIN_WEB_DIR%/main, /sfMediaLibraryPlugin/css/m=
edia]
\ No newline at end of file


Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlug=
in/modules/sfMediaLibrary/config/view.yml
___________________________________________________________________
Name: svn:keywords
   + "Id Author URL Date Rev"

Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfM=
ediaLibrary/i18n/sfMediaLibrary.fr.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMedi=
aLibrary/i18n/sfMediaLibrary.fr.xml	2007-04-18 15:20:37 UTC (rev 4545)
+++ prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMedi=
aLibrary/i18n/sfMediaLibrary.fr.xml	2007-04-18 15:22:07 UTC (rev 4546)
@@ -0,0 +1,63 @@
+<?xml version=3D"1.0" ?>
+<xliff version=3D"1.0">
+  <file orginal=3D"global" source-language=3D"en_US" datatype=3D"plainte=
xt" date=3D"2004-12-28T18:10:19Z">
+    <body>
+      <trans-unit id=3D"1">
+        <source>Add</source>
+        <target>Ajouter</target>
+      </trans-unit>
+      <trans-unit id=3D"2">
+        <source>Media library (%1%)</source>
+        <target>M=C3=A9diath=C3=A8que (%1%)</target>
+      </trans-unit>
+      <trans-unit id=3D"3">
+        <source>Add a file:</source>
+        <target>Ajouter un fichier</target>
+      </trans-unit>
+      <trans-unit id=3D"4">
+        <source>Create a dir:</source>
+        <target>Cr=C3=A9er un r=C3=A9pertoire</target>
+      </trans-unit>
+      <trans-unit id=3D"5">
+        <source>Create</source>
+        <target>Cr=C3=A9er</target>
+      </trans-unit>
+      <trans-unit id=3D"6">
+        <source>Rename in process...</source>
+        <target>Renommage en cours...</target>
+      </trans-unit>
+      <trans-unit id=3D"7">
+        <source>Cancel</source>
+        <target>Annuler</target>
+      </trans-unit>
+      <trans-unit id=3D"8">
+        <source>Delete</source>
+        <target>Supprimer</target>
+      </trans-unit>
+      <trans-unit id=3D"9">
+        <source>Click to edit</source>
+        <target>Cliquer pour editer</target>
+      </trans-unit>
+      <trans-unit id=3D"10">
+        <source>Are you sure to want to delete this folder?</source>
+        <target>Etes-vous s=C3=BBr de vouloir supprimer ce r=C3=A9pertoi=
re ?</target>
+      </trans-unit>
+      <trans-unit id=3D"11">
+        <source>Are you sure to want to delete this file?</source>
+        <target>Etes-vous s=C3=BBr de vouloir supprimer ce fichier ?</ta=
rget>
+      </trans-unit>
+      <trans-unit id=3D"12">
+        <source>Rename</source>
+        <target>Renommer</target>
+      </trans-unit>
+      <trans-unit id=3D"13">
+        <source>Please choose a file first</source>
+        <target>Veuillez d\'abord s=C3=A9lectionner un fichier =C3=A0 ch=
arger</target>
+      </trans-unit>
+      <trans-unit id=3D"14">
+        <source>Please enter a directory name first</source>
+        <target>Veuillez d\'abord saisir un nom de r=C3=A9pertoire</targ=
et>
+      </trans-unit>     =20
+    </body>
+  </file>
+</xliff>
\ No newline at end of file

Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfM=
ediaLibrary/lib/BasesfMediaLibraryActions.class.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMedi=
aLibrary/lib/BasesfMediaLibraryActions.class.php	2007-04-18 15:20:37 UTC =
(rev 4545)
+++ prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMedi=
aLibrary/lib/BasesfMediaLibraryActions.class.php	2007-04-18 15:22:07 UTC =
(rev 4546)
@@ -0,0 +1,195 @@
+<?php
+
+/*
+ * This file is part of the symfony package.
+ * (c) 2004-2006 Fabien Potencier <fabien.potencier en symfony-project.com>
+ *
+ * For the full copyright and license information, please view the LICEN=
SE
+ * file that was distributed with this source code.
+ */
+
+/**
+ *
+ * @package    symfony
+ * @subpackage plugin
+ * @author     Fabien Potencier <fabien.potencier en symfony-project.com>
+ * @version    SVN: $Id: actions.class.php 1949 2006-09-05 14:40:20Z fab=
ien $
+ */
+class BasesfMediaLibraryActions extends sfActions
+{
+  public function executeIndex()
+  {
+    $currentDir =3D $this->dot2slash($this->getRequestParameter('dir'));
+    $this->currentDir =3D $this->getRequestParameter('dir');
+    $this->current_dir_slash =3D $currentDir . '/';
+    $this->webAbsCurrentDir =3D '/'.sfConfig::get('sf_upload_dir_name').=
'/assets'.$currentDir;
+    $this->absCurrentDir =3D sfConfig::get('sf_upload_dir').'/assets/'.$=
currentDir;
+
+    $this->forward404Unless(is_dir($this->absCurrentDir));
+
+    $dirs  =3D sfFinder::type('dir')->maxdepth(0)->prune('.*')->discard(=
'.*')->relative()->in($this->absCurrentDir);
+    $files =3D sfFinder::type('file')->maxdepth(0)->prune('.*')->discard=
('.*')->relative()->in($this->absCurrentDir);
+
+    sort($dirs);
+    sort($files);
+
+    $this->dirs =3D $dirs;
+
+    // compute some stats for each file
+    $infos =3D array();
+    foreach ($files as $file)
+    {
+      $info =3D array();
+
+      $info['ext']  =3D substr($file, strpos($file, '.') - strlen($file)=
 + 1);
+      if ($this->getRequestParameter('images_only') && !$this->isImage($=
info['ext']))
+      {
+        continue;
+      }
+      $stats =3D stat($this->absCurrentDir.'/'.$file);
+      $info['size'] =3D $stats['size'];
+      $info['icon'] =3D $this->isImage($info['ext']) ? $this->webAbsCurr=
entDir.'/'.$file : (is_readable(sfConfig::get('sf_web_dir').'/sfMediaLibr=
aryPlugin/images/'.$info['ext'].'.png') ? '/sfMediaLibraryPlugin/images/'=
.$info['ext'].'.png' : '/sfMediaLibraryPlugin/images/unknown.png');
+      $infos[$file] =3D $info;
+    }
+    $this->files =3D $infos;
+
+    // parent dir
+    $tmp =3D explode(' ', $this->currentDir);
+    array_pop($tmp);
+    $this->parentDir =3D implode(' ', $tmp);
+  }
+
+  protected function isImage($ext)
+  {
+    return in_array($ext, array('png', 'jpg', 'gif'));
+  }
+
+  public function executeChoice()
+  {
+    $this->executeIndex();
+  }
+
+  public function executeRename()
+  {
+    $current_path =3D $this->dot2slash($this->getRequestParameter('curre=
nt_path'));
+    $this->current_path =3D $this->getRequestParameter('current_path');
+    $type =3D $this->getRequestParameter('type');
+    $this->count =3D $this->getRequestParameter('count');
+
+    $this->abs_current_path =3D sfConfig::get('sf_upload_dir').'/assets/=
'.$current_path;
+    $this->web_abs_current_path =3D '/'.sfConfig::get('sf_upload_dir_nam=
e').'/assets/'.$current_path;
+
+    $name =3D $this->getRequestParameter('name');
+    $new_name =3D $this->getRequestParameter('new_name');
+    if ($type =3D=3D=3D 'folder')
+    {
+      $new_name =3D $this->sanitizeDir($new_name);
+      $this->forward404Unless(is_dir($this->abs_current_path.'/'.$name))=
;
+    }
+    else
+    {
+      $new_name =3D $this->sanitizeFile($new_name);
+      $this->forward404Unless(is_file($this->abs_current_path.'/'.$name)=
);
+    }
+
+    @rename($this->abs_current_path.'/'.$name, $this->abs_current_path.'=
/'.$new_name);
+
+    $this->info =3D array();
+    if (is_dir($this->abs_current_path.'/'.$new_name) and ($type =3D=3D=3D=
 'folder'))
+    {
+      $this->name =3D $new_name;
+    }
+    else if (is_file($this->abs_current_path.'/'.$new_name) and ($type =3D=
=3D=3D 'file'))
+    {
+      $this->name =3D $new_name;
+      $this->getInfo($new_name);
+    }
+    else
+    {
+      $this->name =3D $name;
+      $this->getInfo($name);
+    }
+    $this->type =3D $type;
+  }
+
+  protected function getInfo($filename)
+  {
+    $this->info['ext']  =3D substr($filename, strpos($filename, '.') - s=
trlen($filename) + 1);
+    $stats =3D stat($this->abs_current_path.'/'.$filename);
+    $this->info['size'] =3D $stats['size'];
+    $this->info['icon'] =3D $this->isImage($this->info['ext']) ? $this->=
web_abs_current_path.'/'.$filename : (is_readable(sfConfig::get('sf_web_d=
ir').'/sfMediaLibraryPlugin/images/'.$this->info['ext'].'.png') ? '/sfMed=
iaLibraryPlugin/images/'.$this->info['ext'].'.png' : '/sfMediaLibraryPlug=
in/images/unknown.png');
+  }
+
+  public function executeUpload()
+  {
+    $currentDir =3D $this->dot2slash($this->getRequestParameter('current=
_dir'));
+    $webAbsCurrentDir =3D '/'.sfConfig::get('sf_upload_dir_name').'/asse=
ts/'.$currentDir;
+    $absCurrentDir =3D sfConfig::get('sf_upload_dir').'/assets/'.$curren=
tDir;
+
+    $this->forward404Unless(is_dir($absCurrentDir));
+
+    $fileName =3D $this->sanitizeFile($this->getRequest()->getFileName('=
file'));
+
+    $this->getRequest()->moveFile('file', $absCurrentDir.'/'.$fileName);
+
+    $this->redirect('sfMediaLibrary/index?dir=3D'.$this->getRequestParam=
eter('current_dir'));
+  }
+
+  public function executeDelete()
+  {
+    $currentDir =3D $this->dot2slash($this->getRequestParameter('current=
_path'));
+    $currentFile =3D $this->getRequestParameter('name');
+    $absCurrentFile =3D sfConfig::get('sf_upload_dir').'/assets/'.$curre=
ntDir.'/'.$currentFile;
+
+    $this->forward404Unless(is_readable($absCurrentFile));
+
+    unlink($absCurrentFile);
+
+    $this->redirect('sfMediaLibrary/index?dir=3D'.$this->getRequestParam=
eter('current_path'));
+  }
+
+  public function executeMkdir()
+  {
+    $currentDir =3D $this->dot2slash($this->getRequestParameter('current=
_dir'));
+    $dirName =3D $this->sanitizeDir($this->getRequestParameter('name'));
+    $absCurrentDir =3D sfConfig::get('sf_upload_dir').'/assets/'.(empty(=
$currentDir) ? '' : $currentDir.'/').$dirName;
+
+    $old =3D umask(0000);
+    @mkdir($absCurrentDir, 0777);
+    umask($old);
+
+    $this->redirect('sfMediaLibrary/index?dir=3D'.$this->getRequestParam=
eter('current_dir'));
+  }
+
+  public function executeRmdir()
+  {
+    $currentDir =3D $this->dot2slash('.'.$this->getRequestParameter('cur=
rent_path'));
+    $absCurrentDir =3D sfConfig::get('sf_upload_dir').'/assets/'.$curren=
tDir.'/'.$this->getRequestParameter('name');
+
+    $this->forward404Unless(is_dir($absCurrentDir));
+
+    rmdir($absCurrentDir);
+
+    $this->redirect('sfMediaLibrary/index?dir=3D'.$this->getRequestParam=
eter('current_path'));
+  }
+ =20
+  protected function dot2slash($txt)
+  {
+    return preg_replace('#[\+\s]+#', '/', $txt);
+  }
+
+  protected function slash2dot($txt)
+  {
+    return preg_replace('#/+#', '+', $txt);
+  }
+
+  protected function sanitizeDir($dir)
+  {
+    return preg_replace('/[^a-z0-9_-]/i', '_', $dir);
+  }
+
+  protected function sanitizeFile($file)
+  {
+    return preg_replace('/[^a-z0-9_\.-]/i', '_', $file);
+  }
+}


Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlug=
in/modules/sfMediaLibrary/lib/BasesfMediaLibraryActions.class.php
___________________________________________________________________
Name: svn:keywords
   + "Id Author URL Date Rev"

Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfM=
ediaLibrary/templates/_block.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMedi=
aLibrary/templates/_block.php	2007-04-18 15:20:37 UTC (rev 4545)
+++ prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMedi=
aLibrary/templates/_block.php	2007-04-18 15:22:07 UTC (rev 4546)
@@ -0,0 +1,85 @@
+<?php if($sf_context->getActionName() !=3D=3D 'choice'): ?>
+  <?php $action =3D 'index' ?>
+<?php else: ?>
+  <?php $action =3D $sf_context->getActionName() ?>
+<?php endif; ?>
+
+<div class=3D"thumbnails">
+<?php if ($type =3D=3D=3D 'folder'): ?>
+  <?php echo link_to(image_tag('/sfMediaLibraryPlugin/images/folder', ar=
ray(
+    'alt' =3D> $name,
+    'title' =3D> $name,
+    'size' =3D> '64x64',
+  )), 'sfMediaLibrary/'.$action.'?dir=3D'.$current_path.'+'.$name) ?>
+  <?php if (($action !=3D=3D "index") and $is_file): ?>
+    <?php $size =3D '&nbsp;' ?>
+  <?php else: ?>
+    <?php $size =3D '' ?>
+  <?php endif; ?>
+  <?php $delete =3D 'rmdir' ?>
+<?php else: ?>
+  <?php if ($info['size'] < 4000): ?>
+    <?php $size2 =3D array() ?>
+  <?php else: ?>
+    <?php $size2 =3D array('height' =3D> '64') ?>
+  <?php endif; ?>
+  <?php $thumbnail =3D image_tag($info['icon'], array(
+    'alt' =3D> $name,
+    'title' =3D> $name,
+    ) + $size2) ?>
+  <?php if($action =3D=3D=3D "index"): ?>
+    <?php echo content_tag('a', $thumbnail, array(
+      'href' =3D> $web_abs_current_path.'/'.$name,
+      'target' =3D> '_blank',
+    )) ?>
+  <?php else: ?>
+    <?php echo link_to_function($thumbnail, "setFileSrc('".$web_abs_curr=
ent_path.'/'.$name."')") ?>
+  <?php endif; ?>
+
+    <?php ob_start() ?>
+    <?php if ($info['size'] < 1000): ?>
+      &nbsp;&nbsp;[<?php printf('%d', $info['size']) ?> o]
+    <?php else: ?>
+      &nbsp;&nbsp;[<?php printf('%d', $info['size'] / 1000) ?> Ko]
+    <?php endif; ?>
+    <?php $size =3D ob_get_contents() ?>
+    <?php ob_end_clean() ?>
+  <?php $delete =3D 'delete' ?>
+<?php endif; ?>
+</div>
+<div class=3D"assetComment">
+  <div id=3D"view_<?php echo $count ?>"><?php echo ($action =3D=3D=3D "i=
ndex") ? link_to_function($name, "Element.show('edit_".$count."');Element=
.hide('view_".$count."')") : $name ?></div>
+  <?php if($action =3D=3D=3D "index"): ?>
+    <div id=3D"edit_<?php echo $count ?>">
+      <?php echo form_tag('sfMediaLibrary/rename', 'name=3Dsf_asset_rena=
me_form') ?>
+        <?php echo input_hidden_tag('current_path', $current_path) ?>
+        <?php echo input_hidden_tag('name', $name) ?>
+        <?php echo input_hidden_tag('type', $type) ?>
+        <?php echo input_hidden_tag('count', $count) ?>
+        <?php echo input_tag('new_name', $name) ?>
+        <?php echo submit_to_remote('rename', __('Rename', null, 'sfMedi=
aLibrary'), array(
+          'url' =3D> 'sfMediaLibrary/rename',
+          'update' =3D> 'block_'.$count,
+          'script'=3D> true,
+          'before' =3D> visual_effect('opacity', 'block_'.$count, array(=
'duration' =3D> '0.5', 'from' =3D> '1.0', 'to' =3D> '0.3')),
+          'complete' =3D> visual_effect('opacity', 'block_'.$count, arra=
y('duration' =3D> '0.5', 'from' =3D> '0.3', 'to' =3D> '1.0')),
+          ),'class=3Dsf_asset_action_rename')?>
+          <?php echo button_to_function(__('Cancel', null, 'sfMediaLibra=
ry'), "Element.hide('edit_".$count."');Element.show('view_".$count."')") =
?>
+      </form>
+    </div>
+    <?php echo javascript_tag("
+    Element.hide('edit_".$count."');
+    ") ?>
+    <div style=3D"text-align:right">
+    <?php echo $size ?>
+    <?php echo link_to(image_tag('/sfMediaLibraryPlugin/images/delete.pn=
g', array(
+      'alt' =3D> __('Delete', null, 'sfMediaLibrary'),
+      'title' =3D> __('Delete', null, 'sfMediaLibrary'),
+      'align' =3D> 'absmiddle',
+    )), 'sfMediaLibrary/'.$delete.'?name=3D'.$name.'&current_path=3D'.$c=
urrent_path, array(
+      'confirm' =3D> __('Are you sure to want to delete this '.$type.'?'=
, null, 'sfMediaLibrary')
+    )) ?>
+    </div>
+  <?php endif; ?>
+</div>
+


Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlug=
in/modules/sfMediaLibrary/templates/_block.php
___________________________________________________________________
Name: svn:keywords
   + "Id Author URL Date Rev"

Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfM=
ediaLibrary/templates/_dirs.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMedi=
aLibrary/templates/_dirs.php	2007-04-18 15:20:37 UTC (rev 4545)
+++ prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMedi=
aLibrary/templates/_dirs.php	2007-04-18 15:22:07 UTC (rev 4546)
@@ -0,0 +1,17 @@
+<?php if ($currentDir !=3D ''): ?>
+  <div class=3D"assetImage"><?php echo link_to(image_tag('/sfMediaLibrar=
yPlugin/images/up', array('alt' =3D> '..', 'title' =3D> '..', 'size' =3D>=
 '64x64')), 'sfMediaLibrary/'.$sf_context->getActionName().'?dir=3D'.$par=
entDir) ?>
+    <p class=3D"assetComment">&raquo;&nbsp;..<?php if ($is_file or ($sf_=
context->getActionName() =3D=3D=3D 'index')): ?>
+      <br />&nbsp;
+    <?php endif; ?></p>
+  </div>
+<?php endif; ?>
+<?php $count =3D 0; foreach ($dirs as $dir): $count++ ?>
+  <div id=3D"block_<?php echo $count ?>" class=3D"assetImage"><?php incl=
ude_partial('sfMediaLibrary/block', array(
+      'name' =3D> $dir,
+      'current_path' =3D> $currentDir,
+      'type' =3D> 'folder',
+      'info' =3D> array(),
+      'count' =3D> $count,
+      'is_file' =3D> $is_file,
+    )) ?></div>
+<?php endforeach; ?>


Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlug=
in/modules/sfMediaLibrary/templates/_dirs.php
___________________________________________________________________
Name: svn:keywords
   + "Id Author URL Date Rev"

Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfM=
ediaLibrary/templates/_files.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMedi=
aLibrary/templates/_files.php	2007-04-18 15:20:37 UTC (rev 4545)
+++ prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMedi=
aLibrary/templates/_files.php	2007-04-18 15:22:07 UTC (rev 4546)
@@ -0,0 +1,10 @@
+<?php foreach ($files as $file =3D> $info): $count++ ?>
+<div id=3D"block_<?php echo $count ?>" class=3D"assetImage"><?php includ=
e_partial('sfMediaLibrary/block', array(
+    'name' =3D> $file,
+    'current_path' =3D> $currentDir,
+    'web_abs_current_path' =3D> $webAbsCurrentDir,
+    'type' =3D> 'file',
+    'info' =3D> $info,
+    'count' =3D> $count,
+)) ?></div>
+<?php endforeach; ?>


Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlug=
in/modules/sfMediaLibrary/templates/_files.php
___________________________________________________________________
Name: svn:keywords
   + "Id Author URL Date Rev"

Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfM=
ediaLibrary/templates/choiceSuccess.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMedi=
aLibrary/templates/choiceSuccess.php	2007-04-18 15:20:37 UTC (rev 4545)
+++ prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMedi=
aLibrary/templates/choiceSuccess.php	2007-04-18 15:22:07 UTC (rev 4546)
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://w=
ww.w3.org/TR/2000/REC-xhtml1-200000126/DTD/xhtml1-transitional.dtd">
+<html xmlns=3D"http://www.w3.org/1999/xhtml" xml:lang=3D"en" lang=3D"en"=
>
+<head>
+</head>
+<body>
+
+<?php use_helper('Javascript', 'I18N') ?>
+<?php echo javascript_tag("
+function setFileSrc(src)
+{
+  opener.sfMediaLibrary.fileBrowserReturn(src);
+  window.close();
+}
+") ?>
+<div id=3D"sf_asset_container">
+  <h1><?php echo __('Media library (%1%)', array('%1%' =3D> $current_dir=
_slash), 'sfMediaLibrary') ?></h1>
+  <div id=3D"sf_asset_content_popup">
+    <?php include_partial('sfMediaLibrary/dirs', array('dirs' =3D> $dirs=
, 'currentDir' =3D> $currentDir, 'parentDir' =3D> $parentDir, 'is_file' =3D=
> (count($files) > 0))) ?>
+    <?php include_partial('sfMediaLibrary/files', array('files' =3D> $fi=
les, 'currentDir' =3D> $currentDir, 'webAbsCurrentDir' =3D> $webAbsCurren=
tDir, 'count' =3D> count($dirs))) ?>
+  </div>
+</div>
+
+</body>
+</html>
\ No newline at end of file


Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlug=
in/modules/sfMediaLibrary/templates/choiceSuccess.php
___________________________________________________________________
Name: svn:keywords
   + "Id Author URL Date Rev"

Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfM=
ediaLibrary/templates/indexSuccess.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMedi=
aLibrary/templates/indexSuccess.php	2007-04-18 15:20:37 UTC (rev 4545)
+++ prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMedi=
aLibrary/templates/indexSuccess.php	2007-04-18 15:22:07 UTC (rev 4546)
@@ -0,0 +1,60 @@
+<?php use_helper('Javascript', 'I18N') ?>
+
+<div id=3D"sf_asset_container">
+
+  <h1><?php echo __('Media library (%1%)', array('%1%' =3D> $current_dir=
_slash), 'sfMediaLibrary') ?></h1>
+
+<div id=3D"sf_asset_content">
+
+  <div id=3D"sf_asset_controls">
+   =20
+    <?php echo form_tag('sfMediaLibrary/upload', 'class=3Dfloat-left id=3D=
sf_asset_upload_form name=3Dsf_asset_upload_form multipart=3Dtrue') ?>
+    <?php echo input_hidden_tag('current_dir', $currentDir) ?>
+    <fieldset>
+      <div class=3D"form-row">
+        <?php echo label_for('file', __('Add a file:', null, 'sfMediaLib=
rary'), '') ?>
+        <div class=3D"content"><?php echo input_file_tag('file') ?></div=
>
+      </div>
+    </fieldset>
+ =20
+    <ul class=3D"sf_asset_actions">
+      <li><?php echo submit_tag(__('Add', null, 'sfMediaLibrary'), array=
 (
+        'name' =3D> 'add',
+        'class' =3D> 'sf_asset_action_add_file',
+        'onclick' =3D> "if($('file').value=3D=3D'') { alert('".__('Pleas=
e choose a file first', null, 'sfMediaLibrary')."');return false; }",
+      )) ?></li>
+    </ul>
+ =20
+    </form>
+ =20
+    <?php echo form_tag('sfMediaLibrary/mkdir', 'class=3Dfloat-left id=3D=
sf_asset_mkdir_form name=3Dsf_asset_mkdir_form') ?>
+    <?php echo input_hidden_tag('current_dir', $currentDir) ?>
+    <fieldset>
+      <div class=3D"form-row">
+        <?php echo label_for('dir', __('Create a dir:', null, 'sfMediaLi=
brary'), '') ?>
+        <div class=3D"content"><?php echo input_tag('name', null, 'size=3D=
15 id=3Ddir') ?></div>
+      </div>
+    </fieldset>
+ =20
+    <ul class=3D"sf_asset_actions">
+      <li><?php echo submit_tag(__('Create', null, 'sfMediaLibrary'), ar=
ray (
+        'name' =3D> 'create',
+        'class' =3D> 'sf_asset_action_add_folder',
+        'onclick' =3D> "if($('dir').value=3D=3D'') { alert('".__('Please=
 enter a directory name first', null, 'sfMediaLibrary')."');return false;=
 }",
+      )) ?></li>
+    </ul>
+ =20
+    </form>
+   =20
+  </div>
+
+  <div id=3D"sf_asset_assets">
+
+    <?php include_partial('sfMediaLibrary/dirs', array('dirs' =3D> $dirs=
, 'currentDir' =3D> $currentDir, 'parentDir' =3D> $parentDir, 'is_file' =3D=
> (count($files) > 0))) ?>
+    <?php include_partial('sfMediaLibrary/files', array('files' =3D> $fi=
les, 'currentDir' =3D> $currentDir, 'webAbsCurrentDir' =3D> $webAbsCurren=
tDir, 'count' =3D> count($dirs))) ?>
+
+  </div>
+
+</div>
+
+</div>


Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlug=
in/modules/sfMediaLibrary/templates/indexSuccess.php
___________________________________________________________________
Name: svn:keywords
   + "Id Author URL Date Rev"

Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfM=
ediaLibrary/templates/renameSuccess.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMedi=
aLibrary/templates/renameSuccess.php	2007-04-18 15:20:37 UTC (rev 4545)
+++ prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/modules/sfMedi=
aLibrary/templates/renameSuccess.php	2007-04-18 15:22:07 UTC (rev 4546)
@@ -0,0 +1,10 @@
+<?php use_helper('Javascript', 'I18N') ?>
+
+<?php include_partial('sfMediaLibrary/block', array(
+  'name' =3D> $name,
+  'current_path' =3D> $current_path,
+  'web_abs_current_path' =3D> $web_abs_current_path,
+  'type' =3D> $type,
+  'info' =3D> $info,
+  'count' =3D> $count,
+)) ?>
\ No newline at end of file


Property changes on: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlug=
in/modules/sfMediaLibrary/templates/renameSuccess.php
___________________________________________________________________
Name: svn:keywords
   + "Id Author URL Date Rev"

Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/css/med=
ia.css
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/css/media.=
css	2007-04-18 15:20:37 UTC (rev 4545)
+++ prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/css/media.=
css	2007-04-18 15:22:07 UTC (rev 4546)
@@ -0,0 +1,190 @@
+#sf_asset_container ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,p,blockquote,fie=
ldset,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/plugins/sfMediaLibraryPlugin/web/images/=
archive.png
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

Added: prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/js/main=
.js
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/js/main.js=
	2007-04-18 15:20:37 UTC (rev 4545)
+++ prosistem/alba/trunk/alba/plugins/sfMediaLibraryPlugin/web/js/main.js=
	2007-04-18 15:22:07 UTC (rev 4546)
@@ -0,0 +1,132 @@
+function sfMediaLibrary_Engine()
+{
+  // Browser check
+  var ua =3D navigator.userAgent;
+  this.isMSIE =3D (navigator.appName =3D=3D "Microsoft Internet Explorer=
");
+  this.isMSIE5 =3D this.isMSIE && (ua.indexOf('MSIE 5') !=3D -1);
+  this.isMSIE5_0 =3D this.isMSIE && (ua.indexOf('MSIE 5.0') !=3D -1);
+  this.isGecko =3D ua.indexOf('Gecko') !=3D -1;
+  this.isSafari =3D ua.indexOf('Safari') !=3D -1;
+  this.isOpera =3D ua.indexOf('Opera') !=3D -1;
+  this.isMac =3D ua.indexOf('Mac') !=3D -1;
+  this.isNS7 =3D ua.indexOf('Netscape/7') !=3D -1;
+  this.isNS71 =3D ua.indexOf('Netscape/7.1') !=3D -1;
+  this.isTinyMCE =3D false;
+
+  // Fake MSIE on Opera and if Opera fakes IE, Gecko or Safari cancel th=
ose
+  if (this.isOpera) {
+    this.isMSIE =3D true;
+    this.isGecko =3D false;
+    this.isSafari =3D  false;
+  }
+}
+
+sfMediaLibrary_Engine.prototype =3D {
+  init : function(url)
+  {
+    this.url =3D url;
+  },
+
+  fileBrowserReturn : function (url)
+  {
+    if(this.isTinyMCE)
+    {
+      tinyMCE.setWindowArg('editor_id', this.fileBrowserWindowArg);
+      if (this.fileBrowserType =3D=3D 'image')
+      {
+        this.fileBrowserWin.showPreviewImage(url);
+      }
+    }
+    this.fileBrowserWin.document.forms[this.fileBrowserFormName].element=
s[this.fileBrowserFieldName].value =3D url;
+  },
+
+  fileBrowserCallBack : function (field_name, url, type, win)
+  {
+    this.isTinyMCE =3D true;
+    this.fileBrowserWindowArg =3D tinyMCE.getWindowArg('editor_id');
+    var template =3D new Array();
+    template['title']  =3D 'Assets';
+    var url =3D this.url;
+    if (type =3D=3D 'image')
+      url +=3D '/images_only/1';
+    template['file']   =3D url;
+    template['width']  =3D 550;
+    template['height'] =3D 600;
+    template['close_previous'] =3D 'no';
+
+    this.fileBrowserWin =3D win;
+    this.fileBrowserFormName =3D 0;
+    this.fileBrowserFieldName =3D field_name;
+    this.fileBrowserType =3D 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 =3D self;
+    this.fileBrowserFormName =3D (options['form_name'] =3D=3D '') ? 0 : =
options['form_name'];
+    this.fileBrowserFieldName =3D options['field_name'];
+    this.fileBrowserType =3D options['type'];
+
+    url =3D this.url;
+    if (options['type'] =3D=3D 'image')
+      url +=3D '/images_only/1';
+
+    if (!(width =3D parseInt(options['width'])))
+      width =3D 550;
+
+    if (!(width =3D parseInt(options['width'])))
+      width =3D 550;
+
+    if (!(height =3D parseInt(options['height'])))
+      height =3D 600;
+
+    // Add to height in M$ due to SP2 WHY DON'T YOU GUYS IMPLEMENT inner=
Width of windows!!
+    if (sfMediaLibrary.isMSIE)
+      height +=3D 40;
+    else
+      height +=3D 20;
+
+    x =3D parseInt(screen.width / 2.0) - (width / 2.0);
+    y =3D parseInt(screen.height / 2.0) - (height / 2.0);
+
+    resizable =3D (options && options['resizable']) ? options['resizable=
'] : "no";
+    scrollbars =3D (options && options['scrollbars']) ? options['scrollb=
ars'] : "no";
+
+    var modal =3D (resizable =3D=3D "yes") ? "no" : "yes";
+
+    if (sfMediaLibrary.isGecko && sfMediaLibrary.isMac)
+      modal =3D "no";
+
+    if (options['close_previous'] !=3D "no")
+      try {sfMediaLibrary.lastWindow.close();} catch (ex) {}
+
+    var win =3D window.open(url, "sfPopup" + new Date().getTime(), "top=3D=
" + y + ",left=3D" + x + ",scrollbars=3D" + scrollbars + ",dialog=3D" + m=
odal + ",minimizable=3D" + resizable + ",modal=3D" + modal + ",width=3D" =
+ width + ",height=3D" + height + ",resizable=3D" + resizable);
+
+    if (options['close_previous'] !=3D "no")
+      sfMediaLibrary.lastWindow =3D 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 =3D sfMediaLibrary_Engine; // Compatiblity with gzip =
compressors
+var sfMediaLibrary =3D new sfMediaLibrary_Engine();




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