fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [12064] Merge 12055:12063 from trunk


From: Sigurd Nes
Subject: [Fmsystem-commits] [12064] Merge 12055:12063 from trunk
Date: Thu, 21 Aug 2014 12:47:47 +0000

Revision: 12064
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=12064
Author:   sigurdne
Date:     2014-08-21 12:47:46 +0000 (Thu, 21 Aug 2014)
Log Message:
-----------
Merge 12055:12063 from trunk

Modified Paths:
--------------
    branches/Version-1_0-branch/phpgwapi/inc/class.datetime.inc.php
    branches/Version-1_0-branch/phpgwapi/inc/class.translation.inc.php
    branches/Version-1_0-branch/phpgwapi/templates/pure/css/side-menu-old-ie.css
    branches/Version-1_0-branch/phpgwapi/templates/pure/css/side-menu.css
    branches/Version-1_0-branch/phpgwapi/templates/pure/footer.tpl
    branches/Version-1_0-branch/phpgwapi/templates/pure/head.inc.php
    branches/Version-1_0-branch/phpgwapi/templates/pure/head.tpl
    branches/Version-1_0-branch/phpgwapi/templates/pure/navbar.inc.php
    branches/Version-1_0-branch/phpsysinfo/inc/class.menu.inc.php
    branches/Version-1_0-branch/property/inc/class.bodocument.inc.php
    branches/Version-1_0-branch/property/inc/class.boworkorder.inc.php
    branches/Version-1_0-branch/property/inc/class.menu.inc.php
    branches/Version-1_0-branch/property/inc/class.sodocument.inc.php
    branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php
    branches/Version-1_0-branch/property/inc/class.uicondition_survey.inc.php
    branches/Version-1_0-branch/property/inc/class.uidocument2.inc.php
    branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php
    branches/Version-1_0-branch/property/setup/phpgw_no.lang
    branches/Version-1_0-branch/property/setup/setup.inc.php
    branches/Version-1_0-branch/property/setup/tables_current.inc.php
    branches/Version-1_0-branch/property/setup/tables_update.inc.php
    branches/Version-1_0-branch/property/templates/base/location.xsl
    branches/Version-1_0-branch/property/templates/base/workorder.xsl

Added Paths:
-----------
    branches/Version-1_0-branch/phpgwapi/inc/class.uicommon_jquery.inc.php
    branches/Version-1_0-branch/phpgwapi/js/DataTables/
    branches/Version-1_0-branch/phpgwapi/templates/base/datatable_jquery.xsl
    branches/Version-1_0-branch/phpgwapi/templates/pure/css/baby-blue-old-ie.css
    branches/Version-1_0-branch/phpgwapi/templates/pure/css/baby-blue.css
    branches/Version-1_0-branch/phpgwapi/templates/pure/js/html5shiv.js

Property Changed:
----------------
    branches/Version-1_0-branch/


Property changes on: branches/Version-1_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131,7133-7141,7143,7145-7146,7148-7150,7152-7153,7155-7158,7160-7164,7166-7167,7169-7170,7172,7174,7176,7178,7180-7181,7183,7185,7187-7188,7190,7192-7196,7198-7199,7201-7203,7205,7207,7209-7210,7212,7214,7216-7217,7219-7222,7224-7226,7228-7229,7231,7233-7234,7236-7238,7240-7241,7243-7244,7246,7248,7250,7252-7256,7258-7259,7261-7264,7266-7273,7275-7279,7281-7332,7334-7338,7340-7348,7350,7352-7353,7355-7361,7363-7366,7368-7370,7372,7374,7376,7378,7380-7386,7388-7400,7402,7404-7433,7435-7439,7441-7446,7448-7458,7460-7469,7471-7483,7485-7487,7489-7490,7492,7494,7496-7497,7499,7501-7502,7504,7506-7507,7509-7511,7513-7517,7519-7521,7523,7525,7527-7529,7531,7533,7535-7538,7540-7542,7544-7549,7551-7552,7554-7561,7563,7565,7567-7573,7575-7578,7580-7584,7586-7591,7593-7624,7627-7636,7638-7656,7658-7718,7720-7732,7734,7736,7738-7750,7754-7759,7761-7767,7769-7780,7782,7784-7809,7811-7812,7814-7835,7837-7847,7849-7887,7889-7895,7897,7899,7901,7903-7905,7907-7921,7923-7925,7927-7933,7935,7937-7952,7954-7968,7970-7974,7976,7978-7979,7981-7982,7984-7988,7990-7992,7994-8041,8043-8066,8068-8087,8089,8091-8108,8110-8124,8126-8129,8131,8133-8150,8152-8154,8156-8162,8164-8167,8169-8170,8172-8179,8181,8183-8196,8198-8207,8209-8211,8213-8214,8216-8217,8219-8220,8222,8224-8225,8227-8247,8249,8251,8253-8282,8284-8352,8354-8368,8370-8396,8398-8430,8432,8434-8440,8442-8445,8447-8453,8455-8456,8458,8460,8462-8464,8466-8473,8475-8479,8481,8483-8501,8503-8523,8525,8527-8531,8533,8535-8536,8538-8550,8552-8554,8556-8557,8559-8579,8581-8587,8589,8591-8592,8594-8595,8597-8601,8603-8610,8612-8613,8615,8617,8619-8645,8647-8650,8652-8661,8663-8666,8668-8669,8671-8683,8685-8691,8693-8730,8732-8737,8739,8741-8767,8769,8771-8772,8774,8776-8797,8799-8812,8814-8819,8821,8823-8833,8835-8837,8839,8841,8843-8849,8852-8858,8860-8867,8869-8870,8872,8874-8877,8879,8881,8883-8888,8890,8892-8901,8903-8911,8913-8917,8920-8923,8925-8933,8935-8938,8940-8943,8945,8947-8948,8950,8952-8953,8955-8962,8964,8966,8968-8970,8972-8975,8977-8983,8985-8993,8995-9001,9003,9005,9007,9009,9011-9019,9021-9023,9025,9027-9028,9030-9044,9046-9047,9049-9050,9052-9056,9058-9059,9061,9063-9064,9066-9068,9071-9092,9094-9112,9114-9117,9119,9121-9160,9162-9166,9169-9207,9209-9211,9213-9215,9217,9219,9221-9253,9255,9257,9259-9260,9262,9264-9269,9271-9273,9275,9277-9278,9280,9282-9283,9285-9289,9291-9299,9301-9310,9312-9313,9315-9320,9322-9324,9326-9338,9340-9342,9344,9346-9348,9350-9358,9360-9362,9364-9366,9368-9374,9376-9382,9384,9386,9388-9390,9392-9396,9398-9402,9404-9410,9412,9414,9416-9417,9419-9425,9427,9429-9430,9432,9434-9463,9465-9502,9504-9506,9508-9521,9523-9526,9528,9530-9537,9539,9541-9551,9553,9555-9556,9558-9578,9580-9581,9583,9585,9587,9589,9591-9624,9626-9655,9657-9700,9702-9726,9728-9729,9731-9749,9751,9753-9754,9756-9832,9834-9836,9838-9839,9841-9846,9848-9850,9852-9858,9860-9863,9865,9867,9869-9871,9873-9893,9895,9897-9912,9914-9919,9921-9928,9930-9952,9954,9956,9958-9963,9965-9993,9995-9997,9999-10001,10003-10004,10006-10007,10009-10012,10014-10031,10033-10073,10075-10107,10109-10165,10167-10210,10222-10226,10228-10311,10313-10378,10380,10382,10384-10393,10395-10478,10480-10482,10484-10494,10496-10503,10505,10507,10509-10521,10523,10525-10528,10530-10540,10542-10543,10545-10568,10570-10584,10586-10590,10592-10594,10596,10598-10599,10601-10611,10613,10615,10617-10626,10628-10636,10638,10640-10654,10656-10658,10660,10662-10672,10674,10676-10682,10684,10686,10688-10690,10692-10694,10696-10697,10699-10701,10703,10705-10706,10708-10724,10726-10731,10734,10736-10748,10750-10796,10798-10939,10941,10943,10945,10947-10953,10955,10957-10961,10963,10965-10966,10968-11001,11003-11030,11032-11034,11036,11038,11040,11042-11053,11055-11059,11061-11062,11064-11068,11070-11073,11075-11077,11079-11083,11085,11087-11088,11090-11093,11095-11108,11110-11111,11113,11115-11116,11118-11120,11122,11124-11129,11131-11132,11134,11136,11138,11140-11151,11153-11161,11163-11185,11187-11189,11191-11229,11231,11233,11235-11264,11266-11267,11269-11278,11280-11282,11284-11291,11293-11295,11297,11299-11302,11304,11306,11309,11311,11313-11316,11318-11323,11325-11332,11334,11336-11344,11346,11348-11354,11356,11358-11360,11363-11386,11388-11389,11391-11392,11394,11396-11403,11405-11406,11408,11410,11412,11415,11417,11419-11420,11422,11424-11429,11431-11442,11444-11445,11447-11460,11462-11464,11466-11470,11472-11475,11477-11478,11480-11487,11489-11492,11494,11496,11498,11500-11502,11504-11506,11508,11510-11511,11513,11515,11517-11523,11525-11526,11528-11531,11533,11535-11538,11540-11546,11548-11560,11563-11572,11574,11576,11578,11580-11581,11583,11585,11587,11589-11592,11594-11595,11597,11599,11601,11603,11605-11607,11609-11611,11613,11615-11619,11621-11622,11624-11630,11632,11634-11635,11637,11639-11640,11642,11644-11655,11657-11659,11661-11675,11677-11679,11681-11684,11686,11688,11690-11691,11693-11706,11708-11709,11711-11714,11716-11718,11720-11728,11730,11732,11734-11739,11741-11757,11759-11760,11762-11766,11768,11770-11771,11773,11775,11777,11779-11780,11782,11784,11786,11788,11790,11792-11793,11795,11797,11799,11801,11803-11804,11806-11807,11809,11811-11814,11816-11820,11822,11824-11826,11828,11830,11832,11834,11836-11837,11839,11841,11843,11845-11847,11849-11852,11854-11856,11858-11860,11862-11863,11865,11867,11869-11870,11872,11874,11876-11879,11881-11891,11893,11895,11897-11899,11901,11903,11905-11906,11908-11917,11919,11921,11923-11925,11927-11931,11933-11954,11956-11962,11964-11969,11971-11973,11975-11976,11978,11980,11982,11984,11986-11991,11993,11995,11997-12000,12002,12004-12006,12008,12010-12011,12013,12015,12017-12018,12020-12021,12023,12025,12027-12028,12030,12032-12036,12038,12040-12042,12044-12045,12047,12049-12052,12054
   + 
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131,7133-7141,7143,7145-7146,7148-7150,7152-7153,7155-7158,7160-7164,7166-7167,7169-7170,7172,7174,7176,7178,7180-7181,7183,7185,7187-7188,7190,7192-7196,7198-7199,7201-7203,7205,7207,7209-7210,7212,7214,7216-7217,7219-7222,7224-7226,7228-7229,7231,7233-7234,7236-7238,7240-7241,7243-7244,7246,7248,7250,7252-7256,7258-7259,7261-7264,7266-7273,7275-7279,7281-7332,7334-7338,7340-7348,7350,7352-7353,7355-7361,7363-7366,7368-7370,7372,7374,7376,7378,7380-7386,7388-7400,7402,7404-7433,7435-7439,7441-7446,7448-7458,7460-7469,7471-7483,7485-7487,7489-7490,7492,7494,7496-7497,7499,7501-7502,7504,7506-7507,7509-7511,7513-7517,7519-7521,7523,7525,7527-7529,7531,7533,7535-7538,7540-7542,7544-7549,7551-7552,7554-7561,7563,7565,7567-7573,7575-7578,7580-7584,7586-7591,7593-7624,7627-7636,7638-7656,7658-7718,7720-7732,7734,7736,7738-7750,7754-7759,7761-7767,7769-7780,7782,7784-7809,7811-7812,7814-7835,7837-7847,7849-7887,7889-7895,7897,7899,7901,7903-7905,7907-7921,7923-7925,7927-7933,7935,7937-7952,7954-7968,7970-7974,7976,7978-7979,7981-7982,7984-7988,7990-7992,7994-8041,8043-8066,8068-8087,8089,8091-8108,8110-8124,8126-8129,8131,8133-8150,8152-8154,8156-8162,8164-8167,8169-8170,8172-8179,8181,8183-8196,8198-8207,8209-8211,8213-8214,8216-8217,8219-8220,8222,8224-8225,8227-8247,8249,8251,8253-8282,8284-8352,8354-8368,8370-8396,8398-8430,8432,8434-8440,8442-8445,8447-8453,8455-8456,8458,8460,8462-8464,8466-8473,8475-8479,8481,8483-8501,8503-8523,8525,8527-8531,8533,8535-8536,8538-8550,8552-8554,8556-8557,8559-8579,8581-8587,8589,8591-8592,8594-8595,8597-8601,8603-8610,8612-8613,8615,8617,8619-8645,8647-8650,8652-8661,8663-8666,8668-8669,8671-8683,8685-8691,8693-8730,8732-8737,8739,8741-8767,8769,8771-8772,8774,8776-8797,8799-8812,8814-8819,8821,8823-8833,8835-8837,8839,8841,8843-8849,8852-8858,8860-8867,8869-8870,8872,8874-8877,8879,8881,8883-8888,8890,8892-8901,8903-8911,8913-8917,8920-8923,8925-8933,8935-8938,8940-8943,8945,8947-8948,8950,8952-8953,8955-8962,8964,8966,8968-8970,8972-8975,8977-8983,8985-8993,8995-9001,9003,9005,9007,9009,9011-9019,9021-9023,9025,9027-9028,9030-9044,9046-9047,9049-9050,9052-9056,9058-9059,9061,9063-9064,9066-9068,9071-9092,9094-9112,9114-9117,9119,9121-9160,9162-9166,9169-9207,9209-9211,9213-9215,9217,9219,9221-9253,9255,9257,9259-9260,9262,9264-9269,9271-9273,9275,9277-9278,9280,9282-9283,9285-9289,9291-9299,9301-9310,9312-9313,9315-9320,9322-9324,9326-9338,9340-9342,9344,9346-9348,9350-9358,9360-9362,9364-9366,9368-9374,9376-9382,9384,9386,9388-9390,9392-9396,9398-9402,9404-9410,9412,9414,9416-9417,9419-9425,9427,9429-9430,9432,9434-9463,9465-9502,9504-9506,9508-9521,9523-9526,9528,9530-9537,9539,9541-9551,9553,9555-9556,9558-9578,9580-9581,9583,9585,9587,9589,9591-9624,9626-9655,9657-9700,9702-9726,9728-9729,9731-9749,9751,9753-9754,9756-9832,9834-9836,9838-9839,9841-9846,9848-9850,9852-9858,9860-9863,9865,9867,9869-9871,9873-9893,9895,9897-9912,9914-9919,9921-9928,9930-9952,9954,9956,9958-9963,9965-9993,9995-9997,9999-10001,10003-10004,10006-10007,10009-10012,10014-10031,10033-10073,10075-10107,10109-10165,10167-10210,10222-10226,10228-10311,10313-10378,10380,10382,10384-10393,10395-10478,10480-10482,10484-10494,10496-10503,10505,10507,10509-10521,10523,10525-10528,10530-10540,10542-10543,10545-10568,10570-10584,10586-10590,10592-10594,10596,10598-10599,10601-10611,10613,10615,10617-10626,10628-10636,10638,10640-10654,10656-10658,10660,10662-10672,10674,10676-10682,10684,10686,10688-10690,10692-10694,10696-10697,10699-10701,10703,10705-10706,10708-10724,10726-10731,10734,10736-10748,10750-10796,10798-10939,10941,10943,10945,10947-10953,10955,10957-10961,10963,10965-10966,10968-11001,11003-11030,11032-11034,11036,11038,11040,11042-11053,11055-11059,11061-11062,11064-11068,11070-11073,11075-11077,11079-11083,11085,11087-11088,11090-11093,11095-11108,11110-11111,11113,11115-11116,11118-11120,11122,11124-11129,11131-11132,11134,11136,11138,11140-11151,11153-11161,11163-11185,11187-11189,11191-11229,11231,11233,11235-11264,11266-11267,11269-11278,11280-11282,11284-11291,11293-11295,11297,11299-11302,11304,11306,11309,11311,11313-11316,11318-11323,11325-11332,11334,11336-11344,11346,11348-11354,11356,11358-11360,11363-11386,11388-11389,11391-11392,11394,11396-11403,11405-11406,11408,11410,11412,11415,11417,11419-11420,11422,11424-11429,11431-11442,11444-11445,11447-11460,11462-11464,11466-11470,11472-11475,11477-11478,11480-11487,11489-11492,11494,11496,11498,11500-11502,11504-11506,11508,11510-11511,11513,11515,11517-11523,11525-11526,11528-11531,11533,11535-11538,11540-11546,11548-11560,11563-11572,11574,11576,11578,11580-11581,11583,11585,11587,11589-11592,11594-11595,11597,11599,11601,11603,11605-11607,11609-11611,11613,11615-11619,11621-11622,11624-11630,11632,11634-11635,11637,11639-11640,11642,11644-11655,11657-11659,11661-11675,11677-11679,11681-11684,11686,11688,11690-11691,11693-11706,11708-11709,11711-11714,11716-11718,11720-11728,11730,11732,11734-11739,11741-11757,11759-11760,11762-11766,11768,11770-11771,11773,11775,11777,11779-11780,11782,11784,11786,11788,11790,11792-11793,11795,11797,11799,11801,11803-11804,11806-11807,11809,11811-11814,11816-11820,11822,11824-11826,11828,11830,11832,11834,11836-11837,11839,11841,11843,11845-11847,11849-11852,11854-11856,11858-11860,11862-11863,11865,11867,11869-11870,11872,11874,11876-11879,11881-11891,11893,11895,11897-11899,11901,11903,11905-11906,11908-11917,11919,11921,11923-11925,11927-11931,11933-11954,11956-11962,11964-11969,11971-11973,11975-11976,11978,11980,11982,11984,11986-11991,11993,11995,11997-12000,12002,12004-12006,12008,12010-12011,12013,12015,12017-12018,12020-12021,12023,12025,12027-12028,12030,12032-12036,12038,12040-12042,12044-12045,12047,12049-12052,12054,12056-12063

Modified: branches/Version-1_0-branch/phpgwapi/inc/class.datetime.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/class.datetime.inc.php     
2014-08-21 12:43:27 UTC (rev 12063)
+++ branches/Version-1_0-branch/phpgwapi/inc/class.datetime.inc.php     
2014-08-21 12:47:46 UTC (rev 12064)
@@ -988,4 +988,165 @@
                        }
                        return lang('Unknown');
                }
-       }
+
+               /**
+                * The function returns the no. of business days between two 
dates and it skips the holidays
+                * Example:
+                *      $holidays=array("2014-12-25","2014-12-26","2015-01-01");
+                *      echo getWorkingDays("2014-12-22","2015-01-02",$holidays)
+                *      will return 7
+                * @param string $start_date
+                * @param string $end_date
+                * @param array $holidays
+                * @return int
+                */
+               public static function get_working_days($start_date, $end_date, 
$holidays = array())
+               {
+                       if(!$start_date || !$end_date)
+                       {
+                               return;
+                       }
+
+                       /* do strtotime calculations just once */
+
+                       if (!ctype_digit($start_date))
+                       {
+                               $start_date = 
self::datetime_to_timestamp($start_date);
+                       }
+
+                       if (!ctype_digit($end_date))
+                       {
+                               $end_date = 
self::datetime_to_timestamp($end_date);
+                       }
+
+                       if($start_date > $end_date)
+                       {
+                               return;
+                       }
+
+                       if(!$holidays)
+                       {
+                               $holidays = 
self::get_holidays(date('Y',$end_date));
+                       }
+
+                       /*
+                        * The total number of days between the two dates. We 
compute the no. of seconds and divide it to 60*60*24
+                        * We add one to inlude both dates in the interval.
+                       */
+                       $days = ($end_date - $start_date) / 86400;
+
+                       $no_full_weeks = floor($days / 7);
+                       $no_remaining_days = fmod($days, 7);
+
+                       /* It will return 1 if it's Monday,.. ,7 for Sunday */
+                       $the_first_day_of_week = date("N", $start_date);
+                       $the_last_day_of_week = date("N", $end_date);
+
+                       /**
+                        * The two can be equal in leap years when february has 
29 days, the equal sign is added here
+                        * In the first case the whole interval is within a 
week, in the second case the interval falls in two weeks.
+                        */
+                       if ($the_first_day_of_week <= $the_last_day_of_week)
+                       {
+                               if ($the_first_day_of_week <= 6 && 6 <= 
$the_last_day_of_week)
+                               {
+                                       $no_remaining_days--;
+                               }
+                               if ($the_first_day_of_week <= 7 && 7 <= 
$the_last_day_of_week)
+                               {
+                                       $no_remaining_days--;
+                               }
+                       }
+                       else
+                       {
+                               /**
+                                * edit by Tokes to fix an edge case where the 
start day was a Sunday
+                                * and the end day was NOT a Saturday)
+                                *
+                                * the day of the week for start is later than 
the day of the week for end
+                                */
+                               if ($the_first_day_of_week == 7)
+                               {
+                                       /* if the start date is a Sunday, then 
we definitely subtract 1 day */
+                                       $no_remaining_days--;
+
+                                       if ($the_last_day_of_week == 6)
+                                       {
+                                               /* if the end date is a 
Saturday, then we subtract another day */
+                                               $no_remaining_days--;
+                                       }
+                               }
+                               else
+                               {
+                                       /**
+                                        * The start date was a Saturday (or 
earlier), and the end date was (Mon..Fri)
+                                        * so we skip an entire weekend and 
subtract 2 days
+                                        */
+                                       $no_remaining_days -= 2;
+                               }
+                       }
+
+                       /**
+                        * The no. of business days is: (number of weeks 
between the two dates) * (5 working days) + the remainder
+                        * february in none leap years gave a remainder of 0 
but still calculated weekends between first and last day, this is one way to 
fix it
+                        */
+                       $working_days = $no_full_weeks * 5;
+                       if ($no_remaining_days > 0 )
+                       {
+                         $working_days += $no_remaining_days;
+                       }
+
+                       //We subtract the holidays
+                       foreach($holidays as $holiday)
+                       {
+                               $time_stamp=strtotime($holiday);
+                               /*If the holiday doesn't fall in weekend*/
+                               if ($start_date <= $time_stamp && $time_stamp 
<= $end_date && date("N",$time_stamp) != 6 && date("N",$time_stamp) != 7)
+                               {
+                                       $working_days--;
+                               }
+                       }
+
+                       return $working_days;
+               }
+
+               /**
+                * Compile a list of holydays for a given year
+                * @staticvar array $holidays
+                * @param integer $year
+                * @return array $holidays for given year
+                */
+               public static function get_holidays($year = 0)
+               {
+                       static $holidays = array();
+                       $year = $year ? $year : date('Y');
+
+                       if(isset($holidays[$year]))
+                       {
+                               return $holidays[$year];
+                       }
+
+                       $easter_day = easter_days($year);
+                       $maundy_thursday = $easter_day -3;
+                       
+                       $holidays[$year] = array
+                       (
+                               date('Y-m-d', mktime(0, 0, 0, 12, 25, 
($year-1))),
+                               date('Y-m-d', mktime(0, 0, 0, 12, 26, 
($year-1))),
+                               date('Y-m-d', mktime(0, 0, 0, 1, 1, $year)),
+                               date('Y-m-d', (mktime(0, 0, 0, 3, 21, $year) + 
( $maundy_thursday * 86400 ))),//Maundy Thursday
+                               date('Y-m-d', (mktime(0, 0, 0, 3, 21, $year) + 
(( $maundy_thursday +1 ) * 86400))),//Good Friday
+                               date('Y-m-d', (mktime(0, 0, 0, 3, 21, $year) + 
(( $easter_day +1 ) * 86400))),//Easter Monday
+                               date('Y-m-d', mktime(0, 0, 0, 5, 1, $year)),
+                               date('Y-m-d', mktime(0, 0, 0, 5, 17, 
$year)),//FIXME: Then Norwegian Constitution Day...
+                               date('Y-m-d', (mktime(0, 0, 0, 3, 21, $year) + 
(( $easter_day + 39) * 86400))),//Ascension Day, 39 days after Easter Day
+                               date('Y-m-d', (mktime(0, 0, 0, 3, 21, $year) + 
(( $easter_day + 49) * 86400))),//Whit Sunday, 49 days after Easter Day
+                               date('Y-m-d', (mktime(0, 0, 0, 3, 21, $year) + 
(( $easter_day + 50) * 86400))),//Whit monday, 50 days after Easter Day
+                               date('Y-m-d', mktime(0, 0, 0, 12, 25, ($year))),
+                               date('Y-m-d', mktime(0, 0, 0, 12, 26, ($year))),
+                       );
+
+                       return $holidays[$year];
+
+               }
+       }
\ No newline at end of file

