[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 13/30: Administration user : add condition if
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 13/30: Administration user : add condition if no folder exists + esthetic |
Date: |
Tue, 02 Jun 2015 22:29:08 +0000 |
sparkyx pushed a commit to branch master
in repository noalyss.
commit b50bde6c279642f3733e4b95702211ac6d00f61f
Author: Dany De Bontridder <address@hidden>
Date: Mon Jun 1 21:17:39 2015 +0200
Administration user : add condition if no folder exists + esthetic
---
html/js/admin.js | 4 ++--
include/class_dossier.php | 10 +++++++++-
include/user_detail.inc.php | 35 +++--------------------------------
3 files changed, 14 insertions(+), 35 deletions(-)
diff --git a/html/js/admin.js b/html/js/admin.js
index 80b01e5..448dc8b 100644
--- a/html/js/admin.js
+++ b/html/js/admin.js
@@ -45,7 +45,7 @@ function folder_display(p_user)
var folder = {};
var create = false;
if (!$('folder_list_div')) {
- folder = create_div({'id': 'folder_list_div', 'cssclass':
"inner_box", 'style': 'width:90%,right:5%;top:100px;display:block'});
+ folder = create_div({'id': 'folder_list_div', 'cssclass':
"inner_box", 'style': 'width:90%,right:5%;top:100px'});
create = true;
}
folder = $('folder_list_div');
@@ -83,7 +83,7 @@ function folder_remove(p_user,p_dossier )
parameters: {"p_user": p_user, 'p_dossier': p_dossier, "op":
"folder_remove", 'gDossier': 0},
onSuccess: function (p_xml) {
// table id = database_list
- $('row'+p_dossier).hide();
+ new Effect.Opacity('row'+p_dossier, { from: 1.0, to: 0.0,
duration: 0.2 });
remove_waiting_box();
}
});
diff --git a/include/class_dossier.php b/include/class_dossier.php
index 81559a1..519dd99 100644
--- a/include/class_dossier.php
+++ b/include/class_dossier.php
@@ -108,7 +108,15 @@ class Dossier
}
-
+ /**
+ * Count the number of folder in the repository
+ * @return integer
+ */
+ function count()
+ {
+ $nb_folder=$this->cn->get_value('select count(*) from ac_dossier');
+ return $nb_folder;
+ }
/*!
* \brief Return all the users
* as an array
diff --git a/include/user_detail.inc.php b/include/user_detail.inc.php
index b3f3b564..d4a457b 100644
--- a/include/user_detail.inc.php
+++ b/include/user_detail.inc.php
@@ -69,35 +69,6 @@ if (isset($_POST['SAVE']))
}
$UserChange->save();
- /**
- * replace by ajax see ajax_admin.php
- * foreach ($_POST as $name => $elem)
- // Update Priv on Folder
-
- {
- if (substr_count($name, 'PRIV') != 0)
- {
- $cn = new Database();
- if ( defined ('MULTI')&& MULTI==0)
- {
- $name=dbname;
- $db_id=MONO_DATABASE;
- $UserChange->set_folder_access($db_id,
$elem);
- }
- else
- {
- $db_id = mb_substr($name, 4);
- $name=$cn->format_name($db_id, "dos");
- if ( $cn->exist_database($name) == 1 )
- {
-
$UserChange->set_folder_access($db_id, $elem);
- Dossier::synchro_admin($db_id);
- }
- }
- }
- }
- *
- */
}
}
else
@@ -210,15 +181,15 @@ $array = array(
array('value' => 'R', 'label' => 'Utilisateur normal')
);
$repo = new Dossier(0);
-
-$Dossier = $repo->show_dossier('R',$UserChange->login);
-if (empty($Dossier))
+if ( $repo->count() == 0)
{
echo hb('* Aucun Dossier *');
echo '</div>';
return;
}
+$Dossier = $repo->show_dossier('R',$UserChange->login);
+
$mod_user = new User(new Database(), $uid);
?>
<TABLE id="database_list" class="result">
- [Noalyss-commit] [noalyss] 01/30: Task #1118 - Partage de notes via le Pense-bête #1118 : partage de note Correction bug, (continued)
- [Noalyss-commit] [noalyss] 01/30: Task #1118 - Partage de notes via le Pense-bête #1118 : partage de note Correction bug, Dany De Bontridder, 2015/06/02
- [Noalyss-commit] [noalyss] 03/30: Merge tag 'rel6803', Dany De Bontridder, 2015/06/02
- [Noalyss-commit] [noalyss] 02/30: Task #1123 - Visualisation/présentation de la balance: SOLDE #1123 : PRINTBAL ajout du solde quand on utilise les sous-niveaux, Dany De Bontridder, 2015/06/02
- [Noalyss-commit] [noalyss] 05/30: Icon in the menu, Dany De Bontridder, 2015/06/02
- [Noalyss-commit] [noalyss] 06/30: #1118 : partage de note Esthétique Zoom des notes partagées, Dany De Bontridder, 2015/06/02
- [Noalyss-commit] [noalyss] 04/30: Icon in the menu, Dany De Bontridder, 2015/06/02
- [Noalyss-commit] [noalyss] 07/30: Improve method HtmlInput::title_box, Dany De Bontridder, 2015/06/02
- [Noalyss-commit] [noalyss] 08/30: #1118 : partage de note Ne peut partager note non sauvée, Dany De Bontridder, 2015/06/02
- [Noalyss-commit] [noalyss] 09/30: #1118 : partage de note Esthétique zoom, Dany De Bontridder, 2015/06/02
- [Noalyss-commit] [noalyss] 10/30: Database improve : new function get_affected returns the number of rows affected by the last query, Dany De Bontridder, 2015/06/02
- [Noalyss-commit] [noalyss] 13/30: Administration user : add condition if no folder exists + esthetic,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 11/30: Remove table priv_user, the local admin and plugin user are obsolete, Dany De Bontridder, 2015/06/02
- [Noalyss-commit] [noalyss] 16/30: Administration user : esthetic, Dany De Bontridder, 2015/06/02
- [Noalyss-commit] [noalyss] 14/30: Administration user : add condition if no folder exists + esthetic, Dany De Bontridder, 2015/06/02
- [Noalyss-commit] [noalyss] 15/30: Administration user : esthetic + rewrite add user Correct bug : ajax_admin.js, Dany De Bontridder, 2015/06/02
- [Noalyss-commit] [noalyss] 17/30: Administration user : esthetic, Dany De Bontridder, 2015/06/02
- [Noalyss-commit] [noalyss] 18/30: HtmlInput : add a new function to create an empty anchor, Dany De Bontridder, 2015/06/02
- [Noalyss-commit] [noalyss] 12/30: Administration user : Add / remove right on folder in ajax, Dany De Bontridder, 2015/06/02
- [Noalyss-commit] [noalyss] 19/30: HtmlInput :: anchor_empty add a title, Dany De Bontridder, 2015/06/02
- [Noalyss-commit] [noalyss] 20/30: Message when no financial ledger are found, Dany De Bontridder, 2015/06/02
- [Noalyss-commit] [noalyss] 21/30: Message when no financial ledger are found, Dany De Bontridder, 2015/06/02