aboutsummaryrefslogtreecommitdiffstats
path: root/97suifangqa/apps/indicator/static/javascripts
diff options
context:
space:
mode:
Diffstat (limited to '97suifangqa/apps/indicator/static/javascripts')
-rw-r--r--97suifangqa/apps/indicator/static/javascripts/edit_history_data.js18
-rw-r--r--97suifangqa/apps/indicator/static/javascripts/new_delete_index.js15
2 files changed, 30 insertions, 3 deletions
diff --git a/97suifangqa/apps/indicator/static/javascripts/edit_history_data.js b/97suifangqa/apps/indicator/static/javascripts/edit_history_data.js
index d4ccdf5..898e904 100644
--- a/97suifangqa/apps/indicator/static/javascripts/edit_history_data.js
+++ b/97suifangqa/apps/indicator/static/javascripts/edit_history_data.js
@@ -21,8 +21,21 @@ $(document).ready(function(){
maxDate: 0 // 0->today, 1->tomorrow
});
+ // delete record {{{
// delete button
$("#delete_btn").bind("click", function(){
+ var this_edit_data_div = $(this).closest(".edit_data");
+ var this_delete_prompt_div = this_edit_data_div.siblings(".delete_prompt");
+ this_delete_prompt_div.show();
+ return false;
+ });
+ // cancel delete button
+ $("#cancel_delete_btn").bind("click", function(){
+ $(this).closest(".delete_prompt").hide();
+ return false;
+ });
+ // confirm delete button
+ $("#confirm_delete_btn").bind("click", function(){
// delete record (ajax)
var time = moment().valueOf();
$.ajax({
@@ -51,13 +64,16 @@ $(document).ready(function(){
});
return false;
});
+ // }}}
// edit button
$("#edit_btn").bind("click", function(){
var this_edit_data_div = $(this).closest(".edit_data");
var this_editing_data_div = this_edit_data_div.siblings(".editing_data");
- this_editing_data_div.show();
+ var this_delete_prompt_div = this_edit_data_div.siblings(".delete_prompt");
+ this_delete_prompt_div.hide();
this_edit_data_div.hide();
+ this_editing_data_div.show();
return false;
});
diff --git a/97suifangqa/apps/indicator/static/javascripts/new_delete_index.js b/97suifangqa/apps/indicator/static/javascripts/new_delete_index.js
index e216f09..635e9c7 100644
--- a/97suifangqa/apps/indicator/static/javascripts/new_delete_index.js
+++ b/97suifangqa/apps/indicator/static/javascripts/new_delete_index.js
@@ -22,6 +22,16 @@ $(document).ready(function(){
}
);
+ // 'all_condition' letter selectors {{{
+ // disable all letter selectors
+ $(".index_all_letter .letter").addClass("disabled");
+ $(".index_letter_container .letter_section").each(function() {
+ var l = $(this).attr('id').replace('sec_', '');
+ //console.log(l);
+ $(".index_all_letter #"+l).removeClass("disabled");
+ });
+ // }}}
+
// login control kit {{{
$(".drop-down-area").bind("click", function(){
var drop_down_menu = $(".drop-down-menu");
@@ -144,8 +154,9 @@ $(document).ready(function(){
$(".letter_selected").removeClass("letter_selected");
$(this).addClass("letter_selected");
var container = $(".index_letter_container");
- var letterClass = $(this).text();
- var scrollTo = $("."+letterClass);
+ var letterClass = $(this).attr('id');
+ //console.log(letterClass);
+ var scrollTo = $("#sec_"+letterClass);
container.scrollTop(scrollTo.offset().top - container.offset().top + container.scrollTop());
select_letter = letterClass;
return false;