Modified: branches/Version-1_0-branch/phpgwapi/inc/class.translation.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/class.translation.inc.php  
2014-08-21 12:43:27 UTC (rev 12063)
+++ branches/Version-1_0-branch/phpgwapi/inc/class.translation.inc.php  
2014-08-21 12:47:46 UTC (rev 12064)
@@ -225,8 +225,8 @@
 
                        }
 
-                       $ret = "!{$key}";       // save key if we dont find a 
translation
                        $key = $lookup_key;
+                       $ret = '';
 
                        if ( isset($this->lang[$app_name][$key]) )
                        {
@@ -236,8 +236,16 @@
                        {
                                $ret = $this->lang['common'][$key];
                        }
-                       else if ($this->collect_missing)
+
+                       if (!$ret)
                        {
+                               $ret = "!{$key}";       // save key if we dont 
find a translation
+                               //don't look for it again
+                               $this->lang[$app_name][$key] = $ret;
+                       }
+
+                       if ($this->collect_missing)
+                       {
                                $lookup_key = 
$GLOBALS['phpgw']->db->db_addslashes($lookup_key);
                                $sql = "SELECT message_id FROM phpgw_lang WHERE 
lang = '{$userlang}' AND message_id = '{$lookup_key}'"
                                        . " AND app_name = '##{$app_name}##'";

Copied: branches/Version-1_0-branch/phpgwapi/inc/class.uicommon_jquery.inc.php 
(from rev 12063, trunk/phpgwapi/inc/class.uicommon_jquery.inc.php)
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/class.uicommon_jquery.inc.php      
                        (rev 0)
+++ branches/Version-1_0-branch/phpgwapi/inc/class.uicommon_jquery.inc.php      
2014-08-21 12:47:46 UTC (rev 12064)
@@ -0,0 +1,843 @@
+<?php
+       /**
+       * phpGroupWare
+       *
+       * @author Erik Holm-Larsen <address@hidden>
+       * @author Torstein Vadla <address@hidden>
+       * @author Sigurd Nes <address@hidden>
+       * @copyright Copyright (C) 2012 Free Software Foundation, Inc. 
http://www.fsf.org/
+       * This file is part of phpGroupWare.
+       *
+       * phpGroupWare is free software; you can redistribute it and/or modify
+       * it under the terms of the GNU General Public License as published by
+       * the Free Software Foundation; either version 2 of the License, or
+       * (at your option) any later version.
+       *
+       * phpGroupWare is distributed in the hope that it will be useful,
+       * but WITHOUT ANY WARRANTY; without even the implied warranty of
+       * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+       * GNU General Public License for more details.
+       *
+       * You should have received a copy of the GNU General Public License
+       * along with phpGroupWare; if not, write to the Free Software
+       * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 
 USA
+       *
+       * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+       * @internal Development of this application was funded by 
http://www.bergen.kommune.no/
+       * @package phpgwapi
+       * @subpackage utilities
+       * @version $Id: class.uicommon.inc.php 11988 2014-05-23 13:26:30Z 
sigurdne $
+       */
+
+       //phpgw::import_class('phpgwapi.yui');
+
+
+       abstract class phpgwapi_uicommon_jquery
+       {
+               const UI_SESSION_FLASH = 'flash_msgs';
+
+               protected
+                       $filesArray;
+
+               private
+                       $ui_session_key,
+                       $flash_msgs;
+
+               public $dateFormat;
+
+               public $type_of_user;
+
+       //      public $flash_msgs;
+
+               public function __construct($currentapp ='', $yui = '')
+               {
+
+                       $yui = isset($yui) && $yui == 'yui3' ? 'yui3' : 'yahoo';
+                       $currentapp = $currentapp ? $currentapp : 
$GLOBALS['phpgw_info']['flags']['currentapp'];
+
+
+                       $this->tmpl_search_path = array();
+                       array_push($this->tmpl_search_path, PHPGW_SERVER_ROOT . 
'/phpgwapi/templates/base');
+                       array_push($this->tmpl_search_path, PHPGW_SERVER_ROOT . 
'/phpgwapi/templates/' . $GLOBALS['phpgw_info']['server']['template_set']);
+                       array_push($this->tmpl_search_path, PHPGW_SERVER_ROOT . 
'/' . $currentapp . '/templates/base');
+                       array_push($this->tmpl_search_path, PHPGW_SERVER_ROOT . 
'/' . $currentapp . '/templates/' . 
$GLOBALS['phpgw_info']['server']['template_set']);
+
+                       if($yui == 'yui3')
+                       {
+                               self::add_javascript('phpgwapi', 'yui3', 
'yui/yui-min.js');
+                               self::add_javascript('phpgwapi', $yui, 
'common.js');
+                       }
+
+                       $this->url_prefix = str_replace('_', '.', 
get_class($this));
+
+                       $this->dateFormat = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
+
+                       $this->acl = & $GLOBALS['phpgw']->acl;
+                       $this->locations = & $GLOBALS['phpgw']->locations;
+
+                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang($currentapp);
+               }
+
+               private function get_ui_session_key()
+               {
+                       return $this->ui_session_key;
+               }
+
+               private function restore_flash_msgs()
+               {
+                       if (($flash_msgs = 
$this->session_get(self::UI_SESSION_FLASH)))
+                       {
+                               if (is_array($flash_msgs))
+                               {
+                                       $this->flash_msgs = $flash_msgs;
+                                       
$this->session_set(self::UI_SESSION_FLASH, array());
+                                       return true;
+                               }
+                       }
+
+                       $this->flash_msgs = array();
+                       return false;
+               }
+
+               private function store_flash_msgs()
+               {
+                       return $this->session_set(self::UI_SESSION_FLASH, 
$this->flash_msgs);
+               }
+
+               private function reset_flash_msgs()
+               {
+                       $this->flash_msgs = array();
+                       $this->store_flash_msgs();
+               }
+
+               private function session_set($key, $data)
+               {
+                       return 
phpgwapi_cache::session_set($this->get_ui_session_key(), $key, $data);
+               }
+
+               private function session_get($key)
+               {
+                       return 
phpgwapi_cache::session_get($this->get_ui_session_key(), $key);
+               }
+
+               /**
+                * Provides a private session cache setter per ui class.
+                */
+               protected function ui_session_set($key, $data)
+               {
+                       return $this->session_set(get_class($this).'_'.$key, 
$data);
+               }
+
+               /**
+                * Provides a private session cache getter per ui class .
+                */
+               protected function ui_session_get($key)
+               {
+                       return $this->session_get(get_class($this).'_'.$key);
+               }
+
+               protected function generate_secret($length = 10)
+               {
+                       return 
substr(base64_encode(rand(1000000000,9999999999)),0, $length);
+               }
+
+               public function add_js_event($event, $js)
+               {
+                       $GLOBALS['phpgw']->js->add_event($event, $js);
+               }
+
+               public function add_js_load_event($js)
+               {
+                       $this->add_js_event('load', $js);
+               }
+
+               public function link($data)
+               {
+                       return $GLOBALS['phpgw']->link('/index.php', $data);
+               }
+
+               public function redirect($link_data)
+               {
+                       $GLOBALS['phpgw']->redirect_link('/index.php', 
$link_data);
+               }
+
+               public function flash($msg, $type='success')
+               {
+                       $this->flash_msgs[$msg] = $type == 'success';
+               }
+
+               public function flash_form_errors($errors)
+               {
+                       foreach($errors as $field => $msg)
+                       {
+                               $this->flash_msgs[$msg] = false;
+                       }
+               }
+
+               public function add_stylesheet($path)
+               {
+                       $GLOBALS['phpgw']->css->add_external_file($path);
+               }
+
+               public function add_javascript($app, $pkg, $name)
+               {
+                       return $GLOBALS['phpgw']->js->validate_file($pkg, 
str_replace('.js', '', $name), $app);
+               }
+
+               public function set_active_menu($item)
+               {
+                       $GLOBALS['phpgw_info']['flags']['menu_selection'] = 
$item;
+               }
+
+               /**
+               * A more flexible version of xslttemplate.add_file
+               */
+               public function add_template_file($tmpl)
+               {
+                       if(is_array($tmpl))
+                       {
+                               foreach($tmpl as $t)
+                               {
+                                       $this->add_template_file($t);
+                               }
+                               return;
+                       }
+                       foreach(array_reverse($this->tmpl_search_path) as $path)
+                       {
+                               $filename = $path . '/' . $tmpl . '.xsl';
+                               if (file_exists($filename))
+                               {
+                                       
$GLOBALS['phpgw']->xslttpl->xslfiles[$tmpl] = $filename;
+                                       return;
+                               }
+                       }
+                       echo "Template $tmpl not found in search path: ";
+                       print_r($this->tmpl_search_path);
+                       die;
+               }
+
+               public function render_template($output)
+               {
+                       $GLOBALS['phpgw']->common->phpgw_header(true);
+                       if($this->flash_msgs)
+                       {
+                               $msgbox_data = 
$GLOBALS['phpgw']->common->msgbox_data($this->flash_msgs);
+                               $msgbox_data = 
$GLOBALS['phpgw']->common->msgbox($msgbox_data);
+                               foreach($msgbox_data as & $message)
+                               {
+                                       echo "<div 
class='{$message['msgbox_class']}'>";
+                                       echo $message['msgbox_text'];
+                                       echo '</div>';
+                               }
+                       }
+                       echo htmlspecialchars_decode($output);
+                       $GLOBALS['phpgw']->common->phpgw_exit();
+               }
+
+               /**
+                * Creates an array of translated strings.
+                */
+               function lang_array()
+               {
+                       $keys = func_get_args();
+                       foreach($keys as &$key)
+                       {
+                               $key = lang($key);
+                       }
+                       return $keys;
+               }
+
+               public function add_yui_translation(&$data)
+               {
+                       $this->add_template_file('yui_phpgw_i18n');
+                       $previous = lang('prev');
+                       $next = lang('next');
+                       $first = lang('first');
+                       $last = lang('last');
+                       $showing_items = lang('showing items');
+                       $of = lang('of');
+                       $to = lang('to');
+                       $shows_from = lang('shows from');
+                       $of_total = lang('of total');
+
+                       if 
(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs']) && 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] > 0)
+                       {
+                               $rows_per_page = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
+                       }
+                       else
+                       {
+                               $rows_per_page = 10;
+                       }
+
+                       $data['yui_phpgw_i18n'] = array(
+                               'Calendar' => array(
+                                       'WEEKDAYS_SHORT' => 
json_encode($this->lang_array('Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa')),
+                                       'WEEKDAYS_FULL' => 
json_encode($this->lang_array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 
'Thursday', 'Friday', 'Saturday')),
+                                       'MONTHS_LONG' => 
json_encode($this->lang_array('January', 'February', 'March', 'April', 'May', 
'June', 'July', 'August', 'September', 'October', 'November', 'December')),
+                               ),
+                               'DataTable' => array(
+                                       'MSG_EMPTY' => json_encode(lang('No 
records found.')),
+                                       'MSG_LOADING' => 
json_encode(lang("Loading...")),
+                                       'MSG_SORTASC' => 
json_encode(lang('Click to sort ascending')),
+                                       'MSG_SORTDESC' => 
json_encode(lang('Click to sort descending')),
+                               ),
+                               'setupDatePickerHelper' => array(
+                                       'LBL_CHOOSE_DATE' => 
json_encode(lang('Choose a date')),
+                               ),
+                               'setupPaginator' => array(
+                                       'pageReportTemplate' => 
json_encode("{$showing_items} {startRecord} - {endRecord} {$of} 
{totalRecords}"),
+                                       'previousPageLinkLabel' => 
json_encode("&lt; {$previous}"),
+                                       'nextPageLinkLabel' => 
json_encode("{$next} &gt;"),
+                                       'firstPageLinkLabel' => 
json_encode("&lt;&lt; {$first}"),
+                                       'lastPageLinkLabel' => 
json_encode("{$last} &gt;&gt;"),
+                                       'template' => 
json_encode("{CurrentPageReport}<br/>  {FirstPageLink} {PreviousPageLink} 
{PageLinks} {NextPageLink} {LastPageLink}"),
+                                       'pageReportTemplate' => 
json_encode("{$shows_from} {startRecord} {$to} {endRecord} {$of_total} 
{totalRecords}."),
+                                       'rowsPerPage'   => $rows_per_page
+                               ),
+                               'common' => array(
+                                       'LBL_NAME' => json_encode(lang('Name')),
+                                       'LBL_TIME' => json_encode(lang('Time')),
+                                       'LBL_WEEK' => json_encode(lang('Week')),
+                                       'LBL_RESOURCE' => 
json_encode(lang('Resource')),
+                               ),
+                       );
+               }
+               public function add_jquery_translation(&$data)
+               {
+//                     $this->add_template_file('yui_phpgw_i18n');
+                       $previous = lang('prev');
+                       $next = lang('next');
+                       $first = lang('first');
+                       $last = lang('last');
+                       $showing_items = lang('showing items');
+                       $of = lang('of');
+                       $to = lang('to');
+                       $shows_from = lang('shows from');
+                       $of_total = lang('of total');
+
+                       if 
(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs']) && 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] > 0)
+                       {
+                               $rows_per_page = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
+                       }
+                       else
+                       {
+                               $rows_per_page = 10;
+                       }
+                       $lengthmenu = array();
+                       for($i = 1; $i < 4; $i++)
+                       {
+                               $lengthmenu[0][] = $i * $rows_per_page;
+                               $lengthmenu[1][] = $i * $rows_per_page;
+                       }
+
+                       if(isset($data['datatable']['allrows']) && 
$data['datatable']['allrows'])
+                       {
+                               $lengthmenu[0][] = -1;
+                               $lengthmenu[1][] = lang('all');
+                       }
+                       $data['jquery_phpgw_i18n'] = array(
+                               'datatable' => array(
+                                       'emptyTable'    =>      json_encode("No 
data available in table"),
+                                       'info'                  =>      
json_encode("Showing _START_ to _END_ of _TOTAL_ entries"),
+                                       'infoEmpty'             =>      
json_encode("Showing 0 to 0 of 0 entries"),
+                                       'infoFiltered'  =>  
json_encode("(filtered from _MAX_ total entries)"),
+                                       'infoPostFix'   =>      json_encode(""),
+                                       'thousands'             =>      
json_encode(","),
+                                       'lengthMenu'    =>      
json_encode("Show _MENU_ entries"),
+                                       'loadingRecords'=>      
json_encode("Loading..."),
+                                       'processing'    =>      
json_encode("Processing..."),
+                                       'search'                =>      
json_encode(lang('search')),
+                                       'zeroRecords'   =>      json_encode("No 
matching records found"),
+                                       'paginate'              =>      
json_encode(array(
+                                                               'first'         
=>      $first,
+                                                               'last'          
=>      $last,
+                                                               'next'          
=>      $next,
+                                                               'previous'      
=>      $previous
+
+                                       )),
+                                       'aria'  => json_encode(array(
+                                                               
'sortAscending'=>  ": activate to sort column ascending",
+                                                               
'sortDescending'=> ": activate to sort column descending"
+                                       )),
+                               ),
+                               'lengthmenu' => array('_' => 
json_encode($lengthmenu))
+                       );
+//                     _debug_array($data['jquery_phpgw_i18n']);die();
+
+               }
+
+               public function add_template_helpers()
+               {
+                       $this->add_template_file('helpers');
+               }
+
+               public function render_template_xsl($files, $data)
+               {
+                       $GLOBALS['phpgw_info']['flags']['xslt_app'] = true;
+
+                       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);
+                       $this->add_jquery_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);
+                       $this->add_template_file($files);
+                       
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('data' => $data));
+               }
+
+               // Add link key to a result array
+               public function _add_links(&$value, $key, $menuaction)
+               {
+                       $unset = 0;
+                       // FIXME: Fugly workaround
+                       // I cannot figure out why this variable isn't set, but 
it is needed
+                       // by the ->link() method, otherwise we wind up in the 
phpgroupware
+                       // errorhandler which does lot of weird things and 
breaks the output
+                       if 
(!isset($GLOBALS['phpgw_info']['server']['webserver_url'])) {
+                               
$GLOBALS['phpgw_info']['server']['webserver_url'] = "/";
+                               $unset = 1;
+                       }
+
+                       $value['link'] = self::link(array('menuaction' => 
$menuaction, 'id' => $value['id']));
+
+                       // FIXME: Fugly workaround
+                       // I kid you not my friend. There is something very 
wonky going on
+                       // in phpgroupware which I cannot figure out.
+                       // If this variable isn't unset() (if it wasn't set 
before that is)
+                       // then it will contain extra slashes and break URLs
+                       if ($unset) {
+                               
unset($GLOBALS['phpgw_info']['server']['webserver_url']);
+                       }
+               }
+
+               // Build a YUI result style array
+               public function yui_results($results)
+               {
+                       if (!$results)
+                       {
+                               $results['total_records'] = 0;
+                               $result['results'] = array();
+                       }
+
+                       $num_rows = 
isset($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs']) && 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] ? (int) 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] : 15;
+
+                       return array(
+                               'ResultSet' => array(
+                                       'totalResultsAvailable' => 
$results['total_records'],
+                                       'totalRecords'          => 
$results['total_records'],// temeporary
+                                       'recordsReturned'       => 
count($results['results']),
+                                       'pageSize'                      => 
$num_rows,
+                                       'startIndex'            => 
$results['start'],
+                                       'sortKey'                       => 
$results['sort'],
+                                       'sortDir'                       => 
$results['dir'],
+                                       'Result'                        => 
$results['results'],
+                                       'actions'                       => 
$results['actions']
+                               )
+                       );
+               }
+
+               // Build a jquery result style array
+               public function jquery_results($results)
+               {
+                       if (!$results)
+                       {
+                               $results['total_records'] = 0;
+                               $results['recordsFiltered'] = 0;
+                               $result['data'] = array();
+                       }
+       //              _debug_array($result);
+                       return array(
+                               'recordsTotal'          => 
$results['total_records'],
+                               'recordsFiltered'       => 
$results['total_records'],
+                               'draw'                          => 
$results['draw'],
+                               'data'                          => 
$results['results']
+                       );
+               }
+
+               public function use_yui_editor($targets)
+               {
+                       /*
+                       
self::add_stylesheet('phpgwapi/js/yahoo/assets/skins/sam/skin.css');
+                       self::add_javascript('yahoo', 'yahoo/editor', 
'simpleeditor-min.js');
+                       */
+                       if(!is_array($targets))
+                       {
+                               $targets = array($targets);
+                       }
+
+                       $lang_font_style = lang('Font Style');
+                       $lang_lists = lang('Lists');
+                       $lang_insert_item = lang('Insert Item');
+                       $js = '';
+                       foreach ( $targets as $target )
+                       {
+                               $js .= <<<SCRIPT
+                       (function() {
+                               var Dom = YAHOO.util.Dom,
+                               Event = YAHOO.util.Event;
+
+                               var editorConfig = {
+                                       toolbar:
+                                               {buttons: [
+                                                       { group: 'textstyle', 
label: '{$lang_font_style}',
+                                                               buttons: [
+                                                                       { type: 
'push', label: 'Fet CTRL + SHIFT + B', value: 'bold' }
+                                                               ]
+                                                       },
+                                                       { type: 'separator' },
+                                                       { group: 'indentlist', 
label: '{$lang_lists}',
+                                                               buttons: [
+                                                                       { type: 
'push', label: 'Opprett punktliste', value: 'insertunorderedlist' },
+                                                                       { type: 
'push', label: 'Opprett nummerert liste', value: 'insertorderedlist' }
+                                                               ]
+                                                       },
+                                                       { type: 'separator' },
+                                                       { group: 'insertitem', 
label: '{$lang_insert_item}',
+                                                               buttons: [
+                                                                       { type: 
'push', label: 'HTML Lenke CTRL + SHIFT + L', value: 'createlink', disabled: 
true },
+                                                                       { type: 
'push', label: 'Sett inn bilde', value: 'insertimage' }
+                                                               ]
+                                                       },
+                                                       { type: 'separator' },
+                                                       { group: 'undoredo', 
label: 'Angre/Gjenopprett',
+                                                               buttons: [
+                                                                       { type: 
'push', label: 'Angre', value: 'undo' },
+                                                                       { type: 
'push', label: 'Gjenopprett', value: 'redo' }
+                                                               ]
+                                                       }
+                                               ]
+                                       },
+                                       height: '200px',
+                                       width: '700px',
+                                       animate: true,
+                                       dompath: true,
+                                       handleSubmit: true
+                               };
+
+                               var editorWidget = new 
YAHOO.widget.Editor('{$target}', editorConfig);
+                               editorWidget.render();
+                       })();
+
+SCRIPT;
+                       }
+
+                       
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/editor/assets/skins/sam/editor.css');
+                       phpgw::import_class('phpgwapi.yui');
+                       phpgwapi_yui::load_widget('editor');
+                       $GLOBALS['phpgw']->js->add_event('load', $js);
+               }
+
+               public function render($template,$local_variables = array())
+               {
+                       foreach($local_variables as $name => $value)
+                       {
+                               $$name = $value;
+
+                       }
+
+                       ob_start();
+                       foreach(array_reverse($this->tmpl_search_path) as $path)
+                       {
+                               $filename = $path . '/' . $template;
+                               if (file_exists($filename))
+                               {
+                                       include($filename);
+                                       break;
+                               }
+                       }
+                       $output = ob_get_contents();
+                       ob_end_clean();
+                       self::render_template($output);
+               }
+
+               /**
+                * Method for JSON queries.
+                *
+                * @return YUI result
+                */
+               public abstract function query();
+
+               /**
+                * Generate javascript for the extra column definitions for a 
partial list
+                *
+                * @param $array_name the name of the javascript variable that 
contains the column definitions
+                * @param $extra_cols the list of extra columns to set
+                * @return string javascript
+                */
+               public static function get_extra_column_defs($array_name, 
$extra_cols = array())
+               {
+                       $result = "";
+
+                       foreach($extra_cols as $col){
+                               $literal  = '{';
+                               $literal .= 'key: "' . $col['key'] . '",';
+                               $literal .= 'label: "' . $col['label'] . '"';
+                               if (isset($col['formatter'])) {
+                                       $literal .= ',formatter: ' . 
$col['formatter'];
+                               }
+                               if (isset($col['parser'])) {
+                                       $literal .= ',parser: ' . 
$col['parser'];
+                               }
+                               $literal .= '}';
+
+                               if($col["index"]){
+                                       $result .= 
"{$array_name}.splice(".$col["index"].", 0,".$literal.");";
+                               } else {
+                                       $result .= 
"{$array_name}.push($literal);";
+                               }
+                       }
+
+                       return $result;
+               }
+
+               /**
+                * Generate javascript definitions for any editor widgets set 
on columns for
+                * a partial list.
+                *
+                * @param $array_name the name of the javascript variable that 
contains the column definitions
+                * @param $editors the list of editors, keyed by column key
+                * @return string javascript
+                */
+               public static function get_column_editors($array_name, $editors 
= array())
+               {
+                       $result  = "for (var i in {$array_name}) {\n";
+                       $result .= "    switch ({$array_name}[i].key) {\n";
+                       foreach ($editors as $field => $editor) {
+                               $result .= "            case '{$field}':\n";
+                               $result .= "                    
{$array_name}[i].editor = {$editor};\n";
+                               $result .= "                    break;\n";
+                       }
+                       $result .= " }\n";
+                       $result .= "}";
+
+                       return $result;
+               }
+
+               /**
+                * Returns a html-formatted error message if one is defined in 
the
+                * list of validation errors on the object we're given.  If no
+                * error is defined, an empty string is returned.
+                *
+                * @param $object the object to display errors for
+                * @param $field the name of the attribute to display errors for
+                * @return string a html formatted error message
+                */
+               public static function get_field_error($object, $field)
+               {
+                       if(isset($object))
+                       {
+                               $errors = $object->get_validation_errors();
+
+                               if ($errors[$field]) {
+                                       return '<label class="error" for="' . 
$field . '">' . $errors[$field] . '</label>';
+                               }
+                               return '';
+                       }
+               }
+
+               public static function get_messages($messages, $message_type)
+               {
+                       $output = '';
+                       if(is_array($messages) && count($messages) > 0) // 
Array of messages
+                       {
+                               $output = "<div class=\"{$message_type}\">";
+                               foreach($messages as $message)
+                               {
+                                       $output .= "<p 
class=\"message\">{$message}</p>";
+                               }
+                               $output .= "</div>";
+                       }
+                       else if($messages) {
+                               $output = "<div class=\"{$message_type}\"><p 
class=\"message\">{$messages}</p></div>";
+                       }
+                       return $output;
+               }
+               /**
+                * Returns a html-formatted error message to display on top of 
the page.  If
+                * no error is defined, an empty string is returned.
+                *
+                * @param $error the error to display
+                * @return string a html formatted error message
+                */
+               public static function get_page_error($errors)
+               {
+                       return self::get_messages($errors, 'error');
+               }
+
+               /**
+                * Returns a html-formatted error message to display on top of 
the page.  If
+                * no error is defined, an empty string is returned.
+                *
+                * @param $error the error to display
+                * @return string a html formatted error message
+                */
+               public static function get_page_warning($warnings)
+               {
+                       return self::get_messages($warnings, 'warning');
+               }
+
+               /**
+                * Returns a html-formatted info message to display on top of 
the page.  If
+                * no message is defined, an empty string is returned.
+                *
+                * @param $message the message to display
+                * @return string a html formatted info message
+                */
+               public static function get_page_message($messages)
+               {
+                       return self::get_messages($messages, 'info');
+               }
+
+               /**
+                * Download xls, csv or similar file representation of a data 
table
+                */
+               public function download()
+               {
+                       $list = $this->query();
+                       $list = $list['ResultSet']['Result'];
+
+                       $keys = array();
+
+                       if(count($list[0]) > 0) {
+                               foreach($list[0] as $key => $value) {
+                                       if(!is_array($value)) {
+                                               array_push($keys, $key);
+                                       }
+                               }
+                       }
+
+                       // Remove newlines from output
+                       $count = count($list);
+                       for($i = 0; $i < $count; $i++)
+                       {
+                               foreach ($list[$i] as $key => &$data)
+                               {
+                                       $data = str_replace(array("\n","\r\n", 
"<br>"),'',$data);
+                               }
+                       }
+
+                        // Use keys as headings
+                       $headings = array();
+                       $count_keys = count($keys);
+                       for($j=0;$j<$count_keys;$j++)
+                       {
+                               array_push($headings, lang($keys[$j]));
+                       }
+
+                       $property_common = CreateObject('property.bocommon');
+                       $property_common->download($list, $keys, $headings);
+               }
+
+               /**
+                * Returns a human-readable string from a lower case and 
underscored word by replacing underscores
+                * with a space, and by upper-casing the initial characters.
+                *
+                * @param  string $lower_case_and_underscored_word String to 
make more readable.
+                *
+                * @return string Human-readable string.
+                */
+               public static function 
humanize($lower_case_and_underscored_word)
+               {
+                       if (substr($lower_case_and_underscored_word, -3) === 
'_id')
+                       {
+                               $lower_case_and_underscored_word = 
substr($lower_case_and_underscored_word, 0, -3);
+                       }
+
+                       return ucfirst(str_replace('_', ' ', 
$lower_case_and_underscored_word));
+               }
+
+         /**
+          * Retrieves an array of files from $_FILES
+          *
+          * @param  string $key        A key
+          * @return array              An associative array of files
+          */
+               public function get_files($key = null)
+               {
+                       if (!$this->filesArray)
+                       {
+                               $this->filesArray = 
self::convert_file_information($_FILES);
+                       }
+
+                       return is_null($key) ? $this->filesArray : 
(isset($this->filesArray[$key]) ? $this->filesArray[$key] : array());
+               }
+
+               public function toggle_show_showall()
+               {
+                       if(isset($_SESSION['showall']) && 
!empty($_SESSION['showall']))
+                       {
+                               $this->bo->unset_show_all_objects();
+                       }
+                       else
+                       {
+                               $this->bo->show_all_objects();
+                       }
+                       $this->redirect(array('menuaction' => 
$this->url_prefix.'.index'));
+               }
+
+/*
+               public function use_yui_editor()
+               {
+                       
self::add_stylesheet('phpgwapi/js/yahoo/assets/skins/sam/skin.css');
+                       self::add_javascript('yahoo', 'yahoo/editor', 
'simpleeditor-min.js');
+               }
+
+*/             static protected function fix_php_files_array($data)
+               {
+                       $fileKeys = array('error', 'name', 'size', 'tmp_name', 
'type');
+                       $keys = array_keys($data);
+                       sort($keys);
+
+                       if ($fileKeys != $keys || !isset($data['name']) || 
!is_array($data['name']))
+                       {
+                               return $data;
+                       }
+
+                       $files = $data;
+                       foreach ($fileKeys as $k)
+                       {
+                               unset($files[$k]);
+                       }
+                       foreach (array_keys($data['name']) as $key)
+                       {
+                               $files[$key] = self::fix_php_files_array(array(
+                                       'error' => $data['error'][$key],
+                                       'name'   => $data['name'][$key],
+                                       'type'   => $data['type'][$key],
+                                       'tmp_name' => $data['tmp_name'][$key],
+                                       'size'   => $data['size'][$key],
+                               ));
+                       }
+
+                       return $files;
+               }
+
+               /**
+               * It's safe to pass an already converted array, in which case 
this method just returns the original array unmodified.
+               *
+               * @param  array $taintedFiles An array representing uploaded 
file information
+               *
+               * @return array An array of re-ordered uploaded file information
+               */
+               static public function convert_file_information(array 
$taintedFiles)
+               {
+                       $files = array();
+                       foreach ($taintedFiles as $key => $data)
+                       {
+                               $files[$key] = self::fix_php_files_array($data);
+                       }
+
+                       return $files;
+               }
+       }

Copied: 
branches/Version-1_0-branch/phpgwapi/templates/base/datatable_jquery.xsl (from 
rev 12063, trunk/phpgwapi/templates/base/datatable_jquery.xsl)
===================================================================
--- branches/Version-1_0-branch/phpgwapi/templates/base/datatable_jquery.xsl    
                        (rev 0)
+++ branches/Version-1_0-branch/phpgwapi/templates/base/datatable_jquery.xsl    
2014-08-21 12:47:46 UTC (rev 12064)
@@ -0,0 +1,674 @@
+<func:function name="phpgw:conditional">
+       <xsl:param name="test"/>
+       <xsl:param name="true"/>
+       <xsl:param name="false"/>
+
+       <func:result>
+               <xsl:choose>
+                       <xsl:when test="$test">
+                       <xsl:value-of select="$true"/>
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:value-of select="$false"/>
+                       </xsl:otherwise>
+               </xsl:choose>
+       </func:result>
+</func:function>
+
+<xsl:template match="data">
+
+<div id="main_content">
+       <xsl:choose>
+               <xsl:when test="datatable_name">
+                       <h3>
+                               <xsl:value-of select="datatable_name"/>
+                       </h3>
+               </xsl:when>
+       </xsl:choose>
+         <xsl:call-template name="datatable" />
+</div>
+</xsl:template>
+
+
+<xsl:template name="datatable" xmlns:php="http://php.net/xsl";>
+       <xsl:call-template name="jquery_phpgw_i18n"/>
+       <xsl:apply-templates select="form" />
+       <div id="list_flash">
+               <xsl:call-template name="msgbox"/>
+       </div>
+       <div id="message" class='message'/>
+       <xsl:apply-templates select="datatable"/> 
+       <xsl:apply-templates select="form/list_actions"/>
+</xsl:template>
+
+       <xsl:template name="jquery_phpgw_i18n" xmlns:php="http://php.net/xsl";>
+               <xsl:if test="jquery_phpgw_i18n">
+                       <script type="text/javascript">
+                               //Namespacing
+                               ;var JqueryPortico = {};
+
+                               JqueryPortico.i18n = {
+                               <xsl:for-each select="jquery_phpgw_i18n/*">
+                                       <xsl:value-of select="local-name()"/>: 
function(cfg)
+                                       {
+                                               cfg = cfg || {};
+                                               <xsl:for-each select="./*">
+                                                       <xsl:choose>
+                                                               <xsl:when 
test="local-name() != '_'">
+                                                                       
cfg["<xsl:value-of select="local-name()"/>"] = <xsl:value-of 
disable-output-escaping="yes" select="."/>;
+                                                               </xsl:when>
+                                                               <xsl:otherwise>
+                                                                       cfg = 
<xsl:value-of disable-output-escaping="yes" select="."/>;
+                                                               </xsl:otherwise>
+                                                       </xsl:choose>
+                                               </xsl:for-each>
+                                               return cfg;
+                                       }<xsl:value-of 
select="phpgw:conditional(not(position() = last()), ',', '')"/>
+                               </xsl:for-each>
+                               };
+                       </script>
+               </xsl:if>
+
+       </xsl:template>
+
+<xsl:template match="toolbar">
+       <style id='toggle-box-css' type='text/css'>
+.toggle-box {
+  display: none;
+}
+
+.toggle-box + label {
+  cursor: pointer;
+  display: block;
+  font-weight: bold;
+  line-height: 21px;
+  margin-bottom: 5px;
+}
+
+.toggle-box + label + div {
+  display: none;
+  margin-bottom: 10px;
+}
+
+.toggle-box:checked + label + div {
+  display: block;
+}
+
+.toggle-box + label:before {
+  background-color: #4F5150;
+  -webkit-border-radius: 10px;
+  -moz-border-radius: 10px;
+  border-radius: 10px;
+  color: #FFFFFF;
+  content: "+";
+  display: block;
+  float: left;
+  font-weight: bold;
+  height: 20px;
+  line-height: 20px;
+  margin-right: 5px;
+  text-align: center;
+  width: 20px;
+}
+
+.toggle-box:checked + label:before {
+  content: "\2212";
+} 
+       
+       </style>
+
+       <input class="toggle-box" id="header1" type="checkbox" />
+       <label for="header1">
+toolbar
+               <!--xsl:value-of select="php:function('lang', 'toolbar')"/-->
+       </label>
+
+       <div id="toolbar">
+                 <table >
+                       <tr>
+               <xsl:for-each select="item">
+                       <xsl:variable name="filter_key" 
select="concat('filter_', name)"/>
+                       <xsl:variable name="filter_key_name" 
select="concat(concat('filter_', name), '_name')"/>
+                       <xsl:variable name="filter_key_id" 
select="concat(concat('filter_', name), '_id')"/>
+               
+                       <xsl:choose>
+                               <xsl:when test="type = 'date-picker'">
+                                       <td valign="top">
+                                       <div class="date-picker">
+                                       <input id="filter_{name}" 
name="filter_{name}" type="text">
+                                                       <xsl:attribute 
name="value"><xsl:value-of select="../../../filters/*[local-name() = 
$filter_key]"/></xsl:attribute>
+                                               </input>
+                               </div>
+                                       </td>
+                               </xsl:when>
+                               <xsl:when test="type = 'autocomplete'">
+                                       <td class="auto">
+                                               <div class="auto">
+                                                       <input 
id="filter_{name}_name" name="filter_{name}_name" type="text">
+                                                               <xsl:attribute 
name="value"><xsl:value-of select="../../../filters/*[local-name() = 
$filter_key_name]"/></xsl:attribute>
+                                                       </input>
+                                                       <input 
id="filter_{name}_id" name="filter_{name}_id" type="hidden">
+                                                               <xsl:attribute 
name="value"><xsl:value-of select="../../../filters/*[local-name() = 
$filter_key_id]"/></xsl:attribute>
+                                                       </input>
+                                                       <div 
id="filter_{name}_container"/>
+                                               </div>
+                                               <script type="text/javascript"> 
+                                               
YAHOO.util.Event.onDOMReady(function() {
+                                                  var app = "<xsl:value-of 
select="app"/>";
+                                                  var name = "<xsl:value-of 
select="name"/>";
+                                                       var ui = "<xsl:value-of 
select="ui"/>";
+
+                                                       var itemSelectCallback 
= false;
+                                                       <xsl:if 
test="onItemSelect">
+                                                               
itemSelectCallback = <xsl:value-of select="onItemSelect"/>;
+                                                       </xsl:if>
+
+                                                       var 
onClearSelectionCallback = false;
+                                                       <xsl:if 
test="onClearSelection">
+                                                               
onClearSelectionCallback = <xsl:value-of select="onClearSelection"/>;
+                                                       </xsl:if>
+
+                                                       var requestGenerator = 
false;
+                                                       <xsl:if 
test="requestGenerator">
+                                                               
requestGenerator = <xsl:value-of select="requestGenerator"/>;
+                                                       </xsl:if>
+
+                                                       <![CDATA[
+//                                                     var oAC = 
YAHOO.portico.autocompleteHelper('index.php?menuaction=booking.ui'+ui+'.index&phpgw_return_as=json&',
 
+//                                                                             
                                         'filter_'+name+'_name', 
'filter_'+name+'_id', 'filter_'+name+'_container');
+
+                                                       var oArgs = 
{menuaction: app + '.ui'+ui+'.index'};
+                                                       var requestUrl = 
phpGWLink('index.php', oArgs, true);
+                                                       requestUrl += 
'filter_'+name+'_name', 'filter_'+name+'_id', 'filter_'+name+'_container';
+                                               //      alert('FIXME: 
autocompleteHelper::requestUrl ' + requestUrl );
+
+
+                                                       if (requestGenerator) {
+                                                               
oAC.generateRequest = requestGenerator;
+                                                       }
+
+                                                       if (itemSelectCallback) 
{
+                                                               
oAC.itemSelectEvent.subscribe(itemSelectCallback);
+                                                       }
+
+                                                       
YAHOO.util.Event.addBlurListener('filter_'+name+'_name', function()
+                                                       {
+                                                               if 
(YAHOO.util.Dom.get('filter_'+name+'_name').value == "")
+                                                               {
+                                                                       
YAHOO.util.Dom.get('filter_'+name+'_id').value = "";
+                                                                       if 
(onClearSelectionCallback) {
+                                                                               
onClearSelectionCallback();
+                                                                       }
+                                                               }
+                                                       });
+
+                                                       
YAHOO.portico.addPreSerializeQueryFormListener(function(form)
+                                                       {
+                                                               if 
(YAHOO.util.Dom.get('filter_'+name+'_name').value == "")
+                                                               {
+                                                                       
YAHOO.util.Dom.get('filter_'+name+'_id').value = "";
+                                                               } 
+                                                       });
+                                                       ]]>
+                                               });
+                                               </script>
+                                       </td>
+                               </xsl:when>
+                               <xsl:when test="type = 'filter'">
+                                       <td valign="top">
+                                       <xsl:variable name="name"><xsl:value-of 
select="name"/></xsl:variable>
+
+                                       <select id="{$name}" name="{$name}">
+                                               <xsl:for-each select="list">
+                                                       <xsl:variable 
name="id"><xsl:value-of select="id"/></xsl:variable>
+                                                       <xsl:if test="id = 
'NEW'">
+                                                               <option 
value="{$id}" selected="selected">
+                                                                       
<xsl:value-of select="name"/>
+                                                               </option>
+                                                       </xsl:if>
+                                                       <xsl:if test="id != 
'NEW'">
+                                                               <option 
value="{$id}">
+                                                                       
<xsl:value-of select="name"/>
+                                                               </option>
+                                                       </xsl:if>
+                                               </xsl:for-each>
+                                       </select>
+                                       </td>
+                               </xsl:when>
+                               <xsl:when test="type = 'link'">
+                                       <td valign="top">
+                                       <a href="{href}"><xsl:value-of 
select="value"/></a>
+
+
+                                       </td>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <td valign="top">
+                                       <input id="innertoolbar">
+                                               <xsl:attribute 
name="type"><xsl:value-of select="phpgw:conditional(not(type), '', 
type)"/></xsl:attribute>
+                                               <xsl:attribute 
name="name"><xsl:value-of select="phpgw:conditional(not(name), '', 
name)"/></xsl:attribute>
+                                               <xsl:attribute 
name="onclick"><xsl:value-of select="phpgw:conditional(not(onClick), '', 
onClick)"/></xsl:attribute>
+                                               <xsl:attribute 
name="value"><xsl:value-of select="phpgw:conditional(not(value), '', 
value)"/></xsl:attribute>
+                                               <xsl:attribute 
name="href"><xsl:value-of select="phpgw:conditional(not(href), '', 
href)"/></xsl:attribute>
+                                               <xsl:attribute 
name="class"><xsl:value-of select="phpgw:conditional(not(class), '', 
class)"/></xsl:attribute>
+                                       </input>
+                                       </td>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:for-each>
+                 </tr>
+                       <xsl:if test="item/text and normalize-space(item/text)">
+                               <thead>
+                                       <tr>
+                                               <xsl:for-each select="item">
+                                                       <td>
+                                                               <xsl:if 
test="name">
+                                                                       <label>
+                                                                               
<xsl:attribute name="for"><xsl:value-of select="phpgw:conditional(not(name), 
'', name)"/></xsl:attribute>
+                                                                               
<xsl:value-of select="phpgw:conditional(not(text), '', text)"/>
+                                                                       </label>
+                                                               </xsl:if>
+                                                       </td>
+                                               </xsl:for-each>
+                                       </tr>
+                               </thead>
+                       </xsl:if>
+               </table>
+       </div>
+</xsl:template>
+
+<xsl:template match="form/list_actions">
+       <form id="list_actions_form" method="POST">
+               <!-- Form action is set by javascript listener -->
+               <div id="list_actions" class='yui-skin-sam'>
+                       <table cellpadding="0" cellspacing="0">
+                               <tr>
+                                       <xsl:for-each select="item">
+                                               <td valign="top">
+                                                       <input 
id="innertoolbar">
+                                                               <xsl:attribute 
name="type"><xsl:value-of select="phpgw:conditional(not(type), '', 
type)"/></xsl:attribute>
+                                                               <xsl:attribute 
name="name"><xsl:value-of select="phpgw:conditional(not(name), '', 
name)"/></xsl:attribute>
+                                                               <xsl:attribute 
name="onclick"><xsl:value-of select="phpgw:conditional(not(onClick), '', 
onClick)"/></xsl:attribute>
+                                                               <xsl:attribute 
name="value"><xsl:value-of select="phpgw:conditional(not(value), '', 
value)"/></xsl:attribute>
+                                                               <xsl:attribute 
name="href"><xsl:value-of select="phpgw:conditional(not(href), '', 
href)"/></xsl:attribute>
+                                                       </input>
+                                               </td>
+                                       </xsl:for-each>
+                               </tr>
+                       </table>
+               </div>
+       </form>
+</xsl:template>
+<xsl:template match="form">
+       <form id="queryForm">
+               <xsl:attribute name="method">
+                       <xsl:value-of select="phpgw:conditional(not(method), 
'GET', method)"/>
+               </xsl:attribute>
+
+               <xsl:attribute name="action">
+                       <xsl:value-of select="phpgw:conditional(not(action), 
'', action)"/>
+               </xsl:attribute>
+               <xsl:apply-templates select="toolbar"/>
+       </form>
+
+       <form id="update_table_dummy" method='POST' action='' >
+       </form>
+
+</xsl:template>
+
+<xsl:template match="datatable">
+       <xsl:call-template name="datasource-definition" />
+
+</xsl:template>
+
+<xsl:template name="datasource-definition">
+       <table id="datatable-container" class="display cell-border compact 
responsive no-wrap" width="100%">
+               <thead>
+                       <tr>
+                               <xsl:for-each select="//datatable/field">
+                                       <th>
+                                               <xsl:value-of select="label"/>
+                                       </th>
+                               </xsl:for-each>
+                       </tr>
+               </thead>
+       </table>
+       <script>
+               JqueryPortico.columns = [
+                       <xsl:for-each select="//datatable/field">
+                               {
+                                       data:                   "<xsl:value-of 
select="key"/>",
+                                       class:                  "<xsl:value-of 
select="className"/>",
+                                       orderable:              <xsl:value-of 
select="phpgw:conditional(not(sortable = 0), 'true', 'false')"/>,
+                                       <xsl:if test="hidden">
+                                       class:                  'none', //FIXME 
- virker ikke...'responsive' plukker den fram igjen
+                                       visible                 :false,
+                                       </xsl:if>
+                                       <xsl:if test="formatter">
+                                        render: function (dummy1, dummy2, 
oData {
+                                                       try {
+                                                               var ret = 
<xsl:value-of select="formatter"/>(oData);
+                                                       }
+                                                       catch(err) {
+                                                               return 
err.message;
+                                                       }
+                                                       return ret;
+                         },
+
+                                       </xsl:if>
+                                       defaultContent: "<xsl:value-of 
select="defaultContent"/>"
+                               }<xsl:value-of 
select="phpgw:conditional(not(position() = last()), ',', '')"/>
+                       </xsl:for-each>
+               ];
+       </script>
+
+       <script type="text/javascript" class="init">
+
+               $(document).ready(function() {
+
+                       var ajax_url = '<xsl:value-of select="source"/>';
+                       var download_url = '<xsl:value-of select="download"/>';
+                       var exclude_colvis = [];
+<![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 = null;
+                                       oParams.columns = null;
+                                       oParams.start = null;
+                                       oParams.draw = null;
+                                       var iframe = 
document.createElement('iframe');
+                                       iframe.style.height = "0px";
+                                       iframe.style.width = "0px";
+                                       iframe.src = 
oConfig.sUrl+"?"+$.param(oParams) + "&allrows=1";
+                                       document.body.appendChild( iframe );
+                               },
+                               "fnSelect": null,
+                               "fnComplete": null,
+                               "fnInit": null
+                       };
+       ]]>
+               <xsl:choose>
+                               <xsl:when test="//datatable/actions">
+                                               JqueryPortico.TableTools =      
{
+                                                               "sSwfPath": 
"phpgwapi/js/DataTables/extensions/TableTools/swf/copy_csv_xls_pdf.swf",
+                                                               "sRowSelect": 
"multi",
+                                                               "aButtons":
+                                                                       [
+                                                                               
        {
+                                                                           
"sExtends":    "collection",
+                                                                               
                "sButtonText": "Operation",
+                                                                               
                "aButtons": [
+                                                                               
                        'copy',
+                                                                               
                        "select_all",
+                                                                               
                        "select_none"
+                                                                               
                <xsl:choose>
+                                                                               
                                <xsl:when test="download">
+                                                                               
                        ,{
+                                                                               
                                "sExtends": "download",
+                                                                               
                                "sButtonText": "Download",
+                                                                               
                                "sUrl": '<xsl:value-of select="download"/>'
+                                                                               
                        }
+                                                                               
                        </xsl:when>
+                                                                               
                </xsl:choose>
+                                                                               
                <xsl:choose>
+                                                                               
                                <xsl:when test="//datatable/actions">
+                                                                               
                        ,
+                                                                               
                        {
+                                                                               
                                sExtends: "div",
+                                                                               
                                sButtonText: "Knapper nedenfor gjelder pr valgt 
element "
+                                                                               
                        },
+                                                                               
                                </xsl:when>
+                                                                               
                </xsl:choose>
+
+                                                                               
                <xsl:for-each select="//datatable/actions">
+                                                                               
                        {
+                                                                               
                                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 
&gt; 1){
+                                                                               
                                                                        target 
= '_blank';
+                                                                               
                                                                }
+
+
+                                                                               
                                                                var n = 0;
+                                                                               
                                                                for (; n &lt; 
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 &lt; len; ) {
+                                                                               
                                                                                
        action += '&amp;' + 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 += "&amp;confirm=yes&amp;phpgw_return_as=json";
+                                                                               
                                                                                
        receipt = execute_ajax(action);
+                                                                               
                                                                                
        oTable.fnDraw();
+                                                                               
                                                                        }
+                                                                               
                                                                        else if 
(target == 'ajax')
+                                                                               
                                                                        {
+                                                                               
                                                                                
        action += "&amp;phpgw_return_as=json";
+                                                                               
                                                                                
        execute_ajax(action);
+                                                                               
                                                                                
        oTable.fnDraw();
+
+                                                                               
                                                                        }
+                                                                               
                                                                        else
+                                                                               
                                                                        {
+                                                                               
                                                                                
window.open(action,target);
+                                                                               
                                                                        }
+
+                                                                               
                                                                        n++;
+                                                                               
                                                                }
+                                                                               
                                                }
+
+                                                                               
                        }<xsl:value-of select="phpgw:conditional(not(position() 
= last()), ',', '')"/>
+                                                                               
                </xsl:for-each>
+
+                                                                               
                ]
+                                                                               
        }
+                                        ]
+                                                               };
+
+
+
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       JqueryPortico.TableTools = {};
+                               </xsl:otherwise>
+                       </xsl:choose>
+<![CDATA[
+
+                       for(i=0;i < JqueryPortico.columns.length;i++)
+                       {
+                               if (JqueryPortico.columns[i]['visible'] != 
'undefined' && JqueryPortico.columns[i]['visible'] == false)
+                               {
+                                       exclude_colvis.push(i);
+                               }
+                       }
+
+                       var oTable = $('#datatable-container').dataTable( {
+                               processing:             true,
+                               serverSide:             true,
+                               responsive:             true,
+                               deferRender:    true,
+                               ajax:                   {
+                                       url: ajax_url,
+                                       data: { cat_id: '' },
+                                       type: 'GET'
+                               },
+                               lengthMenu:             
JqueryPortico.i18n.lengthmenu(),
+                               language:               
JqueryPortico.i18n.datatable(),
+                               columns:                JqueryPortico.columns,
+                               colVis: {
+                                                               exclude: 
exclude_colvis
+                               },
+                               dom:                    
'lCT<"clear">f<"top"ip>rt<"bottom"><"clear">',
+                               stateSave:              true,
+                               stateDuration: -1, //sessionstorage
+                               tabIndex:               1,
+                               oTableTools: JqueryPortico.TableTools
+                       } );
+
+       ]]>
+
+                       /**
+                       * Add left click action..
+                       */
+                       <xsl:if test="left_click_action != ''">
+                               $("#datatable-container").on("click", "tr", 
function() {
+                                       var iPos = oTable.fnGetPosition( this );
+                                       var aData = oTable.fnGetData( iPos ); 
//complete dataset from json returned from server
+                                       try {
+                                               <xsl:value-of 
select="left_click_action"/>(aData);
+                                       }
+                                       catch(err) {
+                                           
document.getElementById("message").innerHTML = err.message;
+                                       }
+
+                               });
+                       </xsl:if>
+
+                       /**
+                       * Add dbl click action..
+                       */
+
+                       <xsl:if test="dbl_click_action != ''">
+                               $("#datatable-container").on("dblclick", "tr", 
function() {
+                                       var iPos = oTable.fnGetPosition( this );
+                                       var aData = oTable.fnGetData( iPos ); 
//complete dataset from json returned from server
+                                       try {
+                                               <xsl:value-of 
select="dbl_click_action"/>(aData);
+                                       }
+                                       catch(err) {
+                                           
document.getElementById("message").innerHTML = err.message;
+                                       }
+
+                               });
+                       </xsl:if>
+
+                               <xsl:for-each select="//form/toolbar/item">
+                                       <xsl:if test="type = 'filter'">
+                                               $('select#<xsl:value-of 
select="name"/>').change( function() {
+                                               
oTable.dataTableSettings[0]['ajax']['data']['<xsl:value-of select="name"/>'] = 
$(this).val();
+                                               oTable.fnDraw();
+                                       } );
+                                       </xsl:if>
+                               </xsl:for-each>
+<![CDATA[
+
+                       function fnGetSelected( )
+                       {
+                               var aReturn = new Array();
+                                var aTrs = oTable.fnGetNodes();
+                                for ( var i=0 ; i < aTrs.length ; i++ )
+                                {
+                                        if ( $(aTrs[i]).hasClass('selected') )
+                                        {
+                                                aReturn.push( i );
+                                        }
+                                }
+                                return aReturn;
+                       }
+
+                       function execute_ajax(requestUrl)
+                       {
+                               $.ajax({
+                                       type: 'POST',
+                                       dataType: 'json',
+                                       url: requestUrl,
+                                       success: function(data) {
+                                               
document.getElementById("message").innerHTML += '<br/>' + data.receipt;
+                                       }
+                               });
+
+                       }
+
+                       function substr_count( haystack, needle, offset, length 
)
+                       {
+                               var pos = 0, cnt = 0;
+
+                               haystack += '';
+                               needle += '';
+                               if(isNaN(offset)) offset = 0;
+                               if(isNaN(length)) length = 0;
+                               offset--;
+
+                               while( (offset = haystack.indexOf(needle, 
offset+1)) != -1 )
+                               {
+                                       if(length > 0 && (offset+needle.length) 
> length)
+                                       {
+                                               return false;
+                                       } else
+                                       {
+                                               cnt++;
+                                       }
+                               }
+                               return cnt;
+                       }
+
+               } );
+
+]]>
+       </script>
+
+       <script>
+               <xsl:choose>
+                       <xsl:when test="//js_lang != ''">
+                               var lang = <xsl:value-of select="//js_lang"/>;
+                       </xsl:when>
+               </xsl:choose>
+       </script>
+
+</xsl:template>

