Commit b342aff8 authored by Clément Damiens's avatar Clément Damiens
Browse files

manage community of costum (page) in admin panel

parent fc87dcfb
......@@ -67,13 +67,14 @@ $this->renderPartial( $layoutPath.'modals.'.Yii::app()->params["CO2DomainName"].
<script type="text/javascript">
var contextData = {id : "<?php echo $id ?>", type : "<?php echo $type ?>", connectTo : "<?php echo $connectTo ?>"};
var data =<?php echo json_encode($results); ?>;
var community =<?php echo json_encode($results); ?>;
jQuery(document).ready(function() {
bindLBHLinks();
//bindAnwserList();
if(typeof data != "undefined"){
initViewTableCommunity(data);
//var rolesList=
if(typeof community != "undefined"){
initViewTableCommunity(community);
}
$(".disconnectConnection").click(function(){
......@@ -248,7 +249,7 @@ $this->renderPartial( $layoutPath.'modals.'.Yii::app()->params["CO2DomainName"].
mylog.log("updateRoles", id, type, name);
//if( typeof form.links.members[id] != "undefined" ){
// var roles = ( ( typeof form.links.members[id].roles != "undefined" ) ? form.links.members[id].roles : [] ) ;
var roles = ( ( typeof community[id].roles != "undefined" ) ? community[id].roles : [] ) ;
updateRoles(id, type, name, "members", roles);
//}
......@@ -256,7 +257,7 @@ $this->renderPartial( $layoutPath.'modals.'.Yii::app()->params["CO2DomainName"].
}
function updateRoles(childId, childType, childName, connectType, roles) {
mylog.log("updateRoles", form.custom.roles);
mylog.log("updateRoles", rolesList);
var formRole = {
saveUrl : baseUrl+"/"+moduleId+"/link/removerole/",
dynForm : {
......@@ -274,7 +275,7 @@ $this->renderPartial( $layoutPath.'modals.'.Yii::app()->params["CO2DomainName"].
mylog.log("afterSave",data);
dyFObj.closeForm();
//loadDataDirectory(connectType, "user", true);
form.links.members[data.memberid].roles = data.roles ;
community[data.memberid].roles = data.roles ;
var str = "";
if( typeof data.roles != "undefined") {
$.each(data.roles, function(kR, vR){
......@@ -288,7 +289,7 @@ $this->renderPartial( $layoutPath.'modals.'.Yii::app()->params["CO2DomainName"].
properties : {
contextId : dyFInputs.inputHidden(),
contextType : dyFInputs.inputHidden(),
roles : dyFInputs.tags(form.custom.roles, tradDynForm["addroles"] , tradDynForm["addroles"], 0),
roles : dyFInputs.tags(rolesList, tradDynForm["addroles"] , tradDynForm["addroles"], 0),
childId : dyFInputs.inputHidden(),
childType : dyFInputs.inputHidden(),
connectType : dyFInputs.inputHidden()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment