comparison 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
comparison
equal deleted inserted replaced
62:3905385c8854 63:7f008e782563
1 $(".block[id*=workspace]").livequery(function(){
2
3 var homeblock = $(this);
4
5 // OPEN
6 homeblock.find("#open_button").live("click", function(){
7 clearTasks();
8 homeblock.find("#open_button").addClass("selected");
9 homeblock.find('#open').fadeIn();
10 });
11
12 // OPEN TASKS
13 homeblock.find("#open_table_button").live("click", function(){
14 // homeblock.find(".task[id*=open_]").removeClass("selected");
15 homeblock.find("#open_table_button").addClass("selected");
16 homeblock.find("#open_table").fadeIn();
17 });
18 homeblock.find("#open_view_button").live("click", function(){
19 homeblock.find("#open_view_button").addClass("selected");
20 homeblock.find("#open_view").fadeIn();
21 });
22 homeblock.find("#open_open_view").live('click', function(){
23 clearTasks();
24 foldBlock($(this).parents().filter(".block"));
25 addBlock("blocks/view?title=view","view");
26 });
27
28
29 // CREATE
30 homeblock.find("#create_button").live('click', function(){
31 clearTasks();
32 homeblock.find("#create_button").addClass("selected");
33 homeblock.find("#create").fadeIn();
34 });
35
36 // SEARCH
37 homeblock.find("#search_button").live('click', function(){
38 clearTasks();
39 var segment = $(this).parents().filter(".block");
40 foldBlock(segment);
41 addBlock("blocks/search?title=search","search");
42 });
43
44 homeblock.find("#open_open").live("click", function(){
45 // switchSubscreens(homeblock, 'open', 'main');
46 clearTasks();
47 foldBlock($(this).parents().filter(".block"));
48 var newblock = addBlock("blocks/table?title=table","table");
49 });
50
51
52 // Notes
53 homeblock.find("#notes_button").live('click', function(){
54 clearTasks();
55 var segment = $(this).parents().filter(".block");
56 foldBlock(segment);
57 addBlock("blocks/notes?title=notes","notes");
58 });
59
60
61 });
62
63
64 function clearTasks(){
65 $(".block[id*=workspace]").livequery(function(){
66 $(this).find(".task").removeClass("selected");
67 $(this).find(".subscreen[id!=main]").hide();
68 });
69 }