Proyecto

General

Perfil

« Anterior | Siguiente » 

Revisión 84

Mensaje loading

Ver diferencias:

controlies/www/groups/index.html
}
function addRecord(){
$("#messageLoading").show();
$("#dialog-form").html("");
$("#dialog-form").load("groups/form.html", function() {
$("#form_data #action").val("add");
$("#form_data #messageForm").html("Todos los campos son obligatorios");
x = ($(window).width()-500)/2;
y = ($(window).height()-500)/2;
$("#messageLoading").hide();
$("#dialog-form").dialog({
resizable: false,
position: top,
modal: true,
width: 500,
title: "Añadir Grupo"
}).dialog('option', 'position', [x, y]);
var autoComplete = new $.TextboxList('#users', {unique: true, plugins: {autocomplete: {
minLength: 2,
queryRemote: true,
remote: {url: 'users?action=getAllUsers'}
}}});
});
x = ($(window).width()-500)/2;
y = ($(window).height()-500)/2;
$("#dialog-form").dialog({
resizable: false,
position: top,
modal: true,
width: 500,
title: "Añadir Grupo"
}).dialog('option', 'position', [x, y]);
});
}
var autoComplete;
function modifyRecord(){
var uid;
$("#messageLoading").show();
var uid = rowSelected();
if(uid==false)
return false;
$("#dialog-form").html("");
$("#dialog-form").html("").css("display","none");;
$("#dialog-form").load("groups/form.html", function() {
$("#form_data #action").val("modify");
// Autocomplete with poll the server as you type
autoComplete = new $.TextboxList('#users', {unique: true, plugins: {autocomplete: {
minLength: 2,
queryRemote: true,
remote: {url: 'users?action=getAllUsers'}
}}});
$.post('groups', 'action=getGroupData&name='+uid, function(data) {
var result = $.parseJSON(data);
......
$("#form_data #type").replaceWith(textType+"<input type='hidden' id='type' name='type' value='"+result.response['type']+"'/>");
$("#form_data #name").replaceWith(result.response['name']+"<input type='hidden' id='name' name='name' value='"+result.response['name']+"'/>");
x = ($(window).width()-500)/2;
y = ($(window).height()-500)/2;
$("#messageLoading").hide();
$("#dialog-form").dialog({
resizable: false,
modal: true,
width: 500,
title: "Modificar Grupo"
}).dialog('option', 'position', [x, y]);
// Autocomplete with poll the server as you type
autoComplete = new $.TextboxList('#users', {unique: true, plugins: {autocomplete: {
minLength: 2,
queryRemote: true,
remote: {url: 'users?action=getAllUsers'}
}}});
$.each(result.response['memberuid'], function(i, l){
autoComplete.add(l);
});
});
});
});
x = ($(window).width()-500)/2;
y = ($(window).height()-500)/2;
$("#dialog-form").dialog({
resizable: false,
modal: true,
width: 500,
title: "Modificar Grupo"
}).dialog('option', 'position', [x, y]);
}
function deleteRecord(){
controlies/www/users/index.html
function addRecord(){
$("#dialog-form").html("");
$("#messageLoading").show();
$("#dialog-form").html("").css("display","none");;
$("#dialog-form").load("users/form.html", function() {
getAllGroups();
$("#form_data #action").val("add");
$("#form_data #messageForm").html("Todos los campos son obligatorios");
});
$("#form_data #messageForm").html("Todos los campos son obligatorios");
x = ($(window).width()-250)/2;
y = ($(window).height()-400)/2;
x = ($(window).width()-300)/2;
y = ($(window).height()-500)/2;
$("#dialog-form").dialog({
resizable: false,
position: top,
modal: true,
title: "Añadir Usuario"
}).dialog('option', 'position', [x, y]);
$("#messageLoading").hide();
$("#dialog-form").dialog({
resizable: false,
position: top,
modal: true,
width: 300,
title: "Añadir Usuario"
}).dialog('option', 'position', [x, y]);
});
}
function modifyRecord(){
var uid;
$("#messageLoading").show();
var uid = rowSelected();
if(uid==false)
return false;
$("#dialog-form").html("");
$("#dialog-form").html("").css("display","none");
$("#dialog-form").load("users/form.html", function() {
getAllGroups();
......
$.each(result.response['groups']['classrooms'], function(i, l){
$('#form_data input:checkbox[value='+l+']').attr('checked', true);
});
x = ($(window).width()-300)/2;
y = ($(window).height()-500)/2;
$("#messageLoading").hide();
$("#dialog-form").dialog({
resizable: false,
modal: true,
width: 300,
title: "Modificar Usuario"
}).dialog('option', 'position', [x, y]);
});
});
x = ($(window).width()-300)/2;
y = ($(window).height()-500)/2;
$("#dialog-form").dialog({
resizable: false,
modal: true,
width: 300,
title: "Modificar Usuario"
}).dialog('option', 'position', [x, y]);
}
function deleteRecord(){
controlies/www/main.html
});
function loadModule(module){
$("#module").load(module+"/index.html");
$("#messageLoading").show();
$("#module").load(module+"/index.html", function() {
$("#messageLoading").hide();
});
}
function logout(){
......
</head>
<body>
<div id="messageLoading" class="ui-state-error ui-corner-all" style="padding: 0pt 0.7em; float:right; width:90px; display:none;">
<p><span class="ui-icon ui-icon-alert" style="float: left; margin-right: 0.3em;"></span>
<strong id="messageGetGroups">Cargando...</strong></p>
</div>
<h1>&nbsp;&nbsp;Control<span class="fontTitle">IES</span>&nbsp;&nbsp;<span class="subTitle">Centros Educativos de Extremadura</span</h1>
<!-- Beginning of compulsory code below -->
controlies/Plugins/Users.py
if result[0][0][1]["homeDirectory"][0][0:14]=="/home/profesor":
type = "teacher"
try:
photo = base64.b64encode(result[0][0][1]["jpegPhoto"][0])
except:
photo = ""
dataUser = {
"user":result[0][0][1]["uid"][0],
"name":result[0][0][1]["cn"][0],
"surname":result[0][0][1]["sn"][0],
"nif":result[0][0][1]["employeeNumber"][0],
"photo":base64.b64encode(result[0][0][1]["jpegPhoto"][0]),
"photo":photo,
"type":type,
"groups":self.getUserGroups()
}

Exportar a: Unified diff