Copied: 
branches/Version-1_0-branch/phpgwapi/templates/pure/css/baby-blue-old-ie.css 
(from rev 12063, trunk/phpgwapi/templates/pure/css/baby-blue-old-ie.css)
===================================================================
--- 
branches/Version-1_0-branch/phpgwapi/templates/pure/css/baby-blue-old-ie.css    
                            (rev 0)
+++ 
branches/Version-1_0-branch/phpgwapi/templates/pure/css/baby-blue-old-ie.css    
    2014-08-21 12:47:46 UTC (rev 12064)
@@ -0,0 +1,826 @@
+
+/* --------------------------
+ * Element Styles
+ * --------------------------
+*/
+
+body {
+    min-width: 320px;
+    color: #777;
+}
+
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+    font-weight: bold;
+    color: rgb(75, 75, 75);
+}
+
+h3 {
+    font-size: 1.25em;
+}
+
+h4 {
+    font-size: 1.125em;
+}
+
+a {
+    color: #3b8bba;
+    /* block-background-text-normal */
+    text-decoration: none;
+}
+
+a:visited {
+    color: #265778;
+    /* block-normal-text-normal */
+}
+
+dt {
+    font-weight: bold;
+}
+
+dd {
+    margin: 0 0 10px 0;
+}
+
+aside {
+    background: #1f8dd6;
+    /* same color as selected state on site menu */
+    padding: 0.3em 1em;
+    border-radius: 3px;
+    color: #fff;
+}
+
+aside a,
+aside a:visited {
+    color: rgb(169, 226, 255);
+}
+
+/* --------------------------
+ * Layout Styles
+ * --------------------------
+*/
+
+/* Navigation Push Styles */
+
+#layout {
+    position: relative;
+    padding-left: 0;
+}
+
+#layout.active {
+    position: relative;
+    left: 160px;
+}
+
+#layout.active #menu {
+    left: 160px;
+    width: 160px;
+}
+
+/* Apply the .box class on the immediate parent of any grid element (pure-u-*) 
to apply some padding. */
+
+.l-box {
+    padding: 1em;
+}
+
+.l-wrap {
+    margin-left: auto;
+    margin-right: auto;
+}
+
+.content .l-wrap {
+    margin-left: -1em;
+    margin-right: -1em;
+}
+
+/* --------------------------
+ * Header Module Styles
+ * --------------------------
+*/
+
+.header {
+    font-family: "omnes-pro", sans-serif;
+    margin: 0 auto;
+    text-align: center;
+    border-bottom: 1px solid #eee;
+    background: #fff;
+}
+
+.header h1 {
+    font-size: 300%;
+    font-weight: 100;
+    margin: 0;
+}
+
+.header h2 {
+    font-size: 125%;
+    font-weight: 100;
+    line-height: 1.5;
+    margin: 0;
+    color: #666;
+}
+
+/* --------------------------
+  * Content Module Styles
+  * --------------------------
+ */
+
+/* The content div is placed as a wrapper around all the docs */
+
+.content {
+    margin-left: auto;
+    margin-right: auto;
+    padding-left: 1em;
+    padding-right: 1em;
+}
+
+.content .content-subhead {
+    margin: 2em 0 1em 0;
+    font-weight: 300;
+    color: #888;
+    position: relative;
+}
+
+.content .content-spaced {
+    line-height: 1.8;
+}
+
+.content .content-quote {
+    font-family: "Georgia", serif;
+    color: #666;
+    font-style: italic;
+    line-height: 1.8;
+    border-left: 5px solid #ddd;
+    padding-left: 1.5em;
+}
+
+.content-link {
+    position: absolute;
+    top: 0;
+    right: 0;
+    display: block;
+    height: 100%;
+    width: 20px;
+    background: transparent url('/img/link-icon.png') no-repeat center center;
+    background-size: 20px 20px;
+}
+
+
+/* --------------------------
+ * Main Navigation Bar Styles
+ * --------------------------
+*/
+
+/* Add transition to containers so they can push in and out */
+
+#layout,
+#menu,
+.menu-link {
+    -webkit-transition: all 0.2s ease-out;
+    -moz-transition: all 0.2s ease-out;
+    -ms-transition: all 0.2s ease-out;
+    -o-transition: all 0.2s ease-out;
+    transition: all 0.2s ease-out;
+}
+
+#layout.active .menu-link {
+    left: 160px;
+}
+
+#menu {
+    margin-left: -160px;
+    /* "#menu" width */
+    width: 160px;
+    position: fixed;
+    top: 0;
+    left: 0;
+    bottom: 0;
+    z-index: 1000;
+    /* so the menu or its navicon stays above all content */
+    background: #191818;
+    overflow-y: auto;
+    -webkit-overflow-scrolling: touch;
+}
+
+#menu a {
+    color: #999;
+    border: none;
+    white-space: normal;
+    padding: 0.625em 1em;
+}
+
+#menu .pure-menu-open {
+    background: transparent;
+    border: 0;
+}
+
+#menu .pure-menu ul {
+    border: none;
+    background: transparent;
+}
+
+#menu .pure-menu ul,
+#menu .pure-menu .menu-item-divided {
+    border-top: 1px solid #333;
+}
+
+#menu .pure-menu li a:hover,
+#menu .pure-menu li a:focus {
+    background: #333;
+}
+
+.menu-link {
+    position: fixed;
+    display: block;
+    /* show this only on small screens */
+    top: 0;
+    left: 0;
+    /* "#menu width" */
+    background: #000;
+    background: rgba(0,0,0,0.7);
+    font-size: 11px;
+    /* change this value to increase/decrease button size */
+    z-index: 10;
+    width: 4em;
+    height: 4em;
+    padding: 1em;
+}
+
+.menu-link:hover,
+.menu-link:focus {
+    background: #000;
+}
+
+.menu-link span {
+    position: relative;
+    display: block;
+    margin-top: 0.9em;
+}
+
+.menu-link span,
+.menu-link span:before,
+.menu-link span:after {
+    background-color: #fff;
+    width: 100%;
+    height: .2em;
+    -webkit-transition: all 0.4s;
+    -moz-transition: all 0.4s;
+    -ms-transition: all 0.4s;
+    -o-transition: all 0.4s;
+    transition: all 0.4s;
+}
+
+.menu-link span:before,
+.menu-link span:after {
+    position: absolute;
+    top: -.55em;
+    content: " ";
+}
+
+.menu-link span:after {
+    top: .55em;
+}
+
+.menu-link.active span {
+    background: transparent;
+}
+
+.menu-link.active span:before {
+    -webkit-transform: rotate(45deg) translate(.5em, .4em);
+    -moz-transform: rotate(45deg) translate(.5em, .4em);
+    -ms-transform: rotate(45deg) translate(.5em, .4em);
+    -o-transform: rotate(45deg) translate(.5em, .4em);
+    transform: rotate(45deg) translate(.5em, .4em);
+}
+
+.menu-link.active span:after {
+    -webkit-transform: rotate(-45deg) translate(.4em, -.3em);
+    -moz-transform: rotate(-45deg) translate(.4em, -.3em);
+    -ms-transform: rotate(-45deg) translate(.4em, -.3em);
+    -o-transform: rotate(-45deg) translate(.4em, -.3em);
+    transform: rotate(-45deg) translate(.4em, -.3em);
+}
+
+#menu .pure-menu-heading {
+    font-size: 125%;
+    font-weight: 300;
+    letter-spacing: 0.1em;
+    color: #fff;
+    margin-top: 0;
+    padding: 0.5em 0.8em;
+}
+
+#menu .pure-menu-heading:hover,
+#menu .pure-menu-heading:focus {
+    color: #999;
+}
+
+#menu .pure-menu-selected {
+    background: #1f8dd6;
+}
+
+#menu .pure-menu-selected a {
+    color: #fff;
+}
+
+#menu li.pure-menu-selected a:hover,
+#menu li.pure-menu-selected a:focus {
+    background: none;
+}
+
+/* ---------------------
+ * Smaller Module Styles
+ * ---------------------
+*/
+
+.pure-img-responsive {
+    max-width: 100%;
+    height: auto;
+}
+
+.pure-paginator .pure-button {
+    -webkit-box-sizing: content-box;
+    -moz-box-sizing: content-box;
+    box-sizing: content-box;
+}
+
+.pure-button {
+    font-family: inherit;
+}
+
+a.pure-button-primary {
+    color: white;
+}
+
+/* green call to action button class */
+
+.notice {
+    background-color: #61B842;
+    color: white;
+}
+
+.muted {
+    color: #ccc;
+}
+
+/* -------------
+ * Table Styles
+ * -------------
+*/
+
+.pure-table th,
+.pure-table td {
+    padding: 0.5em 1em;
+}
+
+.table-responsive {
+    margin-left: -1em;
+    margin-right: -1em;
+    overflow-x: auto;
+    -webkit-overflow-scrolling: touch;
+    margin-bottom: 1em;
+}
+
+.table-responsive table {
+    width: 100%;
+    min-width: 35.5em;
+    border-left-width: 0;
+    border-right-width: 0;
+}
+
+.table-responsive .mq-table {
+    width: 100%;
+    min-width: 44em;
+}
+
+.mq-table th.highlight {
+    background-color: rgb(255, 234, 133);
+}
+
+.mq-table td.highlight {
+    background-color: rgb(255, 250, 229);
+}
+
+.mq-table th.highlight code,
+.mq-table td.highlight code {
+    background: rgb(255, 255, 243);
+}
+
+.mq-table-mq code {
+    font-size: 0.875em;
+}
+
+
+/* --------------------------
+ * Responsive Styles
+ * --------------------------
+*/
+
+.legal-license {
+    text-align: left;
+    margin: 0;
+}
+
+.legal-copyright,
+.legal-links,
+.legal-links li {
+    text-align: right;
+    margin: 0;
+}
+
+.l-wrap,
+.l-wrap .content {
+    padding-left: 1em;
+    padding-right: 1em;
+}
+
+.content .l-wrap {
+    margin-left: -2em;
+    margin-right: -2em;
+}
+
+.header,
+.content {
+    padding-left: 2em;
+    padding-right: 2em;
+}
+
+.header h1 {
+    font-size: 350%;
+}
+
+.header h2 {
+    font-size: 150%;
+}
+
+.content p {
+    font-size: 1.125em;
+}
+
+.code {
+    margin-left: auto;
+    margin-right: auto;
+    border-left-width: 1px;
+    border-right-width: 1px;
+}
+
+.table-responsive {
+    margin-left: auto;
+    margin-right: auto;
+}
+
+.table-responsive table {
+    border-left-width: 1px;
+    border-right-width: 1px;
+}
+
+#layout {
+    padding-left: 160px;
+    /* left col width "#menu" */
+    left: 0;
+}
+
+#menu {
+    left: 160px;
+}
+
+.menu-link {
+    position: fixed;
+    left: 160px;
+    display: none;
+}
+
+#layout.active .menu-link {
+    left: 160px;
+}
+.hero {
+    text-align: center;
+}
+
+.hero-titles {
+    font-family: "omnes-pro", sans-serif;
+    padding: 0 1em;
+    margin: 2em auto;
+}
+
+.hero-site {
+    font-size: 400%;
+    font-weight: 100;
+    margin: 0;
+    color: #1f8dd6;
+}
+
+.hero-tagline {
+    font-size: 150%;
+    font-weight: 100;
+    line-height: 1.5;
+    margin: 0 0 1em;
+    color: #666;
+}
+
+a.button-cta,
+a.button-secondary {
+    margin: 0.25em;
+}
+
+a.button-cta {
+    background: #1f8dd6;
+    color: #fff;
+    border: 1px solid #1f8dd6;
+}
+
+a.button-secondary {
+    background: #fff;
+    color: #666;
+    border: 1px solid #ddd;
+}
+
+.size-chart {
+    width: 100%;
+    font-size: 87.5%;
+    line-height: 1.4;
+    margin-bottom: 2em;
+}
+
+a.size-chart-item {
+    display: block;
+    color: #fff;
+    padding: 1.45em 0;
+    text-align: center;
+    text-decoration: none;
+    text-transform: capitalize;
+}
+
+.size-chart-label {
+    display: inline-block;
+    -webkit-transform: rotate(-90deg);
+    -moz-transform: rotate(-90deg);
+    -ms-transform: rotate(-90deg);
+    -o-transform: rotate(-90deg);
+}
+
+.size-chart-size {
+    display: none;
+}
+
+.size-chart-base {
+    background: #0e90d2;
+}
+
+.size-chart-base .size-chart-size {
+    color: rgb(103, 194, 240);
+}
+
+.size-chart-grids {
+    background: rgb(128, 88, 165);
+}
+
+.size-chart-grids .size-chart-size {
+    color: rgb(200, 131, 255);
+}
+
+.size-chart-forms {
+    background: #5eb95e;
+}
+
+.size-chart-forms .size-chart-size {
+    color: rgb(161, 240, 137);
+}
+
+.size-chart-buttons {
+    background: #dd514c;
+}
+
+.size-chart-buttons .size-chart-size {
+    color: rgb(236, 164, 154);
+}
+
+.size-chart-menus {
+    background: rgb(250, 210, 50);
+}
+
+.size-chart-menus .size-chart-size {
+    color: rgb(255, 240, 134);
+}
+
+.size-chart-tables {
+    background: rgb(243, 123, 29);
+}
+
+.size-chart-tables .size-chart-label {
+    margin-left: -0.5em;
+}
+
+.size-chart-tables .size-chart-size {
+    color: rgb(255, 190, 129);
+}
+
+.marketing {
+    border-bottom: 1px solid #eee;
+    margin-top: 1em;
+    margin-bottom: 1em;
+    padding-bottom: 2em;
+}
+
+.marketing-customize {
+    margin-bottom: 0;
+    border-bottom: 0;
+    padding-bottom: 0;
+}
+
+.marketing .content {
+    margin-bottom: 0;
+}
+
+.marketing-header {
+    font-weight: 400;
+}
+
+.marketing-diagram {
+    margin: 2em auto;
+}
+
+.sample-buttons {
+    margin: 1em auto;
+    padding: 0 0.5em;
+}
+
+.sample-button {
+    padding: 0.5em;
+    text-align: center;
+}
+
+.sample-button .pure-button {
+    width: 100%;
+}
+
+.button-a {
+    background: #e1f2fa;
+    color: #5992aa;
+}
+
+.button-b {
+    background: #fcebbd;
+    color: #af9540;
+}
+
+.button-c,
+.button-d,
+.button-e {
+    border-radius: 8px;
+}
+
+.button-f,
+.button-g,
+.button-h {
+    border-radius: 20px;
+}
+
+.button-c {
+    background: #333;
+    color: #fff;
+}
+
+.button-d {
+    background: #d3eda3;
+    color: #72962e;
+}
+
+.button-e {
+    background: #f5ab9e;
+    color: #8c3a2b;
+}
+
+.button-f {
+    background: #ddaeff;
+    color: #8156a7;
+}
+
+.button-g {
+    background: #f57b00;
+    color: #ffca95;
+}
+
+.button-h {
+    background: #008ed4;
+    color: #fff;
+}
+
+.sample-button .button-h {
+    width: 50%;
+    /* Updated to 80% at sm breakpoint */
+}
+
+.size-chart-tables .size-chart-label {
+    margin-left: 0;
+}
+
+.hero {
+    margin-bottom: 3em;
+}
+
+.sample-button .button-h {
+    width: 100%;
+}
+
+.hero-titles {
+    padding: 0 2em;
+}
+
+.hero-site {
+    font-size: 800%;
+}
+
+.hero-tagline {
+    font-size: 250%;
+}
+
+a.button-cta,
+a.button-secondary {
+    font-size: 125%;
+}
+
+.size-chart {
+    font-size: 100%;
+}
+
+a.size-chart-item {
+    padding: 0.5em;
+    text-align: left;
+}
+
+.size-chart-label {
+    -webkit-transform: none;
+    -moz-transform: none;
+    -ms-transform: none;
+    -o-transform: none;
+}
+
+.size-chart-size {
+    display: block;
+}
+
+.marketing-header {
+    font-size: 150%;
+}
+
+.l-wrap .sample-buttons {
+    padding: 0 0.5em;
+}
+/**
+ * Baby Blue theme for RainbowJS
+ *
+ * @author tilomitra
+ */
+
+pre .comment {
+    color: #999;
+}
+
+pre .tag,
+pre .tag-name,
+pre .support.tag-name {
+    color: rgb(85, 85, 85);
+}
+
+pre .keyword,
+pre .css-property,
+pre .vendor-prefix,
+pre .sass,
+pre .class,
+pre .id,
+pre .css-value,
+pre .entity.function,
+pre .storage.function {
+    font-weight: bold;
+}
+
+pre .css-property,
+pre .css-value,
+pre .vendor-prefix,
+pre .support.namespace {
+    color: #333;
+}
+
+pre .constant.numeric,
+pre .keyword.unit,
+pre .hex-color {
+    font-weight: normal;
+    color: #099;
+}
+
+pre .attribute,
+pre .variable,
+pre .support {
+    color:  #757575; /* skinbuilder block-page-text-normal with #1f8dd6 as 
primary */
+}
+
+pre .string,
+pre .support.value  {
+    font-weight: normal;
+    color: #3b8bba; /* skinbuilder block-mine-text-low with #1f8dd6 as primary 
*/
+}

