[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [14608] clean up from yui
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [14608] clean up from yui |
Date: |
Thu, 17 Dec 2015 13:49:58 +0000 |
Revision: 14608
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14608
Author: sigurdne
Date: 2015-12-17 13:49:57 +0000 (Thu, 17 Dec 2015)
Log Message:
-----------
clean up from yui
Modified Paths:
--------------
branches/dev-syncromind/booking/inc/class.uicommon.inc.php
branches/dev-syncromind/booking/inc/class.uiseason.inc.php
branches/dev-syncromind/booking/templates/base/massbooking_schedule.xsl
branches/dev-syncromind/booking/templates/base/season_wtemplate.xsl
branches/dev-syncromind/bookingfrontend/css/bookingfrontend.css
branches/dev-syncromind/bookingfrontend/templates/base/allocation_info.xsl
branches/dev-syncromind/bookingfrontend/templates/base/booking_info.xsl
branches/dev-syncromind/bookingfrontend/templates/base/building_schedule.xsl
branches/dev-syncromind/bookingfrontend/templates/base/event_info.xsl
branches/dev-syncromind/bookingfrontend/templates/base/resource_schedule.xsl
branches/dev-syncromind/controller/inc/class.uicheck_list_for_component.inc.php
branches/dev-syncromind/property/inc/class.uilocation.inc.php
branches/dev-syncromind/property/templates/base/lookup.entity.xsl
Removed Paths:
-------------
branches/dev-syncromind/booking/templates/base/contactperson_magic.xsl
Modified: branches/dev-syncromind/booking/inc/class.uicommon.inc.php
===================================================================
--- branches/dev-syncromind/booking/inc/class.uicommon.inc.php 2015-12-16
15:12:13 UTC (rev 14607)
+++ branches/dev-syncromind/booking/inc/class.uicommon.inc.php 2015-12-17
13:49:57 UTC (rev 14608)
@@ -275,25 +275,7 @@
public function render_template($files, $data)
{
- if($this->flash_msgs)
- {
- $data['msgbox_data'] =
$GLOBALS['phpgw']->common->msgbox($this->flash_msgs);
- }
- else
- {
- $this->add_template_file('msgbox');
- }
-
- $this->reset_flash_msgs();
-
- $this->add_yui_translation($data);
- $data['webserver_url'] =
$GLOBALS['phpgw_info']['server']['webserver_url'];
-
- $output = phpgw::get_var('output', 'string', 'REQUEST',
'html');
- $GLOBALS['phpgw']->xslttpl->set_output($output);
- //$GLOBALS['phpgw']->xslttpl->add_file(array($files));
- $this->add_template_file($files);
- $GLOBALS['phpgw']->xslttpl->set_var('phpgw',
array('data' => $data));
+ parent::render_template_xsl($files, $data);
}
public function send_file($file_path, $options = array())
Modified: branches/dev-syncromind/booking/inc/class.uiseason.inc.php
===================================================================
--- branches/dev-syncromind/booking/inc/class.uiseason.inc.php 2015-12-16
15:12:13 UTC (rev 14607)
+++ branches/dev-syncromind/booking/inc/class.uiseason.inc.php 2015-12-17
13:49:57 UTC (rev 14608)
@@ -398,7 +398,7 @@
self::add_javascript('booking', 'booking',
'schedule.js');
//self::add_javascript('booking', 'booking',
'season.wtemplate.js');
phpgwapi_jquery::load_widget("datepicker");
- self::render_template('season_wtemplate',
array('season' => $season));
+ self::render_template_xsl('season_wtemplate',
array('season' => $season));
}
public function wtemplate_json()
Deleted: branches/dev-syncromind/booking/templates/base/contactperson_magic.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/contactperson_magic.xsl
2015-12-16 15:12:13 UTC (rev 14607)
+++ branches/dev-syncromind/booking/templates/base/contactperson_magic.xsl
2015-12-17 13:49:57 UTC (rev 14608)
@@ -1,93 +0,0 @@
-<xsl:template name="contactpersonmagic" xmlns:php="http://php.net/xsl">
- <div id="contactpersonform" style="visibility:hidden;">
- <div class="hd">
- <xsl:value-of select="php:function('lang', 'New
contact')" />
- </div>
- <div class="bd">
- <form method="POST" id="thepersonform">
- <xsl:attribute name="action">
- <xsl:value-of
select="contact_form_link" />
- </xsl:attribute>
- <xsl:call-template name="contactpersonfields" />
- </form>
- </div>
- </div>
- <script type="text/javascript">
- var lang_submit = '<xsl:value-of select="php:function('lang',
'Save')"/>';
- var lang_cancel = '<xsl:value-of select="php:function('lang',
'Cancel')" />';
- var contactFormLink = '<xsl:value-of select="contact_form_link"
/>';
- var newContactText = '<xsl:value-of
select="php:function('lang', 'New contact')" />';
- var editContactText = '<xsl:value-of
select="php:function('lang', 'Edit contact')" />'
-<![CDATA[
-var handleSubmit = function() {this.submit();};
-var handleCancel = function() {this.cancel();};
-var handleSuccess = function(o) {/*alert(o.responseText);*/};
-var handleFailure = function(o) {
- alert("Submission failed: " + o.status);
-};
-
-YAHOO.booking.contactpersonform = new YAHOO.widget.Dialog("contactpersonform",
-{
- width : "40em",
- fixedcenter : true,
- visible : false,
- effect: [
- {effect:YAHOO.widget.ContainerEffect.FADE,duration: 0.75},
- {effect:YAHOO.widget.ContainerEffect.SLIDE,duration: 1}
- ],
- constraintoviewport : true,
- buttons : [
- { text:lang_submit, handler:handleSubmit, isDefault:true },
- { text:lang_cancel, handler:handleCancel }
- ]
-});
-
-YAHOO.booking.contactpersonform.callback = { success: handleSuccess, failure:
handleFailure };
-YAHOO.booking.contactpersonform.render();
-
-function createContact() {
- var fields = new Array(
- 'contact-field-name',
- 'contact-field-ssn',
- 'contact-field-homepage',
- 'contact-field-phone',
- 'contact-field-email',
- 'contact-field-description'
- );
- document.getElementById("thepersonform").setAttribute("action",
contactFormLink);
- YAHOO.util.Dom.getElementsByClassName('hd', 'div')[0].innerHTML =
newContactText;
- var i = -1;
- while(fields.length > ++i) {
- document.getElementById(fields[i]).value = "";
- }
- YAHOO.booking.contactpersonform.show();
-}
-var handleEditSuccess = function(o) {
- try {
- var data = YAHOO.lang.JSON.parse(o.responseText);
- }
- catch (e) {
- alert("Invalid product data");
- return;
- }
- YAHOO.util.Dom.getElementsByClassName('hd', 'div')[0].innerHTML =
editContactText;
- document.getElementById('contact-field-name').value =
data.ResultSet.Result.name;
- document.getElementById('contact-field-ssn').value =
data.ResultSet.Result.ssn;
- document.getElementById('contact-field-homepage').value =
data.ResultSet.Result.homepage;
- document.getElementById('contact-field-phone').value =
data.ResultSet.Result.phone;
- document.getElementById('contact-field-email').value =
data.ResultSet.Result.email;
- document.getElementById('contact-field-description').value =
data.ResultSet.Result.description;
-}
-editCallback = { success: handleEditSuccess, failure: handleFailure };
-function editContact(fieldid) {
- var contactid = document.getElementById(fieldid).value;
- var sUrl = 'index.php?menuaction=' + endpoint +
'.uicontactperson.index&phpgw_return_as=json&id='+ contactid;
- document.getElementById("thepersonform").setAttribute("action",
contactFormLink + "&id=" + contactid);
- YAHOO.util.Connect.asyncRequest('GET', sUrl, editCallback, null);
- YAHOO.booking.contactpersonform.show();
-}
-
-]]>
- </script>
-
-</xsl:template>
Modified:
branches/dev-syncromind/booking/templates/base/massbooking_schedule.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/massbooking_schedule.xsl
2015-12-16 15:12:13 UTC (rev 14607)
+++ branches/dev-syncromind/booking/templates/base/massbooking_schedule.xsl
2015-12-17 13:49:57 UTC (rev 14608)
@@ -8,38 +8,17 @@
#cal_container #numberWeek {width: 20px;display: inline-block;}
</style>
<!--xsl:call-template name="yui_booking_i18n"/-->
- <iframe id="yui-history-iframe"
src="phpgwapi/js/yahoo/history/assets/blank.html"
style="position:absolute;top:0; left:0;width:1px;
height:1px;visibility:hidden;"></iframe>
- <input id="yui-history-field" type="hidden"/>
-
- <!--div id="content">
- <ul class="pathway">
- <li>
- <a>
- <xsl:attribute name="href"><xsl:value-of
select="building/buildings_link"/></xsl:attribute>
- <xsl:value-of select="php:function('lang', 'Buildings')"/>
- </a>
- </li>
- <li>
- <a>
- <xsl:attribute name="href"><xsl:value-of
select="building/building_link"/></xsl:attribute>
- <xsl:value-of select="building/name"/>
- </a>
- </li>
- <li><xsl:value-of select="php:function('lang', 'Schedule')"/></li>
- </ul>
- <xsl:call-template name="msgbox"/>
- <ul id="week-selector">
- <li><a href="#" onclick="YAHOO.booking.prevWeek();
return false"><xsl:value-of select="php:function('lang', 'Previous
week')"/></a></li>
- <li id="cal_container"/>
- <li><a href="#" onclick="YAHOO.booking.nextWeek();
return false"><xsl:value-of select="php:function('lang', 'Next
week')"/></a></li>
- </ul>
-
- <div id="schedule_container"/>
- </div-->
-
-
-
+ <ul class="pathway">
+ <li>
+ <xsl:value-of select="building/name"/>
+ </li>
+ <li>
+ <xsl:value-of select="php:function('lang',
'Schedule')"/>
+ </li>
+ </ul>
+
+
<xsl:call-template name="msgbox"/>
<form action="" method="POST" id="form" class="pure-form
pure-form-aligned" name="form">
<input type="hidden" name="tab" value="" />
Modified: branches/dev-syncromind/booking/templates/base/season_wtemplate.xsl
===================================================================
--- branches/dev-syncromind/booking/templates/base/season_wtemplate.xsl
2015-12-16 15:12:13 UTC (rev 14607)
+++ branches/dev-syncromind/booking/templates/base/season_wtemplate.xsl
2015-12-17 13:49:57 UTC (rev 14608)
@@ -1,104 +1,113 @@
<xsl:template match="data" xmlns:php="http://php.net/xsl">
- <style typ="text/css" rel="stylesheet">
- #week-selector {list-style: outside none none;}
- #week-selector li {display: inline-block;}
- #cal_container {margin: 0 20px;}
- #cal_container #datepicker {width: 2px;opacity: 0;position:
absolute;display:none;}
- #cal_container #numberWeek {width: 20px;display: inline-block;}
- </style>
- <!--div id="content">
- <ul class="pathway">
- <li><a href="{season/buildings_link}"><xsl:value-of
select="php:function('lang', 'Buildings')" /></a></li>
- <li><a href="{season/building_link}"><xsl:value-of
select="season/building_name"/></a></li>
- <li><xsl:value-of select="php:function('lang', 'Season')"
/></li>
- <li><a href="{season/season_link}"><xsl:value-of
select="season/name"/></a></li>
- </ul-->
-
- <xsl:call-template name="msgbox"/>
+ <style typ="text/css" rel="stylesheet">
+ #week-selector {list-style: outside none none;}
+ #week-selector li {display: inline-block;}
+ #cal_container {margin: 0 20px;}
+ #cal_container #datepicker {width: 2px;opacity: 0;position:
absolute;display:none;}
+ #cal_container #numberWeek {width: 20px;display: inline-block;}
+ </style>
- <div class="pure-form">
- <input type="hidden" name="tab" value="" />
- <div id="tab-content">
- <xsl:value-of disable-output-escaping="yes" select="season/tabs" />
- <div id="season_wtemplate">
- <fieldset>
- <div class="pure-g">
- <div class="pure-u-1">
- <div class="heading"></div>
- <div clas="pure-control-group">
- <!--ul id="week-selector">
- <li><span class="pure-button
pure-button-primary" onclick="schedule.prevWeek(); return false"><xsl:value-of
select="php:function('lang', 'Previous week')"/></span></li>
- <li id="cal_container">
- <div>
- <span><xsl:value-of
select="php:function('lang', 'Week')" />: </span>
- <label id="numberWeek"></label>
- <input type="text" id="datepicker"
/>
- <img id="pickerImg"
src="/portico/phpgwapi/templates/base/images/cal.png" />
- </div>
- </li>
- <li><span class="pure-button
pure-button-primary" onclick="schedule.nextWeek(); return false"><xsl:value-of
select="php:function('lang', 'Next week')"/></span></li>
- </ul-->
- <div id="schedule_container"></div>
- </div>
+ <ul class="pathway">
+ <li>
+ <a href="{season/buildings_link}">
+ <xsl:value-of select="php:function('lang',
'Buildings')" />
+ </a>
+ </li>
+ <li>
+ <a href="{season/building_link}">
+ <xsl:value-of select="season/building_name"/>
+ </a>
+ </li>
+ <li>
+ <xsl:value-of select="php:function('lang', 'Season')" />
+ </li>
+ <li>
+ <a href="{season/season_link}">
+ <xsl:value-of select="season/name"/>
+ </a>
+ </li>
+ </ul>
- <form action="" method="POST" id="form"
class="pure-form pure-form-aligned" name="form"></form>
-
-
-
- </div>
- </div>
- </fieldset>
- </div>
- </div>
- <xsl:if test="season/permission/write">
- <div class="pure-control-group">
- <div class="form-buttons">
+ <xsl:call-template name="msgbox"/>
+
+ <div class="pure-form">
+ <input type="hidden" name="tab" value="" />
+ <div id="tab-content">
+ <xsl:value-of disable-output-escaping="yes"
select="season/tabs" />
+ <div id="season_wtemplate">
+ <fieldset>
+ <div class="pure-g">
+ <div class="pure-u-1">
+ <div
class="heading"></div>
+ <div
clas="pure-control-group">
+ <!--ul
id="week-selector">
+
<li><span class="pure-button pure-button-primary" onclick="schedule.prevWeek();
return false"><xsl:value-of select="php:function('lang', 'Previous
week')"/></span></li>
+ <li
id="cal_container">
+
<div>
+
<span><xsl:value-of select="php:function('lang', 'Week')" />: </span>
+
<label id="numberWeek"></label>
+
<input type="text" id="datepicker" />
+
<img id="pickerImg"
src="/portico/phpgwapi/templates/base/images/cal.png" />
+
</div>
+ </li>
+
<li><span class="pure-button pure-button-primary" onclick="schedule.nextWeek();
return false"><xsl:value-of select="php:function('lang', 'Next
week')"/></span></li>
+ </ul-->
+ <div
id="schedule_container"></div>
+ </div>
+ <form action=""
method="POST" id="form" class="pure-form pure-form-aligned" name="form"></form>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ </div>
+ <xsl:if test="season/permission/write">
+ <div class="pure-control-group">
+ <div class="form-buttons">
<input type="button" class="pure-button
pure-button-primary" name="new" onclick="schedule.newAllocationForm('')">
- <xsl:attribute
name="value"><xsl:value-of select="php:function('lang', 'New allocation')"
/></xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:value-of
select="php:function('lang', 'New allocation')" />
+ </xsl:attribute>
</input>
<input type="button" class="pure-button
pure-button-primary" name="generate_allocations">
<xsl:attribute
name="onclick">window.location.href="<xsl:value-of
select="season/generate_url"/>"</xsl:attribute>
- <xsl:attribute
name="value"><xsl:value-of select="php:function('lang', 'Generate
allocations')" /></xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:value-of
select="php:function('lang', 'Generate allocations')" />
+ </xsl:attribute>
</input>
<input type="button" class="pure-button
pure-button-primary" name="cancel">
<xsl:attribute
name="onclick">window.location.href="<xsl:value-of
select="season/cancel_link"/>"</xsl:attribute>
- <xsl:attribute
name="value"><xsl:value-of select="php:function('lang', 'Cancel')"
/></xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:value-of
select="php:function('lang', 'Cancel')" />
+ </xsl:attribute>
</input>
- </div>
- </div>
- </xsl:if>
+ </div>
+ </div>
+ </xsl:if>
- </div>
+ </div>
- <script type="text/javascript">
- var season_id = <xsl:value-of select="season/id"/>;
- var resource_ids = <xsl:value-of select="season/resources_json"/>;
- var r = [{n: 'ResultSet'},{n: 'Result'}];
+ <script type="text/javascript">
+ var season_id = <xsl:value-of select="season/id"/>;
+ var resource_ids = <xsl:value-of
select="season/resources_json"/>;
+ var r = [{n: 'ResultSet'},{n: 'Result'}];
<![CDATA[
var weekUrl =
'index.php?menuaction=booking.uiseason.wtemplate_json&id=' + season_id +
'&phpgw_return_as=json&';
]]>
var colDefs = [];
- $(window).load(function() {
- colDefs = [
- {key: 'time', label: '<xsl:value-of
select="php:function('lang', 'Time')" />'},
- {key: 'resource', label: '<xsl:value-of
select="php:function('lang', 'Resources')" />', formatter:
'scheduleResourceColumn'},
- {key: '1', label: '<xsl:value-of select="php:function('lang',
'Monday')" />', formatter: 'seasonDateColumn'},
- {key: '2', label: '<xsl:value-of select="php:function('lang',
'Tuesday')" />', formatter: 'seasonDateColumn'},
- {key: '3', label: '<xsl:value-of select="php:function('lang',
'Wednesday')" />', formatter: 'seasonDateColumn'},
- {key: '4', label: '<xsl:value-of select="php:function('lang',
'Thursday')" />', formatter: 'seasonDateColumn'},
- {key: '5', label: '<xsl:value-of select="php:function('lang',
'Friday')" />', formatter: 'seasonDateColumn'},
- {key: '6', label: '<xsl:value-of select="php:function('lang',
'Saturday')" />', formatter: 'seasonDateColumn'},
- {key: '7', label: '<xsl:value-of select="php:function('lang',
'Sunday')" />', formatter: 'seasonDateColumn'}
- ];
- createTableSchedule('schedule_container', weekUrl, colDefs, r,
'pure-table' );
- });
- </script>
+ $(window).load(function() {
+ colDefs = [
+ {key: 'time', label: '<xsl:value-of
select="php:function('lang', 'Time')" />'},
+ {key: 'resource', label: '<xsl:value-of
select="php:function('lang', 'Resources')" />', formatter:
'scheduleResourceColumn'},
+ {key: '1', label: '<xsl:value-of select="php:function('lang',
'Monday')" />', formatter: 'seasonDateColumn'},
+ {key: '2', label: '<xsl:value-of select="php:function('lang',
'Tuesday')" />', formatter: 'seasonDateColumn'},
+ {key: '3', label: '<xsl:value-of select="php:function('lang',
'Wednesday')" />', formatter: 'seasonDateColumn'},
+ {key: '4', label: '<xsl:value-of select="php:function('lang',
'Thursday')" />', formatter: 'seasonDateColumn'},
+ {key: '5', label: '<xsl:value-of select="php:function('lang',
'Friday')" />', formatter: 'seasonDateColumn'},
+ {key: '6', label: '<xsl:value-of select="php:function('lang',
'Saturday')" />', formatter: 'seasonDateColumn'},
+ {key: '7', label: '<xsl:value-of select="php:function('lang',
'Sunday')" />', formatter: 'seasonDateColumn'}
+ ];
+ createTableSchedule('schedule_container', weekUrl, colDefs, r,
'pure-table' );
+ });
+ </script>
- <xsl:if test="not(season/permission/write)">
- <script type="text/javascript">
-// YAHOO.booking.AllocationDialog.prototype.newAllocation
= function() { }
-// YAHOO.booking.AllocationDialog.prototype.editAllocation
= function (id) { }
- </script>
- </xsl:if>
-
</xsl:template>
Modified: branches/dev-syncromind/bookingfrontend/css/bookingfrontend.css
===================================================================
--- branches/dev-syncromind/bookingfrontend/css/bookingfrontend.css
2015-12-16 15:12:13 UTC (rev 14607)
+++ branches/dev-syncromind/bookingfrontend/css/bookingfrontend.css
2015-12-17 13:49:57 UTC (rev 14608)
@@ -600,7 +600,6 @@
white-space: nowrap;
}
.date-container .close-btn {
- background: transparent
url("../../phpgwapi/js/yahoo/assets/skins/sam/sprite.png") no-repeat scroll 0
-300px;
border: medium none;
color: white;
cursor: pointer;
Modified:
branches/dev-syncromind/bookingfrontend/templates/base/allocation_info.xsl
===================================================================
--- branches/dev-syncromind/bookingfrontend/templates/base/allocation_info.xsl
2015-12-16 15:12:13 UTC (rev 14607)
+++ branches/dev-syncromind/bookingfrontend/templates/base/allocation_info.xsl
2015-12-17 13:49:57 UTC (rev 14608)
@@ -1,5 +1,4 @@
<xsl:template match="data" xmlns:php="http://php.net/xsl">
- <!--div class="close"><a onclick="YAHOO.booking.closeOverlay(); return
false" href=""><xsl:value-of select="php:function('lang',
'Close')"/></a></div-->
<h3>
<xsl:value-of select="php:function('lang', 'Allocation')"/>
#<xsl:value-of select="allocation/id"/>
</h3>
Modified:
branches/dev-syncromind/bookingfrontend/templates/base/booking_info.xsl
===================================================================
--- branches/dev-syncromind/bookingfrontend/templates/base/booking_info.xsl
2015-12-16 15:12:13 UTC (rev 14607)
+++ branches/dev-syncromind/bookingfrontend/templates/base/booking_info.xsl
2015-12-17 13:49:57 UTC (rev 14608)
@@ -1,5 +1,4 @@
<xsl:template match="data" xmlns:php="http://php.net/xsl">
- <!--div class="close"><a onclick="YAHOO.booking.closeOverlay(); return
false" href=""><xsl:value-of select="php:function('lang',
'Close')"/></a></div-->
<h3>
<xsl:value-of select="php:function('lang', 'Booking')"/>
#<xsl:value-of select="booking/id"/>
</h3>
Modified:
branches/dev-syncromind/bookingfrontend/templates/base/building_schedule.xsl
===================================================================
---
branches/dev-syncromind/bookingfrontend/templates/base/building_schedule.xsl
2015-12-16 15:12:13 UTC (rev 14607)
+++
branches/dev-syncromind/bookingfrontend/templates/base/building_schedule.xsl
2015-12-17 13:49:57 UTC (rev 14608)
@@ -1,7 +1,5 @@
<xsl:template match="data" xmlns:php="http://php.net/xsl">
<!--xsl:call-template name="yui_booking_i18n"/-->
- <iframe id="yui-history-iframe"
src="{webserver_url}/phpgwapi/js/yahoo/history/assets/blank.html"
style="position:absolute;top:0; left:0;width:1px;
height:1px;visibility:hidden;"></iframe>
- <input id="yui-history-field" type="hidden"/>
<div id="content">
<xsl:if test="backend != 'true'">
Modified: branches/dev-syncromind/bookingfrontend/templates/base/event_info.xsl
===================================================================
--- branches/dev-syncromind/bookingfrontend/templates/base/event_info.xsl
2015-12-16 15:12:13 UTC (rev 14607)
+++ branches/dev-syncromind/bookingfrontend/templates/base/event_info.xsl
2015-12-17 13:49:57 UTC (rev 14608)
@@ -1,5 +1,4 @@
<xsl:template match="data" xmlns:php="http://php.net/xsl">
- <!--div style="float: right"><a onclick="YAHOO.booking.closeOverlay();
return false" href=""><xsl:value-of select="php:function('lang',
'Close')"/></a></div-->
<h3>
<xsl:value-of select="php:function('lang', 'Event')"/>
#<xsl:value-of select="event/id"/>
</h3>
Modified:
branches/dev-syncromind/bookingfrontend/templates/base/resource_schedule.xsl
===================================================================
---
branches/dev-syncromind/bookingfrontend/templates/base/resource_schedule.xsl
2015-12-16 15:12:13 UTC (rev 14607)
+++
branches/dev-syncromind/bookingfrontend/templates/base/resource_schedule.xsl
2015-12-17 13:49:57 UTC (rev 14608)
@@ -1,7 +1,5 @@
<xsl:template match="data" xmlns:php="http://php.net/xsl">
<!--xsl:call-template name="yui_booking_i18n"/-->
- <iframe id="yui-history-iframe"
src="{webserver_url}/phpgwapi/js/yahoo/history/assets/blank.html"
style="position:absolute;top:0; left:0;width:1px;
height:1px;visibility:hidden;"></iframe>
- <input id="yui-history-field" type="hidden"/>
<div id="content">
<ul class="pathway">
@@ -36,11 +34,6 @@
</button>
<xsl:call-template name="msgbox"/>
- <!--ul id="week-selector">
- <li><a href="#" onclick="YAHOO.booking.prevWeek();
return false"><xsl:value-of select="php:function('lang', 'Previous
week')"/></a></li>
- <li id="cal_container"/>
- <li><a href="#" onclick="YAHOO.booking.nextWeek();
return false"><xsl:value-of select="php:function('lang', 'Next
week')"/></a></li>
- </ul-->
<ul id="week-selector">
<li>
<a id="btnPrevWeek" class="moveWeek"
onclick="schedule.prevWeek(); return false">
Modified:
branches/dev-syncromind/controller/inc/class.uicheck_list_for_component.inc.php
===================================================================
---
branches/dev-syncromind/controller/inc/class.uicheck_list_for_component.inc.php
2015-12-16 15:12:13 UTC (rev 14607)
+++
branches/dev-syncromind/controller/inc/class.uicheck_list_for_component.inc.php
2015-12-17 13:49:57 UTC (rev 14608)
@@ -32,12 +32,11 @@
*/
phpgw::import_class('phpgwapi.jquery');
- phpgw::import_class('phpgwapi.yui');
- phpgw::import_class('phpgwapi.uicommon');
+ phpgw::import_class('phpgwapi.uicommon_jquery');
//phpgw::import_class('bim.sobimitem');
- class controller_uicheck_list_for_component extends phpgwapi_uicommon
+ class controller_uicheck_list_for_component extends
phpgwapi_uicommon_jquery
{
var $cat_id;
@@ -62,6 +61,9 @@
{
parent::__construct();
+ throw new Exception('Is this class used?
(controller_uicheck_list_for_component)');
+
+
$this->bo =
CreateObject('property.bolocation', true);
$this->bocommon = & $this->bo->bocommon;
$this->so_control =
CreateObject('controller.socontrol');
@@ -93,7 +95,7 @@
}
$bim_types = $this->so_control->get_bim_types();
- $control_areas_array =
$this->so_control_area->get_control_areas_as_array();
+ // $control_areas_array =
$this->so_control_area->get_control_areas_as_array();
$controls_array =
$this->so_control->get_controls_by_control_area($control_areas_array[0]['id']);
$control_id =
$control_areas_array[0]['id'];
@@ -145,10 +147,8 @@
)
);
- phpgwapi_yui::load_widget('paginator');
phpgwapi_jquery::load_widget('core');
- self::add_javascript('controller', 'yahoo',
'control_tabs.js');
self::add_javascript('controller', 'controller',
'ajax.js');
self::render_template_xsl(array('control_component_tabs', 'common',
'view_component_for_control'), $data);
@@ -252,7 +252,6 @@
);
- phpgwapi_yui::load_widget('paginator');
phpgwapi_jquery::load_widget('core');
self::add_javascript('controller', 'yahoo',
'control_tabs.js');
Modified: branches/dev-syncromind/property/inc/class.uilocation.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.uilocation.inc.php
2015-12-16 15:12:13 UTC (rev 14607)
+++ branches/dev-syncromind/property/inc/class.uilocation.inc.php
2015-12-17 13:49:57 UTC (rev 14608)
@@ -459,7 +459,7 @@
';
$values_combo_box[0] =
execMethod('property.soadmin_location.read', array());
- $combos[] = array('type' =>
'filter',
+ $combos[] = array('type' =>
'filter-category',
'name' => 'type_id',
'extra' => '',
'text' => lang('Type'),
@@ -1253,6 +1253,41 @@
self::render_template_xsl('datatable_jquery', $data);
}
+ function get_uicols_responsiblility_role()
+ {
+ $uicols = $this->bo->uicols;
+ $uicols['name'][] =
'responsible_contact';
+ $uicols['descr'][] = lang('responsible');
+ $uicols['sortable'][] = false;
+ $uicols['format'][] = '';
+ $uicols['formatter'][] = '';
+ $uicols['input_type'][] = '';
+
+ $uicols['name'][] =
'responsible_contact_id';
+ $uicols['descr'][] = 'dummy';
+ $uicols['sortable'][] = false;
+ $uicols['format'][] = '';
+ $uicols['formatter'][] = '';
+ $uicols['input_type'][] = 'hidden';
+
+ $uicols['name'][] = 'responsible_item';
+ $uicols['descr'][] = 'dummy';
+ $uicols['sortable'][] = false;
+ $uicols['format'][] = '';
+ $uicols['formatter'][] = '';
+ $uicols['input_type'][] = 'hidden';
+
+ $uicols['name'][] = 'select';
+ $uicols['descr'][] = lang('select');
+ $uicols['sortable'][] = false;
+ $uicols['format'][] = '';
+ $uicols['formatter'][] = $this->acl_edit ?
'myFormatterCheck' : '';
+ $uicols['input_type'][] = '';
+
+ return $uicols;
+ }
+
+
function responsiblility_role()
{
$user_id = phpgw::get_var('user_id', 'int', 'request',
$this->account);
@@ -1290,7 +1325,121 @@
if(phpgw::get_var('phpgw_return_as') == 'json')
{
- return $this->query_role();
+ if(phpgw::get_var('head'))
+ {
+
$this->bo->get_responsible(array('user_id' => $user_id, 'role_id' => $role_id,
+ 'type_id' => $type_id,
'dry_run' => true));
+
+ $uicols =
$this->get_uicols_responsiblility_role();
+
+ $entity_def =
array();
+
+ $head =
'<thead>';
+ $count_uicols_name =
count($uicols['name']);
+ for($k = 0; $k < $count_uicols_name;
$k++)
+ {
+ $params = array(
+ 'key' =>
$uicols['name'][$k],
+ 'label' =>
$uicols['descr'][$k],
+ 'sortable' =>
false,
+ 'hidden' =>
($uicols['input_type'][$k] == 'hidden') ? true : false
+ );
+ $params['formatter'] = ""
+ . "formatter = function
(dummy1, dummy2, oData) {"
+ . "return
oData['{$uicols['name'][$k]}'];"
+ . "}";
+
+
if(!empty($uicols['formatter'][$k]))
+ {
+ $params['formatter'] =
<<<JS
+ formatter =
function (dummy1, dummy2, oData) {
+ try {
+ var ret
= {$uicols['formatter'][$k]}('{$uicols['name'][$k]}', oData);
+ }
+ catch(err) {
+ return
err.message;
+ }
+ return ret;
+ }
+JS;
+ }
+
if(in_array($uicols['name'][$k], $searc_levels))
+ {
+ $params['formatter'] =
<<<JS
+ formatter =
function (dummy1, dummy2, oData) {
+ try {
+ var ret
= JqueryPortico.searchLink('{$uicols['name'][$k]}', oData);
+ }
+ catch(err) {
+ return
err.message;
+ }
+ return ret;
+ }
+JS;
+ }
+ if($uicols['name'][$k] ==
'loc1')
+ {
+ $params['formatter'] =
<<<JS
+ formatter =
function (dummy1, dummy2, oData) {
+ try {
+ var ret
= JqueryPortico.searchLink('{$uicols['name'][$k]}', oData);
+ }
+ catch(err) {
+ return
err.message;
+ }
+ return ret;
+ }
+JS;
+ $params['sortable']
= true;
+ }
+ else
if(isset($uicols['cols_return_extra'][$k]) && ($uicols['cols_return_extra'][$k]
!= 'T' || $uicols['cols_return_extra'][$k] != 'CH'))
+ {
+ $params['sortable'] =
true;
+ }
+
+ array_push($entity_def,
$params);
+
+ if($uicols['input_type'][$k] !=
'hidden')
+ {
+ $head .= '<th>' .
$uicols['descr'][$k] . '</th>';
+ }
+ }
+ $head .= '</thead>';
+
+ $datatable_def = array
+ (
+ 'container' =>
'datatable-container',
+ 'requestUrl' =>
self::link(array(
+ 'menuaction'
=> 'property.uilocation.responsiblility_role',
+ 'type_id'
=> $type_id,
+ 'second_display'
=> 1,
+ 'status'
=> $this->status,
+ 'location_code'
=> $this->location_code,
+ 'entity_id'
=> $this->entity_id,
+ 'phpgw_return_as'
=> 'json'
+ )),
+ 'ColumnDefs' => $entity_def,
+ 'download' =>
array('menuaction' => 'property.uilocation.download',
+ 'type_id'
=> $type_id,
+ 'role_id'
=> $role_id,
+ 'export'
=> true,
+ 'allrows'
=> true,
+ 'download_type' =>
'responsiblility_role'
+ ),
+ );
+
+ $data = array
+ (
+ 'datatable_def' =>
$datatable_def,
+ 'datatable_head' => $head,
+ );
+
+ return $data;
+ }
+ else
+ {
+ return $this->query_role();
+ }
}
self::add_javascript('phpgwapi', 'jquery',
'editable/jquery.jeditable.js');
@@ -1300,7 +1449,7 @@
$this->bo->get_responsible(array('user_id' => $user_id,
'role_id' => $role_id,
'type_id' => $type_id, 'allrows' =>
$this->allrows, 'dry_run' => true));
- $uicols = $this->bo->uicols;
+ $uicols = $this->get_uicols_responsiblility_role();
$appname = lang('location');
$function_msg = lang('role');
@@ -1343,34 +1492,6 @@
array_unshift($data['form']['toolbar']['item'],
$filter);
}
- $uicols['name'][] =
'responsible_contact';
- $uicols['descr'][] = lang('responsible');
- $uicols['sortable'][] = false;
- $uicols['format'][] = '';
- $uicols['formatter'][] = '';
- $uicols['input_type'][] = '';
-
- $uicols['name'][] =
'responsible_contact_id';
- $uicols['descr'][] = 'dummy';
- $uicols['sortable'][] = false;
- $uicols['format'][] = '';
- $uicols['formatter'][] = '';
- $uicols['input_type'][] = 'hidden';
-
- $uicols['name'][] = 'responsible_item';
- $uicols['descr'][] = 'dummy';
- $uicols['sortable'][] = false;
- $uicols['format'][] = '';
- $uicols['formatter'][] = '';
- $uicols['input_type'][] = 'hidden';
-
- $uicols['name'][] = 'select';
- $uicols['descr'][] = lang('select');
- $uicols['sortable'][] = false;
- $uicols['format'][] = '';
- $uicols['formatter'][] = $this->acl_edit ?
'myFormatterCheck' : '';
- $uicols['input_type'][] = '';
-
$count_uicols_name = count($uicols['name']);
$searc_levels = array();
@@ -1463,7 +1584,9 @@
}
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang('property') . ' - ' . $appname . ': ' . $function_msg;
- self::render_template_xsl('datatable_jquery', $data);
+// self::render_template_xsl('datatable_jquery', $data);
+ self::render_template_xsl('lookup.entity', $data);
+
}
public function get_history_data()
Modified: branches/dev-syncromind/property/templates/base/lookup.entity.xsl
===================================================================
--- branches/dev-syncromind/property/templates/base/lookup.entity.xsl
2015-12-16 15:12:13 UTC (rev 14607)
+++ branches/dev-syncromind/property/templates/base/lookup.entity.xsl
2015-12-17 13:49:57 UTC (rev 14608)
@@ -315,12 +315,228 @@
JqueryPortico.columns.push(columns[i]);
}
}
+]]>
+ var lang_ButtonText_columns = "<xsl:value-of
select="php:function('lang', 'columns')"/>";
+// var download_url = '<xsl:value-of select="download"/>';
+ var exclude_colvis = [];
+ var editor_cols = [];
+ var editor_action = '<xsl:value-of
select="editor_action"/>';
+ var disablePagination = '<xsl:value-of
select="disablePagination"/>';
+ <![CDATA[
+ TableTools.BUTTONS.download = {
+ "sAction": "text",
+ "sTag": "default",
+ "sFieldBoundary": "",
+ "sFieldSeperator": "\t",
+ "sNewLine": "<br>",
+ "sToolTip": "",
+ "sButtonClass": "DTTT_button_text",
+ "sButtonClassHover":
"DTTT_button_text_hover",
+ "sButtonText": "Download",
+ "mColumns": "all",
+ "bHeader": true,
+ "bFooter": true,
+ "sDiv": "",
+ "fnMouseover": null,
+ "fnMouseout": null,
+ "fnClick": function( nButton, oConfig )
{
+ var oParams =
this.s.dt.oApi._fnAjaxParameters( this.s.dt );
+ oParams.length = -1;
+ oParams.columns = null;
+ oParams.start = null;
+ oParams.draw = null;
+ var addtional_filterdata =
oTable.dataTableSettings[0]['ajax']['data'];
+ for (var attrname in
addtional_filterdata)
+ {
+ oParams[attrname] =
addtional_filterdata[attrname];
+ }
+ var iframe =
document.createElement('iframe');
+ iframe.style.height = "0px";
+ iframe.style.width = "0px";
+ iframe.src =
oConfig.sUrl+"?"+$.param(oParams) + "&export=1";
+ if(confirm("This will take some
time..."))
+ {
+
document.body.appendChild( iframe );
+ }
+ },
+ "fnSelect": null,
+ "fnComplete": null,
+ "fnInit": null
+ };
+ ]]>
+ <xsl:choose>
+ <xsl:when test="//datatable/actions">
+ var button_def = [
+ {
+
sExtends: 'copy',
+
sButtonText: "<xsl:value-of select="php:function('lang', 'copy')"/>"
+ },
+ {
+
sExtends: 'select_all',
+
sButtonText: "<xsl:value-of select="php:function('lang', 'select all')"/>",
+
fnClick: function (nButton, oConfig, oFlash) {
+
TableTools.fnGetInstance('datatable-container').fnSelectAll();
+
//In case there are checkboxes
+
$(".mychecks").each(function()
+
{
+
$(this).prop("checked", true);
+
});
+
}
+ },
+ {
+
sExtends: 'select_none',
+
sButtonText: "<xsl:value-of select="php:function('lang', 'select none')"/>",
+
fnClick: function (nButton, oConfig, oFlash) {
+
TableTools.fnGetInstance('datatable-container').fnSelectNone();
+
//In case there are checkboxes
+
$(".mychecks").each(function()
+
{
+
$(this).prop("checked", false);
+
});
+
}
+ }
+
<xsl:choose>
+
<xsl:when test="download">
+
,{
+
"sExtends": "download",
+
"sButtonText": "<xsl:value-of select="php:function('lang',
'download')"/>",
+
"sUrl": '<xsl:value-of select="download"/>'
+
}
+
</xsl:when>
+
</xsl:choose>
+
<xsl:choose>
+
<xsl:when test="//datatable/actions != ''">
+
<xsl:choose>
+
<xsl:when test="ungroup_buttons=''">
+//
,{
+//
sExtends: "div",
+//
sButtonText: "Knapper nedenfor gjelder pr valgt
element "
+//
}
+
</xsl:when>
+
</xsl:choose>
+
<xsl:for-each select="//datatable/actions">
+
<xsl:choose>
+
<xsl:when test="type = 'custom'">
+
,{
+
sExtends: "select",
+
sButtonText: "<xsl:value-of
select="text"/>",
+
fnClick: function (nButton, oConfig,
oFlash) {
+
<xsl:if test="confirm_msg">
+
var confirm_msg =
"<xsl:value-of select="confirm_msg"/>";
+
var r =
confirm(confirm_msg);
+
if (r != true) {
+
return false;
+
}
+
</xsl:if>
+
<xsl:value-of
select="custom_code"/>
+
}
+
+
}
+
<!--xsl:value-of
select="phpgw:conditional(not(position() = last()), ',', '')"/-->
+
</xsl:when>
+
<xsl:otherwise>
+
,{
+
sExtends: "select",
+
sButtonText: "<xsl:value-of
select="text"/>",
+
fnClick: function (nButton, oConfig,
oFlash) {
+
var receiptmsg = [];
+
var selected = fnGetSelected();
+
var numSelected =
selected.length;
+
+
if (numSelected ==0){
+
alert('None selected');
+
return false;
+
}
+
+
<xsl:if test="confirm_msg">
+
var confirm_msg =
"<xsl:value-of select="confirm_msg"/>";
+
var r =
confirm(confirm_msg);
+
if (r != true) {
+
return false;
+
}
+
</xsl:if>
+
+
var target = "<xsl:value-of
select="target"/>";
+
if(!target)
+
{
+
target = '_self';
+
}
+
+
if (numSelected > 1){
+
target = '_blank';
+
}
+
+
var n = 0;
+
for (; n < numSelected; ) {
+
//
console.log(selected[n]);
+
var aData =
oTable.fnGetData( selected[n] ); //complete dataset from json returned from
server
+
// console.log(aData);
+
+
//delete stuff comes
here
+
var action =
"<xsl:value-of select="action"/>";
+
+
<xsl:if
test="parameters">
+
var parameters
= <xsl:value-of select="parameters"/>;
+
//
console.log(parameters.parameter);
+
var i = 0;
+
len =
parameters.parameter.length;
+
for (; i <
len; ) {
+
action
+= '&' + parameters.parameter[i]['name'] + '=' +
aData[parameters.parameter[i]['source']];
+
i++;
+
}
+
</xsl:if>
+
+
// look for the word
"DELETE" in URL
+
if(substr_count(action,'delete')>0)
+
{
+
action +=
"&confirm=yes&phpgw_return_as=json";
+
execute_ajax(action, function(result){
+
document.getElementById("message").innerHTML += '<br/>' + result;
+
oTable.fnDraw();
+
});
+
}
+
else if (target ==
'ajax')
+
{
+
action +=
"&phpgw_return_as=json";
+
execute_ajax(action, function(result){
+
document.getElementById("message").innerHTML += '<br/>' + result;
+
oTable.fnDraw();
+
});
+
}
+
else
+
{
+
window.open(action,target);
+
}
+
n++;
+
}
+
}
+
}
+
<!--xsl:value-of
select="phpgw:conditional(not(position() = last()), ',', '')"/-->
+
</xsl:otherwise>
+
</xsl:choose>
+
</xsl:for-each>
+
</xsl:when>
+
</xsl:choose>
+ ];
+
JqueryPortico.TableTools = {
+
"sSwfPath":
"phpgwapi/js/DataTables/extensions/TableTools/swf/copy_csv_xls_pdf.swf",
+
"sRowSelect": "multi",
+
"aButtons": button_def
+ };
+ </xsl:when>
+ <xsl:otherwise>
+ JqueryPortico.TableTools = false;
+ </xsl:otherwise>
+ </xsl:choose>
+<![CDATA[
$(document).ready(function()
{
- oTable =
JqueryPortico.inlineTableHelper("datatable-container", ajax_url,
JqueryPortico.columns);
+ var options ={};
+ options.TableTools = JqueryPortico.TableTools;
+ oTable =
JqueryPortico.inlineTableHelper("datatable-container", ajax_url,
JqueryPortico.columns, options);
]]>
/**
* Add left click action..
@@ -380,21 +596,64 @@
$('#' +
result.datatable_def.container).empty();
$('#' +
result.datatable_def.container).append(result.datatable_head);
+ var TableTools =
JqueryPortico.TableTools;
+ var download =
result.datatable_def.download || false;
+ if(download)
+ {
+ for
(i=0;i<TableTools.aButtons.length;i++)
+ {
+
if(TableTools.aButtons[i].sExtends == "download")
+ {
+
TableTools.aButtons[i].sUrl = phpGWLink('index.php',download);
+ }
+ }
+ }
+ options ={};
+ options.TableTools = TableTools;
+ var render;
var columns = [];
var PreColumns =
result.datatable_def.ColumnDefs;
for (i=0;i<PreColumns.length;i++)
{
+
if(typeof(PreColumns[i].formatter) != 'undefined' && PreColumns[i].formatter)
+ {
+ render =
eval(PreColumns[i].formatter);
+ }
+ else
+ {
+ render = false;
+ }
+
if (PreColumns[i].hidden ==
false)
{
-
columns.push({"data":PreColumns[i].key, "class":PreColumns[i].className,
"orderable":PreColumns[i].sortable});
+
columns.push({"data":PreColumns[i].key, "class":PreColumns[i].className,
"orderable":PreColumns[i].sortable, "render":render} );
}
- }
+ }
var requestUrl =
$('<div/>').html(result.datatable_def.requestUrl).text();
- oTable =
JqueryPortico.inlineTableHelper(result.datatable_def.container, requestUrl,
columns);
+ oTable =
JqueryPortico.inlineTableHelper(result.datatable_def.container, requestUrl,
columns , options);
}, data, "GET", "json"
);
}
-
+
+
+ function execute_ajax(requestUrl, callback, data,type, dataType)
+ {
+ api = oTable.api();
+ type = typeof type !== 'undefined' ? type : 'POST';
+ dataType = typeof dataType !== 'undefined' ? dataType :
'html';
+ data = typeof data !== 'undefined' ? data : {};
+
+ $.ajax({
+ type: type,
+ dataType: dataType,
+ data: data,
+ url: requestUrl,
+ success: function(result) {
+ callback(result);
+ }
+ });
+ }
+
]]>
</script>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [14608] clean up from yui,
Sigurd Nes <=