[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [13391] fix prefs reset and tune homescreen
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [13391] fix prefs reset and tune homescreen |
Date: |
Tue, 09 Jun 2015 12:36:17 +0000 |
Revision: 13391
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=13391
Author: sigurdne
Date: 2015-06-09 12:36:16 +0000 (Tue, 09 Jun 2015)
Log Message:
-----------
fix prefs reset and tune homescreen
Modified Paths:
--------------
trunk/controller/inc/class.hook_helper.inc.php
trunk/home.php
trunk/phpgwapi/inc/class.preferences.inc.php
trunk/phpgwapi/templates/portico/css/base.css
trunk/set_box.php
Modified: trunk/controller/inc/class.hook_helper.inc.php
===================================================================
--- trunk/controller/inc/class.hook_helper.inc.php 2015-06-09 12:35:10 UTC
(rev 13390)
+++ trunk/controller/inc/class.hook_helper.inc.php 2015-06-09 12:36:16 UTC
(rev 13391)
@@ -64,6 +64,11 @@
*/
public function home()
{
+ $app_id =
$GLOBALS['phpgw']->applications->name2id('controller');
+ if( !isset($GLOBALS['portal_order'])
||!in_array($app_id, $GLOBALS['portal_order']) )
+ {
+ $GLOBALS['portal_order'][] = $app_id;
+ }
$location_array = array();
$component_short_desc = array();
Modified: trunk/home.php
===================================================================
--- trunk/home.php 2015-06-09 12:35:10 UTC (rev 13390)
+++ trunk/home.php 2015-06-09 12:36:16 UTC (rev 13391)
@@ -203,7 +203,7 @@
}
$GLOBALS['phpgw']->hooks->process('home', $sorted_apps);
-
+
if ( isset($GLOBALS['portal_order']) &&
is_array($GLOBALS['portal_order']) )
{
$GLOBALS['phpgw']->preferences->delete('portal_order');
@@ -213,12 +213,12 @@
}
$GLOBALS['phpgw']->preferences->save_repository();
}
- if( phpgwapi_cache::system_get('phpgwapi',
'phpgw_home_screen_message'))
- {
- echo "<div class='msg_important'><h2>";
- echo nl2br(phpgwapi_cache::system_get('phpgwapi',
'phpgw_home_screen_message_title'));
- echo "</h2>";
- echo nl2br(phpgwapi_cache::system_get('phpgwapi',
'phpgw_home_screen_message'));
- echo '</div>';
- }
+ if( phpgwapi_cache::system_get('phpgwapi', 'phpgw_home_screen_message'))
+ {
+ echo "<div class='msg_important'><h2>";
+ echo nl2br(phpgwapi_cache::system_get('phpgwapi',
'phpgw_home_screen_message_title'));
+ echo "</h2>";
+ echo nl2br(phpgwapi_cache::system_get('phpgwapi',
'phpgw_home_screen_message'));
+ echo '</div>';
+ }
$GLOBALS['phpgw']->common->phpgw_footer();
Modified: trunk/phpgwapi/inc/class.preferences.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.preferences.inc.php 2015-06-09 12:35:10 UTC
(rev 13390)
+++ trunk/phpgwapi/inc/class.preferences.inc.php 2015-06-09 12:36:16 UTC
(rev 13391)
@@ -434,7 +434,7 @@
* the effektive prefs ($this->data) are updated to reflect the
change
* @return the new effective prefs (even when forced or default
prefs are deleted!)
*/
- public function delete($app_name, $var = False,$type = 'user')
+ public function delete($app_name, $var = false,$type = 'user')
{
//echo "<p>delete('$app_name','$var')</p>\n";
$set_via = array(
@@ -446,7 +446,7 @@
{
$type = 'user';
}
- if ($all = (is_string($var) && $var == ''))
+ if ($all = !$var)
{
unset($this->{$type}[$app_name]);
unset($this->data[$app_name]);
Modified: trunk/phpgwapi/templates/portico/css/base.css
===================================================================
--- trunk/phpgwapi/templates/portico/css/base.css 2015-06-09 12:35:10 UTC
(rev 13390)
+++ trunk/phpgwapi/templates/portico/css/base.css 2015-06-09 12:36:16 UTC
(rev 13391)
@@ -400,3 +400,10 @@
cursor: default;
}
+.home_portal_controls
+{
+ float: right;
+ text-align: right;
+ padding: 5px 5px 0px 0px;
+ width: 10px;
+}
Modified: trunk/set_box.php
===================================================================
--- trunk/set_box.php 2015-06-09 12:35:10 UTC (rev 13390)
+++ trunk/set_box.php 2015-06-09 12:36:16 UTC (rev 13391)
@@ -73,29 +73,29 @@
$curr_position =
$GLOBALS['phpgw']->common->find_portal_order((int) $_GET['app']);
$max_count =
count($GLOBALS['phpgw_info']['user']['preferences']['portal_order']) - 1;
$offset = -1;
- if($curr_position == 0)
+ if($curr_position == 0) // already on top
{
- $new_order = $max_count;
+// $new_order = $max_count;
}
else
{
$new_order = $curr_position + $offset;
+
move_boxes($curr_position,$new_order,$offset,0,$max_count);
}
-
move_boxes($curr_position,$new_order,$offset,0,$max_count);
break;
case 'down':
$curr_position =
$GLOBALS['phpgw']->common->find_portal_order((int) $_GET['app']);
$max_count =
count($GLOBALS['phpgw_info']['user']['preferences']['portal_order']) - 1;
$offset = 1;
- if($curr_position == $max_count)
+ if($curr_position == $max_count) // already last
{
$new_order = 0;
}
else
{
$new_order = $curr_position + $offset;
+
move_boxes($curr_position,$new_order,$offset,$max_count,0);
}
-
move_boxes($curr_position,$new_order,$offset,$max_count,0);
break;
case 'edit':
case 'question':
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [13391] fix prefs reset and tune homescreen,
Sigurd Nes <=