Giter VIP home page Giter VIP logo

Comments (2)

robicch avatar robicch commented on July 25, 2024

Hi,
the problem is that

var mid=$(this).id;

responds "undefined" always,
you should use
var mid=$(this).prop("id");

from jquerygantt.

nelsongnza avatar nelsongnza commented on July 25, 2024

Mr. Roberto,
Really thanks for your answer,

Decorator never work fine with me, i don't know why...
I solved it with this solution:

1.- Create Template:

2.- Event onclick=myProjects() and into function create template and call ajax for read from server project list available:
function myProjects(){
var idUsuario=;

var selector=resourceSelectProj = $.JST.createFromTemplate({}, "SELECT_PROJ");
resourceSelectProj.find("#iduserin").val(idUsuario);

$.ajax({
	url: 'selectProjListFromServer.php',
	type: 'POST',
	dataType: 'html',
	data: {idUser:idUsuario,statusd:statusv},
	})
	.done(function(e) {
		console.log("success OnMisProyectoServer...");
		$('#projectList').html(e);
	})
	.fail(function() {
		console.log("error OnMisProyectoServer...");
		alert("Error de Ajax OnMisProyectoServer...");
	})
	.always(function() {
		console.log("completando OnMisProyectoServer...");
	});

var ret=createModalPopup('60%','50%','','','');
ret.append(resourceSelectProj);

return;
}
3.- Load values into hidden inputs through onclick=asignarid(this) event on list projects availables from server and showed in model popup, and show button Cargar:
function asignarid(a){
var id=a.id;
var statusd=a.className;
$("#projectList>ul>li").css({"background-color":"#91B4B7"});
$("#projectList>ul>li[id="+id+"]").css({"background-color":"#34495e"});
$("#cargarButton").css({"display":"block","position":"relative","align":"center"});
$('#selectedpry').val(id);
$('#statusimp').val(statusd);
return;
}
4.- Then fianally with onclick=verngm() on load Button:
function verngm(){
var idprj = $('#selectedpry').val();
var ostats = $('#statusimp').val();
loadGanttFromServer(idprj, ostats);
closeBlackPopup('');
$("#projectClientSel").val(idprj);
return;
}

Mr. Roberto,
I repeat my thanks You,

Another hands:

Resource Editor Decorator again doesn't work,
I solved it with:

1.- Don't use decorator click function, instead into resourceEditor() function add:
resourceEditor.find(".delRes").click(function(){
$(this).closest("tr").hide(500,function(){
$(this).closest("tr").remove();
});
});

look at your version there is closest("td") and then suddendly close modal popup and row (resource) it is not deleted from resourses table...

Do you have some information for read, how to, or somethings like that, for I read it and finally, I can may be understand for take inputs information from modal popup after ajax give information from server...

I hope don't bother you, Thanks for your attention...

from jquerygantt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.