[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [16319] Stable: Merge 16315:16318 from trunk
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [16319] Stable: Merge 16315:16318 from trunk |
Date: |
Thu, 16 Feb 2017 04:48:32 -0500 (EST) |
Revision: 16319
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16319
Author: sigurdne
Date: 2017-02-16 04:48:32 -0500 (Thu, 16 Feb 2017)
Log Message:
-----------
Stable: Merge 16315:16318 from trunk
Modified Paths:
--------------
branches/Version-2_0-branch/bookingfrontend/inc/class.bouser.inc.php
branches/Version-2_0-branch/bookingfrontend/inc/custom/default/MinId.php
branches/Version-2_0-branch/phpgwapi/templates/bookingfrontend/footer.tpl
branches/Version-2_0-branch/phpgwapi/templates/bookingfrontend/head.inc.php
branches/Version-2_0-branch/property/inc/import/class.import_entity_categories.inc.php
Added Paths:
-----------
branches/Version-2_0-branch/phpgwapi/templates/bookingfrontend/js/minid.js
Property Changed:
----------------
branches/Version-2_0-branch/
branches/Version-2_0-branch/bookingfrontend/
Index: branches/Version-2_0-branch
===================================================================
--- branches/Version-2_0-branch 2017-02-16 09:46:08 UTC (rev 16318)
+++ branches/Version-2_0-branch 2017-02-16 09:48:32 UTC (rev 16319)
Property changes on: branches/Version-2_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
## -1,4 +1,4 ##
/branches/dev-syncromind:13653
/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,16297-16305,16307-16314
\ 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,16307-16314,16316-16318
\ No newline at end of property
Index: branches/Version-2_0-branch/bookingfrontend
===================================================================
--- branches/Version-2_0-branch/bookingfrontend 2017-02-16 09:46:08 UTC (rev
16318)
+++ branches/Version-2_0-branch/bookingfrontend 2017-02-16 09:48:32 UTC (rev
16319)
Property changes on: branches/Version-2_0-branch/bookingfrontend
___________________________________________________________________
Modified: svn:mergeinfo
## -1,3 +1,3 ##
/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,16297-16305,16307-16314
\ 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,16307-16314,16316-16318
\ No newline at end of property
Modified: branches/Version-2_0-branch/bookingfrontend/inc/class.bouser.inc.php
===================================================================
--- branches/Version-2_0-branch/bookingfrontend/inc/class.bouser.inc.php
2017-02-16 09:46:08 UTC (rev 16318)
+++ branches/Version-2_0-branch/bookingfrontend/inc/class.bouser.inc.php
2017-02-16 09:48:32 UTC (rev 16319)
@@ -235,48 +235,4 @@
return null;
}
}
-
- protected function get_breg_orgs( $fodselsnr )
- {
- $db = createObject('phpgwapi.db', null, null, true);
-
- $db->Host =
$GLOBALS['phpgw_domain']['default']['db_host'];
- $db->Port = '5432';
- $db->Type = 'postgres';
- $db->Database = 'breg';
- $db->User =
$GLOBALS['phpgw_domain']['default']['db_user'];
- $db->Password =
$GLOBALS['phpgw_domain']['default']['db_pass'];
-
- try
- {
- $db->connect();
- $this->connected = true;
- }
- catch (Exception $e)
- {
- $status = lang('unable_to_connect_to_database');
- }
-
- $sql = "SELECT DISTINCT orgnr FROM personcurrent WHERE
fodselsnr ='{$fodselsnr}'";
- $results = array();
- $db = & $GLOBALS['phpgw']->db;
- $db->query($sql, __LINE__, __FILE__);
- while ($db->next_record())
- {
- $results[] = $db->f('orgnr', true);
- }
- return $results;
- }
-
- protected function get_breg_orgs_old($fodselsnr) {
- $breg_conn =
pg_connect("host=".$GLOBALS['phpgw_domain']['default']['db_host']." port=5432
dbname=breg user=".$GLOBALS['phpgw_domain']['default']['db_user']."
password=".$GLOBALS['phpgw_domain']['default']['db_pass']) or die('connection
failed');
- $sql = "SELECT distinct orgnr FROM breg.personcurrent WHERE
fodselsnr ='".$fodselsnr."'";
- $results = pg_query($breg_conn, $sql);
- $orgs = pg_fetch_all($results);
- print_r($sql);
- print_r($orgs);
- pg_close($breg_conn);
- return $orgs;
- }
-
}
\ No newline at end of file
Modified:
branches/Version-2_0-branch/bookingfrontend/inc/custom/default/MinId.php
===================================================================
--- branches/Version-2_0-branch/bookingfrontend/inc/custom/default/MinId.php
2017-02-16 09:46:08 UTC (rev 16318)
+++ branches/Version-2_0-branch/bookingfrontend/inc/custom/default/MinId.php
2017-02-16 09:48:32 UTC (rev 16319)
@@ -99,4 +99,37 @@
return null;
}
}
+
+ private function get_breg_orgs( $fodselsnr )
+ {
+ $db = createObject('phpgwapi.db', null, null, true);
+
+ $db->Host =
$GLOBALS['phpgw_domain']['default']['db_host'];
+ $db->Port = '5432';
+ $db->Type = 'postgres';
+ $db->Database = 'breg';
+ $db->User =
$GLOBALS['phpgw_domain']['default']['db_user'];
+ $db->Password =
$GLOBALS['phpgw_domain']['default']['db_pass'];
+
+ try
+ {
+ $db->connect();
+ $this->connected = true;
+ }
+ catch (Exception $e)
+ {
+ $status = lang('unable_to_connect_to_database');
+ }
+
+ $sql = "SELECT DISTINCT orgnr FROM personcurrent WHERE
fodselsnr ='{$fodselsnr}'";
+ $results = array();
+ $db = & $GLOBALS['phpgw']->db;
+ $db->query($sql, __LINE__, __FILE__);
+ while ($db->next_record())
+ {
+ $results[] = $db->f('orgnr', true);
+ }
+ return $results;
+ }
+
}
\ No newline at end of file
Modified:
branches/Version-2_0-branch/phpgwapi/templates/bookingfrontend/footer.tpl
===================================================================
--- branches/Version-2_0-branch/phpgwapi/templates/bookingfrontend/footer.tpl
2017-02-16 09:46:08 UTC (rev 16318)
+++ branches/Version-2_0-branch/phpgwapi/templates/bookingfrontend/footer.tpl
2017-02-16 09:48:32 UTC (rev 16319)
@@ -15,6 +15,69 @@
document.getElementById('toggle').classList.toggle('x');
});
})(this, this.document);
+
+
+//<!--
+function orgbox() {
+ var orgarray = eval('(' + '{organization_json}' + ')');
+ var div = document.createElement('div');
+ document.body.appendChild(div);
+ div.className = 'changeorg';
+ div.id = 'test';
+ div.innerHTML = '<div style="float: right;" id="changeClose"><i
class="fa fa-times-circle"></i></div>';
+ div.innerHTML += '<div id="changeHeader">{change_org_header}</div>';
+ div.innerHTML += '<div id="orglist"></div>';
+ var oList = document.getElementById("orglist");
+ for(var i=0,len=orgarray.length; i < len; i++) {
+ oList.innerHTML += '<div style="padding-bottom: 5px;"><a
href="change.php?orgnumber='+orgarray[i]['orgnumber']+'">'+orgarray[i]['orgname']+'</a></div>';
+ }
+ div.style.backgroundColor= 'white';
+ div.style.border = '1px solid black';
+ div.style.height = 'auto';
+ div.style.padding = '5px 10px 5px 10px';
+ var oHeader = document.getElementById("changeHeader");
+ oHeader.style.paddingBottom="5px";
+ var oClose = document.getElementById("changeClose")
+ oClose.style.cursor='pointer';
+ var oElement = document.getElementById("change");
+ oElement.onclick = function(){
+ div.parentNode.removeChild(div);
+ oElement.setAttribute('onclick', 'orgbox();');
+ }
+ oClose.onclick = function(){
+ div.parentNode.removeChild(div);
+ oElement.setAttribute('onclick', 'orgbox();');
+ }
+}
+function clearCookie() {
+ setCookie('orgbox',0);
+ var oElement = document.getElementById("login");
+ oElement.removeAttribute('onclick');
+}
+function init() {
+ if ('{organization_json}' != 'null' && '{organization_json}' != '') {
+ var oElement = document.getElementById("change");
+ oElement.innerHTML = '<i class="fa fa-users"></i>';
+ oElement.setAttribute('onclick', 'orgbox();');
+ oElement.style.color='black';
+ oElement.style.padding='6px 0px 0px 5px';
+ oElement.style.cursor='pointer';
+ var oElement = document.getElementById("login");
+ oElement.setAttribute('onclick', 'clearCookie();');
+
+ var cookie = getCookie('orgbox');
+ if (cookie != 1) {
+ orgbox();
+ var oList = document.getElementById("orglist");
+ oList.innerHTML += '<div style="padding-top: 10px">PS:
Du kan bruke <i class="fa fa-users"></i> ikonet for å bytte
organisasjon.</div>';
+ setCookie('orgbox',1);
+ }
+ }
+}
+window.onload = init;
+
+
+//-->
</script>
</body>
</html>
Modified:
branches/Version-2_0-branch/phpgwapi/templates/bookingfrontend/head.inc.php
===================================================================
--- branches/Version-2_0-branch/phpgwapi/templates/bookingfrontend/head.inc.php
2017-02-16 09:46:08 UTC (rev 16318)
+++ branches/Version-2_0-branch/phpgwapi/templates/bookingfrontend/head.inc.php
2017-02-16 09:48:32 UTC (rev 16319)
@@ -70,10 +70,10 @@
}
$javascripts = array();
- //FIXME: To consider...
- /*
- $javascripts[] = "/phpgwapi/templates/stavanger/js/minid.js";
-*/
+
+ $javascripts[] = "/phpgwapi/templates/bookingfrontend/js/minid.js";
+
+//FIXME: To consider...
// $javascripts[] =
"/phpgwapi/templates/bookingfrontend/js/headroom.min.js";
// $javascripts[] =
"/phpgwapi/templates/bookingfrontend/js/jQuery.headroom.js";
Copied:
branches/Version-2_0-branch/phpgwapi/templates/bookingfrontend/js/minid.js
(from rev 16318, trunk/phpgwapi/templates/bookingfrontend/js/minid.js)
===================================================================
--- branches/Version-2_0-branch/phpgwapi/templates/bookingfrontend/js/minid.js
(rev 0)
+++ branches/Version-2_0-branch/phpgwapi/templates/bookingfrontend/js/minid.js
2017-02-16 09:48:32 UTC (rev 16319)
@@ -0,0 +1,33 @@
+function getCookie(c_name)
+{
+ var c_value = document.cookie;
+ var c_start = c_value.indexOf(" " + c_name + "=");
+ if (c_start == -1)
+ {
+ c_start = c_value.indexOf(c_name + "=");
+ }
+ if (c_start == -1)
+ {
+ c_value = null;
+ }
+ else
+ {
+ c_start = c_value.indexOf("=", c_start) + 1;
+ var c_end = c_value.indexOf(";", c_start);
+ if (c_end == -1)
+ {
+ c_end = c_value.length;
+ }
+ c_value = decodeURI(c_value.substring(c_start,c_end));
+ }
+ return c_value;
+}
+function setCookie(c_name,value,exdays)
+{
+ var exdate=new Date();
+ exdate.setDate(exdate.getDate() + exdays);
+ var c_value=encodeURI(value) + ((exdays==null) ? "" : ";
expires="+exdate.toUTCString());
+ document.cookie=c_name + "=" + c_value;
+}
+
+
Modified:
branches/Version-2_0-branch/property/inc/import/class.import_entity_categories.inc.php
===================================================================
---
branches/Version-2_0-branch/property/inc/import/class.import_entity_categories.inc.php
2017-02-16 09:46:08 UTC (rev 16318)
+++
branches/Version-2_0-branch/property/inc/import/class.import_entity_categories.inc.php
2017-02-16 09:48:32 UTC (rev 16319)
@@ -215,8 +215,9 @@
while ($this->db->next_record())
{
- $building_part = explode(' ',
trim($this->db->f('name')))[0];
-
+ $name_arr = explode(' ',
trim($this->db->f('name')));
+ $building_part = $name_arr[0];
+
$values[$building_part] = array
(
'id' => $this->db->f('id'),
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [16319] Stable: Merge 16315:16318 from trunk,
sigurdne <=