Mercurial > hg > ChinaGisRestApi
view gis_gui/blocks/workspace.js @ 273:d1b43624cc63
some hacks to make the european4D connection work
author | dwinter |
---|---|
date | Thu, 23 Feb 2012 11:44:38 +0100 |
parents | 7f008e782563 |
children |
line wrap: on
line source
$(".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(); }); }