[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [16026] more on eventplanner
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [16026] more on eventplanner |
Date: |
Sat, 26 Nov 2016 16:10:36 +0000 (UTC) |
Revision: 16026
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16026
Author: sigurdne
Date: 2016-11-26 16:10:36 +0000 (Sat, 26 Nov 2016)
Log Message:
-----------
more on eventplanner
Modified Paths:
--------------
trunk/eventplanner/inc/class.uiapplication.inc.php
trunk/eventplanner/inc/class.uicommon.inc.php
trunk/eventplanner/inc/model/class.application.inc.php
trunk/eventplanner/inc/model/class.booking.inc.php
trunk/eventplanner/inc/model/class.customer.inc.php
trunk/eventplanner/inc/model/class.vendor.inc.php
trunk/eventplanner/js/portico/application.edit.js
trunk/eventplanner/setup/default_records.inc.php
trunk/eventplanner/setup/phpgw_no.lang
trunk/eventplanner/setup/tables_current.inc.php
trunk/eventplanner/templates/base/application.xsl
trunk/eventplanner/templates/base/customer.xsl
trunk/eventplanner/templates/base/vendor.xsl
Removed Paths:
-------------
trunk/eventplanner/js/portico/demo.edit.js
trunk/eventplanner/js/portico/demo.index.js
Modified: trunk/eventplanner/inc/class.uiapplication.inc.php
===================================================================
--- trunk/eventplanner/inc/class.uiapplication.inc.php 2016-11-26 03:20:37 UTC
(rev 16025)
+++ trunk/eventplanner/inc/class.uiapplication.inc.php 2016-11-26 16:10:36 UTC
(rev 16026)
@@ -351,7 +351,7 @@
{
foreach ($types as $type)
{
- if($type['type_id'] ==
$application_type['id'])
+ if((!empty($type['type_id']) &&
$type['type_id'] == $application_type['id']) || ($type ==
$application_type['id']))
{
$application_type['selected'] = 1;
break;
Modified: trunk/eventplanner/inc/class.uicommon.inc.php
===================================================================
--- trunk/eventplanner/inc/class.uicommon.inc.php 2016-11-26 03:20:37 UTC
(rev 16025)
+++ trunk/eventplanner/inc/class.uicommon.inc.php 2016-11-26 16:10:36 UTC
(rev 16026)
@@ -186,6 +186,15 @@
}
else
{
+ foreach ($this->fields as $field =>
$field_info)
+ {
+ $_temp = $object->$field;
+ if($_temp && !is_array($_temp))
+ {
+ $object->$field =
htmlspecialchars_decode(str_replace(array('&','(', ')',
'=','−−',';'), array('&','(', ')', '=', '--',';'),
$_temp),ENT_QUOTES);
+ }
+ }
+
$this->edit(array('object' =>
$object, 'active_tab' => $active_tab));
}
}
Modified: trunk/eventplanner/inc/model/class.application.inc.php
===================================================================
--- trunk/eventplanner/inc/model/class.application.inc.php 2016-11-26
03:20:37 UTC (rev 16025)
+++ trunk/eventplanner/inc/model/class.application.inc.php 2016-11-26
16:10:36 UTC (rev 16026)
@@ -177,7 +177,7 @@
),
'description' => array('action'=> PHPGW_ACL_ADD
| PHPGW_ACL_EDIT,
'type' => 'string',
- 'label' => 'description',
+ 'label' => 'application description',
'sortable' => false,
),
'remark' => array('action'=> PHPGW_ACL_ADD |
PHPGW_ACL_EDIT,
Modified: trunk/eventplanner/inc/model/class.booking.inc.php
===================================================================
--- trunk/eventplanner/inc/model/class.booking.inc.php 2016-11-26 03:20:37 UTC
(rev 16025)
+++ trunk/eventplanner/inc/model/class.booking.inc.php 2016-11-26 16:10:36 UTC
(rev 16026)
@@ -189,6 +189,12 @@
);
}
+ if (!empty($entity->application_id))
+ {
+ $application =
createObject('eventplanner.boapplication')->read_single($entity->application_id);
+ $entity->to_ = $entity->from_ +
((int)$application->timespan * 60);
+ }
+
$entity->modified = time();
$entity->active = (int)$entity->active;
Modified: trunk/eventplanner/inc/model/class.customer.inc.php
===================================================================
--- trunk/eventplanner/inc/model/class.customer.inc.php 2016-11-26 03:20:37 UTC
(rev 16025)
+++ trunk/eventplanner/inc/model/class.customer.inc.php 2016-11-26 16:10:36 UTC
(rev 16026)
@@ -137,7 +137,7 @@
),
'address_2' => array('action'=> PHPGW_ACL_ADD |
PHPGW_ACL_EDIT,
'type' => 'string',
- 'required' => true),
+ 'required' => false),
'zip_code' => array('action'=> PHPGW_ACL_ADD |
PHPGW_ACL_EDIT,
'type' => 'string',
'required' => true),
Modified: trunk/eventplanner/inc/model/class.vendor.inc.php
===================================================================
--- trunk/eventplanner/inc/model/class.vendor.inc.php 2016-11-26 03:20:37 UTC
(rev 16025)
+++ trunk/eventplanner/inc/model/class.vendor.inc.php 2016-11-26 16:10:36 UTC
(rev 16026)
@@ -137,7 +137,7 @@
),
'address_2' => array('action'=> PHPGW_ACL_ADD |
PHPGW_ACL_EDIT,
'type' => 'string',
- 'required' => true),
+ 'required' => false),
'zip_code' => array('action'=> PHPGW_ACL_ADD |
PHPGW_ACL_EDIT,
'type' => 'string',
'required' => true),
Modified: trunk/eventplanner/js/portico/application.edit.js
===================================================================
--- trunk/eventplanner/js/portico/application.edit.js 2016-11-26 03:20:37 UTC
(rev 16025)
+++ trunk/eventplanner/js/portico/application.edit.js 2016-11-26 16:10:36 UTC
(rev 16026)
@@ -3,8 +3,25 @@
var strURL = phpGWLink('index.php', oArgs, true);
JqueryPortico.autocompleteHelper(strURL, 'vendor_name', 'vendor_id',
'vendor_container', 'name');
+validate_submit = function()
+{
+ var active_tab = $("#active_tab").val();
+
+ if(active_tab === 'first_tab')
+ {
+ $('#tab-content').responsiveTabs('activate', 1);
+ $("#save_button").val(lang['save']);
+ }
+ else
+ {
+ document.form.submit();
+ }
+};
+
$(document).ready(function ()
{
+ check_button_names();
+
$("#number_of_units").change(function ()
{
calculate_total_amount();
@@ -52,14 +69,13 @@
$("#to_").val($("#from_").val());
});
- var width = 200;
$("#submitbox").css({
position: 'absolute',
right: '10px',
border: '1px solid #B5076D',
padding: '0 5px 5px 5px',
- width: width + 'px',
+ width: $("#submitbox").width() + 'px',
"background - color": '#FFF',
display: "block",
});
@@ -108,19 +124,32 @@
});
-function set_tab(tab)
+check_button_names = function()
{
- $("#active_tab").val(tab);
+ var tab = $("#active_tab").val();
if (tab === 'calendar')
{
$("#floating-box").hide();
$("#submit_group_bottom").hide();
}
+ else if(tab === 'first_tab')
+ {
+ $("#save_button").val(lang['next']);
+ $("#floating-box").show();
+ $("#submit_group_bottom").show();
+ }
else
{
+ $("#save_button").val(lang['save']);
$("#floating-box").show();
$("#submit_group_bottom").show();
}
+};
+
+function set_tab(tab)
+{
+ $("#active_tab").val(tab);
+ check_button_names();
}
function calculate_total_amount()
@@ -165,7 +194,7 @@
$.ajax({
type: 'POST',
dataType: 'json',
- data: {from_: $("#from_").val(), to_: $("#to_").val(), active:
1},
+ data: {from_: $("#from_").val(), active: 1},
url: requestUrl,
success: function (data)
{
@@ -174,7 +203,6 @@
if (data.status_kode == 'ok')
{
$("#from_").val('');
- $("#to_").val('');
htmlString += "<div
class=\"msg_good\">";
}
else
Deleted: trunk/eventplanner/js/portico/demo.edit.js
===================================================================
--- trunk/eventplanner/js/portico/demo.edit.js 2016-11-26 03:20:37 UTC (rev
16025)
+++ trunk/eventplanner/js/portico/demo.edit.js 2016-11-26 16:10:36 UTC (rev
16026)
@@ -1,64 +0,0 @@
-var myDataSource, myDataTable, myContextMenu;
-var tableYUI;
-var myPaginator_0;
-var myDataTable_0;
-
-
-/********************************************************************************
- *
- */
-this.addFooterDatatable = function (paginator, datatable)
-{
- //call getSumPerPage(name of column) in property.js
- tmp_sum1 = getSumPerPage('budget', 2, paginator, datatable);
- tmp_sum2 = getSumPerPage('calculation', 2, paginator, datatable);
-
- if (typeof (tableYUI) == 'undefined')
- {
- tableYUI = YAHOO.util.Dom.getElementsByClassName("yui-dt-data",
"tbody")[0].parentNode;
- tableYUI.setAttribute("id", "tableYUI");
- }
- else
- {
- tableYUI.deleteTFoot();
- }
-
- //Create ROW
- newTR = document.createElement('tr');
-
- td_sum('Sum');
- td_sum(tmp_sum1);
- td_sum(tmp_sum2);
- td_empty(3);
-
- myfoot = tableYUI.createTFoot();
- myfoot.setAttribute("id", "myfoot");
- myfoot.appendChild(newTR);
-}
-
-/********************************************************************************/
-var FormatterCenter = function (elCell, oRecord, oColumn, oData)
-{
- elCell.innerHTML = "<center>" + oData + "</center>";
-}
-
-var FormatterRight = function (elCell, oRecord, oColumn, oData)
-{
- elCell.innerHTML = "<div align=\"right\">" +
YAHOO.util.Number.format(oData, {thousandsSeparator: " "}) + "</div>";
-}
-
-/********************************************************************************/
-YAHOO.util.Event.addListener(window, "load", function ()
-{
- var loader = new YAHOO.util.YUILoader();
- loader.addModule({
- name: "anyone",
- type: "js",
- fullpath: property_js
- });
-
- loader.require("anyone");
- loader.insert();
-});
-
-
Deleted: trunk/eventplanner/js/portico/demo.index.js
===================================================================
--- trunk/eventplanner/js/portico/demo.index.js 2016-11-26 03:20:37 UTC (rev
16025)
+++ trunk/eventplanner/js/portico/demo.index.js 2016-11-26 16:10:36 UTC (rev
16026)
@@ -1,77 +0,0 @@
-//--------------------------------------------------------
-// Declaration of location.index vars
-//--------------------------------------------------------
-// define buttons
-var oMenuButton_0;
-var selectsButtons = [
- {order: 0, var_URL: 'cat_id', name: 'btn_cat_id', style:
'categorybutton', dependiente: [
- ]}
-];
-
-
-var oNormalButton_0, oNormalButton_1, oNormalButton_2, oNormalButton_3;
-var normalButtons = [
- {order: 0, name: 'btn_search', funct: "onSearchClick"},
- {order: 1, name: 'btn_new', funct: "onNewClick"},
- {order: 2, name: 'btn_done', funct: "onDoneClick"},
- {order: 3, name: 'btn_export', funct: "onDownloadClick"}
-];
-
-// define Text buttons
-var textImput = [
- {order: 0, name: 'query', id: 'txt_query'}
-];
-
-var toolTips =
-[
- {name: 'btn_export', title: 'download', description: 'Download table to
your browser', ColumnDescription: ''}
-]
-
-// define the hidden column in datatable
-var config_values =
-{
- date_search: 0, //if search has link "Data search"
- particular_done: "property.uilocation.index"
-}
-
-/********************************************************************************/
-var FormatterRight = function (elCell, oRecord, oColumn, oData)
-{
- elCell.innerHTML = "<div align=\"right\">" + oData + "</div>";
-}
-
-/****************************************************************************************/
-this.particular_setting = function ()
-{
- if (flag_particular_setting == 'init')
- {
- }
- else if (flag_particular_setting == 'update')
- {
- }
-}
-/****************************************************************************************/
-
-this.myParticularRenderEvent = function ()
-{
- //don't delete it
- document.getElementById('txt_query').focus();
-}
-/****************************************************************************************/
-YAHOO.util.Event.addListener(window, "load", function ()
-{
- YAHOO.util.Dom.getElementsByClassName('toolbar',
'div')[0].style.display = 'none';
-
- var loader = new YAHOO.util.YUILoader();
- loader.addModule({
- name: "anyone", //module name; must be unique
- type: "js", //can be "js" or "css"
- fullpath: property_js //'property_js' have the path for
property.js, is render in HTML
- });
-
- loader.require("anyone");
-
- //Insert JSON utility on the page
-
- loader.insert();
-});
Modified: trunk/eventplanner/setup/default_records.inc.php
===================================================================
--- trunk/eventplanner/setup/default_records.inc.php 2016-11-26 03:20:37 UTC
(rev 16025)
+++ trunk/eventplanner/setup/default_records.inc.php 2016-11-26 16:10:36 UTC
(rev 16026)
@@ -21,6 +21,6 @@
$GLOBALS['phpgw']->locations->add('.customer', 'customer',
'eventplanner', $allow_grant = true, $custom_tbl = '', $c_function = true);
$GLOBALS['phpgw']->locations->add('.vendor', 'vendor', 'eventplanner',
$allow_grant = true, $custom_tbl = '', $c_function = true);
$GLOBALS['phpgw']->locations->add('.booking', 'booking',
'eventplanner', $allow_grant = true, $custom_tbl = '', $c_function = true);
- $GLOBALS['phpgw']->locations->add('.vendor_report', 'vendor_report',
'eventplanner', $allow_grant = true, $custom_tbl = '', $c_function = true);
- $GLOBALS['phpgw']->locations->add('.customer_report',
'customer_report', 'eventplanner', $allow_grant = true, $custom_tbl = '',
$c_function = true);
+ $GLOBALS['phpgw']->locations->add('.vendor_report', 'vendor_report',
'eventplanner', $allow_grant = true, $custom_tbl = '', $c_function = true,
$c_attrib = true);
+ $GLOBALS['phpgw']->locations->add('.customer_report',
'customer_report', 'eventplanner', $allow_grant = true, $custom_tbl = '',
$c_function = true, $c_attrib = true);
Modified: trunk/eventplanner/setup/phpgw_no.lang
===================================================================
--- trunk/eventplanner/setup/phpgw_no.lang 2016-11-26 03:20:37 UTC (rev
16025)
+++ trunk/eventplanner/setup/phpgw_no.lang 2016-11-26 16:10:36 UTC (rev
16026)
@@ -50,7 +50,8 @@
field %1 is required eventplanner no Feltet %1 er påkrevd
please select a category ! eventplanner no Velg en kategori
title eventplanner no Programtittel
-description eventplanner no Omtale av program
+description eventplanner no Beskrivelse
+application description eventplanner no Omtale av program
might be published eventplanner no Kan bli publisert på internett
other participants eventplanner no Navn på andre medvirkende (+
rolle)
arena requirement eventplanner no Krav til lokale
@@ -61,4 +62,6 @@
wardrobe eventplanner no Garderobe
audience limit eventplanner no Maksimum antall publikum
raider eventplanner no Raider
-vendor report eventplanner no Utøverrapport
\ No newline at end of file
+vendor report eventplanner no Utøverrapport
+calendar eventplanner no Kalender
+from eventplanner no Fra
\ No newline at end of file
Modified: trunk/eventplanner/setup/tables_current.inc.php
===================================================================
--- trunk/eventplanner/setup/tables_current.inc.php 2016-11-26 03:20:37 UTC
(rev 16025)
+++ trunk/eventplanner/setup/tables_current.inc.php 2016-11-26 16:10:36 UTC
(rev 16026)
@@ -26,7 +26,7 @@
'id' => array('type' => 'auto', 'nullable' =>
False),
'name' => array('type' => 'varchar',
'precision' => '255', 'nullable' => False),
'address_1' => array('type' => 'varchar',
'precision' => '255', 'nullable' => False),
- 'address_2' => array('type' => 'varchar',
'precision' => '255', 'nullable' => False),
+ 'address_2' => array('type' => 'varchar',
'precision' => '255', 'nullable' => true),
'zip_code' => array('type' => 'varchar',
'precision' => '10', 'nullable' => False),
'city' => array('type' => 'varchar',
'precision' => '64', 'nullable' => False),
'account_number' => array('type' => 'varchar',
'precision' => '20', 'nullable' => False),
@@ -83,7 +83,7 @@
'id' => array('type' => 'auto', 'nullable' =>
False),
'name' => array('type' => 'varchar',
'precision' => '255', 'nullable' => False),
'address_1' => array('type' => 'varchar',
'precision' => '255', 'nullable' => False),
- 'address_2' => array('type' => 'varchar',
'precision' => '255', 'nullable' => False),
+ 'address_2' => array('type' => 'varchar',
'precision' => '255', 'nullable' => true),
'zip_code' => array('type' => 'varchar',
'precision' => '10', 'nullable' => False),
'city' => array('type' => 'varchar',
'precision' => '64', 'nullable' => False),
'account_number' => array('type' => 'varchar',
'precision' => '20', 'nullable' => False),
@@ -132,7 +132,7 @@
'category_id' => array('type' => 'int',
'precision' => '4', 'nullable' => false),
'vendor_id' => array('type' => 'int',
'precision' => '4', 'nullable' => false),
'active' => array('type' => 'int', 'nullable'
=> False, 'precision' => '4', 'default' => 1),
- 'display_in_dashboard' => array('type' =>
'int', 'nullable' => False, 'precision' => '4','default' => 1),
+ 'display_in_dashboard' => array('type' =>
'int', 'nullable' => True, 'precision' => '4','default' => 1),
'status' => array('type' => 'int', 'nullable'
=> False, 'precision' => 2, 'default' => 1),
'created' => array('type' => 'int', 'precision'
=> '8', 'nullable' => False, 'default' => 'current_timestamp'),
'date_start' => array('type' => 'int',
'precision' => '8', 'nullable' => False),
Modified: trunk/eventplanner/templates/base/application.xsl
===================================================================
--- trunk/eventplanner/templates/base/application.xsl 2016-11-26 03:20:37 UTC
(rev 16025)
+++ trunk/eventplanner/templates/base/application.xsl 2016-11-26 16:10:36 UTC
(rev 16026)
@@ -38,7 +38,7 @@
</xsl:variable>
<script type="text/javascript">
- var lang = <xsl:value-of
select="php:function('js_lang', 'Name or company is required')"/>;
+ var lang = <xsl:value-of
select="php:function('js_lang', 'Name or company is required', 'next',
'save')"/>;
</script>
<form id="form" name="form" method="post"
action="{$form_action}" class="pure-form pure-form-aligned">
<div id="tab-content">
@@ -50,9 +50,9 @@
<tr>
<td width="200px">
<xsl:variable name="lang_savel">
-
<xsl:value-of select="php:function('lang', 'save')"/>
+
<xsl:value-of select="php:function('lang', 'next')"/>
</xsl:variable>
-
<input type="submit" class="pure-button pure-button-primary"
name="save">
+
<input type="button" class="pure-button pure-button-primary"
name="save" id="save_button" onClick="validate_submit();">
<xsl:attribute name="value">
<xsl:value-of select="$lang_savel"/>
</xsl:attribute>
@@ -707,6 +707,14 @@
<xsl:value-of select="php:function('date', $date_format,
number(application/date_end))"/>
</xsl:if>
</div>
+ <div
class="pure-control-group">
+ <label>
+
<xsl:value-of select="php:function('lang', 'timespan')"/>
+ </label>
+ <xsl:if
test="application/date_end != 0 and application/timespan != ''">
+
<xsl:value-of select="application/timespan"/>
+ </xsl:if>
+ </div>
<div
class="pure-control-group">
<label>
@@ -715,13 +723,13 @@
<input
type="text" id="from_" name="from_" size="16" readonly="readonly">
</input>
</div>
- <div
class="pure-control-group">
+ <!--div
class="pure-control-group">
<label>
<xsl:value-of select="php:function('lang', 'to')"/>
</label>
<input
type="text" id="to_" name="to_" size="16" readonly="readonly">
</input>
- </div>
+ </div-->
<div
class="pure-control-group">
<label>
Modified: trunk/eventplanner/templates/base/customer.xsl
===================================================================
--- trunk/eventplanner/templates/base/customer.xsl 2016-11-26 03:20:37 UTC
(rev 16025)
+++ trunk/eventplanner/templates/base/customer.xsl 2016-11-26 16:10:36 UTC
(rev 16026)
@@ -106,9 +106,6 @@
</input>
<input type="text"
name="address_2" value="{customer/address_2}">
- <xsl:attribute
name="data-validation">
-
<xsl:text>required</xsl:text>
- </xsl:attribute>
<xsl:attribute
name="placeholder">
<xsl:value-of select="$lang_address_2"/>
</xsl:attribute>
Modified: trunk/eventplanner/templates/base/vendor.xsl
===================================================================
--- trunk/eventplanner/templates/base/vendor.xsl 2016-11-26 03:20:37 UTC
(rev 16025)
+++ trunk/eventplanner/templates/base/vendor.xsl 2016-11-26 16:10:36 UTC
(rev 16026)
@@ -106,9 +106,6 @@
</input>
<input type="text"
name="address_2" value="{vendor/address_2}">
- <xsl:attribute
name="data-validation">
-
<xsl:text>required</xsl:text>
- </xsl:attribute>
<xsl:attribute
name="placeholder">
<xsl:value-of select="$lang_address_2"/>
</xsl:attribute>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [16026] more on eventplanner,
sigurdne <=