[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [6629] property: some clean up and use lightbox for m
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [6629] property: some clean up and use lightbox for multiple fileupload |
Date: |
Tue, 23 Nov 2010 20:05:33 +0000 |
Revision: 6629
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6629
Author: sigurdne
Date: 2010-11-23 20:05:32 +0000 (Tue, 23 Nov 2010)
Log Message:
-----------
property: some clean up and use lightbox for multiple fileupload
Modified Paths:
--------------
trunk/property/inc/class.uientity.inc.php
trunk/property/js/yahoo/entity.edit.js
trunk/property/js/yahoo/property.js
trunk/property/templates/base/entity.xsl
trunk/property/templates/base/files.xsl
Modified: trunk/property/inc/class.uientity.inc.php
===================================================================
--- trunk/property/inc/class.uientity.inc.php 2010-11-23 12:32:05 UTC (rev
6628)
+++ trunk/property/inc/class.uientity.inc.php 2010-11-23 20:05:32 UTC (rev
6629)
@@ -1708,17 +1708,12 @@
'lang_upload_file'
=> lang('Upload file'),
'lang_file_statustext' =>
lang('Select file to upload'),
'multiple_uploader'
=> $id ? true : '',
- 'fileuploader_action' =>
"javascript:openwindow('"
-
. $GLOBALS['phpgw']->link('/index.php', array
-
(
-
'menuaction' => 'property.fileuploader.add',
-
'upload_target' => 'property.uientity.addfiles',
-
'id' => $id,
-
'_entity_id' => $this->entity_id,
-
'_cat_id' => $this->cat_id,
-
'_type' => $this->type
-
)) . "','400','400')",
-
+ 'fileuploader_action' =>
"{menuaction:'property.fileuploader.add',"
+
."upload_target:'property.uientity.addfiles',"
+
."id:'{$id}',"
+
."_entity_id:'{$this->entity_id}',"
+
."_cat_id:'{$this->cat_id}',"
+
."_type:'{$this->type}'}",
'value_origin'
=> isset($values['origin'])?$values['origin']:'',
'value_origin_type'
=> isset($origin)?$origin:'',
'value_origin_id'
=> isset($origin_id)?$origin_id:'',
Modified: trunk/property/js/yahoo/entity.edit.js
===================================================================
--- trunk/property/js/yahoo/entity.edit.js 2010-11-23 12:32:05 UTC (rev
6628)
+++ trunk/property/js/yahoo/entity.edit.js 2010-11-23 20:05:32 UTC (rev
6629)
@@ -10,6 +10,27 @@
/********************************************************************************/
+ this.myParticularRenderEvent = function()
+ {
+ }
+
+
+ this.fileuploader = function()
+ {
+ var sUrl = phpGWLink('index.php', fileuploader_action);
+ var onDialogShow = function(e, args, o)
+ {
+ var frame = document.createElement('iframe');
+ frame.src = sUrl;
+ frame.width = "100%";
+ frame.height = "350";
+ o.setBody(frame);
+ };
+ lightbox.showEvent.subscribe(onDialogShow, lightbox);
+ lightbox.show();
+ }
+
+
YAHOO.util.Event.addListener(window, "load", function()
{
var loader = new YAHOO.util.YUILoader();
@@ -25,7 +46,7 @@
YAHOO.util.Event.addListener(window, "load", function()
{
- lightbox = new YAHOO.widget.Dialog("test",
+ lightbox = new YAHOO.widget.Dialog("lightbox-placeholder",
{
width : "600px",
fixedcenter : true,
@@ -37,5 +58,5 @@
lightbox.render();
- YAHOO.util.Dom.setStyle('test', 'display', 'block');
+ YAHOO.util.Dom.setStyle('lightbox-placeholder', 'display',
'block');
});
Modified: trunk/property/js/yahoo/property.js
===================================================================
--- trunk/property/js/yahoo/property.js 2010-11-23 12:32:05 UTC (rev 6628)
+++ trunk/property/js/yahoo/property.js 2010-11-23 20:05:32 UTC (rev 6629)
@@ -554,6 +554,7 @@
*/
this.onContextMenuBeforeShow = function(p_sType, p_aArgs)
{
+ var prefixSelected = '';
var oTarget = this.contextEventTarget;
if (this.getRoot() == this)
{
@@ -572,6 +573,7 @@
*/
this.onContextMenuHide = function(p_sType, p_aArgs)
{
+ var prefixSelected = '';
if (this.getRoot() == this && oSelectedTR)
{
oSelectedTR.style.backgroundColor = "" ;
Modified: trunk/property/templates/base/entity.xsl
===================================================================
--- trunk/property/templates/base/entity.xsl 2010-11-23 12:32:05 UTC (rev
6628)
+++ trunk/property/templates/base/entity.xsl 2010-11-23 20:05:32 UTC (rev
6629)
@@ -5,204 +5,17 @@
<xsl:when test="edit">
<xsl:apply-templates select="edit"/>
</xsl:when>
- <xsl:when test="view">
- <xsl:apply-templates select="view"/>
- </xsl:when>
<xsl:when test="empty">
<xsl:apply-templates select="empty"/>
</xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="list"/>
- </xsl:otherwise>
</xsl:choose>
</xsl:template>
- <xsl:template match="list">
- <xsl:apply-templates select="menu"/>
- <xsl:choose>
- <xsl:when test="msgbox_data != ''">
- <table align = "center">
- <tr>
- <td align="center" colspan="3">
- <xsl:call-template
name="msgbox"/>
- </td>
- </tr>
- </table>
- </xsl:when>
- </xsl:choose>
- <table width="100%" cellpadding="2" cellspacing="2"
align="center">
- <tr>
- <xsl:choose>
- <xsl:when test="group_filters != ''">
- <xsl:variable
name="select_action"><xsl:value-of select="select_action"/></xsl:variable>
- <form method="post" name="search"
action="{$select_action}">
- <td>
- <xsl:call-template
name="cat_select"/>
- </td>
- <xsl:choose>
- <xsl:when
test="district_list != ''">
- <td>
-
<xsl:call-template name="select_district"/>
- </td>
- </xsl:when>
- </xsl:choose>
- <xsl:choose>
- <xsl:when
test="status_list!=''">
- <td
align="left">
-
<xsl:call-template name="status_select"/>
- </td>
- </xsl:when>
- </xsl:choose>
- <td align="center">
- <xsl:call-template
name="user_id_select"/>
- </td>
- <td align="right">
-
<xsl:call-template name="search_field_grouped"/>
- </td>
- </form>
- </xsl:when>
- <xsl:otherwise>
- <td>
- <xsl:call-template
name="cat_filter"/>
- </td>
- <xsl:choose>
- <xsl:when
test="district_list!=''">
- <td align="left">
- <xsl:call-template
name="filter_district"/>
- </td>
- </xsl:when>
- </xsl:choose>
- <xsl:choose>
- <xsl:when
test="status_list!=''">
- <td align="left">
-
<xsl:call-template name="status_filter"/>
- </td>
- </xsl:when>
- </xsl:choose>
- <td align="center">
- <xsl:call-template
name="user_id_filter"/>
- </td>
- <td align="right">
- <xsl:call-template
name="search_field"/>
- </td>
- </xsl:otherwise>
- </xsl:choose>
- <td valign ="top">
- <table>
- <tr>
- <td class="small_text" valign="top"
align="left">
- <xsl:variable
name="link_download"><xsl:value-of select="link_download"/></xsl:variable>
- <xsl:variable
name="lang_download_help"><xsl:value-of
select="lang_download_help"/></xsl:variable>
- <xsl:variable
name="lang_download"><xsl:value-of select="lang_download"/></xsl:variable>
- <a href="javascript:var
w=window.open('{$link_download}','','')"
-
onMouseOver="overlib('{$lang_download_help}', CAPTION, '{$lang_download}')"
- onMouseOut="nd()">
- <xsl:value-of
select="lang_download"/></a>
- </td>
- </tr>
- <tr>
- <td class="small_text" valign="top"
align="left">
- <xsl:variable
name="link_columns"><xsl:value-of select="link_columns"/></xsl:variable>
- <xsl:variable
name="lang_columns_help"><xsl:value-of
select="lang_columns_help"/></xsl:variable>
- <xsl:variable
name="lang_columns"><xsl:value-of select="lang_columns"/></xsl:variable>
- <a href="javascript:var
w=window.open('{$link_columns}','','width=300,height=600')"
-
onMouseOver="overlib('{$lang_columns_help}', CAPTION, '{$lang_columns}')"
- onMouseOut="nd()">
- <xsl:value-of
select="lang_columns"/></a>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td colspan="7" width="100%">
- <xsl:call-template name="nextmatchs"/>
- </td>
- </tr>
- </table>
- <table width="100%" cellpadding="2" cellspacing="2"
align="center">
- <xsl:call-template name="table_header_entity"/>
- <xsl:call-template name="values"/>
- <xsl:choose>
- <xsl:when test="table_add !=''">
- <xsl:apply-templates
select="table_add"/>
- </xsl:when>
- </xsl:choose>
- </table>
- </xsl:template>
- <xsl:template name="table_header_entity">
- <tr class="th">
- <xsl:for-each select="table_header" >
- <td class="th_text" width="{with}"
align="{align}">
- <xsl:choose>
- <xsl:when
test="sort_link!=''">
- <a
href="{sort}" onMouseover="window.status='{header}';return true;"
onMouseout="window.status='';return true;"><xsl:value-of select="header"/></a>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of
select="header"/>
- </xsl:otherwise>
- </xsl:choose>
- </td>
- </xsl:for-each>
- </tr>
- </xsl:template>
- <xsl:template name="values">
- <xsl:for-each select="values" >
- <tr>
- <xsl:attribute name="class">
- <xsl:choose>
- <xsl:when test="@class">
- <xsl:value-of select="@class"/>
- </xsl:when>
- <xsl:when test="position() mod 2 = 0">
- <xsl:text>row_off</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>row_on</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:for-each select="row" >
- <xsl:choose>
- <xsl:when test="link">
- <td class="small_text"
align="center">
- <a
href="{link}" onMouseover="window.status='{statustext}';return true;"
onMouseout="window.status='';return true;" target = "{target}"><xsl:value-of
select="text"/></a>
- </td>
- </xsl:when>
- <xsl:otherwise>
- <td class="small_text"
align="left">
- <xsl:value-of
select="value"/>
- </td>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- </tr>
- </xsl:for-each>
- </xsl:template>
-
- <xsl:template match="table_add">
- <tr>
- <td height="50">
- <xsl:variable
name="add_action"><xsl:value-of select="add_action"/></xsl:variable>
- <xsl:variable
name="lang_add"><xsl:value-of select="lang_add"/></xsl:variable>
- <form method="post"
action="{$add_action}">
- <input type="submit" name="add"
value="{$lang_add}" onMouseout="window.status='';return true;">
- <xsl:attribute
name="onMouseover">
-
<xsl:text>window.status='</xsl:text>
-
<xsl:value-of select="lang_add_statustext"/>
- <xsl:text>';
return true;</xsl:text>
- </xsl:attribute>
- </input>
- </form>
- </td>
- </tr>
- </xsl:template>
-
<!-- add / edit -->
- <xsl:template match="edit">
+ <xsl:template match="edit" xmlns:php="http://php.net/xsl">
<xsl:choose>
<xsl:when test="mode = 'edit'">
<script type="text/javascript">
@@ -408,6 +221,10 @@
<xsl:choose>
<xsl:when test="files!='' or fileupload = 1">
<div id="files">
+ <script type="text/javascript">
+ var fileuploader_action = <xsl:value-of
select="fileuploader_action" />;
+ </script>
+
<table cellpadding="2" cellspacing="2"
width="80%" align="center">
<!-- <xsl:call-template
name="file_list"/> -->
<tr>
@@ -513,6 +330,12 @@
</xsl:when>
</xsl:choose>
</div>
+
+ <div id="lightbox-placeholder"
style="background-color:#000000;color:#FFFFFF;display:none">
+ <div class="hd" style="background-color:#000000;color:#000000;
border:0; text-align:center"> <xsl:value-of select="php:function('lang',
'fileuploader')" /> </div>
+ <div class="bd" style="text-align:center;"> </div>
+ </div>
+
</xsl:template>
Modified: trunk/property/templates/base/files.xsl
===================================================================
--- trunk/property/templates/base/files.xsl 2010-11-23 12:32:05 UTC (rev
6628)
+++ trunk/property/templates/base/files.xsl 2010-11-23 20:05:32 UTC (rev
6629)
@@ -119,7 +119,7 @@
<xsl:when test="multiple_uploader!=''">
<tr>
<td>
- <a href="{fileuploader_action}">
+ <a
href="javascript:fileuploader()">
<xsl:attribute
name="title">
<xsl:value-of
select="php:function('lang', 'upload multiple files')" />
</xsl:attribute>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [6629] property: some clean up and use lightbox for multiple fileupload,
Sigurd Nes <=