Mercurial > hg > ChinaGisRestApi
diff gis_gui/blocks/workspace.js @ 63:7f008e782563
add gui files to product via FileSystemSite
author | casties |
---|---|
date | Fri, 05 Nov 2010 18:52:55 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gis_gui/blocks/workspace.js Fri Nov 05 18:52:55 2010 +0100 @@ -0,0 +1,69 @@ +$(".block[id*=workspace]").livequery(function(){ + + var homeblock = $(this); + + // OPEN + homeblock.find("#open_button").live("click", function(){ + clearTasks(); + homeblock.find("#open_button").addClass("selected"); + homeblock.find('#open').fadeIn(); + }); + + // OPEN TASKS + homeblock.find("#open_table_button").live("click", function(){ + // homeblock.find(".task[id*=open_]").removeClass("selected"); + homeblock.find("#open_table_button").addClass("selected"); + homeblock.find("#open_table").fadeIn(); + }); + homeblock.find("#open_view_button").live("click", function(){ + homeblock.find("#open_view_button").addClass("selected"); + homeblock.find("#open_view").fadeIn(); + }); + homeblock.find("#open_open_view").live('click', function(){ + clearTasks(); + foldBlock($(this).parents().filter(".block")); + addBlock("blocks/view?title=view","view"); + }); + + + // CREATE + homeblock.find("#create_button").live('click', function(){ + clearTasks(); + homeblock.find("#create_button").addClass("selected"); + homeblock.find("#create").fadeIn(); + }); + + // SEARCH + homeblock.find("#search_button").live('click', function(){ + clearTasks(); + var segment = $(this).parents().filter(".block"); + foldBlock(segment); + addBlock("blocks/search?title=search","search"); + }); + + homeblock.find("#open_open").live("click", function(){ + // switchSubscreens(homeblock, 'open', 'main'); + clearTasks(); + foldBlock($(this).parents().filter(".block")); + var newblock = addBlock("blocks/table?title=table","table"); + }); + + + // Notes + homeblock.find("#notes_button").live('click', function(){ + clearTasks(); + var segment = $(this).parents().filter(".block"); + foldBlock(segment); + addBlock("blocks/notes?title=notes","notes"); + }); + + +}); + + +function clearTasks(){ + $(".block[id*=workspace]").livequery(function(){ + $(this).find(".task").removeClass("selected"); + $(this).find(".subscreen[id!=main]").hide(); + }); +}