Copied: branches/Version-1_0-branch/phpgwapi/templates/pure/css/baby-blue.css 
(from rev 12063, trunk/phpgwapi/templates/pure/css/baby-blue.css)
===================================================================
--- branches/Version-1_0-branch/phpgwapi/templates/pure/css/baby-blue.css       
                        (rev 0)
+++ branches/Version-1_0-branch/phpgwapi/templates/pure/css/baby-blue.css       
2014-08-21 12:47:46 UTC (rev 12064)
@@ -0,0 +1,830 @@
+
+
+/* --------------------------
+ * Element Styles
+ * --------------------------
+*/
+
+body {
+    min-width: 320px;
+    color: #777;
+}
+
+h1, h2, h3, h4, h5, h6 {
+    font-weight: bold;
+    color: rgb(75, 75, 75);
+}
+h3 {
+    font-size: 1.25em;
+}
+h4 {
+    font-size: 1.125em;
+}
+
+a {
+    color: #3b8bba; /* block-background-text-normal */
+    text-decoration: none;
+}
+
+a:visited {
+    color: #265778; /* block-normal-text-normal */
+}
+
+dt {
+    font-weight: bold;
+}
+dd {
+    margin: 0 0 10px 0;
+}
+
+aside {
+    background: #1f8dd6; /* same color as selected state on site menu */
+    padding: 0.3em 1em;
+    border-radius: 3px;
+    color: #fff;
+}
+    aside a, aside a:visited {
+        color: rgb(169, 226, 255);
+    }
+
+
+/* --------------------------
+ * Layout Styles
+ * --------------------------
+*/
+
+/* Navigation Push Styles */
+#layout {
+    position: relative;
+    padding-left: 0;
+}
+    #layout.active {
+        position: relative;
+        left: 160px;
+    }
+        #layout.active #menu {
+            left: 160px;
+            width: 160px;
+        }
+
+/* Apply the .box class on the immediate parent of any grid element (pure-u-*) 
to apply some padding. */
+.l-box {
+    padding: 1em;
+}
+
+.l-wrap {
+    margin-left: auto;
+    margin-right: auto;
+}
+.content .l-wrap {
+    margin-left: -1em;
+    margin-right: -1em;
+}
+
+
+/* --------------------------
+ * Header Module Styles
+ * --------------------------
+*/
+
+.header {
+     font-family: "omnes-pro", sans-serif;
+     margin: 0 auto;
+     text-align: center;
+     border-bottom: 1px solid #eee;
+     background: #fff;
+ }
+    .header h1 {
+        font-size: 300%;
+        font-weight: 100;
+        margin: 0;
+    }
+     .header h2 {
+        font-size: 125%;
+        font-weight: 100;
+        line-height: 1.5;
+        margin: 0;
+        color: #666;
+    }
+
+
+ /* --------------------------
+  * Content Module Styles
+  * --------------------------
+ */
+
+/* The content div is placed as a wrapper around all the docs */
+.content {
+    margin-left: auto;
+    margin-right: auto;
+    padding-left: 1em;
+    padding-right: 1em;
+}
+
+    .content .content-subhead {
+        margin: 2em 0 1em 0;
+        font-weight: 300;
+        color: #888;
+        position: relative;
+    }
+
+    .content .content-spaced {
+        line-height: 1.8;
+    }
+
+    .content .content-quote {
+        font-family: "Georgia", serif;
+        color: #666;
+        font-style: italic;
+        line-height: 1.8;
+        border-left: 5px solid #ddd;
+        padding-left: 1.5em;
+    }
+
+    .content-link {
+        position: absolute;
+        top: 0;
+        right: 0;
+        display: block;
+        height: 100%;
+        width: 20px;
+        background: transparent url('/img/link-icon.png') no-repeat center 
center;
+        background-size: 20px 20px;
+    }
+
+    @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
+        .content-link {
+            background-image: url('/img/address@hidden');
+        }
+    }
+
+
+/* --------------------------
+ * Footer Module Styles
+ * --------------------------
+*/
+
+.footer {
+    font-size: 87.5%;
+    border-top: 1px solid #eee;
+    margin-top: 3.4286em;
+    padding: 1.1429em;
+    background: rgb(250, 250, 250);
+}
+
+.legal {
+    line-height: 1.6;
+    text-align: center;
+    margin: 0 auto;
+}
+
+    .legal-license {
+        margin-top: 0;
+    }
+    .legal-links {
+        list-style: none;
+        padding: 0;
+        margin-bottom: 0;
+    }
+    .legal-copyright {
+        margin-top: 0;
+        margin-bottom: 0;
+    }
+
+
+/* --------------------------
+ * Main Navigation Bar Styles
+ * --------------------------
+*/
+
+/* Add transition to containers so they can push in and out */
+#layout,
+#menu,
+.menu-link {
+    -webkit-transition: all 0.2s ease-out;
+    -moz-transition: all 0.2s ease-out;
+    -ms-transition: all 0.2s ease-out;
+    -o-transition: all 0.2s ease-out;
+    transition: all 0.2s ease-out;
+}
+
+#layout.active .menu-link {
+    left: 160px;
+}
+
+#menu {
+    margin-left: -160px; /* "#menu" width */
+    width: 160px;
+    position: fixed;
+    top: 0;
+    left: 0;
+    bottom: 0;
+    z-index: 1000; /* so the menu or its navicon stays above all content */
+    background: #191818;
+    overflow-y: auto;
+    -webkit-overflow-scrolling: touch;
+}
+    #menu a {
+        color: #999;
+        border: none;
+        white-space: normal;
+        padding: 0.625em 1em;
+    }
+
+    #menu .pure-menu-open {
+        background: transparent;
+        border: 0;
+    }
+
+    #menu .pure-menu ul {
+        border: none;
+        background: transparent;
+    }
+
+    #menu .pure-menu ul,
+    #menu .pure-menu .menu-item-divided {
+        border-top: 1px solid #333;
+    }
+
+        #menu .pure-menu li a:hover,
+        #menu .pure-menu li a:focus {
+            background: #333;
+        }
+
+    .menu-link {
+        position: fixed;
+        display: block; /* show this only on small screens */
+        top: 0;
+        left: 0; /* "#menu width" */
+        background: #000;
+        background: rgba(0,0,0,0.7);
+        font-size: 11px; /* change this value to increase/decrease button size 
*/
+        z-index: 10;
+        width: 4em;
+        height: 4em;
+        padding: 1em;
+    }
+
+        .menu-link:hover,
+        .menu-link:focus {
+            background: #000;
+        }
+
+        .menu-link span {
+            position: relative;
+            display: block;
+            margin-top: 0.9em;
+        }
+
+        .menu-link span,
+        .menu-link span:before,
+        .menu-link span:after {
+            background-color: #fff;
+            width: 100%;
+            height: .2em;
+            -webkit-transition: all 0.4s;
+               -moz-transition: all 0.4s;
+                -ms-transition: all 0.4s;
+                 -o-transition: all 0.4s;
+                    transition: all 0.4s;
+        }
+
+            .menu-link span:before,
+            .menu-link span:after {
+                position: absolute;
+                top: -.55em;
+                content: " ";
+            }
+
+            .menu-link span:after {
+                top: .55em;
+            }
+
+        .menu-link.active span {
+            background: transparent;
+        }
+
+            .menu-link.active span:before {
+                -webkit-transform: rotate(45deg) translate(.5em, .4em);
+                   -moz-transform: rotate(45deg) translate(.5em, .4em);
+                    -ms-transform: rotate(45deg) translate(.5em, .4em);
+                     -o-transform: rotate(45deg) translate(.5em, .4em);
+                        transform: rotate(45deg) translate(.5em, .4em);
+            }
+
+            .menu-link.active span:after {
+                -webkit-transform: rotate(-45deg) translate(.4em, -.3em);
+                   -moz-transform: rotate(-45deg) translate(.4em, -.3em);
+                    -ms-transform: rotate(-45deg) translate(.4em, -.3em);
+                     -o-transform: rotate(-45deg) translate(.4em, -.3em);
+                        transform: rotate(-45deg) translate(.4em, -.3em);
+            }
+
+    #menu .pure-menu-heading {
+        font-size: 125%;
+        font-weight: 300;
+        letter-spacing: 0.1em;
+        color: #fff;
+        margin-top: 0;
+        padding: 0.5em 0.8em;
+    }
+    #menu .pure-menu-heading:hover,
+    #menu .pure-menu-heading:focus {
+        color: #999;
+    }
+
+    #menu .pure-menu-selected {
+        background: #1f8dd6;
+    }
+
+        #menu .pure-menu-selected a {
+            color: #fff;
+        }
+
+        #menu li.pure-menu-selected a:hover,
+        #menu li.pure-menu-selected a:focus {
+            background: none;
+        }
+
+
+
+/* ---------------------
+ * Smaller Module Styles
+ * ---------------------
+*/
+
+.pure-img-responsive {
+    max-width: 100%;
+    height: auto;
+}
+
+.pure-paginator .pure-button {
+    -webkit-box-sizing: content-box;
+    -moz-box-sizing: content-box;
+    box-sizing: content-box;
+}
+
+.pure-button {
+    font-family: inherit;
+}
+a.pure-button-primary {
+    color: white;
+}
+
+
+/* green call to action button class */
+.notice {
+    background-color: #61B842;
+    color: white;
+}
+
+.muted {
+    color: #ccc;
+}
+
+
+
+/* -------------
+ * Table Styles
+ * -------------
+*/
+
+.pure-table th,
+.pure-table td {
+    padding: 0.5em 1em;
+}
+
+.table-responsive {
+    margin-left: -1em;
+    margin-right: -1em;
+    overflow-x: auto;
+    -webkit-overflow-scrolling: touch;
+    margin-bottom: 1em;
+}
+.table-responsive table {
+    width: 100%;
+    min-width: 35.5em;
+    border-left-width: 0;
+    border-right-width: 0;
+}
+
+.table-responsive .mq-table {
+    width: 100%;
+    min-width: 44em;
+}
+.mq-table th.highlight {
+    background-color: rgb(255, 234, 133);
+}
+.mq-table td.highlight {
+    background-color: rgb(255, 250, 229);
+}
+.mq-table th.highlight code,
+.mq-table td.highlight code {
+    background: rgb(255, 255, 243);
+}
+.mq-table-mq code {
+    font-size: 0.875em;
+}
+
+
+/* --------------------------
+ * Responsive Styles
+ * --------------------------
+*/
+
address@hidden screen and (min-width: 35.5em) {
+
+    .legal-license {
+        text-align: left;
+        margin: 0;
+    }
+    .legal-copyright,
+    .legal-links,
+    .legal-links li {
+        text-align: right;
+        margin: 0;
+    }
+
+}
+
address@hidden screen and (min-width: 48em) {
+
+    .l-wrap,
+    .l-wrap .content {
+        padding-left: 1em;
+        padding-right: 1em;
+    }
+    .content .l-wrap {
+        margin-left: -2em;
+        margin-right: -2em;
+    }
+
+    .header,
+    .content {
+        padding-left: 2em;
+        padding-right: 2em;
+    }
+
+    .header h1 {
+        font-size: 350%;
+    }
+    .header h2 {
+        font-size: 150%;
+    }
+
+    .content p {
+        font-size: 1.125em;
+    }
+
+    .code {
+        margin-left: auto;
+        margin-right: auto;
+        border-left-width: 1px;
+        border-right-width: 1px;
+    }
+
+    .table-responsive {
+        margin-left: auto;
+        margin-right: auto;
+    }
+    .table-responsive table {
+        border-left-width: 1px;
+        border-right-width: 1px;
+    }
+
+}
+
address@hidden (min-width: 58em) {
+
+    #layout {
+        padding-left: 160px; /* left col width "#menu" */
+        left: 0;
+    }
+    #menu {
+        left: 160px;
+    }
+    .menu-link {
+        position: fixed;
+        left: 160px;
+        display: none;
+    }
+    #layout.active .menu-link {
+        left: 160px;
+    }
+
+}
+
+.hero {
+    text-align: center;
+}
+    .hero-titles {
+        font-family: "omnes-pro", sans-serif;
+        padding: 0 1em;
+        margin: 2em auto;
+    }
+    .hero-site {
+        font-size: 400%;
+        font-weight: 100;
+        margin: 0;
+        color: #1f8dd6;
+    }
+    .hero-tagline {
+        font-size: 150%;
+        font-weight: 100;
+        line-height: 1.5;
+        margin: 0 0 1em;
+        color: #666;
+    }
+
+a.button-cta,
+a.button-secondary {
+    margin: 0.25em;
+}
+
+a.button-cta {
+    background: #1f8dd6;
+    color: #fff;
+    border: 1px solid #1f8dd6;
+}
+
+a.button-secondary {
+    background: #fff;
+    color: #666;
+    border: 1px solid #ddd;
+}
+
+.size-chart {
+    width: 100%;
+    font-size: 87.5%;
+    line-height: 1.4;
+    margin-bottom: 2em;
+}
+
+    a.size-chart-item {
+        display: block;
+        color: #fff;
+        padding: 1.45em 0;
+        text-align: center;
+        text-decoration: none;
+        text-transform: capitalize;
+    }
+
+    .size-chart-label {
+        display: inline-block;
+        -webkit-transform: rotate(-90deg);
+        -moz-transform:    rotate(-90deg);
+        -ms-transform:     rotate(-90deg);
+        -o-transform:      rotate(-90deg);
+    }
+    .size-chart-size {
+        display: none;
+    }
+
+    .size-chart-base {
+        background: #0e90d2;
+    }
+        .size-chart-base .size-chart-size {
+            color: rgb(103, 194, 240);
+        }
+
+    .size-chart-grids {
+        background: rgb(128, 88, 165);
+    }
+        .size-chart-grids .size-chart-size {
+            color: rgb(200, 131, 255);
+        }
+
+    .size-chart-forms {
+        background: #5eb95e;
+    }
+
+        .size-chart-forms .size-chart-size {
+            color: rgb(161, 240, 137);
+        }
+
+    .size-chart-buttons {
+        background: #dd514c;
+    }
+
+        .size-chart-buttons .size-chart-size {
+            color: rgb(236, 164, 154);
+        }
+
+    .size-chart-menus {
+        background: rgb(250, 210, 50);
+    }
+        .size-chart-menus .size-chart-size {
+            color: rgb(255, 240, 134);
+        }
+
+    .size-chart-tables {
+        background: rgb(243, 123, 29);
+    }
+        .size-chart-tables .size-chart-label {
+            margin-left: -0.5em;
+        }
+        .size-chart-tables .size-chart-size {
+            color: rgb(255, 190, 129);
+        }
+
+.marketing {
+    border-bottom: 1px solid #eee;
+    margin-top: 1em;
+    margin-bottom: 1em;
+    padding-bottom: 2em;
+}
+.marketing-customize {
+    margin-bottom: 0;
+    border-bottom: 0;
+    padding-bottom: 0;
+}
+
+    .marketing .content {
+        margin-bottom: 0;
+    }
+
+    .marketing-header {
+        font-weight: 400;
+    }
+
+    .marketing-diagram {
+        margin: 2em auto;
+    }
+
+.sample-buttons {
+    margin: 1em auto;
+    padding: 0 0.5em;
+}
+
+    .sample-button {
+        padding: 0.5em;
+        text-align: center;
+    }
+    .sample-button .pure-button {
+        width: 100%;
+    }
+
+    .button-a {
+        background: #e1f2fa;
+        color: #5992aa;
+    }
+
+    .button-b {
+        background: #fcebbd;
+        color: #af9540;
+    }
+
+    .button-c,
+    .button-d,
+    .button-e {
+        border-radius: 8px;
+    }
+
+    .button-f,
+    .button-g,
+    .button-h {
+        border-radius: 20px;
+    }
+
+    .button-c {
+        background: #333;
+        color: #fff;
+    }
+    .button-d {
+        background: #d3eda3;
+        color: #72962e;
+    }
+
+    .button-e {
+        background: #f5ab9e;
+        color: #8c3a2b;
+    }
+    .button-f {
+        background: #ddaeff;
+        color: #8156a7;
+    }
+
+    .button-g {
+        background: #f57b00;
+        color: #ffca95;
+    }
+
+    .button-h {
+        background: #008ed4;
+        color: #fff;
+    }
+    .sample-button .button-h {
+        width: 50%; /* Updated to 80% at sm breakpoint */
+    }
+
address@hidden screen and (min-width: 30em) {
+    .size-chart-tables .size-chart-label {
+        margin-left: 0;
+    }
+}
+
address@hidden screen and (min-width: 35.5em) {
+    .hero {
+        margin-bottom: 3em;
+    }
+
+    .sample-button .button-h {
+        width: 100%;
+    }
+}
+
address@hidden screen and (min-width: 48em) {
+    .hero-titles {
+        padding: 0 2em;
+    }
+    .hero-site {
+        font-size: 800%;
+    }
+    .hero-tagline {
+        font-size: 250%;
+    }
+
+    a.button-cta,
+    a.button-secondary {
+        font-size: 125%;
+    }
+
+    .size-chart {
+        font-size: 100%;
+    }
+    a.size-chart-item {
+        padding: 0.5em;
+        text-align: left;
+    }
+    .size-chart-label {
+        -webkit-transform: none;
+        -moz-transform:    none;
+        -ms-transform:     none;
+        -o-transform:      none;
+    }
+    .size-chart-size {
+        display: block;
+    }
+
+    .marketing-header {
+        font-size: 150%;
+    }
+
+    .l-wrap .sample-buttons {
+        padding: 0 0.5em;
+    }
+}
+
+/**
+ * Baby Blue theme for RainbowJS
+ *
+ * @author tilomitra
+ */
+
+pre .comment {
+    color: #999;
+}
+
+pre .tag,
+pre .tag-name,
+pre .support.tag-name {
+    color: rgb(85, 85, 85);
+}
+
+pre .keyword,
+pre .css-property,
+pre .vendor-prefix,
+pre .sass,
+pre .class,
+pre .id,
+pre .css-value,
+pre .entity.function,
+pre .storage.function {
+    font-weight: bold;
+}
+
+pre .css-property,
+pre .css-value,
+pre .vendor-prefix,
+pre .support.namespace {
+    color: #333;
+}
+
+pre .constant.numeric,
+pre .keyword.unit,
+pre .hex-color {
+    font-weight: normal;
+    color: #099;
+}
+
+pre .attribute,
+pre .variable,
+pre .support {
+    color:  #757575; /* skinbuilder block-page-text-normal with #1f8dd6 as 
primary */
+}
+
+pre .string,
+pre .support.value  {
+    font-weight: normal;
+    color: #3b8bba; /* skinbuilder block-mine-text-low with #1f8dd6 as primary 
*/
+}

