Proyecto

General

Perfil

« Anterior | Siguiente » 

Revisión 84

Mensaje loading

Ver diferencias:

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(){

Exportar a: Unified diff