[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [16306] Stable: Merge 16296:16305 from trunk
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [16306] Stable: Merge 16296:16305 from trunk |
Date: |
Tue, 14 Feb 2017 08:22:12 -0500 (EST) |
Revision: 16306
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16306
Author: sigurdne
Date: 2017-02-14 08:22:11 -0500 (Tue, 14 Feb 2017)
Log Message:
-----------
Stable: Merge 16296:16305 from trunk
Modified Paths:
--------------
branches/Version-2_0-branch/booking/inc/class.uireports.inc.php
branches/Version-2_0-branch/phpgwapi/templates/frontend/css/frontend.css
branches/Version-2_0-branch/phpgwapi/templates/frontend/css/side-menu.css
branches/Version-2_0-branch/phpgwapi/templates/frontend/head.tpl
branches/Version-2_0-branch/phpgwapi/templates/portico/navbar.tpl
branches/Version-2_0-branch/property/inc/class.bogeneric_document.inc.php
branches/Version-2_0-branch/property/inc/class.botts.inc.php
branches/Version-2_0-branch/property/inc/class.sogeneric_document.inc.php
branches/Version-2_0-branch/property/inc/class.soproject.inc.php
branches/Version-2_0-branch/property/inc/class.uigeneric_document.inc.php
branches/Version-2_0-branch/property/inc/class.uitts.inc.php
branches/Version-2_0-branch/property/inc/class.uiworkorder.inc.php
branches/Version-2_0-branch/property/inc/import/class.import_component_files.inc.php
branches/Version-2_0-branch/property/js/portico/generic_document.edit.js
branches/Version-2_0-branch/property/js/portico/import_components.js
branches/Version-2_0-branch/property/setup/phpgw_no.lang
branches/Version-2_0-branch/property/templates/base/generic_document.xsl
branches/Version-2_0-branch/registration/inc/class.uireg.inc.php
branches/Version-2_0-branch/registration/templates/base/config.tpl
Property Changed:
----------------
branches/Version-2_0-branch/
branches/Version-2_0-branch/booking/
branches/Version-2_0-branch/bookingfrontend/
Index: branches/Version-2_0-branch
===================================================================
--- branches/Version-2_0-branch 2017-02-14 13:19:31 UTC (rev 16305)
+++ branches/Version-2_0-branch 2017-02-14 13:22:11 UTC (rev 16306)
Property changes on: branches/Version-2_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
## -1,4 +1,4 ##
/branches/dev-syncromind:13653
-/branches/dev-syncromind-2:14933-16188
+/branches/dev-syncromind-2:14933-16300
/branches/stavangerkommune:12743-12875,12986
-/trunk:14721-14732,14734-14735,14737,14739,14741,14743-14744,14746-14749,14751,14753,14755-14757,14759,14761-14764,14766-14768,14770-14783,14785-14792,14794-14813,14815-14816,14818,14820-14822,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14847,14849-14866,14868-14869,14871,14873-14875,14877-14878,14880-14884,14886-14896,14898,14900-14902,14904,14906-14909,14911-14915,14917-14919,14921-14922,14924-14978,14980-15258,15260-15261,15263-15264,15266-15285,15287-15288,15290-15291,15293,15295,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15356,15358,15360-15541,15543-15566,15568-15569,15571,15573-15581,15583,15585-15617,15619,15621-15630,15632-15635,15637-15639,15641-15643,15645,15647-15665,15667-15668,15670-15671,15673-15693,15695-15712,15714-15764,15766-15767,15769-15787,15789-15802,15804-15811,15813-15814,15816-15818,15820-15849,15851-15887,15889-15900,15902-16046,16048-16051,16053,16055,16057-16063,16065-16071,16073-16077,16079-16081,16083-16099,16101-16130,16132-16140,16142,16144-16212,16214-16219,16221,16223-16224,16226,16228-16229,16231,16233,16235,16237,16239-16240,16242,16244-16246,16248,16250-16251,16253-16255,16257-16259,16261,16263,16265,16267,16269-16276,16278,16280-16283,16285,16287-16288,16290,16292-16295
\ No newline at end of property
+/trunk:14721-14732,14734-14735,14737,14739,14741,14743-14744,14746-14749,14751,14753,14755-14757,14759,14761-14764,14766-14768,14770-14783,14785-14792,14794-14813,14815-14816,14818,14820-14822,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14847,14849-14866,14868-14869,14871,14873-14875,14877-14878,14880-14884,14886-14896,14898,14900-14902,14904,14906-14909,14911-14915,14917-14919,14921-14922,14924-14978,14980-15258,15260-15261,15263-15264,15266-15285,15287-15288,15290-15291,15293,15295,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15356,15358,15360-15541,15543-15566,15568-15569,15571,15573-15581,15583,15585-15617,15619,15621-15630,15632-15635,15637-15639,15641-15643,15645,15647-15665,15667-15668,15670-15671,15673-15693,15695-15712,15714-15764,15766-15767,15769-15787,15789-15802,15804-15811,15813-15814,15816-15818,15820-15849,15851-15887,15889-15900,15902-16046,16048-16051,16053,16055,16057-16063,16065-16071,16073-16077,16079-16081,16083-16099,16101-16130,16132-16140,16142,16144-16212,16214-16219,16221,16223-16224,16226,16228-16229,16231,16233,16235,16237,16239-16240,16242,16244-16246,16248,16250-16251,16253-16255,16257-16259,16261,16263,16265,16267,16269-16276,16278,16280-16283,16285,16287-16288,16290,16292-16295,16297-16305
\ No newline at end of property
Index: branches/Version-2_0-branch/booking
===================================================================
--- branches/Version-2_0-branch/booking 2017-02-14 13:19:31 UTC (rev 16305)
+++ branches/Version-2_0-branch/booking 2017-02-14 13:22:11 UTC (rev 16306)
Property changes on: branches/Version-2_0-branch/booking
___________________________________________________________________
Modified: svn:mergeinfo
## -1,3 +1,3 ##
-/branches/dev-syncromind-2/booking:14933-16188
+/branches/dev-syncromind-2/booking:14933-16300
/branches/stavangerkommune/booking:9468-12740,12743-12875,12986
-/trunk/booking:14721-14732,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14871,14886-14896,14900-14902,14917-14919,14924-14978,14980-15258,15266-15285,15287-15288,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15360-15541,15543-15566,15568-15569,15585-15617,15621-15630,15637-15639,15641-15643,15645,15647-15665,15667-15668,15695-15712,15714-15764,15820-15849,15889-15900,15902-16046,16055,16101-16130,16144-16212
\ No newline at end of property
+/trunk/booking:14721-14732,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14871,14886-14896,14900-14902,14917-14919,14924-14978,14980-15258,15266-15285,15287-15288,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15360-15541,15543-15566,15568-15569,15585-15617,15621-15630,15637-15639,15641-15643,15645,15647-15665,15667-15668,15695-15712,15714-15764,15820-15849,15889-15900,15902-16046,16055,16101-16130,16144-16212,16297-16305
\ No newline at end of property
Modified: branches/Version-2_0-branch/booking/inc/class.uireports.inc.php
===================================================================
--- branches/Version-2_0-branch/booking/inc/class.uireports.inc.php
2017-02-14 13:19:31 UTC (rev 16305)
+++ branches/Version-2_0-branch/booking/inc/class.uireports.inc.php
2017-02-14 13:22:11 UTC (rev 16306)
@@ -82,8 +82,8 @@
$report['variable_vertical'] =
phpgw::get_var('variable_vertical');
$report['all_buildings'] =
phpgw::get_var('all_buildings', 'bool');
// _debug_array($report);
- $from_ =
phpgwapi_datetime::date_to_timestamp($report['start_date']);
- $to_ =
phpgwapi_datetime::date_to_timestamp($report['end_date']);
+ $from_ = phpgw::get_var('start_date', 'date');
+ $to_ = phpgw::get_var('end_date', 'date');
if ($report['all_buildings'] && (($to_ -
$from_) > 24 * 3600 * 31))
{
@@ -167,8 +167,8 @@
$entry['selected'] = $entry['id'] ==
$report['variable_vertical'] ? 1 : 0;
}
- $GLOBALS['phpgw']->jqcal2->add_listener('start_date');
- $GLOBALS['phpgw']->jqcal2->add_listener('end_date');
+ $GLOBALS['phpgw']->jqcal->add_listener('start_date');
+ $GLOBALS['phpgw']->jqcal->add_listener('end_date');
$tabs = array();
$tabs['generic'] = array('label' => lang('Report New'),
'link' => '#report_new');
@@ -175,7 +175,7 @@
$active_tab = 'generic';
$report['tabs'] =
phpgwapi_jquery::tabview_generate($tabs, $active_tab);
- self::adddatetimepicker();
+// self::adddatetimepicker();
phpgwapi_jquery::formvalidator_generate(array('location', 'date', 'security',
'file'), 'report_form');
Index: branches/Version-2_0-branch/bookingfrontend
===================================================================
--- branches/Version-2_0-branch/bookingfrontend 2017-02-14 13:19:31 UTC (rev
16305)
+++ branches/Version-2_0-branch/bookingfrontend 2017-02-14 13:22:11 UTC (rev
16306)
Property changes on: branches/Version-2_0-branch/bookingfrontend
___________________________________________________________________
Modified: svn:mergeinfo
## -1,3 +1,3 ##
-/branches/dev-syncromind-2/bookingfrontend:14933-16188
+/branches/dev-syncromind-2/bookingfrontend:14933-16300
/branches/stavangerkommune/bookingfrontend:9468-12740,12986
-/trunk/bookingfrontend:14721-14732,14770-14783,14794-14808,14824-14825,14838,14886-14894,14906-14909,14917-14919,14924-14978,14980-15258,15297,15312-15335,15585-15617,15621-15630,15714-15764,15813-15814,15820-15849,15889-15900,15902-16046,16101-16130,16144-16212
\ No newline at end of property
+/trunk/bookingfrontend:14721-14732,14770-14783,14794-14808,14824-14825,14838,14886-14894,14906-14909,14917-14919,14924-14978,14980-15258,15297,15312-15335,15585-15617,15621-15630,15714-15764,15813-15814,15820-15849,15889-15900,15902-16046,16101-16130,16144-16212,16297-16305
\ No newline at end of property
Modified:
branches/Version-2_0-branch/phpgwapi/templates/frontend/css/frontend.css
===================================================================
--- branches/Version-2_0-branch/phpgwapi/templates/frontend/css/frontend.css
2017-02-14 13:19:31 UTC (rev 16305)
+++ branches/Version-2_0-branch/phpgwapi/templates/frontend/css/frontend.css
2017-02-14 13:22:11 UTC (rev 16306)
@@ -100,7 +100,7 @@
.home-menu {
padding: 0.5em;
- text-align: center;
+ text-align: left;
box-shadow: 0 1px 1px rgba(0,0,0, 0.10);
}
.home-menu {
@@ -121,7 +121,9 @@
font-size: 120%;
}
-.home-menu .pure-menu-selected a {
+.home-menu .pure-menu-selected a,
+.home-menu .pure-menu-selected a:visited
+{
color: white;
}
@@ -135,62 +137,20 @@
color: #AECFE5;
}
+ .home-menu ul {
+ float: right;
+ }
-/*
- * -- SPLASH STYLES --
- * This is the blue top section that appears on the page.
- */
-.splash-container {
- background: #1f8dd6;
- z-index: 1;
- overflow: hidden;
- /* The following styles are required for the "scroll-over" effect */
- width: 100%;
- height: 88%;
- top: 0;
- left: 0;
- position: fixed !important;
-}
-
-.splash {
- /* absolute center .splash within .splash-container */
- width: 80%;
- height: 50%;
- margin: auto;
- position: absolute;
- top: 100px; left: 0; bottom: 0; right: 0;
- text-align: center;
- text-transform: uppercase;
-}
-
-/* This is the main heading that appears on the blue section */
-.splash-head {
- font-size: 20px;
- font-weight: bold;
- color: white;
- border: 3px solid white;
- padding: 1em 1.6em;
- font-weight: 100;
- border-radius: 5px;
- line-height: 1em;
-}
-
-/* This is the subheading that appears on the blue section */
-.splash-subhead {
- color: white;
- letter-spacing: 0.05em;
- opacity: 0.8;
-}
.error {
- padding: 1em;
- padding-top: 3em;
- background: #DD7777;
+ padding: 1em;
+ padding-top: 3em;
+ background: #DD7777;
}
.msg_good {
- padding: 1em;
- padding-top: 3em;
- background: #66cd00;
+ padding: 1em;
+ padding-top: 3em;
+ background: #66cd00;
}
/*
@@ -225,9 +185,9 @@
.content-subhead {
color: #1f8dd6;
}
- .content-subhead i {
- margin-right: 7px;
- }
+.content-subhead i {
+ margin-right: 7px;
+}
/* This is the class used for the dark-background areas. */
.ribbon {
@@ -258,19 +218,25 @@
}
+ .header1 a
+ {
+ top: 7px;
+ left: 6px;
+ }
+
/* We can align the menu header to the left, but float the
menu items to the right. */
.home-menu {
text-align: left;
}
- .home-menu ul {
- float: right;
- }
+ .home-menu ul {
+ float: right;
+ }
/* We increase the height of the splash-container */
-/* .splash-container {
- height: 500px;
- }*/
+ /* .splash-container {
+ height: 500px;
+ }*/
/* We decrease the width of the .splash, since we have more width
to work with */
@@ -296,15 +262,9 @@
* On desktops and other large devices, we want to over-ride some
* of the mobile and tablet styles.
*/
address@hidden (min-width: 78em) {
- /* We increase the header font size even more */
- .splash-head {
- font-size: 300%;
- }
-}
.custom-menu-wrapper {
- /* background-color: #808080;*/
+ /* background-color: #808080;*/
margin-bottom: 2.5em;
white-space: nowrap;
position: relative;
@@ -386,7 +346,7 @@
}
.custom-menu-screen {
- /* background-color: rgba(0, 0, 0, 0.5);*/
+ /* background-color: rgba(0, 0, 0, 0.5);*/
background-color: #2d3e50;
-webkit-transition: all 0.5s;
-moz-transition: all 0.5s;
@@ -408,7 +368,18 @@
@media (max-width: 62em) {
- .custom-menu {
+ .content {
+ padding: 1em;
+ /* padding-top: 3em;*/
+
+ }
+ .header1 a
+ {
+ top: 10px;
+ left: 6px;
+ }
+
+ .custom-menu {
display: block;
}
@@ -472,27 +443,27 @@
}
A {
- /* These are technically the same, but use both */
- overflow-wrap: break-word;
- word-wrap: break-word;
+ /* These are technically the same, but use both */
+ overflow-wrap: break-word;
+ word-wrap: break-word;
- -ms-word-break: break-all;
- /* This is the dangerous one in WebKit, as it breaks things wherever */
- word-break: break-all;
- /* Instead use this non-standard one: */
- word-break: break-word;
+ -ms-word-break: break-all;
+ /* This is the dangerous one in WebKit, as it breaks things wherever */
+ word-break: break-all;
+ /* Instead use this non-standard one: */
+ word-break: break-word;
- /* Adds a hyphen where the word breaks, if supported (No Blink) */
- -ms-hyphens: auto;
- -moz-hyphens: auto;
- -webkit-hyphens: auto;
- hyphens: auto;
+ /* Adds a hyphen where the word breaks, if supported (No Blink) */
+ -ms-hyphens: auto;
+ -moz-hyphens: auto;
+ -webkit-hyphens: auto;
+ hyphens: auto;
}
@media screen and (-webkit-min-device-pixel-ratio:0) {
- select,
- textarea,
- input {
- font-size: 16px;
- }
+ select,
+ textarea,
+ input {
+ font-size: 16px;
+ }
}
\ No newline at end of file
Modified:
branches/Version-2_0-branch/phpgwapi/templates/frontend/css/side-menu.css
===================================================================
--- branches/Version-2_0-branch/phpgwapi/templates/frontend/css/side-menu.css
2017-02-14 13:19:31 UTC (rev 16305)
+++ branches/Version-2_0-branch/phpgwapi/templates/frontend/css/side-menu.css
2017-02-14 13:22:11 UTC (rev 16306)
@@ -1,6 +1,3 @@
-body {
- color: #777;
-}
.pure-img-responsive {
max-width: 100%;
@@ -21,60 +18,6 @@
}
/*
-This is the parent `<div>` that contains the menu and the content area.
-*/
-#layout {
- position: relative;
- left: 0;
- padding-left: 0;
-}
- #layout.active #menu {
- left: 150px;
- width: 150px;
- }
-
- #layout.active .menu-link {
- left: 150px;
- }
-/*
-The content `<div>` is where all your content goes.
-*/
-.content {
- margin: 0 auto;
- padding: 0 2em;
- max-width: 800px;
- margin-bottom: 50px;
- line-height: 1.6em;
-}
-
-.header {
- margin: 0;
- color: #333;
- text-align: center;
- padding: 2.5em 2em 0;
- border-bottom: 1px solid #eee;
- }
- .header h1 {
- margin: 0.2em 0;
- font-size: 3em;
- font-weight: 300;
- }
- .header h2 {
- font-weight: 300;
- color: #ccc;
- padding: 0;
- margin-top: 0;
- }
-
-.content-subhead {
- margin: 50px 0 20px 0;
- font-weight: 300;
- color: #888;
-}
-
-
-
-/*
The `#menu` `<div>` is the parent `<div>` that contains the `.pure-menu` that
appears on the left side of the page.
*/
@@ -91,61 +34,61 @@
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
- /*
- All anchors inside the menu should be styled like this.
- */
- #menu a {
- color: #999;
- border: none;
- padding: 0.6em 0 0.6em 0.6em;
- }
+/*
+All anchors inside the menu should be styled like this.
+*/
+#menu a {
+ color: #999;
+ border: none;
+ padding: 0.6em 0 0.6em 0.6em;
+}
- /*
- Remove all background/borders, since we are applying them to #menu.
- */
- #menu .pure-menu,
- #menu .pure-menu ul {
- border: none;
- background: transparent;
- }
+/*
+Remove all background/borders, since we are applying them to #menu.
+*/
+#menu .pure-menu,
+#menu .pure-menu ul {
+ border: none;
+ background: transparent;
+}
- /*
- Add that light border to separate items into groups.
- */
- #menu .pure-menu ul,
- #menu .pure-menu .menu-item-divided {
- border-top: 1px solid #333;
- }
- /*
- Change color of the anchor links on hover/focus.
- */
- #menu .pure-menu li a:hover,
- #menu .pure-menu li a:focus {
- background: #333;
- }
+/*
+Add that light border to separate items into groups.
+*/
+#menu .pure-menu ul,
+#menu .pure-menu .menu-item-divided {
+ border-top: 1px solid #333;
+}
+/*
+Change color of the anchor links on hover/focus.
+*/
+#menu .pure-menu li a:hover,
+#menu .pure-menu li a:focus {
+ background: #333;
+}
- /*
- This styles the selected menu item `<li>`.
- */
- #menu .pure-menu-selected,
- #menu .pure-menu-heading {
- background: #1f8dd6;
- }
- /*
- This styles a link within a selected menu item `<li>`.
- */
- #menu .pure-menu-selected a {
- color: #fff;
- }
+/*
+This styles the selected menu item `<li>`.
+*/
+#menu .pure-menu-selected,
+#menu .pure-menu-heading {
+ background: #1f8dd6;
+}
+/*
+This styles a link within a selected menu item `<li>`.
+*/
+#menu .pure-menu-selected a {
+ color: #fff;
+}
- /*
- This styles the menu heading.
- */
- #menu .pure-menu-heading {
- font-size: 110%;
- color: #fff;
- margin: 0;
- }
+/*
+This styles the menu heading.
+*/
+#menu .pure-menu-heading {
+ font-size: 110%;
+ color: #fff;
+ margin: 0;
+}
/* -- Dynamic Button For Responsive Menu
-------------------------------------*/
@@ -172,77 +115,33 @@
padding: 2.1em 1.6em;
}
- .menu-link:hover,
- .menu-link:focus {
- background: #000;
- }
+.menu-link:hover,
+.menu-link:focus {
+ background: #000;
+}
- .menu-link span {
- position: relative;
- display: block;
- }
+.menu-link span {
+ position: relative;
+ display: block;
+}
- .menu-link span,
- .menu-link span:before,
- .menu-link span:after {
- background-color: #fff;
- width: 100%;
- height: 0.2em;
- }
+.menu-link span,
+.menu-link span:before,
+.menu-link span:after {
+ background-color: #fff;
+ width: 100%;
+ height: 0.2em;
+}
- .menu-link span:before,
- .menu-link span:after {
- position: absolute;
- margin-top: -0.6em;
- content: " ";
- }
+.menu-link span:before,
+.menu-link span:after {
+ position: absolute;
+ margin-top: -0.6em;
+ content: " ";
+}
- .menu-link span:after {
- margin-top: 0.6em;
- }
+.menu-link span:after {
+ margin-top: 0.6em;
+}
-/* -- Responsive Styles (Media Queries) -------------------------------------
*/
-
-/*
-Hides the menu at `48em`, but modify this based on your app's needs.
-*/
address@hidden (min-width: 48em) {
-
- .header,
- .content {
- padding-left: 2em;
- padding-right: 2em;
- }
-
- #layout {
- padding-left: 150px; /* left col width "#menu" */
- left: 0;
- }
- #menu {
- left: 150px;
- }
-
- .menu-link {
- position: fixed;
- left: 150px;
- display: none;
- }
-
- #layout.active .menu-link {
- left: 150px;
- }
-}
-
address@hidden (max-width: 48em) {
- /* Only apply this when the window is small. Otherwise, the following
- case results in extra padding on the left:
- * Make the window small.
- * Tap the menu to trigger the active state.
- * Make the window large again.
- */
- #layout.active {
- position: relative;
- left: 150px;
- }
-}
Modified: branches/Version-2_0-branch/phpgwapi/templates/frontend/head.tpl
===================================================================
--- branches/Version-2_0-branch/phpgwapi/templates/frontend/head.tpl
2017-02-14 13:19:31 UTC (rev 16305)
+++ branches/Version-2_0-branch/phpgwapi/templates/frontend/head.tpl
2017-02-14 13:22:11 UTC (rev 16306)
@@ -45,8 +45,8 @@
<a href="{site_url}"
class="pure-menu-heading">{site_title}</a>
<ul class="pure-menu-list">
<li class="pure-menu-item
pure-menu-selected"><a href="{site_url}"
class="pure-menu-link">{home_text}</a></li>
- <li class="pure-menu-item"><a
href="{manual_url}" class="pure-menu-link">{manual_text}</a></li>
- <li class="pure-menu-item"><a
href="{login_url}" class="pure-menu-link">{login_text}</a></li>
+ <li class="pure-menu-item
pure-menu-selected"><a href="{manual_url}"
class="pure-menu-link">{manual_text}</a></li>
+ <li class="pure-menu-item
pure-menu-selected"><a href="{login_url}"
class="pure-menu-link">{login_text}</a></li>
</ul>
</div>
</div>
Modified: branches/Version-2_0-branch/phpgwapi/templates/portico/navbar.tpl
===================================================================
--- branches/Version-2_0-branch/phpgwapi/templates/portico/navbar.tpl
2017-02-14 13:19:31 UTC (rev 16305)
+++ branches/Version-2_0-branch/phpgwapi/templates/portico/navbar.tpl
2017-02-14 13:22:11 UTC (rev 16306)
@@ -8,6 +8,7 @@
if(typeof(Storage)!=="undefined")
{
sessionStorage.cached_menu_tree_data = '';
+ localStorage.clear();
}
var $tree = $('#navbar');
var tree = $tree.tree('getTree');
@@ -17,6 +18,7 @@
$tree.tree('closeNode', node, true);
}
);
+
var sUrl = phpGWLink('logout.php');
window.open(sUrl,'_self');
}
Modified:
branches/Version-2_0-branch/property/inc/class.bogeneric_document.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.bogeneric_document.inc.php
2017-02-14 13:19:31 UTC (rev 16305)
+++ branches/Version-2_0-branch/property/inc/class.bogeneric_document.inc.php
2017-02-14 13:22:11 UTC (rev 16306)
@@ -36,7 +36,8 @@
'read_single' => true,
'save' => true,
'delete' => true,
- 'get_file_relations' => true
+ 'get_file_relations' => true,
+ 'get_file_relations_componentes' => true
);
public function __construct()
@@ -68,6 +69,14 @@
return $values;
}
+ function get_file_relations_componentes( $data )
+ {
+ $values =
$this->so->get_file_relations_componentes($data);
+ $this->total_records_componentes =
$this->so->total_records_componentes;
+
+ return $values;
+ }
+
function save( $values = array(), $file_id )
{
$report_date =
phpgwapi_datetime::date_array($values['report_date']);
Modified: branches/Version-2_0-branch/property/inc/class.botts.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.botts.inc.php
2017-02-14 13:19:31 UTC (rev 16305)
+++ branches/Version-2_0-branch/property/inc/class.botts.inc.php
2017-02-14 13:22:11 UTC (rev 16306)
@@ -156,7 +156,9 @@
$this->reported_by = phpgw::get_var('reported_by',
'int');
$this->cat_id = phpgw::get_var('cat_id', 'int');
$this->part_of_town_id =
phpgw::get_var('part_of_town_id', 'int');
- $this->district_id = phpgw::get_var('district_id',
'int');
+ $default_district =
(isset($GLOBALS['phpgw_info']['user']['preferences']['property']['default_district'])
?
$GLOBALS['phpgw_info']['user']['preferences']['property']['default_district'] :
'');
+ $district_id = phpgw::get_var('district_id', 'int');
+ $this->district_id = $district_id ? $district_id :
$default_district;
$this->allrows = phpgw::get_var('allrows', 'bool');
$this->start_date = phpgw::get_var('filter_start_date',
'string');
$this->end_date = phpgw::get_var('filter_end_date',
'string');
Modified:
branches/Version-2_0-branch/property/inc/class.sogeneric_document.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.sogeneric_document.inc.php
2017-02-14 13:19:31 UTC (rev 16305)
+++ branches/Version-2_0-branch/property/inc/class.sogeneric_document.inc.php
2017-02-14 13:22:11 UTC (rev 16306)
@@ -199,6 +199,72 @@
return $values;
}
+ public function get_file_relations_componentes($data)
+ {
+ $start = isset($data['start']) && $data['start'] ?
$data['start'] : 0;
+ $results = isset($data['results']) && $data['results']
? $data['results'] : 0;
+ $file_id = isset($data['file_id']) && $data['file_id']
? (int)$data['file_id'] : 0;
+ $location_id = isset($data['location_id']) &&
$data['location_id'] ? (int)$data['location_id'] : 0;
+ $allrows = isset($data['allrows']) ? $data['allrows'] :
'';
+ $entity_group_id = isset($data['entity_group_id']) ?
$data['entity_group_id'] : '';
+
+ if ($location_id)
+ {
+ $filtermethod = "WHERE a.location_id =
{$location_id} AND a.file_id = {$file_id}";
+ } else {
+ $filtermethod = "WHERE a.file_id = {$file_id}";
+ }
+
+ if ($entity_group_id)
+ {
+ $filtermethod .= " AND c.entity_group_id =
{$entity_group_id}";
+ }
+
+ $sql = "SELECT a.file_id, b.type, b.id, b.location_id,
b.location_code, b.json_representation, c.name AS category_name, c.entity_id,
c.entity_group_id "
+ . "FROM phpgw_vfs_file_relation a INNER
JOIN fm_bim_item b ON a.location_id = b.location_id AND a.location_item_id =
b.id "
+ . "INNER JOIN fm_entity_category c ON
b.location_id = c.location_id" ." {$filtermethod} ";
+
+ if (!$allrows)
+ {
+ $this->db->limit_query($sql, $start, __LINE__,
__FILE__, $results);
+ }
+ else
+ {
+ $this->db->query($sql, __LINE__, __FILE__);
+ }
+
+ $values = array();
+ $i = 0;
+ while ($this->db->next_record())
+ {
+ $values[$i] = array
+ (
+ 'id' => $this->db->f('id'),
+ 'entity_id' =>
$this->db->f('entity_id'),
+ 'entity_group_id' =>
$this->db->f('entity_group_id'),
+ 'location_id' =>
$this->db->f('location_id'),
+ 'category_name' =>
$this->db->f('category_name')
+ );
+
+ $jsondata =
json_decode($this->db->f('json_representation', true), true);
+ foreach ($jsondata as $k => $v)
+ {
+ $values[$i][$k] = $v;
+ }
+ $i++;
+ }
+
+ $sql2 = "SELECT count(*) as cnt "
+ . "FROM phpgw_vfs_file_relation a INNER
JOIN fm_bim_item b ON a.location_id = b.location_id AND a.location_item_id =
b.id "
+ . "INNER JOIN fm_entity_category c ON
b.location_id = c.location_id" ." {$filtermethod} ";
+ $this->db->query($sql2, __LINE__, __FILE__);
+
+ $this->db->next_record();
+ $this->total_records_componentes = $this->db->f('cnt');
+
+ return $values;
+ }
+
function save_file_relations( $add, $delete, $location_id,
$file_id )
{
$this->db->transaction_begin();
Modified: branches/Version-2_0-branch/property/inc/class.soproject.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.soproject.inc.php
2017-02-14 13:19:31 UTC (rev 16305)
+++ branches/Version-2_0-branch/property/inc/class.soproject.inc.php
2017-02-14 13:22:11 UTC (rev 16306)
@@ -3424,9 +3424,17 @@
'responsible_type' => 'user',
'action' => 'approval',
'remark' => '',
- 'deadline' => ''
+ 'deadline' => '',
+ 'closed' => true
+
);
+ //check for approved
+
if(execMethod('property.sopending_action.get_pending_action', $action_params))
+ {
+ continue;
+ }
+ unset($action_params['closed']);
//approval_substitute
if(!execMethod('property.sopending_action.get_pending_action', $action_params))
{
Modified:
branches/Version-2_0-branch/property/inc/class.uigeneric_document.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.uigeneric_document.inc.php
2017-02-14 13:19:31 UTC (rev 16305)
+++ branches/Version-2_0-branch/property/inc/class.uigeneric_document.inc.php
2017-02-14 13:22:11 UTC (rev 16306)
@@ -61,6 +61,7 @@
$this->bo = CreateObject('property.bogeneric_document');
$this->bocommon = & $this->bo->bocommon;
+ $this->soadmin_entity =
CreateObject('property.soadmin_entity');
$this->acl = & $GLOBALS['phpgw']->acl;
$this->acl_location =
'.document';//$this->bo->acl_location;
$this->acl_read =
$this->acl->check($this->acl_location, PHPGW_ACL_READ, 'property');
@@ -406,7 +407,12 @@
if (!$values)
{
$values = (array)
$this->bo->read_single($id);
+ $paths = array();
+ foreach ($values['path'] as $path){
+ $paths[] = array('value' =>
$path);
+ }
$values['report_date'] =
($values['report_date']) ? date($this->dateFormat, $values['report_date']) : '';
+ $values['paths'] = $paths;
}
$values['id'] = $id;
}
@@ -426,6 +432,7 @@
(
array('key' => 'id', 'label' =>
lang('id'), 'sortable' => false, 'resizeable' => true),
array('key' => 'name', 'label' =>
lang('Benevnelse'), 'sortable' => false, 'resizeable' => true),
+ array('key' => 'category', 'label' =>
lang('Category'), 'sortable' => false, 'resizeable' => true),
array('key' => 'relate', 'label' =>
lang('related'), 'sortable' => false, 'resizeable' => true),
);
@@ -452,7 +459,7 @@
)) . ";
var parameters = " .
json_encode(array('parameter' => array(array('name' => 'id',
'source' =>
'id')))) . ";
- setRelationsComponents(oArgs,
parameters);
+ setRelationsComponents(oArgs);
"
);
@@ -579,7 +586,7 @@
if (!$location_filter)
{
- $this->soadmin_entity =
CreateObject('property.soadmin_entity');
+ //$this->soadmin_entity =
CreateObject('property.soadmin_entity');
$entity_list =
$this->soadmin_entity->read(array('allrows' => true));
$location_filter = array();
@@ -691,7 +698,44 @@
$search = phpgw::get_var('search');
$draw = phpgw::get_var('draw', 'int');
$only_related = phpgw::get_var('only_related',
'boolean');
+ $all_types = phpgw::get_var('all_types', 'boolean');
+ $entity_group_id = phpgw::get_var('entity_group_id');
+
+ $entity_list =
$this->soadmin_entity->read(array('allrows' => true));
+ $e_list = array();
+ foreach($entity_list as $entity)
+ {
+ $e_list[$entity['id']] = $entity['name'];
+ }
+
+ if ($all_types)
+ {
+ $result =
$this->bo->get_file_relations_componentes(array(
+ 'start' => phpgw::get_var('start',
'int', 'REQUEST', 0),
+ 'results' => phpgw::get_var('length',
'int', 'REQUEST', 0),
+ 'allrows' => phpgw::get_var('length',
'int') == -1,
+ 'file_id' => $file_id,
+ 'entity_group_id' => $entity_group_id
+ ));
+ $values = array();
+ foreach($result as $item)
+ {
+ $values[] = array(
+ 'id' => '<a
href="'.self::link(array('menuaction' => 'property.uientity.view',
'location_id' => $item['location_id'], 'id' =>
$item['id'])).'">'.$item['id'].'</a>',
+ 'name' => $item['benevnelse'],
+ 'category' =>
$e_list[$item['entity_id']].'::'.$item['category_name'],
+ 'relate' => '<input
value="'.$item['id'].'_'.$item['location_id'].'" class="components mychecks"
type="checkbox" checked="checked"><input type="hidden"
class="components_related" value="'.$item['id'].'_'.$item['location_id'].'">',
+ );
+ }
+
+ $result_data = array('results' => $values);
+ $result_data['total_records'] =
$this->bo->total_records_componentes;
+ $result_data['draw'] = $draw;
+
+ return $this->jquery_results($result_data);
+ }
+
$soentity = CreateObject('property.soentity');
$_components = $soentity->read( array(
'start' => phpgw::get_var('start', 'int', 'REQUEST', 0),
@@ -702,6 +746,7 @@
'location_id' => $location_id,
'filter_item' => array()
));
+ $category =
$this->soadmin_entity->get_single_category($location_id, true);
if ($file_id)
{
@@ -730,6 +775,7 @@
$values[] = array(
'id' => '<a
href="'.self::link(array('menuaction' => 'property.uientity.view',
'location_id' => $location_id, 'id' => $item['id'])).'">'.$item['id'].'</a>',
'name' => $item['benevnelse'],
+ 'category' =>
$e_list[$item['entity_id']].'::'.$category['name'],
'relate' => '<input
value="'.$item['id'].'" class="components mychecks" type="checkbox"
'.$checked.'>'.$hidden,
);
}
@@ -741,12 +787,12 @@
return $this->jquery_results($result_data);
}
-
-
+
public function save_file_relations()
{
$receipt = array();
+ $all_types = phpgw::get_var('all_types', 'int');
$type_id = phpgw::get_var('type_id', 'int');
$location_id = phpgw::get_var('location_id', 'int');
$file_id = phpgw::get_var('file_id', 'int');
@@ -756,13 +802,33 @@
$add = array_diff($items, $related);
$delete = array_diff($related, $items);
- if (empty($location_id))
+ if ($all_types)
{
- $location_id =
$GLOBALS['phpgw']->locations->get_id('property', ".location.{$type_id}");
+ if (count($add))
+ {
+ foreach ($add as $item) {
+ $values = explode('_', $item);
+ $result =
$this->bo->save_file_relations( array($values[0]), array(), $values[1],
$file_id );
+ }
+ }
+
+ if (count($delete))
+ {
+ foreach ($delete as $item) {
+ $values = explode('_', $item);
+ $result =
$this->bo->save_file_relations( array(), array($values[0]), $values[1],
$file_id );
+ }
+ }
+ }
+ else {
+
+ if (empty($location_id))
+ {
+ $location_id =
$GLOBALS['phpgw']->locations->get_id('property', ".location.{$type_id}");
+ }
+ $result = $this->bo->save_file_relations( $add,
$delete, $location_id, $file_id );
}
- $result = $this->bo->save_file_relations( $add,
$delete, $location_id, $file_id );
-
if ($result)
{
$receipt['message'][] = array('msg' =>
lang('Records has been added'));
Modified: branches/Version-2_0-branch/property/inc/class.uitts.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.uitts.inc.php
2017-02-14 13:19:31 UTC (rev 16305)
+++ branches/Version-2_0-branch/property/inc/class.uitts.inc.php
2017-02-14 13:22:11 UTC (rev 16306)
@@ -689,32 +689,6 @@
$values_combo_box = array();
$combos = array();
- $check_date_type = array('type' => 'filter',
- 'name' => 'check_date_type',
- 'extra' => '',
- 'text' => lang('check date type'),
- 'list' => array(
- array(
- 'id' => 1,
- 'name' => lang('modified date')
- ),
- array(
- 'id' => 2,
- 'name' => lang('entry date')
- )
- )
- );
-
- if($order_read)
- {
- $check_date_type['list'][] = array(
- 'id' => 3,
- 'name' => lang('no date')
- );
- }
-
- $combos[] = $check_date_type;
-
$values_combo_box[3] = $this->bo->filter(array('format'
=> $group_filters, 'filter' => $this->status_id,
'default' => 'O'));
@@ -921,6 +895,32 @@
}
}
+ $check_date_type = array('type' => 'filter',
+ 'name' => 'check_date_type',
+ 'extra' => '',
+ 'text' => lang('check date type'),
+ 'list' => array(
+ array(
+ 'id' => 1,
+ 'name' => lang('modified date')
+ ),
+ array(
+ 'id' => 2,
+ 'name' => lang('entry date')
+ )
+ )
+ );
+
+ if($order_read)
+ {
+ $check_date_type['list'][] = array(
+ 'id' => 3,
+ 'name' => lang('no date')
+ );
+ }
+
+ $combos[] = $check_date_type;
+
return $combos;
}
@@ -956,22 +956,6 @@
'form' => array(
'toolbar' => array(
'item' => array(
- array
- (
- 'type' =>
'date-picker',
- 'id' =>
'start_date',
- 'name' =>
'start_date',
- 'value' =>
$start_date,
- 'text' =>
lang('from')
- ),
- array
- (
- 'type' =>
'date-picker',
- 'id' =>
'end_date',
- 'name' =>
'end_date',
- 'value' =>
$end_date,
- 'text' =>
lang('to')
- )
)
)
),
@@ -995,9 +979,24 @@
foreach ($filters as $filter)
{
- array_unshift($data['form']['toolbar']['item'],
$filter);
+ $data['form']['toolbar']['item'][] = $filter;
}
+ $data['form']['toolbar']['item'][] = array(
+ 'type' =>
'date-picker',
+ 'id' =>
'start_date',
+ 'name' =>
'start_date',
+ 'value' =>
$start_date,
+ 'text' =>
lang('from')
+ );
+ $data['form']['toolbar']['item'][] = array(
+ 'type' =>
'date-picker',
+ 'id' =>
'end_date',
+ 'name' =>
'end_date',
+ 'value' =>
$end_date,
+ 'text' =>
lang('to')
+ );
+
$parameters = array
(
'parameter' => array(
Modified: branches/Version-2_0-branch/property/inc/class.uiworkorder.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.uiworkorder.inc.php
2017-02-14 13:19:31 UTC (rev 16305)
+++ branches/Version-2_0-branch/property/inc/class.uiworkorder.inc.php
2017-02-14 13:22:11 UTC (rev 16306)
@@ -961,11 +961,20 @@
$this->_handle_files($values);
// start approval
+ if (!is_object($GLOBALS['phpgw']->send))
+ {
+ $GLOBALS['phpgw']->send =
CreateObject('phpgwapi.send');
+ }
$_budget_amount =
$this->bo->get_budget_amount($id);
if (isset($values['approval']) &&
$values['approval'] && $config->config_data['workorder_approval'])
{
+
+ $coordinator_name =
$GLOBALS['phpgw_info']['user']['fullname'];
+ $coordinator_email =
$GLOBALS['phpgw_info']['user']['preferences']['property']['email'];
+
+
$approval_level =
!empty($config->config_data['approval_level']) ?
$config->config_data['approval_level'] : 'order';
switch ($approval_level)
@@ -975,10 +984,88 @@
$subject =
lang('Approval') . ": {$values['project_id']}";
$message = '<a href ="'
. $GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
$approval_menuaction,
'id' =>
$values['project_id']), false, true) . '">' . lang('project %1 needs approval',
$values['project_id']) . '</a>';
- if
(isset($config->config_data['project_approval_status']) &&
$config->config_data['project_approval_status'])
+
+ //already approved?
+
+ $pending_action =
CreateObject('property.sopending_action');
+
+ foreach
($values['approval'] as $_account_id => $_address)
{
-
$_project_status = $config->config_data['project_approval_status'];
-
createObject('property.soproject')->set_status($values['project_id'],$_project_status);
+
$action_params_approved = array
+ (
+
'appname' => 'property',
+
'location' => '.project',
+ 'id' =>
$values['project_id'],
+
'responsible' => $_account_id,
+
'responsible_type' => 'user',
+
'action' => 'approval',
+
'remark' => '',
+
'deadline' => '',
+
'closed' => true
+ );
+
+ $approvals =
$pending_action->get_pending_action($action_params_approved);
+
+
+ if(!$approvals)
+ {
+
$_budget_amount =
$this->bo->get_accumulated_budget_amount($values['project_id']);
+
+
$pending_action->set_pending_action($action_params_approved);
+ if
(isset($config->config_data['project_approval_status']) &&
$config->config_data['project_approval_status'])
+ {
+
$_project_status = $config->config_data['project_approval_status'];
+
createObject('property.soproject')->set_status($values['project_id'],$_project_status);
+ }
+
+ $prefs
= $this->bocommon->create_preferences('property', $_account_id);
+ if
(!empty($prefs['email']))
+ {
+
$_address = $prefs['email'];
+ }
+ else
+ {
+
$email_domain = !empty($GLOBALS['phpgw_info']['server']['email_domain']) ?
$GLOBALS['phpgw_info']['server']['email_domain'] : 'bergen.kommune.no';
+
$_address = $GLOBALS['phpgw']->accounts->id2lid($_account_id) .
"@{$email_domain}";
+ }
+
+ try
+ {
+
CreateObject('property.historylog', 'project')->add('AP',
$values['project_id'],
$GLOBALS['phpgw']->accounts->get($_account_id)->__toString() .
"::{$_budget_amount}");
+
+
$rcpt = $GLOBALS['phpgw']->send->msg('email', $_address, $subject,
stripslashes($message), '', $cc, $bcc, $coordinator_email, $coordinator_name,
'html');
+
if ($rcpt)
+
{
+
phpgwapi_cache::message_set(lang('%1 is notified',
$_address),'message');
+
}
+ }
+ catch
(Exception $exc)
+ {
+
phpgwapi_cache::message_set($exc->getMessage(),'error');
+ }
+
+ }
+ else //
implicite approved
+ {
+
$action_params = array(
+
'appname' => 'property',
+
'location' => '.project.workorder',
+
'id' => $id,
+
'responsible' => $_account_id,
+
'responsible_type' => 'user',
+
'action' => 'approval',
+
'remark' => '',
+
'deadline' => ''
+
);
+
+
if(!execMethod('property.sopending_action.get_pending_action', $action_params))
+
{
+
execMethod('property.sopending_action.set_pending_action',
$action_params);
+
}
+
execMethod('property.sopending_action.close_pending_action', $action_params);
+
$lang_implicitly = lang('implicitly from project');
+
$historylog->add('OA', $id,
$GLOBALS['phpgw']->accounts->get($_account_id)->__toString() . ",
{$lang_implicitly}::{$_budget_amount}");
+ }
}
$_orders =
$this->bo->get_order_list($values['project_id']);
@@ -992,19 +1079,11 @@
break;
}
- $coordinator_name =
$GLOBALS['phpgw_info']['user']['fullname'];
- $coordinator_email =
$GLOBALS['phpgw_info']['user']['preferences']['property']['email'];
-
-
if
(empty($GLOBALS['phpgw_info']['server']['smtp_server']))
{
$receipt['error'][] =
array('msg' => lang('SMTP server is not set! (admin section)'));
}
- if (!is_object($GLOBALS['phpgw']->send))
- {
- $GLOBALS['phpgw']->send =
CreateObject('phpgwapi.send');
- }
$action_params = array(
'appname' => 'property',
@@ -1030,24 +1109,27 @@
$_address =
$GLOBALS['phpgw']->accounts->id2lid($_account_id) . "@{$email_domain}";
}
- foreach ($_orders as $_order_id)
+ if($approval_level == 'order')
{
-
$action_params['responsible'] = $_account_id;
- $action_params['id'] =
$_order_id;
- try
+ foreach ($_orders as
$_order_id)
{
-
$historylog->add('AP', $id,
$GLOBALS['phpgw']->accounts->get($_account_id)->__toString() .
"::{$_budget_amount}");
-
execMethod('property.sopending_action.set_pending_action', $action_params);
- $rcpt =
$GLOBALS['phpgw']->send->msg('email', $_address, $subject,
stripslashes($message), '', $cc, $bcc, $coordinator_email, $coordinator_name,
'html');
- if ($rcpt)
+
$action_params['responsible'] = $_account_id;
+
$action_params['id'] = $_order_id;
+ try
{
-
phpgwapi_cache::message_set(lang('%1 is notified', $_address),'message');
+
$historylog->add('AP', $id,
$GLOBALS['phpgw']->accounts->get($_account_id)->__toString() .
"::{$_budget_amount}");
+
execMethod('property.sopending_action.set_pending_action', $action_params);
+ $rcpt =
$GLOBALS['phpgw']->send->msg('email', $_address, $subject,
stripslashes($message), '', $cc, $bcc, $coordinator_email, $coordinator_name,
'html');
+ if
($rcpt)
+ {
+
phpgwapi_cache::message_set(lang('%1 is notified', $_address),'message');
+ }
}
+ catch
(Exception $exc)
+ {
+
phpgwapi_cache::message_set($exc->getMessage(),'error');
+ }
}
- catch (Exception $exc)
- {
-
phpgwapi_cache::message_set($exc->getMessage(),'error');
- }
}
}
}
Modified:
branches/Version-2_0-branch/property/inc/import/class.import_component_files.inc.php
===================================================================
---
branches/Version-2_0-branch/property/inc/import/class.import_component_files.inc.php
2017-02-14 13:19:31 UTC (rev 16305)
+++
branches/Version-2_0-branch/property/inc/import/class.import_component_files.inc.php
2017-02-14 13:22:11 UTC (rev 16306)
@@ -72,7 +72,6 @@
return true;
}
- /*
private function _get_files_by_component($id, $location_id)
{
$sql = "SELECT a.location_id, a.location_item_id,
b.file_id, b.name, b.md5_sum FROM phpgw_vfs_file_relation a INNER JOIN
phpgw_vfs b "
@@ -85,25 +84,6 @@
while ($this->db->next_record())
{
- $healthy = $this->db->f('file_id').'_#';
- $values[] =
$this->db->f('md5_sum').'_'.trim(str_replace($healthy, '',
$this->db->f('name')));
- }
-
- return $values;
- }*/
-
- private function _get_files_by_component($id, $location_id)
- {
- $sql = "SELECT a.location_id, a.location_item_id,
b.file_id, b.name, b.md5_sum FROM phpgw_vfs_file_relation a INNER JOIN
phpgw_vfs b "
- . " ON a.file_id = b.file_id WHERE
a.location_item_id = '{$id}' AND a.location_id = '{$location_id}'"
- . " AND b.mime_type != 'Directory' AND
b.mime_type != 'journal' AND b.mime_type != 'journal-deleted'";
-
- $this->db->query($sql, __LINE__, __FILE__);
-
- $values = array();
-
- while ($this->db->next_record())
- {
$values[] = $this->db->f('md5_sum');
}
@@ -232,6 +212,8 @@
$message['message'][] = array('msg' => lang('%1
relations existing', $count_relations_existing));
}
+ $this->_delete_all_dir_temp();
+
return $message;
}
@@ -286,17 +268,19 @@
}
}
} else {
- foreach ($uploaded_files as $file)
+ foreach ($uploaded_files as &$file)
{
$md5sum =
$this->_generate_md5sum($file['path_absolute']);
if (!empty($md5sum))
{
+ $file['md5sum'] = $md5sum;
+ $component_files[$md5sum] =
$file;
$this->paths_from_file[$md5sum][] = $file['path_relative'];
} else {
$this->paths_empty[] =
$file['path_absolute'];
}
}
- $component_files = $uploaded_files;
+ //$component_files = $uploaded_files;
}
}
@@ -518,6 +502,20 @@
return $component_files;
}
+ private function _delete_all_dir_temp()
+ {
+ $files = glob($this->path_upload_dir . '*', GLOB_MARK);
+
+ foreach ($files as $file)
+ {
+ $path = realpath($file);
+ if (is_dir($path))
+ {
+ exec("rm -Rf '{$path}'", $ret);
+ }
+ }
+ }
+
private function
_search_relations_with_components_location($relations)
{
$count_new_relations = 0;
@@ -790,6 +788,8 @@
}
}
+ $this->_delete_all_dir_temp();
+
return $message;
}
Modified:
branches/Version-2_0-branch/property/js/portico/generic_document.edit.js
===================================================================
--- branches/Version-2_0-branch/property/js/portico/generic_document.edit.js
2017-02-14 13:19:31 UTC (rev 16305)
+++ branches/Version-2_0-branch/property/js/portico/generic_document.edit.js
2017-02-14 13:22:11 UTC (rev 16306)
@@ -90,17 +90,28 @@
{
paramsTable0['location_id'] = $('#location_id').val();
paramsTable0['id'] = $('#id').val();
+ paramsTable0['entity_group_id'] = $('#entity_group_id').val();
if ($('#check_components_related').is(':checked')) {
paramsTable0['only_related'] = 1;
+ $( "#check_all_types" ).prop( "disabled", false );
} else {
paramsTable0['only_related'] = 0;
+ $( "#check_all_types" ).prop( "disabled", true );
}
+ if ($('#check_all_types').is(':checked')) {
+ paramsTable0['all_types'] = 1;
+ $( "#location_id" ).prop( "disabled", true );
+ } else {
+ paramsTable0['all_types'] = 0;
+ $( "#location_id" ).prop( "disabled", false );
+ }
+
oTable0.fnDraw();
}
-function setRelationsComponents(oArgs)
+/*function setRelationsComponents2(oArgs)
{
var values = {};
var related = {};
@@ -120,7 +131,6 @@
related[obj.value] = obj.value;
});
- oArgs['location_id'] = $('#location_id').val();
oArgs['file_id'] = $('#id').val();
var requestUrl = phpGWLink('index.php', oArgs);
@@ -132,7 +142,46 @@
}, data, "POST", "JSON");
}
+*/
+function setRelationsComponents(oArgs)
+{
+ var values = {};
+ var related = {};
+
+ var select_check = $('.components');
+ select_check.each(function (i, obj)
+ {
+ if (obj.checked)
+ {
+ values[obj.value] = obj.value;
+ }
+ });
+
+ var select_related = $('.components_related');
+ select_related.each(function (i, obj)
+ {
+ related[obj.value] = obj.value;
+ });
+
+ if ($('#check_all_types').is(':checked'))
+ {
+ oArgs['all_types'] = 1;
+ } else {
+ oArgs['location_id'] = $('#location_id').val();
+ }
+
+ oArgs['file_id'] = $('#id').val();
+ var requestUrl = phpGWLink('index.php', oArgs);
+ var data = {"items":values, "related":related};
+ JqueryPortico.execute_ajax(requestUrl, function (result)
+ {
+ JqueryPortico.show_message(0, result);
+ oTable0.fnDraw();
+
+ }, data, "POST", "JSON");
+}
+
function setRelationsLocations(oArgs)
{
var values = {};
@@ -170,6 +219,10 @@
getComponents();
}
+function showAllTypes() {
+ getComponents();
+}
+
function showRelatedLocations() {
getLocations();
}
Modified: branches/Version-2_0-branch/property/js/portico/import_components.js
===================================================================
--- branches/Version-2_0-branch/property/js/portico/import_components.js
2017-02-14 13:19:31 UTC (rev 16305)
+++ branches/Version-2_0-branch/property/js/portico/import_components.js
2017-02-14 13:22:11 UTC (rev 16306)
@@ -216,6 +216,7 @@
})
.done(function(result) {
JqueryPortico.show_message(4, result);
+ refresh_tab_files();
//$('#import_components_files').prop('disabled', true);
})
.fail(function() {
@@ -687,6 +688,23 @@
);
}
+function refresh_tab_files ()
+{
+ $('#multi_upload_file').addClass('fileupload-processing');
+ $.ajax({
+ // Uncomment the following to send cross-domain cookies:
+ //xhrFields: {withCredentials: true},
+ url: $('#multi_upload_file').fileupload('option', 'url'),
+ dataType: 'json',
+ context: $('#multi_upload_file')[0]
+ }).always(function () {
+ $('#multi_upload_file').removeClass('fileupload-processing');
+ }).done(function (result) {
+ $('.presentation').empty();
+ $('#multi_upload_file').fileupload('option',
'done').call($('#multi_upload_file'), $.Event('done'), {result: result});
+ });
+}
+
function valid_new_attribute (code)
{
if ($('#name_' + code).val() == '')
Modified: branches/Version-2_0-branch/property/setup/phpgw_no.lang
===================================================================
--- branches/Version-2_0-branch/property/setup/phpgw_no.lang 2017-02-14
13:19:31 UTC (rev 16305)
+++ branches/Version-2_0-branch/property/setup/phpgw_no.lang 2017-02-14
13:22:11 UTC (rev 16306)
@@ -2074,4 +2074,5 @@
approval from %1 is required for order %2 property no
Godkjenning fra %1 er pÄkrevd for ordre %2
missing recipient for order %1 property no Mangler mottaker for
ordre %1
export property no Eksport
-simplified property no Forenklet
\ No newline at end of file
+simplified property no Forenklet
+implicitly from project property no Implisitt fra prosjekt
\ No newline at end of file
Modified:
branches/Version-2_0-branch/property/templates/base/generic_document.xsl
===================================================================
--- branches/Version-2_0-branch/property/templates/base/generic_document.xsl
2017-02-14 13:19:31 UTC (rev 16305)
+++ branches/Version-2_0-branch/property/templates/base/generic_document.xsl
2017-02-14 13:22:11 UTC (rev 16306)
@@ -204,6 +204,16 @@
</label>
<a
href="{link_file}"><xsl:value-of select="file_name" /></a>
</div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'Path')"/>
+ </label>
+ <xsl:for-each
select="document/paths">
+ <div
class='pure-custom'>
+
<div><xsl:value-of select="value"/></div>
+ </div>
+ </xsl:for-each>
+ </div>
<xsl:choose>
<xsl:when
test="editable = 1">
<div
class="pure-control-group">
@@ -234,6 +244,10 @@
<xsl:value-of select="php:function('lang', 'Only Related')" />
</label>
<input
type="checkbox" id="check_components_related" name="check_components_related"
value="1" onchange="showRelatedComponentes()"></input>
+ <label>
+
<xsl:value-of select="php:function('lang', 'all types')" />
+ </label>
+ <input
type="checkbox" disabled="disabled" id="check_all_types" name="check_all_types"
value="1" onchange="showAllTypes()"></input>
</div>
<div
class="pure-control-group">
<label
for="vendor">
Modified: branches/Version-2_0-branch/registration/inc/class.uireg.inc.php
===================================================================
--- branches/Version-2_0-branch/registration/inc/class.uireg.inc.php
2017-02-14 13:19:31 UTC (rev 16305)
+++ branches/Version-2_0-branch/registration/inc/class.uireg.inc.php
2017-02-14 13:22:11 UTC (rev 16306)
@@ -83,11 +83,14 @@
}
$GLOBALS['phpgw']->css->add_external_file('registration/templates/base/css/rainbow_baby-blue.css');
phpgwapi_jquery::formvalidator_generate(array('date',
'security'));
+
+ $form_header = !empty($this->config['form_header']) ?
$this->config['form_header'] : $GLOBALS['phpgw_info']['server']['system_name'];
+
$GLOBALS['phpgw_info']['server']['no_jscombine'] = true;
$this->template->set_var('css',
$GLOBALS['phpgw']->common->get_css());
$this->template->set_var('javascript',
$GLOBALS['phpgw']->common->get_javascript());
$this->template->set_var('str_base_url',
$GLOBALS['phpgw']->link('/', array('logindomain' => $_REQUEST['logindomain']),
true));
- $this->template->set_var('lang_header',
$GLOBALS['phpgw_info']['server']['system_name'] . ' :: ' . $sub);
+ $this->template->set_var('lang_header',
"{$form_header}::{$sub}");
$this->template->pfp('out', 'header');
}
Modified: branches/Version-2_0-branch/registration/templates/base/config.tpl
===================================================================
--- branches/Version-2_0-branch/registration/templates/base/config.tpl
2017-02-14 13:19:31 UTC (rev 16305)
+++ branches/Version-2_0-branch/registration/templates/base/config.tpl
2017-02-14 13:22:11 UTC (rev 16306)
@@ -113,6 +113,10 @@
</td>
</tr>
<tr>
+ <td>{lang_registration_form_header}:</td>
+ <td><input name="newsettings[form_header]"
value="{value_form_header}"></td>
+ </tr>
+ <tr>
<td>{lang_login_url}:</td>
<td><input name="newsettings[login_url]"
value="{value_login_url}"></td>
</tr>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [16306] Stable: Merge 16296:16305 from trunk,
sigurdne <=