Modified: 
branches/Version-1_0-branch/phpgwapi/templates/pure/css/side-menu-old-ie.css
===================================================================
--- 
branches/Version-1_0-branch/phpgwapi/templates/pure/css/side-menu-old-ie.css    
    2014-08-21 12:43:27 UTC (rev 12063)
+++ 
branches/Version-1_0-branch/phpgwapi/templates/pure/css/side-menu-old-ie.css    
    2014-08-21 12:47:46 UTC (rev 12064)
@@ -51,9 +51,7 @@
 .content {
     margin: 0 auto;
     padding: 0 2em;
-    max-width: 800px;
     margin-bottom: 50px;
-    line-height: 1.6em;
 }
 
 .header {

Modified: branches/Version-1_0-branch/phpgwapi/templates/pure/css/side-menu.css
===================================================================
--- branches/Version-1_0-branch/phpgwapi/templates/pure/css/side-menu.css       
2014-08-21 12:43:27 UTC (rev 12063)
+++ branches/Version-1_0-branch/phpgwapi/templates/pure/css/side-menu.css       
2014-08-21 12:47:46 UTC (rev 12064)
@@ -47,7 +47,6 @@
     padding: 0 2em;
  //   max-width: 1200px;
     margin-bottom: 50px;
-    line-height: 1.6em;
 }
 
 .header {

Modified: branches/Version-1_0-branch/phpgwapi/templates/pure/footer.tpl
===================================================================
--- branches/Version-1_0-branch/phpgwapi/templates/pure/footer.tpl      
2014-08-21 12:43:27 UTC (rev 12063)
+++ branches/Version-1_0-branch/phpgwapi/templates/pure/footer.tpl      
2014-08-21 12:47:46 UTC (rev 12064)
@@ -1,10 +1,8 @@
-                                       </div>
                                </div>
-
-                               <div class="footer">
-                                       <div class="button-bar">
-                                               {powered_by}
-                                       </div>
+                       </div>
+                       <div class="footer">
+                               <div class="button-bar">
+                                       {powered_by}
                                </div>
                        </div>
                </div>

Modified: branches/Version-1_0-branch/phpgwapi/templates/pure/head.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/templates/pure/head.inc.php    
2014-08-21 12:43:27 UTC (rev 12063)
+++ branches/Version-1_0-branch/phpgwapi/templates/pure/head.inc.php    
2014-08-21 12:47:46 UTC (rev 12064)
@@ -8,8 +8,8 @@
        phpgwapi_jquery::load_widget('core');
 
        phpgw::import_class('phpgwapi.yui');
-       phpgwapi_yui::load_widget('button');
-       phpgwapi_yui::load_widget('container');
+//     phpgwapi_yui::load_widget('button');
+//     phpgwapi_yui::load_widget('container');
 
        $javascripts[] = "/phpgwapi/js/SlickNav/jquery.slicknav.js";
 
@@ -50,28 +50,28 @@
 //             $stylesheets[] = 
'/phpgwapi/js/yahoo/reset-fonts-grids/reset-fonts-grids.css';
        }
 
-       $stylesheets[] = 
"/phpgwapi/js/yahoo/tabview/assets/skins/sam/tabview.css";
+       //$stylesheets[] = 
"/phpgwapi/js/yahoo/tabview/assets/skins/sam/tabview.css";
 //     $stylesheets[] = 
"/phpgwapi/js/yahoo/resize/assets/skins/sam/resize.css";
 //     $stylesheets[] = 
"/phpgwapi/js/yahoo/layout/assets/skins/sam/layout.css";
-       $stylesheets[] = "/phpgwapi/js/yahoo/menu/assets/skins/sam/menu.css";
-       $stylesheets[] = 
"/phpgwapi/js/yahoo/button/assets/skins/sam/button.css";
+       //$stylesheets[] = "/phpgwapi/js/yahoo/menu/assets/skins/sam/menu.css";
+       //$stylesheets[] = 
"/phpgwapi/js/yahoo/button/assets/skins/sam/button.css";
 //     $stylesheets[] = "/phpgwapi/templates/portico/css/base.css";
        
if(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['theme']))
        {
                $stylesheets[] = 
"/phpgwapi/templates/pure/css/{$GLOBALS['phpgw_info']['user']['preferences']['common']['theme']}.css";
        }
-       $stylesheets[] = "/{$app}/templates/base/css/base.css";
-       $stylesheets[] = "/{$app}/templates/portico/css/base.css";
+       //$stylesheets[] = "/{$app}/templates/base/css/base.css";
+       //$stylesheets[] = "/{$app}/templates/portico/css/base.css";
        
if(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['theme']))
        {
                $stylesheets[] = 
"/{$app}/templates/portico/css/{$GLOBALS['phpgw_info']['user']['preferences']['common']['theme']}.css";
        }
-
+/*
        
if(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['yui_table_nowrap'])
 && $GLOBALS['phpgw_info']['user']['preferences']['common']['yui_table_nowrap'])
        {
                $stylesheets[] = 
"/phpgwapi/templates/base/css/yui_table_nowrap.css";
        }
-
+*/
        foreach ( $stylesheets as $stylesheet )
        {
                if( file_exists( PHPGW_SERVER_ROOT . $stylesheet ) )

Modified: branches/Version-1_0-branch/phpgwapi/templates/pure/head.tpl
===================================================================
--- branches/Version-1_0-branch/phpgwapi/templates/pure/head.tpl        
2014-08-21 12:43:27 UTC (rev 12063)
+++ branches/Version-1_0-branch/phpgwapi/templates/pure/head.tpl        
2014-08-21 12:47:46 UTC (rev 12064)
@@ -13,13 +13,18 @@
                <link rel="stylesheet" 
href="{webserver_url}/phpgwapi/templates/pure/css/pure-min.css">
                <!--[if lte IE 8]>
                        <link rel="stylesheet" 
href="{webserver_url}/phpgwapi/templates/pure/css/grids-responsive-old-ie-min.css">
-                       <link rel="stylesheet" 
href="{webserver_url}/phpgwapi/templates/pure/css/layouts/side-menu-old-ie.css">
+                       <link rel="stylesheet" 
href="{webserver_url}/phpgwapi/templates/pure/css/side-menu-old-ie.css">
+                       <link rel="stylesheet" 
href="{webserver_url}/phpgwapi/templates/pure/css/baby-blue-old-ie.css">
                <![endif]-->
                <!--[if gt IE 8]><!-->
                        <link rel="stylesheet" 
href="{webserver_url}/phpgwapi/templates/pure/css/grids-responsive-min.css">
                    <link rel="stylesheet" 
href="phpgwapi/templates/pure/css/side-menu.css">
+                   <link rel="stylesheet" 
href="phpgwapi/templates/pure/css/baby-blue.css">
                <!--<![endif]-->
 
+               <!--[if lt IE 9]>
+                       <script 
src="{webserver_url}/phpgwapi/templates/pure/js/html5shiv.js"></script>
+               <![endif]-->
 
                <!-- BEGIN stylesheet -->
                <link href="{stylesheet_uri}" type="text/css" rel="StyleSheet">
@@ -34,7 +39,7 @@
                //-->
                </script>
                {javascript}
-               </script>
+
                <!-- BEGIN javascript -->
                        <script type="text/javascript" 
src="{javascript_uri}"></script>
        <!-- END javascript -->

Copied: branches/Version-1_0-branch/phpgwapi/templates/pure/js/html5shiv.js 
(from rev 12063, trunk/phpgwapi/templates/pure/js/html5shiv.js)
===================================================================
--- branches/Version-1_0-branch/phpgwapi/templates/pure/js/html5shiv.js         
                (rev 0)
+++ branches/Version-1_0-branch/phpgwapi/templates/pure/js/html5shiv.js 
2014-08-21 12:47:46 UTC (rev 12064)
@@ -0,0 +1,301 @@
+/**
+* @preserve HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 
Licensed
+*/
+;(function(window, document) {
+/*jshint evil:true */
+  /** version */
+  var version = '3.7.0';
+
+  /** Preset options */
+  var options = window.html5 || {};
+
+  /** Used to skip problem elements */
+  var reSkip = 
/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
+
+  /** Not all elements can be cloned in IE **/
+  var saveClones = 
/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
+
+  /** Detect whether the browser supports default html5 styles */
+  var supportsHtml5Styles;
+
+  /** Name of the expando, to work with multiple documents or to re-shiv one 
document */
+  var expando = '_html5shiv';
+
+  /** The id for the the documents expando */
+  var expanID = 0;
+
+  /** Cached data for each document */
+  var expandoData = {};
+
+  /** Detect whether the browser supports unknown elements */
+  var supportsUnknownElements;
+
+  (function() {
+    try {
+        var a = document.createElement('a');
+        a.innerHTML = '<xyz></xyz>';
+        //if the hidden property is implemented we can assume, that the 
browser supports basic HTML5 Styles
+        supportsHtml5Styles = ('hidden' in a);
+
+        supportsUnknownElements = a.childNodes.length == 1 || (function() {
+          // assign a false positive if unable to shiv
+          (document.createElement)('a');
+          var frag = document.createDocumentFragment();
+          return (
+            typeof frag.cloneNode == 'undefined' ||
+            typeof frag.createDocumentFragment == 'undefined' ||
+            typeof frag.createElement == 'undefined'
+          );
+        }());
+    } catch(e) {
+      // assign a false positive if detection fails => unable to shiv
+      supportsHtml5Styles = true;
+      supportsUnknownElements = true;
+    }
+
+  }());
+
+  
/*--------------------------------------------------------------------------*/
+
+  /**
+   * Creates a style sheet with the given CSS text and adds it to the document.
+   * @private
+   * @param {Document} ownerDocument The document.
+   * @param {String} cssText The CSS text.
+   * @returns {StyleSheet} The style element.
+   */
+  function addStyleSheet(ownerDocument, cssText) {
+    var p = ownerDocument.createElement('p'),
+        parent = ownerDocument.getElementsByTagName('head')[0] || 
ownerDocument.documentElement;
+
+    p.innerHTML = 'x<style>' + cssText + '</style>';
+    return parent.insertBefore(p.lastChild, parent.firstChild);
+  }
+
+  /**
+   * Returns the value of `html5.elements` as an array.
+   * @private
+   * @returns {Array} An array of shived element node names.
+   */
+  function getElements() {
+    var elements = html5.elements;
+    return typeof elements == 'string' ? elements.split(' ') : elements;
+  }
+
+    /**
+   * Returns the data associated to the given document
+   * @private
+   * @param {Document} ownerDocument The document.
+   * @returns {Object} An object of data.
+   */
+  function getExpandoData(ownerDocument) {
+    var data = expandoData[ownerDocument[expando]];
+    if (!data) {
+        data = {};
+        expanID++;
+        ownerDocument[expando] = expanID;
+        expandoData[expanID] = data;
+    }
+    return data;
+  }
+
+  /**
+   * returns a shived element for the given nodeName and document
+   * @memberOf html5
+   * @param {String} nodeName name of the element
+   * @param {Document} ownerDocument The context document.
+   * @returns {Object} The shived element.
+   */
+  function createElement(nodeName, ownerDocument, data){
+    if (!ownerDocument) {
+        ownerDocument = document;
+    }
+    if(supportsUnknownElements){
+        return ownerDocument.createElement(nodeName);
+    }
+    if (!data) {
+        data = getExpandoData(ownerDocument);
+    }
+    var node;
+
+    if (data.cache[nodeName]) {
+        node = data.cache[nodeName].cloneNode();
+    } else if (saveClones.test(nodeName)) {
+        node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
+    } else {
+        node = data.createElem(nodeName);
+    }
+
+    // Avoid adding some elements to fragments in IE < 9 because
+    // * Attributes like `name` or `type` cannot be set/changed once an element
+    //   is inserted into a document/fragment
+    // * Link elements with `src` attributes that are inaccessible, as with
+    //   a 403 response, will cause the tab/window to crash
+    // * Script elements appended to fragments will execute when their `src`
+    //   or `text` property is set
+    return node.canHaveChildren && !reSkip.test(nodeName) ? 
data.frag.appendChild(node) : node;
+  }
+
+  /**
+   * returns a shived DocumentFragment for the given document
+   * @memberOf html5
+   * @param {Document} ownerDocument The context document.
+   * @returns {Object} The shived DocumentFragment.
+   */
+  function createDocumentFragment(ownerDocument, data){
+    if (!ownerDocument) {
+        ownerDocument = document;
+    }
+    if(supportsUnknownElements){
+        return ownerDocument.createDocumentFragment();
+    }
+    data = data || getExpandoData(ownerDocument);
+    var clone = data.frag.cloneNode(),
+        i = 0,
+        elems = getElements(),
+        l = elems.length;
+    for(;i<l;i++){
+        clone.createElement(elems[i]);
+    }
+    return clone;
+  }
+
+  /**
+   * Shivs the `createElement` and `createDocumentFragment` methods of the 
document.
+   * @private
+   * @param {Document|DocumentFragment} ownerDocument The document.
+   * @param {Object} data of the document.
+   */
+  function shivMethods(ownerDocument, data) {
+    if (!data.cache) {
+        data.cache = {};
+        data.createElem = ownerDocument.createElement;
+        data.createFrag = ownerDocument.createDocumentFragment;
+        data.frag = data.createFrag();
+    }
+
+
+    ownerDocument.createElement = function(nodeName) {
+      //abort shiv
+      if (!html5.shivMethods) {
+          return data.createElem(nodeName);
+      }
+      return createElement(nodeName, ownerDocument, data);
+    };
+
+    ownerDocument.createDocumentFragment = Function('h,f', 'return 
function(){' +
+      'var n=f.cloneNode(),c=n.createElement;' +
+      'h.shivMethods&&(' +
+        // unroll the `createElement` calls
+        getElements().join().replace(/[\w\-]+/g, function(nodeName) {
+          data.createElem(nodeName);
+          data.frag.createElement(nodeName);
+          return 'c("' + nodeName + '")';
+        }) +
+      ');return n}'
+    )(html5, data.frag);
+  }
+
+  
/*--------------------------------------------------------------------------*/
+
+  /**
+   * Shivs the given document.
+   * @memberOf html5
+   * @param {Document} ownerDocument The document to shiv.
+   * @returns {Document} The shived document.
+   */
+  function shivDocument(ownerDocument) {
+    if (!ownerDocument) {
+        ownerDocument = document;
+    }
+    var data = getExpandoData(ownerDocument);
+
+    if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
+      data.hasCSS = !!addStyleSheet(ownerDocument,
+        // corrects block display not defined in IE6/7/8/9
+        
'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}'
 +
+        // adds styling not present in IE6/7/8/9
+        'mark{background:#FF0;color:#000}' +
+        // hides non-rendered elements
+        'template{display:none}'
+      );
+    }
+    if (!supportsUnknownElements) {
+      shivMethods(ownerDocument, data);
+    }
+    return ownerDocument;
+  }
+
+  
/*--------------------------------------------------------------------------*/
+
+  /**
+   * The `html5` object is exposed so that more elements can be shived and
+   * existing shiving can be detected on iframes.
+   * @type Object
+   * @example
+   *
+   * // options can be changed before the script is included
+   * html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': 
false };
+   */
+  var html5 = {
+
+    /**
+     * An array or space separated string of node names of the elements to 
shiv.
+     * @memberOf html5
+     * @type Array|String
+     */
+    'elements': options.elements || 'abbr article aside audio bdi canvas data 
datalist details dialog figcaption figure footer header hgroup main mark meter 
nav output progress section summary template time video',
+
+    /**
+     * current version of html5shiv
+     */
+    'version': version,
+
+    /**
+     * A flag to indicate that the HTML5 style sheet should be inserted.
+     * @memberOf html5
+     * @type Boolean
+     */
+    'shivCSS': (options.shivCSS !== false),
+
+    /**
+     * Is equal to true if a browser supports creating unknown/HTML5 elements
+     * @memberOf html5
+     * @type boolean
+     */
+    'supportsUnknownElements': supportsUnknownElements,
+
+    /**
+     * A flag to indicate that the document's `createElement` and 
`createDocumentFragment`
+     * methods should be overwritten.
+     * @memberOf html5
+     * @type Boolean
+     */
+    'shivMethods': (options.shivMethods !== false),
+
+    /**
+     * A string to describe the type of `html5` object ("default" or "default 
print").
+     * @memberOf html5
+     * @type String
+     */
+    'type': 'default',
+
+    // shivs the document according to the specified `html5` object options
+    'shivDocument': shivDocument,
+
+    //creates a shived element
+    createElement: createElement,
+
+    //creates a shived documentFragment
+    createDocumentFragment: createDocumentFragment
+  };
+
+  
/*--------------------------------------------------------------------------*/
+
+  // expose html5
+  window.html5 = html5;
+
+  // shiv the document
+  shivDocument(document);
+
+}(this, document));

Modified: branches/Version-1_0-branch/phpgwapi/templates/pure/navbar.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/templates/pure/navbar.inc.php  
2014-08-21 12:43:27 UTC (rev 12063)
+++ branches/Version-1_0-branch/phpgwapi/templates/pure/navbar.inc.php  
2014-08-21 12:47:46 UTC (rev 12064)
@@ -259,7 +259,7 @@
                                $history_url[] ="<a 
href='{$breadcrumb['url']}'>{$breadcrumb['name']}</a>";
                        }
                        $breadcrumbs = '<div class="breadcrumbs"><h4>' . 
implode(' >> ', $history_url) . '</h4></div>';
-                       echo $breadcrumbs;
+//                     echo $breadcrumbs;
                }
 
 

Modified: branches/Version-1_0-branch/phpsysinfo/inc/class.menu.inc.php
===================================================================
--- branches/Version-1_0-branch/phpsysinfo/inc/class.menu.inc.php       
2014-08-21 12:43:27 UTC (rev 12063)
+++ branches/Version-1_0-branch/phpsysinfo/inc/class.menu.inc.php       
2014-08-21 12:47:46 UTC (rev 12064)
@@ -53,7 +53,7 @@
                                                'url'   => 
$GLOBALS['phpgw']->link('/phpsysinfo/index.php')
                                                                . '" 
onclick="window.open(\''
                                                                . 
$GLOBALS['phpgw']->link('/phpsysinfo/index.php')
-                                                               . '\'); return 
false;"',
+                                                               . '\'); return 
false;',
                                        'image' => array('admin', 'php')
                                );
 

Modified: branches/Version-1_0-branch/property/inc/class.bodocument.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.bodocument.inc.php   
2014-08-21 12:43:27 UTC (rev 12063)
+++ branches/Version-1_0-branch/property/inc/class.bodocument.inc.php   
2014-08-21 12:47:46 UTC (rev 12064)
@@ -180,6 +180,41 @@
                        return $documents;
                }
 
+               function read2($data)
+               {
+                       $documents = $this->so->read2($data);
+                       $this->total_records = $this->so->total_records;
+
+                       $this->uicols   = $this->so->uicols;
+                       $cols_extra             = $this->so->cols_extra;
+
+                       $dateformat = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
+                       foreach ($documents as &$document)
+                       {
+                               $location_data  = 
$this->solocation->read_single($document['location_code']);
+
+                               if(isset($location_data['street_name']) && 
$location_data['street_name'])
+                               {
+                                       $document['address'] = 
"{$location_data['street_name']} {$location_data['street_number']}";
+                               }
+                               elseif($location_data['loc2_name'])
+                               {
+                                       $document['address'] = 
$location_data['loc2_name'];
+                               }
+                               elseif($location_data['loc1_name'])
+                               {
+                                       $document['address'] = 
$location_data['loc1_name'];
+                               }
+
+                               for ($j=0;$j<count($cols_extra);$j++)
+                               {
+                                       $document[$cols_extra[$j]] = 
$location_data[$cols_extra[$j]];
+                               }
+                       }
+
+                       return $documents;
+               }
+
                function get_files_at_location($data)
                {
                        return $this->so->get_files_at_location($data);

Modified: branches/Version-1_0-branch/property/inc/class.boworkorder.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.boworkorder.inc.php  
2014-08-21 12:43:27 UTC (rev 12063)
+++ branches/Version-1_0-branch/property/inc/class.boworkorder.inc.php  
2014-08-21 12:47:46 UTC (rev 12064)
@@ -229,6 +229,37 @@
                                        'name'=> lang('end date'),
                                        'sortable'      => true
                                );
+                       $columns['tender_deadline'] = array
+                               (
+                                       'id' => 'tender_deadline',
+                                       'name'=> lang('tender deadline'),
+                                       'sortable'      => true
+                               );
+                       $columns['tender_received'] = array
+                               (
+                                       'id' => 'tender_received',
+                                       'name'=> lang('tender received'),
+                                       'sortable'      => true
+                               );
+
+                       $columns['tender_delay'] = array
+                               (
+                                       'id' => 'tender_delay',
+                                       'name'=> lang('tender delay'),
+                                       'sortable'      => false
+                               );
+                       $columns['inspection_on_completion'] = array
+                               (
+                                       'id' => 'inspection_on_completion',
+                                       'name'=> lang('inspection on 
completion'),
+                                       'sortable'      => true
+                               );
+                       $columns['end_date_delay'] = array
+                               (
+                                       'id' => 'end_date_delay',
+                                       'name'=> lang('end date delay'),
+                                       'sortable'      => false
+                               );
                        $columns['billable_hours'] = array
                                (
                                        'id' => 'billable_hours',
@@ -512,9 +543,16 @@
 
                        foreach ($workorder as &$entry)
                        {
-                               $entry['entry_date'] = 
$GLOBALS['phpgw']->common->show_date($entry['entry_date'],$dateformat);
-                               $entry['start_date'] = 
$GLOBALS['phpgw']->common->show_date($entry['start_date'],$dateformat);
-                               $entry['end_date'] = 
$GLOBALS['phpgw']->common->show_date($entry['end_date'],$dateformat);
+                               $entry['tender_delay']                          
= phpgwapi_datetime::get_working_days($entry['tender_deadline'], 
$entry['tender_received']);
+                               $entry['end_date_delay']                        
= phpgwapi_datetime::get_working_days($entry['end_date'], 
$entry['inspection_on_completion']);
+
+                               //Formatting
+                               $entry['entry_date']                            
= $GLOBALS['phpgw']->common->show_date($entry['entry_date'],$dateformat);
+                               $entry['start_date']                            
= $GLOBALS['phpgw']->common->show_date($entry['start_date'],$dateformat);
+                               $entry['end_date']                              
        = $GLOBALS['phpgw']->common->show_date($entry['end_date'],$dateformat);
+                               $entry['tender_deadline']                       
= $GLOBALS['phpgw']->common->show_date($entry['tender_deadline'],$dateformat);
+                               $entry['tender_received']                       
= $GLOBALS['phpgw']->common->show_date($entry['tender_received'],$dateformat);
+                               $entry['inspection_on_completion']      = 
$GLOBALS['phpgw']->common->show_date($entry['inspection_on_completion'],$dateformat);
                        }
 
                        return $workorder;
@@ -529,10 +567,17 @@
 
                        $contacts       = CreateObject('property.sogeneric');
                        $contacts->get_location_info('vendor',false);
-                       $workorder                                              
= $this->so->read_single($workorder_id);
-                       $dateformat                                             
= $GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
-                       $workorder['start_date']                = 
$GLOBALS['phpgw']->common->show_date($workorder['start_date'],$dateformat);
-                       $workorder['end_date']                  = 
$GLOBALS['phpgw']->common->show_date($workorder['end_date'],$dateformat);
+                       $workorder                                              
                = $this->so->read_single($workorder_id);
+                       $dateformat                                             
                = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
+                       //Delay;
+                       $workorder['tender_delay']                              
= phpgwapi_datetime::get_working_days($workorder['tender_deadline'], 
$workorder['tender_received']);
+                       $workorder['end_date_delay']                    = 
phpgwapi_datetime::get_working_days($workorder['end_date'], 
$workorder['inspection_on_completion']);
+                       //formtatting
+                       $workorder['start_date']                                
= $GLOBALS['phpgw']->common->show_date($workorder['start_date'],$dateformat);
+                       $workorder['end_date']                                  
= $GLOBALS['phpgw']->common->show_date($workorder['end_date'],$dateformat);
+                       $workorder['tender_deadline']                   = 
$GLOBALS['phpgw']->common->show_date($workorder['tender_deadline'],$dateformat);
+                       $workorder['tender_received']                   = 
$GLOBALS['phpgw']->common->show_date($workorder['tender_received'],$dateformat);
+                       $workorder['inspection_on_completion']  = 
$GLOBALS['phpgw']->common->show_date($workorder['inspection_on_completion'],$dateformat);
 
                        if(isset($workorder['vendor_id']) && 
$workorder['vendor_id'])
                        {
@@ -752,9 +797,12 @@
 
                function save($workorder,$action='')
                {
-                       $workorder['start_date']        = 
$this->bocommon->date_to_timestamp($workorder['start_date']);
-                       $workorder['end_date']  = 
$this->bocommon->date_to_timestamp($workorder['end_date']);
-                       $workorder['location_code'] = 
isset($workorder['location']) && $workorder['location'] ? 
implode('-',$workorder['location']) : '';
+                       $workorder['start_date']                                
= $this->bocommon->date_to_timestamp($workorder['start_date']);
+                       $workorder['end_date']                                  
= $this->bocommon->date_to_timestamp($workorder['end_date']);
+                       $workorder['tender_deadline']                   = 
$this->bocommon->date_to_timestamp($workorder['tender_deadline']);
+                       $workorder['tender_received']                   = 
$this->bocommon->date_to_timestamp($workorder['tender_received']);
+                       $workorder['inspection_on_completion']  = 
$this->bocommon->date_to_timestamp($workorder['inspection_on_completion']);
+                       $workorder['location_code']                             
= isset($workorder['location']) && $workorder['location'] ? 
implode('-',$workorder['location']) : '';
 
                        if ($action=='edit')
                        {

Modified: branches/Version-1_0-branch/property/inc/class.menu.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.menu.inc.php 2014-08-21 
12:43:27 UTC (rev 12063)
+++ branches/Version-1_0-branch/property/inc/class.menu.inc.php 2014-08-21 
12:47:46 UTC (rev 12064)
@@ -398,7 +398,7 @@
                                                        'url'   => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'admin.uiconfig.index', 'appname' => 'property') ),
                                                        'children'      => array
                                                        (
-                                                               'custom config' 
=> array
+                                                               'custom_config' 
=> array
                                                                (
                                                                        'text'  
=> lang('custom config'),
                                                                        'url'   
=> $GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'admin.uiconfig2.index', 'location_id' => 
$GLOBALS['phpgw']->locations->get_id('property', '.admin')) )

Modified: branches/Version-1_0-branch/property/inc/class.sodocument.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.sodocument.inc.php   
2014-08-21 12:43:27 UTC (rev 12063)
+++ branches/Version-1_0-branch/property/inc/class.sodocument.inc.php   
2014-08-21 12:47:46 UTC (rev 12064)
@@ -84,18 +84,55 @@
                        return $branch;
                }
 
+               function read2($data)
+               {
+                       $columns = $data['columns'];
+                       $params =  $data['params'];
+                       $ordermethod_arr = array();
+
+                       if(isset($params['order']) && 
is_array($params['order']))
+                       {
+                               foreach ($params['order'] as &$order)
+                               {
+       //                              $ordermethod_arr[] = 
"{$columns[$order['column']]['key']} {$order['dir']}";
+                               }
+                       }
+
+                       $ordermethod = ' ';
+                       if($ordermethod_arr)
+                       {
+                               $ordermethod = 'ORDER BY ' . implode(',', 
$ordermethod_arr);
+                       }
+
+                       $values = $this->read(array     (
+                               'start'                 => 
isset($params['start']) && $params['start'] ? $params['start'] : 0,
+                               'filter'                => 
isset($params['filter'])?$params['filter']:'',
+                               'query'                 => 
isset($params['query'])?$params['query']:'',
+                               'sort'                  => 
isset($params['sort']) && $params['sort'] ? $params['sort'] : 'DESC',
+                               'order'                 => 
isset($params['order'])?$params['order']:'',
+                               'ordermethod'   => $ordermethod,
+                               'cat_id'                => 
isset($params['cat_id']) && $params['cat_id'] ? $params['cat_id']:0,
+                               'entity_id'             => 
isset($params['entity_id'])?$params['entity_id']:'',
+                               'doc_type'              => 
isset($params['doc_type']) && $params['doc_type'] ? $params['doc_type']: 0,
+                               'allrows'               => 
isset($params['allrows'])?$params['allrows']:'',
+                       ));
+                       return $values;
+
+               }
                function read($data)
                {
                        if(is_array($data))
                        {
-                               $start          = isset($data['start']) && 
$data['start'] ? $data['start'] : 0;
-                               $filter         = 
isset($data['filter'])?$data['filter']:'';
-                               $query          = 
isset($data['query'])?$data['query']:'';
-                               $sort           = isset($data['sort']) && 
$data['sort'] ? $data['sort'] : 'DESC';
-                               $order          = 
isset($data['order'])?$data['order']:'';
-                               $cat_id         = isset($data['cat_id']) && 
$data['cat_id'] ? $data['cat_id']:0;
-                               $entity_id      = 
isset($data['entity_id'])?$data['entity_id']:'';
-                               $doc_type       = isset($data['doc_type']) && 
$data['doc_type'] ? $data['doc_type']: 0;
+                               $start                  = isset($data['start']) 
&& $data['start'] ? $data['start'] : 0;
+                               $filter                 = 
isset($data['filter'])?$data['filter']:'';
+                               $query                  = 
isset($data['query'])?$data['query']:'';
+                               $sort                   = isset($data['sort']) 
&& $data['sort'] ? $data['sort'] : 'DESC';
+                               $order                  = 
isset($data['order'])?$data['order']:'';
+                               $ordermethod    = 
isset($data['ordermethod'])?$data['ordermethod']:'';
+                               $cat_id                 = 
isset($data['cat_id']) && $data['cat_id'] ? $data['cat_id']:0;
+                               $entity_id              = 
isset($data['entity_id'])?$data['entity_id']:'';
+                               $doc_type               = 
isset($data['doc_type']) && $data['doc_type'] ? $data['doc_type']: 0;
+                               $allrows                = 
isset($data['allrows'])?$data['allrows']:'';
                        }
 
                        $doc_types = $this->get_sub_doc_types($doc_type);
@@ -185,11 +222,11 @@
                        //FIXME
                        $groupmethod = '';
 
-                       if ($order)
+                       if (!$ordermethod && $order)
                        {
                                $ordermethod = " order by fm_document.$order 
$sort";
                        }
-                       else
+                       else if (!$ordermethod)
                        {
                                $ordermethod = ' order by 
fm_document.location_code ASC';
                        }
@@ -242,8 +279,17 @@
 
                        $this->db->query($sql,__LINE__,__FILE__);
                        $this->total_records = $this->db->num_rows();
-                       $this->db->limit_query($sql . 
$ordermethod,$start,__LINE__,__FILE__);
 
+                       if(!$allrows)
+                       {
+                               $this->db->limit_query($sql . 
$ordermethod,$start,__LINE__,__FILE__);
+                       }
+                       else
+                       {
+                               $this->db->query($sql . 
$ordermethod,__LINE__,__FILE__);
+                       }
+
+
                        $document_list = array();
                        $j=0;
                        while ($this->db->next_record())

Modified: branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php  
2014-08-21 12:43:27 UTC (rev 12063)
+++ branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php  
2014-08-21 12:47:46 UTC (rev 12064)
@@ -231,6 +231,13 @@
                                $cols_return[]   = 'start_date';
                                $cols .= ",fm_workorder.end_date as end_date";
                                $cols_return[]   = 'end_date';
+                               $cols .= ",fm_workorder.tender_deadline as 
tender_deadline";
+                               $cols_return[]   = 'tender_deadline';
+                               $cols .= ",fm_workorder.tender_received as 
tender_received";
+                               $cols_return[]   = 'tender_received';
+                               $cols .= 
",fm_workorder.inspection_on_completion as inspection_on_completion";
+                               $cols_return[]   = 'inspection_on_completion';
+
                                $cols.= ",fm_project.ecodimb";
                                $cols_return[]   = 'ecodimb';
                                $cols.= ",fm_workorder.contract_sum";
@@ -493,6 +500,18 @@
                                                $order_field = ", 
fm_workorder.end_date";
                                                $ordermethod = " ORDER BY 
fm_workorder.end_date {$sort}, fm_workorder.id";
                                                break;
+                                       case 'tender_deadline':
+                                               $order_field = ", 
fm_workorder.tender_deadline";
+                                               $ordermethod = " ORDER BY 
fm_workorder.tender_deadline {$sort}, fm_workorder.id";
+                                               break;
+                                       case 'tender_received':
+                                               $order_field = ", 
fm_workorder.tender_received";
+                                               $ordermethod = " ORDER BY 
fm_workorder.tender_received {$sort}, fm_workorder.id";
+                                               break;
+                                       case 'inspection_on_completion':
+                                               $order_field = ", 
fm_workorder.inspection_on_completion";
+                                               $ordermethod = " ORDER BY 
fm_workorder.inspection_on_completion {$sort}, fm_workorder.id";
+                                               break;
                                        case 'ecodimb':
                                                $order_field = ", 
fm_project.ecodimb";
                                                $ordermethod = " ORDER BY 
fm_workorder.ecodimb {$sort}, fm_workorder.id";
@@ -893,14 +912,17 @@
                                        'b_account_id'                   => 
(int) $this->db->f('account_id'),
                                        'addition_percentage'    => (int) 
$this->db->f('addition'),
                                        'addition_rs'                    => 
(int) $this->db->f('rig_addition'),
-                                       //              'act_mtrl_cost'         
        => $this->db->f('act_mtrl_cost'),
-                                       //              'act_vendor_cost'       
        => $this->db->f('act_vendor_cost'),
+                       //              'act_mtrl_cost'                 => 
$this->db->f('act_mtrl_cost'),
+                       //              'act_vendor_cost'               => 
$this->db->f('act_vendor_cost'),
                                        'user_id'                               
 => $this->db->f('user_id'),
                                        'vendor_id'                             
 => $this->db->f('vendor_id'),
-                                       //              'coordinator'           
        => $this->db->f('coordinator'),
+                       //              'coordinator'                   => 
$this->db->f('coordinator'),
                                        'access'                                
 => $this->db->f('access'),
                                        'start_date'                     => 
$this->db->f('start_date'),
                                        'end_date'                              
 => $this->db->f('end_date'),
+                                       'tender_deadline'                => 
$this->db->f('tender_deadline'),
+                                       'tender_received'                => 
$this->db->f('tender_received'),
+                                       'inspection_on_completion'      => 
$this->db->f('inspection_on_completion'),
                                        'cat_id'                                
 => $this->db->f('category'),
                                        'chapter_id'                     => 
$this->db->f('chapter_id'),
                                        'chapter'                               
 => $this->db->f('chapter'),
@@ -1189,6 +1211,9 @@
                                time(),
                                $workorder['start_date'],
                                $workorder['end_date'],
+                               $workorder['tender_deadline'],
+                               $workorder['tender_received'],
+                               $workorder['inspection_on_completion'],
                                $workorder['status'],
                                $workorder['descr'],
                                (int) $workorder['budget'],
@@ -1213,7 +1238,8 @@
 
                        $values = $this->db->validate_insert($values);
 
-                       $this->db->query("INSERT INTO fm_workorder 
(id,num,project_id,title,access,entry_date,start_date,end_date,status,"
+                       $this->db->query("INSERT INTO fm_workorder 
(id,num,project_id,title,access,entry_date,start_date,end_date,tender_deadline,"
+                       . "tender_received,inspection_on_completion,status,"
                        . 
"descr,budget,combined_cost,account_id,rig_addition,addition,key_deliver,key_fetch,vendor_id,charge_tenant,"
                        . 
"user_id,ecodimb,category,billable_hours,contract_sum,approved,continuous,fictive_periodization,mail_recipients
  $cols) "
                        . "VALUES ( {$values} {$vals})", __LINE__, __FILE__);
@@ -1330,29 +1356,30 @@
 
                        $value_set = array
                        (
-                               'title'                                  => 
$workorder['title'],
-                               'status'                                 => 
$workorder['status'],
-                               'start_date'                     => 
$workorder['start_date'],
-                               'end_date'                               => 
$workorder['end_date'],
-                               'descr'                                  => 
$workorder['descr'],
-                               'budget'                                 => 
(int) $workorder['budget'],
-//                             'combined_cost'                 => 
$combined_cost,
-                               'key_deliver'                    => 
$workorder['key_deliver'],
-                               'key_fetch'                              => 
$workorder['key_fetch'],
-                               'account_id'                     => 
$workorder['b_account_id'],
-                               'rig_addition'                   => 
$workorder['addition_rs'],
-                               'addition'                               => 
$workorder['addition_percentage'],
-                               'charge_tenant'                  => 
$workorder['charge_tenant'],
-                               'vendor_id'                              => 
$workorder['vendor_id'],
-                               'user_id'                                => 
$workorder['user_id'],
-                               'ecodimb'                                => 
$workorder['ecodimb'],
-                               'category'                               => 
$workorder['cat_id'],
-                               'billable_hours'                 => 
$workorder['billable_hours'],
-//                             'contract_sum'                  => 
$workorder['contract_sum'],
-                               'approved'                               => 
$workorder['approved'],
-                               'continuous'                     => 
$workorder['continuous'],
-                               'fictive_periodization'  => 
$workorder['fictive_periodization'],
-                               'mail_recipients'                => 
isset($workorder['vendor_email']) && is_array($workorder['vendor_email']) ? 
implode(',', $workorder['vendor_email']) : '',
+                               'title'                                         
=> $workorder['title'],
+                               'status'                                        
=> $workorder['status'],
+                               'start_date'                            => 
$workorder['start_date'],
+                               'end_date'                                      
=> $workorder['end_date'],
+                               'tender_deadline'                       => 
$workorder['tender_deadline'],
+                               'tender_received'                       => 
$workorder['tender_received'],
+                               'inspection_on_completion'      => 
$workorder['inspection_on_completion'],
+                               'descr'                                         
=> $workorder['descr'],
+                               'budget'                                        
=> (int) $workorder['budget'],
+                               'key_deliver'                           => 
$workorder['key_deliver'],
+                               'key_fetch'                                     
=> $workorder['key_fetch'],
+                               'account_id'                            => 
$workorder['b_account_id'],
+                               'rig_addition'                          => 
$workorder['addition_rs'],
+                               'addition'                                      
=> $workorder['addition_percentage'],
+                               'charge_tenant'                         => 
$workorder['charge_tenant'],
+                               'vendor_id'                                     
=> $workorder['vendor_id'],
+                               'user_id'                                       
=> $workorder['user_id'],
+                               'ecodimb'                                       
=> $workorder['ecodimb'],
+                               'category'                                      
=> $workorder['cat_id'],
+                               'billable_hours'                        => 
$workorder['billable_hours'],
+                               'approved'                                      
=> $workorder['approved'],
+                               'continuous'                            => 
$workorder['continuous'],
+                               'fictive_periodization'         => 
$workorder['fictive_periodization'],
+                               'mail_recipients'                       => 
isset($workorder['vendor_email']) && is_array($workorder['vendor_email']) ? 
implode(',', $workorder['vendor_email']) : '',
                        );
 
 
@@ -1417,10 +1444,8 @@
 
                        $this->activate_period_from_budget($workorder['id'], 
$_active_period);
 
-                       unset($_close_period);
                        unset($_active_period);
 
-
                        if($workorder['delete_b_period'])
                        {
                                $this->db->query("SELECT sum(budget) AS budget 
FROM fm_workorder_budget WHERE order_id = '{$workorder['id']}'", __LINE__, 
__FILE__);

Modified: 
branches/Version-1_0-branch/property/inc/class.uicondition_survey.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uicondition_survey.inc.php   
2014-08-21 12:43:27 UTC (rev 12063)
+++ branches/Version-1_0-branch/property/inc/class.uicondition_survey.inc.php   
2014-08-21 12:47:46 UTC (rev 12064)
@@ -1217,7 +1217,7 @@
                        if ($quotient >= 1)
                        {
                                //If yes, get top level column + the current 
column code
-                               return getexcelcolumnname($quotient-1). 
chr(($index % 26)+65);
+                               return $this->getexcelcolumnname($quotient-1). 
chr(($index % 26)+65);
                        }
                        else
                        {

Modified: branches/Version-1_0-branch/property/inc/class.uidocument2.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uidocument2.inc.php  
2014-08-21 12:43:27 UTC (rev 12063)
+++ branches/Version-1_0-branch/property/inc/class.uidocument2.inc.php  
2014-08-21 12:47:46 UTC (rev 12064)
@@ -59,7 +59,7 @@
 
                public function __construct()
                {
-                       parent::__construct('', 'yui3');
+                       parent::__construct(); //'', 'yui3');
 
                        $this->bo                                       = 
CreateObject('property.bodocument');
                        $this->bocommon                         = & 
$this->bo->bocommon;
@@ -110,11 +110,6 @@
            $columns = array();
 
                        $columns[] = array(
-                                                       'key' => 'id',
-                                                       'label' => 'id',
-                                                       'hidden' => true
-                                               );
-                       $columns[] = array(
                                                        'key' => 'loc1',
                                                        'label' => 
lang('property'),
                                                        'sortable' => true,
@@ -141,7 +136,9 @@
                                                );
                        $columns[] = array(
                                                        'key' => 'link',
-                                                       'hidden' => true
+                                                       'label' => 'dummy',
+                                                       'hidden' => true,
+                                                       'sortable' => false,
                                                );
 
 
@@ -157,15 +154,32 @@
                                return;
                        }
 
+                       //FIXME:Responsive(js/css) - shows 'hidden' columns...
                        phpgwapi_jquery::load_widget('core');
                        self::add_javascript('phpgwapi', 'DataTables', 
'media/js/jquery.dataTables.min.js');
+                       self::add_javascript('phpgwapi', 'DataTables', 
'extensions/Responsive/js/dataTables.responsive.min.js');
+                       self::add_javascript('phpgwapi', 'DataTables', 
'extensions/ColVis/js/dataTables.colVis.min.js');
+                       self::add_javascript('phpgwapi', 'DataTables', 
'extensions/TableTools/js/dataTables.tableTools.js');
 
+//                     self::add_javascript('phpgwapi', 'jquery-mobile', 
'jquery.mobile-1.4.3.min.js');
+
+                       //FIXME: working?
+//                     self::add_javascript('phpgwapi', 'DataTables', 
'media/js/jquery.dataTables.columnFilter.js');
+
+                       
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/DataTables/media/css/jquery.dataTables.css');
+                       
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/DataTables/extensions/Responsive/css/dataTables.responsive.css');
+                       
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/DataTables/extensions/ColVis/css/dataTables.colVis.min.css');
+                       
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/DataTables/extensions/ColVis/css/dataTables.colvis.jqueryui.css');
+                       
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/DataTables/extensions/TableTools/css/dataTables.tableTools.css');
+//                     
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/jquery-mobile/jquery.mobile-1.4.3.min.css');
+
+
                        if (phpgw::get_var('phpgw_return_as') == 'json')
                        {
                                return $this->query();
                        }
 
-                       self::add_javascript('phpgwapi', 'yui3', 
'datatable.js');
+//                     self::add_javascript('phpgwapi', 'yui3', 
'datatable.js');
 //                     phpgwapi_yui::load_widget('datatable');
 //                     phpgwapi_yui::load_widget('paginator');
 
@@ -183,40 +197,29 @@
                                                                'text' => 
lang('category') . ':',
                                                                'list' => 
$categories,
                                                        ),
-                                                       array('type' => 'text',
-                                                               'text' => 
lang('search'),
-                                                               'name' => 
'query'
-                                                       ),
                                                        array(
-                                                               'type' => 
'submit',
-                                                               'name' => 
'search',
-                                                               'value' => 
lang('Search')
-                                                       ),
-                                                       array(
                                                                'type' => 
'link',
                                                                'value' => 
lang('new'),
-                                                               'href' => 
self::link(array('menuaction' => 'property.uidocument2.add')),
+                                                               'href' => 
self::link(array('menuaction' => 'property.uidocument.edit')),
                                                                'class' => 
'new_item'
                                                        ),
-                                                       array(
+/*                                                     array(
                                                                'type' => 
'link',
                                                                'value' => 
lang('download'),
                                                                'href' => 
'javascript:window.open("'. self::link(array('menuaction' => 
'property.uidocument2.download', 'export' => true, 'allrows' => true)) . 
'","window")',
                                                                'class' => 
'new_item'
-                                                       ),
-                                                       array(
-                                                               'type' => 
'link',
-                                                               'value' => 
$_SESSION['allrows'] ? lang('Show only active') : lang('Show all'),
-                                                               'href' => 
self::link(array('menuaction' => 'property.uidocument2.index', 'allrows' => 
true))
-                                                       ),
-
+                                                       )*/
                                                ),
                                        ),
                                ),
                                'datatable' => array(
                                        'source' => 
self::link(array('menuaction' => 'property.uidocument2.index', 
'phpgw_return_as' => 'json')),
                                        'editor_action' => 
'property.uidocument2.edit_survey_title',
-                                       'field' => $columns
+                                       'field' => $columns,
+                                       'allrows'       => true,
+                               //      'left_click_action'     => 
'console.log',
+                               //      'dbl_click_action'      => 'alert', // 
Only one of them (or none..)
+                                       'download'      => 
self::link(array('menuaction' => 'property.uidocument2.download', 'export' => 
true, 'allrows' => true)),
                                ),
                        );
 
@@ -229,6 +232,11 @@
                                                        'name'          => 'id',
                                                        'source'        => 'id'
                                                ),
+                                               array
+                                               (
+                                                       'name'          => 
'loc1',
+                                                       'source'        => 
'loc1'
+                                               ),
                                        )
                                );
 
@@ -302,35 +310,37 @@
 
                public function query()
                {
-                       $params = array(
-                               'start' => phpgw::get_var('startIndex', 'int', 
'REQUEST', 0),
-                               'results' => phpgw::get_var('results', 'int', 
'REQUEST', 0),
-                               'query' => phpgw::get_var('query'),
-                               'sort' => phpgw::get_var('sort'),
-                               'dir' => phpgw::get_var('dir'),
+                       $search = phpgw::get_var('search');
+                       $order = phpgw::get_var('order');
+                       $draw = phpgw::get_var('draw', 'int');
+
+                       $columns = $this->_get_columns();
+
+
+                       $params = array
+                       (
+                               'start' => phpgw::get_var('start', 'int', 
'REQUEST', 0),
+                               'results' => phpgw::get_var('length', 'int', 
'REQUEST', 0),
+                               'query' => $search['value'],
+                               'order' => $order,
                                'cat_id' => phpgw::get_var('cat_id', 'int', 
'REQUEST', 0),
-                               'allrows' => phpgw::get_var('allrows', 'bool')
+                               'allrows' => phpgw::get_var('length', 'int') == 
-1
                        );
 
-                       $result_objects = array();
-                       $result_count = 0;
+                       $values = $this->bo->read2(array('columns' => $columns, 
'params' => $params));
 
-                       $values = $this->bo->read($params);
                        if ( phpgw::get_var('export', 'bool'))
                        {
                                return $values;
                        }
 
                        $result_data = array('results' => $values);
-
                        $result_data['total_records'] = 
$this->bo->total_records;
-                       $result_data['start'] = $params['start'];
-                       $result_data['sort'] = $params['sort'];
-                       $result_data['dir'] = $params['dir'];
+                       $result_data['draw'] = $draw;
 
                        array_walk(     $result_data['results'], array($this, 
'_add_links'), "property.uidocument2.view" );
 
-                       return $this->yui_results($result_data);
+                       return $this->jquery_results($result_data);
                }
 
 
@@ -1351,10 +1361,22 @@
                        {
                                if ( $e )
                                {
-                                       return $e->getMessage(); 
+                                       $result =  array
+                                       (
+                                               'status'        => 'deleted',
+                                               'receipt'       => 
$e->getMessage()
+                                       );
+                                       return $result;
                                }
                        }
-                       return 'Deleted';
+
+                       $result =  array
+                       (
+                               'status'        => 'deleted',
+                               'receipt'       => lang('deleted') . " {$id}"
+                       );
+
+                       return $result;
                }
 
                /**

Modified: branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php  
2014-08-21 12:43:27 UTC (rev 12063)
+++ branches/Version-1_0-branch/property/inc/class.uiworkorder.inc.php  
2014-08-21 12:47:46 UTC (rev 12064)
@@ -1708,6 +1708,10 @@
                        
$GLOBALS['phpgw']->jqcal->add_listener('values_start_date');
                        
$GLOBALS['phpgw']->jqcal->add_listener('values_end_date');
 
+                       
$GLOBALS['phpgw']->jqcal->add_listener('values_tender_deadline');
+                       
$GLOBALS['phpgw']->jqcal->add_listener('values_tender_received');
+                       
$GLOBALS['phpgw']->jqcal->add_listener('values_inspection_on_completion');
+
                        if( isset($receipt) && is_array($receipt))
                        {
                                $msgbox_data = 
$this->bocommon->msgbox_data($receipt);
@@ -2094,13 +2098,13 @@
                                'b_group_data'                                  
                => $b_group_data,
                                'b_account_data'                                
                => $b_account_data,
 
-                               'lang_start_date_statustext'                    
=> lang('Select the estimated end date for the Project'),
-                               'lang_start_date'                               
                => lang('Workorder start date'),
                                'value_start_date'                              
                => $values['start_date'],
-
-                               'lang_end_date_statustext'                      
        => lang('Select the estimated end date for the Project'),
-                               'lang_end_date'                                 
                => lang('Workorder end date'),
                                'value_end_date'                                
                => $values['end_date'],
+                               'value_tender_deadline'                         
        => $values['tender_deadline'],
+                               'value_tender_received'                         
        => $values['tender_received'],
+                               'value_tender_delay'                            
        => $values['tender_delay'],
+                               'value_inspection_on_completion'                
=> $values['inspection_on_completion'],
+                               'value_end_date_delay'                          
        => $values['end_date_delay'],
 
                                'lang_copy_workorder'                           
        => lang('Copy workorder ?'),
                                'lang_copy_workorder_statustext'                
=> lang('Choose Copy Workorder to copy this workorder to a new workorder'),

Modified: branches/Version-1_0-branch/property/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/property/setup/phpgw_no.lang    2014-08-21 
12:43:27 UTC (rev 12063)
+++ branches/Version-1_0-branch/property/setup/phpgw_no.lang    2014-08-21 
12:47:46 UTC (rev 12064)
@@ -1962,7 +1962,7 @@
 workorder %1 has been saved    property        no      Bestilling %1 er lagret
 workorder %1 needs approval    property        no      Bestilling %1 venter på 
godkjenning
 workorder detail categories    property        no      Detaljering av 
bestilling
-workorder end date     property        no      Frist for bestilling
+workorder end date     property        no      Sluttdato
 workorder entry date   property        no      Registreringsdato
 workorder id   property        no      Bestilling
 workorder is sent by email!    property        no      Bestilling er sendt pr 
e-post!
@@ -2032,3 +2032,8 @@
 grant category property        no      Tilskuddskategori
 what   property        no      Hva
 fictive periodization  property        no      Periodiser løpende ut året
+tender deadline        property        no      Tilbudsfrist
+tender received        property        no      Mottatt tilbud
+inspection on completion       property        no      Ferdigbefaring
+end date delay property        no      Forsinket utførelse
+tender delay   property        no      Forsinket tilbud
\ No newline at end of file

Modified: branches/Version-1_0-branch/property/setup/setup.inc.php
===================================================================
--- branches/Version-1_0-branch/property/setup/setup.inc.php    2014-08-21 
12:43:27 UTC (rev 12063)
+++ branches/Version-1_0-branch/property/setup/setup.inc.php    2014-08-21 
12:47:46 UTC (rev 12064)
@@ -12,7 +12,7 @@
        */
 
        $setup_info['property']['name']                 = 'property';
-       $setup_info['property']['version']              = '0.9.17.683';
+       $setup_info['property']['version']              = '0.9.17.684';
        $setup_info['property']['app_order']    = 8;
        $setup_info['property']['enable']               = 1;
        $setup_info['property']['app_group']    = 'office';

Modified: branches/Version-1_0-branch/property/setup/tables_current.inc.php
===================================================================
--- branches/Version-1_0-branch/property/setup/tables_current.inc.php   
2014-08-21 12:43:27 UTC (rev 12063)
+++ branches/Version-1_0-branch/property/setup/tables_current.inc.php   
2014-08-21 12:47:46 UTC (rev 12064)
@@ -496,6 +496,9 @@
                                'entry_date' => array('type' => 
'int','precision' => '4','nullable' => False),
                                'start_date' => array('type' => 
'int','precision' => '8','nullable' => False),
                                'end_date' => array('type' => 'int','precision' 
=> '8','nullable' => true),
+                               'tender_deadline' => array('type' => 
'int','precision' => '8','nullable' => true),
+                               'tender_received' => array('type' => 
'int','precision' => '8','nullable' => true),
+                               'inspection_on_completion' => array('type' => 
'int','precision' => '8','nullable' => true),
                                'coordinator' => array('type' => 
'int','precision' => '4','nullable' => True),
                                'vendor_id' => array('type' => 
'int','precision' => '4','nullable' => True),
                                'status' => array('type' => 
'varchar','precision' => '20','nullable' => False,'default' => 'active'),

Modified: branches/Version-1_0-branch/property/setup/tables_update.inc.php
===================================================================
--- branches/Version-1_0-branch/property/setup/tables_update.inc.php    
2014-08-21 12:43:27 UTC (rev 12063)
+++ branches/Version-1_0-branch/property/setup/tables_update.inc.php    
2014-08-21 12:47:46 UTC (rev 12064)
@@ -8065,6 +8065,10 @@
                }
        }
 
+       /**
+       * Update property version from 0.9.17.682 to 0.9.17.683
+       * Add actual cost year to tickets
+       */
        $test[] = '0.9.17.682';
        function property_upgrade0_9_17_682()
        {
@@ -8077,3 +8081,25 @@
                        return $GLOBALS['setup_info']['property']['currentver'];
                }
        }
+
+       /**
+       * Update property version from 0.9.17.681 to 0.9.17.682
+       * Add tender related dates to workorder
+       */
+       $test[] = '0.9.17.683';
+       function property_upgrade0_9_17_683()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+               $GLOBALS['phpgw_setup']->oProc->query("DELETE FROM fm_cache");
+
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_workorder','tender_deadline',array('type'
 => 'int','precision' => 8,'nullable' => True));
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_workorder','tender_received',array('type'
 => 'int','precision' => 8,'nullable' => True));
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_workorder','inspection_on_completion',array('type'
 => 'int','precision' => 8,'nullable' => True));
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['property']['currentver'] = 
'0.9.17.684';
+                       return $GLOBALS['setup_info']['property']['currentver'];
+               }
+       }

Modified: branches/Version-1_0-branch/property/templates/base/location.xsl
===================================================================
--- branches/Version-1_0-branch/property/templates/base/location.xsl    
2014-08-21 12:43:27 UTC (rev 12063)
+++ branches/Version-1_0-branch/property/templates/base/location.xsl    
2014-08-21 12:47:46 UTC (rev 12064)
@@ -654,7 +654,7 @@
                        </table>
                        <xsl:choose>
                                <xsl:when test="values != ''">
-                                       <table width="100%" cellpadding="2" 
cellspacing="2" align="center">
+                                       <table class="pure-table 
pure-table-bordered">
                                                <xsl:call-template 
name="table_header_history"/>
                                                <xsl:call-template 
name="values_history"/>
                                        </table>

Modified: branches/Version-1_0-branch/property/templates/base/workorder.xsl
===================================================================
--- branches/Version-1_0-branch/property/templates/base/workorder.xsl   
2014-08-21 12:43:27 UTC (rev 12063)
+++ branches/Version-1_0-branch/property/templates/base/workorder.xsl   
2014-08-21 12:47:46 UTC (rev 12064)
@@ -26,7 +26,7 @@
                                                <xsl:value-of 
select="lang_add"/>
                                        </xsl:variable>
                                        <form method="post" 
action="{$add_action}">
-                                               <input type="submit" 
class="forms" name="add" value="{$lang_add}" 
onMouseout="window.status='';return true;">
+                                               <input type="submit" 
class="forms" name="add" value="{$lang_add}">
                                                        <xsl:attribute 
name="title">
                                                                <xsl:value-of 
select="lang_add_statustext"/>
                                                        </xsl:attribute>
@@ -39,7 +39,7 @@
                                                <xsl:value-of 
select="lang_search"/>
                                        </xsl:variable>
                                        <form method="post" 
action="{$search_action}">
-                                               <input type="submit" 
class="forms" name="search" value="{$lang_search}" 
onMouseout="window.status='';return true;">
+                                               <input type="submit" 
class="forms" name="search" value="{$lang_search}">
                                                        <xsl:attribute 
name="title">
                                                                <xsl:value-of 
select="lang_search_statustext"/>
                                                        </xsl:attribute>
@@ -52,7 +52,7 @@
                                                <xsl:value-of 
select="lang_done"/>
                                        </xsl:variable>
                                        <form method="post" 
action="{$done_action}">
-                                               <input type="submit" 
class="forms" name="done" value="{$lang_done}" 
onMouseout="window.status='';return true;">
+                                               <input type="submit" 
class="forms" name="done" value="{$lang_done}">
                                                        <xsl:attribute 
name="onMouseover">
                                                                
<xsl:text>window.status='</xsl:text>
                                                                <xsl:value-of 
select="lang_done_statustext"/>
@@ -381,7 +381,7 @@
                                                                        
<xsl:value-of select="lang_descr"/>
                                                                </td>
                                                                <td>
-                                                                       
<textarea cols="60" rows="6" name="values[descr]" 
onMouseout="window.status='';return true;">
+                                                                       
<textarea cols="60" rows="6" name="values[descr]">
                                                                                
<xsl:attribute name="title">
                                                                                
        <xsl:value-of select="lang_descr_statustext"/>
                                                                                
</xsl:attribute>
@@ -463,7 +463,7 @@
                                                                        
<xsl:value-of select="lang_remark"/>
                                                                </td>
                                                                <td>
-                                                                       
<textarea cols="60" rows="6" name="values[remark]" 
onMouseout="window.status='';return true;">
+                                                                       
<textarea cols="60" rows="6" name="values[remark]">
                                                                                
<xsl:attribute name="title">
                                                                                
        <xsl:value-of select="lang_remark_statustext"/>
                                                                                
</xsl:attribute>
@@ -477,29 +477,90 @@
                                                <table cellpadding="2" 
cellspacing="2" width="80%" align="center">
                                                        <tr>
                                                                <td 
valign="top">
-                                                                       
<xsl:value-of select="lang_start_date"/>
+                                                                       
<xsl:value-of select="php:function('lang', 'Workorder start date')"/>
                                                                        <div 
id="ctx"><!--Align lightbox to me--></div> 
                                                                </td>
                                                                <td>
-                                                                       <input 
type="text" id="values_start_date" name="values[start_date]" size="10" 
value="{value_start_date}" readonly="readonly" 
onMouseout="window.status='';return true;">
+                                                                       <input 
type="text" id="values_start_date" name="values[start_date]" size="10" 
value="{value_start_date}" readonly="readonly">
                                                                                
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="lang_start_date_statustext"/>
+                                                                               
<xsl:value-of select="php:function('lang', 'Select the estimated start date for 
the Project')"/>
                                                                                
</xsl:attribute>
                                                                        </input>
                                                                </td>
                                                        </tr>
                                                        <tr>
+                                                               <xsl:variable 
name="lang_end_date">
+                                                                       
<xsl:value-of select="php:function('lang', 'Workorder end date')"/>
+                                                               </xsl:variable>
                                                                <td 
valign="top">
-                                                                       
<xsl:value-of select="lang_end_date"/>
+                                                                       
<xsl:value-of select="$lang_end_date"/>
                                                                </td>
                                                                <td>
-                                                                       <input 
type="text" id="values_end_date" name="values[end_date]" size="10" 
value="{value_end_date}" readonly="readonly" 
onMouseout="window.status='';return true;">
+                                                                       <input 
type="text" id="values_end_date" name="values[end_date]" size="10" 
value="{value_end_date}" readonly="readonly">
                                                                                
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="lang_end_date_statustext"/>
+                                                                               
        <xsl:value-of select="$lang_end_date"/>
                                                                                
</xsl:attribute>
                                                                        </input>
                                                                </td>
                                                        </tr>
+                                                       <tr>
+                                                               <xsl:variable 
name="lang_tender_deadline">
+                                                                       
<xsl:value-of select="php:function('lang', 'tender deadline')"/>
+                                                               </xsl:variable>
+                                                               <td 
valign="top">
+                                                                       
<xsl:value-of select="$lang_tender_deadline"/>
+                                                               </td>
+                                                               <td>
+                                                                       <input 
type="text" id="values_tender_deadline" name="values[tender_deadline]" 
size="10" value="{value_tender_deadline}" readonly="readonly">
+                                                                               
<xsl:attribute name="title">
+                                                                               
        <xsl:value-of select="$lang_tender_deadline"/>
+                                                                               
</xsl:attribute>
+                                                                       </input>
+                                                               </td>
+                                                       </tr>
+                                                       <tr>
+                                                               <xsl:variable 
name="lang_tender_received">
+                                                                       
<xsl:value-of select="php:function('lang', 'tender received')"/>
+                                                               </xsl:variable>
+                                                               <td 
valign="top">
+                                                                       
<xsl:value-of select="$lang_tender_received"/>
+                                                               </td>
+                                                               <td>
+                                                                       <input 
type="text" id="values_tender_received" name="values[tender_received]" 
size="10" value="{value_tender_received}" readonly="readonly">
+                                                                               
<xsl:attribute name="title">
+                                                                               
        <xsl:value-of select="$lang_tender_received"/>
+                                                                               
</xsl:attribute>
+                                                                       </input>
+                                                                       <xsl:if 
test="value_tender_delay > 0">
+
+                                                                               
<xsl:text> </xsl:text>
+                                                                               
<xsl:value-of select="php:function('lang', 'delay')"/>
+                                                                               
<xsl:text> </xsl:text>
+                                                                               
<xsl:value-of select="value_tender_delay"/>
+                                                                       
</xsl:if>
+                                                               </td>
+                                                       </tr>
+                                                       <tr>
+                                                               <xsl:variable 
name="lang_inspection_on_completion">
+                                                                       
<xsl:value-of select="php:function('lang', 'inspection on completion')"/>
+                                                               </xsl:variable>
+                                                               <td 
valign="top">
+                                                                       
<xsl:value-of select="$lang_inspection_on_completion"/>
+                                                               </td>
+                                                               <td>
+                                                                       <input 
type="text" id="values_inspection_on_completion" 
name="values[inspection_on_completion]" size="10" 
value="{value_inspection_on_completion}" readonly="readonly">
+                                                                               
<xsl:attribute name="title">
+                                                                               
        <xsl:value-of select="$lang_inspection_on_completion"/>
+                                                                               
</xsl:attribute>
+                                                                       </input>
+                                                                       <xsl:if 
test="value_end_date_delay > 0">
+                                                                               
<xsl:text> </xsl:text>
+                                                                               
<xsl:value-of select="php:function('lang', 'delay')"/>
+                                                                               
<xsl:text> </xsl:text>
+                                                                               
<xsl:value-of select="value_end_date_delay"/>
+                                                                       
</xsl:if>
+                                                               </td>
+                                                       </tr>
                                                        <xsl:choose>
                                                                <xsl:when 
test="mode='edit'">
                                                                        
<xsl:call-template name="event_form"/>
@@ -645,7 +706,7 @@
                                                                        
<xsl:value-of select="lang_budget"/>
                                                                </td>
                                                                <td>
-                                                                       <input 
type="text" name="values[budget]" value="{value_budget}" 
onMouseout="window.status='';return true;"><xsl:attribute 
name="title"><xsl:value-of 
select="lang_budget_statustext"/></xsl:attribute></input><xsl:text> </xsl:text> 
[ <xsl:value-of select="currency"/> ]
+                                                                       <input 
type="text" name="values[budget]" value="{value_budget}"><xsl:attribute 
name="title"><xsl:value-of 
select="lang_budget_statustext"/></xsl:attribute></input><xsl:text> </xsl:text> 
[ <xsl:value-of select="currency"/> ]
                                                                </td>
                                                        </tr>
                                                        <tr>
@@ -653,7 +714,7 @@
                                                                        
<xsl:value-of select="lang_addition_rs"/>
                                                                </td>
                                                                <td>
-                                                                       <input 
type="text" name="values[addition_rs]" value="{value_addition_rs}" 
onMouseout="window.status='';return true;"><xsl:attribute 
name="title"><xsl:value-of 
select="lang_addition_rs_statustext"/></xsl:attribute></input><xsl:text> 
</xsl:text> [ <xsl:value-of select="currency"/> ]
+                                                                       <input 
type="text" name="values[addition_rs]" 
value="{value_addition_rs}"><xsl:attribute name="title"><xsl:value-of 
select="lang_addition_rs_statustext"/></xsl:attribute></input><xsl:text> 
</xsl:text> [ <xsl:value-of select="currency"/> ]
                                                                </td>
                                                        </tr>
                                                                <td 
valign="top">
@@ -826,7 +887,7 @@
                                                                                
        <xsl:variable name="lang_key_fetch_statustext">
                                                                                
                <xsl:value-of select="lang_key_fetch_statustext"/>
                                                                                
        </xsl:variable>
-                                                                               
        <select name="values[key_fetch]" class="forms" 
onMouseover="window.status='{$lang_key_fetch_statustext}'; return true;" 
onMouseout="window.status='';return true;">
+                                                                               
        <select name="values[key_fetch]" class="forms" 
onMouseover="window.status='{$lang_key_fetch_statustext}'; return true;">
                                                                                
                <option value="">
                                                                                
                        <xsl:value-of select="lang_no_key_fetch"/>
                                                                                
                </option>
@@ -842,7 +903,7 @@
                                                                                
        <xsl:variable name="lang_key_deliver_statustext">
                                                                                
                <xsl:value-of select="lang_key_deliver_statustext"/>
                                                                                
        </xsl:variable>
-                                                                               
        <select name="values[key_deliver]" class="forms" 
onMouseover="window.status='{$lang_key_deliver_statustext}'; return true;" 
onMouseout="window.status='';return true;">
+                                                                               
        <select name="values[key_deliver]" class="forms" 
onMouseover="window.status='{$lang_key_deliver_statustext}'; return true;">
                                                                                
                <option value="">
                                                                                
                        <xsl:value-of select="lang_no_key_deliver"/>
                                                                                
                </option>
@@ -962,7 +1023,7 @@
                                                                <xsl:value-of 
select="lang_edit"/>
                                                        </xsl:variable>
                                                        <form method="post" 
action="{$edit_action}">
-                                                               <input 
type="submit" class="forms" name="edit" value="{$lang_edit}" 
onMouseout="window.status='';return true;">
+                                                               <input 
type="submit" class="forms" name="edit" value="{$lang_edit}">
                                                                        
<xsl:attribute name="title">
                                                                                
<xsl:value-of select="lang_edit_statustext"/>
                                                                        
</xsl:attribute>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]